nve-designsystem 3.1.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 +6 -6
  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,21 +1,19 @@
1
- import { i as _, x as p } from "./lit-element.js";
2
- import { S as O, s as S } from "./chunk.RWUUFNUL.js";
3
- import { L as x } from "./chunk.6CTB5ZDJ.js";
4
- import { c as w, d as l, S as C } from "./chunk.4TUIT776.js";
5
- import { e as m } from "./class-map.js";
6
- import { n as o } from "./property.js";
7
- import { f as z } from "./chunk.SI4ACBFK.js";
8
- import { S as $ } from "./chunk.5JY5FUCG.js";
9
- import { F as D } from "./chunk.3RPBFEDE.js";
10
- import { s as k, g as b } from "./chunk.K7JGTRV7.js";
11
- import { s as f, a as v, w as y } from "./chunk.B4BZKR24.js";
12
- import { H as I } from "./chunk.NYIIDP5N.js";
13
- import { S as T } from "./chunk.YHLNUJ7P.js";
14
- import { w as g } from "./chunk.GMYPQTFK.js";
15
- import { r as h } from "./state.js";
16
- import { e as u } from "./query.js";
17
- import { o as L } from "./unsafe-html.js";
18
- var V = _`
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 { n as c, t as l } from "./chunk.SI4ACBFK.js";
5
+ import { t as u } from "./chunk.NYIIDP5N.js";
6
+ import { t as d } from "./chunk.YHLNUJ7P.js";
7
+ import { t as f } from "./chunk.GMYPQTFK.js";
8
+ import { t as p } from "./class-map.js";
9
+ import { t as m } from "./chunk.6CTB5ZDJ.js";
10
+ import { n as h, t as g } from "./chunk.K7JGTRV7.js";
11
+ import { n as _, o as v, t as y } from "./chunk.B4BZKR24.js";
12
+ import { t as b } from "./chunk.5JY5FUCG.js";
13
+ import { i as x, n as S } from "./chunk.RWUUFNUL.js";
14
+ import { t as C } from "./unsafe-html.js";
15
+ //#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.V2OL7VMD.js
16
+ var w = t`
19
17
  :host {
20
18
  display: inline-block;
21
19
  }
@@ -128,38 +126,35 @@ var V = _`
128
126
  .tag--pill {
129
127
  border-radius: var(--sl-border-radius-pill);
130
128
  }
131
- `, d = class extends C {
132
- constructor() {
133
- super(...arguments), this.localize = new x(this), this.variant = "neutral", this.size = "medium", this.pill = !1, this.removable = !1;
134
- }
135
- handleRemoveClick() {
136
- this.emit("sl-remove");
137
- }
138
- render() {
139
- return p`
129
+ `, T = class extends s {
130
+ constructor() {
131
+ super(...arguments), this.localize = new m(this), this.variant = "neutral", this.size = "medium", this.pill = !1, this.removable = !1;
132
+ }
133
+ handleRemoveClick() {
134
+ this.emit("sl-remove");
135
+ }
136
+ render() {
137
+ return e`
140
138
  <span
141
139
  part="base"
142
- class=${m({
143
- tag: !0,
144
- // Types
145
- "tag--primary": this.variant === "primary",
146
- "tag--success": this.variant === "success",
147
- "tag--neutral": this.variant === "neutral",
148
- "tag--warning": this.variant === "warning",
149
- "tag--danger": this.variant === "danger",
150
- "tag--text": this.variant === "text",
151
- // Sizes
152
- "tag--small": this.size === "small",
153
- "tag--medium": this.size === "medium",
154
- "tag--large": this.size === "large",
155
- // Modifiers
156
- "tag--pill": this.pill,
157
- "tag--removable": this.removable
158
- })}
140
+ class=${p({
141
+ tag: !0,
142
+ "tag--primary": this.variant === "primary",
143
+ "tag--success": this.variant === "success",
144
+ "tag--neutral": this.variant === "neutral",
145
+ "tag--warning": this.variant === "warning",
146
+ "tag--danger": this.variant === "danger",
147
+ "tag--text": this.variant === "text",
148
+ "tag--small": this.size === "small",
149
+ "tag--medium": this.size === "medium",
150
+ "tag--large": this.size === "large",
151
+ "tag--pill": this.pill,
152
+ "tag--removable": this.removable
153
+ })}
159
154
  >
160
155
  <slot part="content" class="tag__content"></slot>
161
156
 
162
- ${this.removable ? p`
157
+ ${this.removable ? e`
163
158
  <sl-icon-button
164
159
  part="remove-button"
165
160
  exportparts="base:remove-button__base"
@@ -173,23 +168,15 @@ var V = _`
173
168
  ` : ""}
174
169
  </span>
175
170
  `;
176
- }
171
+ }
177
172
  };
178
- d.styles = [w, V];
179
- d.dependencies = { "sl-icon-button": O };
180
- l([
181
- o({ reflect: !0 })
182
- ], d.prototype, "variant", 2);
183
- l([
184
- o({ reflect: !0 })
185
- ], d.prototype, "size", 2);
186
- l([
187
- o({ type: Boolean, reflect: !0 })
188
- ], d.prototype, "pill", 2);
189
- l([
190
- o({ type: Boolean })
191
- ], d.prototype, "removable", 2);
192
- var A = _`
173
+ T.styles = [a, w], T.dependencies = { "sl-icon-button": x }, o([r({ reflect: !0 })], T.prototype, "variant", 2), o([r({ reflect: !0 })], T.prototype, "size", 2), o([r({
174
+ type: Boolean,
175
+ reflect: !0
176
+ })], T.prototype, "pill", 2), o([r({ type: Boolean })], T.prototype, "removable", 2);
177
+ //#endregion
178
+ //#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.XNOUITPX.js
179
+ var E = t`
193
180
  :host {
194
181
  display: block;
195
182
  }
@@ -531,11 +518,9 @@ var A = _`
531
518
  padding-block: var(--sl-spacing-2x-small);
532
519
  padding-inline: var(--sl-spacing-x-large);
533
520
  }
534
- `, s = class extends C {
535
- constructor() {
536
- super(...arguments), this.formControlController = new D(this, {
537
- assumeInteractionOn: ["sl-blur", "sl-input"]
538
- }), this.hasSlotController = new I(this, "help-text", "label"), this.localize = new x(this), this.typeToSelectString = "", this.hasFocus = !1, this.displayLabel = "", this.selectedOptions = [], this.valueHasChanged = !1, this.name = "", this._value = "", this.defaultValue = "", this.size = "medium", this.placeholder = "", this.multiple = !1, this.maxOptionsVisible = 3, this.disabled = !1, this.clearable = !1, this.open = !1, this.hoist = !1, this.filled = !1, this.pill = !1, this.label = "", this.placement = "bottom", this.helpText = "", this.form = "", this.required = !1, this.getTag = (e) => p`
521
+ `, D = class extends s {
522
+ constructor() {
523
+ super(...arguments), this.formControlController = new c(this, { assumeInteractionOn: ["sl-blur", "sl-input"] }), this.hasSlotController = new u(this, "help-text", "label"), this.localize = new m(this), this.typeToSelectString = "", this.hasFocus = !1, this.displayLabel = "", this.selectedOptions = [], this.valueHasChanged = !1, this.name = "", this._value = "", this.defaultValue = "", this.size = "medium", this.placeholder = "", this.multiple = !1, this.maxOptionsVisible = 3, this.disabled = !1, this.clearable = !1, this.open = !1, this.hoist = !1, this.filled = !1, this.pill = !1, this.label = "", this.placement = "bottom", this.helpText = "", this.form = "", this.required = !1, this.getTag = (t) => e`
539
524
  <sl-tag
540
525
  part="tag"
541
526
  exportparts="
@@ -547,270 +532,248 @@ var A = _`
547
532
  ?pill=${this.pill}
548
533
  size=${this.size}
549
534
  removable
550
- @sl-remove=${(t) => this.handleTagRemove(t, e)}
535
+ @sl-remove=${(e) => this.handleTagRemove(e, t)}
551
536
  >
552
- ${e.getTextLabel()}
537
+ ${t.getTextLabel()}
553
538
  </sl-tag>
554
539
  `, this.handleDocumentFocusIn = (e) => {
555
- const t = e.composedPath();
556
- this && !t.includes(this) && this.hide();
557
- }, this.handleDocumentKeyDown = (e) => {
558
- const t = e.target, i = t.closest(".select__clear") !== null, a = t.closest("sl-icon-button") !== null;
559
- if (!(i || a)) {
560
- if (e.key === "Escape" && this.open && !this.closeWatcher && (e.preventDefault(), e.stopPropagation(), this.hide(), this.displayInput.focus({ preventScroll: !0 })), e.key === "Enter" || e.key === " " && this.typeToSelectString === "") {
561
- if (e.preventDefault(), e.stopImmediatePropagation(), !this.open) {
562
- this.show();
563
- return;
564
- }
565
- this.currentOption && !this.currentOption.disabled && (this.valueHasChanged = !0, this.multiple ? this.toggleOptionSelection(this.currentOption) : this.setSelectedOptions(this.currentOption), this.updateComplete.then(() => {
566
- this.emit("sl-input"), this.emit("sl-change");
567
- }), this.multiple || (this.hide(), this.displayInput.focus({ preventScroll: !0 })));
568
- return;
569
- }
570
- if (["ArrowUp", "ArrowDown", "Home", "End"].includes(e.key)) {
571
- const n = this.getAllOptions(), r = n.indexOf(this.currentOption);
572
- let c = Math.max(0, r);
573
- if (e.preventDefault(), !this.open && (this.show(), this.currentOption))
574
- return;
575
- e.key === "ArrowDown" ? (c = r + 1, c > n.length - 1 && (c = 0)) : e.key === "ArrowUp" ? (c = r - 1, c < 0 && (c = n.length - 1)) : e.key === "Home" ? c = 0 : e.key === "End" && (c = n.length - 1), this.setCurrentOption(n[c]);
576
- }
577
- if (e.key && e.key.length === 1 || e.key === "Backspace") {
578
- const n = this.getAllOptions();
579
- if (e.metaKey || e.ctrlKey || e.altKey)
580
- return;
581
- if (!this.open) {
582
- if (e.key === "Backspace")
583
- return;
584
- this.show();
585
- }
586
- e.stopPropagation(), e.preventDefault(), clearTimeout(this.typeToSelectTimeout), this.typeToSelectTimeout = window.setTimeout(() => this.typeToSelectString = "", 1e3), e.key === "Backspace" ? this.typeToSelectString = this.typeToSelectString.slice(0, -1) : this.typeToSelectString += e.key.toLowerCase();
587
- for (const r of n)
588
- if (r.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)) {
589
- this.setCurrentOption(r);
590
- break;
591
- }
592
- }
593
- }
594
- }, this.handleDocumentMouseDown = (e) => {
595
- const t = e.composedPath();
596
- this && !t.includes(this) && this.hide();
597
- };
598
- }
599
- get value() {
600
- return this._value;
601
- }
602
- set value(e) {
603
- this.multiple ? e = Array.isArray(e) ? e : e.split(" ") : e = Array.isArray(e) ? e.join(" ") : e, this._value !== e && (this.valueHasChanged = !0, this._value = e);
604
- }
605
- /** Gets the validity state object */
606
- get validity() {
607
- return this.valueInput.validity;
608
- }
609
- /** Gets the validation message */
610
- get validationMessage() {
611
- return this.valueInput.validationMessage;
612
- }
613
- connectedCallback() {
614
- super.connectedCallback(), setTimeout(() => {
615
- this.handleDefaultSlotChange();
616
- }), this.open = !1;
617
- }
618
- addOpenListeners() {
619
- var e;
620
- document.addEventListener("focusin", this.handleDocumentFocusIn), document.addEventListener("keydown", this.handleDocumentKeyDown), document.addEventListener("mousedown", this.handleDocumentMouseDown), this.getRootNode() !== document && this.getRootNode().addEventListener("focusin", this.handleDocumentFocusIn), "CloseWatcher" in window && ((e = this.closeWatcher) == null || e.destroy(), this.closeWatcher = new CloseWatcher(), this.closeWatcher.onclose = () => {
621
- this.open && (this.hide(), this.displayInput.focus({ preventScroll: !0 }));
622
- });
623
- }
624
- removeOpenListeners() {
625
- var e;
626
- document.removeEventListener("focusin", this.handleDocumentFocusIn), document.removeEventListener("keydown", this.handleDocumentKeyDown), document.removeEventListener("mousedown", this.handleDocumentMouseDown), this.getRootNode() !== document && this.getRootNode().removeEventListener("focusin", this.handleDocumentFocusIn), (e = this.closeWatcher) == null || e.destroy();
627
- }
628
- handleFocus() {
629
- this.hasFocus = !0, this.displayInput.setSelectionRange(0, 0), this.emit("sl-focus");
630
- }
631
- handleBlur() {
632
- this.hasFocus = !1, this.emit("sl-blur");
633
- }
634
- handleLabelClick() {
635
- this.displayInput.focus();
636
- }
637
- handleComboboxMouseDown(e) {
638
- const i = e.composedPath().some((a) => a instanceof Element && a.tagName.toLowerCase() === "sl-icon-button");
639
- this.disabled || i || (e.preventDefault(), this.displayInput.focus({ preventScroll: !0 }), this.open = !this.open);
640
- }
641
- handleComboboxKeyDown(e) {
642
- e.key !== "Tab" && (e.stopPropagation(), this.handleDocumentKeyDown(e));
643
- }
644
- handleClearClick(e) {
645
- e.stopPropagation(), this.valueHasChanged = !0, this.value !== "" && (this.setSelectedOptions([]), this.displayInput.focus({ preventScroll: !0 }), this.updateComplete.then(() => {
646
- this.emit("sl-clear"), this.emit("sl-input"), this.emit("sl-change");
647
- }));
648
- }
649
- handleClearMouseDown(e) {
650
- e.stopPropagation(), e.preventDefault();
651
- }
652
- handleOptionClick(e) {
653
- const i = e.target.closest("sl-option"), a = this.value;
654
- i && !i.disabled && (this.valueHasChanged = !0, this.multiple ? this.toggleOptionSelection(i) : this.setSelectedOptions(i), this.updateComplete.then(() => this.displayInput.focus({ preventScroll: !0 })), this.value !== a && this.updateComplete.then(() => {
655
- this.emit("sl-input"), this.emit("sl-change");
656
- }), this.multiple || (this.hide(), this.displayInput.focus({ preventScroll: !0 })));
657
- }
658
- /* @internal - used by options to update labels */
659
- handleDefaultSlotChange() {
660
- customElements.get("sl-option") || customElements.whenDefined("sl-option").then(() => this.handleDefaultSlotChange());
661
- const e = this.getAllOptions(), t = this.valueHasChanged ? this.value : this.defaultValue, i = Array.isArray(t) ? t : [t], a = [];
662
- e.forEach((n) => a.push(n.value)), this.setSelectedOptions(e.filter((n) => i.includes(n.value)));
663
- }
664
- handleTagRemove(e, t) {
665
- e.stopPropagation(), this.valueHasChanged = !0, this.disabled || (this.toggleOptionSelection(t, !1), this.updateComplete.then(() => {
666
- this.emit("sl-input"), this.emit("sl-change");
667
- }));
668
- }
669
- // Gets an array of all <sl-option> elements
670
- getAllOptions() {
671
- return [...this.querySelectorAll("sl-option")];
672
- }
673
- // Gets the first <sl-option> element
674
- getFirstOption() {
675
- return this.querySelector("sl-option");
676
- }
677
- // Sets the current option, which is the option the user is currently interacting with (e.g. via keyboard). Only one
678
- // option may be "current" at a time.
679
- setCurrentOption(e) {
680
- this.getAllOptions().forEach((i) => {
681
- i.current = !1, i.tabIndex = -1;
682
- }), e && (this.currentOption = e, e.current = !0, e.tabIndex = 0, e.focus());
683
- }
684
- // Sets the selected option(s)
685
- setSelectedOptions(e) {
686
- const t = this.getAllOptions(), i = Array.isArray(e) ? e : [e];
687
- t.forEach((a) => a.selected = !1), i.length && i.forEach((a) => a.selected = !0), this.selectionChanged();
688
- }
689
- // Toggles an option's selected state
690
- toggleOptionSelection(e, t) {
691
- t === !0 || t === !1 ? e.selected = t : e.selected = !e.selected, this.selectionChanged();
692
- }
693
- // This method must be called whenever the selection changes. It will update the selected options cache, the current
694
- // value, and the display value
695
- selectionChanged() {
696
- var e, t, i;
697
- const a = this.getAllOptions();
698
- this.selectedOptions = a.filter((r) => r.selected);
699
- const n = this.valueHasChanged;
700
- if (this.multiple)
701
- this.value = this.selectedOptions.map((r) => r.value), this.placeholder && this.value.length === 0 ? this.displayLabel = "" : this.displayLabel = this.localize.term("numOptionsSelected", this.selectedOptions.length);
702
- else {
703
- const r = this.selectedOptions[0];
704
- this.value = (e = r?.value) != null ? e : "", this.displayLabel = (i = (t = r?.getTextLabel) == null ? void 0 : t.call(r)) != null ? i : "";
705
- }
706
- this.valueHasChanged = n, this.updateComplete.then(() => {
707
- this.formControlController.updateValidity();
708
- });
709
- }
710
- get tags() {
711
- return this.selectedOptions.map((e, t) => {
712
- if (t < this.maxOptionsVisible || this.maxOptionsVisible <= 0) {
713
- const i = this.getTag(e, t);
714
- return p`<div @sl-remove=${(a) => this.handleTagRemove(a, e)}>
715
- ${typeof i == "string" ? L(i) : i}
540
+ let t = e.composedPath();
541
+ this && !t.includes(this) && this.hide();
542
+ }, this.handleDocumentKeyDown = (e) => {
543
+ let t = e.target, n = t.closest(".select__clear") !== null, r = t.closest("sl-icon-button") !== null;
544
+ if (!(n || r)) {
545
+ if (e.key === "Escape" && this.open && !this.closeWatcher && (e.preventDefault(), e.stopPropagation(), this.hide(), this.displayInput.focus({ preventScroll: !0 })), e.key === "Enter" || e.key === " " && this.typeToSelectString === "") {
546
+ if (e.preventDefault(), e.stopImmediatePropagation(), !this.open) {
547
+ this.show();
548
+ return;
549
+ }
550
+ this.currentOption && !this.currentOption.disabled && (this.valueHasChanged = !0, this.multiple ? this.toggleOptionSelection(this.currentOption) : this.setSelectedOptions(this.currentOption), this.updateComplete.then(() => {
551
+ this.emit("sl-input"), this.emit("sl-change");
552
+ }), this.multiple || (this.hide(), this.displayInput.focus({ preventScroll: !0 })));
553
+ return;
554
+ }
555
+ if ([
556
+ "ArrowUp",
557
+ "ArrowDown",
558
+ "Home",
559
+ "End"
560
+ ].includes(e.key)) {
561
+ let t = this.getAllOptions(), n = t.indexOf(this.currentOption), r = Math.max(0, n);
562
+ if (e.preventDefault(), !this.open && (this.show(), this.currentOption)) return;
563
+ e.key === "ArrowDown" ? (r = n + 1, r > t.length - 1 && (r = 0)) : e.key === "ArrowUp" ? (r = n - 1, r < 0 && (r = t.length - 1)) : e.key === "Home" ? r = 0 : e.key === "End" && (r = t.length - 1), this.setCurrentOption(t[r]);
564
+ }
565
+ if (e.key && e.key.length === 1 || e.key === "Backspace") {
566
+ let t = this.getAllOptions();
567
+ if (e.metaKey || e.ctrlKey || e.altKey) return;
568
+ if (!this.open) {
569
+ if (e.key === "Backspace") return;
570
+ this.show();
571
+ }
572
+ e.stopPropagation(), e.preventDefault(), clearTimeout(this.typeToSelectTimeout), this.typeToSelectTimeout = window.setTimeout(() => this.typeToSelectString = "", 1e3), e.key === "Backspace" ? this.typeToSelectString = this.typeToSelectString.slice(0, -1) : this.typeToSelectString += e.key.toLowerCase();
573
+ for (let e of t) if (e.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)) {
574
+ this.setCurrentOption(e);
575
+ break;
576
+ }
577
+ }
578
+ }
579
+ }, this.handleDocumentMouseDown = (e) => {
580
+ let t = e.composedPath();
581
+ this && !t.includes(this) && this.hide();
582
+ };
583
+ }
584
+ get value() {
585
+ return this._value;
586
+ }
587
+ set value(e) {
588
+ e = this.multiple ? Array.isArray(e) ? e : e.split(" ") : Array.isArray(e) ? e.join(" ") : e, this._value !== e && (this.valueHasChanged = !0, this._value = e);
589
+ }
590
+ get validity() {
591
+ return this.valueInput.validity;
592
+ }
593
+ get validationMessage() {
594
+ return this.valueInput.validationMessage;
595
+ }
596
+ connectedCallback() {
597
+ super.connectedCallback(), setTimeout(() => {
598
+ this.handleDefaultSlotChange();
599
+ }), this.open = !1;
600
+ }
601
+ addOpenListeners() {
602
+ var e;
603
+ document.addEventListener("focusin", this.handleDocumentFocusIn), document.addEventListener("keydown", this.handleDocumentKeyDown), document.addEventListener("mousedown", this.handleDocumentMouseDown), this.getRootNode() !== document && this.getRootNode().addEventListener("focusin", this.handleDocumentFocusIn), "CloseWatcher" in window && ((e = this.closeWatcher) == null || e.destroy(), this.closeWatcher = new CloseWatcher(), this.closeWatcher.onclose = () => {
604
+ this.open && (this.hide(), this.displayInput.focus({ preventScroll: !0 }));
605
+ });
606
+ }
607
+ removeOpenListeners() {
608
+ var e;
609
+ document.removeEventListener("focusin", this.handleDocumentFocusIn), document.removeEventListener("keydown", this.handleDocumentKeyDown), document.removeEventListener("mousedown", this.handleDocumentMouseDown), this.getRootNode() !== document && this.getRootNode().removeEventListener("focusin", this.handleDocumentFocusIn), (e = this.closeWatcher) == null || e.destroy();
610
+ }
611
+ handleFocus() {
612
+ this.hasFocus = !0, this.displayInput.setSelectionRange(0, 0), this.emit("sl-focus");
613
+ }
614
+ handleBlur() {
615
+ this.hasFocus = !1, this.emit("sl-blur");
616
+ }
617
+ handleLabelClick() {
618
+ this.displayInput.focus();
619
+ }
620
+ handleComboboxMouseDown(e) {
621
+ let t = e.composedPath().some((e) => e instanceof Element && e.tagName.toLowerCase() === "sl-icon-button");
622
+ this.disabled || t || (e.preventDefault(), this.displayInput.focus({ preventScroll: !0 }), this.open = !this.open);
623
+ }
624
+ handleComboboxKeyDown(e) {
625
+ e.key !== "Tab" && (e.stopPropagation(), this.handleDocumentKeyDown(e));
626
+ }
627
+ handleClearClick(e) {
628
+ e.stopPropagation(), this.valueHasChanged = !0, this.value !== "" && (this.setSelectedOptions([]), this.displayInput.focus({ preventScroll: !0 }), this.updateComplete.then(() => {
629
+ this.emit("sl-clear"), this.emit("sl-input"), this.emit("sl-change");
630
+ }));
631
+ }
632
+ handleClearMouseDown(e) {
633
+ e.stopPropagation(), e.preventDefault();
634
+ }
635
+ handleOptionClick(e) {
636
+ let t = e.target.closest("sl-option"), n = this.value;
637
+ t && !t.disabled && (this.valueHasChanged = !0, this.multiple ? this.toggleOptionSelection(t) : this.setSelectedOptions(t), this.updateComplete.then(() => this.displayInput.focus({ preventScroll: !0 })), this.value !== n && this.updateComplete.then(() => {
638
+ this.emit("sl-input"), this.emit("sl-change");
639
+ }), this.multiple || (this.hide(), this.displayInput.focus({ preventScroll: !0 })));
640
+ }
641
+ handleDefaultSlotChange() {
642
+ customElements.get("sl-option") || customElements.whenDefined("sl-option").then(() => this.handleDefaultSlotChange());
643
+ let e = this.getAllOptions(), t = this.valueHasChanged ? this.value : this.defaultValue, n = Array.isArray(t) ? t : [t], r = [];
644
+ e.forEach((e) => r.push(e.value)), this.setSelectedOptions(e.filter((e) => n.includes(e.value)));
645
+ }
646
+ handleTagRemove(e, t) {
647
+ e.stopPropagation(), this.valueHasChanged = !0, this.disabled || (this.toggleOptionSelection(t, !1), this.updateComplete.then(() => {
648
+ this.emit("sl-input"), this.emit("sl-change");
649
+ }));
650
+ }
651
+ getAllOptions() {
652
+ return [...this.querySelectorAll("sl-option")];
653
+ }
654
+ getFirstOption() {
655
+ return this.querySelector("sl-option");
656
+ }
657
+ setCurrentOption(e) {
658
+ this.getAllOptions().forEach((e) => {
659
+ e.current = !1, e.tabIndex = -1;
660
+ }), e && (this.currentOption = e, e.current = !0, e.tabIndex = 0, e.focus());
661
+ }
662
+ setSelectedOptions(e) {
663
+ let t = this.getAllOptions(), n = Array.isArray(e) ? e : [e];
664
+ t.forEach((e) => e.selected = !1), n.length && n.forEach((e) => e.selected = !0), this.selectionChanged();
665
+ }
666
+ toggleOptionSelection(e, t) {
667
+ t === !0 || t === !1 ? e.selected = t : e.selected = !e.selected, this.selectionChanged();
668
+ }
669
+ selectionChanged() {
670
+ let e = this.getAllOptions();
671
+ this.selectedOptions = e.filter((e) => e.selected);
672
+ let t = this.valueHasChanged;
673
+ if (this.multiple) this.value = this.selectedOptions.map((e) => e.value), this.placeholder && this.value.length === 0 ? this.displayLabel = "" : this.displayLabel = this.localize.term("numOptionsSelected", this.selectedOptions.length);
674
+ else {
675
+ let e = this.selectedOptions[0];
676
+ this.value = e?.value ?? "", this.displayLabel = (e?.getTextLabel)?.call(e) ?? "";
677
+ }
678
+ this.valueHasChanged = t, this.updateComplete.then(() => {
679
+ this.formControlController.updateValidity();
680
+ });
681
+ }
682
+ get tags() {
683
+ return this.selectedOptions.map((t, n) => {
684
+ if (n < this.maxOptionsVisible || this.maxOptionsVisible <= 0) {
685
+ let r = this.getTag(t, n);
686
+ return e`<div @sl-remove=${(e) => this.handleTagRemove(e, t)}>
687
+ ${typeof r == "string" ? C(r) : r}
716
688
  </div>`;
717
- } else if (t === this.maxOptionsVisible)
718
- return p`<sl-tag size=${this.size}>+${this.selectedOptions.length - t}</sl-tag>`;
719
- return p``;
720
- });
721
- }
722
- handleInvalid(e) {
723
- this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(e);
724
- }
725
- handleDisabledChange() {
726
- this.disabled && (this.open = !1, this.handleOpenChange());
727
- }
728
- attributeChangedCallback(e, t, i) {
729
- if (super.attributeChangedCallback(e, t, i), e === "value") {
730
- const a = this.valueHasChanged;
731
- this.value = this.defaultValue, this.valueHasChanged = a;
732
- }
733
- }
734
- handleValueChange() {
735
- if (!this.valueHasChanged) {
736
- const i = this.valueHasChanged;
737
- this.value = this.defaultValue, this.valueHasChanged = i;
738
- }
739
- const e = this.getAllOptions(), t = Array.isArray(this.value) ? this.value : [this.value];
740
- this.setSelectedOptions(e.filter((i) => t.includes(i.value)));
741
- }
742
- async handleOpenChange() {
743
- if (this.open && !this.disabled) {
744
- this.setCurrentOption(this.selectedOptions[0] || this.getFirstOption()), this.emit("sl-show"), this.addOpenListeners(), await f(this), this.listbox.hidden = !1, this.popup.active = !0, requestAnimationFrame(() => {
745
- this.setCurrentOption(this.currentOption);
746
- });
747
- const { keyframes: e, options: t } = b(this, "select.show", { dir: this.localize.dir() });
748
- await v(this.popup.popup, e, t), this.currentOption && S(this.currentOption, this.listbox, "vertical", "auto"), this.emit("sl-after-show");
749
- } else {
750
- this.emit("sl-hide"), this.removeOpenListeners(), await f(this);
751
- const { keyframes: e, options: t } = b(this, "select.hide", { dir: this.localize.dir() });
752
- await v(this.popup.popup, e, t), this.listbox.hidden = !0, this.popup.active = !1, this.emit("sl-after-hide");
753
- }
754
- }
755
- /** Shows the listbox. */
756
- async show() {
757
- if (this.open || this.disabled) {
758
- this.open = !1;
759
- return;
760
- }
761
- return this.open = !0, y(this, "sl-after-show");
762
- }
763
- /** Hides the listbox. */
764
- async hide() {
765
- if (!this.open || this.disabled) {
766
- this.open = !1;
767
- return;
768
- }
769
- return this.open = !1, y(this, "sl-after-hide");
770
- }
771
- /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
772
- checkValidity() {
773
- return this.valueInput.checkValidity();
774
- }
775
- /** Gets the associated form, if one exists. */
776
- getForm() {
777
- return this.formControlController.getForm();
778
- }
779
- /** Checks for validity and shows the browser's validation message if the control is invalid. */
780
- reportValidity() {
781
- return this.valueInput.reportValidity();
782
- }
783
- /** Sets a custom validation message. Pass an empty string to restore validity. */
784
- setCustomValidity(e) {
785
- this.valueInput.setCustomValidity(e), this.formControlController.updateValidity();
786
- }
787
- /** Sets focus on the control. */
788
- focus(e) {
789
- this.displayInput.focus(e);
790
- }
791
- /** Removes focus from the control. */
792
- blur() {
793
- this.displayInput.blur();
794
- }
795
- render() {
796
- const e = this.hasSlotController.test("label"), t = this.hasSlotController.test("help-text"), i = this.label ? !0 : !!e, a = this.helpText ? !0 : !!t, n = this.clearable && !this.disabled && this.value.length > 0, r = this.placeholder && this.value && this.value.length <= 0;
797
- return p`
689
+ } else if (n === this.maxOptionsVisible) return e`<sl-tag size=${this.size}>+${this.selectedOptions.length - n}</sl-tag>`;
690
+ return e``;
691
+ });
692
+ }
693
+ handleInvalid(e) {
694
+ this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(e);
695
+ }
696
+ handleDisabledChange() {
697
+ this.disabled && (this.open = !1, this.handleOpenChange());
698
+ }
699
+ attributeChangedCallback(e, t, n) {
700
+ if (super.attributeChangedCallback(e, t, n), e === "value") {
701
+ let e = this.valueHasChanged;
702
+ this.value = this.defaultValue, this.valueHasChanged = e;
703
+ }
704
+ }
705
+ handleValueChange() {
706
+ if (!this.valueHasChanged) {
707
+ let e = this.valueHasChanged;
708
+ this.value = this.defaultValue, this.valueHasChanged = e;
709
+ }
710
+ let e = this.getAllOptions(), t = Array.isArray(this.value) ? this.value : [this.value];
711
+ this.setSelectedOptions(e.filter((e) => t.includes(e.value)));
712
+ }
713
+ async handleOpenChange() {
714
+ if (this.open && !this.disabled) {
715
+ this.setCurrentOption(this.selectedOptions[0] || this.getFirstOption()), this.emit("sl-show"), this.addOpenListeners(), await v(this), this.listbox.hidden = !1, this.popup.active = !0, requestAnimationFrame(() => {
716
+ this.setCurrentOption(this.currentOption);
717
+ });
718
+ let { keyframes: e, options: t } = g(this, "select.show", { dir: this.localize.dir() });
719
+ await _(this.popup.popup, e, t), this.currentOption && S(this.currentOption, this.listbox, "vertical", "auto"), this.emit("sl-after-show");
720
+ } else {
721
+ this.emit("sl-hide"), this.removeOpenListeners(), await v(this);
722
+ let { keyframes: e, options: t } = g(this, "select.hide", { dir: this.localize.dir() });
723
+ await _(this.popup.popup, e, t), this.listbox.hidden = !0, this.popup.active = !1, this.emit("sl-after-hide");
724
+ }
725
+ }
726
+ async show() {
727
+ if (this.open || this.disabled) {
728
+ this.open = !1;
729
+ return;
730
+ }
731
+ return this.open = !0, y(this, "sl-after-show");
732
+ }
733
+ async hide() {
734
+ if (!this.open || this.disabled) {
735
+ this.open = !1;
736
+ return;
737
+ }
738
+ return this.open = !1, y(this, "sl-after-hide");
739
+ }
740
+ checkValidity() {
741
+ return this.valueInput.checkValidity();
742
+ }
743
+ getForm() {
744
+ return this.formControlController.getForm();
745
+ }
746
+ reportValidity() {
747
+ return this.valueInput.reportValidity();
748
+ }
749
+ setCustomValidity(e) {
750
+ this.valueInput.setCustomValidity(e), this.formControlController.updateValidity();
751
+ }
752
+ focus(e) {
753
+ this.displayInput.focus(e);
754
+ }
755
+ blur() {
756
+ this.displayInput.blur();
757
+ }
758
+ render() {
759
+ let t = this.hasSlotController.test("label"), n = this.hasSlotController.test("help-text"), r = this.label ? !0 : !!t, i = this.helpText ? !0 : !!n, a = this.clearable && !this.disabled && this.value.length > 0, o = this.placeholder && this.value && this.value.length <= 0;
760
+ return e`
798
761
  <div
799
762
  part="form-control"
800
- class=${m({
801
- "form-control": !0,
802
- "form-control--small": this.size === "small",
803
- "form-control--medium": this.size === "medium",
804
- "form-control--large": this.size === "large",
805
- "form-control--has-label": i,
806
- "form-control--has-help-text": a
807
- })}
763
+ class=${p({
764
+ "form-control": !0,
765
+ "form-control--small": this.size === "small",
766
+ "form-control--medium": this.size === "medium",
767
+ "form-control--large": this.size === "large",
768
+ "form-control--has-label": r,
769
+ "form-control--has-help-text": i
770
+ })}
808
771
  >
809
772
  <label
810
773
  id="label"
811
774
  part="form-control-label"
812
775
  class="form-control__label"
813
- aria-hidden=${i ? "false" : "true"}
776
+ aria-hidden=${r ? "false" : "true"}
814
777
  @click=${this.handleLabelClick}
815
778
  >
816
779
  <slot name="label">${this.label}</slot>
@@ -818,22 +781,22 @@ var A = _`
818
781
 
819
782
  <div part="form-control-input" class="form-control-input">
820
783
  <sl-popup
821
- class=${m({
822
- select: !0,
823
- "select--standard": !0,
824
- "select--filled": this.filled,
825
- "select--pill": this.pill,
826
- "select--open": this.open,
827
- "select--disabled": this.disabled,
828
- "select--multiple": this.multiple,
829
- "select--focused": this.hasFocus,
830
- "select--placeholder-visible": r,
831
- "select--top": this.placement === "top",
832
- "select--bottom": this.placement === "bottom",
833
- "select--small": this.size === "small",
834
- "select--medium": this.size === "medium",
835
- "select--large": this.size === "large"
836
- })}
784
+ class=${p({
785
+ select: !0,
786
+ "select--standard": !0,
787
+ "select--filled": this.filled,
788
+ "select--pill": this.pill,
789
+ "select--open": this.open,
790
+ "select--disabled": this.disabled,
791
+ "select--multiple": this.multiple,
792
+ "select--focused": this.hasFocus,
793
+ "select--placeholder-visible": o,
794
+ "select--top": this.placement === "top",
795
+ "select--bottom": this.placement === "bottom",
796
+ "select--small": this.size === "small",
797
+ "select--medium": this.size === "medium",
798
+ "select--large": this.size === "large"
799
+ })}
837
800
  placement=${this.placement}
838
801
  strategy=${this.hoist ? "fixed" : "absolute"}
839
802
  flip
@@ -874,7 +837,7 @@ var A = _`
874
837
  @blur=${this.handleBlur}
875
838
  />
876
839
 
877
- ${this.multiple ? p`<div part="tags" class="select__tags">${this.tags}</div>` : ""}
840
+ ${this.multiple ? e`<div part="tags" class="select__tags">${this.tags}</div>` : ""}
878
841
 
879
842
  <input
880
843
  class="select__value-input"
@@ -888,7 +851,7 @@ var A = _`
888
851
  @invalid=${this.handleInvalid}
889
852
  />
890
853
 
891
- ${n ? p`
854
+ ${a ? e`
892
855
  <button
893
856
  part="clear-button"
894
857
  class="select__clear"
@@ -932,133 +895,71 @@ var A = _`
932
895
  part="form-control-help-text"
933
896
  id="help-text"
934
897
  class="form-control__help-text"
935
- aria-hidden=${a ? "false" : "true"}
898
+ aria-hidden=${i ? "false" : "true"}
936
899
  >
937
900
  <slot name="help-text">${this.helpText}</slot>
938
901
  </div>
939
902
  </div>
940
903
  `;
941
- }
942
- };
943
- s.styles = [w, z, A];
944
- s.dependencies = {
945
- "sl-icon": T,
946
- "sl-popup": $,
947
- "sl-tag": d
904
+ }
948
905
  };
949
- l([
950
- u(".select")
951
- ], s.prototype, "popup", 2);
952
- l([
953
- u(".select__combobox")
954
- ], s.prototype, "combobox", 2);
955
- l([
956
- u(".select__display-input")
957
- ], s.prototype, "displayInput", 2);
958
- l([
959
- u(".select__value-input")
960
- ], s.prototype, "valueInput", 2);
961
- l([
962
- u(".select__listbox")
963
- ], s.prototype, "listbox", 2);
964
- l([
965
- h()
966
- ], s.prototype, "hasFocus", 2);
967
- l([
968
- h()
969
- ], s.prototype, "displayLabel", 2);
970
- l([
971
- h()
972
- ], s.prototype, "currentOption", 2);
973
- l([
974
- h()
975
- ], s.prototype, "selectedOptions", 2);
976
- l([
977
- h()
978
- ], s.prototype, "valueHasChanged", 2);
979
- l([
980
- o()
981
- ], s.prototype, "name", 2);
982
- l([
983
- h()
984
- ], s.prototype, "value", 1);
985
- l([
986
- o({ attribute: "value" })
987
- ], s.prototype, "defaultValue", 2);
988
- l([
989
- o({ reflect: !0 })
990
- ], s.prototype, "size", 2);
991
- l([
992
- o()
993
- ], s.prototype, "placeholder", 2);
994
- l([
995
- o({ type: Boolean, reflect: !0 })
996
- ], s.prototype, "multiple", 2);
997
- l([
998
- o({ attribute: "max-options-visible", type: Number })
999
- ], s.prototype, "maxOptionsVisible", 2);
1000
- l([
1001
- o({ type: Boolean, reflect: !0 })
1002
- ], s.prototype, "disabled", 2);
1003
- l([
1004
- o({ type: Boolean })
1005
- ], s.prototype, "clearable", 2);
1006
- l([
1007
- o({ type: Boolean, reflect: !0 })
1008
- ], s.prototype, "open", 2);
1009
- l([
1010
- o({ type: Boolean })
1011
- ], s.prototype, "hoist", 2);
1012
- l([
1013
- o({ type: Boolean, reflect: !0 })
1014
- ], s.prototype, "filled", 2);
1015
- l([
1016
- o({ type: Boolean, reflect: !0 })
1017
- ], s.prototype, "pill", 2);
1018
- l([
1019
- o()
1020
- ], s.prototype, "label", 2);
1021
- l([
1022
- o({ reflect: !0 })
1023
- ], s.prototype, "placement", 2);
1024
- l([
1025
- o({ attribute: "help-text" })
1026
- ], s.prototype, "helpText", 2);
1027
- l([
1028
- o({ reflect: !0 })
1029
- ], s.prototype, "form", 2);
1030
- l([
1031
- o({ type: Boolean, reflect: !0 })
1032
- ], s.prototype, "required", 2);
1033
- l([
1034
- o()
1035
- ], s.prototype, "getTag", 2);
1036
- l([
1037
- g("disabled", { waitUntilFirstUpdate: !0 })
1038
- ], s.prototype, "handleDisabledChange", 1);
1039
- l([
1040
- g(["defaultValue", "value"], { waitUntilFirstUpdate: !0 })
1041
- ], s.prototype, "handleValueChange", 1);
1042
- l([
1043
- g("open", { waitUntilFirstUpdate: !0 })
1044
- ], s.prototype, "handleOpenChange", 1);
1045
- k("select.show", {
1046
- keyframes: [
1047
- { opacity: 0, scale: 0.9 },
1048
- { opacity: 1, scale: 1 }
1049
- ],
1050
- options: { duration: 100, easing: "ease" }
906
+ D.styles = [
907
+ a,
908
+ l,
909
+ E
910
+ ], D.dependencies = {
911
+ "sl-icon": d,
912
+ "sl-popup": b,
913
+ "sl-tag": T
914
+ }, o([i(".select")], D.prototype, "popup", 2), o([i(".select__combobox")], D.prototype, "combobox", 2), o([i(".select__display-input")], D.prototype, "displayInput", 2), o([i(".select__value-input")], D.prototype, "valueInput", 2), o([i(".select__listbox")], D.prototype, "listbox", 2), o([n()], D.prototype, "hasFocus", 2), o([n()], D.prototype, "displayLabel", 2), o([n()], D.prototype, "currentOption", 2), o([n()], D.prototype, "selectedOptions", 2), o([n()], D.prototype, "valueHasChanged", 2), o([r()], D.prototype, "name", 2), o([n()], D.prototype, "value", 1), o([r({ attribute: "value" })], D.prototype, "defaultValue", 2), o([r({ reflect: !0 })], D.prototype, "size", 2), o([r()], D.prototype, "placeholder", 2), o([r({
915
+ type: Boolean,
916
+ reflect: !0
917
+ })], D.prototype, "multiple", 2), o([r({
918
+ attribute: "max-options-visible",
919
+ type: Number
920
+ })], D.prototype, "maxOptionsVisible", 2), o([r({
921
+ type: Boolean,
922
+ reflect: !0
923
+ })], D.prototype, "disabled", 2), o([r({ type: Boolean })], D.prototype, "clearable", 2), o([r({
924
+ type: Boolean,
925
+ reflect: !0
926
+ })], D.prototype, "open", 2), o([r({ type: Boolean })], D.prototype, "hoist", 2), o([r({
927
+ type: Boolean,
928
+ reflect: !0
929
+ })], D.prototype, "filled", 2), o([r({
930
+ type: Boolean,
931
+ reflect: !0
932
+ })], D.prototype, "pill", 2), o([r()], D.prototype, "label", 2), o([r({ reflect: !0 })], D.prototype, "placement", 2), o([r({ attribute: "help-text" })], D.prototype, "helpText", 2), o([r({ reflect: !0 })], D.prototype, "form", 2), o([r({
933
+ type: Boolean,
934
+ reflect: !0
935
+ })], D.prototype, "required", 2), o([r()], D.prototype, "getTag", 2), o([f("disabled", { waitUntilFirstUpdate: !0 })], D.prototype, "handleDisabledChange", 1), o([f(["defaultValue", "value"], { waitUntilFirstUpdate: !0 })], D.prototype, "handleValueChange", 1), o([f("open", { waitUntilFirstUpdate: !0 })], D.prototype, "handleOpenChange", 1), h("select.show", {
936
+ keyframes: [{
937
+ opacity: 0,
938
+ scale: .9
939
+ }, {
940
+ opacity: 1,
941
+ scale: 1
942
+ }],
943
+ options: {
944
+ duration: 100,
945
+ easing: "ease"
946
+ }
947
+ }), h("select.hide", {
948
+ keyframes: [{
949
+ opacity: 1,
950
+ scale: 1
951
+ }, {
952
+ opacity: 0,
953
+ scale: .9
954
+ }],
955
+ options: {
956
+ duration: 100,
957
+ easing: "ease"
958
+ }
1051
959
  });
1052
- k("select.hide", {
1053
- keyframes: [
1054
- { opacity: 1, scale: 1 },
1055
- { opacity: 0, scale: 0.9 }
1056
- ],
1057
- options: { duration: 100, easing: "ease" }
1058
- });
1059
- var Y = s;
1060
- s.define("sl-select");
1061
- export {
1062
- d as S,
1063
- Y as s
1064
- };
960
+ //#endregion
961
+ //#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.TP2GB2HO.js
962
+ var O = D;
963
+ D.define("sl-select");
964
+ //#endregion
965
+ export { T as n, O as t };