@the12company/ui 0.1.3 → 0.1.6

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.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import { clsx } from 'clsx';
2
2
  import { twMerge } from 'tailwind-merge';
3
3
  import * as React11 from 'react';
4
+ import { useRef, useEffect } from 'react';
4
5
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
5
- import { ChevronDown, X, PanelLeft, ArrowLeft, ArrowRight, Check, Search, ChevronRight, Circle, Dot, ChevronUp, MoreHorizontal, ChevronLeft, GripVertical, ChevronsUpDown, Loader2, CircleX } from 'lucide-react';
6
+ import { ChevronDown, X, PanelLeft, Mail, Lock, EyeOff, Eye, ArrowLeft, ArrowRight, Check, Search, ChevronRight, Circle, Dot, ChevronUp, AlertCircle, CheckCircle2, MoreHorizontal, ChevronLeft, GripVertical, ChevronsUpDown, Loader2, CircleX } from 'lucide-react';
6
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
8
  import { cva } from 'class-variance-authority';
8
9
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
@@ -11,6 +12,7 @@ import * as SeparatorPrimitive from '@radix-ui/react-separator';
11
12
  import * as SheetPrimitive from '@radix-ui/react-dialog';
12
13
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
13
14
  import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
15
+ import { Renderer, Triangle, Program, Mesh, Color } from 'ogl';
14
16
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
15
17
  import { DayPicker } from 'react-day-picker';
16
18
  import useEmblaCarousel from 'embla-carousel-react';
@@ -1288,6 +1290,466 @@ function AppChromeSidebar({
1288
1290
  );
1289
1291
  }
1290
1292
  var AspectRatio = AspectRatioPrimitive.Root;
1293
+ var VERT = `#version 300 es
1294
+ in vec2 position;
1295
+ void main() {
1296
+ gl_Position = vec4(position, 0.0, 1.0);
1297
+ }
1298
+ `;
1299
+ var FRAG = `#version 300 es
1300
+ precision highp float;
1301
+
1302
+ uniform float uTime;
1303
+ uniform float uAmplitude;
1304
+ uniform vec3 uColorStops[3];
1305
+ uniform vec2 uResolution;
1306
+ uniform float uBlend;
1307
+
1308
+ out vec4 fragColor;
1309
+
1310
+ vec3 permute(vec3 x) {
1311
+ return mod(((x * 34.0) + 1.0) * x, 289.0);
1312
+ }
1313
+
1314
+ float snoise(vec2 v){
1315
+ const vec4 C = vec4(
1316
+ 0.211324865405187, 0.366025403784439,
1317
+ -0.577350269189626, 0.024390243902439
1318
+ );
1319
+ vec2 i = floor(v + dot(v, C.yy));
1320
+ vec2 x0 = v - i + dot(i, C.xx);
1321
+ vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);
1322
+ vec4 x12 = x0.xyxy + C.xxzz;
1323
+ x12.xy -= i1;
1324
+ i = mod(i, 289.0);
1325
+
1326
+ vec3 p = permute(
1327
+ permute(i.y + vec3(0.0, i1.y, 1.0))
1328
+ + i.x + vec3(0.0, i1.x, 1.0)
1329
+ );
1330
+
1331
+ vec3 m = max(
1332
+ 0.5 - vec3(
1333
+ dot(x0, x0),
1334
+ dot(x12.xy, x12.xy),
1335
+ dot(x12.zw, x12.zw)
1336
+ ),
1337
+ 0.0
1338
+ );
1339
+ m = m * m;
1340
+ m = m * m;
1341
+
1342
+ vec3 x = 2.0 * fract(p * C.www) - 1.0;
1343
+ vec3 h = abs(x) - 0.5;
1344
+ vec3 ox = floor(x + 0.5);
1345
+ vec3 a0 = x - ox;
1346
+ m *= 1.79284291400159 - 0.85373472095314 * (a0*a0 + h*h);
1347
+
1348
+ vec3 g;
1349
+ g.x = a0.x * x0.x + h.x * x0.y;
1350
+ g.yz = a0.yz * x12.xz + h.yz * x12.yw;
1351
+ return 130.0 * dot(m, g);
1352
+ }
1353
+
1354
+ struct ColorStop {
1355
+ vec3 color;
1356
+ float position;
1357
+ };
1358
+
1359
+ #define COLOR_RAMP(colors, factor, finalColor) { int index = 0; for (int i = 0; i < 2; i++) { ColorStop currentColor = colors[i]; bool isInBetween = currentColor.position <= factor; index = int(mix(float(index), float(i), float(isInBetween))); } ColorStop currentColor = colors[index]; ColorStop nextColor = colors[index + 1]; float range = nextColor.position - currentColor.position; float lerpFactor = (factor - currentColor.position) / range; finalColor = mix(currentColor.color, nextColor.color, lerpFactor); }
1360
+
1361
+ void main() {
1362
+ vec2 uv = gl_FragCoord.xy / uResolution;
1363
+
1364
+ ColorStop colors[3];
1365
+ colors[0] = ColorStop(uColorStops[0], 0.0);
1366
+ colors[1] = ColorStop(uColorStops[1], 0.5);
1367
+ colors[2] = ColorStop(uColorStops[2], 1.0);
1368
+
1369
+ vec3 rampColor;
1370
+ COLOR_RAMP(colors, uv.x, rampColor);
1371
+
1372
+ float height = snoise(vec2(uv.x * 2.0 + uTime * 0.1, uTime * 0.25)) * 0.5 * uAmplitude;
1373
+ height = exp(height);
1374
+ height = (uv.y * 2.0 - height + 0.2);
1375
+ float intensity = 0.6 * height;
1376
+
1377
+ float midPoint = 0.20;
1378
+ float auroraAlpha = smoothstep(midPoint - uBlend * 0.5, midPoint + uBlend * 0.5, intensity);
1379
+ /* Steeper alpha at the toe: fewer pixels sit at \u201Cmedium \u03B1 + dark RGB\u201D, which composites
1380
+ to muddy gray on light backgrounds (premultiplied over white). */
1381
+ auroraAlpha = pow(clamp(auroraAlpha, 0.0, 1.0), 1.5);
1382
+ /* Lift low intensities slightly so color doesn\u2019t collapse toward black before the fade. */
1383
+ float tone = pow(clamp(intensity, 0.0, 1.25), 0.2);
1384
+ vec3 auroraColor = tone * rampColor;
1385
+
1386
+ fragColor = vec4(auroraColor * auroraAlpha, auroraAlpha);
1387
+ }
1388
+ `;
1389
+ var DEFAULT_STOPS = [
1390
+ "#5227FF",
1391
+ "#7cff67",
1392
+ "#5227FF"
1393
+ ];
1394
+ function stopsToRgbTriples(hexes) {
1395
+ const padded = [...hexes];
1396
+ while (padded.length < 3) {
1397
+ padded.push(padded[padded.length - 1] ?? DEFAULT_STOPS[0]);
1398
+ }
1399
+ const three = padded.slice(0, 3);
1400
+ return three.map((hex) => {
1401
+ const c = new Color(hex);
1402
+ return [c.r, c.g, c.b];
1403
+ });
1404
+ }
1405
+ function Aurora(props) {
1406
+ const { colorStops = DEFAULT_STOPS, amplitude = 1, blend = 0.5 } = props;
1407
+ const propsRef = useRef(props);
1408
+ propsRef.current = props;
1409
+ const ctnDom = useRef(null);
1410
+ useEffect(() => {
1411
+ const ctn = ctnDom.current;
1412
+ if (!ctn) return;
1413
+ let renderer;
1414
+ let resize;
1415
+ let animateId = 0;
1416
+ let canvas;
1417
+ const cleanup = () => {
1418
+ if (animateId) {
1419
+ cancelAnimationFrame(animateId);
1420
+ }
1421
+ if (resize) {
1422
+ window.removeEventListener("resize", resize);
1423
+ }
1424
+ if (canvas?.parentNode === ctn) {
1425
+ ctn.removeChild(canvas);
1426
+ }
1427
+ renderer?.gl.getExtension("WEBGL_lose_context")?.loseContext();
1428
+ };
1429
+ try {
1430
+ renderer = new Renderer({
1431
+ alpha: true,
1432
+ premultipliedAlpha: true,
1433
+ antialias: true
1434
+ });
1435
+ const gl = renderer.gl;
1436
+ canvas = gl.canvas;
1437
+ gl.clearColor(0, 0, 0, 0);
1438
+ gl.enable(gl.BLEND);
1439
+ gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
1440
+ gl.canvas.style.backgroundColor = "transparent";
1441
+ const geometry = new Triangle(gl);
1442
+ if (geometry.attributes.uv) {
1443
+ delete geometry.attributes.uv;
1444
+ }
1445
+ const initialStops = propsRef.current.colorStops ?? colorStops;
1446
+ const colorStopsArray = stopsToRgbTriples(
1447
+ Array.isArray(initialStops) ? [...initialStops] : [...DEFAULT_STOPS]
1448
+ );
1449
+ const program = new Program(gl, {
1450
+ vertex: VERT,
1451
+ fragment: FRAG,
1452
+ uniforms: {
1453
+ uTime: { value: 0 },
1454
+ uAmplitude: { value: amplitude },
1455
+ uColorStops: { value: colorStopsArray },
1456
+ uResolution: { value: [ctn.offsetWidth, ctn.offsetHeight] },
1457
+ uBlend: { value: blend }
1458
+ }
1459
+ });
1460
+ resize = () => {
1461
+ if (!renderer) return;
1462
+ const width = ctn.offsetWidth;
1463
+ const height = ctn.offsetHeight;
1464
+ renderer.setSize(width, height);
1465
+ program.uniforms.uResolution.value = [width, height];
1466
+ };
1467
+ window.addEventListener("resize", resize);
1468
+ const mesh = new Mesh(gl, { geometry, program });
1469
+ ctn.appendChild(gl.canvas);
1470
+ const update = (t) => {
1471
+ animateId = requestAnimationFrame(update);
1472
+ const p = propsRef.current;
1473
+ const { time = t * 0.01, speed = 1 } = p;
1474
+ program.uniforms.uTime.value = time * speed * 0.1;
1475
+ program.uniforms.uAmplitude.value = p.amplitude ?? 1;
1476
+ program.uniforms.uBlend.value = p.blend ?? 0.5;
1477
+ const stops = p.colorStops ?? DEFAULT_STOPS;
1478
+ program.uniforms.uColorStops.value = stopsToRgbTriples(
1479
+ Array.isArray(stops) ? [...stops] : [...DEFAULT_STOPS]
1480
+ );
1481
+ renderer?.render({ scene: mesh });
1482
+ };
1483
+ animateId = requestAnimationFrame(update);
1484
+ resize();
1485
+ } catch {
1486
+ cleanup();
1487
+ return;
1488
+ }
1489
+ return cleanup;
1490
+ }, []);
1491
+ return /* @__PURE__ */ jsx("div", { ref: ctnDom, className: "h-full w-full" });
1492
+ }
1493
+ var authBannerVariants = cva(
1494
+ "flex items-center gap-3 rounded-lg border px-4 py-3 text-sm",
1495
+ {
1496
+ variants: {
1497
+ variant: {
1498
+ success: "border-primary/25 bg-primary/15 text-foreground dark:bg-primary/10",
1499
+ destructive: "border-destructive/25 bg-destructive/10 text-destructive dark:bg-destructive/5"
1500
+ }
1501
+ },
1502
+ defaultVariants: {
1503
+ variant: "success"
1504
+ }
1505
+ }
1506
+ );
1507
+ var AuthBanner = React11.forwardRef(
1508
+ ({ className, variant = "success", icon, children, ...props }, ref) => {
1509
+ const defaultIcon = variant === "destructive" ? /* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4 shrink-0", "aria-hidden": true }) : /* @__PURE__ */ jsx(
1510
+ CheckCircle2,
1511
+ {
1512
+ className: "shrink-0 text-primary",
1513
+ "aria-hidden": true,
1514
+ size: 18
1515
+ }
1516
+ );
1517
+ return /* @__PURE__ */ jsxs(
1518
+ "div",
1519
+ {
1520
+ ref,
1521
+ role: variant === "destructive" ? "alert" : "status",
1522
+ className: cn(authBannerVariants({ variant }), className),
1523
+ ...props,
1524
+ children: [
1525
+ icon ?? defaultIcon,
1526
+ /* @__PURE__ */ jsx(
1527
+ "div",
1528
+ {
1529
+ className: cn(
1530
+ "leading-relaxed",
1531
+ variant === "success" && "text-foreground opacity-80"
1532
+ ),
1533
+ children
1534
+ }
1535
+ )
1536
+ ]
1537
+ }
1538
+ );
1539
+ }
1540
+ );
1541
+ AuthBanner.displayName = "AuthBanner";
1542
+ var AuthBrand = React11.forwardRef(
1543
+ ({ className, logo, title, description, shadow = true, ...props }, ref) => {
1544
+ return /* @__PURE__ */ jsxs(
1545
+ "header",
1546
+ {
1547
+ ref,
1548
+ className: cn(
1549
+ "mb-8 flex flex-col items-center text-center sm:mb-10",
1550
+ className
1551
+ ),
1552
+ ...props,
1553
+ children: [
1554
+ /* @__PURE__ */ jsx(
1555
+ "div",
1556
+ {
1557
+ className: cn(
1558
+ "mb-5 flex h-16 w-16 items-center justify-center rounded-2xl shadow-lg shadow-primary/30 ring-4 ring-primary/10 transition-all duration-500 hover:-translate-y-0.5",
1559
+ shadow && "shadow-lg shadow-primary/30 ring-4 ring-primary/10 hover:shadow-xl hover:shadow-primary/30"
1560
+ ),
1561
+ children: logo
1562
+ }
1563
+ ),
1564
+ /* @__PURE__ */ jsx("h1", { className: "text-balance text-2xl font-bold tracking-tight text-foreground sm:text-[1.75rem]", children: title }),
1565
+ description ? /* @__PURE__ */ jsx("p", { className: "mt-1 max-w-sm text-pretty text-sm font-normal leading-relaxed text-foreground opacity-80", children: description }) : null
1566
+ ]
1567
+ }
1568
+ );
1569
+ }
1570
+ );
1571
+ AuthBrand.displayName = "AuthBrand";
1572
+ var AuthCard = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1573
+ "div",
1574
+ {
1575
+ ref,
1576
+ className: cn(
1577
+ "rounded-2xl bg-content-glass p-7 shadow-xl shadow-black/[0.06] backdrop-blur-md dark:shadow-black/25 sm:p-8",
1578
+ className
1579
+ ),
1580
+ ...props
1581
+ }
1582
+ ));
1583
+ AuthCard.displayName = "AuthCard";
1584
+ var AuthCardHeader = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-6", className), ...props }));
1585
+ AuthCardHeader.displayName = "AuthCardHeader";
1586
+ var AuthCardTitle = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1587
+ "h2",
1588
+ {
1589
+ ref,
1590
+ className: cn(
1591
+ "text-lg font-semibold tracking-tight text-foreground",
1592
+ className
1593
+ ),
1594
+ ...props
1595
+ }
1596
+ ));
1597
+ AuthCardTitle.displayName = "AuthCardTitle";
1598
+ var AuthCardDescription = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1599
+ "p",
1600
+ {
1601
+ ref,
1602
+ className: cn("mt-0 text-sm text-muted-foreground", className),
1603
+ ...props
1604
+ }
1605
+ ));
1606
+ AuthCardDescription.displayName = "AuthCardDescription";
1607
+ var AuthFieldError = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1608
+ "p",
1609
+ {
1610
+ ref,
1611
+ className: cn("mt-2 text-xs text-destructive/80", className),
1612
+ ...props
1613
+ }
1614
+ ));
1615
+ AuthFieldError.displayName = "AuthFieldError";
1616
+ var AuthFooter = React11.forwardRef(
1617
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1618
+ "p",
1619
+ {
1620
+ ref,
1621
+ className: cn(
1622
+ "mx-auto mt-6 max-w-sm text-center text-sm text-muted-foreground",
1623
+ className
1624
+ ),
1625
+ ...props
1626
+ }
1627
+ )
1628
+ );
1629
+ AuthFooter.displayName = "AuthFooter";
1630
+ var AuthFooterLink = React11.forwardRef(
1631
+ ({ className, asChild = false, ...props }, ref) => {
1632
+ const Comp = asChild ? Slot : "a";
1633
+ return /* @__PURE__ */ jsx(
1634
+ Comp,
1635
+ {
1636
+ ref,
1637
+ className: cn("font-medium text-primary hover-underline", className),
1638
+ ...props
1639
+ }
1640
+ );
1641
+ }
1642
+ );
1643
+ AuthFooterLink.displayName = "AuthFooterLink";
1644
+ var AuthShell = React11.forwardRef(
1645
+ ({ className, background, backgroundClassName, children, ...props }, ref) => {
1646
+ return /* @__PURE__ */ jsxs(
1647
+ "div",
1648
+ {
1649
+ ref,
1650
+ className: cn(
1651
+ "relative flex min-h-screen flex-col items-center justify-center overflow-hidden px-4 py-10 sm:py-14",
1652
+ className
1653
+ ),
1654
+ ...props,
1655
+ children: [
1656
+ background ? /* @__PURE__ */ jsx(
1657
+ "div",
1658
+ {
1659
+ className: cn(
1660
+ "pointer-events-none absolute inset-0 z-0 min-h-full opacity-80 dark:opacity-40",
1661
+ backgroundClassName
1662
+ ),
1663
+ "aria-hidden": true,
1664
+ children: background
1665
+ }
1666
+ ) : null,
1667
+ /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 z-[1]", "aria-hidden": true }),
1668
+ /* @__PURE__ */ jsx("div", { className: "relative z-10 w-full max-w-[440px]", children })
1669
+ ]
1670
+ }
1671
+ );
1672
+ }
1673
+ );
1674
+ AuthShell.displayName = "AuthShell";
1675
+ var EmailInput = React11.forwardRef(
1676
+ ({
1677
+ className,
1678
+ variant = "outline",
1679
+ autoComplete = "email",
1680
+ placeholder = "Insira seu e-mail",
1681
+ ...props
1682
+ }, ref) => {
1683
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1684
+ /* @__PURE__ */ jsx(
1685
+ Mail,
1686
+ {
1687
+ className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground/70",
1688
+ "aria-hidden": true
1689
+ }
1690
+ ),
1691
+ /* @__PURE__ */ jsx(
1692
+ Input,
1693
+ {
1694
+ ref,
1695
+ type: "email",
1696
+ variant,
1697
+ autoComplete,
1698
+ placeholder,
1699
+ className: cn("h-11 pl-10 text-[15px]", className),
1700
+ ...props
1701
+ }
1702
+ )
1703
+ ] });
1704
+ }
1705
+ );
1706
+ EmailInput.displayName = "EmailInput";
1707
+ var toggleIconClass = "text-muted-foreground/70 hover:text-muted-foreground/90 hover:scale-[1.05] transition-all duration-300";
1708
+ var PasswordInput = React11.forwardRef(
1709
+ ({
1710
+ className,
1711
+ variant = "outline",
1712
+ autoComplete = "current-password",
1713
+ placeholder = "Insira sua senha",
1714
+ defaultVisible = false,
1715
+ ...props
1716
+ }, ref) => {
1717
+ const [visible, setVisible] = React11.useState(defaultVisible);
1718
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1719
+ /* @__PURE__ */ jsx(
1720
+ Lock,
1721
+ {
1722
+ className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground/70",
1723
+ "aria-hidden": true
1724
+ }
1725
+ ),
1726
+ /* @__PURE__ */ jsx(
1727
+ Input,
1728
+ {
1729
+ ref,
1730
+ type: visible ? "text" : "password",
1731
+ variant,
1732
+ autoComplete,
1733
+ placeholder,
1734
+ className: cn("h-11 px-10 text-[15px]", className),
1735
+ ...props
1736
+ }
1737
+ ),
1738
+ /* @__PURE__ */ jsx(
1739
+ "button",
1740
+ {
1741
+ type: "button",
1742
+ tabIndex: -1,
1743
+ className: "absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer",
1744
+ "aria-label": visible ? "Ocultar senha" : "Mostrar senha",
1745
+ onClick: () => setVisible((v) => !v),
1746
+ children: visible ? /* @__PURE__ */ jsx(EyeOff, { className: toggleIconClass, "aria-hidden": true, size: 18 }) : /* @__PURE__ */ jsx(Eye, { className: toggleIconClass, "aria-hidden": true, size: 18 })
1747
+ }
1748
+ )
1749
+ ] });
1750
+ }
1751
+ );
1752
+ PasswordInput.displayName = "PasswordInput";
1291
1753
  var Avatar = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1292
1754
  AvatarPrimitive.Root,
1293
1755
  {
@@ -2340,36 +2802,55 @@ var Drawer = ({
2340
2802
  }
2341
2803
  );
2342
2804
  Drawer.displayName = "Drawer";
2343
- var DrawerTrigger = Drawer$1.Trigger;
2344
- var DrawerPortal = Drawer$1.Portal;
2345
- var DrawerClose = Drawer$1.Close;
2346
- var DrawerOverlay = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2347
- Drawer$1.Overlay,
2348
- {
2349
- ref,
2350
- className: cn("fixed inset-0 z-50 bg-black/80", className),
2351
- ...props
2352
- }
2353
- ));
2354
- DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
2355
- var DrawerContent = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
2356
- /* @__PURE__ */ jsx(DrawerOverlay, {}),
2357
- /* @__PURE__ */ jsxs(
2358
- Drawer$1.Content,
2805
+ function DrawerTrigger({
2806
+ ...props
2807
+ }) {
2808
+ return /* @__PURE__ */ jsx(Drawer$1.Trigger, { ...props });
2809
+ }
2810
+ DrawerTrigger.displayName = "DrawerTrigger";
2811
+ function DrawerPortal({
2812
+ ...props
2813
+ }) {
2814
+ return /* @__PURE__ */ jsx(Drawer$1.Portal, { ...props });
2815
+ }
2816
+ DrawerPortal.displayName = "DrawerPortal";
2817
+ function DrawerClose({
2818
+ ...props
2819
+ }) {
2820
+ return /* @__PURE__ */ jsx(Drawer$1.Close, { ...props });
2821
+ }
2822
+ DrawerClose.displayName = "DrawerClose";
2823
+ var DrawerOverlay = React11.forwardRef(
2824
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2825
+ Drawer$1.Overlay,
2359
2826
  {
2360
2827
  ref,
2361
- className: cn(
2362
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
2363
- className
2364
- ),
2365
- ...props,
2366
- children: [
2367
- /* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2368
- children
2369
- ]
2828
+ className: cn("fixed inset-0 z-50 bg-black/80", className),
2829
+ ...props
2370
2830
  }
2371
2831
  )
2372
- ] }));
2832
+ );
2833
+ DrawerOverlay.displayName = "DrawerOverlay";
2834
+ var DrawerContent = React11.forwardRef(
2835
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
2836
+ /* @__PURE__ */ jsx(DrawerOverlay, {}),
2837
+ /* @__PURE__ */ jsxs(
2838
+ Drawer$1.Content,
2839
+ {
2840
+ ref,
2841
+ className: cn(
2842
+ "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
2843
+ className
2844
+ ),
2845
+ ...props,
2846
+ children: [
2847
+ /* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2848
+ children
2849
+ ]
2850
+ }
2851
+ )
2852
+ ] })
2853
+ );
2373
2854
  DrawerContent.displayName = "DrawerContent";
2374
2855
  var DrawerHeader = ({
2375
2856
  className,
@@ -2393,18 +2874,20 @@ var DrawerFooter = ({
2393
2874
  }
2394
2875
  );
2395
2876
  DrawerFooter.displayName = "DrawerFooter";
2396
- var DrawerTitle = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2397
- Drawer$1.Title,
2398
- {
2399
- ref,
2400
- className: cn(
2401
- "text-lg font-semibold leading-none tracking-tight",
2402
- className
2403
- ),
2404
- ...props
2405
- }
2406
- ));
2407
- DrawerTitle.displayName = Drawer$1.Title.displayName;
2877
+ var DrawerTitle = React11.forwardRef(
2878
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2879
+ Drawer$1.Title,
2880
+ {
2881
+ ref,
2882
+ className: cn(
2883
+ "text-lg font-semibold leading-none tracking-tight",
2884
+ className
2885
+ ),
2886
+ ...props
2887
+ }
2888
+ )
2889
+ );
2890
+ DrawerTitle.displayName = "DrawerTitle";
2408
2891
  var DrawerDescription = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2409
2892
  Drawer$1.Description,
2410
2893
  {
@@ -2413,7 +2896,7 @@ var DrawerDescription = React11.forwardRef(({ className, ...props }, ref) => /*
2413
2896
  ...props
2414
2897
  }
2415
2898
  ));
2416
- DrawerDescription.displayName = Drawer$1.Description.displayName;
2899
+ DrawerDescription.displayName = "DrawerDescription";
2417
2900
  var Dropdown = React11.forwardRef(function Dropdown2({ open, isFiltered = false, className, ...props }, ref) {
2418
2901
  return /* @__PURE__ */ jsx(
2419
2902
  Button,
@@ -2426,6 +2909,7 @@ var Dropdown = React11.forwardRef(function Dropdown2({ open, isFiltered = false,
2426
2909
  "h-9 translate-y-0 justify-between gap-1 px-2 font-normal text-sm transition-all duration-300",
2427
2910
  "border-border/80 shadow-[0_2px_6px_hsl(var(--foreground)/0.08)] dark:shadow-[0_2px_5px_-1px_rgba(0,0,0,0.55)]",
2428
2911
  "hover:translate-y-0 hover:border-border hover:shadow-[0_4px_10px_hsl(var(--foreground)/0.12)] dark:hover:shadow-[0_3px_8px_-2px_rgba(0,0,0,0.65)]",
2912
+ "focus-visible:ring-0 focus-visible:ring-offset-0",
2429
2913
  isFiltered ? "border-primary/45 bg-primary/[0.07] font-medium shadow-sm ring-1 ring-inset ring-primary/15 hover:bg-primary/[0.07] hover:border-primary hover:text-foreground dark:shadow-[0_1px_4px_-1px_rgba(0,0,0,0.5)] dark:hover:shadow-[0_2px_6px_-2px_rgba(0,0,0,0.55)]" : "hover:bg-background hover:text-foreground hover:border-primary/55",
2430
2914
  open && (isFiltered ? "border-primary text-foreground shadow-sm ring-1 ring-inset ring-primary/15 dark:shadow-[0_2px_5px_-1px_rgba(0,0,0,0.55)]" : "border-primary/55 bg-background text-foreground shadow-md dark:shadow-[0_2px_10px_-3px_rgba(0,0,0,0.6)]"),
2431
2915
  className
@@ -2445,7 +2929,7 @@ var DropdownMenuSubTrigger = React11.forwardRef(({ className, inset, children, .
2445
2929
  {
2446
2930
  ref,
2447
2931
  className: cn(
2448
- "flex cursor-default select-none items-center rounded-md px-2 py-1.5 text-sm outline-none transition-all duration-300 data-[state=open]:bg-accent/80 focus:bg-accent/80",
2932
+ "flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-sm outline-none transition-all duration-300 data-[state=open]:bg-accent/80 focus:bg-accent/80 focus-visible:outline-none",
2449
2933
  inset && "pl-8",
2450
2934
  className
2451
2935
  ),
@@ -2462,20 +2946,24 @@ var DropdownMenuSubContent = React11.forwardRef(({ className, ...props }, ref) =
2462
2946
  {
2463
2947
  ref,
2464
2948
  className: cn(
2465
- "z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border/80 bg-popover p-1 text-popover-foreground shadow-[0_10px_30px_hsl(var(--foreground)/0.14)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2949
+ "z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border/80 bg-popover p-1 text-popover-foreground shadow-[0_10px_30px_hsl(var(--foreground)/0.14)] outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2466
2950
  className
2467
2951
  ),
2468
2952
  ...props
2469
2953
  }
2470
2954
  ));
2471
2955
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
2472
- var DropdownMenuContent = React11.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
2956
+ var DropdownMenuContent = React11.forwardRef(({ className, sideOffset = 4, onCloseAutoFocus, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
2473
2957
  DropdownMenuPrimitive.Content,
2474
2958
  {
2475
2959
  ref,
2476
2960
  sideOffset,
2961
+ onCloseAutoFocus: (event) => {
2962
+ event.preventDefault();
2963
+ onCloseAutoFocus?.(event);
2964
+ },
2477
2965
  className: cn(
2478
- "z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border/80 bg-popover p-1 text-popover-foreground shadow-[0_10px_15px_hsl(var(--foreground)/0.05)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2966
+ "z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border/80 bg-popover p-1 text-popover-foreground shadow-[0_10px_15px_hsl(var(--foreground)/0.05)] outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2479
2967
  className
2480
2968
  ),
2481
2969
  ...props
@@ -2487,7 +2975,7 @@ var DropdownMenuItem = React11.forwardRef(({ className, inset, ...props }, ref)
2487
2975
  {
2488
2976
  ref,
2489
2977
  className: cn(
2490
- "relative flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-sm outline-none transition-all duration-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent/80 focus:text-accent-foreground",
2978
+ "relative flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-sm outline-none transition-all duration-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent/80 focus:text-accent-foreground focus-visible:outline-none",
2491
2979
  inset && "pl-8",
2492
2980
  className
2493
2981
  ),
@@ -2500,7 +2988,7 @@ var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, checke
2500
2988
  {
2501
2989
  ref,
2502
2990
  className: cn(
2503
- "relative flex cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-all duration-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent/80 focus:text-accent-foreground",
2991
+ "relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-all duration-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent/80 focus:text-accent-foreground focus-visible:outline-none",
2504
2992
  className
2505
2993
  ),
2506
2994
  checked,
@@ -2517,12 +3005,12 @@ var DropdownMenuRadioItem = React11.forwardRef(({ className, children, ...props
2517
3005
  {
2518
3006
  ref,
2519
3007
  className: cn(
2520
- "relative flex cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-all duration-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent/80 focus:text-accent-foreground",
3008
+ "relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-all duration-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent/80 focus:text-accent-foreground focus-visible:outline-none",
2521
3009
  className
2522
3010
  ),
2523
3011
  ...props,
2524
3012
  children: [
2525
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
3013
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
2526
3014
  children
2527
3015
  ]
2528
3016
  }
@@ -4315,6 +4803,6 @@ var ToggleGroupItem = React11.forwardRef(({ className, children, variant, size,
4315
4803
  });
4316
4804
  ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
4317
4805
 
4318
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppChromeBrand, AppChromeHeader, AppChromeSidebar, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartCard, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Dropdown, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label3 as Label, ListingPagination, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHeader, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, Progress, RadioGroup4 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchableSelect, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Toaster as SonnerToaster, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster2 as Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buildRangeLabel, buildVisiblePages, buttonVariants, cn, inputVariants, navigationMenuTriggerStyle, toast, toggleVariants, useFormField, useIsMobile, useSidebar, useToast };
4806
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppChromeBrand, AppChromeHeader, AppChromeSidebar, AspectRatio, Aurora, AuthBanner, AuthBrand, AuthCard, AuthCardDescription, AuthCardHeader, AuthCardTitle, AuthFieldError, AuthFooter, AuthFooterLink, AuthShell, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartCard, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Dropdown, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmailInput, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label3 as Label, ListingPagination, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHeader, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Popover, PopoverContent, PopoverTrigger, Progress, RadioGroup4 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchableSelect, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Toaster as SonnerToaster, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster2 as Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, authBannerVariants, badgeVariants, buildRangeLabel, buildVisiblePages, buttonVariants, cn, inputVariants, navigationMenuTriggerStyle, toast, toggleVariants, useFormField, useIsMobile, useSidebar, useToast };
4319
4807
  //# sourceMappingURL=index.js.map
4320
4808
  //# sourceMappingURL=index.js.map