@uselets/ui 0.6.1 → 1.0.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 (113) hide show
  1. package/README.md +70 -18
  2. package/dist/components/alert-dialog.d.ts +5 -3
  3. package/dist/components/alert-dialog.js +1 -1
  4. package/dist/components/alert-dialog.js.map +1 -1
  5. package/dist/components/anchor.js +1 -1
  6. package/dist/components/anchor.js.map +1 -1
  7. package/dist/components/avatar.d.ts +1 -1
  8. package/dist/components/avatar.js +1 -1
  9. package/dist/components/avatar.js.map +1 -1
  10. package/dist/components/badge.js +1 -1
  11. package/dist/components/badge.js.map +1 -1
  12. package/dist/components/button.d.ts +7 -3
  13. package/dist/components/button.js +1 -1
  14. package/dist/components/button.js.map +1 -1
  15. package/dist/components/calendar.js +1 -1
  16. package/dist/components/calendar.js.map +1 -1
  17. package/dist/components/card.d.ts +1 -1
  18. package/dist/components/card.js +1 -1
  19. package/dist/components/card.js.map +1 -1
  20. package/dist/components/checkbox.d.ts +14 -2
  21. package/dist/components/checkbox.js +1 -1
  22. package/dist/components/checkbox.js.map +1 -1
  23. package/dist/components/combobox.d.ts +8 -1
  24. package/dist/components/combobox.js +1 -1
  25. package/dist/components/combobox.js.map +1 -1
  26. package/dist/components/date-range-picker.d.ts +120 -0
  27. package/dist/components/date-range-picker.js +2 -0
  28. package/dist/components/date-range-picker.js.map +1 -0
  29. package/dist/components/grid.d.ts +37 -0
  30. package/dist/components/grid.js +2 -0
  31. package/dist/components/grid.js.map +1 -0
  32. package/dist/components/group.d.ts +2 -2
  33. package/dist/components/group.js +1 -1
  34. package/dist/components/group.js.map +1 -1
  35. package/dist/components/heading.js +1 -1
  36. package/dist/components/heading.js.map +1 -1
  37. package/dist/components/label.js +1 -1
  38. package/dist/components/label.js.map +1 -1
  39. package/dist/components/list.js +1 -1
  40. package/dist/components/list.js.map +1 -1
  41. package/dist/components/native-select.d.ts +1 -1
  42. package/dist/components/native-select.js +1 -1
  43. package/dist/components/native-select.js.map +1 -1
  44. package/dist/components/pagination.js +1 -1
  45. package/dist/components/pagination.js.map +1 -1
  46. package/dist/components/radio-group.d.ts +23 -2
  47. package/dist/components/radio-group.js +1 -1
  48. package/dist/components/radio-group.js.map +1 -1
  49. package/dist/components/select.d.ts +1 -1
  50. package/dist/components/select.js +1 -1
  51. package/dist/components/select.js.map +1 -1
  52. package/dist/components/sidebar.d.ts +1 -1
  53. package/dist/components/sidebar.js +1 -1
  54. package/dist/components/sidebar.js.map +1 -1
  55. package/dist/components/simple-grid.d.ts +24 -0
  56. package/dist/components/simple-grid.js +2 -0
  57. package/dist/components/simple-grid.js.map +1 -0
  58. package/dist/components/spinner.d.ts +1 -1
  59. package/dist/components/spinner.js +1 -1
  60. package/dist/components/spinner.js.map +1 -1
  61. package/dist/components/stack.d.ts +2 -2
  62. package/dist/components/stack.js +1 -1
  63. package/dist/components/stack.js.map +1 -1
  64. package/dist/components/switch.d.ts +11 -1
  65. package/dist/components/switch.js +1 -1
  66. package/dist/components/switch.js.map +1 -1
  67. package/dist/components/tabs.d.ts +5 -2
  68. package/dist/components/tabs.js +1 -1
  69. package/dist/components/tabs.js.map +1 -1
  70. package/dist/components/text.js +1 -1
  71. package/dist/components/text.js.map +1 -1
  72. package/dist/components/toggle-group.d.ts +2 -0
  73. package/dist/components/toggle-group.js +1 -1
  74. package/dist/components/toggle-group.js.map +1 -1
  75. package/dist/components/toggle.d.ts +4 -2
  76. package/dist/components/toggle.js +1 -1
  77. package/dist/components/toggle.js.map +1 -1
  78. package/dist/components/visibility.d.ts +25 -0
  79. package/dist/components/visibility.js +2 -0
  80. package/dist/components/visibility.js.map +1 -0
  81. package/dist/hooks/use-breakpoint-value.d.ts +9 -0
  82. package/dist/hooks/use-breakpoint-value.js +2 -0
  83. package/dist/hooks/use-breakpoint-value.js.map +1 -0
  84. package/dist/hooks/use-breakpoint-value.spec.d.ts +1 -0
  85. package/dist/hooks/use-breakpoint-value.spec.js +15 -0
  86. package/dist/hooks/use-breakpoint-value.spec.js.map +1 -0
  87. package/dist/hooks/use-breakpoint.d.ts +9 -0
  88. package/dist/hooks/use-breakpoint.js +2 -0
  89. package/dist/hooks/use-breakpoint.js.map +1 -0
  90. package/dist/hooks/use-breakpoint.spec.d.ts +1 -0
  91. package/dist/hooks/use-breakpoint.spec.js +2 -0
  92. package/dist/hooks/use-breakpoint.spec.js.map +1 -0
  93. package/dist/index.d.ts +10 -4
  94. package/dist/index.js +1 -1
  95. package/dist/lib/button.d.ts +12 -8
  96. package/dist/lib/button.js +1 -1
  97. package/dist/lib/button.js.map +1 -1
  98. package/dist/lib/color.d.ts +20 -0
  99. package/dist/lib/color.js +2 -0
  100. package/dist/lib/color.js.map +1 -0
  101. package/dist/skills/uselets-ui/SKILL.md +1 -0
  102. package/dist/skills/uselets-ui/references/component-catalog.md +34 -4
  103. package/dist/skills/uselets-ui/references/package-guide.md +44 -9
  104. package/dist/styles.css +1 -1
  105. package/dist/themes/gomax.css +1 -1
  106. package/dist/themes/max.css +1 -1
  107. package/package.json +1 -1
  108. package/skills/uselets-ui/SKILL.md +1 -0
  109. package/skills/uselets-ui/references/component-catalog.md +34 -4
  110. package/skills/uselets-ui/references/package-guide.md +44 -9
  111. package/dist/components/sheet.d.ts +0 -61
  112. package/dist/components/sheet.js +0 -2
  113. package/dist/components/sheet.js.map +0 -1
@@ -6,13 +6,13 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
6
6
 
7
7
  //#region src/components/group.d.ts
8
8
  declare const groupVariants: (props?: ({
9
- size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
9
+ gap?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
10
10
  wrap?: boolean | null | undefined;
11
11
  } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
12
12
  type GroupProps = React.ComponentProps<'div'> & VariantProps<typeof groupVariants>;
13
13
  declare function Group({
14
14
  className,
15
- size,
15
+ gap,
16
16
  wrap,
17
17
  ...props
18
18
  }: GroupProps): _$react_jsx_runtime0.JSX.Element;
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`flex flex-row items-center`,{variants:{size:{xs:`gap-1`,sm:`gap-2`,md:`gap-3`,lg:`gap-4`,xl:`gap-6`},wrap:{true:`flex-wrap`,false:`flex-nowrap`}},defaultVariants:{size:`md`,wrap:!1}});function Group({className:n,size:i=`md`,wrap:a=!1,...o}){return t(`div`,{"data-slot":`group`,"data-size":i,"data-wrap":a?`true`:`false`,className:e(r({size:i,wrap:a}),n),...o})}export{Group,r as groupVariants};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`flex flex-row items-center`,{variants:{gap:{xs:`gap-1`,sm:`gap-2`,md:`gap-3`,lg:`gap-4`,xl:`gap-6`},wrap:{true:`flex-wrap`,false:`flex-nowrap`}},defaultVariants:{gap:`md`,wrap:!1}});function Group({className:n,gap:i=`md`,wrap:a=!1,...o}){return t(`div`,{"data-slot":`group`,"data-gap":i,"data-wrap":a?`true`:`false`,className:e(r({gap:i,wrap:a}),n),...o})}export{Group,r as groupVariants};
2
2
  //# sourceMappingURL=group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"group.js","names":[],"sources":["../../src/components/group.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst groupVariants = cva('flex flex-row items-center', {\n variants: {\n size: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n xl: 'gap-6'\n },\n wrap: {\n true: 'flex-wrap',\n false: 'flex-nowrap'\n }\n },\n defaultVariants: {\n size: 'md',\n wrap: false\n }\n})\n\nexport type GroupProps = React.ComponentProps<'div'> & VariantProps<typeof groupVariants>\n\nfunction Group({ className, size = 'md', wrap = false, ...props }: GroupProps) {\n return (\n <div\n data-slot=\"group\"\n data-size={size}\n data-wrap={wrap ? 'true' : 'false'}\n className={cn(groupVariants({ size, wrap }), className)}\n {...props}\n />\n )\n}\n\nexport { Group, groupVariants }\n"],"mappings":"yJAMA,MAAM,EAAgB,EAAI,6BAA8B,CACtD,SAAU,CACR,KAAM,CACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACL,CACD,KAAM,CACJ,KAAM,YACN,MAAO,cACR,CACF,CACD,gBAAiB,CACf,KAAM,KACN,KAAM,GACP,CACF,CAAC,CAIF,SAAS,MAAM,CAAE,YAAW,OAAO,KAAM,OAAO,GAAO,GAAG,GAAqB,CAC7E,OACE,EAAC,MAAD,CACE,YAAU,QACV,YAAW,EACX,YAAW,EAAO,OAAS,QAC3B,UAAW,EAAG,EAAc,CAAE,OAAM,OAAM,CAAC,CAAE,EAAU,CACvD,GAAI,EACJ,CAAA"}
1
+ {"version":3,"file":"group.js","names":[],"sources":["../../src/components/group.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst groupVariants = cva('flex flex-row items-center', {\n variants: {\n gap: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n xl: 'gap-6'\n },\n wrap: {\n true: 'flex-wrap',\n false: 'flex-nowrap'\n }\n },\n defaultVariants: {\n gap: 'md',\n wrap: false\n }\n})\n\nexport type GroupProps = React.ComponentProps<'div'> & VariantProps<typeof groupVariants>\n\nfunction Group({ className, gap = 'md', wrap = false, ...props }: GroupProps) {\n return (\n <div\n data-slot=\"group\"\n data-gap={gap}\n data-wrap={wrap ? 'true' : 'false'}\n className={cn(groupVariants({ gap, wrap }), className)}\n {...props}\n />\n )\n}\n\nexport { Group, groupVariants }\n"],"mappings":"yJAMA,MAAM,EAAgB,EAAI,6BAA8B,CACtD,SAAU,CACR,IAAK,CACH,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACL,CACD,KAAM,CACJ,KAAM,YACN,MAAO,cACR,CACF,CACD,gBAAiB,CACf,IAAK,KACL,KAAM,GACP,CACF,CAAC,CAIF,SAAS,MAAM,CAAE,YAAW,MAAM,KAAM,OAAO,GAAO,GAAG,GAAqB,CAC5E,OACE,EAAC,MAAD,CACE,YAAU,QACV,WAAU,EACV,YAAW,EAAO,OAAS,QAC3B,UAAW,EAAG,EAAc,CAAE,MAAK,OAAM,CAAC,CAAE,EAAU,CACtD,GAAI,EACJ,CAAA"}
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Slot as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(`text-foreground font-semibold tracking-tight`,{variants:{size:{xs:`text-lg leading-7`,sm:`text-xl leading-8`,md:`text-2xl leading-tight`,lg:`text-3xl leading-tight`,xl:`text-4xl leading-none`}},defaultVariants:{size:`md`}});function Heading({className:r,size:a=`md`,asChild:o=!1,...s}){return n(o?t.Root:`h2`,{"data-slot":`heading`,"data-size":a,className:e(i({size:a}),r),...s})}export{Heading,i as headingVariants};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Slot as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(`text-foreground font-semibold tracking-tight`,{variants:{size:{xs:`text-lg`,sm:`text-xl`,md:`text-2xl`,lg:`text-3xl`,xl:`text-4xl`}},defaultVariants:{size:`md`}});function Heading({className:r,size:a=`md`,asChild:o=!1,...s}){return n(o?t.Root:`h2`,{"data-slot":`heading`,"data-size":a,className:e(i({size:a}),r),...s})}export{Heading,i as headingVariants};
2
2
  //# sourceMappingURL=heading.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"heading.js","names":[],"sources":["../../src/components/heading.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nconst headingVariants = cva('text-foreground font-semibold tracking-tight', {\n variants: {\n size: {\n xs: 'text-lg leading-7',\n sm: 'text-xl leading-8',\n md: 'text-2xl leading-tight',\n lg: 'text-3xl leading-tight',\n xl: 'text-4xl leading-none'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nexport type HeadingProps = React.ComponentProps<'h2'> &\n VariantProps<typeof headingVariants> & {\n asChild?: boolean\n }\n\nfunction Heading({ className, size = 'md', asChild = false, ...props }: HeadingProps) {\n const Comp = asChild ? Slot.Root : 'h2'\n\n return <Comp data-slot=\"heading\" data-size={size} className={cn(headingVariants({ size }), className)} {...props} />\n}\n\nexport { Heading, headingVariants }\n"],"mappings":"yLAOA,MAAM,EAAkB,EAAI,+CAAgD,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,oBACJ,GAAI,oBACJ,GAAI,yBACJ,GAAI,yBACJ,GAAI,wBACL,CACF,CACD,gBAAiB,CACf,KAAM,KACP,CACF,CAAC,CAOF,SAAS,QAAQ,CAAE,YAAW,OAAO,KAAM,UAAU,GAAO,GAAG,GAAuB,CAGpF,OAAO,EAFM,EAAU,EAAK,KAAO,KAE5B,CAAM,YAAU,UAAU,YAAW,EAAM,UAAW,EAAG,EAAgB,CAAE,OAAM,CAAC,CAAE,EAAU,CAAE,GAAI,EAAS,CAAA"}
1
+ {"version":3,"file":"heading.js","names":[],"sources":["../../src/components/heading.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nconst headingVariants = cva('text-foreground font-semibold tracking-tight', {\n variants: {\n size: {\n xs: 'text-lg',\n sm: 'text-xl',\n md: 'text-2xl',\n lg: 'text-3xl',\n xl: 'text-4xl'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nexport type HeadingProps = React.ComponentProps<'h2'> &\n VariantProps<typeof headingVariants> & {\n asChild?: boolean\n }\n\nfunction Heading({ className, size = 'md', asChild = false, ...props }: HeadingProps) {\n const Comp = asChild ? Slot.Root : 'h2'\n\n return <Comp data-slot=\"heading\" data-size={size} className={cn(headingVariants({ size }), className)} {...props} />\n}\n\nexport { Heading, headingVariants }\n"],"mappings":"yLAOA,MAAM,EAAkB,EAAI,+CAAgD,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,UACJ,GAAI,UACJ,GAAI,WACJ,GAAI,WACJ,GAAI,WACL,CACF,CACD,gBAAiB,CACf,KAAM,KACP,CACF,CAAC,CAOF,SAAS,QAAQ,CAAE,YAAW,OAAO,KAAM,UAAU,GAAO,GAAG,GAAuB,CAGpF,OAAO,EAFM,EAAU,EAAK,KAAO,KAE5B,CAAM,YAAU,UAAU,YAAW,EAAM,UAAW,EAAG,EAAgB,CAAE,OAAM,CAAC,CAAE,EAAU,CAAE,GAAI,EAAS,CAAA"}
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Label as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function Label({className:r,...i}){return n(t.Root,{"data-slot":`label`,className:e(`flex items-center gap-2 select-none text-sm leading-none font-medium`,`group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,r),...i})}export{Label};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Label as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function Label({className:r,...i}){return n(t.Root,{"data-slot":`label`,className:e(`flex items-center gap-2 select-none text-sm leading-none`,`group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,r),...i})}export{Label};
2
2
  //# sourceMappingURL=label.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.js","names":["LabelPrimitive"],"sources":["../../src/components/label.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Label as LabelPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type LabelProps = React.ComponentProps<typeof LabelPrimitive.Root>\n\nfunction Label({ className, ...props }: LabelProps) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 select-none text-sm leading-none font-medium',\n 'group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50',\n 'peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n"],"mappings":"2IAQA,SAAS,MAAM,CAAE,YAAW,GAAG,GAAqB,CAClD,OACE,EAACA,EAAe,KAAhB,CACE,YAAU,QACV,UAAW,EACT,uEACA,uFACA,4DACA,EACD,CACD,GAAI,EACJ,CAAA"}
1
+ {"version":3,"file":"label.js","names":["LabelPrimitive"],"sources":["../../src/components/label.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Label as LabelPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type LabelProps = React.ComponentProps<typeof LabelPrimitive.Root>\n\nfunction Label({ className, ...props }: LabelProps) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 select-none text-sm leading-none',\n 'group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50',\n 'peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n"],"mappings":"2IAQA,SAAS,MAAM,CAAE,YAAW,GAAG,GAAqB,CAClD,OACE,EAACA,EAAe,KAAhB,CACE,YAAU,QACV,UAAW,EACT,2DACA,uFACA,4DACA,EACD,CACD,GAAI,EACJ,CAAA"}
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Slot as t}from"radix-ui";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";import*as a from"react";const o=a.createContext({type:`unordered`}),s=i(`m-0 flex list-none flex-col p-0 text-foreground`,{variants:{size:{xs:`text-xs leading-4`,sm:`text-sm leading-5`,md:`text-base leading-6`,lg:`text-lg leading-7`,xl:`text-xl leading-8`},spacing:{xs:`gap-1`,sm:`gap-2`,md:`gap-3`,lg:`gap-4`,xl:`gap-6`}},defaultVariants:{size:`md`,spacing:`md`}});function List({className:t,children:r,type:i=`unordered`,size:a=`md`,spacing:c=`md`,...l}){let u=i===`ordered`?`ol`:`ul`;return n(o.Provider,{value:{type:i},children:n(u,{"data-slot":`list`,"data-type":i,"data-size":a,"data-spacing":c,className:e(s({size:a,spacing:c}),t),...l,children:injectListItemIndices(r)})})}function ListItem({className:t,children:i,__index:s,...c}){let{type:l}=a.useContext(o),u=a.Children.toArray(i),d=u.find(isListIconElement)??null,f=d?u.filter(e=>e!==d):u,p=l===`ordered`;return r(`li`,{"data-slot":`list-item`,"data-type":l,"data-has-icon":d?`true`:`false`,className:e(`grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3`,t),...c,children:[n(`span`,{"aria-hidden":`true`,className:e(`shrink-0`,d&&`flex min-h-5 min-w-4 items-center justify-center pt-0.5 text-primary [&_svg]:size-[1em]`,!d&&p&&`min-w-7 pt-0.5 text-right font-medium tabular-nums text-muted-foreground`,!d&&!p&&`flex min-h-5 min-w-4 items-start justify-center pt-[0.45em] text-muted-foreground`),children:d??(p?`${(s??0)+1}.`:n(`span`,{className:`size-1.5 rounded-full bg-current`}))}),n(`div`,{className:`min-w-0`,children:f})]})}function ListIcon({className:r,asChild:i=!1,...a}){return n(i?t.Root:`span`,{"data-slot":`list-icon`,className:e(`inline-flex shrink-0 items-center justify-center text-primary [&>svg]:size-4`,i&&`size-4`,r),...a})}function injectListItemIndices(e,t={current:0}){return a.Children.map(e,e=>{if(!a.isValidElement(e))return e;if(e.type===a.Fragment){let r=e;return n(a.Fragment,{children:injectListItemIndices(r.props.children,t)},e.key)}return e.type===ListItem?a.cloneElement(e,{__index:t.current++}):e})}function isListIconElement(e){return a.isValidElement(e)&&e.type===ListIcon}export{List,ListIcon,ListItem,s as listVariants};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Slot as t}from"radix-ui";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";import*as a from"react";const o=a.createContext({type:`unordered`}),s=i(`m-0 flex list-none flex-col p-0 text-foreground`,{variants:{size:{xs:`text-xs`,sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-xl`},spacing:{xs:`gap-1`,sm:`gap-2`,md:`gap-3`,lg:`gap-4`,xl:`gap-6`}},defaultVariants:{size:`md`,spacing:`md`}});function List({className:t,children:r,type:i=`unordered`,size:a=`md`,spacing:c=`md`,...l}){let u=i===`ordered`?`ol`:`ul`;return n(o.Provider,{value:{type:i},children:n(u,{"data-slot":`list`,"data-type":i,"data-size":a,"data-spacing":c,className:e(s({size:a,spacing:c}),t),...l,children:injectListItemIndices(r)})})}function ListItem({className:t,children:i,__index:s,...c}){let{type:l}=a.useContext(o),u=a.Children.toArray(i),d=u.find(isListIconElement)??null,f=d?u.filter(e=>e!==d):u,p=l===`ordered`;return r(`li`,{"data-slot":`list-item`,"data-type":l,"data-has-icon":d?`true`:`false`,className:e(`grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3`,t),...c,children:[n(`span`,{"aria-hidden":`true`,className:e(`shrink-0`,d&&`flex min-h-5 min-w-4 items-center justify-center pt-0.5 text-primary [&_svg]:size-[1em]`,!d&&p&&`min-w-7 pt-0.5 text-right font-medium tabular-nums text-muted-foreground`,!d&&!p&&`flex min-h-5 min-w-4 items-start justify-center pt-[0.45em] text-muted-foreground`),children:d??(p?`${(s??0)+1}.`:n(`span`,{className:`size-1.5 rounded-full bg-current`}))}),n(`div`,{className:`min-w-0`,children:f})]})}function ListIcon({className:r,asChild:i=!1,...a}){return n(i?t.Root:`span`,{"data-slot":`list-icon`,className:e(`inline-flex shrink-0 items-center justify-center text-primary [&>svg]:size-4`,i&&`size-4`,r),...a})}function injectListItemIndices(e,t={current:0}){return a.Children.map(e,e=>{if(!a.isValidElement(e))return e;if(e.type===a.Fragment){let r=e;return n(a.Fragment,{children:injectListItemIndices(r.props.children,t)},e.key)}return e.type===ListItem?a.cloneElement(e,{__index:t.current++}):e})}function isListIconElement(e){return a.isValidElement(e)&&e.type===ListIcon}export{List,ListIcon,ListItem,s as listVariants};
2
2
  //# sourceMappingURL=list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","names":[],"sources":["../../src/components/list.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\ntype ListType = 'unordered' | 'ordered'\n\ntype ListContextValue = {\n type: ListType\n}\n\ntype InternalListItemProps = {\n __index?: number\n}\n\nconst ListContext = React.createContext<ListContextValue>({\n type: 'unordered'\n})\n\nconst listVariants = cva('m-0 flex list-none flex-col p-0 text-foreground', {\n variants: {\n size: {\n xs: 'text-xs leading-4',\n sm: 'text-sm leading-5',\n md: 'text-base leading-6',\n lg: 'text-lg leading-7',\n xl: 'text-xl leading-8'\n },\n spacing: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n xl: 'gap-6'\n }\n },\n defaultVariants: {\n size: 'md',\n spacing: 'md'\n }\n})\n\nexport type ListProps = Omit<React.ComponentProps<'ul'>, 'ref' | 'type'> &\n Omit<React.ComponentProps<'ol'>, 'ref' | 'type'> &\n VariantProps<typeof listVariants> & {\n type?: ListType\n }\n\nexport type ListItemProps = React.ComponentProps<'li'>\n\nexport type ListIconProps = React.ComponentProps<'span'> & {\n asChild?: boolean\n}\n\nfunction List({ className, children, type = 'unordered', size = 'md', spacing = 'md', ...props }: ListProps) {\n const Comp = type === 'ordered' ? 'ol' : 'ul'\n\n return (\n <ListContext.Provider value={{ type }}>\n <Comp\n data-slot=\"list\"\n data-type={type}\n data-size={size}\n data-spacing={spacing}\n className={cn(listVariants({ size, spacing }), className)}\n {...props}\n >\n {injectListItemIndices(children)}\n </Comp>\n </ListContext.Provider>\n )\n}\n\nfunction ListItem({ className, children, __index, ...props }: ListItemProps & InternalListItemProps) {\n const { type } = React.useContext(ListContext)\n const items = React.Children.toArray(children)\n const icon = items.find(isListIconElement) ?? null\n const content = icon ? items.filter((item) => item !== icon) : items\n const isOrdered = type === 'ordered'\n\n return (\n <li\n data-slot=\"list-item\"\n data-type={type}\n data-has-icon={icon ? 'true' : 'false'}\n className={cn('grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3', className)}\n {...props}\n >\n <span\n aria-hidden=\"true\"\n className={cn(\n 'shrink-0',\n icon && 'flex min-h-5 min-w-4 items-center justify-center pt-0.5 text-primary [&_svg]:size-[1em]',\n !icon && isOrdered && 'min-w-7 pt-0.5 text-right font-medium tabular-nums text-muted-foreground',\n !icon && !isOrdered && 'flex min-h-5 min-w-4 items-start justify-center pt-[0.45em] text-muted-foreground'\n )}\n >\n {icon ?? (isOrdered ? `${(__index ?? 0) + 1}.` : <span className=\"size-1.5 rounded-full bg-current\" />)}\n </span>\n <div className=\"min-w-0\">{content}</div>\n </li>\n )\n}\n\nfunction ListIcon({ className, asChild = false, ...props }: ListIconProps) {\n const Comp = asChild ? Slot.Root : 'span'\n\n return (\n <Comp\n data-slot=\"list-icon\"\n className={cn(\n 'inline-flex shrink-0 items-center justify-center text-primary [&>svg]:size-4',\n asChild && 'size-4',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction injectListItemIndices(children: React.ReactNode, indexRef = { current: 0 }): React.ReactNode {\n return React.Children.map(children, (child) => {\n if (!React.isValidElement(child)) {\n return child\n }\n\n if (child.type === React.Fragment) {\n const fragment = child as React.ReactElement<{ children?: React.ReactNode }>\n\n return <React.Fragment key={child.key}>{injectListItemIndices(fragment.props.children, indexRef)}</React.Fragment>\n }\n\n if (child.type === ListItem) {\n return React.cloneElement(child as React.ReactElement<ListItemProps & InternalListItemProps>, {\n __index: indexRef.current++\n })\n }\n\n return child\n })\n}\n\nfunction isListIconElement(child: React.ReactNode): child is React.ReactElement<ListIconProps> {\n return React.isValidElement(child) && child.type === ListIcon\n}\n\nexport { List, ListIcon, ListItem, listVariants }\n"],"mappings":"2NAiBA,MAAM,EAAc,EAAM,cAAgC,CACxD,KAAM,YACP,CAAC,CAEI,EAAe,EAAI,kDAAmD,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,oBACJ,GAAI,oBACJ,GAAI,sBACJ,GAAI,oBACJ,GAAI,oBACL,CACD,QAAS,CACP,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACL,CACF,CACD,gBAAiB,CACf,KAAM,KACN,QAAS,KACV,CACF,CAAC,CAcF,SAAS,KAAK,CAAE,YAAW,WAAU,OAAO,YAAa,OAAO,KAAM,UAAU,KAAM,GAAG,GAAoB,CAC3G,IAAM,EAAO,IAAS,UAAY,KAAO,KAEzC,OACE,EAAC,EAAY,SAAb,CAAsB,MAAO,CAAE,OAAM,UACnC,EAAC,EAAD,CACE,YAAU,OACV,YAAW,EACX,YAAW,EACX,eAAc,EACd,UAAW,EAAG,EAAa,CAAE,OAAM,UAAS,CAAC,CAAE,EAAU,CACzD,GAAI,WAEH,sBAAsB,EAAS,CAC3B,CAAA,CACc,CAAA,CAI3B,SAAS,SAAS,CAAE,YAAW,WAAU,UAAS,GAAG,GAAgD,CACnG,GAAM,CAAE,QAAS,EAAM,WAAW,EAAY,CACxC,EAAQ,EAAM,SAAS,QAAQ,EAAS,CACxC,EAAO,EAAM,KAAK,kBAAkB,EAAI,KACxC,EAAU,EAAO,EAAM,OAAQ,GAAS,IAAS,EAAK,CAAG,EACzD,EAAY,IAAS,UAE3B,OACE,EAAC,KAAD,CACE,YAAU,YACV,YAAW,EACX,gBAAe,EAAO,OAAS,QAC/B,UAAW,EAAG,0DAA2D,EAAU,CACnF,GAAI,WALN,CAOE,EAAC,OAAD,CACE,cAAY,OACZ,UAAW,EACT,WACA,GAAQ,0FACR,CAAC,GAAQ,GAAa,2EACtB,CAAC,GAAQ,CAAC,GAAa,oFACxB,UAEA,IAAS,EAAY,IAAI,GAAW,GAAK,EAAE,GAAK,EAAC,OAAD,CAAM,UAAU,mCAAqC,CAAA,EACjG,CAAA,CACP,EAAC,MAAD,CAAK,UAAU,mBAAW,EAAc,CAAA,CACrC,GAIT,SAAS,SAAS,CAAE,YAAW,UAAU,GAAO,GAAG,GAAwB,CAGzE,OACE,EAHW,EAAU,EAAK,KAAO,OAGjC,CACE,YAAU,YACV,UAAW,EACT,+EACA,GAAW,SACX,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,sBAAsB,EAA2B,EAAW,CAAE,QAAS,EAAG,CAAmB,CACpG,OAAO,EAAM,SAAS,IAAI,EAAW,GAAU,CAC7C,GAAI,CAAC,EAAM,eAAe,EAAM,CAC9B,OAAO,EAGT,GAAI,EAAM,OAAS,EAAM,SAAU,CACjC,IAAM,EAAW,EAEjB,OAAO,EAAC,EAAM,SAAP,CAAA,SAAiC,sBAAsB,EAAS,MAAM,SAAU,EAAS,CAAkB,CAAtF,EAAM,IAAgF,CASpH,OANI,EAAM,OAAS,SACV,EAAM,aAAa,EAAoE,CAC5F,QAAS,EAAS,UACnB,CAAC,CAGG,GACP,CAGJ,SAAS,kBAAkB,EAAoE,CAC7F,OAAO,EAAM,eAAe,EAAM,EAAI,EAAM,OAAS"}
1
+ {"version":3,"file":"list.js","names":[],"sources":["../../src/components/list.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\ntype ListType = 'unordered' | 'ordered'\n\ntype ListContextValue = {\n type: ListType\n}\n\ntype InternalListItemProps = {\n __index?: number\n}\n\nconst ListContext = React.createContext<ListContextValue>({\n type: 'unordered'\n})\n\nconst listVariants = cva('m-0 flex list-none flex-col p-0 text-foreground', {\n variants: {\n size: {\n xs: 'text-xs',\n sm: 'text-sm',\n md: 'text-base',\n lg: 'text-lg',\n xl: 'text-xl'\n },\n spacing: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n xl: 'gap-6'\n }\n },\n defaultVariants: {\n size: 'md',\n spacing: 'md'\n }\n})\n\nexport type ListProps = Omit<React.ComponentProps<'ul'>, 'ref' | 'type'> &\n Omit<React.ComponentProps<'ol'>, 'ref' | 'type'> &\n VariantProps<typeof listVariants> & {\n type?: ListType\n }\n\nexport type ListItemProps = React.ComponentProps<'li'>\n\nexport type ListIconProps = React.ComponentProps<'span'> & {\n asChild?: boolean\n}\n\nfunction List({ className, children, type = 'unordered', size = 'md', spacing = 'md', ...props }: ListProps) {\n const Comp = type === 'ordered' ? 'ol' : 'ul'\n\n return (\n <ListContext.Provider value={{ type }}>\n <Comp\n data-slot=\"list\"\n data-type={type}\n data-size={size}\n data-spacing={spacing}\n className={cn(listVariants({ size, spacing }), className)}\n {...props}\n >\n {injectListItemIndices(children)}\n </Comp>\n </ListContext.Provider>\n )\n}\n\nfunction ListItem({ className, children, __index, ...props }: ListItemProps & InternalListItemProps) {\n const { type } = React.useContext(ListContext)\n const items = React.Children.toArray(children)\n const icon = items.find(isListIconElement) ?? null\n const content = icon ? items.filter((item) => item !== icon) : items\n const isOrdered = type === 'ordered'\n\n return (\n <li\n data-slot=\"list-item\"\n data-type={type}\n data-has-icon={icon ? 'true' : 'false'}\n className={cn('grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3', className)}\n {...props}\n >\n <span\n aria-hidden=\"true\"\n className={cn(\n 'shrink-0',\n icon && 'flex min-h-5 min-w-4 items-center justify-center pt-0.5 text-primary [&_svg]:size-[1em]',\n !icon && isOrdered && 'min-w-7 pt-0.5 text-right font-medium tabular-nums text-muted-foreground',\n !icon && !isOrdered && 'flex min-h-5 min-w-4 items-start justify-center pt-[0.45em] text-muted-foreground'\n )}\n >\n {icon ?? (isOrdered ? `${(__index ?? 0) + 1}.` : <span className=\"size-1.5 rounded-full bg-current\" />)}\n </span>\n <div className=\"min-w-0\">{content}</div>\n </li>\n )\n}\n\nfunction ListIcon({ className, asChild = false, ...props }: ListIconProps) {\n const Comp = asChild ? Slot.Root : 'span'\n\n return (\n <Comp\n data-slot=\"list-icon\"\n className={cn(\n 'inline-flex shrink-0 items-center justify-center text-primary [&>svg]:size-4',\n asChild && 'size-4',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction injectListItemIndices(children: React.ReactNode, indexRef = { current: 0 }): React.ReactNode {\n return React.Children.map(children, (child) => {\n if (!React.isValidElement(child)) {\n return child\n }\n\n if (child.type === React.Fragment) {\n const fragment = child as React.ReactElement<{ children?: React.ReactNode }>\n\n return <React.Fragment key={child.key}>{injectListItemIndices(fragment.props.children, indexRef)}</React.Fragment>\n }\n\n if (child.type === ListItem) {\n return React.cloneElement(child as React.ReactElement<ListItemProps & InternalListItemProps>, {\n __index: indexRef.current++\n })\n }\n\n return child\n })\n}\n\nfunction isListIconElement(child: React.ReactNode): child is React.ReactElement<ListIconProps> {\n return React.isValidElement(child) && child.type === ListIcon\n}\n\nexport { List, ListIcon, ListItem, listVariants }\n"],"mappings":"2NAiBA,MAAM,EAAc,EAAM,cAAgC,CACxD,KAAM,YACP,CAAC,CAEI,EAAe,EAAI,kDAAmD,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,UACJ,GAAI,UACJ,GAAI,YACJ,GAAI,UACJ,GAAI,UACL,CACD,QAAS,CACP,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACL,CACF,CACD,gBAAiB,CACf,KAAM,KACN,QAAS,KACV,CACF,CAAC,CAcF,SAAS,KAAK,CAAE,YAAW,WAAU,OAAO,YAAa,OAAO,KAAM,UAAU,KAAM,GAAG,GAAoB,CAC3G,IAAM,EAAO,IAAS,UAAY,KAAO,KAEzC,OACE,EAAC,EAAY,SAAb,CAAsB,MAAO,CAAE,OAAM,UACnC,EAAC,EAAD,CACE,YAAU,OACV,YAAW,EACX,YAAW,EACX,eAAc,EACd,UAAW,EAAG,EAAa,CAAE,OAAM,UAAS,CAAC,CAAE,EAAU,CACzD,GAAI,WAEH,sBAAsB,EAAS,CAC3B,CAAA,CACc,CAAA,CAI3B,SAAS,SAAS,CAAE,YAAW,WAAU,UAAS,GAAG,GAAgD,CACnG,GAAM,CAAE,QAAS,EAAM,WAAW,EAAY,CACxC,EAAQ,EAAM,SAAS,QAAQ,EAAS,CACxC,EAAO,EAAM,KAAK,kBAAkB,EAAI,KACxC,EAAU,EAAO,EAAM,OAAQ,GAAS,IAAS,EAAK,CAAG,EACzD,EAAY,IAAS,UAE3B,OACE,EAAC,KAAD,CACE,YAAU,YACV,YAAW,EACX,gBAAe,EAAO,OAAS,QAC/B,UAAW,EAAG,0DAA2D,EAAU,CACnF,GAAI,WALN,CAOE,EAAC,OAAD,CACE,cAAY,OACZ,UAAW,EACT,WACA,GAAQ,0FACR,CAAC,GAAQ,GAAa,2EACtB,CAAC,GAAQ,CAAC,GAAa,oFACxB,UAEA,IAAS,EAAY,IAAI,GAAW,GAAK,EAAE,GAAK,EAAC,OAAD,CAAM,UAAU,mCAAqC,CAAA,EACjG,CAAA,CACP,EAAC,MAAD,CAAK,UAAU,mBAAW,EAAc,CAAA,CACrC,GAIT,SAAS,SAAS,CAAE,YAAW,UAAU,GAAO,GAAG,GAAwB,CAGzE,OACE,EAHW,EAAU,EAAK,KAAO,OAGjC,CACE,YAAU,YACV,UAAW,EACT,+EACA,GAAW,SACX,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,sBAAsB,EAA2B,EAAW,CAAE,QAAS,EAAG,CAAmB,CACpG,OAAO,EAAM,SAAS,IAAI,EAAW,GAAU,CAC7C,GAAI,CAAC,EAAM,eAAe,EAAM,CAC9B,OAAO,EAGT,GAAI,EAAM,OAAS,EAAM,SAAU,CACjC,IAAM,EAAW,EAEjB,OAAO,EAAC,EAAM,SAAP,CAAA,SAAiC,sBAAsB,EAAS,MAAM,SAAU,EAAS,CAAkB,CAAtF,EAAM,IAAgF,CASpH,OANI,EAAM,OAAS,SACV,EAAM,aAAa,EAAoE,CAC5F,QAAS,EAAS,UACnB,CAAC,CAGG,GACP,CAGJ,SAAS,kBAAkB,EAAoE,CAC7F,OAAO,EAAM,eAAe,EAAM,EAAI,EAAM,OAAS"}
@@ -4,7 +4,7 @@ import * as React from "react";
4
4
 
5
5
  //#region src/components/native-select.d.ts
6
6
  type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {
7
- size?: 'sm' | 'default';
7
+ size?: 'sm' | 'md';
8
8
  };
9
9
  type NativeSelectOptionProps = React.ComponentProps<'option'>;
10
10
  type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>;
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{IconSelector as t}from"@tabler/icons-react";import{jsx as n,jsxs as r}from"react/jsx-runtime";function NativeSelect({className:i,size:a=`default`,...o}){return r(`div`,{className:e(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,i),"data-slot":`native-select-wrapper`,"data-size":a,children:[n(`select`,{"data-slot":`native-select`,"data-size":a,className:e(`border-input dark:bg-input/30 dark:hover:bg-input/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none outline-none`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground`,`data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5`,`disabled:pointer-events-none disabled:cursor-not-allowed`),...o}),n(t,{className:`text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function NativeSelectOption({...e}){return n(`option`,{"data-slot":`native-select-option`,...e})}function NativeSelectOptGroup({className:t,...r}){return n(`optgroup`,{"data-slot":`native-select-optgroup`,className:e(t),...r})}export{NativeSelect,NativeSelectOptGroup,NativeSelectOption};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{IconSelector as t}from"@tabler/icons-react";import{jsx as n,jsxs as r}from"react/jsx-runtime";function NativeSelect({className:i,size:a=`md`,...o}){return r(`div`,{className:e(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,i),"data-slot":`native-select-wrapper`,"data-size":a,children:[n(`select`,{"data-slot":`native-select`,"data-size":a,className:e(`border-input dark:bg-input/30 dark:hover:bg-input/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none outline-none`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground`,`data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5`,`disabled:pointer-events-none disabled:cursor-not-allowed`),...o}),n(t,{className:`text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function NativeSelectOption({...e}){return n(`option`,{"data-slot":`native-select-option`,...e})}function NativeSelectOptGroup({className:t,...r}){return n(`optgroup`,{"data-slot":`native-select-optgroup`,className:e(t),...r})}export{NativeSelect,NativeSelectOptGroup,NativeSelectOption};
2
2
  //# sourceMappingURL=native-select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"native-select.js","names":[],"sources":["../../src/components/native-select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconSelector } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\n\nexport type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {\n size?: 'sm' | 'default'\n}\n\nexport type NativeSelectOptionProps = React.ComponentProps<'option'>\n\nexport type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>\n\nfunction NativeSelect({ className, size = 'default', ...props }: NativeSelectProps) {\n return (\n <div\n className={cn('group/native-select relative w-fit has-[select:disabled]:opacity-50', className)}\n data-slot=\"native-select-wrapper\"\n data-size={size}\n >\n <select\n data-slot=\"native-select\"\n data-size={size}\n className={cn(\n 'border-input dark:bg-input/30 dark:hover:bg-input/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground',\n 'data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5',\n 'disabled:pointer-events-none disabled:cursor-not-allowed'\n )}\n {...props}\n />\n <IconSelector\n className=\"text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none\"\n aria-hidden=\"true\"\n data-slot=\"native-select-icon\"\n />\n </div>\n )\n}\n\nfunction NativeSelectOption({ ...props }: NativeSelectOptionProps) {\n return <option data-slot=\"native-select-option\" {...props} />\n}\n\nfunction NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps) {\n return <optgroup data-slot=\"native-select-optgroup\" className={cn(className)} {...props} />\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption }\n"],"mappings":"uKAcA,SAAS,aAAa,CAAE,YAAW,OAAO,UAAW,GAAG,GAA4B,CAClF,OACE,EAAC,MAAD,CACE,UAAW,EAAG,sEAAuE,EAAU,CAC/F,YAAU,wBACV,YAAW,WAHb,CAKE,EAAC,SAAD,CACE,YAAU,gBACV,YAAW,EACX,UAAW,EACT,+LACA,4EACA,qKACA,2FACA,+FACA,2DACD,CACD,GAAI,EACJ,CAAA,CACF,EAAC,EAAD,CACE,UAAU,2GACV,cAAY,OACZ,YAAU,qBACV,CAAA,CACE,GAIV,SAAS,mBAAmB,CAAE,GAAG,GAAkC,CACjE,OAAO,EAAC,SAAD,CAAQ,YAAU,uBAAuB,GAAI,EAAS,CAAA,CAG/D,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OAAO,EAAC,WAAD,CAAU,YAAU,yBAAyB,UAAW,EAAG,EAAU,CAAE,GAAI,EAAS,CAAA"}
1
+ {"version":3,"file":"native-select.js","names":[],"sources":["../../src/components/native-select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconSelector } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\n\nexport type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {\n size?: 'sm' | 'md'\n}\n\nexport type NativeSelectOptionProps = React.ComponentProps<'option'>\n\nexport type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>\n\nfunction NativeSelect({ className, size = 'md', ...props }: NativeSelectProps) {\n return (\n <div\n className={cn('group/native-select relative w-fit has-[select:disabled]:opacity-50', className)}\n data-slot=\"native-select-wrapper\"\n data-size={size}\n >\n <select\n data-slot=\"native-select\"\n data-size={size}\n className={cn(\n 'border-input dark:bg-input/30 dark:hover:bg-input/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground',\n 'data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5',\n 'disabled:pointer-events-none disabled:cursor-not-allowed'\n )}\n {...props}\n />\n <IconSelector\n className=\"text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none\"\n aria-hidden=\"true\"\n data-slot=\"native-select-icon\"\n />\n </div>\n )\n}\n\nfunction NativeSelectOption({ ...props }: NativeSelectOptionProps) {\n return <option data-slot=\"native-select-option\" {...props} />\n}\n\nfunction NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps) {\n return <optgroup data-slot=\"native-select-optgroup\" className={cn(className)} {...props} />\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption }\n"],"mappings":"uKAcA,SAAS,aAAa,CAAE,YAAW,OAAO,KAAM,GAAG,GAA4B,CAC7E,OACE,EAAC,MAAD,CACE,UAAW,EAAG,sEAAuE,EAAU,CAC/F,YAAU,wBACV,YAAW,WAHb,CAKE,EAAC,SAAD,CACE,YAAU,gBACV,YAAW,EACX,UAAW,EACT,+LACA,4EACA,qKACA,2FACA,+FACA,2DACD,CACD,GAAI,EACJ,CAAA,CACF,EAAC,EAAD,CACE,UAAU,2GACV,cAAY,OACZ,YAAU,qBACV,CAAA,CACE,GAIV,SAAS,mBAAmB,CAAE,GAAG,GAAkC,CACjE,OAAO,EAAC,SAAD,CAAQ,YAAU,uBAAuB,GAAI,EAAS,CAAA,CAG/D,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OAAO,EAAC,WAAD,CAAU,YAAU,yBAAyB,UAAW,EAAG,EAAU,CAAE,GAAI,EAAS,CAAA"}
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{IconChevronLeft as n,IconChevronRight as r,IconDots as i}from"@tabler/icons-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function Pagination({className:t,...n}){return a(`nav`,{"aria-label":`pagination`,"data-slot":`pagination`,className:e(`mx-auto flex w-full justify-center`,t),...n})}function PaginationContent({className:t,...n}){return a(`ul`,{"data-slot":`pagination-content`,className:e(`flex items-center gap-0.5`,t),...n})}function PaginationItem({...e}){return a(`li`,{"data-slot":`pagination-item`,...e})}function PaginationLink({className:n,isActive:r,size:i=`icon`,color:o=`zinc`,...s}){return a(t,{asChild:!0,variant:r?`outline`:`ghost`,color:o,size:i,className:e(n),children:a(`a`,{"aria-current":r?`page`:void 0,"data-slot":`pagination-link`,"data-active":r,...s})})}function PaginationPrevious({className:t,text:r=`Previous`,...i}){return o(PaginationLink,{"aria-label":`Go to previous page`,size:`default`,className:e(`pl-1.5!`,t),...i,children:[a(n,{"data-icon":`inline-start`}),a(`span`,{className:`hidden sm:block`,children:r})]})}function PaginationNext({className:t,text:n=`Next`,...i}){return o(PaginationLink,{"aria-label":`Go to next page`,size:`default`,className:e(`pr-1.5!`,t),...i,children:[a(`span`,{className:`hidden sm:block`,children:n}),a(r,{"data-icon":`inline-end`})]})}function PaginationEllipsis({className:t,...n}){return o(`span`,{"aria-hidden":!0,"data-slot":`pagination-ellipsis`,className:e(`flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4`,t),...n,children:[a(i,{}),a(`span`,{className:`sr-only`,children:`More pages`})]})}export{Pagination,PaginationContent,PaginationEllipsis,PaginationItem,PaginationLink,PaginationNext,PaginationPrevious};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{IconChevronLeft as n,IconChevronRight as r,IconDots as i}from"@tabler/icons-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function Pagination({className:t,...n}){return a(`nav`,{"aria-label":`pagination`,"data-slot":`pagination`,className:e(`mx-auto flex w-full justify-center`,t),...n})}function PaginationContent({className:t,...n}){return a(`ul`,{"data-slot":`pagination-content`,className:e(`flex items-center gap-0.5`,t),...n})}function PaginationItem({...e}){return a(`li`,{"data-slot":`pagination-item`,...e})}function PaginationLink({className:n,isActive:r,size:i=`icon`,color:o=`zinc`,...s}){return a(t,{asChild:!0,variant:r?`outline`:`ghost`,color:o,size:i,className:e(n),children:a(`a`,{"aria-current":r?`page`:void 0,"data-slot":`pagination-link`,"data-active":r,...s})})}function PaginationPrevious({className:t,text:r=`Previous`,...i}){return o(PaginationLink,{"aria-label":`Go to previous page`,size:`md`,className:e(`pl-1.5!`,t),...i,children:[a(n,{"data-icon":`inline-start`}),a(`span`,{className:`hidden sm:block`,children:r})]})}function PaginationNext({className:t,text:n=`Next`,...i}){return o(PaginationLink,{"aria-label":`Go to next page`,size:`md`,className:e(`pr-1.5!`,t),...i,children:[a(`span`,{className:`hidden sm:block`,children:n}),a(r,{"data-icon":`inline-end`})]})}function PaginationEllipsis({className:t,...n}){return o(`span`,{"aria-hidden":!0,"data-slot":`pagination-ellipsis`,className:e(`flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4`,t),...n,children:[a(i,{}),a(`span`,{className:`sr-only`,children:`More pages`})]})}export{Pagination,PaginationContent,PaginationEllipsis,PaginationItem,PaginationLink,PaginationNext,PaginationPrevious};
2
2
  //# sourceMappingURL=pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.js","names":[],"sources":["../../src/components/pagination.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconChevronLeft, IconChevronRight, IconDots } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\nexport type PaginationProps = React.ComponentProps<'nav'>\n\nexport type PaginationContentProps = React.ComponentProps<'ul'>\n\nexport type PaginationItemProps = React.ComponentProps<'li'>\n\nexport type PaginationLinkProps = {\n isActive?: boolean\n} & Pick<React.ComponentProps<typeof Button>, 'size' | 'color'> &\n React.ComponentProps<'a'>\n\nexport type PaginationPreviousProps = React.ComponentProps<typeof PaginationLink> & {\n text?: string\n}\n\nexport type PaginationNextProps = React.ComponentProps<typeof PaginationLink> & {\n text?: string\n}\n\nexport type PaginationEllipsisProps = React.ComponentProps<'span'>\n\nfunction Pagination({ className, ...props }: PaginationProps) {\n return (\n <nav\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 }: PaginationContentProps) {\n return <ul data-slot=\"pagination-content\" className={cn('flex items-center gap-0.5', className)} {...props} />\n}\n\nfunction PaginationItem({ ...props }: PaginationItemProps) {\n return <li data-slot=\"pagination-item\" {...props} />\n}\n\nfunction PaginationLink({ className, isActive, size = 'icon', color = 'zinc', ...props }: PaginationLinkProps) {\n return (\n <Button asChild variant={isActive ? 'outline' : 'ghost'} color={color} size={size} className={cn(className)}>\n <a aria-current={isActive ? 'page' : undefined} data-slot=\"pagination-link\" data-active={isActive} {...props} />\n </Button>\n )\n}\n\nfunction PaginationPrevious({ className, text = 'Previous', ...props }: PaginationPreviousProps) {\n return (\n <PaginationLink aria-label=\"Go to previous page\" size=\"default\" className={cn('pl-1.5!', className)} {...props}>\n <IconChevronLeft data-icon=\"inline-start\" />\n <span className=\"hidden sm:block\">{text}</span>\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({ className, text = 'Next', ...props }: PaginationNextProps) {\n return (\n <PaginationLink aria-label=\"Go to next page\" size=\"default\" className={cn('pr-1.5!', className)} {...props}>\n <span className=\"hidden sm:block\">{text}</span>\n <IconChevronRight data-icon=\"inline-end\" />\n </PaginationLink>\n )\n}\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\"flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n <IconDots />\n <span className=\"sr-only\">More pages</span>\n </span>\n )\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious\n}\n"],"mappings":"mPA4BA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAD,CACE,aAAW,aACX,YAAU,aACV,UAAW,EAAG,qCAAsC,EAAU,CAC9D,GAAI,EACJ,CAAA,CAIN,SAAS,kBAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,OAAO,EAAC,KAAD,CAAI,YAAU,qBAAqB,UAAW,EAAG,4BAA6B,EAAU,CAAE,GAAI,EAAS,CAAA,CAGhH,SAAS,eAAe,CAAE,GAAG,GAA8B,CACzD,OAAO,EAAC,KAAD,CAAI,YAAU,kBAAkB,GAAI,EAAS,CAAA,CAGtD,SAAS,eAAe,CAAE,YAAW,WAAU,OAAO,OAAQ,QAAQ,OAAQ,GAAG,GAA8B,CAC7G,OACE,EAAC,EAAD,CAAQ,QAAA,GAAQ,QAAS,EAAW,UAAY,QAAgB,QAAa,OAAM,UAAW,EAAG,EAAU,UACzG,EAAC,IAAD,CAAG,eAAc,EAAW,OAAS,IAAA,GAAW,YAAU,kBAAkB,cAAa,EAAU,GAAI,EAAS,CAAA,CACzG,CAAA,CAIb,SAAS,mBAAmB,CAAE,YAAW,OAAO,WAAY,GAAG,GAAkC,CAC/F,OACE,EAAC,eAAD,CAAgB,aAAW,sBAAsB,KAAK,UAAU,UAAW,EAAG,UAAW,EAAU,CAAE,GAAI,WAAzG,CACE,EAAC,EAAD,CAAiB,YAAU,eAAiB,CAAA,CAC5C,EAAC,OAAD,CAAM,UAAU,2BAAmB,EAAY,CAAA,CAChC,GAIrB,SAAS,eAAe,CAAE,YAAW,OAAO,OAAQ,GAAG,GAA8B,CACnF,OACE,EAAC,eAAD,CAAgB,aAAW,kBAAkB,KAAK,UAAU,UAAW,EAAG,UAAW,EAAU,CAAE,GAAI,WAArG,CACE,EAAC,OAAD,CAAM,UAAU,2BAAmB,EAAY,CAAA,CAC/C,EAAC,EAAD,CAAkB,YAAU,aAAe,CAAA,CAC5B,GAIrB,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OACE,EAAC,OAAD,CACE,cAAA,GACA,YAAU,sBACV,UAAW,EAAG,+EAAgF,EAAU,CACxG,GAAI,WAJN,CAME,EAAC,EAAD,EAAY,CAAA,CACZ,EAAC,OAAD,CAAM,UAAU,mBAAU,aAAiB,CAAA,CACtC"}
1
+ {"version":3,"file":"pagination.js","names":[],"sources":["../../src/components/pagination.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconChevronLeft, IconChevronRight, IconDots } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\nexport type PaginationProps = React.ComponentProps<'nav'>\n\nexport type PaginationContentProps = React.ComponentProps<'ul'>\n\nexport type PaginationItemProps = React.ComponentProps<'li'>\n\nexport type PaginationLinkProps = {\n isActive?: boolean\n} & Pick<React.ComponentProps<typeof Button>, 'size' | 'color'> &\n React.ComponentProps<'a'>\n\nexport type PaginationPreviousProps = React.ComponentProps<typeof PaginationLink> & {\n text?: string\n}\n\nexport type PaginationNextProps = React.ComponentProps<typeof PaginationLink> & {\n text?: string\n}\n\nexport type PaginationEllipsisProps = React.ComponentProps<'span'>\n\nfunction Pagination({ className, ...props }: PaginationProps) {\n return (\n <nav\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 }: PaginationContentProps) {\n return <ul data-slot=\"pagination-content\" className={cn('flex items-center gap-0.5', className)} {...props} />\n}\n\nfunction PaginationItem({ ...props }: PaginationItemProps) {\n return <li data-slot=\"pagination-item\" {...props} />\n}\n\nfunction PaginationLink({ className, isActive, size = 'icon', color = 'zinc', ...props }: PaginationLinkProps) {\n return (\n <Button asChild variant={isActive ? 'outline' : 'ghost'} color={color} size={size} className={cn(className)}>\n <a aria-current={isActive ? 'page' : undefined} data-slot=\"pagination-link\" data-active={isActive} {...props} />\n </Button>\n )\n}\n\nfunction PaginationPrevious({ className, text = 'Previous', ...props }: PaginationPreviousProps) {\n return (\n <PaginationLink aria-label=\"Go to previous page\" size=\"md\" className={cn('pl-1.5!', className)} {...props}>\n <IconChevronLeft data-icon=\"inline-start\" />\n <span className=\"hidden sm:block\">{text}</span>\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({ className, text = 'Next', ...props }: PaginationNextProps) {\n return (\n <PaginationLink aria-label=\"Go to next page\" size=\"md\" className={cn('pr-1.5!', className)} {...props}>\n <span className=\"hidden sm:block\">{text}</span>\n <IconChevronRight data-icon=\"inline-end\" />\n </PaginationLink>\n )\n}\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\"flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n <IconDots />\n <span className=\"sr-only\">More pages</span>\n </span>\n )\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious\n}\n"],"mappings":"mPA4BA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAD,CACE,aAAW,aACX,YAAU,aACV,UAAW,EAAG,qCAAsC,EAAU,CAC9D,GAAI,EACJ,CAAA,CAIN,SAAS,kBAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,OAAO,EAAC,KAAD,CAAI,YAAU,qBAAqB,UAAW,EAAG,4BAA6B,EAAU,CAAE,GAAI,EAAS,CAAA,CAGhH,SAAS,eAAe,CAAE,GAAG,GAA8B,CACzD,OAAO,EAAC,KAAD,CAAI,YAAU,kBAAkB,GAAI,EAAS,CAAA,CAGtD,SAAS,eAAe,CAAE,YAAW,WAAU,OAAO,OAAQ,QAAQ,OAAQ,GAAG,GAA8B,CAC7G,OACE,EAAC,EAAD,CAAQ,QAAA,GAAQ,QAAS,EAAW,UAAY,QAAgB,QAAa,OAAM,UAAW,EAAG,EAAU,UACzG,EAAC,IAAD,CAAG,eAAc,EAAW,OAAS,IAAA,GAAW,YAAU,kBAAkB,cAAa,EAAU,GAAI,EAAS,CAAA,CACzG,CAAA,CAIb,SAAS,mBAAmB,CAAE,YAAW,OAAO,WAAY,GAAG,GAAkC,CAC/F,OACE,EAAC,eAAD,CAAgB,aAAW,sBAAsB,KAAK,KAAK,UAAW,EAAG,UAAW,EAAU,CAAE,GAAI,WAApG,CACE,EAAC,EAAD,CAAiB,YAAU,eAAiB,CAAA,CAC5C,EAAC,OAAD,CAAM,UAAU,2BAAmB,EAAY,CAAA,CAChC,GAIrB,SAAS,eAAe,CAAE,YAAW,OAAO,OAAQ,GAAG,GAA8B,CACnF,OACE,EAAC,eAAD,CAAgB,aAAW,kBAAkB,KAAK,KAAK,UAAW,EAAG,UAAW,EAAU,CAAE,GAAI,WAAhG,CACE,EAAC,OAAD,CAAM,UAAU,2BAAmB,EAAY,CAAA,CAC/C,EAAC,EAAD,CAAkB,YAAU,aAAe,CAAA,CAC5B,GAIrB,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OACE,EAAC,OAAD,CACE,cAAA,GACA,YAAU,sBACV,UAAW,EAAG,+EAAgF,EAAU,CACxG,GAAI,WAJN,CAME,EAAC,EAAD,EAAY,CAAA,CACZ,EAAC,OAAD,CAAM,UAAU,mBAAU,aAAiB,CAAA,CACtC"}
@@ -1,17 +1,38 @@
1
1
  import { n as __name } from "../chunk-CHh1Zzun.js";
2
+ import { UIColor } from "../lib/color.js";
3
+ import { LabelProps } from "./label.js";
2
4
  import { RadioGroup as RadioGroup$1 } from "radix-ui";
3
5
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
+ import { VariantProps } from "class-variance-authority";
4
7
  import * as React from "react";
8
+ import { ReactNode } from "react";
9
+ import * as _$class_variance_authority_types0 from "class-variance-authority/types";
5
10
 
6
11
  //#region src/components/radio-group.d.ts
7
- type RadioGroupProps = React.ComponentProps<typeof RadioGroup$1.Root>;
8
- type RadioGroupItemProps = React.ComponentProps<typeof RadioGroup$1.Item>;
12
+ type RadioGroupProps = React.ComponentProps<typeof RadioGroup$1.Root> & {
13
+ color?: UIColor;
14
+ };
15
+ declare const radioGroupItemVariants: (props?: ({
16
+ color?: "primary" | "brand" | "gray" | "zinc" | "red" | "yellow" | "blue" | "indigo" | "pink" | "green" | null | undefined;
17
+ size?: "sm" | "md" | "lg" | null | undefined;
18
+ } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
19
+ type RadioGroupItemProps = React.ComponentProps<typeof RadioGroup$1.Item> & VariantProps<typeof radioGroupItemVariants> & {
20
+ color?: UIColor;
21
+ label?: ReactNode;
22
+ labelProps?: Omit<LabelProps, 'children' | 'htmlFor'>;
23
+ };
9
24
  declare function RadioGroup({
10
25
  className,
26
+ color,
11
27
  ...props
12
28
  }: RadioGroupProps): _$react_jsx_runtime0.JSX.Element;
13
29
  declare function RadioGroupItem({
14
30
  className,
31
+ color,
32
+ id,
33
+ label,
34
+ labelProps,
35
+ size,
15
36
  ...props
16
37
  }: RadioGroupItemProps): _$react_jsx_runtime0.JSX.Element;
17
38
  //#endregion
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{RadioGroup as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function RadioGroup({className:r,...i}){return n(t.Root,{"data-slot":`radio-group`,className:e(`grid w-full gap-2`,r),...i})}function RadioGroupItem({className:r,...i}){return n(t.Item,{"data-slot":`radio-group-item`,className:e(`group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none`,`after:absolute after:-inset-x-3 after:-inset-y-2`,`focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20`,`aria-invalid:aria-checked:border-primary dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`dark:bg-input/30`,`data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary`,r),...i,children:n(t.Indicator,{"data-slot":`radio-group-indicator`,className:`flex size-4 items-center justify-center`,children:n(`span`,{className:e(`absolute top-1/2 left-1/2 size-2 rounded-full bg-primary-foreground`,`-translate-x-1/2 -translate-y-1/2`)})})})}export{RadioGroup,RadioGroupItem};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{selectionControlColorVariants as t}from"../lib/color.js";import{Label as n}from"./label.js";import{RadioGroup as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{cva as o}from"class-variance-authority";import{useId as s}from"react";const c=o([`group/radio-group-item peer relative flex aspect-square shrink-0 rounded-full border border-input outline-none`,`after:absolute after:-inset-x-3 after:-inset-y-2`,`focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20`,`aria-invalid:aria-checked:border-(--selection-control) dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`dark:bg-input/30`,`data-checked:border-(--selection-control) data-checked:bg-(--selection-control) data-checked:text-(--selection-control-foreground)`],{variants:{color:t,size:{sm:`size-4`,md:`size-4.5`,lg:`size-5.5`}},defaultVariants:{size:`md`}}),l=o(`flex items-center justify-center`,{variants:{size:{sm:`size-4`,md:`size-4.5`,lg:`size-5.5`}},defaultVariants:{size:`md`}}),u=o(`absolute top-1/2 left-1/2 rounded-full bg-primary-foreground`,{variants:{size:{sm:`size-1.5`,md:`size-2`,lg:`size-2.5`}},defaultVariants:{size:`md`}}),d=o(``,{variants:{size:{sm:`text-xs`,md:`text-sm`,lg:`text-xl`}},defaultVariants:{size:`md`}});function RadioGroup({className:n,color:a=`primary`,...o}){return i(r.Root,{"data-slot":`radio-group`,"data-color":a,className:e(`grid w-full gap-2`,t[a],n),...o})}function RadioGroupItem({className:t,color:o,id:f,label:p,labelProps:m,size:h=`md`,...g}){let _=s(),v=p!==void 0,y=f??_,{className:b,...x}=m??{},S=i(r.Item,{"data-slot":`radio-group-item`,"data-color":o,"data-size":h,id:v?y:f,className:e(c({color:o,size:h}),t),...g,children:i(r.Indicator,{"data-slot":`radio-group-indicator`,className:e(l({size:h})),children:i(`span`,{className:e(u({size:h}),`-translate-x-1/2 -translate-y-1/2`)})})});return v?a(`div`,{"data-slot":`radio-group-item-field`,className:`flex items-center gap-2`,children:[S,i(n,{...x,htmlFor:y,className:e(d({size:h}),b),children:p})]}):S}export{RadioGroup,RadioGroupItem};
2
2
  //# sourceMappingURL=radio-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","names":["RadioGroupPrimitive"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type RadioGroupProps = React.ComponentProps<typeof RadioGroupPrimitive.Root>\n\nexport type RadioGroupItemProps = React.ComponentProps<typeof RadioGroupPrimitive.Item>\n\nfunction RadioGroup({ className, ...props }: RadioGroupProps) {\n return <RadioGroupPrimitive.Root data-slot=\"radio-group\" className={cn('grid w-full gap-2', className)} {...props} />\n}\n\nfunction RadioGroupItem({ className, ...props }: RadioGroupItemProps) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n 'group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none',\n 'after:absolute after:-inset-x-3 after:-inset-y-2',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20',\n 'aria-invalid:aria-checked:border-primary dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'dark:bg-input/30',\n 'data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary',\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"flex size-4 items-center justify-center\"\n >\n <span\n className={cn(\n 'absolute top-1/2 left-1/2 size-2 rounded-full bg-primary-foreground',\n '-translate-x-1/2 -translate-y-1/2'\n )}\n />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n}\n\nexport { RadioGroup, RadioGroupItem }\n"],"mappings":"gJAUA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OAAO,EAACA,EAAoB,KAArB,CAA0B,YAAU,cAAc,UAAW,EAAG,oBAAqB,EAAU,CAAE,GAAI,EAAS,CAAA,CAGvH,SAAS,eAAe,CAAE,YAAW,GAAG,GAA8B,CACpE,OACE,EAACA,EAAoB,KAArB,CACE,YAAU,mBACV,UAAW,EACT,wHACA,mDACA,4EACA,kDACA,uFACA,yHACA,mBACA,wHACA,EACD,CACD,GAAI,WAEJ,EAACA,EAAoB,UAArB,CACE,YAAU,wBACV,UAAU,mDAEV,EAAC,OAAD,CACE,UAAW,EACT,sEACA,oCACD,CACD,CAAA,CAC4B,CAAA,CACP,CAAA"}
1
+ {"version":3,"file":"radio-group.js","names":["RadioGroupPrimitive","Label"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["import type * as React from 'react'\nimport { type ReactNode, useId } from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui'\n\nimport type { UIColor } from '../lib/color'\nimport { selectionControlColorVariants } from '../lib/color'\nimport { cn } from '../lib/utils'\nimport { Label, type LabelProps } from './label'\n\nexport type RadioGroupProps = React.ComponentProps<typeof RadioGroupPrimitive.Root> & {\n color?: UIColor\n}\n\nconst radioGroupItemVariants = cva(\n [\n 'group/radio-group-item peer relative flex aspect-square shrink-0 rounded-full border border-input outline-none',\n 'after:absolute after:-inset-x-3 after:-inset-y-2',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20',\n 'aria-invalid:aria-checked:border-(--selection-control) dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'dark:bg-input/30',\n 'data-checked:border-(--selection-control) data-checked:bg-(--selection-control) data-checked:text-(--selection-control-foreground)'\n ],\n {\n variants: {\n color: selectionControlColorVariants,\n size: {\n sm: 'size-4',\n md: 'size-4.5',\n lg: 'size-5.5'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n }\n)\n\nconst radioGroupIndicatorVariants = cva('flex items-center justify-center', {\n variants: {\n size: {\n sm: 'size-4',\n md: 'size-4.5',\n lg: 'size-5.5'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nconst radioGroupIndicatorDotVariants = cva('absolute top-1/2 left-1/2 rounded-full bg-primary-foreground', {\n variants: {\n size: {\n sm: 'size-1.5',\n md: 'size-2',\n lg: 'size-2.5'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nconst radioGroupItemLabelVariants = cva('', {\n variants: {\n size: {\n sm: 'text-xs',\n md: 'text-sm',\n lg: 'text-xl'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nexport type RadioGroupItemProps = React.ComponentProps<typeof RadioGroupPrimitive.Item> &\n VariantProps<typeof radioGroupItemVariants> & {\n color?: UIColor\n label?: ReactNode\n labelProps?: Omit<LabelProps, 'children' | 'htmlFor'>\n }\n\nfunction RadioGroup({ className, color = 'primary', ...props }: RadioGroupProps) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n data-color={color}\n className={cn('grid w-full gap-2', selectionControlColorVariants[color], className)}\n {...props}\n />\n )\n}\n\nfunction RadioGroupItem({ className, color, id, label, labelProps, size = 'md', ...props }: RadioGroupItemProps) {\n const generatedId = useId()\n const hasLabel = label !== undefined\n const resolvedId = id ?? generatedId\n const { className: labelClassName, ...labelRootProps } = labelProps ?? {}\n\n const item = (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n data-color={color}\n data-size={size}\n id={hasLabel ? resolvedId : id}\n className={cn(radioGroupItemVariants({ color, size }), className)}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className={cn(radioGroupIndicatorVariants({ size }))}\n >\n <span className={cn(radioGroupIndicatorDotVariants({ size }), '-translate-x-1/2 -translate-y-1/2')} />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n\n if (!hasLabel) {\n return item\n }\n\n return (\n <div data-slot=\"radio-group-item-field\" className=\"flex items-center gap-2\">\n {item}\n <Label\n {...labelRootProps}\n htmlFor={resolvedId}\n className={cn(radioGroupItemLabelVariants({ size }), labelClassName)}\n >\n {label}\n </Label>\n </div>\n )\n}\n\nexport { RadioGroup, RadioGroupItem }\n"],"mappings":"0UAeA,MAAM,EAAyB,EAC7B,CACE,iHACA,mDACA,4EACA,kDACA,uFACA,uIACA,mBACA,qIACD,CACD,CACE,SAAU,CACR,MAAO,EACP,KAAM,CACJ,GAAI,SACJ,GAAI,WACJ,GAAI,WACL,CACF,CACD,gBAAiB,CACf,KAAM,KACP,CACF,CACF,CAEK,EAA8B,EAAI,mCAAoC,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,SACJ,GAAI,WACJ,GAAI,WACL,CACF,CACD,gBAAiB,CACf,KAAM,KACP,CACF,CAAC,CAEI,EAAiC,EAAI,+DAAgE,CACzG,SAAU,CACR,KAAM,CACJ,GAAI,WACJ,GAAI,SACJ,GAAI,WACL,CACF,CACD,gBAAiB,CACf,KAAM,KACP,CACF,CAAC,CAEI,EAA8B,EAAI,GAAI,CAC1C,SAAU,CACR,KAAM,CACJ,GAAI,UACJ,GAAI,UACJ,GAAI,UACL,CACF,CACD,gBAAiB,CACf,KAAM,KACP,CACF,CAAC,CASF,SAAS,WAAW,CAAE,YAAW,QAAQ,UAAW,GAAG,GAA0B,CAC/E,OACE,EAACA,EAAoB,KAArB,CACE,YAAU,cACV,aAAY,EACZ,UAAW,EAAG,oBAAqB,EAA8B,GAAQ,EAAU,CACnF,GAAI,EACJ,CAAA,CAIN,SAAS,eAAe,CAAE,YAAW,QAAO,KAAI,QAAO,aAAY,OAAO,KAAM,GAAG,GAA8B,CAC/G,IAAM,EAAc,GAAO,CACrB,EAAW,IAAU,IAAA,GACrB,EAAa,GAAM,EACnB,CAAE,UAAW,EAAgB,GAAG,GAAmB,GAAc,EAAE,CAEnE,EACJ,EAACA,EAAoB,KAArB,CACE,YAAU,mBACV,aAAY,EACZ,YAAW,EACX,GAAI,EAAW,EAAa,EAC5B,UAAW,EAAG,EAAuB,CAAE,QAAO,OAAM,CAAC,CAAE,EAAU,CACjE,GAAI,WAEJ,EAACA,EAAoB,UAArB,CACE,YAAU,wBACV,UAAW,EAAG,EAA4B,CAAE,OAAM,CAAC,CAAC,UAEpD,EAAC,OAAD,CAAM,UAAW,EAAG,EAA+B,CAAE,OAAM,CAAC,CAAE,oCAAoC,CAAI,CAAA,CACxE,CAAA,CACP,CAAA,CAO7B,OAJK,EAKH,EAAC,MAAD,CAAK,YAAU,yBAAyB,UAAU,mCAAlD,CACG,EACD,EAACC,EAAD,CACE,GAAI,EACJ,QAAS,EACT,UAAW,EAAG,EAA4B,CAAE,OAAM,CAAC,CAAE,EAAe,UAEnE,EACK,CAAA,CACJ,GAbC"}
@@ -8,7 +8,7 @@ type SelectProps = React.ComponentProps<typeof Select$1.Root>;
8
8
  type SelectGroupProps = React.ComponentProps<typeof Select$1.Group>;
9
9
  type SelectValueProps = React.ComponentProps<typeof Select$1.Value>;
10
10
  type SelectTriggerProps = React.ComponentProps<typeof Select$1.Trigger> & {
11
- size?: 'sm' | 'default';
11
+ size?: 'sm' | 'md';
12
12
  };
13
13
  type SelectContentProps = React.ComponentProps<typeof Select$1.Content>;
14
14
  type SelectLabelProps = React.ComponentProps<typeof Select$1.Label>;
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{IconCheck as t,IconChevronDown as n,IconChevronUp as r,IconSelector as i}from"@tabler/icons-react";import{Select as a}from"radix-ui";import{jsx as o,jsxs as s}from"react/jsx-runtime";function Select({...e}){return o(a.Root,{"data-slot":`select`,...e})}function SelectGroup({className:t,...n}){return o(a.Group,{"data-slot":`select-group`,className:e(`scroll-my-1 p-1`,t),...n})}function SelectValue({...e}){return o(a.Value,{"data-slot":`select-value`,...e})}function SelectTrigger({className:t,size:n=`default`,children:r,...c}){return s(a.Trigger,{"data-slot":`select-trigger`,"data-size":n,className:e(`border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none outline-none`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)]`,`*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`disabled:cursor-not-allowed disabled:opacity-50`,t),...c,children:[r,o(a.Icon,{asChild:!0,children:o(i,{className:`text-muted-foreground size-4 pointer-events-none`})})]})}function SelectContent({className:t,children:n,position:r=`item-aligned`,align:i=`center`,...c}){return o(a.Portal,{children:s(a.Content,{"data-slot":`select-content`,"data-align-trigger":r===`item-aligned`,className:e(`bg-popover text-popover-foreground ring-foreground/10 relative z-50 min-w-36 max-h-(--radix-select-content-available-height) rounded-lg shadow-md ring-1 duration-100 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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`,`data-[align-trigger=true]:animate-none`,r===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,t),position:r,align:i,...c,children:[o(SelectScrollUpButton,{}),o(a.Viewport,{"data-position":r,className:e(`data-[position=popper]:h-(--radix-select-trigger-height)`,`data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)`),children:n}),o(SelectScrollDownButton,{})]})})}function SelectLabel({className:t,...n}){return o(a.Label,{"data-slot":`select-label`,className:e(`text-muted-foreground px-1.5 py-1 text-xs`,t),...n})}function SelectItem({className:n,children:r,...i}){return s(a.Item,{"data-slot":`select-item`,className:e(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground`,`relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none`,`*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`data-disabled:pointer-events-none data-disabled:opacity-50`,n),...i,children:[o(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`,children:o(a.ItemIndicator,{children:o(t,{className:`pointer-events-none`})})}),o(a.ItemText,{children:r})]})}function SelectSeparator({className:t,...n}){return o(a.Separator,{"data-slot":`select-separator`,className:e(`bg-border -mx-1 my-1 h-px pointer-events-none`,t),...n})}function SelectScrollUpButton({className:t,...n}){return o(a.ScrollUpButton,{"data-slot":`select-scroll-up-button`,className:e(`bg-popover z-10 flex cursor-default items-center justify-center py-1`,`[&_svg:not([class*='size-'])]:size-4`,t),...n,children:o(r,{})})}function SelectScrollDownButton({className:t,...r}){return o(a.ScrollDownButton,{"data-slot":`select-scroll-down-button`,className:e(`bg-popover z-10 flex cursor-default items-center justify-center py-1`,`[&_svg:not([class*='size-'])]:size-4`,t),...r,children:o(n,{})})}export{Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{IconCheck as t,IconChevronDown as n,IconChevronUp as r,IconSelector as i}from"@tabler/icons-react";import{Select as a}from"radix-ui";import{jsx as o,jsxs as s}from"react/jsx-runtime";function Select({...e}){return o(a.Root,{"data-slot":`select`,...e})}function SelectGroup({className:t,...n}){return o(a.Group,{"data-slot":`select-group`,className:e(`scroll-my-1 p-1`,t),...n})}function SelectValue({...e}){return o(a.Value,{"data-slot":`select-value`,...e})}function SelectTrigger({className:t,size:n=`md`,children:r,...c}){return s(a.Trigger,{"data-slot":`select-trigger`,"data-size":n,className:e(`border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none outline-none`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`data-[size=md]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)]`,`*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`disabled:cursor-not-allowed disabled:opacity-50`,t),...c,children:[r,o(a.Icon,{asChild:!0,children:o(i,{className:`text-muted-foreground size-4 pointer-events-none`})})]})}function SelectContent({className:t,children:n,position:r=`item-aligned`,align:i=`center`,...c}){return o(a.Portal,{children:s(a.Content,{"data-slot":`select-content`,"data-align-trigger":r===`item-aligned`,className:e(`bg-popover text-popover-foreground ring-foreground/10 relative z-50 min-w-36 max-h-(--radix-select-content-available-height) rounded-lg shadow-md ring-1 duration-100 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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`,`data-[align-trigger=true]:animate-none`,r===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,t),position:r,align:i,...c,children:[o(SelectScrollUpButton,{}),o(a.Viewport,{"data-position":r,className:e(`data-[position=popper]:h-(--radix-select-trigger-height)`,`data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)`),children:n}),o(SelectScrollDownButton,{})]})})}function SelectLabel({className:t,...n}){return o(a.Label,{"data-slot":`select-label`,className:e(`text-muted-foreground px-1.5 py-1 text-xs`,t),...n})}function SelectItem({className:n,children:r,...i}){return s(a.Item,{"data-slot":`select-item`,className:e(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground`,`relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none`,`*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`data-disabled:pointer-events-none data-disabled:opacity-50`,n),...i,children:[o(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`,children:o(a.ItemIndicator,{children:o(t,{className:`pointer-events-none`})})}),o(a.ItemText,{children:r})]})}function SelectSeparator({className:t,...n}){return o(a.Separator,{"data-slot":`select-separator`,className:e(`bg-border -mx-1 my-1 h-px pointer-events-none`,t),...n})}function SelectScrollUpButton({className:t,...n}){return o(a.ScrollUpButton,{"data-slot":`select-scroll-up-button`,className:e(`bg-popover z-10 flex cursor-default items-center justify-center py-1`,`[&_svg:not([class*='size-'])]:size-4`,t),...n,children:o(r,{})})}function SelectScrollDownButton({className:t,...r}){return o(a.ScrollDownButton,{"data-slot":`select-scroll-down-button`,className:e(`bg-popover z-10 flex cursor-default items-center justify-center py-1`,`[&_svg:not([class*='size-'])]:size-4`,t),...r,children:o(n,{})})}export{Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue};
2
2
  //# sourceMappingURL=select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","names":["SelectPrimitive"],"sources":["../../src/components/select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconCheck, IconChevronDown, IconChevronUp, IconSelector } from '@tabler/icons-react'\nimport { Select as SelectPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type SelectProps = React.ComponentProps<typeof SelectPrimitive.Root>\n\nexport type SelectGroupProps = React.ComponentProps<typeof SelectPrimitive.Group>\n\nexport type SelectValueProps = React.ComponentProps<typeof SelectPrimitive.Value>\n\nexport type SelectTriggerProps = React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default'\n}\n\nexport type SelectContentProps = React.ComponentProps<typeof SelectPrimitive.Content>\n\nexport type SelectLabelProps = React.ComponentProps<typeof SelectPrimitive.Label>\n\nexport type SelectItemProps = React.ComponentProps<typeof SelectPrimitive.Item>\n\nexport type SelectSeparatorProps = React.ComponentProps<typeof SelectPrimitive.Separator>\n\nexport type SelectScrollUpButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>\n\nexport type SelectScrollDownButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>\n\nfunction Select({ ...props }: SelectProps) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({ className, ...props }: SelectGroupProps) {\n return <SelectPrimitive.Group data-slot=\"select-group\" className={cn('scroll-my-1 p-1', className)} {...props} />\n}\n\nfunction SelectValue({ ...props }: SelectValueProps) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({ className, size = 'default', children, ...props }: SelectTriggerProps) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n 'border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)]',\n '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <IconSelector className=\"text-muted-foreground size-4 pointer-events-none\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'item-aligned',\n align = 'center',\n ...props\n}: SelectContentProps) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === 'item-aligned'}\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 relative z-50 min-w-36 max-h-(--radix-select-content-available-height) rounded-lg shadow-md ring-1 duration-100 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95',\n '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',\n 'data-[align-trigger=true]:animate-none',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(\n 'data-[position=popper]:h-(--radix-select-trigger-height)',\n 'data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({ className, ...props }: SelectLabelProps) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-1.5 py-1 text-xs', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({ className, children, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none',\n '*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <IconCheck className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({ className, ...props }: SelectSeparatorProps) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border -mx-1 my-1 h-px pointer-events-none', className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonProps) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'bg-popover z-10 flex cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <IconChevronUp />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonProps) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'bg-popover z-10 flex cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <IconChevronDown />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue\n}\n"],"mappings":"gQA6BA,SAAS,OAAO,CAAE,GAAG,GAAsB,CACzC,OAAO,EAACA,EAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,EAAS,CAAA,CAG/D,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,UAAW,EAAG,kBAAmB,EAAU,CAAE,GAAI,EAAS,CAAA,CAGnH,SAAS,YAAY,CAAE,GAAG,GAA2B,CACnD,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,GAAI,EAAS,CAAA,CAGtE,SAAS,cAAc,CAAE,YAAW,OAAO,UAAW,WAAU,GAAG,GAA6B,CAC9F,OACE,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,YAAW,EACX,UAAW,EACT,qQACA,4EACA,qKACA,iGACA,qJACA,oFACA,kDACA,EACD,CACD,GAAI,WAbN,CAeG,EACD,EAACA,EAAgB,KAAjB,CAAsB,QAAA,YACpB,EAAC,EAAD,CAAc,UAAU,mDAAqD,CAAA,CACxD,CAAA,CACC,GAI9B,SAAS,cAAc,CACrB,YACA,WACA,WAAW,eACX,QAAQ,SACR,GAAG,GACkB,CACrB,OACE,EAACA,EAAgB,OAAjB,CAAA,SACE,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,qBAAoB,IAAa,eACjC,UAAW,EACT,2PACA,uIACA,8JACA,yCACA,IAAa,UACX,kIACF,EACD,CACS,WACH,QACP,GAAI,WAdN,CAgBE,EAAC,qBAAD,EAAwB,CAAA,CACxB,EAACA,EAAgB,SAAjB,CACE,gBAAe,EACf,UAAW,EACT,2DACA,4FACD,CAEA,WACwB,CAAA,CAC3B,EAAC,uBAAD,EAA0B,CAAA,CACF,GACH,CAAA,CAI7B,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OACE,EAACA,EAAgB,MAAjB,CACE,YAAU,eACV,UAAW,EAAG,4CAA6C,EAAU,CACrE,GAAI,EACJ,CAAA,CAIN,SAAS,WAAW,CAAE,YAAW,WAAU,GAAG,GAA0B,CACtE,OACE,EAACA,EAAgB,KAAjB,CACE,YAAU,cACV,UAAW,EACT,8GACA,0HACA,oEACA,oFACA,6DACA,EACD,CACD,GAAI,WAVN,CAYE,EAAC,OAAD,CAAM,UAAU,wFACd,EAACA,EAAgB,cAAjB,CAAA,SACE,EAAC,EAAD,CAAW,UAAU,sBAAwB,CAAA,CACf,CAAA,CAC3B,CAAA,CACP,EAACA,EAAgB,SAAjB,CAA2B,WAAoC,CAAA,CAC1C,GAI3B,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OACE,EAACA,EAAgB,UAAjB,CACE,YAAU,mBACV,UAAW,EAAG,gDAAiD,EAAU,CACzE,GAAI,EACJ,CAAA,CAIN,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OACE,EAACA,EAAgB,eAAjB,CACE,YAAU,0BACV,UAAW,EACT,uEACA,uCACA,EACD,CACD,GAAI,WAEJ,EAAC,EAAD,EAAiB,CAAA,CACc,CAAA,CAIrC,SAAS,uBAAuB,CAAE,YAAW,GAAG,GAAsC,CACpF,OACE,EAACA,EAAgB,iBAAjB,CACE,YAAU,4BACV,UAAW,EACT,uEACA,uCACA,EACD,CACD,GAAI,WAEJ,EAAC,EAAD,EAAmB,CAAA,CACc,CAAA"}
1
+ {"version":3,"file":"select.js","names":["SelectPrimitive"],"sources":["../../src/components/select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconCheck, IconChevronDown, IconChevronUp, IconSelector } from '@tabler/icons-react'\nimport { Select as SelectPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type SelectProps = React.ComponentProps<typeof SelectPrimitive.Root>\n\nexport type SelectGroupProps = React.ComponentProps<typeof SelectPrimitive.Group>\n\nexport type SelectValueProps = React.ComponentProps<typeof SelectPrimitive.Value>\n\nexport type SelectTriggerProps = React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'md'\n}\n\nexport type SelectContentProps = React.ComponentProps<typeof SelectPrimitive.Content>\n\nexport type SelectLabelProps = React.ComponentProps<typeof SelectPrimitive.Label>\n\nexport type SelectItemProps = React.ComponentProps<typeof SelectPrimitive.Item>\n\nexport type SelectSeparatorProps = React.ComponentProps<typeof SelectPrimitive.Separator>\n\nexport type SelectScrollUpButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>\n\nexport type SelectScrollDownButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>\n\nfunction Select({ ...props }: SelectProps) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({ className, ...props }: SelectGroupProps) {\n return <SelectPrimitive.Group data-slot=\"select-group\" className={cn('scroll-my-1 p-1', className)} {...props} />\n}\n\nfunction SelectValue({ ...props }: SelectValueProps) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({ className, size = 'md', children, ...props }: SelectTriggerProps) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n 'border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'data-[size=md]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)]',\n '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <IconSelector className=\"text-muted-foreground size-4 pointer-events-none\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'item-aligned',\n align = 'center',\n ...props\n}: SelectContentProps) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === 'item-aligned'}\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 relative z-50 min-w-36 max-h-(--radix-select-content-available-height) rounded-lg shadow-md ring-1 duration-100 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95',\n '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',\n 'data-[align-trigger=true]:animate-none',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(\n 'data-[position=popper]:h-(--radix-select-trigger-height)',\n 'data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({ className, ...props }: SelectLabelProps) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-1.5 py-1 text-xs', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({ className, children, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none',\n '*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <IconCheck className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({ className, ...props }: SelectSeparatorProps) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border -mx-1 my-1 h-px pointer-events-none', className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonProps) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'bg-popover z-10 flex cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <IconChevronUp />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonProps) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'bg-popover z-10 flex cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <IconChevronDown />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue\n}\n"],"mappings":"gQA6BA,SAAS,OAAO,CAAE,GAAG,GAAsB,CACzC,OAAO,EAACA,EAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,EAAS,CAAA,CAG/D,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,UAAW,EAAG,kBAAmB,EAAU,CAAE,GAAI,EAAS,CAAA,CAGnH,SAAS,YAAY,CAAE,GAAG,GAA2B,CACnD,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,GAAI,EAAS,CAAA,CAGtE,SAAS,cAAc,CAAE,YAAW,OAAO,KAAM,WAAU,GAAG,GAA6B,CACzF,OACE,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,YAAW,EACX,UAAW,EACT,qQACA,4EACA,qKACA,4FACA,qJACA,oFACA,kDACA,EACD,CACD,GAAI,WAbN,CAeG,EACD,EAACA,EAAgB,KAAjB,CAAsB,QAAA,YACpB,EAAC,EAAD,CAAc,UAAU,mDAAqD,CAAA,CACxD,CAAA,CACC,GAI9B,SAAS,cAAc,CACrB,YACA,WACA,WAAW,eACX,QAAQ,SACR,GAAG,GACkB,CACrB,OACE,EAACA,EAAgB,OAAjB,CAAA,SACE,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,qBAAoB,IAAa,eACjC,UAAW,EACT,2PACA,uIACA,8JACA,yCACA,IAAa,UACX,kIACF,EACD,CACS,WACH,QACP,GAAI,WAdN,CAgBE,EAAC,qBAAD,EAAwB,CAAA,CACxB,EAACA,EAAgB,SAAjB,CACE,gBAAe,EACf,UAAW,EACT,2DACA,4FACD,CAEA,WACwB,CAAA,CAC3B,EAAC,uBAAD,EAA0B,CAAA,CACF,GACH,CAAA,CAI7B,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OACE,EAACA,EAAgB,MAAjB,CACE,YAAU,eACV,UAAW,EAAG,4CAA6C,EAAU,CACrE,GAAI,EACJ,CAAA,CAIN,SAAS,WAAW,CAAE,YAAW,WAAU,GAAG,GAA0B,CACtE,OACE,EAACA,EAAgB,KAAjB,CACE,YAAU,cACV,UAAW,EACT,8GACA,0HACA,oEACA,oFACA,6DACA,EACD,CACD,GAAI,WAVN,CAYE,EAAC,OAAD,CAAM,UAAU,wFACd,EAACA,EAAgB,cAAjB,CAAA,SACE,EAAC,EAAD,CAAW,UAAU,sBAAwB,CAAA,CACf,CAAA,CAC3B,CAAA,CACP,EAACA,EAAgB,SAAjB,CAA2B,WAAoC,CAAA,CAC1C,GAI3B,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OACE,EAACA,EAAgB,UAAjB,CACE,YAAU,mBACV,UAAW,EAAG,gDAAiD,EAAU,CACzE,GAAI,EACJ,CAAA,CAIN,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OACE,EAACA,EAAgB,eAAjB,CACE,YAAU,0BACV,UAAW,EACT,uEACA,uCACA,EACD,CACD,GAAI,WAEJ,EAAC,EAAD,EAAiB,CAAA,CACc,CAAA,CAIrC,SAAS,uBAAuB,CAAE,YAAW,GAAG,GAAsC,CACpF,OACE,EAACA,EAAgB,iBAAjB,CACE,YAAU,4BACV,UAAW,EACT,uEACA,uCACA,EACD,CACD,GAAI,WAEJ,EAAC,EAAD,EAAmB,CAAA,CACc,CAAA"}
@@ -126,7 +126,7 @@ declare function SidebarMenuItem({
126
126
  }: SidebarMenuItemProps): _$react_jsx_runtime0.JSX.Element;
127
127
  declare const sidebarMenuButtonVariants: (props?: ({
128
128
  variant?: "default" | "outline" | null | undefined;
129
- size?: "default" | "sm" | "lg" | null | undefined;
129
+ size?: "sm" | "md" | "lg" | null | undefined;
130
130
  } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
131
131
  type SidebarMenuButtonProps = React.ComponentProps<'button'> & {
132
132
  asChild?: boolean;
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{Separator as n}from"./separator.js";import{Input as r}from"./input.js";import{Sheet as i,SheetContent as a,SheetDescription as o,SheetHeader as s,SheetTitle as c}from"./sheet.js";import{useIsMobile as l}from"../hooks/use-mobile.js";import{Skeleton as u}from"./skeleton.js";import{Tooltip as d,TooltipContent as f,TooltipTrigger as p}from"./tooltip.js";import{IconLayoutSidebar as m}from"@tabler/icons-react";import{Slot as h}from"radix-ui";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{cva as v}from"class-variance-authority";import*as y from"react";const b=y.createContext(null);function useSidebar(){let e=y.useContext(b);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function SidebarProvider({defaultOpen:t=!0,open:n,onOpenChange:r,className:i,style:a,children:o,...s}){let c=l(),[u,d]=y.useState(!1),[f,p]=y.useState(t),m=n??f,h=y.useCallback(e=>{let t=typeof e==`function`?e(m):e;r?r(t):p(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[r,m]),_=y.useCallback(()=>c?d(e=>!e):h(e=>!e),[c,h]);y.useEffect(()=>{let handleKeyDown=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),_())};return window.addEventListener(`keydown`,handleKeyDown),()=>window.removeEventListener(`keydown`,handleKeyDown)},[_]);let v=m?`expanded`:`collapsed`,x=y.useMemo(()=>({state:v,open:m,setOpen:h,isMobile:c,openMobile:u,setOpenMobile:d,toggleSidebar:_}),[v,m,h,c,u,_]);return g(b.Provider,{value:x,children:g(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:e(`group/sidebar-wrapper relative flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,i),...s,children:o})})}function Sidebar({side:t=`left`,variant:n=`sidebar`,collapsible:r=`offcanvas`,className:l,children:u,dir:d,...f}){let{isMobile:p,state:m,openMobile:h,setOpenMobile:v}=useSidebar();return r===`none`?g(`div`,{"data-slot":`sidebar`,className:e(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,l),...f,children:u}):p?g(i,{open:h,onOpenChange:v,...f,children:_(a,{dir:d,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":`18rem`},side:t,children:[_(s,{className:`sr-only`,children:[g(c,{children:`Sidebar`}),g(o,{children:`Displays the mobile sidebar.`})]}),g(`div`,{className:`flex h-full w-full flex-col`,children:u})]})}):_(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":m,"data-collapsible":m===`collapsed`?r:``,"data-variant":n,"data-side":t,"data-slot":`sidebar`,children:[g(`div`,{"data-slot":`sidebar-gap`,className:e(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,n===`floating`||n===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),g(`div`,{"data-slot":`sidebar-container`,"data-side":t,className:e(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,`data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,`data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,n===`floating`||n===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,n!==`floating`&&n!==`inset`&&`group-data-[side=left]:border-r group-data-[side=right]:border-l`,l),...f,children:g(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:e(`flex size-full flex-col bg-sidebar`,`group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm`,`group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`),children:u})})]})}function SidebarTrigger({className:n,onClick:r,...i}){let{toggleSidebar:a}=useSidebar();return _(t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon-sm`,color:`zinc`,className:e(n),onClick:e=>{r?.(e),a()},...i,children:[g(m,{}),g(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function SidebarRail({className:t,...n}){let{toggleSidebar:r}=useSidebar();return g(`button`,{"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:r,title:`Toggle Sidebar`,className:e(`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:s-1/2 after:w-0.5 hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,t),...n})}function SidebarInset({className:t,...n}){return g(`main`,{"data-slot":`sidebar-inset`,className:e(`relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,t),...n})}function SidebarInput({className:t,...n}){return g(r,{"data-slot":`sidebar-input`,"data-sidebar":`input`,className:e(`h-8 w-full bg-background shadow-none`,t),...n})}function SidebarHeader({className:t,...n}){return g(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:e(`flex flex-col gap-2 p-2`,t),...n})}function SidebarFooter({className:t,...n}){return g(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:e(`flex flex-col gap-2 p-2`,t),...n})}function SidebarSeparator({className:t,...r}){return g(n,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:e(`mx-2 w-auto bg-sidebar-border`,t),...r})}function SidebarContent({className:t,...n}){return g(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:e(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,t),...n})}function SidebarGroup({className:t,...n}){return g(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:e(`relative flex w-full min-w-0 flex-col p-2`,t),...n})}function SidebarGroupLabel({className:t,asChild:n=!1,...r}){return g(n?h.Root:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:e(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,t),...r})}function SidebarGroupAction({className:t,asChild:n=!1,...r}){return g(n?h.Root:`button`,{"data-slot":`sidebar-group-action`,"data-sidebar":`group-action`,className:e(`absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0`,t),...r})}function SidebarGroupContent({className:t,...n}){return g(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:e(`w-full text-sm`,t),...n})}function SidebarMenu({className:t,...n}){return g(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:e(`flex w-full min-w-0 flex-col gap-0`,t),...n})}function SidebarMenuItem({className:t,...n}){return g(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:e(`group/menu-item relative`,t),...n})}const x=v(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function SidebarMenuButton({asChild:t=!1,isActive:n=!1,variant:r=`default`,size:i=`default`,tooltip:a,className:o,...s}){let c=t?h.Root:`button`,{isMobile:l,state:u}=useSidebar(),m=g(c,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":i,"data-active":n,className:e(x({variant:r,size:i}),o),...s});return a?(typeof a==`string`&&(a={children:a}),_(d,{children:[g(p,{asChild:!0,children:m}),g(f,{side:`right`,align:`center`,hidden:u!==`collapsed`||l,...a})]})):m}function SidebarMenuAction({className:t,asChild:n=!1,showOnHover:r=!1,...i}){return g(n?h.Root:`button`,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:e(`absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0`,r&&`group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0`,t),...i})}function SidebarMenuBadge({className:t,...n}){return g(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:e(`pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground`,t),...n})}function SidebarMenuSkeleton({className:t,showIcon:n=!1,...r}){let[i]=y.useState(()=>`${Math.floor(Math.random()*40)+50}%`);return _(`div`,{"data-slot":`sidebar-menu-skeleton`,"data-sidebar":`menu-skeleton`,className:e(`flex h-8 items-center gap-2 rounded-md px-2`,t),...r,children:[n&&g(u,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),g(u,{className:`h-4 max-w-(--skeleton-width) flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})}function SidebarMenuSub({className:t,...n}){return g(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:e(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden`,t),...n})}function SidebarMenuSubItem({className:t,...n}){return g(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:e(`group/menu-sub-item relative`,t),...n})}function SidebarMenuSubButton({asChild:t=!1,size:n=`md`,isActive:r=!1,className:i,...a}){return g(t?h.Root:`a`,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":n,"data-active":r,className:e(`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground`,i),...a})}export{Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarProvider,SidebarRail,SidebarSeparator,SidebarTrigger,useSidebar};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{Separator as n}from"./separator.js";import{Input as r}from"./input.js";import{Drawer as i,DrawerContent as a,DrawerDescription as o,DrawerHeader as s,DrawerTitle as c}from"./drawer.js";import{useIsMobile as l}from"../hooks/use-mobile.js";import{Skeleton as u}from"./skeleton.js";import{Tooltip as d,TooltipContent as f,TooltipTrigger as p}from"./tooltip.js";import{IconLayoutSidebar as m}from"@tabler/icons-react";import{Slot as h}from"radix-ui";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{cva as v}from"class-variance-authority";import*as y from"react";const b=y.createContext(null);function useSidebar(){let e=y.useContext(b);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function SidebarProvider({defaultOpen:t=!0,open:n,onOpenChange:r,className:i,style:a,children:o,...s}){let c=l(),[u,d]=y.useState(!1),[f,p]=y.useState(t),m=n??f,h=y.useCallback(e=>{let t=typeof e==`function`?e(m):e;r?r(t):p(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[r,m]),_=y.useCallback(()=>c?d(e=>!e):h(e=>!e),[c,h]);y.useEffect(()=>{let handleKeyDown=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),_())};return window.addEventListener(`keydown`,handleKeyDown),()=>window.removeEventListener(`keydown`,handleKeyDown)},[_]);let v=m?`expanded`:`collapsed`,x=y.useMemo(()=>({state:v,open:m,setOpen:h,isMobile:c,openMobile:u,setOpenMobile:d,toggleSidebar:_}),[v,m,h,c,u,_]);return g(b.Provider,{value:x,children:g(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:e(`group/sidebar-wrapper relative flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,i),...s,children:o})})}function Sidebar({side:t=`left`,variant:n=`sidebar`,collapsible:r=`offcanvas`,className:l,children:u,dir:d,...f}){let{isMobile:p,state:m,openMobile:h,setOpenMobile:v}=useSidebar();return r===`none`?g(`div`,{"data-slot":`sidebar`,className:e(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,l),...f,children:u}):p?g(i,{open:h,onOpenChange:v,direction:t,size:`sm`,children:_(a,{dir:d,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`h-full w-(--sidebar-width) rounded-none bg-sidebar p-0 text-sidebar-foreground`,style:{"--sidebar-width":`18rem`},...f,children:[_(s,{className:`sr-only`,children:[g(c,{children:`Sidebar`}),g(o,{children:`Displays the mobile sidebar.`})]}),g(`div`,{className:`flex h-full w-full flex-col`,children:u})]})}):_(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":m,"data-collapsible":m===`collapsed`?r:``,"data-variant":n,"data-side":t,"data-slot":`sidebar`,children:[g(`div`,{"data-slot":`sidebar-gap`,className:e(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,n===`floating`||n===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),g(`div`,{"data-slot":`sidebar-container`,"data-side":t,className:e(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,`data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:-left-(--sidebar-width)`,`data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:-right-(--sidebar-width)`,n===`floating`||n===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,n!==`floating`&&n!==`inset`&&`group-data-[side=left]:border-r group-data-[side=right]:border-l`,l),...f,children:g(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:e(`flex size-full flex-col bg-sidebar`,`group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm`,`group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`),children:u})})]})}function SidebarTrigger({className:n,onClick:r,...i}){let{toggleSidebar:a}=useSidebar();return _(t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon-sm`,color:`zinc`,className:e(n),onClick:e=>{r?.(e),a()},...i,children:[g(m,{}),g(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function SidebarRail({className:t,...n}){let{toggleSidebar:r}=useSidebar();return g(`button`,{"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:r,title:`Toggle Sidebar`,className:e(`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:s-1/2 after:w-0.5 hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,t),...n})}function SidebarInset({className:t,...n}){return g(`main`,{"data-slot":`sidebar-inset`,className:e(`relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,t),...n})}function SidebarInput({className:t,...n}){return g(r,{"data-slot":`sidebar-input`,"data-sidebar":`input`,className:e(`h-8 w-full bg-background shadow-none`,t),...n})}function SidebarHeader({className:t,...n}){return g(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:e(`flex flex-col gap-2 p-2`,t),...n})}function SidebarFooter({className:t,...n}){return g(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:e(`flex flex-col gap-2 p-2`,t),...n})}function SidebarSeparator({className:t,...r}){return g(n,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:e(`w-auto bg-sidebar-border`,t),...r})}function SidebarContent({className:t,...n}){return g(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:e(`no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,t),...n})}function SidebarGroup({className:t,...n}){return g(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:e(`relative flex w-full min-w-0 flex-col px-2`,t),...n})}function SidebarGroupLabel({className:t,asChild:n=!1,...r}){return g(n?h.Root:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:e(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,t),...r})}function SidebarGroupAction({className:t,asChild:n=!1,...r}){return g(n?h.Root:`button`,{"data-slot":`sidebar-group-action`,"data-sidebar":`group-action`,className:e(`absolute top-1.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0`,t),...r})}function SidebarGroupContent({className:t,...n}){return g(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:e(`w-full text-sm mt-2`,t),...n})}function SidebarMenu({className:t,...n}){return g(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:e(`flex w-full min-w-0 flex-col gap-0`,t),...n})}function SidebarMenuItem({className:t,...n}){return g(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:e(`group/menu-item relative`,t),...n})}const x=v(`peer/menu-button group/menu-button font-medium flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:[&_svg]:text-sidebar-primary data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{md:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`md`}});function SidebarMenuButton({asChild:t=!1,isActive:n=!1,variant:r=`default`,size:i=`md`,tooltip:a,className:o,...s}){let c=t?h.Root:`button`,{isMobile:l,state:u}=useSidebar(),m=g(c,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":i,"data-active":n,className:e(x({variant:r,size:i}),o),...s});return a?(typeof a==`string`&&(a={children:a}),_(d,{children:[g(p,{asChild:!0,children:m}),g(f,{side:`right`,align:`center`,hidden:u!==`collapsed`||l,...a})]})):m}function SidebarMenuAction({className:t,asChild:n=!1,showOnHover:r=!1,...i}){return g(n?h.Root:`button`,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:e(`absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=md]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0`,r&&`group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0`,t),...i})}function SidebarMenuBadge({className:t,...n}){return g(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:e(`pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=md]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground`,t),...n})}function SidebarMenuSkeleton({className:t,showIcon:n=!1,...r}){let[i]=y.useState(()=>`${Math.floor(Math.random()*40)+50}%`);return _(`div`,{"data-slot":`sidebar-menu-skeleton`,"data-sidebar":`menu-skeleton`,className:e(`flex h-8 items-center gap-2 rounded-md px-2`,t),...r,children:[n&&g(u,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),g(u,{className:`h-4 max-w-(--skeleton-width) flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})}function SidebarMenuSub({className:t,...n}){return g(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:e(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden`,t),...n})}function SidebarMenuSubItem({className:t,...n}){return g(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:e(`group/menu-sub-item relative`,t),...n})}function SidebarMenuSubButton({asChild:t=!1,size:n=`md`,isActive:r=!1,className:i,...a}){return g(t?h.Root:`a`,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":n,"data-active":r,className:e(`flex h-7 min-w-0 -translate-x-px items-center font-medium gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground`,i),...a})}export{Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarProvider,SidebarRail,SidebarSeparator,SidebarTrigger,useSidebar};
2
2
  //# sourceMappingURL=sidebar.js.map