@webiny/admin-ui 6.4.11 → 6.6.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/Accordion/Accordion.d.ts +7 -6
  2. package/Accordion/components/AccordionContent.js +4 -1
  3. package/Accordion/components/AccordionContent.js.map +1 -1
  4. package/Accordion/components/AccordionItem.d.ts +8 -6
  5. package/Accordion/components/AccordionItem.js.map +1 -1
  6. package/Accordion/components/AccordionItemAction.d.ts +7 -6
  7. package/Accordion/components/AccordionItemDragHandle.d.ts +2 -1
  8. package/Accordion/components/AccordionItemDragHandle.js +2 -1
  9. package/Accordion/components/AccordionItemDragHandle.js.map +1 -1
  10. package/Accordion/components/AccordionItemIcon.d.ts +7 -6
  11. package/Accordion/components/AccordionItemSeparator.d.ts +7 -6
  12. package/Accordion/components/AccordionTrigger.js +4 -2
  13. package/Accordion/components/AccordionTrigger.js.map +1 -1
  14. package/Alert/Alert.d.ts +21 -19
  15. package/AutoComplete/AutoComplete.d.ts +7 -6
  16. package/AutoComplete/primitives/AutoCompletePrimitive.d.ts +7 -6
  17. package/Avatar/Avatar.d.ts +9 -8
  18. package/Avatar/components/AvatarFallback.d.ts +7 -6
  19. package/Avatar/components/AvatarImage.d.ts +7 -6
  20. package/BetaBadge/BetaBadge.d.ts +6 -0
  21. package/BetaBadge/BetaBadge.js +7 -0
  22. package/BetaBadge/BetaBadge.js.map +1 -0
  23. package/Breadcrumbs/Breadcrumbs.d.ts +54 -0
  24. package/Breadcrumbs/Breadcrumbs.js +66 -0
  25. package/Breadcrumbs/Breadcrumbs.js.map +1 -0
  26. package/Breadcrumbs/Breadcrumbs.stories.d.ts +9 -0
  27. package/Breadcrumbs/Breadcrumbs.stories.js +71 -0
  28. package/Breadcrumbs/Breadcrumbs.stories.js.map +1 -0
  29. package/Breadcrumbs/index.d.ts +1 -0
  30. package/Breadcrumbs/index.js +1 -0
  31. package/Button/Button.d.ts +10 -9
  32. package/Button/CopyButton.d.ts +7 -6
  33. package/Button/IconButton.d.ts +10 -9
  34. package/Calendar/Calendar.d.ts +7 -6
  35. package/Calendar/calendarClassNames.js +1 -1
  36. package/Calendar/calendarClassNames.js.map +1 -1
  37. package/Card/Card.d.ts +8 -22
  38. package/Card/components/CancelAction.d.ts +8 -6
  39. package/Card/components/CardContent.d.ts +6 -6
  40. package/Card/components/CardTitle.d.ts +2 -2
  41. package/Card/components/ConfirmAction.d.ts +8 -6
  42. package/Card/components/Icon.d.ts +7 -6
  43. package/Checkbox/Checkbox.d.ts +7 -6
  44. package/Checkbox/primitives/CheckboxPrimitive.d.ts +17 -12
  45. package/CheckboxGroup/CheckboxGroup.d.ts +7 -6
  46. package/CheckboxGroup/primitives/CheckboxGroupPrimitive.d.ts +20 -12
  47. package/CodeEditor/CodeEditor.d.ts +7 -6
  48. package/CodeEditor/CodeEditorPrimitive.d.ts +7 -6
  49. package/CodeEditor/CodeEditorPrimitive.js +3 -1
  50. package/CodeEditor/CodeEditorPrimitive.js.map +1 -1
  51. package/ColorPicker/ColorPicker.d.ts +7 -6
  52. package/ColorPicker/primitives/ColorPickerPrimitive.d.ts +7 -6
  53. package/Command/Command.d.ts +10 -8
  54. package/DataList/DataListModal.d.ts +6 -3
  55. package/DataTable/DataTable.d.ts +23 -12
  56. package/DataTable/DataTable.js +12 -4
  57. package/DataTable/DataTable.js.map +1 -1
  58. package/DataTable/components/ColumnsVisibility.d.ts +5 -4
  59. package/DataTable/components/ColumnsVisibility.js +6 -3
  60. package/DataTable/components/ColumnsVisibility.js.map +1 -1
  61. package/DatePicker/DatePicker.d.ts +7 -6
  62. package/DatePicker/primitives/DatePickerPrimitive.d.ts +7 -6
  63. package/DatePicker/primitives/DateTimePicker.d.ts +1 -1
  64. package/DatePicker/primitives/DateTimePicker.js +15 -3
  65. package/DatePicker/primitives/DateTimePicker.js.map +1 -1
  66. package/DatePicker/primitives/components/DatePickerTrigger.js +1 -1
  67. package/DatePicker/primitives/components/DatePickerTrigger.js.map +1 -1
  68. package/DatePicker/utils/types.d.ts +2 -0
  69. package/Dialog/Dialog.d.ts +8 -22
  70. package/Dialog/components/CancelAction.d.ts +8 -6
  71. package/Dialog/components/ConfirmAction.d.ts +8 -6
  72. package/Dialog/components/DialogContent.d.ts +1 -1
  73. package/Dialog/components/DialogFooter.d.ts +1 -1
  74. package/Dialog/components/DialogTitle.d.ts +1 -1
  75. package/Dialog/components/Icon.d.ts +7 -6
  76. package/Drawer/Drawer.d.ts +8 -22
  77. package/Drawer/Drawer.stories.js +1 -0
  78. package/Drawer/Drawer.stories.js.map +1 -1
  79. package/Drawer/components/CancelButton.d.ts +8 -6
  80. package/Drawer/components/ConfirmButton.d.ts +8 -6
  81. package/Drawer/components/DrawerContent.d.ts +1 -1
  82. package/Drawer/components/Icon.d.ts +7 -6
  83. package/DropdownMenu/components/DropdownMenuItem.d.ts +3 -2
  84. package/DropdownMenu/components/DropdownMenuItem.js +9 -2
  85. package/DropdownMenu/components/DropdownMenuItem.js.map +1 -1
  86. package/DropdownMenu/components/DropdownMenuLink.d.ts +9 -8
  87. package/DropdownMenu/components/DropdownMenuSeparator.d.ts +7 -6
  88. package/EditableTitle/EditableTitle.d.ts +7 -6
  89. package/EmptyState/EmptyState.d.ts +43 -0
  90. package/EmptyState/EmptyState.js +93 -0
  91. package/EmptyState/EmptyState.js.map +1 -0
  92. package/EmptyState/EmptyState.stories.d.ts +13 -0
  93. package/EmptyState/EmptyState.stories.js +136 -0
  94. package/EmptyState/EmptyState.stories.js.map +1 -0
  95. package/EmptyState/illustrations/ContentIllustration.d.ts +2 -0
  96. package/EmptyState/illustrations/ContentIllustration.js +100 -0
  97. package/EmptyState/illustrations/ContentIllustration.js.map +1 -0
  98. package/EmptyState/illustrations/LayoutIllustration.d.ts +2 -0
  99. package/EmptyState/illustrations/LayoutIllustration.js +93 -0
  100. package/EmptyState/illustrations/LayoutIllustration.js.map +1 -0
  101. package/EmptyState/illustrations/ListingIllustration.d.ts +2 -0
  102. package/EmptyState/illustrations/ListingIllustration.js +92 -0
  103. package/EmptyState/illustrations/ListingIllustration.js.map +1 -0
  104. package/EmptyState/illustrations/SelectIllustration.d.ts +2 -0
  105. package/EmptyState/illustrations/SelectIllustration.js +100 -0
  106. package/EmptyState/illustrations/SelectIllustration.js.map +1 -0
  107. package/EmptyState/illustrations/TableIllustration.d.ts +2 -0
  108. package/EmptyState/illustrations/TableIllustration.js +233 -0
  109. package/EmptyState/illustrations/TableIllustration.js.map +1 -0
  110. package/EmptyState/illustrations/UploadIllustration.d.ts +2 -0
  111. package/EmptyState/illustrations/UploadIllustration.js +77 -0
  112. package/EmptyState/illustrations/UploadIllustration.js.map +1 -0
  113. package/EmptyState/illustrations/index.d.ts +6 -0
  114. package/EmptyState/illustrations/index.js +6 -0
  115. package/EmptyState/index.d.ts +1 -0
  116. package/EmptyState/index.js +1 -0
  117. package/FilePicker/FilePicker.d.ts +19 -18
  118. package/FilePicker/FilePicker.stories.d.ts +0 -6
  119. package/FilePicker/FilePicker.stories.js +1 -24
  120. package/FilePicker/FilePicker.stories.js.map +1 -1
  121. package/FilePicker/primitives/FilePickerPrimitive.d.ts +20 -19
  122. package/FilePicker/primitives/components/Trigger.d.ts +1 -1
  123. package/FilePicker/primitives/components/previews/ImagePreview/ImagePreview.d.ts +19 -7
  124. package/FilePicker/primitives/components/previews/ImagePreview/ImagePreview.js +15 -6
  125. package/FilePicker/primitives/components/previews/ImagePreview/ImagePreview.js.map +1 -1
  126. package/FilePicker/primitives/components/previews/ItemActions.js +1 -1
  127. package/FilePicker/primitives/components/previews/ItemActions.js.map +1 -1
  128. package/FilePicker/primitives/components/previews/ItemDescription.js +1 -1
  129. package/FilePicker/primitives/components/previews/ItemDescription.js.map +1 -1
  130. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.d.ts +12 -6
  131. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js +13 -52
  132. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js.map +1 -1
  133. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.d.ts +8 -4
  134. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js +66 -8
  135. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js.map +1 -1
  136. package/FilePicker/primitives/components/previews/TextOnlyPreview/TextOnlyPreview.d.ts +7 -6
  137. package/FilePicker/primitives/components/previews/index.d.ts +0 -1
  138. package/FilePicker/primitives/components/previews/index.js +0 -1
  139. package/FilePicker/primitives/components/previews/variants.d.ts +1 -1
  140. package/FillViewport/FillViewport.d.ts +21 -18
  141. package/FormComponent/Description.d.ts +7 -6
  142. package/FormComponent/ErrorMessage.d.ts +7 -6
  143. package/FormComponent/Label.d.ts +7 -6
  144. package/FormComponent/Note.d.ts +7 -6
  145. package/Grid/Grid.d.ts +24 -22
  146. package/HeaderBar/HeaderBar.d.ts +7 -6
  147. package/Heading/Heading.d.ts +8 -7
  148. package/Icon/Icon.d.ts +9 -8
  149. package/IconPicker/IconPicker.d.ts +7 -6
  150. package/IconPicker/primitives/IconPickerPrimitive.d.ts +1 -1
  151. package/IconPicker/primitives/components/IconPickerTrigger.d.ts +1 -1
  152. package/ImageEditor/AspectRatioPreview.d.ts +16 -0
  153. package/ImageEditor/AspectRatioPreview.js +26 -0
  154. package/ImageEditor/AspectRatioPreview.js.map +1 -0
  155. package/ImageEditor/CropHotspotEditor.d.ts +22 -0
  156. package/ImageEditor/CropHotspotEditor.js +402 -0
  157. package/ImageEditor/CropHotspotEditor.js.map +1 -0
  158. package/ImageEditor/ImageEditor.d.ts +18 -0
  159. package/ImageEditor/ImageEditor.js +151 -0
  160. package/ImageEditor/ImageEditor.js.map +1 -0
  161. package/ImageEditor/ImageEditor.stories.d.ts +6 -0
  162. package/ImageEditor/ImageEditor.stories.js +42 -0
  163. package/ImageEditor/ImageEditor.stories.js.map +1 -0
  164. package/ImageEditor/MetaFields.d.ts +12 -0
  165. package/ImageEditor/MetaFields.js +20 -0
  166. package/ImageEditor/MetaFields.js.map +1 -0
  167. package/ImageEditor/SectionLabel.d.ts +8 -0
  168. package/ImageEditor/SectionLabel.js +7 -0
  169. package/ImageEditor/SectionLabel.js.map +1 -0
  170. package/ImageEditor/geometry.d.ts +46 -0
  171. package/ImageEditor/geometry.js +126 -0
  172. package/ImageEditor/geometry.js.map +1 -0
  173. package/ImageEditor/index.d.ts +3 -0
  174. package/ImageEditor/index.js +3 -0
  175. package/ImageEditor/types.d.ts +52 -0
  176. package/ImageEditor/types.js +35 -0
  177. package/ImageEditor/types.js.map +1 -0
  178. package/Input/Input.d.ts +7 -6
  179. package/Input/InputPrimitive.d.ts +9 -8
  180. package/Label/Label.d.ts +8 -7
  181. package/Label/components/LabelValue.d.ts +1 -1
  182. package/Link/Link.d.ts +3 -3
  183. package/Link/Link.js +1 -1
  184. package/Link/Link.js.map +1 -1
  185. package/List/List.d.ts +8 -7
  186. package/List/components/ListItem.d.ts +7 -6
  187. package/List/components/ListItemAction.d.ts +7 -6
  188. package/List/components/ListItemHandle.d.ts +7 -6
  189. package/List/components/ListItemIcon.d.ts +7 -6
  190. package/List/components/ListItemSeparator.d.ts +7 -6
  191. package/Loader/Loader.d.ts +9 -8
  192. package/Loader/OverlayLoader.d.ts +7 -6
  193. package/Markdown/Markdown.d.ts +47 -0
  194. package/Markdown/Markdown.js +17 -0
  195. package/Markdown/Markdown.js.map +1 -0
  196. package/Markdown/index.d.ts +1 -0
  197. package/Markdown/index.js +1 -0
  198. package/MultiAutoComplete/MultiAutoComplete.d.ts +7 -6
  199. package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.d.ts +7 -6
  200. package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenterWithFreeInput.d.ts +3 -3
  201. package/MultiAutoComplete/primitives/useMultiAutoComplete.d.ts +3 -3
  202. package/MultiFilePicker/MultiFilePicker.d.ts +19 -18
  203. package/MultiFilePicker/primitives/MultiFilePickerPrimitive.d.ts +19 -18
  204. package/MultiSelect/MultiSelect.d.ts +7 -6
  205. package/MultiSelect/primitives/MultiSelectPrimitive.d.ts +10 -6
  206. package/MultiSelect/primitives/MultiSelectPrimitive.js +1 -1
  207. package/MultiSelect/primitives/MultiSelectPrimitive.js.map +1 -1
  208. package/Popover/Popover.d.ts +7 -6
  209. package/Popover/primitives/PopoverPrimitive.d.ts +7 -7
  210. package/ProgressBar/ProgressBar.d.ts +7 -6
  211. package/RadioGroup/RadioGroup.d.ts +7 -6
  212. package/RadioGroup/primitives/Radio.d.ts +7 -6
  213. package/RadioGroup/primitives/RadioGroupPrimitive.d.ts +5 -1
  214. package/RangeSlider/RangeSlider.d.ts +7 -6
  215. package/SegmentedControl/SegmentedControl.d.ts +8 -7
  216. package/SegmentedControl/SegmentedControlTabs.d.ts +5 -2
  217. package/SegmentedControl/primitives/SegmentedControlPrimitive.d.ts +1 -1
  218. package/Select/Select.d.ts +7 -6
  219. package/Select/primitives/components/SelectContent.js +1 -1
  220. package/Select/primitives/components/SelectContent.js.map +1 -1
  221. package/Select/primitives/components/SelectTrigger.d.ts +2 -2
  222. package/Separator/Separator.d.ts +9 -8
  223. package/Sidebar/Sidebar.d.ts +7 -6
  224. package/Sidebar/components/SidebarContent.js +1 -1
  225. package/Sidebar/components/SidebarContent.js.map +1 -1
  226. package/Sidebar/components/SidebarIcon.d.ts +7 -6
  227. package/Sidebar/components/SidebarProvider.d.ts +4 -4
  228. package/Sidebar/components/SidebarRoot.js +1 -1
  229. package/Sidebar/components/SidebarRoot.js.map +1 -1
  230. package/Sidebar/components/items/SidebarMenuGroup.d.ts +9 -8
  231. package/Sidebar/components/items/SidebarMenuItem.d.ts +11 -10
  232. package/Sidebar/components/items/SidebarMenuItemIcon.d.ts +7 -6
  233. package/Sidebar/components/items/SidebarMenuLink.d.ts +11 -10
  234. package/Sidebar/components/items/SidebarMenuProvider.d.ts +4 -4
  235. package/Sidebar/components/items/SidebarMenuRootItem.d.ts +9 -7
  236. package/Sidebar/components/items/SidebarMenuSubButton.js +5 -8
  237. package/Sidebar/components/items/SidebarMenuSubButton.js.map +1 -1
  238. package/Sidebar/components/items/SidebarMenuSubItem.js +3 -3
  239. package/Sidebar/components/items/SidebarMenuSubItem.js.map +1 -1
  240. package/Skeleton/Skeleton.d.ts +9 -7
  241. package/Skeleton/Skeleton.js +10 -4
  242. package/Skeleton/Skeleton.js.map +1 -1
  243. package/Skeleton/Skeleton.stories.d.ts +2 -0
  244. package/Skeleton/Skeleton.stories.js +28 -2
  245. package/Skeleton/Skeleton.stories.js.map +1 -1
  246. package/Slider/Slider.d.ts +7 -6
  247. package/SteppedProgress/SteppedProgress.d.ts +7 -6
  248. package/SteppedProgress/SteppedProgressItem.d.ts +7 -6
  249. package/Switch/Switch.d.ts +7 -6
  250. package/Switch/primitives/SwitchPrimitive.d.ts +10 -6
  251. package/Table/Table.d.ts +12 -10
  252. package/Table/components/Direction.d.ts +1 -1
  253. package/Tabs/Tabs.d.ts +8 -6
  254. package/Tabs/Tabs.js +5 -2
  255. package/Tabs/Tabs.js.map +1 -1
  256. package/Tabs/components/Content.d.ts +1 -1
  257. package/Tabs/components/List.d.ts +2 -2
  258. package/Tabs/components/Tab.d.ts +7 -6
  259. package/Tabs/components/Trigger.d.ts +3 -2
  260. package/Tabs/components/Trigger.js +8 -3
  261. package/Tabs/components/Trigger.js.map +1 -1
  262. package/Tag/Tag.d.ts +8 -7
  263. package/Tags/Tags.d.ts +7 -6
  264. package/Tags/primitives/TagsPrimitive.d.ts +7 -6
  265. package/Text/Text.d.ts +8 -7
  266. package/Textarea/Textarea.d.ts +7 -6
  267. package/Textarea/TextareaPrimitive.d.ts +9 -8
  268. package/Toast/Toast.d.ts +7 -6
  269. package/Toast/components/ToastActions.d.ts +7 -6
  270. package/Toast/components/ToastDescription.d.ts +7 -6
  271. package/Toast/components/ToastTitle.d.ts +7 -6
  272. package/Toast/useToast.stories.js.map +1 -1
  273. package/Toggle/Toggle.d.ts +7 -6
  274. package/Toggle/primitives/TogglePrimitive.d.ts +13 -9
  275. package/ToggleGroup/ToggleGroup.d.ts +7 -6
  276. package/ToggleGroup/primitives/ToggleGroupPrimitive.d.ts +13 -9
  277. package/Tooltip/Tooltip.d.ts +7 -6
  278. package/Tree/Tree.d.ts +7 -6
  279. package/Tree/components/Item.d.ts +7 -6
  280. package/Tree/components/ItemCollapseTrigger.d.ts +7 -6
  281. package/Tree/components/ItemContent.d.ts +8 -6
  282. package/Tree/components/ItemDragHandle.d.ts +7 -6
  283. package/Tree/components/ItemIcon.d.ts +7 -6
  284. package/Tree/components/ItemPlaceholder.d.ts +7 -6
  285. package/Tree/components/ItemSubIndentation.d.ts +7 -6
  286. package/Tree/useTree.js +2 -6
  287. package/Tree/useTree.js.map +1 -1
  288. package/Widget/Widget.d.ts +8 -22
  289. package/Widget/components/Icon.d.ts +7 -6
  290. package/Widget/components/WidgetAction.d.ts +8 -6
  291. package/Widget/components/WidgetContent.d.ts +5 -5
  292. package/exports/admin/ui.d.ts +2 -0
  293. package/exports/admin/ui.js +2 -0
  294. package/index.d.ts +5 -0
  295. package/index.js +5 -0
  296. package/package.json +29 -29
  297. package/theme.css +22 -1
  298. package/utils.js +52 -34
  299. package/utils.js.map +1 -1
  300. package/FilePicker/primitives/components/previews/RichItemPreview/FileType.d.ts +0 -9
  301. package/FilePicker/primitives/components/previews/RichItemPreview/FileType.js +0 -45
  302. package/FilePicker/primitives/components/previews/RichItemPreview/FileType.js.map +0 -1
  303. package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.d.ts +0 -8
  304. package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.js +0 -14
  305. package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.js.map +0 -1
  306. package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.d.ts +0 -11
  307. package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js +0 -20
  308. package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js.map +0 -1
  309. package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.d.ts +0 -15
  310. package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.js +0 -46
  311. package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.js.map +0 -1
  312. package/FilePicker/primitives/components/previews/TruncatedFileName.d.ts +0 -11
  313. package/FilePicker/primitives/components/previews/TruncatedFileName.js +0 -20
  314. package/FilePicker/primitives/components/previews/TruncatedFileName.js.map +0 -1
  315. package/FilePicker/primitives/components/previews/fileName.d.ts +0 -12
  316. package/FilePicker/primitives/components/previews/fileName.js +0 -26
  317. package/FilePicker/primitives/components/previews/fileName.js.map +0 -1
@@ -22,60 +22,61 @@ interface MultiFilePickerPrimitiveProps extends Omit<FilePickerPrimitiveProps, "
22
22
  */
23
23
  onRemoveItem?: (item: FileItemFormatted | null, index: number) => void;
24
24
  }
25
- declare const MultiFilePickerPrimitive: (({ className, buttonPlaceholder, containerStyle, description, disabled, invalid, label, onEditItem, onRemoveItem, onReplaceItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, values, variant }: MultiFilePickerPrimitiveProps) => React.JSX.Element) & {
26
- original: ({ className, buttonPlaceholder, containerStyle, description, disabled, invalid, label, onEditItem, onRemoveItem, onReplaceItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, values, variant }: MultiFilePickerPrimitiveProps) => React.JSX.Element;
25
+ declare const BaseMultiFilePickerPrimitive: ({ className, buttonPlaceholder, containerStyle, description, disabled, invalid, label, onEditItem, onRemoveItem, onReplaceItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, values, variant }: MultiFilePickerPrimitiveProps) => React.JSX.Element;
26
+ declare const MultiFilePickerPrimitive: typeof BaseMultiFilePickerPrimitive & {
27
+ original: typeof BaseMultiFilePickerPrimitive;
27
28
  originalName: string;
28
29
  displayName: string;
29
30
  } & {
30
- original: (({ className, buttonPlaceholder, containerStyle, description, disabled, invalid, label, onEditItem, onRemoveItem, onReplaceItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, values, variant }: MultiFilePickerPrimitiveProps) => React.JSX.Element) & {
31
- original: ({ className, buttonPlaceholder, containerStyle, description, disabled, invalid, label, onEditItem, onRemoveItem, onReplaceItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, values, variant }: MultiFilePickerPrimitiveProps) => React.JSX.Element;
31
+ original: typeof BaseMultiFilePickerPrimitive & {
32
+ original: typeof BaseMultiFilePickerPrimitive;
32
33
  originalName: string;
33
34
  displayName: string;
34
35
  };
35
36
  originalName: string;
36
37
  displayName: string;
37
38
  } & {
38
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ className, buttonPlaceholder, containerStyle, description, disabled, invalid, label, onEditItem, onRemoveItem, onReplaceItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, values, variant }: MultiFilePickerPrimitiveProps) => React.JSX.Element) & {
39
- original: ({ className, buttonPlaceholder, containerStyle, description, disabled, invalid, label, onEditItem, onRemoveItem, onReplaceItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, values, variant }: MultiFilePickerPrimitiveProps) => React.JSX.Element;
39
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof BaseMultiFilePickerPrimitive & {
40
+ original: typeof BaseMultiFilePickerPrimitive;
40
41
  originalName: string;
41
42
  displayName: string;
42
43
  }>) => (props: unknown) => React.JSX.Element;
43
44
  } & {
44
45
  Preview: {
45
- Image: (({ value, className, variant, disabled, onRemoveItem, onReplaceItem, onEditItem }: import("~/FilePicker/index.js").ImagePreviewProps) => React.JSX.Element) & {
46
- original: ({ value, className, variant, disabled, onRemoveItem, onReplaceItem, onEditItem }: import("~/FilePicker/index.js").ImagePreviewProps) => React.JSX.Element;
46
+ Image: (({ value, className, variant, disabled, onRemoveItem, onReplaceItem, onEditItem, renderImage }: import("~/FilePicker/index.js").ImagePreviewProps) => React.JSX.Element) & {
47
+ original: ({ value, className, variant, disabled, onRemoveItem, onReplaceItem, onEditItem, renderImage }: import("~/FilePicker/index.js").ImagePreviewProps) => React.JSX.Element;
47
48
  originalName: string;
48
49
  displayName: string;
49
50
  } & {
50
- original: (({ value, className, variant, disabled, onRemoveItem, onReplaceItem, onEditItem }: import("~/FilePicker/index.js").ImagePreviewProps) => React.JSX.Element) & {
51
- original: ({ value, className, variant, disabled, onRemoveItem, onReplaceItem, onEditItem }: import("~/FilePicker/index.js").ImagePreviewProps) => React.JSX.Element;
51
+ original: (({ value, className, variant, disabled, onRemoveItem, onReplaceItem, onEditItem, renderImage }: import("~/FilePicker/index.js").ImagePreviewProps) => React.JSX.Element) & {
52
+ original: ({ value, className, variant, disabled, onRemoveItem, onReplaceItem, onEditItem, renderImage }: import("~/FilePicker/index.js").ImagePreviewProps) => React.JSX.Element;
52
53
  originalName: string;
53
54
  displayName: string;
54
55
  };
55
56
  originalName: string;
56
57
  displayName: string;
57
58
  } & {
58
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ value, className, variant, disabled, onRemoveItem, onReplaceItem, onEditItem }: import("~/FilePicker/index.js").ImagePreviewProps) => React.JSX.Element) & {
59
- original: ({ value, className, variant, disabled, onRemoveItem, onReplaceItem, onEditItem }: import("~/FilePicker/index.js").ImagePreviewProps) => React.JSX.Element;
59
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ value, className, variant, disabled, onRemoveItem, onReplaceItem, onEditItem, renderImage }: import("~/FilePicker/index.js").ImagePreviewProps) => React.JSX.Element) & {
60
+ original: ({ value, className, variant, disabled, onRemoveItem, onReplaceItem, onEditItem, renderImage }: import("~/FilePicker/index.js").ImagePreviewProps) => React.JSX.Element;
60
61
  originalName: string;
61
62
  displayName: string;
62
63
  }>) => (props: unknown) => React.JSX.Element;
63
64
  };
64
- RichItem: (({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, value, variant, preview, ...props }: import("~/FilePicker/index.js").RichItemPreviewProps) => React.JSX.Element) & {
65
- original: ({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, value, variant, preview, ...props }: import("~/FilePicker/index.js").RichItemPreviewProps) => React.JSX.Element;
65
+ RichItem: (({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, value, variant, preview, renderImage, ...props }: import("~/FilePicker/index.js").RichItemPreviewProps) => React.JSX.Element) & {
66
+ original: ({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, value, variant, preview, renderImage, ...props }: import("~/FilePicker/index.js").RichItemPreviewProps) => React.JSX.Element;
66
67
  originalName: string;
67
68
  displayName: string;
68
69
  } & {
69
- original: (({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, value, variant, preview, ...props }: import("~/FilePicker/index.js").RichItemPreviewProps) => React.JSX.Element) & {
70
- original: ({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, value, variant, preview, ...props }: import("~/FilePicker/index.js").RichItemPreviewProps) => React.JSX.Element;
70
+ original: (({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, value, variant, preview, renderImage, ...props }: import("~/FilePicker/index.js").RichItemPreviewProps) => React.JSX.Element) & {
71
+ original: ({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, value, variant, preview, renderImage, ...props }: import("~/FilePicker/index.js").RichItemPreviewProps) => React.JSX.Element;
71
72
  originalName: string;
72
73
  displayName: string;
73
74
  };
74
75
  originalName: string;
75
76
  displayName: string;
76
77
  } & {
77
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, value, variant, preview, ...props }: import("~/FilePicker/index.js").RichItemPreviewProps) => React.JSX.Element) & {
78
- original: ({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, value, variant, preview, ...props }: import("~/FilePicker/index.js").RichItemPreviewProps) => React.JSX.Element;
78
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, value, variant, preview, renderImage, ...props }: import("~/FilePicker/index.js").RichItemPreviewProps) => React.JSX.Element) & {
79
+ original: ({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, value, variant, preview, renderImage, ...props }: import("~/FilePicker/index.js").RichItemPreviewProps) => React.JSX.Element;
79
80
  originalName: string;
80
81
  displayName: string;
81
82
  }>) => (props: unknown) => React.JSX.Element;
@@ -2,21 +2,22 @@ import React from "react";
2
2
  import type { MultiSelectPrimitiveProps } from "./primitives/index.js";
3
3
  import type { FormComponentProps } from "../FormComponent/index.js";
4
4
  type MultiSelectProps = MultiSelectPrimitiveProps & FormComponentProps;
5
- declare const MultiSelect: (({ label, description, note, hint, required, disabled, validation, ...props }: MultiSelectProps) => React.JSX.Element) & {
6
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: MultiSelectProps) => React.JSX.Element;
5
+ declare const DecoratableMultiSelect: ({ label, description, note, hint, required, disabled, validation, ...props }: MultiSelectProps) => React.JSX.Element;
6
+ declare const MultiSelect: typeof DecoratableMultiSelect & {
7
+ original: typeof DecoratableMultiSelect;
7
8
  originalName: string;
8
9
  displayName: string;
9
10
  } & {
10
- original: (({ label, description, note, hint, required, disabled, validation, ...props }: MultiSelectProps) => React.JSX.Element) & {
11
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: MultiSelectProps) => React.JSX.Element;
11
+ original: typeof DecoratableMultiSelect & {
12
+ original: typeof DecoratableMultiSelect;
12
13
  originalName: string;
13
14
  displayName: string;
14
15
  };
15
16
  originalName: string;
16
17
  displayName: string;
17
18
  } & {
18
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ label, description, note, hint, required, disabled, validation, ...props }: MultiSelectProps) => React.JSX.Element) & {
19
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: MultiSelectProps) => React.JSX.Element;
19
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableMultiSelect & {
20
+ original: typeof DecoratableMultiSelect;
20
21
  originalName: string;
21
22
  displayName: string;
22
23
  }>) => (props: unknown) => React.JSX.Element;
@@ -23,21 +23,25 @@ interface MultiSelectPrimitiveProps {
23
23
  size?: VariantProps<typeof selectTriggerVariants>["size"];
24
24
  variant?: VariantProps<typeof selectTriggerVariants>["variant"];
25
25
  }
26
- declare const MultiSelectPrimitive: (({ options, value, onChange, onValueReset, placeholder, disabled, invalid, displayResetAction, showSelectionCount, size, variant }: MultiSelectPrimitiveProps) => React.JSX.Element) & {
27
- original: ({ options, value, onChange, onValueReset, placeholder, disabled, invalid, displayResetAction, showSelectionCount, size, variant }: MultiSelectPrimitiveProps) => React.JSX.Element;
26
+ /**
27
+ * MultiSelect Primitive
28
+ */
29
+ declare const DecoratableMultiSelectPrimitive: ({ options, value, onChange, onValueReset, placeholder, disabled, invalid, displayResetAction, showSelectionCount, size, variant }: MultiSelectPrimitiveProps) => React.JSX.Element;
30
+ declare const MultiSelectPrimitive: typeof DecoratableMultiSelectPrimitive & {
31
+ original: typeof DecoratableMultiSelectPrimitive;
28
32
  originalName: string;
29
33
  displayName: string;
30
34
  } & {
31
- original: (({ options, value, onChange, onValueReset, placeholder, disabled, invalid, displayResetAction, showSelectionCount, size, variant }: MultiSelectPrimitiveProps) => React.JSX.Element) & {
32
- original: ({ options, value, onChange, onValueReset, placeholder, disabled, invalid, displayResetAction, showSelectionCount, size, variant }: MultiSelectPrimitiveProps) => React.JSX.Element;
35
+ original: typeof DecoratableMultiSelectPrimitive & {
36
+ original: typeof DecoratableMultiSelectPrimitive;
33
37
  originalName: string;
34
38
  displayName: string;
35
39
  };
36
40
  originalName: string;
37
41
  displayName: string;
38
42
  } & {
39
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ options, value, onChange, onValueReset, placeholder, disabled, invalid, displayResetAction, showSelectionCount, size, variant }: MultiSelectPrimitiveProps) => React.JSX.Element) & {
40
- original: ({ options, value, onChange, onValueReset, placeholder, disabled, invalid, displayResetAction, showSelectionCount, size, variant }: MultiSelectPrimitiveProps) => React.JSX.Element;
43
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableMultiSelectPrimitive & {
44
+ original: typeof DecoratableMultiSelectPrimitive;
41
45
  originalName: string;
42
46
  displayName: string;
43
47
  }>) => (props: unknown) => React.JSX.Element;
@@ -53,7 +53,7 @@ const MultiSelectContent = ({ options, value, onToggle })=>/*#__PURE__*/ react.c
53
53
  className: cn("relative z-popover shadow-lg py-sm overflow-y-auto rounded-sm border-sm border-neutral-muted bg-neutral-base text-neutral-strong", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2", "data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1"),
54
54
  style: {
55
55
  width: "var(--radix-popover-trigger-width)",
56
- maxHeight: "var(--radix-popover-content-available-height, 24rem)"
56
+ maxHeight: "min(250px, var(--radix-popover-content-available-height, 250px))"
57
57
  },
58
58
  align: "start",
59
59
  sideOffset: 4
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelect/primitives/MultiSelectPrimitive.js","sources":["../../../src/MultiSelect/primitives/MultiSelectPrimitive.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport { Popover } from \"radix-ui\";\nimport { ReactComponent as ChevronDown } from \"@webiny/icons/keyboard_arrow_down.svg\";\nimport { ReactComponent as Close } from \"@webiny/icons/close.svg\";\nimport { cn, makeDecoratable, type VariantProps } from \"~/utils.js\";\nimport { CheckboxPrimitiveRenderer } from \"~/Checkbox/index.js\";\nimport { Icon } from \"~/Icon/index.js\";\nimport { IconButton } from \"~/Button/index.js\";\nimport { selectTriggerVariants } from \"~/Select/primitives/components/index.js\";\n\ninterface MultiSelectOptionDto {\n label: string;\n value: string;\n disabled?: boolean;\n}\n\ninterface MultiSelectPrimitiveProps {\n options?: MultiSelectOptionDto[];\n value?: string[];\n onChange?: (values: string[]) => void;\n onValueReset?: () => void;\n placeholder?: string;\n disabled?: boolean;\n invalid?: boolean;\n displayResetAction?: boolean;\n /**\n * When `true`, shows \"{count} items selected\" in the trigger instead of the full\n * comma-separated label list.\n */\n showSelectionCount?: boolean;\n size?: VariantProps<typeof selectTriggerVariants>[\"size\"];\n variant?: VariantProps<typeof selectTriggerVariants>[\"variant\"];\n}\n\n/**\n * MultiSelect Trigger\n */\ninterface MultiSelectTriggerProps {\n displayValue: string;\n hasValue: boolean;\n placeholder: string;\n displayResetAction: boolean;\n disabled?: boolean;\n invalid?: VariantProps<typeof selectTriggerVariants>[\"invalid\"];\n size?: VariantProps<typeof selectTriggerVariants>[\"size\"];\n variant?: VariantProps<typeof selectTriggerVariants>[\"variant\"];\n onValueReset: () => void;\n}\n\nconst MultiSelectTrigger = ({\n displayValue,\n hasValue,\n placeholder,\n displayResetAction,\n disabled,\n invalid,\n size,\n variant,\n onValueReset\n}: MultiSelectTriggerProps) => {\n const resetButton = useMemo(() => {\n if (!hasValue || !displayResetAction) {\n return undefined;\n }\n return (\n <IconButton\n onPointerDown={event => {\n event.stopPropagation();\n onValueReset();\n }}\n icon={\n <span>\n <Icon\n icon={<Close />}\n label={\"Reset\"}\n color={variant === \"ghost-negative\" ? \"neutral-negative\" : \"inherit\"}\n />\n </span>\n }\n size={\"xs\"}\n variant={variant === \"ghost-negative\" ? \"ghost-negative\" : \"secondary\"}\n disabled={disabled}\n asChild\n />\n );\n }, [hasValue, displayResetAction, onValueReset, variant, disabled]);\n\n return (\n <Popover.Trigger\n className={cn(selectTriggerVariants({ variant, size, invalid }))}\n disabled={disabled}\n >\n <div className={\"flex-1 text-left truncate\"}>\n {hasValue ? (\n displayValue\n ) : (\n <span className={\"text-neutral-disabled\"}>{placeholder}</span>\n )}\n </div>\n {resetButton}\n <span className={\"h-md w-md shrink-0 fill-neutral-xstrong\"}>\n <ChevronDown className={\"h-md w-md\"} />\n </span>\n </Popover.Trigger>\n );\n};\n\n/**\n * MultiSelect Content\n */\ninterface MultiSelectContentProps {\n options: MultiSelectOptionDto[];\n value: string[];\n onToggle: (value: string) => void;\n}\n\nconst MultiSelectContent = ({ options, value, onToggle }: MultiSelectContentProps) => {\n return (\n <Popover.Portal>\n <Popover.Content\n className={cn(\n \"relative z-popover shadow-lg py-sm overflow-y-auto rounded-sm border-sm border-neutral-muted bg-neutral-base text-neutral-strong\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2\",\n \"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1\"\n )}\n style={{\n width: \"var(--radix-popover-trigger-width)\",\n maxHeight: \"var(--radix-popover-content-available-height, 24rem)\"\n }}\n align={\"start\"}\n sideOffset={4}\n >\n {options.map(option => (\n <div\n key={option.value}\n className={cn(\n \"rounded-sm p-sm mx-sm cursor-pointer\",\n \"hover:bg-neutral-dimmed\",\n option.disabled && \"opacity-50 pointer-events-none\"\n )}\n onClick={() => onToggle(option.value)}\n >\n <div className={\"pointer-events-none\"}>\n <CheckboxPrimitiveRenderer\n id={option.value}\n label={option.label}\n value={option.value}\n checked={value.includes(option.value)}\n disabled={option.disabled ?? false}\n indeterminate={false}\n hasLabel={true}\n changeChecked={() => {}}\n />\n </div>\n </div>\n ))}\n </Popover.Content>\n </Popover.Portal>\n );\n};\n\n/**\n * MultiSelect Primitive\n */\nconst DecoratableMultiSelectPrimitive = ({\n options = [],\n value = [],\n onChange,\n onValueReset,\n placeholder = \"Select options\",\n disabled,\n invalid,\n displayResetAction = true,\n showSelectionCount,\n size,\n variant\n}: MultiSelectPrimitiveProps) => {\n const displayValue = useMemo(() => {\n if (value.length === 0) {\n return \"\";\n }\n if (showSelectionCount) {\n return `${value.length} items selected`;\n }\n const labelMap = new Map(options.map(o => [o.value, o.label]));\n return value.map(v => labelMap.get(v) ?? v).join(\", \");\n }, [value, options, showSelectionCount]);\n\n const toggle = useCallback(\n (optionValue: string) => {\n const next = value.includes(optionValue)\n ? value.filter(v => v !== optionValue)\n : [...value, optionValue];\n onChange?.(next);\n },\n [value, onChange]\n );\n\n const reset = useCallback(() => {\n onChange?.([]);\n onValueReset?.();\n }, [onChange, onValueReset]);\n\n return (\n <Popover.Root>\n <MultiSelectTrigger\n displayValue={displayValue}\n hasValue={value.length > 0}\n placeholder={placeholder}\n displayResetAction={displayResetAction}\n disabled={disabled}\n invalid={invalid}\n size={size}\n variant={variant}\n onValueReset={reset}\n />\n <MultiSelectContent options={options} value={value} onToggle={toggle} />\n </Popover.Root>\n );\n};\nconst MultiSelectPrimitive = makeDecoratable(\n \"MultiSelectPrimitive\",\n DecoratableMultiSelectPrimitive\n);\n\nexport { MultiSelectPrimitive, type MultiSelectPrimitiveProps, type MultiSelectOptionDto };\n"],"names":["MultiSelectTrigger","displayValue","hasValue","placeholder","displayResetAction","disabled","invalid","size","variant","onValueReset","resetButton","useMemo","IconButton","event","Icon","Close","Popover","cn","selectTriggerVariants","ChevronDown","MultiSelectContent","options","value","onToggle","option","CheckboxPrimitiveRenderer","DecoratableMultiSelectPrimitive","onChange","showSelectionCount","labelMap","Map","o","v","toggle","useCallback","optionValue","next","reset","MultiSelectPrimitive","makeDecoratable"],"mappings":"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"}
1
+ {"version":3,"file":"MultiSelect/primitives/MultiSelectPrimitive.js","sources":["../../../src/MultiSelect/primitives/MultiSelectPrimitive.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport { Popover } from \"radix-ui\";\nimport { ReactComponent as ChevronDown } from \"@webiny/icons/keyboard_arrow_down.svg\";\nimport { ReactComponent as Close } from \"@webiny/icons/close.svg\";\nimport { cn, makeDecoratable, type VariantProps } from \"~/utils.js\";\nimport { CheckboxPrimitiveRenderer } from \"~/Checkbox/index.js\";\nimport { Icon } from \"~/Icon/index.js\";\nimport { IconButton } from \"~/Button/index.js\";\nimport { selectTriggerVariants } from \"~/Select/primitives/components/index.js\";\n\ninterface MultiSelectOptionDto {\n label: string;\n value: string;\n disabled?: boolean;\n}\n\ninterface MultiSelectPrimitiveProps {\n options?: MultiSelectOptionDto[];\n value?: string[];\n onChange?: (values: string[]) => void;\n onValueReset?: () => void;\n placeholder?: string;\n disabled?: boolean;\n invalid?: boolean;\n displayResetAction?: boolean;\n /**\n * When `true`, shows \"{count} items selected\" in the trigger instead of the full\n * comma-separated label list.\n */\n showSelectionCount?: boolean;\n size?: VariantProps<typeof selectTriggerVariants>[\"size\"];\n variant?: VariantProps<typeof selectTriggerVariants>[\"variant\"];\n}\n\n/**\n * MultiSelect Trigger\n */\ninterface MultiSelectTriggerProps {\n displayValue: string;\n hasValue: boolean;\n placeholder: string;\n displayResetAction: boolean;\n disabled?: boolean;\n invalid?: VariantProps<typeof selectTriggerVariants>[\"invalid\"];\n size?: VariantProps<typeof selectTriggerVariants>[\"size\"];\n variant?: VariantProps<typeof selectTriggerVariants>[\"variant\"];\n onValueReset: () => void;\n}\n\nconst MultiSelectTrigger = ({\n displayValue,\n hasValue,\n placeholder,\n displayResetAction,\n disabled,\n invalid,\n size,\n variant,\n onValueReset\n}: MultiSelectTriggerProps) => {\n const resetButton = useMemo(() => {\n if (!hasValue || !displayResetAction) {\n return undefined;\n }\n return (\n <IconButton\n onPointerDown={event => {\n event.stopPropagation();\n onValueReset();\n }}\n icon={\n <span>\n <Icon\n icon={<Close />}\n label={\"Reset\"}\n color={variant === \"ghost-negative\" ? \"neutral-negative\" : \"inherit\"}\n />\n </span>\n }\n size={\"xs\"}\n variant={variant === \"ghost-negative\" ? \"ghost-negative\" : \"secondary\"}\n disabled={disabled}\n asChild\n />\n );\n }, [hasValue, displayResetAction, onValueReset, variant, disabled]);\n\n return (\n <Popover.Trigger\n className={cn(selectTriggerVariants({ variant, size, invalid }))}\n disabled={disabled}\n >\n <div className={\"flex-1 text-left truncate\"}>\n {hasValue ? (\n displayValue\n ) : (\n <span className={\"text-neutral-disabled\"}>{placeholder}</span>\n )}\n </div>\n {resetButton}\n <span className={\"h-md w-md shrink-0 fill-neutral-xstrong\"}>\n <ChevronDown className={\"h-md w-md\"} />\n </span>\n </Popover.Trigger>\n );\n};\n\n/**\n * MultiSelect Content\n */\ninterface MultiSelectContentProps {\n options: MultiSelectOptionDto[];\n value: string[];\n onToggle: (value: string) => void;\n}\n\nconst MultiSelectContent = ({ options, value, onToggle }: MultiSelectContentProps) => {\n return (\n <Popover.Portal>\n <Popover.Content\n className={cn(\n \"relative z-popover shadow-lg py-sm overflow-y-auto rounded-sm border-sm border-neutral-muted bg-neutral-base text-neutral-strong\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2\",\n \"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1\"\n )}\n style={{\n width: \"var(--radix-popover-trigger-width)\",\n maxHeight: \"min(250px, var(--radix-popover-content-available-height, 250px))\"\n }}\n align={\"start\"}\n sideOffset={4}\n >\n {options.map(option => (\n <div\n key={option.value}\n className={cn(\n \"rounded-sm p-sm mx-sm cursor-pointer\",\n \"hover:bg-neutral-dimmed\",\n option.disabled && \"opacity-50 pointer-events-none\"\n )}\n onClick={() => onToggle(option.value)}\n >\n <div className={\"pointer-events-none\"}>\n <CheckboxPrimitiveRenderer\n id={option.value}\n label={option.label}\n value={option.value}\n checked={value.includes(option.value)}\n disabled={option.disabled ?? false}\n indeterminate={false}\n hasLabel={true}\n changeChecked={() => {}}\n />\n </div>\n </div>\n ))}\n </Popover.Content>\n </Popover.Portal>\n );\n};\n\n/**\n * MultiSelect Primitive\n */\nconst DecoratableMultiSelectPrimitive = ({\n options = [],\n value = [],\n onChange,\n onValueReset,\n placeholder = \"Select options\",\n disabled,\n invalid,\n displayResetAction = true,\n showSelectionCount,\n size,\n variant\n}: MultiSelectPrimitiveProps) => {\n const displayValue = useMemo(() => {\n if (value.length === 0) {\n return \"\";\n }\n if (showSelectionCount) {\n return `${value.length} items selected`;\n }\n const labelMap = new Map(options.map(o => [o.value, o.label]));\n return value.map(v => labelMap.get(v) ?? v).join(\", \");\n }, [value, options, showSelectionCount]);\n\n const toggle = useCallback(\n (optionValue: string) => {\n const next = value.includes(optionValue)\n ? value.filter(v => v !== optionValue)\n : [...value, optionValue];\n onChange?.(next);\n },\n [value, onChange]\n );\n\n const reset = useCallback(() => {\n onChange?.([]);\n onValueReset?.();\n }, [onChange, onValueReset]);\n\n return (\n <Popover.Root>\n <MultiSelectTrigger\n displayValue={displayValue}\n hasValue={value.length > 0}\n placeholder={placeholder}\n displayResetAction={displayResetAction}\n disabled={disabled}\n invalid={invalid}\n size={size}\n variant={variant}\n onValueReset={reset}\n />\n <MultiSelectContent options={options} value={value} onToggle={toggle} />\n </Popover.Root>\n );\n};\nconst MultiSelectPrimitive = makeDecoratable(\n \"MultiSelectPrimitive\",\n DecoratableMultiSelectPrimitive\n);\n\nexport { MultiSelectPrimitive, type MultiSelectPrimitiveProps, type MultiSelectOptionDto };\n"],"names":["MultiSelectTrigger","displayValue","hasValue","placeholder","displayResetAction","disabled","invalid","size","variant","onValueReset","resetButton","useMemo","IconButton","event","Icon","Close","Popover","cn","selectTriggerVariants","ChevronDown","MultiSelectContent","options","value","onToggle","option","CheckboxPrimitiveRenderer","DecoratableMultiSelectPrimitive","onChange","showSelectionCount","labelMap","Map","o","v","toggle","useCallback","optionValue","next","reset","MultiSelectPrimitive","makeDecoratable"],"mappings":"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"}
@@ -9,21 +9,22 @@ interface PopoverProps extends PopoverPrimitiveProps, Omit<PopoverPrimitiveProps
9
9
  trigger: React.ReactNode;
10
10
  variant?: PopoverPrimitiveContentProps["variant"];
11
11
  }
12
- declare const Popover: (({ align, arrow, close, content, side, trigger, variant, ...props }: PopoverProps) => React.JSX.Element) & {
13
- original: ({ align, arrow, close, content, side, trigger, variant, ...props }: PopoverProps) => React.JSX.Element;
12
+ declare const DecoratablePopover: ({ align, arrow, close, content, side, trigger, variant, ...props }: PopoverProps) => React.JSX.Element;
13
+ declare const Popover: typeof DecoratablePopover & {
14
+ original: typeof DecoratablePopover;
14
15
  originalName: string;
15
16
  displayName: string;
16
17
  } & {
17
- original: (({ align, arrow, close, content, side, trigger, variant, ...props }: PopoverProps) => React.JSX.Element) & {
18
- original: ({ align, arrow, close, content, side, trigger, variant, ...props }: PopoverProps) => React.JSX.Element;
18
+ original: typeof DecoratablePopover & {
19
+ original: typeof DecoratablePopover;
19
20
  originalName: string;
20
21
  displayName: string;
21
22
  };
22
23
  originalName: string;
23
24
  displayName: string;
24
25
  } & {
25
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ align, arrow, close, content, side, trigger, variant, ...props }: PopoverProps) => React.JSX.Element) & {
26
- original: ({ align, arrow, close, content, side, trigger, variant, ...props }: PopoverProps) => React.JSX.Element;
26
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratablePopover & {
27
+ original: typeof DecoratablePopover;
27
28
  originalName: string;
28
29
  displayName: string;
29
30
  }>) => (props: unknown) => React.JSX.Element;
@@ -1,9 +1,9 @@
1
- import { type PopoverAnchorProps as PopoverPrimitiveAnchorProps, type PopoverArrowProps as PopoverPrimitiveArrowProps, type PopoverCloseProps as PopoverPrimitiveCloseProps, type PopoverContentProps as PopoverPrimitiveContentProps, type PopoverRootProps as PopoverPrimitiveProps, type PopoverTriggerProps as PopoverPrimitiveTriggerProps } from "./components/index.js";
2
- declare const PopoverPrimitive: (({ ...props }: PopoverPrimitiveProps) => import("react").JSX.Element) & {
3
- Anchor: ({ ...props }: PopoverPrimitiveAnchorProps) => import("react").JSX.Element;
4
- Arrow: ({ variant, className, ...props }: PopoverPrimitiveArrowProps) => import("react").JSX.Element;
5
- Close: ({ ...props }: PopoverPrimitiveCloseProps) => import("react").JSX.Element;
6
- Content: ({ className, variant, arrow, align, sideOffset, collisionPadding, ...props }: PopoverPrimitiveContentProps) => import("react").JSX.Element;
7
- Trigger: ({ ...props }: PopoverPrimitiveTriggerProps) => import("react").JSX.Element;
1
+ import { PopoverAnchor, PopoverArrow, PopoverContent, PopoverClose, PopoverRoot, PopoverTrigger, type PopoverAnchorProps as PopoverPrimitiveAnchorProps, type PopoverArrowProps as PopoverPrimitiveArrowProps, type PopoverCloseProps as PopoverPrimitiveCloseProps, type PopoverContentProps as PopoverPrimitiveContentProps, type PopoverRootProps as PopoverPrimitiveProps, type PopoverTriggerProps as PopoverPrimitiveTriggerProps } from "./components/index.js";
2
+ declare const PopoverPrimitive: typeof PopoverRoot & {
3
+ Anchor: typeof PopoverAnchor;
4
+ Arrow: typeof PopoverArrow;
5
+ Close: typeof PopoverClose;
6
+ Content: typeof PopoverContent;
7
+ Trigger: typeof PopoverTrigger;
8
8
  };
9
9
  export { PopoverPrimitive, type PopoverPrimitiveProps, type PopoverPrimitiveAnchorProps, type PopoverPrimitiveArrowProps, type PopoverPrimitiveCloseProps, type PopoverPrimitiveContentProps, type PopoverPrimitiveTriggerProps };
@@ -3,21 +3,22 @@ import { type ProgressRootProps } from "./components/index.js";
3
3
  interface ProgressBarProps extends ProgressRootProps {
4
4
  valuePosition?: "start" | "end" | "both";
5
5
  }
6
- declare const ProgressBar: (({ valuePosition, className, ...props }: ProgressBarProps) => React.JSX.Element) & {
7
- original: ({ valuePosition, className, ...props }: ProgressBarProps) => React.JSX.Element;
6
+ declare const DecoratableProgressBar: ({ valuePosition, className, ...props }: ProgressBarProps) => React.JSX.Element;
7
+ declare const ProgressBar: typeof DecoratableProgressBar & {
8
+ original: typeof DecoratableProgressBar;
8
9
  originalName: string;
9
10
  displayName: string;
10
11
  } & {
11
- original: (({ valuePosition, className, ...props }: ProgressBarProps) => React.JSX.Element) & {
12
- original: ({ valuePosition, className, ...props }: ProgressBarProps) => React.JSX.Element;
12
+ original: typeof DecoratableProgressBar & {
13
+ original: typeof DecoratableProgressBar;
13
14
  originalName: string;
14
15
  displayName: string;
15
16
  };
16
17
  originalName: string;
17
18
  displayName: string;
18
19
  } & {
19
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ valuePosition, className, ...props }: ProgressBarProps) => React.JSX.Element) & {
20
- original: ({ valuePosition, className, ...props }: ProgressBarProps) => React.JSX.Element;
20
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableProgressBar & {
21
+ original: typeof DecoratableProgressBar;
21
22
  originalName: string;
22
23
  displayName: string;
23
24
  }>) => (props: unknown) => React.JSX.Element;
@@ -2,21 +2,22 @@ import React from "react";
2
2
  import type { RadioGroupPrimitiveProps } from "./primitives/index.js";
3
3
  import type { FormComponentProps } from "../FormComponent/index.js";
4
4
  type RadioGroupProps = RadioGroupPrimitiveProps & FormComponentProps;
5
- declare const RadioGroup: (({ label, description, note, hint, required, disabled, validation, ...props }: RadioGroupProps) => React.JSX.Element) & {
6
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: RadioGroupProps) => React.JSX.Element;
5
+ declare const DecoratableRadioGroup: ({ label, description, note, hint, required, disabled, validation, ...props }: RadioGroupProps) => React.JSX.Element;
6
+ declare const RadioGroup: typeof DecoratableRadioGroup & {
7
+ original: typeof DecoratableRadioGroup;
7
8
  originalName: string;
8
9
  displayName: string;
9
10
  } & {
10
- original: (({ label, description, note, hint, required, disabled, validation, ...props }: RadioGroupProps) => React.JSX.Element) & {
11
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: RadioGroupProps) => React.JSX.Element;
11
+ original: typeof DecoratableRadioGroup & {
12
+ original: typeof DecoratableRadioGroup;
12
13
  originalName: string;
13
14
  displayName: string;
14
15
  };
15
16
  originalName: string;
16
17
  displayName: string;
17
18
  } & {
18
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ label, description, note, hint, required, disabled, validation, ...props }: RadioGroupProps) => React.JSX.Element) & {
19
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: RadioGroupProps) => React.JSX.Element;
19
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableRadioGroup & {
20
+ original: typeof DecoratableRadioGroup;
20
21
  originalName: string;
21
22
  displayName: string;
22
23
  }>) => (props: unknown) => React.JSX.Element;
@@ -7,21 +7,22 @@ interface RadioProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPri
7
7
  label: string | React.ReactNode;
8
8
  id: string;
9
9
  }
10
- declare const Radio: (({ className, label, id, ...props }: RadioProps) => React.JSX.Element) & {
11
- original: ({ className, label, id, ...props }: RadioProps) => React.JSX.Element;
10
+ declare const DecoratableRadio: ({ className, label, id, ...props }: RadioProps) => React.JSX.Element;
11
+ declare const Radio: typeof DecoratableRadio & {
12
+ original: typeof DecoratableRadio;
12
13
  originalName: string;
13
14
  displayName: string;
14
15
  } & {
15
- original: (({ className, label, id, ...props }: RadioProps) => React.JSX.Element) & {
16
- original: ({ className, label, id, ...props }: RadioProps) => React.JSX.Element;
16
+ original: typeof DecoratableRadio & {
17
+ original: typeof DecoratableRadio;
17
18
  originalName: string;
18
19
  displayName: string;
19
20
  };
20
21
  originalName: string;
21
22
  displayName: string;
22
23
  } & {
23
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ className, label, id, ...props }: RadioProps) => React.JSX.Element) & {
24
- original: ({ className, label, id, ...props }: RadioProps) => React.JSX.Element;
24
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableRadio & {
25
+ original: typeof DecoratableRadio;
25
26
  originalName: string;
26
27
  displayName: string;
27
28
  }>) => (props: unknown) => React.JSX.Element;
@@ -1,6 +1,10 @@
1
1
  import * as React from "react";
2
2
  import { RadioGroup as RadioGroupPrimitives } from "radix-ui";
3
3
  import type { RadioItemParams, RadioItemFormatted } from "../domains/index.js";
4
+ /**
5
+ * Radio Group Root
6
+ */
7
+ declare const RadioGroupRoot: ({ className, ...props }: RadioGroupPrimitives.RadioGroupProps) => React.JSX.Element;
4
8
  /**
5
9
  * Radio Group Renderer
6
10
  */
@@ -33,5 +37,5 @@ declare const RadioGroupPrimitive: (props: RadioGroupPrimitiveProps) => React.JS
33
37
  * It is marked as deprecated because nesting `Radio` components inside `RadioGroup` is no longer the recommended approach.
34
38
  * Instead, we now pass an array of `RadioItemDto` directly to `RadioGroup` for better maintainability.
35
39
  */
36
- declare const DeprecatedRadioGroup: ({ className, ...props }: RadioGroupPrimitives.RadioGroupProps) => React.JSX.Element;
40
+ declare const DeprecatedRadioGroup: typeof RadioGroupRoot;
37
41
  export { RadioGroupPrimitive, RadioGroupRenderer, DeprecatedRadioGroup, type RadioGroupPrimitiveProps, type RadioGroupVm };
@@ -5,21 +5,22 @@ type RangeSliderProps = RangeSliderPrimitiveProps & FormComponentProps & {
5
5
  label: React.ReactNode;
6
6
  valueConverter?: (value: number) => string;
7
7
  };
8
- declare const RangeSlider: (({ description, note, hint, validation, ...props }: RangeSliderProps) => React.JSX.Element) & {
9
- original: ({ description, note, hint, validation, ...props }: RangeSliderProps) => React.JSX.Element;
8
+ declare const DecoratableRangeSlider: ({ description, note, hint, validation, ...props }: RangeSliderProps) => React.JSX.Element;
9
+ declare const RangeSlider: typeof DecoratableRangeSlider & {
10
+ original: typeof DecoratableRangeSlider;
10
11
  originalName: string;
11
12
  displayName: string;
12
13
  } & {
13
- original: (({ description, note, hint, validation, ...props }: RangeSliderProps) => React.JSX.Element) & {
14
- original: ({ description, note, hint, validation, ...props }: RangeSliderProps) => React.JSX.Element;
14
+ original: typeof DecoratableRangeSlider & {
15
+ original: typeof DecoratableRangeSlider;
15
16
  originalName: string;
16
17
  displayName: string;
17
18
  };
18
19
  originalName: string;
19
20
  displayName: string;
20
21
  } & {
21
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ description, note, hint, validation, ...props }: RangeSliderProps) => React.JSX.Element) & {
22
- original: ({ description, note, hint, validation, ...props }: RangeSliderProps) => React.JSX.Element;
22
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableRangeSlider & {
23
+ original: typeof DecoratableRangeSlider;
23
24
  originalName: string;
24
25
  displayName: string;
25
26
  }>) => (props: unknown) => React.JSX.Element;
@@ -2,27 +2,28 @@ import React from "react";
2
2
  import type { SegmentedControlPrimitiveProps } from "./primitives/index.js";
3
3
  import type { FormComponentProps } from "../FormComponent/index.js";
4
4
  type SegmentedControlProps = SegmentedControlPrimitiveProps & FormComponentProps;
5
- declare const SegmentedControl: (({ label, description, note, hint, required, disabled, validation, ...props }: SegmentedControlProps) => React.JSX.Element) & {
6
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: SegmentedControlProps) => React.JSX.Element;
5
+ declare const DecoratableSegmentedControl: ({ label, description, note, hint, required, disabled, validation, ...props }: SegmentedControlProps) => React.JSX.Element;
6
+ declare const SegmentedControl: typeof DecoratableSegmentedControl & {
7
+ original: typeof DecoratableSegmentedControl;
7
8
  originalName: string;
8
9
  displayName: string;
9
10
  } & {
10
- original: (({ label, description, note, hint, required, disabled, validation, ...props }: SegmentedControlProps) => React.JSX.Element) & {
11
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: SegmentedControlProps) => React.JSX.Element;
11
+ original: typeof DecoratableSegmentedControl & {
12
+ original: typeof DecoratableSegmentedControl;
12
13
  originalName: string;
13
14
  displayName: string;
14
15
  };
15
16
  originalName: string;
16
17
  displayName: string;
17
18
  } & {
18
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ label, description, note, hint, required, disabled, validation, ...props }: SegmentedControlProps) => React.JSX.Element) & {
19
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: SegmentedControlProps) => React.JSX.Element;
19
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableSegmentedControl & {
20
+ original: typeof DecoratableSegmentedControl;
20
21
  originalName: string;
21
22
  displayName: string;
22
23
  }>) => (props: unknown) => React.JSX.Element;
23
24
  } & {
24
25
  Tabs: (({ children, variant, defaultValue, className }: import("./SegmentedControlTabs.js").SegmentedControlTabsProps) => React.JSX.Element) & {
25
- Tab: (props: import("./SegmentedControlTab.js").SegmentedControlTabProps) => null;
26
+ Tab: typeof import("./SegmentedControlTab.js").SegmentedControlTab;
26
27
  };
27
28
  };
28
29
  export { SegmentedControl, type SegmentedControlProps };
@@ -1,11 +1,14 @@
1
1
  import React from "react";
2
2
  import type { SegmentedControlPrimitiveProps } from "./primitives/index.js";
3
+ import { SegmentedControlTab } from "./SegmentedControlTab.js";
3
4
  export interface SegmentedControlTabsProps {
4
5
  children: React.ReactNode;
5
6
  variant?: SegmentedControlPrimitiveProps["variant"];
6
7
  defaultValue?: string;
7
8
  className?: string;
8
9
  }
9
- export declare const SegmentedControlTabs: (({ children, variant, defaultValue, className }: SegmentedControlTabsProps) => React.JSX.Element) & {
10
- Tab: (props: import("./SegmentedControlTab.js").SegmentedControlTabProps) => null;
10
+ declare const BaseSegmentedControlTabs: ({ children, variant, defaultValue, className }: SegmentedControlTabsProps) => React.JSX.Element;
11
+ export declare const SegmentedControlTabs: typeof BaseSegmentedControlTabs & {
12
+ Tab: typeof SegmentedControlTab;
11
13
  };
14
+ export {};
@@ -5,7 +5,7 @@ import type { SegmentedControlItemParams, SegmentedControlItemFormatted } from "
5
5
  * Segmented Control Item Button
6
6
  */
7
7
  declare const segmentedControlItemVariants: (props?: ({
8
- variant?: "ghost" | "dimmed" | "light" | null | undefined;
8
+ variant?: "dimmed" | "ghost" | "light" | null | undefined;
9
9
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
10
  /**
11
11
  * Segmented Control Primitive
@@ -2,21 +2,22 @@ import React from "react";
2
2
  import type { SelectPrimitiveProps } from "./primitives/index.js";
3
3
  import type { FormComponentProps } from "../FormComponent/index.js";
4
4
  type SelectProps = SelectPrimitiveProps & FormComponentProps;
5
- declare const Select: (({ label, description, note, hint, required, disabled, validation, ...props }: SelectProps) => React.JSX.Element) & {
6
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: SelectProps) => React.JSX.Element;
5
+ declare const DecoratableSelect: ({ label, description, note, hint, required, disabled, validation, ...props }: SelectProps) => React.JSX.Element;
6
+ declare const Select: typeof DecoratableSelect & {
7
+ original: typeof DecoratableSelect;
7
8
  originalName: string;
8
9
  displayName: string;
9
10
  } & {
10
- original: (({ label, description, note, hint, required, disabled, validation, ...props }: SelectProps) => React.JSX.Element) & {
11
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: SelectProps) => React.JSX.Element;
11
+ original: typeof DecoratableSelect & {
12
+ original: typeof DecoratableSelect;
12
13
  originalName: string;
13
14
  displayName: string;
14
15
  };
15
16
  originalName: string;
16
17
  displayName: string;
17
18
  } & {
18
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ label, description, note, hint, required, disabled, validation, ...props }: SelectProps) => React.JSX.Element) & {
19
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: SelectProps) => React.JSX.Element;
19
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableSelect & {
20
+ original: typeof DecoratableSelect;
20
21
  originalName: string;
21
22
  displayName: string;
22
23
  }>) => (props: unknown) => React.JSX.Element;
@@ -5,7 +5,7 @@ import { SelectScrollDownButton } from "./SelectScrollDownButton.js";
5
5
  import * as __rspack_external_react from "react";
6
6
  const SelectContent = ({ className, children, ...props })=>/*#__PURE__*/ __rspack_external_react.createElement(Select.Portal, null, /*#__PURE__*/ __rspack_external_react.createElement(Select.Content, {
7
7
  className: cn([
8
- "relative z-popover max-h-96 min-w-56 shadow-lg py-sm overflow-hidden rounded-sm border-sm border-neutral-muted bg-neutral-base text-neutral-strong",
8
+ "relative z-popover max-h-[250px] min-w-56 shadow-lg py-sm overflow-hidden rounded-sm border-sm border-neutral-muted bg-neutral-base text-neutral-strong",
9
9
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
10
10
  "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1"
11
11
  ], className),
@@ -1 +1 @@
1
- {"version":3,"file":"Select/primitives/components/SelectContent.js","sources":["../../../../src/Select/primitives/components/SelectContent.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Select as SelectPrimitives } from \"radix-ui\";\nimport { cn } from \"~/utils.js\";\nimport { SelectScrollUpButton } from \"./SelectScrollUpButton.js\";\nimport { SelectScrollDownButton } from \"./SelectScrollDownButton.js\";\n\ntype SelectContentProps = SelectPrimitives.SelectContentProps;\n\nconst SelectContent = ({ className, children, ...props }: SelectContentProps) => (\n <SelectPrimitives.Portal>\n <SelectPrimitives.Content\n className={cn(\n [\n \"relative z-popover max-h-96 min-w-56 shadow-lg py-sm overflow-hidden rounded-sm border-sm border-neutral-muted bg-neutral-base text-neutral-strong\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\"\n ],\n className\n )}\n position={\"popper\"}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitives.Viewport\n className={cn([\n \"py-xs\",\n \"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)\"\n ])}\n >\n {children}\n </SelectPrimitives.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitives.Content>\n </SelectPrimitives.Portal>\n);\n\nexport { SelectContent, type SelectContentProps };\n"],"names":["SelectContent","className","children","props","SelectPrimitives","cn","SelectScrollUpButton","SelectScrollDownButton"],"mappings":";;;;;AAQA,MAAMA,gBAAgB,CAAC,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,OAA2B,iBACxE,sCAACC,OAAAA,MAAuB,sBACpB,sCAACA,OAAAA,OAAwB;QACrB,WAAWC,GACP;YACI;YACA;YACA;SACH,EACDJ;QAEJ,UAAU;QACT,GAAGE,KAAK;qBAET,sCAACG,sBAAoBA,OAAAA,WAAAA,GACrB,sCAACF,OAAAA,QAAyB;QACtB,WAAWC,GAAG;YACV;YACA;SACH;OAEAH,WAAAA,WAAAA,GAEL,sCAACK,wBAAsBA"}
1
+ {"version":3,"file":"Select/primitives/components/SelectContent.js","sources":["../../../../src/Select/primitives/components/SelectContent.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Select as SelectPrimitives } from \"radix-ui\";\nimport { cn } from \"~/utils.js\";\nimport { SelectScrollUpButton } from \"./SelectScrollUpButton.js\";\nimport { SelectScrollDownButton } from \"./SelectScrollDownButton.js\";\n\ntype SelectContentProps = SelectPrimitives.SelectContentProps;\n\nconst SelectContent = ({ className, children, ...props }: SelectContentProps) => (\n <SelectPrimitives.Portal>\n <SelectPrimitives.Content\n className={cn(\n [\n \"relative z-popover max-h-[250px] min-w-56 shadow-lg py-sm overflow-hidden rounded-sm border-sm border-neutral-muted bg-neutral-base text-neutral-strong\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\"\n ],\n className\n )}\n position={\"popper\"}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitives.Viewport\n className={cn([\n \"py-xs\",\n \"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)\"\n ])}\n >\n {children}\n </SelectPrimitives.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitives.Content>\n </SelectPrimitives.Portal>\n);\n\nexport { SelectContent, type SelectContentProps };\n"],"names":["SelectContent","className","children","props","SelectPrimitives","cn","SelectScrollUpButton","SelectScrollDownButton"],"mappings":";;;;;AAQA,MAAMA,gBAAgB,CAAC,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,OAA2B,iBACxE,sCAACC,OAAAA,MAAuB,sBACpB,sCAACA,OAAAA,OAAwB;QACrB,WAAWC,GACP;YACI;YACA;YACA;SACH,EACDJ;QAEJ,UAAU;QACT,GAAGE,KAAK;qBAET,sCAACG,sBAAoBA,OAAAA,WAAAA,GACrB,sCAACF,OAAAA,QAAyB;QACtB,WAAWC,GAAG;YACV;YACA;SACH;OAEAH,WAAAA,WAAAA,GAEL,sCAACK,wBAAsBA"}
@@ -2,8 +2,8 @@ import * as React from "react";
2
2
  import { Select as SelectPrimitives } from "radix-ui";
3
3
  import { type VariantProps } from "../../../utils.js";
4
4
  declare const selectTriggerVariants: (props?: ({
5
- variant?: "primary" | "secondary" | "ghost" | "ghost-negative" | null | undefined;
6
- size?: "md" | "lg" | "xl" | null | undefined;
5
+ variant?: "ghost" | "ghost-negative" | "primary" | "secondary" | null | undefined;
6
+ size?: "lg" | "md" | "xl" | null | undefined;
7
7
  invalid?: boolean | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  interface SelectTriggerProps extends SelectPrimitives.SelectTriggerProps, VariantProps<typeof selectTriggerVariants> {
@@ -2,30 +2,31 @@ import * as React from "react";
2
2
  import { Separator as SeparatorPrimitive } from "radix-ui";
3
3
  import { type VariantProps } from "../utils.js";
4
4
  declare const separatorVariants: (props?: ({
5
- margin?: "sm" | "md" | "none" | "lg" | "xl" | "xs" | null | undefined;
5
+ margin?: "lg" | "md" | "none" | "sm" | "xl" | "xs" | null | undefined;
6
6
  orientation?: "horizontal" | "vertical" | null | undefined;
7
- variant?: "accent" | "base" | "strong" | "transparent" | "dimmed" | "muted" | null | undefined;
7
+ variant?: "accent" | "base" | "dimmed" | "muted" | "strong" | "transparent" | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  type SeparatorPosition = "start" | "middle" | "end";
10
10
  type SeparatorProps = Omit<SeparatorPrimitive.SeparatorProps, "children"> & VariantProps<typeof separatorVariants> & {
11
11
  children?: React.ReactNode;
12
12
  labelPosition?: SeparatorPosition;
13
13
  };
14
- declare const Separator: (({ className, orientation, margin, variant, decorative, children, labelPosition, ...props }: SeparatorProps) => React.JSX.Element) & {
15
- original: ({ className, orientation, margin, variant, decorative, children, labelPosition, ...props }: SeparatorProps) => React.JSX.Element;
14
+ declare const SeparatorBase: ({ className, orientation, margin, variant, decorative, children, labelPosition, ...props }: SeparatorProps) => React.JSX.Element;
15
+ declare const Separator: typeof SeparatorBase & {
16
+ original: typeof SeparatorBase;
16
17
  originalName: string;
17
18
  displayName: string;
18
19
  } & {
19
- original: (({ className, orientation, margin, variant, decorative, children, labelPosition, ...props }: SeparatorProps) => React.JSX.Element) & {
20
- original: ({ className, orientation, margin, variant, decorative, children, labelPosition, ...props }: SeparatorProps) => React.JSX.Element;
20
+ original: typeof SeparatorBase & {
21
+ original: typeof SeparatorBase;
21
22
  originalName: string;
22
23
  displayName: string;
23
24
  };
24
25
  originalName: string;
25
26
  displayName: string;
26
27
  } & {
27
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ className, orientation, margin, variant, decorative, children, labelPosition, ...props }: SeparatorProps) => React.JSX.Element) & {
28
- original: ({ className, orientation, margin, variant, decorative, children, labelPosition, ...props }: SeparatorProps) => React.JSX.Element;
28
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof SeparatorBase & {
29
+ original: typeof SeparatorBase;
29
30
  originalName: string;
30
31
  displayName: string;
31
32
  }>) => (props: unknown) => React.JSX.Element;