@skf-design-system/ui-components 1.0.2-beta.6 → 1.0.2-beta.7

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 (88) hide show
  1. package/README.md +18 -0
  2. package/dist/components/alert/alert.component.d.ts +3 -2
  3. package/dist/components/alert/alert.component.js +39 -33
  4. package/dist/components/button/button.styles.js +3 -3
  5. package/dist/components/checkbox/checkbox.component.d.ts +4 -2
  6. package/dist/components/checkbox/checkbox.component.js +73 -65
  7. package/dist/components/checkbox/checkbox.styles.js +1 -1
  8. package/dist/components/datepicker/datepicker-calendar.component.d.ts +4 -0
  9. package/dist/components/datepicker/datepicker-calendar.component.js +134 -127
  10. package/dist/components/datepicker/datepicker-popup.component.d.ts +4 -0
  11. package/dist/components/datepicker/datepicker-popup.component.js +100 -88
  12. package/dist/components/datepicker/datepicker.component.d.ts +4 -2
  13. package/dist/components/datepicker/datepicker.component.js +150 -140
  14. package/dist/components/dialog/dialog.component.d.ts +3 -2
  15. package/dist/components/dialog/dialog.component.js +39 -37
  16. package/dist/components/divider/divider.component.js +13 -13
  17. package/dist/components/divider/divider.styles.js +2 -2
  18. package/dist/components/drawer/drawer.component.d.ts +3 -2
  19. package/dist/components/drawer/drawer.component.js +37 -35
  20. package/dist/components/drawer/drawer.styles.js +1 -1
  21. package/dist/components/header/header.component.d.ts +4 -2
  22. package/dist/components/header/header.component.js +66 -57
  23. package/dist/components/header/header.styles.js +2 -2
  24. package/dist/components/icon/icon.component.js +7 -7
  25. package/dist/components/icon/icon.styles.js +2 -2
  26. package/dist/components/input/input.component.d.ts +4 -8
  27. package/dist/components/input/input.component.js +146 -147
  28. package/dist/components/input/input.controllers.d.ts +0 -1
  29. package/dist/components/input/input.controllers.js +12 -12
  30. package/dist/components/link/link.component.js +19 -12
  31. package/dist/components/link/link.styles.js +11 -3
  32. package/dist/components/loader/loader.component.d.ts +0 -2
  33. package/dist/components/loader/loader.component.js +27 -30
  34. package/dist/components/loader/loader.styles.js +1 -1
  35. package/dist/components/menu/menu-item.styles.js +8 -7
  36. package/dist/components/menu/menu.component.d.ts +4 -1
  37. package/dist/components/nav/nav.component.d.ts +3 -0
  38. package/dist/components/nav/nav.component.js +38 -33
  39. package/dist/components/popover/popover.component.d.ts +6 -3
  40. package/dist/components/progress/progress.styles.js +3 -3
  41. package/dist/components/radio/radio.component.d.ts +4 -2
  42. package/dist/components/radio/radio.component.js +91 -83
  43. package/dist/components/radio/radio.styles.js +1 -1
  44. package/dist/components/segmented-button/segmented-button-item.component.js +1 -1
  45. package/dist/components/segmented-button/segmented-button-item.styles.js +1 -1
  46. package/dist/components/select/select-option.component.d.ts +2 -2
  47. package/dist/components/select/select-option.component.js +16 -19
  48. package/dist/components/select/select.component.d.ts +13 -9
  49. package/dist/components/select/select.component.js +169 -144
  50. package/dist/components/stepper/stepper-item.styles.js +4 -4
  51. package/dist/components/switch/switch.component.d.ts +4 -2
  52. package/dist/components/switch/switch.component.js +64 -56
  53. package/dist/components/switch/switch.styles.js +1 -1
  54. package/dist/components/tabs/tab.styles.js +2 -2
  55. package/dist/components/tag/tag.component.d.ts +3 -0
  56. package/dist/components/tag/tag.component.js +50 -41
  57. package/dist/components/textarea/textarea.component.d.ts +4 -2
  58. package/dist/components/textarea/textarea.component.js +126 -118
  59. package/dist/components/tooltip/tooltip.component.d.ts +8 -2
  60. package/dist/components/tooltip/tooltip.component.js +3 -0
  61. package/dist/custom-elements.json +569 -309
  62. package/dist/internal/base-classes/popover/popover.base.d.ts +21 -2
  63. package/dist/internal/base-classes/popover/popover.base.js +10 -12
  64. package/dist/internal/controllers/popover.controller.d.ts +2 -0
  65. package/dist/internal/helpers/uuid.d.ts +8 -10
  66. package/dist/internal/helpers/uuid.js +4 -11
  67. package/dist/internal/helpers/watch.d.ts +1 -1
  68. package/dist/internal/templates/asterisk.d.ts +1 -1
  69. package/dist/internal/templates/asterisk.js +4 -4
  70. package/dist/styles/global-alt.css +1 -1
  71. package/dist/styles/global.css +1 -1
  72. package/dist/translations/en.d.ts +3 -0
  73. package/dist/translations/en.js +27 -0
  74. package/dist/translations/es.d.ts +3 -0
  75. package/dist/translations/es.js +27 -0
  76. package/dist/translations/index.d.ts +4 -0
  77. package/dist/translations/pt.d.ts +3 -0
  78. package/dist/translations/pt.js +27 -0
  79. package/dist/translations/sv.d.ts +3 -0
  80. package/dist/translations/sv.js +27 -0
  81. package/dist/types/jsx/custom-element-jsx.d.ts +59 -47
  82. package/dist/types/vue/index.d.ts +59 -47
  83. package/dist/utilities/localize.d.ts +28 -0
  84. package/dist/utilities/localize.js +13 -0
  85. package/dist/vscode.html-custom-data.json +75 -80
  86. package/dist/web-types.json +201 -166
  87. package/package.json +26 -33
  88. package/custom-elements.json +0 -25490
@@ -1,37 +1,37 @@
1
- var y = (t) => {
1
+ var f = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var b = (t, e, r) => e.has(t) || y("Cannot " + r);
5
- var m = (t, e, r) => (b(t, e, "read from private field"), r ? r.call(t) : e.get(t)), v = (t, e, r) => e.has(t) ? y("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), h = (t, e, r, i) => (b(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r);
6
- import { SkfElement as _ } from "../../internal/components/skf-element.js";
4
+ var y = (t, e, r) => e.has(t) || f("Cannot " + r);
5
+ var c = (t, e, r) => (y(t, e, "read from private field"), r ? r.call(t) : e.get(t)), m = (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), v = (t, e, r, i) => (y(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r);
6
+ import { SkfElement as b } from "../../internal/components/skf-element.js";
7
7
  import { stateMap as g } from "../../internal/helpers/stateMap.js";
8
8
  import { watch as C } from "../../internal/helpers/watch.js";
9
9
  import { componentStyles as O } from "../../styles/component.styles.js";
10
10
  import { html as P } from "lit";
11
- import { property as d } from "lit/decorators.js";
12
- import { styles as S } from "./loader.styles.js";
13
- var j = Object.defineProperty, w = Object.getOwnPropertyDescriptor, l = (t, e, r, i) => {
14
- for (var s = i > 1 ? void 0 : i ? w(e, r) : e, n = t.length - 1, c; n >= 0; n--)
15
- (c = t[n]) && (s = (i ? c(e, r, s) : c(s)) || s);
16
- return i && s && j(e, r, s), s;
11
+ import { property as _ } from "lit/decorators.js";
12
+ import { styles as j } from "./loader.styles.js";
13
+ var w = Object.defineProperty, z = Object.getOwnPropertyDescriptor, h = (t, e, r, i) => {
14
+ for (var s = i > 1 ? void 0 : i ? z(e, r) : e, n = t.length - 1, l; n >= 0; n--)
15
+ (l = t[n]) && (s = (i ? l(e, r, s) : l(s)) || s);
16
+ return i && s && w(e, r, s), s;
17
17
  };
18
18
  const u = {
19
19
  invert: "invert",
20
20
  size: ["md", "sm"]
21
21
  };
22
- var o, p;
23
- const f = class f extends _ {
22
+ var a, p;
23
+ const d = class d extends b {
24
24
  constructor() {
25
25
  super(...arguments);
26
- v(this, o);
27
- v(this, p);
28
- h(this, o, this.attachInternals()), h(this, p, m(this, o).states), this.ariaLabel = "Loading...", this.invert = !1, this.size = "md";
26
+ m(this, a);
27
+ m(this, p);
28
+ v(this, a, this.attachInternals()), v(this, p, c(this, a).states), this.invert = !1, this.size = "md";
29
29
  }
30
30
  connectedCallback() {
31
31
  super.connectedCallback(), this.role = "progressbar", this.ariaLive = "polite";
32
32
  }
33
33
  _handleStateChange(r, i, s) {
34
- g(m(this, p), u[r]).set(s);
34
+ g(c(this, p), u[r]).set(s);
35
35
  }
36
36
  render() {
37
37
  return P`
@@ -43,20 +43,17 @@ const f = class f extends _ {
43
43
  `;
44
44
  }
45
45
  };
46
- o = new WeakMap(), p = new WeakMap(), f.styles = [O, S];
47
- let a = f;
48
- l([
49
- d({ type: String, attribute: "aria-label" })
50
- ], a.prototype, "ariaLabel", 2);
51
- l([
52
- d({ type: Boolean })
53
- ], a.prototype, "invert", 2);
54
- l([
55
- d({ type: String })
56
- ], a.prototype, "size", 2);
57
- l([
46
+ a = new WeakMap(), p = new WeakMap(), d.styles = [O, j];
47
+ let o = d;
48
+ h([
49
+ _({ type: Boolean })
50
+ ], o.prototype, "invert", 2);
51
+ h([
52
+ _({ type: String })
53
+ ], o.prototype, "size", 2);
54
+ h([
58
55
  C(Object.keys(u))
59
- ], a.prototype, "_handleStateChange", 1);
56
+ ], o.prototype, "_handleStateChange", 1);
60
57
  export {
61
- a as SkfLoader
58
+ o as SkfLoader
62
59
  };
@@ -7,7 +7,7 @@ const o = a`
7
7
  }
8
8
 
9
9
  #root {
10
- --_skf-loader-color: var(--skf-bg-color-emphasised);
10
+ --_skf-loader-color: var(--skf-bg-color-emphasized);
11
11
  --_skf-loader-gap: var(--skf-spacing-50);
12
12
  --_skf-loader-size: var(--skf-size-12);
13
13
 
@@ -1,5 +1,5 @@
1
1
  import { css as o } from "lit";
2
- const e = o`
2
+ const r = o`
3
3
  @layer components {
4
4
  :host {
5
5
  display: block;
@@ -7,16 +7,17 @@ const e = o`
7
7
 
8
8
  #root {
9
9
  block-size: var(--skf-size-44);
10
+ display: flex;
10
11
  padding-inline: var(--skf-spacing-75);
12
+ }
13
+ }
11
14
 
12
- @media screen and (any-hover: hover) {
13
- &:hover {
14
- background-color: var(--skf-color-blue-lighest);
15
- }
16
- }
15
+ @layer states {
16
+ :host(:not([aria-disabled]):hover) #root {
17
+ background-color: var(--skf-color-blue-lightest);
17
18
  }
18
19
  }
19
20
  `;
20
21
  export {
21
- e as styles
22
+ r as styles
22
23
  };
@@ -11,10 +11,13 @@ import type { CSSResultGroup } from 'lit';
11
11
  * @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
12
12
  * @attribute {string} anchor - The id of the element the menu will be anchored to
13
13
  *
14
+ * @property {(void) => void} open() - Method that opens the menu
15
+ * @property {(void) => void} close() - Method that closes the menu
16
+ *
14
17
  * @event {CustomEvent} skf-opened - Fired when the menu is opened
15
18
  * @event {CustomEvent} skf-closed - Fired when the menu is closed
16
19
  *
17
- * @slot - The menu popover content
20
+ * @slot - The menu content
18
21
  *
19
22
  * @tagname skf-menu
20
23
  */
@@ -1,4 +1,5 @@
1
1
  import { SkfElement } from '../../internal/components/skf-element';
2
+ import { type Language } from '../../utilities/localize.js';
2
3
  import { type CSSResultGroup } from 'lit';
3
4
  /**
4
5
  * The `<skf-nav>` is a component that displays a list of <nav-items>.
@@ -12,6 +13,8 @@ import { type CSSResultGroup } from 'lit';
12
13
  export declare class SkfNav extends SkfElement {
13
14
  #private;
14
15
  static styles: CSSResultGroup;
16
+ /** Sets the internal language of the component */
17
+ lang: Language;
15
18
  /** If true, the navigation will be displayed vertically */
16
19
  vertical: boolean;
17
20
  /** @internal */
@@ -1,55 +1,60 @@
1
1
  var u = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var y = (t, e, r) => e.has(t) || u("Cannot " + r);
5
- var c = (t, e, r) => (y(t, e, "read from private field"), r ? r.call(t) : e.get(t)), m = (t, e, r) => e.has(t) ? u("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), h = (t, e, r, i) => (y(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r);
6
- import { SkfElement as _ } from "../../internal/components/skf-element.js";
7
- import { stateMap as d } from "../../internal/helpers/stateMap.js";
4
+ var g = (t, e, r) => e.has(t) || u("Cannot " + r);
5
+ var p = (t, e, r) => (g(t, e, "read from private field"), r ? r.call(t) : e.get(t)), c = (t, e, r) => e.has(t) ? u("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), m = (t, e, r, i) => (g(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r);
6
+ import { SkfElement as d } from "../../internal/components/skf-element.js";
7
+ import { stateMap as C } from "../../internal/helpers/stateMap.js";
8
8
  import { watch as b } from "../../internal/helpers/watch.js";
9
- import { componentStyles as g } from "../../styles/component.styles.js";
10
- import { html as C } from "lit";
11
- import { property as O, queryAssignedElements as P } from "lit/decorators.js";
12
- import { ifDefined as w } from "lit/directives/if-defined.js";
13
- import { styles as D } from "./nav.styles.js";
14
- var E = Object.defineProperty, j = Object.getOwnPropertyDescriptor, f = (t, e, r, i) => {
15
- for (var s = i > 1 ? void 0 : i ? j(e, r) : e, n = t.length - 1, p; n >= 0; n--)
16
- (p = t[n]) && (s = (i ? p(e, r, s) : p(s)) || s);
17
- return i && s && E(e, r, s), s;
18
- }, o, l;
19
- const v = class v extends _ {
9
+ import { componentStyles as w } from "../../styles/component.styles.js";
10
+ import { LocalizeController as O } from "../../utilities/localize.js";
11
+ import { html as P } from "lit";
12
+ import { property as _, queryAssignedElements as D } from "lit/decorators.js";
13
+ import { ifDefined as E } from "lit/directives/if-defined.js";
14
+ import { styles as S } from "./nav.styles.js";
15
+ var j = Object.defineProperty, x = Object.getOwnPropertyDescriptor, h = (t, e, r, i) => {
16
+ for (var o = i > 1 ? void 0 : i ? x(e, r) : e, f = t.length - 1, v; f >= 0; f--)
17
+ (v = t[f]) && (o = (i ? v(e, r, o) : v(o)) || o);
18
+ return i && o && j(e, r, o), o;
19
+ }, a, l, n;
20
+ const y = class y extends d {
20
21
  constructor() {
21
22
  super(...arguments);
22
- m(this, o);
23
- m(this, l);
24
- h(this, o, this.attachInternals()), h(this, l, c(this, o).states), this.vertical = !1;
23
+ c(this, a);
24
+ c(this, l);
25
+ c(this, n);
26
+ m(this, a, new O(this)), m(this, l, this.attachInternals()), m(this, n, p(this, l).states), this.lang = "en", this.vertical = !1;
25
27
  }
26
28
  connectedCallback() {
27
- super.connectedCallback(), this.ariaLabel = this.ariaLabel ?? "Main navigation", this.role = "navigation";
29
+ super.connectedCallback(), this.ariaLabel = p(this, a).term("mainNavigation"), this.role = "navigation";
28
30
  }
29
31
  _handleStateChange() {
30
- d(c(this, l), "vertical").set(this.vertical), this._items.forEach((r) => {
32
+ C(p(this, n), "vertical").set(this.vertical), this._items.forEach((r) => {
31
33
  r.vertical = this.vertical;
32
34
  });
33
35
  }
34
36
  render() {
35
- return C`
36
- <ul aria-orientation=${w(this.vertical ? "vertical" : void 0)}>
37
+ return P`
38
+ <ul aria-orientation=${E(this.vertical ? "vertical" : void 0)}>
37
39
  <slot></slot>
38
40
  </ul>
39
41
  `;
40
42
  }
41
43
  };
42
- o = new WeakMap(), l = new WeakMap(), v.styles = [g, D];
43
- let a = v;
44
- f([
45
- O({ type: Boolean })
46
- ], a.prototype, "vertical", 2);
47
- f([
48
- P({ selector: "skf-nav-item" })
49
- ], a.prototype, "_items", 2);
50
- f([
44
+ a = new WeakMap(), l = new WeakMap(), n = new WeakMap(), y.styles = [w, S];
45
+ let s = y;
46
+ h([
47
+ _({ type: String })
48
+ ], s.prototype, "lang", 2);
49
+ h([
50
+ _({ type: Boolean })
51
+ ], s.prototype, "vertical", 2);
52
+ h([
53
+ D({ selector: "skf-nav-item" })
54
+ ], s.prototype, "_items", 2);
55
+ h([
51
56
  b("vertical")
52
- ], a.prototype, "_handleStateChange", 1);
57
+ ], s.prototype, "_handleStateChange", 1);
53
58
  export {
54
- a as SkfNav
59
+ s as SkfNav
55
60
  };
@@ -9,10 +9,13 @@ import type { CSSResultGroup } from 'lit';
9
9
  * See [zeroheight](https://zeroheight.com/853e936c9/p/983e5d-popover) for design principles
10
10
  *
11
11
  * @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 popover
12
- * @attribute {string} anchor - The id of the element the menu will be anchored to
12
+ * @attribute {string} anchor - The id of the element the popover will be anchored to
13
13
  *
14
- * @event {CustomEvent} skf-opened - Fired when the menu is opened
15
- * @event {CustomEvent} skf-closed - Fired when the menu is closed
14
+ * @property {(void) => void} open() - Method that opens the popover
15
+ * @property {(void) => void} close() - Method that closes the popover
16
+ *
17
+ * @event {CustomEvent} skf-opened - Fired when the popover is opened
18
+ * @event {CustomEvent} skf-closed - Fired when the popover is closed
16
19
  *
17
20
  * @slot - The popover content
18
21
  *
@@ -1,5 +1,5 @@
1
1
  import { css as r } from "lit";
2
- const s = r`
2
+ const a = r`
3
3
  @layer components {
4
4
  @layer base {
5
5
  #root {
@@ -11,7 +11,7 @@ const s = r`
11
11
  overflow: hidden;
12
12
 
13
13
  &::after {
14
- background-color: var(--skf-bg-color-emphasised);
14
+ background-color: var(--skf-bg-color-emphasized);
15
15
  block-size: inherit;
16
16
  border-radius: inherit;
17
17
  content: '';
@@ -51,5 +51,5 @@ const s = r`
51
51
  }
52
52
  `;
53
53
  export {
54
- s as styles
54
+ a as styles
55
55
  };
@@ -2,6 +2,7 @@ import '../icon/icon.js';
2
2
  import { FormBase } from '../../internal/components/formBase.js';
3
3
  import type { FormFieldSeverity } from '../../internal/types.js';
4
4
  import type { FormFieldBaseProps } from '../../internal/types/formField.js';
5
+ import { type Language } from '../../utilities/localize.js';
5
6
  import { type CSSResultGroup } from 'lit';
6
7
  /**
7
8
  * The `<skf-radio>` component is used to create a radio input
@@ -18,6 +19,7 @@ import { type CSSResultGroup } from 'lit';
18
19
  * @tagname skf-radio
19
20
  */
20
21
  export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
22
+ #private;
21
23
  static styles: CSSResultGroup;
22
24
  /**
23
25
  * @internal
@@ -32,10 +34,10 @@ export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
32
34
  customInvalid: boolean;
33
35
  /** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
34
36
  label?: string;
37
+ /** Sets the internal language of the component */
38
+ lang: Language;
35
39
  /** If defined, adds name to the input-element */
36
40
  name?: string;
37
- /** If defined, renders an alternative A11y text for the asterisk */
38
- requiredLabel?: string;
39
41
  /** Size of the Radio */
40
42
  size: 'sm' | 'md';
41
43
  /** If defined, displays provided severity state */
@@ -1,32 +1,40 @@
1
- import "../icon/icon.js";
2
- import { FormBase as c } from "../../internal/components/formBase.js";
3
- import { watch as n } from "../../internal/helpers/watch.js";
4
- import { Asterisk as p } from "../../internal/templates/asterisk.js";
5
- import { componentStyles as v } from "../../styles/component.styles.js";
6
- import { html as m } from "lit";
7
- import { property as r, state as f, query as y } from "lit/decorators.js";
8
- import { ifDefined as b } from "lit/directives/if-defined.js";
9
- import { live as _ } from "lit/directives/live.js";
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;
1
+ var p = (e) => {
2
+ throw TypeError(e);
15
3
  };
16
- const d = class d extends c {
4
+ var m = (e, i, t) => i.has(e) || p("Cannot " + t);
5
+ var v = (e, i, t) => (m(e, i, "read from private field"), t ? t.call(e) : i.get(e)), f = (e, i, t) => i.has(e) ? p("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, t), y = (e, i, t, s) => (m(e, i, "write to private field"), s ? s.call(e, t) : i.set(e, t), t);
6
+ import "../icon/icon.js";
7
+ import { FormBase as _ } from "../../internal/components/formBase.js";
8
+ import { watch as c } from "../../internal/helpers/watch.js";
9
+ import { Asterisk as b } from "../../internal/templates/asterisk.js";
10
+ import { componentStyles as k } from "../../styles/component.styles.js";
11
+ import { LocalizeController as C } from "../../utilities/localize.js";
12
+ import { nothing as V, html as $ } from "lit";
13
+ import { property as l, state as I, query as E } from "lit/decorators.js";
14
+ import { ifDefined as w } from "lit/directives/if-defined.js";
15
+ import { live as A } from "lit/directives/live.js";
16
+ import { styles as q } from "./radio.styles.js";
17
+ var F = Object.defineProperty, D = Object.getOwnPropertyDescriptor, r = (e, i, t, s) => {
18
+ for (var o = s > 1 ? void 0 : s ? D(i, t) : i, h = e.length - 1, n; h >= 0; h--)
19
+ (n = e[h]) && (o = (s ? n(i, t, o) : n(o)) || o);
20
+ return s && o && F(i, t, o), o;
21
+ }, d;
22
+ const u = class u extends _ {
17
23
  constructor() {
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
- e.stopPropagation(), this.checked = this._initialChecked, this.$input && (this.$input.checked = !!this._initialChecked), this.setFormValue(this.checked ? this.value : "");
24
+ super(...arguments);
25
+ f(this, d);
26
+ y(this, d, new C(this)), this._initialChecked = !1, this.debug = !1, this.checked = !1, this.customInvalid = !1, this.lang = "en", this.size = "md", this.showValid = !1, this.value = "", this._invalid = !1, this._resetValue = (t) => {
27
+ t.stopPropagation(), this.checked = this._initialChecked, this.$input && (this.$input.checked = !!this._initialChecked), this.setFormValue(this.checked ? this.value : "");
20
28
  };
21
29
  }
22
30
  connectedCallback() {
23
31
  super.connectedCallback(), this._validateInput();
24
32
  }
25
33
  firstUpdated() {
26
- var e;
27
- (e = this.$input) == null || e.addEventListener("change", (s) => {
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");
34
+ var t;
35
+ (t = this.$input) == null || t.addEventListener("change", (s) => {
36
+ var o;
37
+ s.stopPropagation(), this.pristine = !1, this.checked = ((o = this.$input) == null ? void 0 : o.checked) ?? !1, this._validateInput(), this.checked ? this.setFormValue(this.value) : this.setFormValue(""), this.emitEvent("change");
30
38
  }), this.addEventListener("invalid", (s) => {
31
39
  this.pristine = !1, this._invalid = !0, this.customErrorDisplay && s.preventDefault();
32
40
  }), this._initialChecked = this.checked, this.addEventListener("reset", this._resetValue);
@@ -52,16 +60,16 @@ const d = class d extends c {
52
60
  }
53
61
  /** @internal */
54
62
  _uncheckSiblingRadios() {
55
- const e = this.name;
56
- if (!e) return;
57
- (this.form ?? document).querySelectorAll(`skf-radio[name="${e}"]`).forEach((a) => {
58
- const o = this.form === a.form, h = !this.form && !a.form;
59
- a !== this && (o || h) && (a.checked = !1);
63
+ const t = this.name;
64
+ if (!t) return;
65
+ (this.form ?? document).querySelectorAll(`skf-radio[name="${t}"]`).forEach((h) => {
66
+ const n = this.form === h.form, g = !this.form && !h.form;
67
+ h !== this && (n || g) && (h.checked = !1);
60
68
  });
61
69
  }
62
70
  /** @internal */
63
71
  _validateInput() {
64
- var e;
72
+ var t;
65
73
  if (this._invalid = !1, this.customInvalid) {
66
74
  const s = this.getAttribute("data-customerror");
67
75
  this.setValidity({ customError: !0 }, this.withFallback(s)), this._invalid = !0;
@@ -69,82 +77,82 @@ const d = class d extends c {
69
77
  this.pristine || (this._invalid = !0);
70
78
  const s = this.hasAttribute("data-valuemissing") ? this.getAttribute("data-valuemissing") : (
71
79
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
72
- ((e = this.$input) == null ? void 0 : e.validationMessage) || "Please check this radio if you want to proceed"
80
+ ((t = this.$input) == null ? void 0 : t.validationMessage) || "Please check this radio if you want to proceed"
73
81
  );
74
82
  this.setValidity({ valueMissing: !0 }, this.withFallback(s));
75
83
  } else
76
84
  this.setValidity({});
77
85
  }
78
86
  render() {
79
- return m`
87
+ return $`
80
88
  <label id="root">
81
89
  <input
82
90
  ?disabled=${this.disabled}
83
91
  ?required=${this.required}
84
- .checked=${_(this.checked)}
92
+ .checked=${A(this.checked)}
85
93
  aria-invalid=${!!this._invalid}
86
- name=${b(this.name)}
94
+ name=${w(this.name)}
87
95
  type="radio"
88
96
  value=${this.value}
89
97
  />
90
98
  <div id="label">
91
99
  <slot>${this.label}</slot>
92
- ${this.required ? p(this.requiredLabel) : null}
100
+ ${this.required ? b(v(this, d).term("required")) : V}
93
101
  </div>
94
102
  </label>
95
103
  `;
96
104
  }
97
105
  };
98
- d.styles = [v, g];
99
- let t = d;
100
- i([
101
- r({ type: Boolean })
102
- ], t.prototype, "debug", 2);
103
- i([
104
- r({ type: Boolean, reflect: !0 })
105
- ], t.prototype, "checked", 2);
106
- i([
107
- r({ type: Boolean, attribute: "custom-invalid" })
108
- ], t.prototype, "customInvalid", 2);
109
- i([
110
- r()
111
- ], t.prototype, "label", 2);
112
- i([
113
- r()
114
- ], t.prototype, "name", 2);
115
- i([
116
- r({ attribute: "required-label" })
117
- ], t.prototype, "requiredLabel", 2);
118
- i([
119
- r({ reflect: !0 })
120
- ], t.prototype, "size", 2);
121
- i([
122
- r()
123
- ], t.prototype, "severity", 2);
124
- i([
125
- r({ type: Boolean, attribute: "show-valid" })
126
- ], t.prototype, "showValid", 2);
127
- i([
128
- r()
129
- ], t.prototype, "value", 2);
130
- i([
131
- f()
132
- ], t.prototype, "_invalid", 2);
133
- i([
134
- y("input")
135
- ], t.prototype, "$input", 2);
136
- i([
137
- n("_invalid")
138
- ], t.prototype, "handleInvalidChange", 1);
139
- i([
140
- n("_invalid", { afterUpdate: !0 })
141
- ], t.prototype, "handleDebugInvalid", 1);
142
- i([
143
- n("checked")
144
- ], t.prototype, "handleCheckedChanged", 1);
145
- i([
146
- n("customInvalid")
147
- ], t.prototype, "handleCustomInvalidChange", 1);
106
+ d = new WeakMap(), u.styles = [k, q];
107
+ let a = u;
108
+ r([
109
+ l({ type: Boolean })
110
+ ], a.prototype, "debug", 2);
111
+ r([
112
+ l({ type: Boolean, reflect: !0 })
113
+ ], a.prototype, "checked", 2);
114
+ r([
115
+ l({ type: Boolean, attribute: "custom-invalid" })
116
+ ], a.prototype, "customInvalid", 2);
117
+ r([
118
+ l()
119
+ ], a.prototype, "label", 2);
120
+ r([
121
+ l({ type: String })
122
+ ], a.prototype, "lang", 2);
123
+ r([
124
+ l()
125
+ ], a.prototype, "name", 2);
126
+ r([
127
+ l({ reflect: !0 })
128
+ ], a.prototype, "size", 2);
129
+ r([
130
+ l()
131
+ ], a.prototype, "severity", 2);
132
+ r([
133
+ l({ type: Boolean, attribute: "show-valid" })
134
+ ], a.prototype, "showValid", 2);
135
+ r([
136
+ l()
137
+ ], a.prototype, "value", 2);
138
+ r([
139
+ I()
140
+ ], a.prototype, "_invalid", 2);
141
+ r([
142
+ E("input")
143
+ ], a.prototype, "$input", 2);
144
+ r([
145
+ c("_invalid")
146
+ ], a.prototype, "handleInvalidChange", 1);
147
+ r([
148
+ c("_invalid", { afterUpdate: !0 })
149
+ ], a.prototype, "handleDebugInvalid", 1);
150
+ r([
151
+ c("checked")
152
+ ], a.prototype, "handleCheckedChanged", 1);
153
+ r([
154
+ c("customInvalid")
155
+ ], a.prototype, "handleCustomInvalidChange", 1);
148
156
  export {
149
- t as SkfRadio
157
+ a as SkfRadio
150
158
  };
@@ -51,7 +51,7 @@ const e = [
51
51
  }
52
52
 
53
53
  &:checked:not(:disabled) {
54
- --_skf-radio-bg-color: var(--skf-bg-color-emphasised);
54
+ --_skf-radio-bg-color: var(--skf-bg-color-emphasized);
55
55
  --_skf-radio-border-color: transparent;
56
56
  --_skf-radio-marker-content: '';
57
57
  }
@@ -31,7 +31,7 @@ const s = class s extends n {
31
31
  type="button"
32
32
  value=${this.value}
33
33
  >
34
- ${this.selected ? c`<skf-icon color="emphasised" name="check" size="sm"></skf-icon>` : m}
34
+ ${this.selected ? c`<skf-icon color="emphasized" name="check" size="sm"></skf-icon>` : m}
35
35
  <slot></slot>
36
36
  </button>
37
37
  `;
@@ -37,7 +37,7 @@ const o = e`
37
37
  }
38
38
 
39
39
  &:is([aria-checked='true'], [aria-pressed='true']) {
40
- --_skf-segmented-button-item-border: var(--skf-border-color-emphasised);
40
+ --_skf-segmented-button-item-border: var(--skf-border-color-emphasized);
41
41
  }
42
42
 
43
43
  &:hover:not(:disabled) {
@@ -9,6 +9,7 @@ export interface SelectOptionEvent {
9
9
  }
10
10
  /**
11
11
  * The `<skf-select-option>` is a component is used nested in a skf-select or skf-select-option-group.
12
+ * It represents an individual option in a select dropdown.
12
13
  *
13
14
  * @documentation See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/asset/6229d63d9fe16020a60657e5) for design principles
14
15
  *
@@ -51,14 +52,13 @@ export declare class SkfSelectOption extends SkfElement {
51
52
  /** The option's label text (equivalent to the tags textContent) */
52
53
  set text(slottedTextContent: string);
53
54
  get text(): string;
54
- /** Returns or sets the tags value. If value is omitted, defaults to the tags text. */
55
+ /** Returns or sets the option value. If value is omitted, defaults to the tags slotted text. */
55
56
  set value(optionValue: string);
56
57
  get value(): string;
57
58
  small: boolean;
58
59
  /** @internal */
59
60
  private _assignedNodes?;
60
61
  constructor();
61
- connectedCallback(): void;
62
62
  updated(changedProperties: Map<string | number | symbol, unknown>): void;
63
63
  /** @internal */
64
64
  _handleStateChange(): void;