@kubetail/ui 2.1.2 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/elements/button.cjs +1 -1
  2. package/dist/elements/button.cjs.map +1 -1
  3. package/dist/elements/button.js +12 -10
  4. package/dist/elements/button.js.map +1 -1
  5. package/dist/elements/calendar.cjs +1 -1
  6. package/dist/elements/calendar.cjs.map +1 -1
  7. package/dist/elements/calendar.js +10 -8
  8. package/dist/elements/calendar.js.map +1 -1
  9. package/dist/elements/card.cjs +1 -1
  10. package/dist/elements/card.cjs.map +1 -1
  11. package/dist/elements/card.js +33 -31
  12. package/dist/elements/card.js.map +1 -1
  13. package/dist/elements/checkbox.cjs +1 -1
  14. package/dist/elements/checkbox.cjs.map +1 -1
  15. package/dist/elements/checkbox.js +12 -10
  16. package/dist/elements/checkbox.js.map +1 -1
  17. package/dist/elements/dialog.cjs +1 -1
  18. package/dist/elements/dialog.cjs.map +1 -1
  19. package/dist/elements/dialog.js +42 -40
  20. package/dist/elements/dialog.js.map +1 -1
  21. package/dist/elements/dropdown-menu.cjs +1 -1
  22. package/dist/elements/dropdown-menu.cjs.map +1 -1
  23. package/dist/elements/dropdown-menu.js +74 -72
  24. package/dist/elements/dropdown-menu.js.map +1 -1
  25. package/dist/elements/form.cjs +1 -1
  26. package/dist/elements/form.cjs.map +1 -1
  27. package/dist/elements/form.js +55 -53
  28. package/dist/elements/form.js.map +1 -1
  29. package/dist/elements/input.cjs +1 -1
  30. package/dist/elements/input.cjs.map +1 -1
  31. package/dist/elements/input.js +8 -6
  32. package/dist/elements/input.js.map +1 -1
  33. package/dist/elements/label.cjs +1 -1
  34. package/dist/elements/label.cjs.map +1 -1
  35. package/dist/elements/label.js +9 -7
  36. package/dist/elements/label.js.map +1 -1
  37. package/dist/elements/link.cjs +1 -1
  38. package/dist/elements/link.cjs.map +1 -1
  39. package/dist/elements/link.js +28 -26
  40. package/dist/elements/link.js.map +1 -1
  41. package/dist/elements/pagination.cjs +1 -1
  42. package/dist/elements/pagination.cjs.map +1 -1
  43. package/dist/elements/pagination.js +43 -41
  44. package/dist/elements/pagination.js.map +1 -1
  45. package/dist/elements/popover.cjs +1 -1
  46. package/dist/elements/popover.cjs.map +1 -1
  47. package/dist/elements/popover.js +19 -17
  48. package/dist/elements/popover.js.map +1 -1
  49. package/dist/elements/search-box.cjs +1 -1
  50. package/dist/elements/search-box.cjs.map +1 -1
  51. package/dist/elements/search-box.js +16 -14
  52. package/dist/elements/search-box.js.map +1 -1
  53. package/dist/elements/select.cjs +1 -1
  54. package/dist/elements/select.cjs.map +1 -1
  55. package/dist/elements/select.js +58 -56
  56. package/dist/elements/select.js.map +1 -1
  57. package/dist/elements/separator.cjs +1 -1
  58. package/dist/elements/separator.cjs.map +1 -1
  59. package/dist/elements/separator.js +9 -7
  60. package/dist/elements/separator.js.map +1 -1
  61. package/dist/elements/sheet.cjs +1 -1
  62. package/dist/elements/sheet.cjs.map +1 -1
  63. package/dist/elements/sheet.js +41 -39
  64. package/dist/elements/sheet.js.map +1 -1
  65. package/dist/elements/sidebar.cjs +1 -1
  66. package/dist/elements/sidebar.cjs.map +1 -1
  67. package/dist/elements/sidebar.js +196 -194
  68. package/dist/elements/sidebar.js.map +1 -1
  69. package/dist/elements/skeleton.cjs +1 -1
  70. package/dist/elements/skeleton.cjs.map +1 -1
  71. package/dist/elements/skeleton.js +8 -6
  72. package/dist/elements/skeleton.js.map +1 -1
  73. package/dist/elements/spinner.cjs +1 -1
  74. package/dist/elements/spinner.cjs.map +1 -1
  75. package/dist/elements/spinner.js +12 -11
  76. package/dist/elements/spinner.js.map +1 -1
  77. package/dist/elements/switch.cjs +2 -0
  78. package/dist/elements/switch.cjs.map +1 -0
  79. package/dist/elements/switch.d.ts +5 -0
  80. package/dist/elements/switch.js +21 -0
  81. package/dist/elements/switch.js.map +1 -0
  82. package/dist/elements/switch.stories.d.ts +15 -0
  83. package/dist/elements/switch.test.d.ts +0 -0
  84. package/dist/elements/table.cjs +1 -1
  85. package/dist/elements/table.cjs.map +1 -1
  86. package/dist/elements/table.js +39 -37
  87. package/dist/elements/table.js.map +1 -1
  88. package/dist/elements/tabs.cjs +1 -1
  89. package/dist/elements/tabs.cjs.map +1 -1
  90. package/dist/elements/tabs.js +22 -20
  91. package/dist/elements/tabs.js.map +1 -1
  92. package/dist/elements/toggle.cjs +2 -0
  93. package/dist/elements/toggle.cjs.map +1 -0
  94. package/dist/elements/toggle.d.ts +8 -0
  95. package/dist/elements/toggle.js +38 -0
  96. package/dist/elements/toggle.js.map +1 -0
  97. package/dist/elements/toggle.stories.d.ts +15 -0
  98. package/dist/elements/toggle.test.d.ts +0 -0
  99. package/dist/elements/tooltip.cjs +1 -1
  100. package/dist/elements/tooltip.cjs.map +1 -1
  101. package/dist/elements/tooltip.js +16 -14
  102. package/dist/elements/tooltip.js.map +1 -1
  103. package/dist/hooks/use-mobile.cjs +1 -1
  104. package/dist/hooks/use-mobile.cjs.map +1 -1
  105. package/dist/hooks/use-mobile.js +11 -9
  106. package/dist/hooks/use-mobile.js.map +1 -1
  107. package/dist/lib/utils.cjs +1 -1
  108. package/dist/lib/utils.cjs.map +1 -1
  109. package/dist/lib/utils.js +7 -5
  110. package/dist/lib/utils.js.map +1 -1
  111. package/package.json +40 -29
  112. /package/dist/_virtual/{rolldown:runtime.cjs → _rolldown/runtime.cjs} +0 -0
@@ -1,13 +1,15 @@
1
- import { cn } from "../lib/utils.js";
2
- import { jsx } from "react/jsx-runtime";
3
- function Input({ className: n, type: r, ...i }) {
4
- return /* @__PURE__ */ jsx("input", {
1
+ import { cn as e } from "../lib/utils.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region src/elements/input.tsx
4
+ function n({ className: n, type: r, ...i }) {
5
+ return /* @__PURE__ */ t("input", {
5
6
  type: r,
6
7
  "data-slot": "input",
7
- className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", n),
8
+ className: e("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", n),
8
9
  ...i
9
10
  });
10
11
  }
11
- export { Input };
12
+ //#endregion
13
+ export { n as Input };
12
14
 
13
15
  //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","names":[],"sources":["../../src/elements/input.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"mappings":";;AAEA,SAAS,MAAM,EAAE,cAAW,SAAM,GAAG,KAAwC;AAC3E,QACE,oBAAC,SAAA;EACO;EACN,aAAU;EACV,WAAW,GACT,mcACA,iFACA,0GACA,EACD;EACD,GAAI;GACJ"}
1
+ {"version":3,"file":"input.js","names":[],"sources":["../../src/elements/input.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"mappings":";;;AAEA,SAAS,EAAM,EAAE,cAAW,SAAM,GAAG,KAAwC;AAC3E,QACE,kBAAC,SAAD;EACQ;EACN,aAAU;EACV,WAAW,EACT,mcACA,iFACA,0GACA,EACD;EACD,GAAI;EACJ,CAAA"}
@@ -1,2 +1,2 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-label`);r=e.__toESM(r);function i({className:e,...i}){return(0,n.jsx)(r.Root,{"data-slot":`label`,className:t.cn(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...i})}exports.Label=i;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-label`);r=e.__toESM(r);function i({className:e,...i}){return(0,n.jsx)(r.Root,{"data-slot":`label`,className:t.cn(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...i})}exports.Label=i;
2
2
  //# sourceMappingURL=label.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.cjs","names":[],"sources":["../../src/elements/label.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"mappings":"uPAMA,SAAS,EAAM,CAAE,YAAW,GAAG,GAA2D,CACxF,OACE,EAAA,EAAA,KAAC,EAAe,KAAA,CACd,YAAU,QACV,UAAW,EAAA,GACT,sNACA,EACD,CACD,GAAI,GACJ"}
1
+ {"version":3,"file":"label.cjs","names":[],"sources":["../../src/elements/label.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"mappings":"wPAMA,SAAS,EAAM,CAAE,YAAW,GAAG,GAA2D,CACxF,OAAA,EAAA,EAAA,KACG,EAAe,KAAhB,CACE,YAAU,QACV,UAAW,EAAA,GACT,sNACA,EACD,CACD,GAAI,EACJ,CAAA"}
@@ -1,14 +1,16 @@
1
1
  "use client";
2
- import { cn } from "../lib/utils.js";
3
- import { jsx } from "react/jsx-runtime";
4
- import * as LabelPrimitive from "@radix-ui/react-label";
5
- function Label({ className: r, ...i }) {
6
- return /* @__PURE__ */ jsx(LabelPrimitive.Root, {
2
+ import { cn as e } from "../lib/utils.js";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ import * as n from "@radix-ui/react-label";
5
+ //#region src/elements/label.tsx
6
+ function r({ className: r, ...i }) {
7
+ return /* @__PURE__ */ t(n.Root, {
7
8
  "data-slot": "label",
8
- className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", r),
9
+ className: e("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", r),
9
10
  ...i
10
11
  });
11
12
  }
12
- export { Label };
13
+ //#endregion
14
+ export { r as Label };
13
15
 
14
16
  //# sourceMappingURL=label.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.js","names":[],"sources":["../../src/elements/label.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"mappings":";;;;AAMA,SAAS,MAAM,EAAE,cAAW,GAAG,KAA2D;AACxF,QACE,oBAAC,eAAe,MAAA;EACd,aAAU;EACV,WAAW,GACT,uNACA,EACD;EACD,GAAI;GACJ"}
1
+ {"version":3,"file":"label.js","names":[],"sources":["../../src/elements/label.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"mappings":";;;;;AAMA,SAAS,EAAM,EAAE,cAAW,GAAG,KAA2D;AACxF,QACE,kBAAC,EAAe,MAAhB;EACE,aAAU;EACV,WAAW,EACT,uNACA,EACD;EACD,GAAI;EACJ,CAAA"}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-slot`),i=require(`class-variance-authority`);var a=(0,i.cva)(`inline-flex items-center gap-1 text-primary underline-offset-4 hover:underline transition-colors outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] rounded-sm cursor-pointer`,{variants:{variant:{default:``,external:``}},defaultVariants:{variant:`default`}}),o=null;function s(e){o=e}function c(){return o}function l({className:e,variant:i,asChild:o=!1,...s}){return(0,n.jsx)(o?r.Slot:`a`,{"data-slot":`link`,className:t.cn(a({variant:i,className:e})),...i===`external`&&!o?{target:`_blank`,rel:`noopener noreferrer`}:{},...s})}function u({className:e,variant:r,...i}){let s=o||`a`;return(0,n.jsx)(s,{"data-slot":`link`,className:t.cn(a({variant:r,className:e})),...r===`external`&&s===`a`?{target:`_blank`,rel:`noopener noreferrer`}:{},...i})}exports.Link=l,exports.RouterLink=u,exports.getLinkComponent=c,exports.linkStyles=a,exports.setLinkComponent=s;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../lib/utils.cjs`);let t=require(`react/jsx-runtime`),n=require(`class-variance-authority`),r=require(`@radix-ui/react-slot`);var i=(0,n.cva)(`inline-flex items-center gap-1 text-primary underline-offset-4 hover:underline transition-colors outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] rounded-sm cursor-pointer`,{variants:{variant:{default:``,external:``}},defaultVariants:{variant:`default`}}),a=null;function o(e){a=e}function s(){return a}function c({className:n,variant:a,asChild:o=!1,...s}){return(0,t.jsx)(o?r.Slot:`a`,{"data-slot":`link`,className:e.cn(i({variant:a,className:n})),...a===`external`&&!o?{target:`_blank`,rel:`noopener noreferrer`}:{},...s})}function l({className:n,variant:r,...o}){let s=a||`a`;return(0,t.jsx)(s,{"data-slot":`link`,className:e.cn(i({variant:r,className:n})),...r===`external`&&s===`a`?{target:`_blank`,rel:`noopener noreferrer`}:{},...o})}exports.Link=c,exports.RouterLink=l,exports.getLinkComponent=s,exports.linkStyles=i,exports.setLinkComponent=o;
2
2
  //# sourceMappingURL=link.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"link.cjs","names":["configuredLinkComponent: LinkComponent | null"],"sources":["../../src/elements/link.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst linkStyles = cva(\n 'inline-flex items-center gap-1 text-primary underline-offset-4 hover:underline transition-colors outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] rounded-sm cursor-pointer',\n {\n variants: {\n variant: {\n default: '',\n external: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport type LinkVariantProps = VariantProps<typeof linkStyles>;\n\ntype LinkComponent = React.ElementType;\n\nlet configuredLinkComponent: LinkComponent | null = null;\n\n/**\n * Set a custom component to be used by `RouterLink` (e.g. your router's Link component).\n *\n * @example\n * import { setLinkComponent } from '@kubetail/ui/elements/link';\n * import { Link } from 'react-router-dom';\n * setLinkComponent(Link);\n */\nfunction setLinkComponent(component: LinkComponent) {\n configuredLinkComponent = component;\n}\n\n/**\n * Get the currently configured link component.\n */\nfunction getLinkComponent(): LinkComponent | null {\n return configuredLinkComponent;\n}\n\ntype LinkProps = React.ComponentProps<'a'> &\n LinkVariantProps & {\n asChild?: boolean;\n };\n\n/**\n * `Link` renders a styled anchor element.\n *\n * Supports `asChild` via Radix UI Slot for composition with custom components.\n *\n * @param props.variant - \"default\" | \"external\" (adds target=\"_blank\" and rel=\"noopener noreferrer\")\n * @param props.asChild - render as child element via Radix Slot\n */\nfunction Link({ className, variant, asChild = false, ...props }: LinkProps) {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n data-slot=\"link\"\n className={cn(linkStyles({ variant, className }))}\n {...(variant === 'external' && !asChild ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n {...props}\n />\n );\n}\n\ntype RouterLinkProps = Omit<LinkProps, 'asChild'> & Record<string, unknown>;\n\n/**\n * `RouterLink` renders using the component set via `setLinkComponent()`,\n * falling back to a plain `<a>` tag if none has been configured.\n *\n * @example\n * // In your app entry:\n * import { setLinkComponent } from '@kubetail/ui/elements/link';\n * import { Link as RRLink } from 'react-router-dom';\n * setLinkComponent(RRLink);\n *\n * // Then use RouterLink anywhere:\n * <RouterLink to=\"/dashboard\">Dashboard</RouterLink>\n */\nfunction RouterLink({ className, variant, ...props }: RouterLinkProps) {\n const Comp = configuredLinkComponent || 'a';\n\n return (\n <Comp\n data-slot=\"link\"\n className={cn(linkStyles({ variant, className }))}\n {...(variant === 'external' && Comp === 'a' ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n {...props}\n />\n );\n}\n\nexport { Link, RouterLink, linkStyles, setLinkComponent, getLinkComponent };\n"],"mappings":"gQAKA,IAAM,GAAA,EAAA,EAAA,KACJ,8LACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,GACT,SAAU,GACX,CACF,CACD,gBAAiB,CACf,QAAS,UACV,CACF,CACF,CAMGA,EAAgD,KAUpD,SAAS,EAAiB,EAA0B,CAClD,EAA0B,EAM5B,SAAS,GAAyC,CAChD,OAAO,EAgBT,SAAS,EAAK,CAAE,YAAW,UAAS,UAAU,GAAO,GAAG,GAAoB,CAG1E,OACE,EAAA,EAAA,KAHW,EAAU,EAAA,KAAO,IAG3B,CACC,YAAU,OACV,UAAW,EAAA,GAAG,EAAW,CAAE,UAAS,YAAW,CAAC,CAAC,CACjD,GAAK,IAAY,YAAc,CAAC,EAAU,CAAE,OAAQ,SAAU,IAAK,sBAAuB,CAAG,EAAE,CAC/F,GAAI,GACJ,CAmBN,SAAS,EAAW,CAAE,YAAW,UAAS,GAAG,GAA0B,CACrE,IAAM,EAAO,GAA2B,IAExC,OACE,EAAA,EAAA,KAAC,EAAA,CACC,YAAU,OACV,UAAW,EAAA,GAAG,EAAW,CAAE,UAAS,YAAW,CAAC,CAAC,CACjD,GAAK,IAAY,YAAc,IAAS,IAAM,CAAE,OAAQ,SAAU,IAAK,sBAAuB,CAAG,EAAE,CACnG,GAAI,GACJ"}
1
+ {"version":3,"file":"link.cjs","names":[],"sources":["../../src/elements/link.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst linkStyles = cva(\n 'inline-flex items-center gap-1 text-primary underline-offset-4 hover:underline transition-colors outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] rounded-sm cursor-pointer',\n {\n variants: {\n variant: {\n default: '',\n external: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport type LinkVariantProps = VariantProps<typeof linkStyles>;\n\ntype LinkComponent = React.ElementType;\n\nlet configuredLinkComponent: LinkComponent | null = null;\n\n/**\n * Set a custom component to be used by `RouterLink` (e.g. your router's Link component).\n *\n * @example\n * import { setLinkComponent } from '@kubetail/ui/elements/link';\n * import { Link } from 'react-router-dom';\n * setLinkComponent(Link);\n */\nfunction setLinkComponent(component: LinkComponent) {\n configuredLinkComponent = component;\n}\n\n/**\n * Get the currently configured link component.\n */\nfunction getLinkComponent(): LinkComponent | null {\n return configuredLinkComponent;\n}\n\ntype LinkProps = React.ComponentProps<'a'> &\n LinkVariantProps & {\n asChild?: boolean;\n };\n\n/**\n * `Link` renders a styled anchor element.\n *\n * Supports `asChild` via Radix UI Slot for composition with custom components.\n *\n * @param props.variant - \"default\" | \"external\" (adds target=\"_blank\" and rel=\"noopener noreferrer\")\n * @param props.asChild - render as child element via Radix Slot\n */\nfunction Link({ className, variant, asChild = false, ...props }: LinkProps) {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n data-slot=\"link\"\n className={cn(linkStyles({ variant, className }))}\n {...(variant === 'external' && !asChild ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n {...props}\n />\n );\n}\n\ntype RouterLinkProps = Omit<LinkProps, 'asChild'> & Record<string, unknown>;\n\n/**\n * `RouterLink` renders using the component set via `setLinkComponent()`,\n * falling back to a plain `<a>` tag if none has been configured.\n *\n * @example\n * // In your app entry:\n * import { setLinkComponent } from '@kubetail/ui/elements/link';\n * import { Link as RRLink } from 'react-router-dom';\n * setLinkComponent(RRLink);\n *\n * // Then use RouterLink anywhere:\n * <RouterLink to=\"/dashboard\">Dashboard</RouterLink>\n */\nfunction RouterLink({ className, variant, ...props }: RouterLinkProps) {\n const Comp = configuredLinkComponent || 'a';\n\n return (\n <Comp\n data-slot=\"link\"\n className={cn(linkStyles({ variant, className }))}\n {...(variant === 'external' && Comp === 'a' ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n {...props}\n />\n );\n}\n\nexport { Link, RouterLink, linkStyles, setLinkComponent, getLinkComponent };\n"],"mappings":"+PAKA,IAAM,GAAA,EAAA,EAAA,KACJ,8LACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,GACT,SAAU,GACX,CACF,CACD,gBAAiB,CACf,QAAS,UACV,CACF,CACF,CAMG,EAAgD,KAUpD,SAAS,EAAiB,EAA0B,CAClD,EAA0B,EAM5B,SAAS,GAAyC,CAChD,OAAO,EAgBT,SAAS,EAAK,CAAE,YAAW,UAAS,UAAU,GAAO,GAAG,GAAoB,CAG1E,OAAA,EAAA,EAAA,KAFa,EAAU,EAAA,KAAO,IAG5B,CACE,YAAU,OACV,UAAW,EAAA,GAAG,EAAW,CAAE,UAAS,YAAW,CAAC,CAAC,CACjD,GAAK,IAAY,YAAc,CAAC,EAAU,CAAE,OAAQ,SAAU,IAAK,sBAAuB,CAAG,EAAE,CAC/F,GAAI,EACJ,CAAA,CAmBN,SAAS,EAAW,CAAE,YAAW,UAAS,GAAG,GAA0B,CACrE,IAAM,EAAO,GAA2B,IAExC,OAAA,EAAA,EAAA,KACG,EAAD,CACE,YAAU,OACV,UAAW,EAAA,GAAG,EAAW,CAAE,UAAS,YAAW,CAAC,CAAC,CACjD,GAAK,IAAY,YAAc,IAAS,IAAM,CAAE,OAAQ,SAAU,IAAK,sBAAuB,CAAG,EAAE,CACnG,GAAI,EACJ,CAAA"}
@@ -1,49 +1,51 @@
1
- import { cn } from "../lib/utils.js";
2
- import { jsx } from "react/jsx-runtime";
3
- import { Slot } from "@radix-ui/react-slot";
4
- import { cva } from "class-variance-authority";
5
- var linkStyles = cva("inline-flex items-center gap-1 text-primary underline-offset-4 hover:underline transition-colors outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] rounded-sm cursor-pointer", {
1
+ import { cn as e } from "../lib/utils.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { cva as n } from "class-variance-authority";
4
+ import { Slot as r } from "@radix-ui/react-slot";
5
+ //#region src/elements/link.tsx
6
+ var i = n("inline-flex items-center gap-1 text-primary underline-offset-4 hover:underline transition-colors outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] rounded-sm cursor-pointer", {
6
7
  variants: { variant: {
7
8
  default: "",
8
9
  external: ""
9
10
  } },
10
11
  defaultVariants: { variant: "default" }
11
- }), configuredLinkComponent = null;
12
- function setLinkComponent(e) {
13
- configuredLinkComponent = e;
12
+ }), a = null;
13
+ function o(e) {
14
+ a = e;
14
15
  }
15
- function getLinkComponent() {
16
- return configuredLinkComponent;
16
+ function s() {
17
+ return a;
17
18
  }
18
- function Link({ className: o, variant: s, asChild: c = !1, ...l }) {
19
- return /* @__PURE__ */ jsx(c ? Slot : "a", {
19
+ function c({ className: n, variant: a, asChild: o = !1, ...s }) {
20
+ return /* @__PURE__ */ t(o ? r : "a", {
20
21
  "data-slot": "link",
21
- className: cn(linkStyles({
22
- variant: s,
23
- className: o
22
+ className: e(i({
23
+ variant: a,
24
+ className: n
24
25
  })),
25
- ...s === "external" && !c ? {
26
+ ...a === "external" && !o ? {
26
27
  target: "_blank",
27
28
  rel: "noopener noreferrer"
28
29
  } : {},
29
- ...l
30
+ ...s
30
31
  });
31
32
  }
32
- function RouterLink({ className: a, variant: o, ...c }) {
33
- let l = configuredLinkComponent || "a";
34
- return /* @__PURE__ */ jsx(l, {
33
+ function l({ className: n, variant: r, ...o }) {
34
+ let s = a || "a";
35
+ return /* @__PURE__ */ t(s, {
35
36
  "data-slot": "link",
36
- className: cn(linkStyles({
37
- variant: o,
38
- className: a
37
+ className: e(i({
38
+ variant: r,
39
+ className: n
39
40
  })),
40
- ...o === "external" && l === "a" ? {
41
+ ...r === "external" && s === "a" ? {
41
42
  target: "_blank",
42
43
  rel: "noopener noreferrer"
43
44
  } : {},
44
- ...c
45
+ ...o
45
46
  });
46
47
  }
47
- export { Link, RouterLink, getLinkComponent, linkStyles, setLinkComponent };
48
+ //#endregion
49
+ export { c as Link, l as RouterLink, s as getLinkComponent, i as linkStyles, o as setLinkComponent };
48
50
 
49
51
  //# sourceMappingURL=link.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"link.js","names":["configuredLinkComponent: LinkComponent | null"],"sources":["../../src/elements/link.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst linkStyles = cva(\n 'inline-flex items-center gap-1 text-primary underline-offset-4 hover:underline transition-colors outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] rounded-sm cursor-pointer',\n {\n variants: {\n variant: {\n default: '',\n external: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport type LinkVariantProps = VariantProps<typeof linkStyles>;\n\ntype LinkComponent = React.ElementType;\n\nlet configuredLinkComponent: LinkComponent | null = null;\n\n/**\n * Set a custom component to be used by `RouterLink` (e.g. your router's Link component).\n *\n * @example\n * import { setLinkComponent } from '@kubetail/ui/elements/link';\n * import { Link } from 'react-router-dom';\n * setLinkComponent(Link);\n */\nfunction setLinkComponent(component: LinkComponent) {\n configuredLinkComponent = component;\n}\n\n/**\n * Get the currently configured link component.\n */\nfunction getLinkComponent(): LinkComponent | null {\n return configuredLinkComponent;\n}\n\ntype LinkProps = React.ComponentProps<'a'> &\n LinkVariantProps & {\n asChild?: boolean;\n };\n\n/**\n * `Link` renders a styled anchor element.\n *\n * Supports `asChild` via Radix UI Slot for composition with custom components.\n *\n * @param props.variant - \"default\" | \"external\" (adds target=\"_blank\" and rel=\"noopener noreferrer\")\n * @param props.asChild - render as child element via Radix Slot\n */\nfunction Link({ className, variant, asChild = false, ...props }: LinkProps) {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n data-slot=\"link\"\n className={cn(linkStyles({ variant, className }))}\n {...(variant === 'external' && !asChild ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n {...props}\n />\n );\n}\n\ntype RouterLinkProps = Omit<LinkProps, 'asChild'> & Record<string, unknown>;\n\n/**\n * `RouterLink` renders using the component set via `setLinkComponent()`,\n * falling back to a plain `<a>` tag if none has been configured.\n *\n * @example\n * // In your app entry:\n * import { setLinkComponent } from '@kubetail/ui/elements/link';\n * import { Link as RRLink } from 'react-router-dom';\n * setLinkComponent(RRLink);\n *\n * // Then use RouterLink anywhere:\n * <RouterLink to=\"/dashboard\">Dashboard</RouterLink>\n */\nfunction RouterLink({ className, variant, ...props }: RouterLinkProps) {\n const Comp = configuredLinkComponent || 'a';\n\n return (\n <Comp\n data-slot=\"link\"\n className={cn(linkStyles({ variant, className }))}\n {...(variant === 'external' && Comp === 'a' ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n {...props}\n />\n );\n}\n\nexport { Link, RouterLink, linkStyles, setLinkComponent, getLinkComponent };\n"],"mappings":";;;;AAKA,IAAM,aAAa,IACjB,+LACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,UAAU;EACX,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CACF,EAMGA,0BAAgD;AAUpD,SAAS,iBAAiB,GAA0B;AAClD,2BAA0B;;AAM5B,SAAS,mBAAyC;AAChD,QAAO;;AAgBT,SAAS,KAAK,EAAE,cAAW,YAAS,aAAU,IAAO,GAAG,KAAoB;AAG1E,QACE,oBAHW,IAAU,OAAO,KAG3B;EACC,aAAU;EACV,WAAW,GAAG,WAAW;GAAE;GAAS;GAAW,CAAC,CAAC;EACjD,GAAK,MAAY,cAAc,CAAC,IAAU;GAAE,QAAQ;GAAU,KAAK;GAAuB,GAAG,EAAE;EAC/F,GAAI;GACJ;;AAmBN,SAAS,WAAW,EAAE,cAAW,YAAS,GAAG,KAA0B;CACrE,IAAM,IAAO,2BAA2B;AAExC,QACE,oBAAC,GAAA;EACC,aAAU;EACV,WAAW,GAAG,WAAW;GAAE;GAAS;GAAW,CAAC,CAAC;EACjD,GAAK,MAAY,cAAc,MAAS,MAAM;GAAE,QAAQ;GAAU,KAAK;GAAuB,GAAG,EAAE;EACnG,GAAI;GACJ"}
1
+ {"version":3,"file":"link.js","names":[],"sources":["../../src/elements/link.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst linkStyles = cva(\n 'inline-flex items-center gap-1 text-primary underline-offset-4 hover:underline transition-colors outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] rounded-sm cursor-pointer',\n {\n variants: {\n variant: {\n default: '',\n external: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport type LinkVariantProps = VariantProps<typeof linkStyles>;\n\ntype LinkComponent = React.ElementType;\n\nlet configuredLinkComponent: LinkComponent | null = null;\n\n/**\n * Set a custom component to be used by `RouterLink` (e.g. your router's Link component).\n *\n * @example\n * import { setLinkComponent } from '@kubetail/ui/elements/link';\n * import { Link } from 'react-router-dom';\n * setLinkComponent(Link);\n */\nfunction setLinkComponent(component: LinkComponent) {\n configuredLinkComponent = component;\n}\n\n/**\n * Get the currently configured link component.\n */\nfunction getLinkComponent(): LinkComponent | null {\n return configuredLinkComponent;\n}\n\ntype LinkProps = React.ComponentProps<'a'> &\n LinkVariantProps & {\n asChild?: boolean;\n };\n\n/**\n * `Link` renders a styled anchor element.\n *\n * Supports `asChild` via Radix UI Slot for composition with custom components.\n *\n * @param props.variant - \"default\" | \"external\" (adds target=\"_blank\" and rel=\"noopener noreferrer\")\n * @param props.asChild - render as child element via Radix Slot\n */\nfunction Link({ className, variant, asChild = false, ...props }: LinkProps) {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n data-slot=\"link\"\n className={cn(linkStyles({ variant, className }))}\n {...(variant === 'external' && !asChild ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n {...props}\n />\n );\n}\n\ntype RouterLinkProps = Omit<LinkProps, 'asChild'> & Record<string, unknown>;\n\n/**\n * `RouterLink` renders using the component set via `setLinkComponent()`,\n * falling back to a plain `<a>` tag if none has been configured.\n *\n * @example\n * // In your app entry:\n * import { setLinkComponent } from '@kubetail/ui/elements/link';\n * import { Link as RRLink } from 'react-router-dom';\n * setLinkComponent(RRLink);\n *\n * // Then use RouterLink anywhere:\n * <RouterLink to=\"/dashboard\">Dashboard</RouterLink>\n */\nfunction RouterLink({ className, variant, ...props }: RouterLinkProps) {\n const Comp = configuredLinkComponent || 'a';\n\n return (\n <Comp\n data-slot=\"link\"\n className={cn(linkStyles({ variant, className }))}\n {...(variant === 'external' && Comp === 'a' ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n {...props}\n />\n );\n}\n\nexport { Link, RouterLink, linkStyles, setLinkComponent, getLinkComponent };\n"],"mappings":";;;;;AAKA,IAAM,IAAa,EACjB,+LACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,UAAU;EACX,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CACF,EAMG,IAAgD;AAUpD,SAAS,EAAiB,GAA0B;AAClD,KAA0B;;AAM5B,SAAS,IAAyC;AAChD,QAAO;;AAgBT,SAAS,EAAK,EAAE,cAAW,YAAS,aAAU,IAAO,GAAG,KAAoB;AAG1E,QACE,kBAHW,IAAU,IAAO,KAG5B;EACE,aAAU;EACV,WAAW,EAAG,EAAW;GAAE;GAAS;GAAW,CAAC,CAAC;EACjD,GAAK,MAAY,cAAc,CAAC,IAAU;GAAE,QAAQ;GAAU,KAAK;GAAuB,GAAG,EAAE;EAC/F,GAAI;EACJ,CAAA;;AAmBN,SAAS,EAAW,EAAE,cAAW,YAAS,GAAG,KAA0B;CACrE,IAAM,IAAO,KAA2B;AAExC,QACE,kBAAC,GAAD;EACE,aAAU;EACV,WAAW,EAAG,EAAW;GAAE;GAAS;GAAW,CAAC,CAAC;EACjD,GAAK,MAAY,cAAc,MAAS,MAAM;GAAE,QAAQ;GAAU,KAAK;GAAuB,GAAG,EAAE;EACnG,GAAI;EACJ,CAAA"}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`),n=require(`./button.cjs`);let r=require(`react/jsx-runtime`),i=require(`lucide-react`),a=require(`react`);a=e.__toESM(a);function o({className:e,...n}){return(0,r.jsx)(`nav`,{role:`navigation`,"aria-label":`pagination`,"data-slot":`pagination`,className:t.cn(`mx-auto flex w-full justify-center`,e),...n})}function s({className:e,...n}){return(0,r.jsx)(`ul`,{"data-slot":`pagination-content`,className:t.cn(`flex flex-row items-center gap-1`,e),...n})}function c({...e}){return(0,r.jsx)(`li`,{"data-slot":`pagination-item`,...e})}function l({className:e,isActive:i,size:a=`icon`,children:o,...s}){return(0,r.jsx)(`a`,{"aria-current":i?`page`:void 0,"data-slot":`pagination-link`,"data-active":i,className:t.cn(n.buttonVariants({variant:i?`outline`:`ghost`,size:a}),e),...s,children:o})}function u({className:e,...n}){return(0,r.jsxs)(l,{"aria-label":`Go to previous page`,size:`default`,className:t.cn(`gap-1 px-2.5 sm:pl-2.5`,e),...n,children:[(0,r.jsx)(i.ChevronLeftIcon,{}),(0,r.jsx)(`span`,{className:`hidden sm:block`,children:`Previous`})]})}function d({className:e,...n}){return(0,r.jsxs)(l,{"aria-label":`Go to next page`,size:`default`,className:t.cn(`gap-1 px-2.5 sm:pr-2.5`,e),...n,children:[(0,r.jsx)(`span`,{className:`hidden sm:block`,children:`Next`}),(0,r.jsx)(i.ChevronRightIcon,{})]})}function f({className:e,...n}){return(0,r.jsxs)(`span`,{"aria-hidden":!0,"data-slot":`pagination-ellipsis`,className:t.cn(`flex size-9 items-center justify-center`,e),...n,children:[(0,r.jsx)(i.MoreHorizontalIcon,{className:`size-4`}),(0,r.jsx)(`span`,{className:`sr-only`,children:`More pages`})]})}exports.Pagination=o,exports.PaginationContent=s,exports.PaginationEllipsis=f,exports.PaginationItem=c,exports.PaginationLink=l,exports.PaginationNext=d,exports.PaginationPrevious=u;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`../lib/utils.cjs`),n=require(`./button.cjs`);let r=require(`react/jsx-runtime`),i=require(`lucide-react`),a=require(`react`);a=e.__toESM(a);function o({className:e,...n}){return(0,r.jsx)(`nav`,{role:`navigation`,"aria-label":`pagination`,"data-slot":`pagination`,className:t.cn(`mx-auto flex w-full justify-center`,e),...n})}function s({className:e,...n}){return(0,r.jsx)(`ul`,{"data-slot":`pagination-content`,className:t.cn(`flex flex-row items-center gap-1`,e),...n})}function c({...e}){return(0,r.jsx)(`li`,{"data-slot":`pagination-item`,...e})}function l({className:e,isActive:i,size:a=`icon`,children:o,...s}){return(0,r.jsx)(`a`,{"aria-current":i?`page`:void 0,"data-slot":`pagination-link`,"data-active":i,className:t.cn(n.buttonVariants({variant:i?`outline`:`ghost`,size:a}),e),...s,children:o})}function u({className:e,...n}){return(0,r.jsxs)(l,{"aria-label":`Go to previous page`,size:`default`,className:t.cn(`gap-1 px-2.5 sm:pl-2.5`,e),...n,children:[(0,r.jsx)(i.ChevronLeftIcon,{}),(0,r.jsx)(`span`,{className:`hidden sm:block`,children:`Previous`})]})}function d({className:e,...n}){return(0,r.jsxs)(l,{"aria-label":`Go to next page`,size:`default`,className:t.cn(`gap-1 px-2.5 sm:pr-2.5`,e),...n,children:[(0,r.jsx)(`span`,{className:`hidden sm:block`,children:`Next`}),(0,r.jsx)(i.ChevronRightIcon,{})]})}function f({className:e,...n}){return(0,r.jsxs)(`span`,{"aria-hidden":!0,"data-slot":`pagination-ellipsis`,className:t.cn(`flex size-9 items-center justify-center`,e),...n,children:[(0,r.jsx)(i.MoreHorizontalIcon,{className:`size-4`}),(0,r.jsx)(`span`,{className:`sr-only`,children:`More pages`})]})}exports.Pagination=o,exports.PaginationContent=s,exports.PaginationEllipsis=f,exports.PaginationItem=c,exports.PaginationLink=l,exports.PaginationNext=d,exports.PaginationPrevious=u;
2
2
  //# sourceMappingURL=pagination.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.cjs","names":[],"sources":["../../src/elements/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Button, buttonVariants } from '@/elements/button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"pagination-content\" className={cn('flex flex-row items-center gap-1', className)} {...props} />;\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n React.ComponentProps<'a'>;\n\nfunction PaginationLink({ className, isActive, size = 'icon', children, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className,\n )}\n {...props}\n >\n {children}\n </a>\n );\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"mappings":"8QAMA,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAA,EAAA,KAAC,MAAA,CACC,KAAK,aACL,aAAW,aACX,YAAU,aACV,UAAW,EAAA,GAAG,qCAAsC,EAAU,CAC9D,GAAI,GACJ,CAIN,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAqC,CAC9E,OAAO,EAAA,EAAA,KAAC,KAAA,CAAG,YAAU,qBAAqB,UAAW,EAAA,GAAG,mCAAoC,EAAU,CAAE,GAAI,GAAS,CAGvH,SAAS,EAAe,CAAE,GAAG,GAAqC,CAChE,OAAO,EAAA,EAAA,KAAC,KAAA,CAAG,YAAU,kBAAkB,GAAI,GAAS,CAQtD,SAAS,EAAe,CAAE,YAAW,WAAU,OAAO,OAAQ,WAAU,GAAG,GAA8B,CACvG,OACE,EAAA,EAAA,KAAC,IAAA,CACC,eAAc,EAAW,OAAS,IAAA,GAClC,YAAU,kBACV,cAAa,EACb,UAAW,EAAA,GACT,EAAA,eAAe,CACb,QAAS,EAAW,UAAY,QAChC,OACD,CAAC,CACF,EACD,CACD,GAAI,EAEH,YACC,CAIR,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAsD,CAChG,OACE,EAAA,EAAA,MAAC,EAAA,CACC,aAAW,sBACX,KAAK,UACL,UAAW,EAAA,GAAG,yBAA0B,EAAU,CAClD,GAAI,aAEJ,EAAA,EAAA,KAAC,EAAA,gBAAA,EAAA,CAAkB,EACnB,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,2BAAkB,YAAe,CAAA,EAClC,CAIrB,SAAS,EAAe,CAAE,YAAW,GAAG,GAAsD,CAC5F,OACE,EAAA,EAAA,MAAC,EAAA,CACC,aAAW,kBACX,KAAK,UACL,UAAW,EAAA,GAAG,yBAA0B,EAAU,CAClD,GAAI,aAEJ,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,2BAAkB,QAAW,EAC7C,EAAA,EAAA,KAAC,EAAA,iBAAA,EAAA,CAAmB,CAAA,EACL,CAIrB,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAuC,CACjF,OACE,EAAA,EAAA,MAAC,OAAA,CACC,cAAA,GACA,YAAU,sBACV,UAAW,EAAA,GAAG,0CAA2C,EAAU,CACnE,GAAI,aAEJ,EAAA,EAAA,KAAC,EAAA,mBAAA,CAAmB,UAAU,SAAA,CAAW,EACzC,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,mBAAU,cAAiB,CAAA,EACtC"}
1
+ {"version":3,"file":"pagination.cjs","names":[],"sources":["../../src/elements/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Button, buttonVariants } from '@/elements/button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"pagination-content\" className={cn('flex flex-row items-center gap-1', className)} {...props} />;\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n React.ComponentProps<'a'>;\n\nfunction PaginationLink({ className, isActive, size = 'icon', children, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className,\n )}\n {...props}\n >\n {children}\n </a>\n );\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"mappings":"+QAMA,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OAAA,EAAA,EAAA,KACG,MAAD,CACE,KAAK,aACL,aAAW,aACX,YAAU,aACV,UAAW,EAAA,GAAG,qCAAsC,EAAU,CAC9D,GAAI,EACJ,CAAA,CAIN,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAqC,CAC9E,OAAA,EAAA,EAAA,KAAQ,KAAD,CAAI,YAAU,qBAAqB,UAAW,EAAA,GAAG,mCAAoC,EAAU,CAAE,GAAI,EAAS,CAAA,CAGvH,SAAS,EAAe,CAAE,GAAG,GAAqC,CAChE,OAAA,EAAA,EAAA,KAAQ,KAAD,CAAI,YAAU,kBAAkB,GAAI,EAAS,CAAA,CAQtD,SAAS,EAAe,CAAE,YAAW,WAAU,OAAO,OAAQ,WAAU,GAAG,GAA8B,CACvG,OAAA,EAAA,EAAA,KACG,IAAD,CACE,eAAc,EAAW,OAAS,IAAA,GAClC,YAAU,kBACV,cAAa,EACb,UAAW,EAAA,GACT,EAAA,eAAe,CACb,QAAS,EAAW,UAAY,QAChC,OACD,CAAC,CACF,EACD,CACD,GAAI,EAEH,WACC,CAAA,CAIR,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAsD,CAChG,OAAA,EAAA,EAAA,MACG,EAAD,CACE,aAAW,sBACX,KAAK,UACL,UAAW,EAAA,GAAG,yBAA0B,EAAU,CAClD,GAAI,WAJN,EAAA,EAAA,EAAA,KAMG,EAAA,gBAAD,EAAmB,CAAA,EAAA,EAAA,EAAA,KAClB,OAAD,CAAM,UAAU,2BAAkB,WAAe,CAAA,CAClC,GAIrB,SAAS,EAAe,CAAE,YAAW,GAAG,GAAsD,CAC5F,OAAA,EAAA,EAAA,MACG,EAAD,CACE,aAAW,kBACX,KAAK,UACL,UAAW,EAAA,GAAG,yBAA0B,EAAU,CAClD,GAAI,WAJN,EAAA,EAAA,EAAA,KAMG,OAAD,CAAM,UAAU,2BAAkB,OAAW,CAAA,EAAA,EAAA,EAAA,KAC5C,EAAA,iBAAD,EAAoB,CAAA,CACL,GAIrB,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAuC,CACjF,OAAA,EAAA,EAAA,MACG,OAAD,CACE,cAAA,GACA,YAAU,sBACV,UAAW,EAAA,GAAG,0CAA2C,EAAU,CACnE,GAAI,WAJN,EAAA,EAAA,EAAA,KAMG,EAAA,mBAAD,CAAoB,UAAU,SAAW,CAAA,EAAA,EAAA,EAAA,KACxC,OAAD,CAAM,UAAU,mBAAU,aAAiB,CAAA,CACtC"}
@@ -1,79 +1,81 @@
1
- import { cn } from "../lib/utils.js";
2
- import { buttonVariants } from "./button.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
1
+ import { cn as e } from "../lib/utils.js";
2
+ import { buttonVariants as t } from "./button.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { ChevronLeftIcon as i, ChevronRightIcon as a, MoreHorizontalIcon as o } from "lucide-react";
5
5
  import "react";
6
- function Pagination({ className: c, ...l }) {
7
- return /* @__PURE__ */ jsx("nav", {
6
+ //#region src/elements/pagination.tsx
7
+ function s({ className: t, ...r }) {
8
+ return /* @__PURE__ */ n("nav", {
8
9
  role: "navigation",
9
10
  "aria-label": "pagination",
10
11
  "data-slot": "pagination",
11
- className: cn("mx-auto flex w-full justify-center", c),
12
- ...l
12
+ className: e("mx-auto flex w-full justify-center", t),
13
+ ...r
13
14
  });
14
15
  }
15
- function PaginationContent({ className: c, ...l }) {
16
- return /* @__PURE__ */ jsx("ul", {
16
+ function c({ className: t, ...r }) {
17
+ return /* @__PURE__ */ n("ul", {
17
18
  "data-slot": "pagination-content",
18
- className: cn("flex flex-row items-center gap-1", c),
19
- ...l
19
+ className: e("flex flex-row items-center gap-1", t),
20
+ ...r
20
21
  });
21
22
  }
22
- function PaginationItem({ ...e }) {
23
- return /* @__PURE__ */ jsx("li", {
23
+ function l({ ...e }) {
24
+ return /* @__PURE__ */ n("li", {
24
25
  "data-slot": "pagination-item",
25
26
  ...e
26
27
  });
27
28
  }
28
- function PaginationLink({ className: l, isActive: u, size: d = "icon", children: f, ...p }) {
29
- return /* @__PURE__ */ jsx("a", {
30
- "aria-current": u ? "page" : void 0,
29
+ function u({ className: r, isActive: i, size: a = "icon", children: o, ...s }) {
30
+ return /* @__PURE__ */ n("a", {
31
+ "aria-current": i ? "page" : void 0,
31
32
  "data-slot": "pagination-link",
32
- "data-active": u,
33
- className: cn(buttonVariants({
34
- variant: u ? "outline" : "ghost",
35
- size: d
36
- }), l),
37
- ...p,
38
- children: f
33
+ "data-active": i,
34
+ className: e(t({
35
+ variant: i ? "outline" : "ghost",
36
+ size: a
37
+ }), r),
38
+ ...s,
39
+ children: o
39
40
  });
40
41
  }
41
- function PaginationPrevious({ className: c, ...d }) {
42
- return /* @__PURE__ */ jsxs(PaginationLink, {
42
+ function d({ className: t, ...a }) {
43
+ return /* @__PURE__ */ r(u, {
43
44
  "aria-label": "Go to previous page",
44
45
  size: "default",
45
- className: cn("gap-1 px-2.5 sm:pl-2.5", c),
46
- ...d,
47
- children: [/* @__PURE__ */ jsx(ChevronLeftIcon, {}), /* @__PURE__ */ jsx("span", {
46
+ className: e("gap-1 px-2.5 sm:pl-2.5", t),
47
+ ...a,
48
+ children: [/* @__PURE__ */ n(i, {}), /* @__PURE__ */ n("span", {
48
49
  className: "hidden sm:block",
49
50
  children: "Previous"
50
51
  })]
51
52
  });
52
53
  }
53
- function PaginationNext({ className: c, ...u }) {
54
- return /* @__PURE__ */ jsxs(PaginationLink, {
54
+ function f({ className: t, ...i }) {
55
+ return /* @__PURE__ */ r(u, {
55
56
  "aria-label": "Go to next page",
56
57
  size: "default",
57
- className: cn("gap-1 px-2.5 sm:pr-2.5", c),
58
- ...u,
59
- children: [/* @__PURE__ */ jsx("span", {
58
+ className: e("gap-1 px-2.5 sm:pr-2.5", t),
59
+ ...i,
60
+ children: [/* @__PURE__ */ n("span", {
60
61
  className: "hidden sm:block",
61
62
  children: "Next"
62
- }), /* @__PURE__ */ jsx(ChevronRightIcon, {})]
63
+ }), /* @__PURE__ */ n(a, {})]
63
64
  });
64
65
  }
65
- function PaginationEllipsis({ className: c, ...u }) {
66
- return /* @__PURE__ */ jsxs("span", {
66
+ function p({ className: t, ...i }) {
67
+ return /* @__PURE__ */ r("span", {
67
68
  "aria-hidden": !0,
68
69
  "data-slot": "pagination-ellipsis",
69
- className: cn("flex size-9 items-center justify-center", c),
70
- ...u,
71
- children: [/* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
70
+ className: e("flex size-9 items-center justify-center", t),
71
+ ...i,
72
+ children: [/* @__PURE__ */ n(o, { className: "size-4" }), /* @__PURE__ */ n("span", {
72
73
  className: "sr-only",
73
74
  children: "More pages"
74
75
  })]
75
76
  });
76
77
  }
77
- export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
78
+ //#endregion
79
+ export { s as Pagination, c as PaginationContent, p as PaginationEllipsis, l as PaginationItem, u as PaginationLink, f as PaginationNext, d as PaginationPrevious };
78
80
 
79
81
  //# sourceMappingURL=pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.js","names":[],"sources":["../../src/elements/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Button, buttonVariants } from '@/elements/button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"pagination-content\" className={cn('flex flex-row items-center gap-1', className)} {...props} />;\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n React.ComponentProps<'a'>;\n\nfunction PaginationLink({ className, isActive, size = 'icon', children, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className,\n )}\n {...props}\n >\n {children}\n </a>\n );\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"mappings":";;;;;AAMA,SAAS,WAAW,EAAE,cAAW,GAAG,KAAsC;AACxE,QACE,oBAAC,OAAA;EACC,MAAK;EACL,cAAW;EACX,aAAU;EACV,WAAW,GAAG,sCAAsC,EAAU;EAC9D,GAAI;GACJ;;AAIN,SAAS,kBAAkB,EAAE,cAAW,GAAG,KAAqC;AAC9E,QAAO,oBAAC,MAAA;EAAG,aAAU;EAAqB,WAAW,GAAG,oCAAoC,EAAU;EAAE,GAAI;GAAS;;AAGvH,SAAS,eAAe,EAAE,GAAG,KAAqC;AAChE,QAAO,oBAAC,MAAA;EAAG,aAAU;EAAkB,GAAI;GAAS;;AAQtD,SAAS,eAAe,EAAE,cAAW,aAAU,UAAO,QAAQ,aAAU,GAAG,KAA8B;AACvG,QACE,oBAAC,KAAA;EACC,gBAAc,IAAW,SAAS,KAAA;EAClC,aAAU;EACV,eAAa;EACb,WAAW,GACT,eAAe;GACb,SAAS,IAAW,YAAY;GAChC;GACD,CAAC,EACF,EACD;EACD,GAAI;EAEH;GACC;;AAIR,SAAS,mBAAmB,EAAE,cAAW,GAAG,KAAsD;AAChG,QACE,qBAAC,gBAAA;EACC,cAAW;EACX,MAAK;EACL,WAAW,GAAG,0BAA0B,EAAU;EAClD,GAAI;aAEJ,oBAAC,iBAAA,EAAA,CAAkB,EACnB,oBAAC,QAAA;GAAK,WAAU;aAAkB;IAAe,CAAA;GAClC;;AAIrB,SAAS,eAAe,EAAE,cAAW,GAAG,KAAsD;AAC5F,QACE,qBAAC,gBAAA;EACC,cAAW;EACX,MAAK;EACL,WAAW,GAAG,0BAA0B,EAAU;EAClD,GAAI;aAEJ,oBAAC,QAAA;GAAK,WAAU;aAAkB;IAAW,EAC7C,oBAAC,kBAAA,EAAA,CAAmB,CAAA;GACL;;AAIrB,SAAS,mBAAmB,EAAE,cAAW,GAAG,KAAuC;AACjF,QACE,qBAAC,QAAA;EACC,eAAA;EACA,aAAU;EACV,WAAW,GAAG,2CAA2C,EAAU;EACnE,GAAI;aAEJ,oBAAC,oBAAA,EAAmB,WAAU,UAAA,CAAW,EACzC,oBAAC,QAAA;GAAK,WAAU;aAAU;IAAiB,CAAA;GACtC"}
1
+ {"version":3,"file":"pagination.js","names":[],"sources":["../../src/elements/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Button, buttonVariants } from '@/elements/button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"pagination-content\" className={cn('flex flex-row items-center gap-1', className)} {...props} />;\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n React.ComponentProps<'a'>;\n\nfunction PaginationLink({ className, isActive, size = 'icon', children, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className,\n )}\n {...props}\n >\n {children}\n </a>\n );\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"mappings":";;;;;;AAMA,SAAS,EAAW,EAAE,cAAW,GAAG,KAAsC;AACxE,QACE,kBAAC,OAAD;EACE,MAAK;EACL,cAAW;EACX,aAAU;EACV,WAAW,EAAG,sCAAsC,EAAU;EAC9D,GAAI;EACJ,CAAA;;AAIN,SAAS,EAAkB,EAAE,cAAW,GAAG,KAAqC;AAC9E,QAAO,kBAAC,MAAD;EAAI,aAAU;EAAqB,WAAW,EAAG,oCAAoC,EAAU;EAAE,GAAI;EAAS,CAAA;;AAGvH,SAAS,EAAe,EAAE,GAAG,KAAqC;AAChE,QAAO,kBAAC,MAAD;EAAI,aAAU;EAAkB,GAAI;EAAS,CAAA;;AAQtD,SAAS,EAAe,EAAE,cAAW,aAAU,UAAO,QAAQ,aAAU,GAAG,KAA8B;AACvG,QACE,kBAAC,KAAD;EACE,gBAAc,IAAW,SAAS,KAAA;EAClC,aAAU;EACV,eAAa;EACb,WAAW,EACT,EAAe;GACb,SAAS,IAAW,YAAY;GAChC;GACD,CAAC,EACF,EACD;EACD,GAAI;EAEH;EACC,CAAA;;AAIR,SAAS,EAAmB,EAAE,cAAW,GAAG,KAAsD;AAChG,QACE,kBAAC,GAAD;EACE,cAAW;EACX,MAAK;EACL,WAAW,EAAG,0BAA0B,EAAU;EAClD,GAAI;YAJN,CAME,kBAAC,GAAD,EAAmB,CAAA,EACnB,kBAAC,QAAD;GAAM,WAAU;aAAkB;GAAe,CAAA,CAClC;;;AAIrB,SAAS,EAAe,EAAE,cAAW,GAAG,KAAsD;AAC5F,QACE,kBAAC,GAAD;EACE,cAAW;EACX,MAAK;EACL,WAAW,EAAG,0BAA0B,EAAU;EAClD,GAAI;YAJN,CAME,kBAAC,QAAD;GAAM,WAAU;aAAkB;GAAW,CAAA,EAC7C,kBAAC,GAAD,EAAoB,CAAA,CACL;;;AAIrB,SAAS,EAAmB,EAAE,cAAW,GAAG,KAAuC;AACjF,QACE,kBAAC,QAAD;EACE,eAAA;EACA,aAAU;EACV,WAAW,EAAG,2CAA2C,EAAU;EACnE,GAAI;YAJN,CAME,kBAAC,GAAD,EAAoB,WAAU,UAAW,CAAA,EACzC,kBAAC,QAAD;GAAM,WAAU;aAAU;GAAiB,CAAA,CACtC"}
@@ -1,2 +1,2 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-popover`);r=e.__toESM(r);function i({...e}){return(0,n.jsx)(r.Root,{"data-slot":`popover`,...e})}function a({...e}){return(0,n.jsx)(r.Trigger,{"data-slot":`popover-trigger`,...e})}function o({className:e,align:i=`center`,sideOffset:a=4,...o}){return(0,n.jsx)(r.Portal,{children:(0,n.jsx)(r.Content,{"data-slot":`popover-content`,align:i,sideOffset:a,className:t.cn(`bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,e),...o})})}function s({...e}){return(0,n.jsx)(r.Anchor,{"data-slot":`popover-anchor`,...e})}var c=r.Close;exports.Popover=i,exports.PopoverAnchor=s,exports.PopoverClose=c,exports.PopoverContent=o,exports.PopoverTrigger=a;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-popover`);r=e.__toESM(r);function i({...e}){return(0,n.jsx)(r.Root,{"data-slot":`popover`,...e})}function a({...e}){return(0,n.jsx)(r.Trigger,{"data-slot":`popover-trigger`,...e})}function o({className:e,align:i=`center`,sideOffset:a=4,...o}){return(0,n.jsx)(r.Portal,{children:(0,n.jsx)(r.Content,{"data-slot":`popover-content`,align:i,sideOffset:a,className:t.cn(`bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,e),...o})})}function s({...e}){return(0,n.jsx)(r.Anchor,{"data-slot":`popover-anchor`,...e})}var c=r.Close;exports.Popover=i,exports.PopoverAnchor=s,exports.PopoverClose=c,exports.PopoverContent=o,exports.PopoverTrigger=a;
2
2
  //# sourceMappingURL=popover.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.cjs","names":[],"sources":["../../src/elements/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/lib/utils';\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nconst PopoverClose = PopoverPrimitive.Close;\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };\n"],"mappings":"yPAMA,SAAS,EAAQ,CAAE,GAAG,GAA6D,CACjF,OAAO,EAAA,EAAA,KAAC,EAAiB,KAAA,CAAK,YAAU,UAAU,GAAI,GAAS,CAGjE,SAAS,EAAe,CAAE,GAAG,GAAgE,CAC3F,OAAO,EAAA,EAAA,KAAC,EAAiB,QAAA,CAAQ,YAAU,kBAAkB,GAAI,GAAS,CAG5E,SAAS,EAAe,CACtB,YACA,QAAQ,SACR,aAAa,EACb,GAAG,GACqD,CACxD,OACE,EAAA,EAAA,KAAC,EAAiB,OAAA,CAAA,UAChB,EAAA,EAAA,KAAC,EAAiB,QAAA,CAChB,YAAU,kBACH,QACK,aACZ,UAAW,EAAA,GACT,ieACA,EACD,CACD,GAAI,GACJ,CAAA,CACsB,CAI9B,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAAA,EAAA,KAAC,EAAiB,OAAA,CAAO,YAAU,iBAAiB,GAAI,GAAS,CAG1E,IAAM,EAAe,EAAiB"}
1
+ {"version":3,"file":"popover.cjs","names":[],"sources":["../../src/elements/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/lib/utils';\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nconst PopoverClose = PopoverPrimitive.Close;\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };\n"],"mappings":"0PAMA,SAAS,EAAQ,CAAE,GAAG,GAA6D,CACjF,OAAA,EAAA,EAAA,KAAQ,EAAiB,KAAlB,CAAuB,YAAU,UAAU,GAAI,EAAS,CAAA,CAGjE,SAAS,EAAe,CAAE,GAAG,GAAgE,CAC3F,OAAA,EAAA,EAAA,KAAQ,EAAiB,QAAlB,CAA0B,YAAU,kBAAkB,GAAI,EAAS,CAAA,CAG5E,SAAS,EAAe,CACtB,YACA,QAAQ,SACR,aAAa,EACb,GAAG,GACqD,CACxD,OAAA,EAAA,EAAA,KACG,EAAiB,OAAlB,CAAA,UAAA,EAAA,EAAA,KACG,EAAiB,QAAlB,CACE,YAAU,kBACH,QACK,aACZ,UAAW,EAAA,GACT,ieACA,EACD,CACD,GAAI,EACJ,CAAA,CACsB,CAAA,CAI9B,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAA,EAAA,EAAA,KAAQ,EAAiB,OAAlB,CAAyB,YAAU,iBAAiB,GAAI,EAAS,CAAA,CAG1E,IAAM,EAAe,EAAiB"}
@@ -1,35 +1,37 @@
1
1
  "use client";
2
- import { cn } from "../lib/utils.js";
3
- import { jsx } from "react/jsx-runtime";
4
- import * as PopoverPrimitive from "@radix-ui/react-popover";
5
- function Popover({ ...e }) {
6
- return /* @__PURE__ */ jsx(PopoverPrimitive.Root, {
2
+ import { cn as e } from "../lib/utils.js";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ import * as n from "@radix-ui/react-popover";
5
+ //#region src/elements/popover.tsx
6
+ function r({ ...e }) {
7
+ return /* @__PURE__ */ t(n.Root, {
7
8
  "data-slot": "popover",
8
9
  ...e
9
10
  });
10
11
  }
11
- function PopoverTrigger({ ...e }) {
12
- return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, {
12
+ function i({ ...e }) {
13
+ return /* @__PURE__ */ t(n.Trigger, {
13
14
  "data-slot": "popover-trigger",
14
15
  ...e
15
16
  });
16
17
  }
17
- function PopoverContent({ className: i, align: a = "center", sideOffset: o = 4, ...s }) {
18
- return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
18
+ function a({ className: r, align: i = "center", sideOffset: a = 4, ...o }) {
19
+ return /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(n.Content, {
19
20
  "data-slot": "popover-content",
20
- align: a,
21
- sideOffset: o,
22
- className: cn("bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", i),
23
- ...s
21
+ align: i,
22
+ sideOffset: a,
23
+ className: e("bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", r),
24
+ ...o
24
25
  }) });
25
26
  }
26
- function PopoverAnchor({ ...e }) {
27
- return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, {
27
+ function o({ ...e }) {
28
+ return /* @__PURE__ */ t(n.Anchor, {
28
29
  "data-slot": "popover-anchor",
29
30
  ...e
30
31
  });
31
32
  }
32
- var PopoverClose = PopoverPrimitive.Close;
33
- export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };
33
+ var s = n.Close;
34
+ //#endregion
35
+ export { r as Popover, o as PopoverAnchor, s as PopoverClose, a as PopoverContent, i as PopoverTrigger };
34
36
 
35
37
  //# sourceMappingURL=popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","names":[],"sources":["../../src/elements/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/lib/utils';\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nconst PopoverClose = PopoverPrimitive.Close;\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };\n"],"mappings":";;;;AAMA,SAAS,QAAQ,EAAE,GAAG,KAA6D;AACjF,QAAO,oBAAC,iBAAiB,MAAA;EAAK,aAAU;EAAU,GAAI;GAAS;;AAGjE,SAAS,eAAe,EAAE,GAAG,KAAgE;AAC3F,QAAO,oBAAC,iBAAiB,SAAA;EAAQ,aAAU;EAAkB,GAAI;GAAS;;AAG5E,SAAS,eAAe,EACtB,cACA,WAAQ,UACR,gBAAa,GACb,GAAG,KACqD;AACxD,QACE,oBAAC,iBAAiB,QAAA,EAAA,UAChB,oBAAC,iBAAiB,SAAA;EAChB,aAAU;EACH;EACK;EACZ,WAAW,GACT,keACA,EACD;EACD,GAAI;GACJ,EAAA,CACsB;;AAI9B,SAAS,cAAc,EAAE,GAAG,KAA+D;AACzF,QAAO,oBAAC,iBAAiB,QAAA;EAAO,aAAU;EAAiB,GAAI;GAAS;;AAG1E,IAAM,eAAe,iBAAiB"}
1
+ {"version":3,"file":"popover.js","names":[],"sources":["../../src/elements/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/lib/utils';\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nconst PopoverClose = PopoverPrimitive.Close;\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };\n"],"mappings":";;;;;AAMA,SAAS,EAAQ,EAAE,GAAG,KAA6D;AACjF,QAAO,kBAAC,EAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAI;EAAS,CAAA;;AAGjE,SAAS,EAAe,EAAE,GAAG,KAAgE;AAC3F,QAAO,kBAAC,EAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAI;EAAS,CAAA;;AAG5E,SAAS,EAAe,EACtB,cACA,WAAQ,UACR,gBAAa,GACb,GAAG,KACqD;AACxD,QACE,kBAAC,EAAiB,QAAlB,EAAA,UACE,kBAAC,EAAiB,SAAlB;EACE,aAAU;EACH;EACK;EACZ,WAAW,EACT,keACA,EACD;EACD,GAAI;EACJ,CAAA,EACsB,CAAA;;AAI9B,SAAS,EAAc,EAAE,GAAG,KAA+D;AACzF,QAAO,kBAAC,EAAiB,QAAlB;EAAyB,aAAU;EAAiB,GAAI;EAAS,CAAA;;AAG1E,IAAM,IAAe,EAAiB"}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`),n=require(`./input.cjs`);let r=require(`react/jsx-runtime`),i=require(`lucide-react`),a=require(`react`);var o=(0,a.forwardRef)(({className:e,containerClassName:a,placeholder:o=``,...s},c)=>{let{disabled:l}=s;return(0,r.jsxs)(`div`,{className:t.cn(`relative w-full max-w-sm`,a),children:[(0,r.jsx)(i.Search,{"aria-hidden":!0,className:t.cn(`pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`,l&&`opacity-50`)}),(0,r.jsx)(n.Input,{ref:c,type:`search`,placeholder:o,className:t.cn(`pl-9`,e),...s})]})});o.displayName=`SearchBox`,exports.SearchBox=o;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../lib/utils.cjs`),t=require(`./input.cjs`);let n=require(`react/jsx-runtime`),r=require(`lucide-react`);var i=(0,require(`react`).forwardRef)(({className:i,containerClassName:a,placeholder:o=``,...s},c)=>{let{disabled:l}=s;return(0,n.jsxs)(`div`,{className:e.cn(`relative w-full max-w-sm`,a),children:[(0,n.jsx)(r.Search,{"aria-hidden":!0,className:e.cn(`pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`,l&&`opacity-50`)}),(0,n.jsx)(t.Input,{ref:c,type:`search`,placeholder:o,className:e.cn(`pl-9`,i),...s})]})});i.displayName=`SearchBox`,exports.SearchBox=i;
2
2
  //# sourceMappingURL=search-box.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"search-box.cjs","names":[],"sources":["../../src/elements/search-box.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@/elements/input';\nimport { cn } from '@/lib/utils';\n\nexport type SearchBoxProps = React.ComponentProps<typeof Input> & {\n containerClassName?: string;\n};\n\n/**\n * A compact search box.\n * - Uses shadcn <Input/>\n * - Leading search icon\n */\nconst SearchBox = forwardRef<HTMLInputElement, SearchBoxProps>(\n ({ className, containerClassName, placeholder = '', ...props }, ref) => {\n const { disabled } = props;\n\n return (\n <div className={cn('relative w-full max-w-sm', containerClassName)}>\n <Search\n aria-hidden\n className={cn(\n 'pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground',\n disabled && 'opacity-50',\n )}\n />\n <Input ref={ref} type=\"search\" placeholder={placeholder} className={cn('pl-9', className)} {...props} />\n </div>\n );\n },\n);\n\nSearchBox.displayName = 'SearchBox';\n\nexport { SearchBox };\n"],"mappings":"8PAeA,IAAM,GAAA,EAAA,EAAA,aACH,CAAE,YAAW,qBAAoB,cAAc,GAAI,GAAG,GAAS,IAAQ,CACtE,GAAM,CAAE,YAAa,EAErB,OACE,EAAA,EAAA,MAAC,MAAA,CAAI,UAAW,EAAA,GAAG,2BAA4B,EAAmB,YAChE,EAAA,EAAA,KAAC,EAAA,OAAA,CACC,cAAA,GACA,UAAW,EAAA,GACT,6FACA,GAAY,aACb,EACD,EACF,EAAA,EAAA,KAAC,EAAA,MAAA,CAAW,MAAK,KAAK,SAAsB,cAAa,UAAW,EAAA,GAAG,OAAQ,EAAU,CAAE,GAAI,GAAS,CAAA,EACpG,EAGX,CAED,EAAU,YAAc"}
1
+ {"version":3,"file":"search-box.cjs","names":[],"sources":["../../src/elements/search-box.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@/elements/input';\nimport { cn } from '@/lib/utils';\n\nexport type SearchBoxProps = React.ComponentProps<typeof Input> & {\n containerClassName?: string;\n};\n\n/**\n * A compact search box.\n * - Uses shadcn <Input/>\n * - Leading search icon\n */\nconst SearchBox = forwardRef<HTMLInputElement, SearchBoxProps>(\n ({ className, containerClassName, placeholder = '', ...props }, ref) => {\n const { disabled } = props;\n\n return (\n <div className={cn('relative w-full max-w-sm', containerClassName)}>\n <Search\n aria-hidden\n className={cn(\n 'pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground',\n disabled && 'opacity-50',\n )}\n />\n <Input ref={ref} type=\"search\" placeholder={placeholder} className={cn('pl-9', className)} {...props} />\n </div>\n );\n },\n);\n\nSearchBox.displayName = 'SearchBox';\n\nexport { SearchBox };\n"],"mappings":"0OAeA,IAAM,GAAA,mBAAA,aACH,CAAE,YAAW,qBAAoB,cAAc,GAAI,GAAG,GAAS,IAAQ,CACtE,GAAM,CAAE,YAAa,EAErB,OAAA,EAAA,EAAA,MACG,MAAD,CAAK,UAAW,EAAA,GAAG,2BAA4B,EAAmB,UAAlE,EAAA,EAAA,EAAA,KACG,EAAA,OAAD,CACE,cAAA,GACA,UAAW,EAAA,GACT,6FACA,GAAY,aACb,CACD,CAAA,EAAA,EAAA,EAAA,KACD,EAAA,MAAD,CAAY,MAAK,KAAK,SAAsB,cAAa,UAAW,EAAA,GAAG,OAAQ,EAAU,CAAE,GAAI,EAAS,CAAA,CACpG,IAGX,CAED,EAAU,YAAc"}
@@ -1,25 +1,27 @@
1
- import { cn } from "../lib/utils.js";
2
- import { Input } from "./input.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { Search } from "lucide-react";
5
- import { forwardRef } from "react";
6
- var SearchBox = forwardRef(({ className: a, containerClassName: o, placeholder: s = "", ...c }, l) => {
1
+ import { cn as e } from "../lib/utils.js";
2
+ import { Input as t } from "./input.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { Search as i } from "lucide-react";
5
+ import { forwardRef as a } from "react";
6
+ //#region src/elements/search-box.tsx
7
+ var o = a(({ className: a, containerClassName: o, placeholder: s = "", ...c }, l) => {
7
8
  let { disabled: u } = c;
8
- return /* @__PURE__ */ jsxs("div", {
9
- className: cn("relative w-full max-w-sm", o),
10
- children: [/* @__PURE__ */ jsx(Search, {
9
+ return /* @__PURE__ */ r("div", {
10
+ className: e("relative w-full max-w-sm", o),
11
+ children: [/* @__PURE__ */ n(i, {
11
12
  "aria-hidden": !0,
12
- className: cn("pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground", u && "opacity-50")
13
- }), /* @__PURE__ */ jsx(Input, {
13
+ className: e("pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground", u && "opacity-50")
14
+ }), /* @__PURE__ */ n(t, {
14
15
  ref: l,
15
16
  type: "search",
16
17
  placeholder: s,
17
- className: cn("pl-9", a),
18
+ className: e("pl-9", a),
18
19
  ...c
19
20
  })]
20
21
  });
21
22
  });
22
- SearchBox.displayName = "SearchBox";
23
- export { SearchBox };
23
+ o.displayName = "SearchBox";
24
+ //#endregion
25
+ export { o as SearchBox };
24
26
 
25
27
  //# sourceMappingURL=search-box.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"search-box.js","names":[],"sources":["../../src/elements/search-box.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@/elements/input';\nimport { cn } from '@/lib/utils';\n\nexport type SearchBoxProps = React.ComponentProps<typeof Input> & {\n containerClassName?: string;\n};\n\n/**\n * A compact search box.\n * - Uses shadcn <Input/>\n * - Leading search icon\n */\nconst SearchBox = forwardRef<HTMLInputElement, SearchBoxProps>(\n ({ className, containerClassName, placeholder = '', ...props }, ref) => {\n const { disabled } = props;\n\n return (\n <div className={cn('relative w-full max-w-sm', containerClassName)}>\n <Search\n aria-hidden\n className={cn(\n 'pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground',\n disabled && 'opacity-50',\n )}\n />\n <Input ref={ref} type=\"search\" placeholder={placeholder} className={cn('pl-9', className)} {...props} />\n </div>\n );\n },\n);\n\nSearchBox.displayName = 'SearchBox';\n\nexport { SearchBox };\n"],"mappings":";;;;;AAeA,IAAM,YAAY,YACf,EAAE,cAAW,uBAAoB,iBAAc,IAAI,GAAG,KAAS,MAAQ;CACtE,IAAM,EAAE,gBAAa;AAErB,QACE,qBAAC,OAAA;EAAI,WAAW,GAAG,4BAA4B,EAAmB;aAChE,oBAAC,QAAA;GACC,eAAA;GACA,WAAW,GACT,8FACA,KAAY,aACb;IACD,EACF,oBAAC,OAAA;GAAW;GAAK,MAAK;GAAsB;GAAa,WAAW,GAAG,QAAQ,EAAU;GAAE,GAAI;IAAS,CAAA;GACpG;EAGX;AAED,UAAU,cAAc"}
1
+ {"version":3,"file":"search-box.js","names":[],"sources":["../../src/elements/search-box.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@/elements/input';\nimport { cn } from '@/lib/utils';\n\nexport type SearchBoxProps = React.ComponentProps<typeof Input> & {\n containerClassName?: string;\n};\n\n/**\n * A compact search box.\n * - Uses shadcn <Input/>\n * - Leading search icon\n */\nconst SearchBox = forwardRef<HTMLInputElement, SearchBoxProps>(\n ({ className, containerClassName, placeholder = '', ...props }, ref) => {\n const { disabled } = props;\n\n return (\n <div className={cn('relative w-full max-w-sm', containerClassName)}>\n <Search\n aria-hidden\n className={cn(\n 'pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground',\n disabled && 'opacity-50',\n )}\n />\n <Input ref={ref} type=\"search\" placeholder={placeholder} className={cn('pl-9', className)} {...props} />\n </div>\n );\n },\n);\n\nSearchBox.displayName = 'SearchBox';\n\nexport { SearchBox };\n"],"mappings":";;;;;;AAeA,IAAM,IAAY,GACf,EAAE,cAAW,uBAAoB,iBAAc,IAAI,GAAG,KAAS,MAAQ;CACtE,IAAM,EAAE,gBAAa;AAErB,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,4BAA4B,EAAmB;YAAlE,CACE,kBAAC,GAAD;GACE,eAAA;GACA,WAAW,EACT,8FACA,KAAY,aACb;GACD,CAAA,EACF,kBAAC,GAAD;GAAY;GAAK,MAAK;GAAsB;GAAa,WAAW,EAAG,QAAQ,EAAU;GAAE,GAAI;GAAS,CAAA,CACpG;;EAGX;AAED,EAAU,cAAc"}