@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,4 +1,4 @@
1
- import { SkfCollapse } from '@components/collapse/collapse.component.js';
1
+ import { SkfCollapse } from '../collapse/collapse.component.js';
2
2
  export declare class SkfAccordionItem extends SkfCollapse {
3
3
  }
4
4
  declare global {
@@ -1,6 +1,6 @@
1
- import '@components/collapse/collapse.js';
2
- import { SkfElement } from '@internal/components/skf-element.js';
3
- import type { HeadingType } from '@internal/constants/heading.js';
1
+ import '../collapse/collapse.js';
2
+ import { SkfElement } from '../../internal/components/skf-element.js';
3
+ import type { HeadingType } from '../../internal/constants/heading.js';
4
4
  import { type CSSResultGroup, type PropertyValues } from 'lit';
5
5
  /**
6
6
  * The `<skf-accordion>` component consists of multiple `<skf-collapse>`, working together.
@@ -21,7 +21,7 @@ export declare class SkfAccordion extends SkfElement {
21
21
  */
22
22
  headingAs: Exclude<HeadingType, 'h1'>;
23
23
  /** If true, adds a gap between each item */
24
- gap?: boolean;
24
+ gap: boolean;
25
25
  /** If true, allowes multiple accordion items to open */
26
26
  multiple?: boolean;
27
27
  /** If true, renders the small version */
@@ -1,17 +1,18 @@
1
1
  import "../collapse/collapse.js";
2
- import { SkfElement as p } from "../../internal/components/skf-element.js";
2
+ import { SkfElement as h } from "../../internal/components/skf-element.js";
3
3
  import m from "../../styles/component.styles.js";
4
4
  import { html as f } from "lit";
5
5
  import { property as a, queryAssignedNodes as d } from "lit/decorators.js";
6
- import c from "./accordion.styles.js";
7
- var g = Object.defineProperty, r = (u, t, i, o) => {
8
- for (var s = void 0, l = u.length - 1, h; l >= 0; l--)
9
- (h = u[l]) && (s = h(t, i, s) || s);
10
- return s && g(t, i, s), s;
6
+ import { classMap as c } from "lit/directives/class-map.js";
7
+ import { styles as g } from "./accordion.styles.js";
8
+ var y = Object.defineProperty, s = (u, t, i, o) => {
9
+ for (var r = void 0, l = u.length - 1, p; l >= 0; l--)
10
+ (p = u[l]) && (r = p(t, i, r) || r);
11
+ return r && y(t, i, r), r;
11
12
  };
12
- const n = class n extends p {
13
+ const n = class n extends h {
13
14
  constructor() {
14
- super(...arguments), this.headingAs = "h2", this._setItemAttributes = () => {
15
+ super(...arguments), this.headingAs = "h2", this.gap = !1, this._setItemAttributes = () => {
15
16
  this.items.forEach((t) => {
16
17
  t.setAttribute("heading-as", this.headingAs), this.animated ? t.setAttribute("animated", "") : t.hasAttribute("animated") && t.removeAttribute("animated"), this.small ? t.setAttribute("small", "") : t.hasAttribute("small") && t.removeAttribute("small"), this.truncate ? t.setAttribute("truncate", "") : t.hasAttribute("truncate") && t.removeAttribute("truncate");
17
18
  });
@@ -33,7 +34,7 @@ const n = class n extends p {
33
34
  }
34
35
  render() {
35
36
  return f`
36
- <div id="root">
37
+ <div class=${c({ "accordion--gap": this.gap })}>
37
38
  <slot
38
39
  @skf-collapse-toggle=${(t) => {
39
40
  this._onChildToggle(t);
@@ -44,27 +45,27 @@ const n = class n extends p {
44
45
  `;
45
46
  }
46
47
  };
47
- n.styles = [c, m];
48
+ n.styles = [g, m];
48
49
  let e = n;
49
- r([
50
+ s([
50
51
  a({ type: Boolean, reflect: !0 })
51
52
  ], e.prototype, "animated");
52
- r([
53
+ s([
53
54
  a({ attribute: "heading-as" })
54
55
  ], e.prototype, "headingAs");
55
- r([
56
+ s([
56
57
  a({ type: Boolean, reflect: !0 })
57
58
  ], e.prototype, "gap");
58
- r([
59
+ s([
59
60
  a({ type: Boolean })
60
61
  ], e.prototype, "multiple");
61
- r([
62
+ s([
62
63
  a({ type: Boolean, reflect: !0 })
63
64
  ], e.prototype, "small");
64
- r([
65
+ s([
65
66
  a({ type: Boolean, reflect: !0 })
66
67
  ], e.prototype, "truncate");
67
- r([
68
+ s([
68
69
  d()
69
70
  ], e.prototype, "$accordionItems");
70
71
  export {
@@ -1,2 +1 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
1
+ export declare const styles: import("lit").CSSResult;
@@ -1,7 +1,8 @@
1
- import { css as o } from "lit";
2
- const t = o`
1
+ import { css as s } from "lit";
2
+ const l = s`
3
+ /* stylelint-disable selector-class-pattern */
3
4
  @layer components {
4
- :host([gap]) #root {
5
+ .accordion--gap {
5
6
  display: flex;
6
7
  flex-direction: column;
7
8
  gap: var(--skf-spacing-300);
@@ -9,5 +10,5 @@ const t = o`
9
10
  }
10
11
  `;
11
12
  export {
12
- t as default
13
+ l as styles
13
14
  };
@@ -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 { SeverityFgColor } from '@skf-design-system/ui-assets';
5
5
  import { type CSSResultGroup } from 'lit';
6
6
  /**
@@ -17,12 +17,12 @@ import { type CSSResultGroup } from 'lit';
17
17
  */
18
18
  export declare class SkfAlert extends SkfElement {
19
19
  static styles: CSSResultGroup;
20
- /** If true, alert is being used as a toast (alertdialog) with an close button */
21
- closeable?: boolean;
22
20
  /** Close button aria-label */
23
21
  buttonLabel: string;
24
22
  /** If defined, displays leading icon */
25
23
  icon?: SkfIcon['name'];
24
+ /** If true, renders with an close button and sets aria-role to `status` */
25
+ persistent?: boolean;
26
26
  /**
27
27
  * If defined, gives the supplied appearance
28
28
  * @type { "error" | "info" | "warning" | "success" | "alert" }
@@ -1,62 +1,73 @@
1
1
  import "../icon/icon.js";
2
- import { SkfElement as d } from "../../internal/components/skf-element.js";
3
- import b from "../../styles/component.styles.js";
4
- import { html as p, nothing as f } from "lit";
5
- import { property as o } from "lit/decorators.js";
6
- import { ifDefined as s } from "lit/directives/if-defined.js";
7
- import u from "./alert.styles.js";
8
- var h = Object.defineProperty, i = (n, a, m, y) => {
9
- for (var t = void 0, r = n.length - 1, c; r >= 0; r--)
10
- (c = n[r]) && (t = c(a, m, t) || t);
11
- return t && h(a, m, t), t;
2
+ import { SkfElement as y } from "../../internal/components/skf-element.js";
3
+ import f from "../../styles/component.styles.js";
4
+ import { html as m, nothing as u } from "lit";
5
+ import { property as s } from "lit/decorators.js";
6
+ import { classMap as h } from "lit/directives/class-map.js";
7
+ import { ifDefined as p } from "lit/directives/if-defined.js";
8
+ import { styles as v } from "./alert.styles.js";
9
+ var b = Object.defineProperty, r = (n, l, a, d) => {
10
+ for (var t = void 0, i = n.length - 1, c; i >= 0; i--)
11
+ (c = n[i]) && (t = c(l, a, t) || t);
12
+ return t && b(l, a, t), t;
12
13
  };
13
- const l = class l extends d {
14
+ const o = class o extends y {
14
15
  constructor() {
15
16
  super(...arguments), this.buttonLabel = "Close", this._handleClose = () => {
16
17
  this.emit("skf-alert-close");
17
18
  };
18
19
  }
19
20
  render() {
20
- return p`
21
+ return m`
21
22
  <div
22
- id="root"
23
23
  aria-describedby="main"
24
- aria-modal=${s(this.closeable && "true")}
25
- role=${this.closeable ? "alertdialog" : "alert"}
24
+ class=${h({
25
+ alert: !0,
26
+ "alert--severity-alert": this.severity === "alert",
27
+ "alert--severity-error": this.severity === "error",
28
+ "alert--severity-info": this.severity === "info",
29
+ "alert--severity-success": this.severity === "success",
30
+ "alert--severity-warning": this.severity === "warning",
31
+ [this.className]: !0
32
+ })}
33
+ role=${this.persistent ? "status" : "alert"}
26
34
  >
27
35
  <skf-icon
28
- color=${s(this.severity ?? "secondary")}
29
- name=${s(this.icon)}
36
+ color=${p(this.severity ?? "secondary")}
37
+ name=${p(this.icon ?? "info")}
30
38
  size="sm"
31
39
  ></skf-icon>
32
- <div id="body">
33
- <div id="main">
34
- <slot></slot>
35
- </div>
40
+ <div class="alert__body">
41
+ <slot class="alert__main" id="main"></slot>
36
42
  <slot name="link"></slot>
37
43
  </div>
38
- ${this.closeable ? p`
39
- <button @click="${this._handleClose}" aria-label=${this.buttonLabel} type="button">
44
+ ${this.persistent ? m`
45
+ <button
46
+ @click="${this._handleClose}"
47
+ aria-label=${this.buttonLabel}
48
+ class="alert__btn"
49
+ type="button"
50
+ >
40
51
  <skf-icon name="close" size="sm"></skf-icon>
41
52
  </button>
42
- ` : f}
53
+ ` : u}
43
54
  </div>
44
55
  `;
45
56
  }
46
57
  };
47
- l.styles = [b, u];
48
- let e = l;
49
- i([
50
- o({ type: Boolean, reflect: !0 })
51
- ], e.prototype, "closeable");
52
- i([
53
- o({ attribute: "button-label" })
58
+ o.styles = [f, v];
59
+ let e = o;
60
+ r([
61
+ s({ attribute: "button-label" })
54
62
  ], e.prototype, "buttonLabel");
55
- i([
56
- o()
63
+ r([
64
+ s()
57
65
  ], e.prototype, "icon");
58
- i([
59
- o({ reflect: !0 })
66
+ r([
67
+ s({ type: Boolean, reflect: !0 })
68
+ ], e.prototype, "persistent");
69
+ r([
70
+ s({ reflect: !0 })
60
71
  ], e.prototype, "severity");
61
72
  export {
62
73
  e as SkfAlert
@@ -1,2 +1 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
1
+ export declare const styles: import("lit").CSSResult;
@@ -1,11 +1,12 @@
1
1
  import { css as r } from "lit";
2
2
  const s = r`
3
+ /* stylelint-disable selector-class-pattern */
3
4
  @layer components {
4
5
  :host {
5
6
  contain: layout;
6
7
  }
7
8
 
8
- #root {
9
+ .alert {
9
10
  background-color: var(--_skf-alert-bg-color, var(--skf-bg-color-neutral-2));
10
11
  border: var(--skf-border-width-sm) solid
11
12
  var(--_skf-alert-border-color, var(--skf-border-color-primary));
@@ -16,34 +17,34 @@ const s = r`
16
17
  gap: var(--skf-spacing-50);
17
18
  padding-block: var(--skf-spacing-75);
18
19
  padding-inline: var(--skf-spacing-50);
20
+ }
19
21
 
20
- :host([severity='alert']) & {
21
- --_skf-alert-bg-color: var(--skf-severity-bg-color-alert);
22
- --_skf-alert-border-color: var(--skf-severity-fg-color-alert);
23
- }
22
+ .alert--severity-alert {
23
+ --_skf-alert-bg-color: var(--skf-severity-bg-color-alert);
24
+ --_skf-alert-border-color: var(--skf-severity-fg-color-alert);
25
+ }
24
26
 
25
- :host([severity='error']) & {
26
- --_skf-alert-bg-color: var(--skf-severity-bg-color-error);
27
- --_skf-alert-border-color: var(--skf-severity-fg-color-error);
28
- }
27
+ .alert--severity-error {
28
+ --_skf-alert-bg-color: var(--skf-severity-bg-color-error);
29
+ --_skf-alert-border-color: var(--skf-severity-fg-color-error);
30
+ }
29
31
 
30
- :host([severity='info']) & {
31
- --_skf-alert-bg-color: var(--skf-severity-bg-color-info);
32
- --_skf-alert-border-color: var(--skf-severity-fg-color-info);
33
- }
32
+ .alert--severity-info {
33
+ --_skf-alert-bg-color: var(--skf-severity-bg-color-info);
34
+ --_skf-alert-border-color: var(--skf-severity-fg-color-info);
35
+ }
34
36
 
35
- :host([severity='success']) & {
36
- --_skf-alert-bg-color: var(--skf-severity-bg-color-success);
37
- --_skf-alert-border-color: var(--skf-severity-fg-color-success);
38
- }
37
+ .alert--severity-success {
38
+ --_skf-alert-bg-color: var(--skf-severity-bg-color-success);
39
+ --_skf-alert-border-color: var(--skf-severity-fg-color-success);
40
+ }
39
41
 
40
- :host([severity='warning']) & {
41
- --_skf-alert-bg-color: var(--skf-severity-bg-color-warning);
42
- --_skf-alert-border-color: var(--skf-severity-fg-color-warning);
43
- }
42
+ .alert--severity-warning {
43
+ --_skf-alert-bg-color: var(--skf-severity-bg-color-warning);
44
+ --_skf-alert-border-color: var(--skf-severity-fg-color-warning);
44
45
  }
45
46
 
46
- #body {
47
+ .alert__body {
47
48
  display: flex;
48
49
  flex: auto;
49
50
  flex-wrap: wrap;
@@ -51,16 +52,20 @@ const s = r`
51
52
  justify-content: space-between;
52
53
  }
53
54
 
55
+ .alert__main {
56
+ display: block;
57
+ }
58
+
54
59
  ::slotted(skf-link) {
55
60
  text-transform: uppercase;
56
61
  }
57
62
 
58
- button {
63
+ .alert__btn {
59
64
  cursor: pointer;
60
65
  display: inline-flex;
61
66
  }
62
67
  }
63
68
  `;
64
69
  export {
65
- s as default
70
+ s as styles
66
71
  };
@@ -0,0 +1,29 @@
1
+ import type { SkfBreadcrumbItem } from '../breadcrumb-item/breadcrumb-item.component.js';
2
+ import { SkfElement } from '../../internal/components/skf-element';
3
+ import { type CSSResultGroup } from 'lit';
4
+ /**
5
+ * The `<skf-breadcrumb>` component consists of multiple `<skf-breadcrumb-item>`, working together.
6
+ *
7
+ * @documentation See [zeroheight](https://zeroheight.com/****) for design principles
8
+ *
9
+ * @event click - Fired when the item is clicked
10
+ *
11
+ * @slot - One or more `<skf-breadcrumb-item>`
12
+ *
13
+ * @tagname skf-breadcrumb
14
+ */
15
+ export declare class SkfBreadcrumb extends SkfElement {
16
+ static styles: CSSResultGroup;
17
+ /** aria-label for the breadcrumb control */
18
+ label: string;
19
+ /** Displays an alternative size */
20
+ size: 'md' | 'sm';
21
+ /** @internal */
22
+ _isDynamic: boolean;
23
+ /** @internal */
24
+ _items: NodeListOf<SkfBreadcrumbItem>;
25
+ firstUpdated(): void;
26
+ /** @internal */
27
+ private _handleSlotChange;
28
+ render(): import("lit").TemplateResult;
29
+ }
@@ -0,0 +1,8 @@
1
+ import { SkfBreadcrumb } from './breadcrumb.component';
2
+ export * from './breadcrumb.component';
3
+ export default SkfBreadcrumb;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'skf-breadcrumb': SkfBreadcrumb;
7
+ }
8
+ }
@@ -0,0 +1,25 @@
1
+ import '../icon/icon.js';
2
+ import { SkfElement } from '../../internal/components/skf-element';
3
+ import { type CSSResultGroup } from 'lit';
4
+ /**
5
+ * The `<skf-breadcrumb-item>` is used in conjunction with the `<skf-breadcrumb>` component
6
+ *
7
+ * @slot - Label of the breadcrumb item
8
+ *
9
+ * @tagname skf-breadcrumb-item
10
+ */
11
+ export declare class SkfBreadcrumbItem extends SkfElement {
12
+ static styles: CSSResultGroup;
13
+ private _onClick?;
14
+ /** If defined, loads url on click */
15
+ href?: string;
16
+ /** If defined, custom onClick where the second return parameter enables custom routing. **Notice!** Only applicable if `href` is defined. */
17
+ set onClick(onClickFn: ((event: Event, route: string) => void) | undefined);
18
+ get onClick(): ((event: Event, route: string) => void) | undefined;
19
+ /** @internal */
20
+ _isCurrent: boolean;
21
+ connectedCallback(): void;
22
+ /** @internal */
23
+ private _clickHandler;
24
+ render(): import("lit").TemplateResult<1>;
25
+ }
@@ -0,0 +1,8 @@
1
+ import { SkfBreadcrumbItem } from './breadcrumb-item.component';
2
+ export * from './breadcrumb-item.component';
3
+ export default SkfBreadcrumbItem;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'skf-breadcrumb-item': SkfBreadcrumbItem;
7
+ }
8
+ }
@@ -1,16 +1,25 @@
1
- import type { SkfIcon } from '@components/icon/icon.component.js';
2
- import '@components/icon/icon.js';
3
- import '@components/loader/loader.js';
4
- import { SkfElement } from '@internal/components/skf-element.js';
1
+ import type { SkfIcon } from '../icon/icon.component.js';
2
+ import '../icon/icon.js';
3
+ import '../loader/loader.js';
4
+ import { SkfElement } from '../../internal/components/skf-element.js';
5
5
  import { type CSSResultGroup, type PropertyValues } from 'lit';
6
6
  /**
7
7
  * Component to be used in forms or for interactivity
8
8
  *
9
9
  * @slot - The Primary content
10
10
  *
11
+ * @event click - Fires when the button is clicked
12
+ *
11
13
  * @tagname skf-button
12
14
  */
13
15
  export declare class SkfButton extends SkfElement {
16
+ static formAssociated: boolean;
17
+ static shadowRootOptions: {
18
+ delegatesFocus: boolean;
19
+ mode: ShadowRootMode;
20
+ serializable?: boolean;
21
+ slotAssignment?: SlotAssignmentMode;
22
+ };
14
23
  static styles: CSSResultGroup;
15
24
  /** @internal */
16
25
  private _transitionOptions;
@@ -22,27 +31,42 @@ export declare class SkfButton extends SkfElement {
22
31
  /** If provided, renders an icon before or after the text */
23
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" } */
24
33
  icon?: SkfIcon['name'];
34
+ /** If true, removes border */
35
+ iconOnly: boolean;
25
36
  /** If provided, determines the positioning of the icon in relation to the text */
26
37
  iconPosition?: 'left' | 'right';
27
38
  /** If true, hides text & icon and shows loading indicator. **Notice!** Only applicable if `variant` is `primary`. */
28
39
  loading: boolean;
40
+ noValidate: boolean;
29
41
  /** If provided, displays an alternative size */
30
42
  size: 'sm' | 'md' | 'lg';
31
43
  /** If provided, changes the button type */
32
44
  /** @type { 'button' | 'submit' | 'reset' } */
33
45
  type: HTMLButtonElement['type'];
34
46
  /** If provided, alters the appearance */
35
- variant: 'primary' | 'secondary';
47
+ variant: 'primary' | 'secondary' | 'tertiary';
36
48
  /** @internal */
37
49
  private _loaderVisible;
38
50
  /** @internal */
39
51
  private $loader?;
40
52
  /** @internal */
41
53
  private $body?;
54
+ /** @internal */
55
+ private $button?;
42
56
  constructor();
43
57
  protected firstUpdated(_changedProperties: PropertyValues): void;
44
58
  attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
59
+ /** @internal */
60
+ _handleClick: (e: MouseEvent) => void;
61
+ /** @internal */
62
+ _submitForm: () => void;
63
+ /** @internal */
64
+ _resetForm: () => void;
65
+ /** Simulates a click on the button. */
66
+ click(): void;
67
+ /** @internal */
45
68
  private _showLoader;
69
+ /** @internal */
46
70
  private _hideLoader;
47
71
  /** @internal */
48
72
  private _renderIcon;