@hyddenlabs/hydn-ui 0.3.0-alpha.152 → 0.3.0-alpha.154
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.
- package/dist/index.cjs +433 -231
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +456 -23
- package/dist/index.d.ts +456 -23
- package/dist/index.js +412 -232
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -135,14 +135,302 @@ function ColorModeToggle({ className = "" }) {
|
|
|
135
135
|
}
|
|
136
136
|
ColorModeToggle.displayName = "ColorModeToggle";
|
|
137
137
|
var color_mode_toggle_default = ColorModeToggle;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
138
|
+
|
|
139
|
+
// src/theme/size-tokens.ts
|
|
140
|
+
var visualSizes = {
|
|
141
|
+
xs: {
|
|
142
|
+
classes: "w-3.5 h-3.5 sm:w-3 sm:h-3",
|
|
143
|
+
// 14px mobile, 12px desktop
|
|
144
|
+
pixels: { mobile: 14, desktop: 12 }
|
|
145
|
+
},
|
|
146
|
+
sm: {
|
|
147
|
+
classes: "w-5 h-5 sm:w-4 sm:h-4",
|
|
148
|
+
// 20px mobile, 16px desktop
|
|
149
|
+
pixels: { mobile: 20, desktop: 16 }
|
|
150
|
+
},
|
|
151
|
+
md: {
|
|
152
|
+
classes: "w-6 h-6 sm:w-5 sm:h-5",
|
|
153
|
+
// 24px mobile, 20px desktop
|
|
154
|
+
pixels: { mobile: 24, desktop: 20 }
|
|
155
|
+
},
|
|
156
|
+
lg: {
|
|
157
|
+
classes: "w-7 h-7 sm:w-6 sm:h-6",
|
|
158
|
+
// 28px mobile, 24px desktop
|
|
159
|
+
pixels: { mobile: 28, desktop: 24 }
|
|
160
|
+
},
|
|
161
|
+
xl: {
|
|
162
|
+
classes: "w-8 h-8 sm:w-7 sm:h-7",
|
|
163
|
+
// 32px mobile, 28px desktop
|
|
164
|
+
pixels: { mobile: 32, desktop: 28 }
|
|
165
|
+
},
|
|
166
|
+
"2xl": {
|
|
167
|
+
classes: "w-9 h-9 sm:w-8 sm:h-8",
|
|
168
|
+
// 36px mobile, 32px desktop
|
|
169
|
+
pixels: { mobile: 36, desktop: 32 }
|
|
170
|
+
},
|
|
171
|
+
"3xl": {
|
|
172
|
+
classes: "w-12 h-12 sm:w-10 sm:h-10",
|
|
173
|
+
// 48px mobile, 40px desktop
|
|
174
|
+
pixels: { mobile: 48, desktop: 40 }
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
var spinnerSizes = {
|
|
178
|
+
xs: { ...visualSizes.xs, border: "border" },
|
|
179
|
+
sm: { ...visualSizes.sm, border: "border-2" },
|
|
180
|
+
md: { ...visualSizes.md, border: "border-2" },
|
|
181
|
+
lg: { ...visualSizes.lg, border: "border-2" },
|
|
182
|
+
xl: { ...visualSizes.xl, border: "border-[3px]" },
|
|
183
|
+
"2xl": { ...visualSizes["2xl"], border: "border-[3px]" },
|
|
184
|
+
"3xl": { ...visualSizes["3xl"], border: "border-4" }
|
|
185
|
+
};
|
|
186
|
+
var avatarSizes = {
|
|
187
|
+
xs: {
|
|
188
|
+
classes: "w-8 h-8 sm:w-6 sm:h-6",
|
|
189
|
+
text: "text-sm sm:text-xs"
|
|
190
|
+
},
|
|
191
|
+
sm: {
|
|
192
|
+
classes: "w-10 h-10 sm:w-8 sm:h-8",
|
|
193
|
+
text: "text-base sm:text-sm"
|
|
194
|
+
},
|
|
195
|
+
md: {
|
|
196
|
+
classes: "w-12 h-12 sm:w-10 sm:h-10",
|
|
197
|
+
text: "text-lg sm:text-base"
|
|
198
|
+
},
|
|
199
|
+
lg: {
|
|
200
|
+
classes: "w-14 h-14 sm:w-12 sm:h-12",
|
|
201
|
+
text: "text-xl sm:text-lg"
|
|
202
|
+
},
|
|
203
|
+
xl: {
|
|
204
|
+
classes: "w-20 h-20 sm:w-16 sm:h-16",
|
|
205
|
+
text: "text-2xl sm:text-xl"
|
|
206
|
+
},
|
|
207
|
+
"2xl": {
|
|
208
|
+
classes: "w-24 h-24 sm:w-20 sm:h-20",
|
|
209
|
+
text: "text-3xl sm:text-2xl"
|
|
210
|
+
},
|
|
211
|
+
"3xl": {
|
|
212
|
+
classes: "w-28 h-28 sm:w-24 sm:h-24",
|
|
213
|
+
text: "text-4xl sm:text-3xl"
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
var logoSizes = {
|
|
217
|
+
xs: { classes: "h-5 w-5 sm:h-4 sm:w-4" },
|
|
218
|
+
sm: { classes: "h-7 w-7 sm:h-6 sm:w-6" },
|
|
219
|
+
md: { classes: "h-9 w-9 sm:h-8 sm:w-8" },
|
|
220
|
+
lg: { classes: "h-12 w-12 sm:h-10 sm:w-10" },
|
|
221
|
+
xl: { classes: "h-14 w-14 sm:h-12 sm:w-12" },
|
|
222
|
+
"2xl": { classes: "h-20 w-20 sm:h-16 sm:w-16" },
|
|
223
|
+
"3xl": { classes: "h-24 w-24 sm:h-20 sm:w-20" }
|
|
224
|
+
};
|
|
225
|
+
var interactiveSizes = {
|
|
226
|
+
xs: {
|
|
227
|
+
height: "h-8 sm:h-6 min-h-8 sm:min-h-6",
|
|
228
|
+
padding: "px-3 sm:px-2",
|
|
229
|
+
text: "text-sm sm:text-xs",
|
|
230
|
+
icon: visualSizes.xs
|
|
231
|
+
},
|
|
232
|
+
sm: {
|
|
233
|
+
height: "h-10 sm:h-8 min-h-10 sm:min-h-8",
|
|
234
|
+
padding: "px-4 sm:px-3",
|
|
235
|
+
text: "text-base sm:text-sm",
|
|
236
|
+
icon: visualSizes.sm
|
|
237
|
+
},
|
|
238
|
+
md: {
|
|
239
|
+
height: "h-12 sm:h-10 min-h-12 sm:min-h-10",
|
|
240
|
+
padding: "px-5 sm:px-4",
|
|
241
|
+
text: "text-base sm:text-sm",
|
|
242
|
+
icon: visualSizes.md
|
|
243
|
+
},
|
|
244
|
+
lg: {
|
|
245
|
+
height: "h-14 sm:h-12 min-h-14 sm:min-h-12",
|
|
246
|
+
padding: "px-7 sm:px-6",
|
|
247
|
+
text: "text-lg sm:text-base",
|
|
248
|
+
icon: visualSizes.lg
|
|
249
|
+
},
|
|
250
|
+
xl: {
|
|
251
|
+
height: "h-16 sm:h-14 min-h-16 sm:min-h-14",
|
|
252
|
+
padding: "px-9 sm:px-8",
|
|
253
|
+
text: "text-xl sm:text-lg",
|
|
254
|
+
icon: visualSizes.xl
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
var badgeSizes = {
|
|
258
|
+
sm: {
|
|
259
|
+
classes: "px-2.5 sm:px-2 py-1 sm:py-0.5 text-sm sm:text-xs",
|
|
260
|
+
icon: visualSizes.xs
|
|
261
|
+
},
|
|
262
|
+
md: {
|
|
263
|
+
classes: "px-3 sm:px-2.5 py-1 sm:py-0.5 text-sm sm:text-xs font-semibold",
|
|
264
|
+
icon: visualSizes.sm
|
|
265
|
+
},
|
|
266
|
+
lg: {
|
|
267
|
+
classes: "px-4 sm:px-3 py-1.5 sm:py-1 text-base sm:text-sm font-semibold",
|
|
268
|
+
icon: visualSizes.md
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
var chipSizes = {
|
|
272
|
+
sm: {
|
|
273
|
+
classes: "px-2.5 sm:px-2 py-1.5 sm:py-1 text-sm sm:text-xs gap-1.5 sm:gap-1",
|
|
274
|
+
icon: visualSizes.xs
|
|
275
|
+
},
|
|
276
|
+
md: {
|
|
277
|
+
classes: "px-3.5 sm:px-3 py-2 sm:py-1.5 text-base sm:text-sm gap-2 sm:gap-1.5",
|
|
278
|
+
icon: visualSizes.sm
|
|
279
|
+
},
|
|
280
|
+
lg: {
|
|
281
|
+
classes: "px-5 sm:px-4 py-2.5 sm:py-2 text-lg sm:text-base gap-2.5 sm:gap-2",
|
|
282
|
+
icon: visualSizes.md
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
var codeSizes = {
|
|
286
|
+
sm: "text-xs px-1 py-0.5",
|
|
287
|
+
md: "text-sm px-1.5 py-0.5",
|
|
288
|
+
lg: "text-base px-2 py-1"
|
|
289
|
+
};
|
|
290
|
+
var statusLabelSizes = {
|
|
291
|
+
sm: {
|
|
292
|
+
container: "px-2 py-0.5 text-xs gap-1.5",
|
|
293
|
+
dot: "w-1.5 h-1.5"
|
|
294
|
+
},
|
|
295
|
+
md: {
|
|
296
|
+
container: "px-2.5 py-0.5 text-sm gap-2",
|
|
297
|
+
dot: "w-2 h-2"
|
|
298
|
+
},
|
|
299
|
+
lg: {
|
|
300
|
+
container: "px-3 py-1 text-base gap-2",
|
|
301
|
+
dot: "w-2.5 h-2.5"
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
var textSizes = {
|
|
305
|
+
xs: "text-sm sm:text-xs",
|
|
306
|
+
sm: "text-base sm:text-sm",
|
|
307
|
+
base: "text-base",
|
|
308
|
+
lg: "text-lg",
|
|
309
|
+
xl: "text-xl sm:text-lg",
|
|
310
|
+
"2xl": "text-2xl sm:text-xl",
|
|
311
|
+
"3xl": "text-3xl sm:text-2xl",
|
|
312
|
+
"4xl": "text-4xl sm:text-3xl",
|
|
313
|
+
"5xl": "text-5xl sm:text-4xl"
|
|
314
|
+
};
|
|
315
|
+
var headingSizes = {
|
|
316
|
+
sm: "text-base font-semibold",
|
|
317
|
+
md: "text-lg font-bold",
|
|
318
|
+
lg: "text-xl font-bold",
|
|
319
|
+
xl: "text-2xl font-bold",
|
|
320
|
+
"2xl": "text-3xl font-bold sm:text-2xl",
|
|
321
|
+
"3xl": "text-4xl font-bold sm:text-3xl",
|
|
322
|
+
"4xl": "text-5xl font-bold sm:text-4xl"
|
|
323
|
+
};
|
|
324
|
+
var cardSizes = {
|
|
325
|
+
xs: "w-full sm:max-w-36",
|
|
326
|
+
sm: "w-full sm:max-w-64",
|
|
327
|
+
md: "w-full sm:max-w-96",
|
|
328
|
+
lg: "w-full sm:max-w-[28rem]",
|
|
329
|
+
xl: "w-full sm:max-w-[32rem]",
|
|
330
|
+
"2xl": "w-full sm:max-w-[36rem]",
|
|
331
|
+
full: "w-full"
|
|
332
|
+
};
|
|
333
|
+
var gapSizes = {
|
|
334
|
+
none: "gap-0",
|
|
335
|
+
xs: "gap-2 sm:gap-1",
|
|
336
|
+
sm: "gap-3 sm:gap-2",
|
|
337
|
+
md: "gap-5 sm:gap-4",
|
|
338
|
+
lg: "gap-7 sm:gap-6",
|
|
339
|
+
xl: "gap-10 sm:gap-8",
|
|
340
|
+
"2xl": "gap-14 sm:gap-12",
|
|
341
|
+
"3xl": "gap-20 sm:gap-16"
|
|
342
|
+
};
|
|
343
|
+
var containerSizes = {
|
|
344
|
+
sm: "max-w-screen-sm",
|
|
345
|
+
md: "max-w-screen-md",
|
|
346
|
+
lg: "max-w-screen-lg",
|
|
347
|
+
xl: "max-w-screen-xl",
|
|
348
|
+
"2xl": "max-w-screen-2xl",
|
|
349
|
+
"3xl": "max-w-[1920px]",
|
|
350
|
+
full: "max-w-full",
|
|
351
|
+
screen: "max-w-[100vw]"
|
|
352
|
+
};
|
|
353
|
+
var containerMinWidths = {
|
|
354
|
+
xs: "min-w-[20rem]",
|
|
355
|
+
// 320px
|
|
356
|
+
sm: "min-w-[24rem]",
|
|
357
|
+
// 384px
|
|
358
|
+
md: "min-w-[28rem]",
|
|
359
|
+
// 448px
|
|
360
|
+
lg: "min-w-[32rem]",
|
|
361
|
+
// 512px
|
|
362
|
+
xl: "min-w-[36rem]",
|
|
363
|
+
// 576px
|
|
364
|
+
"2xl": "min-w-[42rem]",
|
|
365
|
+
// 672px
|
|
366
|
+
"3xl": "min-w-[48rem]",
|
|
367
|
+
// 768px
|
|
368
|
+
full: "min-w-full",
|
|
369
|
+
screen: "min-w-screen"
|
|
370
|
+
};
|
|
371
|
+
var containerMinHeights = {
|
|
372
|
+
xs: "min-h-[10rem]",
|
|
373
|
+
// 160px
|
|
374
|
+
sm: "min-h-[15rem]",
|
|
375
|
+
// 240px
|
|
376
|
+
md: "min-h-[20rem]",
|
|
377
|
+
// 320px
|
|
378
|
+
lg: "min-h-[25rem]",
|
|
379
|
+
// 400px
|
|
380
|
+
xl: "min-h-[30rem]",
|
|
381
|
+
// 480px
|
|
382
|
+
"2xl": "min-h-[35rem]",
|
|
383
|
+
// 560px
|
|
384
|
+
"3xl": "min-h-[40rem]",
|
|
385
|
+
// 640px
|
|
386
|
+
full: "min-h-full",
|
|
387
|
+
screen: "min-h-screen"
|
|
388
|
+
};
|
|
389
|
+
var sectionPadding = {
|
|
390
|
+
none: "py-0",
|
|
391
|
+
xs: "py-6 sm:py-4",
|
|
392
|
+
sm: "py-10 sm:py-8",
|
|
393
|
+
md: "py-16 sm:py-12",
|
|
394
|
+
lg: "py-20 sm:py-16",
|
|
395
|
+
xl: "py-28 sm:py-24",
|
|
396
|
+
"2xl": "py-36 sm:py-32"
|
|
145
397
|
};
|
|
398
|
+
var cardPadding = {
|
|
399
|
+
none: "p-0",
|
|
400
|
+
xs: "p-3 sm:p-2",
|
|
401
|
+
sm: "p-5 sm:p-4",
|
|
402
|
+
md: "p-7 sm:p-6",
|
|
403
|
+
lg: "p-9 sm:p-8",
|
|
404
|
+
xl: "p-12 sm:p-10",
|
|
405
|
+
"2xl": "p-14 sm:p-12"
|
|
406
|
+
};
|
|
407
|
+
var overlaySizes = {
|
|
408
|
+
xs: "w-full sm:w-64",
|
|
409
|
+
sm: "w-full sm:w-80",
|
|
410
|
+
md: "w-full sm:w-96",
|
|
411
|
+
lg: "w-full sm:w-[28rem]",
|
|
412
|
+
xl: "w-full sm:w-[32rem]",
|
|
413
|
+
"2xl": "w-full sm:w-[40rem]",
|
|
414
|
+
"3xl": "w-full sm:w-[48rem]",
|
|
415
|
+
full: "w-full max-w-2xl"
|
|
416
|
+
};
|
|
417
|
+
var borderRadius = {
|
|
418
|
+
none: "rounded-none",
|
|
419
|
+
sm: "rounded-sm",
|
|
420
|
+
md: "rounded-md",
|
|
421
|
+
lg: "rounded-lg",
|
|
422
|
+
xl: "rounded-xl",
|
|
423
|
+
"2xl": "rounded-2xl",
|
|
424
|
+
"3xl": "rounded-3xl",
|
|
425
|
+
full: "rounded-full"
|
|
426
|
+
};
|
|
427
|
+
function getIconPixels(size, variant = "desktop") {
|
|
428
|
+
if (typeof size === "number") return size;
|
|
429
|
+
return visualSizes[size].pixels[variant];
|
|
430
|
+
}
|
|
431
|
+
function getVisualClasses(size) {
|
|
432
|
+
return visualSizes[size].classes;
|
|
433
|
+
}
|
|
146
434
|
var Icon = ({
|
|
147
435
|
name,
|
|
148
436
|
size = "md",
|
|
@@ -155,7 +443,7 @@ var Icon = ({
|
|
|
155
443
|
const componentName = pascalName.startsWith("Icon") ? pascalName : "Icon" + pascalName;
|
|
156
444
|
const IconComponent = TablerIcons__namespace[componentName];
|
|
157
445
|
if (!IconComponent) return null;
|
|
158
|
-
const pixelSize =
|
|
446
|
+
const pixelSize = getIconPixels(size, "desktop");
|
|
159
447
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
160
448
|
IconComponent,
|
|
161
449
|
{
|
|
@@ -356,16 +644,9 @@ function openLoginPopup(authUrl, onSuccess) {
|
|
|
356
644
|
}
|
|
357
645
|
return popup;
|
|
358
646
|
}
|
|
359
|
-
var sizeClasses = {
|
|
360
|
-
xs: "h-4 w-4",
|
|
361
|
-
sm: "h-6 w-6",
|
|
362
|
-
md: "h-8 w-8",
|
|
363
|
-
lg: "h-10 w-10",
|
|
364
|
-
xl: "h-12 w-12"
|
|
365
|
-
};
|
|
366
647
|
function Logo({ size = "md", className = "" }) {
|
|
367
|
-
const
|
|
368
|
-
return /* @__PURE__ */ jsxRuntime.jsx("img", { src: "/icons/logo.svg", alt: "Hydden Logo", className: `${
|
|
648
|
+
const sizeConfig = logoSizes[size];
|
|
649
|
+
return /* @__PURE__ */ jsxRuntime.jsx("img", { src: "/icons/logo.svg", alt: "Hydden Logo", className: `${sizeConfig.classes} ${className}`, loading: "lazy" });
|
|
369
650
|
}
|
|
370
651
|
function Container({
|
|
371
652
|
children,
|
|
@@ -373,72 +654,36 @@ function Container({
|
|
|
373
654
|
size = "lg",
|
|
374
655
|
padding = "lg",
|
|
375
656
|
align = "center",
|
|
657
|
+
alignItems,
|
|
376
658
|
minWidth,
|
|
377
659
|
minHeight
|
|
378
660
|
}) {
|
|
379
|
-
const sizeClasses2 = {
|
|
380
|
-
sm: "max-w-screen-sm",
|
|
381
|
-
md: "max-w-screen-md",
|
|
382
|
-
lg: "max-w-screen-lg",
|
|
383
|
-
xl: "max-w-screen-xl",
|
|
384
|
-
full: "max-w-full"
|
|
385
|
-
};
|
|
386
|
-
const paddingClasses = {
|
|
387
|
-
none: "",
|
|
388
|
-
sm: "py-6",
|
|
389
|
-
md: "py-8",
|
|
390
|
-
lg: "py-12",
|
|
391
|
-
xl: "py-16"
|
|
392
|
-
};
|
|
393
661
|
const alignClasses = {
|
|
394
662
|
start: "mr-auto",
|
|
395
663
|
center: "mx-auto",
|
|
396
664
|
end: "ml-auto"
|
|
397
665
|
};
|
|
398
|
-
const
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}
|
|
415
|
-
const minHeightClasses = {
|
|
416
|
-
xs: "min-h-[10rem]",
|
|
417
|
-
// 160px
|
|
418
|
-
sm: "min-h-[15rem]",
|
|
419
|
-
// 240px
|
|
420
|
-
md: "min-h-[20rem]",
|
|
421
|
-
// 320px
|
|
422
|
-
lg: "min-h-[25rem]",
|
|
423
|
-
// 400px
|
|
424
|
-
xl: "min-h-[30rem]",
|
|
425
|
-
// 480px
|
|
426
|
-
"2xl": "min-h-[35rem]",
|
|
427
|
-
// 560px
|
|
428
|
-
"3xl": "min-h-[40rem]",
|
|
429
|
-
// 640px
|
|
430
|
-
screen: "min-h-screen"
|
|
431
|
-
};
|
|
432
|
-
const minWidthClass = minWidth && minWidthClasses[minWidth] ? minWidthClasses[minWidth] : "";
|
|
433
|
-
const minHeightClass = minHeight && minHeightClasses[minHeight] ? minHeightClasses[minHeight] : "";
|
|
434
|
-
const inlineStyles = {
|
|
435
|
-
...minWidth && !minWidthClasses[minWidth] && { minWidth },
|
|
436
|
-
...minHeight && !minHeightClasses[minHeight] && { minHeight }
|
|
437
|
-
};
|
|
666
|
+
const alignItemsClasses = {
|
|
667
|
+
start: "flex items-start justify-start",
|
|
668
|
+
center: "flex items-center justify-center",
|
|
669
|
+
end: "flex items-end justify-end"
|
|
670
|
+
};
|
|
671
|
+
const sizeClass = containerSizes[size] || containerSizes.lg;
|
|
672
|
+
const paddingClass = padding === "none" ? "" : Object.prototype.hasOwnProperty.call(sectionPadding, padding) ? sectionPadding[padding] : sectionPadding.lg;
|
|
673
|
+
const minWidthClass = minWidth && containerMinWidths[minWidth] ? containerMinWidths[minWidth] : "";
|
|
674
|
+
const minHeightClass = minHeight && containerMinHeights[minHeight] ? containerMinHeights[minHeight] : "";
|
|
675
|
+
const alignItemsClass = alignItems ? alignItemsClasses[alignItems] : "";
|
|
676
|
+
const inlineStyles = {};
|
|
677
|
+
if (minWidth && !containerMinWidths[minWidth]) {
|
|
678
|
+
inlineStyles.minWidth = minWidth;
|
|
679
|
+
}
|
|
680
|
+
if (minHeight && !containerMinHeights[minHeight]) {
|
|
681
|
+
inlineStyles.minHeight = minHeight;
|
|
682
|
+
}
|
|
438
683
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
439
684
|
"div",
|
|
440
685
|
{
|
|
441
|
-
className: `px-4 ${
|
|
686
|
+
className: `px-4 ${sizeClass} ${paddingClass} ${alignClasses[align]} ${alignItemsClass} ${minWidthClass} ${minHeightClass} ${className}`,
|
|
442
687
|
style: Object.keys(inlineStyles).length > 0 ? inlineStyles : void 0,
|
|
443
688
|
children
|
|
444
689
|
}
|
|
@@ -464,15 +709,7 @@ function Grid({
|
|
|
464
709
|
xl: "350px",
|
|
465
710
|
"2xl": "400px"
|
|
466
711
|
};
|
|
467
|
-
const
|
|
468
|
-
none: "gap-0",
|
|
469
|
-
xs: "gap-1",
|
|
470
|
-
sm: "gap-2",
|
|
471
|
-
md: "gap-4",
|
|
472
|
-
lg: "gap-6",
|
|
473
|
-
xl: "gap-8",
|
|
474
|
-
"2xl": "gap-12"
|
|
475
|
-
};
|
|
712
|
+
const gapClass = gapSizes[gap];
|
|
476
713
|
const alignItemsClasses = {
|
|
477
714
|
start: "items-start",
|
|
478
715
|
center: "items-center",
|
|
@@ -499,7 +736,7 @@ function Grid({
|
|
|
499
736
|
className: `
|
|
500
737
|
grid
|
|
501
738
|
${!responsive ? "" : responsiveClasses}
|
|
502
|
-
${
|
|
739
|
+
${gapClass}
|
|
503
740
|
${alignItemsClasses[alignItems]}
|
|
504
741
|
${justifyItemsClasses[justifyItems]}
|
|
505
742
|
${className}
|
|
@@ -578,14 +815,7 @@ function Text({
|
|
|
578
815
|
error: "text-destructive",
|
|
579
816
|
inherit: "text-inherit"
|
|
580
817
|
};
|
|
581
|
-
const
|
|
582
|
-
xs: "text-sm sm:text-xs",
|
|
583
|
-
sm: "text-base sm:text-sm",
|
|
584
|
-
base: "text-base",
|
|
585
|
-
lg: "text-lg",
|
|
586
|
-
xl: "text-xl",
|
|
587
|
-
"2xl": "text-2xl"
|
|
588
|
-
};
|
|
818
|
+
const sizeClasses = textSizes;
|
|
589
819
|
const weightClasses = {
|
|
590
820
|
light: "font-light",
|
|
591
821
|
normal: "font-normal",
|
|
@@ -669,7 +899,7 @@ function Text({
|
|
|
669
899
|
const margin = hasMargin ? "mb-3 sm:mb-4" : "";
|
|
670
900
|
const classes = [
|
|
671
901
|
variantClasses[variant],
|
|
672
|
-
|
|
902
|
+
sizeClasses[finalSize],
|
|
673
903
|
weightClasses[weight],
|
|
674
904
|
margin,
|
|
675
905
|
align && alignClasses[align],
|
|
@@ -709,20 +939,14 @@ function PageHeader({ title, description, badge, className = "" }) {
|
|
|
709
939
|
PageHeader.displayName = "PageHeader";
|
|
710
940
|
var page_header_default = PageHeader;
|
|
711
941
|
function Section({ children, variant = "default", padding = "none", className, id }) {
|
|
712
|
-
const paddingClasses =
|
|
713
|
-
none: "py-0",
|
|
714
|
-
sm: "py-8",
|
|
715
|
-
md: "py-12",
|
|
716
|
-
lg: "py-16",
|
|
717
|
-
xl: "py-24"
|
|
718
|
-
};
|
|
942
|
+
const paddingClasses = sectionPadding[padding];
|
|
719
943
|
const variantClasses = {
|
|
720
944
|
default: "bg-background",
|
|
721
945
|
muted: "bg-muted/20",
|
|
722
946
|
primary: "bg-primary text-primary-foreground",
|
|
723
947
|
dark: "bg-background-dark text-foreground-dark"
|
|
724
948
|
};
|
|
725
|
-
const classes = ["w-full", paddingClasses
|
|
949
|
+
const classes = ["w-full", paddingClasses, variantClasses[variant], className].filter(Boolean).join(" ");
|
|
726
950
|
return /* @__PURE__ */ jsxRuntime.jsx("section", { id, className: classes, children });
|
|
727
951
|
}
|
|
728
952
|
Section.displayName = "Section";
|
|
@@ -747,13 +971,7 @@ function Stack({
|
|
|
747
971
|
align = "stretch",
|
|
748
972
|
justify
|
|
749
973
|
}) {
|
|
750
|
-
const spacingClasses =
|
|
751
|
-
none: "gap-0",
|
|
752
|
-
sm: "gap-3 sm:gap-2",
|
|
753
|
-
md: "gap-5 sm:gap-4",
|
|
754
|
-
lg: "gap-7 sm:gap-6",
|
|
755
|
-
xl: "gap-10 sm:gap-8"
|
|
756
|
-
};
|
|
974
|
+
const spacingClasses = gapSizes[spacing];
|
|
757
975
|
const alignClasses = {
|
|
758
976
|
start: "items-start",
|
|
759
977
|
center: "items-center",
|
|
@@ -773,7 +991,7 @@ function Stack({
|
|
|
773
991
|
"div",
|
|
774
992
|
{
|
|
775
993
|
"data-component": "Stack",
|
|
776
|
-
className: `flex flex-wrap ${directionClass} ${spacingClasses
|
|
994
|
+
className: `flex flex-wrap ${directionClass} ${spacingClasses} ${alignClasses[align]} ${justifyClass} ${className}`,
|
|
777
995
|
children
|
|
778
996
|
}
|
|
779
997
|
);
|
|
@@ -969,13 +1187,7 @@ function Drawer({
|
|
|
969
1187
|
animationFrames: noAnimation ? 0 : 0
|
|
970
1188
|
});
|
|
971
1189
|
if (!shouldRender) return null;
|
|
972
|
-
const
|
|
973
|
-
sm: "w-full sm:w-72",
|
|
974
|
-
md: "w-full sm:w-96",
|
|
975
|
-
lg: "w-full sm:w-[32rem]",
|
|
976
|
-
xl: "w-full sm:w-[40rem]",
|
|
977
|
-
full: "w-full max-w-2xl"
|
|
978
|
-
};
|
|
1190
|
+
const sizeClasses = overlaySizes[size];
|
|
979
1191
|
const edgeClasses = {
|
|
980
1192
|
left: "left-0 top-0 bottom-0",
|
|
981
1193
|
right: "right-0 top-0 bottom-0",
|
|
@@ -1027,7 +1239,7 @@ function Drawer({
|
|
|
1027
1239
|
tabIndex: -1,
|
|
1028
1240
|
"data-phase": phase,
|
|
1029
1241
|
"data-position": position,
|
|
1030
|
-
className: `fixed ${edgeClasses[position]} ${position === "left" || position === "right" ?
|
|
1242
|
+
className: `fixed ${edgeClasses[position]} ${position === "left" || position === "right" ? sizeClasses : ""} bg-card text-card-foreground shadow-2xl z-[1000] flex flex-col outline-none ${panelTransform} ${noAnimation ? "" : "transition-transform duration-[250ms] ease-out will-change-transform"} ${className}`,
|
|
1031
1243
|
onKeyDown: handleKeyDown,
|
|
1032
1244
|
children: [
|
|
1033
1245
|
title && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-5 py-4 border-b border-border/60 bg-card/95 backdrop-blur-sm", children: [
|
|
@@ -1087,15 +1299,8 @@ function Card({
|
|
|
1087
1299
|
ghost: "bg-transparent",
|
|
1088
1300
|
filled: "bg-muted text-foreground"
|
|
1089
1301
|
};
|
|
1090
|
-
const sizeClasses2 = {
|
|
1091
|
-
xs: "w-full sm:max-w-36",
|
|
1092
|
-
sm: "w-full sm:max-w-64",
|
|
1093
|
-
md: "w-full sm:max-w-96",
|
|
1094
|
-
lg: "w-full sm:max-w-[28rem]",
|
|
1095
|
-
xl: "w-full sm:max-w-[32rem]"
|
|
1096
|
-
};
|
|
1097
1302
|
const widthClasses = {
|
|
1098
|
-
auto: size ?
|
|
1303
|
+
auto: size ? cardSizes[size] : "max-w-full",
|
|
1099
1304
|
full: "w-full",
|
|
1100
1305
|
fit: "w-fit"
|
|
1101
1306
|
};
|
|
@@ -1153,20 +1358,14 @@ function CardHeader({ children, className = "", bordered = true, padding = "md"
|
|
|
1153
1358
|
CardHeader.displayName = "CardHeader";
|
|
1154
1359
|
var card_header_default = CardHeader;
|
|
1155
1360
|
function CardBody({ children, padding = "md", className = "" }) {
|
|
1156
|
-
const paddingClasses =
|
|
1157
|
-
none: "p-0",
|
|
1158
|
-
sm: "p-4",
|
|
1159
|
-
md: "p-6",
|
|
1160
|
-
lg: "p-8",
|
|
1161
|
-
xl: "p-10"
|
|
1162
|
-
};
|
|
1361
|
+
const paddingClasses = cardPadding[padding];
|
|
1163
1362
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1164
1363
|
"div",
|
|
1165
1364
|
{
|
|
1166
1365
|
className: `
|
|
1167
1366
|
card-body
|
|
1168
1367
|
flex flex-col gap-2
|
|
1169
|
-
${paddingClasses
|
|
1368
|
+
${paddingClasses}
|
|
1170
1369
|
${className}
|
|
1171
1370
|
`.trim().replace(/\s+/g, " "),
|
|
1172
1371
|
children
|
|
@@ -1260,18 +1459,13 @@ function CardFigure({ children, className = "", aspectRatio = "auto" }) {
|
|
|
1260
1459
|
CardFigure.displayName = "CardFigure";
|
|
1261
1460
|
var card_figure_default = CardFigure;
|
|
1262
1461
|
function CardTitle({ children, className = "", as: Component = "h2", size = "md" }) {
|
|
1263
|
-
const
|
|
1264
|
-
sm: "text-base font-semibold",
|
|
1265
|
-
md: "text-lg font-bold",
|
|
1266
|
-
lg: "text-xl font-bold",
|
|
1267
|
-
xl: "text-2xl font-bold"
|
|
1268
|
-
};
|
|
1462
|
+
const sizeClasses = headingSizes[size];
|
|
1269
1463
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1270
1464
|
Component,
|
|
1271
1465
|
{
|
|
1272
1466
|
className: `
|
|
1273
1467
|
card-title
|
|
1274
|
-
${
|
|
1468
|
+
${sizeClasses}
|
|
1275
1469
|
${className}
|
|
1276
1470
|
`.trim().replace(/\s+/g, " "),
|
|
1277
1471
|
children
|
|
@@ -1771,13 +1965,8 @@ var Button = React4__default.default.forwardRef(
|
|
|
1771
1965
|
return `${solidVariantClasses[variantKey]} shadow-sm hover:shadow-md`;
|
|
1772
1966
|
}
|
|
1773
1967
|
};
|
|
1774
|
-
const
|
|
1775
|
-
|
|
1776
|
-
sm: "h-10 sm:h-8 px-4 sm:px-3 text-base sm:text-sm min-h-10 sm:min-h-8",
|
|
1777
|
-
md: "h-12 sm:h-10 px-5 sm:px-4 text-base min-h-12 sm:min-h-10",
|
|
1778
|
-
lg: "h-14 sm:h-12 px-7 sm:px-6 text-lg min-h-14 sm:min-h-12",
|
|
1779
|
-
xl: "h-16 sm:h-14 px-9 sm:px-8 text-xl min-h-16 sm:min-h-14"
|
|
1780
|
-
};
|
|
1968
|
+
const sizeConfig = interactiveSizes[size];
|
|
1969
|
+
const sizeClasses = `${sizeConfig.height} ${sizeConfig.padding} ${sizeConfig.text}`;
|
|
1781
1970
|
const roundedClasses = {
|
|
1782
1971
|
default: "rounded-md",
|
|
1783
1972
|
pill: "rounded-full",
|
|
@@ -1806,7 +1995,7 @@ var Button = React4__default.default.forwardRef(
|
|
|
1806
1995
|
onClick,
|
|
1807
1996
|
"aria-label": ariaLabel,
|
|
1808
1997
|
disabled: disabled || loading,
|
|
1809
|
-
className: `inline-flex items-center justify-center ${roundedClasses[rounded]} font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 ${styleClasses} ${
|
|
1998
|
+
className: `inline-flex items-center justify-center ${roundedClasses[rounded]} font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 ${styleClasses} ${sizeClasses} ${isIconOnly ? "p-0" : ""} ${widthClasses} ${activeClasses} ${className}`,
|
|
1810
1999
|
children: [
|
|
1811
2000
|
displayIcon && iconPosition === "left" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `inline-flex ${children ? "mr-2" : ""}`, children: displayIcon }),
|
|
1812
2001
|
children,
|
|
@@ -1830,10 +2019,11 @@ function Hero({
|
|
|
1830
2019
|
centered = true,
|
|
1831
2020
|
size = "lg"
|
|
1832
2021
|
}) {
|
|
1833
|
-
const
|
|
1834
|
-
sm:
|
|
1835
|
-
md:
|
|
2022
|
+
const sizeClasses = {
|
|
2023
|
+
sm: sectionPadding.md,
|
|
2024
|
+
md: sectionPadding.lg,
|
|
1836
2025
|
lg: "pt-32 pb-20 md:pt-36 md:pb-28"
|
|
2026
|
+
// Custom hero-specific padding
|
|
1837
2027
|
};
|
|
1838
2028
|
const titleSizes = {
|
|
1839
2029
|
sm: "text-3xl md:text-4xl",
|
|
@@ -1845,7 +2035,7 @@ function Hero({
|
|
|
1845
2035
|
solid: "bg-muted/30",
|
|
1846
2036
|
minimal: "bg-background"
|
|
1847
2037
|
};
|
|
1848
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `relative ${
|
|
2038
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `relative ${sizeClasses[size]} ${variantClasses[variant]} ${className}`, children: [
|
|
1849
2039
|
variant === "gradient" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-primary/20 to-transparent" }),
|
|
1850
2040
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 bottom-0 h-32 bg-gradient-to-t from-background to-transparent pointer-events-none" }),
|
|
1851
2041
|
/* @__PURE__ */ jsxRuntime.jsx(container_default, { size: "lg", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: centered ? "text-center mx-auto max-w-4xl" : "max-w-4xl", children: [
|
|
@@ -1935,10 +2125,10 @@ function Link({
|
|
|
1935
2125
|
always: "underline",
|
|
1936
2126
|
none: "no-underline"
|
|
1937
2127
|
};
|
|
1938
|
-
const
|
|
1939
|
-
sm:
|
|
1940
|
-
md:
|
|
1941
|
-
lg:
|
|
2128
|
+
const sizeClasses = {
|
|
2129
|
+
sm: textSizes.sm,
|
|
2130
|
+
md: textSizes.base,
|
|
2131
|
+
lg: textSizes.lg
|
|
1942
2132
|
};
|
|
1943
2133
|
const displayClasses = {
|
|
1944
2134
|
inline: "inline",
|
|
@@ -1947,7 +2137,7 @@ function Link({
|
|
|
1947
2137
|
const linkClassName = [
|
|
1948
2138
|
variantClasses[variant],
|
|
1949
2139
|
underlineClasses[underline],
|
|
1950
|
-
|
|
2140
|
+
sizeClasses[size],
|
|
1951
2141
|
displayClasses[display],
|
|
1952
2142
|
"cursor-pointer transition-colors",
|
|
1953
2143
|
className
|
|
@@ -2724,12 +2914,7 @@ function NavDropdownItem({ to, children, className = "" }) {
|
|
|
2724
2914
|
NavDropdownItem.displayName = "NavDropdownItem";
|
|
2725
2915
|
var nav_dropdown_item_default = NavDropdownItem;
|
|
2726
2916
|
function Avatar({ src, alt = "", fallback, size = "md", className = "" }) {
|
|
2727
|
-
const
|
|
2728
|
-
sm: "w-10 h-10 sm:w-8 sm:h-8 text-sm sm:text-xs",
|
|
2729
|
-
md: "w-12 h-12 sm:w-10 sm:h-10 text-base sm:text-sm",
|
|
2730
|
-
lg: "w-14 h-14 sm:w-12 sm:h-12 text-lg sm:text-base",
|
|
2731
|
-
xl: "w-20 h-20 sm:w-16 sm:h-16 text-xl sm:text-lg"
|
|
2732
|
-
};
|
|
2917
|
+
const sizeConfig = avatarSizes[size];
|
|
2733
2918
|
let content;
|
|
2734
2919
|
if (src) {
|
|
2735
2920
|
content = /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt, className: "w-full h-full object-cover" });
|
|
@@ -2741,7 +2926,7 @@ function Avatar({ src, alt = "", fallback, size = "md", className = "" }) {
|
|
|
2741
2926
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2742
2927
|
"div",
|
|
2743
2928
|
{
|
|
2744
|
-
className: `inline-flex items-center justify-center rounded-full bg-muted text-muted-foreground font-medium overflow-hidden ${
|
|
2929
|
+
className: `inline-flex items-center justify-center rounded-full bg-muted text-muted-foreground font-medium overflow-hidden ${sizeConfig.classes} ${sizeConfig.text} ${className}`,
|
|
2745
2930
|
children: content
|
|
2746
2931
|
}
|
|
2747
2932
|
);
|
|
@@ -2756,15 +2941,11 @@ function Badge({ children, variant = "default", size = "md", className = "", ...
|
|
|
2756
2941
|
warning: "bg-warning/10 text-warning border border-warning/20",
|
|
2757
2942
|
error: "bg-destructive/10 text-destructive border border-destructive/20"
|
|
2758
2943
|
};
|
|
2759
|
-
const
|
|
2760
|
-
sm: "px-2.5 sm:px-2 py-1 sm:py-0.5 text-sm sm:text-xs",
|
|
2761
|
-
md: "px-3 sm:px-2.5 py-1 sm:py-0.5 text-sm sm:text-xs font-semibold",
|
|
2762
|
-
lg: "px-4 sm:px-3 py-1.5 sm:py-1 text-base sm:text-sm font-semibold"
|
|
2763
|
-
};
|
|
2944
|
+
const sizeClasses = badgeSizes[size].classes;
|
|
2764
2945
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2765
2946
|
"span",
|
|
2766
2947
|
{
|
|
2767
|
-
className: `inline-flex items-center font-medium rounded-full transition-colors ${variantClasses[variant]} ${
|
|
2948
|
+
className: `inline-flex items-center font-medium rounded-full transition-colors ${variantClasses[variant]} ${sizeClasses} ${className}`,
|
|
2768
2949
|
...props,
|
|
2769
2950
|
children
|
|
2770
2951
|
}
|
|
@@ -2816,26 +2997,13 @@ function StatusLabel({
|
|
|
2816
2997
|
dot: "bg-primary"
|
|
2817
2998
|
}
|
|
2818
2999
|
};
|
|
2819
|
-
const
|
|
2820
|
-
sm: {
|
|
2821
|
-
container: "px-2 py-0.5 text-xs gap-1.5",
|
|
2822
|
-
dot: "w-1.5 h-1.5"
|
|
2823
|
-
},
|
|
2824
|
-
md: {
|
|
2825
|
-
container: "px-2.5 py-0.5 text-sm gap-2",
|
|
2826
|
-
dot: "w-2 h-2"
|
|
2827
|
-
},
|
|
2828
|
-
lg: {
|
|
2829
|
-
container: "px-3 py-1 text-base gap-2",
|
|
2830
|
-
dot: "w-2.5 h-2.5"
|
|
2831
|
-
}
|
|
2832
|
-
};
|
|
3000
|
+
const sizeClasses = statusLabelSizes[size];
|
|
2833
3001
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2834
3002
|
"span",
|
|
2835
3003
|
{
|
|
2836
|
-
className: `inline-flex items-center font-medium rounded-full border ${statusConfig[status][variant]} ${
|
|
3004
|
+
className: `inline-flex items-center font-medium rounded-full border ${statusConfig[status][variant]} ${sizeClasses.container} ${className}`,
|
|
2837
3005
|
children: [
|
|
2838
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `rounded-full ${statusConfig[status].dot} ${
|
|
3006
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `rounded-full ${statusConfig[status].dot} ${sizeClasses.dot}` }),
|
|
2839
3007
|
children
|
|
2840
3008
|
]
|
|
2841
3009
|
}
|
|
@@ -2854,11 +3022,7 @@ function Chip({
|
|
|
2854
3022
|
clickable = false,
|
|
2855
3023
|
onClick
|
|
2856
3024
|
}) {
|
|
2857
|
-
const
|
|
2858
|
-
sm: "text-xs px-2 py-1 gap-1",
|
|
2859
|
-
md: "text-sm px-3 py-1.5 gap-1.5",
|
|
2860
|
-
lg: "text-base px-4 py-2 gap-2"
|
|
2861
|
-
};
|
|
3025
|
+
const sizeClasses = chipSizes[size].classes;
|
|
2862
3026
|
const variantClasses = {
|
|
2863
3027
|
default: "bg-muted text-muted-foreground",
|
|
2864
3028
|
primary: "bg-primary/10 text-primary",
|
|
@@ -2885,7 +3049,7 @@ function Chip({
|
|
|
2885
3049
|
className: `
|
|
2886
3050
|
inline-flex items-center justify-center
|
|
2887
3051
|
rounded-full font-medium
|
|
2888
|
-
${
|
|
3052
|
+
${sizeClasses}
|
|
2889
3053
|
${variantClasses[variant]}
|
|
2890
3054
|
${interactiveClasses}
|
|
2891
3055
|
${disabledClasses}
|
|
@@ -3922,11 +4086,7 @@ function useStaggeredTransition(count, baseDelay = 50) {
|
|
|
3922
4086
|
return Array.from({ length: count }, (_, i) => i * baseDelay);
|
|
3923
4087
|
}
|
|
3924
4088
|
function Spinner({ size = "md", variant = "primary", className = "", speed, ...props }) {
|
|
3925
|
-
const
|
|
3926
|
-
sm: "w-4 h-4 border-2",
|
|
3927
|
-
md: "w-8 h-8 border-2",
|
|
3928
|
-
lg: "w-12 h-12 border-4"
|
|
3929
|
-
};
|
|
4089
|
+
const sizeConfig = spinnerSizes[size];
|
|
3930
4090
|
const variantTopBorder = {
|
|
3931
4091
|
primary: "border-t-primary",
|
|
3932
4092
|
accent: "border-t-accent",
|
|
@@ -3940,7 +4100,7 @@ function Spinner({ size = "md", variant = "primary", className = "", speed, ...p
|
|
|
3940
4100
|
role: "status",
|
|
3941
4101
|
"aria-label": "Loading",
|
|
3942
4102
|
"data-variant": variant,
|
|
3943
|
-
className: `inline-block border-muted ${variantTopBorder} rounded-full animate-spin ${duration} ${
|
|
4103
|
+
className: `inline-block border-muted ${variantTopBorder} rounded-full animate-spin ${duration} ${sizeConfig.classes} ${sizeConfig.border} ${className}`,
|
|
3944
4104
|
...props,
|
|
3945
4105
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading..." })
|
|
3946
4106
|
}
|
|
@@ -4223,12 +4383,15 @@ function DatePicker({
|
|
|
4223
4383
|
setIsOpen(!isOpen);
|
|
4224
4384
|
}
|
|
4225
4385
|
};
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
}
|
|
4231
|
-
const
|
|
4386
|
+
function getBaseHeightClass(heightClasses) {
|
|
4387
|
+
const classes = heightClasses.split(" ");
|
|
4388
|
+
const base = classes.find((cls) => /^h-\d+/.test(cls));
|
|
4389
|
+
return base || classes[0] || "";
|
|
4390
|
+
}
|
|
4391
|
+
const sizeConfig = interactiveSizes[size] || interactiveSizes.md;
|
|
4392
|
+
const containerClasses = `${getBaseHeightClass(sizeConfig.height)} ${sizeConfig.padding}`;
|
|
4393
|
+
const textClasses = sizeConfig.text;
|
|
4394
|
+
const iconSize = getIconPixels(size, "desktop");
|
|
4232
4395
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: `relative w-full ${className}`, children: [
|
|
4233
4396
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4234
4397
|
"div",
|
|
@@ -4239,8 +4402,8 @@ function DatePicker({
|
|
|
4239
4402
|
bg-background text-foreground
|
|
4240
4403
|
cursor-pointer
|
|
4241
4404
|
transition-all duration-200
|
|
4242
|
-
${
|
|
4243
|
-
${
|
|
4405
|
+
${containerClasses}
|
|
4406
|
+
${textClasses}
|
|
4244
4407
|
${isOpen ? "ring-2 ring-ring ring-offset-2" : "hover:border-ring"}
|
|
4245
4408
|
${disabled ? "opacity-50 cursor-not-allowed" : ""}
|
|
4246
4409
|
`.trim(),
|
|
@@ -4261,7 +4424,7 @@ function DatePicker({
|
|
|
4261
4424
|
placeholder,
|
|
4262
4425
|
readOnly: true,
|
|
4263
4426
|
disabled,
|
|
4264
|
-
className: `flex-1 min-w-0 bg-transparent outline-none cursor-pointer placeholder:text-muted-foreground ${
|
|
4427
|
+
className: `flex-1 min-w-0 bg-transparent outline-none cursor-pointer placeholder:text-muted-foreground ${textClasses}`,
|
|
4265
4428
|
"aria-label": "Selected date"
|
|
4266
4429
|
}
|
|
4267
4430
|
),
|
|
@@ -4277,8 +4440,8 @@ function DatePicker({
|
|
|
4277
4440
|
"svg",
|
|
4278
4441
|
{
|
|
4279
4442
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4280
|
-
width:
|
|
4281
|
-
height:
|
|
4443
|
+
width: iconSize - 2,
|
|
4444
|
+
height: iconSize - 2,
|
|
4282
4445
|
viewBox: "0 0 24 24",
|
|
4283
4446
|
fill: "none",
|
|
4284
4447
|
stroke: "currentColor",
|
|
@@ -4293,7 +4456,7 @@ function DatePicker({
|
|
|
4293
4456
|
)
|
|
4294
4457
|
}
|
|
4295
4458
|
) : clearable ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 flex-shrink-0" }) : null,
|
|
4296
|
-
/* @__PURE__ */ jsxRuntime.jsx(TablerIcons.IconCalendar, { size:
|
|
4459
|
+
/* @__PURE__ */ jsxRuntime.jsx(TablerIcons.IconCalendar, { size: iconSize, className: "text-muted-foreground flex-shrink-0" })
|
|
4297
4460
|
] })
|
|
4298
4461
|
]
|
|
4299
4462
|
}
|
|
@@ -4312,11 +4475,7 @@ function DatePicker({
|
|
|
4312
4475
|
DatePicker.displayName = "DatePicker";
|
|
4313
4476
|
var date_picker_default = DatePicker;
|
|
4314
4477
|
function Code({ children, size = "md", variant = "default", className = "" }) {
|
|
4315
|
-
const
|
|
4316
|
-
sm: "text-xs px-1 py-0.5",
|
|
4317
|
-
md: "text-sm px-1.5 py-0.5",
|
|
4318
|
-
lg: "text-base px-2 py-1"
|
|
4319
|
-
};
|
|
4478
|
+
const sizeClasses = codeSizes[size];
|
|
4320
4479
|
const variantClasses = {
|
|
4321
4480
|
default: "bg-muted text-foreground",
|
|
4322
4481
|
primary: "bg-primary/10 text-primary",
|
|
@@ -4329,7 +4488,7 @@ function Code({ children, size = "md", variant = "default", className = "" }) {
|
|
|
4329
4488
|
{
|
|
4330
4489
|
className: `
|
|
4331
4490
|
inline-block font-mono rounded border border-border/50
|
|
4332
|
-
${
|
|
4491
|
+
${sizeClasses}
|
|
4333
4492
|
${variantClasses[variant]}
|
|
4334
4493
|
${className}
|
|
4335
4494
|
`.trim(),
|
|
@@ -4490,11 +4649,8 @@ function Input({
|
|
|
4490
4649
|
size = "md",
|
|
4491
4650
|
validationState = "default"
|
|
4492
4651
|
}) {
|
|
4493
|
-
const
|
|
4494
|
-
|
|
4495
|
-
md: "h-12 sm:h-10 px-4 sm:px-3 py-2.5 sm:py-2 text-base sm:text-sm",
|
|
4496
|
-
lg: "h-14 sm:h-12 px-5 sm:px-4 py-3 text-lg sm:text-base"
|
|
4497
|
-
};
|
|
4652
|
+
const sizeConfig = interactiveSizes[size];
|
|
4653
|
+
const sizeClasses = `${sizeConfig.height} px-4 sm:px-3 ${sizeConfig.text}`;
|
|
4498
4654
|
const validationClasses = {
|
|
4499
4655
|
default: "border-input focus:border-ring",
|
|
4500
4656
|
error: "border-destructive focus:border-destructive",
|
|
@@ -4516,7 +4672,7 @@ function Input({
|
|
|
4516
4672
|
name,
|
|
4517
4673
|
required,
|
|
4518
4674
|
"aria-invalid": validationState === "error",
|
|
4519
|
-
className: `flex w-full rounded-lg border bg-background shadow-sm transition-all duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring/20 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted/50 ${
|
|
4675
|
+
className: `flex w-full rounded-lg border bg-background shadow-sm transition-all duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring/20 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted/50 ${sizeClasses} ${validationClasses[validationState]} ${className}`
|
|
4520
4676
|
}
|
|
4521
4677
|
);
|
|
4522
4678
|
}
|
|
@@ -4643,12 +4799,39 @@ function MultiSelect({
|
|
|
4643
4799
|
break;
|
|
4644
4800
|
}
|
|
4645
4801
|
};
|
|
4646
|
-
const
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4802
|
+
const sizeClasses = {
|
|
4803
|
+
xs: {
|
|
4804
|
+
container: interactiveSizes.xs.height.split(" ")[0].replace("h-", "min-h-") + " py-0.5 px-1.5",
|
|
4805
|
+
text: interactiveSizes.xs.text,
|
|
4806
|
+
chip: chipSizes.sm.classes.split(" ").filter((c) => !c.includes("gap")).join(" "),
|
|
4807
|
+
icon: getIconPixels("xs", "desktop")
|
|
4808
|
+
},
|
|
4809
|
+
sm: {
|
|
4810
|
+
container: interactiveSizes.sm.height.split(" ")[0].replace("h-", "min-h-") + " py-1 px-2",
|
|
4811
|
+
text: interactiveSizes.sm.text,
|
|
4812
|
+
chip: chipSizes.sm.classes.split(" ").filter((c) => !c.includes("gap")).join(" "),
|
|
4813
|
+
icon: getIconPixels("sm", "desktop")
|
|
4814
|
+
},
|
|
4815
|
+
md: {
|
|
4816
|
+
container: interactiveSizes.md.height.split(" ")[0].replace("h-", "min-h-") + " py-2 px-3",
|
|
4817
|
+
text: interactiveSizes.md.text,
|
|
4818
|
+
chip: chipSizes.md.classes.split(" ").filter((c) => !c.includes("gap")).join(" "),
|
|
4819
|
+
icon: getIconPixels("md", "desktop")
|
|
4820
|
+
},
|
|
4821
|
+
lg: {
|
|
4822
|
+
container: interactiveSizes.lg.height.split(" ")[0].replace("h-", "min-h-") + " py-2 px-4",
|
|
4823
|
+
text: interactiveSizes.lg.text,
|
|
4824
|
+
chip: chipSizes.lg.classes.split(" ").filter((c) => !c.includes("gap")).join(" "),
|
|
4825
|
+
icon: getIconPixels("lg", "desktop")
|
|
4826
|
+
},
|
|
4827
|
+
xl: {
|
|
4828
|
+
container: interactiveSizes.xl.height.split(" ")[0].replace("h-", "min-h-") + " py-2.5 px-5",
|
|
4829
|
+
text: interactiveSizes.xl.text,
|
|
4830
|
+
chip: chipSizes.lg.classes.split(" ").filter((c) => !c.includes("gap")).join(" "),
|
|
4831
|
+
icon: getIconPixels("xl", "desktop")
|
|
4832
|
+
}
|
|
4650
4833
|
};
|
|
4651
|
-
const currentSize =
|
|
4834
|
+
const currentSize = sizeClasses[size];
|
|
4652
4835
|
const getSelectedLabels = () => {
|
|
4653
4836
|
return selectedValues.map((v) => options.find((opt) => opt.value === v)?.label).filter(Boolean);
|
|
4654
4837
|
};
|
|
@@ -4882,11 +5065,8 @@ function Select({
|
|
|
4882
5065
|
size = "md",
|
|
4883
5066
|
validationState = "default"
|
|
4884
5067
|
}) {
|
|
4885
|
-
const
|
|
4886
|
-
|
|
4887
|
-
md: "h-12 sm:h-10 px-4 sm:px-3 py-2.5 sm:py-2 text-base sm:text-sm pr-10",
|
|
4888
|
-
lg: "h-14 sm:h-12 px-5 sm:px-4 py-3 text-lg sm:text-base pr-10"
|
|
4889
|
-
};
|
|
5068
|
+
const sizeConfig = interactiveSizes[size];
|
|
5069
|
+
const sizeClasses = `${sizeConfig.height} px-4 sm:px-3 ${sizeConfig.text} pr-10`;
|
|
4890
5070
|
const validationClasses = {
|
|
4891
5071
|
default: "border-input focus:border-ring",
|
|
4892
5072
|
error: "border-destructive focus:border-destructive",
|
|
@@ -4904,7 +5084,7 @@ function Select({
|
|
|
4904
5084
|
name,
|
|
4905
5085
|
required,
|
|
4906
5086
|
"aria-invalid": validationState === "error",
|
|
4907
|
-
className: `flex w-full rounded-lg border bg-background shadow-sm transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring/20 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted/50 appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20stroke%3D%22%236b7280%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%221.5%22%20d%3D%22M6%208l4%204%204-4%22%2F%3E%3C%2Fsvg%3E')] bg-[length:1.5em] bg-[right_0.5rem_center] bg-no-repeat ${
|
|
5087
|
+
className: `flex w-full rounded-lg border bg-background shadow-sm transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring/20 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted/50 appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20stroke%3D%22%236b7280%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%221.5%22%20d%3D%22M6%208l4%204%204-4%22%2F%3E%3C%2Fsvg%3E')] bg-[length:1.5em] bg-[right_0.5rem_center] bg-no-repeat ${sizeClasses} ${validationClasses[validationState]} ${className}`,
|
|
4908
5088
|
children
|
|
4909
5089
|
}
|
|
4910
5090
|
);
|
|
@@ -5211,16 +5391,38 @@ exports.TimelineItem = TimelineItem;
|
|
|
5211
5391
|
exports.Toast = toast_default;
|
|
5212
5392
|
exports.Tooltip = tooltip_default;
|
|
5213
5393
|
exports.authFetch = authFetch;
|
|
5394
|
+
exports.avatarSizes = avatarSizes;
|
|
5395
|
+
exports.badgeSizes = badgeSizes;
|
|
5396
|
+
exports.borderRadius = borderRadius;
|
|
5397
|
+
exports.cardPadding = cardPadding;
|
|
5398
|
+
exports.cardSizes = cardSizes;
|
|
5214
5399
|
exports.checkAuthStatus = checkAuthStatus;
|
|
5400
|
+
exports.chipSizes = chipSizes;
|
|
5401
|
+
exports.codeSizes = codeSizes;
|
|
5402
|
+
exports.containerMinHeights = containerMinHeights;
|
|
5403
|
+
exports.containerMinWidths = containerMinWidths;
|
|
5404
|
+
exports.containerSizes = containerSizes;
|
|
5405
|
+
exports.gapSizes = gapSizes;
|
|
5215
5406
|
exports.getCurrentUser = getCurrentUser;
|
|
5407
|
+
exports.getIconPixels = getIconPixels;
|
|
5408
|
+
exports.getVisualClasses = getVisualClasses;
|
|
5409
|
+
exports.headingSizes = headingSizes;
|
|
5410
|
+
exports.interactiveSizes = interactiveSizes;
|
|
5216
5411
|
exports.loginExternal = loginExternal;
|
|
5412
|
+
exports.logoSizes = logoSizes;
|
|
5217
5413
|
exports.logoutExternal = logoutExternal;
|
|
5218
5414
|
exports.openLoginPopup = openLoginPopup;
|
|
5415
|
+
exports.overlaySizes = overlaySizes;
|
|
5219
5416
|
exports.redirectToLogin = redirectToLogin;
|
|
5417
|
+
exports.sectionPadding = sectionPadding;
|
|
5418
|
+
exports.spinnerSizes = spinnerSizes;
|
|
5419
|
+
exports.statusLabelSizes = statusLabelSizes;
|
|
5420
|
+
exports.textSizes = textSizes;
|
|
5220
5421
|
exports.useAuth = useAuth;
|
|
5221
5422
|
exports.useScrollReset = useScrollReset_default;
|
|
5222
5423
|
exports.useStaggeredTransition = useStaggeredTransition;
|
|
5223
5424
|
exports.useTable = use_table_default;
|
|
5224
5425
|
exports.useTheme = useTheme;
|
|
5426
|
+
exports.visualSizes = visualSizes;
|
|
5225
5427
|
//# sourceMappingURL=index.cjs.map
|
|
5226
5428
|
//# sourceMappingURL=index.cjs.map
|