@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
@@ -19,40 +19,45 @@ type CheckboxPrimitiveRendererProps = Omit<CheckboxPrimitiveProps, "onCheckedCha
19
19
  changeChecked: (checked: boolean) => void;
20
20
  disabled?: boolean;
21
21
  };
22
- declare const CheckboxPrimitiveRenderer: (({ label, id, hasLabel, indeterminate, changeChecked, checked, className, disabled, ...props }: CheckboxPrimitiveRendererProps) => React.JSX.Element) & {
23
- original: ({ label, id, hasLabel, indeterminate, changeChecked, checked, className, disabled, ...props }: CheckboxPrimitiveRendererProps) => React.JSX.Element;
22
+ declare const DecoratableCheckboxPrimitiveRenderer: ({ label, id, hasLabel, indeterminate, changeChecked, checked, className, disabled, ...props }: CheckboxPrimitiveRendererProps) => React.JSX.Element;
23
+ declare const CheckboxPrimitiveRenderer: typeof DecoratableCheckboxPrimitiveRenderer & {
24
+ original: typeof DecoratableCheckboxPrimitiveRenderer;
24
25
  originalName: string;
25
26
  displayName: string;
26
27
  } & {
27
- original: (({ label, id, hasLabel, indeterminate, changeChecked, checked, className, disabled, ...props }: CheckboxPrimitiveRendererProps) => React.JSX.Element) & {
28
- original: ({ label, id, hasLabel, indeterminate, changeChecked, checked, className, disabled, ...props }: CheckboxPrimitiveRendererProps) => React.JSX.Element;
28
+ original: typeof DecoratableCheckboxPrimitiveRenderer & {
29
+ original: typeof DecoratableCheckboxPrimitiveRenderer;
29
30
  originalName: string;
30
31
  displayName: string;
31
32
  };
32
33
  originalName: string;
33
34
  displayName: string;
34
35
  } & {
35
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ label, id, hasLabel, indeterminate, changeChecked, checked, className, disabled, ...props }: CheckboxPrimitiveRendererProps) => React.JSX.Element) & {
36
- original: ({ label, id, hasLabel, indeterminate, changeChecked, checked, className, disabled, ...props }: CheckboxPrimitiveRendererProps) => React.JSX.Element;
36
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableCheckboxPrimitiveRenderer & {
37
+ original: typeof DecoratableCheckboxPrimitiveRenderer;
37
38
  originalName: string;
38
39
  displayName: string;
39
40
  }>) => (props: unknown) => React.JSX.Element;
40
41
  };
41
- declare const CheckboxPrimitive: ((props: CheckboxPrimitiveProps) => React.JSX.Element | null) & {
42
- original: (props: CheckboxPrimitiveProps) => React.JSX.Element | null;
42
+ /**
43
+ * Checkbox
44
+ */
45
+ declare const DecoratableCheckboxPrimitive: (props: CheckboxPrimitiveProps) => React.JSX.Element | null;
46
+ declare const CheckboxPrimitive: typeof DecoratableCheckboxPrimitive & {
47
+ original: typeof DecoratableCheckboxPrimitive;
43
48
  originalName: string;
44
49
  displayName: string;
45
50
  } & {
46
- original: ((props: CheckboxPrimitiveProps) => React.JSX.Element | null) & {
47
- original: (props: CheckboxPrimitiveProps) => React.JSX.Element | null;
51
+ original: typeof DecoratableCheckboxPrimitive & {
52
+ original: typeof DecoratableCheckboxPrimitive;
48
53
  originalName: string;
49
54
  displayName: string;
50
55
  };
51
56
  originalName: string;
52
57
  displayName: string;
53
58
  } & {
54
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: CheckboxPrimitiveProps) => React.JSX.Element | null) & {
55
- original: (props: CheckboxPrimitiveProps) => React.JSX.Element | null;
59
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableCheckboxPrimitive & {
60
+ original: typeof DecoratableCheckboxPrimitive;
56
61
  originalName: string;
57
62
  displayName: string;
58
63
  }>) => (props: unknown) => React.JSX.Element;
@@ -2,21 +2,22 @@ import React from "react";
2
2
  import type { CheckboxGroupPrimitiveProps } from "./primitives/CheckboxGroupPrimitive.js";
3
3
  import type { FormComponentProps } from "../FormComponent/index.js";
4
4
  type CheckboxGroupProps = CheckboxGroupPrimitiveProps & FormComponentProps;
5
- declare const CheckboxGroup: (({ label, description, note, required, disabled, hint, validation, ...props }: CheckboxGroupProps) => React.JSX.Element) & {
6
- original: ({ label, description, note, required, disabled, hint, validation, ...props }: CheckboxGroupProps) => React.JSX.Element;
5
+ declare const DecoratableCheckboxGroup: ({ label, description, note, required, disabled, hint, validation, ...props }: CheckboxGroupProps) => React.JSX.Element;
6
+ declare const CheckboxGroup: typeof DecoratableCheckboxGroup & {
7
+ original: typeof DecoratableCheckboxGroup;
7
8
  originalName: string;
8
9
  displayName: string;
9
10
  } & {
10
- original: (({ label, description, note, required, disabled, hint, validation, ...props }: CheckboxGroupProps) => React.JSX.Element) & {
11
- original: ({ label, description, note, required, disabled, hint, validation, ...props }: CheckboxGroupProps) => React.JSX.Element;
11
+ original: typeof DecoratableCheckboxGroup & {
12
+ original: typeof DecoratableCheckboxGroup;
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, required, disabled, hint, validation, ...props }: CheckboxGroupProps) => React.JSX.Element) & {
19
- original: ({ label, description, note, required, disabled, hint, validation, ...props }: CheckboxGroupProps) => React.JSX.Element;
19
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableCheckboxGroup & {
20
+ original: typeof DecoratableCheckboxGroup;
20
21
  originalName: string;
21
22
  displayName: string;
22
23
  }>) => (props: unknown) => React.JSX.Element;
@@ -25,40 +25,48 @@ type CheckboxGroupPrimitiveRendererProps<TValue = any> = CheckboxGroupPrimitiveV
25
25
  changeChecked: (value: TValue) => void;
26
26
  disabled?: boolean;
27
27
  };
28
- declare const CheckboxGroupPrimitiveRenderer: (({ items, changeChecked, disabled }: CheckboxGroupPrimitiveRendererProps) => React.JSX.Element) & {
29
- original: ({ items, changeChecked, disabled }: CheckboxGroupPrimitiveRendererProps) => React.JSX.Element;
28
+ /**
29
+ * Checkbox Group Renderer
30
+ */
31
+ declare const DecoratableCheckboxGroupPrimitiveRenderer: ({ items, changeChecked, disabled }: CheckboxGroupPrimitiveRendererProps) => React.JSX.Element;
32
+ declare const CheckboxGroupPrimitiveRenderer: typeof DecoratableCheckboxGroupPrimitiveRenderer & {
33
+ original: typeof DecoratableCheckboxGroupPrimitiveRenderer;
30
34
  originalName: string;
31
35
  displayName: string;
32
36
  } & {
33
- original: (({ items, changeChecked, disabled }: CheckboxGroupPrimitiveRendererProps) => React.JSX.Element) & {
34
- original: ({ items, changeChecked, disabled }: CheckboxGroupPrimitiveRendererProps) => React.JSX.Element;
37
+ original: typeof DecoratableCheckboxGroupPrimitiveRenderer & {
38
+ original: typeof DecoratableCheckboxGroupPrimitiveRenderer;
35
39
  originalName: string;
36
40
  displayName: string;
37
41
  };
38
42
  originalName: string;
39
43
  displayName: string;
40
44
  } & {
41
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ items, changeChecked, disabled }: CheckboxGroupPrimitiveRendererProps) => React.JSX.Element) & {
42
- original: ({ items, changeChecked, disabled }: CheckboxGroupPrimitiveRendererProps) => React.JSX.Element;
45
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableCheckboxGroupPrimitiveRenderer & {
46
+ original: typeof DecoratableCheckboxGroupPrimitiveRenderer;
43
47
  originalName: string;
44
48
  displayName: string;
45
49
  }>) => (props: unknown) => React.JSX.Element;
46
50
  };
47
- declare const CheckboxGroupPrimitive: ((props: CheckboxGroupPrimitiveProps) => React.JSX.Element) & {
48
- original: (props: CheckboxGroupPrimitiveProps) => React.JSX.Element;
51
+ /**
52
+ * Checkbox Group
53
+ */
54
+ declare const DecoratableCheckboxGroupPrimitive: (props: CheckboxGroupPrimitiveProps) => React.JSX.Element;
55
+ declare const CheckboxGroupPrimitive: typeof DecoratableCheckboxGroupPrimitive & {
56
+ original: typeof DecoratableCheckboxGroupPrimitive;
49
57
  originalName: string;
50
58
  displayName: string;
51
59
  } & {
52
- original: ((props: CheckboxGroupPrimitiveProps) => React.JSX.Element) & {
53
- original: (props: CheckboxGroupPrimitiveProps) => React.JSX.Element;
60
+ original: typeof DecoratableCheckboxGroupPrimitive & {
61
+ original: typeof DecoratableCheckboxGroupPrimitive;
54
62
  originalName: string;
55
63
  displayName: string;
56
64
  };
57
65
  originalName: string;
58
66
  displayName: string;
59
67
  } & {
60
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: CheckboxGroupPrimitiveProps) => React.JSX.Element) & {
61
- original: (props: CheckboxGroupPrimitiveProps) => React.JSX.Element;
68
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableCheckboxGroupPrimitive & {
69
+ original: typeof DecoratableCheckboxGroupPrimitive;
62
70
  originalName: string;
63
71
  displayName: string;
64
72
  }>) => (props: unknown) => React.JSX.Element;
@@ -2,21 +2,22 @@ import React from "react";
2
2
  import type { CodeEditorPrimitiveProps } from "./CodeEditorPrimitive.js";
3
3
  import type { FormComponentProps } from "../FormComponent/index.js";
4
4
  type CodeEditorProps = CodeEditorPrimitiveProps & FormComponentProps;
5
- declare const CodeEditor: (({ label, description, note, hint, required, disabled, validation, ...props }: CodeEditorProps) => React.JSX.Element) & {
6
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: CodeEditorProps) => React.JSX.Element;
5
+ declare const DecoratableCodeEditor: ({ label, description, note, hint, required, disabled, validation, ...props }: CodeEditorProps) => React.JSX.Element;
6
+ declare const CodeEditor: typeof DecoratableCodeEditor & {
7
+ original: typeof DecoratableCodeEditor;
7
8
  originalName: string;
8
9
  displayName: string;
9
10
  } & {
10
- original: (({ label, description, note, hint, required, disabled, validation, ...props }: CodeEditorProps) => React.JSX.Element) & {
11
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: CodeEditorProps) => React.JSX.Element;
11
+ original: typeof DecoratableCodeEditor & {
12
+ original: typeof DecoratableCodeEditor;
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 }: CodeEditorProps) => React.JSX.Element) & {
19
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: CodeEditorProps) => React.JSX.Element;
19
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableCodeEditor & {
20
+ original: typeof DecoratableCodeEditor;
20
21
  originalName: string;
21
22
  displayName: string;
22
23
  }>) => (props: unknown) => React.JSX.Element;
@@ -3,21 +3,22 @@ import type { EditorProps } from "@monaco-editor/react";
3
3
  interface CodeEditorPrimitiveProps extends Partial<EditorProps> {
4
4
  disabled?: boolean;
5
5
  }
6
- declare const CodeEditorPrimitive: (({ value, disabled, options: optionsInput, ...rest }: CodeEditorPrimitiveProps) => React.JSX.Element) & {
7
- original: ({ value, disabled, options: optionsInput, ...rest }: CodeEditorPrimitiveProps) => React.JSX.Element;
6
+ declare const DecoratableCodeEditorPrimitive: ({ value, disabled, options: optionsInput, ...rest }: CodeEditorPrimitiveProps) => React.JSX.Element;
7
+ declare const CodeEditorPrimitive: typeof DecoratableCodeEditorPrimitive & {
8
+ original: typeof DecoratableCodeEditorPrimitive;
8
9
  originalName: string;
9
10
  displayName: string;
10
11
  } & {
11
- original: (({ value, disabled, options: optionsInput, ...rest }: CodeEditorPrimitiveProps) => React.JSX.Element) & {
12
- original: ({ value, disabled, options: optionsInput, ...rest }: CodeEditorPrimitiveProps) => React.JSX.Element;
12
+ original: typeof DecoratableCodeEditorPrimitive & {
13
+ original: typeof DecoratableCodeEditorPrimitive;
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").ComponentDecorator<(({ value, disabled, options: optionsInput, ...rest }: CodeEditorPrimitiveProps) => React.JSX.Element) & {
20
- original: ({ value, disabled, options: optionsInput, ...rest }: CodeEditorPrimitiveProps) => React.JSX.Element;
20
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableCodeEditorPrimitive & {
21
+ original: typeof DecoratableCodeEditorPrimitive;
21
22
  originalName: string;
22
23
  displayName: string;
23
24
  }>) => (props: unknown) => React.JSX.Element;
@@ -6,7 +6,9 @@ const monacoOptions = {
6
6
  readOnly: true,
7
7
  minimap: {
8
8
  enabled: false
9
- }
9
+ },
10
+ scrollBeyondLastLine: false,
11
+ wordWrap: "on"
10
12
  };
11
13
  const DecoratableCodeEditorPrimitive = ({ value, disabled, options: optionsInput, ...rest })=>{
12
14
  const options = useMemo(()=>({
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditor/CodeEditorPrimitive.js","sources":["../../src/CodeEditor/CodeEditorPrimitive.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport type { EditorProps } from \"@monaco-editor/react\";\nimport MonacoEditor from \"@monaco-editor/react\";\nimport type { editor } from \"monaco-editor\";\nimport { makeDecoratable } from \"~/utils.js\";\n\ninterface CodeEditorPrimitiveProps extends Partial<EditorProps> {\n disabled?: boolean;\n}\n\nconst monacoOptions: editor.IEditorConstructionOptions = {\n domReadOnly: true,\n readOnly: true,\n minimap: {\n enabled: false\n }\n};\n\nconst DecoratableCodeEditorPrimitive = ({\n value,\n disabled,\n options: optionsInput,\n ...rest\n}: CodeEditorPrimitiveProps) => {\n const options = useMemo((): editor.IDiffEditorConstructionOptions => {\n return {\n ...monacoOptions,\n ...optionsInput,\n domReadOnly: disabled === undefined ? monacoOptions.domReadOnly : disabled,\n readOnly: disabled === undefined ? monacoOptions.readOnly : disabled\n };\n }, [disabled]);\n return (\n <MonacoEditor\n height={\"calc(100vh - 400px)\"}\n {...rest}\n language={rest.language ?? \"json\"}\n defaultValue={value}\n options={options}\n />\n );\n};\n\nconst CodeEditorPrimitive = makeDecoratable(\"CodeEditorPrimitive\", DecoratableCodeEditorPrimitive);\n\nexport { CodeEditorPrimitive, type CodeEditorPrimitiveProps };\n"],"names":["monacoOptions","DecoratableCodeEditorPrimitive","value","disabled","optionsInput","rest","options","useMemo","undefined","MonacoEditor","CodeEditorPrimitive","makeDecoratable"],"mappings":";;;AAUA,MAAMA,gBAAmD;IACrD,aAAa;IACb,UAAU;IACV,SAAS;QACL,SAAS;IACb;AACJ;AAEA,MAAMC,iCAAiC,CAAC,EACpCC,KAAK,EACLC,QAAQ,EACR,SAASC,YAAY,EACrB,GAAGC,MACoB;IACvB,MAAMC,UAAUC,QAAQ,IACb;YACH,GAAGP,aAAa;YAChB,GAAGI,YAAY;YACf,aAAaD,AAAaK,WAAbL,WAAyBH,cAAc,WAAW,GAAGG;YAClE,UAAUA,AAAaK,WAAbL,WAAyBH,cAAc,QAAQ,GAAGG;QAChE,IACD;QAACA;KAAS;IACb,OAAO,WAAP,GACI,oBAACM,sBAAYA;QACT,QAAQ;QACP,GAAGJ,IAAI;QACR,UAAUA,KAAK,QAAQ,IAAI;QAC3B,cAAcH;QACd,SAASI;;AAGrB;AAEA,MAAMI,sBAAsBC,gBAAgB,uBAAuBV"}
1
+ {"version":3,"file":"CodeEditor/CodeEditorPrimitive.js","sources":["../../src/CodeEditor/CodeEditorPrimitive.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport type { EditorProps } from \"@monaco-editor/react\";\nimport MonacoEditor from \"@monaco-editor/react\";\nimport type { editor } from \"monaco-editor\";\nimport { makeDecoratable } from \"~/utils.js\";\n\ninterface CodeEditorPrimitiveProps extends Partial<EditorProps> {\n disabled?: boolean;\n}\n\nconst monacoOptions: editor.IEditorConstructionOptions = {\n domReadOnly: true,\n readOnly: true,\n minimap: {\n enabled: false\n },\n scrollBeyondLastLine: false,\n wordWrap: \"on\"\n};\n\nconst DecoratableCodeEditorPrimitive = ({\n value,\n disabled,\n options: optionsInput,\n ...rest\n}: CodeEditorPrimitiveProps) => {\n const options = useMemo((): editor.IDiffEditorConstructionOptions => {\n return {\n ...monacoOptions,\n ...optionsInput,\n domReadOnly: disabled === undefined ? monacoOptions.domReadOnly : disabled,\n readOnly: disabled === undefined ? monacoOptions.readOnly : disabled\n };\n }, [disabled]);\n return (\n <MonacoEditor\n height={\"calc(100vh - 400px)\"}\n {...rest}\n language={rest.language ?? \"json\"}\n defaultValue={value}\n options={options}\n />\n );\n};\n\nconst CodeEditorPrimitive = makeDecoratable(\"CodeEditorPrimitive\", DecoratableCodeEditorPrimitive);\n\nexport { CodeEditorPrimitive, type CodeEditorPrimitiveProps };\n"],"names":["monacoOptions","DecoratableCodeEditorPrimitive","value","disabled","optionsInput","rest","options","useMemo","undefined","MonacoEditor","CodeEditorPrimitive","makeDecoratable"],"mappings":";;;AAUA,MAAMA,gBAAmD;IACrD,aAAa;IACb,UAAU;IACV,SAAS;QACL,SAAS;IACb;IACA,sBAAsB;IACtB,UAAU;AACd;AAEA,MAAMC,iCAAiC,CAAC,EACpCC,KAAK,EACLC,QAAQ,EACR,SAASC,YAAY,EACrB,GAAGC,MACoB;IACvB,MAAMC,UAAUC,QAAQ,IACb;YACH,GAAGP,aAAa;YAChB,GAAGI,YAAY;YACf,aAAaD,AAAaK,WAAbL,WAAyBH,cAAc,WAAW,GAAGG;YAClE,UAAUA,AAAaK,WAAbL,WAAyBH,cAAc,QAAQ,GAAGG;QAChE,IACD;QAACA;KAAS;IACb,OAAO,WAAP,GACI,oBAACM,sBAAYA;QACT,QAAQ;QACP,GAAGJ,IAAI;QACR,UAAUA,KAAK,QAAQ,IAAI;QAC3B,cAAcH;QACd,SAASI;;AAGrB;AAEA,MAAMI,sBAAsBC,gBAAgB,uBAAuBV"}
@@ -2,21 +2,22 @@ import React from "react";
2
2
  import type { ColorPickerPrimitiveProps } from "./primitives/index.js";
3
3
  import type { FormComponentProps } from "../FormComponent/index.js";
4
4
  type ColorPickerProps = ColorPickerPrimitiveProps & FormComponentProps;
5
- declare const ColorPicker: (({ label, description, note, hint, required, disabled, validation, ...props }: ColorPickerProps) => React.JSX.Element) & {
6
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: ColorPickerProps) => React.JSX.Element;
5
+ declare const DecoratableIconPicker: ({ label, description, note, hint, required, disabled, validation, ...props }: ColorPickerProps) => React.JSX.Element;
6
+ declare const ColorPicker: typeof DecoratableIconPicker & {
7
+ original: typeof DecoratableIconPicker;
7
8
  originalName: string;
8
9
  displayName: string;
9
10
  } & {
10
- original: (({ label, description, note, hint, required, disabled, validation, ...props }: ColorPickerProps) => React.JSX.Element) & {
11
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: ColorPickerProps) => React.JSX.Element;
11
+ original: typeof DecoratableIconPicker & {
12
+ original: typeof DecoratableIconPicker;
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 }: ColorPickerProps) => React.JSX.Element) & {
19
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: ColorPickerProps) => React.JSX.Element;
19
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableIconPicker & {
20
+ original: typeof DecoratableIconPicker;
20
21
  originalName: string;
21
22
  displayName: string;
22
23
  }>) => (props: unknown) => React.JSX.Element;
@@ -43,21 +43,22 @@ interface ColorPickerPrimitiveProps extends Omit<React.HTMLAttributes<HTMLDivEle
43
43
  */
44
44
  invalid?: InputPrimitiveProps["invalid"];
45
45
  }
46
- declare const ColorPickerPrimitive: (({ align, disabled, invalid, size, variant, value, onOpenChange, onChange, onChangeComplete, ...props }: ColorPickerPrimitiveProps) => React.JSX.Element) & {
47
- original: ({ align, disabled, invalid, size, variant, value, onOpenChange, onChange, onChangeComplete, ...props }: ColorPickerPrimitiveProps) => React.JSX.Element;
46
+ declare const DecoratableColorPickerPrimitive: ({ align, disabled, invalid, size, variant, value, onOpenChange, onChange, onChangeComplete, ...props }: ColorPickerPrimitiveProps) => React.JSX.Element;
47
+ declare const ColorPickerPrimitive: typeof DecoratableColorPickerPrimitive & {
48
+ original: typeof DecoratableColorPickerPrimitive;
48
49
  originalName: string;
49
50
  displayName: string;
50
51
  } & {
51
- original: (({ align, disabled, invalid, size, variant, value, onOpenChange, onChange, onChangeComplete, ...props }: ColorPickerPrimitiveProps) => React.JSX.Element) & {
52
- original: ({ align, disabled, invalid, size, variant, value, onOpenChange, onChange, onChangeComplete, ...props }: ColorPickerPrimitiveProps) => React.JSX.Element;
52
+ original: typeof DecoratableColorPickerPrimitive & {
53
+ original: typeof DecoratableColorPickerPrimitive;
53
54
  originalName: string;
54
55
  displayName: string;
55
56
  };
56
57
  originalName: string;
57
58
  displayName: string;
58
59
  } & {
59
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ align, disabled, invalid, size, variant, value, onOpenChange, onChange, onChangeComplete, ...props }: ColorPickerPrimitiveProps) => React.JSX.Element) & {
60
- original: ({ align, disabled, invalid, size, variant, value, onOpenChange, onChange, onChangeComplete, ...props }: ColorPickerPrimitiveProps) => React.JSX.Element;
60
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableColorPickerPrimitive & {
61
+ original: typeof DecoratableColorPickerPrimitive;
61
62
  originalName: string;
62
63
  displayName: string;
63
64
  }>) => (props: unknown) => React.JSX.Element;
@@ -1,13 +1,15 @@
1
1
  import * as React from "react";
2
2
  import { Command as CommandPrimitive } from "cmdk";
3
+ import { Empty, Group, Input, Item, List, Loading, Separator } from "./components/index.js";
3
4
  type CommandProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive>;
4
- declare const Command: (({ className, ...props }: React.ComponentPropsWithoutRef<typeof CommandPrimitive>) => React.JSX.Element) & {
5
- Empty: (props: import("./components/Empty.js").EmptyProps) => React.JSX.Element;
6
- Group: ({ className, ...props }: import("./components/Group.js").GroupProps) => React.JSX.Element;
7
- Input: ({ inputElement, size, inputRef, ...props }: import("./components/Input.js").InputProps) => React.JSX.Element;
8
- Item: ({ className, children, selected, ...props }: import("./components/Item.js").ItemProps) => React.JSX.Element;
9
- List: ({ className, ...props }: import("./components/List.js").ListProps) => React.JSX.Element;
10
- Loading: (props: import("./components/Loading.js").LoadingProps) => React.JSX.Element;
11
- Separator: (props: import("./components/Separator.js").SeparatorProps) => React.JSX.Element;
5
+ declare const CommandBase: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof CommandPrimitive>) => React.JSX.Element;
6
+ declare const Command: typeof CommandBase & {
7
+ Empty: typeof Empty;
8
+ Group: typeof Group;
9
+ Input: typeof Input;
10
+ Item: typeof Item;
11
+ List: typeof List;
12
+ Loading: typeof Loading;
13
+ Separator: typeof Separator;
12
14
  };
13
15
  export { Command, type CommandProps };
@@ -2,16 +2,19 @@ import React from "react";
2
2
  interface DataListModalContentProps {
3
3
  children: React.ReactNode;
4
4
  }
5
+ declare const DataListModalContent: ({ children }: DataListModalContentProps) => React.JSX.Element;
5
6
  interface DataListModalTriggerProps {
6
7
  "data-testid"?: string;
7
8
  icon?: React.ReactElement;
8
9
  }
10
+ declare const DataListModalTrigger: ({ icon, ...props }: DataListModalTriggerProps) => React.JSX.Element;
9
11
  interface DataListModalProps {
10
12
  trigger: React.ReactElement;
11
13
  content: React.ReactElement;
12
14
  }
13
- declare const DataListModal: ((props: DataListModalProps) => React.JSX.Element | null) & {
14
- Trigger: ({ icon, ...props }: DataListModalTriggerProps) => React.JSX.Element;
15
- Content: ({ children }: DataListModalContentProps) => React.JSX.Element;
15
+ declare const BaseDataListModal: (props: DataListModalProps) => React.JSX.Element | null;
16
+ declare const DataListModal: typeof BaseDataListModal & {
17
+ Trigger: typeof DataListModalTrigger;
18
+ Content: typeof DataListModalContent;
16
19
  };
17
20
  export { DataListModal, type DataListModalProps, type DataListModalContentProps, type DataListModalTriggerProps };
@@ -1,5 +1,15 @@
1
1
  import React from "react";
2
- import type { ColumnSort, OnChangeFn, Row, SortingState, VisibilityState } from "@tanstack/react-table";
2
+ import type { ColumnSort, ColumnVisibilityState, OnChangeFn, Row, RowData, SortingState } from "@tanstack/react-table";
3
+ declare const features: {
4
+ columnResizingFeature: import("@tanstack/table-core").TableFeature;
5
+ columnSizingFeature: import("@tanstack/table-core").TableFeature;
6
+ columnVisibilityFeature: import("@tanstack/table-core").TableFeature;
7
+ rowSelectionFeature: import("@tanstack/table-core").TableFeature;
8
+ rowSortingFeature: import("@tanstack/table-core").TableFeature;
9
+ sortedRowModel: (table: import("@tanstack/table-core").Table<any, any>) => () => import("@tanstack/table-core").RowModel<any, any>;
10
+ coreRowModel: (table: import("@tanstack/table-core").Table<any, any>) => () => import("@tanstack/table-core").RowModel<any, any>;
11
+ };
12
+ type Features = typeof features;
3
13
  interface DataTableColumn<T> {
4
14
  header?: string | number | React.JSX.Element;
5
15
  cell?: (row: T) => string | number | React.JSX.Element | null;
@@ -18,13 +28,13 @@ type DataTableDefaultData = {
18
28
  id: string;
19
29
  $selectable?: boolean;
20
30
  };
21
- type DataTableRow<T> = Row<DataTableDefaultData & T>;
31
+ type DataTableRow<T extends RowData> = Row<Features, DataTableDefaultData & T>;
22
32
  type DataTableSorting = SortingState;
23
33
  type DataTableColumnSort = ColumnSort;
24
34
  type OnDataTableSortingChange = OnChangeFn<DataTableSorting>;
25
- type DataTableColumnVisibility = VisibilityState;
35
+ type DataTableColumnVisibility = ColumnVisibilityState;
26
36
  type OnDataTableColumnVisibilityChange = OnChangeFn<DataTableColumnVisibility>;
27
- interface DataTableProps<TEntry> {
37
+ interface DataTableProps<TEntry extends RowData> {
28
38
  /**
29
39
  * Show or hide borders.
30
40
  */
@@ -52,7 +62,7 @@ interface DataTableProps<TEntry> {
52
62
  /**
53
63
  * Callback that is called to determine if the row is selectable.
54
64
  */
55
- isRowSelectable?: (row: Row<TEntry>) => boolean;
65
+ isRowSelectable?: (row: Row<Features, TEntry>) => boolean;
56
66
  /**
57
67
  * Render the skeleton state while data are loading.
58
68
  */
@@ -86,23 +96,24 @@ interface DataTableProps<TEntry> {
86
96
  */
87
97
  stickyHeader?: boolean;
88
98
  }
89
- declare const DataTable: (<T extends Record<string, any> & DataTableDefaultData>({ bordered, canSelectAllRows, columnVisibility, columns: initialColumns, data: initialData, initialSorting, isRowSelectable, loading, onColumnVisibilityChange, onSelectRow, onSortingChange, onToggleRow, selectedRows, sorting, stickyHeader }: DataTableProps<T>) => React.JSX.Element) & {
90
- original: <T extends Record<string, any> & DataTableDefaultData>({ bordered, canSelectAllRows, columnVisibility, columns: initialColumns, data: initialData, initialSorting, isRowSelectable, loading, onColumnVisibilityChange, onSelectRow, onSortingChange, onToggleRow, selectedRows, sorting, stickyHeader }: DataTableProps<T>) => React.JSX.Element;
99
+ declare const DecoratableDataTable: <T extends Record<string, any> & DataTableDefaultData>({ bordered, canSelectAllRows, columnVisibility, columns: initialColumns, data: initialData, initialSorting, isRowSelectable, loading, onColumnVisibilityChange, onSelectRow, onSortingChange, onToggleRow, selectedRows, sorting, stickyHeader }: DataTableProps<T>) => React.JSX.Element;
100
+ declare const DataTable: typeof DecoratableDataTable & {
101
+ original: typeof DecoratableDataTable;
91
102
  originalName: string;
92
103
  displayName: string;
93
104
  } & {
94
- original: (<T extends Record<string, any> & DataTableDefaultData>({ bordered, canSelectAllRows, columnVisibility, columns: initialColumns, data: initialData, initialSorting, isRowSelectable, loading, onColumnVisibilityChange, onSelectRow, onSortingChange, onToggleRow, selectedRows, sorting, stickyHeader }: DataTableProps<T>) => React.JSX.Element) & {
95
- original: <T extends Record<string, any> & DataTableDefaultData>({ bordered, canSelectAllRows, columnVisibility, columns: initialColumns, data: initialData, initialSorting, isRowSelectable, loading, onColumnVisibilityChange, onSelectRow, onSortingChange, onToggleRow, selectedRows, sorting, stickyHeader }: DataTableProps<T>) => React.JSX.Element;
105
+ original: typeof DecoratableDataTable & {
106
+ original: typeof DecoratableDataTable;
96
107
  originalName: string;
97
108
  displayName: string;
98
109
  };
99
110
  originalName: string;
100
111
  displayName: string;
101
112
  } & {
102
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(<T extends Record<string, any> & DataTableDefaultData>({ bordered, canSelectAllRows, columnVisibility, columns: initialColumns, data: initialData, initialSorting, isRowSelectable, loading, onColumnVisibilityChange, onSelectRow, onSortingChange, onToggleRow, selectedRows, sorting, stickyHeader }: DataTableProps<T>) => React.JSX.Element) & {
103
- original: <T extends Record<string, any> & DataTableDefaultData>({ bordered, canSelectAllRows, columnVisibility, columns: initialColumns, data: initialData, initialSorting, isRowSelectable, loading, onColumnVisibilityChange, onSelectRow, onSortingChange, onToggleRow, selectedRows, sorting, stickyHeader }: DataTableProps<T>) => React.JSX.Element;
113
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableDataTable & {
114
+ original: typeof DecoratableDataTable;
104
115
  originalName: string;
105
116
  displayName: string;
106
117
  }>) => (props: unknown) => React.JSX.Element;
107
118
  };
108
- export { DataTable, type DataTableProps, type DataTableColumn, type DataTableColumns, type DataTableDefaultData, type DataTableRow, type DataTableSorting, type DataTableColumnSort, type OnDataTableSortingChange, type DataTableColumnVisibility, type OnDataTableColumnVisibilityChange };
119
+ export { DataTable, type Features, type DataTableProps, type DataTableColumn, type DataTableColumns, type DataTableDefaultData, type DataTableRow, type DataTableSorting, type DataTableColumnSort, type OnDataTableSortingChange, type DataTableColumnVisibility, type OnDataTableColumnVisibilityChange };
@@ -1,10 +1,19 @@
1
1
  import react, { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
2
- import { flexRender, getCoreRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
2
+ import { columnResizingFeature, columnSizingFeature, columnVisibilityFeature, createCoreRowModel, createSortedRowModel, flexRender, rowSelectionFeature, rowSortingFeature, tableFeatures, useTable } from "@tanstack/react-table";
3
3
  import { CheckboxPrimitive } from "../Checkbox/index.js";
4
4
  import { Skeleton } from "../Skeleton/index.js";
5
5
  import { Table } from "../Table/index.js";
6
6
  import { ColumnSorter, ColumnsVisibility } from "./components/index.js";
7
7
  import { cn, makeDecoratable } from "../utils.js";
8
+ const features = tableFeatures({
9
+ columnResizingFeature: columnResizingFeature,
10
+ columnSizingFeature: columnSizingFeature,
11
+ columnVisibilityFeature: columnVisibilityFeature,
12
+ rowSelectionFeature: rowSelectionFeature,
13
+ rowSortingFeature: rowSortingFeature,
14
+ sortedRowModel: createSortedRowModel(),
15
+ coreRowModel: createCoreRowModel()
16
+ });
8
17
  const defineColumns = (columns, options)=>{
9
18
  const { canSelectAllRows, onSelectRow, onToggleRow, loading } = options;
10
19
  return useMemo(()=>{
@@ -158,7 +167,8 @@ const DecoratableDataTable = ({ bordered, canSelectAllRows = true, columnVisibil
158
167
  onToggleRow,
159
168
  loading
160
169
  });
161
- const table = useReactTable({
170
+ const table = useTable({
171
+ features: features,
162
172
  columnResizeMode: "onChange",
163
173
  columns,
164
174
  data,
@@ -167,8 +177,6 @@ const DecoratableDataTable = ({ bordered, canSelectAllRows = true, columnVisibil
167
177
  enableRowSelection: isRowSelectable,
168
178
  enableSorting: !!onSortingChange,
169
179
  enableSortingRemoval: false,
170
- getCoreRowModel: getCoreRowModel(),
171
- getSortedRowModel: getSortedRowModel(),
172
180
  manualSorting: true,
173
181
  onColumnVisibilityChange,
174
182
  onRowSelectionChange,