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

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 (182) 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-without-fonts.css +1 -0
  131. package/dist/styles/global.css +1 -1
  132. package/dist/types/jsx/custom-element-jsx.d.ts +162 -180
  133. package/dist/types/vue/index.d.ts +162 -180
  134. package/dist/vscode.html-custom-data.json +133 -1091
  135. package/dist/web-types.json +368 -424
  136. package/package.json +24 -25
  137. package/dist/components/collapse/collapse.component.d.ts +0 -40
  138. package/dist/components/collapse/collapse.component.js +0 -86
  139. package/dist/components/collapse/collapse.d.ts +0 -8
  140. package/dist/components/collapse/collapse.js +0 -6
  141. package/dist/components/collapse/collapse.styles.d.ts +0 -2
  142. package/dist/components/collapse/collapse.styles.js +0 -77
  143. package/dist/components/menu-item/menu-item.component.d.ts +0 -25
  144. package/dist/internal/constants/heading.d.ts +0 -2
  145. /package/dist/components/{breadcrumb-item/breadcrumb-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
  146. /package/dist/components/{collapse/collapse.test.d.ts → accordion/accordion-item.test.d.ts} +0 -0
  147. /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.component.d.ts +0 -0
  148. /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.d.ts +0 -0
  149. /package/dist/components/{menu-item/menu-item.styles.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
  150. /package/dist/components/{menu-item → menu}/menu-item.d.ts +0 -0
  151. /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
  152. /package/dist/components/{nav-item/nav-item.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
  153. /package/dist/components/{menu-item → menu}/menu-item.styles.js +0 -0
  154. /package/dist/components/{nav-item → nav}/nav-item.d.ts +0 -0
  155. /package/dist/components/{nav-item → nav}/nav-item.js +0 -0
  156. /package/dist/components/{segmented-button-item/segmented-button-item.styles.d.ts → nav/nav-item.styles.d.ts} +0 -0
  157. /package/dist/components/{nav-item → nav}/nav-item.styles.js +0 -0
  158. /package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.d.ts +0 -0
  159. /package/dist/components/{select-option-group/select-option-group.style.d.ts → segmented-button/segmented-button-item.styles.d.ts} +0 -0
  160. /package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +0 -0
  161. /package/dist/components/{select-option-group → select}/select-option-group.d.ts +0 -0
  162. /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
  163. /package/dist/components/{select-option/select-option.styles.d.ts → select/select-option-group.style.d.ts} +0 -0
  164. /package/dist/components/{select-option-group → select}/select-option-group.style.js +0 -0
  165. /package/dist/components/{select-option → select}/select-option.controllers.d.ts +0 -0
  166. /package/dist/components/{select-option → select}/select-option.d.ts +0 -0
  167. /package/dist/components/{select-option → select}/select-option.js +0 -0
  168. /package/dist/components/{stepper-item/stepper-item.styles.d.ts → select/select-option.styles.d.ts} +0 -0
  169. /package/dist/components/{select-option → select}/select-option.styles.js +0 -0
  170. /package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +0 -0
  171. /package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +0 -0
  172. /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
  173. /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → stepper/stepper-item.styles.d.ts} +0 -0
  174. /package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +0 -0
  175. /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +0 -0
  176. /package/dist/components/{toast-item → toast}/toast-item.component.js +0 -0
  177. /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
  178. /package/dist/components/{toast-item → toast}/toast-item.styles.js +0 -0
  179. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.d.ts +0 -0
  180. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.d.ts +0 -0
  181. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.js +0 -0
  182. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.styles.js +0 -0
package/README.md CHANGED
@@ -42,13 +42,11 @@ The SKF UI Library is a collection of components that is meant to visually align
42
42
 
43
43
  The SKF UI Library is created using Lit/native web components in order to support as many frameworks as possible. It works out of the box for all frameworks, including React >= 19.
44
44
 
45
- For those who use React 18, we provide React wrappers that can be used in your application.
45
+ ## Philosophy
46
46
 
47
- ## Reporting issues
47
+ We like to stay as close to how native compoments works as possible albeit adding extra features on top. The rationale behind is that it either makes easier to absorb the api or learn something that is usable in the world outside as well. Adding looped, repeated content is done declaratively by component specific child components.
48
48
 
49
- Reporting issues requires an skf email and github access. [See this section](#skf-email)
50
-
51
- We are working on a solution to report issues without an explicit skf email, which will be publicly available.
49
+ <!-- For those who use React 18, we provide React wrappers that can be used in your application.-->
52
50
 
53
51
  ## 🏃 Getting started
54
52
 
@@ -152,11 +150,11 @@ export class AppComponent {
152
150
 
153
151
  ```
154
152
 
155
- ### React 19 beta / Next 15 beta
153
+ ### React 19 / Nextjs 15
156
154
 
157
- Web Components will become first class citizens in React 19. Should you want to use them in a version prior to 19 you have to wrap them in React, which essentially converts the native event to React Syntactic events. Long story short, use React 19 (when released) and your off the hook.
155
+ Web Components is first class citizens in React 19. Should you want to use them in a version prior to 19 you have to wrap them in React wrappers, which essentially converts the native event to React Syntactic events. Long story short, use React 19 and your off the hook.
158
156
 
159
- If you want to proceed to use the React 19 beta together with typescript, see [React 19 RC upgrade guide](https://react.dev/blog/2024/04/25/react-19-upgrade-guide).
157
+ If you want to proceed to use the React 19 together with typescript, see [React 19 upgrade guide](https://react.dev/blog/2024/04/25/react-19-upgrade-guide).
160
158
 
161
159
  You will also have to declare a global type for the web components to get it to play nice with JSX.
162
160
 
@@ -304,6 +302,12 @@ steps:
304
302
 
305
303
  In this example a token has been added with the name `ACCESS_TOKEN_SECRET`, but you can give it any name you like ✨. If you want to know more about secret generation and usage you can read more about it in [GitHub's docs](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions).
306
304
 
305
+ ## Reporting issues
306
+
307
+ Reporting issues requires an skf email and github access. [See this section](#skf-email)
308
+
309
+ We are working on a solution to report issues without an explicit skf email, which will be publicly available.
310
+
307
311
  ## 📖 Further reading
308
312
 
309
313
  ### 🎁 Contributing
@@ -0,0 +1,36 @@
1
+ import '../icon/icon.js';
2
+ import { SkfElement } from '../../internal/components/skf-element.js';
3
+ import type { HeadingType } from '../../internal/types.js';
4
+ import type { CSSResultGroup } from 'lit';
5
+ export type SkfAccordionItemHeadingType = Exclude<HeadingType, 'h1'>;
6
+ /**
7
+ * The `<skf-accordion-item>` is used in conjunction with the `<skf-accordion>` component
8
+ *
9
+ * @event {CustomEvent} skf-accordion-item-toggle - Event emitted when toggled
10
+ *
11
+ * @slot - Main content
12
+ *
13
+ * @tagname skf-accordion-item
14
+ */
15
+ export declare class SkfAccordionItem extends SkfElement {
16
+ static styles: CSSResultGroup;
17
+ /** If true, will animate the expand/accordion-item state */
18
+ animated: boolean;
19
+ /** If true, will set the accordion-item to be expanded by default */
20
+ expanded: boolean;
21
+ /** Heading for the accordion-item */
22
+ heading?: string;
23
+ /** Defines which heading element will be rendered */
24
+ headingAs: SkfAccordionItemHeadingType;
25
+ /** If true, renders the small version */
26
+ small: boolean;
27
+ /** If true, will truncate the heading in accordion-item state */
28
+ truncate: boolean;
29
+ /** Class method as alternative to manipulate attribute */
30
+ setClose(): void;
31
+ /** Class method as alternative to manipulate attribute */
32
+ setOpen(): void;
33
+ /** @internal */
34
+ private _toggle;
35
+ render(): import("lit").TemplateResult;
36
+ }
@@ -0,0 +1,87 @@
1
+ import "../icon/icon.js";
2
+ import { SkfElement as l } from "../../internal/components/skf-element.js";
3
+ import { componentStyles as p } from "../../styles/component.styles.js";
4
+ import { property as a } from "lit/decorators.js";
5
+ import { classMap as m } from "lit/directives/class-map.js";
6
+ import { ifDefined as h } from "lit/directives/if-defined.js";
7
+ import { literal as f, html as u } from "lit/static-html.js";
8
+ import { styles as _ } from "./accordion-item.styles.js";
9
+ var y = Object.defineProperty, i = (r, o, d, g) => {
10
+ for (var t = void 0, s = r.length - 1, c; s >= 0; s--)
11
+ (c = r[s]) && (t = c(o, d, t) || t);
12
+ return t && y(o, d, t), t;
13
+ };
14
+ const n = class n extends l {
15
+ constructor() {
16
+ super(...arguments), this.animated = !1, this.expanded = !1, this.headingAs = "h2", this.small = !1, this.truncate = !1, this._toggle = () => {
17
+ this.dispatchEvent(
18
+ new CustomEvent("skf-accordion-item-toggle", {
19
+ bubbles: !0,
20
+ composed: !0,
21
+ cancelable: !0
22
+ })
23
+ ), this.expanded = !this.expanded;
24
+ };
25
+ }
26
+ /** Class method as alternative to manipulate attribute */
27
+ setClose() {
28
+ this.expanded = !1;
29
+ }
30
+ /** Class method as alternative to manipulate attribute */
31
+ setOpen() {
32
+ this.expanded = !0;
33
+ }
34
+ render() {
35
+ const o = f`${this.headingAs}`;
36
+ return u`
37
+ <div class=${m({
38
+ "accordion-item": !0,
39
+ "accordion-item--animated": this.animated,
40
+ "accordion-item--expanded": this.expanded,
41
+ "accordion-item--small": this.small,
42
+ "accordion-item--truncate": this.truncate
43
+ })}>
44
+ <${o} class="accordion-item__heading">
45
+ <button
46
+ @click=${this._toggle}
47
+ aria-controls="main"
48
+ aria-expanded=${h(this.expanded ? "true" : "false")}
49
+ class="accordion-item__btn"
50
+ type="button"
51
+ >
52
+ <span class="accordion-item__label">${this.heading}</span>
53
+ <skf-icon class="accordion-item__icon" name=${this.expanded ? "caretUp" : "caretDown"}></skf-icon>
54
+ </button>
55
+ </${o}>
56
+ <div class="accordion-item__body">
57
+ <div class="accordion-item__main" data-testid="main" id="main">
58
+ <slot></slot>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ `;
63
+ }
64
+ };
65
+ n.styles = [p, _];
66
+ let e = n;
67
+ i([
68
+ a({ type: Boolean, reflect: !0 })
69
+ ], e.prototype, "animated");
70
+ i([
71
+ a({ type: Boolean, reflect: !0 })
72
+ ], e.prototype, "expanded");
73
+ i([
74
+ a()
75
+ ], e.prototype, "heading");
76
+ i([
77
+ a({ attribute: "heading-as" })
78
+ ], e.prototype, "headingAs");
79
+ i([
80
+ a({ type: Boolean, reflect: !0 })
81
+ ], e.prototype, "small");
82
+ i([
83
+ a({ type: Boolean, reflect: !0 })
84
+ ], e.prototype, "truncate");
85
+ export {
86
+ e as SkfAccordionItem
87
+ };
@@ -1,6 +1,6 @@
1
- import { SkfCollapse } from '../collapse/collapse.component.js';
2
- export declare class SkfAccordionItem extends SkfCollapse {
3
- }
1
+ import { SkfAccordionItem } from './accordion-item.component.js';
2
+ export * from './accordion-item.component.js';
3
+ export default SkfAccordionItem;
4
4
  declare global {
5
5
  interface HTMLElementTagNameMap {
6
6
  'skf-accordion-item': SkfAccordionItem;
@@ -1,7 +1,6 @@
1
- import { SkfCollapse as e } from "../collapse/collapse.component.js";
2
- class f extends e {
3
- }
4
- e.define("skf-accordion-item");
1
+ import { SkfAccordionItem as o } from "./accordion-item.component.js";
2
+ o.define("skf-accordion-item");
5
3
  export {
6
- f as SkfAccordionItem
4
+ o as SkfAccordionItem,
5
+ o as default
7
6
  };
@@ -0,0 +1,77 @@
1
+ import { css as i } from "lit";
2
+ const e = i`
3
+ /* stylelint-disable selector-class-pattern */
4
+ @layer components {
5
+ .accordion-item {
6
+ background: var(--skf-bg-color-neutral-1);
7
+ border-bottom: var(--skf-border-width-sm) solid var(--skf-border-color-tertiary);
8
+ }
9
+
10
+ .accordion-item__heading {
11
+ font-size: var(--_skf-accordion-item-heading-size, var(--skf-font-size-100));
12
+ font-weight: var(--_skf-accordion-item-heading-weight, normal);
13
+
14
+ .accordion-item--small & {
15
+ --_skf-accordion-item-heading-size: var(--skf-font-size-75);
16
+ --_skf-accordion-item-heading-weight: var(--skf-font-weight-medium);
17
+ }
18
+ }
19
+
20
+ .accordion-item__btn {
21
+ align-items: center;
22
+ display: flex;
23
+ padding-block: var(--_skf-accordion-item-button-padding-block, var(--skf-spacing-50));
24
+ padding-inline: var(--skf-spacing-75);
25
+ width: 100%;
26
+
27
+ &:focus-visible {
28
+ outline: var(--skf-border-width-md) solid var(--skf-interactive-border-color-focus);
29
+ outline-offset: -2px;
30
+ }
31
+
32
+ .accordion-item--small & {
33
+ --_skf-accordion-item-button-padding-block: var(--skf-spacing-25);
34
+ }
35
+ }
36
+
37
+ .accordion-item__label {
38
+ .accordion-item--truncate:not(.accordion-item--expanded) & {
39
+ overflow: hidden;
40
+ text-overflow: ellipsis;
41
+ white-space: nowrap;
42
+ }
43
+ }
44
+
45
+ .accordion-item__icon {
46
+ margin-inline-start: auto;
47
+ }
48
+
49
+ .accordion-item__body {
50
+ display: grid;
51
+ grid-template-rows: var(--_skf-accordion-item-body-height, 0fr);
52
+ padding-inline: var(--skf-spacing-75);
53
+
54
+ .accordion-item--animated & {
55
+ transition: grid-template-rows calc(var(--skf-motion-duration-normal) * 1ms)
56
+ var(--skf-motion-easing-ease-in);
57
+ }
58
+
59
+ .accordion-item--expanded & {
60
+ --_skf-accordion-item-body-height: 1fr;
61
+ }
62
+ }
63
+
64
+ .accordion-item__main {
65
+ overflow: hidden;
66
+
67
+ &::after {
68
+ content: '';
69
+ display: block;
70
+ padding-block-end: var(--skf-spacing-100);
71
+ }
72
+ }
73
+ }
74
+ `;
75
+ export {
76
+ e as styles
77
+ };
@@ -1,11 +1,10 @@
1
- import '../collapse/collapse.js';
2
1
  import { SkfElement } from '../../internal/components/skf-element.js';
3
- import type { HeadingType } from '../../internal/constants/heading.js';
4
2
  import { type CSSResultGroup, type PropertyValues } from 'lit';
3
+ import type { SkfAccordionItemHeadingType } from './accordion-item.js';
5
4
  /**
6
- * The `<skf-accordion>` component consists of multiple `<skf-collapse>`, working together.
5
+ * The `<skf-accordion>` component consists of one or more `<skf-accordion-item>` item(s) working together
7
6
  *
8
- * See [zeroheight](https://zeroheight.com/853e936c9/p/6590bf-accordion) for design principles.
7
+ * See [zeroheight](https://zeroheight.com/853e936c9/p/6590bf-accordion) for design principles
9
8
  *
10
9
  * @slot - Expects one or more <skf-accordion-item> element(s)
11
10
  *
@@ -15,11 +14,8 @@ export declare class SkfAccordion extends SkfElement {
15
14
  static styles: CSSResultGroup;
16
15
  /** If true, will animate the expand/collapse state */
17
16
  animated: boolean;
18
- /**
19
- * Defines which heading element will be rendered
20
- * @type { "h1" | "h2" | "h3" | "h4" }
21
- */
22
- headingAs: Exclude<HeadingType, 'h1'>;
17
+ /** Defines which heading element will be rendered */
18
+ headingAs: SkfAccordionItemHeadingType;
23
19
  /** If true, adds a gap between each item */
24
20
  gap: boolean;
25
21
  /** If true, allowes multiple accordion items to open */
@@ -1,7 +1,6 @@
1
- import "../collapse/collapse.js";
2
1
  import { SkfElement as p } from "../../internal/components/skf-element.js";
3
- import m from "../../styles/component.styles.js";
4
- import { html as f } from "lit";
2
+ import { componentStyles as f } from "../../styles/component.styles.js";
3
+ import { html as m } from "lit";
5
4
  import { property as a, queryAssignedNodes as d } from "lit/decorators.js";
6
5
  import { classMap as c } from "lit/directives/class-map.js";
7
6
  import { styles as g } from "./accordion.styles.js";
@@ -33,7 +32,7 @@ const n = class n extends p {
33
32
  });
34
33
  }
35
34
  render() {
36
- return f`
35
+ return m`
37
36
  <div class=${c({ "accordion--gap": this.gap })}>
38
37
  <slot
39
38
  @skf-collapse-toggle=${(t) => {
@@ -45,7 +44,7 @@ const n = class n extends p {
45
44
  `;
46
45
  }
47
46
  };
48
- n.styles = [g, m];
47
+ n.styles = [g, f];
49
48
  let e = n;
50
49
  s([
51
50
  a({ type: Boolean, reflect: !0 })
@@ -1,5 +1,4 @@
1
1
  import { SkfAccordion } from './accordion.component.js';
2
- export * from './accordion-item.js';
3
2
  export * from './accordion.component.js';
4
3
  export default SkfAccordion;
5
4
  declare global {
@@ -1,8 +1,6 @@
1
1
  import { SkfAccordion as o } from "./accordion.component.js";
2
- import { SkfAccordionItem as e } from "./accordion-item.js";
3
2
  o.define("skf-accordion");
4
3
  export {
5
4
  o as SkfAccordion,
6
- e as SkfAccordionItem,
7
5
  o as default
8
6
  };
@@ -1,13 +1,11 @@
1
1
  import '../icon/icon.js';
2
2
  import { SkfElement } from '../../internal/components/skf-element.js';
3
- import type { Icon, SeverityFgColor } from '@skf-design-system/ui-assets';
3
+ import type { Icon, Severity } from '../../internal/types.js';
4
4
  import { type CSSResultGroup } from 'lit';
5
- type SkfAlertIcon = Icon;
6
- type SkfAlertSeverity = SeverityFgColor;
7
5
  /**
8
6
  * The `<skf-alert>` is a type of notification that appears in-line
9
7
  *
10
- * @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/990ec5-alert) for design principles
8
+ * See [zeroheight](https://zeroheight.com/853e936c9/p/990ec5-alert) for design principles
11
9
  *
12
10
  * @event skf-alert-close - Fires when the close button is clicked
13
11
  *
@@ -21,13 +19,12 @@ export declare class SkfAlert extends SkfElement {
21
19
  /** Close button aria-label */
22
20
  buttonLabel: string;
23
21
  /** If defined, displays leading icon */
24
- icon?: SkfAlertIcon;
22
+ icon?: Icon;
25
23
  /** If true, renders with an close button and sets aria-role to `status` */
26
24
  persistent: boolean;
27
25
  /** If defined, gives the supplied appearance */
28
- severity?: SkfAlertSeverity;
26
+ severity?: Severity;
29
27
  /** @internal */
30
28
  private _handleClose;
31
29
  render(): import("lit").TemplateResult<1>;
32
30
  }
33
- export {};
@@ -1,17 +1,17 @@
1
1
  import "../icon/icon.js";
2
- import { SkfElement as y } from "../../internal/components/skf-element.js";
3
- import f from "../../styles/component.styles.js";
2
+ import { SkfElement as f } from "../../internal/components/skf-element.js";
3
+ import { componentStyles as y } from "../../styles/component.styles.js";
4
4
  import { nothing as h, html as p } from "lit";
5
5
  import { property as s } from "lit/decorators.js";
6
6
  import { classMap as u } from "lit/directives/class-map.js";
7
7
  import { ifDefined as m } from "lit/directives/if-defined.js";
8
8
  import { styles as v } from "./alert.styles.js";
9
- var b = Object.defineProperty, r = (l, a, n, d) => {
10
- for (var t = void 0, i = l.length - 1, c; i >= 0; i--)
11
- (c = l[i]) && (t = c(a, n, t) || t);
12
- return t && b(a, n, t), t;
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;
13
13
  };
14
- const o = class o extends y {
14
+ const o = class o extends f {
15
15
  constructor() {
16
16
  super(...arguments), this.buttonLabel = "Close", this.persistent = !1, this._handleClose = () => {
17
17
  this.emit("skf-alert-close");
@@ -23,7 +23,6 @@ const o = class o extends y {
23
23
  aria-describedby="main"
24
24
  class=${u({
25
25
  alert: !0,
26
- "alert--severity-alert": this.severity === "alert",
27
26
  "alert--severity-error": this.severity === "error",
28
27
  "alert--severity-info": this.severity === "info",
29
28
  "alert--severity-success": this.severity === "success",
@@ -55,7 +54,7 @@ const o = class o extends y {
55
54
  `;
56
55
  }
57
56
  };
58
- o.styles = [f, v];
57
+ o.styles = [y, v];
59
58
  let e = o;
60
59
  r([
61
60
  s({ attribute: "button-label" })
@@ -19,11 +19,6 @@ const s = r`
19
19
  padding-inline: var(--skf-spacing-50);
20
20
  }
21
21
 
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
- }
26
-
27
22
  .alert--severity-error {
28
23
  --_skf-alert-bg-color: var(--skf-severity-bg-color-error);
29
24
  --_skf-alert-border-color: var(--skf-severity-fg-color-error);
@@ -0,0 +1,61 @@
1
+ import "../icon/icon.js";
2
+ import { SkfElement as f } from "../../internal/components/skf-element.js";
3
+ import { componentStyles as h } from "../../styles/component.styles.js";
4
+ import { html as a } from "lit";
5
+ import { property as m, state as _ } from "lit/decorators.js";
6
+ import { classMap as u } from "lit/directives/class-map.js";
7
+ import { ifDefined as b } from "lit/directives/if-defined.js";
8
+ import { styles as C } from "./breadcrumb-item.styles.js";
9
+ var d = Object.defineProperty, v = Object.getOwnPropertyDescriptor, c = (p, t, s, r) => {
10
+ for (var e = r > 1 ? void 0 : r ? v(t, s) : t, o = p.length - 1, l; o >= 0; o--)
11
+ (l = p[o]) && (e = (r ? l(t, s, e) : l(e)) || e);
12
+ return r && e && d(t, s, e), e;
13
+ };
14
+ const n = class n extends f {
15
+ constructor() {
16
+ super(...arguments), this._isCurrent = !1, this._clickHandler = (t, s) => {
17
+ var r;
18
+ this._onClick && t.preventDefault(), (r = this._onClick) == null || r.call(this, t, s);
19
+ };
20
+ }
21
+ set onClick(t) {
22
+ !this.href || !t || (this._onClick = t);
23
+ }
24
+ get onClick() {
25
+ return this._onClick;
26
+ }
27
+ connectedCallback() {
28
+ super.connectedCallback(), this.role = "listitem";
29
+ }
30
+ render() {
31
+ return a`
32
+ <div class=${u({ "breadcrumb-item": !0 })}>
33
+ ${this.href ? a`
34
+ <a
35
+ @click=${this._clickHandler}
36
+ aria-current=${b(this._isCurrent ? "page" : void 0)}
37
+ class="breadcrumb-item__label"
38
+ href=${this.href}
39
+ >
40
+ <slot></slot>
41
+ </a>
42
+ ` : a`<slot class="breadcrumb-item__label"></slot>`}
43
+ <span class="breadcrumb-item__separator">/</span>
44
+ </div>
45
+ `;
46
+ }
47
+ };
48
+ n.styles = [h, C];
49
+ let i = n;
50
+ c([
51
+ m()
52
+ ], i.prototype, "href", 2);
53
+ c([
54
+ m({ attribute: !1 })
55
+ ], i.prototype, "onClick", 1);
56
+ c([
57
+ _()
58
+ ], i.prototype, "_isCurrent", 2);
59
+ export {
60
+ i as SkfBreadcrumbItem
61
+ };
@@ -0,0 +1,6 @@
1
+ import { SkfBreadcrumbItem as e } from "./breadcrumb-item.component.js";
2
+ e.define("skf-breadcrumb-item");
3
+ export {
4
+ e as SkfBreadcrumbItem,
5
+ e as default
6
+ };
@@ -0,0 +1,62 @@
1
+ import { css as r } from "lit";
2
+ const o = r`
3
+ /* stylelint-disable selector-class-pattern */
4
+ @layer components {
5
+ :host {
6
+ contain: layout;
7
+ }
8
+
9
+ .breadcrumb-item {
10
+ align-items: center;
11
+ display: flex;
12
+ }
13
+
14
+ .breadcrumb-item__label {
15
+ color: var(--_skf-breadcrumb-item-color, inherit);
16
+
17
+ &:is(slot) {
18
+ display: inline;
19
+ }
20
+
21
+ &:is(a) {
22
+ text-decoration: none;
23
+
24
+ &:focus-visible {
25
+ border-radius: var(--skf-border-radius-sm);
26
+ outline: var(--skf-border-width-md) solid var(--skf-interactive-border-color-focus);
27
+ outline-offset: var(--skf-size-2);
28
+ }
29
+ }
30
+
31
+ :host(:not(:last-of-type)) & {
32
+ &:is(slot) {
33
+ --_skf-breadcrumb-item-color: var(--skf-text-color-secondary);
34
+ }
35
+
36
+ &:is(a) {
37
+ --_skf-breadcrumb-item-color: var(--skf-interactive-text-color-primary);
38
+
39
+ &:hover,
40
+ &:focus,
41
+ &:active {
42
+ --_skf-breadcrumb-item-color: var(--skf-interactive-text-color-primary-hover);
43
+
44
+ text-decoration: underline;
45
+ }
46
+ }
47
+ }
48
+ }
49
+
50
+ .breadcrumb-item__separator {
51
+ display: block;
52
+ margin-inline: var(--skf-spacing-25);
53
+
54
+ :host(:last-of-type) & {
55
+ display: none;
56
+ }
57
+ }
58
+ }
59
+ `;
60
+ export {
61
+ o as styles
62
+ };
@@ -1,6 +1,6 @@
1
- import type { SkfBreadcrumbItem } from '../breadcrumb-item/breadcrumb-item.component.js';
2
1
  import { SkfElement } from '../../internal/components/skf-element';
3
2
  import { type CSSResultGroup } from 'lit';
3
+ import type { SkfBreadcrumbItem } from './breadcrumb-item.component.js';
4
4
  /**
5
5
  * The `<skf-breadcrumb>` component consists of multiple `<skf-breadcrumb-item>`, working together.
6
6
  *
@@ -0,0 +1,60 @@
1
+ import { SkfElement as c } from "../../internal/components/skf-element.js";
2
+ import { componentStyles as f } from "../../styles/component.styles.js";
3
+ import "lit";
4
+ import { property as p, state as _, queryAssignedElements as d } from "lit/decorators.js";
5
+ import { classMap as y } from "lit/directives/class-map.js";
6
+ import { ifDefined as u } from "lit/directives/if-defined.js";
7
+ import { literal as h, html as b } from "lit/static-html.js";
8
+ import { styles as g } from "./breadcrumb.styles.js";
9
+ var v = Object.defineProperty, r = (a, t, i, n) => {
10
+ for (var s = void 0, l = a.length - 1, m; l >= 0; l--)
11
+ (m = a[l]) && (s = m(t, i, s) || s);
12
+ return s && v(t, i, s), s;
13
+ };
14
+ const o = class o extends c {
15
+ constructor() {
16
+ super(...arguments), this.label = "Breadcrumb", this.size = "md", this._isDynamic = !1, this._handleSlotChange = () => {
17
+ this._items.forEach((t, i) => {
18
+ this._isDynamic = !!t.href;
19
+ const n = i === this._items.length - 1;
20
+ this._isDynamic && n && (t._isCurrent = !0);
21
+ });
22
+ };
23
+ }
24
+ firstUpdated() {
25
+ this._handleSlotChange();
26
+ }
27
+ render() {
28
+ const t = this._isDynamic ? h`nav` : h`div`;
29
+ return b`
30
+ <${t}
31
+ aria-label=${u(this.label && this._isDynamic ? this.label : void 0)}
32
+ class=${y({
33
+ breadcrumb: !0,
34
+ "breadcrumb--small": this.size === "sm"
35
+ })}
36
+ >
37
+ <ol class="breadcrumb__list">
38
+ <slot @slotchange=${this._handleSlotChange}></slot>
39
+ </ol>
40
+ </{tag}>
41
+ `;
42
+ }
43
+ };
44
+ o.styles = [f, g];
45
+ let e = o;
46
+ r([
47
+ p()
48
+ ], e.prototype, "label");
49
+ r([
50
+ p({ reflect: !0 })
51
+ ], e.prototype, "size");
52
+ r([
53
+ _()
54
+ ], e.prototype, "_isDynamic");
55
+ r([
56
+ d()
57
+ ], e.prototype, "_items");
58
+ export {
59
+ e as SkfBreadcrumb
60
+ };
@@ -0,0 +1,6 @@
1
+ import { SkfBreadcrumb as r } from "./breadcrumb.component.js";
2
+ r.define("skf-breadcrumb");
3
+ export {
4
+ r as SkfBreadcrumb,
5
+ r as default
6
+ };
@@ -0,0 +1,22 @@
1
+ import { css as t } from "lit";
2
+ const s = t`
3
+ /* stylelint-disable selector-class-pattern */
4
+ @layer components {
5
+ :host {
6
+ contain: layout;
7
+ }
8
+
9
+ .breadcrumb--small {
10
+ font-size: var(--skf-font-size-75);
11
+ font-weight: var(--skf-font-weight-medium);
12
+ }
13
+
14
+ .breadcrumb__list {
15
+ align-items: center;
16
+ display: flex;
17
+ }
18
+ }
19
+ `;
20
+ export {
21
+ s as styles
22
+ };