@skf-design-system/ui-components 1.0.0-beta.5 → 1.0.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/dist/components/accordion/accordion-item.d.ts +1 -1
  2. package/dist/components/accordion/accordion.component.d.ts +4 -4
  3. package/dist/components/accordion/accordion.component.js +18 -17
  4. package/dist/components/accordion/accordion.styles.d.ts +1 -2
  5. package/dist/components/accordion/accordion.styles.js +5 -4
  6. package/dist/components/alert/alert.component.d.ts +5 -5
  7. package/dist/components/alert/alert.component.js +46 -35
  8. package/dist/components/alert/alert.styles.d.ts +1 -2
  9. package/dist/components/alert/alert.styles.js +29 -24
  10. package/dist/components/breadcrumb/breadcrumb.component.d.ts +29 -0
  11. package/dist/components/breadcrumb/breadcrumb.d.ts +8 -0
  12. package/dist/components/breadcrumb-item/breadcrumb-item.component.d.ts +25 -0
  13. package/dist/components/breadcrumb-item/breadcrumb-item.d.ts +8 -0
  14. package/dist/components/button/button.component.d.ts +29 -5
  15. package/dist/components/button/button.component.js +89 -52
  16. package/dist/components/button/button.styles.js +65 -45
  17. package/dist/components/card/card.component.d.ts +4 -4
  18. package/dist/components/card/card.component.js +35 -24
  19. package/dist/components/card/card.styles.d.ts +1 -2
  20. package/dist/components/card/card.styles.js +14 -12
  21. package/dist/components/checkbox/checkbox.component.d.ts +11 -12
  22. package/dist/components/checkbox/checkbox.component.js +96 -90
  23. package/dist/components/collapse/collapse.component.d.ts +8 -8
  24. package/dist/components/collapse/collapse.component.js +42 -34
  25. package/dist/components/collapse/collapse.styles.js +15 -14
  26. package/dist/components/dialog/dialog.component.d.ts +74 -0
  27. package/dist/components/dialog/dialog.component.js +187 -0
  28. package/dist/components/dialog/dialog.d.ts +8 -0
  29. package/dist/components/dialog/dialog.js +6 -0
  30. package/dist/components/dialog/dialog.styles.d.ts +1 -0
  31. package/dist/components/dialog/dialog.styles.js +91 -0
  32. package/dist/components/divider/divider.component.d.ts +3 -3
  33. package/dist/components/divider/divider.component.js +39 -27
  34. package/dist/components/divider/divider.styles.d.ts +1 -2
  35. package/dist/components/divider/divider.styles.js +26 -26
  36. package/dist/components/heading/heading.component.d.ts +2 -2
  37. package/dist/components/heading/heading.component.js +13 -13
  38. package/dist/components/icon/icon.component.d.ts +2 -5
  39. package/dist/components/icon/icon.component.js +32 -23
  40. package/dist/components/icon/icon.styles.js +53 -47
  41. package/dist/components/input/input.component.d.ts +12 -11
  42. package/dist/components/input/input.component.js +88 -89
  43. package/dist/components/link/link.component.d.ts +7 -6
  44. package/dist/components/link/link.component.js +49 -43
  45. package/dist/components/link/link.styles.js +36 -40
  46. package/dist/components/loader/loader.component.d.ts +2 -2
  47. package/dist/components/loader/loader.component.js +39 -32
  48. package/dist/components/loader/loader.styles.js +11 -10
  49. package/dist/components/logo/logo.component.d.ts +3 -3
  50. package/dist/components/logo/logo.component.js +28 -17
  51. package/dist/components/logo/logo.styles.d.ts +1 -2
  52. package/dist/components/logo/logo.styles.js +11 -9
  53. package/dist/components/menu/menu.component.d.ts +24 -0
  54. package/dist/components/menu/menu.component.js +18 -0
  55. package/dist/components/menu/menu.d.ts +8 -0
  56. package/dist/components/menu/menu.js +6 -0
  57. package/dist/components/menu/menu.styles.d.ts +1 -0
  58. package/dist/components/menu/menu.styles.js +11 -0
  59. package/dist/components/menu-item/menu-item.component.d.ts +25 -0
  60. package/dist/components/menu-item/menu-item.component.js +13 -0
  61. package/dist/components/menu-item/menu-item.d.ts +8 -0
  62. package/dist/components/menu-item/menu-item.js +6 -0
  63. package/dist/components/menu-item/menu-item.styles.d.ts +1 -0
  64. package/dist/components/menu-item/menu-item.styles.js +19 -0
  65. package/dist/components/popover/popover.component.d.ts +29 -0
  66. package/dist/components/popover/popover.component.js +37 -0
  67. package/dist/components/popover/popover.d.ts +8 -0
  68. package/dist/components/popover/popover.js +6 -0
  69. package/dist/components/popover/popover.styles.d.ts +1 -0
  70. package/dist/components/popover/popover.styles.js +12 -0
  71. package/dist/components/progress/progress.component.d.ts +22 -0
  72. package/dist/components/progress/progress.component.js +49 -0
  73. package/dist/components/progress/progress.d.ts +8 -0
  74. package/dist/components/progress/progress.js +6 -0
  75. package/dist/components/progress/progress.styles.d.ts +1 -0
  76. package/dist/components/progress/progress.styles.js +48 -0
  77. package/dist/components/radio/radio.component.d.ts +7 -9
  78. package/dist/components/radio/radio.component.js +95 -79
  79. package/dist/components/select/select.component.d.ts +10 -12
  80. package/dist/components/select/select.component.js +120 -120
  81. package/dist/components/select/select.controllers.d.ts +1 -26
  82. package/dist/components/select/select.controllers.js +35 -95
  83. package/dist/components/select-option/select-option.component.d.ts +1 -1
  84. package/dist/components/select-option/select-option.controllers.d.ts +1 -1
  85. package/dist/components/select-option-group/select-option-group.component.d.ts +1 -1
  86. package/dist/components/select-option-group/select-option-group.component.js +9 -9
  87. package/dist/components/stepper/stepper.component.d.ts +38 -0
  88. package/dist/components/stepper/stepper.component.js +91 -0
  89. package/dist/components/stepper/stepper.d.ts +8 -0
  90. package/dist/components/stepper/stepper.helpers.d.ts +16 -0
  91. package/dist/components/stepper/stepper.helpers.js +18 -0
  92. package/dist/components/stepper/stepper.js +6 -0
  93. package/dist/components/stepper/stepper.styles.d.ts +1 -0
  94. package/dist/components/stepper/stepper.styles.js +15 -0
  95. package/dist/components/stepper-item/stepper-item.component.d.ts +47 -0
  96. package/dist/components/stepper-item/stepper-item.component.js +113 -0
  97. package/dist/components/stepper-item/stepper-item.d.ts +8 -0
  98. package/dist/components/stepper-item/stepper-item.js +6 -0
  99. package/dist/components/stepper-item/stepper-item.styles.d.ts +1 -0
  100. package/dist/components/stepper-item/stepper-item.styles.js +98 -0
  101. package/dist/components/switch/switch.component.d.ts +2 -2
  102. package/dist/components/switch/switch.component.js +17 -7
  103. package/dist/components/switch/switch.styles.js +16 -13
  104. package/dist/components/tab/tab.component.d.ts +29 -0
  105. package/dist/components/tab/tab.component.js +57 -0
  106. package/dist/components/tab/tab.d.ts +8 -0
  107. package/dist/components/tab/tab.js +6 -0
  108. package/dist/components/tab/tab.styles.d.ts +1 -0
  109. package/dist/components/tab/tab.styles.js +123 -0
  110. package/dist/components/tab-group/tab-group.component.d.ts +43 -0
  111. package/dist/components/tab-group/tab-group.component.js +98 -0
  112. package/dist/components/tab-group/tab-group.d.ts +8 -0
  113. package/dist/components/tab-group/tab-group.js +6 -0
  114. package/dist/components/tab-group/tab-group.styles.d.ts +1 -0
  115. package/dist/components/tab-group/tab-group.styles.js +75 -0
  116. package/dist/components/tab-panel/tab-panel.component.d.ts +19 -0
  117. package/dist/components/tab-panel/tab-panel.component.js +36 -0
  118. package/dist/components/tab-panel/tab-panel.d.ts +8 -0
  119. package/dist/components/tab-panel/tab-panel.js +6 -0
  120. package/dist/components/tab-panel/tab-panel.styles.d.ts +1 -0
  121. package/dist/components/tab-panel/tab-panel.styles.js +13 -0
  122. package/dist/components/tag/tag.component.d.ts +2 -2
  123. package/dist/components/tag/tag.component.js +61 -45
  124. package/dist/components/tag/tag.styles.js +30 -28
  125. package/dist/components/textarea/textarea.component.d.ts +4 -4
  126. package/dist/components/textarea/textarea.component.js +2 -2
  127. package/dist/components/toast/toast.component.d.ts +8 -5
  128. package/dist/components/toast/toast.component.js +30 -26
  129. package/dist/components/toast/toast.singleton.d.ts +5 -10
  130. package/dist/components/toast/toast.singleton.js +25 -25
  131. package/dist/components/toast/toast.styles.d.ts +1 -0
  132. package/dist/components/toast-item/toast-item.component.d.ts +1 -1
  133. package/dist/components/toast-item/toast-item.component.js +15 -15
  134. package/dist/components/toast-item/toast-item.styles.js +18 -0
  135. package/dist/components/toast-wrapper/toast-wrapper.component.d.ts +2 -2
  136. package/dist/components/toast-wrapper/toast-wrapper.component.js +11 -11
  137. package/dist/components/toast-wrapper/toast-wrapper.styles.d.ts +1 -0
  138. package/dist/components/tooltip/tooltip.component.d.ts +24 -0
  139. package/dist/components/tooltip/tooltip.component.js +18 -0
  140. package/dist/components/tooltip/tooltip.d.ts +8 -0
  141. package/dist/components/tooltip/tooltip.js +6 -0
  142. package/dist/components/tooltip/tooltip.styles.d.ts +1 -0
  143. package/dist/components/tooltip/tooltip.styles.js +12 -0
  144. package/dist/custom-elements.json +2465 -629
  145. package/dist/index.d.ts +11 -0
  146. package/dist/index.js +77 -44
  147. package/dist/internal/base-classes/popover/popover.base.d.ts +29 -0
  148. package/dist/internal/base-classes/popover/popover.base.js +116 -0
  149. package/dist/internal/base-classes/popover/popover.styles.d.ts +1 -0
  150. package/dist/internal/base-classes/popover/popover.styles.js +29 -0
  151. package/dist/internal/components/formBase.d.ts +1 -0
  152. package/dist/internal/components/formBase.js +11 -11
  153. package/dist/internal/components/hint/hint.component.d.ts +2 -2
  154. package/dist/internal/components/hint/hint.component.js +13 -13
  155. package/dist/internal/components/skf-element.js +26 -25
  156. package/dist/internal/controllers/popover.controller.d.ts +16 -0
  157. package/dist/internal/controllers/popover.controller.js +44 -0
  158. package/dist/internal/helpers/hintSeverity.d.ts +2 -2
  159. package/dist/internal/helpers/watch.d.ts +27 -0
  160. package/dist/internal/helpers/watch.js +28 -0
  161. package/dist/internal/templates/asterisk.d.ts +1 -1
  162. package/dist/internal/templates/asterisk.js +7 -6
  163. package/dist/react/index.d.ts +13 -0
  164. package/dist/react/index.js +13 -0
  165. package/dist/react/skf-breadcrumb/index.d.ts +9 -0
  166. package/dist/react/skf-breadcrumb/index.js +17 -0
  167. package/dist/react/skf-breadcrumb-item/index.d.ts +3 -0
  168. package/dist/react/skf-breadcrumb-item/index.js +13 -0
  169. package/dist/react/skf-button/index.d.ts +7 -1
  170. package/dist/react/skf-button/index.js +5 -1
  171. package/dist/react/skf-dialog/index.d.ts +15 -0
  172. package/dist/react/skf-dialog/index.js +19 -0
  173. package/dist/react/skf-menu/index.d.ts +12 -0
  174. package/dist/react/skf-menu/index.js +18 -0
  175. package/dist/react/skf-menu-item/index.d.ts +27 -0
  176. package/dist/react/skf-menu-item/index.js +23 -0
  177. package/dist/react/skf-popover/index.d.ts +12 -0
  178. package/dist/react/skf-popover/index.js +18 -0
  179. package/dist/react/skf-progress/index.d.ts +3 -0
  180. package/dist/react/skf-progress/index.js +13 -0
  181. package/dist/react/skf-stepper/index.d.ts +9 -0
  182. package/dist/react/skf-stepper/index.js +17 -0
  183. package/dist/react/skf-stepper-item/index.d.ts +9 -0
  184. package/dist/react/skf-stepper-item/index.js +17 -0
  185. package/dist/react/skf-tab/index.d.ts +12 -0
  186. package/dist/react/skf-tab/index.js +18 -0
  187. package/dist/react/skf-tab-group/index.d.ts +3 -0
  188. package/dist/react/skf-tab-group/index.js +13 -0
  189. package/dist/react/skf-tab-panel/index.d.ts +3 -0
  190. package/dist/react/skf-tab-panel/index.js +13 -0
  191. package/dist/react/skf-tooltip/index.d.ts +12 -0
  192. package/dist/react/skf-tooltip/index.js +18 -0
  193. package/dist/styles/component.styles.js +15 -2
  194. package/dist/types/jsx/custom-element-jsx.d.ts +603 -27
  195. package/dist/types/vue/index.d.ts +413 -11
  196. package/dist/vscode.html-custom-data.json +462 -36
  197. package/dist/web-types.json +944 -90
  198. package/package.json +43 -42
  199. package/dist/components/toast-item/toast-item.style.js +0 -16
  200. /package/dist/components/{toast/toast.style.d.ts → breadcrumb/breadcrumb.styles.d.ts} +0 -0
  201. /package/dist/components/{toast-wrapper/toast-wrapper.style.d.ts → breadcrumb-item/breadcrumb-item.styles.d.ts} +0 -0
  202. /package/dist/components/toast/{toast.style.js → toast.styles.js} +0 -0
  203. /package/dist/components/toast-item/{toast-item.style.d.ts → toast-item.styles.d.ts} +0 -0
  204. /package/dist/components/toast-wrapper/{toast-wrapper.style.js → toast-wrapper.styles.js} +0 -0
@@ -1,78 +1,84 @@
1
1
  import { css as o } from "lit";
2
- const r = o`
2
+ const i = o`
3
+ /* stylelint-disable selector-class-pattern */
3
4
  @layer components {
4
5
  :host {
5
6
  display: inline-flex;
6
7
  }
7
8
 
8
- #root {
9
- --_skf-icon-size: var(--skf-icon-size-md);
9
+ :host-context(.skf-icon-host) {
10
+ color: inherit;
11
+ }
10
12
 
13
+ .icon {
11
14
  block-size: var(--_skf-icon-size);
12
- color: var(--_skf-icon-color, var(--skf-icon-color-primary));
13
15
  display: inline-flex;
14
16
  flex-shrink: 0; /* Prevents shrink when flex-child */
15
17
  inline-size: var(--_skf-icon-size);
16
18
  pointer-events: none;
17
19
  user-select: none;
18
20
 
19
- :host-context(.skf-icon-host) & {
20
- color: inherit;
21
+ :not(:host-context(.skf-icon-host)) & {
22
+ color: var(--_skf-icon-color, var(--skf-icon-color-primary));
21
23
  }
24
+ }
22
25
 
23
- /**
24
- * Colors
25
- */
26
- :host([color='secondary']) & {
27
- --_skf-icon-color: var(--skf-icon-color-secondary);
28
- }
26
+ /**
27
+ * Colors
28
+ */
29
+ .icon--color-secondary {
30
+ --_skf-icon-color: var(--skf-icon-color-secondary);
31
+ }
29
32
 
30
- :host([color='inverse']) & {
31
- --_skf-icon-color: var(--skf-icon-color-inverse);
32
- }
33
+ .icon--color-inverse {
34
+ --_skf-icon-color: var(--skf-icon-color-inverse);
35
+ }
33
36
 
34
- :host([color='emphasised']) & {
35
- --_skf-icon-color: var(--skf-icon-color-emphasised);
36
- }
37
+ .icon--color-emphasised {
38
+ --_skf-icon-color: var(--skf-icon-color-emphasised);
39
+ }
37
40
 
38
- /* Severity */
39
- :host([color='alert']) & {
40
- --_skf-icon-color: var(--skf-severity-fg-color-alert);
41
- }
41
+ /* Severity */
42
+ .icon--color-alert {
43
+ --_skf-icon-color: var(--skf-severity-fg-color-alert);
44
+ }
42
45
 
43
- :host([color='error']) & {
44
- --_skf-icon-color: var(--skf-severity-fg-color-error);
45
- }
46
+ .icon--color-error {
47
+ --_skf-icon-color: var(--skf-severity-fg-color-error);
48
+ }
46
49
 
47
- :host([color='info']) & {
48
- --_skf-icon-color: var(--skf-severity-fg-color-info);
49
- }
50
+ .icon--color-info {
51
+ --_skf-icon-color: var(--skf-severity-fg-color-info);
52
+ }
50
53
 
51
- :host([color='success']) & {
52
- --_skf-icon-color: var(--skf-severity-fg-color-success);
53
- }
54
+ .icon--color-success {
55
+ --_skf-icon-color: var(--skf-severity-fg-color-success);
56
+ }
54
57
 
55
- :host([color='warning']) & {
56
- --_skf-icon-color: var(--skf-severity-fg-color-warning);
57
- }
58
+ .icon--color-warning {
59
+ --_skf-icon-color: var(--skf-severity-fg-color-warning);
60
+ }
58
61
 
59
- /**
60
- * Sizes
61
- */
62
- :host([size='xs']) & {
63
- --_skf-icon-size: var(--skf-icon-size-xs);
64
- }
62
+ /**
63
+ * Sizes
64
+ */
65
+ .icon--size-xs {
66
+ --_skf-icon-size: var(--skf-icon-size-xs);
67
+ }
65
68
 
66
- :host([size='sm']) & {
67
- --_skf-icon-size: var(--skf-icon-size-sm);
68
- }
69
+ .icon--size-sm {
70
+ --_skf-icon-size: var(--skf-icon-size-sm);
71
+ }
69
72
 
70
- :host([size='lg']) & {
71
- --_skf-icon-size: var(--skf-icon-size-lg);
72
- }
73
+ .icon--size-md {
74
+ --_skf-icon-size: var(--skf-icon-size-md);
75
+ }
76
+
77
+ .icon--size-lg {
78
+ --_skf-icon-size: var(--skf-icon-size-lg);
73
79
  }
74
80
  }
75
81
  `;
76
82
  export {
77
- r as default
83
+ i as default
78
84
  };
@@ -1,8 +1,9 @@
1
- import '@components/icon/icon.js';
2
- import { FormBase } from '@internal/components/formBase.js';
3
- import '@internal/components/hint/hint';
4
- import type { FormFieldBaseProps } from '@internal/types/formField.js';
1
+ import '../icon/icon.js';
2
+ import { FormBase } from '../../internal/components/formBase.js';
3
+ import '../../internal/components/hint/hint';
4
+ import type { FormFieldBaseProps } from '../../internal/types/formField.js';
5
5
  import { type CSSResultGroup } from 'lit';
6
+ type AutocompleteValues = 'on' | 'off' | 'name' | 'honorific-prefix' | 'given-name' | 'additional-name' | 'family-name' | 'honorific-suffix' | 'nickname' | 'username' | 'new-password' | 'current-password' | 'one-time-code' | 'organization-title' | 'organization' | 'street-address' | 'address-line1' | 'address-line2' | 'address-line3' | 'address-level4' | 'address-level3' | 'address-level2' | 'address-level1' | 'country' | 'country-name' | 'postal-code' | 'cc-name' | 'cc-given-name' | 'cc-additional-name' | 'cc-family-name' | 'cc-number' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-csc' | 'cc-type' | 'transaction-amount' | 'transaction-currency' | 'language' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'sex' | 'url' | 'photo' | 'tel' | 'tel-country-code' | 'tel-national' | 'tel-area-code' | 'tel-local' | 'tel-extension' | 'email' | 'impp' | 'password' | 'webauthn' | 'work' | (string & {});
6
7
  /**
7
8
  * The skf-text-field is used to create a text input field. It can be used inside a form element or standalone.
8
9
  *
@@ -24,6 +25,12 @@ import { type CSSResultGroup } from 'lit';
24
25
  export declare class SkfInput extends FormBase implements FormFieldBaseProps {
25
26
  static styles: CSSResultGroup;
26
27
  private customError;
28
+ /**
29
+ * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to
30
+ * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.
31
+ * @type { -m }
32
+ */
33
+ autocomplete?: AutocompleteValues;
27
34
  /** Custom aria-label for the clear button. **Notice!** Only applicable to type=search. */
28
35
  buttonAriaLabelClear: string;
29
36
  /** Custom aria-label for the visibility button. **Notice!** Only applicable to type=password. */
@@ -55,11 +62,6 @@ export declare class SkfInput extends FormBase implements FormFieldBaseProps {
55
62
  minLength?: number;
56
63
  /** If defined, adds name to the input-element */
57
64
  name?: string;
58
- /**
59
- * @internal
60
- * If true, hide empty label element
61
- */
62
- protected _noLabel: boolean | undefined;
63
65
  /** If defined, adds name to the input-element */
64
66
  pattern?: string;
65
67
  /** If defined, displays placeholder text */
@@ -131,7 +133,6 @@ export declare class SkfInput extends FormBase implements FormFieldBaseProps {
131
133
  private _renderSearchButton;
132
134
  /** @internal */
133
135
  private _onBlur;
134
- /** @internal */
135
- _handleSlotChange: () => void;
136
136
  render(): import("lit").TemplateResult<1>;
137
137
  }
138
+ export {};
@@ -5,46 +5,46 @@ import { hintSeverity as v } from "../../internal/helpers/hintSeverity.js";
5
5
  import { Asterisk as y } from "../../internal/templates/asterisk.js";
6
6
  import f from "../../styles/component.styles.js";
7
7
  import { html as h, nothing as d } from "lit";
8
- import { property as s, state as p, query as _, queryAssignedNodes as $ } from "lit/decorators.js";
9
- import { ifDefined as a } from "lit/directives/if-defined.js";
8
+ import { property as e, state as c, query as _, queryAssignedNodes as $ } from "lit/decorators.js";
9
+ import { ifDefined as n } from "lit/directives/if-defined.js";
10
10
  import { live as g } from "lit/directives/live.js";
11
11
  import { InputNumberController as w, InputPasswordController as E } from "./input.controllers.js";
12
- import C from "./input.styles.js";
13
- var S = Object.defineProperty, L = Object.getOwnPropertyDescriptor, i = (c, e, r, n) => {
14
- for (var o = n > 1 ? void 0 : n ? L(e, r) : e, l = c.length - 1, u; l >= 0; l--)
15
- (u = c[l]) && (o = (n ? u(e, r, o) : u(o)) || o);
16
- return n && o && S(e, r, o), o;
12
+ import A from "./input.styles.js";
13
+ var C = Object.defineProperty, S = Object.getOwnPropertyDescriptor, i = (m, s, r, a) => {
14
+ for (var o = a > 1 ? void 0 : a ? S(s, r) : s, l = m.length - 1, u; l >= 0; l--)
15
+ (u = m[l]) && (o = (a ? u(s, r, o) : u(o)) || o);
16
+ return a && o && C(s, r, o), o;
17
17
  };
18
- const m = class m extends b {
18
+ const p = class p extends b {
19
19
  constructor() {
20
20
  super(...arguments), this.buttonAriaLabelClear = "Clear input", this.buttonAriaLabelHide = "Hide password", this.buttonAriaLabelShow = "Show password", this.inputmode = "text", this.size = "md", this.type = "text", this.validateOn = "change", this.value = "", this.invalid = !1, this._buttonDown = !1, this._numberController = new w(this), this._passwordController = new E(this), this._handleInput = () => {
21
21
  this.value = this.$input.value || "", this.validateOn === "input" && (this._pristine = !1, this.validateInput());
22
- }, this._resetValue = (e) => {
22
+ }, this._resetValue = (s) => {
23
23
  var r;
24
- e.stopPropagation(), this.value = ((r = this.getAttribute("value")) == null ? void 0 : r.trim()) ?? "", this._internals.setFormValue(this.value), this.$input.focus();
25
- }, this._handlePressStart = (e) => {
26
- this._buttonDown = !0, this.type === "number" && this._numberController.handleActionBtnLongPressStart(e);
24
+ s.stopPropagation(), this.value = ((r = this.getAttribute("value")) == null ? void 0 : r.trim()) ?? "", this._internals.setFormValue(this.value), this.$input.focus();
25
+ }, this._handlePressStart = (s) => {
26
+ this._buttonDown = !0, this.type === "number" && this._numberController.handleActionBtnLongPressStart(s);
27
27
  }, this._handlePressEnd = () => {
28
28
  this._buttonDown = !1, this.type === "number" && this._numberController.handleActionBtnLongPressEnd();
29
- }, this._renderNumberButton = (e) => h`
29
+ }, this._renderNumberButton = (s) => h`
30
30
  <button
31
31
  ?disabled=${this.disabled}
32
32
  @click=${(r) => {
33
- this._numberController.handleActionBtnClick(r, e);
33
+ this._numberController.handleActionBtnClick(r, s);
34
34
  }}
35
35
  @mousedown=${this._handlePressStart}
36
36
  @mouseup=${this._handlePressEnd}
37
37
  @mouseleave=${this._handlePressEnd}
38
- aria-label="${e === "inc" ? "Increment" : "Decrement"}"
38
+ aria-label="${s === "inc" ? "Increment" : "Decrement"}"
39
39
  class="number skf-icon-host"
40
40
  type="button"
41
41
  >
42
- <skf-icon name="${e === "inc" ? "chevronUp" : "chevronDown"}" size="sm"></skf-icon>
42
+ <skf-icon name="${s === "inc" ? "chevronUp" : "chevronDown"}" size="sm"></skf-icon>
43
43
  </button>
44
44
  `, this._renderPasswordButton = () => h`
45
45
  <button
46
46
  @click=${this._passwordController.toggleVisibility}
47
- aria-label=${a(this._passwordController._buttonAriaLabel)}
47
+ aria-label=${n(this._passwordController._buttonAriaLabel)}
48
48
  class="password skf-icon-host"
49
49
  type="button"
50
50
  @mousedown="${this._handlePressStart}"
@@ -59,7 +59,7 @@ const m = class m extends b {
59
59
  @mousedown=${this._handlePressStart}
60
60
  @mouseup=${this._handlePressEnd}
61
61
  @mouseleave=${this._handlePressEnd}
62
- aria-label=${a(this.buttonAriaLabelClear)}
62
+ aria-label=${n(this.buttonAriaLabelClear)}
63
63
  class="search skf-icon-host"
64
64
  type="button"
65
65
  >
@@ -67,13 +67,10 @@ const m = class m extends b {
67
67
  </button>
68
68
  `, this._onBlur = () => {
69
69
  this._buttonDown && this.$input.focus();
70
- }, this._handleSlotChange = () => {
71
- var e, r;
72
- console.log("slot change"), this._noLabel = (this._defaultSlot.length === 0 || !((r = (e = this._defaultSlot[0]) == null ? void 0 : e.textContent) != null && r.trim())) && !this.label;
73
70
  };
74
71
  }
75
- set customInvalid(e) {
76
- this.customError = e || "";
72
+ set customInvalid(s) {
73
+ this.customError = s || "";
77
74
  }
78
75
  get customInvalid() {
79
76
  return this.customError;
@@ -81,12 +78,12 @@ const m = class m extends b {
81
78
  firstUpdated() {
82
79
  this.$input.addEventListener("change", () => {
83
80
  this.validateOn === "change" && (this.validateOn = "input", this._pristine = !1), this._internals.setFormValue(this.$input.value || ""), this.emitEvent("change"), this.validateInput();
84
- }), this.addEventListener("invalid", (e) => {
85
- this._pristine = !1, this.invalid = !0, this.customErrorDisplay && e.preventDefault();
86
- }), this.addEventListener("reset", this._resetValue), this._handleSlotChange(), this.validateInput();
81
+ }), this.addEventListener("invalid", (s) => {
82
+ this._pristine = !1, this.invalid = !0, this.customErrorDisplay && s.preventDefault();
83
+ }), this.addEventListener("reset", this._resetValue), this.validateInput();
87
84
  }
88
- willUpdate(e) {
89
- if (e.has("invalid"))
85
+ willUpdate(s) {
86
+ if (s.has("invalid"))
90
87
  if (this.invalid) {
91
88
  this.setAttribute("invalid", ""), this.showValid || this.removeAttribute("valid");
92
89
  const r = this._internals.validationMessage;
@@ -94,10 +91,10 @@ const m = class m extends b {
94
91
  } else
95
92
  this.removeAttribute("invalid"), !this._pristine && this.showValid && this.setAttribute("valid", "true"), this.hint = this.getAttribute("hint") ?? "";
96
93
  }
97
- attributeChangedCallback(e, r, n) {
98
- if (super.attributeChangedCallback(e, r, n), e === "value" && this._internals.setFormValue(n), e === "custom-invalid")
99
- if (typeof n == "string") {
100
- const l = String(n).trim();
94
+ attributeChangedCallback(s, r, a) {
95
+ if (super.attributeChangedCallback(s, r, a), s === "value" && this._internals.setFormValue(a), s === "custom-invalid")
96
+ if (typeof a == "string") {
97
+ const l = this.withFallback(a);
101
98
  this._pristine = !1, this._internals.setValidity({ customError: !0 }, l), this.invalid = !0, this.hint = l, this.checkValidity();
102
99
  } else
103
100
  this._internals.setValidity({}), this.validateInput();
@@ -110,36 +107,37 @@ const m = class m extends b {
110
107
  this._internals.setValidity({ customError: this._internals.validity.customError });
111
108
  else {
112
109
  this.invalid = !this._pristine && !r.valid;
113
- let n;
114
- for (n in r) {
115
- const o = `data-${n.toString()}`;
116
- if (r[n] && !this.hasAttribute(o) && this.debug && console.log(
110
+ let a;
111
+ for (a in r) {
112
+ const o = `data-${a.toString()}`;
113
+ if (r[a] && !this.hasAttribute(o) && this.debug && console.log(
117
114
  `Add custom message on ${this.localName} using attribute: ${o.toUpperCase()}="Your custom message"`
118
- ), r[n]) {
119
- this.validationError = n.toString();
115
+ ), r[a]) {
116
+ this.validationError = a.toString();
120
117
  const l = this.hasAttribute(o) ? this.getAttribute(o) : this.$input.validationMessage;
121
118
  this._internals.setValidity(
122
119
  { [this.validationError]: !0, customError: this._internals.validity.customError },
123
- l ?? ""
120
+ this.withFallback(l)
124
121
  ), this.invalid && this.customErrorDisplay && this.checkValidity();
125
122
  }
126
123
  }
127
124
  }
128
125
  }
129
126
  render() {
130
- var e, r;
127
+ var r, a, o, l;
128
+ const s = (this._defaultSlot.length === 0 || !((a = (r = this._defaultSlot[0]) == null ? void 0 : r.textContent) != null && a.trim())) && !this.label;
131
129
  return h`
132
130
  <div id="root">
133
131
  <label>
134
- <div class=${this.hideLabel ? "visually-hidden" : ""} ?hidden=${this._noLabel} id="label">
135
- <slot @slotchange=${this._handleSlotChange}>${this.label}</slot>
132
+ <div class=${this.hideLabel ? "visually-hidden" : ""} ?hidden=${s} id="label">
133
+ <slot>${this.label}</slot>
136
134
  ${this.required ? y(this.requiredLabel) : null}
137
135
  </div>
138
136
  <div id="input">
139
137
  ${this.type === "search" ? h`<skf-icon class="skf-icon-host" name="search" size="sm"></skf-icon>` : d}
140
138
  <div
141
- data-leading=${a(this.leading)}
142
- data-trailing=${a(this.trailing)}
139
+ data-leading=${n(this.leading)}
140
+ data-trailing=${n(this.trailing)}
143
141
  id="affix"
144
142
  >
145
143
  <input
@@ -149,20 +147,21 @@ const m = class m extends b {
149
147
  .value=${g(this.value)}
150
148
  @blur=${this._onBlur}
151
149
  @input=${this._handleInput}
152
- aria-describedby=${a((e = this.hint) != null && e.trim() ? "hint" : d)}
153
- aria-errormessage=${a((r = this.hint) != null && r.trim() ? "hint" : d)}
150
+ autocomplete=${this.autocomplete}
151
+ aria-describedby=${n((o = this.hint) != null && o.trim() ? "hint" : d)}
152
+ aria-errormessage=${n((l = this.hint) != null && l.trim() ? "hint" : d)}
154
153
  aria-invalid=${!!this.invalid}
155
154
  autocomplete="off"
156
155
  data-testid="field-input"
157
- inputmode=${a(this.inputMode)}
158
- max=${a(this.max)}
159
- maxlength=${a(this.maxLength)}
160
- min=${a(this.min)}
161
- minlength=${a(this.minLength)}
162
- name=${a(this.name)}
163
- pattern=${a(this.pattern)}
164
- placeholder=${a(this.placeholder)}
165
- type=${a(
156
+ inputmode=${n(this.inputMode)}
157
+ max=${n(this.max)}
158
+ maxlength=${n(this.maxLength)}
159
+ min=${n(this.min)}
160
+ minlength=${n(this.minLength)}
161
+ name=${n(this.name)}
162
+ pattern=${n(this.pattern)}
163
+ placeholder=${n(this.placeholder)}
164
+ type=${n(
166
165
  this.type === "password" ? this._passwordController._type : this.type
167
166
  )}
168
167
  />
@@ -180,7 +179,7 @@ const m = class m extends b {
180
179
  <skf-hint
181
180
  aria-live=${this.invalid ? "assertive" : "polite"}
182
181
  id="hint"
183
- severity=${a(v(this.severity, this.invalid))}
182
+ severity=${n(v(this.severity, this.invalid))}
184
183
  >${this.customInvalid ? this.customInvalid : this.hint}
185
184
  </skf-hint>
186
185
  `}
@@ -188,94 +187,94 @@ const m = class m extends b {
188
187
  `;
189
188
  }
190
189
  };
191
- m.styles = [f, C];
192
- let t = m;
190
+ p.styles = [f, A];
191
+ let t = p;
193
192
  i([
194
- s({ attribute: "button-aria-label-clear" })
193
+ e({ type: String })
194
+ ], t.prototype, "autocomplete", 2);
195
+ i([
196
+ e({ attribute: "button-aria-label-clear" })
195
197
  ], t.prototype, "buttonAriaLabelClear", 2);
196
198
  i([
197
- s({ attribute: "button-aria-label-hide" })
199
+ e({ attribute: "button-aria-label-hide" })
198
200
  ], t.prototype, "buttonAriaLabelHide", 2);
199
201
  i([
200
- s({ attribute: "button-aria-label-show" })
202
+ e({ attribute: "button-aria-label-show" })
201
203
  ], t.prototype, "buttonAriaLabelShow", 2);
202
204
  i([
203
- s({ attribute: "custom-invalid", reflect: !0 })
205
+ e({ attribute: "custom-invalid", reflect: !0 })
204
206
  ], t.prototype, "customInvalid", 1);
205
207
  i([
206
- s({ type: Boolean })
208
+ e({ type: Boolean })
207
209
  ], t.prototype, "debug", 2);
208
210
  i([
209
- s({ type: Boolean, attribute: "hide-label" })
211
+ e({ type: Boolean, attribute: "hide-label" })
210
212
  ], t.prototype, "hideLabel", 2);
211
213
  i([
212
- s()
214
+ e()
213
215
  ], t.prototype, "hint", 2);
214
216
  i([
215
- s({ type: String })
217
+ e({ type: String })
216
218
  ], t.prototype, "inputmode", 2);
217
219
  i([
218
- s()
220
+ e()
219
221
  ], t.prototype, "label", 2);
220
222
  i([
221
- s()
223
+ e()
222
224
  ], t.prototype, "leading", 2);
223
225
  i([
224
- s()
226
+ e()
225
227
  ], t.prototype, "max", 2);
226
228
  i([
227
- s({ type: Number, attribute: "maxlength" })
229
+ e({ type: Number, attribute: "maxlength" })
228
230
  ], t.prototype, "maxLength", 2);
229
231
  i([
230
- s()
232
+ e()
231
233
  ], t.prototype, "min", 2);
232
234
  i([
233
- s({ type: Number, attribute: "minlength" })
235
+ e({ type: Number, attribute: "minlength" })
234
236
  ], t.prototype, "minLength", 2);
235
237
  i([
236
- s()
238
+ e()
237
239
  ], t.prototype, "name", 2);
238
240
  i([
239
- p()
240
- ], t.prototype, "_noLabel", 2);
241
- i([
242
- s()
241
+ e()
243
242
  ], t.prototype, "pattern", 2);
244
243
  i([
245
- s()
244
+ e()
246
245
  ], t.prototype, "placeholder", 2);
247
246
  i([
248
- s({ type: Boolean })
247
+ e({ type: Boolean })
249
248
  ], t.prototype, "readonly", 2);
250
249
  i([
251
- s({ attribute: "required-label" })
250
+ e({ attribute: "required-label" })
252
251
  ], t.prototype, "requiredLabel", 2);
253
252
  i([
254
- s({ reflect: !0 })
253
+ e({ reflect: !0 })
255
254
  ], t.prototype, "severity", 2);
256
255
  i([
257
- s({ type: Boolean, attribute: "show-valid" })
256
+ e({ type: Boolean, attribute: "show-valid" })
258
257
  ], t.prototype, "showValid", 2);
259
258
  i([
260
- s({ reflect: !0 })
259
+ e({ reflect: !0 })
261
260
  ], t.prototype, "size", 2);
262
261
  i([
263
- s()
262
+ e()
264
263
  ], t.prototype, "trailing", 2);
265
264
  i([
266
- s()
265
+ e()
267
266
  ], t.prototype, "type", 2);
268
267
  i([
269
- s({ type: String, attribute: "validate-on" })
268
+ e({ type: String, attribute: "validate-on" })
270
269
  ], t.prototype, "validateOn", 2);
271
270
  i([
272
- s()
271
+ e()
273
272
  ], t.prototype, "value", 2);
274
273
  i([
275
- p()
274
+ c()
276
275
  ], t.prototype, "invalid", 2);
277
276
  i([
278
- p()
277
+ c()
279
278
  ], t.prototype, "_buttonDown", 2);
280
279
  i([
281
280
  _("input")
@@ -1,6 +1,6 @@
1
- import type { SkfIcon } from '@components/icon/icon.component.js';
2
- import '@components/icon/icon.js';
3
- import { SkfElement } from '@internal/components/skf-element.js';
1
+ import type { SkfIcon } from '../icon/icon.component.js';
2
+ import '../icon/icon.js';
3
+ import { SkfElement } from '../../internal/components/skf-element.js';
4
4
  import { type CSSResultGroup } from 'lit';
5
5
  /**
6
6
  * The `<skf-link>` can be used as either a regular link or a link styled semantic button
@@ -15,6 +15,7 @@ import { type CSSResultGroup } from 'lit';
15
15
  */
16
16
  export declare class SkfLink extends SkfElement {
17
17
  static styles: CSSResultGroup;
18
+ static classMap: {};
18
19
  private _onClick?;
19
20
  /** Defines the semantic element to render */
20
21
  as: 'button' | 'a';
@@ -33,12 +34,12 @@ export declare class SkfLink extends SkfElement {
33
34
  icon?: SkfIcon['name'];
34
35
  /** Defines the position of the icon in relation to the text */
35
36
  iconPlacement: 'left' | 'right';
36
- /** Defines the relationship of the target object to the link object */
37
- rel: string;
37
+ /** If defined, describes the relationship between a linked resource and the current document */
38
+ rel?: string;
38
39
  /** If defined, used on conjunction with onClick property, second argument */
39
40
  route?: string;
40
41
  /** If true, fills the parents horizontal axis */
41
- stretch?: boolean;
42
+ stretch: boolean;
42
43
  /** If defined, specifies where to open the linked document */
43
44
  target?: '_blank' | '_parent' | '_self' | '_top';
44
45
  /** Defines the type of button */