@mt-gloss/ui 0.0.10 → 0.0.11

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.
@@ -0,0 +1,1673 @@
1
+ import { jsx as n, jsxs as b } from "react/jsx-runtime";
2
+ import u, { useState as k, createContext as N, useContext as C } from "react";
3
+ import { createPortal as $ } from "react-dom";
4
+ import { AnimatePresence as w, motion as P } from "framer-motion";
5
+ import { useFloating as R, autoUpdate as x, offset as z, flip as M, shift as T, useDismiss as D, useRole as I, useInteractions as V } from "@floating-ui/react";
6
+ function p(s, a, e, o) {
7
+ const t = {}, r = {};
8
+ if (!s) return { style: t, dataAttrs: r };
9
+ for (const [l, d] of Object.entries(a)) {
10
+ const i = s[l];
11
+ i != null && i !== !1 && (t[d] = String(i));
12
+ }
13
+ if (e)
14
+ for (const [l, d] of Object.entries(e)) {
15
+ const i = s[l];
16
+ i != null && i !== !1 && (r[d] = String(i));
17
+ }
18
+ return { style: t, dataAttrs: r };
19
+ }
20
+ const O = {
21
+ bg: "--_bg",
22
+ color: "--_color",
23
+ borderColor: "--_border-color",
24
+ padding: "--_padding",
25
+ paddingX: "--_px",
26
+ radius: "--_radius",
27
+ elevation: "--_elevation",
28
+ fontSize: "--_font-size",
29
+ fontWeight: "--_font-weight",
30
+ minHeight: "--_min-height",
31
+ gap: "--_gap"
32
+ }, H = {
33
+ display: "data-display"
34
+ };
35
+ function E(s) {
36
+ const { as: a, definition: e, className: o, style: t, children: r, disabled: l, loading: d, ...i } = s, c = a || "button", { style: g, dataAttrs: _ } = p(e, O, H);
37
+ return l && (_["data-disabled"] = ""), d && (_["data-loading"] = ""), /* @__PURE__ */ n(
38
+ c,
39
+ {
40
+ className: o ? `gloss-base-button ${o}` : "gloss-base-button",
41
+ style: { ...g, ...t },
42
+ disabled: l || d,
43
+ ..._,
44
+ ...i,
45
+ children: r
46
+ }
47
+ );
48
+ }
49
+ E.displayName = "BaseButton";
50
+ const Oa = {
51
+ // Brand
52
+ BrandPrimary: "var(--gloss-color-brand-primary)",
53
+ BrandPrimaryHover: "var(--gloss-color-brand-primary-hover)",
54
+ BrandPrimaryActive: "var(--gloss-color-brand-primary-active)",
55
+ // Text
56
+ TextPrimary: "var(--gloss-color-text-primary)",
57
+ TextSecondary: "var(--gloss-color-text-secondary)",
58
+ TextTertiary: "var(--gloss-color-text-tertiary)",
59
+ TextInverse: "var(--gloss-color-text-inverse)",
60
+ TextError: "var(--gloss-color-text-error)",
61
+ TextSuccess: "var(--gloss-color-text-success)",
62
+ TextLink: "var(--gloss-color-text-link)",
63
+ // Backgrounds
64
+ BgPage: "var(--gloss-color-bg-page)",
65
+ BgSurface: "var(--gloss-color-bg-surface)",
66
+ BgMuted: "var(--gloss-color-bg-muted)",
67
+ BgHover: "var(--gloss-color-bg-hover)",
68
+ BgDisabled: "var(--gloss-color-bg-disabled)",
69
+ BgError: "var(--gloss-color-bg-error)",
70
+ BgSecondary: "var(--gloss-color-bg-secondary)",
71
+ BgSidebar: "var(--gloss-color-bg-sidebar)",
72
+ // Borders
73
+ BorderDefault: "var(--gloss-color-border-default)",
74
+ BorderHover: "var(--gloss-color-border-hover)",
75
+ BorderFocus: "var(--gloss-color-border-focus)",
76
+ BorderSuccess: "var(--gloss-color-border-success)",
77
+ BorderError: "var(--gloss-color-border-error)",
78
+ // Gray scale
79
+ Gray50: "var(--gloss-color-gray-50)",
80
+ Gray100: "var(--gloss-color-gray-100)",
81
+ Gray200: "var(--gloss-color-gray-200)",
82
+ Gray300: "var(--gloss-color-gray-300)",
83
+ Gray400: "var(--gloss-color-gray-400)",
84
+ Gray500: "var(--gloss-color-gray-500)",
85
+ Gray600: "var(--gloss-color-gray-600)",
86
+ Gray700: "var(--gloss-color-gray-700)",
87
+ Gray800: "var(--gloss-color-gray-800)",
88
+ Gray900: "var(--gloss-color-gray-900)",
89
+ // Blue scale
90
+ Blue50: "var(--gloss-color-blue-50)",
91
+ Blue100: "var(--gloss-color-blue-100)",
92
+ Blue200: "var(--gloss-color-blue-200)",
93
+ Blue300: "var(--gloss-color-blue-300)",
94
+ Blue400: "var(--gloss-color-blue-400)",
95
+ Blue500: "var(--gloss-color-blue-500)",
96
+ Blue600: "var(--gloss-color-blue-600)",
97
+ Blue700: "var(--gloss-color-blue-700)",
98
+ Blue800: "var(--gloss-color-blue-800)",
99
+ Blue900: "var(--gloss-color-blue-900)",
100
+ // Green scale
101
+ Green50: "var(--gloss-color-green-50)",
102
+ Green100: "var(--gloss-color-green-100)",
103
+ Green500: "var(--gloss-color-green-500)",
104
+ Green600: "var(--gloss-color-green-600)",
105
+ Green700: "var(--gloss-color-green-700)",
106
+ // Red scale
107
+ Red50: "var(--gloss-color-red-50)",
108
+ Red100: "var(--gloss-color-red-100)",
109
+ Red200: "var(--gloss-color-red-200)",
110
+ Red400: "var(--gloss-color-red-400)",
111
+ Red500: "var(--gloss-color-red-500)",
112
+ Red600: "var(--gloss-color-red-600)",
113
+ Red700: "var(--gloss-color-red-700)",
114
+ // Amber scale
115
+ Amber100: "var(--gloss-color-amber-100)",
116
+ Amber200: "var(--gloss-color-amber-200)",
117
+ Amber500: "var(--gloss-color-amber-500)",
118
+ Amber600: "var(--gloss-color-amber-600)",
119
+ // Base
120
+ White: "var(--gloss-color-white)"
121
+ }, Ha = {
122
+ None: "0",
123
+ Xs: "var(--gloss-spacing-1)",
124
+ Sm: "var(--gloss-spacing-2)",
125
+ Md: "var(--gloss-spacing-3)",
126
+ Lg: "var(--gloss-spacing-4)",
127
+ Xl: "var(--gloss-spacing-5)",
128
+ "2xl": "var(--gloss-spacing-6)",
129
+ "3xl": "var(--gloss-spacing-8)",
130
+ "4xl": "var(--gloss-spacing-10)",
131
+ "5xl": "var(--gloss-spacing-12)",
132
+ "6xl": "var(--gloss-spacing-16)"
133
+ }, Ea = {
134
+ Card: "var(--gloss-elevation-card)",
135
+ ButtonDefault: "var(--gloss-elevation-button-default)",
136
+ ButtonHover: "var(--gloss-elevation-button-hover)",
137
+ ButtonActive: "var(--gloss-elevation-button-active)",
138
+ Hover: "var(--gloss-elevation-hover)",
139
+ InputDefault: "var(--gloss-elevation-input-default)",
140
+ InputFocus: "var(--gloss-elevation-input-focus)",
141
+ Sidebar: "var(--gloss-elevation-sidebar)",
142
+ None: "none"
143
+ }, Ga = {
144
+ None: "0",
145
+ Xs: "var(--gloss-radius-xs)",
146
+ Sm: "var(--gloss-radius-sm)",
147
+ Md: "var(--gloss-radius-md)",
148
+ Lg: "var(--gloss-radius-lg)",
149
+ Xl: "var(--gloss-radius-xl)",
150
+ Full: "var(--gloss-radius-full)"
151
+ }, Fa = {
152
+ Dropdown: "var(--gloss-z-dropdown)",
153
+ Sticky: "var(--gloss-z-sticky)",
154
+ Overlay: "var(--gloss-z-overlay)",
155
+ Modal: "var(--gloss-z-modal)",
156
+ Popover: "var(--gloss-z-popover)",
157
+ Toast: "var(--gloss-z-toast)"
158
+ };
159
+ function G(s) {
160
+ const { as: a, definition: e, className: o, style: t, children: r, ...l } = s, d = a || "div", i = { ...t };
161
+ e?.padding && (i["--_padding"] = e.padding), e?.paddingX && (i["--_px"] = e.paddingX), e?.paddingY && (i["--_py"] = e.paddingY), e?.margin && (i["--_margin"] = e.margin), e?.gap && (i["--_gap"] = e.gap), e?.bg && (i["--_bg"] = e.bg), e?.border && (i["--_border"] = e.border), e?.radius && (i["--_radius"] = e.radius);
162
+ const c = {};
163
+ return e?.display && (c["data-display"] = e.display), e?.direction && (c["data-direction"] = e.direction), e?.align && (c["data-align"] = e.align), e?.justify && (c["data-justify"] = e.justify), e?.wrap && (c["data-wrap"] = ""), /* @__PURE__ */ n(
164
+ d,
165
+ {
166
+ className: o ? `gloss-base-box ${o}` : "gloss-base-box",
167
+ style: i,
168
+ ...c,
169
+ ...l,
170
+ children: r
171
+ }
172
+ );
173
+ }
174
+ G.displayName = "BaseBox";
175
+ function F(s) {
176
+ const { as: a, definition: e, className: o, style: t, children: r, ...l } = s, d = a || "div", i = { ...t };
177
+ e?.gap && (i["--_gap"] = e.gap), e?.padding && (i["--_padding"] = e.padding);
178
+ const c = {};
179
+ return e?.direction === "horizontal" && (c["data-direction"] = "horizontal"), e?.align && (c["data-align"] = e.align), e?.justify && (c["data-justify"] = e.justify), e?.wrap && (c["data-wrap"] = ""), /* @__PURE__ */ n(
180
+ d,
181
+ {
182
+ className: o ? `gloss-base-stack ${o}` : "gloss-base-stack",
183
+ style: i,
184
+ ...c,
185
+ ...l,
186
+ children: r
187
+ }
188
+ );
189
+ }
190
+ F.displayName = "BaseStack";
191
+ function j(s) {
192
+ const { as: a, definition: e, className: o, style: t, ...r } = s, l = a || "hr", d = { ...t };
193
+ e?.color && (d["--_color"] = e.color), e?.thickness && (d["--_thickness"] = e.thickness), e?.spacing && (d["--_spacing"] = e.spacing);
194
+ const i = {};
195
+ return e?.orientation === "vertical" && (i["data-orientation"] = "vertical"), /* @__PURE__ */ n(
196
+ l,
197
+ {
198
+ className: o ? `gloss-base-divider ${o}` : "gloss-base-divider",
199
+ style: d,
200
+ ...i,
201
+ ...r
202
+ }
203
+ );
204
+ }
205
+ j.displayName = "BaseDivider";
206
+ function h(s) {
207
+ const { as: a, definition: e, className: o, style: t, children: r, ...l } = s, d = a || "span", i = { ...t };
208
+ e?.fontFamily && (i["--_font-family"] = e.fontFamily), e?.fontSize && (i["--_font-size"] = e.fontSize), e?.fontWeight && (i["--_font-weight"] = e.fontWeight), e?.lineHeight && (i["--_line-height"] = e.lineHeight), e?.letterSpacing && (i["--_letter-spacing"] = e.letterSpacing), e?.color && (i["--_color"] = e.color);
209
+ const c = {};
210
+ return e?.align && (c["data-align"] = e.align), e?.truncate && (c["data-truncate"] = ""), e?.wrap && (c["data-wrap"] = e.wrap), /* @__PURE__ */ n(
211
+ d,
212
+ {
213
+ className: o ? `gloss-base-typography ${o}` : "gloss-base-typography",
214
+ style: i,
215
+ ...c,
216
+ ...l,
217
+ children: r
218
+ }
219
+ );
220
+ }
221
+ h.displayName = "BaseTypography";
222
+ const U = {
223
+ sm: 16,
224
+ md: 20,
225
+ lg: 24,
226
+ xl: 32
227
+ }, B = ({
228
+ name: s,
229
+ size: a = "md",
230
+ className: e = "",
231
+ ...o
232
+ }) => {
233
+ const t = U[a];
234
+ return /* @__PURE__ */ n(
235
+ "svg",
236
+ {
237
+ width: t,
238
+ height: t,
239
+ className: e,
240
+ "aria-hidden": "true",
241
+ focusable: "false",
242
+ ...o,
243
+ children: /* @__PURE__ */ n("use", { href: `#${s}` })
244
+ }
245
+ );
246
+ };
247
+ B.displayName = "Icon";
248
+ function X(s) {
249
+ const { definition: a, name: e, icon: o, className: t, style: r } = s;
250
+ if (!e && !o) return null;
251
+ const l = { ...r };
252
+ a?.color && (l["--_color"] = a.color);
253
+ const d = {};
254
+ return a?.size && (d["data-size"] = a.size), /* @__PURE__ */ n(
255
+ "span",
256
+ {
257
+ className: t ? `gloss-base-icon ${t}` : "gloss-base-icon",
258
+ style: l,
259
+ ...d,
260
+ children: e ? /* @__PURE__ */ n(B, { name: e, size: a?.size ?? "md" }) : o
261
+ }
262
+ );
263
+ }
264
+ X.displayName = "BaseIcon";
265
+ function W(s) {
266
+ const {
267
+ open: a,
268
+ placement: e = "bottom",
269
+ offsetValue: o = 8,
270
+ onOpenChange: t,
271
+ anchorEl: r
272
+ } = s;
273
+ return R({
274
+ open: a,
275
+ onOpenChange: t,
276
+ placement: e,
277
+ middleware: [z(o), M(), T()],
278
+ whileElementsMounted: x,
279
+ ...r ? { elements: { reference: r } } : {}
280
+ });
281
+ }
282
+ function L(s) {
283
+ const {
284
+ context: a,
285
+ outsidePress: e = !0,
286
+ escapeKey: o = !0,
287
+ role: t = "dialog"
288
+ } = s, r = D(a, { outsidePress: e, escapeKey: o }), l = I(a, { role: t }), { getFloatingProps: d, getReferenceProps: i } = V([
289
+ r,
290
+ l
291
+ ]);
292
+ return { getFloatingProps: d, getReferenceProps: i };
293
+ }
294
+ function S(s) {
295
+ const { definition: a, open: e, onDismiss: o, anchorRef: t, className: r, style: l, children: d } = s, i = (m) => {
296
+ !m && o && o();
297
+ }, c = W({
298
+ open: e,
299
+ placement: a?.placement,
300
+ offsetValue: a?.offset,
301
+ onOpenChange: i,
302
+ anchorEl: t?.current ?? void 0
303
+ }), { getFloatingProps: g } = L({
304
+ context: c.context,
305
+ outsidePress: a?.dismissOnClickOutside ?? !0,
306
+ escapeKey: a?.dismissOnEscape ?? !0,
307
+ role: a?.role ?? "dialog"
308
+ }), _ = { ...l };
309
+ a?.bg && (_["--_bg"] = a.bg), a?.shadow && (_["--_shadow"] = a.shadow), a?.radius && (_["--_radius"] = a.radius), a?.padding && (_["--_padding"] = a.padding), a?.zIndex && (_["--_z-index"] = a.zIndex);
310
+ const f = a?.portal !== !1, v = !!t?.current, y = /* @__PURE__ */ n(w, { children: e && /* @__PURE__ */ n(
311
+ P.div,
312
+ {
313
+ ref: c.refs.setFloating,
314
+ className: r ? `gloss-base-overlay ${r}` : "gloss-base-overlay",
315
+ style: v ? { ...c.floatingStyles, ..._ } : _,
316
+ initial: { opacity: 0, scale: 0.95 },
317
+ animate: { opacity: 1, scale: 1 },
318
+ exit: { opacity: 0, scale: 0.95 },
319
+ transition: { duration: 0.15 },
320
+ ...g(),
321
+ children: d
322
+ }
323
+ ) });
324
+ return f && typeof document < "u" ? $(y, document.body) : y;
325
+ }
326
+ S.displayName = "BaseOverlay";
327
+ const K = {
328
+ bg: "--_bg",
329
+ color: "--_color",
330
+ borderColor: "--_border-color",
331
+ padding: "--_padding",
332
+ paddingX: "--_px",
333
+ radius: "--_radius",
334
+ fontSize: "--_font-size",
335
+ minHeight: "--_min-height",
336
+ placeholderColor: "--_placeholder-color"
337
+ }, Y = {}, Z = u.forwardRef(
338
+ ({ definition: s, className: a, style: e, label: o, helperText: t, required: r, status: l = "default", ...d }, i) => {
339
+ const { style: c, dataAttrs: g } = p(s, K, Y);
340
+ l !== "default" && (g["data-status"] = l), d.disabled && (g["data-disabled"] = ""), d.readOnly && (g["data-readonly"] = "");
341
+ const _ = /* @__PURE__ */ n(
342
+ "input",
343
+ {
344
+ ref: i,
345
+ className: a ? `gloss-base-input ${a}` : "gloss-base-input",
346
+ style: { ...c, ...e },
347
+ required: r,
348
+ ...g,
349
+ ...d
350
+ }
351
+ );
352
+ return !o && !t ? _ : /* @__PURE__ */ b("div", { className: "gloss-base-input__wrapper", children: [
353
+ o && /* @__PURE__ */ b("label", { className: "gloss-base-input__label", children: [
354
+ o,
355
+ r && /* @__PURE__ */ n("span", { className: "gloss-base-input__required", children: "*" })
356
+ ] }),
357
+ _,
358
+ t && /* @__PURE__ */ n("div", { className: "gloss-base-input__helper", children: t })
359
+ ] });
360
+ }
361
+ );
362
+ Z.displayName = "BaseInput";
363
+ const q = {
364
+ bg: "--_bg",
365
+ color: "--_color",
366
+ borderColor: "--_border-color",
367
+ padding: "--_padding",
368
+ paddingX: "--_px",
369
+ radius: "--_radius",
370
+ fontSize: "--_font-size",
371
+ minHeight: "--_min-height",
372
+ placeholderColor: "--_placeholder-color",
373
+ minRows: "--_min-rows",
374
+ maxRows: "--_max-rows"
375
+ }, J = {
376
+ resize: "data-resize"
377
+ }, Q = u.forwardRef(
378
+ ({ definition: s, className: a, style: e, label: o, helperText: t, required: r, status: l = "default", ...d }, i) => {
379
+ const { style: c, dataAttrs: g } = p(s, q, J);
380
+ l !== "default" && (g["data-status"] = l), d.disabled && (g["data-disabled"] = ""), d.readOnly && (g["data-readonly"] = "");
381
+ const _ = /* @__PURE__ */ n(
382
+ "textarea",
383
+ {
384
+ ref: i,
385
+ className: a ? `gloss-base-textarea ${a}` : "gloss-base-textarea",
386
+ style: { ...c, ...e },
387
+ required: r,
388
+ ...g,
389
+ ...d
390
+ }
391
+ );
392
+ return !o && !t ? _ : /* @__PURE__ */ b("div", { className: "gloss-base-textarea__wrapper", children: [
393
+ o && /* @__PURE__ */ b("label", { className: "gloss-base-textarea__label", children: [
394
+ o,
395
+ r && /* @__PURE__ */ n("span", { className: "gloss-base-textarea__required", children: "*" })
396
+ ] }),
397
+ _,
398
+ t && /* @__PURE__ */ n("div", { className: "gloss-base-textarea__helper", children: t })
399
+ ] });
400
+ }
401
+ );
402
+ Q.displayName = "BaseTextarea";
403
+ const ee = {
404
+ trackBg: "--_track-bg",
405
+ trackBorder: "--_track-border",
406
+ checkColor: "--_check-color",
407
+ trackSize: "--_track-size",
408
+ trackRadius: "--_track-radius"
409
+ }, ae = u.forwardRef(
410
+ ({ definition: s, className: a, style: e, indeterminate: o, children: t, checked: r, disabled: l, ...d }, i) => {
411
+ const { style: c, dataAttrs: g } = p(s, ee);
412
+ l && (g["data-disabled"] = ""), r && (g["data-checked"] = ""), o && (g["data-indeterminate"] = "");
413
+ const _ = u.useCallback(
414
+ (f) => {
415
+ f && (f.indeterminate = !!o), typeof i == "function" ? i(f) : i && (i.current = f);
416
+ },
417
+ [o, i]
418
+ );
419
+ return /* @__PURE__ */ b(
420
+ "label",
421
+ {
422
+ className: a ? `gloss-base-checkbox ${a}` : "gloss-base-checkbox",
423
+ style: { ...c, ...e },
424
+ ...g,
425
+ children: [
426
+ /* @__PURE__ */ n(
427
+ "input",
428
+ {
429
+ ref: _,
430
+ type: "checkbox",
431
+ className: "gloss-base-checkbox__input",
432
+ checked: r,
433
+ disabled: l,
434
+ ...d
435
+ }
436
+ ),
437
+ /* @__PURE__ */ n("span", { className: "gloss-base-checkbox__track" }),
438
+ t
439
+ ]
440
+ }
441
+ );
442
+ }
443
+ );
444
+ ae.displayName = "BaseCheckbox";
445
+ const se = {
446
+ trackBg: "--_track-bg",
447
+ trackBorder: "--_track-border",
448
+ dotColor: "--_dot-color",
449
+ trackSize: "--_track-size"
450
+ }, oe = u.forwardRef(
451
+ ({ definition: s, className: a, style: e, children: o, checked: t, disabled: r, ...l }, d) => {
452
+ const { style: i, dataAttrs: c } = p(s, se);
453
+ return r && (c["data-disabled"] = ""), t && (c["data-checked"] = ""), /* @__PURE__ */ b(
454
+ "label",
455
+ {
456
+ className: a ? `gloss-base-radio ${a}` : "gloss-base-radio",
457
+ style: { ...i, ...e },
458
+ ...c,
459
+ children: [
460
+ /* @__PURE__ */ n(
461
+ "input",
462
+ {
463
+ ref: d,
464
+ type: "radio",
465
+ className: "gloss-base-radio__input",
466
+ checked: t,
467
+ disabled: r,
468
+ ...l
469
+ }
470
+ ),
471
+ /* @__PURE__ */ n("span", { className: "gloss-base-radio__track" }),
472
+ o
473
+ ]
474
+ }
475
+ );
476
+ }
477
+ );
478
+ oe.displayName = "BaseRadio";
479
+ const te = {
480
+ trackBg: "--_track-bg",
481
+ trackBgActive: "--_track-bg-active",
482
+ thumbBg: "--_thumb-bg",
483
+ trackWidth: "--_track-width",
484
+ trackHeight: "--_track-height",
485
+ thumbSize: "--_thumb-size"
486
+ }, re = u.forwardRef(
487
+ ({ definition: s, className: a, style: e, children: o, checked: t, disabled: r, ...l }, d) => {
488
+ const { style: i, dataAttrs: c } = p(s, te);
489
+ return r && (c["data-disabled"] = ""), t && (c["data-checked"] = ""), /* @__PURE__ */ b(
490
+ "label",
491
+ {
492
+ className: a ? `gloss-base-toggle ${a}` : "gloss-base-toggle",
493
+ style: { ...i, ...e },
494
+ ...c,
495
+ children: [
496
+ /* @__PURE__ */ n(
497
+ "input",
498
+ {
499
+ ref: d,
500
+ type: "checkbox",
501
+ role: "switch",
502
+ className: "gloss-base-toggle__input",
503
+ checked: t,
504
+ disabled: r,
505
+ ...l
506
+ }
507
+ ),
508
+ /* @__PURE__ */ n("span", { className: "gloss-base-toggle__track", children: /* @__PURE__ */ n("span", { className: "gloss-base-toggle__thumb" }) }),
509
+ o
510
+ ]
511
+ }
512
+ );
513
+ }
514
+ );
515
+ re.displayName = "BaseToggle";
516
+ const le = {
517
+ bg: "--_bg",
518
+ borderColor: "--_border-color",
519
+ radius: "--_radius",
520
+ fontSize: "--_font-size",
521
+ minHeight: "--_min-height",
522
+ padding: "--_padding"
523
+ };
524
+ function ie(s) {
525
+ const { definition: a, className: e, style: o, children: t, ...r } = s, { style: l, dataAttrs: d } = p(a, le);
526
+ return /* @__PURE__ */ n(
527
+ "div",
528
+ {
529
+ className: e ? `gloss-base-select ${e}` : "gloss-base-select",
530
+ style: { ...l, ...o },
531
+ ...d,
532
+ ...r,
533
+ children: t
534
+ }
535
+ );
536
+ }
537
+ ie.displayName = "BaseSelect";
538
+ const de = u.forwardRef(
539
+ ({ className: s, children: a, ...e }, o) => /* @__PURE__ */ n(
540
+ "button",
541
+ {
542
+ ref: o,
543
+ type: "button",
544
+ className: s ? `gloss-base-select__trigger ${s}` : "gloss-base-select__trigger",
545
+ ...e,
546
+ children: a
547
+ }
548
+ )
549
+ );
550
+ de.displayName = "BaseSelectTrigger";
551
+ const ne = {
552
+ bg: "--_dropdown-bg",
553
+ borderColor: "--_dropdown-border-color",
554
+ radius: "--_dropdown-radius",
555
+ elevation: "--_dropdown-elevation",
556
+ maxHeight: "--_dropdown-max-height"
557
+ };
558
+ function ce(s) {
559
+ const { definition: a, className: e, style: o, children: t, ...r } = s, { style: l } = p(a, ne);
560
+ return /* @__PURE__ */ n(
561
+ "div",
562
+ {
563
+ className: e ? `gloss-base-select__dropdown ${e}` : "gloss-base-select__dropdown",
564
+ style: { ...l, ...o },
565
+ role: "listbox",
566
+ ...r,
567
+ children: t
568
+ }
569
+ );
570
+ }
571
+ ce.displayName = "BaseSelectDropdown";
572
+ const ge = u.forwardRef(
573
+ ({ className: s, children: a, selected: e, disabled: o, ...t }, r) => {
574
+ const l = {};
575
+ return e && (l["data-selected"] = ""), o && (l["data-disabled"] = ""), /* @__PURE__ */ n(
576
+ "div",
577
+ {
578
+ ref: r,
579
+ role: "option",
580
+ "aria-selected": e,
581
+ "aria-disabled": o,
582
+ className: s ? `gloss-base-select__option ${s}` : "gloss-base-select__option",
583
+ ...l,
584
+ ...t,
585
+ children: a
586
+ }
587
+ );
588
+ }
589
+ );
590
+ ge.displayName = "BaseSelectOption";
591
+ function _e({ label: s, className: a, children: e, ...o }) {
592
+ return /* @__PURE__ */ b(
593
+ "div",
594
+ {
595
+ role: "group",
596
+ "aria-label": s,
597
+ className: a ? `gloss-base-select__group ${a}` : "gloss-base-select__group",
598
+ ...o,
599
+ children: [
600
+ s && /* @__PURE__ */ n("div", { className: "gloss-base-select__group-label", children: s }),
601
+ e
602
+ ]
603
+ }
604
+ );
605
+ }
606
+ _e.displayName = "BaseSelectGroup";
607
+ const pe = {
608
+ trackBg: "--_track-bg",
609
+ trackActiveBg: "--_track-active-bg",
610
+ thumbBg: "--_thumb-bg",
611
+ thumbBorder: "--_thumb-border",
612
+ thumbSize: "--_thumb-size",
613
+ trackHeight: "--_track-height",
614
+ thumbShadow: "--_thumb-shadow"
615
+ }, ue = {};
616
+ function be({
617
+ definition: s,
618
+ className: a,
619
+ style: e,
620
+ orientation: o = "horizontal",
621
+ disabled: t,
622
+ children: r,
623
+ ...l
624
+ }) {
625
+ const { style: d, dataAttrs: i } = p(s, pe, ue);
626
+ return o !== "horizontal" && (i["data-orientation"] = o), t && (i["data-disabled"] = ""), /* @__PURE__ */ n(
627
+ "div",
628
+ {
629
+ className: a ? `gloss-base-slider ${a}` : "gloss-base-slider",
630
+ style: { ...d, ...e },
631
+ ...i,
632
+ ...l,
633
+ children: r
634
+ }
635
+ );
636
+ }
637
+ be.displayName = "BaseSlider";
638
+ const fe = {
639
+ bg: "--_bg",
640
+ border: "--_border",
641
+ radius: "--_radius",
642
+ elevation: "--_elevation",
643
+ padding: "--_padding"
644
+ }, me = u.forwardRef(
645
+ ({ definition: s, className: a, style: e, children: o, ...t }, r) => {
646
+ const { style: l, dataAttrs: d } = p(s, fe);
647
+ return /* @__PURE__ */ n(
648
+ "div",
649
+ {
650
+ ref: r,
651
+ className: a ? `gloss-base-card ${a}` : "gloss-base-card",
652
+ style: { ...l, ...e },
653
+ ...d,
654
+ ...t,
655
+ children: o
656
+ }
657
+ );
658
+ }
659
+ );
660
+ me.displayName = "BaseCard";
661
+ const ye = u.forwardRef(
662
+ ({ definition: s, className: a, style: e, children: o, ...t }, r) => {
663
+ const l = { ...e };
664
+ return s?.padding && (l["--_header-padding"] = s.padding), /* @__PURE__ */ n(
665
+ "div",
666
+ {
667
+ ref: r,
668
+ className: a ? `gloss-base-card__header ${a}` : "gloss-base-card__header",
669
+ style: l,
670
+ ...t,
671
+ children: o
672
+ }
673
+ );
674
+ }
675
+ );
676
+ ye.displayName = "BaseCardHeader";
677
+ const ve = u.forwardRef(
678
+ ({ definition: s, className: a, style: e, children: o, ...t }, r) => {
679
+ const l = { ...e };
680
+ return s?.padding && (l["--_body-padding"] = s.padding), /* @__PURE__ */ n(
681
+ "div",
682
+ {
683
+ ref: r,
684
+ className: a ? `gloss-base-card__body ${a}` : "gloss-base-card__body",
685
+ style: l,
686
+ ...t,
687
+ children: o
688
+ }
689
+ );
690
+ }
691
+ );
692
+ ve.displayName = "BaseCardBody";
693
+ const he = u.forwardRef(
694
+ ({ definition: s, className: a, style: e, children: o, ...t }, r) => {
695
+ const l = { ...e };
696
+ return s?.padding && (l["--_footer-padding"] = s.padding), /* @__PURE__ */ n(
697
+ "div",
698
+ {
699
+ ref: r,
700
+ className: a ? `gloss-base-card__footer ${a}` : "gloss-base-card__footer",
701
+ style: l,
702
+ ...t,
703
+ children: o
704
+ }
705
+ );
706
+ }
707
+ );
708
+ he.displayName = "BaseCardFooter";
709
+ const Be = u.forwardRef(
710
+ ({ src: s, alt: a, height: e, className: o, style: t, children: r, ...l }, d) => {
711
+ const i = { ...t };
712
+ return e && (i.height = e), /* @__PURE__ */ n(
713
+ "div",
714
+ {
715
+ ref: d,
716
+ className: o ? `gloss-base-card__media ${o}` : "gloss-base-card__media",
717
+ style: i,
718
+ ...l,
719
+ children: s ? /* @__PURE__ */ n("img", { src: s, alt: a || "" }) : r
720
+ }
721
+ );
722
+ }
723
+ );
724
+ Be.displayName = "BaseCardMedia";
725
+ const Se = u.forwardRef(
726
+ ({ className: s, children: a, ...e }, o) => /* @__PURE__ */ n(
727
+ "h3",
728
+ {
729
+ ref: o,
730
+ className: s ? `gloss-base-card__title ${s}` : "gloss-base-card__title",
731
+ ...e,
732
+ children: a
733
+ }
734
+ )
735
+ );
736
+ Se.displayName = "BaseCardTitle";
737
+ const Ae = u.forwardRef(
738
+ ({ className: s, children: a, ...e }, o) => /* @__PURE__ */ n(
739
+ "p",
740
+ {
741
+ ref: o,
742
+ className: s ? `gloss-base-card__subtitle ${s}` : "gloss-base-card__subtitle",
743
+ ...e,
744
+ children: a
745
+ }
746
+ )
747
+ );
748
+ Ae.displayName = "BaseCardSubtitle";
749
+ const ke = u.forwardRef(
750
+ ({ className: s, children: a, ...e }, o) => /* @__PURE__ */ n(
751
+ "div",
752
+ {
753
+ ref: o,
754
+ className: s ? `gloss-base-card__actions ${s}` : "gloss-base-card__actions",
755
+ ...e,
756
+ children: a
757
+ }
758
+ )
759
+ );
760
+ ke.displayName = "BaseCardActions";
761
+ const Ne = {
762
+ borderColor: "--_border-color",
763
+ radius: "--_radius",
764
+ gap: "--_gap"
765
+ }, Ce = u.forwardRef(
766
+ ({ definition: s, className: a, style: e, children: o, ...t }, r) => {
767
+ const { style: l, dataAttrs: d } = p(s, Ne);
768
+ return /* @__PURE__ */ n(
769
+ "div",
770
+ {
771
+ ref: r,
772
+ className: a ? `gloss-base-accordion ${a}` : "gloss-base-accordion",
773
+ style: { ...l, ...e },
774
+ ...d,
775
+ ...t,
776
+ children: o
777
+ }
778
+ );
779
+ }
780
+ );
781
+ Ce.displayName = "BaseAccordion";
782
+ const $e = u.forwardRef(
783
+ ({ className: s, style: a, children: e, open: o, ...t }, r) => {
784
+ const l = {};
785
+ return o && (l["data-open"] = ""), /* @__PURE__ */ n(
786
+ "div",
787
+ {
788
+ ref: r,
789
+ className: s ? `gloss-base-accordion__item ${s}` : "gloss-base-accordion__item",
790
+ style: a,
791
+ ...l,
792
+ ...t,
793
+ children: e
794
+ }
795
+ );
796
+ }
797
+ );
798
+ $e.displayName = "BaseAccordionItem";
799
+ const we = u.forwardRef(
800
+ ({ className: s, children: a, ...e }, o) => /* @__PURE__ */ n(
801
+ "button",
802
+ {
803
+ ref: o,
804
+ type: "button",
805
+ className: s ? `gloss-base-accordion__trigger ${s}` : "gloss-base-accordion__trigger",
806
+ ...e,
807
+ children: a
808
+ }
809
+ )
810
+ );
811
+ we.displayName = "BaseAccordionTrigger";
812
+ const Pe = u.forwardRef(
813
+ ({ className: s, style: a, children: e, ...o }, t) => /* @__PURE__ */ n(
814
+ "div",
815
+ {
816
+ ref: t,
817
+ className: s ? `gloss-base-accordion__content ${s}` : "gloss-base-accordion__content",
818
+ style: a,
819
+ ...o,
820
+ children: e
821
+ }
822
+ )
823
+ );
824
+ Pe.displayName = "BaseAccordionContent";
825
+ const Re = {
826
+ bg: "--_bg",
827
+ borderColor: "--_border-color",
828
+ radius: "--_radius",
829
+ elevation: "--_elevation",
830
+ padding: "--_padding",
831
+ minWidth: "--_min-width"
832
+ }, xe = u.forwardRef(
833
+ ({ definition: s, className: a, style: e, children: o, ...t }, r) => {
834
+ const { style: l, dataAttrs: d } = p(s, Re);
835
+ return /* @__PURE__ */ n(
836
+ "div",
837
+ {
838
+ ref: r,
839
+ role: "menu",
840
+ className: a ? `gloss-base-menu ${a}` : "gloss-base-menu",
841
+ style: { ...l, ...e },
842
+ ...d,
843
+ ...t,
844
+ children: o
845
+ }
846
+ );
847
+ }
848
+ );
849
+ xe.displayName = "BaseMenu";
850
+ function ze({ label: s, className: a, style: e, children: o, ...t }) {
851
+ return /* @__PURE__ */ b(
852
+ "div",
853
+ {
854
+ role: "group",
855
+ "aria-label": s,
856
+ className: a ? `gloss-base-menu__group ${a}` : "gloss-base-menu__group",
857
+ style: e,
858
+ ...t,
859
+ children: [
860
+ s && /* @__PURE__ */ n("div", { className: "gloss-base-menu__group-label", children: s }),
861
+ o
862
+ ]
863
+ }
864
+ );
865
+ }
866
+ ze.displayName = "BaseMenuGroup";
867
+ const Me = {
868
+ padding: "--_item-padding",
869
+ fontSize: "--_item-font-size",
870
+ color: "--_item-color",
871
+ hoverBg: "--_item-hover-bg"
872
+ }, Te = u.forwardRef(
873
+ ({ definition: s, className: a, style: e, children: o, disabled: t, active: r, as: l = "div", ...d }, i) => {
874
+ const { style: c, dataAttrs: g } = p(s, Me);
875
+ return t && (g["data-disabled"] = ""), r && (g["data-active"] = ""), /* @__PURE__ */ n(
876
+ l,
877
+ {
878
+ ref: i,
879
+ role: "menuitem",
880
+ tabIndex: t ? -1 : 0,
881
+ "aria-disabled": t || void 0,
882
+ "aria-current": r ? "page" : void 0,
883
+ className: a ? `gloss-base-menu__item ${a}` : "gloss-base-menu__item",
884
+ style: { ...c, ...e },
885
+ ...g,
886
+ ...d,
887
+ children: o
888
+ }
889
+ );
890
+ }
891
+ );
892
+ Te.displayName = "BaseMenuItem";
893
+ function De({ className: s }) {
894
+ return /* @__PURE__ */ n(
895
+ "div",
896
+ {
897
+ role: "separator",
898
+ className: s ? `gloss-base-menu__divider ${s}` : "gloss-base-menu__divider"
899
+ }
900
+ );
901
+ }
902
+ De.displayName = "BaseMenuDivider";
903
+ const Ie = {
904
+ bg: "--_bg",
905
+ color: "--_color",
906
+ radius: "--_radius",
907
+ padding: "--_padding",
908
+ fontSize: "--_font-size",
909
+ maxWidth: "--_max-width",
910
+ arrowSize: "--_arrow-size"
911
+ }, Ve = {}, Oe = u.forwardRef(
912
+ ({ definition: s, className: a, style: e, children: o, placement: t = "top", ...r }, l) => {
913
+ const { style: d, dataAttrs: i } = p(s, Ie, Ve);
914
+ return i["data-placement"] = t, /* @__PURE__ */ b(
915
+ "div",
916
+ {
917
+ ref: l,
918
+ role: "tooltip",
919
+ className: a ? `gloss-base-tooltip ${a}` : "gloss-base-tooltip",
920
+ style: { ...d, ...e },
921
+ ...i,
922
+ ...r,
923
+ children: [
924
+ /* @__PURE__ */ n("div", { className: "gloss-base-tooltip__content", children: o }),
925
+ /* @__PURE__ */ n("div", { className: "gloss-base-tooltip__arrow" })
926
+ ]
927
+ }
928
+ );
929
+ }
930
+ );
931
+ Oe.displayName = "BaseTooltip";
932
+ const He = {
933
+ activeColor: "--_active-color",
934
+ inactiveColor: "--_inactive-color",
935
+ hoverColor: "--_hover-color",
936
+ starSize: "--_star-size",
937
+ gap: "--_gap"
938
+ }, Ee = u.forwardRef(
939
+ ({ definition: s, className: a, style: e, children: o, readOnly: t, disabled: r, ...l }, d) => {
940
+ const { style: i, dataAttrs: c } = p(s, He);
941
+ return t && (c["data-readonly"] = ""), r && (c["data-disabled"] = ""), /* @__PURE__ */ n(
942
+ "div",
943
+ {
944
+ ref: d,
945
+ role: "radiogroup",
946
+ className: a ? `gloss-base-rating ${a}` : "gloss-base-rating",
947
+ style: { ...i, ...e },
948
+ ...c,
949
+ ...l,
950
+ children: o
951
+ }
952
+ );
953
+ }
954
+ );
955
+ Ee.displayName = "BaseRating";
956
+ const Ge = {
957
+ bg: "--_bg",
958
+ activeBg: "--_active-bg",
959
+ borderColor: "--_border-color",
960
+ radius: "--_radius",
961
+ padding: "--_padding",
962
+ fontSize: "--_font-size"
963
+ }, Fe = u.forwardRef(
964
+ ({ definition: s, className: a, style: e, children: o, disabled: t, ...r }, l) => {
965
+ const { style: d, dataAttrs: i } = p(s, Ge);
966
+ return t && (i["data-disabled"] = ""), /* @__PURE__ */ n(
967
+ "div",
968
+ {
969
+ ref: l,
970
+ role: "radiogroup",
971
+ className: a ? `gloss-base-segmented-control ${a}` : "gloss-base-segmented-control",
972
+ style: { ...d, ...e },
973
+ ...i,
974
+ ...r,
975
+ children: o
976
+ }
977
+ );
978
+ }
979
+ );
980
+ Fe.displayName = "BaseSegmentedControl";
981
+ const je = {
982
+ bg: "--_bg",
983
+ borderColor: "--_border-color",
984
+ radius: "--_radius",
985
+ elevation: "--_elevation",
986
+ padding: "--_padding"
987
+ };
988
+ function Ue({ definition: s, className: a, style: e, children: o, ...t }) {
989
+ const { style: r, dataAttrs: l } = p(s, je);
990
+ return /* @__PURE__ */ n(
991
+ "div",
992
+ {
993
+ className: a ? `gloss-base-datepicker ${a}` : "gloss-base-datepicker",
994
+ style: { ...r, ...e },
995
+ ...l,
996
+ ...t,
997
+ children: o
998
+ }
999
+ );
1000
+ }
1001
+ Ue.displayName = "BaseDatePicker";
1002
+ function Xe({ className: s, style: a, children: e, ...o }) {
1003
+ return /* @__PURE__ */ n(
1004
+ "div",
1005
+ {
1006
+ className: s ? `gloss-base-datepicker__header ${s}` : "gloss-base-datepicker__header",
1007
+ style: a,
1008
+ ...o,
1009
+ children: e
1010
+ }
1011
+ );
1012
+ }
1013
+ Xe.displayName = "BaseDatePickerHeader";
1014
+ function We({ className: s, style: a, children: e, ...o }) {
1015
+ return /* @__PURE__ */ n(
1016
+ "div",
1017
+ {
1018
+ className: s ? `gloss-base-datepicker__calendar ${s}` : "gloss-base-datepicker__calendar",
1019
+ style: a,
1020
+ role: "grid",
1021
+ ...o,
1022
+ children: e
1023
+ }
1024
+ );
1025
+ }
1026
+ We.displayName = "BaseDatePickerCalendar";
1027
+ const Le = {
1028
+ bg: "--_day-bg",
1029
+ color: "--_day-color",
1030
+ radius: "--_day-radius",
1031
+ size: "--_day-size"
1032
+ };
1033
+ function Ke({
1034
+ definition: s,
1035
+ className: a,
1036
+ style: e,
1037
+ selected: o,
1038
+ today: t,
1039
+ outsideMonth: r,
1040
+ disabled: l,
1041
+ children: d,
1042
+ ...i
1043
+ }) {
1044
+ const { style: c, dataAttrs: g } = p(s, Le);
1045
+ return o && (g["data-selected"] = ""), t && (g["data-today"] = ""), l && (g["data-disabled"] = ""), r && (g["data-outside-month"] = ""), /* @__PURE__ */ n(
1046
+ "button",
1047
+ {
1048
+ type: "button",
1049
+ className: a ? `gloss-base-datepicker__day ${a}` : "gloss-base-datepicker__day",
1050
+ style: { ...c, ...e },
1051
+ disabled: l,
1052
+ ...g,
1053
+ ...i,
1054
+ children: d
1055
+ }
1056
+ );
1057
+ }
1058
+ Ke.displayName = "BaseDatePickerDay";
1059
+ const Ye = {
1060
+ bg: "--_bg",
1061
+ borderColor: "--_border-color",
1062
+ radius: "--_radius",
1063
+ elevation: "--_elevation",
1064
+ padding: "--_padding",
1065
+ cellHeight: "--_cell-height"
1066
+ };
1067
+ function Ze({ definition: s, className: a, style: e, children: o, ...t }) {
1068
+ const { style: r, dataAttrs: l } = p(s, Ye);
1069
+ return /* @__PURE__ */ n(
1070
+ "div",
1071
+ {
1072
+ className: a ? `gloss-base-timepicker ${a}` : "gloss-base-timepicker",
1073
+ style: { ...r, ...e },
1074
+ ...l,
1075
+ ...t,
1076
+ children: o
1077
+ }
1078
+ );
1079
+ }
1080
+ Ze.displayName = "BaseTimePicker";
1081
+ function qe({ className: s, style: a, children: e, ...o }) {
1082
+ return /* @__PURE__ */ n(
1083
+ "div",
1084
+ {
1085
+ className: s ? `gloss-base-timepicker__column ${s}` : "gloss-base-timepicker__column",
1086
+ style: a,
1087
+ role: "listbox",
1088
+ ...o,
1089
+ children: e
1090
+ }
1091
+ );
1092
+ }
1093
+ qe.displayName = "BaseTimePickerColumn";
1094
+ function Je({ className: s, style: a, selected: e, disabled: o, children: t, ...r }) {
1095
+ return /* @__PURE__ */ n(
1096
+ "button",
1097
+ {
1098
+ type: "button",
1099
+ className: s ? `gloss-base-timepicker__cell ${s}` : "gloss-base-timepicker__cell",
1100
+ style: a,
1101
+ role: "option",
1102
+ "aria-selected": e,
1103
+ disabled: o,
1104
+ "data-selected": e ? "" : void 0,
1105
+ "data-disabled": o ? "" : void 0,
1106
+ ...r,
1107
+ children: t
1108
+ }
1109
+ );
1110
+ }
1111
+ Je.displayName = "BaseTimePickerCell";
1112
+ const Qe = {
1113
+ bg: "--_bg",
1114
+ borderColor: "--_border-color",
1115
+ radius: "--_radius",
1116
+ elevation: "--_elevation",
1117
+ gap: "--_gap"
1118
+ };
1119
+ function ea({ definition: s, className: a, style: e, children: o, ...t }) {
1120
+ const { style: r, dataAttrs: l } = p(s, Qe);
1121
+ return /* @__PURE__ */ n(
1122
+ "div",
1123
+ {
1124
+ className: a ? `gloss-base-daterangepicker ${a}` : "gloss-base-daterangepicker",
1125
+ style: { ...r, ...e },
1126
+ ...l,
1127
+ ...t,
1128
+ children: o
1129
+ }
1130
+ );
1131
+ }
1132
+ ea.displayName = "BaseDateRangePicker";
1133
+ function aa({
1134
+ className: s,
1135
+ style: a,
1136
+ selected: e,
1137
+ today: o,
1138
+ outsideMonth: t,
1139
+ rangeStart: r,
1140
+ rangeEnd: l,
1141
+ inRange: d,
1142
+ disabled: i,
1143
+ children: c,
1144
+ ...g
1145
+ }) {
1146
+ const _ = {};
1147
+ return e && (_["data-selected"] = ""), o && (_["data-today"] = ""), t && (_["data-outside-month"] = ""), i && (_["data-disabled"] = ""), r && (_["data-range-start"] = ""), l && (_["data-range-end"] = ""), d && (_["data-in-range"] = ""), /* @__PURE__ */ n(
1148
+ "button",
1149
+ {
1150
+ type: "button",
1151
+ className: s ? `gloss-base-daterangepicker__day ${s}` : "gloss-base-daterangepicker__day",
1152
+ style: a,
1153
+ disabled: i,
1154
+ ..._,
1155
+ ...g,
1156
+ children: c
1157
+ }
1158
+ );
1159
+ }
1160
+ aa.displayName = "BaseDateRangePickerDay";
1161
+ const sa = {
1162
+ bg: "--_bg",
1163
+ color: "--_color",
1164
+ borderColor: "--_border-color",
1165
+ radius: "--_radius",
1166
+ fontSize: "--_font-size",
1167
+ padding: "--_padding",
1168
+ buttonBg: "--_button-bg",
1169
+ minHeight: "--_min-height"
1170
+ };
1171
+ function oa({ definition: s, className: a, style: e, disabled: o, children: t, ...r }) {
1172
+ const { style: l, dataAttrs: d } = p(s, sa);
1173
+ return o && (d["data-disabled"] = ""), /* @__PURE__ */ n(
1174
+ "div",
1175
+ {
1176
+ className: a ? `gloss-base-numberinput ${a}` : "gloss-base-numberinput",
1177
+ style: { ...l, ...e },
1178
+ ...d,
1179
+ ...r,
1180
+ children: t
1181
+ }
1182
+ );
1183
+ }
1184
+ oa.displayName = "BaseNumberInput";
1185
+ const ta = {
1186
+ bg: "--_bg",
1187
+ color: "--_color",
1188
+ borderColor: "--_border-color",
1189
+ padding: "--_padding",
1190
+ paddingX: "--_px",
1191
+ radius: "--_radius",
1192
+ fontSize: "--_font-size",
1193
+ minHeight: "--_min-height",
1194
+ placeholderColor: "--_placeholder-color",
1195
+ placeholderCharColor: "--_placeholder-char-color"
1196
+ }, ra = u.forwardRef(
1197
+ ({ definition: s, className: a, style: e, label: o, helperText: t, required: r, status: l = "default", ...d }, i) => {
1198
+ const { style: c, dataAttrs: g } = p(s, ta);
1199
+ l !== "default" && (g["data-status"] = l), d.disabled && (g["data-disabled"] = ""), d.readOnly && (g["data-readonly"] = "");
1200
+ const _ = /* @__PURE__ */ n(
1201
+ "input",
1202
+ {
1203
+ ref: i,
1204
+ className: a ? `gloss-base-maskedinput ${a}` : "gloss-base-maskedinput",
1205
+ style: { ...c, ...e },
1206
+ required: r,
1207
+ ...g,
1208
+ ...d
1209
+ }
1210
+ );
1211
+ return !o && !t ? _ : /* @__PURE__ */ b("div", { className: "gloss-base-maskedinput__wrapper", children: [
1212
+ o && /* @__PURE__ */ b("label", { className: "gloss-base-maskedinput__label", children: [
1213
+ o,
1214
+ r && /* @__PURE__ */ n("span", { className: "gloss-base-maskedinput__required", children: "*" })
1215
+ ] }),
1216
+ _,
1217
+ t && /* @__PURE__ */ n("div", { className: "gloss-base-maskedinput__helper", children: t })
1218
+ ] });
1219
+ }
1220
+ );
1221
+ ra.displayName = "BaseMaskedInput";
1222
+ const la = {
1223
+ bg: "--_bg",
1224
+ borderColor: "--_border-color",
1225
+ borderStyle: "--_border-style",
1226
+ radius: "--_radius",
1227
+ padding: "--_padding",
1228
+ minHeight: "--_min-height"
1229
+ };
1230
+ function ia({ definition: s, className: a, style: e, dragging: o, disabled: t, children: r, ...l }) {
1231
+ const { style: d, dataAttrs: i } = p(s, la);
1232
+ return o && (i["data-dragging"] = ""), t && (i["data-disabled"] = ""), /* @__PURE__ */ n(
1233
+ "div",
1234
+ {
1235
+ className: a ? `gloss-base-fileupload ${a}` : "gloss-base-fileupload",
1236
+ style: { ...d, ...e },
1237
+ ...i,
1238
+ ...l,
1239
+ children: r
1240
+ }
1241
+ );
1242
+ }
1243
+ ia.displayName = "BaseFileUpload";
1244
+ function da({ className: s, style: a, children: e, ...o }) {
1245
+ return /* @__PURE__ */ n(
1246
+ "div",
1247
+ {
1248
+ className: s ? `gloss-base-fileupload__list ${s}` : "gloss-base-fileupload__list",
1249
+ style: a,
1250
+ ...o,
1251
+ children: e
1252
+ }
1253
+ );
1254
+ }
1255
+ da.displayName = "BaseFileUploadList";
1256
+ function na({ className: s, style: a, error: e, children: o, ...t }) {
1257
+ return /* @__PURE__ */ n(
1258
+ "div",
1259
+ {
1260
+ className: s ? `gloss-base-fileupload__item ${s}` : "gloss-base-fileupload__item",
1261
+ style: a,
1262
+ "data-error": e ? "" : void 0,
1263
+ ...t,
1264
+ children: o
1265
+ }
1266
+ );
1267
+ }
1268
+ na.displayName = "BaseFileUploadItem";
1269
+ const ca = {
1270
+ radius: "--_radius",
1271
+ elevation: "--_elevation",
1272
+ padding: "--_padding",
1273
+ swatchSize: "--_swatch-size"
1274
+ };
1275
+ function ga({ definition: s, className: a, style: e, disabled: o, children: t, ...r }) {
1276
+ const { style: l, dataAttrs: d } = p(s, ca);
1277
+ return o && (d["data-disabled"] = ""), /* @__PURE__ */ n(
1278
+ "div",
1279
+ {
1280
+ className: a ? `gloss-base-colorpicker ${a}` : "gloss-base-colorpicker",
1281
+ style: { ...l, ...e },
1282
+ ...d,
1283
+ ...r,
1284
+ children: t
1285
+ }
1286
+ );
1287
+ }
1288
+ ga.displayName = "BaseColorPicker";
1289
+ function _a({ className: s, style: a, children: e, ...o }) {
1290
+ return /* @__PURE__ */ n(
1291
+ "div",
1292
+ {
1293
+ className: s ? `gloss-base-colorpicker__saturation ${s}` : "gloss-base-colorpicker__saturation",
1294
+ style: a,
1295
+ ...o,
1296
+ children: e
1297
+ }
1298
+ );
1299
+ }
1300
+ _a.displayName = "BaseColorPickerSaturation";
1301
+ function pa({ className: s, style: a, children: e, ...o }) {
1302
+ return /* @__PURE__ */ n(
1303
+ "div",
1304
+ {
1305
+ className: s ? `gloss-base-colorpicker__hue ${s}` : "gloss-base-colorpicker__hue",
1306
+ style: a,
1307
+ ...o,
1308
+ children: e
1309
+ }
1310
+ );
1311
+ }
1312
+ pa.displayName = "BaseColorPickerHue";
1313
+ function ua({ className: s, style: a, children: e, ...o }) {
1314
+ return /* @__PURE__ */ n(
1315
+ "div",
1316
+ {
1317
+ className: s ? `gloss-base-colorpicker__alpha ${s}` : "gloss-base-colorpicker__alpha",
1318
+ style: a,
1319
+ ...o,
1320
+ children: e
1321
+ }
1322
+ );
1323
+ }
1324
+ ua.displayName = "BaseColorPickerAlpha";
1325
+ function ba({ className: s, style: a, children: e, ...o }) {
1326
+ return /* @__PURE__ */ n(
1327
+ "div",
1328
+ {
1329
+ className: s ? `gloss-base-colorpicker__swatch ${s}` : "gloss-base-colorpicker__swatch",
1330
+ style: a,
1331
+ ...o,
1332
+ children: e
1333
+ }
1334
+ );
1335
+ }
1336
+ ba.displayName = "BaseColorPickerSwatch";
1337
+ const fa = {
1338
+ trackBg: "--_track-bg",
1339
+ trackActiveBg: "--_track-active-bg",
1340
+ thumbBg: "--_thumb-bg",
1341
+ thumbBorder: "--_thumb-border",
1342
+ thumbSize: "--_thumb-size",
1343
+ trackHeight: "--_track-height",
1344
+ thumbShadow: "--_thumb-shadow"
1345
+ };
1346
+ function ma({
1347
+ definition: s,
1348
+ className: a,
1349
+ style: e,
1350
+ orientation: o = "horizontal",
1351
+ disabled: t,
1352
+ collision: r,
1353
+ children: l,
1354
+ ...d
1355
+ }) {
1356
+ const { style: i, dataAttrs: c } = p(s, fa);
1357
+ return o !== "horizontal" && (c["data-orientation"] = o), t && (c["data-disabled"] = ""), r && (c["data-collision"] = ""), /* @__PURE__ */ n(
1358
+ "div",
1359
+ {
1360
+ className: a ? `gloss-base-rangeslider ${a}` : "gloss-base-rangeslider",
1361
+ style: { ...i, ...e },
1362
+ ...c,
1363
+ ...d,
1364
+ children: l
1365
+ }
1366
+ );
1367
+ }
1368
+ ma.displayName = "BaseRangeSlider";
1369
+ const ya = function(a) {
1370
+ const { as: e, className: o, ...t } = a;
1371
+ return /* @__PURE__ */ n(
1372
+ h,
1373
+ {
1374
+ as: e || "span",
1375
+ className: o ? `gloss-base-text ${o}` : "gloss-base-text",
1376
+ ...t
1377
+ }
1378
+ );
1379
+ };
1380
+ ya.displayName = "BaseText";
1381
+ function va({
1382
+ definition: s,
1383
+ open: a,
1384
+ onDismiss: e,
1385
+ anchorRef: o,
1386
+ className: t,
1387
+ style: r,
1388
+ children: l
1389
+ }) {
1390
+ const d = {
1391
+ placement: s?.placement ?? "bottom",
1392
+ offset: s?.offset ?? 8,
1393
+ portal: s?.portal,
1394
+ dismissOnClickOutside: s?.dismissOnClickOutside ?? !0,
1395
+ dismissOnEscape: s?.dismissOnEscape ?? !0,
1396
+ role: "dialog",
1397
+ bg: s?.bg,
1398
+ shadow: s?.shadow,
1399
+ radius: s?.radius,
1400
+ padding: s?.padding,
1401
+ zIndex: s?.zIndex
1402
+ }, i = s?.arrowSize ?? 8, c = { ...r };
1403
+ return s?.showArrow && (c["--_arrow-size"] = `${i}px`), /* @__PURE__ */ n(
1404
+ S,
1405
+ {
1406
+ definition: d,
1407
+ open: a,
1408
+ onDismiss: e,
1409
+ anchorRef: o,
1410
+ children: /* @__PURE__ */ b(
1411
+ "div",
1412
+ {
1413
+ className: t ? `gloss-base-popover ${t}` : "gloss-base-popover",
1414
+ style: c,
1415
+ children: [
1416
+ l,
1417
+ s?.showArrow && /* @__PURE__ */ n("div", { className: "gloss-base-popover__arrow" })
1418
+ ]
1419
+ }
1420
+ )
1421
+ }
1422
+ );
1423
+ }
1424
+ va.displayName = "BasePopover";
1425
+ const ha = {
1426
+ size: "--_size",
1427
+ bg: "--_bg",
1428
+ color: "--_color",
1429
+ fontSize: "--_font-size",
1430
+ radius: "--_radius"
1431
+ };
1432
+ function Ba(s) {
1433
+ const { definition: a, src: e, alt: o, className: t, style: r, children: l, ...d } = s, [i, c] = k(!1), { style: g, dataAttrs: _ } = p(a, ha), f = e && !i;
1434
+ return /* @__PURE__ */ n(
1435
+ "div",
1436
+ {
1437
+ className: t ? `gloss-base-avatar ${t}` : "gloss-base-avatar",
1438
+ style: { ...g, ...r },
1439
+ ..._,
1440
+ ...d,
1441
+ children: f ? /* @__PURE__ */ n(
1442
+ "img",
1443
+ {
1444
+ src: e,
1445
+ alt: o || "",
1446
+ onError: () => c(!0)
1447
+ }
1448
+ ) : l
1449
+ }
1450
+ );
1451
+ }
1452
+ Ba.displayName = "BaseAvatar";
1453
+ const Sa = {
1454
+ trackBg: "--_track-bg",
1455
+ fillBg: "--_fill-bg",
1456
+ height: "--_height",
1457
+ radius: "--_radius"
1458
+ };
1459
+ function Aa(s) {
1460
+ const { definition: a, value: e, max: o = 100, indeterminate: t = !1, className: r, style: l, ...d } = s, { style: i, dataAttrs: c } = p(a, Sa);
1461
+ t && (c["data-indeterminate"] = "");
1462
+ const g = t ? void 0 : `${Math.min(100, (e || 0) / (o || 100) * 100)}%`;
1463
+ return /* @__PURE__ */ n(
1464
+ "div",
1465
+ {
1466
+ role: "progressbar",
1467
+ "aria-valuenow": t ? void 0 : e || 0,
1468
+ "aria-valuemin": 0,
1469
+ "aria-valuemax": o,
1470
+ className: r ? `gloss-base-progress-bar ${r}` : "gloss-base-progress-bar",
1471
+ style: { ...i, ...l },
1472
+ ...c,
1473
+ ...d,
1474
+ children: /* @__PURE__ */ n(
1475
+ "div",
1476
+ {
1477
+ className: "gloss-base-progress-bar__fill",
1478
+ style: g ? { width: g } : void 0
1479
+ }
1480
+ )
1481
+ }
1482
+ );
1483
+ }
1484
+ Aa.displayName = "BaseProgressBar";
1485
+ const ka = {
1486
+ bg: "--_bg",
1487
+ color: "--_color",
1488
+ padding: "--_padding",
1489
+ paddingX: "--_px",
1490
+ radius: "--_radius",
1491
+ fontSize: "--_font-size",
1492
+ fontWeight: "--_font-weight"
1493
+ };
1494
+ function Na(s) {
1495
+ const { as: a, definition: e, className: o, style: t, dot: r, children: l, ...d } = s, i = a || "span", { style: c, dataAttrs: g } = p(e, ka);
1496
+ return r && (g["data-dot"] = ""), /* @__PURE__ */ n(
1497
+ i,
1498
+ {
1499
+ className: o ? `gloss-base-badge ${o}` : "gloss-base-badge",
1500
+ style: { ...c, ...t },
1501
+ ...g,
1502
+ ...d,
1503
+ children: !r && l
1504
+ }
1505
+ );
1506
+ }
1507
+ Na.displayName = "BaseBadge";
1508
+ const Ca = {
1509
+ bg: "--_bg",
1510
+ color: "--_color",
1511
+ borderColor: "--_border-color",
1512
+ padding: "--_padding",
1513
+ paddingX: "--_px",
1514
+ radius: "--_radius",
1515
+ fontSize: "--_font-size",
1516
+ fontWeight: "--_font-weight",
1517
+ gap: "--_gap"
1518
+ };
1519
+ function $a(s) {
1520
+ const {
1521
+ as: a,
1522
+ definition: e,
1523
+ className: o,
1524
+ style: t,
1525
+ disabled: r,
1526
+ clickable: l,
1527
+ selected: d,
1528
+ avatar: i,
1529
+ leftIcon: c,
1530
+ deleteButton: g,
1531
+ children: _,
1532
+ ...f
1533
+ } = s, v = a || "span", { style: y, dataAttrs: m } = p(e, Ca);
1534
+ return r && (m["data-disabled"] = ""), l && (m["data-clickable"] = ""), d && (m["data-selected"] = ""), /* @__PURE__ */ b(
1535
+ v,
1536
+ {
1537
+ className: o ? `gloss-base-chip ${o}` : "gloss-base-chip",
1538
+ style: { ...y, ...t },
1539
+ ...m,
1540
+ ...f,
1541
+ children: [
1542
+ i && /* @__PURE__ */ n("span", { className: "gloss-base-chip__avatar", children: i }),
1543
+ c && /* @__PURE__ */ n("span", { className: "gloss-base-chip__icon", children: c }),
1544
+ /* @__PURE__ */ n("span", { className: "gloss-base-chip__label", children: _ }),
1545
+ g && /* @__PURE__ */ n("span", { className: "gloss-base-chip__delete", children: g })
1546
+ ]
1547
+ }
1548
+ );
1549
+ }
1550
+ $a.displayName = "BaseChip";
1551
+ const wa = {
1552
+ color: "--_color",
1553
+ fontSize: "--_font-size",
1554
+ fontWeight: "--_font-weight",
1555
+ gap: "--_gap"
1556
+ }, Pa = {
1557
+ underline: "data-underline"
1558
+ };
1559
+ function Ra(s) {
1560
+ const { as: a, definition: e, className: o, style: t, disabled: r, leftIcon: l, rightIcon: d, children: i, ...c } = s, g = a || "a", { style: _, dataAttrs: f } = p(e, wa, Pa);
1561
+ return r && (f["data-disabled"] = ""), /* @__PURE__ */ b(
1562
+ g,
1563
+ {
1564
+ className: o ? `gloss-base-link ${o}` : "gloss-base-link",
1565
+ style: { ..._, ...t },
1566
+ ...f,
1567
+ ...c,
1568
+ children: [
1569
+ l && /* @__PURE__ */ n("span", { className: "gloss-base-link__icon gloss-base-link__icon--left", children: l }),
1570
+ /* @__PURE__ */ n("span", { className: "gloss-base-link__text", children: i }),
1571
+ d && /* @__PURE__ */ n("span", { className: "gloss-base-link__icon gloss-base-link__icon--right", children: d })
1572
+ ]
1573
+ }
1574
+ );
1575
+ }
1576
+ Ra.displayName = "BaseLink";
1577
+ const xa = { region: null, density: "default" }, A = N(xa);
1578
+ function ja() {
1579
+ return C(A);
1580
+ }
1581
+ function za({ region: s, density: a = "default", children: e }) {
1582
+ const o = { region: s, density: a };
1583
+ return u.createElement(
1584
+ A.Provider,
1585
+ { value: o },
1586
+ u.createElement(
1587
+ "div",
1588
+ {
1589
+ "data-region": s,
1590
+ "data-density": a,
1591
+ className: "gloss-ui-context"
1592
+ },
1593
+ e
1594
+ )
1595
+ );
1596
+ }
1597
+ za.displayName = "UIContextProvider";
1598
+ export {
1599
+ ea as $,
1600
+ Ae as A,
1601
+ va as B,
1602
+ Oa as C,
1603
+ ke as D,
1604
+ Ea as E,
1605
+ Ce as F,
1606
+ $e as G,
1607
+ we as H,
1608
+ Pe as I,
1609
+ xe as J,
1610
+ ze as K,
1611
+ Te as L,
1612
+ De as M,
1613
+ Oe as N,
1614
+ Ee as O,
1615
+ Fe as P,
1616
+ Ue as Q,
1617
+ Ga as R,
1618
+ Ha as S,
1619
+ Xe as T,
1620
+ za as U,
1621
+ We as V,
1622
+ Ke as W,
1623
+ Ze as X,
1624
+ qe as Y,
1625
+ Fa as Z,
1626
+ Je as _,
1627
+ A as a,
1628
+ aa as a0,
1629
+ oa as a1,
1630
+ ra as a2,
1631
+ ia as a3,
1632
+ da as a4,
1633
+ na as a5,
1634
+ ga as a6,
1635
+ _a as a7,
1636
+ pa as a8,
1637
+ ua as a9,
1638
+ ba as aa,
1639
+ ma as ab,
1640
+ ya as ac,
1641
+ Ba as ad,
1642
+ Aa as ae,
1643
+ Na as af,
1644
+ $a as ag,
1645
+ Ra as ah,
1646
+ B as ai,
1647
+ p as aj,
1648
+ S as b,
1649
+ G as c,
1650
+ F as d,
1651
+ j as e,
1652
+ h as f,
1653
+ X as g,
1654
+ E as h,
1655
+ Z as i,
1656
+ Q as j,
1657
+ ae as k,
1658
+ oe as l,
1659
+ re as m,
1660
+ ie as n,
1661
+ de as o,
1662
+ ce as p,
1663
+ ge as q,
1664
+ _e as r,
1665
+ be as s,
1666
+ me as t,
1667
+ ja as u,
1668
+ ye as v,
1669
+ ve as w,
1670
+ he as x,
1671
+ Be as y,
1672
+ Se as z
1673
+ };