@kushagradhawan/kookie-ui 0.1.17 → 0.1.18

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 (276) hide show
  1. package/components.css +3730 -1072
  2. package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
  3. package/dist/cjs/components/_internal/base-button.js +1 -1
  4. package/dist/cjs/components/_internal/base-button.js.map +3 -3
  5. package/dist/cjs/components/_internal/base-button.props.d.ts +9 -0
  6. package/dist/cjs/components/_internal/base-button.props.d.ts.map +1 -1
  7. package/dist/cjs/components/_internal/base-button.props.js +1 -1
  8. package/dist/cjs/components/_internal/base-button.props.js.map +3 -3
  9. package/dist/cjs/components/_internal/base-menu.props.d.ts +5 -0
  10. package/dist/cjs/components/_internal/base-menu.props.d.ts.map +1 -1
  11. package/dist/cjs/components/_internal/base-menu.props.js +1 -1
  12. package/dist/cjs/components/_internal/base-menu.props.js.map +3 -3
  13. package/dist/cjs/components/_internal/base-tab-list.props.d.ts +5 -0
  14. package/dist/cjs/components/_internal/base-tab-list.props.d.ts.map +1 -1
  15. package/dist/cjs/components/_internal/base-tab-list.props.js +1 -1
  16. package/dist/cjs/components/_internal/base-tab-list.props.js.map +3 -3
  17. package/dist/cjs/components/alert-dialog.d.ts.map +1 -1
  18. package/dist/cjs/components/alert-dialog.js +1 -1
  19. package/dist/cjs/components/alert-dialog.js.map +3 -3
  20. package/dist/cjs/components/avatar.d.ts.map +1 -1
  21. package/dist/cjs/components/avatar.js +1 -1
  22. package/dist/cjs/components/avatar.js.map +3 -3
  23. package/dist/cjs/components/avatar.props.d.ts +6 -1
  24. package/dist/cjs/components/avatar.props.d.ts.map +1 -1
  25. package/dist/cjs/components/avatar.props.js +1 -1
  26. package/dist/cjs/components/avatar.props.js.map +3 -3
  27. package/dist/cjs/components/badge.d.ts.map +1 -1
  28. package/dist/cjs/components/badge.js +1 -1
  29. package/dist/cjs/components/badge.js.map +3 -3
  30. package/dist/cjs/components/badge.props.d.ts +6 -1
  31. package/dist/cjs/components/badge.props.d.ts.map +1 -1
  32. package/dist/cjs/components/badge.props.js +1 -1
  33. package/dist/cjs/components/badge.props.js.map +2 -2
  34. package/dist/cjs/components/callout.d.ts.map +1 -1
  35. package/dist/cjs/components/callout.js +1 -1
  36. package/dist/cjs/components/callout.js.map +3 -3
  37. package/dist/cjs/components/callout.props.d.ts +5 -0
  38. package/dist/cjs/components/callout.props.d.ts.map +1 -1
  39. package/dist/cjs/components/callout.props.js +1 -1
  40. package/dist/cjs/components/callout.props.js.map +3 -3
  41. package/dist/cjs/components/card.d.ts.map +1 -1
  42. package/dist/cjs/components/card.js +1 -1
  43. package/dist/cjs/components/card.js.map +3 -3
  44. package/dist/cjs/components/card.props.d.ts +11 -2
  45. package/dist/cjs/components/card.props.d.ts.map +1 -1
  46. package/dist/cjs/components/card.props.js +1 -1
  47. package/dist/cjs/components/card.props.js.map +3 -3
  48. package/dist/cjs/components/context-menu.d.ts.map +1 -1
  49. package/dist/cjs/components/context-menu.js +1 -1
  50. package/dist/cjs/components/context-menu.js.map +3 -3
  51. package/dist/cjs/components/dialog.d.ts.map +1 -1
  52. package/dist/cjs/components/dialog.js +1 -1
  53. package/dist/cjs/components/dialog.js.map +3 -3
  54. package/dist/cjs/components/dialog.props.d.ts +5 -0
  55. package/dist/cjs/components/dialog.props.d.ts.map +1 -1
  56. package/dist/cjs/components/dialog.props.js +1 -1
  57. package/dist/cjs/components/dialog.props.js.map +3 -3
  58. package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
  59. package/dist/cjs/components/dropdown-menu.js +1 -1
  60. package/dist/cjs/components/dropdown-menu.js.map +3 -3
  61. package/dist/cjs/components/image.d.ts +6 -1
  62. package/dist/cjs/components/image.d.ts.map +1 -1
  63. package/dist/cjs/components/image.js +1 -1
  64. package/dist/cjs/components/image.js.map +3 -3
  65. package/dist/cjs/components/popover.d.ts.map +1 -1
  66. package/dist/cjs/components/popover.js +1 -1
  67. package/dist/cjs/components/popover.js.map +3 -3
  68. package/dist/cjs/components/popover.props.d.ts +5 -0
  69. package/dist/cjs/components/popover.props.d.ts.map +1 -1
  70. package/dist/cjs/components/popover.props.js +1 -1
  71. package/dist/cjs/components/popover.props.js.map +3 -3
  72. package/dist/cjs/components/select.d.ts.map +1 -1
  73. package/dist/cjs/components/select.js +1 -1
  74. package/dist/cjs/components/select.js.map +3 -3
  75. package/dist/cjs/components/select.props.d.ts +6 -1
  76. package/dist/cjs/components/select.props.d.ts.map +1 -1
  77. package/dist/cjs/components/select.props.js +1 -1
  78. package/dist/cjs/components/select.props.js.map +2 -2
  79. package/dist/cjs/components/sidebar.d.ts +13 -2
  80. package/dist/cjs/components/sidebar.d.ts.map +1 -1
  81. package/dist/cjs/components/sidebar.js +1 -1
  82. package/dist/cjs/components/sidebar.js.map +3 -3
  83. package/dist/cjs/components/sidebar.props.d.ts +5 -0
  84. package/dist/cjs/components/sidebar.props.d.ts.map +1 -1
  85. package/dist/cjs/components/sidebar.props.js +1 -1
  86. package/dist/cjs/components/sidebar.props.js.map +2 -2
  87. package/dist/cjs/components/tabs.d.ts.map +1 -1
  88. package/dist/cjs/components/tabs.js +1 -1
  89. package/dist/cjs/components/tabs.js.map +3 -3
  90. package/dist/cjs/components/text-area.d.ts.map +1 -1
  91. package/dist/cjs/components/text-area.js +1 -1
  92. package/dist/cjs/components/text-area.js.map +3 -3
  93. package/dist/cjs/components/text-area.props.d.ts +6 -1
  94. package/dist/cjs/components/text-area.props.d.ts.map +1 -1
  95. package/dist/cjs/components/text-area.props.js +1 -1
  96. package/dist/cjs/components/text-area.props.js.map +3 -3
  97. package/dist/cjs/components/text-field.d.ts.map +1 -1
  98. package/dist/cjs/components/text-field.js +2 -2
  99. package/dist/cjs/components/text-field.js.map +3 -3
  100. package/dist/cjs/components/text-field.props.d.ts +6 -1
  101. package/dist/cjs/components/text-field.props.d.ts.map +1 -1
  102. package/dist/cjs/components/text-field.props.js +1 -1
  103. package/dist/cjs/components/text-field.props.js.map +3 -3
  104. package/dist/cjs/components/theme.d.ts.map +1 -1
  105. package/dist/cjs/components/theme.js +1 -1
  106. package/dist/cjs/components/theme.js.map +2 -2
  107. package/dist/cjs/helpers/map-prop-values.js +1 -1
  108. package/dist/cjs/helpers/map-prop-values.js.map +2 -2
  109. package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
  110. package/dist/esm/components/_internal/base-button.js +1 -1
  111. package/dist/esm/components/_internal/base-button.js.map +3 -3
  112. package/dist/esm/components/_internal/base-button.props.d.ts +9 -0
  113. package/dist/esm/components/_internal/base-button.props.d.ts.map +1 -1
  114. package/dist/esm/components/_internal/base-button.props.js +1 -1
  115. package/dist/esm/components/_internal/base-button.props.js.map +3 -3
  116. package/dist/esm/components/_internal/base-menu.props.d.ts +5 -0
  117. package/dist/esm/components/_internal/base-menu.props.d.ts.map +1 -1
  118. package/dist/esm/components/_internal/base-menu.props.js +1 -1
  119. package/dist/esm/components/_internal/base-menu.props.js.map +3 -3
  120. package/dist/esm/components/_internal/base-tab-list.props.d.ts +5 -0
  121. package/dist/esm/components/_internal/base-tab-list.props.d.ts.map +1 -1
  122. package/dist/esm/components/_internal/base-tab-list.props.js +1 -1
  123. package/dist/esm/components/_internal/base-tab-list.props.js.map +3 -3
  124. package/dist/esm/components/alert-dialog.d.ts.map +1 -1
  125. package/dist/esm/components/alert-dialog.js +1 -1
  126. package/dist/esm/components/alert-dialog.js.map +3 -3
  127. package/dist/esm/components/avatar.d.ts.map +1 -1
  128. package/dist/esm/components/avatar.js +1 -1
  129. package/dist/esm/components/avatar.js.map +3 -3
  130. package/dist/esm/components/avatar.props.d.ts +6 -1
  131. package/dist/esm/components/avatar.props.d.ts.map +1 -1
  132. package/dist/esm/components/avatar.props.js +1 -1
  133. package/dist/esm/components/avatar.props.js.map +3 -3
  134. package/dist/esm/components/badge.d.ts.map +1 -1
  135. package/dist/esm/components/badge.js +1 -1
  136. package/dist/esm/components/badge.js.map +3 -3
  137. package/dist/esm/components/badge.props.d.ts +6 -1
  138. package/dist/esm/components/badge.props.d.ts.map +1 -1
  139. package/dist/esm/components/badge.props.js +1 -1
  140. package/dist/esm/components/badge.props.js.map +2 -2
  141. package/dist/esm/components/callout.d.ts.map +1 -1
  142. package/dist/esm/components/callout.js +1 -1
  143. package/dist/esm/components/callout.js.map +3 -3
  144. package/dist/esm/components/callout.props.d.ts +5 -0
  145. package/dist/esm/components/callout.props.d.ts.map +1 -1
  146. package/dist/esm/components/callout.props.js +1 -1
  147. package/dist/esm/components/callout.props.js.map +3 -3
  148. package/dist/esm/components/card.d.ts.map +1 -1
  149. package/dist/esm/components/card.js +1 -1
  150. package/dist/esm/components/card.js.map +3 -3
  151. package/dist/esm/components/card.props.d.ts +11 -2
  152. package/dist/esm/components/card.props.d.ts.map +1 -1
  153. package/dist/esm/components/card.props.js +1 -1
  154. package/dist/esm/components/card.props.js.map +3 -3
  155. package/dist/esm/components/context-menu.d.ts.map +1 -1
  156. package/dist/esm/components/context-menu.js +1 -1
  157. package/dist/esm/components/context-menu.js.map +3 -3
  158. package/dist/esm/components/dialog.d.ts.map +1 -1
  159. package/dist/esm/components/dialog.js +1 -1
  160. package/dist/esm/components/dialog.js.map +3 -3
  161. package/dist/esm/components/dialog.props.d.ts +5 -0
  162. package/dist/esm/components/dialog.props.d.ts.map +1 -1
  163. package/dist/esm/components/dialog.props.js +1 -1
  164. package/dist/esm/components/dialog.props.js.map +3 -3
  165. package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
  166. package/dist/esm/components/dropdown-menu.js +1 -1
  167. package/dist/esm/components/dropdown-menu.js.map +3 -3
  168. package/dist/esm/components/image.d.ts +6 -1
  169. package/dist/esm/components/image.d.ts.map +1 -1
  170. package/dist/esm/components/image.js +1 -1
  171. package/dist/esm/components/image.js.map +3 -3
  172. package/dist/esm/components/popover.d.ts.map +1 -1
  173. package/dist/esm/components/popover.js +1 -1
  174. package/dist/esm/components/popover.js.map +3 -3
  175. package/dist/esm/components/popover.props.d.ts +5 -0
  176. package/dist/esm/components/popover.props.d.ts.map +1 -1
  177. package/dist/esm/components/popover.props.js +1 -1
  178. package/dist/esm/components/popover.props.js.map +3 -3
  179. package/dist/esm/components/select.d.ts.map +1 -1
  180. package/dist/esm/components/select.js +1 -1
  181. package/dist/esm/components/select.js.map +3 -3
  182. package/dist/esm/components/select.props.d.ts +6 -1
  183. package/dist/esm/components/select.props.d.ts.map +1 -1
  184. package/dist/esm/components/select.props.js +1 -1
  185. package/dist/esm/components/select.props.js.map +2 -2
  186. package/dist/esm/components/sidebar.d.ts +13 -2
  187. package/dist/esm/components/sidebar.d.ts.map +1 -1
  188. package/dist/esm/components/sidebar.js +1 -1
  189. package/dist/esm/components/sidebar.js.map +3 -3
  190. package/dist/esm/components/sidebar.props.d.ts +5 -0
  191. package/dist/esm/components/sidebar.props.d.ts.map +1 -1
  192. package/dist/esm/components/sidebar.props.js +1 -1
  193. package/dist/esm/components/sidebar.props.js.map +2 -2
  194. package/dist/esm/components/tabs.d.ts.map +1 -1
  195. package/dist/esm/components/tabs.js +1 -1
  196. package/dist/esm/components/tabs.js.map +3 -3
  197. package/dist/esm/components/text-area.d.ts.map +1 -1
  198. package/dist/esm/components/text-area.js +1 -1
  199. package/dist/esm/components/text-area.js.map +3 -3
  200. package/dist/esm/components/text-area.props.d.ts +6 -1
  201. package/dist/esm/components/text-area.props.d.ts.map +1 -1
  202. package/dist/esm/components/text-area.props.js +1 -1
  203. package/dist/esm/components/text-area.props.js.map +3 -3
  204. package/dist/esm/components/text-field.d.ts.map +1 -1
  205. package/dist/esm/components/text-field.js +2 -2
  206. package/dist/esm/components/text-field.js.map +3 -3
  207. package/dist/esm/components/text-field.props.d.ts +6 -1
  208. package/dist/esm/components/text-field.props.d.ts.map +1 -1
  209. package/dist/esm/components/text-field.props.js +1 -1
  210. package/dist/esm/components/text-field.props.js.map +3 -3
  211. package/dist/esm/components/theme.d.ts.map +1 -1
  212. package/dist/esm/components/theme.js +1 -1
  213. package/dist/esm/components/theme.js.map +2 -2
  214. package/dist/esm/helpers/map-prop-values.js +1 -1
  215. package/dist/esm/helpers/map-prop-values.js.map +2 -2
  216. package/package.json +1 -1
  217. package/src/components/_internal/base-button.css +518 -110
  218. package/src/components/_internal/base-button.props.ts +5 -0
  219. package/src/components/_internal/base-button.tsx +4 -0
  220. package/src/components/_internal/base-card.css +59 -11
  221. package/src/components/_internal/base-dialog.css +26 -9
  222. package/src/components/_internal/base-menu.css +192 -21
  223. package/src/components/_internal/base-menu.props.ts +7 -0
  224. package/src/components/_internal/base-tab-list.css +56 -5
  225. package/src/components/_internal/base-tab-list.props.ts +3 -0
  226. package/src/components/alert-dialog.tsx +22 -7
  227. package/src/components/animations.css +31 -0
  228. package/src/components/avatar.css +436 -9
  229. package/src/components/avatar.props.tsx +4 -1
  230. package/src/components/avatar.tsx +19 -6
  231. package/src/components/badge.css +222 -7
  232. package/src/components/badge.props.tsx +3 -1
  233. package/src/components/badge.tsx +3 -2
  234. package/src/components/button.css +17 -17
  235. package/src/components/callout.css +75 -6
  236. package/src/components/callout.props.tsx +3 -0
  237. package/src/components/callout.tsx +6 -5
  238. package/src/components/card.css +361 -44
  239. package/src/components/card.props.tsx +7 -2
  240. package/src/components/card.tsx +7 -1
  241. package/src/components/context-menu.tsx +47 -22
  242. package/src/components/dialog.props.tsx +3 -0
  243. package/src/components/dialog.tsx +22 -7
  244. package/src/components/dropdown-menu.css +10 -10
  245. package/src/components/dropdown-menu.tsx +37 -11
  246. package/src/components/icon-button.css +36 -8
  247. package/src/components/image.tsx +92 -73
  248. package/src/components/kbd.css +122 -54
  249. package/src/components/popover.css +22 -3
  250. package/src/components/popover.props.tsx +3 -0
  251. package/src/components/popover.tsx +15 -8
  252. package/src/components/select.css +386 -95
  253. package/src/components/select.props.tsx +7 -1
  254. package/src/components/select.tsx +21 -13
  255. package/src/components/sidebar.css +201 -86
  256. package/src/components/sidebar.props.tsx +15 -3
  257. package/src/components/sidebar.tsx +306 -235
  258. package/src/components/tabs.css +3 -1
  259. package/src/components/tabs.tsx +8 -3
  260. package/src/components/text-area.css +323 -32
  261. package/src/components/text-area.props.tsx +4 -1
  262. package/src/components/text-area.tsx +3 -2
  263. package/src/components/text-field.css +336 -15
  264. package/src/components/text-field.props.tsx +4 -1
  265. package/src/components/text-field.tsx +5 -7
  266. package/src/components/theme.tsx +11 -9
  267. package/src/helpers/map-prop-values.ts +1 -1
  268. package/src/styles/tokens/color.css +19 -5
  269. package/src/styles/tokens/constants.css +118 -0
  270. package/src/styles/tokens/index.css +1 -0
  271. package/src/styles/tokens/radius.css +9 -6
  272. package/src/styles/tokens/shadow.css +10 -10
  273. package/src/styles/tokens/transition.css +33 -1
  274. package/styles.css +3846 -1089
  275. package/tokens/base.css +51 -22
  276. package/tokens.css +133 -34
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/dialog.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { dialogContentPropDefs } from './dialog.props.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\n\nimport type { DialogContentOwnProps } from './dialog.props.js';\nimport type {\n ComponentPropsWithout,\n RemovedProps,\n ComponentPropsAs,\n} from '../helpers/component-props.js';\n\ninterface DialogRootProps extends ComponentPropsWithout<typeof DialogPrimitive.Root, 'modal'> {}\nconst DialogRoot: React.FC<DialogRootProps> = (props) => <DialogPrimitive.Root {...props} modal />;\nDialogRoot.displayName = 'Dialog.Root';\n\ntype DialogTriggerElement = React.ElementRef<typeof DialogPrimitive.Trigger>;\ninterface DialogTriggerProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Trigger, RemovedProps> {}\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <DialogPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Trigger>\n )\n);\nDialogTrigger.displayName = 'Dialog.Trigger';\n\ntype DialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ninterface DialogContentProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Content, RemovedProps>,\n DialogContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];\n}\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n ({ align, ...props }, forwardedRef) => {\n const { align: alignPropDef, ...propDefs } = dialogContentPropDefs;\n const { className: alignClassName } = extractProps({ align }, { align: alignPropDef });\n const { className, forceMount, container, ...contentProps } = extractProps(props, propDefs);\n return (\n <DialogPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DialogPrimitive.Overlay className=\"rt-BaseDialogOverlay rt-DialogOverlay\">\n <div className=\"rt-BaseDialogScroll rt-DialogScroll\">\n <div\n className={`rt-BaseDialogScrollPadding rt-DialogScrollPadding ${alignClassName}`}\n >\n <DialogPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('rt-BaseDialogContent', 'rt-DialogContent', className)}\n />\n </div>\n </div>\n </DialogPrimitive.Overlay>\n </Theme>\n </DialogPrimitive.Portal>\n );\n }\n);\nDialogContent.displayName = 'Dialog.Content';\n\ntype DialogTitleElement = React.ElementRef<typeof Heading>;\ntype DialogTitleProps = ComponentPropsWithout<typeof Heading, 'asChild'>;\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(\n (props, forwardedRef) => (\n <DialogPrimitive.Title asChild>\n <Heading size=\"5\" mb=\"3\" trim=\"start\" {...props} asChild={false} ref={forwardedRef} />\n </DialogPrimitive.Title>\n )\n);\nDialogTitle.displayName = 'Dialog.Title';\n\ntype DialogDescriptionElement = HTMLParagraphElement;\ntype DialogDescriptionProps = ComponentPropsAs<typeof Text, 'p'>;\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n (props, forwardedRef) => (\n <DialogPrimitive.Description asChild>\n <Text as=\"p\" size=\"3\" {...props} asChild={false} ref={forwardedRef} />\n </DialogPrimitive.Description>\n )\n);\nDialogDescription.displayName = 'Dialog.Description';\n\ntype DialogCloseElement = React.ElementRef<typeof DialogPrimitive.Close>;\ninterface DialogCloseProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Close, RemovedProps> {}\nconst DialogClose = React.forwardRef<DialogCloseElement, DialogCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <DialogPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Close>\n )\n);\nDialogClose.displayName = 'Dialog.Close';\n\nexport {\n DialogRoot as Root,\n DialogTrigger as Trigger,\n DialogContent as Content,\n DialogTitle as Title,\n DialogDescription as Description,\n DialogClose as Close,\n};\n\nexport type {\n DialogRootProps as RootProps,\n DialogTriggerProps as TriggerProps,\n DialogContentProps as ContentProps,\n DialogTitleProps as TitleProps,\n DialogDescriptionProps as DescriptionProps,\n DialogCloseProps as CloseProps,\n};\n"],
5
- "mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,UAAUC,MAAuB,WAE1C,OAAS,yBAAAC,MAA6B,oBACtC,OAAS,WAAAC,MAAe,eACxB,OAAS,QAAAC,MAAY,YACrB,OAAS,SAAAC,MAAa,aACtB,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,uBAAAC,MAA2B,sCAUpC,MAAMC,EAAyCC,GAAUV,EAAA,cAACE,EAAgB,KAAhB,CAAsB,GAAGQ,EAAO,MAAK,GAAC,EAChGD,EAAW,YAAc,cAKzB,MAAME,EAAgBX,EAAM,WAC1B,CAAC,CAAE,SAAAY,EAAU,GAAGF,CAAM,EAAGG,IACvBb,EAAA,cAACE,EAAgB,QAAhB,CAAyB,GAAGQ,EAAO,IAAKG,EAAc,QAAO,IAC3DL,EAAoBI,CAAQ,CAC/B,CA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EAAM,WACxB,CAAC,CAAE,SAAAY,EAAU,GAAGF,CAAM,EAAGG,IACvBb,EAAA,cAACE,EAAgB,MAAhB,CAAuB,GAAGQ,EAAO,IAAKG,EAAc,QAAO,IACzDL,EAAoBI,CAAQ,CAC/B,CAEJ,EACAa,EAAY,YAAc",
6
- "names": ["React", "classNames", "DialogPrimitive", "dialogContentPropDefs", "Heading", "Text", "Theme", "extractProps", "requireReactElement", "DialogRoot", "props", "DialogTrigger", "children", "forwardedRef", "DialogContent", "align", "alignPropDef", "propDefs", "alignClassName", "className", "forceMount", "container", "contentProps", "DialogTitle", "DialogDescription", "DialogClose"]
4
+ "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { dialogContentPropDefs } from './dialog.props.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\n\nimport type { DialogContentOwnProps } from './dialog.props.js';\nimport type {\n ComponentPropsWithout,\n RemovedProps,\n ComponentPropsAs,\n} from '../helpers/component-props.js';\n\ninterface DialogRootProps extends ComponentPropsWithout<typeof DialogPrimitive.Root, 'modal'> {}\nconst DialogRoot: React.FC<DialogRootProps> = (props) => <DialogPrimitive.Root {...props} modal />;\nDialogRoot.displayName = 'Dialog.Root';\n\ntype DialogTriggerElement = React.ElementRef<typeof DialogPrimitive.Trigger>;\ninterface DialogTriggerProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Trigger, RemovedProps> {}\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <DialogPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Trigger>\n ),\n);\nDialogTrigger.displayName = 'Dialog.Trigger';\n\ntype DialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ninterface DialogContentProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Content, RemovedProps>,\n DialogContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];\n}\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n ({ align, ...props }, forwardedRef) => {\n const {\n align: alignPropDef,\n panelBackground: panelBackgroundPropDef,\n ...propDefs\n } = dialogContentPropDefs;\n const { className: alignClassName } = extractProps({ align }, { align: alignPropDef });\n const { panelBackground } = extractProps(\n { panelBackground: props.panelBackground },\n { panelBackground: panelBackgroundPropDef },\n );\n const {\n className,\n forceMount,\n container,\n panelBackground: _,\n ...contentProps\n } = extractProps(props, propDefs);\n return (\n <DialogPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DialogPrimitive.Overlay className=\"rt-BaseDialogOverlay rt-DialogOverlay\">\n <div className=\"rt-BaseDialogScroll rt-DialogScroll\">\n <div\n className={`rt-BaseDialogScrollPadding rt-DialogScrollPadding ${alignClassName}`}\n >\n <DialogPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('rt-BaseDialogContent', 'rt-DialogContent', className)}\n data-panel-background={panelBackground}\n />\n </div>\n </div>\n </DialogPrimitive.Overlay>\n </Theme>\n </DialogPrimitive.Portal>\n );\n },\n);\nDialogContent.displayName = 'Dialog.Content';\n\ntype DialogTitleElement = React.ElementRef<typeof Heading>;\ntype DialogTitleProps = ComponentPropsWithout<typeof Heading, 'asChild'>;\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(\n (props, forwardedRef) => (\n <DialogPrimitive.Title asChild>\n <Heading size=\"5\" mb=\"3\" trim=\"start\" {...props} asChild={false} ref={forwardedRef} />\n </DialogPrimitive.Title>\n ),\n);\nDialogTitle.displayName = 'Dialog.Title';\n\ntype DialogDescriptionElement = HTMLParagraphElement;\ntype DialogDescriptionProps = ComponentPropsAs<typeof Text, 'p'>;\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n (props, forwardedRef) => (\n <DialogPrimitive.Description asChild>\n <Text as=\"p\" size=\"3\" {...props} asChild={false} ref={forwardedRef} />\n </DialogPrimitive.Description>\n ),\n);\nDialogDescription.displayName = 'Dialog.Description';\n\ntype DialogCloseElement = React.ElementRef<typeof DialogPrimitive.Close>;\ninterface DialogCloseProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Close, RemovedProps> {}\nconst DialogClose = React.forwardRef<DialogCloseElement, DialogCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <DialogPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Close>\n ),\n);\nDialogClose.displayName = 'Dialog.Close';\n\nexport {\n DialogRoot as Root,\n DialogTrigger as Trigger,\n DialogContent as Content,\n DialogTitle as Title,\n DialogDescription as Description,\n DialogClose as Close,\n};\n\nexport type {\n DialogRootProps as RootProps,\n DialogTriggerProps as TriggerProps,\n DialogContentProps as ContentProps,\n DialogTitleProps as TitleProps,\n DialogDescriptionProps as DescriptionProps,\n DialogCloseProps as CloseProps,\n};\n"],
5
+ "mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,UAAUC,MAAuB,WAE1C,OAAS,yBAAAC,MAA6B,oBACtC,OAAS,WAAAC,MAAe,eACxB,OAAS,QAAAC,MAAY,YACrB,OAAS,SAAAC,MAAa,aACtB,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,uBAAAC,MAA2B,sCAUpC,MAAMC,EAAyCC,GAAUV,EAAA,cAACE,EAAgB,KAAhB,CAAsB,GAAGQ,EAAO,MAAK,GAAC,EAChGD,EAAW,YAAc,cAKzB,MAAME,EAAgBX,EAAM,WAC1B,CAAC,CAAE,SAAAY,EAAU,GAAGF,CAAM,EAAGG,IACvBb,EAAA,cAACE,EAAgB,QAAhB,CAAyB,GAAGQ,EAAO,IAAKG,EAAc,QAAO,IAC3DL,EAAoBI,CAAQ,CAC/B,CAEJ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CF,EAAA,cAACK,EAAA,CAAK,GAAG,IAAI,KAAK,IAAK,GAAGK,EAAO,QAAS,GAAO,IAAKG,EAAc,CACtE,CAEJ,EACAc,EAAkB,YAAc,qBAKhC,MAAMC,EAAc5B,EAAM,WACxB,CAAC,CAAE,SAAAY,EAAU,GAAGF,CAAM,EAAGG,IACvBb,EAAA,cAACE,EAAgB,MAAhB,CAAuB,GAAGQ,EAAO,IAAKG,EAAc,QAAO,IACzDL,EAAoBI,CAAQ,CAC/B,CAEJ,EACAgB,EAAY,YAAc",
6
+ "names": ["React", "classNames", "DialogPrimitive", "dialogContentPropDefs", "Heading", "Text", "Theme", "extractProps", "requireReactElement", "DialogRoot", "props", "DialogTrigger", "children", "forwardedRef", "DialogContent", "align", "alignPropDef", "panelBackgroundPropDef", "propDefs", "alignClassName", "panelBackground", "className", "forceMount", "container", "_", "contentProps", "DialogTitle", "DialogDescription", "DialogClose"]
7
7
  }
@@ -33,6 +33,11 @@ declare const dialogContentPropDefs: {
33
33
  default: "3";
34
34
  responsive: true;
35
35
  };
36
+ panelBackground: {
37
+ type: "enum";
38
+ values: readonly ["solid", "translucent"];
39
+ default: undefined;
40
+ };
36
41
  width: {
37
42
  type: "string";
38
43
  className: string;
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.props.d.ts","sourceRoot":"","sources":["../../../src/components/dialog.props.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD,OAAO,KAAK,EAAW,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAMrE,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyB1B,CAAC;AAEF,KAAK,qBAAqB,GAAG,eAAe,CAC1C,OAAO,qBAAqB,GAAG,OAAO,cAAc,GAAG,OAAO,aAAa,CAC5E,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC;AACjC,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
1
+ {"version":3,"file":"dialog.props.d.ts","sourceRoot":"","sources":["../../../src/components/dialog.props.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD,OAAO,KAAK,EAAW,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAOrE,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2B1B,CAAC;AAEF,KAAK,qBAAqB,GAAG,eAAe,CAC1C,OAAO,qBAAqB,GAAG,OAAO,cAAc,GAAG,OAAO,aAAa,CAC5E,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC;AACjC,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{asChildPropDef as t}from"../props/as-child.prop.js";import{widthPropDefs as e}from"../props/width.props.js";import{heightPropDefs as o}from"../props/height.props.js";const a=["start","center"],r=["1","2","3","4"],s={...t,align:{type:"enum",className:"rt-r-align",values:["start","center"],default:"center"},size:{type:"enum",className:"rt-r-size",values:r,default:"3",responsive:!0},width:e.width,minWidth:e.minWidth,maxWidth:{...e.maxWidth,default:"600px"},...o};export{s as dialogContentPropDefs};
1
+ import{asChildPropDef as t}from"../props/as-child.prop.js";import{widthPropDefs as e}from"../props/width.props.js";import{heightPropDefs as o}from"../props/height.props.js";const f=["start","center"],n=["1","2","3","4"],r=["solid","translucent"],s={...t,align:{type:"enum",className:"rt-r-align",values:["start","center"],default:"center"},size:{type:"enum",className:"rt-r-size",values:n,default:"3",responsive:!0},panelBackground:{type:"enum",values:r,default:void 0},width:e.width,minWidth:e.minWidth,maxWidth:{...e.maxWidth,default:"600px"},...o};export{s as dialogContentPropDefs};
2
2
  //# sourceMappingURL=dialog.props.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/dialog.props.tsx"],
4
- "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst alignValues = ['start', 'center'] as const;\nconst contentSizes = ['1', '2', '3', '4'] as const;\n\nconst dialogContentPropDefs = {\n ...asChildPropDef,\n align: {\n type: 'enum',\n className: 'rt-r-align',\n values: ['start', 'center'],\n default: 'center',\n },\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '3',\n responsive: true,\n },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '600px' },\n ...heightPropDefs,\n} satisfies {\n align: PropDef<(typeof alignValues)[number]>;\n size: PropDef<(typeof contentSizes)[number]>;\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype DialogContentOwnProps = GetPropDefTypes<\n typeof dialogContentPropDefs & typeof asChildPropDef & typeof widthPropDefs\n>;\n\nexport { dialogContentPropDefs };\nexport type { DialogContentOwnProps };\n"],
5
- "mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,iBAAAC,MAAqB,0BAC9B,OAAS,kBAAAC,MAAsB,2BAK/B,MAAMC,EAAc,CAAC,QAAS,QAAQ,EAChCC,EAAe,CAAC,IAAK,IAAK,IAAK,GAAG,EAElCC,EAAwB,CAC5B,GAAGL,EACH,MAAO,CACL,KAAM,OACN,UAAW,aACX,OAAQ,CAAC,QAAS,QAAQ,EAC1B,QAAS,QACX,EACA,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQI,EACR,QAAS,IACT,WAAY,EACd,EACA,MAAOH,EAAc,MACrB,SAAUA,EAAc,SACxB,SAAU,CAAE,GAAGA,EAAc,SAAU,QAAS,OAAQ,EACxD,GAAGC,CACL",
6
- "names": ["asChildPropDef", "widthPropDefs", "heightPropDefs", "alignValues", "contentSizes", "dialogContentPropDefs"]
4
+ "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst alignValues = ['start', 'center'] as const;\nconst contentSizes = ['1', '2', '3', '4'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst dialogContentPropDefs = {\n ...asChildPropDef,\n align: {\n type: 'enum',\n className: 'rt-r-align',\n values: ['start', 'center'],\n default: 'center',\n },\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '3',\n responsive: true,\n },\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '600px' },\n ...heightPropDefs,\n} satisfies {\n align: PropDef<(typeof alignValues)[number]>;\n size: PropDef<(typeof contentSizes)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype DialogContentOwnProps = GetPropDefTypes<\n typeof dialogContentPropDefs & typeof asChildPropDef & typeof widthPropDefs\n>;\n\nexport { dialogContentPropDefs };\nexport type { DialogContentOwnProps };\n"],
5
+ "mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,iBAAAC,MAAqB,0BAC9B,OAAS,kBAAAC,MAAsB,2BAK/B,MAAMC,EAAc,CAAC,QAAS,QAAQ,EAChCC,EAAe,CAAC,IAAK,IAAK,IAAK,GAAG,EAClCC,EAAmB,CAAC,QAAS,aAAa,EAE1CC,EAAwB,CAC5B,GAAGN,EACH,MAAO,CACL,KAAM,OACN,UAAW,aACX,OAAQ,CAAC,QAAS,QAAQ,EAC1B,QAAS,QACX,EACA,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQI,EACR,QAAS,IACT,WAAY,EACd,EACA,gBAAiB,CAAE,KAAM,OAAQ,OAAQC,EAAkB,QAAS,MAAU,EAC9E,MAAOJ,EAAc,MACrB,SAAUA,EAAc,SACxB,SAAU,CAAE,GAAGA,EAAc,SAAU,QAAS,OAAQ,EACxD,GAAGC,CACL",
6
+ "names": ["asChildPropDef", "widthPropDefs", "heightPropDefs", "alignValues", "contentSizes", "panelBackgrounds", "dialogContentPropDefs"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,IAAI,qBAAqB,EAAQ,MAAM,UAAU,CAAC;AAGvE,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,gCAAgC,EAChC,6BAA6B,EAC9B,MAAM,0BAA0B,CAAC;AAMlC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,UAAU,qBACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC;CAAG;AAC9E,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAErD,CAAC;AAIF,UAAU,wBACR,SAAQ,qBAAqB,CAAC,OAAO,qBAAqB,CAAC,OAAO,EAAE,YAAY,CAAC;CAAG;AACtF,QAAA,MAAM,mBAAm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AAY,EACxC,eAAe,IAAI,GAAG,EACtB,sBAAsB,IAAI,UAAU,EACpC,sBAAsB,IAAI,UAAU,EACpC,qBAAqB,IAAI,SAAS,GACnC,CAAC;AAEF,YAAY,EACV,qBAAqB,IAAI,SAAS,EAClC,wBAAwB,IAAI,YAAY,EACxC,4BAA4B,IAAI,gBAAgB,EAChD,wBAAwB,IAAI,YAAY,EACxC,sBAAsB,IAAI,UAAU,EACpC,qBAAqB,IAAI,SAAS,EAClC,sBAAsB,IAAI,UAAU,EACpC,2BAA2B,IAAI,eAAe,EAC9C,0BAA0B,IAAI,cAAc,EAC5C,6BAA6B,IAAI,iBAAiB,EAClD,oBAAoB,IAAI,QAAQ,EAChC,2BAA2B,IAAI,eAAe,EAC9C,2BAA2B,IAAI,eAAe,EAC9C,0BAA0B,IAAI,cAAc,GAC7C,CAAC"}
@@ -1,2 +1,2 @@
1
- "use client";import*as o from"react";import s from"classnames";import{DropdownMenu as t,Slot as W}from"radix-ui";import{ScrollArea as l}from"./scroll-area.js";import{dropdownMenuContentPropDefs as a,dropdownMenuItemPropDefs as L,dropdownMenuCheckboxItemPropDefs as O,dropdownMenuRadioItemPropDefs as V}from"./dropdown-menu.props.js";import{Theme as P,useThemeContext as j}from"./theme.js";import{ChevronDownIcon as z,ThickCheckIcon as A,ThickChevronRightIcon as F,ThickDotIcon as q}from"./icons.js";import{extractProps as f}from"../helpers/extract-props.js";import{requireReactElement as H}from"../helpers/require-react-element.js";const C=e=>o.createElement(t.Root,{...e});C.displayName="DropdownMenu.Root";const I=o.forwardRef(({children:e,...r},n)=>o.createElement(t.Trigger,{...r,ref:n,asChild:!0},H(e)));I.displayName="DropdownMenu.Trigger";const g=o.createContext({}),h=o.forwardRef((e,r)=>{const n=j(),{size:d=a.size.default,variant:p=a.variant.default,highContrast:i=a.highContrast.default}=e,{className:u,children:m,color:M,container:w,forceMount:D,...k}=f(e,a),c=M||n.accentColor;return o.createElement(t.Portal,{container:w,forceMount:D},o.createElement(P,{asChild:!0},o.createElement(t.Content,{"data-accent-color":c,align:"start",sideOffset:4,collisionPadding:10,...k,asChild:!1,ref:r,className:s("rt-PopperContent","rt-BaseMenuContent","rt-DropdownMenuContent",u)},o.createElement(l,{type:"auto"},o.createElement("div",{className:s("rt-BaseMenuViewport","rt-DropdownMenuViewport")},o.createElement(g.Provider,{value:o.useMemo(()=>({size:d,variant:p,color:c,highContrast:i}),[d,p,c,i])},m))))))});h.displayName="DropdownMenu.Content";const b=o.forwardRef(({className:e,...r},n)=>o.createElement(t.Label,{...r,asChild:!1,ref:n,className:s("rt-BaseMenuLabel","rt-DropdownMenuLabel",e)}));b.displayName="DropdownMenu.Label";const y=o.forwardRef((e,r)=>{const{className:n,children:d,color:p=L.color.default,shortcut:i,...u}=e;return o.createElement(t.Item,{"data-accent-color":p,...u,ref:r,className:s("rt-reset","rt-BaseMenuItem","rt-DropdownMenuItem",n)},o.createElement(W.Slottable,null,d),i&&o.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},i))});y.displayName="DropdownMenu.Item";const R=o.forwardRef(({className:e,...r},n)=>o.createElement(t.Group,{...r,asChild:!1,ref:n,className:s("rt-BaseMenuGroup","rt-DropdownMenuGroup",e)}));R.displayName="DropdownMenu.Group";const v=o.forwardRef(({className:e,...r},n)=>o.createElement(t.RadioGroup,{...r,asChild:!1,ref:n,className:s("rt-BaseMenuRadioGroup","rt-DropdownMenuRadioGroup",e)}));v.displayName="DropdownMenu.RadioGroup";const S=o.forwardRef((e,r)=>{const{children:n,className:d,color:p=V.color.default,...i}=e;return o.createElement(t.RadioItem,{...i,asChild:!1,ref:r,"data-accent-color":p,className:s("rt-BaseMenuItem","rt-BaseMenuRadioItem","rt-DropdownMenuItem","rt-DropdownMenuRadioItem",d)},n,o.createElement(t.ItemIndicator,{className:"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator"},o.createElement(q,{className:"rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon"})))});S.displayName="DropdownMenu.RadioItem";const T=o.forwardRef((e,r)=>{const{children:n,className:d,shortcut:p,color:i=O.color.default,...u}=e;return o.createElement(t.CheckboxItem,{...u,asChild:!1,ref:r,"data-accent-color":i,className:s("rt-BaseMenuItem","rt-BaseMenuCheckboxItem","rt-DropdownMenuItem","rt-DropdownMenuCheckboxItem",d)},n,o.createElement(t.ItemIndicator,{className:"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator"},o.createElement(A,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})),p&&o.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},p))});T.displayName="DropdownMenu.CheckboxItem";const x=e=>o.createElement(t.Sub,{...e});x.displayName="DropdownMenu.Sub";const N=o.forwardRef((e,r)=>{const{className:n,children:d,...p}=e;return o.createElement(t.SubTrigger,{...p,asChild:!1,ref:r,className:s("rt-BaseMenuItem","rt-BaseMenuSubTrigger","rt-DropdownMenuItem","rt-DropdownMenuSubTrigger",n)},d,o.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},o.createElement(F,{className:"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon"})))});N.displayName="DropdownMenu.SubTrigger";const E=o.forwardRef((e,r)=>{const{size:n,variant:d,color:p,highContrast:i}=o.useContext(g),{className:u,children:m,container:M,forceMount:w,...D}=f({size:n,variant:d,color:p,highContrast:i,...e},a);return o.createElement(t.Portal,{container:M,forceMount:w},o.createElement(P,{asChild:!0},o.createElement(t.SubContent,{"data-accent-color":p,alignOffset:-Number(n)*4,sideOffset:1,collisionPadding:10,...D,asChild:!1,ref:r,className:s("rt-PopperContent","rt-BaseMenuContent","rt-BaseMenuSubContent","rt-DropdownMenuContent","rt-DropdownMenuSubContent",u)},o.createElement(l,{type:"auto"},o.createElement("div",{className:s("rt-BaseMenuViewport","rt-DropdownMenuViewport")},m)))))});E.displayName="DropdownMenu.SubContent";const G=o.forwardRef(({className:e,...r},n)=>o.createElement(t.Separator,{...r,asChild:!1,ref:n,className:s("rt-BaseMenuSeparator","rt-DropdownMenuSeparator",e)}));G.displayName="DropdownMenu.Separator";const B=o.forwardRef((e,r)=>o.createElement(z,{...e,ref:r,className:"rt-DropdownMenuTriggerIcon"}));B.displayName="DropdownMenu.TriggerIcon";export{T as CheckboxItem,h as Content,R as Group,y as Item,b as Label,v as RadioGroup,S as RadioItem,C as Root,G as Separator,x as Sub,E as SubContent,N as SubTrigger,I as Trigger,B as TriggerIcon};
1
+ "use client";import*as o from"react";import a from"classnames";import{DropdownMenu as t,Slot as V}from"radix-ui";import{ScrollArea as f}from"./scroll-area.js";import{dropdownMenuContentPropDefs as i,dropdownMenuItemPropDefs as z,dropdownMenuCheckboxItemPropDefs as j,dropdownMenuRadioItemPropDefs as A}from"./dropdown-menu.props.js";import{Theme as C,useThemeContext as K}from"./theme.js";import{ChevronDownIcon as F,ThickCheckIcon as _,ThickChevronRightIcon as q,ThickDotIcon as H}from"./icons.js";import{extractProps as I}from"../helpers/extract-props.js";import{requireReactElement as J}from"../helpers/require-react-element.js";import{Kbd as g}from"./kbd.js";const b=e=>o.createElement(t.Root,{...e});b.displayName="DropdownMenu.Root";const h=o.forwardRef(({children:e,...n},r)=>o.createElement(t.Trigger,{...n,ref:r,asChild:!0},J(e)));h.displayName="DropdownMenu.Trigger";const y=o.createContext({}),v=o.forwardRef((e,n)=>{const r=K(),{size:d=i.size.default,variant:p=i.variant.default,highContrast:u=i.highContrast.default,panelBackground:s=e.panelBackground??r.panelBackground}=e,{className:m,children:M,color:w,container:D,forceMount:l,panelBackground:P,...O}=I(e,i),c=w||r.accentColor;return o.createElement(t.Portal,{container:D,forceMount:l},o.createElement(C,{asChild:!0},o.createElement(t.Content,{"data-accent-color":c,"data-panel-background":s,align:"start",sideOffset:4,collisionPadding:10,...O,asChild:!1,ref:n,className:a("rt-PopperContent","rt-BaseMenuContent","rt-DropdownMenuContent",m)},o.createElement(f,{type:"auto"},o.createElement("div",{className:a("rt-BaseMenuViewport","rt-DropdownMenuViewport")},o.createElement(y.Provider,{value:o.useMemo(()=>({size:d,variant:p,color:c,highContrast:u,panelBackground:s}),[d,p,c,u,s])},M))))))});v.displayName="DropdownMenu.Content";const R=o.forwardRef(({className:e,...n},r)=>o.createElement(t.Label,{...n,asChild:!1,ref:r,className:a("rt-BaseMenuLabel","rt-DropdownMenuLabel",e)}));R.displayName="DropdownMenu.Label";const S=o.forwardRef((e,n)=>{const{className:r,children:d,color:p=z.color.default,shortcut:u,...s}=e;return o.createElement(t.Item,{"data-accent-color":p,...s,ref:n,className:a("rt-reset","rt-BaseMenuItem","rt-DropdownMenuItem",r)},o.createElement(V.Slottable,null,d),u&&o.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},o.createElement(g,{size:"1"},u)))});S.displayName="DropdownMenu.Item";const T=o.forwardRef(({className:e,...n},r)=>o.createElement(t.Group,{...n,asChild:!1,ref:r,className:a("rt-BaseMenuGroup","rt-DropdownMenuGroup",e)}));T.displayName="DropdownMenu.Group";const x=o.forwardRef(({className:e,...n},r)=>o.createElement(t.RadioGroup,{...n,asChild:!1,ref:r,className:a("rt-BaseMenuRadioGroup","rt-DropdownMenuRadioGroup",e)}));x.displayName="DropdownMenu.RadioGroup";const N=o.forwardRef((e,n)=>{const{children:r,className:d,color:p=A.color.default,...u}=e;return o.createElement(t.RadioItem,{...u,asChild:!1,ref:n,"data-accent-color":p,className:a("rt-BaseMenuItem","rt-BaseMenuRadioItem","rt-DropdownMenuItem","rt-DropdownMenuRadioItem",d)},r,o.createElement(t.ItemIndicator,{className:"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator"},o.createElement(H,{className:"rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon"})))});N.displayName="DropdownMenu.RadioItem";const E=o.forwardRef((e,n)=>{const{children:r,className:d,shortcut:p,color:u=j.color.default,...s}=e;return o.createElement(t.CheckboxItem,{...s,asChild:!1,ref:n,"data-accent-color":u,className:a("rt-BaseMenuItem","rt-BaseMenuCheckboxItem","rt-DropdownMenuItem","rt-DropdownMenuCheckboxItem",d)},r,o.createElement(t.ItemIndicator,{className:"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator"},o.createElement(_,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})),p&&o.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},o.createElement(g,{size:"1"},p)))});E.displayName="DropdownMenu.CheckboxItem";const G=e=>o.createElement(t.Sub,{...e});G.displayName="DropdownMenu.Sub";const k=o.forwardRef((e,n)=>{const{className:r,children:d,...p}=e;return o.createElement(t.SubTrigger,{...p,asChild:!1,ref:n,className:a("rt-BaseMenuItem","rt-BaseMenuSubTrigger","rt-DropdownMenuItem","rt-DropdownMenuSubTrigger",r)},d,o.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},o.createElement(q,{className:"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon"})))});k.displayName="DropdownMenu.SubTrigger";const B=o.forwardRef((e,n)=>{const{size:r,variant:d,color:p,highContrast:u,panelBackground:s}=o.useContext(y),{className:m,children:M,container:w,forceMount:D,panelBackground:l,...P}=I({size:r,variant:d,color:p,highContrast:u,panelBackground:s,...e},i);return o.createElement(t.Portal,{container:w,forceMount:D},o.createElement(C,{asChild:!0},o.createElement(t.SubContent,{"data-accent-color":p,"data-panel-background":s,alignOffset:-Number(r)*4,sideOffset:1,collisionPadding:10,...P,asChild:!1,ref:n,className:a("rt-PopperContent","rt-BaseMenuContent","rt-BaseMenuSubContent","rt-DropdownMenuContent","rt-DropdownMenuSubContent",m)},o.createElement(f,{type:"auto"},o.createElement("div",{className:a("rt-BaseMenuViewport","rt-DropdownMenuViewport")},M)))))});B.displayName="DropdownMenu.SubContent";const W=o.forwardRef(({className:e,...n},r)=>o.createElement(t.Separator,{...n,asChild:!1,ref:r,className:a("rt-BaseMenuSeparator","rt-DropdownMenuSeparator",e)}));W.displayName="DropdownMenu.Separator";const L=o.forwardRef((e,n)=>o.createElement(F,{...e,ref:n,className:"rt-DropdownMenuTriggerIcon"}));L.displayName="DropdownMenu.TriggerIcon";export{E as CheckboxItem,v as Content,T as Group,S as Item,R as Label,x as RadioGroup,N as RadioItem,b as Root,W as Separator,G as Sub,B as SubContent,k as SubTrigger,h as Trigger,L as TriggerIcon};
2
2
  //# sourceMappingURL=dropdown-menu.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/dropdown-menu.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { DropdownMenu as DropdownMenuPrimitive, Slot } from 'radix-ui';\n\nimport { ScrollArea } from './scroll-area.js';\nimport {\n dropdownMenuContentPropDefs,\n dropdownMenuItemPropDefs,\n dropdownMenuCheckboxItemPropDefs,\n dropdownMenuRadioItemPropDefs,\n} from './dropdown-menu.props.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { ChevronDownIcon, ThickCheckIcon, ThickChevronRightIcon, ThickDotIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\n\nimport type { IconProps } from './icons.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ninterface DropdownMenuRootProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {}\nconst DropdownMenuRoot: React.FC<DropdownMenuRootProps> = (props) => (\n <DropdownMenuPrimitive.Root {...props} />\n);\nDropdownMenuRoot.displayName = 'DropdownMenu.Root';\n\ntype DropdownMenuTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.Trigger>;\ninterface DropdownMenuTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Trigger, RemovedProps> {}\nconst DropdownMenuTrigger = React.forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DropdownMenuPrimitive.Trigger>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenu.Trigger';\n\ntype DropdownMenuContentOwnProps = GetPropDefTypes<typeof dropdownMenuContentPropDefs>;\ntype DropdownMenuContentContextValue = DropdownMenuContentOwnProps;\nconst DropdownMenuContentContext = React.createContext<DropdownMenuContentContextValue>({});\ntype DropdownMenuContentElement = React.ElementRef<typeof DropdownMenuPrimitive.Content>;\ninterface DropdownMenuContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Content, RemovedProps>,\n DropdownMenuContentContextValue {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n}\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n const {\n size = dropdownMenuContentPropDefs.size.default,\n variant = dropdownMenuContentPropDefs.variant.default,\n highContrast = dropdownMenuContentPropDefs.highContrast.default,\n } = props;\n const { className, children, color, container, forceMount, ...contentProps } = extractProps(\n props,\n dropdownMenuContentPropDefs,\n );\n const resolvedColor = color || themeContext.accentColor;\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.Content\n data-accent-color={resolvedColor}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n {...contentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-PopperContent',\n 'rt-BaseMenuContent',\n 'rt-DropdownMenuContent',\n className,\n )}\n >\n <ScrollArea type=\"auto\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport')}>\n <DropdownMenuContentContext.Provider\n value={React.useMemo(\n () => ({ size, variant, color: resolvedColor, highContrast }),\n [size, variant, resolvedColor, highContrast],\n )}\n >\n {children}\n </DropdownMenuContentContext.Provider>\n </div>\n </ScrollArea>\n </DropdownMenuPrimitive.Content>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n },\n);\nDropdownMenuContent.displayName = 'DropdownMenu.Content';\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof DropdownMenuPrimitive.Label>;\ninterface DropdownMenuLabelProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Label, RemovedProps> {}\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Label\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuLabel', 'rt-DropdownMenuLabel', className)}\n />\n ),\n);\nDropdownMenuLabel.displayName = 'DropdownMenu.Label';\n\ntype DropdownMenuItemElement = React.ElementRef<typeof DropdownMenuPrimitive.Item>;\ntype DropdownMenuItemOwnProps = GetPropDefTypes<typeof dropdownMenuItemPropDefs>;\ninterface DropdownMenuItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Item, RemovedProps>,\n DropdownMenuItemOwnProps {}\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props, forwardedRef) => {\n const {\n className,\n children,\n color = dropdownMenuItemPropDefs.color.default,\n shortcut,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.Item\n data-accent-color={color}\n {...itemProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-DropdownMenuItem', className)}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n {shortcut && <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">{shortcut}</div>}\n </DropdownMenuPrimitive.Item>\n );\n },\n);\nDropdownMenuItem.displayName = 'DropdownMenu.Item';\n\ntype DropdownMenuGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.Group>;\ninterface DropdownMenuGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Group, RemovedProps> {}\nconst DropdownMenuGroup = React.forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Group\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuGroup', 'rt-DropdownMenuGroup', className)}\n />\n ),\n);\nDropdownMenuGroup.displayName = 'DropdownMenu.Group';\n\ntype DropdownMenuRadioGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioGroup, RemovedProps> {}\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.RadioGroup\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuRadioGroup', 'rt-DropdownMenuRadioGroup', className)}\n />\n));\nDropdownMenuRadioGroup.displayName = 'DropdownMenu.RadioGroup';\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemOwnProps = GetPropDefTypes<typeof dropdownMenuRadioItemPropDefs>;\ninterface DropdownMenuRadioItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioItem, RemovedProps>,\n DropdownMenuRadioItemOwnProps {}\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n color = dropdownMenuRadioItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.RadioItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuRadioItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuRadioItem',\n className,\n )}\n >\n {children}\n <DropdownMenuPrimitive.ItemIndicator className=\"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator\">\n <ThickDotIcon className=\"rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </DropdownMenuPrimitive.RadioItem>\n );\n});\nDropdownMenuRadioItem.displayName = 'DropdownMenu.RadioItem';\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>;\ntype DropdownMenuCheckboxItemOwnProps = GetPropDefTypes<typeof dropdownMenuCheckboxItemPropDefs>;\ninterface DropdownMenuCheckboxItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.CheckboxItem, RemovedProps>,\n DropdownMenuCheckboxItemOwnProps {}\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n shortcut,\n color = dropdownMenuCheckboxItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.CheckboxItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuCheckboxItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuCheckboxItem',\n className,\n )}\n >\n {children}\n <DropdownMenuPrimitive.ItemIndicator className=\"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator\">\n <ThickCheckIcon className=\"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n {shortcut && <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">{shortcut}</div>}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n});\nDropdownMenuCheckboxItem.displayName = 'DropdownMenu.CheckboxItem';\n\ninterface DropdownMenuSubProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub> {}\nconst DropdownMenuSub: React.FC<DropdownMenuSubProps> = (props) => (\n <DropdownMenuPrimitive.Sub {...props} />\n);\nDropdownMenuSub.displayName = 'DropdownMenu.Sub';\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>;\ninterface DropdownMenuSubTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubTrigger, RemovedProps> {}\nconst DropdownMenuSubTrigger = React.forwardRef<\n DropdownMenuSubTriggerElement,\n DropdownMenuSubTriggerProps\n>((props, forwardedRef) => {\n const { className, children, ...subTriggerProps } = props;\n return (\n <DropdownMenuPrimitive.SubTrigger\n {...subTriggerProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuSubTrigger',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <ThickChevronRightIcon className=\"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon\" />\n </div>\n </DropdownMenuPrimitive.SubTrigger>\n );\n});\nDropdownMenuSubTrigger.displayName = 'DropdownMenu.SubTrigger';\n\ntype DropdownMenuSubContentElement = React.ElementRef<typeof DropdownMenuPrimitive.SubContent>;\ninterface DropdownMenuSubContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubContent, RemovedProps> {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n}\nconst DropdownMenuSubContent = React.forwardRef<\n DropdownMenuSubContentElement,\n DropdownMenuSubContentProps\n>((props, forwardedRef) => {\n const { size, variant, color, highContrast } = React.useContext(DropdownMenuContentContext);\n const { className, children, container, forceMount, ...subContentProps } = extractProps(\n { size, variant, color, highContrast, ...props },\n dropdownMenuContentPropDefs,\n );\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.SubContent\n data-accent-color={color}\n alignOffset={-Number(size) * 4}\n // Side offset accounts for the outer solid box-shadow\n sideOffset={1}\n collisionPadding={10}\n {...subContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-PopperContent',\n 'rt-BaseMenuContent',\n 'rt-BaseMenuSubContent',\n 'rt-DropdownMenuContent',\n 'rt-DropdownMenuSubContent',\n className,\n )}\n >\n <ScrollArea type=\"auto\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport')}>\n {children}\n </div>\n </ScrollArea>\n </DropdownMenuPrimitive.SubContent>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n});\nDropdownMenuSubContent.displayName = 'DropdownMenu.SubContent';\n\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof DropdownMenuPrimitive.Separator>;\ninterface DropdownMenuSeparatorProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Separator, RemovedProps> {}\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuSeparator', 'rt-DropdownMenuSeparator', className)}\n />\n));\nDropdownMenuSeparator.displayName = 'DropdownMenu.Separator';\n\ntype DropdownMenuTriggerIconElement = React.ElementRef<'svg'>;\ninterface DropdownMenuTriggerIconProps extends IconProps {}\nconst DropdownMenuTriggerIcon = React.forwardRef<\n DropdownMenuTriggerIconElement,\n DropdownMenuTriggerIconProps\n>((props, forwardedRef) => (\n <ChevronDownIcon {...props} ref={forwardedRef} className=\"rt-DropdownMenuTriggerIcon\" />\n));\nDropdownMenuTriggerIcon.displayName = 'DropdownMenu.TriggerIcon';\n\nexport {\n DropdownMenuRoot as Root,\n DropdownMenuTrigger as Trigger,\n DropdownMenuTriggerIcon as TriggerIcon,\n DropdownMenuContent as Content,\n DropdownMenuLabel as Label,\n DropdownMenuItem as Item,\n DropdownMenuGroup as Group,\n DropdownMenuRadioGroup as RadioGroup,\n DropdownMenuRadioItem as RadioItem,\n DropdownMenuCheckboxItem as CheckboxItem,\n DropdownMenuSub as Sub,\n DropdownMenuSubTrigger as SubTrigger,\n DropdownMenuSubContent as SubContent,\n DropdownMenuSeparator as Separator,\n};\n\nexport type {\n DropdownMenuRootProps as RootProps,\n DropdownMenuTriggerProps as TriggerProps,\n DropdownMenuTriggerIconProps as TriggerIconProps,\n DropdownMenuContentProps as ContentProps,\n DropdownMenuLabelProps as LabelProps,\n DropdownMenuItemProps as ItemProps,\n DropdownMenuGroupProps as GroupProps,\n DropdownMenuRadioGroupProps as RadioGroupProps,\n DropdownMenuRadioItemProps as RadioItemProps,\n DropdownMenuCheckboxItemProps as CheckboxItemProps,\n DropdownMenuSubProps as SubProps,\n DropdownMenuSubTriggerProps as SubTriggerProps,\n DropdownMenuSubContentProps as SubContentProps,\n DropdownMenuSeparatorProps as SeparatorProps,\n};\n"],
5
- "mappings": "aAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,gBAAgBC,EAAuB,QAAAC,MAAY,WAE5D,OAAS,cAAAC,MAAkB,mBAC3B,OACE,+BAAAC,EACA,4BAAAC,EACA,oCAAAC,EACA,iCAAAC,MACK,2BACP,OAAS,SAAAC,EAAO,mBAAAC,MAAuB,aACvC,OAAS,mBAAAC,EAAiB,kBAAAC,EAAgB,yBAAAC,EAAuB,gBAAAC,MAAoB,aACrF,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,uBAAAC,MAA2B,sCAQpC,MAAMC,EAAqDC,GACzDlB,EAAA,cAACE,EAAsB,KAAtB,CAA4B,GAAGgB,EAAO,EAEzCD,EAAiB,YAAc,oBAK/B,MAAME,EAAsBnB,EAAM,WAChC,CAAC,CAAE,SAAAoB,EAAU,GAAGF,CAAM,EAAGG,IACvBrB,E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D2B,EAAwB,YAAc",
6
- "names": ["React", "classNames", "DropdownMenuPrimitive", "Slot", "ScrollArea", "dropdownMenuContentPropDefs", "dropdownMenuItemPropDefs", "dropdownMenuCheckboxItemPropDefs", "dropdownMenuRadioItemPropDefs", "Theme", "useThemeContext", "ChevronDownIcon", "ThickCheckIcon", "ThickChevronRightIcon", "ThickDotIcon", "extractProps", "requireReactElement", "DropdownMenuRoot", "props", "DropdownMenuTrigger", "children", "forwardedRef", "DropdownMenuContentContext", "DropdownMenuContent", "themeContext", "size", "variant", "highContrast", "className", "color", "container", "forceMount", "contentProps", "resolvedColor", "DropdownMenuLabel", "DropdownMenuItem", "shortcut", "itemProps", "DropdownMenuGroup", "DropdownMenuRadioGroup", "DropdownMenuRadioItem", "DropdownMenuCheckboxItem", "DropdownMenuSub", "DropdownMenuSubTrigger", "subTriggerProps", "DropdownMenuSubContent", "subContentProps", "DropdownMenuSeparator", "DropdownMenuTriggerIcon"]
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { DropdownMenu as DropdownMenuPrimitive, Slot } from 'radix-ui';\n\nimport { ScrollArea } from './scroll-area.js';\nimport {\n dropdownMenuContentPropDefs,\n dropdownMenuItemPropDefs,\n dropdownMenuCheckboxItemPropDefs,\n dropdownMenuRadioItemPropDefs,\n} from './dropdown-menu.props.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { ChevronDownIcon, ThickCheckIcon, ThickChevronRightIcon, ThickDotIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { Kbd } from './kbd.js';\n\nimport type { IconProps } from './icons.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ninterface DropdownMenuRootProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {}\nconst DropdownMenuRoot: React.FC<DropdownMenuRootProps> = (props) => (\n <DropdownMenuPrimitive.Root {...props} />\n);\nDropdownMenuRoot.displayName = 'DropdownMenu.Root';\n\ntype DropdownMenuTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.Trigger>;\ninterface DropdownMenuTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Trigger, RemovedProps> {}\nconst DropdownMenuTrigger = React.forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DropdownMenuPrimitive.Trigger>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenu.Trigger';\n\ntype DropdownMenuContentOwnProps = GetPropDefTypes<typeof dropdownMenuContentPropDefs>;\ntype DropdownMenuContentContextValue = DropdownMenuContentOwnProps;\nconst DropdownMenuContentContext = React.createContext<DropdownMenuContentContextValue>({});\ntype DropdownMenuContentElement = React.ElementRef<typeof DropdownMenuPrimitive.Content>;\ninterface DropdownMenuContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Content, RemovedProps>,\n DropdownMenuContentContextValue {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n}\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n const {\n size = dropdownMenuContentPropDefs.size.default,\n variant = dropdownMenuContentPropDefs.variant.default,\n highContrast = dropdownMenuContentPropDefs.highContrast.default,\n panelBackground = props.panelBackground ?? themeContext.panelBackground,\n } = props;\n const {\n className,\n children,\n color,\n container,\n forceMount,\n panelBackground: _,\n ...contentProps\n } = extractProps(props, dropdownMenuContentPropDefs);\n const resolvedColor = color || themeContext.accentColor;\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.Content\n data-accent-color={resolvedColor}\n data-panel-background={panelBackground}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n {...contentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-PopperContent',\n 'rt-BaseMenuContent',\n 'rt-DropdownMenuContent',\n className,\n )}\n >\n <ScrollArea type=\"auto\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport')}>\n <DropdownMenuContentContext.Provider\n value={React.useMemo(\n () => ({ size, variant, color: resolvedColor, highContrast, panelBackground }),\n [size, variant, resolvedColor, highContrast, panelBackground],\n )}\n >\n {children}\n </DropdownMenuContentContext.Provider>\n </div>\n </ScrollArea>\n </DropdownMenuPrimitive.Content>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n },\n);\nDropdownMenuContent.displayName = 'DropdownMenu.Content';\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof DropdownMenuPrimitive.Label>;\ninterface DropdownMenuLabelProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Label, RemovedProps> {}\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Label\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuLabel', 'rt-DropdownMenuLabel', className)}\n />\n ),\n);\nDropdownMenuLabel.displayName = 'DropdownMenu.Label';\n\ntype DropdownMenuItemElement = React.ElementRef<typeof DropdownMenuPrimitive.Item>;\ntype DropdownMenuItemOwnProps = GetPropDefTypes<typeof dropdownMenuItemPropDefs>;\ninterface DropdownMenuItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Item, RemovedProps>,\n DropdownMenuItemOwnProps {}\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props, forwardedRef) => {\n const {\n className,\n children,\n color = dropdownMenuItemPropDefs.color.default,\n shortcut,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.Item\n data-accent-color={color}\n {...itemProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-DropdownMenuItem', className)}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n )}\n </DropdownMenuPrimitive.Item>\n );\n },\n);\nDropdownMenuItem.displayName = 'DropdownMenu.Item';\n\ntype DropdownMenuGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.Group>;\ninterface DropdownMenuGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Group, RemovedProps> {}\nconst DropdownMenuGroup = React.forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Group\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuGroup', 'rt-DropdownMenuGroup', className)}\n />\n ),\n);\nDropdownMenuGroup.displayName = 'DropdownMenu.Group';\n\ntype DropdownMenuRadioGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioGroup, RemovedProps> {}\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.RadioGroup\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuRadioGroup', 'rt-DropdownMenuRadioGroup', className)}\n />\n));\nDropdownMenuRadioGroup.displayName = 'DropdownMenu.RadioGroup';\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemOwnProps = GetPropDefTypes<typeof dropdownMenuRadioItemPropDefs>;\ninterface DropdownMenuRadioItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioItem, RemovedProps>,\n DropdownMenuRadioItemOwnProps {}\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n color = dropdownMenuRadioItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.RadioItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuRadioItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuRadioItem',\n className,\n )}\n >\n {children}\n <DropdownMenuPrimitive.ItemIndicator className=\"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator\">\n <ThickDotIcon className=\"rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </DropdownMenuPrimitive.RadioItem>\n );\n});\nDropdownMenuRadioItem.displayName = 'DropdownMenu.RadioItem';\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>;\ntype DropdownMenuCheckboxItemOwnProps = GetPropDefTypes<typeof dropdownMenuCheckboxItemPropDefs>;\ninterface DropdownMenuCheckboxItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.CheckboxItem, RemovedProps>,\n DropdownMenuCheckboxItemOwnProps {}\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n shortcut,\n color = dropdownMenuCheckboxItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.CheckboxItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuCheckboxItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuCheckboxItem',\n className,\n )}\n >\n {children}\n <DropdownMenuPrimitive.ItemIndicator className=\"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator\">\n <ThickCheckIcon className=\"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n )}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n});\nDropdownMenuCheckboxItem.displayName = 'DropdownMenu.CheckboxItem';\n\ninterface DropdownMenuSubProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub> {}\nconst DropdownMenuSub: React.FC<DropdownMenuSubProps> = (props) => (\n <DropdownMenuPrimitive.Sub {...props} />\n);\nDropdownMenuSub.displayName = 'DropdownMenu.Sub';\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>;\ninterface DropdownMenuSubTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubTrigger, RemovedProps> {}\nconst DropdownMenuSubTrigger = React.forwardRef<\n DropdownMenuSubTriggerElement,\n DropdownMenuSubTriggerProps\n>((props, forwardedRef) => {\n const { className, children, ...subTriggerProps } = props;\n return (\n <DropdownMenuPrimitive.SubTrigger\n {...subTriggerProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuSubTrigger',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <ThickChevronRightIcon className=\"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon\" />\n </div>\n </DropdownMenuPrimitive.SubTrigger>\n );\n});\nDropdownMenuSubTrigger.displayName = 'DropdownMenu.SubTrigger';\n\ntype DropdownMenuSubContentElement = React.ElementRef<typeof DropdownMenuPrimitive.SubContent>;\ninterface DropdownMenuSubContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubContent, RemovedProps> {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n}\nconst DropdownMenuSubContent = React.forwardRef<\n DropdownMenuSubContentElement,\n DropdownMenuSubContentProps\n>((props, forwardedRef) => {\n const { size, variant, color, highContrast, panelBackground } = React.useContext(\n DropdownMenuContentContext,\n );\n const {\n className,\n children,\n container,\n forceMount,\n panelBackground: _,\n ...subContentProps\n } = extractProps(\n { size, variant, color, highContrast, panelBackground, ...props },\n dropdownMenuContentPropDefs,\n );\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.SubContent\n data-accent-color={color}\n data-panel-background={panelBackground}\n alignOffset={-Number(size) * 4}\n // Side offset accounts for the outer solid box-shadow\n sideOffset={1}\n collisionPadding={10}\n {...subContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-PopperContent',\n 'rt-BaseMenuContent',\n 'rt-BaseMenuSubContent',\n 'rt-DropdownMenuContent',\n 'rt-DropdownMenuSubContent',\n className,\n )}\n >\n <ScrollArea type=\"auto\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport')}>\n {children}\n </div>\n </ScrollArea>\n </DropdownMenuPrimitive.SubContent>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n});\nDropdownMenuSubContent.displayName = 'DropdownMenu.SubContent';\n\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof DropdownMenuPrimitive.Separator>;\ninterface DropdownMenuSeparatorProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Separator, RemovedProps> {}\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuSeparator', 'rt-DropdownMenuSeparator', className)}\n />\n));\nDropdownMenuSeparator.displayName = 'DropdownMenu.Separator';\n\ntype DropdownMenuTriggerIconElement = React.ElementRef<'svg'>;\ninterface DropdownMenuTriggerIconProps extends IconProps {}\nconst DropdownMenuTriggerIcon = React.forwardRef<\n DropdownMenuTriggerIconElement,\n DropdownMenuTriggerIconProps\n>((props, forwardedRef) => (\n <ChevronDownIcon {...props} ref={forwardedRef} className=\"rt-DropdownMenuTriggerIcon\" />\n));\nDropdownMenuTriggerIcon.displayName = 'DropdownMenu.TriggerIcon';\n\nexport {\n DropdownMenuRoot as Root,\n DropdownMenuTrigger as Trigger,\n DropdownMenuTriggerIcon as TriggerIcon,\n DropdownMenuContent as Content,\n DropdownMenuLabel as Label,\n DropdownMenuItem as Item,\n DropdownMenuGroup as Group,\n DropdownMenuRadioGroup as RadioGroup,\n DropdownMenuRadioItem as RadioItem,\n DropdownMenuCheckboxItem as CheckboxItem,\n DropdownMenuSub as Sub,\n DropdownMenuSubTrigger as SubTrigger,\n DropdownMenuSubContent as SubContent,\n DropdownMenuSeparator as Separator,\n};\n\nexport type {\n DropdownMenuRootProps as RootProps,\n DropdownMenuTriggerProps as TriggerProps,\n DropdownMenuTriggerIconProps as TriggerIconProps,\n DropdownMenuContentProps as ContentProps,\n DropdownMenuLabelProps as LabelProps,\n DropdownMenuItemProps as ItemProps,\n DropdownMenuGroupProps as GroupProps,\n DropdownMenuRadioGroupProps as RadioGroupProps,\n DropdownMenuRadioItemProps as RadioItemProps,\n DropdownMenuCheckboxItemProps as CheckboxItemProps,\n DropdownMenuSubProps as SubProps,\n DropdownMenuSubTriggerProps as SubTriggerProps,\n DropdownMenuSubContentProps as SubContentProps,\n DropdownMenuSeparatorProps as SeparatorProps,\n};\n"],
5
+ "mappings": "aAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,gBAAgBC,EAAuB,QAAAC,MA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WAAtB,CACC,oBAAmB6B,EACnB,wBAAuBF,EACvB,YAAa,CAAC,OAAOH,CAAI,EAAI,EAE7B,WAAY,EACZ,iBAAkB,GACjB,GAAGuB,EACJ,QAAS,GACT,IAAK3B,EACL,UAAWrB,EACT,mBACA,qBACA,wBACA,yBACA,4BACA6B,CACF,GAEA9B,EAAA,cAACI,EAAA,CAAW,KAAK,QACfJ,EAAA,cAAC,OAAI,UAAWC,EAAW,sBAAuB,yBAAyB,GACxEoB,CACH,CACF,CACF,CACF,CACF,CAEJ,CAAC,EACD2B,EAAuB,YAAc,0BAKrC,MAAME,EAAwBlD,EAAM,WAGlC,CAAC,CAAE,UAAA8B,EAAW,GAAGX,CAAM,EAAGG,IAC1BtB,EAAA,cAACE,EAAsB,UAAtB,CACE,GAAGiB,EACJ,QAAS,GACT,IAAKG,EACL,UAAWrB,EAAW,uBAAwB,2BAA4B6B,CAAS,EACrF,CACD,EACDoB,EAAsB,YAAc,yBAIpC,MAAMC,EAA0BnD,EAAM,WAGpC,CAACmB,EAAOG,IACRtB,EAAA,cAACW,EAAA,CAAiB,GAAGQ,EAAO,IAAKG,EAAc,UAAU,6BAA6B,CACvF,EACD6B,EAAwB,YAAc",
6
+ "names": ["React", "classNames", "DropdownMenuPrimitive", "Slot", "ScrollArea", "dropdownMenuContentPropDefs", "dropdownMenuItemPropDefs", "dropdownMenuCheckboxItemPropDefs", "dropdownMenuRadioItemPropDefs", "Theme", "useThemeContext", "ChevronDownIcon", "ThickCheckIcon", "ThickChevronRightIcon", "ThickDotIcon", "extractProps", "requireReactElement", "Kbd", "DropdownMenuRoot", "props", "DropdownMenuTrigger", "children", "forwardedRef", "DropdownMenuContentContext", "DropdownMenuContent", "themeContext", "size", "variant", "highContrast", "panelBackground", "className", "color", "container", "forceMount", "_", "contentProps", "resolvedColor", "DropdownMenuLabel", "DropdownMenuItem", "shortcut", "itemProps", "DropdownMenuGroup", "DropdownMenuRadioGroup", "DropdownMenuRadioItem", "DropdownMenuCheckboxItem", "DropdownMenuSub", "DropdownMenuSubTrigger", "subTriggerProps", "DropdownMenuSubContent", "subContentProps", "DropdownMenuSeparator", "DropdownMenuTriggerIcon"]
7
7
  }
@@ -4,6 +4,7 @@ import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-p
4
4
  import type { MarginProps } from '../props/margin.props.js';
5
5
  import type { WidthProps } from '../props/width.props.js';
6
6
  import type { HeightProps } from '../props/height.props.js';
7
+ import type { LayoutProps } from '../props/layout.props.js';
7
8
  import type { GetPropDefTypes } from '../props/prop-def.js';
8
9
  type ImageOwnProps = GetPropDefTypes<typeof imagePropDefs> & {
9
10
  loading?: 'eager' | 'lazy';
@@ -28,8 +29,12 @@ type ImageOwnProps = GetPropDefTypes<typeof imagePropDefs> & {
28
29
  * Callback fired when the image fails to load.
29
30
  */
30
31
  onError?: (event: React.SyntheticEvent<HTMLImageElement>) => void;
32
+ /**
33
+ * Style object to apply to the wrapper container. Useful for overriding display, width, height, etc.
34
+ */
35
+ wrapperStyle?: React.CSSProperties;
31
36
  };
32
- interface ImageProps extends ComponentPropsWithout<'img', RemovedProps | 'color' | 'width' | 'height' | 'alt'>, MarginProps, WidthProps, HeightProps, ImageOwnProps {
37
+ interface ImageProps extends ComponentPropsWithout<'img', RemovedProps | 'color' | 'width' | 'height' | 'alt'>, MarginProps, WidthProps, HeightProps, LayoutProps, ImageOwnProps {
33
38
  /**
34
39
  * The alt attribute provides alternative information for an image if a user for some reason cannot view it.
35
40
  * Required for accessibility when not using asChild. Use empty string for decorative images.
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/components/image.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAOjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,WAAW,EAAE,MA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props.js";import{extractProps as z}from"../helpers/extract-props.js";import{marginPropDefs as O}from"../props/margin.props.js";import{widthPropDefs as q}from"../props/width.props.js";import{heightPropDefs as G}from"../props/height.props.js";import{Skeleton as _}from"./skeleton.js";const H=t.forwardRef((v,r)=>{const{variant:h="surface",children:N}=v,{asChild:L,className:a,radius:o,style:n,loading:p="lazy",alt:c,src:i,placeholder:g,showSkeleton:x=!1,fadeIn:l=!0,onLoad:k,onError:S,children:$,...m}=z(v,w,O,q,G),[u,f]=t.useState(!1),[M,y]=t.useState(!1),[T,I]=t.useState(!!g),d=t.useRef(null),b=t.useCallback(e=>{f(!0),y(!1),I(!1),k?.(e)},[k]),E=t.useCallback(e=>{f(!1),y(!0),I(!1),S?.(e)},[S]);if(t.useEffect(()=>{const e=d.current;e&&e.complete&&e.naturalWidth>0&&(f(!0),y(!1),I(!1))},[i]),!i)return console.warn("Image component: src prop is required"),null;!L&&c===void 0&&console.warn("Image component: alt prop is required for accessibility when not using asChild");const W=x&&!u&&!M?t.createElement(_,{style:{...n,width:"100%",height:"100px",borderRadius:o?`var(--radius-${o})`:void 0},className:a}):null,j=g&&T?t.createElement("img",{"data-radius":o,style:{...n,position:"absolute",top:0,left:0,width:"100%",height:"100%",filter:"blur(4px)",opacity:.7,transition:"opacity 0.3s ease-out"},className:s("rt-reset","rt-Image","rt-Image--placeholder",a),alt:"",src:g}):null,D=t.createElement("img",{"data-radius":o,loading:p,style:{...n,opacity:l?u?1:0:1,transition:l?"opacity 0.3s ease-out":"none"},className:s("rt-reset","rt-Image",h==="blur"&&"rt-Image--blur",a),alt:c,src:i,onLoad:b,onError:E,...m,ref:e=>{d.current=e,typeof r=="function"?r(e):r&&(r.current=e)}}),C=g||x?t.createElement("div",{style:{position:"relative",display:"inline-block"}},W,j,D):D;if(L&&N){const e=t.Children.only(N);return h==="blur"?t.cloneElement(e,{className:s(e.props?.className,"rt-variant-blur"),style:{position:"relative",display:"inline-block",textDecoration:"none",color:"inherit",border:"none",background:"none",padding:0,font:"inherit",cursor:"pointer",...e.props?.style},children:t.createElement(t.Fragment,null,t.createElement("img",{"data-radius":o,loading:p,style:{...n,position:"absolute",top:"8px",left:"0"},className:s("rt-reset","rt-Image","rt-Image--blur","rt-Image--blur-bg",a),alt:"",src:i,...m}),t.createElement("img",{"data-radius":o,loading:p,style:{...n,position:"relative",zIndex:1,opacity:l?u?1:0:1,transition:l?"opacity 0.3s ease-out":"none"},className:s("rt-reset","rt-Image","rt-Image--blur",a),alt:c,src:i,onLoad:b,onError:E,...m,ref:P=>{d.current=P,typeof r=="function"?r(P):r&&(r.current=P)}}))}):t.cloneElement(e,{className:s(e.props?.className,"rt-Image"),style:{textDecoration:"none",color:"inherit",border:"none",background:"none",padding:0,font:"inherit",cursor:"pointer",...e.props?.style},children:C})}return h==="blur"?t.createElement("div",{className:"rt-variant-blur",style:{position:"relative",display:"inline-block"}},t.createElement("img",{"data-radius":o,loading:p,style:{...n,position:"absolute",top:"8px",left:"0"},className:s("rt-reset","rt-Image","rt-Image--blur","rt-Image--blur-bg",a),alt:"",src:i,...m}),t.createElement("img",{"data-radius":o,loading:p,style:{...n,position:"relative",zIndex:1,opacity:l?u?1:0:1,transition:l?"opacity 0.3s ease-out":"none"},className:s("rt-reset","rt-Image","rt-Image--blur",a),alt:c,src:i,onLoad:b,onError:E,...m,ref:e=>{d.current=e,typeof r=="function"?r(e):r&&(r.current=e)}})):C});H.displayName="Image";export{H as Image};
1
+ "use client";import*as t from"react";import s from"classnames";import{imagePropDefs as O}from"./image.props.js";import{extractProps as q}from"../helpers/extract-props.js";import{marginPropDefs as G}from"../props/margin.props.js";import{widthPropDefs as $}from"../props/width.props.js";import{heightPropDefs as A}from"../props/height.props.js";import{layoutPropDefs as F}from"../props/layout.props.js";import{Skeleton as J}from"./skeleton.js";import{Box as x}from"./box.js";const M=t.forwardRef((T,o)=>{const{variant:d="surface",wrapperStyle:f,...j}=T,{asChild:L,className:n,radius:a,style:r,loading:p="lazy",alt:c,src:i,placeholder:u,showSkeleton:N=!1,fadeIn:l=!0,onLoad:S,onError:k,children:D,...m}=q(j,O,G,$,A,F),[g,h]=t.useState(!1),[W,I]=t.useState(!1),[w,b]=t.useState(!!u),y=t.useRef(null),P=t.useCallback(e=>{h(!0),I(!1),b(!1),S?.(e)},[S]),E=t.useCallback(e=>{h(!1),I(!0),b(!1),k?.(e)},[k]);if(t.useEffect(()=>{const e=y.current;e&&e.complete&&e.naturalWidth>0&&(h(!0),I(!1),b(!1))},[i]),!i)return console.warn("Image component: src prop is required"),null;!L&&c===void 0&&console.warn("Image component: alt prop is required for accessibility when not using asChild");const z=N&&!g&&!W?t.createElement(J,{width:"100%",height:"100px",style:{...r,borderRadius:a?`var(--radius-${a})`:void 0},className:n}):null,B=u&&w?t.createElement("img",{"data-radius":a,style:{...r,filter:"blur(4px)",opacity:.7,transition:"opacity 0.3s ease-out"},className:s("rt-reset","rt-Image","rt-Image--placeholder",n),alt:"",src:u}):null,C=t.createElement("img",{"data-radius":a,loading:p,style:{...r,opacity:l?g?r?.opacity??1:0:r?.opacity??1,transition:l?"opacity 0.3s ease-out":"none"},className:s("rt-reset","rt-Image",d==="blur"&&"rt-Image--blur",n),alt:c,src:i,onLoad:P,onError:E,...m,ref:e=>{y.current=e,typeof o=="function"?o(e):o&&(o.current=e)}}),H=u||N?t.createElement(x,{position:"relative",display:"inline-block",style:f},z,B,C):C;if(L&&D){const e=t.Children.only(D);return d==="blur"?t.cloneElement(e,{className:s(e.props?.className,"rt-variant-blur"),style:{textDecoration:"none",color:"inherit",border:"none",background:"none",padding:0,font:"inherit",cursor:"pointer",...e.props?.style},children:t.createElement(x,{position:"relative",display:"inline-block",style:f},t.createElement("img",{"data-radius":a,loading:p,style:{...r,position:"absolute",top:"8px",left:"0"},className:s("rt-reset","rt-Image","rt-Image--blur","rt-Image--blur-bg",n),alt:"",src:i,...m}),t.createElement("img",{"data-radius":a,loading:p,style:{...r,position:"relative",zIndex:1,opacity:l?g?r?.opacity??1:0:r?.opacity??1,transition:l?"opacity 0.3s ease-out":"none"},className:s("rt-reset","rt-Image","rt-Image--blur",n),alt:c,src:i,onLoad:P,onError:E,...m,ref:v=>{y.current=v,typeof o=="function"?o(v):o&&(o.current=v)}}))}):t.cloneElement(e,{className:s(e.props?.className,"rt-Image"),style:{textDecoration:"none",color:"inherit",border:"none",background:"none",padding:0,font:"inherit",cursor:"pointer",...e.props?.style},children:H})}return d==="blur"?t.createElement(x,{className:"rt-variant-blur",position:"relative",display:"inline-block",style:f},t.createElement("img",{"data-radius":a,loading:p,style:{...r,position:"absolute",top:"8px",left:"0"},className:s("rt-reset","rt-Image","rt-Image--blur","rt-Image--blur-bg",n),alt:"",src:i,...m}),t.createElement("img",{"data-radius":a,loading:p,style:{...r,position:"relative",zIndex:1,opacity:l?g?r?.opacity??1:0:r?.opacity??1,transition:l?"opacity 0.3s ease-out":"none"},className:s("rt-reset","rt-Image","rt-Image--blur",n),alt:c,src:i,onLoad:P,onError:E,...m,ref:e=>{y.current=e,typeof o=="function"?o(e):o&&(o.current=e)}})):H});M.displayName="Image";export{M as Image};
2
2
  //# sourceMappingURL=image.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/image.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { imagePropDefs } from './image.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { Skeleton } from './skeleton.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { WidthProps } from '../props/width.props.js';\nimport type { HeightProps } from '../props/height.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ImageElement = React.ElementRef<'img'>;\ntype ImageOwnProps = GetPropDefTypes<typeof imagePropDefs> & {\n loading?: 'eager' | 'lazy';\n /**\n * Placeholder image URL to show while the main image is loading.\n * Can be a low-quality/blurred version of the main image.\n */\n placeholder?: string;\n /**\n * Shows a skeleton placeholder while loading instead of a blank space.\n */\n showSkeleton?: boolean;\n /**\n * Whether the image should fade in when loaded. Set to false for background images or when you want immediate visibility.\n */\n fadeIn?: boolean;\n /**\n * Callback fired when the image successfully loads.\n */\n onLoad?: (event: React.SyntheticEvent<HTMLImageElement>) => void;\n /**\n * Callback fired when the image fails to load.\n */\n onError?: (event: React.SyntheticEvent<HTMLImageElement>) => void;\n};\n\ninterface ImageProps\n extends ComponentPropsWithout<'img', RemovedProps | 'color' | 'width' | 'height' | 'alt'>,\n MarginProps,\n WidthProps,\n HeightProps,\n ImageOwnProps {\n /**\n * The alt attribute provides alternative information for an image if a user for some reason cannot view it.\n * Required for accessibility when not using asChild. Use empty string for decorative images.\n */\n alt: string;\n}\n\nconst Image = React.forwardRef<ImageElement, ImageProps>((props, forwardedRef) => {\n const { variant = 'surface', children } = props;\n const {\n asChild,\n className,\n radius,\n style,\n loading = 'lazy',\n alt,\n src,\n placeholder,\n showSkeleton = false,\n fadeIn = true,\n onLoad: userOnLoad,\n onError: userOnError,\n children: _children, // Extract children to exclude from imgProps\n ...imgProps\n } = extractProps(props, imagePropDefs, marginPropDefs, widthPropDefs, heightPropDefs);\n\n // Loading state management\n const [imageLoaded, setImageLoaded] = React.useState(false);\n const [imageError, setImageError] = React.useState(false);\n const [showPlaceholder, setShowPlaceholder] = React.useState(!!placeholder);\n \n // Ref to check if image is already loaded (for cached images)\n const imgRef = React.useRef<HTMLImageElement>(null);\n\n // Handle image load - moved to top to avoid conditional hook call\n const handleLoad = React.useCallback((event: React.SyntheticEvent<HTMLImageElement>) => {\n setImageLoaded(true);\n setImageError(false);\n setShowPlaceholder(false);\n userOnLoad?.(event);\n }, [userOnLoad]);\n\n // Handle image error - moved to top to avoid conditional hook call\n const handleError = React.useCallback((event: React.SyntheticEvent<HTMLImageElement>) => {\n setImageLoaded(false);\n setImageError(true);\n setShowPlaceholder(false);\n userOnError?.(event);\n }, [userOnError]);\n\n // Check if image is already loaded (for cached images)\n React.useEffect(() => {\n const img = imgRef.current;\n if (img && img.complete && img.naturalWidth > 0) {\n setImageLoaded(true);\n setImageError(false);\n setShowPlaceholder(false);\n }\n }, [src]);\n\n // Validate required props\n if (!src) {\n console.warn('Image component: src prop is required');\n return null;\n }\n\n if (!asChild && alt === undefined) {\n console.warn('Image component: alt prop is required for accessibility when not using asChild');\n }\n\n // Create skeleton placeholder\n const skeletonElement = showSkeleton && !imageLoaded && !imageError ? (\n <Skeleton\n style={{\n ...style,\n width: '100%',\n height: '100px', // Default height, can be overridden by style\n borderRadius: radius ? `var(--radius-${radius})` : undefined,\n }}\n className={className}\n />\n ) : null;\n\n // Create placeholder image element\n const placeholderElement = placeholder && showPlaceholder ? (\n <img\n data-radius={radius}\n style={{\n ...style,\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n filter: 'blur(4px)',\n opacity: 0.7,\n transition: 'opacity 0.3s ease-out',\n }}\n className={classNames(\n 'rt-reset',\n 'rt-Image',\n 'rt-Image--placeholder',\n className,\n )}\n alt=\"\"\n src={placeholder}\n />\n ) : null;\n\n // Create the standard img element\n const imgElement = (\n <img\n data-radius={radius}\n loading={loading}\n style={{\n ...style,\n opacity: fadeIn ? (imageLoaded ? 1 : 0) : 1,\n transition: fadeIn ? 'opacity 0.3s ease-out' : 'none',\n }}\n className={classNames(\n 'rt-reset',\n 'rt-Image',\n variant === 'blur' && 'rt-Image--blur',\n className,\n )}\n alt={alt}\n src={src}\n onLoad={handleLoad}\n onError={handleError}\n {...imgProps}\n ref={(node) => {\n imgRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n />\n );\n\n // Wrapper for images with placeholders\n const imageWithPlaceholder = (placeholder || showSkeleton) ? (\n <div style={{ position: 'relative', display: 'inline-block' }}>\n {skeletonElement}\n {placeholderElement}\n {imgElement}\n </div>\n ) : imgElement;\n\n // Handle asChild - inject img into the child element\n if (asChild && children) {\n const child = React.Children.only(children) as React.ReactElement<any>;\n\n if (variant === 'blur') {\n // For blur variant with asChild\n return React.cloneElement(child, {\n className: classNames(child.props?.className, 'rt-variant-blur'),\n style: {\n position: 'relative',\n display: 'inline-block',\n textDecoration: 'none', // Reset link underlines\n color: 'inherit', // Reset link colors\n border: 'none', // Reset button borders\n background: 'none', // Reset button backgrounds\n padding: 0, // Reset button padding\n font: 'inherit', // Reset button fonts\n cursor: 'pointer', // Ensure interactive cursor\n ...child.props?.style,\n },\n children: (\n <>\n {/* Background blurred image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{\n ...style,\n position: 'absolute',\n top: '8px',\n left: '0',\n }}\n className={classNames(\n 'rt-reset',\n 'rt-Image',\n 'rt-Image--blur',\n 'rt-Image--blur-bg',\n className,\n )}\n alt=\"\"\n src={src}\n {...imgProps}\n />\n {/* Foreground image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{ \n ...style, \n position: 'relative', \n zIndex: 1,\n opacity: fadeIn ? (imageLoaded ? 1 : 0) : 1,\n transition: fadeIn ? 'opacity 0.3s ease-out' : 'none',\n }}\n className={classNames('rt-reset', 'rt-Image', 'rt-Image--blur', className)}\n alt={alt}\n src={src}\n onLoad={handleLoad}\n onError={handleError}\n {...imgProps}\n ref={(node) => {\n imgRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n />\n </>\n ),\n });\n } else {\n // For surface variant with asChild\n return React.cloneElement(child, {\n className: classNames(child.props?.className, 'rt-Image'),\n style: {\n textDecoration: 'none', // Reset link underlines\n color: 'inherit', // Reset link colors\n border: 'none', // Reset button borders\n background: 'none', // Reset button backgrounds\n padding: 0, // Reset button padding\n font: 'inherit', // Reset button fonts\n cursor: 'pointer', // Ensure interactive cursor\n ...child.props?.style, // Allow user overrides\n },\n children: imageWithPlaceholder,\n });\n }\n }\n\n // Regular rendering without asChild\n if (variant === 'blur') {\n return (\n <div className=\"rt-variant-blur\" style={{ position: 'relative', display: 'inline-block' }}>\n {/* Background blurred image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{\n ...style,\n position: 'absolute',\n top: '8px',\n left: '0',\n }}\n className={classNames(\n 'rt-reset',\n 'rt-Image',\n 'rt-Image--blur',\n 'rt-Image--blur-bg',\n className,\n )}\n alt=\"\"\n src={src}\n {...imgProps}\n />\n {/* Foreground image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{ \n ...style, \n position: 'relative', \n zIndex: 1,\n opacity: fadeIn ? (imageLoaded ? 1 : 0) : 1,\n transition: fadeIn ? 'opacity 0.3s ease-out' : 'none',\n }}\n className={classNames('rt-reset', 'rt-Image', 'rt-Image--blur', className)}\n alt={alt}\n src={src}\n onLoad={handleLoad}\n onError={handleError}\n {...imgProps}\n ref={(node) => {\n imgRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n />\n </div>\n );\n }\n\n return imageWithPlaceholder;\n});\n\nImage.displayName = 'Image';\n\nexport { Image };\nexport type { ImageProps };\n"],
5
- "mappings": "aAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAEvB,OAAS,iBAAAC,MAAqB,mBAC9B,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,iBAAAC,MAAqB,0BAC9B,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,YAAAC,MAAgB,gBA+CzB,MAAMC,EAAQR,EAAM,WAAqC,CAACS,EAAOC,IAAiB,CAChF,KAAM,CAAE,QAAAC,EAAU,UAAW,SAAAC,CAAS,EAAIH,EACpC,CACJ,QAAAI,EACA,UAAAC,EACA,OAAAC,EACA,MAAAC,EACA,QAAAC,EAAU,OACV,IAAAC,EACA,IAAAC,EACA,YA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/B,IACTA,EAAa,QAAU+B,EAE3B,EACF,CACF,EAIGC,CACT,CAAC,EAEDlC,EAAM,YAAc",
6
- "names": ["React", "classNames", "imagePropDefs", "extractProps", "marginPropDefs", "widthPropDefs", "heightPropDefs", "Skeleton", "Image", "props", "forwardedRef", "variant", "children", "asChild", "className", "radius", "style", "loading", "alt", "src", "placeholder", "showSkeleton", "fadeIn", "userOnLoad", "userOnError", "_children", "imgProps", "imageLoaded", "setImageLoaded", "imageError", "setImageError", "showPlaceholder", "setShowPlaceholder", "imgRef", "handleLoad", "event", "handleError", "img", "skeletonElement", "placeholderElement", "imgElement", "node", "imageWithPlaceholder", "child"]
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { imagePropDefs } from './image.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { Skeleton } from './skeleton.js';\nimport { Box } from './box.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { WidthProps } from '../props/width.props.js';\nimport type { HeightProps } from '../props/height.props.js';\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ImageElement = React.ElementRef<'img'>;\ntype ImageOwnProps = GetPropDefTypes<typeof imagePropDefs> & {\n loading?: 'eager' | 'lazy';\n /**\n * Placeholder image URL to show while the main image is loading.\n * Can be a low-quality/blurred version of the main image.\n */\n placeholder?: string;\n /**\n * Shows a skeleton placeholder while loading instead of a blank space.\n */\n showSkeleton?: boolean;\n /**\n * Whether the image should fade in when loaded. Set to false for background images or when you want immediate visibility.\n */\n fadeIn?: boolean;\n /**\n * Callback fired when the image successfully loads.\n */\n onLoad?: (event: React.SyntheticEvent<HTMLImageElement>) => void;\n /**\n * Callback fired when the image fails to load.\n */\n onError?: (event: React.SyntheticEvent<HTMLImageElement>) => void;\n /**\n * Style object to apply to the wrapper container. Useful for overriding display, width, height, etc.\n */\n wrapperStyle?: React.CSSProperties;\n};\n\ninterface ImageProps\n extends ComponentPropsWithout<'img', RemovedProps | 'color' | 'width' | 'height' | 'alt'>,\n MarginProps,\n WidthProps,\n HeightProps,\n LayoutProps,\n ImageOwnProps {\n /**\n * The alt attribute provides alternative information for an image if a user for some reason cannot view it.\n * Required for accessibility when not using asChild. Use empty string for decorative images.\n */\n alt: string;\n}\n\nconst Image = React.forwardRef<ImageElement, ImageProps>((props, forwardedRef) => {\n const { variant = 'surface', wrapperStyle, ...restProps } = props;\n const {\n asChild,\n className,\n radius,\n style,\n loading = 'lazy',\n alt,\n src,\n placeholder,\n showSkeleton = false,\n fadeIn = true,\n onLoad: userOnLoad,\n onError: userOnError,\n children,\n ...imgProps\n } = extractProps(\n restProps,\n imagePropDefs,\n marginPropDefs,\n widthPropDefs,\n heightPropDefs,\n layoutPropDefs,\n );\n\n // Loading state management\n const [imageLoaded, setImageLoaded] = React.useState(false);\n const [imageError, setImageError] = React.useState(false);\n const [showPlaceholder, setShowPlaceholder] = React.useState(!!placeholder);\n\n // Ref to check if image is already loaded (for cached images)\n const imgRef = React.useRef<HTMLImageElement>(null);\n\n // Handle image load - moved to top to avoid conditional hook call\n const handleLoad = React.useCallback(\n (event: React.SyntheticEvent<HTMLImageElement>) => {\n setImageLoaded(true);\n setImageError(false);\n setShowPlaceholder(false);\n userOnLoad?.(event);\n },\n [userOnLoad],\n );\n\n // Handle image error - moved to top to avoid conditional hook call\n const handleError = React.useCallback(\n (event: React.SyntheticEvent<HTMLImageElement>) => {\n setImageLoaded(false);\n setImageError(true);\n setShowPlaceholder(false);\n userOnError?.(event);\n },\n [userOnError],\n );\n\n // Check if image is already loaded (for cached images)\n React.useEffect(() => {\n const img = imgRef.current;\n if (img && img.complete && img.naturalWidth > 0) {\n setImageLoaded(true);\n setImageError(false);\n setShowPlaceholder(false);\n }\n }, [src]);\n\n // Validate required props\n if (!src) {\n console.warn('Image component: src prop is required');\n return null;\n }\n\n if (!asChild && alt === undefined) {\n console.warn('Image component: alt prop is required for accessibility when not using asChild');\n }\n\n // Create skeleton placeholder\n const skeletonElement =\n showSkeleton && !imageLoaded && !imageError ? (\n <Skeleton\n width=\"100%\"\n height=\"100px\" // Default height, can be overridden by style\n style={{\n ...style,\n borderRadius: radius ? `var(--radius-${radius})` : undefined,\n }}\n className={className}\n />\n ) : null;\n\n // Create placeholder image element\n const placeholderElement =\n placeholder && showPlaceholder ? (\n <img\n data-radius={radius}\n style={{\n ...style,\n filter: 'blur(4px)',\n opacity: 0.7,\n transition: 'opacity 0.3s ease-out',\n }}\n className={classNames('rt-reset', 'rt-Image', 'rt-Image--placeholder', className)}\n alt=\"\"\n src={placeholder}\n />\n ) : null;\n\n // Create the standard img element\n const imgElement = (\n <img\n data-radius={radius}\n loading={loading}\n style={{\n ...style,\n opacity: fadeIn ? (imageLoaded ? (style?.opacity ?? 1) : 0) : (style?.opacity ?? 1),\n transition: fadeIn ? 'opacity 0.3s ease-out' : 'none',\n }}\n className={classNames(\n 'rt-reset',\n 'rt-Image',\n variant === 'blur' && 'rt-Image--blur',\n className,\n )}\n alt={alt}\n src={src}\n onLoad={handleLoad}\n onError={handleError}\n {...imgProps}\n ref={(node) => {\n imgRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n />\n );\n\n // Wrapper for images with placeholders\n const imageWithPlaceholder =\n placeholder || showSkeleton ? (\n <Box position=\"relative\" display=\"inline-block\" style={wrapperStyle}>\n {skeletonElement}\n {placeholderElement}\n {imgElement}\n </Box>\n ) : (\n imgElement\n );\n\n // Handle asChild - inject img into the child element\n if (asChild && children) {\n const child = React.Children.only(children) as React.ReactElement<any>;\n\n if (variant === 'blur') {\n // For blur variant with asChild\n return React.cloneElement(child, {\n className: classNames(child.props?.className, 'rt-variant-blur'),\n style: {\n textDecoration: 'none', // Reset link underlines\n color: 'inherit', // Reset link colors\n border: 'none', // Reset button borders\n background: 'none', // Reset button backgrounds\n padding: 0, // Reset button padding\n font: 'inherit', // Reset button fonts\n cursor: 'pointer', // Ensure interactive cursor\n ...child.props?.style,\n },\n children: (\n <Box position=\"relative\" display=\"inline-block\" style={wrapperStyle}>\n {/* Background blurred image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{\n ...style,\n position: 'absolute',\n top: '8px',\n left: '0',\n }}\n className={classNames(\n 'rt-reset',\n 'rt-Image',\n 'rt-Image--blur',\n 'rt-Image--blur-bg',\n className,\n )}\n alt=\"\"\n src={src}\n {...imgProps}\n />\n {/* Foreground image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{\n ...style,\n position: 'relative',\n zIndex: 1,\n opacity: fadeIn ? (imageLoaded ? (style?.opacity ?? 1) : 0) : (style?.opacity ?? 1),\n transition: fadeIn ? 'opacity 0.3s ease-out' : 'none',\n }}\n className={classNames('rt-reset', 'rt-Image', 'rt-Image--blur', className)}\n alt={alt}\n src={src}\n onLoad={handleLoad}\n onError={handleError}\n {...imgProps}\n ref={(node) => {\n imgRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n />\n </Box>\n ),\n });\n } else {\n // For surface variant with asChild\n return React.cloneElement(child, {\n className: classNames(child.props?.className, 'rt-Image'),\n style: {\n textDecoration: 'none', // Reset link underlines\n color: 'inherit', // Reset link colors\n border: 'none', // Reset button borders\n background: 'none', // Reset button backgrounds\n padding: 0, // Reset button padding\n font: 'inherit', // Reset button fonts\n cursor: 'pointer', // Ensure interactive cursor\n ...child.props?.style, // Allow user overrides\n },\n children: imageWithPlaceholder,\n });\n }\n }\n\n // Regular rendering without asChild\n if (variant === 'blur') {\n return (\n <Box\n className=\"rt-variant-blur\"\n position=\"relative\"\n display=\"inline-block\"\n style={wrapperStyle}\n >\n {/* Background blurred image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{\n ...style,\n position: 'absolute',\n top: '8px',\n left: '0',\n }}\n className={classNames(\n 'rt-reset',\n 'rt-Image',\n 'rt-Image--blur',\n 'rt-Image--blur-bg',\n className,\n )}\n alt=\"\"\n src={src}\n {...imgProps}\n />\n {/* Foreground image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{\n ...style,\n position: 'relative',\n zIndex: 1,\n opacity: fadeIn ? (imageLoaded ? (style?.opacity ?? 1) : 0) : (style?.opacity ?? 1),\n transition: fadeIn ? 'opacity 0.3s ease-out' : 'none',\n }}\n className={classNames('rt-reset', 'rt-Image', 'rt-Image--blur', className)}\n alt={alt}\n src={src}\n onLoad={handleLoad}\n onError={handleError}\n {...imgProps}\n ref={(node) => {\n imgRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n />\n </Box>\n );\n }\n\n return imageWithPlaceholder;\n});\n\nImage.displayName = 'Image';\n\nexport { Image };\nexport type { ImageProps };\n"],
5
+ "mappings": "aAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAEvB,OAAS,iBAAAC,MAAqB,mBAC9B,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,iBAAAC,MAAqB,0BAC9B,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,YAAAC,MAAgB,gBACzB,OAAS,OAAAC,MAAW,WAqDpB,MAAMC,EAAQV,EAAM,WAAqC,CAACW,EAAOC,IAAiB,CAChF,KAAM,CAAE,QAAAC,EAAU,UAAW,aAAAC,EAAc,GAAGC,CAAU,EAAIJ,EACtD,CACJ,QAAAK,EACA,UAAAC,EACA,OAAAC,EACA,MAAAC,EACA,QAAAC,EAAU,OACV,IAAAC,EACA,IAAAC,EACA,YAAAC,EACA,aAAAC,EAAe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,EAAagC,CAAI,EACRhC,IACTA,EAAa,QAAUgC,EAE3B,EACF,CACF,EAIGC,CACT,CAAC,EAEDnC,EAAM,YAAc",
6
+ "names": ["React", "classNames", "imagePropDefs", "extractProps", "marginPropDefs", "widthPropDefs", "heightPropDefs", "layoutPropDefs", "Skeleton", "Box", "Image", "props", "forwardedRef", "variant", "wrapperStyle", "restProps", "asChild", "className", "radius", "style", "loading", "alt", "src", "placeholder", "showSkeleton", "fadeIn", "userOnLoad", "userOnError", "children", "imgProps", "imageLoaded", "setImageLoaded", "imageError", "setImageError", "showPlaceholder", "setShowPlaceholder", "imgRef", "handleLoad", "event", "handleError", "img", "skeletonElement", "placeholderElement", "imgElement", "node", "imageWithPlaceholder", "child"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAOvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAEzF,UAAU,gBAAiB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC;CAAG;AAClG,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAE3C,CAAC;AAIF,UAAU,mBACR,SAAQ,qBAAqB,CAAC,OAAO,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC;CAAG;AACjF,QAAA,MAAM,cAAc,+FAMnB,CAAC;AAIF,UAAU,mBACR,SAAQ,qBAAqB,CAAC,OAAO,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC,EAC1E,sBAAsB;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC,wBAAwB,CA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AAG;AACjF,QAAA,MAAM,cAAc,+FAMnB,CAAC;AAIF,UAAU,mBACR,SAAQ,qBAAqB,CAAC,OAAO,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC,EAC1E,sBAAsB;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC;CACzF;AACD,QAAA,MAAM,cAAc,4FA2BnB,CAAC;AAIF,UAAU,iBACR,SAAQ,qBAAqB,CAAC,OAAO,gBAAgB,CAAC,KAAK,EAAE,YAAY,CAAC;CAAG;AAC/E,QAAA,MAAM,YAAY,6FAMjB,CAAC;AAIF,UAAU,kBACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC;CAAG;AAC3E,QAAA,MAAM,aAAa,2FAIlB,CAAC;AAIF,OAAO,EACL,WAAW,IAAI,IAAI,EACnB,cAAc,IAAI,OAAO,EACzB,cAAc,IAAI,OAAO,EACzB,YAAY,IAAI,KAAK,EACrB,aAAa,IAAI,MAAM,GACxB,CAAC;AACF,YAAY,EACV,gBAAgB,IAAI,SAAS,EAC7B,mBAAmB,IAAI,YAAY,EACnC,mBAAmB,IAAI,YAAY,EACnC,iBAAiB,IAAI,UAAU,EAC/B,kBAAkB,IAAI,WAAW,GAClC,CAAC"}
@@ -1,2 +1,2 @@
1
- import*as o from"react";import C from"classnames";import{Popover as p}from"radix-ui";import{extractProps as c}from"../helpers/extract-props.js";import{requireReactElement as n}from"../helpers/require-react-element.js";import{popoverContentPropDefs as g}from"./popover.props.js";import{Theme as R}from"./theme.js";const P=e=>o.createElement(p.Root,{...e});P.displayName="Popover.Root";const s=o.forwardRef(({children:e,...r},t)=>o.createElement(p.Trigger,{...r,ref:t,asChild:!0},n(e)));s.displayName="Popover.Trigger";const i=o.forwardRef((e,r)=>{const{className:t,forceMount:a,container:f,...l}=c(e,g);return o.createElement(p.Portal,{container:f,forceMount:a},o.createElement(R,{asChild:!0},o.createElement(p.Content,{align:"start",sideOffset:8,collisionPadding:10,...l,ref:r,className:C("rt-PopperContent","rt-PopoverContent",t)})))});i.displayName="Popover.Content";const v=o.forwardRef(({children:e,...r},t)=>o.createElement(p.Close,{...r,ref:t,asChild:!0},n(e)));v.displayName="Popover.Close";const m=o.forwardRef(({children:e,...r},t)=>o.createElement(p.Anchor,{...r,ref:t}));m.displayName="Popover.Anchor";export{m as Anchor,v as Close,i as Content,P as Root,s as Trigger};
1
+ import*as o from"react";import g from"classnames";import{Popover as p}from"radix-ui";import{extractProps as d}from"../helpers/extract-props.js";import{requireReactElement as n}from"../helpers/require-react-element.js";import{popoverContentPropDefs as h}from"./popover.props.js";import{Theme as R}from"./theme.js";import{useThemeContext as y}from"./theme.js";const P=e=>o.createElement(p.Root,{...e});P.displayName="Popover.Root";const s=o.forwardRef(({children:e,...r},t)=>o.createElement(p.Trigger,{...r,ref:t,asChild:!0},n(e)));s.displayName="Popover.Trigger";const i=o.forwardRef((e,r)=>{const t=y(),a=e.panelBackground??t.panelBackground,{className:l,forceMount:f,container:c,panelBackground:u,...C}=d(e,h);return o.createElement(p.Portal,{container:c,forceMount:f},o.createElement(R,{asChild:!0},o.createElement(p.Content,{align:"start",sideOffset:8,collisionPadding:10,...C,ref:r,"data-panel-background":a,className:g("rt-PopperContent","rt-PopoverContent",l)})))});i.displayName="Popover.Content";const v=o.forwardRef(({children:e,...r},t)=>o.createElement(p.Close,{...r,ref:t,asChild:!0},n(e)));v.displayName="Popover.Close";const m=o.forwardRef(({children:e,...r},t)=>o.createElement(p.Anchor,{...r,ref:t}));m.displayName="Popover.Anchor";export{m as Anchor,v as Close,i as Content,P as Root,s as Trigger};
2
2
  //# sourceMappingURL=popover.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/popover.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { popoverContentPropDefs } from './popover.props.js';\nimport { Theme } from './theme.js';\n\nimport type { PopoverContentOwnProps } from './popover.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ninterface PopoverRootProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {}\nconst PopoverRoot: React.FC<PopoverRootProps> = (props: PopoverRootProps) => (\n <PopoverPrimitive.Root {...props} />\n);\nPopoverRoot.displayName = 'Popover.Root';\n\ntype PopoverTriggerElement = React.ElementRef<typeof PopoverPrimitive.Trigger>;\ninterface PopoverTriggerProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Trigger, RemovedProps> {}\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Trigger>\n )\n);\nPopoverTrigger.displayName = 'Popover.Trigger';\n\ntype PopoverContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ninterface PopoverContentProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>,\n PopoverContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n}\nconst PopoverContent = React.forwardRef<PopoverContentElement, PopoverContentProps>(\n (props, forwardedRef) => {\n const { className, forceMount, container, ...contentProps } = extractProps(\n props,\n popoverContentPropDefs\n );\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <PopoverPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={forwardedRef}\n className={classNames('rt-PopperContent', 'rt-PopoverContent', className)}\n />\n </Theme>\n </PopoverPrimitive.Portal>\n );\n }\n);\nPopoverContent.displayName = 'Popover.Content';\n\ntype PopoverCloseElement = React.ElementRef<typeof PopoverPrimitive.Close>;\ninterface PopoverCloseProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Close, RemovedProps> {}\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Close>\n )\n);\nPopoverClose.displayName = 'Popover.Close';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopoverPrimitive.Anchor>;\ninterface PopoverAnchorProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {}\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Anchor {...props} ref={forwardedRef} />\n )\n);\n\nPopoverAnchor.displayName = 'Popover.Anchor';\n\nexport {\n PopoverRoot as Root,\n PopoverContent as Content,\n PopoverTrigger as Trigger,\n PopoverClose as Close,\n PopoverAnchor as Anchor,\n};\nexport type {\n PopoverRootProps as RootProps,\n PopoverContentProps as ContentProps,\n PopoverTriggerProps as TriggerProps,\n PopoverCloseProps as CloseProps,\n PopoverAnchorProps as AnchorProps,\n};\n"],
5
- "mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,WAAWC,MAAwB,WAE5C,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,uBAAAC,MAA2B,sCACpC,OAAS,0BAAAC,MAA8B,qBACvC,OAAS,SAAAC,MAAa,aAMtB,MAAMC,EAA2CC,GAC/CR,EAAA,cAACE,EAAiB,KAAjB,CAAuB,GAAGM,EAAO,EAEpCD,EAAY,YAAc,eAK1B,MAAME,EAAiBT,EAAM,WAC3B,CAAC,CAAE,SAAAU,EAAU,GAAGF,CAAM,EAAGG,IACvBX,EAAA,cAACE,EAAiB,QAAjB,CAA0B,GAAGM,EAAO,IAAKG,EAAc,QAAO,IAC5DP,EAAoBM,CAAQ,CAC/B,CAEJ,EACAD,EAAe,YAAc,kBAQ7B,MAAMG,EAAiBZ,EAAM,WAC3B,CAACQ,EAAOG,IAAiB,CACvB,KAAM,CAAE,UAAAE,EAAW,WAAAC,EAAY,UAAAC,EAAW,GAAGC,CAAa,EAAIb,EAC5DK,EACAH,CACF,EACA,OACEL,EAAA,cAACE,EAAiB,OAAjB,CAAwB,UAAWa,EAAW,WAAYD,GACzDd,EAAA,cAACM,EAAA,CAAM,QAAO,IACZN,EAAA,cAACE,EAAiB,QAAjB,CACC,MAAM,QACN,WAAY,EACZ,iBAAkB,GACjB,GAAGc,EACJ,IAAKL,EACL,UAAWV,EAAW,mBAAoB,oBAAqBY,CAAS,EAC1E,CACF,CACF,CAEJ,CACF,EACAD,EAAe,YAAc,kBAK7B,MAAMK,EAAejB,EAAM,WACzB,CAAC,CAAE,SAAAU,EAAU,GAAGF,CAAM,EAAGG,IACvBX,EAAA,cAACE,EAAiB,MAAjB,CAAwB,GAAGM,EAAO,IAAKG,EAAc,QAAO,IAC1DP,EAAoBM,CAAQ,CAC/B,CAEJ,EACAO,EAAa,YAAc,gBAK3B,MAAMC,EAAgBlB,EAAM,WAC1B,CAAC,CAAE,SAAAU,EAAU,GAAGF,CAAM,EAAGG,IACvBX,EAAA,cAACE,EAAiB,OAAjB,CAAyB,GAAGM,EAAO,IAAKG,EAAc,CAE3D,EAEAO,EAAc,YAAc",
6
- "names": ["React", "classNames", "PopoverPrimitive", "extractProps", "requireReactElement", "popoverContentPropDefs", "Theme", "PopoverRoot", "props", "PopoverTrigger", "children", "forwardedRef", "PopoverContent", "className", "forceMount", "container", "contentProps", "PopoverClose", "PopoverAnchor"]
4
+ "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { popoverContentPropDefs } from './popover.props.js';\nimport { Theme } from './theme.js';\nimport { useThemeContext } from './theme.js';\n\nimport type { PopoverContentOwnProps } from './popover.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ninterface PopoverRootProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {}\nconst PopoverRoot: React.FC<PopoverRootProps> = (props: PopoverRootProps) => (\n <PopoverPrimitive.Root {...props} />\n);\nPopoverRoot.displayName = 'Popover.Root';\n\ntype PopoverTriggerElement = React.ElementRef<typeof PopoverPrimitive.Trigger>;\ninterface PopoverTriggerProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Trigger, RemovedProps> {}\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Trigger>\n ),\n);\nPopoverTrigger.displayName = 'Popover.Trigger';\n\ntype PopoverContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ninterface PopoverContentProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>,\n PopoverContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n}\nconst PopoverContent = React.forwardRef<PopoverContentElement, PopoverContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n const panelBackground = props.panelBackground ?? themeContext.panelBackground;\n const {\n className,\n forceMount,\n container,\n panelBackground: _,\n ...contentProps\n } = extractProps(props, popoverContentPropDefs);\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <PopoverPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={forwardedRef}\n data-panel-background={panelBackground}\n className={classNames('rt-PopperContent', 'rt-PopoverContent', className)}\n />\n </Theme>\n </PopoverPrimitive.Portal>\n );\n },\n);\nPopoverContent.displayName = 'Popover.Content';\n\ntype PopoverCloseElement = React.ElementRef<typeof PopoverPrimitive.Close>;\ninterface PopoverCloseProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Close, RemovedProps> {}\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Close>\n ),\n);\nPopoverClose.displayName = 'Popover.Close';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopoverPrimitive.Anchor>;\ninterface PopoverAnchorProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {}\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Anchor {...props} ref={forwardedRef} />\n ),\n);\n\nPopoverAnchor.displayName = 'Popover.Anchor';\n\nexport {\n PopoverRoot as Root,\n PopoverContent as Content,\n PopoverTrigger as Trigger,\n PopoverClose as Close,\n PopoverAnchor as Anchor,\n};\nexport type {\n PopoverRootProps as RootProps,\n PopoverContentProps as ContentProps,\n PopoverTriggerProps as TriggerProps,\n PopoverCloseProps as CloseProps,\n PopoverAnchorProps as AnchorProps,\n};\n"],
5
+ "mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,WAAWC,MAAwB,WAE5C,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,uBAAAC,MAA2B,sCACpC,OAAS,0BAAAC,MAA8B,qBACvC,OAAS,SAAAC,MAAa,aACtB,OAAS,mBAAAC,MAAuB,aAMhC,MAAMC,EAA2CC,GAC/CT,EAAA,cAACE,EAAiB,KAAjB,CAAuB,GAAGO,EAAO,EAEpCD,EAAY,YAAc,eAK1B,MAAME,EAAiBV,EAAM,WAC3B,CAAC,CAAE,SAAAW,EAAU,GAAGF,CAAM,EAAGG,IACvBZ,EAAA,cAACE,EAAiB,QAAjB,CAA0B,GAAGO,EAAO,IAAKG,EAAc,QAAO,IAC5DR,EAAoBO,CAAQ,CAC/B,CAEJ,EACAD,EAAe,YAAc,kBAQ7B,MAAMG,EAAiBb,EAAM,WAC3B,CAACS,EAAOG,IAAiB,CACvB,MAAME,EAAeP,EAAgB,EAC/BQ,EAAkBN,EAAM,iBAAmBK,EAAa,gBACxD,CACJ,UAAAE,EACA,WAAAC,EACA,UAAAC,EACA,gBAAiBC,EACjB,GAAGC,CACL,EAAIjB,EAAaM,EAAOJ,CAAsB,EAC9C,OACEL,EAAA,cAACE,EAAiB,OAAjB,CAAwB,UAAWgB,EAAW,WAAYD,GACzDjB,EAAA,cAACM,EAAA,CAAM,QAAO,IACZN,EAAA,cAACE,EAAiB,QAAjB,CACC,MAAM,QACN,WAAY,EACZ,iBAAkB,GACjB,GAAGkB,EACJ,IAAKR,EACL,wBAAuBG,EACvB,UAAWd,EAAW,mBAAoB,oBAAqBe,CAAS,EAC1E,CACF,CACF,CAEJ,CACF,EACAH,EAAe,YAAc,kBAK7B,MAAMQ,EAAerB,EAAM,WACzB,CAAC,CAAE,SAAAW,EAAU,GAAGF,CAAM,EAAGG,IACvBZ,EAAA,cAACE,EAAiB,MAAjB,CAAwB,GAAGO,EAAO,IAAKG,EAAc,QAAO,IAC1DR,EAAoBO,CAAQ,CAC/B,CAEJ,EACAU,EAAa,YAAc,gBAK3B,MAAMC,EAAgBtB,EAAM,WAC1B,CAAC,CAAE,SAAAW,EAAU,GAAGF,CAAM,EAAGG,IACvBZ,EAAA,cAACE,EAAiB,OAAjB,CAAyB,GAAGO,EAAO,IAAKG,EAAc,CAE3D,EAEAU,EAAc,YAAc",
6
+ "names": ["React", "classNames", "PopoverPrimitive", "extractProps", "requireReactElement", "popoverContentPropDefs", "Theme", "useThemeContext", "PopoverRoot", "props", "PopoverTrigger", "children", "forwardedRef", "PopoverContent", "themeContext", "panelBackground", "className", "forceMount", "container", "_", "contentProps", "PopoverClose", "PopoverAnchor"]
7
7
  }
@@ -28,6 +28,11 @@ declare const popoverContentPropDefs: {
28
28
  default: "2";
29
29
  responsive: true;
30
30
  };
31
+ panelBackground: {
32
+ type: "enum";
33
+ values: readonly ["solid", "translucent"];
34
+ default: undefined;
35
+ };
31
36
  width: {
32
37
  type: "string";
33
38
  className: string;
@@ -1 +1 @@
1
- {"version":3,"file":"popover.props.d.ts","sourceRoot":"","sources":["../../../src/components/popover.props.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,KAAK,EAAW,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAIrE,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkB3B,CAAC;AAEF,KAAK,sBAAsB,GAAG,eAAe,CAC3C,OAAO,sBAAsB,GAC3B,OAAO,cAAc,GACrB,OAAO,aAAa,GACpB,OAAO,cAAc,CACxB,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
1
+ {"version":3,"file":"popover.props.d.ts","sourceRoot":"","sources":["../../../src/components/popover.props.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,KAAK,EAAW,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAKrE,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoB3B,CAAC;AAEF,KAAK,sBAAsB,GAAG,eAAe,CAC3C,OAAO,sBAAsB,GAC3B,OAAO,cAAc,GACrB,OAAO,aAAa,GACpB,OAAO,cAAc,CACxB,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{asChildPropDef as t}from"../props/as-child.prop.js";import{heightPropDefs as o}from"../props/height.props.js";import{widthPropDefs as e}from"../props/width.props.js";const p=["1","2","3","4"],r={...t,size:{type:"enum",className:"rt-r-size",values:p,default:"2",responsive:!0},width:e.width,minWidth:e.minWidth,maxWidth:{...e.maxWidth,default:"480px"},...o};export{r as popoverContentPropDefs};
1
+ import{asChildPropDef as o}from"../props/as-child.prop.js";import{heightPropDefs as t}from"../props/height.props.js";import{widthPropDefs as e}from"../props/width.props.js";const p=["1","2","3","4"],r=["solid","translucent"],n={...o,size:{type:"enum",className:"rt-r-size",values:p,default:"2",responsive:!0},panelBackground:{type:"enum",values:r,default:void 0},width:e.width,minWidth:e.minWidth,maxWidth:{...e.maxWidth,default:"480px"},...t};export{n as popoverContentPropDefs};
2
2
  //# sourceMappingURL=popover.props.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/popover.props.tsx"],
4
- "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst contentSizes = ['1', '2', '3', '4'] as const;\n\nconst popoverContentPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n size: PropDef<(typeof contentSizes)[number]>;\n};\n\ntype PopoverContentOwnProps = GetPropDefTypes<\n typeof popoverContentPropDefs &\n typeof asChildPropDef &\n typeof widthPropDefs &\n typeof heightPropDefs\n>;\n\nexport { popoverContentPropDefs };\nexport type { PopoverContentOwnProps };\n"],
5
- "mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,iBAAAC,MAAqB,0BAI9B,MAAMC,EAAe,CAAC,IAAK,IAAK,IAAK,GAAG,EAElCC,EAAyB,CAC7B,GAAGJ,EACH,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQG,EACR,QAAS,IACT,WAAY,EACd,EACA,MAAOD,EAAc,MACrB,SAAUA,EAAc,SACxB,SAAU,CAAE,GAAGA,EAAc,SAAU,QAAS,OAAQ,EACxD,GAAGD,CACL",
6
- "names": ["asChildPropDef", "heightPropDefs", "widthPropDefs", "contentSizes", "popoverContentPropDefs"]
4
+ "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst contentSizes = ['1', '2', '3', '4'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst popoverContentPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n size: PropDef<(typeof contentSizes)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\ntype PopoverContentOwnProps = GetPropDefTypes<\n typeof popoverContentPropDefs &\n typeof asChildPropDef &\n typeof widthPropDefs &\n typeof heightPropDefs\n>;\n\nexport { popoverContentPropDefs };\nexport type { PopoverContentOwnProps };\n"],
5
+ "mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,iBAAAC,MAAqB,0BAI9B,MAAMC,EAAe,CAAC,IAAK,IAAK,IAAK,GAAG,EAClCC,EAAmB,CAAC,QAAS,aAAa,EAE1CC,EAAyB,CAC7B,GAAGL,EACH,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQG,EACR,QAAS,IACT,WAAY,EACd,EACA,gBAAiB,CAAE,KAAM,OAAQ,OAAQC,EAAkB,QAAS,MAAU,EAC9E,MAAOF,EAAc,MACrB,SAAUA,EAAc,SACxB,SAAU,CAAE,GAAGA,EAAc,SAAU,QAAS,OAAQ,EACxD,GAAGD,CACL",
6
+ "names": ["asChildPropDef", "heightPropDefs", "widthPropDefs", "contentSizes", "panelBackgrounds", "popoverContentPropDefs"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAqC,MAAM,UAAU,CAAC;AAKxF,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAEzF,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAErE,KAAK,kBAAkB,GAAG,kBAAkB,CAAC;AAG7C,UAAU,eAAgB,SAAQ,e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