@skf-design-system/ui-components 1.0.2-beta.0 → 1.0.2-beta.1

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 (181) hide show
  1. package/README.md +12 -8
  2. package/dist/components/accordion/accordion-item.component.d.ts +36 -0
  3. package/dist/components/accordion/accordion-item.component.js +87 -0
  4. package/dist/components/accordion/accordion-item.d.ts +3 -3
  5. package/dist/components/accordion/accordion-item.js +4 -5
  6. package/dist/components/accordion/accordion-item.styles.js +77 -0
  7. package/dist/components/accordion/accordion.component.d.ts +5 -9
  8. package/dist/components/accordion/accordion.component.js +4 -5
  9. package/dist/components/accordion/accordion.d.ts +0 -1
  10. package/dist/components/accordion/accordion.js +0 -2
  11. package/dist/components/alert/alert.component.d.ts +4 -7
  12. package/dist/components/alert/alert.component.js +8 -9
  13. package/dist/components/alert/alert.styles.js +0 -5
  14. package/dist/components/breadcrumb/breadcrumb-item.component.js +61 -0
  15. package/dist/components/breadcrumb/breadcrumb-item.js +6 -0
  16. package/dist/components/breadcrumb/breadcrumb-item.styles.js +62 -0
  17. package/dist/components/breadcrumb/breadcrumb.component.d.ts +1 -1
  18. package/dist/components/breadcrumb/breadcrumb.component.js +60 -0
  19. package/dist/components/breadcrumb/breadcrumb.js +6 -0
  20. package/dist/components/breadcrumb/breadcrumb.styles.js +22 -0
  21. package/dist/components/button/button.component.d.ts +13 -10
  22. package/dist/components/button/button.component.js +83 -76
  23. package/dist/components/button/button.styles.d.ts +1 -2
  24. package/dist/components/button/button.styles.js +1 -1
  25. package/dist/components/card/card.component.d.ts +1 -1
  26. package/dist/components/card/card.component.js +1 -1
  27. package/dist/components/checkbox/checkbox.component.d.ts +8 -6
  28. package/dist/components/checkbox/checkbox.component.js +2 -2
  29. package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
  30. package/dist/components/checkbox/checkbox.styles.js +1 -5
  31. package/dist/components/date-picker/datepicker.calendar.component.js +1 -1
  32. package/dist/components/date-picker/datepicker.component.js +1 -1
  33. package/dist/components/date-picker-input/datepicker-input.component.d.ts +1 -0
  34. package/dist/components/date-picker-input/datepicker-input.component.js +3 -2
  35. package/dist/components/dialog/dialog.component.d.ts +5 -4
  36. package/dist/components/dialog/dialog.component.js +44 -44
  37. package/dist/components/dialog/dialog.styles.js +4 -4
  38. package/dist/components/divider/divider.component.js +1 -1
  39. package/dist/components/drawer/drawer.component.d.ts +12 -8
  40. package/dist/components/drawer/drawer.component.js +5 -4
  41. package/dist/components/header/header.component.d.ts +3 -2
  42. package/dist/components/header/header.component.js +34 -28
  43. package/dist/components/heading/heading.component.d.ts +3 -5
  44. package/dist/components/heading/heading.component.js +22 -21
  45. package/dist/components/icon/icon.component.d.ts +11 -17
  46. package/dist/components/icon/icon.component.js +2 -2
  47. package/dist/components/icon/icon.styles.d.ts +1 -2
  48. package/dist/components/icon/icon.styles.js +1 -1
  49. package/dist/components/input/input.component.d.ts +30 -31
  50. package/dist/components/input/input.component.js +136 -123
  51. package/dist/components/link/link.component.d.ts +12 -14
  52. package/dist/components/link/link.component.js +34 -34
  53. package/dist/components/link/link.styles.d.ts +1 -2
  54. package/dist/components/link/link.styles.js +2 -2
  55. package/dist/components/loader/loader.component.d.ts +1 -1
  56. package/dist/components/loader/loader.component.js +36 -40
  57. package/dist/components/loader/loader.styles.d.ts +1 -2
  58. package/dist/components/loader/loader.styles.js +40 -32
  59. package/dist/components/logo/logo.component.d.ts +4 -5
  60. package/dist/components/logo/logo.component.js +1 -1
  61. package/dist/components/menu/menu-item.component.d.ts +13 -0
  62. package/dist/components/{menu-item → menu}/menu-item.component.js +3 -3
  63. package/dist/components/menu/menu.component.d.ts +9 -6
  64. package/dist/components/menu/menu.component.js +8 -10
  65. package/dist/components/{nav-item → nav}/nav-item.component.d.ts +0 -2
  66. package/dist/components/{nav-item → nav}/nav-item.component.js +1 -1
  67. package/dist/components/nav/nav.component.js +1 -1
  68. package/dist/components/popover/popover.component.d.ts +10 -6
  69. package/dist/components/popover/popover.component.js +22 -24
  70. package/dist/components/progress/progress.component.d.ts +2 -2
  71. package/dist/components/progress/progress.component.js +31 -37
  72. package/dist/components/progress/progress.styles.js +40 -35
  73. package/dist/components/radio/radio.component.d.ts +9 -7
  74. package/dist/components/radio/radio.component.js +2 -2
  75. package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.component.d.ts +4 -4
  76. package/dist/components/segmented-button/segmented-button-item.component.js +56 -0
  77. package/dist/components/segmented-button/segmented-button-item.js +6 -0
  78. package/dist/components/segmented-button/segmented-button-item.styles.js +62 -0
  79. package/dist/components/segmented-button/segmented-button.component.d.ts +0 -2
  80. package/dist/components/segmented-button/segmented-button.component.js +73 -0
  81. package/dist/components/segmented-button/segmented-button.js +6 -0
  82. package/dist/components/segmented-button/segmented-button.styles.js +16 -0
  83. package/dist/components/{select-option-group → select}/select-option-group.component.js +1 -1
  84. package/dist/components/{select-option → select}/select-option.component.d.ts +7 -8
  85. package/dist/components/{select-option → select}/select-option.component.js +15 -15
  86. package/dist/components/select/select.component.d.ts +16 -15
  87. package/dist/components/select/select.component.js +17 -17
  88. package/dist/components/select/select.controllers.d.ts +1 -1
  89. package/dist/components/select/select.controllers.js +14 -11
  90. package/dist/components/select/select.stories.icons.d.ts +7 -0
  91. package/dist/components/{stepper-item → stepper}/stepper-item.component.js +8 -8
  92. package/dist/components/stepper/stepper.component.d.ts +2 -2
  93. package/dist/components/stepper/stepper.component.js +15 -15
  94. package/dist/components/stepper/stepper.helpers.d.ts +1 -1
  95. package/dist/components/switch/switch.component.js +15 -15
  96. package/dist/components/tab/tab.component.js +1 -1
  97. package/dist/components/tab-group/tab-group.component.js +1 -1
  98. package/dist/components/tab-panel/tab-panel.component.js +1 -1
  99. package/dist/components/tag/tag.component.d.ts +10 -14
  100. package/dist/components/tag/tag.component.js +32 -35
  101. package/dist/components/textarea/textarea.component.d.ts +10 -11
  102. package/dist/components/textarea/textarea.component.js +62 -64
  103. package/dist/components/{toast-item → toast}/toast-item.d.ts +2 -0
  104. package/dist/components/{toast-item → toast}/toast-item.js +4 -0
  105. package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.js +1 -1
  106. package/dist/components/toast/toast-wrapper.styles.d.ts +1 -0
  107. package/dist/components/toast/toast.component.d.ts +5 -4
  108. package/dist/components/toast/toast.component.js +15 -15
  109. package/dist/components/toast/toast.singleton.d.ts +4 -4
  110. package/dist/components/toast/toast.singleton.js +12 -12
  111. package/dist/components/tooltip/tooltip.component.d.ts +2 -1
  112. package/dist/components/tooltip/tooltip.component.js +15 -10
  113. package/dist/custom-elements.json +733 -820
  114. package/dist/index.d.ts +13 -7
  115. package/dist/index.js +100 -84
  116. package/dist/internal/base-classes/popover/popover.base.d.ts +10 -5
  117. package/dist/internal/base-classes/popover/popover.base.js +77 -60
  118. package/dist/internal/components/hint/hint.component.d.ts +2 -2
  119. package/dist/internal/components/hint/hint.component.js +2 -2
  120. package/dist/internal/components/hint/hint.styles.d.ts +1 -2
  121. package/dist/internal/components/hint/hint.styles.js +1 -1
  122. package/dist/internal/constants/iconSeverity.d.ts +3 -2
  123. package/dist/internal/constants/iconSeverity.js +2 -3
  124. package/dist/internal/helpers/hintSeverity.d.ts +2 -2
  125. package/dist/internal/helpers/hintSeverity.js +1 -1
  126. package/dist/internal/types/formField.d.ts +1 -1
  127. package/dist/internal/types.d.ts +18 -0
  128. package/dist/styles/component.styles.d.ts +1 -2
  129. package/dist/styles/component.styles.js +1 -1
  130. package/dist/styles/global.css +1 -1
  131. package/dist/types/jsx/custom-element-jsx.d.ts +162 -180
  132. package/dist/types/vue/index.d.ts +162 -180
  133. package/dist/vscode.html-custom-data.json +133 -1091
  134. package/dist/web-types.json +368 -424
  135. package/package.json +24 -25
  136. package/dist/components/collapse/collapse.component.d.ts +0 -40
  137. package/dist/components/collapse/collapse.component.js +0 -86
  138. package/dist/components/collapse/collapse.d.ts +0 -8
  139. package/dist/components/collapse/collapse.js +0 -6
  140. package/dist/components/collapse/collapse.styles.d.ts +0 -2
  141. package/dist/components/collapse/collapse.styles.js +0 -77
  142. package/dist/components/menu-item/menu-item.component.d.ts +0 -25
  143. package/dist/internal/constants/heading.d.ts +0 -2
  144. /package/dist/components/{breadcrumb-item/breadcrumb-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
  145. /package/dist/components/{collapse/collapse.test.d.ts → accordion/accordion-item.test.d.ts} +0 -0
  146. /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.component.d.ts +0 -0
  147. /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.d.ts +0 -0
  148. /package/dist/components/{menu-item/menu-item.styles.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
  149. /package/dist/components/{menu-item → menu}/menu-item.d.ts +0 -0
  150. /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
  151. /package/dist/components/{nav-item/nav-item.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
  152. /package/dist/components/{menu-item → menu}/menu-item.styles.js +0 -0
  153. /package/dist/components/{nav-item → nav}/nav-item.d.ts +0 -0
  154. /package/dist/components/{nav-item → nav}/nav-item.js +0 -0
  155. /package/dist/components/{segmented-button-item/segmented-button-item.styles.d.ts → nav/nav-item.styles.d.ts} +0 -0
  156. /package/dist/components/{nav-item → nav}/nav-item.styles.js +0 -0
  157. /package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.d.ts +0 -0
  158. /package/dist/components/{select-option-group/select-option-group.style.d.ts → segmented-button/segmented-button-item.styles.d.ts} +0 -0
  159. /package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +0 -0
  160. /package/dist/components/{select-option-group → select}/select-option-group.d.ts +0 -0
  161. /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
  162. /package/dist/components/{select-option/select-option.styles.d.ts → select/select-option-group.style.d.ts} +0 -0
  163. /package/dist/components/{select-option-group → select}/select-option-group.style.js +0 -0
  164. /package/dist/components/{select-option → select}/select-option.controllers.d.ts +0 -0
  165. /package/dist/components/{select-option → select}/select-option.d.ts +0 -0
  166. /package/dist/components/{select-option → select}/select-option.js +0 -0
  167. /package/dist/components/{stepper-item/stepper-item.styles.d.ts → select/select-option.styles.d.ts} +0 -0
  168. /package/dist/components/{select-option → select}/select-option.styles.js +0 -0
  169. /package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +0 -0
  170. /package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +0 -0
  171. /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
  172. /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → stepper/stepper-item.styles.d.ts} +0 -0
  173. /package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +0 -0
  174. /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +0 -0
  175. /package/dist/components/{toast-item → toast}/toast-item.component.js +0 -0
  176. /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
  177. /package/dist/components/{toast-item → toast}/toast-item.styles.js +0 -0
  178. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.d.ts +0 -0
  179. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.d.ts +0 -0
  180. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.js +0 -0
  181. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.styles.js +0 -0
@@ -1,18 +1,23 @@
1
- import type { SkfIcon } from '../icon/icon.component.js';
2
1
  import '../icon/icon.js';
3
2
  import '../loader/loader.js';
4
3
  import { SkfElement } from '../../internal/components/skf-element.js';
4
+ import type { Icon } from '../../internal/types.js';
5
5
  import { type CSSResultGroup, type PropertyValues } from 'lit';
6
+ type SkfButtonType = HTMLButtonElement['type'];
6
7
  /**
7
8
  * Component to be used in forms or for interactivity
8
9
  *
10
+ * See [zeroheight](https://zeroheight.com/853e936c9/p/02493d-buttons) for design principles
11
+ *
9
12
  * @slot - The Primary content
10
13
  *
11
- * @event click - Fires when the button is clicked
14
+ * @event {CustomEvent} click - Fires when the button is clicked
12
15
  *
13
16
  * @tagname skf-button
14
17
  */
15
18
  export declare class SkfButton extends SkfElement {
19
+ #private;
20
+ static styles: CSSResultGroup;
16
21
  static formAssociated: boolean;
17
22
  static shadowRootOptions: {
18
23
  delegatesFocus: boolean;
@@ -20,18 +25,15 @@ export declare class SkfButton extends SkfElement {
20
25
  serializable?: boolean;
21
26
  slotAssignment?: SlotAssignmentMode;
22
27
  };
23
- static styles: CSSResultGroup;
24
28
  /** @internal */
25
29
  private _transitionOptions;
26
- _internals: ElementInternals;
27
30
  /** If true, gives destructive appearance. **Notice!** Only applicable if `variant` is `primary`. */
28
31
  destructive: boolean;
29
32
  /** If true, removes border */
30
33
  disabled: boolean;
31
34
  /** If provided, renders an icon before or after the text */
32
- /** @type { "arrowDown" | "arrowDownUp" | "arrowLeft" | "arrowRight" | "arrowUp" | "article" | "artificialIntelligence" | "asset" | "attachment" | "bandCursor" | "bands" | "batteryEmpty" | "batteryFull" | "batteryLow" | "bearingFault" | "book" | "bulb" | "burger" | "cPM" | "calendar" | "calendarBooked" | "calendarEmpty" | "calendarNotBooked" | "calendarRecurring" | "caretDown" | "caretUp" | "caretUpDown" | "chat" | "check" | "checkCircle" | "checkSmall" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "chevronUpDown" | "close" | "closeAllFaults" | "closeFault" | "closeSmall" | "columnGraph" | "comment" | "connection1" | "connection2" | "connection3" | "connection4" | "danger" | "defectFrequencies" | "defectFrequenciesAlternative" | "doubleChevronLeft" | "doubleChevronRight" | "download" | "draft" | "draftFilled" | "draftOutlined" | "dragNDrop" | "drop" | "duplicate" | "edit" | "emailFilled" | "emailOutlined" | "exclamation" | "eye" | "eyeHidden" | "eyeVisible" | "filter" | "forbidden" | "fullScreen" | "fullScreenExit" | "functionalLocation" | "harmonicCursor" | "heatmap" | "hierarchy" | "history" | "historyAlt" | "hourglassFramedFilled" | "hourglassFramedOutlined" | "hourglassOutlined" | "hz" | "iMX" | "image" | "infoCircleFilled" | "infoCircleOutlined" | "integration" | "kebab" | "link" | "listGroup" | "listItem" | "locationPin" | "lock" | "logOut" | "meatballs" | "microphone" | "minus" | "minusSmall" | "noData" | "o" | "openInNew" | "overlayBaseline" | "pDF" | "paper" | "pause" | "pieChart" | "pin" | "play" | "plus" | "powerOff" | "printer" | "proCollect" | "recAction" | "received" | "refresh" | "reorder" | "replace" | "reply" | "rewalkableRoute" | "routes" | "search" | "send" | "sensorA" | "sensorB" | "settings" | "sidebandCursor" | "singleCursor" | "spectrum" | "starFilled" | "starOutlined" | "statusCircle" | "stop" | "structuralVibration" | "sync" | "timewave" | "trash" | "trend" | "trendingUp" | "undo" | "unknownCircle" | "unknownDiamond" | "unlink" | "unlock" | "unscheduledAction" | "upload" | "user" | "viewFull" | "viewHorizontal" | "viewVertical" | "warning" | "warningCircle" | "warningDiamond" | "zoomIn" | "zoomOut" } */
33
- icon?: SkfIcon['name'];
34
- /** If true, removes border */
35
+ icon?: Icon;
36
+ /** If true, button will take a square shape */
35
37
  iconOnly: boolean;
36
38
  /** Determines the positioning of the icon in relation to the text */
37
39
  iconPosition: 'left' | 'right';
@@ -39,10 +41,9 @@ export declare class SkfButton extends SkfElement {
39
41
  loading: boolean;
40
42
  noValidate: boolean;
41
43
  /** If provided, displays an alternative size */
42
- size: 'sm' | 'md' | 'lg';
44
+ size?: 'sm' | 'md' | 'lg';
43
45
  /** If provided, changes the button type */
44
- /** @type { 'button' | 'submit' | 'reset' } */
45
- type: HTMLButtonElement['type'];
46
+ type: SkfButtonType;
46
47
  /** If provided, alters the appearance */
47
48
  variant: 'primary' | 'secondary' | 'tertiary';
48
49
  /** @internal */
@@ -55,6 +56,7 @@ export declare class SkfButton extends SkfElement {
55
56
  private $button?;
56
57
  constructor();
57
58
  protected firstUpdated(_changedProperties: PropertyValues): void;
59
+ /** @internal */
58
60
  _handleLoadingChange(): void;
59
61
  /** @internal */
60
62
  _handleClick: (e: MouseEvent) => void;
@@ -72,3 +74,4 @@ export declare class SkfButton extends SkfElement {
72
74
  private _renderIcon;
73
75
  render(): import("lit").TemplateResult<1>;
74
76
  }
77
+ export {};
@@ -1,33 +1,40 @@
1
+ var u = (i) => {
2
+ throw TypeError(i);
3
+ };
4
+ var _ = (i, s, t) => s.has(i) || u("Cannot " + t);
5
+ var p = (i, s, t) => (_(i, s, "read from private field"), t ? t.call(i) : s.get(i)), v = (i, s, t) => s.has(i) ? u("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, t), $ = (i, s, t, a) => (_(i, s, "write to private field"), a ? a.call(i, t) : s.set(i, t), t);
1
6
  import "../icon/icon.js";
2
7
  import "../loader/loader.js";
3
- import { SkfElement as m } from "../../internal/components/skf-element.js";
4
- import { watch as f } from "../../internal/helpers/watch.js";
5
- import u from "../../styles/component.styles.js";
6
- import { html as d, LitElement as _, nothing as p } from "lit";
7
- import { property as o, state as v, query as c } from "lit/decorators.js";
8
- import { classMap as $ } from "lit/directives/class-map.js";
9
- import { ifDefined as b } from "lit/directives/if-defined.js";
10
- import g from "./button.styles.js";
11
- var O = Object.defineProperty, V = Object.getOwnPropertyDescriptor, s = (y, t, l, r) => {
12
- for (var e = r > 1 ? void 0 : r ? V(t, l) : t, a = y.length - 1, n; a >= 0; a--)
13
- (n = y[a]) && (e = (r ? n(t, l, e) : n(e)) || e);
14
- return r && e && O(t, l, e), e;
15
- };
16
- const h = class h extends m {
8
+ import { SkfElement as O } from "../../internal/components/skf-element.js";
9
+ import { watch as V } from "../../internal/helpers/watch.js";
10
+ import { componentStyles as w } from "../../styles/component.styles.js";
11
+ import { html as y, LitElement as z, nothing as b } from "lit";
12
+ import { property as r, state as P, query as m } from "lit/decorators.js";
13
+ import { classMap as L } from "lit/directives/class-map.js";
14
+ import { ifDefined as g } from "lit/directives/if-defined.js";
15
+ import { styles as C } from "./button.styles.js";
16
+ var F = Object.defineProperty, k = Object.getOwnPropertyDescriptor, o = (i, s, t, a) => {
17
+ for (var n = a > 1 ? void 0 : a ? k(s, t) : s, h = i.length - 1, d; h >= 0; h--)
18
+ (d = i[h]) && (n = (a ? d(s, t, n) : d(n)) || n);
19
+ return a && n && F(s, t, n), n;
20
+ }, l;
21
+ const c = class c extends O {
17
22
  constructor() {
18
- super(), this._transitionOptions = {
23
+ super();
24
+ v(this, l);
25
+ this._transitionOptions = {
19
26
  duration: 200,
20
27
  fill: "forwards"
21
28
  }, this.destructive = !1, this.disabled = !1, this.iconOnly = !1, this.iconPosition = "left", this.loading = !1, this.noValidate = !1, this.size = "md", this.type = "button", this.variant = "primary", this._loaderVisible = !1, this._handleClick = (t) => {
22
29
  t.preventDefault(), t.stopPropagation(), !(this.disabled || this.loading) && (this.dispatchEvent(new CustomEvent("click", { bubbles: !0, composed: !0, detail: t })), this.type === "submit" && this._submitForm(), this.type === "reset" && this._resetForm());
23
30
  }, this._submitForm = () => {
24
- var e, a, n;
25
- const t = !((e = this._internals.form) != null && e.reportValidity()), l = !this.noValidate, r = !((a = this._internals.form) != null && a.hasAttribute("no-validate"));
26
- (l || r) && t || (n = this._internals.form) == null || n.requestSubmit();
31
+ var h, d, f;
32
+ const t = !((h = p(this, l).form) != null && h.reportValidity()), a = !this.noValidate, n = !((d = p(this, l).form) != null && d.hasAttribute("no-validate"));
33
+ (a || n) && t || (f = p(this, l).form) == null || f.requestSubmit();
27
34
  }, this._resetForm = () => {
28
35
  var t;
29
- (t = this._internals.form) == null || t.reset();
30
- }, this._renderIcon = () => d`<skf-icon class="skf-icon-host" name=${b(this.icon)}></skf-icon>`, this._internals = this.attachInternals();
36
+ (t = p(this, l).form) == null || t.reset();
37
+ }, this._renderIcon = () => y`<skf-icon class="skf-icon-host" name=${g(this.icon)}></skf-icon>`, $(this, l, this.attachInternals());
31
38
  }
32
39
  firstUpdated(t) {
33
40
  if (t.has("loading") && this.loading) {
@@ -53,11 +60,12 @@ const h = class h extends m {
53
60
  !this.$body || !this.$loader || (await this.$loader.animate({ opacity: 0 }, this._transitionOptions).finished, this._loaderVisible = !1, this.$body.animate({ opacity: 1 }, this._transitionOptions));
54
61
  }
55
62
  render() {
56
- return d`
63
+ return y`
57
64
  <button
58
65
  ?disabled=${this.disabled || this.loading}
66
+ @click=${this._handleClick}
59
67
  aria-busy=${this.loading}
60
- class=${$({
68
+ class=${L({
61
69
  btn: !0,
62
70
  "btn--destructive": this.destructive,
63
71
  "btn--icon-only": this.iconOnly,
@@ -68,68 +76,67 @@ const h = class h extends m {
68
76
  "btn--variant-secondary": this.variant === "secondary",
69
77
  "btn--variant-tertiary": this.variant === "tertiary"
70
78
  })}
71
- type=${b(this.type)}
72
- @click=${this._handleClick}
79
+ type=${g(this.type)}
73
80
  title=${/* An empty title prevents browser validation tooltips from appearing on hover */
74
81
  this.title}
75
82
  >
76
- ${this.variant === "primary" && this._loaderVisible ? d`<skf-loader class="btn__loader" invert size="sm"></skf-loader>` : ""}
83
+ ${this.variant === "primary" && this._loaderVisible ? y`<skf-loader class="btn__loader" invert size="sm"></skf-loader>` : ""}
77
84
  <div class="btn__body" id="body">
78
- ${this.icon && this.iconPosition === "left" ? this._renderIcon() : p}
79
- ${this.iconOnly ? p : d`<slot class="btn__label"></slot>`}
80
- ${this.icon && this.iconPosition === "right" ? this._renderIcon() : p}
85
+ ${this.icon && this.iconPosition === "left" ? this._renderIcon() : b}
86
+ ${this.iconOnly ? b : y`<slot class="btn__label"></slot>`}
87
+ ${this.icon && this.iconPosition === "right" ? this._renderIcon() : b}
81
88
  </div>
82
89
  </button>
83
90
  `;
84
91
  }
85
92
  };
86
- h.formAssociated = !0, h.shadowRootOptions = { ..._.shadowRootOptions, delegatesFocus: !0 }, h.styles = [u, g];
87
- let i = h;
88
- s([
89
- o({ type: Boolean })
90
- ], i.prototype, "destructive", 2);
91
- s([
92
- o({ type: Boolean })
93
- ], i.prototype, "disabled", 2);
94
- s([
95
- o()
96
- ], i.prototype, "icon", 2);
97
- s([
98
- o({ type: Boolean })
99
- ], i.prototype, "iconOnly", 2);
100
- s([
101
- o({ attribute: "icon-position" })
102
- ], i.prototype, "iconPosition", 2);
103
- s([
104
- o({ type: Boolean, reflect: !0 })
105
- ], i.prototype, "loading", 2);
106
- s([
107
- o({ type: Boolean, attribute: "no-validate" })
108
- ], i.prototype, "noValidate", 2);
109
- s([
110
- o({ reflect: !0 })
111
- ], i.prototype, "size", 2);
112
- s([
113
- o()
114
- ], i.prototype, "type", 2);
115
- s([
116
- o({ reflect: !0 })
117
- ], i.prototype, "variant", 2);
118
- s([
119
- v()
120
- ], i.prototype, "_loaderVisible", 2);
121
- s([
122
- c("skf-loader")
123
- ], i.prototype, "$loader", 2);
124
- s([
125
- c("#body")
126
- ], i.prototype, "$body", 2);
127
- s([
128
- c("button")
129
- ], i.prototype, "$button", 2);
130
- s([
131
- f("loading", { afterUpdate: !0 })
132
- ], i.prototype, "_handleLoadingChange", 1);
93
+ l = new WeakMap(), c.styles = [w, C], c.formAssociated = !0, c.shadowRootOptions = { ...z.shadowRootOptions, delegatesFocus: !0 };
94
+ let e = c;
95
+ o([
96
+ r({ type: Boolean })
97
+ ], e.prototype, "destructive", 2);
98
+ o([
99
+ r({ type: Boolean })
100
+ ], e.prototype, "disabled", 2);
101
+ o([
102
+ r()
103
+ ], e.prototype, "icon", 2);
104
+ o([
105
+ r({ type: Boolean, attribute: "icon-only" })
106
+ ], e.prototype, "iconOnly", 2);
107
+ o([
108
+ r({ attribute: "icon-position" })
109
+ ], e.prototype, "iconPosition", 2);
110
+ o([
111
+ r({ type: Boolean, reflect: !0 })
112
+ ], e.prototype, "loading", 2);
113
+ o([
114
+ r({ type: Boolean, attribute: "no-validate" })
115
+ ], e.prototype, "noValidate", 2);
116
+ o([
117
+ r({ reflect: !0 })
118
+ ], e.prototype, "size", 2);
119
+ o([
120
+ r()
121
+ ], e.prototype, "type", 2);
122
+ o([
123
+ r({ reflect: !0 })
124
+ ], e.prototype, "variant", 2);
125
+ o([
126
+ P()
127
+ ], e.prototype, "_loaderVisible", 2);
128
+ o([
129
+ m("skf-loader")
130
+ ], e.prototype, "$loader", 2);
131
+ o([
132
+ m("#body")
133
+ ], e.prototype, "$body", 2);
134
+ o([
135
+ m("button")
136
+ ], e.prototype, "$button", 2);
137
+ o([
138
+ V("loading", { afterUpdate: !0 })
139
+ ], e.prototype, "_handleLoadingChange", 1);
133
140
  export {
134
- i as SkfButton
141
+ e as SkfButton
135
142
  };
@@ -1,2 +1 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
1
+ export declare const styles: import("lit").CSSResult;
@@ -128,5 +128,5 @@ const r = o`
128
128
  }
129
129
  `;
130
130
  export {
131
- r as default
131
+ r as styles
132
132
  };
@@ -3,7 +3,7 @@ import { type CSSResultGroup } from 'lit';
3
3
  /**
4
4
  * The `<skf-card>` can be used to group related subjects in a container
5
5
  *
6
- * @documentation See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/asset/6229d63d9fe16020a60657e5) for design principles
6
+ * See [zeroheight](https://zeroheight.com/853e936c9/p/021eed-card) for design principles
7
7
  *
8
8
  * @slot - The card's main content
9
9
  *
@@ -1,5 +1,5 @@
1
1
  import { SkfElement as f } from "../../internal/components/skf-element.js";
2
- import m from "../../styles/component.styles.js";
2
+ import { componentStyles as m } from "../../styles/component.styles.js";
3
3
  import { html as d } from "lit";
4
4
  import { property as o } from "lit/decorators.js";
5
5
  import { styles as u } from "./card.styles.js";
@@ -1,5 +1,6 @@
1
1
  import '../icon/icon.js';
2
2
  import { FormBase } from '../../internal/components/formBase.js';
3
+ import type { FormFieldSeverity } from '../../internal/types.js';
3
4
  import type { FormFieldBaseProps } from '../../internal/types/formField.js';
4
5
  import { type CSSResultGroup } from 'lit';
5
6
  /**
@@ -10,7 +11,7 @@ import { type CSSResultGroup } from 'lit';
10
11
  * @attribute {boolean} [disabled=false] - If true, sets disabled state
11
12
  * @attribute {boolean} [required=false] - If true, value is required or must be checked for the form to be submittable
12
13
  *
13
- * @event change {object} - When the value of the input changes
14
+ * @event {Event} change - When the value of the input changes
14
15
  *
15
16
  * @slot - The Radios label. Alternatively, you can use the `label` attribute.
16
17
  *
@@ -38,11 +39,8 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
38
39
  name?: string;
39
40
  /** If defined, renders an alternative A11y text for the asterisk */
40
41
  requiredLabel?: string;
41
- /**
42
- * If defined, styles checkbox using provided severity
43
- * @type { "alert" | "success" | "info" | "warning" }
44
- */
45
- severity?: FormFieldBaseProps['severity'];
42
+ /** If defined, styles checkbox using provided severity */
43
+ severity?: FormFieldSeverity;
46
44
  /** If true, displays valid state after interaction */
47
45
  showValid: boolean;
48
46
  /** Size of the checkbox */
@@ -54,9 +52,13 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
54
52
  private _invalid;
55
53
  /** @internal */
56
54
  private $input?;
55
+ /** @internal */
57
56
  handleCheckedChange(): void;
57
+ /** @internal */
58
58
  handleInvalidChange(): void;
59
+ /** @internal */
59
60
  handleDebugInvalid(): void;
61
+ /** @internal */
60
62
  handleCustomInvalidChange(): void;
61
63
  protected firstUpdated(): void;
62
64
  /** @internal */
@@ -2,11 +2,11 @@ import "../icon/icon.js";
2
2
  import { FormBase as p } from "../../internal/components/formBase.js";
3
3
  import { watch as h } from "../../internal/helpers/watch.js";
4
4
  import { Asterisk as v } from "../../internal/templates/asterisk.js";
5
- import m from "../../styles/component.styles.js";
5
+ import { componentStyles as m } from "../../styles/component.styles.js";
6
6
  import { html as c, nothing as f } from "lit";
7
7
  import { property as r, state as y, query as g } from "lit/decorators.js";
8
8
  import { ifDefined as _ } from "lit/directives/if-defined.js";
9
- import b from "./checkbox.styles.js";
9
+ import { styles as b } from "./checkbox.styles.js";
10
10
  var k = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, i = (u, t, s, a) => {
11
11
  for (var l = a > 1 ? void 0 : a ? $(t, s) : t, n = u.length - 1, o; n >= 0; n--)
12
12
  (o = u[n]) && (l = (a ? o(t, s, l) : o(l)) || l);
@@ -1,2 +1 @@
1
- declare const _default: import("lit").CSSResult[];
2
- export default _default;
1
+ export declare const styles: import("lit").CSSResult[];
@@ -65,10 +65,6 @@ const i = [
65
65
  --_skf-checkbox-border-color: var(--skf-severity-fg-color-success);
66
66
  }
67
67
 
68
- :host([severity='alert']:not([invalid], [valid])) & {
69
- --_skf-checkbox-border-color: var(--skf-severity-fg-color-alert);
70
- }
71
-
72
68
  :host([severity='info']:not([invalid], [valid])) & {
73
69
  --_skf-checkbox-border-color: var(--skf-severity-fg-color-info);
74
70
  }
@@ -110,5 +106,5 @@ const i = [
110
106
  `
111
107
  ];
112
108
  export {
113
- i as default
109
+ i as styles
114
110
  };
@@ -3,7 +3,7 @@ import { compareDates as $ } from "./datepicker.helpers.js";
3
3
  import { SkfElement as O } from "../../internal/components/skf-element.js";
4
4
  import { watch as R } from "../../internal/helpers/watch.js";
5
5
  import { Temporal as m } from "@js-temporal/polyfill";
6
- import C from "../../styles/component.styles.js";
6
+ import { componentStyles as C } from "../../styles/component.styles.js";
7
7
  import { html as p } from "lit";
8
8
  import { property as g, state as M } from "lit/decorators.js";
9
9
  import { repeat as w } from "lit/directives/repeat.js";
@@ -2,7 +2,7 @@ import "../button/button.js";
2
2
  import { dateFormatter as l, is as v } from "../date-picker-input/datepicker-input.helpers.js";
3
3
  import { SkfElement as R } from "../../internal/components/skf-element.js";
4
4
  import { watch as p } from "../../internal/helpers/watch.js";
5
- import S from "../../styles/component.styles.js";
5
+ import { componentStyles as S } from "../../styles/component.styles.js";
6
6
  import { html as D } from "lit";
7
7
  import { property as o, state as m } from "lit/decorators.js";
8
8
  import "./datepicker.js";
@@ -1,5 +1,6 @@
1
1
  import '../icon/icon.js';
2
2
  import { FormBase } from '../../internal/components/formBase.js';
3
+ import '../../internal/components/hint/hint.js';
3
4
  import { PopoverController } from '../../internal/controllers/popover.controller.js';
4
5
  import type { FormFieldBaseProps } from '../../internal/types/formField.js';
5
6
  import { type CSSResultGroup } from 'lit';
@@ -2,12 +2,13 @@ import { dateFormatter as v, is as f, isPopoverOpen as S, debounce as E } from "
2
2
  import "../icon/icon.js";
3
3
  import { computePosition as C, flip as I, offset as O } from "@floating-ui/dom";
4
4
  import { FormBase as M } from "../../internal/components/formBase.js";
5
+ import "../../internal/components/hint/hint.js";
5
6
  import { PopoverController as P } from "../../internal/controllers/popover.controller.js";
6
7
  import { hintSeverity as T } from "../../internal/helpers/hintSeverity.js";
7
8
  import { watch as B } from "../../internal/helpers/watch.js";
8
9
  import { Asterisk as x } from "../../internal/templates/asterisk.js";
9
10
  import { Temporal as w } from "@js-temporal/polyfill";
10
- import L from "../../styles/component.styles.js";
11
+ import { componentStyles as L } from "../../styles/component.styles.js";
11
12
  import { nothing as g, html as y } from "lit";
12
13
  import { property as h, state as $, query as b, queryAssignedNodes as R } from "lit/decorators.js";
13
14
  import { ifDefined as p } from "lit/directives/if-defined.js";
@@ -332,7 +333,7 @@ const _ = class _ extends M {
332
333
  <skf-hint
333
334
  aria-live=${this.invalid ? "assertive" : "polite"}
334
335
  id="hint"
335
- severity=${p(T(this.severity, this.invalid))}
336
+ severity=${p(T(this.invalid, this.severity))}
336
337
  >${this.customInvalid ?? this.hint}
337
338
  </skf-hint>
338
339
  `}
@@ -11,13 +11,13 @@ import { type CSSResultGroup } from 'lit';
11
11
  * @slot - The dialog component's content
12
12
  * @slot footer - The dialog component's buttons goes here
13
13
  *
14
- * @event skf-dialog-opened - Fires when the dialog is opened (after transitioned in)
15
- * @event skf-dialog-closing - Fires when the dialog is closed (before transitioned out)
16
- * @event skf-dialog-closed - Fires when the dialog is closed (after transitioned out)
17
- *
18
14
  * @cssproperty --skf-dialog-height - A custom height for the Dialog. Pass valid CSS **block-size** values
19
15
  * @cssproperty --skf-dialog-width - A custom width for the Dialog Pass valid CSS **inline-size** values
20
16
  *
17
+ * @event {CustomEvent} skf-dialog-opened - Fires when the dialog is opened (after transitioned in)
18
+ * @event {CustomEvent} skf-dialog-closing - Fires when the dialog is closing (before transitioned out)
19
+ * @event {CustomEvent} skf-dialog-closed - Fires when the dialog is closed (after transitioned out)
20
+ *
21
21
  * @tagname skf-dialog
22
22
  */
23
23
  export declare class SkfDialog extends SkfElement {
@@ -43,6 +43,7 @@ export declare class SkfDialog extends SkfElement {
43
43
  $dialog?: HTMLDialogElement;
44
44
  /** @internal */
45
45
  footerEls?: HTMLElement[];
46
+ /** @internal */
46
47
  handleOpenChange(): void;
47
48
  protected firstUpdated(): void;
48
49
  /** @internal */