Skip to content

Commit

Permalink
added shortKey to InputColor
Browse files Browse the repository at this point in the history
Refs: #6251
  • Loading branch information
AlexanderSchmidtCE committed Oct 24, 2024
1 parent 6711773 commit 818590c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
3 changes: 2 additions & 1 deletion packages/components/src/components/input-color/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Für eine vollständige Barrierefreiheit prüfen Sie die Verwendung einer vorgef
## Properties

| Property | Attribute | Description | Type | Default |
| --------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| --------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ----------- |
| `_accessKey` | `_access-key` | Defines which key combination can be used to trigger or focus the interactive element of the component. | `string \| undefined` | `undefined` |
| `_alert` | `_alert` | Defines whether the screen-readers should read out the notification. | `boolean \| undefined` | `true` |
| `_autoComplete` | `_auto-complete` | Defines whether the input can be auto-completed. | `"off" \| "on" \| undefined` | `undefined` |
Expand All @@ -63,6 +63,7 @@ Für eine vollständige Barrierefreiheit prüfen Sie die Verwendung einer vorgef
| `_msg` | -- | Defines the properties for a message rendered as Alert component. | `undefined \| {} & { _level?: 0 \| 2 \| 1 \| 4 \| 3 \| 5 \| 6 \| undefined; _on?: KoliBriAlertEventCallbacks \| undefined; _type?: "default" \| "info" \| "success" \| "warning" \| "error" \| undefined; _variant?: "card" \| "msg" \| undefined; _label?: string \| undefined; _alert?: boolean \| undefined; _hasCloser?: boolean \| undefined; } & { _description: string; }` | `undefined` |
| `_name` | `_name` | Defines the technical name of an input field. | `string \| undefined` | `undefined` |
| `_on` | -- | Gibt die EventCallback-Funktionen für das Input-Event an. | `InputTypeOnBlur & InputTypeOnClick & InputTypeOnChange & InputTypeOnFocus & InputTypeOnInput \| undefined` | `undefined` |
| `_shortKey` | `_short-key` | Defines the elements short key. | `string \| undefined` | `undefined` |
| `_smartButton` | `_smart-button` | Allows to add a button with an arbitrary action within the element (\_hide-label only). | `string \| undefined \| { _label: string; } & { _tabIndex?: number \| undefined; _value?: Stringified<StencilUnknown>; _ariaExpanded?: boolean \| undefined; _role?: AlternativeButtonLinkRolePropType \| undefined; _ariaControls?: string \| undefined; _ariaDescription?: string \| undefined; _ariaSelected?: boolean \| undefined; _on?: ButtonCallbacksPropType<StencilUnknown> \| undefined; _type?: "button" \| "reset" \| "submit" \| undefined; _variant?: "primary" \| "secondary" \| "normal" \| "tertiary" \| "danger" \| "ghost" \| "custom" \| undefined; _customClass?: string \| undefined; _disabled?: boolean \| undefined; _hideLabel?: boolean \| undefined; _icons?: IconsPropType \| undefined; _id?: string \| undefined; _name?: string \| undefined; _syncValueBySelector?: string \| undefined; _tooltipAlign?: AlignPropType \| undefined; _accessKey?: string \| undefined; }` | `undefined` |
| `_suggestions` | `_suggestions` | Suggestions to provide for the input. | `W3CInputValue[] \| string \| undefined` | `undefined` |
| `_tabIndex` | `_tab-index` | Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) | `number \| undefined` | `undefined` |
Expand Down
6 changes: 6 additions & 0 deletions packages/components/src/components/input-color/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type {
LabelWithExpertSlotPropType,
MsgPropType,
NamePropType,
ShortKeyPropType,
Stringified,
SuggestionsPropType,
SyncValueBySelectorPropType,
Expand Down Expand Up @@ -328,6 +329,11 @@ export class KolInputColor implements InputColorAPI, FocusableElement {
this.controller.validateOn(value);
}

@Watch('_shortKey')
public validateShortKey(value?: ShortKeyPropType): void {
this.controller.validateShortKey(value);
}

@Watch('_smartButton')
public validateSmartButton(value?: ButtonProps | string): void {
this.controller.validateSmartButton(value);
Expand Down
Loading

0 comments on commit 818590c

Please sign in to comment.