nve-designsystem 3.2.0 → 3.3.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 (197) hide show
  1. package/chunks/chunk.2PCBEMQZ.js +163 -226
  2. package/chunks/chunk.36O46B5H.js +15 -15
  3. package/chunks/chunk.4TUIT776.js +78 -96
  4. package/chunks/chunk.5JY5FUCG.js +965 -1245
  5. package/chunks/chunk.5P45LHIX.js +668 -96
  6. package/chunks/chunk.6CTB5ZDJ.js +107 -100
  7. package/chunks/chunk.B4BZKR24.js +29 -39
  8. package/chunks/chunk.D5YQDJ7X.js +122 -166
  9. package/chunks/chunk.EA437WHD.js +5 -5
  10. package/chunks/chunk.GI7VDIWX.js +14 -15
  11. package/chunks/chunk.GMYPQTFK.js +18 -20
  12. package/chunks/chunk.HVTXQL7M.js +191 -215
  13. package/chunks/chunk.IKV4VH3T.js +18 -16
  14. package/chunks/chunk.IVVHNXMC.js +26 -27
  15. package/chunks/chunk.JHOXTQXA.js +65 -74
  16. package/chunks/chunk.JXOKFADN.js +63 -90
  17. package/chunks/chunk.K7JGTRV7.js +24 -23
  18. package/chunks/chunk.KPLQLAWP.js +132 -147
  19. package/chunks/chunk.LD4M4QGE.js +61 -74
  20. package/chunks/chunk.MSKEYBDI.js +53 -71
  21. package/chunks/chunk.NYIIDP5N.js +39 -45
  22. package/chunks/chunk.RWUUFNUL.js +91 -114
  23. package/chunks/chunk.SAPQLUO4.js +249 -228
  24. package/chunks/chunk.SI4ACBFK.js +139 -5
  25. package/chunks/chunk.TP2GB2HO.js +361 -460
  26. package/chunks/chunk.UDWRA64J.js +185 -223
  27. package/chunks/chunk.URTPIBTY.js +119 -151
  28. package/chunks/chunk.VESXC477.js +63 -66
  29. package/chunks/chunk.XA43ZQPC.js +198 -313
  30. package/chunks/chunk.XQ2OKYYA.js +25 -26
  31. package/chunks/chunk.XZNBUGX7.js +6 -6
  32. package/chunks/chunk.YHLNUJ7P.js +93 -116
  33. package/chunks/chunk.ZH2AND3P.js +340 -399
  34. package/chunks/chunk.ZL53POKZ.js +61 -156
  35. package/chunks/chunk.js +20 -0
  36. package/chunks/class-map.js +49 -45
  37. package/chunks/decorate.js +105 -0
  38. package/chunks/directive-helpers.js +5 -7
  39. package/chunks/if-defined.js +5 -5
  40. package/chunks/lit.js +525 -0
  41. package/chunks/live.js +24 -24
  42. package/chunks/nve-alert.component.js +163 -0
  43. package/chunks/nve-carousel-item.component.js +36 -0
  44. package/chunks/nve-carousel.component.js +41 -0
  45. package/chunks/nve-checkbox-group.component.js +114 -0
  46. package/chunks/nve-checkbox.component.js +28 -0
  47. package/chunks/nve-dialog.component.js +39 -0
  48. package/chunks/nve-divider.component.js +23 -0
  49. package/chunks/nve-drawer.component.js +40 -0
  50. package/chunks/nve-dropdown.component.js +83 -0
  51. package/chunks/nve-input.component.js +80 -0
  52. package/chunks/nve-label.component.js +89 -0
  53. package/chunks/nve-menu-item.component.js +35 -0
  54. package/chunks/nve-menu.component.js +17 -0
  55. package/chunks/nve-option.component.js +27 -0
  56. package/chunks/nve-popup.component.js +15 -0
  57. package/chunks/nve-radio-button.component.js +20 -0
  58. package/chunks/nve-radio-group.component.js +78 -0
  59. package/chunks/nve-radio.component.js +18 -0
  60. package/chunks/nve-select.component.js +58 -0
  61. package/chunks/nve-skeleton.component.js +20 -0
  62. package/chunks/nve-spinner.component.js +23 -0
  63. package/chunks/nve-tooltip.component.js +20 -0
  64. package/chunks/nve-warning-level.component.js +57 -0
  65. package/chunks/ref.js +75 -84
  66. package/chunks/shoelace.js +10006 -0
  67. package/chunks/static-html.js +27 -0
  68. package/chunks/unsafe-html.js +24 -20
  69. package/chunks/updateInvalidProperty.js +7 -7
  70. package/chunks/watch.js +20 -20
  71. package/components/nve-accordion/nve-accordion.component.js +24 -30
  72. package/components/nve-accordion-item/nve-accordion-item.component.js +30 -64
  73. package/components/nve-accordion-item/nve-accordion-item.styles.js +5 -5
  74. package/components/nve-alert/nve-alert.component.js +2 -227
  75. package/components/nve-alert/nve-alert.styles.js +45 -27
  76. package/components/nve-badge/nve-badge.component.js +41 -45
  77. package/components/nve-badge/nve-badge.styles.js +33 -31
  78. package/components/nve-button/nve-button.component.d.ts +110 -10
  79. package/components/nve-button/nve-button.component.js +146 -39
  80. package/components/nve-button/nve-button.styles.js +214 -157
  81. package/components/nve-carousel/nve-carousel.component.js +2 -47
  82. package/components/nve-carousel/nve-carousel.styles.js +6 -6
  83. package/components/nve-carousel-item/nve-carousel-item.component.js +2 -40
  84. package/components/nve-carousel-item/nve-carousel-item.styles.js +5 -5
  85. package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.component.js +44 -54
  86. package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.styles.js +5 -5
  87. package/components/nve-checkbox/nve-checkbox.component.js +2 -34
  88. package/components/nve-checkbox/nve-checkbox.styles.js +7 -7
  89. package/components/nve-checkbox-group/nve-checkbox-group.component.js +2 -152
  90. package/components/nve-checkbox-group/nve-checkbox-group.styles.js +5 -5
  91. package/components/nve-combobox/nve-combobox.component.js +222 -440
  92. package/components/nve-combobox/nve-combobox.styles.js +6 -6
  93. package/components/nve-darkmode-switch/nve-darkmode-switch.component.js +32 -38
  94. package/components/nve-dialog/nve-dialog-styles.js +6 -6
  95. package/components/nve-dialog/nve-dialog.component.js +2 -54
  96. package/components/nve-divider/nve-divider.component.js +2 -30
  97. package/components/nve-drawer/nve-drawer.component.js +2 -44
  98. package/components/nve-drawer/nve-drawer.styles.js +6 -6
  99. package/components/nve-dropdown/nve-dropdown.component.js +2 -79
  100. package/components/nve-dropdown/nve-dropdown.styles.js +5 -5
  101. package/components/nve-heading/nve-heading.component.d.ts +29 -0
  102. package/components/nve-heading/nve-heading.component.js +45 -0
  103. package/components/nve-heading/nve-heading.styles.d.ts +2 -0
  104. package/components/nve-heading/nve-heading.styles.js +41 -0
  105. package/components/nve-icon/nve-icon.component.js +145 -164
  106. package/components/nve-icon/nve-icon.styles.js +11 -6
  107. package/components/nve-icon/offline-icons.js +16 -13
  108. package/components/nve-input/nve-input.component.js +2 -100
  109. package/components/nve-input/nve-input.styles.js +5 -5
  110. package/components/nve-label/nve-label.component.js +2 -115
  111. package/components/nve-label/nve-label.styles.js +5 -5
  112. package/components/nve-link-card/nve-link-card.component.d.ts +5 -2
  113. package/components/nve-link-card/nve-link-card.component.js +44 -80
  114. package/components/nve-link-card/nve-link-card.styles.js +71 -66
  115. package/components/nve-menu/nve-menu.component.js +2 -22
  116. package/components/nve-menu/nve-menu.styles.js +5 -5
  117. package/components/nve-menu-item/nve-menu-item.component.js +2 -43
  118. package/components/nve-menu-item/nve-menu-item.styles.js +7 -7
  119. package/components/nve-message-card/nve-message-card.component.js +61 -91
  120. package/components/nve-message-card/nve-message-card.styles.js +24 -27
  121. package/components/nve-navigation-card/nve-navigation-card.component.d.ts +52 -0
  122. package/components/nve-navigation-card/nve-navigation-card.component.js +60 -0
  123. package/components/nve-navigation-card/nve-navigation-card.styles.d.ts +2 -0
  124. package/components/nve-navigation-card/nve-navigation-card.styles.js +112 -0
  125. package/components/nve-option/nve-option.component.js +2 -41
  126. package/components/nve-option/nve-option.styles.js +5 -5
  127. package/components/nve-paragraph/nve-paragraph.component.d.ts +26 -0
  128. package/components/nve-paragraph/nve-paragraph.component.js +26 -0
  129. package/components/nve-paragraph/nve-paragraph.styles.d.ts +2 -0
  130. package/components/nve-paragraph/nve-paragraph.styles.js +105 -0
  131. package/components/nve-popup/nve-popup.component.js +2 -22
  132. package/components/nve-radio/nve-radio.component.js +2 -23
  133. package/components/nve-radio/nve-radio.styles.js +5 -5
  134. package/components/nve-radio-button/nve-radio-button.component.js +2 -25
  135. package/components/nve-radio-button/nve-radio-button.styles.js +5 -5
  136. package/components/nve-radio-group/nve-radio-group.component.js +2 -119
  137. package/components/nve-radio-group/nve-radio-group.styles.js +5 -5
  138. package/components/nve-relative-time/nve-relative-time.component.js +21 -56
  139. package/components/nve-relative-time/nve-relative-time.styles.js +5 -5
  140. package/components/nve-select/nve-select.component.js +2 -80
  141. package/components/nve-select/nve-select.styles.js +5 -5
  142. package/components/nve-skeleton/nve-skeleton.component.js +2 -27
  143. package/components/nve-skeleton/nve-skeleton.styles.js +5 -5
  144. package/components/nve-spinner/nve-spinner.component.js +2 -31
  145. package/components/nve-stepper/nve-step/nve-step.component.js +113 -173
  146. package/components/nve-stepper/nve-step/nve-step.styles.js +12 -12
  147. package/components/nve-stepper/nve-stepper-mobile.component.js +37 -49
  148. package/components/nve-stepper/nve-stepper-mobile.styles.js +7 -7
  149. package/components/nve-stepper/nve-stepper.component.js +94 -139
  150. package/components/nve-stepper/nve-stepper.styles.js +5 -5
  151. package/components/nve-switch/nve-switch.component.js +75 -107
  152. package/components/nve-switch/nve-switch.styles.js +7 -7
  153. package/components/nve-tab/nve-tab.component.js +30 -42
  154. package/components/nve-tab/nve-tab.styles.js +7 -7
  155. package/components/nve-tab-group/nve-tab-group.component.js +180 -260
  156. package/components/nve-tab-group/nve-tab-group.styles.js +5 -5
  157. package/components/nve-tab-panel/nve-tab-panel.component.js +21 -31
  158. package/components/nve-tab-panel/nve-tab-panel.styles.js +5 -5
  159. package/components/nve-tag/nve-tag.component.d.ts +3 -3
  160. package/components/nve-tag/nve-tag.component.js +71 -72
  161. package/components/nve-tag/nve-tag.styles.js +23 -22
  162. package/components/nve-textarea/nve-textarea.component.d.ts +3 -1
  163. package/components/nve-textarea/nve-textarea.component.js +112 -173
  164. package/components/nve-textarea/nve-textarea.styles.js +10 -5
  165. package/components/nve-tooltip/nve-tooltip.component.js +2 -30
  166. package/components/nve-tooltip/nve-tooltip.styles.js +5 -5
  167. package/components/nve-warning-level/nve-warning-level.component.js +2 -78
  168. package/components/nve-warning-level/nve-warning-level.styles.js +7 -7
  169. package/css/global.css +13 -55
  170. package/css/nve.css +1048 -393
  171. package/css/nve_dark.css +406 -305
  172. package/css/rme.css +1050 -395
  173. package/css/rme_dark.css +408 -307
  174. package/css/shoelace-styles.css +539 -0
  175. package/css/varsom.css +1046 -391
  176. package/css/varsom_dark.css +404 -303
  177. package/custom-elements.json +2905 -12389
  178. package/fonts/LICENSE.txt +37 -0
  179. package/fonts/SourceSans3-VariableFont_wght.woff2 +0 -0
  180. package/interfaces/NveComponent.interface.js +0 -1
  181. package/nve-designsystem.d.ts +5 -0
  182. package/nve-designsystem.js +46 -86
  183. package/package.json +26 -8
  184. package/registerIcons/systemLibraryCustomization.js +23 -91
  185. package/vite-env.d.js +0 -1
  186. package/chunks/chunk.3RPBFEDE.js +0 -162
  187. package/chunks/chunk.JCXLDPQF.js +0 -225
  188. package/chunks/chunk.JQBT7BOV.js +0 -8446
  189. package/chunks/chunk.MAQXLKQ7.js +0 -598
  190. package/chunks/lit-element.js +0 -508
  191. package/chunks/property.js +0 -37
  192. package/chunks/query.js +0 -13
  193. package/chunks/state.js +0 -7
  194. package/chunks/static.js +0 -26
  195. package/nve-designsystem.css +0 -1
  196. package/vscode.css-custom-data.json +0 -621
  197. package/vscode.html-custom-data.json +0 -2354
@@ -1,14 +1,12 @@
1
- import { i as g, x as p } from "./lit-element.js";
2
- import { f as _ } from "./chunk.SI4ACBFK.js";
3
- import { c as b, d as l, S as v } from "./chunk.4TUIT776.js";
4
- import { n } from "./property.js";
5
- import { r as f } from "./state.js";
6
- import { e as m } from "./query.js";
7
- import { F as C, c as x, a as R, v as V } from "./chunk.3RPBFEDE.js";
8
- import { H as w } from "./chunk.NYIIDP5N.js";
9
- import { w as y } from "./chunk.GMYPQTFK.js";
10
- import { e as A } from "./class-map.js";
11
- var k = g`
1
+ import { a as e, u as t } from "./lit.js";
2
+ import { a as n, o as r, r as i } from "./decorate.js";
3
+ import { n as a, r as o, t as s } from "./chunk.4TUIT776.js";
4
+ import { a as c, i as l, n as u, r as d, t as f } from "./chunk.SI4ACBFK.js";
5
+ import { t as p } from "./chunk.NYIIDP5N.js";
6
+ import { t as m } from "./chunk.GMYPQTFK.js";
7
+ import { t as h } from "./class-map.js";
8
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.B63YXDJO.js
9
+ var g = t`
12
10
  :host {
13
11
  display: block;
14
12
  }
@@ -40,7 +38,7 @@ var k = g`
40
38
  white-space: nowrap;
41
39
  border: 0;
42
40
  }
43
- `, S = g`
41
+ `, _ = t`
44
42
  :host {
45
43
  display: inline-block;
46
44
  }
@@ -49,38 +47,31 @@ var k = g`
49
47
  display: flex;
50
48
  flex-wrap: nowrap;
51
49
  }
52
- `, c = class extends v {
53
- constructor() {
54
- super(...arguments), this.disableRole = !1, this.label = "";
55
- }
56
- handleFocus(t) {
57
- const e = h(t.target);
58
- e?.toggleAttribute("data-sl-button-group__button--focus", !0);
59
- }
60
- handleBlur(t) {
61
- const e = h(t.target);
62
- e?.toggleAttribute("data-sl-button-group__button--focus", !1);
63
- }
64
- handleMouseOver(t) {
65
- const e = h(t.target);
66
- e?.toggleAttribute("data-sl-button-group__button--hover", !0);
67
- }
68
- handleMouseOut(t) {
69
- const e = h(t.target);
70
- e?.toggleAttribute("data-sl-button-group__button--hover", !1);
71
- }
72
- handleSlotChange() {
73
- const t = [...this.defaultSlot.assignedElements({ flatten: !0 })];
74
- t.forEach((e) => {
75
- const o = t.indexOf(e), s = h(e);
76
- s && (s.toggleAttribute("data-sl-button-group__button", !0), s.toggleAttribute("data-sl-button-group__button--first", o === 0), s.toggleAttribute("data-sl-button-group__button--inner", o > 0 && o < t.length - 1), s.toggleAttribute("data-sl-button-group__button--last", o === t.length - 1), s.toggleAttribute(
77
- "data-sl-button-group__button--radio",
78
- s.tagName.toLowerCase() === "sl-radio-button"
79
- ));
80
- });
81
- }
82
- render() {
83
- return p`
50
+ `, v = class extends s {
51
+ constructor() {
52
+ super(...arguments), this.disableRole = !1, this.label = "";
53
+ }
54
+ handleFocus(e) {
55
+ y(e.target)?.toggleAttribute("data-sl-button-group__button--focus", !0);
56
+ }
57
+ handleBlur(e) {
58
+ y(e.target)?.toggleAttribute("data-sl-button-group__button--focus", !1);
59
+ }
60
+ handleMouseOver(e) {
61
+ y(e.target)?.toggleAttribute("data-sl-button-group__button--hover", !0);
62
+ }
63
+ handleMouseOut(e) {
64
+ y(e.target)?.toggleAttribute("data-sl-button-group__button--hover", !1);
65
+ }
66
+ handleSlotChange() {
67
+ let e = [...this.defaultSlot.assignedElements({ flatten: !0 })];
68
+ e.forEach((t) => {
69
+ let n = e.indexOf(t), r = y(t);
70
+ r && (r.toggleAttribute("data-sl-button-group__button", !0), r.toggleAttribute("data-sl-button-group__button--first", n === 0), r.toggleAttribute("data-sl-button-group__button--inner", n > 0 && n < e.length - 1), r.toggleAttribute("data-sl-button-group__button--last", n === e.length - 1), r.toggleAttribute("data-sl-button-group__button--radio", r.tagName.toLowerCase() === "sl-radio-button"));
71
+ });
72
+ }
73
+ render() {
74
+ return e`
84
75
  <div
85
76
  part="base"
86
77
  class="button-group"
@@ -94,140 +85,122 @@ var k = g`
94
85
  <slot @slotchange=${this.handleSlotChange}></slot>
95
86
  </div>
96
87
  `;
97
- }
88
+ }
98
89
  };
99
- c.styles = [b, S];
100
- l([
101
- m("slot")
102
- ], c.prototype, "defaultSlot", 2);
103
- l([
104
- f()
105
- ], c.prototype, "disableRole", 2);
106
- l([
107
- n()
108
- ], c.prototype, "label", 2);
109
- function h(t) {
110
- var e;
111
- const o = "sl-button, sl-radio-button";
112
- return (e = t.closest(o)) != null ? e : t.querySelector(o);
90
+ v.styles = [a, _], o([i("slot")], v.prototype, "defaultSlot", 2), o([n()], v.prototype, "disableRole", 2), o([r()], v.prototype, "label", 2);
91
+ function y(e) {
92
+ let t = "sl-button, sl-radio-button";
93
+ return e.closest(t) ?? e.querySelector(t);
113
94
  }
114
- var i = class extends v {
115
- constructor() {
116
- super(...arguments), this.formControlController = new C(this), this.hasSlotController = new w(this, "help-text", "label"), this.customValidityMessage = "", this.hasButtonGroup = !1, this.errorMessage = "", this.defaultValue = "", this.label = "", this.helpText = "", this.name = "option", this.value = "", this.size = "medium", this.form = "", this.required = !1;
117
- }
118
- /** Gets the validity state object */
119
- get validity() {
120
- const t = this.required && !this.value;
121
- return this.customValidityMessage !== "" ? x : t ? R : V;
122
- }
123
- /** Gets the validation message */
124
- get validationMessage() {
125
- const t = this.required && !this.value;
126
- return this.customValidityMessage !== "" ? this.customValidityMessage : t ? this.validationInput.validationMessage : "";
127
- }
128
- connectedCallback() {
129
- super.connectedCallback(), this.defaultValue = this.value;
130
- }
131
- firstUpdated() {
132
- this.formControlController.updateValidity();
133
- }
134
- getAllRadios() {
135
- return [...this.querySelectorAll("sl-radio, sl-radio-button")];
136
- }
137
- handleRadioClick(t) {
138
- const e = t.target.closest("sl-radio, sl-radio-button"), o = this.getAllRadios(), s = this.value;
139
- !e || e.disabled || (this.value = e.value, o.forEach((a) => a.checked = a === e), this.value !== s && (this.emit("sl-change"), this.emit("sl-input")));
140
- }
141
- handleKeyDown(t) {
142
- var e;
143
- if (!["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", " "].includes(t.key))
144
- return;
145
- const o = this.getAllRadios().filter((u) => !u.disabled), s = (e = o.find((u) => u.checked)) != null ? e : o[0], a = t.key === " " ? 0 : ["ArrowUp", "ArrowLeft"].includes(t.key) ? -1 : 1, d = this.value;
146
- let r = o.indexOf(s) + a;
147
- r < 0 && (r = o.length - 1), r > o.length - 1 && (r = 0), this.getAllRadios().forEach((u) => {
148
- u.checked = !1, this.hasButtonGroup || u.setAttribute("tabindex", "-1");
149
- }), this.value = o[r].value, o[r].checked = !0, this.hasButtonGroup ? o[r].shadowRoot.querySelector("button").focus() : (o[r].setAttribute("tabindex", "0"), o[r].focus()), this.value !== d && (this.emit("sl-change"), this.emit("sl-input")), t.preventDefault();
150
- }
151
- handleLabelClick() {
152
- this.focus();
153
- }
154
- handleInvalid(t) {
155
- this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(t);
156
- }
157
- async syncRadioElements() {
158
- var t, e;
159
- const o = this.getAllRadios();
160
- if (await Promise.all(
161
- // Sync the checked state and size
162
- o.map(async (s) => {
163
- await s.updateComplete, s.checked = s.value === this.value, s.size = this.size;
164
- })
165
- ), this.hasButtonGroup = o.some((s) => s.tagName.toLowerCase() === "sl-radio-button"), o.length > 0 && !o.some((s) => s.checked))
166
- if (this.hasButtonGroup) {
167
- const s = (t = o[0].shadowRoot) == null ? void 0 : t.querySelector("button");
168
- s && s.setAttribute("tabindex", "0");
169
- } else
170
- o[0].setAttribute("tabindex", "0");
171
- if (this.hasButtonGroup) {
172
- const s = (e = this.shadowRoot) == null ? void 0 : e.querySelector("sl-button-group");
173
- s && (s.disableRole = !0);
174
- }
175
- }
176
- syncRadios() {
177
- if (customElements.get("sl-radio") && customElements.get("sl-radio-button")) {
178
- this.syncRadioElements();
179
- return;
180
- }
181
- customElements.get("sl-radio") ? this.syncRadioElements() : customElements.whenDefined("sl-radio").then(() => this.syncRadios()), customElements.get("sl-radio-button") ? this.syncRadioElements() : customElements.whenDefined("sl-radio-button").then(() => this.syncRadios());
182
- }
183
- updateCheckedRadio() {
184
- this.getAllRadios().forEach((e) => e.checked = e.value === this.value), this.formControlController.setValidity(this.validity.valid);
185
- }
186
- handleSizeChange() {
187
- this.syncRadios();
188
- }
189
- handleValueChange() {
190
- this.hasUpdated && this.updateCheckedRadio();
191
- }
192
- /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
193
- checkValidity() {
194
- const t = this.required && !this.value, e = this.customValidityMessage !== "";
195
- return t || e ? (this.formControlController.emitInvalidEvent(), !1) : !0;
196
- }
197
- /** Gets the associated form, if one exists. */
198
- getForm() {
199
- return this.formControlController.getForm();
200
- }
201
- /** Checks for validity and shows the browser's validation message if the control is invalid. */
202
- reportValidity() {
203
- const t = this.validity.valid;
204
- return this.errorMessage = this.customValidityMessage || t ? "" : this.validationInput.validationMessage, this.formControlController.setValidity(t), this.validationInput.hidden = !0, clearTimeout(this.validationTimeout), t || (this.validationInput.hidden = !1, this.validationInput.reportValidity(), this.validationTimeout = setTimeout(() => this.validationInput.hidden = !0, 1e4)), t;
205
- }
206
- /** Sets a custom validation message. Pass an empty string to restore validity. */
207
- setCustomValidity(t = "") {
208
- this.customValidityMessage = t, this.errorMessage = t, this.validationInput.setCustomValidity(t), this.formControlController.updateValidity();
209
- }
210
- /** Sets focus on the radio-group. */
211
- focus(t) {
212
- const e = this.getAllRadios(), o = e.find((d) => d.checked), s = e.find((d) => !d.disabled), a = o || s;
213
- a && a.focus(t);
214
- }
215
- render() {
216
- const t = this.hasSlotController.test("label"), e = this.hasSlotController.test("help-text"), o = this.label ? !0 : !!t, s = this.helpText ? !0 : !!e, a = p`
95
+ //#endregion
96
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZJNIZFRS.js
97
+ var b = class extends s {
98
+ constructor() {
99
+ super(...arguments), this.formControlController = new u(this), this.hasSlotController = new p(this, "help-text", "label"), this.customValidityMessage = "", this.hasButtonGroup = !1, this.errorMessage = "", this.defaultValue = "", this.label = "", this.helpText = "", this.name = "option", this.value = "", this.size = "medium", this.form = "", this.required = !1;
100
+ }
101
+ get validity() {
102
+ let e = this.required && !this.value;
103
+ return this.customValidityMessage === "" ? e ? c : l : d;
104
+ }
105
+ get validationMessage() {
106
+ let e = this.required && !this.value;
107
+ return this.customValidityMessage === "" ? e ? this.validationInput.validationMessage : "" : this.customValidityMessage;
108
+ }
109
+ connectedCallback() {
110
+ super.connectedCallback(), this.defaultValue = this.value;
111
+ }
112
+ firstUpdated() {
113
+ this.formControlController.updateValidity();
114
+ }
115
+ getAllRadios() {
116
+ return [...this.querySelectorAll("sl-radio, sl-radio-button")];
117
+ }
118
+ handleRadioClick(e) {
119
+ let t = e.target.closest("sl-radio, sl-radio-button"), n = this.getAllRadios(), r = this.value;
120
+ !t || t.disabled || (this.value = t.value, n.forEach((e) => e.checked = e === t), this.value !== r && (this.emit("sl-change"), this.emit("sl-input")));
121
+ }
122
+ handleKeyDown(e) {
123
+ if (![
124
+ "ArrowUp",
125
+ "ArrowDown",
126
+ "ArrowLeft",
127
+ "ArrowRight",
128
+ " "
129
+ ].includes(e.key)) return;
130
+ let t = this.getAllRadios().filter((e) => !e.disabled), n = t.find((e) => e.checked) ?? t[0], r = e.key === " " ? 0 : ["ArrowUp", "ArrowLeft"].includes(e.key) ? -1 : 1, i = this.value, a = t.indexOf(n) + r;
131
+ a < 0 && (a = t.length - 1), a > t.length - 1 && (a = 0), this.getAllRadios().forEach((e) => {
132
+ e.checked = !1, this.hasButtonGroup || e.setAttribute("tabindex", "-1");
133
+ }), this.value = t[a].value, t[a].checked = !0, this.hasButtonGroup ? t[a].shadowRoot.querySelector("button").focus() : (t[a].setAttribute("tabindex", "0"), t[a].focus()), this.value !== i && (this.emit("sl-change"), this.emit("sl-input")), e.preventDefault();
134
+ }
135
+ handleLabelClick() {
136
+ this.focus();
137
+ }
138
+ handleInvalid(e) {
139
+ this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(e);
140
+ }
141
+ async syncRadioElements() {
142
+ let e = this.getAllRadios();
143
+ if (await Promise.all(e.map(async (e) => {
144
+ await e.updateComplete, e.checked = e.value === this.value, e.size = this.size;
145
+ })), this.hasButtonGroup = e.some((e) => e.tagName.toLowerCase() === "sl-radio-button"), e.length > 0 && !e.some((e) => e.checked)) if (this.hasButtonGroup) {
146
+ let t = e[0].shadowRoot?.querySelector("button");
147
+ t && t.setAttribute("tabindex", "0");
148
+ } else e[0].setAttribute("tabindex", "0");
149
+ if (this.hasButtonGroup) {
150
+ let e = this.shadowRoot?.querySelector("sl-button-group");
151
+ e && (e.disableRole = !0);
152
+ }
153
+ }
154
+ syncRadios() {
155
+ if (customElements.get("sl-radio") && customElements.get("sl-radio-button")) {
156
+ this.syncRadioElements();
157
+ return;
158
+ }
159
+ customElements.get("sl-radio") ? this.syncRadioElements() : customElements.whenDefined("sl-radio").then(() => this.syncRadios()), customElements.get("sl-radio-button") ? this.syncRadioElements() : customElements.whenDefined("sl-radio-button").then(() => this.syncRadios());
160
+ }
161
+ updateCheckedRadio() {
162
+ this.getAllRadios().forEach((e) => e.checked = e.value === this.value), this.formControlController.setValidity(this.validity.valid);
163
+ }
164
+ handleSizeChange() {
165
+ this.syncRadios();
166
+ }
167
+ handleValueChange() {
168
+ this.hasUpdated && this.updateCheckedRadio();
169
+ }
170
+ checkValidity() {
171
+ let e = this.required && !this.value, t = this.customValidityMessage !== "";
172
+ return e || t ? (this.formControlController.emitInvalidEvent(), !1) : !0;
173
+ }
174
+ getForm() {
175
+ return this.formControlController.getForm();
176
+ }
177
+ reportValidity() {
178
+ let e = this.validity.valid;
179
+ return this.errorMessage = this.customValidityMessage || e ? "" : this.validationInput.validationMessage, this.formControlController.setValidity(e), this.validationInput.hidden = !0, clearTimeout(this.validationTimeout), e || (this.validationInput.hidden = !1, this.validationInput.reportValidity(), this.validationTimeout = setTimeout(() => this.validationInput.hidden = !0, 1e4)), e;
180
+ }
181
+ setCustomValidity(e = "") {
182
+ this.customValidityMessage = e, this.errorMessage = e, this.validationInput.setCustomValidity(e), this.formControlController.updateValidity();
183
+ }
184
+ focus(e) {
185
+ let t = this.getAllRadios(), n = t.find((e) => e.checked), r = t.find((e) => !e.disabled), i = n || r;
186
+ i && i.focus(e);
187
+ }
188
+ render() {
189
+ let t = this.hasSlotController.test("label"), n = this.hasSlotController.test("help-text"), r = this.label ? !0 : !!t, i = this.helpText ? !0 : !!n, a = e`
217
190
  <slot @slotchange=${this.syncRadios} @click=${this.handleRadioClick} @keydown=${this.handleKeyDown}></slot>
218
191
  `;
219
- return p`
192
+ return e`
220
193
  <fieldset
221
194
  part="form-control"
222
- class=${A({
223
- "form-control": !0,
224
- "form-control--small": this.size === "small",
225
- "form-control--medium": this.size === "medium",
226
- "form-control--large": this.size === "large",
227
- "form-control--radio-group": !0,
228
- "form-control--has-label": o,
229
- "form-control--has-help-text": s
230
- })}
195
+ class=${h({
196
+ "form-control": !0,
197
+ "form-control--small": this.size === "small",
198
+ "form-control--medium": this.size === "medium",
199
+ "form-control--large": this.size === "large",
200
+ "form-control--radio-group": !0,
201
+ "form-control--has-label": r,
202
+ "form-control--has-help-text": i
203
+ })}
231
204
  role="radiogroup"
232
205
  aria-labelledby="label"
233
206
  aria-describedby="help-text"
@@ -237,7 +210,7 @@ var i = class extends v {
237
210
  part="form-control-label"
238
211
  id="label"
239
212
  class="form-control__label"
240
- aria-hidden=${o ? "false" : "true"}
213
+ aria-hidden=${r ? "false" : "true"}
241
214
  @click=${this.handleLabelClick}
242
215
  >
243
216
  <slot name="label">${this.label}</slot>
@@ -258,7 +231,7 @@ var i = class extends v {
258
231
  </label>
259
232
  </div>
260
233
 
261
- ${this.hasButtonGroup ? p`
234
+ ${this.hasButtonGroup ? e`
262
235
  <sl-button-group part="button-group" exportparts="base:button-group__base" role="presentation">
263
236
  ${a}
264
237
  </sl-button-group>
@@ -269,61 +242,25 @@ var i = class extends v {
269
242
  part="form-control-help-text"
270
243
  id="help-text"
271
244
  class="form-control__help-text"
272
- aria-hidden=${s ? "false" : "true"}
245
+ aria-hidden=${i ? "false" : "true"}
273
246
  >
274
247
  <slot name="help-text">${this.helpText}</slot>
275
248
  </div>
276
249
  </fieldset>
277
250
  `;
278
- }
279
- };
280
- i.styles = [b, _, k];
281
- i.dependencies = { "sl-button-group": c };
282
- l([
283
- m("slot:not([name])")
284
- ], i.prototype, "defaultSlot", 2);
285
- l([
286
- m(".radio-group__validation-input")
287
- ], i.prototype, "validationInput", 2);
288
- l([
289
- f()
290
- ], i.prototype, "hasButtonGroup", 2);
291
- l([
292
- f()
293
- ], i.prototype, "errorMessage", 2);
294
- l([
295
- f()
296
- ], i.prototype, "defaultValue", 2);
297
- l([
298
- n()
299
- ], i.prototype, "label", 2);
300
- l([
301
- n({ attribute: "help-text" })
302
- ], i.prototype, "helpText", 2);
303
- l([
304
- n()
305
- ], i.prototype, "name", 2);
306
- l([
307
- n({ reflect: !0 })
308
- ], i.prototype, "value", 2);
309
- l([
310
- n({ reflect: !0 })
311
- ], i.prototype, "size", 2);
312
- l([
313
- n({ reflect: !0 })
314
- ], i.prototype, "form", 2);
315
- l([
316
- n({ type: Boolean, reflect: !0 })
317
- ], i.prototype, "required", 2);
318
- l([
319
- y("size", { waitUntilFirstUpdate: !0 })
320
- ], i.prototype, "handleSizeChange", 1);
321
- l([
322
- y("value")
323
- ], i.prototype, "handleValueChange", 1);
324
- var L = i;
325
- i.define("sl-radio-group");
326
- export {
327
- c as S,
328
- L as r
251
+ }
329
252
  };
253
+ b.styles = [
254
+ a,
255
+ f,
256
+ g
257
+ ], b.dependencies = { "sl-button-group": v }, o([i("slot:not([name])")], b.prototype, "defaultSlot", 2), o([i(".radio-group__validation-input")], b.prototype, "validationInput", 2), o([n()], b.prototype, "hasButtonGroup", 2), o([n()], b.prototype, "errorMessage", 2), o([n()], b.prototype, "defaultValue", 2), o([r()], b.prototype, "label", 2), o([r({ attribute: "help-text" })], b.prototype, "helpText", 2), o([r()], b.prototype, "name", 2), o([r({ reflect: !0 })], b.prototype, "value", 2), o([r({ reflect: !0 })], b.prototype, "size", 2), o([r({ reflect: !0 })], b.prototype, "form", 2), o([r({
258
+ type: Boolean,
259
+ reflect: !0
260
+ })], b.prototype, "required", 2), o([m("size", { waitUntilFirstUpdate: !0 })], b.prototype, "handleSizeChange", 1), o([m("value")], b.prototype, "handleValueChange", 1);
261
+ //#endregion
262
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2PCBEMQZ.js
263
+ var x = b;
264
+ b.define("sl-radio-group");
265
+ //#endregion
266
+ export { v as n, x as t };
@@ -1,7 +1,8 @@
1
- import { i as r, x as e } from "./lit-element.js";
2
- import { L as a } from "./chunk.6CTB5ZDJ.js";
3
- import { c as t, S as s } from "./chunk.4TUIT776.js";
4
- var i = r`
1
+ import { a as e, u as t } from "./lit.js";
2
+ import { n, t as r } from "./chunk.4TUIT776.js";
3
+ import { t as i } from "./chunk.6CTB5ZDJ.js";
4
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7DUCI5S4.js
5
+ var a = t`
5
6
  :host {
6
7
  --track-width: 2px;
7
8
  --track-color: rgb(128 128 128 / 25%);
@@ -58,20 +59,19 @@ var i = r`
58
59
  stroke-dasharray: 0.05em, 3em;
59
60
  }
60
61
  }
61
- `, o = class extends s {
62
- constructor() {
63
- super(...arguments), this.localize = new a(this);
64
- }
65
- render() {
66
- return e`
62
+ `, o = class extends r {
63
+ constructor() {
64
+ super(...arguments), this.localize = new i(this);
65
+ }
66
+ render() {
67
+ return e`
67
68
  <svg part="base" class="spinner" role="progressbar" aria-label=${this.localize.term("loading")}>
68
69
  <circle class="spinner__track"></circle>
69
70
  <circle class="spinner__indicator"></circle>
70
71
  </svg>
71
72
  `;
72
- }
73
- };
74
- o.styles = [t, i];
75
- export {
76
- o as S
73
+ }
77
74
  };
75
+ o.styles = [n, a];
76
+ //#endregion
77
+ export { o as t };