@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
@@ -0,0 +1,57 @@
1
+ import { SkfElement as n } from "../../internal/components/skf-element.js";
2
+ import { watch as h } from "../../internal/helpers/watch.js";
3
+ import m from "../../styles/component.styles.js";
4
+ import { html as f } from "lit";
5
+ import { property as v, state as d } from "lit/decorators.js";
6
+ import { classMap as b } from "lit/directives/class-map.js";
7
+ import { styles as u } from "./tab.styles.js";
8
+ var _ = Object.defineProperty, y = Object.getOwnPropertyDescriptor, a = (c, s, l, r) => {
9
+ for (var e = r > 1 ? void 0 : r ? y(s, l) : s, i = c.length - 1, o; i >= 0; i--)
10
+ (o = c[i]) && (e = (r ? o(s, l, e) : o(e)) || e);
11
+ return r && e && _(s, l, e), e;
12
+ };
13
+ const p = class p extends n {
14
+ constructor() {
15
+ super(), this.panel = "", this.selected = !1, this.variant = "expanded", this._handleClick = () => {
16
+ this.emit("skf-tab-select", {
17
+ detail: {
18
+ tab: this
19
+ }
20
+ });
21
+ }, this.role = "tab", this.addEventListener("click", this._handleClick);
22
+ }
23
+ handleSelectedChange() {
24
+ this.ariaSelected = this.selected ? "true" : "false", this.tabIndex = this.selected ? 0 : -1;
25
+ }
26
+ render() {
27
+ return f`
28
+ <div
29
+ class=${b({
30
+ tab: !0,
31
+ "tab--expanded": this.variant === "expanded",
32
+ "tab--compressed": this.variant === "compressed",
33
+ "tab--selected": this.selected
34
+ })}
35
+ >
36
+ <slot class="tab__label"></slot>
37
+ </div>
38
+ `;
39
+ }
40
+ };
41
+ p.styles = [m, u];
42
+ let t = p;
43
+ a([
44
+ v({ reflect: !0 })
45
+ ], t.prototype, "panel", 2);
46
+ a([
47
+ d()
48
+ ], t.prototype, "selected", 2);
49
+ a([
50
+ d()
51
+ ], t.prototype, "variant", 2);
52
+ a([
53
+ h("selected")
54
+ ], t.prototype, "handleSelectedChange", 1);
55
+ export {
56
+ t as SkfTab
57
+ };
@@ -0,0 +1,8 @@
1
+ import { SkfTab } from './tab.component';
2
+ export * from './tab.component';
3
+ export default SkfTab;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'skf-tab': SkfTab;
7
+ }
8
+ }
@@ -0,0 +1,6 @@
1
+ import { SkfTab as f } from "./tab.component.js";
2
+ f.define("skf-tab");
3
+ export {
4
+ f as SkfTab,
5
+ f as default
6
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,123 @@
1
+ import { css as o } from "lit";
2
+ const e = o`
3
+ /* stylelint-disable selector-class-pattern */
4
+ @layer components {
5
+ :host {
6
+ contain: layout;
7
+ min-width: 0; /* Needed for truncation */
8
+ outline: transparent;
9
+ }
10
+
11
+ .tab {
12
+ color: var(--_skf-tab-color, var(--skf-text-color-primary));
13
+ cursor: pointer;
14
+ position: relative;
15
+
16
+ /* Indicator */
17
+ &::after {
18
+ background-color: var(--skf-color-brand-base);
19
+ block-size: 3px;
20
+ content: '';
21
+ inset-inline: 50%;
22
+ opacity: 0;
23
+ position: absolute;
24
+ transition: all calc(var(--skf-motion-duration-fast) * 1ms) var(--skf-motion-easing-ease-in);
25
+ }
26
+
27
+ :host(:focus-visible) & {
28
+ outline: var(--skf-border-width-md) solid var(--skf-color-brand-base);
29
+ }
30
+ }
31
+
32
+ .tab--selected::after {
33
+ inset-inline: 0;
34
+ opacity: 1;
35
+ }
36
+
37
+ /**
38
+ * Compressed
39
+ */
40
+ .tab--compressed {
41
+ padding-block-end: var(--skf-spacing-25);
42
+
43
+ /* Invisible bold label copy, to avoid layout shifts when selected */
44
+ &::before {
45
+ block-size: 0;
46
+ content: attr(data-label);
47
+ display: block;
48
+ font-weight: var(--skf-font-weight-bold);
49
+ visibility: hidden;
50
+ }
51
+
52
+ &::after {
53
+ inset-block-end: 0;
54
+ }
55
+
56
+ &:hover,
57
+ &:active {
58
+ &::after {
59
+ inset-inline: 0;
60
+ opacity: 1;
61
+ }
62
+ }
63
+
64
+ :host(:focus-visible) & {
65
+ outline-offset: 2px;
66
+ }
67
+ }
68
+
69
+ /**
70
+ * Expanded
71
+ */
72
+ .tab--expanded {
73
+ align-items: center;
74
+ background-color: var(--_skf-tab-bg-color, var(--skf-color-neutral-lightest));
75
+ block-size: var(--skf-size-44);
76
+ border-block-end: var(--skf-border-width-sm) solid
77
+ var(--_skf-tab-border-bottom-color, var(--skf-border-color-tertiary));
78
+ display: flex;
79
+ justify-content: center;
80
+ padding-inline: var(--skf-spacing-50);
81
+ transition: background-color calc(var(--skf-motion-duration-fast) * 1ms)
82
+ var(--skf-motion-easing-ease-in);
83
+
84
+ &::after {
85
+ inset-block-start: 0;
86
+ }
87
+
88
+ &:hover {
89
+ --_skf-tab-bg-color: var(--skf-color-blue-lighest);
90
+ }
91
+
92
+ :host(:focus-visible) & {
93
+ outline-offset: -2px;
94
+ }
95
+ }
96
+
97
+ .tab--expanded.tab--selected {
98
+ --_skf-tab-bg-color: var(--skf-bg-color-neutral-1);
99
+ --_skf-tab-border-bottom-color: transparent;
100
+ --_skf-tab-color: var(--skf-text-color-emphasised);
101
+
102
+ font-weight: var(--skf-font-weight-bold);
103
+
104
+ :host(:not(:first-of-type)) & {
105
+ border-inline-start: var(--skf-border-width-sm) solid var(--skf-border-color-tertiary);
106
+ }
107
+
108
+ :host(:not(:last-of-type)) & {
109
+ border-inline-end: var(--skf-border-width-sm) solid var(--skf-border-color-tertiary);
110
+ }
111
+ }
112
+
113
+ .tab__label {
114
+ display: block;
115
+ overflow-x: auto;
116
+ text-overflow: ellipsis;
117
+ white-space: nowrap;
118
+ }
119
+ }
120
+ `;
121
+ export {
122
+ e as styles
123
+ };
@@ -0,0 +1,43 @@
1
+ import '../card/card.js';
2
+ import { SkfElement } from '../../internal/components/skf-element';
3
+ import { type CSSResultGroup, type PropertyValues } from 'lit';
4
+ /**
5
+ * The `<skf-tab-group>` is a component that displays a list of actions or options.
6
+ *
7
+ * @documentation See [zeroheight](https://zeroheight.com/****) for design principles
8
+ *
9
+ * @slot - Used for grouping tab panels in the tab group. Must be <skf-tab-panel> elements
10
+ * @slot tabs - Used for grouping tabs in the tab group. Must be <skf-tab> elements
11
+ *
12
+ * @tagname skf-tab-group
13
+ */
14
+ export declare class SkfTabGroup extends SkfElement {
15
+ static styles: CSSResultGroup;
16
+ /** Sets the default selected tab */
17
+ defaultSelected: number;
18
+ /** If true, removes border */
19
+ noBorder: boolean;
20
+ /** If true, removes padding */
21
+ noPadding: boolean;
22
+ /** If true, component fills the parent element height */
23
+ stretch: boolean;
24
+ /** Sets the appearance of the tabs */
25
+ variant: 'compressed' | 'expanded';
26
+ /** @internal */
27
+ private tabs;
28
+ /** @internal */
29
+ private panels;
30
+ firstUpdated(): void;
31
+ protected updated(_changedProperties: PropertyValues): void;
32
+ /** @internal */
33
+ private _getKeyDownNextTab;
34
+ /** @internal */
35
+ private _handleKeyDown;
36
+ /** @internal */
37
+ private _handleTabSelected;
38
+ /** @internal */
39
+ private _selectTab;
40
+ /** @internal */
41
+ private _syncTabsAndPanels;
42
+ render(): import("lit").TemplateResult<1>;
43
+ }
@@ -0,0 +1,98 @@
1
+ import "../card/card.js";
2
+ import { SkfElement as c } from "../../internal/components/skf-element.js";
3
+ import b from "../../styles/component.styles.js";
4
+ import { html as f } from "lit";
5
+ import { property as o, queryAssignedElements as p } from "lit/decorators.js";
6
+ import { classMap as u } from "lit/directives/class-map.js";
7
+ import { styles as y } from "./tab-group.styles.js";
8
+ var g = Object.defineProperty, i = (h, t, s, r) => {
9
+ for (var e = void 0, n = h.length - 1, d; n >= 0; n--)
10
+ (d = h[n]) && (e = d(t, s, e) || e);
11
+ return e && g(t, s, e), e;
12
+ };
13
+ const l = class l extends c {
14
+ constructor() {
15
+ super(...arguments), this.defaultSelected = 0, this.noBorder = !1, this.noPadding = !1, this.stretch = !1, this.variant = "expanded", this._handleKeyDown = (t) => {
16
+ if (["ArrowLeft", "ArrowRight"].includes(t.key)) {
17
+ const s = this._getKeyDownNextTab(t.key);
18
+ s.focus({ preventScroll: !0 }), this._selectTab(s);
19
+ }
20
+ }, this._handleTabSelected = (t) => {
21
+ const s = t.detail.tab;
22
+ this._selectTab(s);
23
+ }, this._selectTab = (t) => {
24
+ this.tabs.forEach((s) => {
25
+ const r = this.panels.find((e) => e.name === s.panel);
26
+ s.selected = s === t, r && (r.active = s === t);
27
+ });
28
+ }, this._syncTabsAndPanels = () => {
29
+ this.tabs.forEach((t, s) => {
30
+ const r = (s + 1).toString();
31
+ t.id = t.id ? t.id : `skf-tab-${r}`, t.selected = this.defaultSelected === s;
32
+ const e = this.panels.find((n) => n.name === t.panel);
33
+ e && (e.id = e.id ? e.id : `skf-tab-panel-${r}`, t.setAttribute("aria-controls", e.id), e.setAttribute("aria-labelledby", t.id), e.active = t.selected);
34
+ });
35
+ };
36
+ }
37
+ firstUpdated() {
38
+ this.addEventListener("skf-tab-select", this._handleTabSelected), this._syncTabsAndPanels();
39
+ }
40
+ updated(t) {
41
+ t.has("variant") && this.tabs.forEach((s) => {
42
+ s.variant = this.variant;
43
+ });
44
+ }
45
+ /** @internal */
46
+ _getKeyDownNextTab(t) {
47
+ const e = (this.tabs.findIndex((d) => d.selected) + (t === "ArrowRight" ? 1 : -1)) % this.tabs.length;
48
+ return this.tabs[e < 0 ? this.tabs.length - 1 : e];
49
+ }
50
+ render() {
51
+ return f`
52
+ <div
53
+ @keydown=${this._handleKeyDown}
54
+ class=${u({
55
+ "tab-group": !0,
56
+ "tab-group--compressed": this.variant === "compressed",
57
+ "tab-group--expanded": this.variant === "expanded",
58
+ "tab-group--no-border": this.noBorder,
59
+ "tab-group--no-padding": this.noPadding,
60
+ "tab-group--stretch": this.stretch
61
+ })}
62
+ >
63
+ <div class="tab-group__tabs" role="tablist">
64
+ <slot name="tabs"></slot>
65
+ </div>
66
+ <div class="tab-group__body">
67
+ <slot></slot>
68
+ </div>
69
+ </div>
70
+ `;
71
+ }
72
+ };
73
+ l.styles = [b, y];
74
+ let a = l;
75
+ i([
76
+ o({ type: Number, attribute: "default-selected" })
77
+ ], a.prototype, "defaultSelected");
78
+ i([
79
+ o({ type: Boolean, attribute: "no-border" })
80
+ ], a.prototype, "noBorder");
81
+ i([
82
+ o({ type: Boolean, attribute: "no-padding" })
83
+ ], a.prototype, "noPadding");
84
+ i([
85
+ o({ type: Boolean })
86
+ ], a.prototype, "stretch");
87
+ i([
88
+ o({ reflect: !0 })
89
+ ], a.prototype, "variant");
90
+ i([
91
+ p({ slot: "tabs" })
92
+ ], a.prototype, "tabs");
93
+ i([
94
+ p()
95
+ ], a.prototype, "panels");
96
+ export {
97
+ a as SkfTabGroup
98
+ };
@@ -0,0 +1,8 @@
1
+ import { SkfTabGroup } from './tab-group.component';
2
+ export * from './tab-group.component';
3
+ export default SkfTabGroup;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'skf-tab-group': SkfTabGroup;
7
+ }
8
+ }
@@ -0,0 +1,6 @@
1
+ import { SkfTabGroup as f } from "./tab-group.component.js";
2
+ f.define("skf-tab-group");
3
+ export {
4
+ f as SkfTabGroup,
5
+ f as default
6
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,75 @@
1
+ import { css as r } from "lit";
2
+ const a = r`
3
+ /* stylelint-disable selector-class-pattern */
4
+ @layer components {
5
+ :host {
6
+ contain: layout;
7
+ }
8
+
9
+ :host([stretch]) {
10
+ block-size: 100%;
11
+ }
12
+
13
+ /**
14
+ * Root
15
+ */
16
+ .tab-group {
17
+ background-color: var(--skf-bg-color-neutral-1);
18
+ }
19
+
20
+ .tab-group--expanded {
21
+ border: var(
22
+ --_skf-tab-group-border,
23
+ var(--skf-border-width-sm) solid var(--skf-border-color-tertiary)
24
+ );
25
+ border-end-end-radius: var(--skf-border-radius-sm);
26
+ border-end-start-radius: var(--skf-border-radius-sm);
27
+ box-shadow: var(--skf-shadow-md);
28
+
29
+ ::slotted(skf-tab) {
30
+ flex: 1;
31
+ }
32
+ }
33
+
34
+ .tab-group--no-border {
35
+ --_skf-tab-group-border: none;
36
+ }
37
+
38
+ .tab-group--stretch {
39
+ block-size: inherit;
40
+ display: flex;
41
+ flex-direction: column;
42
+ }
43
+
44
+ /**
45
+ * Tabs
46
+ */
47
+ .tab-group__tabs {
48
+ display: flex;
49
+
50
+ .tab-group--compressed & {
51
+ gap: var(--skf-spacing-100);
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Body
57
+ */
58
+ .tab-group__body {
59
+ padding-block: var(--_skf-tab-group-body-padding-block, var(--skf-spacing-100) 0);
60
+
61
+ .tab-group--stretch & {
62
+ overflow-y: auto;
63
+ }
64
+
65
+ .tab-group--expanded:not(.tab-group--no-padding) & {
66
+ --_skf-tab-group-body-padding-block: var(--skf-spacing-100);
67
+
68
+ padding-inline: var(--skf-spacing-100);
69
+ }
70
+ }
71
+ }
72
+ `;
73
+ export {
74
+ a as styles
75
+ };
@@ -0,0 +1,19 @@
1
+ import { SkfElement } from '../../internal/components/skf-element';
2
+ import { type CSSResultGroup } from 'lit';
3
+ /**
4
+ * The `<skf-tab-panel>` is a component that displays a list of actions or options.
5
+ *
6
+ * @slot - The tab panel's content
7
+ *
8
+ * @tagname skf-tab-panel
9
+ */
10
+ export declare class SkfTabPanel extends SkfElement {
11
+ static styles: CSSResultGroup;
12
+ /** The tab panel's name. */
13
+ name: string;
14
+ active: boolean;
15
+ constructor();
16
+ /** @internal */
17
+ handleActiveChanged(): void;
18
+ render(): import("lit").TemplateResult<1>;
19
+ }
@@ -0,0 +1,36 @@
1
+ import { SkfElement as c } from "../../internal/components/skf-element.js";
2
+ import { watch as h } from "../../internal/helpers/watch.js";
3
+ import l from "../../styles/component.styles.js";
4
+ import { html as f } from "lit";
5
+ import { property as v, state as d } from "lit/decorators.js";
6
+ import { styles as u } from "./tab-panel.styles.js";
7
+ var y = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, a = (m, r, s, o) => {
8
+ for (var t = o > 1 ? void 0 : o ? _(r, s) : r, i = m.length - 1, p; i >= 0; i--)
9
+ (p = m[i]) && (t = (o ? p(r, s, t) : p(t)) || t);
10
+ return o && t && y(r, s, t), t;
11
+ };
12
+ const n = class n extends c {
13
+ constructor() {
14
+ super(), this.name = "", this.active = !1, this.role = "tabpanel";
15
+ }
16
+ handleActiveChanged() {
17
+ this.ariaHidden = this.active ? "false" : "true", this.tabIndex = this.active ? 0 : -1;
18
+ }
19
+ render() {
20
+ return f`<slot></slot>`;
21
+ }
22
+ };
23
+ n.styles = [l, u];
24
+ let e = n;
25
+ a([
26
+ v()
27
+ ], e.prototype, "name", 2);
28
+ a([
29
+ d()
30
+ ], e.prototype, "active", 2);
31
+ a([
32
+ h("active")
33
+ ], e.prototype, "handleActiveChanged", 1);
34
+ export {
35
+ e as SkfTabPanel
36
+ };
@@ -0,0 +1,8 @@
1
+ import { SkfTabPanel } from './tab-panel.component';
2
+ export * from './tab-panel.component';
3
+ export default SkfTabPanel;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'skf-tab-panel': SkfTabPanel;
7
+ }
8
+ }
@@ -0,0 +1,6 @@
1
+ import { SkfTabPanel as a } from "./tab-panel.component.js";
2
+ a.define("skf-tab-panel");
3
+ export {
4
+ a as SkfTabPanel,
5
+ a as default
6
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,13 @@
1
+ import { css as i } from "lit";
2
+ const s = i`
3
+ :host {
4
+ content-visibility: hidden;
5
+ }
6
+
7
+ :host([aria-hidden='false']) {
8
+ content-visibility: visible;
9
+ }
10
+ `;
11
+ export {
12
+ s as styles
13
+ };
@@ -1,5 +1,5 @@
1
- import '@components/icon/icon.js';
2
- import { SkfElement } from '@internal/components/skf-element';
1
+ import '../icon/icon.js';
2
+ import { SkfElement } from '../../internal/components/skf-element';
3
3
  import type { Icon, SeverityBgColor } from '@skf-design-system/ui-assets';
4
4
  import { type CSSResultGroup } from 'lit';
5
5
  /**