@hyddenlabs/hydn-ui 0.3.0-alpha.152 → 0.3.0-alpha.153
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 +426 -231
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +454 -22
- package/dist/index.d.ts +454 -22
- package/dist/index.js +405 -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,
|
|
@@ -376,69 +657,26 @@ function Container({
|
|
|
376
657
|
minWidth,
|
|
377
658
|
minHeight
|
|
378
659
|
}) {
|
|
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
660
|
const alignClasses = {
|
|
394
661
|
start: "mr-auto",
|
|
395
662
|
center: "mx-auto",
|
|
396
663
|
end: "ml-auto"
|
|
397
664
|
};
|
|
398
|
-
const
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
"2xl": "min-w-[42rem]",
|
|
410
|
-
// 672px
|
|
411
|
-
"3xl": "min-w-[48rem]",
|
|
412
|
-
// 768px
|
|
413
|
-
full: "min-w-full"
|
|
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
|
-
};
|
|
665
|
+
const sizeClass = containerSizes[size] || containerSizes.lg;
|
|
666
|
+
const paddingClass = padding === "none" ? "" : Object.prototype.hasOwnProperty.call(sectionPadding, padding) ? sectionPadding[padding] : sectionPadding.lg;
|
|
667
|
+
const minWidthClass = minWidth && containerMinWidths[minWidth] ? containerMinWidths[minWidth] : "";
|
|
668
|
+
const minHeightClass = minHeight && containerMinHeights[minHeight] ? containerMinHeights[minHeight] : "";
|
|
669
|
+
const inlineStyles = {};
|
|
670
|
+
if (minWidth && !containerMinWidths[minWidth]) {
|
|
671
|
+
inlineStyles.minWidth = minWidth;
|
|
672
|
+
}
|
|
673
|
+
if (minHeight && !containerMinHeights[minHeight]) {
|
|
674
|
+
inlineStyles.minHeight = minHeight;
|
|
675
|
+
}
|
|
438
676
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
439
677
|
"div",
|
|
440
678
|
{
|
|
441
|
-
className: `px-4 ${
|
|
679
|
+
className: `px-4 ${sizeClass} ${paddingClass} ${alignClasses[align]} ${minWidthClass} ${minHeightClass} ${className}`,
|
|
442
680
|
style: Object.keys(inlineStyles).length > 0 ? inlineStyles : void 0,
|
|
443
681
|
children
|
|
444
682
|
}
|
|
@@ -464,15 +702,7 @@ function Grid({
|
|
|
464
702
|
xl: "350px",
|
|
465
703
|
"2xl": "400px"
|
|
466
704
|
};
|
|
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
|
-
};
|
|
705
|
+
const gapClass = gapSizes[gap];
|
|
476
706
|
const alignItemsClasses = {
|
|
477
707
|
start: "items-start",
|
|
478
708
|
center: "items-center",
|
|
@@ -499,7 +729,7 @@ function Grid({
|
|
|
499
729
|
className: `
|
|
500
730
|
grid
|
|
501
731
|
${!responsive ? "" : responsiveClasses}
|
|
502
|
-
${
|
|
732
|
+
${gapClass}
|
|
503
733
|
${alignItemsClasses[alignItems]}
|
|
504
734
|
${justifyItemsClasses[justifyItems]}
|
|
505
735
|
${className}
|
|
@@ -578,14 +808,7 @@ function Text({
|
|
|
578
808
|
error: "text-destructive",
|
|
579
809
|
inherit: "text-inherit"
|
|
580
810
|
};
|
|
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
|
-
};
|
|
811
|
+
const sizeClasses = textSizes;
|
|
589
812
|
const weightClasses = {
|
|
590
813
|
light: "font-light",
|
|
591
814
|
normal: "font-normal",
|
|
@@ -669,7 +892,7 @@ function Text({
|
|
|
669
892
|
const margin = hasMargin ? "mb-3 sm:mb-4" : "";
|
|
670
893
|
const classes = [
|
|
671
894
|
variantClasses[variant],
|
|
672
|
-
|
|
895
|
+
sizeClasses[finalSize],
|
|
673
896
|
weightClasses[weight],
|
|
674
897
|
margin,
|
|
675
898
|
align && alignClasses[align],
|
|
@@ -709,20 +932,14 @@ function PageHeader({ title, description, badge, className = "" }) {
|
|
|
709
932
|
PageHeader.displayName = "PageHeader";
|
|
710
933
|
var page_header_default = PageHeader;
|
|
711
934
|
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
|
-
};
|
|
935
|
+
const paddingClasses = sectionPadding[padding];
|
|
719
936
|
const variantClasses = {
|
|
720
937
|
default: "bg-background",
|
|
721
938
|
muted: "bg-muted/20",
|
|
722
939
|
primary: "bg-primary text-primary-foreground",
|
|
723
940
|
dark: "bg-background-dark text-foreground-dark"
|
|
724
941
|
};
|
|
725
|
-
const classes = ["w-full", paddingClasses
|
|
942
|
+
const classes = ["w-full", paddingClasses, variantClasses[variant], className].filter(Boolean).join(" ");
|
|
726
943
|
return /* @__PURE__ */ jsxRuntime.jsx("section", { id, className: classes, children });
|
|
727
944
|
}
|
|
728
945
|
Section.displayName = "Section";
|
|
@@ -747,13 +964,7 @@ function Stack({
|
|
|
747
964
|
align = "stretch",
|
|
748
965
|
justify
|
|
749
966
|
}) {
|
|
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
|
-
};
|
|
967
|
+
const spacingClasses = gapSizes[spacing];
|
|
757
968
|
const alignClasses = {
|
|
758
969
|
start: "items-start",
|
|
759
970
|
center: "items-center",
|
|
@@ -773,7 +984,7 @@ function Stack({
|
|
|
773
984
|
"div",
|
|
774
985
|
{
|
|
775
986
|
"data-component": "Stack",
|
|
776
|
-
className: `flex flex-wrap ${directionClass} ${spacingClasses
|
|
987
|
+
className: `flex flex-wrap ${directionClass} ${spacingClasses} ${alignClasses[align]} ${justifyClass} ${className}`,
|
|
777
988
|
children
|
|
778
989
|
}
|
|
779
990
|
);
|
|
@@ -969,13 +1180,7 @@ function Drawer({
|
|
|
969
1180
|
animationFrames: noAnimation ? 0 : 0
|
|
970
1181
|
});
|
|
971
1182
|
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
|
-
};
|
|
1183
|
+
const sizeClasses = overlaySizes[size];
|
|
979
1184
|
const edgeClasses = {
|
|
980
1185
|
left: "left-0 top-0 bottom-0",
|
|
981
1186
|
right: "right-0 top-0 bottom-0",
|
|
@@ -1027,7 +1232,7 @@ function Drawer({
|
|
|
1027
1232
|
tabIndex: -1,
|
|
1028
1233
|
"data-phase": phase,
|
|
1029
1234
|
"data-position": position,
|
|
1030
|
-
className: `fixed ${edgeClasses[position]} ${position === "left" || position === "right" ?
|
|
1235
|
+
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
1236
|
onKeyDown: handleKeyDown,
|
|
1032
1237
|
children: [
|
|
1033
1238
|
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 +1292,8 @@ function Card({
|
|
|
1087
1292
|
ghost: "bg-transparent",
|
|
1088
1293
|
filled: "bg-muted text-foreground"
|
|
1089
1294
|
};
|
|
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
1295
|
const widthClasses = {
|
|
1098
|
-
auto: size ?
|
|
1296
|
+
auto: size ? cardSizes[size] : "max-w-full",
|
|
1099
1297
|
full: "w-full",
|
|
1100
1298
|
fit: "w-fit"
|
|
1101
1299
|
};
|
|
@@ -1153,20 +1351,14 @@ function CardHeader({ children, className = "", bordered = true, padding = "md"
|
|
|
1153
1351
|
CardHeader.displayName = "CardHeader";
|
|
1154
1352
|
var card_header_default = CardHeader;
|
|
1155
1353
|
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
|
-
};
|
|
1354
|
+
const paddingClasses = cardPadding[padding];
|
|
1163
1355
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1164
1356
|
"div",
|
|
1165
1357
|
{
|
|
1166
1358
|
className: `
|
|
1167
1359
|
card-body
|
|
1168
1360
|
flex flex-col gap-2
|
|
1169
|
-
${paddingClasses
|
|
1361
|
+
${paddingClasses}
|
|
1170
1362
|
${className}
|
|
1171
1363
|
`.trim().replace(/\s+/g, " "),
|
|
1172
1364
|
children
|
|
@@ -1260,18 +1452,13 @@ function CardFigure({ children, className = "", aspectRatio = "auto" }) {
|
|
|
1260
1452
|
CardFigure.displayName = "CardFigure";
|
|
1261
1453
|
var card_figure_default = CardFigure;
|
|
1262
1454
|
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
|
-
};
|
|
1455
|
+
const sizeClasses = headingSizes[size];
|
|
1269
1456
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1270
1457
|
Component,
|
|
1271
1458
|
{
|
|
1272
1459
|
className: `
|
|
1273
1460
|
card-title
|
|
1274
|
-
${
|
|
1461
|
+
${sizeClasses}
|
|
1275
1462
|
${className}
|
|
1276
1463
|
`.trim().replace(/\s+/g, " "),
|
|
1277
1464
|
children
|
|
@@ -1771,13 +1958,8 @@ var Button = React4__default.default.forwardRef(
|
|
|
1771
1958
|
return `${solidVariantClasses[variantKey]} shadow-sm hover:shadow-md`;
|
|
1772
1959
|
}
|
|
1773
1960
|
};
|
|
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
|
-
};
|
|
1961
|
+
const sizeConfig = interactiveSizes[size];
|
|
1962
|
+
const sizeClasses = `${sizeConfig.height} ${sizeConfig.padding} ${sizeConfig.text}`;
|
|
1781
1963
|
const roundedClasses = {
|
|
1782
1964
|
default: "rounded-md",
|
|
1783
1965
|
pill: "rounded-full",
|
|
@@ -1806,7 +1988,7 @@ var Button = React4__default.default.forwardRef(
|
|
|
1806
1988
|
onClick,
|
|
1807
1989
|
"aria-label": ariaLabel,
|
|
1808
1990
|
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} ${
|
|
1991
|
+
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
1992
|
children: [
|
|
1811
1993
|
displayIcon && iconPosition === "left" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `inline-flex ${children ? "mr-2" : ""}`, children: displayIcon }),
|
|
1812
1994
|
children,
|
|
@@ -1830,10 +2012,11 @@ function Hero({
|
|
|
1830
2012
|
centered = true,
|
|
1831
2013
|
size = "lg"
|
|
1832
2014
|
}) {
|
|
1833
|
-
const
|
|
1834
|
-
sm:
|
|
1835
|
-
md:
|
|
2015
|
+
const sizeClasses = {
|
|
2016
|
+
sm: sectionPadding.md,
|
|
2017
|
+
md: sectionPadding.lg,
|
|
1836
2018
|
lg: "pt-32 pb-20 md:pt-36 md:pb-28"
|
|
2019
|
+
// Custom hero-specific padding
|
|
1837
2020
|
};
|
|
1838
2021
|
const titleSizes = {
|
|
1839
2022
|
sm: "text-3xl md:text-4xl",
|
|
@@ -1845,7 +2028,7 @@ function Hero({
|
|
|
1845
2028
|
solid: "bg-muted/30",
|
|
1846
2029
|
minimal: "bg-background"
|
|
1847
2030
|
};
|
|
1848
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `relative ${
|
|
2031
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `relative ${sizeClasses[size]} ${variantClasses[variant]} ${className}`, children: [
|
|
1849
2032
|
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
2033
|
/* @__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
2034
|
/* @__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 +2118,10 @@ function Link({
|
|
|
1935
2118
|
always: "underline",
|
|
1936
2119
|
none: "no-underline"
|
|
1937
2120
|
};
|
|
1938
|
-
const
|
|
1939
|
-
sm:
|
|
1940
|
-
md:
|
|
1941
|
-
lg:
|
|
2121
|
+
const sizeClasses = {
|
|
2122
|
+
sm: textSizes.sm,
|
|
2123
|
+
md: textSizes.base,
|
|
2124
|
+
lg: textSizes.lg
|
|
1942
2125
|
};
|
|
1943
2126
|
const displayClasses = {
|
|
1944
2127
|
inline: "inline",
|
|
@@ -1947,7 +2130,7 @@ function Link({
|
|
|
1947
2130
|
const linkClassName = [
|
|
1948
2131
|
variantClasses[variant],
|
|
1949
2132
|
underlineClasses[underline],
|
|
1950
|
-
|
|
2133
|
+
sizeClasses[size],
|
|
1951
2134
|
displayClasses[display],
|
|
1952
2135
|
"cursor-pointer transition-colors",
|
|
1953
2136
|
className
|
|
@@ -2724,12 +2907,7 @@ function NavDropdownItem({ to, children, className = "" }) {
|
|
|
2724
2907
|
NavDropdownItem.displayName = "NavDropdownItem";
|
|
2725
2908
|
var nav_dropdown_item_default = NavDropdownItem;
|
|
2726
2909
|
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
|
-
};
|
|
2910
|
+
const sizeConfig = avatarSizes[size];
|
|
2733
2911
|
let content;
|
|
2734
2912
|
if (src) {
|
|
2735
2913
|
content = /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt, className: "w-full h-full object-cover" });
|
|
@@ -2741,7 +2919,7 @@ function Avatar({ src, alt = "", fallback, size = "md", className = "" }) {
|
|
|
2741
2919
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2742
2920
|
"div",
|
|
2743
2921
|
{
|
|
2744
|
-
className: `inline-flex items-center justify-center rounded-full bg-muted text-muted-foreground font-medium overflow-hidden ${
|
|
2922
|
+
className: `inline-flex items-center justify-center rounded-full bg-muted text-muted-foreground font-medium overflow-hidden ${sizeConfig.classes} ${sizeConfig.text} ${className}`,
|
|
2745
2923
|
children: content
|
|
2746
2924
|
}
|
|
2747
2925
|
);
|
|
@@ -2756,15 +2934,11 @@ function Badge({ children, variant = "default", size = "md", className = "", ...
|
|
|
2756
2934
|
warning: "bg-warning/10 text-warning border border-warning/20",
|
|
2757
2935
|
error: "bg-destructive/10 text-destructive border border-destructive/20"
|
|
2758
2936
|
};
|
|
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
|
-
};
|
|
2937
|
+
const sizeClasses = badgeSizes[size].classes;
|
|
2764
2938
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2765
2939
|
"span",
|
|
2766
2940
|
{
|
|
2767
|
-
className: `inline-flex items-center font-medium rounded-full transition-colors ${variantClasses[variant]} ${
|
|
2941
|
+
className: `inline-flex items-center font-medium rounded-full transition-colors ${variantClasses[variant]} ${sizeClasses} ${className}`,
|
|
2768
2942
|
...props,
|
|
2769
2943
|
children
|
|
2770
2944
|
}
|
|
@@ -2816,26 +2990,13 @@ function StatusLabel({
|
|
|
2816
2990
|
dot: "bg-primary"
|
|
2817
2991
|
}
|
|
2818
2992
|
};
|
|
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
|
-
};
|
|
2993
|
+
const sizeClasses = statusLabelSizes[size];
|
|
2833
2994
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2834
2995
|
"span",
|
|
2835
2996
|
{
|
|
2836
|
-
className: `inline-flex items-center font-medium rounded-full border ${statusConfig[status][variant]} ${
|
|
2997
|
+
className: `inline-flex items-center font-medium rounded-full border ${statusConfig[status][variant]} ${sizeClasses.container} ${className}`,
|
|
2837
2998
|
children: [
|
|
2838
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `rounded-full ${statusConfig[status].dot} ${
|
|
2999
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `rounded-full ${statusConfig[status].dot} ${sizeClasses.dot}` }),
|
|
2839
3000
|
children
|
|
2840
3001
|
]
|
|
2841
3002
|
}
|
|
@@ -2854,11 +3015,7 @@ function Chip({
|
|
|
2854
3015
|
clickable = false,
|
|
2855
3016
|
onClick
|
|
2856
3017
|
}) {
|
|
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
|
-
};
|
|
3018
|
+
const sizeClasses = chipSizes[size].classes;
|
|
2862
3019
|
const variantClasses = {
|
|
2863
3020
|
default: "bg-muted text-muted-foreground",
|
|
2864
3021
|
primary: "bg-primary/10 text-primary",
|
|
@@ -2885,7 +3042,7 @@ function Chip({
|
|
|
2885
3042
|
className: `
|
|
2886
3043
|
inline-flex items-center justify-center
|
|
2887
3044
|
rounded-full font-medium
|
|
2888
|
-
${
|
|
3045
|
+
${sizeClasses}
|
|
2889
3046
|
${variantClasses[variant]}
|
|
2890
3047
|
${interactiveClasses}
|
|
2891
3048
|
${disabledClasses}
|
|
@@ -3922,11 +4079,7 @@ function useStaggeredTransition(count, baseDelay = 50) {
|
|
|
3922
4079
|
return Array.from({ length: count }, (_, i) => i * baseDelay);
|
|
3923
4080
|
}
|
|
3924
4081
|
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
|
-
};
|
|
4082
|
+
const sizeConfig = spinnerSizes[size];
|
|
3930
4083
|
const variantTopBorder = {
|
|
3931
4084
|
primary: "border-t-primary",
|
|
3932
4085
|
accent: "border-t-accent",
|
|
@@ -3940,7 +4093,7 @@ function Spinner({ size = "md", variant = "primary", className = "", speed, ...p
|
|
|
3940
4093
|
role: "status",
|
|
3941
4094
|
"aria-label": "Loading",
|
|
3942
4095
|
"data-variant": variant,
|
|
3943
|
-
className: `inline-block border-muted ${variantTopBorder} rounded-full animate-spin ${duration} ${
|
|
4096
|
+
className: `inline-block border-muted ${variantTopBorder} rounded-full animate-spin ${duration} ${sizeConfig.classes} ${sizeConfig.border} ${className}`,
|
|
3944
4097
|
...props,
|
|
3945
4098
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading..." })
|
|
3946
4099
|
}
|
|
@@ -4223,12 +4376,15 @@ function DatePicker({
|
|
|
4223
4376
|
setIsOpen(!isOpen);
|
|
4224
4377
|
}
|
|
4225
4378
|
};
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
}
|
|
4231
|
-
const
|
|
4379
|
+
function getBaseHeightClass(heightClasses) {
|
|
4380
|
+
const classes = heightClasses.split(" ");
|
|
4381
|
+
const base = classes.find((cls) => /^h-\d+/.test(cls));
|
|
4382
|
+
return base || classes[0] || "";
|
|
4383
|
+
}
|
|
4384
|
+
const sizeConfig = interactiveSizes[size] || interactiveSizes.md;
|
|
4385
|
+
const containerClasses = `${getBaseHeightClass(sizeConfig.height)} ${sizeConfig.padding}`;
|
|
4386
|
+
const textClasses = sizeConfig.text;
|
|
4387
|
+
const iconSize = getIconPixels(size, "desktop");
|
|
4232
4388
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: `relative w-full ${className}`, children: [
|
|
4233
4389
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4234
4390
|
"div",
|
|
@@ -4239,8 +4395,8 @@ function DatePicker({
|
|
|
4239
4395
|
bg-background text-foreground
|
|
4240
4396
|
cursor-pointer
|
|
4241
4397
|
transition-all duration-200
|
|
4242
|
-
${
|
|
4243
|
-
${
|
|
4398
|
+
${containerClasses}
|
|
4399
|
+
${textClasses}
|
|
4244
4400
|
${isOpen ? "ring-2 ring-ring ring-offset-2" : "hover:border-ring"}
|
|
4245
4401
|
${disabled ? "opacity-50 cursor-not-allowed" : ""}
|
|
4246
4402
|
`.trim(),
|
|
@@ -4261,7 +4417,7 @@ function DatePicker({
|
|
|
4261
4417
|
placeholder,
|
|
4262
4418
|
readOnly: true,
|
|
4263
4419
|
disabled,
|
|
4264
|
-
className: `flex-1 min-w-0 bg-transparent outline-none cursor-pointer placeholder:text-muted-foreground ${
|
|
4420
|
+
className: `flex-1 min-w-0 bg-transparent outline-none cursor-pointer placeholder:text-muted-foreground ${textClasses}`,
|
|
4265
4421
|
"aria-label": "Selected date"
|
|
4266
4422
|
}
|
|
4267
4423
|
),
|
|
@@ -4277,8 +4433,8 @@ function DatePicker({
|
|
|
4277
4433
|
"svg",
|
|
4278
4434
|
{
|
|
4279
4435
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4280
|
-
width:
|
|
4281
|
-
height:
|
|
4436
|
+
width: iconSize - 2,
|
|
4437
|
+
height: iconSize - 2,
|
|
4282
4438
|
viewBox: "0 0 24 24",
|
|
4283
4439
|
fill: "none",
|
|
4284
4440
|
stroke: "currentColor",
|
|
@@ -4293,7 +4449,7 @@ function DatePicker({
|
|
|
4293
4449
|
)
|
|
4294
4450
|
}
|
|
4295
4451
|
) : clearable ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 flex-shrink-0" }) : null,
|
|
4296
|
-
/* @__PURE__ */ jsxRuntime.jsx(TablerIcons.IconCalendar, { size:
|
|
4452
|
+
/* @__PURE__ */ jsxRuntime.jsx(TablerIcons.IconCalendar, { size: iconSize, className: "text-muted-foreground flex-shrink-0" })
|
|
4297
4453
|
] })
|
|
4298
4454
|
]
|
|
4299
4455
|
}
|
|
@@ -4312,11 +4468,7 @@ function DatePicker({
|
|
|
4312
4468
|
DatePicker.displayName = "DatePicker";
|
|
4313
4469
|
var date_picker_default = DatePicker;
|
|
4314
4470
|
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
|
-
};
|
|
4471
|
+
const sizeClasses = codeSizes[size];
|
|
4320
4472
|
const variantClasses = {
|
|
4321
4473
|
default: "bg-muted text-foreground",
|
|
4322
4474
|
primary: "bg-primary/10 text-primary",
|
|
@@ -4329,7 +4481,7 @@ function Code({ children, size = "md", variant = "default", className = "" }) {
|
|
|
4329
4481
|
{
|
|
4330
4482
|
className: `
|
|
4331
4483
|
inline-block font-mono rounded border border-border/50
|
|
4332
|
-
${
|
|
4484
|
+
${sizeClasses}
|
|
4333
4485
|
${variantClasses[variant]}
|
|
4334
4486
|
${className}
|
|
4335
4487
|
`.trim(),
|
|
@@ -4490,11 +4642,8 @@ function Input({
|
|
|
4490
4642
|
size = "md",
|
|
4491
4643
|
validationState = "default"
|
|
4492
4644
|
}) {
|
|
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
|
-
};
|
|
4645
|
+
const sizeConfig = interactiveSizes[size];
|
|
4646
|
+
const sizeClasses = `${sizeConfig.height} px-4 sm:px-3 ${sizeConfig.text}`;
|
|
4498
4647
|
const validationClasses = {
|
|
4499
4648
|
default: "border-input focus:border-ring",
|
|
4500
4649
|
error: "border-destructive focus:border-destructive",
|
|
@@ -4516,7 +4665,7 @@ function Input({
|
|
|
4516
4665
|
name,
|
|
4517
4666
|
required,
|
|
4518
4667
|
"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 ${
|
|
4668
|
+
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
4669
|
}
|
|
4521
4670
|
);
|
|
4522
4671
|
}
|
|
@@ -4643,12 +4792,39 @@ function MultiSelect({
|
|
|
4643
4792
|
break;
|
|
4644
4793
|
}
|
|
4645
4794
|
};
|
|
4646
|
-
const
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4795
|
+
const sizeClasses = {
|
|
4796
|
+
xs: {
|
|
4797
|
+
container: interactiveSizes.xs.height.split(" ")[0].replace("h-", "min-h-") + " py-0.5 px-1.5",
|
|
4798
|
+
text: interactiveSizes.xs.text,
|
|
4799
|
+
chip: chipSizes.sm.classes.split(" ").filter((c) => !c.includes("gap")).join(" "),
|
|
4800
|
+
icon: getIconPixels("xs", "desktop")
|
|
4801
|
+
},
|
|
4802
|
+
sm: {
|
|
4803
|
+
container: interactiveSizes.sm.height.split(" ")[0].replace("h-", "min-h-") + " py-1 px-2",
|
|
4804
|
+
text: interactiveSizes.sm.text,
|
|
4805
|
+
chip: chipSizes.sm.classes.split(" ").filter((c) => !c.includes("gap")).join(" "),
|
|
4806
|
+
icon: getIconPixels("sm", "desktop")
|
|
4807
|
+
},
|
|
4808
|
+
md: {
|
|
4809
|
+
container: interactiveSizes.md.height.split(" ")[0].replace("h-", "min-h-") + " py-2 px-3",
|
|
4810
|
+
text: interactiveSizes.md.text,
|
|
4811
|
+
chip: chipSizes.md.classes.split(" ").filter((c) => !c.includes("gap")).join(" "),
|
|
4812
|
+
icon: getIconPixels("md", "desktop")
|
|
4813
|
+
},
|
|
4814
|
+
lg: {
|
|
4815
|
+
container: interactiveSizes.lg.height.split(" ")[0].replace("h-", "min-h-") + " py-2 px-4",
|
|
4816
|
+
text: interactiveSizes.lg.text,
|
|
4817
|
+
chip: chipSizes.lg.classes.split(" ").filter((c) => !c.includes("gap")).join(" "),
|
|
4818
|
+
icon: getIconPixels("lg", "desktop")
|
|
4819
|
+
},
|
|
4820
|
+
xl: {
|
|
4821
|
+
container: interactiveSizes.xl.height.split(" ")[0].replace("h-", "min-h-") + " py-2.5 px-5",
|
|
4822
|
+
text: interactiveSizes.xl.text,
|
|
4823
|
+
chip: chipSizes.lg.classes.split(" ").filter((c) => !c.includes("gap")).join(" "),
|
|
4824
|
+
icon: getIconPixels("xl", "desktop")
|
|
4825
|
+
}
|
|
4650
4826
|
};
|
|
4651
|
-
const currentSize =
|
|
4827
|
+
const currentSize = sizeClasses[size];
|
|
4652
4828
|
const getSelectedLabels = () => {
|
|
4653
4829
|
return selectedValues.map((v) => options.find((opt) => opt.value === v)?.label).filter(Boolean);
|
|
4654
4830
|
};
|
|
@@ -4882,11 +5058,8 @@ function Select({
|
|
|
4882
5058
|
size = "md",
|
|
4883
5059
|
validationState = "default"
|
|
4884
5060
|
}) {
|
|
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
|
-
};
|
|
5061
|
+
const sizeConfig = interactiveSizes[size];
|
|
5062
|
+
const sizeClasses = `${sizeConfig.height} px-4 sm:px-3 ${sizeConfig.text} pr-10`;
|
|
4890
5063
|
const validationClasses = {
|
|
4891
5064
|
default: "border-input focus:border-ring",
|
|
4892
5065
|
error: "border-destructive focus:border-destructive",
|
|
@@ -4904,7 +5077,7 @@ function Select({
|
|
|
4904
5077
|
name,
|
|
4905
5078
|
required,
|
|
4906
5079
|
"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 ${
|
|
5080
|
+
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
5081
|
children
|
|
4909
5082
|
}
|
|
4910
5083
|
);
|
|
@@ -5211,16 +5384,38 @@ exports.TimelineItem = TimelineItem;
|
|
|
5211
5384
|
exports.Toast = toast_default;
|
|
5212
5385
|
exports.Tooltip = tooltip_default;
|
|
5213
5386
|
exports.authFetch = authFetch;
|
|
5387
|
+
exports.avatarSizes = avatarSizes;
|
|
5388
|
+
exports.badgeSizes = badgeSizes;
|
|
5389
|
+
exports.borderRadius = borderRadius;
|
|
5390
|
+
exports.cardPadding = cardPadding;
|
|
5391
|
+
exports.cardSizes = cardSizes;
|
|
5214
5392
|
exports.checkAuthStatus = checkAuthStatus;
|
|
5393
|
+
exports.chipSizes = chipSizes;
|
|
5394
|
+
exports.codeSizes = codeSizes;
|
|
5395
|
+
exports.containerMinHeights = containerMinHeights;
|
|
5396
|
+
exports.containerMinWidths = containerMinWidths;
|
|
5397
|
+
exports.containerSizes = containerSizes;
|
|
5398
|
+
exports.gapSizes = gapSizes;
|
|
5215
5399
|
exports.getCurrentUser = getCurrentUser;
|
|
5400
|
+
exports.getIconPixels = getIconPixels;
|
|
5401
|
+
exports.getVisualClasses = getVisualClasses;
|
|
5402
|
+
exports.headingSizes = headingSizes;
|
|
5403
|
+
exports.interactiveSizes = interactiveSizes;
|
|
5216
5404
|
exports.loginExternal = loginExternal;
|
|
5405
|
+
exports.logoSizes = logoSizes;
|
|
5217
5406
|
exports.logoutExternal = logoutExternal;
|
|
5218
5407
|
exports.openLoginPopup = openLoginPopup;
|
|
5408
|
+
exports.overlaySizes = overlaySizes;
|
|
5219
5409
|
exports.redirectToLogin = redirectToLogin;
|
|
5410
|
+
exports.sectionPadding = sectionPadding;
|
|
5411
|
+
exports.spinnerSizes = spinnerSizes;
|
|
5412
|
+
exports.statusLabelSizes = statusLabelSizes;
|
|
5413
|
+
exports.textSizes = textSizes;
|
|
5220
5414
|
exports.useAuth = useAuth;
|
|
5221
5415
|
exports.useScrollReset = useScrollReset_default;
|
|
5222
5416
|
exports.useStaggeredTransition = useStaggeredTransition;
|
|
5223
5417
|
exports.useTable = use_table_default;
|
|
5224
5418
|
exports.useTheme = useTheme;
|
|
5419
|
+
exports.visualSizes = visualSizes;
|
|
5225
5420
|
//# sourceMappingURL=index.cjs.map
|
|
5226
5421
|
//# sourceMappingURL=index.cjs.map
|