@skf-design-system/ui-components 1.0.1-beta.0 → 1.0.2-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 (206) hide show
  1. package/README.md +1 -18
  2. package/dist/components/accordion/accordion.component.d.ts +4 -4
  3. package/dist/components/accordion/accordion.component.js +8 -8
  4. package/dist/components/alert/alert.component.d.ts +8 -9
  5. package/dist/components/alert/alert.component.js +14 -14
  6. package/dist/components/breadcrumb/breadcrumb.component.d.ts +1 -1
  7. package/dist/components/button/button.component.d.ts +3 -3
  8. package/dist/components/button/button.component.js +59 -55
  9. package/dist/components/card/card.component.js +18 -30
  10. package/dist/components/card/card.styles.js +25 -28
  11. package/dist/components/checkbox/checkbox.component.d.ts +9 -7
  12. package/dist/components/checkbox/checkbox.component.js +71 -58
  13. package/dist/components/collapse/collapse.component.js +1 -1
  14. package/dist/components/date-picker/datepicker.calendar.component.d.ts +77 -0
  15. package/dist/components/date-picker/datepicker.calendar.component.js +415 -0
  16. package/dist/components/date-picker/datepicker.calendar.styles.d.ts +1 -0
  17. package/dist/components/date-picker/datepicker.calendar.styles.js +202 -0
  18. package/dist/components/date-picker/datepicker.component.d.ts +79 -0
  19. package/dist/components/date-picker/datepicker.component.js +261 -0
  20. package/dist/components/date-picker/datepicker.d.ts +10 -0
  21. package/dist/components/date-picker/datepicker.helpers.d.ts +41 -0
  22. package/dist/components/date-picker/datepicker.helpers.js +76 -0
  23. package/dist/components/date-picker/datepicker.js +8 -0
  24. package/dist/components/date-picker/datepicker.styles.d.ts +1 -0
  25. package/dist/components/date-picker/datepicker.styles.js +87 -0
  26. package/dist/components/date-picker-input/datepicker-input.component.d.ts +115 -0
  27. package/dist/components/date-picker-input/datepicker-input.component.js +441 -0
  28. package/dist/components/date-picker-input/datepicker-input.d.ts +8 -0
  29. package/dist/components/date-picker-input/datepicker-input.helpers.d.ts +38 -0
  30. package/dist/components/date-picker-input/datepicker-input.helpers.js +31 -0
  31. package/dist/components/date-picker-input/datepicker-input.js +6 -0
  32. package/dist/components/date-picker-input/datepicker-input.styles.d.ts +1 -0
  33. package/dist/components/date-picker-input/datepicker-input.styles.js +18 -0
  34. package/dist/components/dialog/dialog.component.d.ts +18 -28
  35. package/dist/components/dialog/dialog.component.js +94 -84
  36. package/dist/components/divider/divider.component.d.ts +4 -8
  37. package/dist/components/divider/divider.component.js +24 -46
  38. package/dist/components/divider/divider.styles.js +34 -30
  39. package/dist/components/drawer/drawer.component.d.ts +57 -0
  40. package/dist/components/drawer/drawer.component.js +124 -0
  41. package/dist/components/drawer/drawer.d.ts +8 -0
  42. package/dist/components/drawer/drawer.js +6 -0
  43. package/dist/components/drawer/drawer.styles.d.ts +1 -0
  44. package/dist/components/drawer/drawer.styles.js +71 -0
  45. package/dist/components/header/header.component.d.ts +45 -0
  46. package/dist/components/header/header.component.js +110 -0
  47. package/dist/components/header/header.d.ts +8 -0
  48. package/dist/components/header/header.js +6 -0
  49. package/dist/components/header/header.styles.d.ts +1 -0
  50. package/dist/components/header/header.styles.js +68 -0
  51. package/dist/components/heading/heading.component.d.ts +6 -12
  52. package/dist/components/heading/heading.component.js +17 -17
  53. package/dist/components/heading/heading.styles.d.ts +1 -2
  54. package/dist/components/heading/heading.styles.js +1 -1
  55. package/dist/components/icon/icon.component.d.ts +1 -1
  56. package/dist/components/icon/icon.component.js +19 -19
  57. package/dist/components/input/input.component.d.ts +3 -2
  58. package/dist/components/input/input.component.js +89 -82
  59. package/dist/components/input/input.controllers.d.ts +20 -6
  60. package/dist/components/input/input.controllers.js +14 -10
  61. package/dist/components/link/link.component.js +29 -28
  62. package/dist/components/link/link.styles.js +24 -20
  63. package/dist/components/loader/loader.component.js +19 -19
  64. package/dist/components/logo/logo.component.js +6 -6
  65. package/dist/components/menu/menu.component.d.ts +4 -5
  66. package/dist/components/menu/menu.component.js +1 -1
  67. package/dist/components/nav/nav.component.d.ts +17 -0
  68. package/dist/components/nav/nav.component.js +34 -0
  69. package/dist/components/nav/nav.d.ts +8 -0
  70. package/dist/components/nav/nav.js +6 -0
  71. package/dist/components/nav/nav.styles.d.ts +1 -0
  72. package/dist/components/nav/nav.styles.js +17 -0
  73. package/dist/components/nav-item/nav-item.component.d.ts +20 -0
  74. package/dist/components/nav-item/nav-item.component.js +38 -0
  75. package/dist/components/nav-item/nav-item.d.ts +8 -0
  76. package/dist/components/nav-item/nav-item.js +6 -0
  77. package/dist/components/nav-item/nav-item.styles.d.ts +1 -0
  78. package/dist/components/nav-item/nav-item.styles.js +39 -0
  79. package/dist/components/popover/popover.component.d.ts +5 -6
  80. package/dist/components/popover/popover.component.js +24 -24
  81. package/dist/components/progress/progress.component.js +7 -7
  82. package/dist/components/radio/radio.component.d.ts +10 -6
  83. package/dist/components/radio/radio.component.js +14 -14
  84. package/dist/components/radio/radio.styles.d.ts +1 -2
  85. package/dist/components/radio/radio.styles.js +1 -1
  86. package/dist/components/segmented-button/segmented-button.component.d.ts +32 -0
  87. package/dist/components/segmented-button/segmented-button.d.ts +8 -0
  88. package/dist/components/segmented-button/segmented-button.styles.d.ts +1 -0
  89. package/dist/components/segmented-button-item/segmented-button-item.component.d.ts +36 -0
  90. package/dist/components/segmented-button-item/segmented-button-item.d.ts +8 -0
  91. package/dist/components/segmented-button-item/segmented-button-item.styles.d.ts +1 -0
  92. package/dist/components/select/select.component.js +2 -2
  93. package/dist/components/select/select.controllers.d.ts +20 -9
  94. package/dist/components/select/select.controllers.js +27 -22
  95. package/dist/components/select-option/select-option.controllers.d.ts +11 -5
  96. package/dist/components/select-option-group/select-option-group.component.js +9 -9
  97. package/dist/components/stepper/stepper.component.d.ts +2 -1
  98. package/dist/components/stepper/stepper.component.js +9 -9
  99. package/dist/components/stepper/stepper.helpers.js +5 -5
  100. package/dist/components/stepper-item/stepper-item.component.js +25 -25
  101. package/dist/components/switch/switch.component.d.ts +7 -6
  102. package/dist/components/switch/switch.component.js +7 -7
  103. package/dist/components/tab/tab.component.js +4 -4
  104. package/dist/components/tab-panel/tab-panel.component.js +12 -12
  105. package/dist/components/tag/tag.component.d.ts +4 -2
  106. package/dist/components/tag/tag.component.js +14 -14
  107. package/dist/components/textarea/textarea.component.js +10 -10
  108. package/dist/components/toast/toast.component.d.ts +1 -1
  109. package/dist/components/toast/toast.component.js +13 -13
  110. package/dist/components/toast-wrapper/toast-wrapper.component.js +10 -10
  111. package/dist/components/tooltip/tooltip.component.d.ts +5 -6
  112. package/dist/components/tooltip/tooltip.component.js +11 -11
  113. package/dist/custom-elements.json +3702 -2190
  114. package/dist/index.d.ts +6 -0
  115. package/dist/index.js +84 -66
  116. package/dist/internal/base-classes/popover/popover.base.d.ts +17 -7
  117. package/dist/internal/base-classes/popover/popover.base.js +119 -75
  118. package/dist/internal/base-classes/popover/popover.styles.js +14 -1
  119. package/dist/internal/components/hint/hint.component.js +13 -13
  120. package/dist/internal/controllers/elementOverflowController.d.ts +13 -0
  121. package/dist/internal/controllers/popover.controller.d.ts +12 -6
  122. package/dist/internal/controllers/popover.controller.js +9 -14
  123. package/dist/internal/helpers/dateFormatter.d.ts +2 -0
  124. package/dist/internal/helpers/utilityTypes.d.ts +22 -0
  125. package/dist/internal/helpers/uuid.d.ts +15 -0
  126. package/dist/internal/helpers/uuid.js +14 -0
  127. package/dist/internal/storybook/styles.d.ts +1 -0
  128. package/dist/styles/form-field.styles.js +11 -6
  129. package/dist/styles/global.css +1 -1
  130. package/dist/types/jsx/custom-element-jsx.d.ts +663 -1240
  131. package/dist/types/vue/index.d.ts +453 -255
  132. package/dist/vscode.html-custom-data.json +821 -503
  133. package/dist/web-types.json +1005 -633
  134. package/package.json +43 -52
  135. package/dist/react/index.d.ts +0 -35
  136. package/dist/react/index.js +0 -35
  137. package/dist/react/skf-accordion/index.d.ts +0 -3
  138. package/dist/react/skf-accordion/index.js +0 -13
  139. package/dist/react/skf-alert/index.d.ts +0 -9
  140. package/dist/react/skf-alert/index.js +0 -17
  141. package/dist/react/skf-breadcrumb/index.d.ts +0 -9
  142. package/dist/react/skf-breadcrumb/index.js +0 -17
  143. package/dist/react/skf-breadcrumb-item/index.d.ts +0 -3
  144. package/dist/react/skf-breadcrumb-item/index.js +0 -13
  145. package/dist/react/skf-button/index.d.ts +0 -9
  146. package/dist/react/skf-button/index.js +0 -17
  147. package/dist/react/skf-card/index.d.ts +0 -3
  148. package/dist/react/skf-card/index.js +0 -13
  149. package/dist/react/skf-checkbox/index.d.ts +0 -9
  150. package/dist/react/skf-checkbox/index.js +0 -17
  151. package/dist/react/skf-collapse/index.d.ts +0 -9
  152. package/dist/react/skf-collapse/index.js +0 -17
  153. package/dist/react/skf-dialog/index.d.ts +0 -15
  154. package/dist/react/skf-dialog/index.js +0 -19
  155. package/dist/react/skf-divider/index.d.ts +0 -3
  156. package/dist/react/skf-divider/index.js +0 -13
  157. package/dist/react/skf-heading/index.d.ts +0 -3
  158. package/dist/react/skf-heading/index.js +0 -13
  159. package/dist/react/skf-icon/index.d.ts +0 -3
  160. package/dist/react/skf-icon/index.js +0 -13
  161. package/dist/react/skf-input/index.d.ts +0 -12
  162. package/dist/react/skf-input/index.js +0 -18
  163. package/dist/react/skf-link/index.d.ts +0 -3
  164. package/dist/react/skf-link/index.js +0 -13
  165. package/dist/react/skf-loader/index.d.ts +0 -3
  166. package/dist/react/skf-loader/index.js +0 -13
  167. package/dist/react/skf-logo/index.d.ts +0 -3
  168. package/dist/react/skf-logo/index.js +0 -13
  169. package/dist/react/skf-menu/index.d.ts +0 -12
  170. package/dist/react/skf-menu/index.js +0 -18
  171. package/dist/react/skf-menu-item/index.d.ts +0 -27
  172. package/dist/react/skf-menu-item/index.js +0 -23
  173. package/dist/react/skf-popover/index.d.ts +0 -12
  174. package/dist/react/skf-popover/index.js +0 -18
  175. package/dist/react/skf-progress/index.d.ts +0 -3
  176. package/dist/react/skf-progress/index.js +0 -13
  177. package/dist/react/skf-radio/index.d.ts +0 -9
  178. package/dist/react/skf-radio/index.js +0 -17
  179. package/dist/react/skf-select/index.d.ts +0 -21
  180. package/dist/react/skf-select/index.js +0 -21
  181. package/dist/react/skf-select-option/index.d.ts +0 -9
  182. package/dist/react/skf-select-option/index.js +0 -17
  183. package/dist/react/skf-select-option-group/index.d.ts +0 -3
  184. package/dist/react/skf-select-option-group/index.js +0 -13
  185. package/dist/react/skf-stepper/index.d.ts +0 -9
  186. package/dist/react/skf-stepper/index.js +0 -17
  187. package/dist/react/skf-stepper-item/index.d.ts +0 -9
  188. package/dist/react/skf-stepper-item/index.js +0 -17
  189. package/dist/react/skf-switch/index.d.ts +0 -3
  190. package/dist/react/skf-switch/index.js +0 -13
  191. package/dist/react/skf-tab/index.d.ts +0 -12
  192. package/dist/react/skf-tab/index.js +0 -18
  193. package/dist/react/skf-tab-group/index.d.ts +0 -3
  194. package/dist/react/skf-tab-group/index.js +0 -13
  195. package/dist/react/skf-tab-panel/index.d.ts +0 -3
  196. package/dist/react/skf-tab-panel/index.js +0 -13
  197. package/dist/react/skf-tag/index.d.ts +0 -3
  198. package/dist/react/skf-tag/index.js +0 -13
  199. package/dist/react/skf-textarea/index.d.ts +0 -12
  200. package/dist/react/skf-textarea/index.js +0 -18
  201. package/dist/react/skf-toast/index.d.ts +0 -3
  202. package/dist/react/skf-toast/index.js +0 -13
  203. package/dist/react/skf-toast-wrapper/index.d.ts +0 -3
  204. package/dist/react/skf-toast-wrapper/index.js +0 -13
  205. package/dist/react/skf-tooltip/index.d.ts +0 -12
  206. package/dist/react/skf-tooltip/index.js +0 -18
@@ -1,20 +1,20 @@
1
1
  import { SkfElement as i } from "../../internal/components/skf-element.js";
2
- import n from "../../styles/component.styles.js";
3
- import { html as m } from "lit";
2
+ import m from "../../styles/component.styles.js";
3
+ import { html as n } from "lit";
4
4
  import { property as p } from "lit/decorators.js";
5
5
  import { classMap as a } from "lit/directives/class-map.js";
6
6
  import { styles as d } from "./logo.styles.js";
7
- var f = Object.defineProperty, v = (e, l, s, g) => {
7
+ var g = Object.defineProperty, v = (e, l, s, y) => {
8
8
  for (var c = void 0, r = e.length - 1, h; r >= 0; r--)
9
9
  (h = e[r]) && (c = h(l, s, c) || c);
10
- return c && f(l, s, c), c;
10
+ return c && g(l, s, c), c;
11
11
  };
12
12
  const o = class o extends i {
13
13
  constructor() {
14
14
  super(...arguments), this.title = "SKF logotype", this.color = "primary";
15
15
  }
16
16
  render() {
17
- return m`
17
+ return n`
18
18
  <svg
19
19
  class=${a({
20
20
  logo: !0,
@@ -66,7 +66,7 @@ c0,5.8-4.3,6.1-9.1,6.1H1230.9z"
66
66
  `;
67
67
  }
68
68
  };
69
- o.styles = [n, d];
69
+ o.styles = [m, d];
70
70
  let t = o;
71
71
  v([
72
72
  p()
@@ -5,12 +5,11 @@ import type { CSSResultGroup } from 'lit';
5
5
  *
6
6
  * @documentation See [zeroheight](https://zeroheight.com/****) for design principles
7
7
  *
8
- * @property {"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"} [placement='bottom-start'] - The placement of the menu
9
- * @property {boolean} [isOpen=false] - Whether the menu is open
10
- * @property {string} [anchor] - The id of the element the menu will be anchored to
8
+ * @attribute {"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"} [placement='bottom-start'] - The placement of the menu
9
+ * @attribute {string} [anchor] - The id of the element the menu will be anchored to
11
10
  *
12
- * @event open - Fired when the menu is opened
13
- * @event close - Fired when the menu is closed
11
+ * @event skf-opened - Fired when the menu is opened
12
+ * @event skf-closed - Fired when the menu is closed
14
13
  *
15
14
  * @slot - The menu popover content
16
15
  *
@@ -2,7 +2,7 @@ import { SkfPopoverBase as t } from "../../internal/base-classes/popover/popover
2
2
  import { styles as o } from "./menu.styles.js";
3
3
  const s = class s extends t {
4
4
  constructor() {
5
- super(), this.placement = "bottom-start", t.classMap = { menu: !0 };
5
+ super(), this.placement = "bottom-start", this.triggerEvent = "click", t.classMap = { menu: !0 };
6
6
  }
7
7
  addEventListeners(e) {
8
8
  e.addEventListener("mouseenter", this.open);
@@ -0,0 +1,17 @@
1
+ import { SkfElement } from '../../internal/components/skf-element';
2
+ import { type CSSResultGroup } from 'lit';
3
+ /**
4
+ * The `<skf-nav>` is a component that displays a list of <nav-items>.
5
+ *
6
+ * @documentation See [zeroheight](https://zeroheight.com/****) for design principles
7
+ *
8
+ * @slot - The component's main content
9
+ *
10
+ * @tagname skf-nav
11
+ */
12
+ export declare class SkfNav extends SkfElement {
13
+ static styles: CSSResultGroup;
14
+ vertical: boolean;
15
+ connectedCallback(): void;
16
+ render(): import("lit").TemplateResult<1>;
17
+ }
@@ -0,0 +1,34 @@
1
+ import { SkfElement as s } from "../../internal/components/skf-element.js";
2
+ import m from "../../styles/component.styles.js";
3
+ import { html as p } from "lit";
4
+ import { property as c } from "lit/decorators.js";
5
+ import { ifDefined as f } from "lit/directives/if-defined.js";
6
+ import { styles as u } from "./nav.styles.js";
7
+ var v = Object.defineProperty, d = (i, a, l, h) => {
8
+ for (var e = void 0, r = i.length - 1, n; r >= 0; r--)
9
+ (n = i[r]) && (e = n(a, l, e) || e);
10
+ return e && v(a, l, e), e;
11
+ };
12
+ const o = class o extends s {
13
+ constructor() {
14
+ super(...arguments), this.vertical = !1;
15
+ }
16
+ connectedCallback() {
17
+ super.connectedCallback(), this.ariaLabel = this.ariaLabel ?? "Main navigation", this.role = "nav";
18
+ }
19
+ render() {
20
+ return p`
21
+ <ul aria-orientation=${f(this.vertical ? "vertical" : void 0)} role="menubar">
22
+ <slot></slot>
23
+ </ul>
24
+ `;
25
+ }
26
+ };
27
+ o.styles = [m, u];
28
+ let t = o;
29
+ d([
30
+ c({ type: Boolean, reflect: !0 })
31
+ ], t.prototype, "vertical");
32
+ export {
33
+ t as SkfNav
34
+ };
@@ -0,0 +1,8 @@
1
+ import { SkfNav } from './nav.component';
2
+ export * from './nav.component';
3
+ export default SkfNav;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'skf-nav': SkfNav;
7
+ }
8
+ }
@@ -0,0 +1,6 @@
1
+ import { SkfNav as f } from "./nav.component.js";
2
+ f.define("skf-nav");
3
+ export {
4
+ f as SkfNav,
5
+ f as default
6
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,17 @@
1
+ import { css as t } from "lit";
2
+ const e = t`
3
+ :host(:not([vertical])) {
4
+ width: fit-content;
5
+ }
6
+
7
+ ul {
8
+ display: flex;
9
+
10
+ :host([vertical]) & {
11
+ flex-direction: column;
12
+ }
13
+ }
14
+ `;
15
+ export {
16
+ e as styles
17
+ };
@@ -0,0 +1,20 @@
1
+ import '../link/link.js';
2
+ import type SkfLink from '../link/link.js';
3
+ import { SkfElement } from '../../internal/components/skf-element';
4
+ import { type CSSResultGroup } from 'lit';
5
+ /**
6
+ * The `<skf-nav>` is a component that displays a list of <nav-items>.
7
+ *
8
+ * @documentation See [zeroheight](https://zeroheight.com/****) for design principles
9
+ *
10
+ * @slot - The component's main content
11
+ *
12
+ * @tagname skf-nav-item
13
+ */
14
+ export declare class SkfNavItem extends SkfElement {
15
+ static styles: CSSResultGroup;
16
+ href: string;
17
+ icon?: SkfLink['icon'];
18
+ connectedCallback(): void;
19
+ render(): import("lit").TemplateResult<1>;
20
+ }
@@ -0,0 +1,38 @@
1
+ import "../link/link.js";
2
+ import { SkfElement as m } from "../../internal/components/skf-element.js";
3
+ import c from "../../styles/component.styles.js";
4
+ import { html as h } from "lit";
5
+ import { property as f } from "lit/decorators.js";
6
+ import { ifDefined as u } from "lit/directives/if-defined.js";
7
+ import { styles as a } from "./nav-item.styles.js";
8
+ var d = Object.defineProperty, p = (i, s, n, y) => {
9
+ for (var r = void 0, t = i.length - 1, l; t >= 0; t--)
10
+ (l = i[t]) && (r = l(s, n, r) || r);
11
+ return r && d(s, n, r), r;
12
+ };
13
+ const o = class o extends m {
14
+ constructor() {
15
+ super(...arguments), this.href = "#";
16
+ }
17
+ connectedCallback() {
18
+ super.connectedCallback(), this.role = "menuitem";
19
+ }
20
+ render() {
21
+ return h`
22
+ <skf-link color="inverse" href=${this.href} icon=${u(this.icon)}>
23
+ <slot></slot>
24
+ </skf-link>
25
+ `;
26
+ }
27
+ };
28
+ o.styles = [c, a];
29
+ let e = o;
30
+ p([
31
+ f({ reflect: !0 })
32
+ ], e.prototype, "href");
33
+ p([
34
+ f()
35
+ ], e.prototype, "icon");
36
+ export {
37
+ e as SkfNavItem
38
+ };
@@ -0,0 +1,8 @@
1
+ import { SkfNavItem } from './nav-item.component.js';
2
+ export * from './nav-item.component.js';
3
+ export default SkfNavItem;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'skf-nav-item': SkfNavItem;
7
+ }
8
+ }
@@ -0,0 +1,6 @@
1
+ import { SkfNavItem as e } from "./nav-item.component.js";
2
+ e.define("skf-nav-item");
3
+ export {
4
+ e as SkfNavItem,
5
+ e as default
6
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,39 @@
1
+ import { css as t } from "lit";
2
+ const s = t`
3
+ @layer components {
4
+ skf-link::part(root) {
5
+ block-size: var(--skf-header-height);
6
+ display: flex;
7
+ padding-inline: var(--skf-spacing-100);
8
+ position: relative;
9
+ }
10
+
11
+ skf-link::part(root)::after {
12
+ content: '';
13
+ position: absolute;
14
+ transition: translate calc(var(--skf-motion-duration-fast) * 1ms)
15
+ var(--skf-motion-easing-ease-in);
16
+ }
17
+
18
+ skf-link::part(root):hover::after {
19
+ --_skf-nav-link-translate: 0;
20
+ }
21
+
22
+ :host-context(skf-nav:not([vertical])) skf-link::part(root)::after {
23
+ border-bottom: var(--skf-size-4) solid var(--skf-border-color-inverse);
24
+ inset-block-end: 0;
25
+ inset-inline: 0;
26
+ translate: 0 var(--_skf-nav-link-translate, 100%);
27
+ }
28
+
29
+ :host-context(skf-nav[vertical]) skf-link::part(root)::after {
30
+ border-left: var(--skf-size-4) solid var(--skf-border-color-inverse);
31
+ inset-block: 0;
32
+ inset-inline-start: 0;
33
+ translate: var(--_skf-nav-link-translate, -100%) 0;
34
+ }
35
+ }
36
+ `;
37
+ export {
38
+ s as styles
39
+ };
@@ -1,16 +1,15 @@
1
1
  import { SkfPopoverBase } from '../../internal/base-classes/popover/popover.base.js';
2
2
  import type { CSSResultGroup } from 'lit';
3
3
  /**
4
- * The `<skf-popover>` is a general purpose component that displays the slot content.
4
+ * The `<skf-popover>` is a general purpose component that displays the slot content in a popover.
5
5
  *
6
6
  * @documentation See [zeroheight](https://zeroheight.com/****) for design principles
7
7
  *
8
- * @property {"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"} [placement='bottom-start'] - The placement of the menu
9
- * @property {boolean} [isOpen=false] - Whether the menu is open
10
- * @property {string} [anchor] - The id of the element the menu will be anchored to
8
+ * @attribute {"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"} [placement='bottom-start'] - The placement of the menu
9
+ * @attribute {string} [anchor] - The id of the element the menu will be anchored to
11
10
  *
12
- * @event open - Fired when the menu is opened
13
- * @event close - Fired when the menu is closed
11
+ * @event skf-opened - Fired when the menu is opened
12
+ * @event skf-closed - Fired when the menu is closed
14
13
  *
15
14
  * @slot - The popover content
16
15
  *
@@ -1,37 +1,37 @@
1
- import { SkfPopoverBase as n } from "../../internal/base-classes/popover/popover.base.js";
2
- import { watch as d } from "../../internal/helpers/watch.js";
3
- import { property as f } from "lit/decorators.js";
4
- import { styles as w } from "./popover.styles.js";
5
- var l = Object.defineProperty, v = Object.getOwnPropertyDescriptor, h = (m, e, o, s) => {
6
- for (var r = s > 1 ? void 0 : s ? v(e, o) : e, i = m.length - 1, p; i >= 0; i--)
7
- (p = m[i]) && (r = (s ? p(e, o, r) : p(r)) || r);
8
- return s && r && l(e, o, r), r;
1
+ import { SkfPopoverBase as h } from "../../internal/base-classes/popover/popover.base.js";
2
+ import { watch as f } from "../../internal/helpers/watch.js";
3
+ import { property as l } from "lit/decorators.js";
4
+ import { styles as m } from "./popover.styles.js";
5
+ var d = Object.defineProperty, w = Object.getOwnPropertyDescriptor, n = (v, e, o, s) => {
6
+ for (var t = s > 1 ? void 0 : s ? w(e, o) : e, i = v.length - 1, p; i >= 0; i--)
7
+ (p = v[i]) && (t = (s ? p(e, o, t) : p(t)) || t);
8
+ return s && t && d(e, o, t), t;
9
9
  };
10
- const a = class a extends n {
10
+ const a = class a extends h {
11
11
  constructor() {
12
- super(), this.offset = 8, this.hideArrow = !1, this.arrow = !this.hideArrow, this.placement = "bottom-start", n.classMap = { popover: !0 };
12
+ super(), this.offset = 8, this.hideArrow = !1, this.arrow = !this.hideArrow, this.placement = "bottom-start", this.triggerEvent = "click", h.classMap = { popover: !0 };
13
13
  }
14
14
  hideArrowChanged() {
15
15
  this.arrow = !this.hideArrow;
16
16
  }
17
17
  addEventListeners(e) {
18
- e.addEventListener("mouseenter", this.open);
18
+ e.addEventListener(this.triggerEvent, this.open, { signal: this.signal });
19
19
  }
20
20
  removeEventListeners(e) {
21
- e.removeEventListener("mouseenter", this.open);
21
+ e.removeEventListener(this.triggerEvent, this.open);
22
22
  }
23
23
  };
24
- a.styles = [n.styles, w];
25
- let t = a;
26
- h([
27
- f({ type: Number })
28
- ], t.prototype, "offset", 2);
29
- h([
30
- f({ type: Boolean })
31
- ], t.prototype, "hideArrow", 2);
32
- h([
33
- d("hideArrow")
34
- ], t.prototype, "hideArrowChanged", 1);
24
+ a.styles = [h.styles, m];
25
+ let r = a;
26
+ n([
27
+ l({ type: Number })
28
+ ], r.prototype, "offset", 2);
29
+ n([
30
+ l({ type: Boolean })
31
+ ], r.prototype, "hideArrow", 2);
32
+ n([
33
+ f("hideArrow")
34
+ ], r.prototype, "hideArrowChanged", 1);
35
35
  export {
36
- t as SkfPopover
36
+ r as SkfPopover
37
37
  };
@@ -1,9 +1,9 @@
1
- var f = (t) => {
1
+ var h = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var h = (t, e, r) => e.has(t) || f("Cannot " + r);
5
- var d = (t, e, r) => (h(t, e, "read from private field"), r ? r.call(t) : e.get(t)), c = (t, e, r) => e.has(t) ? f("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), y = (t, e, r, p) => (h(t, e, "write to private field"), p ? p.call(t, r) : e.set(t, r), r);
6
- import { SkfElement as v } from "../../internal/components/skf-element.js";
4
+ var f = (t, e, r) => e.has(t) || h("Cannot " + r);
5
+ var c = (t, e, r) => (f(t, e, "read from private field"), r ? r.call(t) : e.get(t)), d = (t, e, r) => e.has(t) ? h("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), v = (t, e, r, p) => (f(t, e, "write to private field"), p ? p.call(t, r) : e.set(t, r), r);
6
+ import { SkfElement as y } from "../../internal/components/skf-element.js";
7
7
  import x from "../../styles/component.styles.js";
8
8
  import { html as b } from "lit";
9
9
  import { property as l } from "lit/decorators.js";
@@ -14,11 +14,11 @@ var N = Object.defineProperty, n = (t, e, r, p) => {
14
14
  (u = t[m]) && (s = u(e, r, s) || s);
15
15
  return s && N(e, r, s), s;
16
16
  }, o;
17
- const i = class i extends v {
17
+ const i = class i extends y {
18
18
  constructor() {
19
19
  super();
20
- c(this, o);
21
- this.animated = !1, this.max = 1, this.value = 0, y(this, o, this.attachInternals()), d(this, o).role = "progressbar";
20
+ d(this, o);
21
+ this.animated = !1, this.max = 1, this.value = 0, v(this, o, this.attachInternals()), c(this, o).role = "progressbar";
22
22
  }
23
23
  render() {
24
24
  const r = this.value / this.max * 100;
@@ -7,8 +7,8 @@ import { type CSSResultGroup } from 'lit';
7
7
  *
8
8
  * @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/78d5dd-radio-button) for design principles
9
9
  *
10
- * @attribute {boolean} disabled - If true, sets disabled state
11
- * @attribute {boolean} required - If true, value is required or must be checked for the form to be submittable
10
+ * @attribute {boolean} [disabled=false] - If true, sets disabled state
11
+ * @attribute {boolean} [required=false] - If true, value is required or must be checked for the form to be submittable
12
12
  *
13
13
  * @event change {object} - When the value of the input changes
14
14
  *
@@ -18,13 +18,17 @@ import { type CSSResultGroup } from 'lit';
18
18
  */
19
19
  export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
20
20
  static styles: CSSResultGroup;
21
+ /**
22
+ * @internal
23
+ * Initial state saved here as default for form resets.
24
+ */
21
25
  private _initialChecked;
22
26
  /** If true, outputs helping hints in console */
23
- debug?: boolean;
27
+ debug: boolean;
24
28
  /** If true, outputs helping hints in console */
25
- checked?: boolean;
29
+ checked: boolean;
26
30
  /** If true, forces component to invalid state until removed */
27
- customInvalid?: boolean;
31
+ customInvalid: boolean;
28
32
  /** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
29
33
  label?: string;
30
34
  /** If defined, adds name to the input-element */
@@ -39,7 +43,7 @@ export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
39
43
  */
40
44
  severity?: FormFieldBaseProps['severity'];
41
45
  /** If true, displays valid state after interaction */
42
- showValid?: boolean;
46
+ showValid: boolean;
43
47
  /** The current value of the input field */
44
48
  value: string;
45
49
  /** @internal */
@@ -2,20 +2,20 @@ import "../icon/icon.js";
2
2
  import { FormBase as c } from "../../internal/components/formBase.js";
3
3
  import { watch as n } from "../../internal/helpers/watch.js";
4
4
  import { Asterisk as p } from "../../internal/templates/asterisk.js";
5
- import m from "../../styles/component.styles.js";
6
- import { html as v } from "lit";
5
+ import v from "../../styles/component.styles.js";
6
+ import { html as m } from "lit";
7
7
  import { property as r, state as f, query as y } from "lit/decorators.js";
8
8
  import { ifDefined as b } from "lit/directives/if-defined.js";
9
9
  import { live as _ } from "lit/directives/live.js";
10
- import g from "./radio.styles.js";
11
- var k = Object.defineProperty, C = Object.getOwnPropertyDescriptor, i = (u, e, s, o) => {
12
- for (var a = o > 1 ? void 0 : o ? C(e, s) : e, l = u.length - 1, h; l >= 0; l--)
13
- (h = u[l]) && (a = (o ? h(e, s, a) : h(a)) || a);
14
- return o && a && k(e, s, a), a;
10
+ import { styles as g } from "./radio.styles.js";
11
+ var k = Object.defineProperty, C = Object.getOwnPropertyDescriptor, i = (u, e, s, l) => {
12
+ for (var a = l > 1 ? void 0 : l ? C(e, s) : e, o = u.length - 1, h; o >= 0; o--)
13
+ (h = u[o]) && (a = (l ? h(e, s, a) : h(a)) || a);
14
+ return l && a && k(e, s, a), a;
15
15
  };
16
16
  const d = class d extends c {
17
17
  constructor() {
18
- super(...arguments), this._initialChecked = !1, this.size = "md", this.value = "", this._invalid = !1, this._resetValue = (e) => {
18
+ super(...arguments), this._initialChecked = !1, this.debug = !1, this.checked = !1, this.customInvalid = !1, this.size = "md", this.showValid = !1, this.value = "", this._invalid = !1, this._resetValue = (e) => {
19
19
  e.stopPropagation(), this.checked = this._initialChecked, this.$input && (this.$input.checked = !!this._initialChecked), this.setFormValue(this.checked ? this.value : "");
20
20
  };
21
21
  }
@@ -25,8 +25,8 @@ const d = class d extends c {
25
25
  firstUpdated() {
26
26
  var e;
27
27
  (e = this.$input) == null || e.addEventListener("change", (s) => {
28
- var o;
29
- s.stopPropagation(), this.pristine = !1, this.checked = (o = this.$input) == null ? void 0 : o.checked, this._validateInput(), this.checked ? this.setFormValue(this.value) : this.setFormValue(""), this.emitEvent("change");
28
+ var l;
29
+ s.stopPropagation(), this.pristine = !1, this.checked = ((l = this.$input) == null ? void 0 : l.checked) ?? !1, this._validateInput(), this.checked ? this.setFormValue(this.value) : this.setFormValue(""), this.emitEvent("change");
30
30
  }), this.addEventListener("invalid", (s) => {
31
31
  this.pristine = !1, this._invalid = !0, this.customErrorDisplay && s.preventDefault();
32
32
  }), this._initialChecked = this.checked, this.addEventListener("reset", this._resetValue);
@@ -55,8 +55,8 @@ const d = class d extends c {
55
55
  const e = this.name;
56
56
  if (!e) return;
57
57
  (this.form ?? document).querySelectorAll(`skf-radio[name="${e}"]`).forEach((a) => {
58
- const l = this.form === a.form, h = !this.form && !a.form;
59
- a !== this && (l || h) && (a.checked = !1);
58
+ const o = this.form === a.form, h = !this.form && !a.form;
59
+ a !== this && (o || h) && (a.checked = !1);
60
60
  });
61
61
  }
62
62
  /** @internal */
@@ -76,7 +76,7 @@ const d = class d extends c {
76
76
  this.setValidity({});
77
77
  }
78
78
  render() {
79
- return v`
79
+ return m`
80
80
  <label id="root">
81
81
  <input
82
82
  ?disabled=${this.disabled}
@@ -95,7 +95,7 @@ const d = class d extends c {
95
95
  `;
96
96
  }
97
97
  };
98
- d.styles = [m, g];
98
+ d.styles = [v, g];
99
99
  let t = d;
100
100
  i([
101
101
  r({ type: Boolean })
@@ -1,2 +1 @@
1
- declare const _default: import("lit").CSSResult[];
2
- export default _default;
1
+ export declare const styles: import("lit").CSSResult[];
@@ -99,5 +99,5 @@ const e = [
99
99
  `
100
100
  ];
101
101
  export {
102
- e as default
102
+ e as styles
103
103
  };
@@ -0,0 +1,32 @@
1
+ import { SkfElement } from '../../internal/components/skf-element';
2
+ import { type CSSResultGroup } from 'lit';
3
+ /**
4
+ * The `<skf-segmented-button>` component consists of multiple `<skf-segmented-button-item>`, working together.
5
+ *
6
+ * See [zeroheight](https://zeroheight.com/853e936c9/p/68ff54-segmented-buttons) for design principles
7
+ *
8
+ * @slot - One or more `<skf-segmented-button-item>`
9
+ *
10
+ * @tagname skf-segmented-button
11
+ */
12
+ export declare class SkfSegmentedButton extends SkfElement {
13
+ static styles: CSSResultGroup;
14
+ /** Sets the default selected control */
15
+ defaultSelected: number;
16
+ /** If true, allowes multiple items to be selected */
17
+ multiple: boolean;
18
+ /** @internal */
19
+ value: string;
20
+ /** @internal */
21
+ private items;
22
+ firstUpdated(): void;
23
+ /** @internal */
24
+ private _handleSegmentedButtonItemSelected;
25
+ /** @internal */
26
+ private _handleSlotChange;
27
+ /** @internal */
28
+ private _handleKeyDown;
29
+ /** @internal */
30
+ private _getKeyDownNextItem;
31
+ render(): import("lit").TemplateResult<1>;
32
+ }
@@ -0,0 +1,8 @@
1
+ import { SkfSegmentedButton } from './segmented-button.component';
2
+ export * from './segmented-button.component';
3
+ export default SkfSegmentedButton;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'skf-segmented-button': SkfSegmentedButton;
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,36 @@
1
+ import '../icon/icon.js';
2
+ import { SkfElement } from '../../internal/components/skf-element';
3
+ import { type CSSResultGroup } from 'lit';
4
+ export interface SkfSegmentedButtonItemEvent {
5
+ item: SkfSegmentedButtonItem;
6
+ }
7
+ /**
8
+ * The `<skf-segmented-button-item>` is used in conjunction with the `<skf-segmented-button>` component
9
+ *
10
+ * @event {CustomEvent} my-tag-my-event - Fired when something happens
11
+ *
12
+ * @slot - The items label
13
+ *
14
+ * @tagname skf-segmented-button-item
15
+ */
16
+ export declare class SkfSegmentedButtonItem extends SkfElement {
17
+ static styles: CSSResultGroup;
18
+ static shadowRootOptions: {
19
+ delegatesFocus: boolean;
20
+ mode: ShadowRootMode;
21
+ serializable?: boolean;
22
+ slotAssignment?: SlotAssignmentMode;
23
+ };
24
+ /** If true, items is marked as disabled */
25
+ disabled: boolean;
26
+ /** Sets the item value */
27
+ value: string;
28
+ constructor();
29
+ /** @internal */
30
+ isMultiple: boolean;
31
+ /** @internal */
32
+ isSelected: boolean;
33
+ /** @internal */
34
+ private _handleClick;
35
+ render(): import("lit").TemplateResult<1>;
36
+ }
@@ -0,0 +1,8 @@
1
+ import { SkfSegmentedButtonItem } from './segmented-button-item.component';
2
+ export * from './segmented-button-item.component';
3
+ export default SkfSegmentedButtonItem;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'skf-segmented-button-item': SkfSegmentedButtonItem;
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -7,7 +7,7 @@ import { raiseError as w } from "../../internal/helpers/raiseError.js";
7
7
  import { watch as $ } from "../../internal/helpers/watch.js";
8
8
  import { Asterisk as V } from "../../internal/templates/asterisk.js";
9
9
  import S from "../../styles/component.styles.js";
10
- import { html as n, nothing as C } from "lit";
10
+ import { nothing as C, html as n } from "lit";
11
11
  import { property as o, state as h, query as p } from "lit/decorators.js";
12
12
  import { classMap as E } from "lit/directives/class-map.js";
13
13
  import { ifDefined as m } from "lit/directives/if-defined.js";
@@ -237,7 +237,7 @@ const c = class c extends b {
237
237
  id="hint"
238
238
  severity=${m(x(this.severity, this._invalid))}
239
239
  >
240
- ${this.customInvalid ? this.customInvalid : this.hint}
240
+ ${this.customInvalid ?? this.hint}
241
241
  </skf-hint>
242
242
  `}
243
243
  </div>