@inf-monkeys-tech/monkeys-design 0.4.55 → 0.4.56

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 (91) hide show
  1. package/README.md +29 -5
  2. package/dist/{LandingPage-CR5KyIwR.d.mts → LandingPage-D7FF9gnM.d.mts} +3 -3
  3. package/dist/{LandingPage-CR5KyIwR.d.ts → LandingPage-D7FF9gnM.d.ts} +3 -3
  4. package/dist/components/base/index.d.mts +3 -3
  5. package/dist/components/base/index.d.ts +3 -3
  6. package/dist/components/base/index.js +7229 -2042
  7. package/dist/components/base/index.js.map +1 -1
  8. package/dist/components/base/index.mjs +7215 -2052
  9. package/dist/components/base/index.mjs.map +1 -1
  10. package/dist/components/data-explorer/index.d.mts +1 -1
  11. package/dist/components/data-explorer/index.d.ts +1 -1
  12. package/dist/components/data-explorer/index.js +166 -10
  13. package/dist/components/data-explorer/index.js.map +1 -1
  14. package/dist/components/data-explorer/index.mjs +167 -11
  15. package/dist/components/data-explorer/index.mjs.map +1 -1
  16. package/dist/components/layout/index.d.mts +1 -1
  17. package/dist/components/layout/index.d.ts +1 -1
  18. package/dist/components/layout/index.js +769 -1603
  19. package/dist/components/layout/index.js.map +1 -1
  20. package/dist/components/layout/index.mjs +772 -1607
  21. package/dist/components/layout/index.mjs.map +1 -1
  22. package/dist/components/login/index.d.mts +29 -29
  23. package/dist/components/login/index.d.ts +29 -29
  24. package/dist/components/toast/index.d.mts +2 -6
  25. package/dist/components/toast/index.d.ts +2 -6
  26. package/dist/components/toast/index.js +173 -11
  27. package/dist/components/toast/index.js.map +1 -1
  28. package/dist/components/toast/index.mjs +174 -12
  29. package/dist/components/toast/index.mjs.map +1 -1
  30. package/dist/components/toolbar/index.js +231 -21
  31. package/dist/components/toolbar/index.js.map +1 -1
  32. package/dist/components/toolbar/index.mjs +231 -21
  33. package/dist/components/toolbar/index.mjs.map +1 -1
  34. package/dist/components/workbench/index.d.mts +6 -6
  35. package/dist/components/workbench/index.d.ts +6 -6
  36. package/dist/components/workbench/index.js +2281 -1030
  37. package/dist/components/workbench/index.js.map +1 -1
  38. package/dist/components/workbench/index.mjs +2282 -1031
  39. package/dist/components/workbench/index.mjs.map +1 -1
  40. package/dist/icons/oauth/index.d.mts +5 -5
  41. package/dist/icons/oauth/index.d.ts +5 -5
  42. package/dist/index.d.mts +12 -8
  43. package/dist/index.d.ts +12 -8
  44. package/dist/index.js +7911 -4772
  45. package/dist/index.js.map +1 -1
  46. package/dist/index.mjs +7874 -4773
  47. package/dist/index.mjs.map +1 -1
  48. package/dist/locale/index.d.mts +236 -0
  49. package/dist/locale/index.d.ts +236 -0
  50. package/dist/locale/index.js +338 -0
  51. package/dist/locale/index.js.map +1 -0
  52. package/dist/locale/index.mjs +332 -0
  53. package/dist/locale/index.mjs.map +1 -0
  54. package/dist/palette/index.js +259 -2748
  55. package/dist/palette/index.js.map +1 -1
  56. package/dist/palette/index.mjs +255 -2748
  57. package/dist/palette/index.mjs.map +1 -1
  58. package/dist/provider/index.d.mts +51 -0
  59. package/dist/provider/index.d.ts +51 -0
  60. package/dist/provider/index.js +2688 -0
  61. package/dist/provider/index.js.map +1 -0
  62. package/dist/provider/index.mjs +2677 -0
  63. package/dist/provider/index.mjs.map +1 -0
  64. package/dist/styles.css +1 -0
  65. package/dist/theme-CJlW1TtA.d.mts +142 -0
  66. package/dist/{theme-CUATVszl.d.mts → theme-CplaoMqT.d.mts} +2 -2
  67. package/dist/{theme-BuvXrHFY.d.ts → theme-DPVX8CfK.d.ts} +2 -2
  68. package/dist/theme-r7GYhlCk.d.ts +142 -0
  69. package/dist/theme-system/index.d.mts +5 -92
  70. package/dist/theme-system/index.d.ts +5 -92
  71. package/dist/theme-system/index.js +295 -4329
  72. package/dist/theme-system/index.js.map +1 -1
  73. package/dist/theme-system/index.mjs +183 -4221
  74. package/dist/theme-system/index.mjs.map +1 -1
  75. package/dist/themes/artist/index.d.mts +3 -3
  76. package/dist/themes/artist/index.d.ts +3 -3
  77. package/dist/themes/bsd/index.d.mts +3 -3
  78. package/dist/themes/bsd/index.d.ts +3 -3
  79. package/dist/themes/concept/index.d.mts +2 -2
  80. package/dist/themes/concept/index.d.ts +2 -2
  81. package/dist/themes/default/index.d.mts +3 -3
  82. package/dist/themes/default/index.d.ts +3 -3
  83. package/dist/types-BkWanMMW.d.mts +159 -0
  84. package/dist/types-BkWanMMW.d.ts +159 -0
  85. package/dist/types-DpRjPpxY.d.mts +93 -0
  86. package/dist/{types-CL6yBAmi.d.mts → types-DvHvN4RJ.d.mts} +514 -10
  87. package/dist/{types-CL6yBAmi.d.ts → types-DvHvN4RJ.d.ts} +514 -10
  88. package/dist/types-vkJZUngT.d.ts +93 -0
  89. package/package.json +52 -4
  90. package/dist/theme-CPXLKeLc.d.mts +0 -101
  91. package/dist/theme-Chdxsqt1.d.ts +0 -101
@@ -0,0 +1,2688 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+ var tailwindMerge = require('tailwind-merge');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ // src/provider/MonkeysProvider.tsx
8
+
9
+ // src/locale/en-US.ts
10
+ var enUS = {
11
+ locale: "en-US",
12
+ messages: {
13
+ pagination: {
14
+ navigation: "Pagination",
15
+ first: "First",
16
+ previous: "Previous",
17
+ next: "Next",
18
+ last: "Last",
19
+ page: ({ page, pageCount }) => `Page ${page} of ${pageCount}`,
20
+ currentPage: ({ page, pageCount }) => `Page ${page} of ${pageCount}, current page`,
21
+ emptyResults: "0 results",
22
+ range: ({ start, end, total }) => `${start}-${end} of ${total}`
23
+ },
24
+ dialog: {
25
+ close: "Close dialog"
26
+ },
27
+ dropdownMenu: {
28
+ actions: "Actions"
29
+ },
30
+ loading: {
31
+ spinner: "Loading"
32
+ },
33
+ layout: {
34
+ resizePanels: "Resize panels"
35
+ },
36
+ steps: {
37
+ label: "Progress",
38
+ current: "Current",
39
+ completed: "Completed",
40
+ error: "Error",
41
+ disabled: "Disabled"
42
+ },
43
+ numberInput: {
44
+ increment: "Increase value",
45
+ decrement: "Decrease value"
46
+ },
47
+ passwordInput: {
48
+ showPassword: "Show password",
49
+ hidePassword: "Hide password"
50
+ },
51
+ multiSelect: {
52
+ placeholder: "Select options",
53
+ empty: "No options",
54
+ removeOption: ({ value }) => `Remove ${value}`
55
+ },
56
+ table: {
57
+ dragColumn: ({ columnId }) => `Drag column ${columnId}`,
58
+ resizeColumn: ({ columnId }) => `Resize column ${columnId}`,
59
+ sortColumn: ({ columnId }) => columnId ? `Sort column ${columnId}` : "Sort column",
60
+ loadingRow: "Loading table row"
61
+ },
62
+ toolbar: {
63
+ theme: {
64
+ label: "Appearance",
65
+ toggle: "Toggle theme",
66
+ auto: "Auto",
67
+ light: "Light",
68
+ dark: "Dark"
69
+ },
70
+ language: {
71
+ label: "Language",
72
+ switch: "Switch language"
73
+ }
74
+ },
75
+ toast: {
76
+ errorTitle: "Error",
77
+ warningTitle: "Warning",
78
+ defaultErrorDescription: "Something went wrong.",
79
+ defaultWarningDescription: "Please check and try again."
80
+ },
81
+ dataExplorer: {
82
+ viewTree: {
83
+ actions: "More actions",
84
+ expand: "Expand",
85
+ collapse: "Collapse",
86
+ loading: "Loading...",
87
+ empty: "No views",
88
+ error: "Unable to load views"
89
+ }
90
+ },
91
+ workbench: {
92
+ interactiveTable: {
93
+ columnActions: "Column actions",
94
+ freezeColumn: "Freeze to left",
95
+ freezeEndColumn: "Freeze to right",
96
+ unfreezeColumn: "Unfreeze from left",
97
+ unfreezeEndColumn: "Unfreeze from right",
98
+ unfreezeAllColumns: "Unfreeze all columns",
99
+ resetColumnWidth: "Reset column width",
100
+ frozenColumnTitle: "Frozen column"
101
+ }
102
+ }
103
+ }
104
+ };
105
+
106
+ // src/locale/zh-CN.ts
107
+ var zhCN = {
108
+ locale: "zh-CN",
109
+ messages: {
110
+ pagination: {
111
+ navigation: "\u5206\u9875\u5BFC\u822A",
112
+ first: "\u9996\u9875",
113
+ previous: "\u4E0A\u4E00\u9875",
114
+ next: "\u4E0B\u4E00\u9875",
115
+ last: "\u672B\u9875",
116
+ page: ({ page, pageCount }) => `\u7B2C ${page} \u9875\uFF0C\u5171 ${pageCount} \u9875`,
117
+ currentPage: ({ page, pageCount }) => `\u7B2C ${page} \u9875\uFF0C\u5171 ${pageCount} \u9875\uFF0C\u5F53\u524D\u9875`,
118
+ emptyResults: "\u5171 0 \u6761",
119
+ range: ({ start, end, total }) => `\u7B2C ${start}-${end} \u6761\uFF0C\u5171 ${total} \u6761`
120
+ },
121
+ dialog: {
122
+ close: "\u5173\u95ED\u5BF9\u8BDD\u6846"
123
+ },
124
+ dropdownMenu: {
125
+ actions: "\u64CD\u4F5C"
126
+ },
127
+ loading: {
128
+ spinner: "\u6B63\u5728\u52A0\u8F7D"
129
+ },
130
+ layout: {
131
+ resizePanels: "\u8C03\u6574\u9762\u677F\u5927\u5C0F"
132
+ },
133
+ steps: {
134
+ label: "\u8FDB\u5EA6",
135
+ current: "\u5F53\u524D\u6B65\u9AA4",
136
+ completed: "\u5DF2\u5B8C\u6210",
137
+ error: "\u9519\u8BEF",
138
+ disabled: "\u5DF2\u7981\u7528"
139
+ },
140
+ numberInput: {
141
+ increment: "\u589E\u52A0\u6570\u503C",
142
+ decrement: "\u51CF\u5C11\u6570\u503C"
143
+ },
144
+ passwordInput: {
145
+ showPassword: "\u663E\u793A\u5BC6\u7801",
146
+ hidePassword: "\u9690\u85CF\u5BC6\u7801"
147
+ },
148
+ multiSelect: {
149
+ placeholder: "\u8BF7\u9009\u62E9",
150
+ empty: "\u6682\u65E0\u9009\u9879",
151
+ removeOption: ({ value }) => `\u79FB\u9664 ${value}`
152
+ },
153
+ table: {
154
+ dragColumn: ({ columnId }) => `\u62D6\u52A8\u5217 ${columnId}`,
155
+ resizeColumn: ({ columnId }) => `\u8C03\u6574\u5217\u5BBD ${columnId}`,
156
+ sortColumn: ({ columnId }) => columnId ? `\u6392\u5E8F\u5217 ${columnId}` : "\u6392\u5E8F\u5217",
157
+ loadingRow: "\u6B63\u5728\u52A0\u8F7D\u8868\u683C\u884C"
158
+ },
159
+ toolbar: {
160
+ theme: {
161
+ label: "\u5916\u89C2",
162
+ toggle: "\u5207\u6362\u4E3B\u9898",
163
+ auto: "\u8DDF\u968F\u7CFB\u7EDF",
164
+ light: "\u6D45\u8272\u6A21\u5F0F",
165
+ dark: "\u6DF1\u8272\u6A21\u5F0F"
166
+ },
167
+ language: {
168
+ label: "\u8BED\u8A00",
169
+ switch: "\u5207\u6362\u8BED\u8A00"
170
+ }
171
+ },
172
+ toast: {
173
+ errorTitle: "\u9519\u8BEF",
174
+ warningTitle: "\u63D0\u793A",
175
+ defaultErrorDescription: "\u53D1\u751F\u9519\u8BEF\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",
176
+ defaultWarningDescription: "\u8BF7\u68C0\u67E5\u540E\u91CD\u8BD5\u3002"
177
+ },
178
+ dataExplorer: {
179
+ viewTree: {
180
+ actions: "\u66F4\u591A\u64CD\u4F5C",
181
+ expand: "\u5C55\u5F00",
182
+ collapse: "\u6536\u8D77",
183
+ loading: "\u6B63\u5728\u52A0\u8F7D...",
184
+ empty: "\u6682\u65E0\u89C6\u56FE",
185
+ error: "\u65E0\u6CD5\u52A0\u8F7D\u89C6\u56FE"
186
+ }
187
+ },
188
+ workbench: {
189
+ interactiveTable: {
190
+ columnActions: "\u5217\u64CD\u4F5C",
191
+ freezeColumn: "\u56FA\u5B9A\u5230\u5DE6\u4FA7",
192
+ freezeEndColumn: "\u56FA\u5B9A\u5230\u53F3\u4FA7",
193
+ unfreezeColumn: "\u53D6\u6D88\u5DE6\u4FA7\u56FA\u5B9A",
194
+ unfreezeEndColumn: "\u53D6\u6D88\u53F3\u4FA7\u56FA\u5B9A",
195
+ unfreezeAllColumns: "\u53D6\u6D88\u5168\u90E8\u56FA\u5B9A",
196
+ resetColumnWidth: "\u91CD\u7F6E\u5217\u5BBD",
197
+ frozenColumnTitle: "\u5DF2\u56FA\u5B9A\u5217"
198
+ }
199
+ }
200
+ }
201
+ };
202
+
203
+ // src/locale/resolve-locale.ts
204
+ var BUILT_IN_LOCALES = {
205
+ "en-US": enUS,
206
+ "zh-CN": zhCN
207
+ };
208
+ function normalizeLocaleId(locale) {
209
+ if (typeof locale !== "string" || !locale.trim()) {
210
+ throw new TypeError("Monkeys locale must be a non-empty BCP 47 string.");
211
+ }
212
+ try {
213
+ return Intl.getCanonicalLocales(locale)[0];
214
+ } catch {
215
+ throw new RangeError(
216
+ `Monkeys locale "${locale}" is not a valid BCP 47 identifier.`
217
+ );
218
+ }
219
+ }
220
+ function isRecord(value) {
221
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
222
+ }
223
+ function validateMessageOverride(value, schema, path) {
224
+ if (!isRecord(value) || !isRecord(schema)) {
225
+ throw new TypeError(`${path} must be an object.`);
226
+ }
227
+ for (const [key, candidate] of Object.entries(value)) {
228
+ if (candidate === void 0) continue;
229
+ if (!(key in schema)) {
230
+ throw new TypeError(`${path}.${key} is not a supported Monkeys message.`);
231
+ }
232
+ const expected = schema[key];
233
+ const candidatePath = `${path}.${key}`;
234
+ if (typeof expected === "function") {
235
+ if (typeof candidate !== "function") {
236
+ throw new TypeError(`${candidatePath} must be a function.`);
237
+ }
238
+ } else if (typeof expected === "string") {
239
+ if (typeof candidate !== "string") {
240
+ throw new TypeError(`${candidatePath} must be a string.`);
241
+ }
242
+ } else {
243
+ validateMessageOverride(candidate, expected, candidatePath);
244
+ }
245
+ }
246
+ }
247
+ function assertMessagesOverride(value, path) {
248
+ validateMessageOverride(value, enUS.messages, path);
249
+ }
250
+ function isBuiltInLocale(locale) {
251
+ return locale === "en-US" || locale === "zh-CN";
252
+ }
253
+ function normalizeLocaleInput(input) {
254
+ if (input === void 0) {
255
+ return {
256
+ locale: void 0,
257
+ messages: void 0,
258
+ hasExplicitLocale: false
259
+ };
260
+ }
261
+ if (typeof input === "string") {
262
+ const locale2 = normalizeLocaleId(input);
263
+ if (!isBuiltInLocale(locale2)) {
264
+ throw new RangeError(
265
+ `Unsupported built-in Monkeys locale "${locale2}". Provide a locale pack object for custom locales.`
266
+ );
267
+ }
268
+ return { locale: locale2, messages: void 0, hasExplicitLocale: true };
269
+ }
270
+ if (!input || typeof input !== "object" || Array.isArray(input)) {
271
+ throw new TypeError("Monkeys locale must be a locale id or locale pack object.");
272
+ }
273
+ const locale = normalizeLocaleId(input.locale);
274
+ assertMessagesOverride(input.messages, "Monkeys locale messages");
275
+ return {
276
+ locale,
277
+ messages: input.messages,
278
+ hasExplicitLocale: true
279
+ };
280
+ }
281
+ function mergeMonkeysLocaleMessages(base, override) {
282
+ if (!override) return base;
283
+ return {
284
+ pagination: { ...base.pagination, ...override.pagination },
285
+ dialog: { ...base.dialog, ...override.dialog },
286
+ dropdownMenu: { ...base.dropdownMenu, ...override.dropdownMenu },
287
+ loading: { ...base.loading, ...override.loading },
288
+ layout: { ...base.layout, ...override.layout },
289
+ steps: { ...base.steps, ...override.steps },
290
+ numberInput: { ...base.numberInput, ...override.numberInput },
291
+ passwordInput: { ...base.passwordInput, ...override.passwordInput },
292
+ multiSelect: { ...base.multiSelect, ...override.multiSelect },
293
+ table: { ...base.table, ...override.table },
294
+ toolbar: {
295
+ theme: { ...base.toolbar.theme, ...override.toolbar?.theme },
296
+ language: { ...base.toolbar.language, ...override.toolbar?.language }
297
+ },
298
+ toast: { ...base.toast, ...override.toast },
299
+ dataExplorer: {
300
+ viewTree: {
301
+ ...base.dataExplorer.viewTree,
302
+ ...override.dataExplorer?.viewTree
303
+ }
304
+ },
305
+ workbench: {
306
+ interactiveTable: {
307
+ ...base.workbench.interactiveTable,
308
+ ...override.workbench?.interactiveTable
309
+ }
310
+ }
311
+ };
312
+ }
313
+ var defaultMonkeysLocale = {
314
+ locale: enUS.locale,
315
+ messages: mergeMonkeysLocaleMessages(
316
+ enUS.messages
317
+ )
318
+ };
319
+ function resolveMonkeysLocale(input, override, parent) {
320
+ if (override !== void 0) {
321
+ assertMessagesOverride(override, "MonkeysProvider messages");
322
+ }
323
+ const normalized = normalizeLocaleInput(input);
324
+ const locale = normalized.locale ?? parent?.locale ?? enUS.locale;
325
+ const builtInMessages = isBuiltInLocale(locale) ? BUILT_IN_LOCALES[locale].messages : void 0;
326
+ let messages = mergeMonkeysLocaleMessages(
327
+ enUS.messages,
328
+ builtInMessages
329
+ );
330
+ if (parent && (!normalized.hasExplicitLocale || parent.locale === locale)) {
331
+ messages = mergeMonkeysLocaleMessages(messages, parent.messages);
332
+ }
333
+ messages = mergeMonkeysLocaleMessages(messages, normalized.messages);
334
+ messages = mergeMonkeysLocaleMessages(messages, override);
335
+ return { locale, messages };
336
+ }
337
+ var EMPTY_ENVIRONMENT = Object.freeze({});
338
+ var EMPTY_PORTAL = Object.freeze({});
339
+ var MONKEYS_PROVIDER_CONTEXTS_KEY = /* @__PURE__ */ Symbol.for(
340
+ "@inf-monkeys-tech/monkeys-design/provider-context@1"
341
+ );
342
+ function createMonkeysProviderContexts() {
343
+ return Object.freeze({
344
+ locale: react.createContext({
345
+ ...defaultMonkeysLocale,
346
+ provided: false
347
+ }),
348
+ theme: react.createContext({
349
+ provided: false
350
+ }),
351
+ direction: react.createContext({
352
+ provided: false
353
+ }),
354
+ environment: react.createContext({
355
+ provided: false,
356
+ environment: EMPTY_ENVIRONMENT,
357
+ portal: EMPTY_PORTAL
358
+ })
359
+ });
360
+ }
361
+ function getMonkeysProviderContexts() {
362
+ const host = globalThis;
363
+ const existing = host[MONKEYS_PROVIDER_CONTEXTS_KEY];
364
+ if (existing) return existing;
365
+ const contexts = createMonkeysProviderContexts();
366
+ Object.defineProperty(host, MONKEYS_PROVIDER_CONTEXTS_KEY, {
367
+ value: contexts,
368
+ enumerable: false,
369
+ configurable: false,
370
+ writable: false
371
+ });
372
+ return contexts;
373
+ }
374
+ var providerContexts = getMonkeysProviderContexts();
375
+ var MonkeysLocaleContext = providerContexts.locale;
376
+ var MonkeysThemeContext = providerContexts.theme;
377
+ var MonkeysDirectionContext = providerContexts.direction;
378
+ var MonkeysEnvironmentContext = providerContexts.environment;
379
+ function mergeAppearance(inherited, explicit) {
380
+ if (explicit === void 0) return inherited;
381
+ if (inherited === void 0) return explicit;
382
+ return {
383
+ ...inherited,
384
+ ...explicit,
385
+ slots: inherited.slots || explicit.slots ? { ...inherited.slots, ...explicit.slots } : void 0,
386
+ styles: inherited.styles || explicit.styles ? { ...inherited.styles, ...explicit.styles } : void 0
387
+ };
388
+ }
389
+ function useMonkeysLocale() {
390
+ return react.useContext(MonkeysLocaleContext);
391
+ }
392
+ function useMonkeysLocaleMessages() {
393
+ return react.useContext(MonkeysLocaleContext).messages;
394
+ }
395
+ function useMonkeysResolvedTheme() {
396
+ return react.useContext(MonkeysThemeContext).resolvedTheme;
397
+ }
398
+ function useMonkeysBaseAppearance(explicit) {
399
+ const inherited = react.useContext(MonkeysThemeContext).baseAppearance;
400
+ return react.useMemo(
401
+ () => mergeAppearance(inherited, explicit),
402
+ [explicit, inherited]
403
+ );
404
+ }
405
+ function useMonkeysDataExplorerAppearance(explicit) {
406
+ const inherited = react.useContext(MonkeysThemeContext).dataExplorerAppearance;
407
+ return react.useMemo(
408
+ () => mergeAppearance(inherited, explicit),
409
+ [explicit, inherited]
410
+ );
411
+ }
412
+ function useMonkeysDirection() {
413
+ return react.useContext(MonkeysDirectionContext).direction;
414
+ }
415
+ function useMonkeysEnvironment() {
416
+ return react.useContext(MonkeysEnvironmentContext).environment;
417
+ }
418
+ function useMonkeysPortalOptions() {
419
+ return react.useContext(MonkeysEnvironmentContext).portal;
420
+ }
421
+ function useMonkeysComponentAttributes() {
422
+ const locale = react.useContext(MonkeysLocaleContext);
423
+ const theme = react.useContext(MonkeysThemeContext);
424
+ const direction = react.useContext(MonkeysDirectionContext);
425
+ const providerActive = locale.provided || theme.provided || direction.provided;
426
+ return react.useMemo(
427
+ () => providerActive ? {
428
+ dir: direction.direction,
429
+ "data-monkeys-direction": direction.direction,
430
+ "data-monkeys-locale": locale.locale,
431
+ "data-monkeys-theme": theme.resolvedTheme?.id,
432
+ "data-monkeys-theme-mode": theme.resolvedTheme?.tokens.mode
433
+ } : {},
434
+ [
435
+ direction.direction,
436
+ locale.locale,
437
+ providerActive,
438
+ theme.resolvedTheme?.id,
439
+ theme.resolvedTheme?.tokens.mode
440
+ ]
441
+ );
442
+ }
443
+ function cn(...parts) {
444
+ return tailwindMerge.twMerge(parts.filter(Boolean).join(" "));
445
+ }
446
+
447
+ // src/components/base/theme.ts
448
+ var emptyStyles = {};
449
+ var motionBase = "motion-safe:transition motion-safe:duration-300 motion-safe:ease-out";
450
+ var motionInteractive = "motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out";
451
+ var motionTransform = "motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-out";
452
+ var tableScrollbarChrome = cn(
453
+ "[scrollbar-width:thin]",
454
+ "[scrollbar-color:hsl(var(--muted-foreground)/0.45)_transparent]",
455
+ "[&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2",
456
+ "[&::-webkit-scrollbar-button]:hidden [&::-webkit-scrollbar-button]:h-0 [&::-webkit-scrollbar-button]:w-0 [&::-webkit-scrollbar-button]:bg-transparent",
457
+ "[&::-webkit-scrollbar-button:single-button]:hidden [&::-webkit-scrollbar-button:single-button]:h-0 [&::-webkit-scrollbar-button:single-button]:w-0",
458
+ "[&::-webkit-scrollbar-button:double-button]:hidden [&::-webkit-scrollbar-button:double-button]:h-0 [&::-webkit-scrollbar-button:double-button]:w-0",
459
+ "[&::-webkit-scrollbar-corner]:bg-transparent",
460
+ "[&::-webkit-scrollbar-track]:bg-transparent",
461
+ "[&:has(thead.sticky)::-webkit-scrollbar-track]:mt-[var(--base-table-header-height)]",
462
+ "[&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/40",
463
+ "hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/55"
464
+ );
465
+ var tableStickyHeaderCells = cn(
466
+ "[&.sticky_th]:sticky [&.sticky_th]:top-0 [&.sticky_th]:z-[2]",
467
+ "[&.sticky_th]:bg-[var(--base-table-sticky-header-bg)]",
468
+ "[&.sticky_th]:shadow-[inset_0_-1px_0_var(--base-table-header-separator)]"
469
+ );
470
+ var baseSlots = {
471
+ buttonBase: cn(
472
+ "group/button inline-flex min-w-0 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium focus-visible:outline-none",
473
+ "cursor-pointer disabled:!cursor-not-allowed",
474
+ motionInteractive
475
+ ),
476
+ buttonDefault: "border-border bg-background text-foreground hover:bg-accent/60",
477
+ buttonPrimary: "border-primary/20 bg-primary/10 text-primary hover:bg-primary/15",
478
+ buttonSuccess: "border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400 hover:bg-emerald-500/15",
479
+ buttonWarning: "border-amber-500/30 bg-amber-500/10 text-amber-700 hover:bg-amber-500/15",
480
+ buttonDanger: "border-destructive/20 bg-destructive/10 text-destructive-text hover:bg-destructive/15",
481
+ buttonMuted: "border-border/60 bg-muted/45 text-muted-foreground hover:bg-muted/70 hover:text-foreground",
482
+ buttonActive: "border-primary/35 bg-primary/10 text-primary",
483
+ buttonDisabled: "!cursor-not-allowed opacity-60",
484
+ buttonIconOnly: "w-9 px-0",
485
+ buttonIcon: "inline-flex h-4 w-4 shrink-0 items-center justify-center",
486
+ buttonLabel: "min-w-0 truncate",
487
+ badgeBase: cn(
488
+ "inline-flex max-w-full items-center gap-1.5 rounded-full border px-2 py-0.5 text-xs font-medium",
489
+ motionBase
490
+ ),
491
+ badgeDefault: "border-border/60 bg-background text-foreground",
492
+ badgePrimary: "border-primary/30 bg-primary/10 text-primary",
493
+ badgeSuccess: "border-emerald-500/30 bg-emerald-500/10 text-emerald-700",
494
+ badgeWarning: "border-amber-500/30 bg-amber-500/10 text-amber-700",
495
+ badgeDanger: "border-destructive/30 bg-destructive/10 text-destructive-text",
496
+ badgeMuted: "border-border/60 bg-muted text-muted-foreground",
497
+ badgeIcon: "inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",
498
+ badgeLabel: "min-w-0 truncate",
499
+ textRoot: "min-w-0 break-words leading-6",
500
+ textSizeXs: "text-xs",
501
+ textSizeSm: "text-sm",
502
+ textSizeMd: "text-base",
503
+ textSizeLg: "text-lg",
504
+ textSizeXl: "text-xl",
505
+ typographyToneDefault: "text-foreground",
506
+ typographyToneMuted: "text-muted-foreground",
507
+ typographyTonePrimary: "text-primary",
508
+ typographyToneSuccess: "text-emerald-700 dark:text-emerald-400",
509
+ typographyToneWarning: "text-amber-700 dark:text-amber-400",
510
+ typographyToneDanger: "text-destructive-text",
511
+ typographyToneInherit: "text-inherit",
512
+ headingRoot: "min-w-0 break-words font-semibold tracking-tight",
513
+ headingSizeXs: "text-sm leading-5",
514
+ headingSizeSm: "text-base leading-6",
515
+ headingSizeMd: "text-lg leading-7",
516
+ headingSizeLg: "text-xl leading-7",
517
+ headingSizeXl: "text-2xl leading-8",
518
+ headingSize2xl: "text-3xl leading-9",
519
+ linkRoot: "inline break-words underline decoration-current/40 underline-offset-4 hover:decoration-current focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
520
+ codeInline: "rounded border border-border/70 bg-muted/60 px-1.5 py-0.5 font-mono text-[0.875em] leading-[1.45] text-foreground",
521
+ codeBlock: "m-0 max-w-full overflow-x-auto rounded-md border border-border/70 bg-muted/60 p-4 text-foreground",
522
+ codeContent: "font-mono text-sm leading-6",
523
+ kbdRoot: "inline-flex min-h-5 items-center rounded border border-border bg-muted/70 px-1.5 font-mono text-[0.75em] font-medium leading-5 text-foreground shadow-[inset_0_-1px_0_hsl(var(--monkeys-color-border))]",
524
+ listRoot: "m-0 min-w-0 list-outside break-words ps-5 text-foreground",
525
+ listSpacingCompact: "[&>li+li]:mt-1",
526
+ listSpacingDefault: "[&>li+li]:mt-2",
527
+ listSpacingRelaxed: "[&>li+li]:mt-3",
528
+ listMarkerNone: "list-none ps-0",
529
+ listMarkerDisc: "list-disc",
530
+ listMarkerCircle: "list-[circle]",
531
+ listMarkerSquare: "list-[square]",
532
+ listMarkerDecimal: "list-decimal",
533
+ listMarkerLowerAlpha: "list-[lower-alpha]",
534
+ listMarkerUpperAlpha: "list-[upper-alpha]",
535
+ listItem: "min-w-0 ps-1 leading-6 marker:text-muted-foreground",
536
+ stackRoot: "flex min-w-0 flex-col",
537
+ inlineRoot: "flex min-w-0 flex-row",
538
+ gridRoot: "grid min-w-0",
539
+ containerRoot: "mx-auto w-full min-w-0",
540
+ aspectRatioRoot: "relative min-w-0 overflow-hidden [&>*]:h-full [&>*]:w-full",
541
+ spinnerRoot: "inline-flex shrink-0 items-center justify-center text-current align-middle",
542
+ spinnerIndicator: "h-5 w-5 rounded-full border-2 border-current border-r-transparent motion-safe:animate-spin motion-reduce:animate-none",
543
+ visuallyHiddenRoot: "sr-only",
544
+ visuallyHiddenFocusable: "focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-[1000] focus:rounded-md focus:bg-background focus:px-4 focus:py-2 focus:text-foreground focus:shadow-lg focus:outline-none focus:ring-2 focus:ring-ring focus-within:not-sr-only focus-within:fixed focus-within:left-4 focus-within:top-4 focus-within:z-[1000] focus-within:rounded-md focus-within:bg-background focus-within:px-4 focus-within:py-2 focus-within:text-foreground focus-within:shadow-lg focus-within:ring-2 focus-within:ring-ring",
545
+ fieldsetRoot: "min-w-0 border-0 p-0 text-foreground",
546
+ fieldsetLegend: "min-w-0 text-sm font-semibold leading-6 text-foreground",
547
+ fieldsetDescription: "mt-1 text-sm leading-5 text-muted-foreground",
548
+ fieldsetError: "mt-1 text-sm leading-5 text-destructive-text",
549
+ fieldsetContent: "mt-3 grid min-w-0 gap-3",
550
+ stepsRoot: "m-0 min-w-0 list-none p-0 text-foreground",
551
+ stepsHorizontal: "flex w-full max-w-full items-start overflow-x-auto pb-2",
552
+ stepsVertical: "grid",
553
+ stepsItem: "relative min-w-0",
554
+ stepsItemHorizontal: "flex min-w-52 flex-1 items-start",
555
+ stepsItemVertical: "pb-6 last:pb-0",
556
+ stepsTrigger: "flex min-w-0 flex-1 items-start gap-3 rounded-md border-0 bg-transparent p-1 text-start text-inherit",
557
+ stepsTriggerInteractive: "cursor-pointer hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",
558
+ stepsTriggerDisabled: "!cursor-not-allowed opacity-60",
559
+ stepsIndicator: "relative z-[1] inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border text-xs font-semibold",
560
+ stepsIndicatorPending: "border-border bg-background text-muted-foreground",
561
+ stepsIndicatorCurrent: "border-primary/50 bg-primary/10 text-primary",
562
+ stepsIndicatorCompleted: "border-primary bg-primary text-primary-foreground",
563
+ stepsIndicatorError: "border-destructive bg-destructive text-destructive-foreground",
564
+ stepsContent: "grid min-w-0 gap-1 pt-0.5",
565
+ stepsLabel: "min-w-0 break-words text-sm font-medium leading-5",
566
+ stepsDescription: "min-w-0 break-words text-sm leading-5 text-muted-foreground",
567
+ stepsStatus: "sr-only",
568
+ stepsConnector: "shrink-0 bg-border",
569
+ stepsConnectorHorizontal: "mt-3.5 h-px w-8",
570
+ stepsConnectorVertical: "absolute bottom-0 top-8 start-3.5 w-px -translate-x-1/2",
571
+ stepsConnectorCompleted: "bg-primary/60",
572
+ stepsConnectorError: "bg-destructive/60",
573
+ scrollAreaViewport: "min-h-0 min-w-0",
574
+ numberInputControl: "tabular-nums",
575
+ numberInputStepControls: "me-1 flex shrink-0 self-stretch overflow-hidden border-s border-border",
576
+ numberInputStepButton: "flex min-h-6 w-7 cursor-pointer items-center justify-center border-0 bg-transparent px-1 text-xs leading-none text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:z-[1] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-40",
577
+ passwordInputControl: "pe-2",
578
+ passwordInputToggle: "me-1 inline-flex min-h-7 shrink-0 cursor-pointer items-center justify-center rounded px-2 text-xs font-medium text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-40",
579
+ inputGroupRoot: cn(
580
+ "relative flex min-w-0 items-stretch overflow-hidden rounded-md border border-border bg-background text-foreground focus-within:border-primary/50 focus-within:ring-2 focus-within:ring-ring/30",
581
+ motionBase
582
+ ),
583
+ inputGroupInvalid: "border-destructive/55 focus-within:border-destructive/70 focus-within:ring-destructive/25",
584
+ inputGroupDisabled: "!cursor-not-allowed bg-muted/35",
585
+ inputGroupContent: "flex min-w-0 flex-1 items-stretch [&>*]:min-w-0",
586
+ inputGroupStartElement: "inline-flex shrink-0 items-center justify-center ps-3 pe-1 text-foreground/75",
587
+ inputGroupEndElement: "inline-flex shrink-0 items-center justify-center ps-1 pe-3 text-foreground/75",
588
+ inputGroupStartAddon: "inline-flex max-w-[min(40%,16rem)] shrink-0 items-center overflow-hidden border-e border-border bg-muted/60 px-3 text-sm text-foreground/75 text-ellipsis whitespace-nowrap [&>*]:min-w-0",
589
+ inputGroupEndAddon: "inline-flex max-w-[min(40%,16rem)] shrink-0 items-center overflow-hidden border-s border-border bg-muted/60 px-3 text-sm text-foreground/75 text-ellipsis whitespace-nowrap [&>*]:min-w-0",
590
+ panelRoot: cn(
591
+ "group relative flex min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background",
592
+ motionInteractive
593
+ ),
594
+ panelInteractive: "cursor-pointer hover:shadow-md",
595
+ panelSelected: "border-primary/45 bg-primary/5",
596
+ panelDisabled: "!cursor-not-allowed opacity-60",
597
+ panelMedia: "shrink-0 overflow-hidden",
598
+ panelHeader: "min-w-0 p-4",
599
+ panelTitle: "min-w-0 truncate text-sm font-semibold leading-none text-foreground",
600
+ panelDescription: "mt-1 text-sm leading-5 text-muted-foreground",
601
+ panelBody: "min-w-0 px-4 pb-4 text-sm text-foreground",
602
+ panelBodyStandalone: "pt-4",
603
+ panelFooter: "shrink-0 border-t border-border/60 px-4 py-3",
604
+ stateRoot: cn(
605
+ "flex min-h-48 flex-col items-center justify-center rounded-lg border border-border/70 bg-background px-6 py-10 text-center",
606
+ motionBase
607
+ ),
608
+ stateIcon: "mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted text-muted-foreground motion-safe:animate-in motion-safe:fade-in",
609
+ stateTitle: "text-sm font-semibold text-foreground",
610
+ stateDescription: "mt-2 max-w-md text-sm leading-6 text-muted-foreground",
611
+ stateActions: "mt-5 flex flex-wrap items-center justify-center gap-2",
612
+ loadingSpinner: "h-5 w-5 motion-safe:animate-spin motion-reduce:animate-none",
613
+ fieldRoot: "grid min-w-0 gap-2",
614
+ fieldLabelRow: "flex min-w-0 items-center justify-between gap-3",
615
+ fieldLabel: "min-w-0 text-sm font-medium leading-none text-foreground",
616
+ fieldRequired: "text-destructive-text",
617
+ fieldDescription: "text-sm leading-5 text-muted-foreground",
618
+ fieldMessage: "text-sm leading-5 text-muted-foreground",
619
+ fieldControl: "min-w-0",
620
+ controlWrapper: cn(
621
+ "relative flex min-w-0 items-center rounded-md border border-border bg-background text-foreground focus-within:border-primary/35",
622
+ motionBase
623
+ ),
624
+ controlBase: "min-w-0 flex-1 bg-transparent px-3 text-sm text-foreground outline-none placeholder:text-muted-foreground disabled:!cursor-not-allowed",
625
+ controlInput: "h-9",
626
+ controlTextarea: "min-h-24 resize-y py-2 leading-6",
627
+ controlSelect: "h-9 cursor-pointer appearance-none pr-9 disabled:!cursor-not-allowed",
628
+ controlIcon: "pointer-events-none ml-3 inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",
629
+ controlTrailing: "mr-3 inline-flex shrink-0 items-center justify-center text-muted-foreground",
630
+ controlInvalid: "border-destructive/45 focus-within:border-destructive/60",
631
+ controlDisabled: "!cursor-not-allowed opacity-60",
632
+ controlReadOnly: "bg-muted/35",
633
+ selectChevron: cn(
634
+ "pointer-events-none absolute right-3 top-1/2 h-2 w-2 -translate-y-1/2 rotate-45 border-b border-r border-current text-muted-foreground",
635
+ motionTransform
636
+ ),
637
+ selectMenu: "absolute left-0 right-0 top-[calc(100%+0.375rem)] z-50 max-h-60 origin-top overflow-auto rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-none motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",
638
+ selectOption: cn(
639
+ "flex min-h-8 w-full min-w-0 cursor-pointer items-center rounded-sm px-2.5 py-1.5 text-left text-sm text-foreground",
640
+ motionInteractive
641
+ ),
642
+ selectOptionActive: "bg-accent text-accent-foreground",
643
+ selectOptionSelected: "bg-primary/10 text-primary",
644
+ selectOptionDisabled: "!cursor-not-allowed opacity-50",
645
+ selectPlaceholder: "text-muted-foreground",
646
+ selectNative: "sr-only",
647
+ switchRoot: "inline-flex min-w-0 cursor-pointer items-start gap-3",
648
+ switchInput: "sr-only",
649
+ switchTrack: cn(
650
+ "relative mt-0.5 inline-flex h-6 w-10 shrink-0 items-center rounded-full border border-border bg-muted focus-within:border-primary/35",
651
+ motionBase
652
+ ),
653
+ switchThumb: cn(
654
+ "h-4 w-4 translate-x-1 rounded-full bg-background shadow-sm",
655
+ motionTransform
656
+ ),
657
+ switchChecked: "border-primary/40 bg-primary/80 text-primary-foreground",
658
+ switchDisabled: "!cursor-not-allowed opacity-60",
659
+ switchContent: "grid min-w-0 gap-1",
660
+ switchLabel: "text-sm font-medium leading-none text-foreground",
661
+ switchDescription: "text-sm leading-5 text-muted-foreground",
662
+ checkboxRoot: "inline-flex min-w-0 cursor-pointer items-start gap-3",
663
+ checkboxInput: "sr-only",
664
+ checkboxBox: cn(
665
+ "mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border border-border bg-background text-primary focus-within:border-primary/40",
666
+ motionBase
667
+ ),
668
+ checkboxBoxChecked: "border-primary/45 bg-primary text-primary-foreground",
669
+ checkboxBoxInvalid: "border-destructive/50",
670
+ checkboxIndicator: "text-[11px] font-bold leading-none",
671
+ checkboxDisabled: "!cursor-not-allowed opacity-60",
672
+ checkboxContent: "grid min-w-0 gap-1",
673
+ checkboxLabel: "text-sm font-medium leading-none text-foreground",
674
+ checkboxDescription: "text-sm leading-5 text-muted-foreground",
675
+ radioGroupRoot: "grid min-w-0 gap-2",
676
+ radioOption: cn(
677
+ "inline-flex min-w-0 cursor-pointer items-start gap-3 rounded-md border border-border/60 bg-background px-3 py-2 text-sm",
678
+ motionInteractive,
679
+ "hover:bg-muted/35"
680
+ ),
681
+ radioInput: "sr-only",
682
+ radioMarker: cn(
683
+ "mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-border bg-background text-primary focus-within:border-primary/40",
684
+ motionBase
685
+ ),
686
+ radioMarkerChecked: "border-primary/50 bg-primary/10",
687
+ radioIndicator: "h-2 w-2 rounded-full bg-primary",
688
+ radioOptionDisabled: "!cursor-not-allowed opacity-60 hover:bg-background",
689
+ radioContent: "grid min-w-0 gap-1",
690
+ radioLabel: "text-sm font-medium leading-none text-foreground",
691
+ radioDescription: "text-sm leading-5 text-muted-foreground",
692
+ dialogRoot: "relative",
693
+ dialogTrigger: "",
694
+ dialogTriggerDisabled: "!cursor-not-allowed opacity-60",
695
+ dialogOverlay: "fixed inset-0 z-50 bg-background/70 backdrop-blur-sm motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",
696
+ dialogContent: "pointer-events-none fixed inset-0 z-50 flex min-h-0 items-center justify-center p-4",
697
+ dialogPanel: cn(
698
+ "pointer-events-auto relative flex max-h-[min(85vh,720px)] w-full max-w-lg min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background text-foreground shadow-xl",
699
+ "motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out"
700
+ ),
701
+ dialogHeader: "grid min-w-0 gap-1 border-b border-border/60 px-5 py-4",
702
+ dialogTitle: "min-w-0 pr-8 text-base font-semibold leading-6 text-foreground",
703
+ dialogDescription: "text-sm leading-6 text-muted-foreground",
704
+ dialogBody: "min-h-0 min-w-0 overflow-auto px-5 py-4 text-sm text-foreground",
705
+ dialogFooter: "flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-border/60 px-5 py-4",
706
+ dialogClose: cn(
707
+ "absolute right-3 top-3 inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-muted/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
708
+ motionInteractive
709
+ ),
710
+ dropdownRoot: "relative inline-flex min-w-0",
711
+ dropdownTrigger: "",
712
+ dropdownTriggerDisabled: "!cursor-not-allowed opacity-60",
713
+ dropdownMenu: "z-50 min-w-48 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",
714
+ dropdownMenuTop: "bottom-[calc(100%+0.375rem)] top-auto",
715
+ dropdownMenuEnd: "left-auto right-0",
716
+ dropdownLabel: "px-2.5 py-1.5 text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground",
717
+ dropdownSeparator: "my-1 h-px bg-border/70",
718
+ dropdownItem: cn(
719
+ "flex min-w-0 cursor-pointer items-center gap-2 rounded-sm px-2.5 py-2 text-left text-sm text-foreground hover:bg-accent/60 focus:bg-accent/60 data-[highlighted]:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
720
+ motionInteractive
721
+ ),
722
+ dropdownItemDanger: "text-destructive-text hover:bg-destructive/10 focus:bg-destructive/10 data-[highlighted]:bg-destructive/10",
723
+ dropdownItemDisabled: "!cursor-not-allowed opacity-50 hover:bg-transparent focus:bg-transparent data-[highlighted]:bg-transparent",
724
+ dropdownItemIcon: "inline-flex h-4 w-4 shrink-0 items-center justify-center",
725
+ dropdownItemContent: "grid min-w-0 flex-1 gap-0.5",
726
+ dropdownItemLabel: "min-w-0 truncate",
727
+ dropdownItemDescription: "min-w-0 truncate text-xs leading-4 text-muted-foreground",
728
+ dropdownItemShortcut: "ml-3 shrink-0 text-xs font-medium text-muted-foreground",
729
+ tooltipRoot: "relative inline-flex min-w-0",
730
+ tooltipTrigger: "inline-flex min-w-0",
731
+ tooltipContent: "pointer-events-none z-50 max-w-xs rounded-md border border-border bg-popover px-2.5 py-1.5 text-xs leading-5 text-popover-foreground shadow-lg motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",
732
+ noticeBase: cn(
733
+ "flex min-w-0 gap-3 rounded-lg border px-4 py-3 text-sm",
734
+ motionBase,
735
+ "motion-safe:animate-in motion-safe:fade-in"
736
+ ),
737
+ noticeDefault: "border-border bg-background text-foreground",
738
+ noticePrimary: "border-primary/25 bg-primary/10 text-primary",
739
+ noticeSuccess: "border-emerald-500/30 bg-emerald-500/10 text-emerald-700",
740
+ noticeWarning: "border-amber-500/30 bg-amber-500/10 text-amber-700",
741
+ noticeDanger: "border-destructive/30 bg-destructive/10 text-destructive-text",
742
+ noticeMuted: "border-border/60 bg-muted/35 text-muted-foreground",
743
+ noticeIcon: "mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center motion-safe:animate-in motion-safe:fade-in",
744
+ noticeTitle: "font-semibold leading-5",
745
+ noticeDescription: "leading-6",
746
+ noticeActions: "mt-3 flex flex-wrap items-center gap-2",
747
+ dividerRoot: cn("shrink-0 border-border/70", motionBase),
748
+ dividerLabel: "mx-3 shrink-0 text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground motion-safe:animate-in motion-safe:fade-in",
749
+ sectionHeaderRoot: "flex min-w-0 flex-wrap items-start justify-between gap-3 motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",
750
+ sectionHeaderContent: "grid min-w-0 gap-1",
751
+ sectionHeaderEyebrow: "text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground",
752
+ sectionHeaderTitle: "text-base font-semibold leading-6 text-foreground",
753
+ sectionHeaderDescription: "max-w-2xl text-sm leading-6 text-muted-foreground",
754
+ sectionHeaderActions: "flex shrink-0 flex-wrap items-center gap-2",
755
+ tabsRoot: "grid min-w-0 gap-3",
756
+ tabsList: cn(
757
+ "inline-flex min-w-0 flex-wrap items-center gap-1 rounded-lg border border-border/70 bg-muted/30 p-1",
758
+ motionBase
759
+ ),
760
+ tabsTrigger: cn(
761
+ "inline-flex min-w-0 cursor-pointer items-center justify-center rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground hover:bg-background/70 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:ring-offset-1 motion-reduce:transition-none",
762
+ motionInteractive
763
+ ),
764
+ tabsTriggerActive: "bg-background text-foreground shadow-sm",
765
+ tabsTriggerDisabled: "!cursor-not-allowed opacity-50 hover:bg-transparent",
766
+ tabsPanel: "min-w-0 rounded-lg border border-border/70 bg-background p-4 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",
767
+ segmentedRoot: cn(
768
+ "inline-flex min-w-0 items-center gap-1 rounded-lg border border-border/70 bg-muted/30 p-1",
769
+ motionBase
770
+ ),
771
+ segmentedItem: cn(
772
+ "inline-flex min-w-0 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground hover:bg-background/70 hover:text-foreground focus-visible:outline-none",
773
+ motionInteractive
774
+ ),
775
+ segmentedItemActive: "bg-background text-foreground shadow-sm",
776
+ segmentedItemDisabled: "!cursor-not-allowed opacity-50 hover:bg-transparent",
777
+ progressRoot: "grid min-w-0 gap-2",
778
+ progressTrack: "h-2 w-full overflow-hidden rounded-full bg-muted",
779
+ progressIndicator: "h-full rounded-full bg-primary motion-safe:transition-[width] motion-safe:duration-500 motion-safe:ease-out",
780
+ progressLabelRow: "flex min-w-0 items-center justify-between gap-3",
781
+ progressLabel: "min-w-0 truncate text-sm font-medium text-foreground",
782
+ progressValue: "shrink-0 text-xs font-medium text-muted-foreground",
783
+ skeletonRoot: "relative overflow-hidden rounded-md bg-muted/70",
784
+ avatarRoot: "relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-border bg-muted text-sm font-semibold text-muted-foreground motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",
785
+ avatarImage: "h-full w-full object-cover",
786
+ avatarFallback: "flex h-full w-full items-center justify-center bg-muted text-foreground",
787
+ avatarStatus: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-muted-foreground motion-safe:animate-pulse",
788
+ avatarText: "min-w-0 truncate text-sm font-medium text-foreground",
789
+ toolbarRoot: cn(
790
+ "flex min-w-0 flex-wrap items-center justify-between gap-3 rounded-lg border border-border/70 bg-background px-4 py-3",
791
+ motionBase
792
+ ),
793
+ toolbarLeading: "flex min-w-0 items-center gap-3",
794
+ toolbarTitle: "min-w-0 truncate text-sm font-semibold text-foreground",
795
+ toolbarDescription: "mt-0.5 text-sm leading-5 text-muted-foreground",
796
+ toolbarContent: "min-w-0 flex-1",
797
+ toolbarActions: "flex shrink-0 flex-wrap items-center gap-2",
798
+ breadcrumbRoot: "min-w-0 text-sm text-muted-foreground",
799
+ breadcrumbList: "flex min-w-0 flex-wrap items-center gap-1.5",
800
+ breadcrumbItem: "inline-flex min-w-0 items-center gap-1.5",
801
+ breadcrumbLink: "min-w-0 cursor-pointer truncate text-muted-foreground hover:text-foreground disabled:!cursor-not-allowed disabled:opacity-50 aria-disabled:!cursor-not-allowed aria-disabled:opacity-50 aria-disabled:hover:text-muted-foreground motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",
802
+ breadcrumbCurrent: "min-w-0 truncate font-medium text-foreground",
803
+ breadcrumbSeparator: "shrink-0 text-muted-foreground/70",
804
+ paginationRoot: "flex min-w-0 flex-wrap items-center justify-between gap-3 text-sm",
805
+ paginationInfo: "min-w-0 text-muted-foreground",
806
+ paginationControls: "flex min-w-0 flex-wrap items-center justify-end gap-1.5",
807
+ paginationButton: "inline-flex h-8 min-w-8 cursor-pointer items-center justify-center whitespace-nowrap rounded-md border border-border bg-background px-2.5 text-sm font-medium text-foreground hover:bg-accent/60 disabled:!cursor-not-allowed disabled:opacity-50 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",
808
+ paginationButtonDisabled: "!cursor-not-allowed opacity-50",
809
+ paginationPage: "inline-flex h-8 min-w-8 cursor-default items-center justify-center rounded-md bg-muted/50 px-2.5 text-sm font-medium text-foreground hover:bg-muted/50",
810
+ paginationEllipsis: "inline-flex h-8 min-w-6 items-center justify-center px-1 text-sm text-muted-foreground",
811
+ descriptionListRoot: "grid min-w-0 gap-3 text-sm",
812
+ descriptionListItem: "grid min-w-0 gap-1 rounded-md border border-border/60 bg-background px-3 py-2 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out hover:shadow-sm",
813
+ descriptionListTerm: "min-w-0 truncate text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",
814
+ descriptionListValue: "min-w-0 text-sm leading-6 text-foreground",
815
+ accordionRoot: "grid min-w-0 gap-2",
816
+ accordionItem: "overflow-hidden rounded-lg border border-border/70 bg-background motion-safe:transition motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",
817
+ accordionTrigger: "flex w-full min-w-0 cursor-pointer items-center justify-between gap-3 px-4 py-3 text-start text-sm font-medium text-foreground hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-50 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",
818
+ accordionTriggerIcon: cn(
819
+ "h-2 w-2 shrink-0 rotate-45 border-b border-r border-current text-muted-foreground",
820
+ motionTransform,
821
+ "motion-reduce:transition-none"
822
+ ),
823
+ accordionPanel: "border-t border-border/60 px-4 py-3 text-sm leading-6 text-muted-foreground motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out motion-reduce:animate-none",
824
+ menuTrigger: "inline-flex min-w-0",
825
+ menuContent: "z-50 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-none motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out",
826
+ menuLabel: "px-2 py-1.5 text-xs font-medium text-muted-foreground",
827
+ menuSeparator: "-mx-1 my-1 h-px bg-border",
828
+ menuItem: cn(
829
+ "relative flex min-h-8 min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-2.5 py-1.5 text-sm text-foreground outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:!cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
830
+ motionInteractive
831
+ ),
832
+ menuItemDefault: "text-foreground",
833
+ menuItemPrimary: "text-primary focus:text-primary data-[highlighted]:text-primary",
834
+ menuItemSuccess: "text-emerald-700 focus:text-emerald-700 data-[highlighted]:text-emerald-700",
835
+ menuItemWarning: "text-amber-700 focus:text-amber-700 data-[highlighted]:text-amber-700",
836
+ menuItemDanger: "text-destructive-text focus:text-destructive-text data-[highlighted]:text-destructive-text",
837
+ menuItemMuted: "text-muted-foreground focus:text-foreground data-[highlighted]:text-foreground",
838
+ menuItemDisabled: "!cursor-not-allowed opacity-50 data-[disabled]:pointer-events-none",
839
+ menuItemIcon: "inline-flex h-4 w-4 shrink-0 items-center justify-center",
840
+ menuItemLabel: "min-w-0 flex-1 truncate",
841
+ menuItemShortcut: "ml-4 shrink-0 text-xs font-medium text-muted-foreground",
842
+ menuCheckboxIndicator: "absolute left-2 inline-flex h-4 w-4 items-center justify-center text-current",
843
+ menuRadioIndicator: "absolute left-2 inline-flex h-4 w-4 items-center justify-center text-current",
844
+ menuSubTrigger: cn(
845
+ "relative flex min-h-8 min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-2.5 py-1.5 text-sm text-foreground outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:!cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
846
+ motionInteractive
847
+ ),
848
+ menuSubTriggerIcon: "ml-auto inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",
849
+ menuSubContent: "z-50 min-w-40 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-none motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out",
850
+ tableContainer: cn(
851
+ "relative isolate min-w-0 overflow-auto rounded-lg border border-border/70 bg-background/95 bg-clip-padding [scrollbar-gutter:stable]",
852
+ "[--base-table-header-height:2.75rem] [--base-table-split-scrollbar-gutter:0.75rem]",
853
+ "[--base-table-sticky-header-bg:hsl(var(--background))] [--base-table-header-separator:hsl(var(--border)_/_0.7)]",
854
+ tableScrollbarChrome,
855
+ motionBase
856
+ ),
857
+ tableContainerFooterAttached: "!rounded-b-none !shadow-none",
858
+ tableRoot: "w-full caption-bottom border-separate border-spacing-0 text-sm text-foreground",
859
+ tableCaption: "mt-3 text-sm text-muted-foreground",
860
+ tableHeader: cn(
861
+ "relative z-[2] bg-transparent [&_tr]:bg-transparent",
862
+ tableStickyHeaderCells
863
+ ),
864
+ tableBody: "[&_tr:last-child>*]:border-b-0",
865
+ tableFooter: "bg-muted/30 font-medium [&_tr>*]:border-t [&_tr>*]:border-border/70",
866
+ tableFooterBar: cn(
867
+ "flex min-w-0 flex-wrap items-center justify-between gap-3 rounded-lg border border-border/70 bg-muted/20 px-4 py-3 text-sm text-foreground shadow-none",
868
+ motionBase
869
+ ),
870
+ tableFooterBarAttached: "-mt-px rounded-t-none border-t border-border/70 shadow-none",
871
+ tableFooterBarLeading: "flex min-w-0 items-center gap-2",
872
+ tableFooterBarContent: "min-w-0 flex-1",
873
+ tableFooterBarActions: "ms-auto flex shrink-0 flex-wrap items-center gap-2",
874
+ tableSplitRoot: "grid w-full min-w-0 grid-cols-[minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)_auto] caption-bottom border-separate border-spacing-0 text-sm text-foreground",
875
+ tableSplitHeader: "block w-full min-w-0 shrink-0 overflow-x-hidden overflow-y-hidden bg-transparent",
876
+ tableSplitBody: cn(
877
+ "block min-h-0 w-full min-w-0 max-w-full justify-self-stretch overflow-auto [scrollbar-gutter:stable]",
878
+ tableScrollbarChrome
879
+ ),
880
+ tableSplitFooter: "block w-full min-w-0 shrink-0 overflow-x-hidden overflow-y-hidden",
881
+ tableSplitRow: "grid w-max min-w-full [grid-template-columns:var(--base-table-column-template)]",
882
+ tableSplitHead: "flex min-w-0 overflow-hidden",
883
+ tableSplitCell: "block min-w-0 overflow-hidden [overflow-wrap:anywhere]",
884
+ tableRow: cn(
885
+ "[&>*]:border-b [&>*]:border-border/60 data-[state=selected]:bg-primary/5 data-[state=selected]:[&>*]:bg-primary/5",
886
+ motionBase
887
+ ),
888
+ tableRowInteractive: "cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)] hover:bg-[var(--base-table-row-hover-bg)] hover:[&>*]:bg-[var(--base-table-row-hover-bg)]",
889
+ tableRowSelected: "bg-primary/5 [&>*]:bg-primary/5",
890
+ tableRowDisabled: "!cursor-not-allowed opacity-60",
891
+ tableHead: "relative h-11 whitespace-nowrap px-3 py-2 text-left align-middle text-xs font-semibold text-muted-foreground shadow-[inset_0_-1px_0_var(--base-table-header-separator)]",
892
+ tableHeadContent: "flex min-w-0 items-center justify-between gap-2",
893
+ tableHeadMain: "flex min-w-0 items-center gap-2",
894
+ tableHeadIcon: "inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",
895
+ tableHeadText: "grid min-w-0 gap-0.5",
896
+ tableHeadLabel: "min-w-0 truncate text-xs font-semibold leading-4 text-foreground",
897
+ tableHeadDescription: "min-w-0 truncate text-[11px] font-normal leading-4 text-muted-foreground",
898
+ tableHeadMeta: "shrink-0 text-[11px] font-medium text-muted-foreground",
899
+ tableHeadActions: "flex shrink-0 items-center gap-1",
900
+ tableHeadSortButton: cn(
901
+ "inline-flex min-w-0 cursor-pointer items-center gap-1 rounded-sm text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-60",
902
+ motionBase
903
+ ),
904
+ tableHeadSortIcon: cn(
905
+ "inline-flex h-3 w-3 shrink-0 items-center justify-center text-muted-foreground",
906
+ motionTransform
907
+ ),
908
+ tableHeadDragHandle: cn(
909
+ "inline-flex h-5 w-4 shrink-0 cursor-grab items-center justify-center rounded-sm text-muted-foreground hover:bg-muted active:cursor-grabbing focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-50",
910
+ motionBase
911
+ ),
912
+ tableHeadResizeHandle: cn(
913
+ "absolute end-0 top-1/2 h-7 w-2 -translate-y-1/2 cursor-col-resize touch-none rounded-sm after:absolute after:start-1/2 after:top-1/2 after:h-5 after:w-px after:-translate-x-1/2 after:-translate-y-1/2 after:bg-border hover:after:bg-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-50",
914
+ motionBase
915
+ ),
916
+ tableCell: "min-w-0 px-3 py-2 align-middle text-sm text-foreground [overflow-wrap:anywhere]",
917
+ tableCellAlignCenter: "text-center",
918
+ tableCellAlignRight: "text-right",
919
+ tableEmptyRow: "[&>*]:border-b [&>*]:border-border/60",
920
+ tableEmptyCell: "px-4 py-10 text-center",
921
+ tableEmptyContent: "mx-auto flex max-w-md flex-col items-center justify-center text-center",
922
+ tableEmptyIcon: "mb-3 flex h-10 w-10 items-center justify-center rounded-full bg-muted text-muted-foreground",
923
+ tableEmptyTitle: "text-sm font-semibold text-foreground",
924
+ tableEmptyDescription: "mt-1 text-sm leading-6 text-muted-foreground",
925
+ tableEmptyActions: "mt-4 flex flex-wrap items-center justify-center gap-2",
926
+ tableLoadingRow: "[&>*]:border-b [&>*]:border-border/60",
927
+ tableLoadingCell: "px-3 py-2",
928
+ tableLoadingSkeleton: "h-4 w-full rounded-md bg-muted/70",
929
+ layoutRoot: cn(
930
+ "grid min-w-0 overflow-hidden grid-rows-[auto_minmax(0,1fr)_auto] gap-3 rounded-lg border border-border/70 bg-background p-3 text-foreground",
931
+ motionBase
932
+ ),
933
+ layoutRootFull: "h-full min-h-0",
934
+ layoutHeader: "min-w-0",
935
+ layoutBody: "grid min-h-0 min-w-0 overflow-hidden gap-3",
936
+ layoutSidebar: "min-h-0 min-w-0 overflow-hidden",
937
+ layoutMain: "min-h-0 min-w-0 overflow-hidden",
938
+ layoutAside: "min-h-0 min-w-0 overflow-hidden",
939
+ layoutFooter: "min-w-0",
940
+ layoutPane: cn(
941
+ "h-full max-h-full min-h-0 min-w-0 overflow-hidden rounded-lg bg-background text-foreground",
942
+ motionBase
943
+ ),
944
+ layoutPaneScrollable: "overflow-auto",
945
+ layoutPaneBordered: "border border-border/70",
946
+ layoutPaneMuted: "bg-muted/25",
947
+ layoutPaneSoft: "bg-background/95 shadow-sm",
948
+ layoutPaneTransparent: "bg-transparent shadow-none",
949
+ layoutSplitRoot: "grid min-h-0 min-w-0 overflow-hidden",
950
+ layoutSplitHorizontal: "grid-flow-col",
951
+ layoutSplitVertical: "grid-flow-row",
952
+ layoutSplitPane: "min-h-0 min-w-0 overflow-hidden",
953
+ layoutSplitPrimary: "",
954
+ layoutSplitSecondary: "",
955
+ layoutResizeHandle: cn(
956
+ "group/resize relative z-10 flex shrink-0 items-center justify-center bg-transparent text-muted-foreground hover:bg-border/60 active:bg-border/70 focus-visible:bg-border/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
957
+ motionInteractive
958
+ ),
959
+ layoutResizeHandleHorizontal: "w-2 cursor-col-resize",
960
+ layoutResizeHandleVertical: "h-2 cursor-row-resize",
961
+ layoutResizeHandleDisabled: "cursor-default opacity-60",
962
+ layoutResizeHandleIndicator: "rounded-full bg-muted-foreground/45 group-hover/resize:bg-primary/70"
963
+ };
964
+ var densitySlots = {
965
+ compact: {
966
+ buttonBase: "h-8 px-2.5 text-xs",
967
+ buttonIconOnly: "h-8 w-8 px-0",
968
+ badgeBase: "px-1.5 py-0 text-[11px]",
969
+ panelHeader: "p-3",
970
+ panelBody: "px-3 pb-3 text-xs",
971
+ panelBodyStandalone: "pt-3",
972
+ panelFooter: "px-3 py-2",
973
+ stateRoot: "min-h-36 px-4 py-7",
974
+ stateIcon: "mb-3 h-10 w-10",
975
+ fieldRoot: "gap-1.5",
976
+ fieldLabel: "text-xs",
977
+ fieldDescription: "text-xs leading-5",
978
+ fieldMessage: "text-xs leading-5",
979
+ controlInput: "h-8 text-xs",
980
+ controlTextarea: "min-h-20 text-xs",
981
+ controlSelect: "h-8 text-xs",
982
+ selectMenu: "text-xs",
983
+ selectOption: "min-h-7 px-2 py-1 text-xs",
984
+ switchTrack: "h-5 w-9",
985
+ switchThumb: "h-3.5 w-3.5",
986
+ checkboxBox: "h-3.5 w-3.5",
987
+ checkboxLabel: "text-xs",
988
+ checkboxDescription: "text-xs leading-5",
989
+ radioOption: "px-2 py-1.5 text-xs",
990
+ radioMarker: "h-3.5 w-3.5",
991
+ radioIndicator: "h-1.5 w-1.5",
992
+ radioLabel: "text-xs",
993
+ radioDescription: "text-xs leading-5",
994
+ dialogPanel: "max-w-md",
995
+ dialogHeader: "px-4 py-3",
996
+ dialogTitle: "text-sm leading-5",
997
+ dialogDescription: "text-xs leading-5",
998
+ dialogBody: "px-4 py-3 text-xs",
999
+ dialogFooter: "px-4 py-3",
1000
+ dropdownMenu: "min-w-44 text-xs",
1001
+ dropdownItem: "px-2 py-1.5 text-xs",
1002
+ tooltipContent: "text-[11px] leading-4",
1003
+ noticeBase: "px-3 py-2 text-xs",
1004
+ dividerLabel: "text-[11px]",
1005
+ sectionHeaderRoot: "gap-2",
1006
+ sectionHeaderTitle: "text-sm leading-5",
1007
+ sectionHeaderDescription: "text-xs leading-5",
1008
+ tabsList: "gap-0.5 p-0.5",
1009
+ tabsTrigger: "px-2 py-1 text-xs",
1010
+ tabsPanel: "p-3 text-xs",
1011
+ segmentedRoot: "gap-0.5 p-0.5",
1012
+ segmentedItem: "px-2 py-1 text-xs",
1013
+ progressTrack: "h-1.5",
1014
+ avatarRoot: "text-xs",
1015
+ toolbarRoot: "gap-2 px-3 py-2",
1016
+ toolbarTitle: "text-xs",
1017
+ toolbarDescription: "text-xs leading-5",
1018
+ paginationButton: "h-7 min-w-7 px-2 text-xs",
1019
+ paginationPage: "h-7 min-w-7 px-2 text-xs",
1020
+ descriptionListRoot: "gap-2 text-xs",
1021
+ descriptionListItem: "px-2 py-1.5",
1022
+ descriptionListTerm: "text-[11px]",
1023
+ descriptionListValue: "text-xs leading-5",
1024
+ accordionTrigger: "px-3 py-2 text-xs",
1025
+ accordionPanel: "px-3 py-2 text-xs leading-5",
1026
+ menuContent: "min-w-40 p-0.5 text-xs",
1027
+ menuSubContent: "min-w-36 p-0.5 text-xs",
1028
+ menuLabel: "px-2 py-1 text-[11px]",
1029
+ menuItem: "min-h-7 px-2 py-1 text-xs",
1030
+ menuSubTrigger: "min-h-7 px-2 py-1 text-xs",
1031
+ menuItemShortcut: "text-[11px]",
1032
+ tableContainer: "[--base-table-header-height:2.25rem]",
1033
+ tableHead: "h-9 px-2 py-1.5 text-[11px]",
1034
+ tableCell: "px-2 py-1.5 text-xs",
1035
+ tableHeadLabel: "text-[11px]",
1036
+ tableHeadDescription: "text-[10px] leading-3",
1037
+ tableLoadingCell: "px-2 py-1.5",
1038
+ layoutRoot: "gap-2 p-2",
1039
+ layoutBody: "gap-2",
1040
+ layoutPane: "rounded-md text-xs",
1041
+ layoutResizeHandleHorizontal: "w-1.5",
1042
+ layoutResizeHandleVertical: "h-1.5"
1043
+ },
1044
+ default: {
1045
+ buttonBase: "h-9"
1046
+ },
1047
+ comfortable: {
1048
+ buttonBase: "h-10 px-3.5",
1049
+ buttonIconOnly: "h-10 w-10 px-0",
1050
+ badgeBase: "px-2.5 py-1",
1051
+ panelHeader: "p-5",
1052
+ panelBody: "px-5 pb-5",
1053
+ panelBodyStandalone: "pt-5",
1054
+ panelFooter: "px-5 py-3.5",
1055
+ stateRoot: "min-h-56 px-8 py-12",
1056
+ stateIcon: "mb-5 h-14 w-14",
1057
+ fieldRoot: "gap-2.5",
1058
+ controlInput: "h-10",
1059
+ controlTextarea: "min-h-28",
1060
+ controlSelect: "h-10",
1061
+ selectMenu: "p-1.5",
1062
+ selectOption: "min-h-9 px-3 py-2",
1063
+ switchTrack: "h-7 w-12",
1064
+ switchThumb: "h-5 w-5",
1065
+ checkboxBox: "h-5 w-5",
1066
+ radioOption: "px-4 py-3",
1067
+ radioMarker: "h-5 w-5",
1068
+ radioIndicator: "h-2.5 w-2.5",
1069
+ dialogPanel: "max-w-xl",
1070
+ dialogHeader: "px-6 py-5",
1071
+ dialogBody: "px-6 py-5",
1072
+ dialogFooter: "px-6 py-5",
1073
+ dropdownMenu: "min-w-56",
1074
+ dropdownItem: "px-3 py-2.5",
1075
+ noticeBase: "px-5 py-4",
1076
+ sectionHeaderTitle: "text-lg leading-7",
1077
+ tabsTrigger: "px-3.5 py-2",
1078
+ tabsPanel: "p-5",
1079
+ segmentedItem: "px-3.5 py-2",
1080
+ progressTrack: "h-2.5",
1081
+ toolbarRoot: "px-5 py-4",
1082
+ paginationButton: "h-9 min-w-9 px-3",
1083
+ paginationPage: "h-9 min-w-9 px-3",
1084
+ descriptionListItem: "px-4 py-3",
1085
+ accordionTrigger: "px-5 py-4",
1086
+ accordionPanel: "px-5 py-4",
1087
+ menuContent: "min-w-48 p-1.5",
1088
+ menuSubContent: "min-w-44 p-1.5",
1089
+ menuItem: "min-h-9 px-3 py-2",
1090
+ menuSubTrigger: "min-h-9 px-3 py-2",
1091
+ tableContainer: "[--base-table-header-height:3rem]",
1092
+ tableHead: "h-12 px-4 py-3",
1093
+ tableCell: "px-4 py-3",
1094
+ tableLoadingCell: "px-4 py-3",
1095
+ layoutRoot: "gap-4 p-4",
1096
+ layoutBody: "gap-4",
1097
+ layoutPane: "rounded-xl",
1098
+ layoutResizeHandleHorizontal: "w-2.5",
1099
+ layoutResizeHandleVertical: "h-2.5"
1100
+ }
1101
+ };
1102
+ var radiusSlots = {
1103
+ none: {
1104
+ buttonBase: "rounded-none",
1105
+ badgeBase: "rounded-none",
1106
+ panelRoot: "rounded-none",
1107
+ stateRoot: "rounded-none",
1108
+ stateIcon: "rounded-none",
1109
+ controlWrapper: "rounded-none",
1110
+ selectMenu: "rounded-none",
1111
+ selectOption: "rounded-none",
1112
+ switchTrack: "rounded-none",
1113
+ switchThumb: "rounded-none",
1114
+ checkboxBox: "rounded-none",
1115
+ radioOption: "rounded-none",
1116
+ dialogPanel: "rounded-none",
1117
+ dialogClose: "rounded-none",
1118
+ dropdownMenu: "rounded-none",
1119
+ dropdownItem: "rounded-none",
1120
+ tooltipContent: "rounded-none",
1121
+ noticeBase: "rounded-none",
1122
+ tabsList: "rounded-none",
1123
+ tabsTrigger: "rounded-none",
1124
+ tabsPanel: "rounded-none",
1125
+ segmentedRoot: "rounded-none",
1126
+ segmentedItem: "rounded-none",
1127
+ progressTrack: "rounded-none",
1128
+ progressIndicator: "rounded-none",
1129
+ skeletonRoot: "rounded-none",
1130
+ avatarRoot: "rounded-none",
1131
+ avatarStatus: "rounded-none",
1132
+ toolbarRoot: "rounded-none",
1133
+ paginationButton: "rounded-none",
1134
+ paginationPage: "rounded-none",
1135
+ descriptionListItem: "rounded-none",
1136
+ accordionItem: "rounded-none",
1137
+ menuContent: "rounded-none",
1138
+ menuItem: "rounded-none",
1139
+ menuSubTrigger: "rounded-none",
1140
+ menuSubContent: "rounded-none",
1141
+ tableContainer: "rounded-none",
1142
+ tableEmptyIcon: "rounded-none",
1143
+ tableLoadingSkeleton: "rounded-none",
1144
+ layoutRoot: "rounded-none",
1145
+ layoutPane: "rounded-none"
1146
+ },
1147
+ sm: {
1148
+ buttonBase: "rounded-sm",
1149
+ badgeBase: "rounded-sm",
1150
+ panelRoot: "rounded-sm",
1151
+ stateRoot: "rounded-sm",
1152
+ stateIcon: "rounded-sm",
1153
+ controlWrapper: "rounded-sm",
1154
+ selectMenu: "rounded-sm",
1155
+ selectOption: "rounded-sm",
1156
+ switchTrack: "rounded-sm",
1157
+ switchThumb: "rounded-sm",
1158
+ checkboxBox: "rounded-sm",
1159
+ radioOption: "rounded-sm",
1160
+ dialogPanel: "rounded-sm",
1161
+ dialogClose: "rounded-sm",
1162
+ dropdownMenu: "rounded-sm",
1163
+ dropdownItem: "rounded-sm",
1164
+ tooltipContent: "rounded-sm",
1165
+ noticeBase: "rounded-sm",
1166
+ tabsList: "rounded-sm",
1167
+ tabsTrigger: "rounded-sm",
1168
+ tabsPanel: "rounded-sm",
1169
+ segmentedRoot: "rounded-sm",
1170
+ segmentedItem: "rounded-sm",
1171
+ progressTrack: "rounded-sm",
1172
+ progressIndicator: "rounded-sm",
1173
+ skeletonRoot: "rounded-sm",
1174
+ avatarRoot: "rounded-sm",
1175
+ avatarStatus: "rounded-sm",
1176
+ toolbarRoot: "rounded-sm",
1177
+ paginationButton: "rounded-sm",
1178
+ paginationPage: "rounded-sm",
1179
+ descriptionListItem: "rounded-sm",
1180
+ accordionItem: "rounded-sm",
1181
+ menuContent: "rounded-sm",
1182
+ menuItem: "rounded-sm",
1183
+ menuSubTrigger: "rounded-sm",
1184
+ menuSubContent: "rounded-sm",
1185
+ tableContainer: "rounded-sm",
1186
+ tableEmptyIcon: "rounded-sm",
1187
+ tableLoadingSkeleton: "rounded-sm",
1188
+ layoutRoot: "rounded-sm",
1189
+ layoutPane: "rounded-sm"
1190
+ },
1191
+ md: {},
1192
+ lg: {
1193
+ buttonBase: "rounded-lg",
1194
+ badgeBase: "rounded-lg",
1195
+ panelRoot: "rounded-xl",
1196
+ stateRoot: "rounded-xl",
1197
+ stateIcon: "rounded-xl",
1198
+ controlWrapper: "rounded-lg",
1199
+ selectMenu: "rounded-lg",
1200
+ selectOption: "rounded-md",
1201
+ switchTrack: "rounded-full",
1202
+ switchThumb: "rounded-full",
1203
+ checkboxBox: "rounded-md",
1204
+ radioOption: "rounded-xl",
1205
+ dialogPanel: "rounded-xl",
1206
+ dialogClose: "rounded-lg",
1207
+ dropdownMenu: "rounded-lg",
1208
+ dropdownItem: "rounded-md",
1209
+ tooltipContent: "rounded-md",
1210
+ noticeBase: "rounded-xl",
1211
+ tabsList: "rounded-xl",
1212
+ tabsTrigger: "rounded-lg",
1213
+ tabsPanel: "rounded-xl",
1214
+ segmentedRoot: "rounded-xl",
1215
+ segmentedItem: "rounded-lg",
1216
+ skeletonRoot: "rounded-lg",
1217
+ toolbarRoot: "rounded-xl",
1218
+ descriptionListItem: "rounded-lg",
1219
+ accordionItem: "rounded-xl",
1220
+ menuContent: "rounded-lg",
1221
+ menuItem: "rounded-md",
1222
+ menuSubTrigger: "rounded-md",
1223
+ menuSubContent: "rounded-lg",
1224
+ tableContainer: "rounded-xl",
1225
+ tableEmptyIcon: "rounded-xl",
1226
+ tableLoadingSkeleton: "rounded-lg",
1227
+ layoutRoot: "rounded-xl",
1228
+ layoutPane: "rounded-xl"
1229
+ },
1230
+ xl: {
1231
+ buttonBase: "rounded-xl",
1232
+ badgeBase: "rounded-xl",
1233
+ panelRoot: "rounded-2xl",
1234
+ stateRoot: "rounded-2xl",
1235
+ stateIcon: "rounded-2xl",
1236
+ controlWrapper: "rounded-xl",
1237
+ selectMenu: "rounded-xl",
1238
+ selectOption: "rounded-lg",
1239
+ switchTrack: "rounded-full",
1240
+ switchThumb: "rounded-full",
1241
+ checkboxBox: "rounded-lg",
1242
+ radioOption: "rounded-2xl",
1243
+ dialogPanel: "rounded-2xl",
1244
+ dialogClose: "rounded-xl",
1245
+ dropdownMenu: "rounded-xl",
1246
+ dropdownItem: "rounded-lg",
1247
+ tooltipContent: "rounded-lg",
1248
+ noticeBase: "rounded-2xl",
1249
+ tabsList: "rounded-2xl",
1250
+ tabsTrigger: "rounded-xl",
1251
+ tabsPanel: "rounded-2xl",
1252
+ segmentedRoot: "rounded-2xl",
1253
+ segmentedItem: "rounded-xl",
1254
+ skeletonRoot: "rounded-xl",
1255
+ toolbarRoot: "rounded-2xl",
1256
+ paginationButton: "rounded-xl",
1257
+ paginationPage: "rounded-xl",
1258
+ descriptionListItem: "rounded-xl",
1259
+ accordionItem: "rounded-2xl",
1260
+ menuContent: "rounded-xl",
1261
+ menuItem: "rounded-lg",
1262
+ menuSubTrigger: "rounded-lg",
1263
+ menuSubContent: "rounded-xl",
1264
+ tableContainer: "rounded-2xl",
1265
+ tableEmptyIcon: "rounded-2xl",
1266
+ tableLoadingSkeleton: "rounded-xl",
1267
+ layoutRoot: "rounded-2xl",
1268
+ layoutPane: "rounded-2xl"
1269
+ },
1270
+ full: {
1271
+ buttonBase: "rounded-full",
1272
+ badgeBase: "rounded-full",
1273
+ panelRoot: "rounded-2xl",
1274
+ stateRoot: "rounded-2xl",
1275
+ stateIcon: "rounded-full",
1276
+ controlWrapper: "rounded-full",
1277
+ selectMenu: "rounded-2xl",
1278
+ selectOption: "rounded-full",
1279
+ switchTrack: "rounded-full",
1280
+ switchThumb: "rounded-full",
1281
+ checkboxBox: "rounded-full",
1282
+ radioOption: "rounded-2xl",
1283
+ dialogPanel: "rounded-2xl",
1284
+ dialogClose: "rounded-full",
1285
+ dropdownMenu: "rounded-2xl",
1286
+ dropdownItem: "rounded-full",
1287
+ tooltipContent: "rounded-full",
1288
+ noticeBase: "rounded-2xl",
1289
+ tabsList: "rounded-full",
1290
+ tabsTrigger: "rounded-full",
1291
+ tabsPanel: "rounded-2xl",
1292
+ segmentedRoot: "rounded-full",
1293
+ segmentedItem: "rounded-full",
1294
+ progressTrack: "rounded-full",
1295
+ progressIndicator: "rounded-full",
1296
+ skeletonRoot: "rounded-full",
1297
+ avatarRoot: "rounded-full",
1298
+ avatarStatus: "rounded-full",
1299
+ toolbarRoot: "rounded-2xl",
1300
+ paginationButton: "rounded-full",
1301
+ paginationPage: "rounded-full",
1302
+ descriptionListItem: "rounded-2xl",
1303
+ accordionItem: "rounded-2xl",
1304
+ menuContent: "rounded-2xl",
1305
+ menuItem: "rounded-full",
1306
+ menuSubTrigger: "rounded-full",
1307
+ menuSubContent: "rounded-2xl",
1308
+ tableContainer: "rounded-2xl",
1309
+ tableEmptyIcon: "rounded-full",
1310
+ tableLoadingSkeleton: "rounded-full",
1311
+ layoutRoot: "rounded-2xl",
1312
+ layoutPane: "rounded-2xl"
1313
+ }
1314
+ };
1315
+ var borderSlots = {
1316
+ none: {
1317
+ buttonBase: "border-transparent",
1318
+ badgeBase: "border-transparent",
1319
+ panelRoot: "border-transparent",
1320
+ panelFooter: "border-transparent",
1321
+ stateRoot: "border-transparent",
1322
+ controlWrapper: "border-transparent",
1323
+ selectMenu: "border-transparent",
1324
+ switchTrack: "border-transparent",
1325
+ checkboxBox: "border-transparent",
1326
+ radioOption: "border-transparent",
1327
+ radioMarker: "border-transparent",
1328
+ dialogPanel: "border-transparent",
1329
+ dialogHeader: "border-transparent",
1330
+ dialogFooter: "border-transparent",
1331
+ dropdownMenu: "border-transparent",
1332
+ tooltipContent: "border-transparent",
1333
+ noticeBase: "border-transparent",
1334
+ dividerRoot: "border-transparent",
1335
+ tabsList: "border-transparent",
1336
+ tabsPanel: "border-transparent",
1337
+ segmentedRoot: "border-transparent",
1338
+ avatarRoot: "border-transparent",
1339
+ toolbarRoot: "border-transparent",
1340
+ paginationButton: "border-transparent",
1341
+ descriptionListItem: "border-transparent",
1342
+ accordionItem: "border-transparent",
1343
+ accordionPanel: "border-transparent",
1344
+ menuContent: "border-transparent",
1345
+ menuSeparator: "bg-transparent",
1346
+ menuSubContent: "border-transparent",
1347
+ tableContainer: "border-transparent [--base-table-header-separator:transparent]",
1348
+ tableHeader: "border-transparent",
1349
+ tableFooter: "[&_tr>*]:border-transparent",
1350
+ tableFooterBar: "border-transparent",
1351
+ tableFooterBarAttached: "border-t border-transparent",
1352
+ tableRow: "[&>*]:border-transparent",
1353
+ tableEmptyRow: "[&>*]:border-transparent",
1354
+ tableLoadingRow: "[&>*]:border-transparent",
1355
+ layoutRoot: "border-transparent",
1356
+ layoutPaneBordered: "border-transparent",
1357
+ layoutResizeHandle: "bg-transparent hover:bg-transparent active:bg-transparent focus-visible:bg-transparent"
1358
+ },
1359
+ subtle: {
1360
+ buttonDefault: "border-border/60",
1361
+ badgeDefault: "border-border/60",
1362
+ panelRoot: "border-border/60",
1363
+ panelFooter: "border-border/60",
1364
+ stateRoot: "border-border/60",
1365
+ controlWrapper: "border-border/60",
1366
+ selectMenu: "border-border/60",
1367
+ switchTrack: "border-border/60",
1368
+ checkboxBox: "border-border/60",
1369
+ radioOption: "border-border/60",
1370
+ radioMarker: "border-border/60",
1371
+ dialogPanel: "border-border/60",
1372
+ dialogHeader: "border-border/60",
1373
+ dialogFooter: "border-border/60",
1374
+ dropdownMenu: "border-border/60",
1375
+ tooltipContent: "border-border/60",
1376
+ noticeDefault: "border-border/60",
1377
+ dividerRoot: "border-border/60",
1378
+ tabsList: "border-border/60",
1379
+ tabsPanel: "border-border/60",
1380
+ segmentedRoot: "border-border/60",
1381
+ avatarRoot: "border-border/60",
1382
+ toolbarRoot: "border-border/60",
1383
+ paginationButton: "border-border/60",
1384
+ descriptionListItem: "border-border/60",
1385
+ accordionItem: "border-border/60",
1386
+ accordionPanel: "border-border/60",
1387
+ menuContent: "border-border/60",
1388
+ menuSeparator: "bg-border/60",
1389
+ menuSubContent: "border-border/60",
1390
+ tableContainer: "border-border/60 [--base-table-header-separator:hsl(var(--border)_/_0.6)]",
1391
+ tableHeader: "border-border/60",
1392
+ tableFooter: "[&_tr>*]:border-border/60",
1393
+ tableFooterBar: "border-border/60",
1394
+ tableFooterBarAttached: "border-t border-border/60",
1395
+ tableRow: "[&>*]:border-border/50",
1396
+ tableEmptyRow: "[&>*]:border-border/50",
1397
+ tableLoadingRow: "[&>*]:border-border/50",
1398
+ layoutRoot: "border-border/60",
1399
+ layoutPaneBordered: "border-border/60"
1400
+ },
1401
+ solid: {},
1402
+ strong: {
1403
+ buttonDefault: "border-foreground/20",
1404
+ badgeDefault: "border-foreground/20",
1405
+ panelRoot: "border-foreground/20",
1406
+ panelFooter: "border-foreground/20",
1407
+ stateRoot: "border-foreground/20",
1408
+ controlWrapper: "border-foreground/20",
1409
+ selectMenu: "border-foreground/20",
1410
+ switchTrack: "border-foreground/20",
1411
+ checkboxBox: "border-foreground/20",
1412
+ radioOption: "border-foreground/20",
1413
+ radioMarker: "border-foreground/20",
1414
+ dialogPanel: "border-foreground/20",
1415
+ dialogHeader: "border-foreground/15",
1416
+ dialogFooter: "border-foreground/15",
1417
+ dropdownMenu: "border-foreground/20",
1418
+ tooltipContent: "border-foreground/20",
1419
+ noticeDefault: "border-foreground/20",
1420
+ dividerRoot: "border-foreground/20",
1421
+ tabsList: "border-foreground/20",
1422
+ tabsPanel: "border-foreground/20",
1423
+ segmentedRoot: "border-foreground/20",
1424
+ avatarRoot: "border-foreground/20",
1425
+ toolbarRoot: "border-foreground/20",
1426
+ paginationButton: "border-foreground/20",
1427
+ descriptionListItem: "border-foreground/20",
1428
+ accordionItem: "border-foreground/20",
1429
+ accordionPanel: "border-foreground/20",
1430
+ menuContent: "border-foreground/20",
1431
+ menuSeparator: "bg-foreground/15",
1432
+ menuSubContent: "border-foreground/20",
1433
+ tableContainer: "border-foreground/20 [--base-table-header-separator:hsl(var(--foreground)_/_0.15)]",
1434
+ tableHeader: "border-foreground/20",
1435
+ tableFooter: "[&_tr>*]:border-foreground/20",
1436
+ tableFooterBar: "border-foreground/20",
1437
+ tableFooterBarAttached: "border-t border-foreground/20",
1438
+ tableRow: "[&>*]:border-foreground/15",
1439
+ tableEmptyRow: "[&>*]:border-foreground/15",
1440
+ tableLoadingRow: "[&>*]:border-foreground/15",
1441
+ layoutRoot: "border-foreground/20",
1442
+ layoutPaneBordered: "border-foreground/20",
1443
+ layoutResizeHandle: "hover:bg-foreground/15 active:bg-foreground/20 focus-visible:bg-foreground/15"
1444
+ }
1445
+ };
1446
+ var backgroundSlots = {
1447
+ plain: {},
1448
+ muted: {
1449
+ buttonDefault: "bg-muted/20 hover:bg-muted/45",
1450
+ panelRoot: "bg-card",
1451
+ panelFooter: "bg-muted/20",
1452
+ stateRoot: "bg-muted/20",
1453
+ controlWrapper: "bg-background",
1454
+ selectMenu: "bg-background",
1455
+ selectOptionActive: "bg-muted/70 text-foreground",
1456
+ checkboxBox: "bg-background",
1457
+ radioOption: "bg-card hover:bg-muted/45",
1458
+ radioMarker: "bg-background",
1459
+ dialogPanel: "bg-card",
1460
+ dropdownMenu: "bg-background",
1461
+ dropdownItem: "hover:bg-muted/60",
1462
+ tooltipContent: "bg-popover",
1463
+ noticeDefault: "bg-muted/20",
1464
+ tabsList: "bg-muted/35",
1465
+ tabsTriggerActive: "bg-background",
1466
+ tabsPanel: "bg-card",
1467
+ segmentedRoot: "bg-muted/35",
1468
+ segmentedItemActive: "bg-background",
1469
+ progressTrack: "bg-muted/60",
1470
+ skeletonRoot: "bg-muted",
1471
+ toolbarRoot: "bg-card",
1472
+ paginationButton: "bg-background hover:bg-muted/60",
1473
+ paginationPage: "bg-muted/60",
1474
+ descriptionListItem: "bg-card",
1475
+ accordionItem: "bg-card",
1476
+ menuContent: "bg-background",
1477
+ menuItem: "focus:bg-muted/70 data-[highlighted]:bg-muted/70",
1478
+ menuSubTrigger: "focus:bg-muted/70 data-[highlighted]:bg-muted/70 data-[state=open]:bg-muted/70",
1479
+ menuSubContent: "bg-background",
1480
+ tableContainer: "bg-background/95 [scrollbar-gutter:stable]",
1481
+ tableFooter: "bg-muted/35",
1482
+ tableFooterBar: "bg-muted/30 shadow-none",
1483
+ tableRowInteractive: "cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.45)]",
1484
+ tableLoadingSkeleton: "bg-muted",
1485
+ layoutRoot: "bg-card",
1486
+ layoutPane: "bg-card",
1487
+ layoutPaneMuted: "bg-muted/35",
1488
+ layoutResizeHandle: "hover:bg-border/70 active:bg-border/80 focus-visible:bg-border/70"
1489
+ },
1490
+ soft: {
1491
+ buttonDefault: "bg-muted/30 hover:bg-muted/55",
1492
+ panelRoot: "bg-background/95 shadow-sm",
1493
+ stateRoot: "bg-background/95 shadow-sm",
1494
+ controlWrapper: "bg-background/95",
1495
+ selectMenu: "bg-background/95 shadow-xl",
1496
+ selectOptionActive: "bg-muted/60 text-foreground",
1497
+ checkboxBox: "bg-background/95",
1498
+ radioOption: "bg-background/95 shadow-sm hover:bg-muted/35",
1499
+ radioMarker: "bg-background/95",
1500
+ dialogPanel: "bg-background/95 shadow-xl",
1501
+ dropdownMenu: "bg-background/95 shadow-xl",
1502
+ dropdownItem: "hover:bg-muted/55",
1503
+ tooltipContent: "bg-popover shadow-xl",
1504
+ noticeDefault: "bg-background/95 shadow-sm",
1505
+ tabsList: "bg-background/60 shadow-sm",
1506
+ tabsTriggerActive: "bg-background",
1507
+ tabsPanel: "bg-background/95 shadow-sm",
1508
+ segmentedRoot: "bg-background/60 shadow-sm",
1509
+ segmentedItemActive: "bg-background",
1510
+ skeletonRoot: "bg-background/80",
1511
+ toolbarRoot: "bg-background/95 shadow-sm",
1512
+ paginationButton: "bg-background/95 hover:bg-muted/55",
1513
+ descriptionListItem: "bg-background/95 shadow-sm",
1514
+ accordionItem: "bg-background/95 shadow-sm",
1515
+ menuContent: "bg-background/95 shadow-xl",
1516
+ menuItem: "focus:bg-muted/60 data-[highlighted]:bg-muted/60",
1517
+ menuSubTrigger: "focus:bg-muted/60 data-[highlighted]:bg-muted/60 data-[state=open]:bg-muted/60",
1518
+ menuSubContent: "bg-background/95 shadow-xl",
1519
+ tableContainer: "bg-background/95 shadow-sm [scrollbar-gutter:stable]",
1520
+ tableFooter: "bg-muted/25",
1521
+ tableFooterBar: "bg-muted/25 shadow-none",
1522
+ tableRowInteractive: "cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)]",
1523
+ tableLoadingSkeleton: "bg-muted/65",
1524
+ layoutRoot: "bg-background/95 shadow-sm",
1525
+ layoutPane: "bg-background/95 shadow-sm",
1526
+ layoutPaneSoft: "bg-background/95 shadow-md"
1527
+ },
1528
+ glass: {
1529
+ buttonBase: "backdrop-blur-md",
1530
+ buttonDefault: "border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",
1531
+ badgeDefault: "border-white/10 bg-white/[0.08] text-foreground",
1532
+ panelRoot: "border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",
1533
+ panelFooter: "border-white/10 bg-white/[0.05]",
1534
+ stateRoot: "border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",
1535
+ stateIcon: "bg-white/10 text-foreground",
1536
+ controlWrapper: "border-white/10 bg-white/[0.08] text-foreground backdrop-blur-md",
1537
+ selectMenu: "border-white/10 bg-white/[0.10] text-foreground shadow-[0_18px_60px_rgba(15,23,42,0.18)] backdrop-blur-md",
1538
+ selectOption: "text-foreground",
1539
+ selectOptionActive: "bg-white/[0.14] text-foreground",
1540
+ selectOptionSelected: "bg-white/[0.18] text-foreground",
1541
+ switchTrack: "border-white/10 bg-white/[0.12] backdrop-blur-md",
1542
+ checkboxBox: "border-white/10 bg-white/[0.08] backdrop-blur-md",
1543
+ checkboxBoxChecked: "border-white/20 bg-white/[0.22] text-foreground",
1544
+ radioOption: "border-white/10 bg-white/[0.06] backdrop-blur-md hover:bg-white/[0.10]",
1545
+ radioMarker: "border-white/10 bg-white/[0.08] backdrop-blur-md",
1546
+ radioMarkerChecked: "border-white/25 bg-white/[0.16]",
1547
+ dialogOverlay: "bg-background/45 backdrop-blur-md",
1548
+ dialogPanel: "border-white/10 bg-white/[0.08] shadow-2xl backdrop-blur-md",
1549
+ dialogHeader: "border-white/10",
1550
+ dialogFooter: "border-white/10",
1551
+ dropdownMenu: "border-white/10 bg-white/[0.10] text-foreground shadow-[0_18px_60px_rgba(15,23,42,0.18)] backdrop-blur-md",
1552
+ dropdownItem: "text-foreground hover:bg-white/[0.14]",
1553
+ tooltipContent: "border-white/10 bg-white/[0.14] text-foreground shadow-[0_18px_60px_rgba(15,23,42,0.18)] backdrop-blur-md",
1554
+ noticeDefault: "border-white/10 bg-white/[0.08] text-foreground backdrop-blur-md",
1555
+ dividerRoot: "border-white/15",
1556
+ tabsList: "border-white/10 bg-white/[0.08] backdrop-blur-md",
1557
+ tabsTrigger: "text-muted-foreground hover:bg-white/[0.12] hover:text-foreground",
1558
+ tabsTriggerActive: "bg-white/[0.16] text-foreground shadow-none",
1559
+ tabsPanel: "border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",
1560
+ segmentedRoot: "border-white/10 bg-white/[0.08] backdrop-blur-md",
1561
+ segmentedItem: "text-muted-foreground hover:bg-white/[0.12] hover:text-foreground",
1562
+ segmentedItemActive: "bg-white/[0.16] text-foreground shadow-none",
1563
+ progressTrack: "bg-white/[0.12]",
1564
+ skeletonRoot: "bg-white/[0.16]",
1565
+ avatarRoot: "border-white/10 bg-white/[0.12] text-foreground",
1566
+ avatarFallback: "bg-white/[0.12] text-foreground",
1567
+ avatarStatus: "border-background",
1568
+ toolbarRoot: "border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",
1569
+ paginationButton: "border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",
1570
+ paginationPage: "bg-white/[0.12] text-foreground",
1571
+ descriptionListItem: "border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",
1572
+ accordionItem: "border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",
1573
+ accordionPanel: "border-white/10",
1574
+ menuContent: "border-white/10 bg-white/[0.10] text-foreground shadow-[0_18px_60px_rgba(15,23,42,0.18)] backdrop-blur-md",
1575
+ menuSeparator: "bg-white/10",
1576
+ menuItem: "text-foreground focus:bg-white/[0.14] focus:text-foreground data-[highlighted]:bg-white/[0.14] data-[highlighted]:text-foreground",
1577
+ menuSubTrigger: "text-foreground focus:bg-white/[0.14] focus:text-foreground data-[highlighted]:bg-white/[0.14] data-[highlighted]:text-foreground data-[state=open]:bg-white/[0.16]",
1578
+ menuSubContent: "border-white/10 bg-white/[0.10] text-foreground shadow-[0_18px_60px_rgba(15,23,42,0.18)] backdrop-blur-md",
1579
+ tableContainer: "border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md [scrollbar-gutter:stable] [--base-table-sticky-header-bg:rgb(255_255_255_/_0.94)] [--base-table-header-separator:rgb(255_255_255_/_0.24)]",
1580
+ tableHeader: "border-white/10",
1581
+ tableFooter: "bg-white/[0.05] [&_tr>*]:border-white/10",
1582
+ tableFooterBar: "border-white/10 bg-white/[0.05] shadow-none backdrop-blur-md",
1583
+ tableFooterBarAttached: "border-t border-white/10",
1584
+ tableRow: "[&>*]:border-white/10",
1585
+ tableRowInteractive: "cursor-pointer [--base-table-row-hover-bg:rgb(255_255_255_/_0.08)]",
1586
+ tableHeadLabel: "text-foreground",
1587
+ tableLoadingSkeleton: "bg-white/[0.16]",
1588
+ layoutRoot: "border-white/10 bg-white/[0.05] shadow-none backdrop-blur-md",
1589
+ layoutPane: "border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",
1590
+ layoutPaneMuted: "bg-white/[0.08]",
1591
+ layoutPaneSoft: "bg-white/[0.10] shadow-none backdrop-blur-md",
1592
+ layoutResizeHandle: "text-foreground/65 hover:bg-white/10 active:bg-white/15 focus-visible:bg-white/10",
1593
+ layoutResizeHandleIndicator: "bg-white/45 group-hover/resize:bg-white/75"
1594
+ },
1595
+ dark: {
1596
+ buttonBase: "border-white/15 text-white shadow-lg backdrop-blur",
1597
+ buttonDefault: "bg-black/30 hover:bg-black/[0.45]",
1598
+ buttonPrimary: "border-white/25 bg-white/20 text-white hover:bg-white/25",
1599
+ buttonMuted: "border-white/10 bg-black/20 text-white/70 hover:bg-black/[0.35] hover:text-white",
1600
+ badgeDefault: "border-white/10 bg-white/[0.08] text-white",
1601
+ badgeMuted: "border-white/10 bg-black/20 text-white/70",
1602
+ panelRoot: "border-white/10 bg-slate-950 text-white shadow-none",
1603
+ panelTitle: "text-white",
1604
+ panelDescription: "text-white/65",
1605
+ panelBody: "text-white/85",
1606
+ panelFooter: "border-white/10 bg-white/[0.04]",
1607
+ stateRoot: "border-white/10 bg-slate-950 text-white shadow-none",
1608
+ stateIcon: "bg-white/10 text-white/75",
1609
+ stateTitle: "text-white",
1610
+ stateDescription: "text-white/65",
1611
+ fieldLabel: "text-white",
1612
+ fieldDescription: "text-white/65",
1613
+ fieldMessage: "text-white/65",
1614
+ controlWrapper: "border-white/15 bg-black/30 text-white shadow-lg backdrop-blur focus-within:border-white/35",
1615
+ controlBase: "text-white placeholder:text-white/45",
1616
+ selectChevron: "text-white/65",
1617
+ selectMenu: "border-white/15 bg-slate-950 text-white shadow-2xl",
1618
+ selectOption: "text-white",
1619
+ selectOptionActive: "bg-white/[0.12] text-white",
1620
+ selectOptionSelected: "bg-white/[0.16] text-white",
1621
+ selectPlaceholder: "text-white/45",
1622
+ switchTrack: "border-white/15 bg-black/30 shadow-lg backdrop-blur",
1623
+ switchChecked: "border-white/25 bg-white/25 text-white",
1624
+ switchLabel: "text-white",
1625
+ switchDescription: "text-white/65",
1626
+ checkboxBox: "border-white/15 bg-black/30 text-white shadow-lg backdrop-blur",
1627
+ checkboxBoxChecked: "border-white/25 bg-white/25 text-white",
1628
+ checkboxLabel: "text-white",
1629
+ checkboxDescription: "text-white/65",
1630
+ radioOption: "border-white/10 bg-white/[0.06] text-white hover:bg-white/[0.08]",
1631
+ radioMarker: "border-white/15 bg-black/30 text-white shadow-lg backdrop-blur",
1632
+ radioMarkerChecked: "border-white/25 bg-white/25",
1633
+ radioIndicator: "bg-white",
1634
+ radioLabel: "text-white",
1635
+ radioDescription: "text-white/65",
1636
+ dialogOverlay: "bg-slate-950/75",
1637
+ dialogPanel: "border-white/10 bg-slate-950 text-white shadow-2xl",
1638
+ dialogHeader: "border-white/10",
1639
+ dialogTitle: "text-white",
1640
+ dialogDescription: "text-white/65",
1641
+ dialogBody: "text-white/85",
1642
+ dialogFooter: "border-white/10",
1643
+ dialogClose: "text-white/65 hover:bg-white/[0.08] hover:text-white",
1644
+ dropdownMenu: "border-white/15 bg-slate-950 text-white shadow-2xl",
1645
+ dropdownLabel: "text-white/55",
1646
+ dropdownSeparator: "bg-white/15",
1647
+ dropdownItem: "text-white hover:bg-white/[0.10]",
1648
+ dropdownItemDescription: "text-white/55",
1649
+ dropdownItemShortcut: "text-white/55",
1650
+ tooltipContent: "border-white/15 bg-slate-950 text-white shadow-2xl",
1651
+ noticeDefault: "border-white/10 bg-white/[0.08] text-white",
1652
+ noticeMuted: "border-white/10 bg-black/20 text-white/70",
1653
+ dividerRoot: "border-white/15",
1654
+ dividerLabel: "text-white/55",
1655
+ sectionHeaderEyebrow: "text-white/55",
1656
+ sectionHeaderTitle: "text-white",
1657
+ sectionHeaderDescription: "text-white/65",
1658
+ tabsList: "border-white/10 bg-white/[0.08]",
1659
+ tabsTrigger: "text-white/65 hover:bg-white/[0.12] hover:text-white",
1660
+ tabsTriggerActive: "bg-white/[0.16] text-white shadow-none",
1661
+ tabsPanel: "border-white/10 bg-white/[0.06] text-white",
1662
+ segmentedRoot: "border-white/10 bg-white/[0.08]",
1663
+ segmentedItem: "text-white/65 hover:bg-white/[0.12] hover:text-white",
1664
+ segmentedItemActive: "bg-white/[0.16] text-white shadow-none",
1665
+ progressTrack: "bg-white/[0.12]",
1666
+ progressLabel: "text-white",
1667
+ progressValue: "text-white/65",
1668
+ skeletonRoot: "bg-white/[0.14]",
1669
+ avatarRoot: "border-white/15 bg-white/[0.10] text-white",
1670
+ avatarFallback: "bg-white/[0.10] text-white/75",
1671
+ avatarText: "text-white",
1672
+ avatarStatus: "border-slate-950",
1673
+ toolbarRoot: "border-white/10 bg-white/[0.06] text-white",
1674
+ toolbarTitle: "text-white",
1675
+ toolbarDescription: "text-white/65",
1676
+ breadcrumbLink: "text-white/65 hover:text-white",
1677
+ breadcrumbCurrent: "text-white",
1678
+ breadcrumbSeparator: "text-white/45",
1679
+ paginationInfo: "text-white/65",
1680
+ paginationButton: "border-white/10 bg-white/[0.08] text-white hover:bg-white/[0.14]",
1681
+ paginationPage: "bg-white/[0.14] text-white",
1682
+ descriptionListItem: "border-white/10 bg-white/[0.06]",
1683
+ descriptionListTerm: "text-white/55",
1684
+ descriptionListValue: "text-white",
1685
+ accordionItem: "border-white/10 bg-white/[0.06]",
1686
+ accordionTrigger: "text-white hover:bg-white/[0.08]",
1687
+ accordionPanel: "border-white/10 text-white/70",
1688
+ tableContainer: "border-white/10 bg-slate-950 text-white shadow-none [scrollbar-gutter:stable] [--base-table-sticky-header-bg:rgb(2_6_23_/_0.98)] [--base-table-header-separator:rgb(255_255_255_/_0.16)]",
1689
+ tableRoot: "text-white",
1690
+ tableHeader: "border-white/10",
1691
+ tableFooter: "bg-white/[0.05] [&_tr>*]:border-white/10",
1692
+ tableFooterBar: "border-white/10 bg-white/[0.05] text-white/65",
1693
+ tableFooterBarAttached: "border-t border-white/10",
1694
+ tableRow: "[&>*]:border-white/10",
1695
+ tableRowInteractive: "cursor-pointer [--base-table-row-hover-bg:rgb(255_255_255_/_0.06)]",
1696
+ tableHead: "text-white/65",
1697
+ tableHeadLabel: "text-white",
1698
+ tableHeadDescription: "text-white/55",
1699
+ tableHeadMeta: "text-white/55",
1700
+ tableHeadIcon: "text-white/55",
1701
+ tableHeadSortIcon: "text-white/55",
1702
+ tableHeadDragHandle: "text-white/55 hover:bg-white/[0.08]",
1703
+ tableHeadResizeHandle: "after:bg-white/20 hover:after:bg-white/60",
1704
+ tableCell: "text-white/85",
1705
+ tableEmptyIcon: "bg-white/10 text-white/65",
1706
+ tableEmptyTitle: "text-white",
1707
+ tableEmptyDescription: "text-white/60",
1708
+ menuContent: "border-white/10 bg-slate-950 text-white shadow-2xl",
1709
+ menuLabel: "text-white/55",
1710
+ menuSeparator: "bg-white/10",
1711
+ menuItem: "text-white focus:bg-white/[0.10] focus:text-white data-[highlighted]:bg-white/[0.10] data-[highlighted]:text-white",
1712
+ menuItemDefault: "text-white",
1713
+ menuItemPrimary: "text-sky-200 focus:text-sky-200 data-[highlighted]:text-sky-200",
1714
+ menuItemSuccess: "text-emerald-200 focus:text-emerald-200 data-[highlighted]:text-emerald-200",
1715
+ menuItemWarning: "text-amber-200 focus:text-amber-200 data-[highlighted]:text-amber-200",
1716
+ menuItemDanger: "text-red-200 focus:text-red-200 data-[highlighted]:text-red-200",
1717
+ menuItemMuted: "text-white/65 focus:text-white data-[highlighted]:text-white",
1718
+ menuItemShortcut: "text-white/45",
1719
+ menuSubTrigger: "text-white focus:bg-white/[0.10] focus:text-white data-[highlighted]:bg-white/[0.10] data-[highlighted]:text-white data-[state=open]:bg-white/[0.12]",
1720
+ menuSubTriggerIcon: "text-white/55",
1721
+ menuSubContent: "border-white/10 bg-slate-950 text-white shadow-2xl",
1722
+ tableLoadingSkeleton: "bg-white/[0.14]",
1723
+ layoutRoot: "border-white/10 bg-slate-950 text-white shadow-none",
1724
+ layoutPane: "border-white/10 bg-slate-950 text-white shadow-none",
1725
+ layoutPaneMuted: "bg-white/[0.06]",
1726
+ layoutPaneSoft: "bg-white/[0.08] shadow-none",
1727
+ layoutResizeHandle: "text-white/65 hover:bg-white/10 active:bg-white/15 focus-visible:bg-white/10",
1728
+ layoutResizeHandleIndicator: "bg-white/45 group-hover/resize:bg-white/75"
1729
+ }
1730
+ };
1731
+ var presetDefaults = {
1732
+ default: {
1733
+ density: "default",
1734
+ radius: "md",
1735
+ border: "solid",
1736
+ background: "plain"
1737
+ },
1738
+ admin: {
1739
+ density: "default",
1740
+ radius: "lg",
1741
+ border: "subtle",
1742
+ background: "soft"
1743
+ },
1744
+ monkey: {
1745
+ density: "compact",
1746
+ radius: "md",
1747
+ border: "subtle",
1748
+ background: "muted"
1749
+ },
1750
+ bsd: {
1751
+ density: "default",
1752
+ radius: "lg",
1753
+ border: "subtle",
1754
+ background: "glass"
1755
+ },
1756
+ glass: {
1757
+ density: "default",
1758
+ radius: "xl",
1759
+ border: "subtle",
1760
+ background: "glass"
1761
+ },
1762
+ "hard-edge": {
1763
+ density: "compact",
1764
+ radius: "none",
1765
+ border: "strong",
1766
+ background: "plain"
1767
+ }
1768
+ };
1769
+ var presetSlots = {
1770
+ admin: {
1771
+ buttonBase: "font-medium",
1772
+ panelRoot: "border-border/70",
1773
+ controlWrapper: "font-medium",
1774
+ tabsTrigger: "font-medium",
1775
+ segmentedItem: "font-medium",
1776
+ toolbarRoot: "border-border/70",
1777
+ tableContainer: "border-border/70",
1778
+ tableFooterBar: "border-border/70",
1779
+ tableHeadLabel: "font-semibold",
1780
+ menuItemLabel: "font-medium"
1781
+ },
1782
+ monkey: {
1783
+ buttonBase: "text-xs",
1784
+ badgeBase: "text-[11px]",
1785
+ fieldLabel: "text-xs",
1786
+ controlBase: "text-xs",
1787
+ selectOption: "text-xs",
1788
+ menuItem: "text-xs",
1789
+ menuSubTrigger: "text-xs",
1790
+ noticeBase: "text-xs",
1791
+ sectionHeaderTitle: "text-sm",
1792
+ tabsTrigger: "text-xs",
1793
+ segmentedItem: "text-xs",
1794
+ toolbarTitle: "text-xs",
1795
+ paginationRoot: "text-xs"
1796
+ },
1797
+ bsd: {
1798
+ buttonPrimary: "border-sky-300/25 bg-sky-300/15 text-sky-50 hover:bg-sky-300/20",
1799
+ badgePrimary: "border-sky-300/25 bg-sky-300/15 text-sky-50",
1800
+ noticePrimary: "border-sky-300/25 bg-sky-300/15 text-sky-50",
1801
+ progressIndicator: "bg-sky-300",
1802
+ avatarStatus: "border-slate-950"
1803
+ },
1804
+ glass: {
1805
+ panelRoot: "shadow-[0_24px_80px_rgba(15,23,42,0.12)]",
1806
+ stateRoot: "shadow-[0_24px_80px_rgba(15,23,42,0.12)]",
1807
+ noticeBase: "shadow-[0_18px_60px_rgba(15,23,42,0.10)]",
1808
+ tabsPanel: "shadow-[0_18px_60px_rgba(15,23,42,0.10)]",
1809
+ toolbarRoot: "shadow-[0_18px_60px_rgba(15,23,42,0.10)]",
1810
+ descriptionListItem: "shadow-[0_12px_40px_rgba(15,23,42,0.08)]",
1811
+ accordionItem: "shadow-[0_12px_40px_rgba(15,23,42,0.08)]"
1812
+ },
1813
+ "hard-edge": {
1814
+ buttonBase: "shadow-none",
1815
+ panelRoot: "shadow-none",
1816
+ stateRoot: "shadow-none",
1817
+ controlWrapper: "shadow-none",
1818
+ selectMenu: "shadow-none",
1819
+ menuContent: "shadow-none",
1820
+ menuSubContent: "shadow-none",
1821
+ noticeBase: "shadow-none",
1822
+ tabsList: "shadow-none",
1823
+ tabsTriggerActive: "shadow-none",
1824
+ tabsPanel: "shadow-none",
1825
+ segmentedRoot: "shadow-none",
1826
+ segmentedItemActive: "shadow-none",
1827
+ toolbarRoot: "shadow-none",
1828
+ descriptionListItem: "shadow-none",
1829
+ accordionItem: "shadow-none"
1830
+ }
1831
+ };
1832
+ function getPresetDefaults(preset) {
1833
+ return presetDefaults[preset] ?? presetDefaults.default;
1834
+ }
1835
+ var slotKeys = Object.keys(baseSlots);
1836
+ function mergeSlots(...sources) {
1837
+ return slotKeys.reduce((resolved, key) => {
1838
+ resolved[key] = cn(...sources.map((source) => source?.[key]));
1839
+ return resolved;
1840
+ }, {});
1841
+ }
1842
+ function mergeStyles(...styleSets) {
1843
+ return Object.assign({}, ...styleSets.filter(Boolean));
1844
+ }
1845
+ function resolveBaseAppearance(appearance) {
1846
+ const preset = appearance?.preset ?? "default";
1847
+ const defaults = getPresetDefaults(preset);
1848
+ const density = appearance?.density ?? defaults.density ?? "default";
1849
+ const radius = appearance?.radius ?? defaults.radius ?? "md";
1850
+ const border = appearance?.border ?? defaults.border ?? "solid";
1851
+ const background = appearance?.background ?? defaults.background ?? "plain";
1852
+ return {
1853
+ preset,
1854
+ density,
1855
+ radius,
1856
+ border,
1857
+ background,
1858
+ styles: mergeStyles(emptyStyles, appearance?.styles),
1859
+ slots: mergeSlots(
1860
+ baseSlots,
1861
+ presetSlots[preset],
1862
+ densitySlots[density],
1863
+ radiusSlots[radius],
1864
+ borderSlots[border],
1865
+ backgroundSlots[background],
1866
+ appearance?.slots
1867
+ )
1868
+ };
1869
+ }
1870
+
1871
+ // src/components/data-explorer/utils.ts
1872
+ function cn2(...parts) {
1873
+ return parts.filter(Boolean).join(" ");
1874
+ }
1875
+
1876
+ // src/components/data-explorer/theme.ts
1877
+ var emptyStyles2 = {};
1878
+ var baseSlots2 = {
1879
+ toolbarRoot: "flex flex-wrap items-center gap-2 border-b border-border bg-background px-4 py-3",
1880
+ toolbarLeading: "flex items-center gap-2",
1881
+ toolbarSearch: "flex h-10 min-w-52 flex-1 items-center gap-2 rounded-md border border-border bg-background px-3 text-sm",
1882
+ toolbarSearchIcon: "inline-flex shrink-0 text-muted-foreground",
1883
+ toolbarSearchInput: "min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",
1884
+ toolbarViewSwitch: "flex items-center rounded-md border border-border bg-background p-0.5",
1885
+ toolbarViewButton: "inline-flex h-9 min-w-9 items-center justify-center gap-2 rounded-md px-2 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-50",
1886
+ toolbarViewButtonActive: "bg-muted text-foreground",
1887
+ toolbarActions: "flex items-center gap-2",
1888
+ actionBarRoot: "flex min-w-0 flex-wrap items-center gap-2",
1889
+ actionBarLeading: "flex shrink-0 items-center gap-2",
1890
+ actionBarActions: "flex min-w-0 flex-1 flex-wrap items-center gap-2",
1891
+ actionBarTrailing: "flex shrink-0 items-center gap-2",
1892
+ actionButtonBase: "inline-flex h-9 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1893
+ actionButtonDefault: "border-border bg-background text-foreground hover:bg-accent/60",
1894
+ actionButtonPrimary: "border-primary/20 bg-primary/10 text-primary hover:bg-primary/15",
1895
+ actionButtonDanger: "border-destructive/20 bg-destructive/10 text-destructive-text hover:bg-destructive/15",
1896
+ actionButtonMuted: "border-border/60 bg-muted/45 text-muted-foreground hover:bg-muted/70 hover:text-foreground",
1897
+ actionButtonActive: "ring-1 ring-primary/30",
1898
+ actionButtonDisabled: "cursor-not-allowed opacity-60",
1899
+ actionIconButton: "w-9 px-0",
1900
+ actionToggleActive: "border-primary/30 bg-primary/10 text-primary",
1901
+ controlButton: "inline-flex h-10 min-w-0 items-center justify-center gap-2 rounded-md border border-border bg-background px-3 text-sm font-medium text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",
1902
+ controlButtonIcon: "inline-flex h-4 w-4 shrink-0 items-center justify-center",
1903
+ controlButtonLabel: "min-w-0 truncate",
1904
+ controlSelectTrigger: "inline-flex h-10 min-w-28 items-center justify-between gap-3 rounded-md border border-border bg-background px-3 text-sm font-medium text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",
1905
+ controlSelectValue: "flex min-w-0 items-center gap-1 truncate",
1906
+ controlCheckbox: "inline-flex h-9 items-center gap-2 rounded-md border border-border bg-background px-3 text-sm font-medium text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",
1907
+ controlCheckboxIndicator: "flex h-4 w-4 shrink-0 items-center justify-center rounded border border-border bg-background text-primary",
1908
+ controlCheckboxLabel: "min-w-0 truncate",
1909
+ menuTrigger: "inline-flex h-8 w-8 items-center justify-center rounded-md text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1910
+ menuContent: "z-50 min-w-36 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-none",
1911
+ menuLabel: "px-2 py-1.5 text-xs font-medium text-muted-foreground",
1912
+ menuSeparator: "-mx-1 my-1 h-px bg-border",
1913
+ menuItem: "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1914
+ menuItemPrimary: "text-primary focus:text-primary",
1915
+ menuItemDanger: "text-destructive-text focus:text-destructive-text",
1916
+ menuItemMuted: "text-muted-foreground",
1917
+ menuItemIcon: "inline-flex h-4 w-4 shrink-0 items-center justify-center",
1918
+ menuItemLabel: "truncate",
1919
+ cardRoot: "group relative flex min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background transition-shadow",
1920
+ cardInteractive: "cursor-pointer hover:shadow-sm",
1921
+ cardSelected: "ring-2 ring-primary",
1922
+ cardDisabled: "opacity-60",
1923
+ cardHeader: "p-4",
1924
+ cardMedia: "shrink-0 overflow-hidden",
1925
+ cardFooter: "shrink-0 border-t border-border/60 px-4 py-3",
1926
+ recordCardRoot: "group relative border-border/70 transition-shadow hover:shadow-sm",
1927
+ recordCardActive: "z-10 ring-2 ring-monkeys-500",
1928
+ footerRoot: "flex items-center border-t border-border bg-background px-4 py-3",
1929
+ footerSummary: "flex items-center gap-1 whitespace-nowrap text-sm text-muted-foreground",
1930
+ footerJumpButton: "inline-flex items-center gap-1 text-muted-foreground underline-offset-4 hover:text-foreground hover:underline",
1931
+ footerPageSizeSelect: "h-8 rounded-md border border-border bg-background px-2 text-sm text-foreground",
1932
+ previewRoot: "relative h-full min-h-0 w-full flex-1 select-none self-stretch overflow-hidden bg-slate-950",
1933
+ previewPlaceholder: "flex h-full w-full items-center justify-center rounded-xl bg-white/5 px-6 text-center text-sm text-white/60",
1934
+ previewActions: "absolute right-4 top-4 z-20 flex flex-col gap-2",
1935
+ previewControls: "absolute bottom-4 right-4 z-20 flex flex-col gap-2",
1936
+ previewZoomLabel: "min-w-[3rem] rounded-full border border-white/15 bg-black/30 px-1 py-1 text-center text-xs font-medium text-white/70 shadow-lg backdrop-blur",
1937
+ previewControlButton: "inline-flex h-9 w-9 items-center justify-center rounded-full border border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur transition hover:bg-black/45",
1938
+ previewNavigationButton: "absolute top-1/2 flex h-10 w-10 -translate-y-1/2 items-center justify-center rounded-full border border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur transition-colors hover:bg-black/45 disabled:pointer-events-none disabled:opacity-40",
1939
+ detailRoot: "flex h-full flex-col overflow-hidden bg-background",
1940
+ detailHeader: "flex items-center justify-between gap-3 border-b border-border bg-background px-4 py-4 sm:px-5",
1941
+ detailLeading: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",
1942
+ detailNavigation: "hidden items-center gap-1 rounded-lg border border-border bg-background px-1 py-1 md:flex",
1943
+ detailNavigationButton: "flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",
1944
+ detailCloseButton: "flex h-10 w-10 items-center justify-center rounded-full border border-border bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
1945
+ detailPreviewPanel: "min-h-0 overflow-hidden border-b border-border bg-background xl:border-b-0",
1946
+ detailPreviewFrame: "relative h-full min-h-0 w-full overflow-hidden bg-background",
1947
+ detailRightPanel: "min-h-0 min-w-0 border-t border-border bg-background xl:border-l xl:border-t-0",
1948
+ detailRightPanelBody: "h-full overflow-y-auto overscroll-contain bg-background p-5",
1949
+ treeRoot: "min-w-0 space-y-1 overflow-hidden text-sm",
1950
+ treeGroup: "min-w-0 space-y-1",
1951
+ treeGroupHeader: "group/tree-group flex min-w-0 items-center gap-1",
1952
+ treeGroupHeaderButton: "flex h-9 min-w-0 flex-1 items-center gap-2 rounded-md px-2 text-left font-medium text-muted-foreground transition-colors hover:bg-accent/55 hover:text-foreground",
1953
+ treeGroupContent: "min-w-0 space-y-0.5",
1954
+ treeGroupActions: "shrink-0 opacity-0 transition-opacity group-hover/tree-group:opacity-100 data-[state=open]:opacity-100",
1955
+ treeNode: "min-w-0",
1956
+ treeNodeButton: "group/tree-node flex min-h-9 w-full min-w-0 items-center gap-1 rounded-md pr-1 text-left text-sm text-foreground transition-colors hover:bg-accent/55 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
1957
+ treeNodeSelected: "bg-accent text-accent-foreground",
1958
+ treeNodeDisabled: "cursor-not-allowed opacity-55",
1959
+ treeNodeDragging: "opacity-50",
1960
+ treeNodeToggle: "inline-flex h-5 w-5 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
1961
+ treeNodeIcon: "inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground group-hover/tree-node:text-foreground",
1962
+ treeNodeLabel: "min-w-0 truncate",
1963
+ treeNodeDescription: "mt-0.5 truncate text-xs text-muted-foreground",
1964
+ treeNodeMeta: "ml-2 shrink-0 text-xs text-muted-foreground",
1965
+ treeNodeBadge: "ml-2 shrink-0 rounded-full border border-border bg-muted px-1.5 py-0.5 text-[11px] leading-none text-muted-foreground",
1966
+ treeNodeActions: "ml-1 shrink-0 opacity-0 transition-opacity group-hover/tree-node:opacity-100 data-[state=open]:opacity-100",
1967
+ treeNodeChildren: "mt-0.5 min-w-0 space-y-0.5",
1968
+ treeNodeDragHandle: "inline-flex h-5 w-5 shrink-0 cursor-grab items-center justify-center rounded text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground active:cursor-grabbing group-hover/tree-node:opacity-100",
1969
+ treeEmpty: "px-3 py-2 text-xs text-muted-foreground",
1970
+ treeError: "px-3 py-2 text-xs text-destructive-text",
1971
+ treeLoading: "px-3 py-2 text-xs text-muted-foreground"
1972
+ };
1973
+ var densitySlots2 = {
1974
+ compact: {
1975
+ toolbarRoot: "px-3 py-2",
1976
+ toolbarSearch: "h-9 min-w-48",
1977
+ toolbarViewButton: "h-8 min-w-8 text-xs",
1978
+ actionButtonBase: "h-8 px-2.5 text-xs",
1979
+ actionIconButton: "h-8 w-8 px-0",
1980
+ controlButton: "h-9 px-2.5 text-xs",
1981
+ controlSelectTrigger: "h-9 min-w-24 px-2.5 text-xs",
1982
+ controlCheckbox: "h-8 px-2.5 text-xs",
1983
+ menuTrigger: "h-8 w-8",
1984
+ footerRoot: "px-3 py-2",
1985
+ footerPageSizeSelect: "h-8 text-xs",
1986
+ treeGroupHeaderButton: "h-8 text-xs",
1987
+ treeNodeButton: "min-h-8 text-xs",
1988
+ treeEmpty: "py-1.5 text-xs",
1989
+ treeError: "py-1.5 text-xs",
1990
+ treeLoading: "py-1.5 text-xs"
1991
+ },
1992
+ default: {},
1993
+ comfortable: {
1994
+ toolbarRoot: "px-5 py-4",
1995
+ toolbarSearch: "h-11",
1996
+ toolbarViewButton: "h-10 min-w-10",
1997
+ actionButtonBase: "h-10 px-3.5",
1998
+ actionIconButton: "h-10 w-10 px-0",
1999
+ controlButton: "h-11 px-3.5",
2000
+ controlSelectTrigger: "h-11 min-w-32 px-3.5",
2001
+ controlCheckbox: "h-10 px-3.5",
2002
+ menuTrigger: "h-9 w-9",
2003
+ footerRoot: "px-5 py-3.5",
2004
+ treeGroupHeaderButton: "h-10",
2005
+ treeNodeButton: "min-h-10"
2006
+ }
2007
+ };
2008
+ var radiusSlots2 = {
2009
+ none: {
2010
+ toolbarSearch: "rounded-none",
2011
+ toolbarViewSwitch: "rounded-none",
2012
+ toolbarViewButton: "rounded-none",
2013
+ actionButtonBase: "rounded-none",
2014
+ controlButton: "rounded-none",
2015
+ controlSelectTrigger: "rounded-none",
2016
+ controlCheckbox: "rounded-none",
2017
+ controlCheckboxIndicator: "rounded-none",
2018
+ menuTrigger: "rounded-none",
2019
+ menuContent: "rounded-none",
2020
+ menuItem: "rounded-none",
2021
+ cardRoot: "rounded-none",
2022
+ footerPageSizeSelect: "rounded-none",
2023
+ detailLeading: "rounded-none",
2024
+ detailNavigation: "rounded-none",
2025
+ detailNavigationButton: "rounded-none",
2026
+ detailCloseButton: "rounded-none",
2027
+ treeGroupHeaderButton: "rounded-none",
2028
+ treeNodeButton: "rounded-none",
2029
+ treeNodeToggle: "rounded-none",
2030
+ treeNodeBadge: "rounded-none",
2031
+ treeNodeDragHandle: "rounded-none"
2032
+ },
2033
+ sm: {
2034
+ toolbarSearch: "rounded-sm",
2035
+ toolbarViewSwitch: "rounded-sm",
2036
+ toolbarViewButton: "rounded-sm",
2037
+ actionButtonBase: "rounded-sm",
2038
+ controlButton: "rounded-sm",
2039
+ controlSelectTrigger: "rounded-sm",
2040
+ controlCheckbox: "rounded-sm",
2041
+ controlCheckboxIndicator: "rounded-sm",
2042
+ menuTrigger: "rounded-sm",
2043
+ menuContent: "rounded-sm",
2044
+ menuItem: "rounded-sm",
2045
+ cardRoot: "rounded-sm",
2046
+ treeGroupHeaderButton: "rounded-sm",
2047
+ treeNodeButton: "rounded-sm",
2048
+ treeNodeToggle: "rounded-sm",
2049
+ treeNodeBadge: "rounded-sm",
2050
+ treeNodeDragHandle: "rounded-sm"
2051
+ },
2052
+ md: {},
2053
+ lg: {
2054
+ toolbarSearch: "rounded-lg",
2055
+ toolbarViewSwitch: "rounded-lg",
2056
+ toolbarViewButton: "rounded-lg",
2057
+ actionButtonBase: "rounded-lg",
2058
+ controlButton: "rounded-lg",
2059
+ controlSelectTrigger: "rounded-lg",
2060
+ controlCheckbox: "rounded-lg",
2061
+ controlCheckboxIndicator: "rounded-md",
2062
+ menuTrigger: "rounded-lg",
2063
+ menuContent: "rounded-lg",
2064
+ cardRoot: "rounded-xl",
2065
+ treeGroupHeaderButton: "rounded-lg",
2066
+ treeNodeButton: "rounded-lg",
2067
+ treeNodeToggle: "rounded-md",
2068
+ treeNodeBadge: "rounded-lg",
2069
+ treeNodeDragHandle: "rounded-md"
2070
+ },
2071
+ xl: {
2072
+ toolbarSearch: "rounded-xl",
2073
+ toolbarViewSwitch: "rounded-xl",
2074
+ toolbarViewButton: "rounded-xl",
2075
+ actionButtonBase: "rounded-xl",
2076
+ controlButton: "rounded-xl",
2077
+ controlSelectTrigger: "rounded-xl",
2078
+ controlCheckbox: "rounded-xl",
2079
+ controlCheckboxIndicator: "rounded-lg",
2080
+ menuTrigger: "rounded-xl",
2081
+ menuContent: "rounded-xl",
2082
+ cardRoot: "rounded-2xl",
2083
+ treeGroupHeaderButton: "rounded-xl",
2084
+ treeNodeButton: "rounded-xl",
2085
+ treeNodeToggle: "rounded-lg",
2086
+ treeNodeBadge: "rounded-xl",
2087
+ treeNodeDragHandle: "rounded-lg"
2088
+ },
2089
+ full: {
2090
+ toolbarSearch: "rounded-full",
2091
+ toolbarViewSwitch: "rounded-full",
2092
+ toolbarViewButton: "rounded-full",
2093
+ actionButtonBase: "rounded-full",
2094
+ controlButton: "rounded-full",
2095
+ controlSelectTrigger: "rounded-full",
2096
+ controlCheckbox: "rounded-full",
2097
+ controlCheckboxIndicator: "rounded-full",
2098
+ menuTrigger: "rounded-full",
2099
+ cardRoot: "rounded-2xl",
2100
+ treeGroupHeaderButton: "rounded-full",
2101
+ treeNodeButton: "rounded-full",
2102
+ treeNodeToggle: "rounded-full",
2103
+ treeNodeBadge: "rounded-full",
2104
+ treeNodeDragHandle: "rounded-full"
2105
+ }
2106
+ };
2107
+ var borderSlots2 = {
2108
+ none: {
2109
+ toolbarRoot: "border-transparent",
2110
+ toolbarSearch: "border-transparent",
2111
+ toolbarViewSwitch: "border-transparent",
2112
+ actionButtonBase: "border-transparent",
2113
+ controlButton: "border-transparent",
2114
+ controlSelectTrigger: "border-transparent",
2115
+ controlCheckbox: "border-transparent",
2116
+ cardRoot: "border-transparent",
2117
+ footerRoot: "border-transparent",
2118
+ detailHeader: "border-transparent",
2119
+ detailPreviewPanel: "border-transparent",
2120
+ detailRightPanel: "border-transparent"
2121
+ },
2122
+ subtle: {
2123
+ toolbarRoot: "border-border/60",
2124
+ toolbarSearch: "border-border/60",
2125
+ toolbarViewSwitch: "border-border/60",
2126
+ actionButtonDefault: "border-border/60",
2127
+ controlButton: "border-border/60",
2128
+ controlSelectTrigger: "border-border/60",
2129
+ controlCheckbox: "border-border/60",
2130
+ cardRoot: "border-border/60",
2131
+ footerRoot: "border-border/60"
2132
+ },
2133
+ solid: {},
2134
+ strong: {
2135
+ toolbarRoot: "border-foreground/20",
2136
+ toolbarSearch: "border-foreground/20",
2137
+ toolbarViewSwitch: "border-foreground/20",
2138
+ actionButtonDefault: "border-foreground/20",
2139
+ controlButton: "border-foreground/20",
2140
+ controlSelectTrigger: "border-foreground/20",
2141
+ controlCheckbox: "border-foreground/20",
2142
+ cardRoot: "border-foreground/20",
2143
+ footerRoot: "border-foreground/20"
2144
+ }
2145
+ };
2146
+ var backgroundSlots2 = {
2147
+ plain: {},
2148
+ muted: {
2149
+ toolbarRoot: "bg-muted/20",
2150
+ toolbarSearch: "bg-background",
2151
+ toolbarViewSwitch: "bg-background",
2152
+ controlButton: "bg-background",
2153
+ controlSelectTrigger: "bg-background",
2154
+ controlCheckbox: "bg-background",
2155
+ cardRoot: "bg-card",
2156
+ footerRoot: "bg-muted/20",
2157
+ detailHeader: "bg-muted/20"
2158
+ },
2159
+ soft: {
2160
+ toolbarRoot: "bg-background/95",
2161
+ actionButtonDefault: "bg-muted/30 hover:bg-muted/55",
2162
+ controlButton: "bg-muted/30 hover:bg-muted/55",
2163
+ controlSelectTrigger: "bg-muted/30 hover:bg-muted/55",
2164
+ controlCheckbox: "bg-muted/30 hover:bg-muted/55",
2165
+ cardRoot: "bg-background/95 shadow-sm",
2166
+ footerRoot: "bg-background/95"
2167
+ },
2168
+ glass: {
2169
+ toolbarRoot: "border-white/10 bg-white/5 backdrop-blur-md",
2170
+ toolbarSearch: "border-white/10 bg-white/5",
2171
+ toolbarViewSwitch: "border-white/10 bg-white/5",
2172
+ actionButtonDefault: "border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",
2173
+ controlButton: "border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",
2174
+ controlSelectTrigger: "border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",
2175
+ controlCheckbox: "border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",
2176
+ controlCheckboxIndicator: "border-white/15 bg-white/10",
2177
+ cardRoot: "border-white/10 bg-white/[0.06] shadow-none",
2178
+ footerRoot: "border-white/10 bg-white/5 backdrop-blur-md"
2179
+ },
2180
+ "dark-stage": {
2181
+ previewRoot: "bg-slate-950",
2182
+ previewPlaceholder: "bg-white/5 text-white/60",
2183
+ actionButtonBase: "inline-flex h-9 items-center justify-center gap-2 rounded-full border px-3 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/45 focus-visible:ring-offset-0",
2184
+ actionButtonDefault: "border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur hover:bg-black/[0.45]",
2185
+ controlButton: "border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur hover:bg-black/[0.45]",
2186
+ controlSelectTrigger: "border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur hover:bg-black/[0.45]",
2187
+ controlCheckbox: "border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur hover:bg-black/[0.45]",
2188
+ actionButtonPrimary: "border-white/25 bg-white/20 text-white shadow-lg backdrop-blur hover:bg-white/28",
2189
+ actionButtonMuted: "border-white/10 bg-black/20 text-white/70 shadow-lg backdrop-blur hover:bg-black/[0.35] hover:text-white",
2190
+ actionIconButton: "h-9 w-9 px-0"
2191
+ }
2192
+ };
2193
+ var presetDefaults2 = {
2194
+ default: {
2195
+ density: "default",
2196
+ radius: "md",
2197
+ border: "solid",
2198
+ background: "plain"
2199
+ },
2200
+ admin: {
2201
+ density: "default",
2202
+ radius: "md",
2203
+ border: "subtle",
2204
+ background: "plain"
2205
+ },
2206
+ monkey: {
2207
+ density: "compact",
2208
+ radius: "md",
2209
+ border: "subtle",
2210
+ background: "soft"
2211
+ },
2212
+ bsd: {
2213
+ density: "default",
2214
+ radius: "lg",
2215
+ border: "subtle",
2216
+ background: "glass"
2217
+ },
2218
+ "knowledge-base": {
2219
+ density: "compact",
2220
+ radius: "none",
2221
+ border: "solid",
2222
+ background: "plain"
2223
+ },
2224
+ glass: {
2225
+ density: "default",
2226
+ radius: "lg",
2227
+ border: "subtle",
2228
+ background: "glass"
2229
+ },
2230
+ "hard-edge": {
2231
+ density: "compact",
2232
+ radius: "none",
2233
+ border: "solid",
2234
+ background: "plain"
2235
+ }
2236
+ };
2237
+ var presetSlots2 = {
2238
+ admin: {
2239
+ actionButtonBase: "font-medium",
2240
+ controlButton: "font-medium",
2241
+ controlSelectTrigger: "font-medium",
2242
+ controlCheckbox: "font-medium",
2243
+ menuTrigger: "rounded-full",
2244
+ cardRoot: "border-border/70"
2245
+ },
2246
+ monkey: {
2247
+ toolbarRoot: "gap-2",
2248
+ actionButtonBase: "text-xs",
2249
+ controlButton: "text-xs",
2250
+ controlSelectTrigger: "text-xs",
2251
+ controlCheckbox: "text-xs",
2252
+ footerRoot: "text-xs"
2253
+ },
2254
+ bsd: {
2255
+ actionButtonDefault: "border-white/10 bg-white/10 text-white/90 hover:bg-white/[0.16]",
2256
+ actionButtonPrimary: "border-white/20 bg-white/[0.18] text-white hover:bg-white/[0.24]",
2257
+ actionButtonMuted: "border-white/10 bg-white/5 text-white/70 hover:bg-white/12 hover:text-white",
2258
+ controlButton: "border-white/10 bg-white/10 text-white/90 hover:bg-white/[0.16]",
2259
+ controlSelectTrigger: "border-white/10 bg-white/10 text-white/90 hover:bg-white/[0.16]",
2260
+ controlCheckbox: "border-white/10 bg-white/10 text-white/90 hover:bg-white/[0.16]",
2261
+ controlCheckboxIndicator: "border-white/15 bg-white/10 text-white",
2262
+ menuContent: "border-white/10 bg-slate-950/95 text-white shadow-2xl",
2263
+ menuSeparator: "bg-white/10",
2264
+ menuItem: "focus:bg-white/10 focus:text-white",
2265
+ cardSelected: "ring-2 ring-white/80",
2266
+ previewRoot: "bg-slate-950",
2267
+ treeGroupHeaderButton: "text-white/80 hover:bg-white/10 hover:text-white",
2268
+ treeNodeButton: "text-white/90 hover:bg-white/10 hover:text-white focus-visible:ring-white/50",
2269
+ treeNodeSelected: "bg-white/10 text-white",
2270
+ treeNodeToggle: "text-white/65 hover:bg-white/10 hover:text-white",
2271
+ treeNodeIcon: "text-white/70 group-hover/tree-node:text-white",
2272
+ treeNodeMeta: "text-white/60",
2273
+ treeNodeBadge: "border-white/10 bg-white/10 text-white/70",
2274
+ treeNodeActions: "text-white/75",
2275
+ treeNodeDragHandle: "text-white/55 hover:bg-white/10 hover:text-white group-hover/tree-node:opacity-100",
2276
+ treeEmpty: "text-white/55",
2277
+ treeError: "text-red-200",
2278
+ treeLoading: "text-white/55"
2279
+ },
2280
+ "knowledge-base": {
2281
+ toolbarRoot: "border-slate-200 bg-white",
2282
+ toolbarSearch: "rounded-none border-slate-200 bg-white shadow-none",
2283
+ toolbarViewSwitch: "rounded-none border-slate-200 bg-white shadow-none",
2284
+ actionButtonBase: "rounded-none shadow-none",
2285
+ controlButton: "rounded-none border-slate-200 bg-white text-slate-700 shadow-none hover:bg-slate-50",
2286
+ controlSelectTrigger: "rounded-none border-slate-200 bg-white text-slate-700 shadow-none hover:bg-slate-50",
2287
+ controlCheckbox: "rounded-none border-slate-200 bg-white text-slate-700 shadow-none hover:bg-slate-50",
2288
+ actionButtonDefault: "border-slate-200 bg-white text-slate-700 hover:bg-slate-50",
2289
+ menuTrigger: "rounded-none border border-slate-200 bg-white text-slate-700 shadow-none hover:bg-slate-50",
2290
+ menuContent: "rounded-none border-slate-200 bg-white shadow-none",
2291
+ cardRoot: "rounded-none border-slate-200 bg-white shadow-none",
2292
+ footerRoot: "border-slate-200 bg-white",
2293
+ treeRoot: "space-y-1 text-sm",
2294
+ treeGroupHeader: "group/tree-group flex min-w-0 items-center",
2295
+ treeGroupHeaderButton: "h-9 rounded-none px-3 text-slate-600 shadow-none hover:bg-slate-100 hover:text-slate-950",
2296
+ treeGroupContent: "space-y-1",
2297
+ treeNodeButton: "min-h-9 rounded-none text-slate-700 hover:bg-slate-100 hover:text-slate-950 focus-visible:ring-slate-300",
2298
+ treeNodeSelected: "bg-slate-100 text-slate-950",
2299
+ treeNodeToggle: "rounded-none text-slate-500 hover:bg-transparent hover:text-slate-950",
2300
+ treeNodeIcon: "text-slate-500 group-hover/tree-node:text-slate-950",
2301
+ treeNodeDragHandle: "rounded-none text-slate-400 hover:bg-transparent hover:text-slate-700",
2302
+ treeNodeActions: "text-slate-500"
2303
+ },
2304
+ glass: {
2305
+ menuContent: "border-white/10 bg-slate-950/90 text-white backdrop-blur-xl",
2306
+ menuSeparator: "bg-white/10",
2307
+ menuItem: "focus:bg-white/10 focus:text-white"
2308
+ },
2309
+ "hard-edge": {
2310
+ toolbarRoot: "border-slate-200 bg-white",
2311
+ actionButtonBase: "rounded-none shadow-none",
2312
+ controlButton: "rounded-none shadow-none",
2313
+ controlSelectTrigger: "rounded-none shadow-none",
2314
+ controlCheckbox: "rounded-none shadow-none",
2315
+ cardRoot: "rounded-none border-slate-200 bg-white shadow-none",
2316
+ footerRoot: "border-slate-200 bg-white",
2317
+ footerPageSizeSelect: "rounded-none border-slate-200 shadow-none"
2318
+ }
2319
+ };
2320
+ var slotKeys2 = Object.keys(baseSlots2);
2321
+ function mergeSlots2(...sources) {
2322
+ return slotKeys2.reduce((resolved, key) => {
2323
+ resolved[key] = cn2(...sources.map((source) => source?.[key]));
2324
+ return resolved;
2325
+ }, {});
2326
+ }
2327
+ function mergeStyles2(...sources) {
2328
+ return sources.reduce(
2329
+ (resolved, source) => ({
2330
+ ...resolved,
2331
+ ...source
2332
+ }),
2333
+ {}
2334
+ );
2335
+ }
2336
+ function getPresetDefaults2(preset) {
2337
+ return presetDefaults2[preset] ?? presetDefaults2.default;
2338
+ }
2339
+ function resolveDataExplorerAppearance(appearance) {
2340
+ const preset = appearance?.preset ?? "default";
2341
+ const defaults = getPresetDefaults2(preset);
2342
+ const density = appearance?.density ?? defaults.density ?? "default";
2343
+ const radius = appearance?.radius ?? defaults.radius ?? "md";
2344
+ const border = appearance?.border ?? defaults.border ?? "solid";
2345
+ const background = appearance?.background ?? defaults.background ?? "plain";
2346
+ return {
2347
+ preset,
2348
+ density,
2349
+ radius,
2350
+ border,
2351
+ background,
2352
+ styles: mergeStyles2(emptyStyles2, appearance?.styles),
2353
+ slots: mergeSlots2(
2354
+ baseSlots2,
2355
+ presetSlots2[preset],
2356
+ densitySlots2[density],
2357
+ radiusSlots2[radius],
2358
+ borderSlots2[border],
2359
+ backgroundSlots2[background],
2360
+ appearance?.slots
2361
+ )
2362
+ };
2363
+ }
2364
+
2365
+ // src/theme-system/resolve-theme.ts
2366
+ var DEFAULT_THEME_ID = "default";
2367
+ var DEFAULT_THEME_NAME = "Monkeys Default Theme";
2368
+ var DEFAULT_PRIMARY_COLOR = "#4D8F9D";
2369
+ var DEFAULT_TOKENS = {
2370
+ primaryColor: DEFAULT_PRIMARY_COLOR,
2371
+ mode: "shadow",
2372
+ radius: "0.5rem"
2373
+ };
2374
+ var DEFAULT_BASE_APPEARANCE = {
2375
+ preset: "default"
2376
+ };
2377
+ var DEFAULT_DATA_EXPLORER_APPEARANCE = {
2378
+ preset: "default"
2379
+ };
2380
+ function isRecord2(value) {
2381
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
2382
+ }
2383
+ function normalizeThemeInput(input) {
2384
+ if (!input) {
2385
+ return {
2386
+ config: void 0,
2387
+ source: { kind: "default", provided: false }
2388
+ };
2389
+ }
2390
+ if (!isRecord2(input)) {
2391
+ throw new TypeError("Monkeys theme input must be an object when provided.");
2392
+ }
2393
+ if ("theme" in input) {
2394
+ if (input.theme !== void 0 && input.theme !== null && !isRecord2(input.theme)) {
2395
+ throw new TypeError("Monkeys system config theme must be an object.");
2396
+ }
2397
+ return {
2398
+ config: input.theme ?? void 0,
2399
+ source: { kind: "system-config", provided: true }
2400
+ };
2401
+ }
2402
+ return {
2403
+ config: input,
2404
+ source: { kind: "theme-config", provided: true }
2405
+ };
2406
+ }
2407
+ function assertStringValue(value, fieldName) {
2408
+ if (typeof value !== "string") {
2409
+ throw new TypeError(`${fieldName} must be a string.`);
2410
+ }
2411
+ if (!value.trim()) {
2412
+ throw new TypeError(`${fieldName} cannot be empty.`);
2413
+ }
2414
+ }
2415
+ function readString(value, fieldName) {
2416
+ if (value === void 0 || value === null) return void 0;
2417
+ assertStringValue(value, fieldName);
2418
+ return value;
2419
+ }
2420
+ function readThemeAsset(value, fieldName) {
2421
+ if (value === void 0 || value === null) return void 0;
2422
+ if (typeof value === "string") {
2423
+ if (!value.trim()) {
2424
+ throw new TypeError(`${fieldName} cannot be empty.`);
2425
+ }
2426
+ return value;
2427
+ }
2428
+ if (!isRecord2(value)) {
2429
+ throw new TypeError(`${fieldName} must be a string or an object.`);
2430
+ }
2431
+ const light = readString(value.light, `${fieldName}.light`);
2432
+ const dark = readString(value.dark, `${fieldName}.dark`);
2433
+ const alt = readString(value.alt, `${fieldName}.alt`);
2434
+ if (!light && !dark) {
2435
+ throw new TypeError(`${fieldName} must include light or dark asset url.`);
2436
+ }
2437
+ return { light, dark, alt };
2438
+ }
2439
+ function resolveBrand(config, defaults) {
2440
+ const defaultBrand = defaults?.brand;
2441
+ const configBrand = config?.brand;
2442
+ return {
2443
+ title: readString(configBrand?.title, "brand.title") ?? readString(config?.title, "title") ?? readString(defaultBrand?.title, "defaults.brand.title") ?? readString(defaults?.title, "defaults.title"),
2444
+ logo: readThemeAsset(configBrand?.logo, "brand.logo") ?? readThemeAsset(config?.logo, "logo") ?? readThemeAsset(defaultBrand?.logo, "defaults.brand.logo") ?? readThemeAsset(defaults?.logo, "defaults.logo"),
2445
+ favicon: readThemeAsset(configBrand?.favicon, "brand.favicon") ?? readThemeAsset(config?.favicon, "favicon") ?? readThemeAsset(defaultBrand?.favicon, "defaults.brand.favicon") ?? readThemeAsset(defaults?.favicon, "defaults.favicon")
2446
+ };
2447
+ }
2448
+ function resolveRadius(config, defaults) {
2449
+ const mode = config?.tokens?.mode ?? config?.themeMode ?? defaults?.tokens?.mode ?? defaults?.themeMode ?? DEFAULT_TOKENS.mode;
2450
+ const fallbackRadius = mode === "border" ? "0.75rem" : DEFAULT_TOKENS.radius;
2451
+ return readString(config?.tokens?.radius, "tokens.radius") ?? readString(config?.roundedSize, "roundedSize") ?? readString(defaults?.tokens?.radius, "defaults.tokens.radius") ?? readString(defaults?.roundedSize, "defaults.roundedSize") ?? fallbackRadius;
2452
+ }
2453
+ function resolveTokens(config, defaults) {
2454
+ const mode = config?.tokens?.mode ?? config?.themeMode ?? defaults?.tokens?.mode ?? defaults?.themeMode ?? DEFAULT_TOKENS.mode;
2455
+ return {
2456
+ primaryColor: readString(config?.tokens?.primaryColor, "tokens.primaryColor") ?? readString(config?.colors?.primaryColor, "colors.primaryColor") ?? readString(defaults?.tokens?.primaryColor, "defaults.tokens.primaryColor") ?? readString(defaults?.colors?.primaryColor, "defaults.colors.primaryColor") ?? DEFAULT_TOKENS.primaryColor,
2457
+ mode,
2458
+ radius: resolveRadius(config, defaults),
2459
+ neocard: config?.tokens?.neocard ?? config?.colors?.neocard ?? defaults?.tokens?.neocard ?? defaults?.colors?.neocard
2460
+ };
2461
+ }
2462
+ function resolveBaseInput(config, defaults) {
2463
+ return {
2464
+ ...DEFAULT_BASE_APPEARANCE,
2465
+ ...defaults?.appearances?.base,
2466
+ ...defaults?.baseAppearance,
2467
+ ...config?.appearances?.base,
2468
+ ...config?.baseAppearance
2469
+ };
2470
+ }
2471
+ function resolveDataExplorerInput(config, defaults) {
2472
+ return {
2473
+ ...DEFAULT_DATA_EXPLORER_APPEARANCE,
2474
+ ...defaults?.appearances?.dataExplorer,
2475
+ ...defaults?.dataExplorerAppearance,
2476
+ ...config?.appearances?.dataExplorer,
2477
+ ...config?.dataExplorerAppearance
2478
+ };
2479
+ }
2480
+ function resolveMonkeysTheme(input, options = {}) {
2481
+ const { config, source } = normalizeThemeInput(input);
2482
+ const defaults = options.defaults;
2483
+ const tokens = resolveTokens(config, defaults);
2484
+ const baseInput = resolveBaseInput(config, defaults);
2485
+ const dataExplorerInput = resolveDataExplorerInput(config, defaults);
2486
+ return {
2487
+ id: readString(config?.id, "id") ?? readString(defaults?.id, "defaults.id") ?? DEFAULT_THEME_ID,
2488
+ name: readString(config?.name, "name") ?? readString(defaults?.name, "defaults.name") ?? DEFAULT_THEME_NAME,
2489
+ description: readString(config?.description, "description") ?? readString(defaults?.description, "defaults.description"),
2490
+ version: readString(config?.version, "version") ?? readString(defaults?.version, "defaults.version"),
2491
+ tokens,
2492
+ brand: resolveBrand(config, defaults),
2493
+ appearances: {
2494
+ base: {
2495
+ input: baseInput,
2496
+ resolved: resolveBaseAppearance(baseInput)
2497
+ },
2498
+ dataExplorer: {
2499
+ input: dataExplorerInput,
2500
+ resolved: resolveDataExplorerAppearance(dataExplorerInput)
2501
+ }
2502
+ },
2503
+ source
2504
+ };
2505
+ }
2506
+ var DEFAULT_RESOLVED_THEME = resolveMonkeysTheme();
2507
+ function isRecord3(value) {
2508
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
2509
+ }
2510
+ function isResolvedTheme(value) {
2511
+ if (!isRecord3(value)) return false;
2512
+ return isRecord3(value.tokens) && isRecord3(value.appearances) && isRecord3(value.source) && typeof value.id === "string" && typeof value.name === "string";
2513
+ }
2514
+ function resolvedThemeToConfig(theme) {
2515
+ return {
2516
+ id: theme.id,
2517
+ name: theme.name,
2518
+ description: theme.description,
2519
+ version: theme.version,
2520
+ brand: theme.brand,
2521
+ tokens: theme.tokens,
2522
+ appearances: {
2523
+ base: theme.appearances.base.input,
2524
+ dataExplorer: theme.appearances.dataExplorer.input
2525
+ }
2526
+ };
2527
+ }
2528
+ function mergeProviderAppearance(theme, appearance) {
2529
+ if (!appearance) return theme;
2530
+ const resolved = resolveMonkeysTheme({
2531
+ ...resolvedThemeToConfig(theme),
2532
+ appearances: {
2533
+ base: {
2534
+ ...theme.appearances.base.input,
2535
+ ...appearance.base,
2536
+ slots: {
2537
+ ...theme.appearances.base.input.slots,
2538
+ ...appearance.base?.slots
2539
+ },
2540
+ styles: {
2541
+ ...theme.appearances.base.input.styles,
2542
+ ...appearance.base?.styles
2543
+ }
2544
+ },
2545
+ dataExplorer: {
2546
+ ...theme.appearances.dataExplorer.input,
2547
+ ...appearance.dataExplorer,
2548
+ slots: {
2549
+ ...theme.appearances.dataExplorer.input.slots,
2550
+ ...appearance.dataExplorer?.slots
2551
+ },
2552
+ styles: {
2553
+ ...theme.appearances.dataExplorer.input.styles,
2554
+ ...appearance.dataExplorer?.styles
2555
+ }
2556
+ }
2557
+ }
2558
+ });
2559
+ return { ...resolved, source: theme.source };
2560
+ }
2561
+ function resolveProviderTheme(input, appearance, parent) {
2562
+ let resolved;
2563
+ if (input === void 0) {
2564
+ resolved = parent ?? DEFAULT_RESOLVED_THEME;
2565
+ } else if (isResolvedTheme(input)) {
2566
+ resolved = input;
2567
+ } else {
2568
+ resolved = resolveMonkeysTheme(input, {
2569
+ defaults: parent ? resolvedThemeToConfig(parent) : void 0
2570
+ });
2571
+ }
2572
+ return mergeProviderAppearance(resolved, appearance);
2573
+ }
2574
+ function validateDirection(direction) {
2575
+ if (direction !== void 0 && direction !== "ltr" && direction !== "rtl") {
2576
+ throw new TypeError('MonkeysProvider direction must be "ltr" or "rtl".');
2577
+ }
2578
+ }
2579
+ function validateEnvironment(environment) {
2580
+ if (environment === void 0) return;
2581
+ if (!isRecord3(environment)) {
2582
+ throw new TypeError("MonkeysProvider environment must be an object.");
2583
+ }
2584
+ if (environment.getDocument !== void 0 && typeof environment.getDocument !== "function") {
2585
+ throw new TypeError(
2586
+ "MonkeysProvider environment.getDocument must be a function."
2587
+ );
2588
+ }
2589
+ if (environment.getWindow !== void 0 && typeof environment.getWindow !== "function") {
2590
+ throw new TypeError(
2591
+ "MonkeysProvider environment.getWindow must be a function."
2592
+ );
2593
+ }
2594
+ }
2595
+ function validatePortal(portal) {
2596
+ if (portal === void 0) return;
2597
+ if (!isRecord3(portal)) {
2598
+ throw new TypeError("MonkeysProvider portal must be an object.");
2599
+ }
2600
+ if (portal.disabled !== void 0 && typeof portal.disabled !== "boolean") {
2601
+ throw new TypeError("MonkeysProvider portal.disabled must be a boolean.");
2602
+ }
2603
+ if (portal.container == null) return;
2604
+ if (typeof portal.container !== "function" && typeof portal.container !== "object") {
2605
+ throw new TypeError(
2606
+ "MonkeysProvider portal.container must be an Element, null, or a function."
2607
+ );
2608
+ }
2609
+ }
2610
+ function MonkeysProvider({
2611
+ children,
2612
+ locale,
2613
+ messages,
2614
+ direction,
2615
+ theme,
2616
+ appearance,
2617
+ environment,
2618
+ portal
2619
+ }) {
2620
+ const parentLocale = react.useContext(MonkeysLocaleContext);
2621
+ const parentTheme = react.useContext(MonkeysThemeContext);
2622
+ const parentDirection = react.useContext(MonkeysDirectionContext);
2623
+ const parentEnvironment = react.useContext(MonkeysEnvironmentContext);
2624
+ validateDirection(direction);
2625
+ validateEnvironment(environment);
2626
+ validatePortal(portal);
2627
+ const resolvedLocale = react.useMemo(
2628
+ () => resolveMonkeysLocale(locale, messages, parentLocale),
2629
+ [locale, messages, parentLocale]
2630
+ );
2631
+ const localeValue = react.useMemo(
2632
+ () => ({ ...resolvedLocale, provided: true }),
2633
+ [resolvedLocale]
2634
+ );
2635
+ const resolvedTheme = react.useMemo(
2636
+ () => resolveProviderTheme(theme, appearance, parentTheme.resolvedTheme),
2637
+ [appearance, parentTheme.resolvedTheme, theme]
2638
+ );
2639
+ const themeValue = react.useMemo(
2640
+ () => ({
2641
+ provided: true,
2642
+ resolvedTheme,
2643
+ baseAppearance: resolvedTheme.appearances.base.input,
2644
+ dataExplorerAppearance: resolvedTheme.appearances.dataExplorer.input
2645
+ }),
2646
+ [resolvedTheme]
2647
+ );
2648
+ const directionValue = react.useMemo(
2649
+ () => ({
2650
+ provided: true,
2651
+ direction: direction ?? parentDirection.direction ?? "ltr"
2652
+ }),
2653
+ [direction, parentDirection.direction]
2654
+ );
2655
+ const environmentValue = react.useMemo(
2656
+ () => ({
2657
+ provided: true,
2658
+ environment: {
2659
+ ...parentEnvironment.environment,
2660
+ ...environment
2661
+ },
2662
+ portal: {
2663
+ ...parentEnvironment.portal,
2664
+ ...portal
2665
+ }
2666
+ }),
2667
+ [
2668
+ environment,
2669
+ parentEnvironment.environment,
2670
+ parentEnvironment.portal,
2671
+ portal
2672
+ ]
2673
+ );
2674
+ return /* @__PURE__ */ jsxRuntime.jsx(MonkeysLocaleContext.Provider, { value: localeValue, children: /* @__PURE__ */ jsxRuntime.jsx(MonkeysThemeContext.Provider, { value: themeValue, children: /* @__PURE__ */ jsxRuntime.jsx(MonkeysDirectionContext.Provider, { value: directionValue, children: /* @__PURE__ */ jsxRuntime.jsx(MonkeysEnvironmentContext.Provider, { value: environmentValue, children }) }) }) });
2675
+ }
2676
+
2677
+ exports.MonkeysProvider = MonkeysProvider;
2678
+ exports.useMonkeysBaseAppearance = useMonkeysBaseAppearance;
2679
+ exports.useMonkeysComponentAttributes = useMonkeysComponentAttributes;
2680
+ exports.useMonkeysDataExplorerAppearance = useMonkeysDataExplorerAppearance;
2681
+ exports.useMonkeysDirection = useMonkeysDirection;
2682
+ exports.useMonkeysEnvironment = useMonkeysEnvironment;
2683
+ exports.useMonkeysLocale = useMonkeysLocale;
2684
+ exports.useMonkeysLocaleMessages = useMonkeysLocaleMessages;
2685
+ exports.useMonkeysPortalOptions = useMonkeysPortalOptions;
2686
+ exports.useMonkeysResolvedTheme = useMonkeysResolvedTheme;
2687
+ //# sourceMappingURL=index.js.map
2688
+ //# sourceMappingURL=index.js.map