@uselets/ui 1.20.4 → 2.0.1

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 (252) hide show
  1. package/README.md +309 -426
  2. package/dist/as-child-Dxg3Xo1G.d.ts +41 -0
  3. package/dist/cli/uselets.mjs +5 -4
  4. package/dist/cli/uselets.mjs.map +1 -1
  5. package/dist/components/accordion.d.ts +12 -8
  6. package/dist/components/accordion.js +1 -1
  7. package/dist/components/accordion.js.map +1 -1
  8. package/dist/components/alert-dialog.d.ts +22 -15
  9. package/dist/components/alert-dialog.js +1 -1
  10. package/dist/components/alert-dialog.js.map +1 -1
  11. package/dist/components/alert.d.ts +1 -1
  12. package/dist/components/anchor.d.ts +3 -5
  13. package/dist/components/anchor.js +1 -1
  14. package/dist/components/anchor.js.map +1 -1
  15. package/dist/components/area-chart.d.ts +54 -0
  16. package/dist/components/area-chart.js +1 -1
  17. package/dist/components/area-chart.js.map +1 -1
  18. package/dist/components/avatar.d.ts +12 -7
  19. package/dist/components/avatar.js +1 -1
  20. package/dist/components/avatar.js.map +1 -1
  21. package/dist/components/badge.d.ts +3 -5
  22. package/dist/components/badge.js +1 -1
  23. package/dist/components/badge.js.map +1 -1
  24. package/dist/components/bar-chart.d.ts +48 -0
  25. package/dist/components/bar-chart.js +1 -1
  26. package/dist/components/bar-chart.js.map +1 -1
  27. package/dist/components/bottom-nav.d.ts +7 -3
  28. package/dist/components/bottom-nav.js +1 -1
  29. package/dist/components/bottom-nav.js.map +1 -1
  30. package/dist/components/breadcrumb.d.ts +3 -4
  31. package/dist/components/breadcrumb.js +1 -1
  32. package/dist/components/breadcrumb.js.map +1 -1
  33. package/dist/components/button-group.d.ts +3 -4
  34. package/dist/components/button-group.js +1 -1
  35. package/dist/components/button-group.js.map +1 -1
  36. package/dist/components/button.d.ts +8 -4
  37. package/dist/components/button.js +1 -1
  38. package/dist/components/button.js.map +1 -1
  39. package/dist/components/calendar.d.ts +4 -0
  40. package/dist/components/calendar.js +1 -1
  41. package/dist/components/calendar.js.map +1 -1
  42. package/dist/components/card.d.ts +4 -0
  43. package/dist/components/card.js.map +1 -1
  44. package/dist/components/carousel.d.ts +11 -3
  45. package/dist/components/carousel.js +1 -1
  46. package/dist/components/carousel.js.map +1 -1
  47. package/dist/components/center.d.ts +1 -1
  48. package/dist/components/chart.js +4 -4
  49. package/dist/components/checkbox.d.ts +14 -4
  50. package/dist/components/checkbox.js +1 -1
  51. package/dist/components/checkbox.js.map +1 -1
  52. package/dist/components/collapsible.d.ts +8 -7
  53. package/dist/components/collapsible.js +1 -1
  54. package/dist/components/collapsible.js.map +1 -1
  55. package/dist/components/combobox.d.ts +48 -26
  56. package/dist/components/combobox.js +1 -1
  57. package/dist/components/combobox.js.map +1 -1
  58. package/dist/components/command.d.ts +16 -2
  59. package/dist/components/command.js +1 -1
  60. package/dist/components/command.js.map +1 -1
  61. package/dist/components/container.d.ts +1 -1
  62. package/dist/components/data-table.d.ts +39 -0
  63. package/dist/components/data-table.js +1 -1
  64. package/dist/components/data-table.js.map +1 -1
  65. package/dist/components/date-range-picker.d.ts +24 -2
  66. package/dist/components/date-range-picker.js +1 -1
  67. package/dist/components/date-range-picker.js.map +1 -1
  68. package/dist/components/dialog.d.ts +35 -15
  69. package/dist/components/dialog.js +1 -1
  70. package/dist/components/dialog.js.map +1 -1
  71. package/dist/components/direction.d.ts +7 -0
  72. package/dist/components/direction.js +1 -0
  73. package/dist/components/donut-chart.d.ts +12 -0
  74. package/dist/components/donut-chart.js +1 -1
  75. package/dist/components/donut-chart.js.map +1 -1
  76. package/dist/components/drawer.d.ts +33 -15
  77. package/dist/components/drawer.js +1 -1
  78. package/dist/components/drawer.js.map +1 -1
  79. package/dist/components/dropdown-menu.d.ts +36 -26
  80. package/dist/components/dropdown-menu.js +1 -1
  81. package/dist/components/dropdown-menu.js.map +1 -1
  82. package/dist/components/dropzone.d.ts +19 -0
  83. package/dist/components/dropzone.js +1 -1
  84. package/dist/components/dropzone.js.map +1 -1
  85. package/dist/components/field.d.ts +16 -4
  86. package/dist/components/field.js +1 -1
  87. package/dist/components/field.js.map +1 -1
  88. package/dist/components/flex.d.ts +1 -1
  89. package/dist/components/grid.d.ts +13 -0
  90. package/dist/components/grid.js.map +1 -1
  91. package/dist/components/group.d.ts +1 -1
  92. package/dist/components/heading.d.ts +3 -5
  93. package/dist/components/heading.js +1 -1
  94. package/dist/components/heading.js.map +1 -1
  95. package/dist/components/hover-card.d.ts +7 -6
  96. package/dist/components/hover-card.js +1 -1
  97. package/dist/components/hover-card.js.map +1 -1
  98. package/dist/components/input-group.d.ts +2 -2
  99. package/dist/components/input-group.js +1 -1
  100. package/dist/components/input-group.js.map +1 -1
  101. package/dist/components/input-otp.d.ts +4 -2
  102. package/dist/components/input-otp.js +1 -1
  103. package/dist/components/input-otp.js.map +1 -1
  104. package/dist/components/input.d.ts +1 -1
  105. package/dist/components/input.js +1 -1
  106. package/dist/components/input.js.map +1 -1
  107. package/dist/components/label.d.ts +3 -4
  108. package/dist/components/label.js +1 -1
  109. package/dist/components/label.js.map +1 -1
  110. package/dist/components/list.d.ts +8 -5
  111. package/dist/components/list.js +1 -1
  112. package/dist/components/list.js.map +1 -1
  113. package/dist/components/logo.d.ts +113 -0
  114. package/dist/components/marker.d.ts +4 -5
  115. package/dist/components/marker.js +1 -1
  116. package/dist/components/marker.js.map +1 -1
  117. package/dist/components/mask-input.d.ts +6 -0
  118. package/dist/components/mask-input.js.map +1 -1
  119. package/dist/components/native-select.d.ts +5 -1
  120. package/dist/components/native-select.js +1 -1
  121. package/dist/components/native-select.js.map +1 -1
  122. package/dist/components/navigation-menu.d.ts +19 -20
  123. package/dist/components/navigation-menu.js +1 -1
  124. package/dist/components/navigation-menu.js.map +1 -1
  125. package/dist/components/number-field.d.ts +18 -13
  126. package/dist/components/number-field.js +1 -1
  127. package/dist/components/number-field.js.map +1 -1
  128. package/dist/components/pagination.d.ts +9 -0
  129. package/dist/components/pagination.js +1 -1
  130. package/dist/components/pagination.js.map +1 -1
  131. package/dist/components/phone-input.d.ts +3 -0
  132. package/dist/components/phone-input.js +1 -1
  133. package/dist/components/phone-input.js.map +1 -1
  134. package/dist/components/pie-chart.d.ts +53 -0
  135. package/dist/components/pie-chart.js +1 -1
  136. package/dist/components/pie-chart.js.map +1 -1
  137. package/dist/components/popover.d.ts +13 -12
  138. package/dist/components/popover.js +1 -1
  139. package/dist/components/popover.js.map +1 -1
  140. package/dist/components/progress.d.ts +9 -3
  141. package/dist/components/progress.js +1 -1
  142. package/dist/components/progress.js.map +1 -1
  143. package/dist/components/radio-group.d.ts +20 -6
  144. package/dist/components/radio-group.js +1 -1
  145. package/dist/components/radio-group.js.map +1 -1
  146. package/dist/components/resizable.d.ts +1 -0
  147. package/dist/components/resizable.js.map +1 -1
  148. package/dist/components/ring-progress.d.ts +9 -1
  149. package/dist/components/ring-progress.js.map +1 -1
  150. package/dist/components/scroll-area.d.ts +3 -3
  151. package/dist/components/scroll-area.js +1 -1
  152. package/dist/components/scroll-area.js.map +1 -1
  153. package/dist/components/select.d.ts +25 -20
  154. package/dist/components/select.js +1 -1
  155. package/dist/components/select.js.map +1 -1
  156. package/dist/components/separator.d.ts +9 -4
  157. package/dist/components/separator.js +1 -1
  158. package/dist/components/separator.js.map +1 -1
  159. package/dist/components/sidebar.d.ts +63 -18
  160. package/dist/components/sidebar.js +1 -1
  161. package/dist/components/sidebar.js.map +1 -1
  162. package/dist/components/simple-grid.d.ts +7 -0
  163. package/dist/components/simple-grid.js +1 -1
  164. package/dist/components/simple-grid.js.map +1 -1
  165. package/dist/components/skeleton.d.ts +4 -0
  166. package/dist/components/skeleton.js.map +1 -1
  167. package/dist/components/slider.d.ts +2 -2
  168. package/dist/components/slider.js +1 -1
  169. package/dist/components/slider.js.map +1 -1
  170. package/dist/components/spinner.d.ts +1 -1
  171. package/dist/components/stack.d.ts +1 -1
  172. package/dist/components/stepper.d.ts +46 -25
  173. package/dist/components/stepper.js +1 -1
  174. package/dist/components/stepper.js.map +1 -1
  175. package/dist/components/switch.d.ts +17 -3
  176. package/dist/components/switch.js +1 -1
  177. package/dist/components/switch.js.map +1 -1
  178. package/dist/components/table.d.ts +10 -1
  179. package/dist/components/table.js +1 -1
  180. package/dist/components/table.js.map +1 -1
  181. package/dist/components/tabs.d.ts +14 -10
  182. package/dist/components/tabs.js +1 -1
  183. package/dist/components/tabs.js.map +1 -1
  184. package/dist/components/text.d.ts +3 -5
  185. package/dist/components/text.js +1 -1
  186. package/dist/components/text.js.map +1 -1
  187. package/dist/components/textarea.d.ts +1 -1
  188. package/dist/components/textarea.js +1 -1
  189. package/dist/components/textarea.js.map +1 -1
  190. package/dist/components/theme.d.ts +12 -0
  191. package/dist/components/theme.js +1 -1
  192. package/dist/components/theme.js.map +1 -1
  193. package/dist/components/timeline.d.ts +25 -1
  194. package/dist/components/timeline.js +1 -1
  195. package/dist/components/timeline.js.map +1 -1
  196. package/dist/components/toggle-group.d.ts +16 -6
  197. package/dist/components/toggle-group.js +1 -1
  198. package/dist/components/toggle-group.js.map +1 -1
  199. package/dist/components/toggle.d.ts +4 -4
  200. package/dist/components/toggle.js +1 -1
  201. package/dist/components/toggle.js.map +1 -1
  202. package/dist/components/tooltip.d.ts +15 -8
  203. package/dist/components/tooltip.js +1 -1
  204. package/dist/components/tooltip.js.map +1 -1
  205. package/dist/components/unstyled-button.d.ts +3 -5
  206. package/dist/components/unstyled-button.js +1 -1
  207. package/dist/components/unstyled-button.js.map +1 -1
  208. package/dist/components/visibility.d.ts +2 -0
  209. package/dist/components/visibility.js +1 -1
  210. package/dist/components/visibility.js.map +1 -1
  211. package/dist/hooks/use-breakpoint-value.d.ts +1 -0
  212. package/dist/hooks/use-breakpoint-value.js.map +1 -1
  213. package/dist/hooks/use-breakpoint.d.ts +1 -0
  214. package/dist/hooks/use-breakpoint.js.map +1 -1
  215. package/dist/hooks/use-disclosure.d.ts +3 -0
  216. package/dist/hooks/use-disclosure.js +1 -1
  217. package/dist/hooks/use-disclosure.js.map +1 -1
  218. package/dist/hooks/use-document-visibility.d.ts +1 -0
  219. package/dist/hooks/use-document-visibility.js.map +1 -1
  220. package/dist/hooks/use-hotkeys.d.ts +1 -1
  221. package/dist/hooks/use-idle.d.ts +9 -0
  222. package/dist/hooks/use-idle.js.map +1 -1
  223. package/dist/hooks/use-interval.d.ts +1 -0
  224. package/dist/hooks/use-interval.js.map +1 -1
  225. package/dist/hooks/use-local-storage.d.ts +6 -0
  226. package/dist/hooks/use-local-storage.js +1 -1
  227. package/dist/hooks/use-local-storage.js.map +1 -1
  228. package/dist/hooks/use-mask.d.ts +1 -0
  229. package/dist/hooks/use-mask.js.map +1 -1
  230. package/dist/hooks/use-mobile.d.ts +1 -0
  231. package/dist/hooks/use-mobile.js.map +1 -1
  232. package/dist/index.d.ts +7 -5
  233. package/dist/index.js +1 -1
  234. package/dist/lib/as-child.d.ts +2 -0
  235. package/dist/lib/as-child.js +2 -0
  236. package/dist/lib/as-child.js.map +1 -0
  237. package/dist/lib/utils.d.ts +1 -1
  238. package/dist/logo--R3_XDgA.js.map +1 -1
  239. package/dist/resolve-class-name-BurP8ngI.js +2 -0
  240. package/dist/resolve-class-name-BurP8ngI.js.map +1 -0
  241. package/dist/skills/uselets-ui/SKILL.md +8 -3
  242. package/dist/skills/uselets-ui/references/component-catalog.md +32 -17
  243. package/dist/skills/uselets-ui/references/migration-v1-to-v2.md +599 -0
  244. package/dist/skills/uselets-ui/references/package-guide.md +7 -7
  245. package/dist/styles/base.css +21 -0
  246. package/dist/{use-hotkeys-DOjcX9Tt.d.ts → use-hotkeys-D1_TEIwN.d.ts} +2 -1
  247. package/dist/use-hotkeys-YDJmGWX6.js.map +1 -1
  248. package/package.json +16 -17
  249. package/skills/uselets-ui/SKILL.md +8 -3
  250. package/skills/uselets-ui/references/component-catalog.md +32 -17
  251. package/skills/uselets-ui/references/migration-v1-to-v2.md +599 -0
  252. package/skills/uselets-ui/references/package-guide.md +7 -7
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.js";import{cn as e,stopPropagationHandler as t}from"../lib/utils.js";import{Button as n}from"./button.js";import{IconX as r}from"@tabler/icons-react";import{Dialog 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*as c from"react";const l=s([`bg-background ring-foreground/10 fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none`,`flex flex-col gap-4 rounded-xl p-4 text-sm ring-1 duration-100`,`max-w-[calc(100%-2rem)] max-h-[calc(100dvh-2rem)] overflow-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`],{variants:{size:{sm:`sm:max-w-sm`,md:`sm:max-w-md`,lg:`sm:max-w-lg`,xl:`sm:max-w-xl`,"2xl":`sm:max-w-2xl`,"3xl":`sm:max-w-3xl`,full:`w-screen h-screen max-w-none max-h-screen rounded-none sm:max-w-none`}},defaultVariants:{size:`md`}}),u=c.createContext({size:`sm`,dismissible:!0});function Dialog({size:e=`sm`,dismissible:t=!0,...n}){let r=c.useMemo(()=>({size:e,dismissible:t}),[e,t]);return/* @__PURE__ */ a(u.Provider,{value:r,children:/* @__PURE__ */ a(i.Root,{"data-slot":`dialog`,...n})})}function DialogTrigger({...e}){return/* @__PURE__ */ a(i.Trigger,{"data-slot":`dialog-trigger`,...e})}function DialogPortal({...e}){return/* @__PURE__ */ a(i.Portal,{"data-slot":`dialog-portal`,...e})}function DialogClose({...e}){return/* @__PURE__ */ a(i.Close,{"data-slot":`dialog-close`,...e})}function DialogOverlay({className:n,onClick:r,...o}){return/* @__PURE__ */ a(i.Overlay,{"data-slot":`dialog-overlay`,className:e(`bg-black/10 fixed inset-0 isolate z-50`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0`,`duration-100 supports-backdrop-filter:backdrop-blur-xs`,n),onClick:t(r),...o})}function DialogContent({className:s,children:d,showCloseButton:f=!0,overlayRef:p,...m}){let{size:h,dismissible:g}=c.useContext(u);return/* @__PURE__ */ o(DialogPortal,{children:[/* @__PURE__ */ a(DialogOverlay,{ref:p}),/* @__PURE__ */ o(i.Content,{"data-slot":`dialog-content`,className:e(l({size:h}),s),...m,onEscapeKeyDown:e=>{g||e.preventDefault(),m.onEscapeKeyDown?.(e)},onInteractOutside:e=>{g||e.preventDefault(),m.onInteractOutside?.(e)},onClick:t(m.onClick),onSubmit:t(m.onSubmit),children:[d,f&&/* @__PURE__ */ a(i.Close,{"data-slot":`dialog-close`,asChild:!0,children:/* @__PURE__ */ o(n,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`,children:[/* @__PURE__ */ a(r,{}),/* @__PURE__ */ a(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function DialogHeader({className:t,...n}){return/* @__PURE__ */ a(`div`,{"data-slot":`dialog-header`,className:e(`gap-2 flex flex-col shrink-0`,t),...n})}function DialogBody({className:t,...n}){return/* @__PURE__ */ a(`div`,{"data-slot":`dialog-body`,className:e(`-mx-4 px-4 flex-1 overflow-y-auto`,t),...n})}function DialogFooter({className:t,showCloseButton:r=!1,children:s,...c}){return/* @__PURE__ */ o(`div`,{"data-slot":`dialog-footer`,className:e(`bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 shrink-0`,`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,t),...c,children:[s,r&&/* @__PURE__ */ a(i.Close,{asChild:!0,children:/* @__PURE__ */ a(n,{variant:`outline`,children:`Close`})})]})}function DialogTitle({className:t,...n}){return/* @__PURE__ */ a(i.Title,{"data-slot":`dialog-title`,className:e(`text-base leading-none font-medium`,t),...n})}function DialogDescription({className:t,...n}){return/* @__PURE__ */ a(i.Description,{"data-slot":`dialog-description`,className:e(`text-muted-foreground text-sm`,`*:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,t),...n})}export{Dialog,DialogBody,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger};
1
+ import"../rolldown-runtime-BhWHdk3m.js";import{toAsChildRenderProps as e}from"../lib/as-child.js";import{cn as t,stopPropagationHandler as n}from"../lib/utils.js";import{t as r}from"../resolve-class-name-BurP8ngI.js";import{Button as i}from"./button.js";import{IconX as a}from"@tabler/icons-react";import*as o from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{cva as l}from"class-variance-authority";import{Dialog as u}from"@base-ui/react/dialog";const d=l([`bg-background ring-foreground/10 fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none`,`flex flex-col gap-4 rounded-xl p-4 text-sm ring-1 duration-100`,`max-w-[calc(100%-2rem)] max-h-[calc(100dvh-2rem)] overflow-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`],{variants:{size:{sm:`sm:max-w-sm`,md:`sm:max-w-md`,lg:`sm:max-w-lg`,xl:`sm:max-w-xl`,"2xl":`sm:max-w-2xl`,"3xl":`sm:max-w-3xl`,full:`w-screen h-screen max-w-none max-h-screen rounded-none sm:max-w-none`}},defaultVariants:{size:`md`}}),f=o.createContext({size:`md`});function Dialog({size:e=`md`,dismissible:t=!0,disablePointerDismissal:n,onOpenChange:r,...i}){let a=o.useMemo(()=>({size:e}),[e]);return/* @__PURE__ */ s(f.Provider,{value:a,children:/* @__PURE__ */ s(u.Root,{"data-slot":`dialog`,disablePointerDismissal:!t||n,onOpenChange:(e,n)=>{!t&&n.reason===`escape-key`?n.cancel():r?.(e,n)},...i})})}function DialogTrigger({asChild:t,children:n,...r}){return/* @__PURE__ */ s(u.Trigger,{"data-slot":`dialog-trigger`,...r,...e(t,n)})}function DialogPortal({...e}){return/* @__PURE__ */ s(u.Portal,{"data-slot":`dialog-portal`,...e})}function DialogClose({asChild:t,children:n,...r}){return/* @__PURE__ */ s(u.Close,{"data-slot":`dialog-close`,...r,...e(t,n)})}function DialogOverlay({className:i,onClick:a,forceRender:o=!0,asChild:c,children:l,...d}){return/* @__PURE__ */ s(u.Backdrop,{"data-slot":`dialog-overlay`,forceRender:o,className:e=>t(`bg-black/10 fixed inset-0 isolate z-50`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0`,`duration-100 supports-backdrop-filter:backdrop-blur-xs`,r(i,e)),onClick:n(a),...d,...e(c,l)})}function DialogContent({className:l,children:p,showCloseButton:m=!0,overlayRef:h,overlayProps:g,keepMounted:_,asChild:v,...y}){let{size:b}=o.useContext(f);return/* @__PURE__ */ c(DialogPortal,{keepMounted:_,children:[/* @__PURE__ */ s(DialogOverlay,{...g,ref:h??g?.ref}),/* @__PURE__ */ c(u.Popup,{"data-slot":`dialog-content`,className:e=>t(d({size:b}),r(l,e)),...y,...e(v,p),onClick:n(y.onClick),onSubmit:n(y.onSubmit),children:[!v&&p,m&&!v&&/* @__PURE__ */ c(u.Close,{"data-slot":`dialog-close`,render:/* @__PURE__ */ s(i,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[/* @__PURE__ */ s(a,{}),/* @__PURE__ */ s(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function DialogHeader({className:e,...n}){return/* @__PURE__ */ s(`div`,{"data-slot":`dialog-header`,className:t(`gap-2 flex flex-col shrink-0`,e),...n})}function DialogBody({className:e,...n}){return/* @__PURE__ */ s(`div`,{"data-slot":`dialog-body`,className:t(`-mx-4 px-4 flex-1 overflow-y-auto`,e),...n})}function DialogFooter({className:e,showCloseButton:n=!1,children:r,...a}){return/* @__PURE__ */ c(`div`,{"data-slot":`dialog-footer`,className:t(`bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 shrink-0`,`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...a,children:[r,n&&/* @__PURE__ */ s(u.Close,{render:/* @__PURE__ */ s(i,{variant:`outline`}),children:`Close`})]})}function DialogTitle({className:n,asChild:i,children:a,...o}){return/* @__PURE__ */ s(u.Title,{"data-slot":`dialog-title`,className:e=>t(`text-base leading-none font-medium`,r(n,e)),...o,...e(i,a)})}function DialogDescription({className:n,asChild:i,children:a,...o}){return/* @__PURE__ */ s(u.Description,{"data-slot":`dialog-description`,className:e=>t(`text-muted-foreground text-sm`,`*:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,r(n,e)),...o,...e(i,a)})}export{Dialog,DialogBody,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger};
2
2
  //# sourceMappingURL=dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","names":["DialogPrimitive","Dialog$1","React","dialogContentVariants","cva","DialogContext","props","contextValue","size","dismissible","cn","className","stopPropagationHandler","onClick","overlayRef","event","children","showCloseButton","Button","IconX"],"sources":["../../src/components/dialog.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { IconX } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Dialog as DialogPrimitive } from 'radix-ui'\n\nimport { cn, stopPropagationHandler } from '../lib/utils'\nimport { Button } from './button'\n\nconst dialogContentVariants = cva(\n [\n 'bg-background ring-foreground/10 fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none',\n 'flex flex-col gap-4 rounded-xl p-4 text-sm ring-1 duration-100',\n 'max-w-[calc(100%-2rem)] max-h-[calc(100dvh-2rem)] overflow-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 ],\n {\n variants: {\n size: {\n sm: 'sm:max-w-sm',\n md: 'sm:max-w-md',\n lg: 'sm:max-w-lg',\n xl: 'sm:max-w-xl',\n '2xl': 'sm:max-w-2xl',\n '3xl': 'sm:max-w-3xl',\n full: 'w-screen h-screen max-w-none max-h-screen rounded-none sm:max-w-none'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n }\n)\n\ntype DialogSize = NonNullable<VariantProps<typeof dialogContentVariants>['size']>\ntype DialogContextValue = { size: DialogSize; dismissible: boolean }\nconst DialogContext = React.createContext<DialogContextValue>({ size: 'sm', dismissible: true })\n\nexport type DialogProps = React.ComponentProps<typeof DialogPrimitive.Root> & {\n size?: DialogSize\n dismissible?: boolean\n}\nexport type DialogTriggerProps = React.ComponentProps<typeof DialogPrimitive.Trigger>\nexport type DialogPortalProps = React.ComponentProps<typeof DialogPrimitive.Portal>\nexport type DialogCloseProps = React.ComponentProps<typeof DialogPrimitive.Close>\nexport type DialogOverlayProps = React.ComponentProps<typeof DialogPrimitive.Overlay>\nexport type DialogContentProps = React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n overlayRef?: React.Ref<HTMLDivElement>\n}\nexport type DialogHeaderProps = React.ComponentProps<'div'>\nexport type DialogBodyProps = React.ComponentProps<'div'>\nexport type DialogFooterProps = React.ComponentProps<'div'> & { showCloseButton?: boolean }\nexport type DialogTitleProps = React.ComponentProps<typeof DialogPrimitive.Title>\nexport type DialogDescriptionProps = React.ComponentProps<typeof DialogPrimitive.Description>\n\nfunction Dialog({ size = 'sm', dismissible = true, ...props }: DialogProps) {\n const contextValue = React.useMemo<DialogContextValue>(() => ({ size, dismissible }), [size, dismissible])\n\n return (\n <DialogContext.Provider value={contextValue}>\n <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n </DialogContext.Provider>\n )\n}\n\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({ ...props }: DialogPortalProps) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({ className, onClick, ...props }: DialogOverlayProps) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'bg-black/10 fixed inset-0 isolate z-50',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0',\n 'duration-100 supports-backdrop-filter:backdrop-blur-xs',\n className\n )}\n onClick={stopPropagationHandler(onClick)}\n {...props}\n />\n )\n}\n\nfunction DialogContent({ className, children, showCloseButton = true, overlayRef, ...props }: DialogContentProps) {\n const { size, dismissible } = React.useContext(DialogContext)\n\n return (\n <DialogPortal>\n <DialogOverlay ref={overlayRef} />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(dialogContentVariants({ size }), className)}\n {...props}\n onEscapeKeyDown={(event) => {\n if (!dismissible) event.preventDefault()\n props.onEscapeKeyDown?.(event)\n }}\n onInteractOutside={(event) => {\n if (!dismissible) event.preventDefault()\n props.onInteractOutside?.(event)\n }}\n // React events bubble through the fiber tree, not the DOM, so a portaled Radix Content still\n // reaches any ancestor's onClick/onSubmit even though it renders outside it in the DOM.\n onClick={stopPropagationHandler(props.onClick)}\n onSubmit={stopPropagationHandler(props.onSubmit)}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" asChild>\n <Button variant=\"ghost\" className=\"absolute top-2 right-2\" size=\"icon-sm\">\n <IconX />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: DialogHeaderProps) {\n return <div data-slot=\"dialog-header\" className={cn('gap-2 flex flex-col shrink-0', className)} {...props} />\n}\n\nfunction DialogBody({ className, ...props }: DialogBodyProps) {\n return <div data-slot=\"dialog-body\" className={cn('-mx-4 px-4 flex-1 overflow-y-auto', className)} {...props} />\n}\n\nfunction DialogFooter({ className, showCloseButton = false, children, ...props }: DialogFooterProps) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 shrink-0',\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({ className, ...props }: DialogTitleProps) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-base leading-none font-medium', className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({ className, ...props }: DialogDescriptionProps) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n 'text-muted-foreground text-sm',\n '*:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger\n}\n"],"mappings":"qVASA,MAAMG,EAAwBC,EAC5B,CACE,qHACA,iEACA,oEACA,sIACF,EACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,MAAO,eACP,MAAO,eACP,KAAM,sEACR,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CACF,EAIMC,EAAgBH,EAAM,cAAkC,CAAE,KAAM,KAAM,YAAa,EAAK,CAAC,EAoB/F,SAAS,OAAO,CAAE,OAAO,KAAM,cAAc,GAAM,GAAGI,GAAsB,CAC1E,IAAMC,EAAeL,EAAM,aAAmC,CAAE,OAAM,aAAY,GAAI,CAACM,EAAMC,CAAW,CAAC,EAEzG,MACE,kBAACJ,EAAc,SAAf,CAAwB,MAAOE,EAC7B,SAAA,kBAACP,EAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAIM,CAAQ,CAAA,CAC/B,CAAA,C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Q,UAAU,yBAAyB,KAAK,UAAhE,SAAA,CACE,kBAACC,EAAD,CAAQ,CAAA,EACR,kBAAC,OAAD,CAAM,UAAU,UAAU,SAAA,OAAW,CAAA,CAC/B,GACa,CAAA,CAEF,CACb,CAAA,CAAA,CAAA,CAAA,CAElB,CAEA,SAAS,aAAa,CAAE,YAAW,GAAGb,GAA4B,CAChE,MAAO,kBAAC,MAAD,CAAK,YAAU,gBAAgB,UAAWI,EAAG,+BAAgCC,CAAS,EAAG,GAAIL,CAAQ,CAAA,CAC9G,CAEA,SAAS,WAAW,CAAE,YAAW,GAAGA,GAA0B,CAC5D,MAAO,kBAAC,MAAD,CAAK,YAAU,cAAc,UAAWI,EAAG,oCAAqCC,CAAS,EAAG,GAAIL,CAAQ,CAAA,CACjH,CAEA,SAAS,aAAa,CAAE,YAAW,kBAAkB,GAAO,WAAU,GAAGA,GAA4B,CACnG,MACE,kBAAC,MAAD,CACE,YAAU,gBACV,UAAWI,EACT,6DACA,yDACAC,CACF,EACA,GAAIL,EAPN,SAAA,CASGU,EACAC,GACC,kBAACjB,EAAgB,MAAjB,CAAuB,QAAA,GACrB,SAAA,kBAACkB,EAAD,CAAQ,QAAQ,UAAU,SAAA,OAAa,CAAA,CAClB,CAAA,CAEtB,GAET,CAEA,SAAS,YAAY,CAAE,YAAW,GAAGZ,GAA2B,CAC9D,MACE,kBAACN,EAAgB,MAAjB,CACE,YAAU,eACV,UAAWU,EAAG,qCAAsCC,CAAS,EAC7D,GAAIL,CACL,CAAA,CAEL,CAEA,SAAS,kBAAkB,CAAE,YAAW,GAAGA,GAAiC,CAC1E,MACE,kBAACN,EAAgB,YAAjB,CACE,YAAU,qBACV,UAAWU,EACT,gCACA,uEACAC,CACF,EACA,GAAIL,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"dialog.js","names":["DialogPrimitive","resolveClassName","React","Dialog$1","dialogContentVariants","cva","DialogContext","props","contextValue","size","dismissible","disablePointerDismissal","eventDetails","onOpenChange","open","toAsChildRenderProps","asChild","children","cn","className","state","stopPropagationHandler","onClick","overlayProps","overlayRef","showCloseButton","Button","IconX"],"sources":["../../src/components/dialog.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Dialog as DialogPrimitive } from '@base-ui/react/dialog'\nimport { IconX } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { type AsChildPrimitiveProps, toAsChildRenderProps } from '../lib/as-child'\nimport { cn, stopPropagationHandler } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\nimport { Button } from './button'\n\nconst dialogContentVariants = cva(\n [\n 'bg-background ring-foreground/10 fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none',\n 'flex flex-col gap-4 rounded-xl p-4 text-sm ring-1 duration-100',\n 'max-w-[calc(100%-2rem)] max-h-[calc(100dvh-2rem)] overflow-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 ],\n {\n variants: {\n size: {\n sm: 'sm:max-w-sm',\n md: 'sm:max-w-md',\n lg: 'sm:max-w-lg',\n xl: 'sm:max-w-xl',\n '2xl': 'sm:max-w-2xl',\n '3xl': 'sm:max-w-3xl',\n full: 'w-screen h-screen max-w-none max-h-screen rounded-none sm:max-w-none'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n }\n)\n\ntype DialogSize = NonNullable<VariantProps<typeof dialogContentVariants>['size']>\ntype DialogContextValue = { size: DialogSize }\nconst DialogContext = React.createContext<DialogContextValue>({ size: 'md' })\n\nexport type DialogProps = React.ComponentProps<typeof DialogPrimitive.Root> & {\n /**\n * Dialog width. `full` fills the whole viewport.\n * @default 'md'\n */\n size?: DialogSize\n /**\n * When `false`, clicking outside and pressing Esc no longer close the dialog. The close button and `DialogClose` still work.\n * @default true\n */\n dismissible?: boolean\n}\nexport type DialogTriggerProps = AsChildPrimitiveProps<typeof DialogPrimitive.Trigger>\nexport type DialogPortalProps = React.ComponentProps<typeof DialogPrimitive.Portal>\nexport type DialogCloseProps = AsChildPrimitiveProps<typeof DialogPrimitive.Close>\nexport type DialogOverlayProps = AsChildPrimitiveProps<typeof DialogPrimitive.Backdrop>\nexport type DialogContentProps = AsChildPrimitiveProps<typeof DialogPrimitive.Popup> &\n Pick<DialogPortalProps, 'keepMounted'> & {\n /**\n * Shows the X button in the top-right corner.\n * @default true\n */\n showCloseButton?: boolean\n /** Ref to the overlay element rendered behind the dialog. */\n overlayRef?: React.Ref<HTMLDivElement>\n /** Props passed to the overlay rendered behind the dialog. */\n overlayProps?: DialogOverlayProps\n }\nexport type DialogHeaderProps = React.ComponentProps<'div'>\nexport type DialogBodyProps = React.ComponentProps<'div'>\nexport type DialogFooterProps = React.ComponentProps<'div'> & {\n /**\n * Adds an outline \"Close\" button after the footer actions.\n * @default false\n */\n showCloseButton?: boolean\n}\nexport type DialogTitleProps = AsChildPrimitiveProps<typeof DialogPrimitive.Title>\nexport type DialogDescriptionProps = AsChildPrimitiveProps<typeof DialogPrimitive.Description>\n\nfunction Dialog({ size = 'md', dismissible = true, disablePointerDismissal, onOpenChange, ...props }: DialogProps) {\n const contextValue = React.useMemo<DialogContextValue>(() => ({ size }), [size])\n\n return (\n <DialogContext.Provider value={contextValue}>\n <DialogPrimitive.Root\n data-slot=\"dialog\"\n disablePointerDismissal={!dismissible || disablePointerDismissal}\n onOpenChange={(open, eventDetails) => {\n if (!dismissible && eventDetails.reason === 'escape-key') {\n eventDetails.cancel()\n return\n }\n onOpenChange?.(open, eventDetails)\n }}\n {...props}\n />\n </DialogContext.Provider>\n )\n}\n\nfunction DialogTrigger({ asChild, children, ...props }: DialogTriggerProps) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} {...toAsChildRenderProps(asChild, children)} />\n}\n\nfunction DialogPortal({ ...props }: DialogPortalProps) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({ asChild, children, ...props }: DialogCloseProps) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} {...toAsChildRenderProps(asChild, children)} />\n}\n\nfunction DialogOverlay({ className, onClick, forceRender = true, asChild, children, ...props }: DialogOverlayProps) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n forceRender={forceRender}\n className={(state) =>\n cn(\n 'bg-black/10 fixed inset-0 isolate z-50',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0',\n 'duration-100 supports-backdrop-filter:backdrop-blur-xs',\n resolveClassName(className, state)\n )\n }\n onClick={stopPropagationHandler(onClick)}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n overlayRef,\n overlayProps,\n keepMounted,\n asChild,\n ...props\n}: DialogContentProps) {\n const { size } = React.useContext(DialogContext)\n\n return (\n <DialogPortal keepMounted={keepMounted}>\n <DialogOverlay {...overlayProps} ref={overlayRef ?? overlayProps?.ref} />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={(state) => cn(dialogContentVariants({ size }), resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n // React events bubble through the fiber tree, not the DOM, so a portaled Popup still\n // reaches any ancestor's onClick/onSubmit even though it renders outside it in the DOM.\n onClick={stopPropagationHandler(props.onClick)}\n onSubmit={stopPropagationHandler(props.onSubmit)}\n >\n {!asChild && children}\n {showCloseButton && !asChild && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={<Button variant=\"ghost\" className=\"absolute top-2 right-2\" size=\"icon-sm\" />}\n >\n <IconX />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: DialogHeaderProps) {\n return <div data-slot=\"dialog-header\" className={cn('gap-2 flex flex-col shrink-0', className)} {...props} />\n}\n\nfunction DialogBody({ className, ...props }: DialogBodyProps) {\n return <div data-slot=\"dialog-body\" className={cn('-mx-4 px-4 flex-1 overflow-y-auto', className)} {...props} />\n}\n\nfunction DialogFooter({ className, showCloseButton = false, children, ...props }: DialogFooterProps) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 shrink-0',\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && <DialogPrimitive.Close render={<Button variant=\"outline\" />}>Close</DialogPrimitive.Close>}\n </div>\n )\n}\n\nfunction DialogTitle({ className, asChild, children, ...props }: DialogTitleProps) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={(state) => cn('text-base leading-none font-medium', resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nfunction DialogDescription({ className, asChild, children, ...props }: DialogDescriptionProps) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={(state) =>\n cn(\n 'text-muted-foreground text-sm',\n '*:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nexport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger\n}\n"],"mappings":"kdAWA,MAAMI,EAAwBC,EAC5B,CACE,qHACA,iEACA,oEACA,sIACF,EACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,MAAO,eACP,MAAO,eACP,KAAM,sEACR,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CACF,EAIMC,EAAgBJ,EAAM,cAAkC,CAAE,KAAM,IAAK,CAAC,EA0C5E,SAAS,OAAO,C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B,CAAuB,OAAQ,kBAAC0B,EAAD,CAAQ,QAAQ,SAAW,CAAA,EAAG,SAAA,OAA4B,CAAA,CAC1G,GAET,CAEA,SAAS,YAAY,CAAE,YAAW,UAAS,WAAU,GAAGnB,GAA2B,CACjF,MACE,kBAACP,EAAgB,MAAjB,CACE,YAAU,eACV,UAAY,GAAUkB,EAAG,qCAAsCjB,EAAiBkB,EAAWC,CAAK,CAAC,EACjG,GAAIb,EACJ,GAAIQ,EAAqBC,EAASC,CAAQ,CAC3C,CAAA,CAEL,CAEA,SAAS,kBAAkB,CAAE,YAAW,UAAS,WAAU,GAAGV,GAAiC,CAC7F,MACE,kBAACP,EAAgB,YAAjB,CACE,YAAU,qBACV,UAAY,GACVkB,EACE,gCACA,uEACAjB,EAAiBkB,EAAWC,CAAK,CACnC,EAEF,GAAIb,EACJ,GAAIQ,EAAqBC,EAASC,CAAQ,CAC3C,CAAA,CAEL"}
@@ -0,0 +1,7 @@
1
+ import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
+ import { DirectionProvider, TextDirection, useDirection } from "@base-ui/react/direction-provider";
3
+ //#region src/components/direction.d.ts
4
+ export type DirectionProviderProps = DirectionProvider.Props;
5
+ //#endregion
6
+ export { DirectionProvider, type TextDirection, useDirection };
7
+ //# sourceMappingURL=direction.d.ts.map
@@ -0,0 +1 @@
1
+ export{DirectionProvider,useDirection}from"@base-ui/react/direction-provider";
@@ -3,8 +3,20 @@ import { PieChartProps } from "./pie-chart.js";
3
3
  import * as React from "react";
4
4
  //#region src/components/donut-chart.d.ts
5
5
  export type DonutChartProps = PieChartProps & {
6
+ /**
7
+ * Ring width as a fraction of the radius.
8
+ * @default 0.35
9
+ */
6
10
  thickness?: number;
11
+ /**
12
+ * Shows the sum of the values in the center.
13
+ * @default false
14
+ */
7
15
  withTotal?: boolean;
16
+ /**
17
+ * Label below the total.
18
+ * @default 'Total'
19
+ */
8
20
  totalLabel?: React.ReactNode;
9
21
  };
10
22
  declare function DonutChart({ className, thickness, outerRadius, withTotal, totalLabel, data, ...props }: DonutChartProps): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{PieChartBase as t}from"./pie-chart.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import*as i from"react";import{Label as a}from"recharts";function DonutChart({className:o,thickness:s=.35,outerRadius:c=`80%`,withTotal:l=!1,totalLabel:u=`Total`,data:d,...f}){let p=i.useMemo(()=>{let e=Math.min(Math.max(1-s,0),1);if(typeof c==`number`)return c*e;let t=/^(\d+(?:\.\d+)?)%$/.exec(c);return t?`${Number(t[1])*e}%`:c},[c,s]),m=i.useMemo(()=>d.reduce((e,t)=>e+t.value,0),[d]);return/* @__PURE__ */ n(t,{dataSlot:`donut-chart`,className:e(o),data:d,outerRadius:c,innerRadius:p,centerSlot:l?/* @__PURE__ */ n(a,{position:`center`,content:({viewBox:e})=>!e||!(`cx`in e)||!(`cy`in e)?null:/* @__PURE__ */ r(`text`,{x:e.cx,y:e.cy,textAnchor:`middle`,dominantBaseline:`middle`,children:[/* @__PURE__ */ n(`tspan`,{x:e.cx,y:e.cy,className:`fill-foreground font-medium text-2xl tabular-nums`,children:m.toLocaleString()}),/* @__PURE__ */ n(`tspan`,{x:e.cx,y:(e.cy??0)+20,className:`fill-muted-foreground text-xs`,children:u})]})}):null,...f})}export{DonutChart};
1
+ import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{PieChartBase as t}from"./pie-chart.js";import*as n from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{Label as a}from"recharts";function DonutChart({className:o,thickness:s=.35,outerRadius:c=`80%`,withTotal:l=!1,totalLabel:u=`Total`,data:d,...f}){let p=n.useMemo(()=>{let e=Math.min(Math.max(1-s,0),1);if(typeof c==`number`)return c*e;let t=/^(\d+(?:\.\d+)?)%$/.exec(c);return t?`${Number(t[1])*e}%`:c},[c,s]),m=n.useMemo(()=>d.reduce((e,t)=>e+t.value,0),[d]);return/* @__PURE__ */ r(t,{dataSlot:`donut-chart`,className:e(o),data:d,outerRadius:c,innerRadius:p,centerSlot:l?/* @__PURE__ */ r(a,{content:({viewBox:e})=>!e||!(`cx`in e)||!(`cy`in e)?null:/* @__PURE__ */ i(`text`,{x:e.cx,y:e.cy,textAnchor:`middle`,dominantBaseline:`middle`,children:[/* @__PURE__ */ r(`tspan`,{x:e.cx,y:e.cy,className:`fill-foreground font-medium text-2xl tabular-nums`,children:m.toLocaleString()}),/* @__PURE__ */ r(`tspan`,{x:e.cx,y:(e.cy??0)+20,className:`fill-muted-foreground text-xs`,children:u})]})}):null,...f})}export{DonutChart};
2
2
  //# sourceMappingURL=donut-chart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"donut-chart.js","names":["React","props","innerRadius","ratio","thickness","outerRadius","match","total","data","sum","item","PieChartBase","cn","className","withTotal","Label","viewBox","totalLabel"],"sources":["../../src/components/donut-chart.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Label } from 'recharts'\n\nimport { cn } from '../lib/utils'\nimport { PieChartBase, type PieChartProps } from './pie-chart'\n\nexport type DonutChartProps = PieChartProps & {\n thickness?: number\n withTotal?: boolean\n totalLabel?: React.ReactNode\n}\n\nfunction DonutChart({\n className,\n thickness = 0.35,\n outerRadius = '80%',\n withTotal = false,\n totalLabel = 'Total',\n data,\n ...props\n}: DonutChartProps) {\n const innerRadius = React.useMemo(() => {\n const ratio = Math.min(Math.max(1 - thickness, 0), 1)\n if (typeof outerRadius === 'number') {\n return outerRadius * ratio\n }\n const match = /^(\\d+(?:\\.\\d+)?)%$/.exec(outerRadius)\n if (match) {\n return `${Number(match[1]) * ratio}%`\n }\n return outerRadius\n }, [outerRadius, thickness])\n\n const total = React.useMemo(() => data.reduce((sum, item) => sum + item.value, 0), [data])\n\n return (\n <PieChartBase\n dataSlot=\"donut-chart\"\n className={cn(className)}\n data={data}\n outerRadius={outerRadius}\n innerRadius={innerRadius}\n centerSlot={\n withTotal ? (\n <Label\n position=\"center\"\n content={({ viewBox }) => {\n if (!viewBox || !('cx' in viewBox) || !('cy' in viewBox)) {\n return null\n }\n return (\n <text x={viewBox.cx} y={viewBox.cy} textAnchor=\"middle\" dominantBaseline=\"middle\">\n <tspan x={viewBox.cx} y={viewBox.cy} className=\"fill-foreground font-medium text-2xl tabular-nums\">\n {total.toLocaleString()}\n </tspan>\n <tspan x={viewBox.cx} y={(viewBox.cy ?? 0) + 20} className=\"fill-muted-foreground text-xs\">\n {totalLabel}\n </tspan>\n </text>\n )\n }}\n />\n ) : null\n }\n {...props}\n />\n )\n}\n\nexport { DonutChart }\n"],"mappings":"sOAaA,SAAS,WAAW,CAClB,YACA,YAAY,IACZ,cAAc,MACd,YAAY,GACZ,aAAa,QACb,OACA,GAAGC,GACe,CAClB,IAAMC,EAAcF,EAAM,YAAc,CACtC,IAAMG,EAAQ,KAAK,IAAI,KAAK,IAAI,EAAIC,EAAW,CAAC,EAAG,CAAC,EACpD,GAAI,OAAOC,GAAgB,SACzB,OAAOA,EAAcF,EAEvB,IAAMG,EAAQ,qBAAqB,KAAKD,CAAW,EAInD,OAHIC,EACK,GAAG,OAAOA,EAAM,EAAE,EAAIH,EAAM,GAE9BE,CACT,EAAG,CAACA,EAAaD,CAAS,CAAC,EAErBG,EAAQP,EAAM,YAAcQ,EAAK,QAAQ,EAAK,IAASC,EAAMC,EAAK,MAAO,CAAC,EAAG,CAACF,CAAI,CAAC,EAEzF,MACE,kBAACG,EAAD,CACE,SAAS,cACT,UAAWC,EAAGC,CAAS,EACjB,OACO,cACA,cACb,WACEC,EACE,kBAACC,EAAD,CACE,SAAS,SACT,SAAU,CAAE,aACN,CAACC,GAAW,EAAE,OAAQA,IAAY,EAAE,OAAQA,GACvC,KAGP,kBAAC,OAAD,CAAM,EAAGA,EAAQ,GAAI,EAAGA,EAAQ,GAAI,WAAW,SAAS,iBAAiB,SAAzE,SAAA,CACE,kBAAC,QAAD,CAAO,EAAGA,EAAQ,GAAI,EAAGA,EAAQ,GAAI,UAAU,oDAC5C,SAAAT,EAAM,eAAe,CACjB,CAAA,EACP,kBAAC,QAAD,CAAO,EAAGS,EAAQ,GAAI,GAAIA,EAAQ,IAAM,GAAK,GAAI,UAAU,gCACxD,SAAAC,CACI,CAAA,CACH,GAGX,CAAA,EACC,KAEN,GAAIhB,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"donut-chart.js","names":["React","props","innerRadius","ratio","thickness","outerRadius","match","total","data","sum","item","PieChartBase","cn","className","withTotal","Label","viewBox","totalLabel"],"sources":["../../src/components/donut-chart.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Label } from 'recharts'\n\nimport { cn } from '../lib/utils'\nimport { PieChartBase, type PieChartProps } from './pie-chart'\n\nexport type DonutChartProps = PieChartProps & {\n /**\n * Ring width as a fraction of the radius.\n * @default 0.35\n */\n thickness?: number\n /**\n * Shows the sum of the values in the center.\n * @default false\n */\n withTotal?: boolean\n /**\n * Label below the total.\n * @default 'Total'\n */\n totalLabel?: React.ReactNode\n}\n\nfunction DonutChart({\n className,\n thickness = 0.35,\n outerRadius = '80%',\n withTotal = false,\n totalLabel = 'Total',\n data,\n ...props\n}: DonutChartProps) {\n const innerRadius = React.useMemo(() => {\n const ratio = Math.min(Math.max(1 - thickness, 0), 1)\n if (typeof outerRadius === 'number') {\n return outerRadius * ratio\n }\n const match = /^(\\d+(?:\\.\\d+)?)%$/.exec(outerRadius)\n if (match) {\n return `${Number(match[1]) * ratio}%`\n }\n return outerRadius\n }, [outerRadius, thickness])\n\n const total = React.useMemo(() => data.reduce((sum, item) => sum + item.value, 0), [data])\n\n return (\n <PieChartBase\n dataSlot=\"donut-chart\"\n className={cn(className)}\n data={data}\n outerRadius={outerRadius}\n innerRadius={innerRadius}\n centerSlot={\n withTotal ? (\n <Label\n content={({ viewBox }) => {\n if (!viewBox || !('cx' in viewBox) || !('cy' in viewBox)) {\n return null\n }\n return (\n <text x={viewBox.cx} y={viewBox.cy} textAnchor=\"middle\" dominantBaseline=\"middle\">\n <tspan x={viewBox.cx} y={viewBox.cy} className=\"fill-foreground font-medium text-2xl tabular-nums\">\n {total.toLocaleString()}\n </tspan>\n <tspan x={viewBox.cx} y={(viewBox.cy ?? 0) + 20} className=\"fill-muted-foreground text-xs\">\n {totalLabel}\n </tspan>\n </text>\n )\n }}\n />\n ) : null\n }\n {...props}\n />\n )\n}\n\nexport { DonutChart }\n"],"mappings":"sOAyBA,SAAS,WAAW,CAClB,YACA,YAAY,IACZ,cAAc,MACd,YAAY,GACZ,aAAa,QACb,OACA,GAAGC,GACe,CAClB,IAAMC,EAAcF,EAAM,YAAc,CACtC,IAAMG,EAAQ,KAAK,IAAI,KAAK,IAAI,EAAIC,EAAW,CAAC,EAAG,CAAC,EACpD,GAAI,OAAOC,GAAgB,SACzB,OAAOA,EAAcF,EAEvB,IAAMG,EAAQ,qBAAqB,KAAKD,CAAW,EAInD,OAHIC,EACK,GAAG,OAAOA,EAAM,EAAE,EAAIH,EAAM,GAE9BE,CACT,EAAG,CAACA,EAAaD,CAAS,CAAC,EAErBG,EAAQP,EAAM,YAAcQ,EAAK,QAAQ,EAAK,IAASC,EAAMC,EAAK,MAAO,CAAC,EAAG,CAACF,CAAI,CAAC,EAEzF,MACE,kBAACG,EAAD,CACE,SAAS,cACT,UAAWC,EAAGC,CAAS,EACjB,OACO,cACA,cACb,WACEC,EACE,kBAACC,EAAD,CACE,SAAU,CAAE,aACN,CAACC,GAAW,EAAE,OAAQA,IAAY,EAAE,OAAQA,GACvC,KAGP,kBAAC,OAAD,CAAM,EAAGA,EAAQ,GAAI,EAAGA,EAAQ,GAAI,WAAW,SAAS,iBAAiB,SAAzE,SAAA,CACE,kBAAC,QAAD,CAAO,EAAGA,EAAQ,GAAI,EAAGA,EAAQ,GAAI,UAAU,oDAC5C,SAAAT,EAAM,eAAe,CACjB,CAAA,EACP,kBAAC,QAAD,CAAO,EAAGS,EAAQ,GAAI,GAAIA,EAAQ,IAAM,GAAK,GAAI,UAAU,gCACxD,SAAAC,CACI,CAAA,CACH,GAGX,CAAA,EACC,KAEN,GAAIhB,CACL,CAAA,CAEL"}
@@ -1,7 +1,8 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- import { Dialog } from "radix-ui";
3
- import { VariantProps } from "class-variance-authority";
2
+ import { t as AsChildPrimitiveProps } from "../as-child-Dxg3Xo1G.js";
4
3
  import * as React from "react";
4
+ import { VariantProps } from "class-variance-authority";
5
+ import { Dialog } from "@base-ui/react/dialog";
5
6
  //#region src/components/drawer.d.ts
6
7
  declare const drawerContentVariants: (props?: ({
7
8
  direction?: "bottom" | "left" | "right" | "top" | null | undefined;
@@ -10,34 +11,51 @@ declare const drawerContentVariants: (props?: ({
10
11
  type DrawerDirection = NonNullable<VariantProps<typeof drawerContentVariants>['direction']>;
11
12
  type DrawerSize = NonNullable<VariantProps<typeof drawerContentVariants>['size']>;
12
13
  export type DrawerProps = React.ComponentProps<typeof Dialog.Root> & {
14
+ /**
15
+ * Panel width for `left`/`right`, or height for `top`/`bottom`. `full` fills the whole viewport.
16
+ * @default 'md'
17
+ */
13
18
  size?: DrawerSize;
19
+ /**
20
+ * Edge the drawer slides in from.
21
+ * @default 'right'
22
+ */
14
23
  direction?: DrawerDirection;
24
+ /**
25
+ * When `false`, clicking outside and pressing Esc no longer close the drawer. The close button and `DrawerClose` still work.
26
+ * @default true
27
+ */
15
28
  dismissible?: boolean;
16
29
  };
17
- export type DrawerTriggerProps = React.ComponentProps<typeof Dialog.Trigger>;
30
+ export type DrawerTriggerProps = AsChildPrimitiveProps<typeof Dialog.Trigger>;
18
31
  export type DrawerPortalProps = React.ComponentProps<typeof Dialog.Portal>;
19
- export type DrawerCloseProps = React.ComponentProps<typeof Dialog.Close>;
20
- export type DrawerOverlayProps = React.ComponentProps<typeof Dialog.Overlay>;
21
- export type DrawerContentProps = React.ComponentProps<typeof Dialog.Content> & {
32
+ export type DrawerCloseProps = AsChildPrimitiveProps<typeof Dialog.Close>;
33
+ export type DrawerOverlayProps = AsChildPrimitiveProps<typeof Dialog.Backdrop>;
34
+ export type DrawerContentProps = AsChildPrimitiveProps<typeof Dialog.Popup> & Pick<DrawerPortalProps, 'keepMounted'> & {
35
+ /**
36
+ * Shows the X button in the top-right corner.
37
+ * @default true
38
+ */
22
39
  showCloseButton?: boolean;
40
+ /** Props passed to the overlay rendered behind the drawer. */
23
41
  overlayProps?: DrawerOverlayProps;
24
42
  };
25
43
  export type DrawerHeaderProps = React.ComponentProps<'div'>;
26
44
  export type DrawerBodyProps = React.ComponentProps<'div'>;
27
45
  export type DrawerFooterProps = React.ComponentProps<'div'>;
28
- export type DrawerTitleProps = React.ComponentProps<typeof Dialog.Title>;
29
- export type DrawerDescriptionProps = React.ComponentProps<typeof Dialog.Description>;
30
- declare function Drawer({ size, direction, dismissible, ...props }: DrawerProps): React.JSX.Element;
31
- declare function DrawerTrigger({ ...props }: DrawerTriggerProps): React.JSX.Element;
46
+ export type DrawerTitleProps = AsChildPrimitiveProps<typeof Dialog.Title>;
47
+ export type DrawerDescriptionProps = AsChildPrimitiveProps<typeof Dialog.Description>;
48
+ declare function Drawer({ size, direction, dismissible, disablePointerDismissal, onOpenChange, ...props }: DrawerProps): React.JSX.Element;
49
+ declare function DrawerTrigger({ asChild, children, ...props }: DrawerTriggerProps): React.JSX.Element;
32
50
  declare function DrawerPortal({ ...props }: DrawerPortalProps): React.JSX.Element;
33
- declare function DrawerClose({ ...props }: DrawerCloseProps): React.JSX.Element;
34
- declare function DrawerOverlay({ className, onClick, ...props }: DrawerOverlayProps): React.JSX.Element;
35
- declare function DrawerContent({ className, children, showCloseButton, overlayProps, ...props }: DrawerContentProps): React.JSX.Element;
51
+ declare function DrawerClose({ asChild, children, ...props }: DrawerCloseProps): React.JSX.Element;
52
+ declare function DrawerOverlay({ className, onClick, forceRender, asChild, children, ...props }: DrawerOverlayProps): React.JSX.Element;
53
+ declare function DrawerContent({ className, children, showCloseButton, overlayProps, keepMounted, asChild, ...props }: DrawerContentProps): React.JSX.Element;
36
54
  declare function DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element;
37
55
  declare function DrawerBody({ className, ...props }: DrawerBodyProps): React.JSX.Element;
38
56
  declare function DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element;
39
- declare function DrawerTitle({ className, ...props }: DrawerTitleProps): React.JSX.Element;
40
- declare function DrawerDescription({ className, ...props }: DrawerDescriptionProps): React.JSX.Element;
57
+ declare function DrawerTitle({ className, asChild, children, ...props }: DrawerTitleProps): React.JSX.Element;
58
+ declare function DrawerDescription({ className, asChild, children, ...props }: DrawerDescriptionProps): React.JSX.Element;
41
59
  //#endregion
42
60
  export { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
43
61
  //# sourceMappingURL=drawer.d.ts.map
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.js";import{cn as e,stopPropagationHandler as t}from"../lib/utils.js";import{Button as n}from"./button.js";import{IconX as r}from"@tabler/icons-react";import{Dialog 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*as c from"react";const l=s([`bg-background flex h-auto flex-col text-sm fixed z-50 outline-none duration-200`,`data-open:animate-in data-closed:animate-out`],{variants:{direction:{top:`inset-x-0 top-0 rounded-b-xl border-b data-closed:slide-out-to-top data-open:slide-in-from-top-10`,right:`inset-y-0 right-0 rounded-l-xl border-l data-closed:slide-out-to-right data-open:slide-in-from-right-10`,bottom:`inset-x-0 bottom-0 rounded-t-xl border-t data-closed:slide-out-to-bottom data-open:slide-in-from-bottom-10`,left:`inset-y-0 left-0 rounded-r-xl border-r data-closed:slide-out-to-left data-open:slide-in-from-left-10`},size:{sm:``,md:``,lg:``,xl:``,"2xl":``,"3xl":``,full:``}},compoundVariants:[{direction:[`left`,`right`],size:`sm`,className:`w-3/4 sm:max-w-sm`},{direction:[`left`,`right`],size:`md`,className:`w-4/5 sm:max-w-md`},{direction:[`left`,`right`],size:`lg`,className:`w-[90%] sm:max-w-lg`},{direction:[`left`,`right`],size:`xl`,className:`w-[90%] sm:max-w-195`},{direction:[`left`,`right`],size:`2xl`,className:`w-[90%] sm:max-w-240`},{direction:[`left`,`right`],size:`3xl`,className:`w-[90%] sm:max-w-300`},{direction:[`left`,`right`],size:`full`,className:`w-full`},{direction:`top`,size:`sm`,className:`mb-24 h-full max-h-96`},{direction:`top`,size:`md`,className:`mb-20 h-full max-h-112`},{direction:`top`,size:`lg`,className:`mb-12 h-full max-h-128`},{direction:`top`,size:`xl`,className:`mb-12 h-full max-h-195`},{direction:`top`,size:`2xl`,className:`mb-12 h-full max-h-240`},{direction:`top`,size:`3xl`,className:`mb-12 h-full max-h-300`},{direction:`top`,size:`full`,className:`mb-0 h-full`},{direction:`bottom`,size:`sm`,className:`mt-24 h-full max-h-96`},{direction:`bottom`,size:`md`,className:`mt-20 h-full max-h-112`},{direction:`bottom`,size:`lg`,className:`mt-12 h-full max-h-128`},{direction:`bottom`,size:`xl`,className:`mt-12 h-full max-h-195`},{direction:`bottom`,size:`2xl`,className:`mt-12 h-full max-h-240`},{direction:`bottom`,size:`3xl`,className:`mt-12 h-full max-h-300`},{direction:`bottom`,size:`full`,className:`mt-0 h-full`}],defaultVariants:{direction:`right`,size:`md`}}),u=c.createContext({size:`md`,direction:`right`,dismissible:!0});function Drawer({size:e=`md`,direction:t=`right`,dismissible:n=!0,...r}){let o=c.useMemo(()=>({size:e,direction:t,dismissible:n}),[e,t,n]);return/* @__PURE__ */ a(u.Provider,{value:o,children:/* @__PURE__ */ a(i.Root,{"data-slot":`drawer`,...r})})}function DrawerTrigger({...e}){return/* @__PURE__ */ a(i.Trigger,{"data-slot":`drawer-trigger`,...e})}function DrawerPortal({...e}){return/* @__PURE__ */ a(i.Portal,{"data-slot":`drawer-portal`,...e})}function DrawerClose({...e}){return/* @__PURE__ */ a(i.Close,{"data-slot":`drawer-close`,...e})}function DrawerOverlay({className:n,onClick:r,...o}){return/* @__PURE__ */ a(i.Overlay,{"data-slot":`drawer-overlay`,className:e(`bg-black/10 fixed inset-0 z-50`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0`,`supports-backdrop-filter:backdrop-blur-xs`,n),onClick:t(r),...o})}function DrawerContent({className:s,children:d,showCloseButton:f=!0,overlayProps:p,...m}){let{size:h,direction:g,dismissible:_}=c.useContext(u);return/* @__PURE__ */ o(DrawerPortal,{children:[/* @__PURE__ */ a(DrawerOverlay,{...p}),/* @__PURE__ */ o(i.Content,{"data-slot":`drawer-content`,className:e(l({size:h,direction:g}),s),...m,onEscapeKeyDown:e=>{_||e.preventDefault(),m.onEscapeKeyDown?.(e)},onInteractOutside:e=>{_||e.preventDefault(),m.onInteractOutside?.(e)},onClick:t(m.onClick),onSubmit:t(m.onSubmit),children:[d,f&&/* @__PURE__ */ a(DrawerClose,{asChild:!0,children:/* @__PURE__ */ o(n,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[/* @__PURE__ */ a(r,{}),/* @__PURE__ */ a(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function DrawerHeader({className:t,...n}){let{direction:r}=c.useContext(u);return/* @__PURE__ */ a(`div`,{"data-slot":`drawer-header`,className:e(`p-4 flex flex-col gap-0.5 md:gap-0.5`,(r===`top`||r===`bottom`)&&`text-center md:text-left`,t),...n})}function DrawerBody({className:t,...n}){return/* @__PURE__ */ a(`div`,{"data-slot":`drawer-body`,className:e(`px-4 pb-4 flex-1 min-h-0 overflow-y-auto`,t),...n})}function DrawerFooter({className:t,...n}){return/* @__PURE__ */ a(`div`,{"data-slot":`drawer-footer`,className:e(`gap-2 p-4 mt-auto flex flex-col sm:flex-row sm:justify-end`,t),...n})}function DrawerTitle({className:t,...n}){return/* @__PURE__ */ a(i.Title,{"data-slot":`drawer-title`,className:e(`text-foreground text-base font-medium`,t),...n})}function DrawerDescription({className:t,...n}){return/* @__PURE__ */ a(i.Description,{"data-slot":`drawer-description`,className:e(`text-muted-foreground text-sm`,t),...n})}export{Drawer,DrawerBody,DrawerClose,DrawerContent,DrawerDescription,DrawerFooter,DrawerHeader,DrawerOverlay,DrawerPortal,DrawerTitle,DrawerTrigger};
1
+ import"../rolldown-runtime-BhWHdk3m.js";import{toAsChildRenderProps as e}from"../lib/as-child.js";import{cn as t,stopPropagationHandler as n}from"../lib/utils.js";import{t as r}from"../resolve-class-name-BurP8ngI.js";import{Button as i}from"./button.js";import{IconX as a}from"@tabler/icons-react";import*as o from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{cva as l}from"class-variance-authority";import{Dialog as u}from"@base-ui/react/dialog";const d=l([`bg-background flex h-auto flex-col text-sm fixed z-50 outline-none duration-200`,`data-open:animate-in data-closed:animate-out`],{variants:{direction:{top:`inset-x-0 top-0 rounded-b-xl border-b data-closed:slide-out-to-top data-open:slide-in-from-top-10`,right:`inset-y-0 right-0 rounded-l-xl border-l data-closed:slide-out-to-right data-open:slide-in-from-right-10`,bottom:`inset-x-0 bottom-0 rounded-t-xl border-t data-closed:slide-out-to-bottom data-open:slide-in-from-bottom-10`,left:`inset-y-0 left-0 rounded-r-xl border-r data-closed:slide-out-to-left data-open:slide-in-from-left-10`},size:{sm:``,md:``,lg:``,xl:``,"2xl":``,"3xl":``,full:``}},compoundVariants:[{direction:[`left`,`right`],size:`sm`,className:`w-3/4 sm:max-w-sm`},{direction:[`left`,`right`],size:`md`,className:`w-4/5 sm:max-w-md`},{direction:[`left`,`right`],size:`lg`,className:`w-[90%] sm:max-w-lg`},{direction:[`left`,`right`],size:`xl`,className:`w-[90%] sm:max-w-195`},{direction:[`left`,`right`],size:`2xl`,className:`w-[90%] sm:max-w-240`},{direction:[`left`,`right`],size:`3xl`,className:`w-[90%] sm:max-w-300`},{direction:[`left`,`right`],size:`full`,className:`w-full`},{direction:`top`,size:`sm`,className:`mb-24 h-full max-h-96`},{direction:`top`,size:`md`,className:`mb-20 h-full max-h-112`},{direction:`top`,size:`lg`,className:`mb-12 h-full max-h-128`},{direction:`top`,size:`xl`,className:`mb-12 h-full max-h-195`},{direction:`top`,size:`2xl`,className:`mb-12 h-full max-h-240`},{direction:`top`,size:`3xl`,className:`mb-12 h-full max-h-300`},{direction:`top`,size:`full`,className:`mb-0 h-full`},{direction:`bottom`,size:`sm`,className:`mt-24 h-full max-h-96`},{direction:`bottom`,size:`md`,className:`mt-20 h-full max-h-112`},{direction:`bottom`,size:`lg`,className:`mt-12 h-full max-h-128`},{direction:`bottom`,size:`xl`,className:`mt-12 h-full max-h-195`},{direction:`bottom`,size:`2xl`,className:`mt-12 h-full max-h-240`},{direction:`bottom`,size:`3xl`,className:`mt-12 h-full max-h-300`},{direction:`bottom`,size:`full`,className:`mt-0 h-full`}],defaultVariants:{direction:`right`,size:`md`}}),f=o.createContext({size:`md`,direction:`right`});function Drawer({size:e=`md`,direction:t=`right`,dismissible:n=!0,disablePointerDismissal:r,onOpenChange:i,...a}){let c=o.useMemo(()=>({size:e,direction:t}),[e,t]);return/* @__PURE__ */ s(f.Provider,{value:c,children:/* @__PURE__ */ s(u.Root,{"data-slot":`drawer`,disablePointerDismissal:!n||r,onOpenChange:(e,t)=>{!n&&t.reason===`escape-key`?t.cancel():i?.(e,t)},...a})})}function DrawerTrigger({asChild:t,children:n,...r}){return/* @__PURE__ */ s(u.Trigger,{"data-slot":`drawer-trigger`,...r,...e(t,n)})}function DrawerPortal({...e}){return/* @__PURE__ */ s(u.Portal,{"data-slot":`drawer-portal`,...e})}function DrawerClose({asChild:t,children:n,...r}){return/* @__PURE__ */ s(u.Close,{"data-slot":`drawer-close`,...r,...e(t,n)})}function DrawerOverlay({className:i,onClick:a,forceRender:o=!0,asChild:c,children:l,...d}){return/* @__PURE__ */ s(u.Backdrop,{"data-slot":`drawer-overlay`,forceRender:o,className:e=>t(`bg-black/10 fixed inset-0 z-50 duration-200`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0`,`supports-backdrop-filter:backdrop-blur-xs`,r(i,e)),onClick:n(a),...d,...e(c,l)})}function DrawerContent({className:l,children:p,showCloseButton:m=!0,overlayProps:h,keepMounted:g,asChild:_,...v}){let{size:y,direction:b}=o.useContext(f);return/* @__PURE__ */ c(DrawerPortal,{keepMounted:g,children:[/* @__PURE__ */ s(DrawerOverlay,{...h}),/* @__PURE__ */ c(u.Popup,{"data-slot":`drawer-content`,className:e=>t(d({size:y,direction:b}),r(l,e)),...v,...e(_,p),onClick:n(v.onClick),onSubmit:n(v.onSubmit),children:[!_&&p,m&&!_&&/* @__PURE__ */ c(u.Close,{"data-slot":`drawer-close`,render:/* @__PURE__ */ s(i,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`}),children:[/* @__PURE__ */ s(a,{}),/* @__PURE__ */ s(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function DrawerHeader({className:e,...n}){let{direction:r}=o.useContext(f);return/* @__PURE__ */ s(`div`,{"data-slot":`drawer-header`,className:t(`p-4 flex flex-col gap-0.5 md:gap-0.5`,(r===`top`||r===`bottom`)&&`text-center md:text-left`,e),...n})}function DrawerBody({className:e,...n}){return/* @__PURE__ */ s(`div`,{"data-slot":`drawer-body`,className:t(`px-4 pb-4 flex-1 min-h-0 overflow-y-auto`,e),...n})}function DrawerFooter({className:e,...n}){return/* @__PURE__ */ s(`div`,{"data-slot":`drawer-footer`,className:t(`gap-2 p-4 mt-auto flex flex-col sm:flex-row sm:justify-end`,e),...n})}function DrawerTitle({className:n,asChild:i,children:a,...o}){return/* @__PURE__ */ s(u.Title,{"data-slot":`drawer-title`,className:e=>t(`text-foreground text-base font-medium`,r(n,e)),...o,...e(i,a)})}function DrawerDescription({className:n,asChild:i,children:a,...o}){return/* @__PURE__ */ s(u.Description,{"data-slot":`drawer-description`,className:e=>t(`text-muted-foreground text-sm`,r(n,e)),...o,...e(i,a)})}export{Drawer,DrawerBody,DrawerClose,DrawerContent,DrawerDescription,DrawerFooter,DrawerHeader,DrawerOverlay,DrawerPortal,DrawerTitle,DrawerTrigger};
2
2
  //# sourceMappingURL=drawer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.js","names":["DrawerPrimitive","React","drawerContentVariants","cva","DrawerContext","props","contextValue","size","direction","dismissible","Dialog","cn","className","stopPropagationHandler","onClick","overlayProps","event","children","showCloseButton","Button","IconX"],"sources":["../../src/components/drawer.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { IconX } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Dialog as DrawerPrimitive } from 'radix-ui'\n\nimport { cn, stopPropagationHandler } from '../lib/utils'\nimport { Button } from './button'\n\nconst drawerContentVariants = cva(\n [\n 'bg-background flex h-auto flex-col text-sm fixed z-50 outline-none duration-200',\n 'data-open:animate-in data-closed:animate-out'\n ],\n {\n variants: {\n direction: {\n top: 'inset-x-0 top-0 rounded-b-xl border-b data-closed:slide-out-to-top data-open:slide-in-from-top-10',\n right:\n 'inset-y-0 right-0 rounded-l-xl border-l data-closed:slide-out-to-right data-open:slide-in-from-right-10',\n bottom:\n 'inset-x-0 bottom-0 rounded-t-xl border-t data-closed:slide-out-to-bottom data-open:slide-in-from-bottom-10',\n left: 'inset-y-0 left-0 rounded-r-xl border-r data-closed:slide-out-to-left data-open:slide-in-from-left-10'\n },\n size: {\n sm: '',\n md: '',\n lg: '',\n xl: '',\n '2xl': '',\n '3xl': '',\n full: ''\n }\n },\n compoundVariants: [\n { direction: ['left', 'right'], size: 'sm', className: 'w-3/4 sm:max-w-sm' },\n { direction: ['left', 'right'], size: 'md', className: 'w-4/5 sm:max-w-md' },\n { direction: ['left', 'right'], size: 'lg', className: 'w-[90%] sm:max-w-lg' },\n { direction: ['left', 'right'], size: 'xl', className: 'w-[90%] sm:max-w-195' },\n { direction: ['left', 'right'], size: '2xl', className: 'w-[90%] sm:max-w-240' },\n { direction: ['left', 'right'], size: '3xl', className: 'w-[90%] sm:max-w-300' },\n { direction: ['left', 'right'], size: 'full', className: 'w-full' },\n { direction: 'top', size: 'sm', className: 'mb-24 h-full max-h-96' },\n { direction: 'top', size: 'md', className: 'mb-20 h-full max-h-112' },\n { direction: 'top', size: 'lg', className: 'mb-12 h-full max-h-128' },\n { direction: 'top', size: 'xl', className: 'mb-12 h-full max-h-195' },\n { direction: 'top', size: '2xl', className: 'mb-12 h-full max-h-240' },\n { direction: 'top', size: '3xl', className: 'mb-12 h-full max-h-300' },\n { direction: 'top', size: 'full', className: 'mb-0 h-full' },\n { direction: 'bottom', size: 'sm', className: 'mt-24 h-full max-h-96' },\n { direction: 'bottom', size: 'md', className: 'mt-20 h-full max-h-112' },\n { direction: 'bottom', size: 'lg', className: 'mt-12 h-full max-h-128' },\n { direction: 'bottom', size: 'xl', className: 'mt-12 h-full max-h-195' },\n { direction: 'bottom', size: '2xl', className: 'mt-12 h-full max-h-240' },\n { direction: 'bottom', size: '3xl', className: 'mt-12 h-full max-h-300' },\n { direction: 'bottom', size: 'full', className: 'mt-0 h-full' }\n ],\n defaultVariants: {\n direction: 'right',\n size: 'md'\n }\n }\n)\n\ntype DrawerDirection = NonNullable<VariantProps<typeof drawerContentVariants>['direction']>\ntype DrawerSize = NonNullable<VariantProps<typeof drawerContentVariants>['size']>\ntype DrawerContextValue = { size: DrawerSize; direction: DrawerDirection; dismissible: boolean }\nconst DrawerContext = React.createContext<DrawerContextValue>({ size: 'md', direction: 'right', dismissible: true })\n\nexport type DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root> & {\n size?: DrawerSize\n direction?: DrawerDirection\n dismissible?: boolean\n}\nexport type DrawerTriggerProps = React.ComponentProps<typeof DrawerPrimitive.Trigger>\nexport type DrawerPortalProps = React.ComponentProps<typeof DrawerPrimitive.Portal>\nexport type DrawerCloseProps = React.ComponentProps<typeof DrawerPrimitive.Close>\nexport type DrawerOverlayProps = React.ComponentProps<typeof DrawerPrimitive.Overlay>\nexport type DrawerContentProps = React.ComponentProps<typeof DrawerPrimitive.Content> & {\n showCloseButton?: boolean\n overlayProps?: DrawerOverlayProps\n}\nexport type DrawerHeaderProps = React.ComponentProps<'div'>\nexport type DrawerBodyProps = React.ComponentProps<'div'>\nexport type DrawerFooterProps = React.ComponentProps<'div'>\nexport type DrawerTitleProps = React.ComponentProps<typeof DrawerPrimitive.Title>\nexport type DrawerDescriptionProps = React.ComponentProps<typeof DrawerPrimitive.Description>\n\nfunction Drawer({ size = 'md', direction = 'right', dismissible = true, ...props }: DrawerProps) {\n const contextValue = React.useMemo<DrawerContextValue>(\n () => ({ size, direction, dismissible }),\n [size, direction, dismissible]\n )\n\n return (\n <DrawerContext.Provider value={contextValue}>\n <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />\n </DrawerContext.Provider>\n )\n}\n\nfunction DrawerTrigger({ ...props }: DrawerTriggerProps) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({ ...props }: DrawerPortalProps) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />\n}\n\nfunction DrawerClose({ ...props }: DrawerCloseProps) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({ className, onClick, ...props }: DrawerOverlayProps) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'bg-black/10 fixed inset-0 z-50',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0',\n 'supports-backdrop-filter:backdrop-blur-xs',\n className\n )}\n onClick={stopPropagationHandler(onClick)}\n {...props}\n />\n )\n}\n\nfunction DrawerContent({ className, children, showCloseButton = true, overlayProps, ...props }: DrawerContentProps) {\n const { size, direction, dismissible } = React.useContext(DrawerContext)\n\n return (\n <DrawerPortal>\n <DrawerOverlay {...overlayProps} />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(drawerContentVariants({ size, direction }), className)}\n {...props}\n onEscapeKeyDown={(event) => {\n if (!dismissible) event.preventDefault()\n props.onEscapeKeyDown?.(event)\n }}\n onInteractOutside={(event) => {\n if (!dismissible) event.preventDefault()\n props.onInteractOutside?.(event)\n }}\n // React events bubble through the fiber tree, not the DOM, so a portaled Radix Content still\n // reaches any ancestor's onClick/onSubmit even though it renders outside it in the DOM.\n onClick={stopPropagationHandler(props.onClick)}\n onSubmit={stopPropagationHandler(props.onSubmit)}\n >\n {children}\n {showCloseButton && (\n <DrawerClose asChild>\n <Button variant=\"ghost\" className=\"absolute top-3 right-3\" size=\"icon-sm\">\n <IconX />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DrawerClose>\n )}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps) {\n const { direction } = React.useContext(DrawerContext)\n const isVertical = direction === 'top' || direction === 'bottom'\n\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn('p-4 flex flex-col gap-0.5 md:gap-0.5', isVertical && 'text-center md:text-left', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerBody({ className, ...props }: DrawerBodyProps) {\n return (\n <div data-slot=\"drawer-body\" className={cn('px-4 pb-4 flex-1 min-h-0 overflow-y-auto', className)} {...props} />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('gap-2 p-4 mt-auto flex flex-col sm:flex-row sm:justify-end', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerTitle({ className, ...props }: DrawerTitleProps) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('text-foreground text-base font-medium', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerDescription({ className, ...props }: DrawerDescriptionProps) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nexport {\n Drawer,\n DrawerBody,\n DrawerCl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U,cAAc,UAAWM,EAAG,2CAA4CC,CAAS,EAAG,GAAIP,CAAQ,CAAA,CAEnH,CAEA,SAAS,aAAa,CAAE,YAAW,GAAGA,GAA4B,CAChE,MACE,kBAAC,MAAD,CACE,YAAU,gBACV,UAAWM,EAAG,6DAA8DC,CAAS,EACrF,GAAIP,CACL,CAAA,CAEL,CAEA,SAAS,YAAY,CAAE,YAAW,GAAGA,GAA2B,CAC9D,MACE,kBAACL,EAAgB,MAAjB,CACE,YAAU,eACV,UAAWW,EAAG,wCAAyCC,CAAS,EAChE,GAAIP,CACL,CAAA,CAEL,CAEA,SAAS,kBAAkB,CAAE,YAAW,GAAGA,GAAiC,CAC1E,MACE,kBAACL,EAAgB,YAAjB,CACE,YAAU,qBACV,UAAWW,EAAG,gCAAiCC,CAAS,EACxD,GAAIP,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"drawer.js","names":["DrawerPrimitive","resolveClassName","React","drawerContentVariants","cva","DrawerContext","props","contextValue","size","direction","Dialog","dismissible","disablePointerDismissal","eventDetails","onOpenChange","open","toAsChildRenderProps","asChild","children","cn","className","state","stopPropagationHandler","onClick","overlayProps","showCloseButton","Button","IconX"],"sources":["../../src/components/drawer.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Dialog as DrawerPrimitive } from '@base-ui/react/dialog'\nimport { IconX } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { type AsChildPrimitiveProps, toAsChildRenderProps } from '../lib/as-child'\nimport { cn, stopPropagationHandler } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\nimport { Button } from './button'\n\nconst drawerContentVariants = cva(\n [\n 'bg-background flex h-auto flex-col text-sm fixed z-50 outline-none duration-200',\n 'data-open:animate-in data-closed:animate-out'\n ],\n {\n variants: {\n direction: {\n top: 'inset-x-0 top-0 rounded-b-xl border-b data-closed:slide-out-to-top data-open:slide-in-from-top-10',\n right:\n 'inset-y-0 right-0 rounded-l-xl border-l data-closed:slide-out-to-right data-open:slide-in-from-right-10',\n bottom:\n 'inset-x-0 bottom-0 rounded-t-xl border-t data-closed:slide-out-to-bottom data-open:slide-in-from-bottom-10',\n left: 'inset-y-0 left-0 rounded-r-xl border-r data-closed:slide-out-to-left data-open:slide-in-from-left-10'\n },\n size: {\n sm: '',\n md: '',\n lg: '',\n xl: '',\n '2xl': '',\n '3xl': '',\n full: ''\n }\n },\n compoundVariants: [\n { direction: ['left', 'right'], size: 'sm', className: 'w-3/4 sm:max-w-sm' },\n { direction: ['left', 'right'], size: 'md', className: 'w-4/5 sm:max-w-md' },\n { direction: ['left', 'right'], size: 'lg', className: 'w-[90%] sm:max-w-lg' },\n { direction: ['left', 'right'], size: 'xl', className: 'w-[90%] sm:max-w-195' },\n { direction: ['left', 'right'], size: '2xl', className: 'w-[90%] sm:max-w-240' },\n { direction: ['left', 'right'], size: '3xl', className: 'w-[90%] sm:max-w-300' },\n { direction: ['left', 'right'], size: 'full', className: 'w-full' },\n { direction: 'top', size: 'sm', className: 'mb-24 h-full max-h-96' },\n { direction: 'top', size: 'md', className: 'mb-20 h-full max-h-112' },\n { direction: 'top', size: 'lg', className: 'mb-12 h-full max-h-128' },\n { direction: 'top', size: 'xl', className: 'mb-12 h-full max-h-195' },\n { direction: 'top', size: '2xl', className: 'mb-12 h-full max-h-240' },\n { direction: 'top', size: '3xl', className: 'mb-12 h-full max-h-300' },\n { direction: 'top', size: 'full', className: 'mb-0 h-full' },\n { direction: 'bottom', size: 'sm', className: 'mt-24 h-full max-h-96' },\n { direction: 'bottom', size: 'md', className: 'mt-20 h-full max-h-112' },\n { direction: 'bottom', size: 'lg', className: 'mt-12 h-full max-h-128' },\n { direction: 'bottom', size: 'xl', className: 'mt-12 h-full max-h-195' },\n { direction: 'bottom', size: '2xl', className: 'mt-12 h-full max-h-240' },\n { direction: 'bottom', size: '3xl', className: 'mt-12 h-full max-h-300' },\n { direction: 'bottom', size: 'full', className: 'mt-0 h-full' }\n ],\n defaultVariants: {\n direction: 'right',\n size: 'md'\n }\n }\n)\n\ntype DrawerDirection = NonNullable<VariantProps<typeof drawerContentVariants>['direction']>\ntype DrawerSize = NonNullable<VariantProps<typeof drawerContentVariants>['size']>\ntype DrawerContextValue = { size: DrawerSize; direction: DrawerDirection }\nconst DrawerContext = React.createContext<DrawerContextValue>({ size: 'md', direction: 'right' })\n\nexport type DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root> & {\n /**\n * Panel width for `left`/`right`, or height for `top`/`bottom`. `full` fills the whole viewport.\n * @default 'md'\n */\n size?: DrawerSize\n /**\n * Edge the drawer slides in from.\n * @default 'right'\n */\n direction?: DrawerDirection\n /**\n * When `false`, clicking outside and pressing Esc no longer close the drawer. The close button and `DrawerClose` still work.\n * @default true\n */\n dismissible?: boolean\n}\nexport type DrawerTriggerProps = AsChildPrimitiveProps<typeof DrawerPrimitive.Trigger>\nexport type DrawerPortalProps = React.ComponentProps<typeof DrawerPrimitive.Portal>\nexport type DrawerCloseProps = AsChildPrimitiveProps<typeof DrawerPrimitive.Close>\nexport type DrawerOverlayProps = AsChildPrimitiveProps<typeof DrawerPrimitive.Backdrop>\nexport type DrawerContentProps = AsChildPrimitiveProps<typeof DrawerPrimitive.Popup> &\n Pick<DrawerPortalProps, 'keepMounted'> & {\n /**\n * Shows the X button in the top-right corner.\n * @default true\n */\n showCloseButton?: boolean\n /** Props passed to the overlay rendered behind the drawer. */\n overlayProps?: DrawerOverlayProps\n }\nexport type DrawerHeaderProps = React.ComponentProps<'div'>\nexport type DrawerBodyProps = React.ComponentProps<'div'>\nexport type DrawerFooterProps = React.ComponentProps<'div'>\nexport type DrawerTitleProps = AsChildPrimitiveProps<typeof DrawerPrimitive.Title>\nexport type DrawerDescriptionProps = AsChildPrimitiveProps<typeof DrawerPrimitive.Description>\n\nfunction Drawer({\n size = 'md',\n direction = 'right',\n dismissible = true,\n disablePointerDismissal,\n onOpenChange,\n ...props\n}: DrawerProps) {\n const contextValue = React.useMemo<DrawerContextValue>(() => ({ size, direction }), [size, direction])\n\n return (\n <DrawerContext.Provider value={contextValue}>\n <DrawerPrimitive.Root\n data-slot=\"drawer\"\n disablePointerDismissal={!dismissible || disablePointerDismissal}\n onOpenChange={(open, eventDetails) => {\n if (!dismissible && eventDetails.reason === 'escape-key') {\n eventDetails.cancel()\n return\n }\n onOpenChange?.(open, eventDetails)\n }}\n {...props}\n />\n </DrawerContext.Provider>\n )\n}\n\nfunction DrawerTrigger({ asChild, children, ...props }: DrawerTriggerProps) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} {...toAsChildRenderProps(asChild, children)} />\n}\n\nfunction DrawerPortal({ ...props }: DrawerPortalProps) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />\n}\n\nfunction DrawerClose({ asChild, children, ...props }: DrawerCloseProps) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} {...toAsChildRenderProps(asChild, children)} />\n}\n\nfunction DrawerOverlay({ className, onClick, forceRender = true, asChild, children, ...props }: DrawerOverlayProps) {\n return (\n <DrawerPrimitive.Backdrop\n data-slot=\"drawer-overlay\"\n forceRender={forceRender}\n className={(state) =>\n cn(\n 'bg-black/10 fixed inset-0 z-50 duration-200',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0',\n 'supports-backdrop-filter:backdrop-blur-xs',\n resolveClassName(className, state)\n )\n }\n onClick={stopPropagationHandler(onClick)}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nfunction DrawerContent({\n className,\n children,\n showCloseButton = true,\n overlayProps,\n keepMounted,\n asChild,\n ...props\n}: DrawerContentProps) {\n const { size, direction } = React.useContext(DrawerContext)\n\n return (\n <DrawerPortal keepMounted={keepMounted}>\n <DrawerOverlay {...overlayProps} />\n <DrawerPrimitive.Popup\n data-slot=\"drawer-content\"\n className={(state) => cn(drawerContentVariants({ size, direction }), resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n // React events bubble through the fiber tree, not the DOM, so a portaled Popup still\n // reaches any ancestor's onClick/onSubmit even though it renders outside it in the DOM.\n onClick={stopPropagationHandler(props.onClick)}\n onSubmit={stopPropagationHandler(props.onSubmit)}\n >\n {!asChild && children}\n {showCloseButton && !asChild && (\n <DrawerPrimitive.Close\n data-slot=\"drawer-close\"\n render={<Button variant=\"ghost\" className=\"absolute top-3 right-3\" size=\"icon-sm\" />}\n >\n <IconX />\n <span className=\"sr-only\">Close</span>\n </DrawerPrimitive.Close>\n )}\n </DrawerPrimitive.Popup>\n </DrawerPortal>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps) {\n const { direction } = React.useContext(DrawerContext)\n const isVertical = direction === 'top' || direction === 'bottom'\n\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn('p-4 flex flex-col gap-0.5 md:gap-0.5', isVertical && 'text-center md:text-left', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerBody({ className, ...props }: DrawerBodyProps) {\n return (\n <div data-slot=\"drawer-body\" className={cn('px-4 pb-4 flex-1 min-h-0 overflow-y-auto', className)} {...props} />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('gap-2 p-4 mt-auto flex flex-col sm:flex-row sm:justify-end', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerTitle({ className, asChild, children, ...props }: DrawerTitleProps) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={(state) => cn('text-foreground text-base font-medium', resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nfunction DrawerDescription({ className, asChild, children, ...props }: DrawerDescriptionProps) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={(state) => cn('text-muted-foreground text-sm', resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nexport {\n Drawer,\n DrawerBody,\n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AA4B,CAChE,GAAM,CAAE,aAAcJ,EAAM,WAAWG,CAAa,EAGpD,MACE,kBAAC,MAAD,CACE,YAAU,gBACV,UAAWc,EAAG,wCALCV,IAAc,OAASA,IAAc,WAKgB,2BAA4BW,CAAS,EACzG,GAAId,CACL,CAAA,CAEL,CAEA,SAAS,WAAW,CAAE,YAAW,GAAGA,GAA0B,CAC5D,MACE,kBAAC,MAAD,CAAK,YAAU,cAAc,UAAWa,EAAG,2CAA4CC,CAAS,EAAG,GAAId,CAAQ,CAAA,CAEnH,CAEA,SAAS,aAAa,CAAE,YAAW,GAAGA,GAA4B,CAChE,MACE,kBAAC,MAAD,CACE,YAAU,gBACV,UAAWa,EAAG,6DAA8DC,CAAS,EACrF,GAAId,CACL,CAAA,CAEL,CAEA,SAAS,YAAY,CAAE,YAAW,UAAS,WAAU,GAAGA,GAA2B,CACjF,MACE,kBAACN,EAAgB,MAAjB,CACE,YAAU,eACV,UAAY,GAAUmB,EAAG,wCAAyClB,EAAiBmB,EAAWC,CAAK,CAAC,EACpG,GAAIf,EACJ,GAAIU,EAAqBC,EAASC,CAAQ,CAC3C,CAAA,CAEL,CAEA,SAAS,kBAAkB,CAAE,YAAW,UAAS,WAAU,GAAGZ,GAAiC,CAC7F,MACE,kBAACN,EAAgB,YAAjB,CACE,YAAU,qBACV,UAAY,GAAUmB,EAAG,gCAAiClB,EAAiBmB,EAAWC,CAAK,CAAC,EAC5F,GAAIf,EACJ,GAAIU,EAAqBC,EAASC,CAAQ,CAC3C,CAAA,CAEL"}
@@ -1,48 +1,58 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- import { DropdownMenu as DropdownMenu$1 } from "radix-ui";
2
+ import { n as AsChildProps, t as AsChildPrimitiveProps } from "../as-child-Dxg3Xo1G.js";
3
3
  import * as React from "react";
4
+ import { Menu } from "@base-ui/react/menu";
4
5
  //#region src/components/dropdown-menu.d.ts
5
- export type DropdownMenuProps = React.ComponentProps<typeof DropdownMenu$1.Root>;
6
- export type DropdownMenuPortalProps = React.ComponentProps<typeof DropdownMenu$1.Portal>;
7
- export type DropdownMenuTriggerProps = React.ComponentProps<typeof DropdownMenu$1.Trigger>;
8
- export type DropdownMenuContentProps = React.ComponentProps<typeof DropdownMenu$1.Content>;
9
- export type DropdownMenuGroupProps = React.ComponentProps<typeof DropdownMenu$1.Group>;
10
- export type DropdownMenuItemProps = React.ComponentProps<typeof DropdownMenu$1.Item> & {
6
+ export type DropdownMenuProps = React.ComponentProps<typeof Menu.Root>;
7
+ export type DropdownMenuPortalProps = React.ComponentProps<typeof Menu.Portal>;
8
+ export type DropdownMenuTriggerProps = AsChildPrimitiveProps<typeof Menu.Trigger>;
9
+ export type DropdownMenuContentProps = AsChildPrimitiveProps<typeof Menu.Popup> & Pick<React.ComponentProps<typeof Menu.Positioner>, 'side' | 'sideOffset' | 'align' | 'alignOffset' | 'sticky'> & Pick<DropdownMenuPortalProps, 'keepMounted'>;
10
+ export type DropdownMenuGroupProps = AsChildPrimitiveProps<typeof Menu.Group>;
11
+ export type DropdownMenuItemProps = AsChildPrimitiveProps<typeof Menu.Item> & {
12
+ /** Adds left padding so the text lines up with items that have an icon or indicator. */
11
13
  inset?: boolean;
14
+ /**
15
+ * `destructive` colors the item red for dangerous actions.
16
+ * @default 'default'
17
+ */
12
18
  variant?: 'default' | 'destructive';
13
19
  };
14
- export type DropdownMenuCheckboxItemProps = React.ComponentProps<typeof DropdownMenu$1.CheckboxItem> & {
20
+ export type DropdownMenuCheckboxItemProps = AsChildPrimitiveProps<typeof Menu.CheckboxItem> & {
21
+ /** Adds left padding so the text lines up with items that have an icon or indicator. */
15
22
  inset?: boolean;
16
23
  };
17
- export type DropdownMenuRadioGroupProps = React.ComponentProps<typeof DropdownMenu$1.RadioGroup>;
18
- export type DropdownMenuRadioItemProps = React.ComponentProps<typeof DropdownMenu$1.RadioItem> & {
24
+ export type DropdownMenuRadioGroupProps = AsChildPrimitiveProps<typeof Menu.RadioGroup>;
25
+ export type DropdownMenuRadioItemProps = AsChildPrimitiveProps<typeof Menu.RadioItem> & {
26
+ /** Adds left padding so the text lines up with items that have an icon or indicator. */
19
27
  inset?: boolean;
20
28
  };
21
- export type DropdownMenuLabelProps = React.ComponentProps<typeof DropdownMenu$1.Label> & {
29
+ export type DropdownMenuLabelProps = AsChildProps<'div'> & {
30
+ /** Adds left padding so the text lines up with items that have an icon or indicator. */
22
31
  inset?: boolean;
23
32
  };
24
- export type DropdownMenuSeparatorProps = React.ComponentProps<typeof DropdownMenu$1.Separator>;
33
+ export type DropdownMenuSeparatorProps = AsChildPrimitiveProps<typeof Menu.Separator>;
25
34
  export type DropdownMenuShortcutProps = React.ComponentProps<'span'>;
26
- export type DropdownMenuSubProps = React.ComponentProps<typeof DropdownMenu$1.Sub>;
27
- export type DropdownMenuSubTriggerProps = React.ComponentProps<typeof DropdownMenu$1.SubTrigger> & {
35
+ export type DropdownMenuSubProps = React.ComponentProps<typeof Menu.SubmenuRoot>;
36
+ export type DropdownMenuSubTriggerProps = AsChildPrimitiveProps<typeof Menu.SubmenuTrigger> & {
37
+ /** Adds left padding so the text lines up with items that have an icon or indicator. */
28
38
  inset?: boolean;
29
39
  };
30
- export type DropdownMenuSubContentProps = React.ComponentProps<typeof DropdownMenu$1.SubContent>;
40
+ export type DropdownMenuSubContentProps = DropdownMenuContentProps;
31
41
  declare function DropdownMenu({ ...props }: DropdownMenuProps): React.JSX.Element;
32
42
  declare function DropdownMenuPortal({ ...props }: DropdownMenuPortalProps): React.JSX.Element;
33
- declare function DropdownMenuTrigger({ ...props }: DropdownMenuTriggerProps): React.JSX.Element;
34
- declare function DropdownMenuContent({ className, align, sideOffset, ...props }: DropdownMenuContentProps): React.JSX.Element;
35
- declare function DropdownMenuGroup({ ...props }: DropdownMenuGroupProps): React.JSX.Element;
36
- declare function DropdownMenuItem({ className, inset, variant, ...props }: DropdownMenuItemProps): React.JSX.Element;
37
- declare function DropdownMenuCheckboxItem({ className, children, inset, ...props }: DropdownMenuCheckboxItemProps): React.JSX.Element;
38
- declare function DropdownMenuRadioGroup({ ...props }: DropdownMenuRadioGroupProps): React.JSX.Element;
39
- declare function DropdownMenuRadioItem({ className, children, inset, ...props }: DropdownMenuRadioItemProps): React.JSX.Element;
40
- declare function DropdownMenuLabel({ className, inset, ...props }: DropdownMenuLabelProps): React.JSX.Element;
41
- declare function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps): React.JSX.Element;
43
+ declare function DropdownMenuTrigger({ asChild, children, ...props }: DropdownMenuTriggerProps): React.JSX.Element;
44
+ declare function DropdownMenuContent({ className, side, sideOffset, align, alignOffset, sticky, keepMounted, asChild, children, ...props }: DropdownMenuContentProps): React.JSX.Element;
45
+ declare function DropdownMenuGroup({ asChild, children, ...props }: DropdownMenuGroupProps): React.JSX.Element;
46
+ declare function DropdownMenuItem({ className, inset, variant, asChild, children, ...props }: DropdownMenuItemProps): React.JSX.Element;
47
+ declare function DropdownMenuCheckboxItem({ className, children, inset, asChild, ...props }: DropdownMenuCheckboxItemProps): React.JSX.Element;
48
+ declare function DropdownMenuRadioGroup({ asChild, children, ...props }: DropdownMenuRadioGroupProps): React.JSX.Element;
49
+ declare function DropdownMenuRadioItem({ className, children, inset, asChild, ...props }: DropdownMenuRadioItemProps): React.JSX.Element;
50
+ declare function DropdownMenuLabel({ className, inset, asChild, children, ...props }: DropdownMenuLabelProps): React.JSX.Element;
51
+ declare function DropdownMenuSeparator({ className, asChild, children, ...props }: DropdownMenuSeparatorProps): React.JSX.Element;
42
52
  declare function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps): React.JSX.Element;
43
53
  declare function DropdownMenuSub({ ...props }: DropdownMenuSubProps): React.JSX.Element;
44
- declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: DropdownMenuSubTriggerProps): React.JSX.Element;
45
- declare function DropdownMenuSubContent({ className, ...props }: DropdownMenuSubContentProps): React.JSX.Element;
54
+ declare function DropdownMenuSubTrigger({ className, inset, children, asChild, ...props }: DropdownMenuSubTriggerProps): React.JSX.Element;
55
+ declare function DropdownMenuSubContent({ className, side, sideOffset, align, alignOffset, sticky, keepMounted, asChild, children, ...props }: DropdownMenuSubContentProps): React.JSX.Element;
46
56
  //#endregion
47
57
  export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
48
58
  //# sourceMappingURL=dropdown-menu.d.ts.map
@@ -1,2 +1,2 @@
1
- import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{IconCheck as t,IconChevronRight as n}from"@tabler/icons-react";import{DropdownMenu as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";function DropdownMenu({...e}){return/* @__PURE__ */ i(r.Root,{"data-slot":`dropdown-menu`,...e})}function DropdownMenuPortal({...e}){return/* @__PURE__ */ i(r.Portal,{"data-slot":`dropdown-menu-portal`,...e})}function DropdownMenuTrigger({...e}){return/* @__PURE__ */ i(r.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function DropdownMenuContent({className:t,align:n=`start`,sideOffset:a=4,...o}){return/* @__PURE__ */ i(DropdownMenuPortal,{children:/* @__PURE__ */ i(r.Content,{"data-slot":`dropdown-menu-content`,align:n,sideOffset:a,className:e(`relative z-50 w-(--radix-dropdown-menu-trigger-width) min-w-32 max-h-(--radix-dropdown-menu-content-available-height)`,`origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1`,`bg-popover/70 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100`,`data-[state=closed]:overflow-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`,`before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit]`,`before:backdrop-blur-2xl before:backdrop-saturate-150`,`**:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10`,`**:data-[slot$=-separator]:bg-foreground/5`,`**:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!`,`**:data-[variant=destructive]:focus:bg-destructive/10! dark:**:data-[variant=destructive]:focus:bg-destructive/20!`,`**:data-[variant=destructive]:text-destructive! **:data-[variant=destructive]:**:text-destructive!`,`animate-none!`,t),...o})})}function DropdownMenuGroup({...e}){return/* @__PURE__ */ i(r.Group,{"data-slot":`dropdown-menu-group`,...e})}function DropdownMenuItem({className:t,inset:n,variant:a=`default`,...o}){return/* @__PURE__ */ i(r.Item,{"data-slot":`dropdown-menu-item`,"data-inset":n,"data-variant":a,className:e(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm`,`select-none outline-hidden`,`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground`,`data-inset:pl-7`,`data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive`,`dark:data-[variant=destructive]:focus:bg-destructive/20`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`data-[variant=destructive]:*:[svg]:text-destructive`,t),...o})}function DropdownMenuCheckboxItem({className:n,children:o,inset:s,...c}){return/* @__PURE__ */ a(r.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":s,className:e(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm`,`select-none outline-hidden`,`focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground`,`data-inset:pl-7`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,n),...c,children:[/* @__PURE__ */ i(`span`,{"data-slot":`dropdown-menu-checkbox-item-indicator`,className:`pointer-events-none absolute right-2 flex items-center justify-center`,children:/* @__PURE__ */ i(r.ItemIndicator,{children:/* @__PURE__ */ i(t,{})})}),o]})}function DropdownMenuRadioGroup({...e}){return/* @__PURE__ */ i(r.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function DropdownMenuRadioItem({className:n,children:o,inset:s,...c}){return/* @__PURE__ */ a(r.RadioItem,{"data-slot":`dropdown-menu-radio-item`,"data-inset":s,className:e(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm`,`select-none outline-hidden`,`focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground`,`data-inset:pl-7`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,n),...c,children:[/* @__PURE__ */ i(`span`,{"data-slot":`dropdown-menu-radio-item-indicator`,className:`pointer-events-none absolute right-2 flex items-center justify-center`,children:/* @__PURE__ */ i(r.ItemIndicator,{children:/* @__PURE__ */ i(t,{})})}),o]})}function DropdownMenuLabel({className:t,inset:n,...a}){return/* @__PURE__ */ i(r.Label,{"data-slot":`dropdown-menu-label`,"data-inset":n,className:e(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,t),...a})}function DropdownMenuSeparator({className:t,...n}){return/* @__PURE__ */ i(r.Separator,{"data-slot":`dropdown-menu-separator`,className:e(`bg-border -mx-1 my-1 h-px`,t),...n})}function DropdownMenuShortcut({className:t,...n}){return/* @__PURE__ */ i(`span`,{"data-slot":`dropdown-menu-shortcut`,className:e(`ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground`,t),...n})}function DropdownMenuSub({...e}){return/* @__PURE__ */ i(r.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function DropdownMenuSubTrigger({className:t,inset:o,children:s,...c}){return/* @__PURE__ */ a(r.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":o,className:e(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm`,`select-none outline-hidden`,`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground`,`data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,t),...c,children:[s,/* @__PURE__ */ i(n,{className:`ml-auto`})]})}function DropdownMenuSubContent({className:t,...n}){return/* @__PURE__ */ i(r.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:e(`relative z-50 min-w-24 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg p-1`,`bg-popover/70 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100`,`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`,`before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit]`,`before:backdrop-blur-2xl before:backdrop-saturate-150`,`**:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10`,`**:data-[slot$=-separator]:bg-foreground/5`,`**:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!`,`**:data-[variant=destructive]:focus:bg-destructive/10! dark:**:data-[variant=destructive]:focus:bg-destructive/20!`,`**:data-[variant=destructive]:text-destructive! **:data-[variant=destructive]:**:text-destructive!`,`animate-none!`,t),...n})}export{DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger};
1
+ import"../rolldown-runtime-BhWHdk3m.js";import{toAsChildRenderProps as e,useAsChild as t}from"../lib/as-child.js";import{cn as n}from"../lib/utils.js";import{t as r}from"../resolve-class-name-BurP8ngI.js";import{IconCheck as i,IconChevronRight as a}from"@tabler/icons-react";import*as o from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{Menu as l}from"@base-ui/react/menu";const u=o.createContext(!1);function DropdownMenu({...e}){return/* @__PURE__ */ s(l.Root,{"data-slot":`dropdown-menu`,...e})}function DropdownMenuPortal({...e}){return/* @__PURE__ */ s(l.Portal,{"data-slot":`dropdown-menu-portal`,...e})}function DropdownMenuTrigger({asChild:t,children:n,...r}){return/* @__PURE__ */ s(l.Trigger,{"data-slot":`dropdown-menu-trigger`,...r,...e(t,n)})}function DropdownMenuContent({className:t,side:i=`bottom`,sideOffset:a=4,align:o=`start`,alignOffset:c=0,sticky:u,keepMounted:d,asChild:f,children:p,...m}){return/* @__PURE__ */ s(DropdownMenuPortal,{keepMounted:d,children:/* @__PURE__ */ s(l.Positioner,{side:i,sideOffset:a,align:o,alignOffset:c,sticky:u,className:`isolate z-50 outline-none`,children:/* @__PURE__ */ s(l.Popup,{"data-slot":`dropdown-menu-content`,className:e=>n(`relative z-50 w-(--anchor-width) min-w-32 max-h-(--available-height) outline-none`,`origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1`,`bg-popover/70 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100`,`data-closed:overflow-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`,`before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit]`,`before:backdrop-blur-2xl before:backdrop-saturate-150`,`**:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10`,`**:data-[slot$=-separator]:bg-foreground/5`,`**:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!`,`**:data-[variant=destructive]:focus:bg-destructive/10! dark:**:data-[variant=destructive]:focus:bg-destructive/20!`,`**:data-[variant=destructive]:text-destructive! **:data-[variant=destructive]:**:text-destructive!`,`animate-none!`,r(t,e)),...m,...e(f,p)})})})}function DropdownMenuGroup({asChild:t,children:n,...r}){return/* @__PURE__ */ s(u.Provider,{value:!0,children:/* @__PURE__ */ s(l.Group,{"data-slot":`dropdown-menu-group`,...r,...e(t,n)})})}function DropdownMenuItem({className:t,inset:i,variant:a=`default`,asChild:o,children:c,...u}){return/* @__PURE__ */ s(l.Item,{"data-slot":`dropdown-menu-item`,"data-inset":i,"data-variant":a,className:e=>n(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm`,`select-none outline-hidden`,`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground`,`data-inset:pl-7`,`data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive`,`dark:data-[variant=destructive]:focus:bg-destructive/20`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`data-[variant=destructive]:*:[svg]:text-destructive`,r(t,e)),...u,...e(o,c)})}function DropdownMenuCheckboxItem({className:t,children:a,inset:o,asChild:u,...d}){return/* @__PURE__ */ c(l.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":o,className:e=>n(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm`,`select-none outline-hidden`,`focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground`,`data-inset:pl-7`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r(t,e)),...d,...e(u,a),children:[!u&&/* @__PURE__ */ s(`span`,{"data-slot":`dropdown-menu-checkbox-item-indicator`,className:`pointer-events-none absolute right-2 flex items-center justify-center`,children:/* @__PURE__ */ s(l.CheckboxItemIndicator,{children:/* @__PURE__ */ s(i,{})})}),!u&&a]})}function DropdownMenuRadioGroup({asChild:t,children:n,...r}){return/* @__PURE__ */ s(u.Provider,{value:!0,children:/* @__PURE__ */ s(l.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...r,...e(t,n)})})}function DropdownMenuRadioItem({className:t,children:a,inset:o,asChild:u,...d}){return/* @__PURE__ */ c(l.RadioItem,{"data-slot":`dropdown-menu-radio-item`,"data-inset":o,className:e=>n(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm`,`select-none outline-hidden`,`focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground`,`data-inset:pl-7`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r(t,e)),...d,...e(u,a),children:[!u&&/* @__PURE__ */ s(`span`,{"data-slot":`dropdown-menu-radio-item-indicator`,className:`pointer-events-none absolute right-2 flex items-center justify-center`,children:/* @__PURE__ */ s(l.RadioItemIndicator,{children:/* @__PURE__ */ s(i,{})})}),!u&&a]})}function DropdownMenuLabel({className:t,inset:r,asChild:i,children:a,...c}){let d=o.useContext(u),f={"data-slot":`dropdown-menu-label`,"data-inset":r,className:n(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,t),...c};return d?/* @__PURE__ */ s(l.GroupLabel,{...f,...e(i,a)}):/* @__PURE__ */ s(DropdownMenuStandaloneLabel,{...f,asChild:i,children:a})}function DropdownMenuStandaloneLabel(e){return t(`div`,{...e})}function DropdownMenuSeparator({className:t,asChild:i,children:a,...o}){return/* @__PURE__ */ s(l.Separator,{"data-slot":`dropdown-menu-separator`,className:e=>n(`bg-border -mx-1 my-1 h-px`,r(t,e)),...o,...e(i,a)})}function DropdownMenuShortcut({className:e,...t}){return/* @__PURE__ */ s(`span`,{"data-slot":`dropdown-menu-shortcut`,className:n(`ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground`,e),...t})}function DropdownMenuSub({...e}){return/* @__PURE__ */ s(l.SubmenuRoot,{"data-slot":`dropdown-menu-sub`,...e})}function DropdownMenuSubTrigger({className:t,inset:i,children:o,asChild:u,...d}){return/* @__PURE__ */ c(l.SubmenuTrigger,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":i,className:e=>n(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm`,`select-none outline-hidden`,`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground`,`data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r(t,e)),...d,...e(u,o),children:[!u&&o,!u&&/* @__PURE__ */ s(a,{className:`ml-auto`})]})}function DropdownMenuSubContent({className:t,side:i=`right`,sideOffset:a=0,align:o=`start`,alignOffset:c=-3,sticky:u,keepMounted:d,asChild:f,children:p,...m}){return/* @__PURE__ */ s(DropdownMenuPortal,{keepMounted:d,children:/* @__PURE__ */ s(l.Positioner,{side:i,sideOffset:a,align:o,alignOffset:c,sticky:u,className:`isolate z-50 outline-none`,children:/* @__PURE__ */ s(l.Popup,{"data-slot":`dropdown-menu-sub-content`,className:e=>n(`relative z-50 min-w-24 origin-(--transform-origin) overflow-hidden rounded-lg p-1 outline-none`,`bg-popover/70 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100`,`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`,`before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit]`,`before:backdrop-blur-2xl before:backdrop-saturate-150`,`**:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10`,`**:data-[slot$=-separator]:bg-foreground/5`,`**:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!`,`**:data-[variant=destructive]:focus:bg-destructive/10! dark:**:data-[variant=destructive]:focus:bg-destructive/20!`,`**:data-[variant=destructive]:text-destructive! **:data-[variant=destructive]:**:text-destructive!`,`animate-none!`,r(t,e)),...m,...e(f,p)})})})}export{DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger};
2
2
  //# sourceMappingURL=dropdown-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.js","names":["DropdownMenuPrimitive","DropdownMenu$1","props","cn","className","inset","variant","IconCheck","children","IconChevronRight"],"sources":["../../src/components/dropdown-menu.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconCheck, IconChevronRight } from '@tabler/icons-react'\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type DropdownMenuProps = React.ComponentProps<typeof DropdownMenuPrimitive.Root>\n\nexport type DropdownMenuPortalProps = React.ComponentProps<typeof DropdownMenuPrimitive.Portal>\n\nexport type DropdownMenuTriggerProps = React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>\n\nexport type DropdownMenuContentProps = React.ComponentProps<typeof DropdownMenuPrimitive.Content>\n\nexport type DropdownMenuGroupProps = React.ComponentProps<typeof DropdownMenuPrimitive.Group>\n\nexport type DropdownMenuItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: 'default' | 'destructive'\n}\n\nexport type DropdownMenuCheckboxItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {\n inset?: boolean\n}\n\nexport type DropdownMenuRadioGroupProps = React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>\n\nexport type DropdownMenuRadioItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {\n inset?: boolean\n}\n\nexport type DropdownMenuLabelProps = React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}\n\nexport type DropdownMenuSeparatorProps = React.ComponentProps<typeof DropdownMenuPrimitive.Separator>\n\nexport type DropdownMenuShortcutProps = React.ComponentProps<'span'>\n\nexport type DropdownMenuSubProps = React.ComponentProps<typeof DropdownMenuPrimitive.Sub>\n\nexport type DropdownMenuSubTriggerProps = React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}\n\nexport type DropdownMenuSubContentProps = React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>\n\nfunction DropdownMenu({ ...props }: DropdownMenuProps) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({ ...props }: DropdownMenuPortalProps) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n}\n\nfunction DropdownMenuTrigger({ ...props }: DropdownMenuTriggerProps) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />\n}\n\nfunction DropdownMenuContent({ className, align = 'start', sideOffset = 4, ...props }: DropdownMenuContentProps) {\n return (\n <DropdownMenuPortal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'relative z-50 w-(--radix-dropdown-menu-trigger-width) min-w-32 max-h-(--radix-dropdown-menu-content-available-height)',\n 'origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1',\n 'bg-popover/70 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100',\n 'data-[state=closed]:overflow-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 'before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit]',\n 'before:backdrop-blur-2xl before:backdrop-saturate-150',\n '**:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10',\n '**:data-[slot$=-separator]:bg-foreground/5',\n '**:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!',\n '**:data-[variant=destructive]:focus:bg-destructive/10! dark:**:data-[variant=destructive]:focus:bg-destructive/20!',\n '**:data-[variant=destructive]:text-destructive! **:data-[variant=destructive]:**:text-destructive!',\n 'animate-none!',\n className\n )}\n {...props}\n />\n </DropdownMenuPortal>\n )\n}\n\nfunction DropdownMenuGroup({ ...props }: DropdownMenuGroupProps) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n}\n\nfunction DropdownMenuItem({ className, inset, variant = 'default', ...props }: DropdownMenuItemProps) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm',\n 'select-none outline-hidden',\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'data-inset:pl-7',\n 'data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive',\n 'dark:data-[variant=destructive]:focus:bg-destructive/20',\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n 'data-[variant=destructive]:*:[svg]:text-destructive',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({ className, children, inset, ...props }: DropdownMenuCheckboxItemProps) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n 'relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm',\n 'select-none outline-hidden',\n 'focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground',\n 'data-inset:pl-7',\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span\n data-slot=\"dropdown-menu-checkbox-item-indicator\"\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n >\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCheck />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: DropdownMenuRadioGroupProps) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />\n}\n\nfunction DropdownMenuRadioItem({ className, children, inset, ...props }: DropdownMenuRadioItemProps) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n data-inset={inset}\n className={cn(\n 'relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm',\n 'select-none outline-hidden',\n 'focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground',\n 'data-inset:pl-7',\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span\n data-slot=\"dropdown-menu-radio-item-indicator\"\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n >\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCheck />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({ className, inset, ...props }: DropdownMenuLabelProps) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7', className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n 'ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSub({ ...props }: DropdownMenuSubProps) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({ className, inset, children, ...props }: DropdownMenuSubTriggerProps) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm',\n 'select-none outline-hidden',\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <IconChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({ className, ...props }: DropdownMenuSubContentProps) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'relative z-50 min-w-24 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg p-1',\n 'bg-popover/70 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100',\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 'before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit]',\n 'before:backdrop-blur-2xl before:backdrop-saturate-150',\n '**:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10',\n '**:data-[slot$=-separator]:bg-foreground/5',\n '**:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!',\n '**:data-[variant=destructive]:focus:bg-destructive/10! dark:**:data-[variant=destructive]:focus:bg-destructive/20!',\n '**:data-[variant=destructive]:text-destructive! **:data-[variant=destructive]:**:text-destructive!',\n 'animate-none!',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger\n}\n"],"mappings":"6OAgDA,SAAS,aAAa,CAAE,GAAGE,GAA4B,CACrD,MAAO,kBAACF,EAAsB,KAAvB,CAA4B,YAAU,gBAAgB,GAAIE,CAAQ,CAAA,CAC3E,CAEA,SAAS,mBAAmB,CAAE,GAAGA,GAAkC,CACjE,MAAO,kBAACF,EAAsB,OAAvB,CAA8B,YAAU,uBAAuB,GAAIE,CAAQ,CAAA,CACpF,CAEA,SAAS,oBAAoB,CAAE,GAAGA,GAAmC,CACnE,MAAO,kBAACF,EAAsB,QAAvB,CAA+B,YAAU,wBAAwB,GAAIE,CAAQ,CAAA,CACtF,CAEA,SAAS,oBAAoB,CAAE,YAAW,QAAQ,QAAS,aAAa,EAAG,GAAGA,GAAmC,CAC/G,MACE,kBAAC,mBAAD,CAAA,SACE,kBAACF,EAAsB,QAAvB,CACE,YAAU,wBACH,QACK,aACZ,UAAWG,EACT,wHACA,2GACA,yFACA,sCACA,uIACA,8JACA,iGACA,wDACA,uGACA,6CACA,2GACA,qHACA,qGACA,gBACAC,CACF,EACA,GAAIF,CACL,CAAA,CACiB,CAAA,CAExB,CAEA,SAAS,kBAAkB,CAAE,GAAGA,GAAiC,CAC/D,MAAO,kBAACF,EAAsB,MAAvB,CAA6B,YAAU,sBAAsB,GAAIE,CAAQ,CAAA,CAClF,CAEA,SAAS,iBAAiB,CAAE,YAAW,QAAO,UAAU,UAAW,GAAGA,GAAgC,CACpG,MACE,kBAACF,EAAsB,KAAvB,CACE,YAAU,qBACV,aAAYK,EACZ,eAAcC,EACd,UA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,EACpD,GAAIF,CACL,CAAA,CAEL,CAEA,SAAS,qBAAqB,CAAE,YAAW,GAAGA,GAAoC,CAChF,MACE,kBAAC,OAAD,CACE,YAAU,yBACV,UAAWC,EACT,8GACAC,CACF,EACA,GAAIF,CACL,CAAA,CAEL,CAEA,SAAS,gBAAgB,CAAE,GAAGA,GAA+B,CAC3D,MAAO,kBAACF,EAAsB,IAAvB,CAA2B,YAAU,oBAAoB,GAAIE,CAAQ,CAAA,CAC9E,CAEA,SAAS,uBAAuB,CAAE,YAAW,QAAO,WAAU,GAAGA,GAAsC,CACrG,MACE,kBAACF,EAAsB,WAAvB,CACE,YAAU,4BACV,aAAYK,EACZ,UAAWF,EACT,0EACA,6BACA,8GACA,uEACA,oFACAC,CACF,EACA,GAAIF,EAXN,SAAA,CAaGM,EACD,kBAACC,EAAD,CAAkB,UAAU,SAAW,CAAA,CACP,GAEtC,CAEA,SAAS,uBAAuB,CAAE,YAAW,GAAGP,GAAsC,CACpF,MACE,kBAACF,EAAsB,WAAvB,CACE,YAAU,4BACV,UAAWG,EACT,gHACA,yFACA,uIACA,8JACA,iGACA,wDACA,uGACA,6CACA,2GACA,qHACA,qGACA,gBACAC,CACF,EACA,GAAIF,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"dropdown-menu.js","names":["DropdownMenuPrimitive","resolveClassName","React","DropdownMenuGroupContext","props","Menu","toAsChildRenderProps","asChild","children","cn","className","state","inset","variant","IconCheck","isInsideGroup","labelProps","useAsChild","IconChevronRight"],"sources":["../../src/components/dropdown-menu.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Menu as DropdownMenuPrimitive } from '@base-ui/react/menu'\nimport { IconCheck, IconChevronRight } from '@tabler/icons-react'\n\nimport { type AsChildPrimitiveProps, type AsChildProps, toAsChildRenderProps, useAsChild } from '../lib/as-child'\nimport { cn } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\n\nexport type DropdownMenuProps = React.ComponentProps<typeof DropdownMenuPrimitive.Root>\n\nexport type DropdownMenuPortalProps = React.ComponentProps<typeof DropdownMenuPrimitive.Portal>\n\nexport type DropdownMenuTriggerProps = AsChildPrimitiveProps<typeof DropdownMenuPrimitive.Trigger>\n\nexport type DropdownMenuContentProps = AsChildPrimitiveProps<typeof DropdownMenuPrimitive.Popup> &\n Pick<\n React.ComponentProps<typeof DropdownMenuPrimitive.Positioner>,\n 'side' | 'sideOffset' | 'align' | 'alignOffset' | 'sticky'\n > &\n Pick<DropdownMenuPortalProps, 'keepMounted'>\n\nexport type DropdownMenuGroupProps = AsChildPrimitiveProps<typeof DropdownMenuPrimitive.Group>\n\nexport type DropdownMenuItemProps = AsChildPrimitiveProps<typeof DropdownMenuPrimitive.Item> & {\n /** Adds left padding so the text lines up with items that have an icon or indicator. */\n inset?: boolean\n /**\n * `destructive` colors the item red for dangerous actions.\n * @default 'default'\n */\n variant?: 'default' | 'destructive'\n}\n\nexport type DropdownMenuCheckboxItemProps = AsChildPrimitiveProps<typeof DropdownMenuPrimitive.CheckboxItem> & {\n /** Adds left padding so the text lines up with items that have an icon or indicator. */\n inset?: boolean\n}\n\nexport type DropdownMenuRadioGroupProps = AsChildPrimitiveProps<typeof DropdownMenuPrimitive.RadioGroup>\n\nexport type DropdownMenuRadioItemProps = AsChildPrimitiveProps<typeof DropdownMenuPrimitive.RadioItem> & {\n /** Adds left padding so the text lines up with items that have an icon or indicator. */\n inset?: boolean\n}\n\nexport type DropdownMenuLabelProps = AsChildProps<'div'> & {\n /** Adds left padding so the text lines up with items that have an icon or indicator. */\n inset?: boolean\n}\n\nexport type DropdownMenuSeparatorProps = AsChildPrimitiveProps<typeof DropdownMenuPrimitive.Separator>\n\nexport type DropdownMenuShortcutProps = React.ComponentProps<'span'>\n\nexport type DropdownMenuSubProps = React.ComponentProps<typeof DropdownMenuPrimitive.SubmenuRoot>\n\nexport type DropdownMenuSubTriggerProps = AsChildPrimitiveProps<typeof DropdownMenuPrimitive.SubmenuTrigger> & {\n /** Adds left padding so the text lines up with items that have an icon or indicator. */\n inset?: boolean\n}\n\nexport type DropdownMenuSubContentProps = DropdownMenuContentProps\n\n// Base UI's `GroupLabel` must live inside a `Group`/`RadioGroup`; this flag lets `DropdownMenuLabel`\n// fall back to a plain element when it is rendered on its own, like Radix's `Label` allowed.\nconst DropdownMenuGroupContext = React.createContext(false)\n\nfunction DropdownMenu({ ...props }: DropdownMenuProps) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({ ...props }: DropdownMenuPortalProps) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n}\n\nfunction DropdownMenuTrigger({ asChild, children, ...props }: DropdownMenuTriggerProps) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nfunction DropdownMenuContent({\n className,\n side = 'bottom',\n sideOffset = 4,\n align = 'start',\n alignOffset = 0,\n sticky,\n keepMounted,\n asChild,\n children,\n ...props\n}: DropdownMenuContentProps) {\n return (\n <DropdownMenuPortal keepMounted={keepMounted}>\n <DropdownMenuPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n sticky={sticky}\n className=\"isolate z-50 outline-none\"\n >\n <DropdownMenuPrimitive.Popup\n data-slot=\"dropdown-menu-content\"\n className={(state) =>\n cn(\n 'relative z-50 w-(--anchor-width) min-w-32 max-h-(--available-height) outline-none',\n 'origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1',\n 'bg-popover/70 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100',\n 'data-closed:overflow-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 'before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit]',\n 'before:backdrop-blur-2xl before:backdrop-saturate-150',\n '**:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10',\n '**:data-[slot$=-separator]:bg-foreground/5',\n '**:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!',\n '**:data-[variant=destructive]:focus:bg-destructive/10! dark:**:data-[variant=destructive]:focus:bg-destructive/20!',\n '**:data-[variant=destructive]:text-destructive! **:data-[variant=destructive]:**:text-destructive!',\n 'animate-none!',\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n </DropdownMenuPrimitive.Positioner>\n </DropdownMenuPortal>\n )\n}\n\nfunction DropdownMenuGroup({ asChild, children, ...props }: DropdownMenuGroupProps) {\n return (\n <DropdownMenuGroupContext.Provider value={true}>\n <DropdownMenuPrimitive.Group\n data-slot=\"dropdown-menu-group\"\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n </DropdownMenuGroupContext.Provider>\n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n asChild,\n children,\n ...props\n}: DropdownMenuItemProps) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={(state) =>\n cn(\n 'group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm',\n 'select-none outline-hidden',\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'data-inset:pl-7',\n 'data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive',\n 'dark:data-[variant=destructive]:focus:bg-destructive/20',\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n 'data-[variant=destructive]:*:[svg]:text-destructive',\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({ className, children, inset, asChild, ...props }: DropdownMenuCheckboxItemProps) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n data-inset={inset}\n className={(state) =>\n cn(\n 'relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm',\n 'select-none outline-hidden',\n 'focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground',\n 'data-inset:pl-7',\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n >\n {!asChild && (\n <span\n data-slot=\"dropdown-menu-checkbox-item-indicator\"\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n >\n <DropdownMenuPrimitive.CheckboxItemIndicator>\n <IconCheck />\n </DropdownMenuPrimitive.CheckboxItemIndicator>\n </span>\n )}\n {!asChild && children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({ asChild, children, ...props }: DropdownMenuRadioGroupProps) {\n return (\n <DropdownMenuGroupContext.Provider value={true}>\n <DropdownMenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n </DropdownMenuGroupContext.Provider>\n )\n}\n\nfunction DropdownMenuRadioItem({ className, children, inset, asChild, ...props }: DropdownMenuRadioItemProps) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n data-inset={inset}\n className={(state) =>\n cn(\n 'relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm',\n 'select-none outline-hidden',\n 'focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground',\n 'data-inset:pl-7',\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n >\n {!asChild && (\n <span\n data-slot=\"dropdown-menu-radio-item-indicator\"\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n >\n <DropdownMenuPrimitive.RadioItemIndicator>\n <IconCheck />\n </DropdownMenuPrimitive.RadioItemIndicator>\n </span>\n )}\n {!asChild && children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({ className, inset, asChild, children, ...props }: DropdownMenuLabelProps) {\n const isInsideGroup = React.useContext(DropdownMenuGroupContext)\n const labelProps = {\n 'data-slot': 'dropdown-menu-label',\n 'data-inset': inset,\n className: cn('px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7', className),\n ...props\n }\n\n if (isInsideGroup) {\n return <DropdownMenuPrimitive.GroupLabel {...labelProps} {...toAsChildRenderProps(asChild, children)} />\n }\n\n return (\n <DropdownMenuStandaloneLabel {...labelProps} asChild={asChild}>\n {children}\n </DropdownMenuStandaloneLabel>\n )\n}\n\nfunction DropdownMenuStandaloneLabel(props: AsChildProps<'div'>) {\n return useAsChild('div', { ...props })\n}\n\nfunction DropdownMenuSeparator({ className, asChild, children, ...props }: DropdownMenuSeparatorProps) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={(state) => cn('bg-border -mx-1 my-1 h-px', resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n 'ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSub({ ...props }: DropdownMenuSubProps) {\n return <DropdownMenuPrimitive.SubmenuRoot data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({ className, inset, children, asChild, ...props }: DropdownMenuSubTriggerProps) {\n return (\n <DropdownMenuPrimitive.SubmenuTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={(state) =>\n cn(\n 'flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm',\n 'select-none outline-hidden',\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n >\n {!asChild && children}\n {!asChild && <IconChevronRight className=\"ml-auto\" />}\n </DropdownMenuPrimitive.SubmenuTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({\n className,\n side = 'right',\n sideOffset = 0,\n align = 'start',\n alignOffset = -3,\n sticky,\n keepMounted,\n asChild,\n children,\n ...props\n}: DropdownMenuSubContentProps) {\n return (\n <DropdownMenuPortal keepMounted={keepMounted}>\n <DropdownMenuPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n sticky={sticky}\n className=\"isolate z-50 outline-none\"\n >\n <DropdownMenuPrimitive.Popup\n data-slot=\"dropdown-menu-sub-content\"\n className={(state) =>\n cn(\n 'relative z-50 min-w-24 origin-(--transform-origin) overflow-hidden rounded-lg p-1 outline-none',\n 'bg-popover/70 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100',\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 'before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit]',\n 'before:backdrop-blur-2xl before:backdrop-saturate-150',\n '**:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10',\n '**:data-[slot$=-separator]:bg-foreground/5',\n '**:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!',\n '**:data-[variant=destructive]:focus:bg-destructive/10! dark:**:data-[variant=destructive]:focus:bg-destructive/20!',\n '**:data-[variant=destructive]:text-destructive! **:data-[variant=destructive]:**:text-destructive!',\n 'animate-none!',\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n </DropdownMenuPrimitive.Positioner>\n </DropdownMenuPortal>\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger\n}\n"],"mappings":"wYAkEA,MAAMG,EAA2BD,EAAM,cAAc,EAAK,EAE1D,SAAS,aAAa,CAAE,GAAGE,GAA4B,CACrD,MAAO,kBAACJ,EAAsB,KAAvB,CAA4B,YAAU,gBAAgB,GAAII,CAAQ,CAAA,CAC3E,CAEA,SAAS,mBAAmB,CAAE,GAAGA,GAAkC,CACjE,MAAO,kBAACJ,EAAsB,OAAvB,CAA8B,YAAU,uBAAuB,GAAII,CAAQ,CAAA,CACpF,CAEA,SAAS,oBAAoB,CAAE,UAAS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