@uselets/ui 1.20.2 → 1.20.4

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 (199) hide show
  1. package/README.md +22 -0
  2. package/dist/cli/uselets.mjs +3 -3
  3. package/dist/cli/uselets.mjs.map +1 -1
  4. package/dist/components/accordion.js +1 -1
  5. package/dist/components/accordion.js.map +1 -1
  6. package/dist/components/alert-dialog.js +1 -1
  7. package/dist/components/alert-dialog.js.map +1 -1
  8. package/dist/components/alert.js +1 -1
  9. package/dist/components/alert.js.map +1 -1
  10. package/dist/components/anchor.js +1 -1
  11. package/dist/components/anchor.js.map +1 -1
  12. package/dist/components/area-chart.js +1 -1
  13. package/dist/components/area-chart.js.map +1 -1
  14. package/dist/components/avatar.js +1 -1
  15. package/dist/components/avatar.js.map +1 -1
  16. package/dist/components/badge.js +1 -1
  17. package/dist/components/badge.js.map +1 -1
  18. package/dist/components/bar-chart.js +1 -1
  19. package/dist/components/bar-chart.js.map +1 -1
  20. package/dist/components/bottom-nav.js +1 -1
  21. package/dist/components/bottom-nav.js.map +1 -1
  22. package/dist/components/breadcrumb.js +1 -1
  23. package/dist/components/breadcrumb.js.map +1 -1
  24. package/dist/components/button-group.js +1 -1
  25. package/dist/components/button-group.js.map +1 -1
  26. package/dist/components/button.js +1 -1
  27. package/dist/components/button.js.map +1 -1
  28. package/dist/components/calendar.js +1 -1
  29. package/dist/components/calendar.js.map +1 -1
  30. package/dist/components/card.js +1 -1
  31. package/dist/components/card.js.map +1 -1
  32. package/dist/components/carousel.js +1 -1
  33. package/dist/components/carousel.js.map +1 -1
  34. package/dist/components/center.js +1 -1
  35. package/dist/components/center.js.map +1 -1
  36. package/dist/components/chart.js +2 -2
  37. package/dist/components/chart.js.map +1 -1
  38. package/dist/components/checkbox.js +1 -1
  39. package/dist/components/checkbox.js.map +1 -1
  40. package/dist/components/code.js +1 -1
  41. package/dist/components/code.js.map +1 -1
  42. package/dist/components/collapsible.js +1 -1
  43. package/dist/components/collapsible.js.map +1 -1
  44. package/dist/components/combobox.js +1 -1
  45. package/dist/components/combobox.js.map +1 -1
  46. package/dist/components/command.js +1 -1
  47. package/dist/components/command.js.map +1 -1
  48. package/dist/components/container.js +1 -1
  49. package/dist/components/container.js.map +1 -1
  50. package/dist/components/data-table.d.ts +138 -2
  51. package/dist/components/data-table.js +1 -1
  52. package/dist/components/data-table.js.map +1 -1
  53. package/dist/components/date-range-picker.js +1 -1
  54. package/dist/components/date-range-picker.js.map +1 -1
  55. package/dist/components/dialog.js +1 -1
  56. package/dist/components/dialog.js.map +1 -1
  57. package/dist/components/donut-chart.js +1 -1
  58. package/dist/components/donut-chart.js.map +1 -1
  59. package/dist/components/drawer.js +1 -1
  60. package/dist/components/drawer.js.map +1 -1
  61. package/dist/components/dropdown-menu.js +1 -1
  62. package/dist/components/dropdown-menu.js.map +1 -1
  63. package/dist/components/dropzone.js +1 -1
  64. package/dist/components/dropzone.js.map +1 -1
  65. package/dist/components/empty.js +1 -1
  66. package/dist/components/empty.js.map +1 -1
  67. package/dist/components/field.js +1 -1
  68. package/dist/components/field.js.map +1 -1
  69. package/dist/components/flex.js +1 -1
  70. package/dist/components/flex.js.map +1 -1
  71. package/dist/components/grid.js +1 -1
  72. package/dist/components/grid.js.map +1 -1
  73. package/dist/components/group.js +1 -1
  74. package/dist/components/group.js.map +1 -1
  75. package/dist/components/heading.js +1 -1
  76. package/dist/components/heading.js.map +1 -1
  77. package/dist/components/hover-card.js +1 -1
  78. package/dist/components/hover-card.js.map +1 -1
  79. package/dist/components/input-group.js +1 -1
  80. package/dist/components/input-group.js.map +1 -1
  81. package/dist/components/input-otp.js +1 -1
  82. package/dist/components/input-otp.js.map +1 -1
  83. package/dist/components/input.js +1 -1
  84. package/dist/components/input.js.map +1 -1
  85. package/dist/components/kbd.js +1 -1
  86. package/dist/components/kbd.js.map +1 -1
  87. package/dist/components/label.js +1 -1
  88. package/dist/components/label.js.map +1 -1
  89. package/dist/components/list.js +1 -1
  90. package/dist/components/list.js.map +1 -1
  91. package/dist/components/logo.js +1 -1
  92. package/dist/components/marker.js +1 -1
  93. package/dist/components/marker.js.map +1 -1
  94. package/dist/components/mask-input.js +1 -1
  95. package/dist/components/mask-input.js.map +1 -1
  96. package/dist/components/native-select.js +1 -1
  97. package/dist/components/native-select.js.map +1 -1
  98. package/dist/components/navigation-menu.js +1 -1
  99. package/dist/components/navigation-menu.js.map +1 -1
  100. package/dist/components/number-field.js +1 -1
  101. package/dist/components/number-field.js.map +1 -1
  102. package/dist/components/pagination.js +1 -1
  103. package/dist/components/pagination.js.map +1 -1
  104. package/dist/components/phone-input.d.ts +3 -0
  105. package/dist/components/phone-input.js +1 -1
  106. package/dist/components/phone-input.js.map +1 -1
  107. package/dist/components/pie-chart.js +1 -1
  108. package/dist/components/pie-chart.js.map +1 -1
  109. package/dist/components/popover.js +1 -1
  110. package/dist/components/popover.js.map +1 -1
  111. package/dist/components/progress.js +1 -1
  112. package/dist/components/progress.js.map +1 -1
  113. package/dist/components/radio-group.js +1 -1
  114. package/dist/components/radio-group.js.map +1 -1
  115. package/dist/components/resizable.js +1 -1
  116. package/dist/components/resizable.js.map +1 -1
  117. package/dist/components/ring-progress.js +1 -1
  118. package/dist/components/ring-progress.js.map +1 -1
  119. package/dist/components/scroll-area.js +1 -1
  120. package/dist/components/scroll-area.js.map +1 -1
  121. package/dist/components/select.js +1 -1
  122. package/dist/components/select.js.map +1 -1
  123. package/dist/components/separator.js +1 -1
  124. package/dist/components/separator.js.map +1 -1
  125. package/dist/components/sidebar.d.ts +1 -1
  126. package/dist/components/sidebar.js +1 -1
  127. package/dist/components/sidebar.js.map +1 -1
  128. package/dist/components/simple-grid.js +1 -1
  129. package/dist/components/simple-grid.js.map +1 -1
  130. package/dist/components/skeleton.js +1 -1
  131. package/dist/components/skeleton.js.map +1 -1
  132. package/dist/components/slider.js +1 -1
  133. package/dist/components/slider.js.map +1 -1
  134. package/dist/components/sonner.js +1 -1
  135. package/dist/components/sonner.js.map +1 -1
  136. package/dist/components/spinner.js +1 -1
  137. package/dist/components/spinner.js.map +1 -1
  138. package/dist/components/stack.js +1 -1
  139. package/dist/components/stack.js.map +1 -1
  140. package/dist/components/stepper.js +1 -1
  141. package/dist/components/stepper.js.map +1 -1
  142. package/dist/components/switch.js +1 -1
  143. package/dist/components/switch.js.map +1 -1
  144. package/dist/components/table.js +1 -1
  145. package/dist/components/table.js.map +1 -1
  146. package/dist/components/tabs.js +1 -1
  147. package/dist/components/tabs.js.map +1 -1
  148. package/dist/components/text.js +1 -1
  149. package/dist/components/text.js.map +1 -1
  150. package/dist/components/textarea.js +1 -1
  151. package/dist/components/textarea.js.map +1 -1
  152. package/dist/components/theme.js +1 -1
  153. package/dist/components/theme.js.map +1 -1
  154. package/dist/components/timeline.js +1 -1
  155. package/dist/components/timeline.js.map +1 -1
  156. package/dist/components/toggle-group.js +1 -1
  157. package/dist/components/toggle-group.js.map +1 -1
  158. package/dist/components/toggle.js +1 -1
  159. package/dist/components/toggle.js.map +1 -1
  160. package/dist/components/tooltip.js +1 -1
  161. package/dist/components/tooltip.js.map +1 -1
  162. package/dist/components/unstyled-button.js +1 -1
  163. package/dist/components/unstyled-button.js.map +1 -1
  164. package/dist/components/visibility.js +1 -1
  165. package/dist/components/visibility.js.map +1 -1
  166. package/dist/hooks/use-breakpoint-value.js.map +1 -1
  167. package/dist/hooks/use-breakpoint.js.map +1 -1
  168. package/dist/hooks/use-disclosure.js.map +1 -1
  169. package/dist/hooks/use-document-visibility.js.map +1 -1
  170. package/dist/hooks/use-hotkeys.js +1 -1
  171. package/dist/hooks/use-idle.js.map +1 -1
  172. package/dist/hooks/use-interval.js.map +1 -1
  173. package/dist/hooks/use-local-storage.js +1 -1
  174. package/dist/hooks/use-local-storage.js.map +1 -1
  175. package/dist/hooks/use-mask.js.map +1 -1
  176. package/dist/hooks/use-mobile.js.map +1 -1
  177. package/dist/index.d.ts +3 -3
  178. package/dist/index.js +1 -1
  179. package/dist/lib/badge.js.map +1 -1
  180. package/dist/lib/button.js.map +1 -1
  181. package/dist/lib/color.js.map +1 -1
  182. package/dist/lib/compose-refs.js +1 -1
  183. package/dist/lib/compose-refs.js.map +1 -1
  184. package/dist/lib/progress.js.map +1 -1
  185. package/dist/lib/utils.js.map +1 -1
  186. package/dist/logo--R3_XDgA.js +2 -0
  187. package/dist/logo--R3_XDgA.js.map +1 -0
  188. package/dist/postcss.config.js.map +1 -1
  189. package/dist/skills/uselets-ui/SKILL.md +1 -0
  190. package/dist/skills/uselets-ui/references/component-catalog.md +1 -1
  191. package/dist/skills/uselets-ui/references/package-guide.md +16 -0
  192. package/dist/use-hotkeys-YDJmGWX6.js.map +1 -1
  193. package/package.json +17 -17
  194. package/skills/uselets-ui/SKILL.md +1 -0
  195. package/skills/uselets-ui/references/component-catalog.md +1 -1
  196. package/skills/uselets-ui/references/package-guide.md +16 -0
  197. package/dist/data-table-DWWVGWbU.d.ts +0 -4184
  198. package/dist/logo-B0thHtTS.js +0 -2
  199. package/dist/logo-B0thHtTS.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.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";import*as s from"react";const c=s.createContext({color:`primary`});function Pagination({className:t,color:n,children:r,...i}){return a(c.Provider,{value:{color:n},children:a(`nav`,{"aria-label":`pagination`,"data-slot":`pagination`,"data-color":n,className:e(`mx-auto flex w-full justify-center`,t),...i,children:r})})}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=`primary`,...l}){let u=s.useContext(c);return a(t,{asChild:!0,variant:r?`solid`:`secondary`,color:u.color||o,size:i,className:e(n),children:a(`a`,{"aria-current":r?`page`:void 0,"data-slot":`pagination-link`,"data-active":r,...l})})}function PaginationPrevious({className:t,text:r=``,...i}){return o(PaginationLink,{"aria-label":`Go to previous page`,size:r?`md`:`icon`,className:e(r&&`pl-1.5!`,t),...i,children:[a(n,{"data-icon":`inline-start`}),r&&a(`span`,{className:`hidden sm:block`,children:r})]})}function PaginationNext({className:t,text:n=``,...i}){return o(PaginationLink,{"aria-label":`Go to next page`,size:n?`md`:`icon`,className:e(n&&`pr-1.5!`,t),...i,children:[n&&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"../rolldown-runtime-BhWHdk3m.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";import*as s from"react";const c=s.createContext({color:`primary`});function Pagination({className:t,color:n,children:r,...i}){return/* @__PURE__ */ a(c.Provider,{value:{color:n},children:/* @__PURE__ */ a(`nav`,{"aria-label":`pagination`,"data-slot":`pagination`,"data-color":n,className:e(`mx-auto flex w-full justify-center`,t),...i,children:r})})}function PaginationContent({className:t,...n}){return/* @__PURE__ */ a(`ul`,{"data-slot":`pagination-content`,className:e(`flex items-center gap-0.5`,t),...n})}function PaginationItem({...e}){return/* @__PURE__ */ a(`li`,{"data-slot":`pagination-item`,...e})}function PaginationLink({className:n,isActive:r,size:i=`icon`,color:o=`primary`,...l}){let u=s.useContext(c);return/* @__PURE__ */ a(t,{asChild:!0,variant:r?`solid`:`secondary`,color:u.color||o,size:i,className:e(n),children:/* @__PURE__ */ a(`a`,{"aria-current":r?`page`:void 0,"data-slot":`pagination-link`,"data-active":r,...l})})}function PaginationPrevious({className:t,text:r=``,...i}){return/* @__PURE__ */ o(PaginationLink,{"aria-label":`Go to previous page`,size:r?`md`:`icon`,className:e(r&&`pl-1.5!`,t),...i,children:[/* @__PURE__ */ a(n,{"data-icon":`inline-start`}),r&&/* @__PURE__ */ a(`span`,{className:`hidden sm:block`,children:r})]})}function PaginationNext({className:t,text:n=``,...i}){return/* @__PURE__ */ o(PaginationLink,{"aria-label":`Go to next page`,size:n?`md`:`icon`,className:e(n&&`pr-1.5!`,t),...i,children:[n&&/* @__PURE__ */ a(`span`,{className:`hidden sm:block`,children:n}),/* @__PURE__ */ a(r,{"data-icon":`inline-end`})]})}function PaginationEllipsis({className:t,...n}){return/* @__PURE__ */ 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:[/* @__PURE__ */ a(i,{}),/* @__PURE__ */ 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 * as React from 'react'\n\nimport { IconChevronLeft, IconChevronRight, IconDots } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\nconst PaginationContext = React.createContext<Pick<React.ComponentProps<typeof Button>, 'color'>>({\n color: 'primary'\n})\n\nexport type PaginationProps = React.ComponentProps<'nav'> & Pick<React.ComponentProps<typeof Button>, 'color'>\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, color, children, ...props }: PaginationProps) {\n return (\n <PaginationContext.Provider value={{ color }}>\n <nav\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n data-color={color}\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n >\n {children}\n </nav>\n </PaginationContext.Provider>\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 = 'primary', ...props }: PaginationLinkProps) {\n const context = React.useContext(PaginationContext)\n\n return (\n <Button\n asChild\n variant={isActive ? 'solid' : 'secondary'}\n color={context.color || color}\n size={size}\n className={cn(className)}\n >\n <a aria-current={isActive ? 'page' : undefined} data-slot=\"pagination-link\" data-active={isActive} {...props} />\n </Button>\n )\n}\n\nfunction PaginationPrevious({ className, text = '', ...props }: PaginationPreviousProps) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size={text ? 'md' : 'icon'}\n className={cn(text && 'pl-1.5!', className)}\n {...props}\n >\n <IconChevronLeft data-icon=\"inline-start\" />\n {text && <span className=\"hidden sm:block\">{text}</span>}\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({ className, text = '', ...props }: PaginationNextProps) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size={text ? 'md' : 'icon'}\n className={cn(text && 'pr-1.5!', className)}\n {...props}\n >\n {text && <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":"sRAOA,MAAM,EAAoB,EAAM,cAAkE,CAChG,MAAO,SACT,CAAC,EAuBD,SAAS,WAAW,CAAE,YAAW,QAAO,WAAU,GAAG,GAA0B,CAC7E,OACE,EAAC,EAAkB,SAAnB,CAA4B,MAAO,CAAE,OAAM,EACzC,SAAA,EAAC,MAAD,CACE,aAAW,aACX,YAAU,aACV,aAAY,EACZ,UAAW,EAAG,qCAAsC,CAAS,EAC7D,GAAI,EAEH,UACE,CAAA,CACqB,CAAA,CAEhC,CAEA,SAAS,kBAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,OAAO,EAAC,KAAD,CAAI,YAAU,qBAAqB,UAAW,EAAG,4BAA6B,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC/G,CAEA,SAAS,eAAe,CAAE,GAAG,GAA8B,CACzD,OAAO,EAAC,KAAD,CAAI,YAAU,kBAAkB,GAAI,CAAQ,CAAA,CACrD,CAEA,SAAS,eAAe,CAAE,YAAW,WAAU,OAAO,OAAQ,QAAQ,UAAW,GAAG,GAA8B,CAChH,IAAM,EAAU,EAAM,WAAW,CAAiB,EAElD,OACE,EAAC,EAAD,CACE,QAAA,GACA,QAAS,EAAW,QAAU,YAC9B,MAAO,EAAQ,OAAS,EAClB,OACN,UAAW,EAAG,CAAS,EAEvB,SAAA,EAAC,IAAD,CAAG,eAAc,EAAW,OAAS,IAAA,GAAW,YAAU,kBAAkB,cAAa,EAAU,GAAI,CAAQ,CAAA,CACzG,CAAA,CAEZ,CAEA,SAAS,mBAAmB,CAAE,YAAW,OAAO,GAAI,GAAG,GAAkC,CACvF,OACE,EAAC,eAAD,CACE,aAAW,sBACX,KAAM,EAAO,KAAO,OACpB,UAAW,EAAG,GAAQ,UAAW,CAAS,EAC1C,GAAI,EAJN,SAAA,CAME,EAAC,EAAD,CAAiB,YAAU,cAAgB,CAAA,EAC1C,GAAQ,EAAC,OAAD,CAAM,UAAU,kBAAmB,SAAA,CAAW,CAAA,CACzC,GAEpB,CAEA,SAAS,eAAe,CAAE,YAAW,OAAO,GAAI,GAAG,GAA8B,CAC/E,OACE,EAAC,eAAD,CACE,aAAW,kBACX,KAAM,EAAO,KAAO,OACpB,UAAW,EAAG,GAAQ,UAAW,CAAS,EAC1C,GAAI,EAJN,SAAA,CAMG,GAAQ,EAAC,OAAD,CAAM,UAAU,kBAAmB,SAAA,CAAW,CAAA,EACvD,EAAC,EAAD,CAAkB,YAAU,YAAc,CAAA,CAC5B,GAEpB,CAEA,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OACE,EAAC,OAAD,CACE,cAAA,GACA,YAAU,sBACV,UAAW,EAAG,+EAAgF,CAAS,EACvG,GAAI,EAJN,SAAA,CAME,EAAC,EAAD,CAAW,CAAA,EACX,EAAC,OAAD,CAAM,UAAU,UAAU,SAAA,YAAgB,CAAA,CACtC,GAEV"}
1
+ {"version":3,"file":"pagination.js","names":["React","PaginationContext","props","color","cn","className","context","Button","isActive","text","IconChevronLeft","IconChevronRight","IconDots"],"sources":["../../src/components/pagination.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { IconChevronLeft, IconChevronRight, IconDots } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\nconst PaginationContext = React.createContext<Pick<React.ComponentProps<typeof Button>, 'color'>>({\n color: 'primary'\n})\n\nexport type PaginationProps = React.ComponentProps<'nav'> & Pick<React.ComponentProps<typeof Button>, 'color'>\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, color, children, ...props }: PaginationProps) {\n return (\n <PaginationContext.Provider value={{ color }}>\n <nav\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n data-color={color}\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n >\n {children}\n </nav>\n </PaginationContext.Provider>\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 = 'primary', ...props }: PaginationLinkProps) {\n const context = React.useContext(PaginationContext)\n\n return (\n <Button\n asChild\n variant={isActive ? 'solid' : 'secondary'}\n color={context.color || color}\n size={size}\n className={cn(className)}\n >\n <a aria-current={isActive ? 'page' : undefined} data-slot=\"pagination-link\" data-active={isActive} {...props} />\n </Button>\n )\n}\n\nfunction PaginationPrevious({ className, text = '', ...props }: PaginationPreviousProps) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size={text ? 'md' : 'icon'}\n className={cn(text && 'pl-1.5!', className)}\n {...props}\n >\n <IconChevronLeft data-icon=\"inline-start\" />\n {text && <span className=\"hidden sm:block\">{text}</span>}\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({ className, text = '', ...props }: PaginationNextProps) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size={text ? 'md' : 'icon'}\n className={cn(text && 'pr-1.5!', className)}\n {...props}\n >\n {text && <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":"sRAOA,MAAMC,EAAoBD,EAAM,cAAkE,CAChG,MAAO,SACT,CAAC,EAuBD,SAAS,WAAW,CAAE,YAAW,QAAO,WAAU,GAAGE,GAA0B,CAC7E,MACE,kBAACD,EAAkB,SAAnB,CAA4B,MAAO,CAAE,OAAM,EACzC,SAAA,kBAAC,MAAD,CACE,aAAW,aACX,YAAU,aACV,aAAYE,EACZ,UAAWC,EAAG,qCAAsCC,CAAS,EAC7D,GAAIH,EAEH,UACE,CAAA,CACqB,CAAA,CAEhC,CAEA,SAAS,kBAAkB,CAAE,YAAW,GAAGA,GAAiC,CAC1E,MAAO,kBAAC,KAAD,CAAI,YAAU,qBAAqB,UAAWE,EAAG,4BAA6BC,CAAS,EAAG,GAAIH,CAAQ,CAAA,CAC/G,CAEA,SAAS,eAAe,CAAE,GAAGA,GAA8B,CACzD,MAAO,kBAAC,KAAD,CAAI,YAAU,kBAAkB,GAAIA,CAAQ,CAAA,CACrD,CAEA,SAAS,eAAe,CAAE,YAAW,WAAU,OAAO,OAAQ,QAAQ,UAAW,GAAGA,GAA8B,CAChH,IAAMI,EAAUN,EAAM,WAAWC,CAAiB,EAElD,MACE,kBAACM,EAAD,CACE,QAAA,GACA,QAASC,EAAW,QAAU,YAC9B,MAAOF,EAAQ,OAASH,EAClB,OACN,UAAWC,EAAGC,CAAS,EAEvB,SAAA,kBAAC,IAAD,CAAG,eAAcG,EAAW,OAAS,IAAA,GAAW,YAAU,kBAAkB,cAAaA,EAAU,GAAIN,CAAQ,CAAA,CACzG,CAAA,CAEZ,CAEA,SAAS,mBAAmB,CAAE,YAAW,OAAO,GAAI,GAAGA,GAAkC,CACvF,MACE,kBAAC,eAAD,CACE,aAAW,sBACX,KAAMO,EAAO,KAAO,OACpB,UAAWL,EAAGK,GAAQ,UAAWJ,CAAS,EAC1C,GAAIH,EAJN,SAAA,CAME,kBAACQ,EAAD,CAAiB,YAAU,cAAgB,CAAA,EAC1CD,GAAQ,kBAAC,OAAD,CAAM,UAAU,kBAAmB,SAAAA,CAAW,CAAA,CACzC,GAEpB,CAEA,SAAS,eAAe,CAAE,YAAW,OAAO,GAAI,GAAGP,GAA8B,CAC/E,MACE,kBAAC,eAAD,CACE,aAAW,kBACX,KAAMO,EAAO,KAAO,OACpB,UAAWL,EAAGK,GAAQ,UAAWJ,CAAS,EAC1C,GAAIH,EAJN,SAAA,CAMGO,GAAQ,kBAAC,OAAD,CAAM,UAAU,kBAAmB,SAAAA,CAAW,CAAA,EACvD,kBAACE,EAAD,CAAkB,YAAU,YAAc,CAAA,CAC5B,GAEpB,CAEA,SAAS,mBAAmB,CAAE,YAAW,GAAGT,GAAkC,CAC5E,MACE,kBAAC,OAAD,CACE,cAAA,GACA,YAAU,sBACV,UAAWE,EAAG,+EAAgFC,CAAS,EACvG,GAAIH,EAJN,SAAA,CAME,kBAACU,EAAD,CAAW,CAAA,EACX,kBAAC,OAAD,CAAM,UAAU,UAAU,SAAA,YAAgB,CAAA,CACtC,GAEV"}
@@ -7,6 +7,9 @@ export type PhoneInputProps = Omit<ComponentProps<'input'>, 'onChange' | 'value'
7
7
  popupClassName?: string;
8
8
  scrollAreaClassName?: string;
9
9
  };
10
+ export type PhoneInputValue = BasePhoneInput.Value;
11
+ export type PhoneInputCountry = BasePhoneInput.Country;
12
+ export type PhoneInputLabels = BasePhoneInput.Labels;
10
13
  declare function PhoneInput({ className, popupClassName, scrollAreaClassName, onChange, value, ...props }: PhoneInputProps): import("react").JSX.Element;
11
14
  //#endregion
12
15
  export { PhoneInput };
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{Input as n}from"./input.js";import{Combobox as r,ComboboxContent as i,ComboboxEmpty as a,ComboboxInput as o,ComboboxItem as s,ComboboxList as c,ComboboxSeparator as l,ComboboxTrigger as u,ComboboxValue as d}from"./combobox.js";import{ScrollArea as f}from"./scroll-area.js";import{IconWorld as p}from"@tabler/icons-react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{createContext as g,useContext as _,useMemo as v,useState as y}from"react";import*as b from"react-phone-number-input";import x from"react-phone-number-input/flags";const S=g({popupClassName:void 0,scrollAreaClassName:void 0});function PhoneInput({className:t,popupClassName:n,scrollAreaClassName:r,onChange:i,value:a,...o}){return m(S.Provider,{value:{popupClassName:n,scrollAreaClassName:r},children:m(b.default,{className:e(`flex`,o[`aria-invalid`]&&`[&_*[data-slot=combobox-trigger]]:border-destructive [&_*[data-slot=combobox-trigger]]:ring-destructive/50`,t),flagComponent:FlagComponent,countrySelectComponent:CountrySelect,inputComponent:InputComponent,smartCaret:!1,defaultCountry:`BR`,value:a||void 0,onChange:e=>i?.(e||``),...o})})}function InputComponent({className:t,...r}){return m(n,{className:e(`rounded-s-none focus:z-1`,t),...r})}function CountrySelect({disabled:n,value:p,options:g,onChange:x}){let{popupClassName:C}=_(S),[w,T]=y(``),E=v(()=>w?g.filter(({label:e})=>e.toLowerCase().includes(w.toLowerCase())):g,[g,w]);return h(r,{items:E,value:p||``,onValueChange:e=>{e&&x(e)},children:[m(u,{render:h(t,{variant:`outline`,color:`zinc`,className:e(`flex h-8 items-center gap-1 rounded-s-lg rounded-e-none border-e-0 border-input px-2.5 py-0 leading-none dark:bg-input/30`,`hover:bg-transparent focus:z-10 data-pressed:bg-transparent`,n&&`opacity-50`),disabled:n,children:[m(`span`,{className:`sr-only`,children:m(d,{})}),m(FlagComponent,{country:p,countryName:p})]})}),h(i,{className:e(`w-xs *:data-[slot=input-group]:bg-transparent`,C),children:[m(o,{placeholder:`e.g. United States`,value:w,onChange:e=>T(e.target.value),showTrigger:!1,className:`border-input focus-visible:border-border rounded-none border-0 px-0 py-2.5 shadow-none ring-0! outline-none! focus-visible:ring-0 focus-visible:ring-offset-0`}),m(l,{}),m(a,{className:`px-4 py-2.5 text-sm`,children:`Nenhum país encontrado.`}),m(c,{children:m(`div`,{className:`relative flex max-h-full`,children:m(`div`,{className:`flex max-h-[min(var(--available-height),24rem)] w-full scroll-pt-2 scroll-pb-2 flex-col overscroll-contain`,children:m(f,{className:`size-full min-h-0 **:data-[slot=scroll-area-scrollbar]:m-0 **:data-[slot=scroll-area-viewport]:h-full **:data-[slot=scroll-area-viewport]:overscroll-contain`,children:E.map(e=>e.value?h(s,{value:e.value,className:`flex items-center gap-2`,children:[m(FlagComponent,{country:e.value,countryName:e.label}),m(`span`,{className:`flex-1 text-sm`,children:e.label}),m(`span`,{className:`text-foreground/50 text-sm`,children:`+${b.getCountryCallingCode(e.value)}`})]},e.value):null)})})})})]})]})}function FlagComponent({country:e,countryName:t}){let n=x[e];return m(`span`,{className:`flex h-4 w-4 items-center justify-center [&_svg:not([class*='size-'])]:size-full! [&_svg:not([class*='size-'])]:rounded-[5px]`,children:n?m(n,{title:t}):m(p,{className:`size-4 opacity-60`})})}export{PhoneInput};
1
+ import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{Input as n}from"./input.js";import{Combobox as r,ComboboxContent as i,ComboboxEmpty as a,ComboboxInput as o,ComboboxItem as s,ComboboxList as c,ComboboxSeparator as l,ComboboxTrigger as u,ComboboxValue as d}from"./combobox.js";import{ScrollArea as f}from"./scroll-area.js";import{IconWorld as p}from"@tabler/icons-react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{createContext as g,useContext as _,useMemo as v,useState as y}from"react";import*as b from"react-phone-number-input";import x from"react-phone-number-input/flags";const S=g({popupClassName:void 0,scrollAreaClassName:void 0});function PhoneInput({className:t,popupClassName:n,scrollAreaClassName:r,onChange:i,value:a,...o}){return/* @__PURE__ */ m(S.Provider,{value:{popupClassName:n,scrollAreaClassName:r},children:/* @__PURE__ */ m(b.default,{className:e(`flex`,o[`aria-invalid`]&&`[&_*[data-slot=combobox-trigger]]:border-destructive [&_*[data-slot=combobox-trigger]]:ring-destructive/50`,t),flagComponent:FlagComponent,countrySelectComponent:CountrySelect,inputComponent:InputComponent,smartCaret:!1,defaultCountry:`BR`,value:a||void 0,onChange:e=>i?.(e||``),...o})})}function InputComponent({className:t,...r}){return/* @__PURE__ */ m(n,{className:e(`rounded-s-none focus:z-1`,t),...r})}function CountrySelect({disabled:n,value:p,options:g,onChange:x}){let{popupClassName:C}=_(S),[w,T]=y(``),E=v(()=>w?g.filter(({label:e})=>e.toLowerCase().includes(w.toLowerCase())):g,[g,w]);return/* @__PURE__ */ h(r,{items:E,value:p||``,onValueChange:e=>{e&&x(e)},children:[/* @__PURE__ */ m(u,{render:/* @__PURE__ */ h(t,{variant:`outline`,color:`zinc`,className:e(`flex h-8 items-center gap-1 rounded-s-lg rounded-e-none border-e-0 border-input px-2.5 py-0 leading-none dark:bg-input/30`,`hover:bg-transparent focus:z-10 data-pressed:bg-transparent`,n&&`opacity-50`),disabled:n,children:[/* @__PURE__ */ m(`span`,{className:`sr-only`,children:/* @__PURE__ */ m(d,{})}),/* @__PURE__ */ m(FlagComponent,{country:p,countryName:p})]})}),/* @__PURE__ */ h(i,{className:e(`w-xs *:data-[slot=input-group]:bg-transparent`,C),children:[/* @__PURE__ */ m(o,{placeholder:`e.g. United States`,value:w,onChange:e=>T(e.target.value),showTrigger:!1,className:`border-input focus-visible:border-border rounded-none border-0 px-0 py-2.5 shadow-none ring-0! outline-none! focus-visible:ring-0 focus-visible:ring-offset-0`}),/* @__PURE__ */ m(l,{}),/* @__PURE__ */ m(a,{className:`px-4 py-2.5 text-sm`,children:`Nenhum país encontrado.`}),/* @__PURE__ */ m(c,{children:/* @__PURE__ */ m(`div`,{className:`relative flex max-h-full`,children:/* @__PURE__ */ m(`div`,{className:`flex max-h-[min(var(--available-height),24rem)] w-full scroll-pt-2 scroll-pb-2 flex-col overscroll-contain`,children:/* @__PURE__ */ m(f,{className:`size-full min-h-0 **:data-[slot=scroll-area-scrollbar]:m-0 **:data-[slot=scroll-area-viewport]:h-full **:data-[slot=scroll-area-viewport]:overscroll-contain`,children:E.map(e=>e.value?/* @__PURE__ */ h(s,{value:e.value,className:`flex items-center gap-2`,children:[/* @__PURE__ */ m(FlagComponent,{country:e.value,countryName:e.label}),/* @__PURE__ */ m(`span`,{className:`flex-1 text-sm`,children:e.label}),/* @__PURE__ */ m(`span`,{className:`text-foreground/50 text-sm`,children:`+${b.getCountryCallingCode(e.value)}`})]},e.value):null)})})})})]})]})}function FlagComponent({country:e,countryName:t}){let n=x[e];return/* @__PURE__ */ m(`span`,{className:`flex h-4 w-4 items-center justify-center [&_svg:not([class*='size-'])]:size-full! [&_svg:not([class*='size-'])]:rounded-[5px]`,children:n?/* @__PURE__ */ m(n,{title:t}):/* @__PURE__ */ m(p,{className:`size-4 opacity-60`})})}export{PhoneInput};
2
2
  //# sourceMappingURL=phone-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"phone-input.js","names":[],"sources":["../../src/components/phone-input.tsx"],"sourcesContent":["import { type ComponentProps, createContext, useContext, useMemo, useState } from 'react'\nimport * as BasePhoneInput from 'react-phone-number-input'\nimport flags from 'react-phone-number-input/flags'\n\nimport { IconWorld } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxSeparator,\n ComboboxTrigger,\n ComboboxValue\n} from './combobox'\nimport { Input } from './input'\nimport { ScrollArea } from './scroll-area'\n\nconst PhoneInputContext = createContext<{\n popupClassName?: string\n scrollAreaClassName?: string\n}>({\n popupClassName: undefined,\n scrollAreaClassName: undefined\n})\n\nexport type PhoneInputProps = Omit<ComponentProps<'input'>, 'onChange' | 'value' | 'ref'> &\n Omit<BasePhoneInput.Props<typeof BasePhoneInput.default>, 'onChange' | 'popupClassName' | 'scrollAreaClassName'> & {\n onChange?: (value: BasePhoneInput.Value) => void\n popupClassName?: string\n scrollAreaClassName?: string\n }\n\nfunction PhoneInput({ className, popupClassName, scrollAreaClassName, onChange, value, ...props }: PhoneInputProps) {\n return (\n <PhoneInputContext.Provider value={{ popupClassName, scrollAreaClassName }}>\n <BasePhoneInput.default\n className={cn(\n 'flex',\n props['aria-invalid'] &&\n '[&_*[data-slot=combobox-trigger]]:border-destructive [&_*[data-slot=combobox-trigger]]:ring-destructive/50',\n className\n )}\n flagComponent={FlagComponent}\n countrySelectComponent={CountrySelect}\n inputComponent={InputComponent}\n smartCaret={false}\n defaultCountry=\"BR\"\n value={value || undefined}\n onChange={(value) => onChange?.(value || ('' as BasePhoneInput.Value))}\n {...props}\n />\n </PhoneInputContext.Provider>\n )\n}\n\nfunction InputComponent({ className, ...props }: ComponentProps<typeof Input>) {\n return <Input className={cn('rounded-s-none focus:z-1', className)} {...props} />\n}\n\ntype CountryEntry = { label: string; value: BasePhoneInput.Country | undefined }\n\ntype CountrySelectProps = {\n disabled?: boolean\n value: BasePhoneInput.Country\n options: CountryEntry[]\n onChange: (country: BasePhoneInput.Country) => void\n}\n\nfunction CountrySelect({ disabled, value: selectedCountry, options: countryList, onChange }: CountrySelectProps) {\n const { popupClassName } = useContext(PhoneInputContext)\n const [searchValue, setSearchValue] = useState('')\n\n const filteredCountries = useMemo(() => {\n if (!searchValue) return countryList\n return countryList.filter(({ label }) => label.toLowerCase().includes(searchValue.toLowerCase()))\n }, [countryList, searchValue])\n\n return (\n <Combobox\n items={filteredCountries}\n value={selectedCountry || ''}\n onValueChange={(country: BasePhoneInput.Country | null) => {\n if (country) {\n onChange(country)\n }\n }}\n >\n <ComboboxTrigger\n render={\n <Button\n variant=\"outline\"\n color=\"zinc\"\n className={cn(\n 'flex h-8 items-center gap-1 rounded-s-lg rounded-e-none border-e-0 border-input px-2.5 py-0 leading-none dark:bg-input/30',\n 'hover:bg-transparent focus:z-10 data-pressed:bg-transparent',\n disabled && 'opacity-50'\n )}\n disabled={disabled}\n >\n <span className=\"sr-only\">\n <ComboboxValue />\n </span>\n <FlagComponent country={selectedCountry} countryName={selectedCountry} />\n </Button>\n }\n />\n <ComboboxContent className={cn('w-xs *:data-[slot=input-group]:bg-transparent', popupClassName)}>\n <ComboboxInput\n placeholder=\"e.g. United States\"\n value={searchValue}\n onChange={(e) => setSearchValue(e.target.value)}\n showTrigger={false}\n className=\"border-input focus-visible:border-border rounded-none border-0 px-0 py-2.5 shadow-none ring-0! outline-none! focus-visible:ring-0 focus-visible:ring-offset-0\"\n />\n <ComboboxSeparator />\n <ComboboxEmpty className=\"px-4 py-2.5 text-sm\">Nenhum país encontrado.</ComboboxEmpty>\n <ComboboxList>\n <div className=\"relative flex max-h-full\">\n <div className=\"flex max-h-[min(var(--available-height),24rem)] w-full scroll-pt-2 scroll-pb-2 flex-col overscroll-contain\">\n <ScrollArea className=\"size-full min-h-0 **:data-[slot=scroll-area-scrollbar]:m-0 **:data-[slot=scroll-area-viewport]:h-full **:data-[slot=scroll-area-viewport]:overscroll-contain\">\n {filteredCountries.map((item: CountryEntry) =>\n item.value ? (\n <ComboboxItem key={item.value} value={item.value} className=\"flex items-center gap-2\">\n <FlagComponent country={item.value} countryName={item.label} />\n <span className=\"flex-1 text-sm\">{item.label}</span>\n <span className=\"text-foreground/50 text-sm\">\n {`+${BasePhoneInput.getCountryCallingCode(item.value)}`}\n </span>\n </ComboboxItem>\n ) : null\n )}\n </ScrollArea>\n </div>\n </div>\n </ComboboxList>\n </ComboboxContent>\n </Combobox>\n )\n}\n\nfunction FlagComponent({ country, countryName }: BasePhoneInput.FlagProps) {\n const Flag = flags[country]\n\n return (\n <span className=\"flex h-4 w-4 items-center justify-center [&_svg:not([class*='size-'])]:size-full! [&_svg:not([class*='size-'])]:rounded-[5px]\">\n {Flag ? <Flag title={countryName} /> : <IconWorld className=\"size-4 opacity-60\" />}\n </span>\n )\n}\n\nexport { PhoneInput }\n"],"mappings":"spBAsBA,MAAM,EAAoB,EAGvB,CACD,eAAgB,IAAA,GAChB,oBAAqB,IAAA,EACvB,CAAC,EASD,SAAS,WAAW,CAAE,YAAW,iBAAgB,sBAAqB,WAAU,QAAO,GAAG,GAA0B,CAClH,OACE,EAAC,EAAkB,SAAnB,CAA4B,MAAO,CAAE,iBAAgB,qBAAoB,EACvE,SAAA,EAAC,EAAe,QAAhB,CACE,UAAW,EACT,OACA,EAAM,iBACJ,6GACF,CACF,EACA,cAAe,cACf,uBAAwB,cACxB,eAAgB,eAChB,WAAY,GACZ,eAAe,KACf,MAAO,GAAS,IAAA,GAChB,SAAW,GAAU,IAAW,GAAU,EAA2B,EACrE,GAAI,CACL,CAAA,CACyB,CAAA,CAEhC,CAEA,SAAS,eAAe,CAAE,YAAW,GAAG,GAAuC,CAC7E,OAAO,EAAC,EAAD,CAAO,UAAW,EAAG,2BAA4B,CAAS,EAAG,GAAI,CAAQ,CAAA,CAClF,CAWA,SAAS,cAAc,CAAE,WAAU,MAAO,EAAiB,QAAS,EAAa,YAAgC,CAC/G,GAAM,CAAE,kBAAmB,EAAW,CAAiB,EACjD,CAAC,EAAa,GAAkB,EAAS,EAAE,EAE3C,EAAoB,MACnB,EACE,EAAY,QAAQ,CAAE,WAAY,EAAM,YAAY,CAAC,CAAC,SAAS,EAAY,YAAY,CAAC,CAAC,EADvE,EAExB,CAAC,EAAa,CAAW,CAAC,EAE7B,OACE,EAAC,EAAD,CACE,MAAO,EACP,MAAO,GAAmB,GAC1B,cAAgB,GAA2C,CACrD,GACF,EAAS,CAAO,CAEpB,EAPF,SAAA,CASE,EAAC,EAAD,CACE,OACE,EAAC,EAAD,CACE,QAAQ,UACR,MAAM,OACN,UAAW,EACT,4HACA,8DACA,GAAY,YACd,EACU,WARZ,SAAA,CAUE,EAAC,OAAD,CAAM,UAAU,UACd,SAAA,EAAC,EAAD,CAAgB,CAAA,CACZ,CAAA,EACN,EAAC,cAAD,CAAe,QAAS,EAAiB,YAAa,CAAkB,CAAA,CAClE,CAEX,CAAA,CAAA,CAAA,EACD,EAAC,EAAD,CAAiB,UAAW,EAAG,gDAAiD,CAAc,EAA9F,SAAA,CACE,EAAC,EAAD,CACE,YAAY,qBACZ,MAAO,EACP,SAAW,GAAM,EAAe,EAAE,OAAO,KAAK,EAC9C,YAAa,GACb,UAAU,+JACX,CAAA,EACD,EAAC,EAAD,CAAoB,CAAA,EACpB,EAAC,EAAD,CAAe,UAAU,sBAAsB,SAAA,yBAAsC,CAAA,EACrF,EAAC,EAAD,CAAA,SACE,EAAC,MAAD,CAAK,UAAU,2BACb,SAAA,EAAC,MAAD,CAAK,UAAU,6GACb,SAAA,EAAC,EAAD,CAAY,UAAU,+JACnB,SAAA,EAAkB,IAAK,GACtB,EAAK,MACH,EAAC,EAAD,CAA+B,MAAO,EAAK,MAAO,UAAU,0BAA5D,SAAA,CACE,EAAC,cAAD,CAAe,QAAS,EAAK,MAAO,YAAa,EAAK,KAAQ,CAAA,EAC9D,EAAC,OAAD,CAAM,UAAU,iBAAkB,SAAA,EAAK,KAAY,CAAA,EACnD,EAAC,OAAD,CAAM,UAAU,6BACb,SAAA,IAAI,EAAe,sBAAsB,EAAK,KAAK,GAChD,CAAA,CACM,CANK,EAAA,EAAK,KAMV,EACZ,IACN,CACU,CAAA,CACT,CAAA,CACF,CAAA,CACO,CAAA,CACC,CACT,CAAA,CAAA,GAEd,CAEA,SAAS,cAAc,CAAE,UAAS,eAAyC,CACzE,IAAM,EAAO,EAAM,GAEnB,OACE,EAAC,OAAD,CAAM,UAAU,gIACb,SAAA,EAAO,EAAC,EAAD,CAAM,MAAO,CAAc,CAAA,EAAI,EAAC,EAAD,CAAW,UAAU,mBAAqB,CAAA,CAC7E,CAAA,CAEV"}
1
+ {"version":3,"file":"phone-input.js","names":["BasePhoneInput","flags","PhoneInputContext","createContext","props","cn","className","value","onChange","Input","selectedCountry","countryList","useContext","searchValue","setSearchValue","useState","filteredCountries","useMemo","label","Combobox","country","ComboboxTrigger","Button","disabled","ComboboxValue","ComboboxContent","popupClassName","ComboboxInput","ComboboxSeparator","ComboboxEmpty","ComboboxList","ScrollArea","item","ComboboxItem","Flag","countryName","IconWorld"],"sources":["../../src/components/phone-input.tsx"],"sourcesContent":["import { type ComponentProps, createContext, useContext, useMemo, useState } from 'react'\nimport * as BasePhoneInput from 'react-phone-number-input'\nimport flags from 'react-phone-number-input/flags'\n\nimport { IconWorld } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxSeparator,\n ComboboxTrigger,\n ComboboxValue\n} from './combobox'\nimport { Input } from './input'\nimport { ScrollArea } from './scroll-area'\n\nconst PhoneInputContext = createContext<{\n popupClassName?: string\n scrollAreaClassName?: string\n}>({\n popupClassName: undefined,\n scrollAreaClassName: undefined\n})\n\nexport type PhoneInputProps = Omit<ComponentProps<'input'>, 'onChange' | 'value' | 'ref'> &\n Omit<BasePhoneInput.Props<typeof BasePhoneInput.default>, 'onChange' | 'popupClassName' | 'scrollAreaClassName'> & {\n onChange?: (value: BasePhoneInput.Value) => void\n popupClassName?: string\n scrollAreaClassName?: string\n }\n\nexport type PhoneInputValue = BasePhoneInput.Value\nexport type PhoneInputCountry = BasePhoneInput.Country\nexport type PhoneInputLabels = BasePhoneInput.Labels\n\nfunction PhoneInput({ className, popupClassName, scrollAreaClassName, onChange, value, ...props }: PhoneInputProps) {\n return (\n <PhoneInputContext.Provider value={{ popupClassName, scrollAreaClassName }}>\n <BasePhoneInput.default\n className={cn(\n 'flex',\n props['aria-invalid'] &&\n '[&_*[data-slot=combobox-trigger]]:border-destructive [&_*[data-slot=combobox-trigger]]:ring-destructive/50',\n className\n )}\n flagComponent={FlagComponent}\n countrySelectComponent={CountrySelect}\n inputComponent={InputComponent}\n smartCaret={false}\n defaultCountry=\"BR\"\n value={value || undefined}\n onChange={(value) => onChange?.(value || ('' as BasePhoneInput.Value))}\n {...props}\n />\n </PhoneInputContext.Provider>\n )\n}\n\nfunction InputComponent({ className, ...props }: ComponentProps<typeof Input>) {\n return <Input className={cn('rounded-s-none focus:z-1', className)} {...props} />\n}\n\ntype CountryEntry = { label: string; value: BasePhoneInput.Country | undefined }\n\ntype CountrySelectProps = {\n disabled?: boolean\n value: BasePhoneInput.Country\n options: CountryEntry[]\n onChange: (country: BasePhoneInput.Country) => void\n}\n\nfunction CountrySelect({ disabled, value: selectedCountry, options: countryList, onChange }: CountrySelectProps) {\n const { popupClassName } = useContext(PhoneInputContext)\n const [searchValue, setSearchValue] = useState('')\n\n const filteredCountries = useMemo(() => {\n if (!searchValue) return countryList\n return countryList.filter(({ label }) => label.toLowerCase().includes(searchValue.toLowerCase()))\n }, [countryList, searchValue])\n\n return (\n <Combobox\n items={filteredCountries}\n value={selectedCountry || ''}\n onValueChange={(country: BasePhoneInput.Country | null) => {\n if (country) {\n onChange(country)\n }\n }}\n >\n <ComboboxTrigger\n render={\n <Button\n variant=\"outline\"\n color=\"zinc\"\n className={cn(\n 'flex h-8 items-center gap-1 rounded-s-lg rounded-e-none border-e-0 border-input px-2.5 py-0 leading-none dark:bg-input/30',\n 'hover:bg-transparent focus:z-10 data-pressed:bg-transparent',\n disabled && 'opacity-50'\n )}\n disabled={disabled}\n >\n <span className=\"sr-only\">\n <ComboboxValue />\n </span>\n <FlagComponent country={selectedCountry} countryName={selectedCountry} />\n </Button>\n }\n />\n <ComboboxContent className={cn('w-xs *:data-[slot=input-group]:bg-transparent', popupClassName)}>\n <ComboboxInput\n placeholder=\"e.g. United States\"\n value={searchValue}\n onChange={(e) => setSearchValue(e.target.value)}\n showTrigger={false}\n className=\"border-input focus-visible:border-border rounded-none border-0 px-0 py-2.5 shadow-none ring-0! outline-none! focus-visible:ring-0 focus-visible:ring-offset-0\"\n />\n <ComboboxSeparator />\n <ComboboxEmpty className=\"px-4 py-2.5 text-sm\">Nenhum país encontrado.</ComboboxEmpty>\n <ComboboxList>\n <div className=\"relative flex max-h-full\">\n <div className=\"flex max-h-[min(var(--available-height),24rem)] w-full scroll-pt-2 scroll-pb-2 flex-col overscroll-contain\">\n <ScrollArea className=\"size-full min-h-0 **:data-[slot=scroll-area-scrollbar]:m-0 **:data-[slot=scroll-area-viewport]:h-full **:data-[slot=scroll-area-viewport]:overscroll-contain\">\n {filteredCountries.map((item: CountryEntry) =>\n item.value ? (\n <ComboboxItem key={item.value} value={item.value} className=\"flex items-center gap-2\">\n <FlagComponent country={item.value} countryName={item.label} />\n <span className=\"flex-1 text-sm\">{item.label}</span>\n <span className=\"text-foreground/50 text-sm\">\n {`+${BasePhoneInput.getCountryCallingCode(item.value)}`}\n </span>\n </ComboboxItem>\n ) : null\n )}\n </ScrollArea>\n </div>\n </div>\n </ComboboxList>\n </ComboboxContent>\n </Combobox>\n )\n}\n\nfunction FlagComponent({ country, countryName }: BasePhoneInput.FlagProps) {\n const Flag = flags[country]\n\n return (\n <span className=\"flex h-4 w-4 items-center justify-center [&_svg:not([class*='size-'])]:size-full! [&_svg:not([class*='size-'])]:rounded-[5px]\">\n {Flag ? <Flag title={countryName} /> : <IconWorld className=\"size-4 opacity-60\" />}\n </span>\n )\n}\n\nexport { PhoneInput }\n"],"mappings":"spBAsBA,MAAME,EAAoBC,EAGvB,CACD,eAAgB,IAAA,GAChB,oBAAqB,IAAA,EACvB,CAAC,EAaD,SAAS,WAAW,CAAE,YAAW,iBAAgB,sBAAqB,WAAU,QAAO,GAAGC,GAA0B,CAClH,MACE,kBAACF,EAAkB,SAAnB,CAA4B,MAAO,CAAE,iBAAgB,qBAAoB,EACvE,SAAA,kBAACF,EAAe,QAAhB,CACE,UAAWK,EACT,OACAD,EAAM,iBACJ,6GACFE,CACF,EACA,cAAe,cACf,uBAAwB,cACxB,eAAgB,eAChB,WAAY,GACZ,eAAe,KACf,MAAOC,GAAS,IAAA,GAChB,SAAW,GAAUC,IAAWD,GAAU,EAA2B,EACrE,GAAIH,CACL,CAAA,CACyB,CAAA,CAEhC,CAEA,SAAS,eAAe,CAAE,YAAW,GAAGA,GAAuC,CAC7E,MAAO,kBAACK,EAAD,CAAO,UAAWJ,EAAG,2BAA4BC,CAAS,EAAG,GAAIF,CAAQ,CAAA,CAClF,CAWA,SAAS,cAAc,CAAE,WAAU,MAAOM,EAAiB,QAASC,EAAa,YAAgC,CAC/G,GAAM,CAAE,kBAAmBC,EAAWV,CAAiB,EACjD,CAACW,EAAaC,GAAkBC,EAAS,EAAE,EAE3CC,EAAoBC,MACnBJ,EACEF,EAAY,QAAQ,CAAE,WAAYO,EAAM,YAAY,CAAC,CAAC,SAASL,EAAY,YAAY,CAAC,CAAC,EADvEF,EAExB,CAACA,EAAaE,CAAW,CAAC,EAE7B,MACE,kBAACM,EAAD,CACE,MAAOH,EACP,MAAON,GAAmB,GAC1B,cAAgB,GAA2C,CACrDU,GACFZ,EAASY,CAAO,CAEpB,EAPF,SAAA,CASE,kBAACC,EAAD,CACE,OACE,kBAACC,EAAD,CACE,QAAQ,UACR,MAAM,OACN,UAAWjB,EACT,4HACA,8DACAkB,GAAY,YACd,EACU,WARZ,SAAA,CAUE,kBAAC,OAAD,CAAM,UAAU,UACd,SAAA,kBAACC,EAAD,CAAgB,CAAA,CACZ,CAAA,EACN,kBAAC,cAAD,CAAe,QAASd,EAAiB,YAAaA,CAAkB,CAAA,CAClE,CAEX,CAAA,CAAA,CAAA,EACD,kBAACe,EAAD,CAAiB,UAAWpB,EAAG,gDAAiDqB,CAAc,EAA9F,SAAA,CACE,kBAACC,EAAD,CACE,YAAY,qBACZ,MAAOd,EACP,SAAW,GAAMC,EAAe,EAAE,OAAO,KAAK,EAC9C,YAAa,GACb,UAAU,+JACX,CAAA,EACD,kBAACc,EAAD,CAAoB,CAAA,EACpB,kBAACC,EAAD,CAAe,UAAU,sBAAsB,SAAA,yBAAsC,CAAA,EACrF,kBAACC,EAAD,CAAA,SACE,kBAAC,MAAD,CAAK,UAAU,2BACb,SAAA,kBAAC,MAAD,CAAK,UAAU,6GACb,SAAA,kBAACC,EAAD,CAAY,UAAU,+JACnB,SAAAf,EAAkB,IAAK,GACtBgB,EAAK,MACH,kBAACC,EAAD,CAA+B,MAAOD,EAAK,MAAO,UAAU,0BAA5D,SAAA,CACE,kBAAC,cAAD,CAAe,QAASA,EAAK,MAAO,YAAaA,EAAK,KAAQ,CAAA,EAC9D,kBAAC,OAAD,CAAM,UAAU,iBAAkB,SAAAA,EAAK,KAAY,CAAA,EACnD,kBAAC,OAAD,CAAM,UAAU,6BACb,SAAA,IAAIhC,EAAe,sBAAsBgC,EAAK,KAAK,GAChD,CAAA,CACM,CANK,EAAAA,EAAK,KAMV,EACZ,IACN,CACU,CAAA,CACT,CAAA,CACF,CAAA,CACO,CAAA,CACC,CACT,CAAA,CAAA,GAEd,CAEA,SAAS,cAAc,CAAE,UAAS,eAAyC,CACzE,IAAME,EAAOjC,EAAMmB,GAEnB,MACE,kBAAC,OAAD,CAAM,UAAU,gIACb,SAAAc,EAAO,kBAACA,EAAD,CAAM,MAAOC,CAAc,CAAA,EAAI,kBAACC,EAAD,CAAW,UAAU,mBAAqB,CAAA,CAC7E,CAAA,CAEV"}
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{ChartContainer as t,ChartLegendContent as n,ChartTooltipContent as r,DEFAULT_CHART_PALETTE as i,resolveChartColor as a}from"./chart.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";import*as c from"react";import{Legend as l,Pie as u,PieChart as d,Tooltip as f}from"recharts";function buildPieConfig(e){return e.reduce((e,t,n)=>(e[t.name]={label:t.name,color:t.color??a(t.colorKey)??i[n%i.length]},e),{})}function PieChartBase({className:i,data:p,withTooltip:m=!0,withLegend:h=!1,withLabels:g=!1,labelsPosition:_=`outside`,startAngle:v=90,endAngle:y=-270,paddingAngle:b=0,strokeWidth:x=1,strokeColor:S=`var(--background)`,innerRadius:C=0,outerRadius:w=`80%`,animationDuration:T,tooltipProps:E,legendProps:D,pieProps:O,dataSlot:k,centerSlot:A,...j}){let M=c.useMemo(()=>buildPieConfig(p),[p]),N=a(S)??S,P=c.useMemo(()=>p.map(e=>({...e,fill:M[e.name]?.color,stroke:N})),[p,N,M]);return o(t,{"data-slot":k,className:e(`relative aspect-square w-full`,i),config:M,...j,children:s(d,{children:[m&&o(f,{cursor:!1,content:o(r,{hideLabel:!0,...E})}),h&&o(l,{content:o(n,{nameKey:`name`,...D})}),o(u,{data:P,dataKey:`value`,nameKey:`name`,startAngle:v,endAngle:y,innerRadius:C,outerRadius:w,paddingAngle:b,strokeWidth:x,label:g?{fontSize:12}:void 0,labelLine:g&&_===`outside`,animationDuration:T,isAnimationActive:T!==0,...O,children:A})]})})}function PieChart(e){return o(PieChartBase,{...e,dataSlot:`pie-chart`})}export{PieChart,PieChartBase,buildPieConfig};
1
+ import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{ChartContainer as t,ChartLegendContent as n,ChartTooltipContent as r,DEFAULT_CHART_PALETTE as i,resolveChartColor as a}from"./chart.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";import*as c from"react";import{Legend as l,Pie as u,PieChart as d,Tooltip as f}from"recharts";function buildPieConfig(e){return e.reduce((e,t,n)=>(e[t.name]={label:t.name,color:t.color??a(t.colorKey)??i[n%i.length]},e),{})}function PieChartBase({className:i,data:p,withTooltip:m=!0,withLegend:h=!1,withLabels:g=!1,labelsPosition:_=`outside`,startAngle:v=90,endAngle:y=-270,paddingAngle:b=0,strokeWidth:x=1,strokeColor:S=`var(--background)`,innerRadius:C=0,outerRadius:w=`80%`,animationDuration:T,tooltipProps:E,legendProps:D,pieProps:O,dataSlot:k,centerSlot:A,...j}){let M=c.useMemo(()=>buildPieConfig(p),[p]),N=a(S)??S,P=c.useMemo(()=>p.map(e=>({...e,fill:M[e.name]?.color,stroke:N})),[p,N,M]);return/* @__PURE__ */ o(t,{"data-slot":k,className:e(`relative aspect-square w-full`,i),config:M,...j,children:/* @__PURE__ */ s(d,{children:[m&&/* @__PURE__ */ o(f,{cursor:!1,content:/* @__PURE__ */ o(r,{hideLabel:!0,...E})}),h&&/* @__PURE__ */ o(l,{content:/* @__PURE__ */ o(n,{nameKey:`name`,...D})}),/* @__PURE__ */ o(u,{data:P,dataKey:`value`,nameKey:`name`,startAngle:v,endAngle:y,innerRadius:C,outerRadius:w,paddingAngle:b,strokeWidth:x,label:g?{fontSize:12}:void 0,labelLine:g&&_===`outside`,animationDuration:T,isAnimationActive:T!==0,...O,children:A})]})})}function PieChart(e){return/* @__PURE__ */ o(PieChartBase,{...e,dataSlot:`pie-chart`})}export{PieChart,PieChartBase,buildPieConfig};
2
2
  //# sourceMappingURL=pie-chart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pie-chart.js","names":["RechartsPieChart"],"sources":["../../src/components/pie-chart.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Legend, Pie, PieChart as RechartsPieChart, Tooltip } from 'recharts'\n\nimport { cn } from '../lib/utils'\nimport {\n type ChartColorKey,\n type ChartConfig,\n ChartContainer,\n ChartLegendContent,\n type ChartLegendContentProps,\n ChartTooltipContent,\n type ChartTooltipContentProps,\n DEFAULT_CHART_PALETTE,\n resolveChartColor\n} from './chart'\n\nexport type PieChartDatum = {\n name: string\n value: number\n color?: string\n colorKey?: ChartColorKey\n}\n\nexport type PieChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {\n data: PieChartDatum[]\n withTooltip?: boolean\n withLegend?: boolean\n withLabels?: boolean\n labelsPosition?: 'inside' | 'outside'\n startAngle?: number\n endAngle?: number\n paddingAngle?: number\n strokeWidth?: number\n strokeColor?: ChartColorKey | string\n innerRadius?: number | string\n outerRadius?: number | string\n animationDuration?: number\n tooltipProps?: ChartTooltipContentProps\n legendProps?: ChartLegendContentProps\n pieProps?: Partial<React.ComponentProps<typeof Pie>>\n children?: React.ReactNode\n}\n\nexport function buildPieConfig(data: PieChartDatum[]): ChartConfig {\n return data.reduce<ChartConfig>((acc, item, index) => {\n acc[item.name] = {\n label: item.name,\n color:\n item.color ?? resolveChartColor(item.colorKey) ?? DEFAULT_CHART_PALETTE[index % DEFAULT_CHART_PALETTE.length]\n }\n return acc\n }, {})\n}\n\nexport type PieChartBaseProps = Omit<PieChartProps, 'children'> & {\n dataSlot: string\n innerRadius?: number | string\n outerRadius?: number | string\n centerSlot?: React.ReactNode\n}\n\nfunction PieChartBase({\n className,\n data,\n withTooltip = true,\n withLegend = false,\n withLabels = false,\n labelsPosition = 'outside',\n startAngle = 90,\n endAngle = -270,\n paddingAngle = 0,\n strokeWidth = 1,\n strokeColor = 'var(--background)',\n innerRadius = 0,\n outerRadius = '80%',\n animationDuration,\n tooltipProps,\n legendProps,\n pieProps,\n dataSlot,\n centerSlot,\n ...props\n}: PieChartBaseProps) {\n const config = React.useMemo(() => buildPieConfig(data), [data])\n const resolvedStroke = resolveChartColor(strokeColor) ?? strokeColor\n const styledData = React.useMemo(\n () => data.map((item) => ({ ...item, fill: config[item.name]?.color, stroke: resolvedStroke })),\n [data, resolvedStroke, config]\n )\n\n return (\n <ChartContainer\n data-slot={dataSlot}\n className={cn('relative aspect-square w-full', className)}\n config={config}\n {...props}\n >\n <RechartsPieChart>\n {withTooltip && <Tooltip cursor={false} content={<ChartTooltipContent hideLabel {...tooltipProps} />} />}\n {withLegend && <Legend content={<ChartLegendContent nameKey=\"name\" {...legendProps} />} />}\n <Pie\n data={styledData}\n dataKey=\"value\"\n nameKey=\"name\"\n startAngle={startAngle}\n endAngle={endAngle}\n innerRadius={innerRadius}\n outerRadius={outerRadius}\n paddingAngle={paddingAngle}\n strokeWidth={strokeWidth}\n label={withLabels ? { fontSize: 12 } : undefined}\n labelLine={withLabels && labelsPosition === 'outside'}\n animationDuration={animationDuration}\n isAnimationActive={animationDuration !== 0}\n {...pieProps}\n >\n {centerSlot}\n </Pie>\n </RechartsPieChart>\n </ChartContainer>\n )\n}\n\nfunction PieChart(props: PieChartProps) {\n return <PieChartBase {...props} dataSlot=\"pie-chart\" />\n}\n\nexport { PieChart, PieChartBase }\n"],"mappings":"4WA4CA,SAAgB,eAAe,EAAoC,CACjE,OAAO,EAAK,QAAqB,EAAK,EAAM,KAC1C,EAAI,EAAK,MAAQ,CACf,MAAO,EAAK,KACZ,MACE,EAAK,OAAS,EAAkB,EAAK,QAAQ,GAAK,EAAsB,EAAQ,EAAsB,OAC1G,EACO,GACN,CAAC,CAAC,CACP,CASA,SAAS,aAAa,CACpB,YACA,OACA,cAAc,GACd,aAAa,GACb,aAAa,GACb,iBAAiB,UACjB,aAAa,GACb,WAAW,KACX,eAAe,EACf,cAAc,EACd,cAAc,oBACd,cAAc,EACd,cAAc,MACd,oBACA,eACA,cACA,WACA,WACA,aACA,GAAG,GACiB,CACpB,IAAM,EAAS,EAAM,YAAc,eAAe,CAAI,EAAG,CAAC,CAAI,CAAC,EACzD,EAAiB,EAAkB,CAAW,GAAK,EACnD,EAAa,EAAM,YACjB,EAAK,IAAK,IAAU,CAAE,GAAG,EAAM,KAAM,EAAO,EAAK,KAAK,EAAE,MAAO,OAAQ,CAAe,EAAE,EAC9F,CAAC,EAAM,EAAgB,CAAM,CAC/B,EAEA,OACE,EAAC,EAAD,CACE,YAAW,EACX,UAAW,EAAG,gCAAiC,CAAS,EAChD,SACR,GAAI,EAEJ,SAAA,EAACA,EAAD,CAAA,SAAA,CACG,GAAe,EAAC,EAAD,CAAS,OAAQ,GAAO,QAAS,EAAC,EAAD,CAAqB,UAAA,GAAU,GAAI,CAAe,CAAA,CAAI,CAAA,EACtG,GAAc,EAAC,EAAD,CAAQ,QAAS,EAAC,EAAD,CAAoB,QAAQ,OAAO,GAAI,CAAc,CAAA,CAAI,CAAA,EACzF,EAAC,EAAD,CACE,KAAM,EACN,QAAQ,QACR,QAAQ,OACI,aACF,WACG,cACA,cACC,eACD,cACb,MAAO,EAAa,CAAE,SAAU,EAAG,EAAI,IAAA,GACvC,UAAW,GAAc,IAAmB,UACzB,oBACnB,kBAAmB,IAAsB,EACzC,GAAI,EAEH,SAAA,CACE,CAAA,CACW,CAAA,CAAA,CACJ,CAAA,CAEpB,CAEA,SAAS,SAAS,EAAsB,CACtC,OAAO,EAAC,aAAD,CAAc,GAAI,EAAO,SAAS,WAAa,CAAA,CACxD"}
1
+ {"version":3,"file":"pie-chart.js","names":["RechartsPieChart","React","PieChart$1","data","item","resolveChartColor","DEFAULT_CHART_PALETTE","index","acc","props","config","resolvedStroke","strokeColor","styledData","ChartContainer","dataSlot","cn","className","withTooltip","Tooltip","ChartTooltipContent","tooltipProps","withLegend","Legend","ChartLegendContent","legendProps","Pie","withLabels","labelsPosition","animationDuration","pieProps","centerSlot"],"sources":["../../src/components/pie-chart.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Legend, Pie, PieChart as RechartsPieChart, Tooltip } from 'recharts'\n\nimport { cn } from '../lib/utils'\nimport {\n type ChartColorKey,\n type ChartConfig,\n ChartContainer,\n ChartLegendContent,\n type ChartLegendContentProps,\n ChartTooltipContent,\n type ChartTooltipContentProps,\n DEFAULT_CHART_PALETTE,\n resolveChartColor\n} from './chart'\n\nexport type PieChartDatum = {\n name: string\n value: number\n color?: string\n colorKey?: ChartColorKey\n}\n\nexport type PieChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {\n data: PieChartDatum[]\n withTooltip?: boolean\n withLegend?: boolean\n withLabels?: boolean\n labelsPosition?: 'inside' | 'outside'\n startAngle?: number\n endAngle?: number\n paddingAngle?: number\n strokeWidth?: number\n strokeColor?: ChartColorKey | string\n innerRadius?: number | string\n outerRadius?: number | string\n animationDuration?: number\n tooltipProps?: ChartTooltipContentProps\n legendProps?: ChartLegendContentProps\n pieProps?: Partial<React.ComponentProps<typeof Pie>>\n children?: React.ReactNode\n}\n\nexport function buildPieConfig(data: PieChartDatum[]): ChartConfig {\n return data.reduce<ChartConfig>((acc, item, index) => {\n acc[item.name] = {\n label: item.name,\n color:\n item.color ?? resolveChartColor(item.colorKey) ?? DEFAULT_CHART_PALETTE[index % DEFAULT_CHART_PALETTE.length]\n }\n return acc\n }, {})\n}\n\nexport type PieChartBaseProps = Omit<PieChartProps, 'children'> & {\n dataSlot: string\n innerRadius?: number | string\n outerRadius?: number | string\n centerSlot?: React.ReactNode\n}\n\nfunction PieChartBase({\n className,\n data,\n withTooltip = true,\n withLegend = false,\n withLabels = false,\n labelsPosition = 'outside',\n startAngle = 90,\n endAngle = -270,\n paddingAngle = 0,\n strokeWidth = 1,\n strokeColor = 'var(--background)',\n innerRadius = 0,\n outerRadius = '80%',\n animationDuration,\n tooltipProps,\n legendProps,\n pieProps,\n dataSlot,\n centerSlot,\n ...props\n}: PieChartBaseProps) {\n const config = React.useMemo(() => buildPieConfig(data), [data])\n const resolvedStroke = resolveChartColor(strokeColor) ?? strokeColor\n const styledData = React.useMemo(\n () => data.map((item) => ({ ...item, fill: config[item.name]?.color, stroke: resolvedStroke })),\n [data, resolvedStroke, config]\n )\n\n return (\n <ChartContainer\n data-slot={dataSlot}\n className={cn('relative aspect-square w-full', className)}\n config={config}\n {...props}\n >\n <RechartsPieChart>\n {withTooltip && <Tooltip cursor={false} content={<ChartTooltipContent hideLabel {...tooltipProps} />} />}\n {withLegend && <Legend content={<ChartLegendContent nameKey=\"name\" {...legendProps} />} />}\n <Pie\n data={styledData}\n dataKey=\"value\"\n nameKey=\"name\"\n startAngle={startAngle}\n endAngle={endAngle}\n innerRadius={innerRadius}\n outerRadius={outerRadius}\n paddingAngle={paddingAngle}\n strokeWidth={strokeWidth}\n label={withLabels ? { fontSize: 12 } : undefined}\n labelLine={withLabels && labelsPosition === 'outside'}\n animationDuration={animationDuration}\n isAnimationActive={animationDuration !== 0}\n {...pieProps}\n >\n {centerSlot}\n </Pie>\n </RechartsPieChart>\n </ChartContainer>\n )\n}\n\nfunction PieChart(props: PieChartProps) {\n return <PieChartBase {...props} dataSlot=\"pie-chart\" />\n}\n\nexport { PieChart, PieChartBase }\n"],"mappings":"4WA4CA,SAAgB,eAAe,EAAoC,CACjE,OAAOG,EAAK,QAAqB,EAAK,EAAM,KAC1C,EAAIC,EAAK,MAAQ,CACf,MAAOA,EAAK,KACZ,MACEA,EAAK,OAASC,EAAkBD,EAAK,QAAQ,GAAKE,EAAsBC,EAAQD,EAAsB,OAC1G,EACOE,GACN,CAAC,CAAC,CACP,CASA,SAAS,aAAa,CACpB,YACA,OACA,cAAc,GACd,aAAa,GACb,aAAa,GACb,iBAAiB,UACjB,aAAa,GACb,WAAW,KACX,eAAe,EACf,cAAc,EACd,cAAc,oBACd,cAAc,EACd,cAAc,MACd,oBACA,eACA,cACA,WACA,WACA,aACA,GAAGC,GACiB,CACpB,IAAMC,EAAST,EAAM,YAAc,eAAeE,CAAI,EAAG,CAACA,CAAI,CAAC,EACzDQ,EAAiBN,EAAkBO,CAAW,GAAKA,EACnDC,EAAaZ,EAAM,YACjBE,EAAK,IAAK,IAAU,CAAE,GAAGC,EAAM,KAAMM,EAAON,EAAK,KAAK,EAAE,MAAO,OAAQO,CAAe,EAAE,EAC9F,CAACR,EAAMQ,EAAgBD,CAAM,CAC/B,EAEA,MACE,kBAACI,EAAD,CACE,YAAWC,EACX,UAAWC,EAAG,gCAAiCC,CAAS,EAChD,SACR,GAAIR,EAEJ,SAAA,kBAACT,EAAD,CAAA,SAAA,CACGkB,GAAe,kBAACC,EAAD,CAAS,OAAQ,GAAO,QAAS,kBAACC,EAAD,CAAqB,UAAA,GAAU,GAAIC,CAAe,CAAA,CAAI,CAAA,EACtGC,GAAc,kBAACC,EAAD,CAAQ,QAAS,kBAACC,EAAD,CAAoB,QAAQ,OAAO,GAAIC,CAAc,CAAA,CAAI,CAAA,EACzF,kBAACC,EAAD,CACE,KAAMb,EACN,QAAQ,QACR,QAAQ,OACI,aACF,WACG,cACA,cACC,eACD,cACb,MAAOc,EAAa,CAAE,SAAU,EAAG,EAAI,IAAA,GACvC,UAAWA,GAAcC,IAAmB,UACzB,oBACnB,kBAAmBC,IAAsB,EACzC,GAAIC,EAEH,SAAAC,CACE,CAAA,CACW,CAAA,CAAA,CACJ,CAAA,CAEpB,CAEA,SAAS,SAAS,EAAsB,CACtC,MAAO,kBAAC,aAAD,CAAc,GAAItB,EAAO,SAAS,WAAa,CAAA,CACxD"}
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{Popover as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function Popover({...e}){return n(t.Root,{"data-slot":`popover`,...e})}function PopoverTrigger({...e}){return n(t.Trigger,{"data-slot":`popover-trigger`,...e})}function PopoverContent({className:r,align:i=`center`,sideOffset:a=4,...o}){return n(t.Portal,{children:n(t.Content,{"data-slot":`popover-content`,align:i,sideOffset:a,className:e(`bg-popover text-popover-foreground ring-foreground/10 z-50 w-72 rounded-lg p-2.5 text-sm shadow-md ring-1 duration-100 origin-(--radix-popover-content-transform-origin) flex flex-col gap-2.5 outline-hidden`,`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`,r),...o})})}function PopoverAnchor({...e}){return n(t.Anchor,{"data-slot":`popover-anchor`,...e})}function PopoverHeader({className:t,...r}){return n(`div`,{"data-slot":`popover-header`,className:e(`flex flex-col gap-0.5 text-sm`,t),...r})}function PopoverTitle({className:t,...r}){return n(`h2`,{"data-slot":`popover-title`,className:e(`font-medium`,t),...r})}function PopoverDescription({className:t,...r}){return n(`p`,{"data-slot":`popover-description`,className:e(`text-muted-foreground`,t),...r})}export{Popover,PopoverAnchor,PopoverContent,PopoverDescription,PopoverHeader,PopoverTitle,PopoverTrigger};
1
+ import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{Popover as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function Popover({...e}){return/* @__PURE__ */ n(t.Root,{"data-slot":`popover`,...e})}function PopoverTrigger({...e}){return/* @__PURE__ */ n(t.Trigger,{"data-slot":`popover-trigger`,...e})}function PopoverContent({className:r,align:i=`center`,sideOffset:a=4,...o}){return/* @__PURE__ */ n(t.Portal,{children:/* @__PURE__ */ n(t.Content,{"data-slot":`popover-content`,align:i,sideOffset:a,className:e(`bg-popover text-popover-foreground ring-foreground/10 z-50 w-72 rounded-lg p-2.5 text-sm shadow-md ring-1 duration-100 origin-(--radix-popover-content-transform-origin) flex flex-col gap-2.5 outline-hidden`,`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`,r),...o})})}function PopoverAnchor({...e}){return/* @__PURE__ */ n(t.Anchor,{"data-slot":`popover-anchor`,...e})}function PopoverHeader({className:t,...r}){return/* @__PURE__ */ n(`div`,{"data-slot":`popover-header`,className:e(`flex flex-col gap-0.5 text-sm`,t),...r})}function PopoverTitle({className:t,...r}){return/* @__PURE__ */ n(`h2`,{"data-slot":`popover-title`,className:e(`font-medium`,t),...r})}function PopoverDescription({className:t,...r}){return/* @__PURE__ */ n(`p`,{"data-slot":`popover-description`,className:e(`text-muted-foreground`,t),...r})}export{Popover,PopoverAnchor,PopoverContent,PopoverDescription,PopoverHeader,PopoverTitle,PopoverTrigger};
2
2
  //# sourceMappingURL=popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","names":["PopoverPrimitive"],"sources":["../../src/components/popover.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Popover as PopoverPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type PopoverProps = React.ComponentProps<typeof PopoverPrimitive.Root>\n\nexport type PopoverTriggerProps = React.ComponentProps<typeof PopoverPrimitive.Trigger>\n\nexport type PopoverContentProps = React.ComponentProps<typeof PopoverPrimitive.Content>\n\nexport type PopoverAnchorProps = React.ComponentProps<typeof PopoverPrimitive.Anchor>\n\nexport type PopoverHeaderProps = React.ComponentProps<'div'>\n\nexport type PopoverTitleProps = React.ComponentProps<'h2'>\n\nexport type PopoverDescriptionProps = React.ComponentProps<'p'>\n\nfunction Popover({ ...props }: PopoverProps) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({ ...props }: PopoverTriggerProps) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({ className, align = 'center', sideOffset = 4, ...props }: PopoverContentProps) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 z-50 w-72 rounded-lg p-2.5 text-sm shadow-md ring-1 duration-100 origin-(--radix-popover-content-transform-origin) flex flex-col gap-2.5 outline-hidden',\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 className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverAnchor({ ...props }: PopoverAnchorProps) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />\n}\n\nfunction PopoverHeader({ className, ...props }: PopoverHeaderProps) {\n return <div data-slot=\"popover-header\" className={cn('flex flex-col gap-0.5 text-sm', className)} {...props} />\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverTitleProps) {\n return <h2 data-slot=\"popover-title\" className={cn('font-medium', className)} {...props} />\n}\n\nfunction PopoverDescription({ className, ...props }: PopoverDescriptionProps) {\n return <p data-slot=\"popover-description\" className={cn('text-muted-foreground', className)} {...props} />\n}\n\nexport { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger }\n"],"mappings":"wJAoBA,SAAS,QAAQ,CAAE,GAAG,GAAuB,CAC3C,OAAO,EAACA,EAAiB,KAAlB,CAAuB,YAAU,UAAU,GAAI,CAAQ,CAAA,CAChE,CAEA,SAAS,eAAe,CAAE,GAAG,GAA8B,CACzD,OAAO,EAACA,EAAiB,QAAlB,CAA0B,YAAU,kBAAkB,GAAI,CAAQ,CAAA,CAC3E,CAEA,SAAS,eAAe,CAAE,YAAW,QAAQ,SAAU,aAAa,EAAG,GAAG,GAA8B,CACtG,OACE,EAACA,EAAiB,OAAlB,CAAA,SACE,EAACA,EAAiB,QAAlB,CACE,YAAU,kBACH,QACK,aACZ,UAAW,EACT,gNACA,uIACA,8JACA,CACF,EACA,GAAI,CACL,CAAA,CACsB,CAAA,CAE7B,CAEA,SAAS,cAAc,CAAE,GAAG,GAA6B,CACvD,OAAO,EAACA,EAAiB,OAAlB,CAAyB,YAAU,iBAAiB,GAAI,CAAQ,CAAA,CACzE,CAEA,SAAS,cAAc,CAAE,YAAW,GAAG,GAA6B,CAClE,OAAO,EAAC,MAAD,CAAK,YAAU,iBAAiB,UAAW,EAAG,gCAAiC,CAAS,EAAG,GAAI,CAAQ,CAAA,CAChH,CAEA,SAAS,aAAa,CAAE,YAAW,GAAG,GAA4B,CAChE,OAAO,EAAC,KAAD,CAAI,YAAU,gBAAgB,UAAW,EAAG,cAAe,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC5F,CAEA,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OAAO,EAAC,IAAD,CAAG,YAAU,sBAAsB,UAAW,EAAG,wBAAyB,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC3G"}
1
+ {"version":3,"file":"popover.js","names":["PopoverPrimitive","Popover$1","props","cn","className"],"sources":["../../src/components/popover.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Popover as PopoverPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type PopoverProps = React.ComponentProps<typeof PopoverPrimitive.Root>\n\nexport type PopoverTriggerProps = React.ComponentProps<typeof PopoverPrimitive.Trigger>\n\nexport type PopoverContentProps = React.ComponentProps<typeof PopoverPrimitive.Content>\n\nexport type PopoverAnchorProps = React.ComponentProps<typeof PopoverPrimitive.Anchor>\n\nexport type PopoverHeaderProps = React.ComponentProps<'div'>\n\nexport type PopoverTitleProps = React.ComponentProps<'h2'>\n\nexport type PopoverDescriptionProps = React.ComponentProps<'p'>\n\nfunction Popover({ ...props }: PopoverProps) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({ ...props }: PopoverTriggerProps) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({ className, align = 'center', sideOffset = 4, ...props }: PopoverContentProps) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 z-50 w-72 rounded-lg p-2.5 text-sm shadow-md ring-1 duration-100 origin-(--radix-popover-content-transform-origin) flex flex-col gap-2.5 outline-hidden',\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 className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverAnchor({ ...props }: PopoverAnchorProps) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />\n}\n\nfunction PopoverHeader({ className, ...props }: PopoverHeaderProps) {\n return <div data-slot=\"popover-header\" className={cn('flex flex-col gap-0.5 text-sm', className)} {...props} />\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverTitleProps) {\n return <h2 data-slot=\"popover-title\" className={cn('font-medium', className)} {...props} />\n}\n\nfunction PopoverDescription({ className, ...props }: PopoverDescriptionProps) {\n return <p data-slot=\"popover-description\" className={cn('text-muted-foreground', className)} {...props} />\n}\n\nexport { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger }\n"],"mappings":"wJAoBA,SAAS,QAAQ,CAAE,GAAGE,GAAuB,CAC3C,MAAO,kBAACF,EAAiB,KAAlB,CAAuB,YAAU,UAAU,GAAIE,CAAQ,CAAA,CAChE,CAEA,SAAS,eAAe,CAAE,GAAGA,GAA8B,CACzD,MAAO,kBAACF,EAAiB,QAAlB,CAA0B,YAAU,kBAAkB,GAAIE,CAAQ,CAAA,CAC3E,CAEA,SAAS,eAAe,CAAE,YAAW,QAAQ,SAAU,aAAa,EAAG,GAAGA,GAA8B,CACtG,MACE,kBAACF,EAAiB,OAAlB,CAAA,SACE,kBAACA,EAAiB,QAAlB,CACE,YAAU,kBACH,QACK,aACZ,UAAWG,EACT,gNACA,uIACA,8JACAC,CACF,EACA,GAAIF,CACL,CAAA,CACsB,CAAA,CAE7B,CAEA,SAAS,cAAc,CAAE,GAAGA,GAA6B,CACvD,MAAO,kBAACF,EAAiB,OAAlB,CAAyB,YAAU,iBAAiB,GAAIE,CAAQ,CAAA,CACzE,CAEA,SAAS,cAAc,CAAE,YAAW,GAAGA,GAA6B,CAClE,MAAO,kBAAC,MAAD,CAAK,YAAU,iBAAiB,UAAWC,EAAG,gCAAiCC,CAAS,EAAG,GAAIF,CAAQ,CAAA,CAChH,CAEA,SAAS,aAAa,CAAE,YAAW,GAAGA,GAA4B,CAChE,MAAO,kBAAC,KAAD,CAAI,YAAU,gBAAgB,UAAWC,EAAG,cAAeC,CAAS,EAAG,GAAIF,CAAQ,CAAA,CAC5F,CAEA,SAAS,mBAAmB,CAAE,YAAW,GAAGA,GAAkC,CAC5E,MAAO,kBAAC,IAAD,CAAG,YAAU,sBAAsB,UAAWC,EAAG,wBAAyBC,CAAS,EAAG,GAAIF,CAAQ,CAAA,CAC3G"}
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{progressColorVariants as t}from"../lib/progress.js";import{Progress as n}from"radix-ui";import{jsx as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";const a=i(`relative flex w-full items-center overflow-x-hidden rounded-full bg-muted`,{variants:{size:{sm:`h-0.5`,md:`h-1`,lg:`h-1.5`},color:t},defaultVariants:{size:`md`,color:`primary`}});function Progress({className:t,value:i,size:o=`md`,color:s=`primary`,...c}){return r(n.Root,{"data-slot":`progress`,"data-size":o,"data-color":s,className:e(a({size:o,color:s}),t),...c,children:r(n.Indicator,{"data-slot":`progress-indicator`,className:`size-full flex-1 bg-(--progress-color) transition-all`,style:{transform:`translateX(-${100-(i||0)}%)`}})})}export{Progress,a as progressVariants};
1
+ import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{progressColorVariants as t}from"../lib/progress.js";import{Progress as n}from"radix-ui";import{jsx as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";const a=i(`relative flex w-full items-center overflow-x-hidden rounded-full bg-muted`,{variants:{size:{sm:`h-0.5`,md:`h-1`,lg:`h-1.5`},color:t},defaultVariants:{size:`md`,color:`primary`}});function Progress({className:t,value:i,size:o=`md`,color:s=`primary`,...c}){return/* @__PURE__ */ r(n.Root,{"data-slot":`progress`,"data-size":o,"data-color":s,className:e(a({size:o,color:s}),t),...c,children:/* @__PURE__ */ r(n.Indicator,{"data-slot":`progress-indicator`,className:`size-full flex-1 bg-(--progress-color) transition-all`,style:{transform:`translateX(-${100-(i||0)}%)`}})})}export{Progress,a as progressVariants};
2
2
  //# sourceMappingURL=progress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress.js","names":["ProgressPrimitive"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Progress as ProgressPrimitive } from 'radix-ui'\n\nimport { progressColorVariants } from '../lib/progress'\nimport { cn } from '../lib/utils'\n\nconst progressVariants = cva('relative flex w-full items-center overflow-x-hidden rounded-full bg-muted', {\n variants: {\n size: {\n sm: 'h-0.5',\n md: 'h-1',\n lg: 'h-1.5'\n },\n color: progressColorVariants\n },\n defaultVariants: {\n size: 'md',\n color: 'primary'\n }\n})\n\nexport type ProgressProps = React.ComponentProps<typeof ProgressPrimitive.Root> & VariantProps<typeof progressVariants>\n\nfunction Progress({ className, value, size = 'md', color = 'primary', ...props }: ProgressProps) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n data-size={size}\n data-color={color}\n className={cn(progressVariants({ size, color }), className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"size-full flex-1 bg-(--progress-color) transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n}\n\nexport { Progress, progressVariants }\n"],"mappings":"mQAQA,MAAM,EAAmB,EAAI,4EAA6E,CACxG,SAAU,CACR,KAAM,CACJ,GAAI,QACJ,GAAI,MACJ,GAAI,OACN,EACA,MAAO,CACT,EACA,gBAAiB,CACf,KAAM,KACN,MAAO,SACT,CACF,CAAC,EAID,SAAS,SAAS,CAAE,YAAW,QAAO,OAAO,KAAM,QAAQ,UAAW,GAAG,GAAwB,CAC/F,OACE,EAACA,EAAkB,KAAnB,CACE,YAAU,WACV,YAAW,EACX,aAAY,EACZ,UAAW,EAAG,EAAiB,CAAE,OAAM,OAAM,CAAC,EAAG,CAAS,EAC1D,GAAI,EAEJ,SAAA,EAACA,EAAkB,UAAnB,CACE,YAAU,qBACV,UAAU,wDACV,MAAO,CAAE,UAAW,eAAe,KAAO,GAAS,GAAG,GAAI,CAC3D,CAAA,CACqB,CAAA,CAE5B"}
1
+ {"version":3,"file":"progress.js","names":["ProgressPrimitive","Progress$1","progressVariants","cva","progressColorVariants","props","size","color","cn","className","value"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Progress as ProgressPrimitive } from 'radix-ui'\n\nimport { progressColorVariants } from '../lib/progress'\nimport { cn } from '../lib/utils'\n\nconst progressVariants = cva('relative flex w-full items-center overflow-x-hidden rounded-full bg-muted', {\n variants: {\n size: {\n sm: 'h-0.5',\n md: 'h-1',\n lg: 'h-1.5'\n },\n color: progressColorVariants\n },\n defaultVariants: {\n size: 'md',\n color: 'primary'\n }\n})\n\nexport type ProgressProps = React.ComponentProps<typeof ProgressPrimitive.Root> & VariantProps<typeof progressVariants>\n\nfunction Progress({ className, value, size = 'md', color = 'primary', ...props }: ProgressProps) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n data-size={size}\n data-color={color}\n className={cn(progressVariants({ size, color }), className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"size-full flex-1 bg-(--progress-color) transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n}\n\nexport { Progress, progressVariants }\n"],"mappings":"mQAQA,MAAME,EAAmBC,EAAI,4EAA6E,CACxG,SAAU,CACR,KAAM,CACJ,GAAI,QACJ,GAAI,MACJ,GAAI,OACN,EACA,MAAOC,CACT,EACA,gBAAiB,CACf,KAAM,KACN,MAAO,SACT,CACF,CAAC,EAID,SAAS,SAAS,CAAE,YAAW,QAAO,OAAO,KAAM,QAAQ,UAAW,GAAGC,GAAwB,CAC/F,MACE,kBAACL,EAAkB,KAAnB,CACE,YAAU,WACV,YAAWM,EACX,aAAYC,EACZ,UAAWC,EAAGN,EAAiB,CAAE,OAAM,OAAM,CAAC,EAAGO,CAAS,EAC1D,GAAIJ,EAEJ,SAAA,kBAACL,EAAkB,UAAnB,CACE,YAAU,qBACV,UAAU,wDACV,MAAO,CAAE,UAAW,eAAe,KAAOU,GAAS,GAAG,GAAI,CAC3D,CAAA,CACqB,CAAA,CAE5B"}
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.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{useFieldControlId as r}from"./field.js";import{RadioGroup as i}from"radix-ui";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";import{useId as c}from"react";const l=s([`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:data-unchecked: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`}}),u=s(`flex items-center justify-center`,{variants:{size:{sm:`size-4`,md:`size-4.5`,lg:`size-5.5`}},defaultVariants:{size:`md`}}),d=s(`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`}}),f=s(``,{variants:{size:{sm:`text-xs`,md:`text-sm`,lg:`text-xl`}},defaultVariants:{size:`md`}});function RadioGroup({className:n,color:r=`primary`,...o}){return a(i.Root,{"data-slot":`radio-group`,"data-color":r,className:e(`grid w-full gap-2`,t[r],n),...o})}function RadioGroupItem({className:t,color:s,id:p,label:m,labelProps:h,size:g=`md`,..._}){let v=c(),y=r(p),b=m!==void 0,x=y??(b?v:void 0),{className:S,...C}=h??{},w=a(i.Item,{"data-slot":`radio-group-item`,"data-color":s,"data-size":g,id:x,className:e(l({color:s,size:g}),t),..._,children:a(i.Indicator,{"data-slot":`radio-group-indicator`,className:e(u({size:g})),children:a(`span`,{className:e(d({size:g}),`-translate-x-1/2 -translate-y-1/2`)})})});return b?o(`div`,{"data-slot":`radio-group-item-field`,className:`flex items-center gap-2`,children:[w,a(n,{...C,htmlFor:x,className:e(f({size:g}),S),children:m})]}):w}export{RadioGroup,RadioGroupItem};
1
+ import"../rolldown-runtime-BhWHdk3m.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{useFieldControlId as r}from"./field.js";import{RadioGroup as i}from"radix-ui";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";import{useId as c}from"react";const l=s([`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:data-unchecked: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`}}),u=s(`flex items-center justify-center`,{variants:{size:{sm:`size-4`,md:`size-4.5`,lg:`size-5.5`}},defaultVariants:{size:`md`}}),d=s(`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`}}),f=s(``,{variants:{size:{sm:`text-xs`,md:`text-sm`,lg:`text-xl`}},defaultVariants:{size:`md`}});function RadioGroup({className:n,color:r=`primary`,...o}){return/* @__PURE__ */ a(i.Root,{"data-slot":`radio-group`,"data-color":r,className:e(`grid w-full gap-2`,t[r],n),...o})}function RadioGroupItem({className:t,color:s,id:p,label:m,labelProps:h,size:g=`md`,..._}){let v=c(),y=r(p),b=m!==void 0,x=y??(b?v:void 0),{className:S,...C}=h??{},w=/* @__PURE__ */ a(i.Item,{"data-slot":`radio-group-item`,"data-color":s,"data-size":g,id:x,className:e(l({color:s,size:g}),t),..._,children:/* @__PURE__ */ a(i.Indicator,{"data-slot":`radio-group-indicator`,className:e(u({size:g})),children:/* @__PURE__ */ a(`span`,{className:e(d({size:g}),`-translate-x-1/2 -translate-y-1/2`)})})});return b?/* @__PURE__ */ o(`div`,{"data-slot":`radio-group-item-field`,className:`flex items-center gap-2`,children:[w,/* @__PURE__ */ a(n,{...C,htmlFor:x,className:e(f({size:g}),S),children:m})]}):w}export{RadioGroup,RadioGroupItem};
2
2
  //# sourceMappingURL=radio-group.js.map
@@ -1 +1 @@
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 { useFieldControlId } from './field'\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:data-unchecked: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 fieldControlId = useFieldControlId(id)\n const hasLabel = label !== undefined\n const resolvedId = fieldControlId ?? (hasLabel ? generatedId : undefined)\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={resolvedId}\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":"oYAgBA,MAAM,EAAyB,EAC7B,CACE,iHACA,mDACA,4EACA,kDACA,uFACA,uIACA,kCACA,oIACF,EACA,CACE,SAAU,CACR,MAAO,EACP,KAAM,CACJ,GAAI,SACJ,GAAI,WACJ,GAAI,UACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CACF,EAEM,EAA8B,EAAI,mCAAoC,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,SACJ,GAAI,WACJ,GAAI,UACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EAEK,EAAiC,EAAI,+DAAgE,CACzG,SAAU,CACR,KAAM,CACJ,GAAI,WACJ,GAAI,SACJ,GAAI,UACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EAEK,EAA8B,EAAI,GAAI,CAC1C,SAAU,CACR,KAAM,CACJ,GAAI,UACJ,GAAI,UACJ,GAAI,SACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EASD,SAAS,WAAW,CAAE,YAAW,QAAQ,UAAW,GAAG,GAA0B,CAC/E,OACE,EAACA,EAAoB,KAArB,CACE,YAAU,cACV,aAAY,EACZ,UAAW,EAAG,oBAAqB,EAA8B,GAAQ,CAAS,EAClF,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,eAAe,CAAE,YAAW,QAAO,KAAI,QAAO,aAAY,OAAO,KAAM,GAAG,GAA8B,CAC/G,IAAM,EAAc,EAAM,EACpB,EAAiB,EAAkB,CAAE,EACrC,EAAW,IAAU,IAAA,GACrB,EAAa,IAAmB,EAAW,EAAc,IAAA,IACzD,CAAE,UAAW,EAAgB,GAAG,GAAmB,GAAc,CAAC,EAElE,EACJ,EAACA,EAAoB,KAArB,CACE,YAAU,mBACV,aAAY,EACZ,YAAW,EACX,GAAI,EACJ,UAAW,EAAG,EAAuB,CAAE,QAAO,MAAK,CAAC,EAAG,CAAS,EAChE,GAAI,EAEJ,SAAA,EAACA,EAAoB,UAArB,CACE,YAAU,wBACV,UAAW,EAAG,EAA4B,CAAE,MAAK,CAAC,CAAC,EAEnD,SAAA,EAAC,OAAD,CAAM,UAAW,EAAG,EAA+B,CAAE,MAAK,CAAC,EAAG,mCAAmC,CAAI,CAAA,CACxE,CAAA,CACP,CAAA,EAO5B,OAJK,EAKH,EAAC,MAAD,CAAK,YAAU,yBAAyB,UAAU,0BAAlD,SAAA,CACG,EACD,EAACC,EAAD,CACE,GAAI,EACJ,QAAS,EACT,UAAW,EAAG,EAA4B,CAAE,MAAK,CAAC,EAAG,CAAc,EAElE,SAAA,CACI,CAAA,CACJ,IAbE,CAeX"}
1
+ {"version":3,"file":"radio-group.js","names":["RadioGroupPrimitive","Label","Label$1","RadioGroup$1","radioGroupItemVariants","cva","selectionControlColorVariants","radioGroupIndicatorVariants","radioGroupIndicatorDotVariants","radioGroupItemLabelVariants","props","color","cn","className","generatedId","useId","fieldControlId","useFieldControlId","id","hasLabel","label","resolvedId","labelClassName","labelRootProps","labelProps","item","size"],"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 { useFieldControlId } from './field'\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:data-unchecked: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 fieldControlId = useFieldControlId(id)\n const hasLabel = label !== undefined\n const resolvedId = fieldControlId ?? (hasLabel ? generatedId : undefined)\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={resolvedId}\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":"oYAgBA,MAAMI,EAAyBC,EAC7B,CACE,iHACA,mDACA,4EACA,kDACA,uFACA,uIACA,kCACA,oIACF,EACA,CACE,SAAU,CACR,MAAOC,EACP,KAAM,CACJ,GAAI,SACJ,GAAI,WACJ,GAAI,UACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CACF,EAEMC,EAA8BF,EAAI,mCAAoC,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,SACJ,GAAI,WACJ,GAAI,UACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EAEKG,EAAiCH,EAAI,+DAAgE,CACzG,SAAU,CACR,KAAM,CACJ,GAAI,WACJ,GAAI,SACJ,GAAI,UACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EAEKI,EAA8BJ,EAAI,GAAI,CAC1C,SAAU,CACR,KAAM,CACJ,GAAI,UACJ,GAAI,UACJ,GAAI,SACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EASD,SAAS,WAAW,CAAE,YAAW,QAAQ,UAAW,GAAGK,GAA0B,CAC/E,MACE,kBAACV,EAAoB,KAArB,CACE,YAAU,cACV,aAAYW,EACZ,UAAWC,EAAG,oBAAqBN,EAA8BK,GAAQE,CAAS,EAClF,GAAIH,CACL,CAAA,CAEL,CAEA,SAAS,eAAe,CAAE,YAAW,QAAO,KAAI,QAAO,aAAY,OAAO,KAAM,GAAGA,GAA8B,CAC/G,IAAMI,EAAcC,EAAM,EACpBC,EAAiBC,EAAkBC,CAAE,EACrCC,EAAWC,IAAU,IAAA,GACrBC,EAAaL,IAAmBG,EAAWL,EAAc,IAAA,IACzD,CAAE,UAAWQ,EAAgB,GAAGC,GAAmBC,GAAc,CAAC,EAElEC,EACJ,kBAACzB,EAAoB,KAArB,CACE,YAAU,mBACV,aAAYW,EACZ,YAAWe,EACX,GAAIL,EACJ,UAAWT,EAAGR,EAAuB,CAAE,QAAO,MAAK,CAAC,EAAGS,CAAS,EAChE,GAAIH,EAEJ,SAAA,kBAACV,EAAoB,UAArB,CACE,YAAU,wBACV,UAAWY,EAAGL,EAA4B,CAAE,MAAK,CAAC,CAAC,EAEnD,SAAA,kBAAC,OAAD,CAAM,UAAWK,EAAGJ,EAA+B,CAAE,MAAK,CAAC,EAAG,mCAAmC,CAAI,CAAA,CACxE,CAAA,CACP,CAAA,EAO5B,OAJKW,EAKH,kBAAC,MAAD,CAAK,YAAU,yBAAyB,UAAU,0BAAlD,SAAA,CACGM,EACD,kBAACxB,EAAD,CACE,GAAIsB,EACJ,QAASF,EACT,UAAWT,EAAGH,EAA4B,CAAE,MAAK,CAAC,EAAGa,CAAc,EAElE,SAAAF,CACI,CAAA,CACJ,IAbEK,CAeX"}
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{jsx as t}from"react/jsx-runtime";import*as n from"react-resizable-panels";function ResizablePanelGroup({className:r,...i}){return t(n.Group,{"data-slot":`resizable-panel-group`,className:e(`flex h-full w-full aria-[orientation=vertical]:flex-col`,r),...i})}function ResizablePanel({...e}){return t(n.Panel,{"data-slot":`resizable-panel`,...e})}function ResizableHandle({withHandle:r,className:i,...a}){return t(n.Separator,{"data-slot":`resizable-handle`,className:e(`relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90`,i),...a,children:r&&t(`div`,{className:`z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border`})})}export{ResizableHandle,ResizablePanel,ResizablePanelGroup};
1
+ import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{jsx as t}from"react/jsx-runtime";import*as n from"react-resizable-panels";function ResizablePanelGroup({className:r,...i}){return/* @__PURE__ */ t(n.Group,{"data-slot":`resizable-panel-group`,className:e(`flex h-full w-full aria-[orientation=vertical]:flex-col`,r),...i})}function ResizablePanel({...e}){return/* @__PURE__ */ t(n.Panel,{"data-slot":`resizable-panel`,...e})}function ResizableHandle({withHandle:r,className:i,...a}){return/* @__PURE__ */ t(n.Separator,{"data-slot":`resizable-handle`,className:e(`relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90`,i),...a,children:r&&/* @__PURE__ */ t(`div`,{className:`z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border`})})}export{ResizableHandle,ResizablePanel,ResizablePanelGroup};
2
2
  //# sourceMappingURL=resizable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resizable.js","names":[],"sources":["../../src/components/resizable.tsx"],"sourcesContent":["import * as ResizablePrimitive from 'react-resizable-panels'\n\nimport { cn } from '../lib/utils'\n\nexport type ResizablePanelGroupProps = ResizablePrimitive.GroupProps\n\nexport type ResizablePanelProps = ResizablePrimitive.PanelProps\n\nexport type ResizableHandleProps = ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}\n\nfunction ResizablePanelGroup({ className, ...props }: ResizablePanelGroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot=\"resizable-panel-group\"\n className={cn('flex h-full w-full aria-[orientation=vertical]:flex-col', className)}\n {...props}\n />\n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePanelProps) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />\n}\n\nfunction ResizableHandle({ withHandle, className, ...props }: ResizableHandleProps) {\n return (\n <ResizablePrimitive.Separator\n data-slot=\"resizable-handle\"\n className={cn(\n 'relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90',\n className\n )}\n {...props}\n >\n {withHandle && <div className=\"z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border\" />}\n </ResizablePrimitive.Separator>\n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n"],"mappings":"8JAYA,SAAS,oBAAoB,CAAE,YAAW,GAAG,GAAmC,CAC9E,OACE,EAAC,EAAmB,MAApB,CACE,YAAU,wBACV,UAAW,EAAG,0DAA2D,CAAS,EAClF,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,eAAe,CAAE,GAAG,GAA8B,CACzD,OAAO,EAAC,EAAmB,MAApB,CAA0B,YAAU,kBAAkB,GAAI,CAAQ,CAAA,CAC3E,CAEA,SAAS,gBAAgB,CAAE,aAAY,YAAW,GAAG,GAA+B,CAClF,OACE,EAAC,EAAmB,UAApB,CACE,YAAU,mBACV,UAAW,EACT,ukBACA,CACF,EACA,GAAI,EAEH,SAAA,GAAc,EAAC,MAAD,CAAK,UAAU,iDAAmD,CAAA,CACrD,CAAA,CAElC"}
1
+ {"version":3,"file":"resizable.js","names":["ResizablePrimitive","props","cn","className","withHandle"],"sources":["../../src/components/resizable.tsx"],"sourcesContent":["import * as ResizablePrimitive from 'react-resizable-panels'\n\nimport { cn } from '../lib/utils'\n\nexport type ResizablePanelGroupProps = ResizablePrimitive.GroupProps\n\nexport type ResizablePanelProps = ResizablePrimitive.PanelProps\n\nexport type ResizableHandleProps = ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}\n\nfunction ResizablePanelGroup({ className, ...props }: ResizablePanelGroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot=\"resizable-panel-group\"\n className={cn('flex h-full w-full aria-[orientation=vertical]:flex-col', className)}\n {...props}\n />\n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePanelProps) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />\n}\n\nfunction ResizableHandle({ withHandle, className, ...props }: ResizableHandleProps) {\n return (\n <ResizablePrimitive.Separator\n data-slot=\"resizable-handle\"\n className={cn(\n 'relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90',\n className\n )}\n {...props}\n >\n {withHandle && <div className=\"z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border\" />}\n </ResizablePrimitive.Separator>\n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n"],"mappings":"8JAYA,SAAS,oBAAoB,CAAE,YAAW,GAAGC,GAAmC,CAC9E,MACE,kBAACD,EAAmB,MAApB,CACE,YAAU,wBACV,UAAWE,EAAG,0DAA2DC,CAAS,EAClF,GAAIF,CACL,CAAA,CAEL,CAEA,SAAS,eAAe,CAAE,GAAGA,GAA8B,CACzD,MAAO,kBAACD,EAAmB,MAApB,CAA0B,YAAU,kBAAkB,GAAIC,CAAQ,CAAA,CAC3E,CAEA,SAAS,gBAAgB,CAAE,aAAY,YAAW,GAAGA,GAA+B,CAClF,MACE,kBAACD,EAAmB,UAApB,CACE,YAAU,mBACV,UAAWE,EACT,ukBACAC,CACF,EACA,GAAIF,EAEH,SAAAG,GAAc,kBAAC,MAAD,CAAK,UAAU,iDAAmD,CAAA,CACrD,CAAA,CAElC"}
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{progressColorVariants as t}from"../lib/progress.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";const a=i(`shrink-0`,{variants:{size:{sm:`size-8`,md:`size-10`,lg:`size-12`},color:t},defaultVariants:{size:`md`,color:`primary`}}),o={thin:8,md:12,thick:16};function RingProgress({className:t,value:i=0,size:s=`md`,color:c=`primary`,thickness:l=`md`,...u}){let d=o[l],f=(100-d)/2,p=2*Math.PI*f,m=Math.min(100,Math.max(0,i)),h=p*(1-m/100);return r(`svg`,{"data-slot":`ring-progress`,"data-size":s,"data-color":c,"data-thickness":l,role:`progressbar`,"aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":100,viewBox:`0 0 100 100`,className:e(a({size:s,color:c}),t),...u,children:[n(`circle`,{cx:`50`,cy:`50`,r:f,fill:`none`,strokeWidth:d,className:`stroke-muted`}),n(`circle`,{cx:`50`,cy:`50`,r:f,fill:`none`,strokeWidth:d,strokeLinecap:`round`,strokeDasharray:p,strokeDashoffset:h,transform:`rotate(-90 50 50)`,className:`stroke-(--progress-color) transition-all`})]})}export{RingProgress,a as ringProgressVariants};
1
+ import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{progressColorVariants as t}from"../lib/progress.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";const a=i(`shrink-0`,{variants:{size:{sm:`size-8`,md:`size-10`,lg:`size-12`},color:t},defaultVariants:{size:`md`,color:`primary`}}),o={thin:8,md:12,thick:16};function RingProgress({className:t,value:i=0,size:s=`md`,color:c=`primary`,thickness:l=`md`,...u}){let d=o[l],f=(100-d)/2,p=2*Math.PI*f,m=Math.min(100,Math.max(0,i)),h=p*(1-m/100);return/* @__PURE__ */ r(`svg`,{"data-slot":`ring-progress`,"data-size":s,"data-color":c,"data-thickness":l,role:`progressbar`,"aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":100,viewBox:`0 0 100 100`,className:e(a({size:s,color:c}),t),...u,children:[/* @__PURE__ */ n(`circle`,{cx:`50`,cy:`50`,r:f,fill:`none`,strokeWidth:d,className:`stroke-muted`}),/* @__PURE__ */ n(`circle`,{cx:`50`,cy:`50`,r:f,fill:`none`,strokeWidth:d,strokeLinecap:`round`,strokeDasharray:p,strokeDashoffset:h,transform:`rotate(-90 50 50)`,className:`stroke-(--progress-color) transition-all`})]})}export{RingProgress,a as ringProgressVariants};
2
2
  //# sourceMappingURL=ring-progress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ring-progress.js","names":[],"sources":["../../src/components/ring-progress.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { progressColorVariants } from '../lib/progress'\nimport { cn } from '../lib/utils'\n\nconst ringProgressVariants = cva('shrink-0', {\n variants: {\n size: {\n sm: 'size-8',\n md: 'size-10',\n lg: 'size-12'\n },\n color: progressColorVariants\n },\n defaultVariants: {\n size: 'md',\n color: 'primary'\n }\n})\n\nexport type RingProgressThickness = 'thin' | 'md' | 'thick'\n\nconst ringThickness = {\n thin: 8,\n md: 12,\n thick: 16\n} as const satisfies Record<RingProgressThickness, number>\n\nexport type RingProgressProps = React.ComponentProps<'svg'> &\n VariantProps<typeof ringProgressVariants> & {\n value?: number\n thickness?: RingProgressThickness\n }\n\nfunction RingProgress({\n className,\n value = 0,\n size = 'md',\n color = 'primary',\n thickness = 'md',\n ...props\n}: RingProgressProps) {\n const strokeWidth = ringThickness[thickness]\n const radius = (100 - strokeWidth) / 2\n const circumference = 2 * Math.PI * radius\n const clamped = Math.min(100, Math.max(0, value))\n const strokeDashoffset = circumference * (1 - clamped / 100)\n\n return (\n <svg\n data-slot=\"ring-progress\"\n data-size={size}\n data-color={color}\n data-thickness={thickness}\n role=\"progressbar\"\n aria-valuenow={clamped}\n aria-valuemin={0}\n aria-valuemax={100}\n viewBox=\"0 0 100 100\"\n className={cn(ringProgressVariants({ size, color }), className)}\n {...props}\n >\n <circle cx=\"50\" cy=\"50\" r={radius} fill=\"none\" strokeWidth={strokeWidth} className=\"stroke-muted\" />\n <circle\n cx=\"50\"\n cy=\"50\"\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={strokeDashoffset}\n transform=\"rotate(-90 50 50)\"\n className=\"stroke-(--progress-color) transition-all\"\n />\n </svg>\n )\n}\n\nexport { RingProgress, ringProgressVariants }\n"],"mappings":"yOAOA,MAAM,EAAuB,EAAI,WAAY,CAC3C,SAAU,CACR,KAAM,CACJ,GAAI,SACJ,GAAI,UACJ,GAAI,SACN,EACA,MAAO,CACT,EACA,gBAAiB,CACf,KAAM,KACN,MAAO,SACT,CACF,CAAC,EAIK,EAAgB,CACpB,KAAM,EACN,GAAI,GACJ,MAAO,EACT,EAQA,SAAS,aAAa,CACpB,YACA,QAAQ,EACR,OAAO,KACP,QAAQ,UACR,YAAY,KACZ,GAAG,GACiB,CACpB,IAAM,EAAc,EAAc,GAC5B,GAAU,IAAM,GAAe,EAC/B,EAAgB,EAAI,KAAK,GAAK,EAC9B,EAAU,KAAK,IAAI,IAAK,KAAK,IAAI,EAAG,CAAK,CAAC,EAC1C,EAAmB,GAAiB,EAAI,EAAU,KAExD,OACE,EAAC,MAAD,CACE,YAAU,gBACV,YAAW,EACX,aAAY,EACZ,iBAAgB,EAChB,KAAK,cACL,gBAAe,EACf,gBAAe,EACf,gBAAe,IACf,QAAQ,cACR,UAAW,EAAG,EAAqB,CAAE,OAAM,OAAM,CAAC,EAAG,CAAS,EAC9D,GAAI,EAXN,SAAA,CAaE,EAAC,SAAD,CAAQ,GAAG,KAAK,GAAG,KAAK,EAAG,EAAQ,KAAK,OAAoB,cAAa,UAAU,cAAgB,CAAA,EACnG,EAAC,SAAD,CACE,GAAG,KACH,GAAG,KACH,EAAG,EACH,KAAK,OACQ,cACb,cAAc,QACd,gBAAiB,EACC,mBAClB,UAAU,oBACV,UAAU,0CACX,CAAA,CACE,GAET"}
1
+ {"version":3,"file":"ring-progress.js","names":["ringProgressVariants","cva","progressColorVariants","ringThickness","props","strokeWidth","thickness","radius","circumference","clamped","value","strokeDashoffset","size","color","cn","className"],"sources":["../../src/components/ring-progress.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { progressColorVariants } from '../lib/progress'\nimport { cn } from '../lib/utils'\n\nconst ringProgressVariants = cva('shrink-0', {\n variants: {\n size: {\n sm: 'size-8',\n md: 'size-10',\n lg: 'size-12'\n },\n color: progressColorVariants\n },\n defaultVariants: {\n size: 'md',\n color: 'primary'\n }\n})\n\nexport type RingProgressThickness = 'thin' | 'md' | 'thick'\n\nconst ringThickness = {\n thin: 8,\n md: 12,\n thick: 16\n} as const satisfies Record<RingProgressThickness, number>\n\nexport type RingProgressProps = React.ComponentProps<'svg'> &\n VariantProps<typeof ringProgressVariants> & {\n value?: number\n thickness?: RingProgressThickness\n }\n\nfunction RingProgress({\n className,\n value = 0,\n size = 'md',\n color = 'primary',\n thickness = 'md',\n ...props\n}: RingProgressProps) {\n const strokeWidth = ringThickness[thickness]\n const radius = (100 - strokeWidth) / 2\n const circumference = 2 * Math.PI * radius\n const clamped = Math.min(100, Math.max(0, value))\n const strokeDashoffset = circumference * (1 - clamped / 100)\n\n return (\n <svg\n data-slot=\"ring-progress\"\n data-size={size}\n data-color={color}\n data-thickness={thickness}\n role=\"progressbar\"\n aria-valuenow={clamped}\n aria-valuemin={0}\n aria-valuemax={100}\n viewBox=\"0 0 100 100\"\n className={cn(ringProgressVariants({ size, color }), className)}\n {...props}\n >\n <circle cx=\"50\" cy=\"50\" r={radius} fill=\"none\" strokeWidth={strokeWidth} className=\"stroke-muted\" />\n <circle\n cx=\"50\"\n cy=\"50\"\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={strokeDashoffset}\n transform=\"rotate(-90 50 50)\"\n className=\"stroke-(--progress-color) transition-all\"\n />\n </svg>\n )\n}\n\nexport { RingProgress, ringProgressVariants }\n"],"mappings":"yOAOA,MAAMA,EAAuBC,EAAI,WAAY,CAC3C,SAAU,CACR,KAAM,CACJ,GAAI,SACJ,GAAI,UACJ,GAAI,SACN,EACA,MAAOC,CACT,EACA,gBAAiB,CACf,KAAM,KACN,MAAO,SACT,CACF,CAAC,EAIKC,EAAgB,CACpB,KAAM,EACN,GAAI,GACJ,MAAO,EACT,EAQA,SAAS,aAAa,CACpB,YACA,QAAQ,EACR,OAAO,KACP,QAAQ,UACR,YAAY,KACZ,GAAGC,GACiB,CACpB,IAAMC,EAAcF,EAAcG,GAC5BC,GAAU,IAAMF,GAAe,EAC/BG,EAAgB,EAAI,KAAK,GAAKD,EAC9BE,EAAU,KAAK,IAAI,IAAK,KAAK,IAAI,EAAGC,CAAK,CAAC,EAC1CC,EAAmBH,GAAiB,EAAIC,EAAU,KAExD,MACE,kBAAC,MAAD,CACE,YAAU,gBACV,YAAWG,EACX,aAAYC,EACZ,iBAAgBP,EAChB,KAAK,cACL,gBAAeG,EACf,gBAAe,EACf,gBAAe,IACf,QAAQ,cACR,UAAWK,EAAGd,EAAqB,CAAE,OAAM,OAAM,CAAC,EAAGe,CAAS,EAC9D,GAAIX,EAXN,SAAA,CAaE,kBAAC,SAAD,CAAQ,GAAG,KAAK,GAAG,KAAK,EAAGG,EAAQ,KAAK,OAAoB,cAAa,UAAU,cAAgB,CAAA,EACnG,kBAAC,SAAD,CACE,GAAG,KACH,GAAG,KACH,EAAGA,EACH,KAAK,OACQ,cACb,cAAc,QACd,gBAAiBC,EACC,mBAClB,UAAU,oBACV,UAAU,0CACX,CAAA,CACE,GAET"}
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{ScrollArea as t}from"radix-ui";import{jsx as n,jsxs as r}from"react/jsx-runtime";function ScrollArea({className:i,children:a,...o}){return r(t.Root,{"data-slot":`scroll-area`,className:e(`relative`,i),...o,children:[n(t.Viewport,{"data-slot":`scroll-area-viewport`,className:e(`size-full rounded-[inherit] transition-[color,box-shadow] outline-none`,`focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1`),children:a}),n(ScrollBar,{}),n(t.Corner,{})]})}function ScrollBar({className:r,orientation:i=`vertical`,...a}){return n(t.ScrollAreaScrollbar,{"data-slot":`scroll-area-scrollbar`,"data-orientation":i,orientation:i,className:e(`flex touch-none p-px transition-colors select-none`,`data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent`,`data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent`,r),...a,children:n(t.ScrollAreaThumb,{"data-slot":`scroll-area-thumb`,className:`relative flex-1 rounded-full bg-border`})})}export{ScrollArea,ScrollBar};
1
+ import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{ScrollArea as t}from"radix-ui";import{jsx as n,jsxs as r}from"react/jsx-runtime";function ScrollArea({className:i,children:a,...o}){return/* @__PURE__ */ r(t.Root,{"data-slot":`scroll-area`,className:e(`relative`,i),...o,children:[/* @__PURE__ */ n(t.Viewport,{"data-slot":`scroll-area-viewport`,className:e(`size-full rounded-[inherit] transition-[color,box-shadow] outline-none`,`focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1`),children:a}),/* @__PURE__ */ n(ScrollBar,{}),/* @__PURE__ */ n(t.Corner,{})]})}function ScrollBar({className:r,orientation:i=`vertical`,...a}){return/* @__PURE__ */ n(t.ScrollAreaScrollbar,{"data-slot":`scroll-area-scrollbar`,"data-orientation":i,orientation:i,className:e(`flex touch-none p-px transition-colors select-none`,`data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent`,`data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent`,r),...a,children:/* @__PURE__ */ n(t.ScrollAreaThumb,{"data-slot":`scroll-area-thumb`,className:`relative flex-1 rounded-full bg-border`})})}export{ScrollArea,ScrollBar};
2
2
  //# sourceMappingURL=scroll-area.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-area.js","names":["ScrollAreaPrimitive"],"sources":["../../src/components/scroll-area.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type ScrollAreaProps = React.ComponentProps<typeof ScrollAreaPrimitive.Root>\n\nexport type ScrollBarProps = React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n\nfunction ScrollArea({ className, children, ...props }: ScrollAreaProps) {\n return (\n <ScrollAreaPrimitive.Root data-slot=\"scroll-area\" className={cn('relative', className)} {...props}>\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className={cn(\n 'size-full rounded-[inherit] transition-[color,box-shadow] outline-none',\n 'focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1'\n )}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n )\n}\n\nfunction ScrollBar({ className, orientation = 'vertical', ...props }: ScrollBarProps) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n 'flex touch-none p-px transition-colors select-none',\n 'data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent',\n 'data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-full bg-border\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n )\n}\n\nexport { ScrollArea, ScrollBar }\n"],"mappings":"qKAUA,SAAS,WAAW,CAAE,YAAW,WAAU,GAAG,GAA0B,CACtE,OACE,EAACA,EAAoB,KAArB,CAA0B,YAAU,cAAc,UAAW,EAAG,WAAY,CAAS,EAAG,GAAI,EAA5F,SAAA,CACE,EAACA,EAAoB,SAArB,CACE,YAAU,uBACV,UAAW,EACT,yEACA,6EACF,EAEC,UAC2B,CAAA,EAC9B,EAAC,UAAD,CAAY,CAAA,EACZ,EAACA,EAAoB,OAArB,CAA6B,CAAA,CACL,GAE9B,CAEA,SAAS,UAAU,CAAE,YAAW,cAAc,WAAY,GAAG,GAAyB,CACpF,OACE,EAACA,EAAoB,oBAArB,CACE,YAAU,wBACV,mBAAkB,EACL,cACb,UAAW,EACT,qDACA,+GACA,qGACA,CACF,EACA,GAAI,EAEJ,SAAA,EAACA,EAAoB,gBAArB,CACE,YAAU,oBACV,UAAU,wCACX,CAAA,CACsC,CAAA,CAE7C"}
1
+ {"version":3,"file":"scroll-area.js","names":["ScrollAreaPrimitive","ScrollArea$1","props","cn","className","orientation"],"sources":["../../src/components/scroll-area.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type ScrollAreaProps = React.ComponentProps<typeof ScrollAreaPrimitive.Root>\n\nexport type ScrollBarProps = React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n\nfunction ScrollArea({ className, children, ...props }: ScrollAreaProps) {\n return (\n <ScrollAreaPrimitive.Root data-slot=\"scroll-area\" className={cn('relative', className)} {...props}>\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className={cn(\n 'size-full rounded-[inherit] transition-[color,box-shadow] outline-none',\n 'focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1'\n )}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n )\n}\n\nfunction ScrollBar({ className, orientation = 'vertical', ...props }: ScrollBarProps) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n 'flex touch-none p-px transition-colors select-none',\n 'data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent',\n 'data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-full bg-border\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n )\n}\n\nexport { ScrollArea, ScrollBar }\n"],"mappings":"qKAUA,SAAS,WAAW,CAAE,YAAW,WAAU,GAAGE,GAA0B,CACtE,MACE,kBAACF,EAAoB,KAArB,CAA0B,YAAU,cAAc,UAAWG,EAAG,WAAYC,CAAS,EAAG,GAAIF,EAA5F,SAAA,CACE,kBAACF,EAAoB,SAArB,CACE,YAAU,uBACV,UAAWG,EACT,yEACA,6EACF,EAEC,UAC2B,CAAA,EAC9B,kBAAC,UAAD,CAAY,CAAA,EACZ,kBAACH,EAAoB,OAArB,CAA6B,CAAA,CACL,GAE9B,CAEA,SAAS,UAAU,CAAE,YAAW,cAAc,WAAY,GAAGE,GAAyB,CACpF,MACE,kBAACF,EAAoB,oBAArB,CACE,YAAU,wBACV,mBAAkBK,EACL,cACb,UAAWF,EACT,qDACA,+GACA,qGACAC,CACF,EACA,GAAIF,EAEJ,SAAA,kBAACF,EAAoB,gBAArB,CACE,YAAU,oBACV,UAAU,wCACX,CAAA,CACsC,CAAA,CAE7C"}
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{useFieldControlId as t}from"./field.js";import{IconCheck as n,IconChevronDown as r,IconChevronUp as i,IconSelector as a}from"@tabler/icons-react";import{Select as o}from"radix-ui";import{jsx as s,jsxs as c}from"react/jsx-runtime";function Select({...e}){return s(o.Root,{"data-slot":`select`,...e})}function SelectGroup({className:t,...n}){return s(o.Group,{"data-slot":`select-group`,className:e(`scroll-my-1 p-1`,t),...n})}function SelectValue({...e}){return s(o.Value,{"data-slot":`select-value`,...e})}function SelectTrigger({className:n,id:r,size:i=`md`,children:l,...u}){let d=t(r);return c(o.Trigger,{id:d,"data-slot":`select-trigger`,"data-size":i,className:e(`border-input data-placeholder:text-placeholder 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`,n),...u,children:[l,s(o.Icon,{asChild:!0,children:s(a,{className:`text-muted-foreground size-4 pointer-events-none`})})]})}function SelectContent({className:t,children:n,position:r=`item-aligned`,align:i=`center`,...a}){return s(o.Portal,{children:c(o.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,...a,children:[s(SelectScrollUpButton,{}),s(o.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}),s(SelectScrollDownButton,{})]})})}function SelectLabel({className:t,...n}){return s(o.Label,{"data-slot":`select-label`,className:e(`text-muted-foreground px-1.5 py-1 text-xs`,t),...n})}function SelectItem({className:t,children:r,...i}){return c(o.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`,t),...i,children:[s(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`,children:s(o.ItemIndicator,{children:s(n,{className:`pointer-events-none`})})}),s(o.ItemText,{children:r})]})}function SelectSeparator({className:t,...n}){return s(o.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 s(o.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:s(i,{})})}function SelectScrollDownButton({className:t,...n}){return s(o.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),...n,children:s(r,{})})}export{Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue};
1
+ import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{useFieldControlId as t}from"./field.js";import{IconCheck as n,IconChevronDown as r,IconChevronUp as i,IconSelector as a}from"@tabler/icons-react";import{Select as o}from"radix-ui";import{jsx as s,jsxs as c}from"react/jsx-runtime";function Select({...e}){return/* @__PURE__ */ s(o.Root,{"data-slot":`select`,...e})}function SelectGroup({className:t,...n}){return/* @__PURE__ */ s(o.Group,{"data-slot":`select-group`,className:e(`scroll-my-1 p-1`,t),...n})}function SelectValue({...e}){return/* @__PURE__ */ s(o.Value,{"data-slot":`select-value`,...e})}function SelectTrigger({className:n,id:r,size:i=`md`,children:l,...u}){let d=t(r);return/* @__PURE__ */ c(o.Trigger,{id:d,"data-slot":`select-trigger`,"data-size":i,className:e(`border-input data-placeholder:text-placeholder 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`,n),...u,children:[l,/* @__PURE__ */ s(o.Icon,{asChild:!0,children:/* @__PURE__ */ s(a,{className:`text-muted-foreground size-4 pointer-events-none`})})]})}function SelectContent({className:t,children:n,position:r=`item-aligned`,align:i=`center`,...a}){return/* @__PURE__ */ s(o.Portal,{children:/* @__PURE__ */ c(o.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,...a,children:[/* @__PURE__ */ s(SelectScrollUpButton,{}),/* @__PURE__ */ s(o.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}),/* @__PURE__ */ s(SelectScrollDownButton,{})]})})}function SelectLabel({className:t,...n}){return/* @__PURE__ */ s(o.Label,{"data-slot":`select-label`,className:e(`text-muted-foreground px-1.5 py-1 text-xs`,t),...n})}function SelectItem({className:t,children:r,...i}){return/* @__PURE__ */ c(o.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`,t),...i,children:[/* @__PURE__ */ s(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`,children:/* @__PURE__ */ s(o.ItemIndicator,{children:/* @__PURE__ */ s(n,{className:`pointer-events-none`})})}),/* @__PURE__ */ s(o.ItemText,{children:r})]})}function SelectSeparator({className:t,...n}){return/* @__PURE__ */ s(o.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/* @__PURE__ */ s(o.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:/* @__PURE__ */ s(i,{})})}function SelectScrollDownButton({className:t,...n}){return/* @__PURE__ */ s(o.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),...n,children:/* @__PURE__ */ s(r,{})})}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'\nimport { useFieldControlId } from './field'\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, id, size = 'md', children, ...props }: SelectTriggerProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <SelectPrimitive.Trigger\n id={fieldControlId}\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n 'border-input data-placeholder:text-placeholder 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":"0TA8BA,SAAS,OAAO,CAAE,GAAG,GAAsB,CACzC,OAAO,EAACA,EAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,CAAQ,CAAA,CAC9D,CAEA,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,UAAW,EAAG,kBAAmB,CAAS,EAAG,GAAI,CAAQ,CAAA,CAClH,CAEA,SAAS,YAAY,CAAE,GAAG,GAA2B,CACnD,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,GAAI,CAAQ,CAAA,CACrE,CAEA,SAAS,cAAc,CAAE,YAAW,KAAI,OAAO,KAAM,WAAU,GAAG,GAA6B,CAC7F,IAAM,EAAiB,EAAkB,CAAE,EAE3C,OACE,EAACA,EAAgB,QAAjB,CACE,GAAI,EACJ,YAAU,iBACV,YAAW,EACX,UAAW,EACT,gQACA,4EACA,qKACA,4FACA,qJACA,oFACA,kDACA,CACF,EACA,GAAI,EAdN,SAAA,CAgBG,EACD,EAACA,EAAgB,KAAjB,CAAsB,QAAA,GACpB,SAAA,EAAC,EAAD,CAAc,UAAU,kDAAoD,CAAA,CACxD,CAAA,CACC,GAE7B,CAEA,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,CACF,EACU,WACH,QACP,GAAI,EAdN,SAAA,CAgBE,EAAC,qBAAD,CAAuB,CAAA,EACvB,EAACA,EAAgB,SAAjB,CACE,gBAAe,EACf,UAAW,EACT,2DACA,2FACF,EAEC,UACuB,CAAA,EAC1B,EAAC,uBAAD,CAAyB,CAAA,CACF,CACH,CAAA,CAAA,CAAA,CAE5B,CAEA,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OACE,EAACA,EAAgB,MAAjB,CACE,YAAU,eACV,UAAW,EAAG,4CAA6C,CAAS,EACpE,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,WAAW,CAAE,YAAW,WAAU,GAAG,GAA0B,CACtE,OACE,EAACA,EAAgB,KAAjB,CACE,YAAU,cACV,UAAW,EACT,8GACA,0HACA,oEACA,oFACA,6DACA,CACF,EACA,GAAI,EAVN,SAAA,CAYE,EAAC,OAAD,CAAM,UAAU,+EACd,SAAA,EAACA,EAAgB,cAAjB,CAAA,SACE,EAAC,EAAD,CAAW,UAAU,qBAAuB,CAAA,CACf,CAAA,CAC3B,CAAA,EACN,EAACA,EAAgB,SAAjB,CAA2B,UAAmC,CAAA,CAC1C,GAE1B,CAEA,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OACE,EAACA,EAAgB,UAAjB,CACE,YAAU,mBACV,UAAW,EAAG,gDAAiD,CAAS,EACxE,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OACE,EAACA,EAAgB,eAAjB,CACE,YAAU,0BACV,UAAW,EACT,uEACA,uCACA,CACF,EACA,GAAI,EAEJ,SAAA,EAAC,EAAD,CAAgB,CAAA,CACc,CAAA,CAEpC,CAEA,SAAS,uBAAuB,CAAE,YAAW,GAAG,GAAsC,CACpF,OACE,EAACA,EAAgB,iBAAjB,CACE,YAAU,4BACV,UAAW,EACT,uEACA,uCACA,CACF,EACA,GAAI,EAEJ,SAAA,EAAC,EAAD,CAAkB,CAAA,CACc,CAAA,CAEtC"}
1
+ {"version":3,"file":"select.js","names":["SelectPrimitive","Select$1","props","cn","className","fieldControlId","useFieldControlId","id","size","children","IconSelector","position","IconCheck","IconChevronUp","IconChevronDown"],"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'\nimport { useFieldControlId } from './field'\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, id, size = 'md', children, ...props }: SelectTriggerProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <SelectPrimitive.Trigger\n id={fieldControlId}\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n 'border-input data-placeholder:text-placeholder 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":"0TA8BA,SAAS,OAAO,CAAE,GAAGE,GAAsB,CACzC,MAAO,kBAACF,EAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAIE,CAAQ,CAAA,CAC9D,CAEA,SAAS,YAAY,CAAE,YAAW,GAAGA,GAA2B,CAC9D,MAAO,kBAACF,EAAgB,MAAjB,CAAuB,YAAU,eAAe,UAAWG,EAAG,kBAAmBC,CAAS,EAAG,GAAIF,CAAQ,CAAA,CAClH,CAEA,SAAS,YAAY,CAAE,GAAGA,GAA2B,CACnD,MAAO,kBAACF,EAAgB,MAAjB,CAAuB,YAAU,eAAe,GAAIE,CAAQ,CAAA,CACrE,CAEA,SAAS,cAAc,CAAE,YAAW,KAAI,OAAO,KAAM,WAAU,GAAGA,GAA6B,CAC7F,IAAMG,EAAiBC,EAAkBC,CAAE,EAE3C,MACE,kBAACP,EAAgB,QAAjB,CACE,GAAIK,EACJ,YAAU,iBACV,YAAWG,EACX,UAAWL,EACT,gQACA,4EACA,qKACA,4FACA,qJACA,oFACA,kDACAC,CACF,EACA,GAAIF,EAdN,SAAA,CAgBGO,EACD,kBAACT,EAAgB,KAAjB,CAAsB,QAAA,GACpB,SAAA,kBAACU,EAAD,CAAc,UAAU,kDAAoD,CAAA,CACxD,CAAA,CACC,GAE7B,CAEA,SAAS,cAAc,CACrB,YACA,WACA,WAAW,eACX,QAAQ,SACR,GAAGR,GACkB,CACrB,MACE,kBAACF,EAAgB,OAAjB,CAAA,SACE,kBAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,qBAAoBW,IAAa,eACjC,UAAWR,EACT,2PACA,uIACA,8JACA,yCACAQ,IAAa,UACX,kIACFP,CACF,EACU,WACH,QACP,GAAIF,EAdN,SAAA,CAgBE,kBAAC,qBAAD,CAAuB,CAAA,EACvB,kBAACF,EAAgB,SAAjB,CACE,gBAAeW,EACf,UAAWR,EACT,2DACA,2FACF,EAEC,UACuB,CAAA,EAC1B,kBAAC,uBAAD,CAAyB,CAAA,CACF,CACH,CAAA,CAAA,CAAA,CAE5B,CAEA,SAAS,YAAY,CAAE,YAAW,GAAGD,GAA2B,CAC9D,MACE,kBAACF,EAAgB,MAAjB,CACE,YAAU,eACV,UAAWG,EAAG,4CAA6CC,CAAS,EACpE,GAAIF,CACL,CAAA,CAEL,CAEA,SAAS,WAAW,CAAE,YAAW,WAAU,GAAGA,GAA0B,CACtE,MACE,kBAACF,EAAgB,KAAjB,CACE,YAAU,cACV,UAAWG,EACT,8GACA,0HACA,oEACA,oFACA,6DACAC,CACF,EACA,GAAIF,EAVN,SAAA,CAYE,kBAAC,OAAD,CAAM,UAAU,+EACd,SAAA,kBAACF,EAAgB,cAAjB,CAAA,SACE,kBAACY,EAAD,CAAW,UAAU,qBAAuB,CAAA,CACf,CAAA,CAC3B,CAAA,EACN,kBAACZ,EAAgB,SAAjB,CAA2B,UAAmC,CAAA,CAC1C,GAE1B,CAEA,SAAS,gBAAgB,CAAE,YAAW,GAAGE,GAA+B,CACtE,MACE,kBAACF,EAAgB,UAAjB,CACE,YAAU,mBACV,UAAWG,EAAG,gDAAiDC,CAAS,EACxE,GAAIF,CACL,CAAA,CAEL,CAEA,SAAS,qBAAqB,CAAE,YAAW,GAAGA,GAAoC,CAChF,MACE,kBAACF,EAAgB,eAAjB,CACE,YAAU,0BACV,UAAWG,EACT,uEACA,uCACAC,CACF,EACA,GAAIF,EAEJ,SAAA,kBAACW,EAAD,CAAgB,CAAA,CACc,CAAA,CAEpC,CAEA,SAAS,uBAAuB,CAAE,YAAW,GAAGX,GAAsC,CACpF,MACE,kBAACF,EAAgB,iBAAjB,CACE,YAAU,4BACV,UAAWG,EACT,uEACA,uCACAC,CACF,EACA,GAAIF,EAEJ,SAAA,kBAACY,EAAD,CAAkB,CAAA,CACc,CAAA,CAEtC"}
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{Separator as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function Separator({className:r,orientation:i=`horizontal`,decorative:a=!0,...o}){return n(t.Root,{"data-slot":`separator`,decorative:a,orientation:i,className:e(`bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,r),...o})}export{Separator};
1
+ import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{Separator as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function Separator({className:r,orientation:i=`horizontal`,decorative:a=!0,...o}){return/* @__PURE__ */ n(t.Root,{"data-slot":`separator`,decorative:a,orientation:i,className:e(`bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,r),...o})}export{Separator};
2
2
  //# sourceMappingURL=separator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"separator.js","names":["SeparatorPrimitive"],"sources":["../../src/components/separator.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Separator as SeparatorPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type SeparatorProps = React.ComponentProps<typeof SeparatorPrimitive.Root>\n\nfunction Separator({ className, orientation = 'horizontal', decorative = true, ...props }: SeparatorProps) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n"],"mappings":"0JAQA,SAAS,UAAU,CAAE,YAAW,cAAc,aAAc,aAAa,GAAM,GAAG,GAAyB,CACzG,OACE,EAACA,EAAmB,KAApB,CACE,YAAU,YACE,aACC,cACb,UAAW,EACT,+GACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"separator.js","names":["SeparatorPrimitive","Separator$1","props","cn","className"],"sources":["../../src/components/separator.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Separator as SeparatorPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type SeparatorProps = React.ComponentProps<typeof SeparatorPrimitive.Root>\n\nfunction Separator({ className, orientation = 'horizontal', decorative = true, ...props }: SeparatorProps) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n"],"mappings":"0JAQA,SAAS,UAAU,CAAE,YAAW,cAAc,aAAc,aAAa,GAAM,GAAGE,GAAyB,CACzG,MACE,kBAACF,EAAmB,KAApB,CACE,YAAU,YACE,aACC,cACb,UAAWG,EACT,+GACAC,CACF,EACA,GAAIF,CACL,CAAA,CAEL"}
@@ -54,7 +54,7 @@ export type SidebarMenuItemProps = React.ComponentProps<'li'>;
54
54
  declare function useSidebar(): SidebarContextProps;
55
55
  declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, expandOnHover, hoverExpandOpenDelay, hoverExpandCloseDelay, className, style, children, ...props }: SidebarProviderProps): React.JSX.Element;
56
56
  declare function Sidebar({ side, variant, collapsible, className, children, dir, ...props }: SidebarProps): React.JSX.Element;
57
- declare function SidebarTrigger({ className, onClick, ...props }: SidebarTriggerProps): React.JSX.Element;
57
+ declare function SidebarTrigger({ className, onClick, asChild, children, ...props }: SidebarTriggerProps): React.JSX.Element;
58
58
  declare function SidebarRail({ className, ...props }: SidebarRailProps): React.JSX.Element;
59
59
  declare function SidebarInset({ className, ...props }: SidebarInsetProps): React.JSX.Element;
60
60
  declare function SidebarInput({ className, ...props }: SidebarInputProps): React.JSX.Element;