@mono-lit/helper 0.0.9 → 0.0.10

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 (161) hide show
  1. package/dist/accordion-core-DaNyPWRr.js +277 -0
  2. package/dist/alert-core-DWtHbX_-.js +134 -0
  3. package/dist/breadcrumb-list-core-Dh68T8Cf.js +747 -0
  4. package/dist/{mono-button-CLkHg3WW.js → button-core-DerXg84Q.js} +3 -276
  5. package/dist/button-dropdown-core-DKYEOyjy.js +654 -0
  6. package/dist/button-utils-D5-66M02.js +63 -0
  7. package/dist/card-utils-l80qAmrN.js +312 -0
  8. package/dist/chart-core-DV7hD3ZY.js +801 -0
  9. package/dist/checkbox-utils-DKdrhAzF.js +337 -0
  10. package/dist/chip-utils-DpRrd7Zj.js +403 -0
  11. package/dist/{data-source-controller-C6C4ej_M.js → data-source-controller-DS_JLrmS.js} +1 -1
  12. package/dist/{data-source-options-fxT5QIX4.js → data-source-options-DJUNU26C.js} +6 -6
  13. package/dist/{data-source-read-BL266IW0.js → data-source-read-uKJpRAzx.js} +2 -2
  14. package/dist/date-core-CyuSyvvG.js +734 -0
  15. package/dist/drawer-core-DbFWvNln.js +759 -0
  16. package/dist/dropdown-core-BCH1pK14.js +511 -0
  17. package/dist/dropdown-table-core-SfHUJVFq.js +1342 -0
  18. package/dist/export.js +1 -1
  19. package/dist/{field-path-BabiMrrA.js → field-path-DK2VBWHl.js} +1 -1
  20. package/dist/field-tooltip.css_raw-DVblekCl.js +5 -0
  21. package/dist/{field-validation.css_raw-Cx6SGrfP.js → field-validation.css_raw-BU7C6173.js} +1 -170
  22. package/dist/file-upload-core-Cz_dBQMx.js +624 -0
  23. package/dist/filter-builder-core-DyWjbBP7.js +381 -0
  24. package/dist/{filter-builder-B6Y2mmbM.js → filter-builder-vbqIuPhX.js} +1 -1
  25. package/dist/{filter-eval-ChDSaAUH.js → filter-eval-CqeBnMYh.js} +1 -1
  26. package/dist/{filter-odata-Bi27XUpQ.js → filter-odata-GsczYKNC.js} +1 -1
  27. package/dist/{hydration-flush-BaE9gN3C.js → hydration-flush-Volt9X7Q.js} +2 -1071
  28. package/dist/index.js +11 -11
  29. package/dist/{index.node-DTqDBca7.js → index.node-Csy9zrr1.js} +4 -4
  30. package/dist/index.node.js +11 -11
  31. package/dist/input-utils-BglY-k0H.js +1145 -0
  32. package/dist/menu-core-DkAYuCZ2.js +831 -0
  33. package/dist/modal-core-CSBSPN_m.js +844 -0
  34. package/dist/mono-button-DVvZ03P-.js +280 -0
  35. package/dist/{mono-button.shadow-DqZMpcqY.js → mono-button.shadow-BANxMGln.js} +6 -594
  36. package/dist/{mono-data-chart-NKPdAgVq.js → mono-data-chart-ChF4J9RT.js} +6 -6
  37. package/dist/{mono-data-dropdown-B2iRpJuI.js → mono-data-dropdown-Bgj2PDfm.js} +1 -1
  38. package/dist/{mono-data-grid-llJCX9MC.js → mono-data-grid-DJkp96N-.js} +144 -46
  39. package/dist/{mono-event-BPku9HpS.js → mono-event-CAZf0F_k.js} +14 -9
  40. package/dist/{mono-form-controller-BrA10erm.js → mono-form-controller-DxZLvyg6.js} +2 -1
  41. package/dist/mono-table-checkbox-core-BKOMx8R5.js +5288 -0
  42. package/dist/nav-core-B5qU2dzn.js +225 -0
  43. package/dist/{normalize-error-D93O4q8g.js → normalize-error-BEcd1tmS.js} +2 -2
  44. package/dist/otp-core-DXg3vFLh.js +758 -0
  45. package/dist/radio-utils-Dk9Tl1jz.js +319 -0
  46. package/dist/rich-text-editor-core-Ddd_QaLn.js +1280 -0
  47. package/dist/select-utils-BgArYHk8.js +2140 -0
  48. package/dist/sidebar-core-CD6txDo3.js +583 -0
  49. package/dist/slider-core-vcWr321-.js +1014 -0
  50. package/dist/src/components/dropdown-table/dropdown-table-core.d.ts +2 -2
  51. package/dist/src/components/dropdown-table/dropdown-table-types.d.ts +1 -1
  52. package/dist/src/components/dropdown-table/index.d.ts +1 -1
  53. package/dist/src/components/dropdown-table/index.shadow.d.ts +1 -1
  54. package/dist/src/components/dropdown-table/mono-data-dropdown.d.ts +1 -1
  55. package/dist/src/components/form/form-types.d.ts +9 -3
  56. package/dist/src/components/input/input-core.d.ts +1 -1
  57. package/dist/src/components/input/input-types.d.ts +1 -1
  58. package/dist/src/components/otp/otp-core.d.ts +1 -1
  59. package/dist/src/components/select/select-core.d.ts +1 -1
  60. package/dist/src/components/select/select-types.d.ts +1 -1
  61. package/dist/src/components/slider/slider-core.d.ts +1 -1
  62. package/dist/src/components/slider/slider-types.d.ts +1 -1
  63. package/dist/src/components/table/filter-suggestion.d.ts +171 -0
  64. package/dist/src/components/table/index.d.ts +5 -4
  65. package/dist/src/components/table/index.shadow.d.ts +5 -4
  66. package/dist/src/components/table/mono-data-grid.d.ts +22 -3
  67. package/dist/src/components/table/mono-table-empty-core.d.ts +37 -0
  68. package/dist/src/components/table/mono-table-search-core.d.ts +22 -3
  69. package/dist/src/components/table/table-types.d.ts +74 -4
  70. package/dist/src/components/tag-input/tag-input-core.d.ts +1 -1
  71. package/dist/src/components/tag-input/tag-input-types.d.ts +1 -1
  72. package/dist/src/components/textarea/textarea-core.d.ts +1 -1
  73. package/dist/src/composables/mono-event.d.ts +7 -1
  74. package/dist/src/entries/index.d.ts +8 -6
  75. package/dist/src/entries/index.node.d.ts +8 -6
  76. package/dist/src/search/index.d.ts +1 -1
  77. package/dist/src/utils/group-count.d.ts +36 -0
  78. package/dist/switch-utils-CTZ4id2V.js +338 -0
  79. package/dist/tabs-core-r5-B8k_N.js +317 -0
  80. package/dist/tag-input-utils-D2JA90DQ.js +3060 -0
  81. package/dist/textarea-utils-VU1KeXm8.js +821 -0
  82. package/dist/ui/accordion.js +2 -274
  83. package/dist/ui/alert.js +2 -131
  84. package/dist/ui/breadcrumb.js +4 -745
  85. package/dist/ui/button-dropdown.js +4 -652
  86. package/dist/ui/button.js +2 -63
  87. package/dist/ui/card.js +2 -310
  88. package/dist/ui/chart.js +4 -800
  89. package/dist/ui/checkbox.js +4 -335
  90. package/dist/ui/chip.js +4 -402
  91. package/dist/ui/date.js +3 -732
  92. package/dist/ui/drawer.js +3 -757
  93. package/dist/ui/dropdown-table.js +5 -1341
  94. package/dist/ui/dropdown.js +4 -509
  95. package/dist/ui/file-upload.js +3 -622
  96. package/dist/ui/filter.js +5 -380
  97. package/dist/ui/form.js +1 -1
  98. package/dist/ui/index.css +118 -1
  99. package/dist/ui/input.js +3 -1141
  100. package/dist/ui/menu.js +4 -828
  101. package/dist/ui/modal.js +4 -843
  102. package/dist/ui/nav.js +4 -223
  103. package/dist/ui/otp.js +4 -756
  104. package/dist/ui/radio.js +4 -317
  105. package/dist/ui/rich-text-editor.js +4 -1278
  106. package/dist/ui/select.js +5 -2138
  107. package/dist/ui/shadow/accordion.js +4 -273
  108. package/dist/ui/shadow/alert.js +4 -130
  109. package/dist/ui/shadow/breadcrumb.js +5 -744
  110. package/dist/ui/shadow/button-dropdown.js +6 -652
  111. package/dist/ui/shadow/button.js +3 -63
  112. package/dist/ui/shadow/card.js +4 -309
  113. package/dist/ui/shadow/chart.js +6 -1576
  114. package/dist/ui/shadow/checkbox.js +4 -334
  115. package/dist/ui/shadow/chip.js +4 -396
  116. package/dist/ui/shadow/date.js +7 -731
  117. package/dist/ui/shadow/drawer.js +4 -756
  118. package/dist/ui/shadow/dropdown-table.js +8 -1762
  119. package/dist/ui/shadow/dropdown.js +4 -508
  120. package/dist/ui/shadow/file-upload.js +4 -620
  121. package/dist/ui/shadow/filter.js +7 -379
  122. package/dist/ui/shadow/input.js +6 -1140
  123. package/dist/ui/shadow/menu.js +5 -828
  124. package/dist/ui/shadow/modal.js +6 -1063
  125. package/dist/ui/shadow/nav.js +5 -223
  126. package/dist/ui/shadow/otp.js +6 -754
  127. package/dist/ui/shadow/radio.js +4 -316
  128. package/dist/ui/shadow/rich-text-editor.js +4 -1276
  129. package/dist/ui/shadow/select.js +6 -2136
  130. package/dist/ui/shadow/sidebar.js +5 -581
  131. package/dist/ui/shadow/slider.js +5 -1010
  132. package/dist/ui/shadow/switch.js +4 -335
  133. package/dist/ui/shadow/table.js +10 -4501
  134. package/dist/ui/shadow/tabs.js +6 -315
  135. package/dist/ui/shadow/tag-input.js +7 -3057
  136. package/dist/ui/shadow/textarea.js +6 -817
  137. package/dist/ui/sidebar.js +3 -581
  138. package/dist/ui/slider.js +4 -1012
  139. package/dist/ui/switch.js +4 -336
  140. package/dist/ui/table.js +9 -4502
  141. package/dist/ui/tabs.js +4 -315
  142. package/dist/ui/tag-input.js +5 -3058
  143. package/dist/ui/textarea.js +4 -819
  144. package/dist/vue.d.ts +3 -2
  145. package/package.json +3 -3
  146. package/dist/chip-strip-bNfLn52Z.js +0 -215
  147. package/dist/data-source-controller-Dx6IQ2CN.js +0 -243
  148. package/dist/data-source-options-BM4r4PRw.js +0 -558
  149. package/dist/data-source-read-HyBCRg1t.js +0 -242
  150. package/dist/excel-BXzr3uI1.js +0 -784
  151. package/dist/export-ixRdCS2y.js +0 -2388
  152. package/dist/field-tooltip-addon-CWCp19mJ.js +0 -702
  153. package/dist/field-tooltip.css_raw-U5UeTa2d.js +0 -269
  154. package/dist/filter-builder-C0T3pMx2.js +0 -208
  155. package/dist/form-control-core-BbiACMtL.js +0 -226
  156. package/dist/icon-ClxnYhBG.js +0 -19
  157. package/dist/import-Dc4eXC02.js +0 -612
  158. package/dist/light-slots-_no0r2Z-.js +0 -246
  159. package/dist/markdown-uGlE_OfJ.js +0 -20191
  160. package/dist/mono-data-grid-e9ZVBlNN.js +0 -4240
  161. package/dist/normalize-error-BmLbgANw.js +0 -1048
package/dist/ui/switch.js CHANGED
@@ -1,300 +1,11 @@
1
1
  import { g as monoHostChildNodes } from "../mono-ui-kvLVIf1V.js";
2
2
  import { t as customElement } from "../mono-element-CKcT0rwv.js";
3
- import { a as defineHybridPropAliases, i as defineHybridPropAlias, r as booleanStringConverter, t as __decorate } from "../decorate-DbYFpi8R.js";
4
- import { t as dispatchMonoEvent } from "../mono-event-BPku9HpS.js";
3
+ import { t as __decorate } from "../decorate-DbYFpi8R.js";
5
4
  import { s as placeSlotNode } from "../light-slots-B5Ck0t_E.js";
6
- import { t as MonoFormControlCore } from "../form-control-core-CRZPZ1ru.js";
7
- import { LitElement, html, nothing } from "lit";
8
- import { property, state } from "lit/decorators.js";
9
- import { ifDefined } from "lit/directives/if-defined.js";
5
+ import { n as validateSwitchProps, r as MonoSwitchCore, t as generateSwitchAttributes } from "../switch-utils-CTZ4id2V.js";
6
+ import { LitElement } from "lit";
7
+ import { state } from "lit/decorators.js";
10
8
 
11
- //#region src/components/switch/switch-core.ts
12
- /**
13
- * `MonoSwitchCore` — all render-mode-agnostic logic for `mono-switch`: reactive
14
- * props (incl. SSR boolean coercion), hybrid aliases, camelCase attribute
15
- * fallbacks, the `modelValue`↔`checked` sync, class computation, change
16
- * interactivity (`mno-change`), `focus`/`blur`, AND the shared `render()`
17
- * skeleton (`<label><input role=switch><track><thumb></track><labelBlock></label>`).
18
- * The slot-bearing label/description region is an overridable hook
19
- * (`_renderLabelBlock()`) that defaults to the light build's `[data-mono-slot]`
20
- * placeholders; the shadow build overrides it with native `<slot>` (mirrors
21
- * `mono-checkbox`). SSR-safe: no `document`/`window`; `focus`/`blur` query
22
- * `this.renderRoot`.
23
- */
24
- const MonoSwitchCore = (superClass) => {
25
- class MonoSwitchCoreClass extends MonoFormControlCore(superClass) {
26
- constructor(...args) {
27
- super(...args);
28
- this.size = "md";
29
- this.color = "primary";
30
- this.modelValue = false;
31
- this.checked = false;
32
- this.disabled = false;
33
- this.loading = false;
34
- this.label = "";
35
- this.sublabel = "";
36
- this.value = "";
37
- this.name = "";
38
- this.cssClass = {};
39
- this.cssClassName = "";
40
- this._hasLabelSlotState = false;
41
- this._hasDescriptionSlotState = false;
42
- defineHybridPropAliases(this, [
43
- "modelValue",
44
- "ariaLabelText",
45
- "cssClass"
46
- ]);
47
- defineHybridPropAlias(this, "description", "sublabel");
48
- Object.defineProperty(this, "css-class", {
49
- get: () => this.cssClass,
50
- set: (value) => this._setCssClass(value),
51
- configurable: true,
52
- enumerable: false
53
- });
54
- Object.defineProperty(this, "cssclass", {
55
- get: () => this.cssClass,
56
- set: (value) => this._setCssClass(value),
57
- configurable: true,
58
- enumerable: false
59
- });
60
- for (const alias of [
61
- "ariaLabel",
62
- "aria-label",
63
- "arialabel"
64
- ]) Object.defineProperty(this, alias, {
65
- get: () => this.ariaLabelText,
66
- set: (value) => {
67
- this.ariaLabelText = value == null ? void 0 : String(value);
68
- },
69
- configurable: true,
70
- enumerable: false
71
- });
72
- }
73
- static get observedAttributes() {
74
- return [
75
- ...super.observedAttributes ?? [],
76
- "modelvalue",
77
- "arialabeltext",
78
- "arialabel",
79
- "description",
80
- "css-class",
81
- "cssclass"
82
- ];
83
- }
84
- attributeChangedCallback(name, oldValue, newValue) {
85
- super.attributeChangedCallback(name, oldValue, newValue);
86
- if (oldValue === newValue) return;
87
- if (name === "modelvalue") {
88
- this.modelValue = this._toBoolean(newValue);
89
- return;
90
- }
91
- if (name === "arialabeltext" || name === "arialabel") {
92
- this.ariaLabelText = newValue ?? void 0;
93
- return;
94
- }
95
- if (name === "description") {
96
- this.sublabel = newValue ?? "";
97
- return;
98
- }
99
- if (name === "css-class" || name === "cssclass") this._setCssClass(newValue);
100
- }
101
- willUpdate(changed) {
102
- for (const key of [
103
- "modelValue",
104
- "checked",
105
- "disabled",
106
- "loading"
107
- ]) if (typeof this[key] === "string") this[key] = this._toBoolean(this[key]);
108
- if (changed.has("modelValue") && this.checked !== this.modelValue) this.checked = this.modelValue;
109
- if (changed.has("checked") && this.modelValue !== this.checked) this.modelValue = this.checked;
110
- super.willUpdate?.(changed);
111
- }
112
- _toBoolean(value) {
113
- if (typeof value === "boolean") return value;
114
- if (typeof value === "string") {
115
- const normalized = value.toLowerCase().trim();
116
- return normalized === "" || normalized === "true";
117
- }
118
- return Boolean(value);
119
- }
120
- _setCssClass(value) {
121
- if (value == null) {
122
- this.cssClass = {};
123
- this.cssClassName = "";
124
- return;
125
- }
126
- if (typeof value === "object") {
127
- this.cssClass = value;
128
- return;
129
- }
130
- if (typeof value === "string") {
131
- const trimmed = value.trim();
132
- if (!trimmed) {
133
- this.cssClass = {};
134
- this.cssClassName = "";
135
- return;
136
- }
137
- if (trimmed.startsWith("{") && trimmed.endsWith("}")) try {
138
- this.cssClass = JSON.parse(trimmed);
139
- return;
140
- } catch {}
141
- this.cssClassName = trimmed;
142
- }
143
- }
144
- _cls(base, key) {
145
- const extra = this.cssClass?.[key];
146
- return extra ? `${base} ${extra}` : base;
147
- }
148
- get _wrapperClasses() {
149
- return [
150
- "mono-switch",
151
- this.size,
152
- this.color,
153
- this.disabled ? "disabled" : "",
154
- this.loading ? "loading" : "",
155
- this.checked ? "mono-switch-checked" : "",
156
- this.cssClassName,
157
- this.cssClass?.root
158
- ].filter(Boolean).join(" ");
159
- }
160
- get _inputClasses() {
161
- return this._cls("mono-switch-input", "input");
162
- }
163
- get _trackClasses() {
164
- return [this._cls("mono-switch-track", "track"), this.size].filter(Boolean).join(" ");
165
- }
166
- get _thumbClasses() {
167
- return [this._cls("mono-switch-thumb", "thumb"), this.size].filter(Boolean).join(" ");
168
- }
169
- _hasLabelContent() {
170
- return Boolean(this.label) || this._hasLabelSlotState;
171
- }
172
- _hasDescriptionContent() {
173
- return Boolean(this.sublabel) || this._hasDescriptionSlotState;
174
- }
175
- _createModelDetail(args) {
176
- return {
177
- modelValue: args.modelValue,
178
- currentValue: args.modelValue,
179
- oldValue: args.oldValue,
180
- checked: args.modelValue,
181
- value: this.value,
182
- name: this.name,
183
- sourceEvent: args.sourceEvent
184
- };
185
- }
186
- _emitChange(detail) {
187
- dispatchMonoEvent(this, "change", detail);
188
- }
189
- _handleChange(event) {
190
- if (this.disabled || this.loading) return;
191
- const input = event.currentTarget;
192
- const oldValue = this.modelValue;
193
- const nextValue = input.checked;
194
- this.checked = nextValue;
195
- this.modelValue = nextValue;
196
- const detail = this._createModelDetail({
197
- modelValue: nextValue,
198
- oldValue,
199
- sourceEvent: event
200
- });
201
- this._emitChange(detail);
202
- }
203
- /** Light-DOM label block (data-mono-slot). Shadow build overrides with `<slot>`. */
204
- _renderLabelBlock() {
205
- if (!this._hasLabelContent() && !this._hasDescriptionContent()) return nothing;
206
- return html`
207
- <span class=${this._cls("mono-switch-label", "label")} mono-label>
208
- ${this._hasLabelContent() ? html`
209
- <span class=${this._cls("mono-switch-label-text", "labelText")} mono-label-text>
210
- ${this._hasLabelSlotState ? html`<span data-mono-slot="label"></span>` : this.label}
211
- </span>
212
- ` : nothing}
213
-
214
- ${this._hasDescriptionContent() ? html`
215
- <span class=${this._cls("mono-switch-label-description", "description")} mono-description>
216
- ${this._hasDescriptionSlotState ? html`<span data-mono-slot="description"></span>` : this.sublabel}
217
- </span>
218
- ` : nothing}
219
- </span>
220
- `;
221
- }
222
- render() {
223
- const ariaLabel = this.ariaLabelText || this.label || (this._hasLabelSlotState ? "Switch" : void 0);
224
- return html`
225
- <label
226
- class=${this._wrapperClasses}
227
- mono-switch
228
- mono-size=${this.size === "md" ? nothing : this.size}
229
- mono-color=${this.color === "primary" ? nothing : this.color}
230
- ?mono-checked=${this.checked}
231
- ?mono-disabled=${this.disabled}
232
- ?mono-loading=${this.loading}
233
- >
234
- <input
235
- class=${this._inputClasses}
236
- mono-input
237
- type="checkbox"
238
- role="switch"
239
- .checked=${this.checked}
240
- .value=${this.value}
241
- name=${ifDefined(this.name || void 0)}
242
- ?disabled=${this.disabled || this.loading}
243
- aria-checked=${String(this.checked)}
244
- aria-label=${ifDefined(ariaLabel)}
245
- @change=${this._handleChange}
246
- />
247
-
248
- <span class=${this._trackClasses} mono-track aria-hidden="true">
249
- <span class=${this._thumbClasses} mono-thumb></span>
250
- </span>
251
-
252
- ${this._renderLabelBlock()}
253
- </label>
254
- `;
255
- }
256
- focus(options) {
257
- this.renderRoot.querySelector(".mono-switch-input")?.focus(options);
258
- }
259
- blur() {
260
- this.renderRoot.querySelector(".mono-switch-input")?.blur();
261
- }
262
- }
263
- __decorate([property({ type: String })], MonoSwitchCoreClass.prototype, "size", void 0);
264
- __decorate([property({ type: String })], MonoSwitchCoreClass.prototype, "color", void 0);
265
- __decorate([property({
266
- attribute: "model-value",
267
- reflect: true,
268
- converter: booleanStringConverter
269
- })], MonoSwitchCoreClass.prototype, "modelValue", void 0);
270
- __decorate([property({
271
- reflect: true,
272
- converter: booleanStringConverter
273
- })], MonoSwitchCoreClass.prototype, "checked", void 0);
274
- __decorate([property({
275
- reflect: true,
276
- converter: booleanStringConverter
277
- })], MonoSwitchCoreClass.prototype, "disabled", void 0);
278
- __decorate([property({
279
- reflect: true,
280
- converter: booleanStringConverter
281
- })], MonoSwitchCoreClass.prototype, "loading", void 0);
282
- __decorate([property({ type: String })], MonoSwitchCoreClass.prototype, "label", void 0);
283
- __decorate([property({ type: String })], MonoSwitchCoreClass.prototype, "sublabel", void 0);
284
- __decorate([property({ type: String })], MonoSwitchCoreClass.prototype, "value", void 0);
285
- __decorate([property({ type: String })], MonoSwitchCoreClass.prototype, "name", void 0);
286
- __decorate([property({
287
- type: String,
288
- attribute: "aria-label"
289
- })], MonoSwitchCoreClass.prototype, "ariaLabelText", void 0);
290
- __decorate([property({ attribute: false })], MonoSwitchCoreClass.prototype, "cssClass", void 0);
291
- __decorate([property({ attribute: false })], MonoSwitchCoreClass.prototype, "cssClassName", void 0);
292
- __decorate([state()], MonoSwitchCoreClass.prototype, "_hasLabelSlotState", void 0);
293
- __decorate([state()], MonoSwitchCoreClass.prototype, "_hasDescriptionSlotState", void 0);
294
- return MonoSwitchCoreClass;
295
- };
296
-
297
- //#endregion
298
9
  //#region src/components/switch/mono-switch.ts
299
10
  let MonoSwitch = class MonoSwitch extends MonoSwitchCore(LitElement) {
300
11
  constructor(..._args) {
@@ -349,48 +60,5 @@ let MonoSwitch = class MonoSwitch extends MonoSwitchCore(LitElement) {
349
60
  __decorate([state()], MonoSwitch.prototype, "_slotsCaptured", void 0);
350
61
  MonoSwitch = __decorate([customElement("mono-switch")], MonoSwitch);
351
62
 
352
- //#endregion
353
- //#region src/components/switch/switch-utils.ts
354
- /**
355
- * Validate switch props
356
- */
357
- function validateSwitchProps(props) {
358
- const validSizes = [
359
- "xs",
360
- "sm",
361
- "md",
362
- "lg",
363
- "xl",
364
- "xxl"
365
- ];
366
- const validColors = [
367
- "primary",
368
- "secondary",
369
- "success",
370
- "danger",
371
- "warning",
372
- "info",
373
- "teal",
374
- "purple",
375
- "neutral",
376
- "dark"
377
- ];
378
- if (props.size && !validSizes.includes(props.size)) return false;
379
- if (props.color && !validColors.includes(props.color)) return false;
380
- return true;
381
- }
382
- /**
383
- * Generate ARIA attributes for accessibility
384
- */
385
- function generateSwitchAttributes(disabled, loading, checked, label) {
386
- return {
387
- "aria-disabled": disabled || loading ? "true" : void 0,
388
- "aria-busy": loading ? "true" : void 0,
389
- "aria-checked": String(checked),
390
- "role": "switch",
391
- "aria-label": label || void 0
392
- };
393
- }
394
-
395
63
  //#endregion
396
64
  export { MonoSwitch, generateSwitchAttributes, validateSwitchProps };