@webiny/admin-ui 6.4.12-beta.5 → 6.5.0-beta.0

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 (298) 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/Button/Button.d.ts +10 -9
  24. package/Button/CopyButton.d.ts +7 -6
  25. package/Button/IconButton.d.ts +10 -9
  26. package/Calendar/Calendar.d.ts +7 -6
  27. package/Calendar/calendarClassNames.js +1 -1
  28. package/Calendar/calendarClassNames.js.map +1 -1
  29. package/Card/Card.d.ts +8 -22
  30. package/Card/components/CancelAction.d.ts +8 -6
  31. package/Card/components/CardContent.d.ts +6 -6
  32. package/Card/components/CardTitle.d.ts +2 -2
  33. package/Card/components/ConfirmAction.d.ts +8 -6
  34. package/Card/components/Icon.d.ts +7 -6
  35. package/Checkbox/Checkbox.d.ts +7 -6
  36. package/Checkbox/primitives/CheckboxPrimitive.d.ts +17 -12
  37. package/CheckboxGroup/CheckboxGroup.d.ts +7 -6
  38. package/CheckboxGroup/primitives/CheckboxGroupPrimitive.d.ts +20 -12
  39. package/CodeEditor/CodeEditor.d.ts +7 -6
  40. package/CodeEditor/CodeEditorPrimitive.d.ts +7 -6
  41. package/CodeEditor/CodeEditorPrimitive.js +3 -1
  42. package/CodeEditor/CodeEditorPrimitive.js.map +1 -1
  43. package/ColorPicker/ColorPicker.d.ts +7 -6
  44. package/ColorPicker/primitives/ColorPickerPrimitive.d.ts +7 -6
  45. package/Command/Command.d.ts +10 -8
  46. package/DataList/DataListModal.d.ts +6 -3
  47. package/DataTable/DataTable.d.ts +13 -22
  48. package/DataTable/DataTable.js +6 -14
  49. package/DataTable/DataTable.js.map +1 -1
  50. package/DataTable/components/ColumnsVisibility.d.ts +4 -5
  51. package/DataTable/components/ColumnsVisibility.js +3 -6
  52. package/DataTable/components/ColumnsVisibility.js.map +1 -1
  53. package/DatePicker/DatePicker.d.ts +11 -7
  54. package/DatePicker/DatePicker.js +10 -2
  55. package/DatePicker/DatePicker.js.map +1 -1
  56. package/DatePicker/primitives/DatePickerPrimitive.d.ts +7 -6
  57. package/DatePicker/primitives/DateTimePicker.d.ts +1 -1
  58. package/DatePicker/primitives/DateTimePicker.js +23 -16
  59. package/DatePicker/primitives/DateTimePicker.js.map +1 -1
  60. package/DatePicker/primitives/components/DatePickerTrigger.js +1 -1
  61. package/DatePicker/primitives/components/DatePickerTrigger.js.map +1 -1
  62. package/DatePicker/utils/dateHelpers.d.ts +1 -1
  63. package/DatePicker/utils/dateHelpers.js +2 -1
  64. package/DatePicker/utils/dateHelpers.js.map +1 -1
  65. package/DatePicker/utils/timezoneHelpers.d.ts +3 -0
  66. package/DatePicker/utils/timezoneHelpers.js +32 -0
  67. package/DatePicker/utils/timezoneHelpers.js.map +1 -0
  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.map +1 -1
  127. package/FilePicker/primitives/components/previews/ItemDescription.js +1 -1
  128. package/FilePicker/primitives/components/previews/ItemDescription.js.map +1 -1
  129. package/FilePicker/primitives/components/previews/RichItemPreview/FileType.d.ts +0 -4
  130. package/FilePicker/primitives/components/previews/RichItemPreview/FileType.js.map +1 -1
  131. package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.d.ts +0 -3
  132. package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.js.map +1 -1
  133. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.d.ts +12 -6
  134. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js +6 -4
  135. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js.map +1 -1
  136. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.d.ts +6 -1
  137. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js +3 -2
  138. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js.map +1 -1
  139. package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.d.ts +5 -5
  140. package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js +7 -3
  141. package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js.map +1 -1
  142. package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.d.ts +0 -5
  143. package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.js.map +1 -1
  144. package/FilePicker/primitives/components/previews/TextOnlyPreview/TextOnlyPreview.d.ts +7 -6
  145. package/FilePicker/primitives/components/previews/TruncatedFileName.d.ts +0 -4
  146. package/FilePicker/primitives/components/previews/TruncatedFileName.js.map +1 -1
  147. package/FilePicker/primitives/components/previews/fileName.d.ts +0 -8
  148. package/FilePicker/primitives/components/previews/fileName.js.map +1 -1
  149. package/FilePicker/primitives/components/previews/variants.d.ts +1 -1
  150. package/FillViewport/FillViewport.d.ts +21 -18
  151. package/FormComponent/Description.d.ts +7 -6
  152. package/FormComponent/ErrorMessage.d.ts +7 -6
  153. package/FormComponent/Label.d.ts +7 -6
  154. package/FormComponent/Note.d.ts +7 -6
  155. package/Grid/Grid.d.ts +24 -22
  156. package/HeaderBar/HeaderBar.d.ts +7 -6
  157. package/Heading/Heading.d.ts +8 -7
  158. package/Icon/Icon.d.ts +9 -8
  159. package/IconPicker/IconPicker.d.ts +7 -6
  160. package/IconPicker/domains/IconPickerIcon.js +1 -1
  161. package/IconPicker/domains/IconPickerIcon.js.map +1 -1
  162. package/IconPicker/primitives/IconPickerPrimitive.d.ts +1 -1
  163. package/IconPicker/primitives/components/IconPickerTrigger.d.ts +1 -1
  164. package/ImageEditor/AspectRatioPreview.d.ts +16 -0
  165. package/ImageEditor/AspectRatioPreview.js +26 -0
  166. package/ImageEditor/AspectRatioPreview.js.map +1 -0
  167. package/ImageEditor/CropHotspotEditor.d.ts +22 -0
  168. package/ImageEditor/CropHotspotEditor.js +402 -0
  169. package/ImageEditor/CropHotspotEditor.js.map +1 -0
  170. package/ImageEditor/ImageEditor.d.ts +18 -0
  171. package/ImageEditor/ImageEditor.js +151 -0
  172. package/ImageEditor/ImageEditor.js.map +1 -0
  173. package/ImageEditor/ImageEditor.stories.d.ts +6 -0
  174. package/ImageEditor/ImageEditor.stories.js +42 -0
  175. package/ImageEditor/ImageEditor.stories.js.map +1 -0
  176. package/ImageEditor/MetaFields.d.ts +12 -0
  177. package/ImageEditor/MetaFields.js +20 -0
  178. package/ImageEditor/MetaFields.js.map +1 -0
  179. package/ImageEditor/SectionLabel.d.ts +8 -0
  180. package/ImageEditor/SectionLabel.js +7 -0
  181. package/ImageEditor/SectionLabel.js.map +1 -0
  182. package/ImageEditor/geometry.d.ts +46 -0
  183. package/ImageEditor/geometry.js +126 -0
  184. package/ImageEditor/geometry.js.map +1 -0
  185. package/ImageEditor/index.d.ts +3 -0
  186. package/ImageEditor/index.js +3 -0
  187. package/ImageEditor/types.d.ts +52 -0
  188. package/ImageEditor/types.js +35 -0
  189. package/ImageEditor/types.js.map +1 -0
  190. package/Input/Input.d.ts +7 -6
  191. package/Input/InputPrimitive.d.ts +9 -8
  192. package/Label/Label.d.ts +8 -7
  193. package/Label/components/LabelValue.d.ts +1 -1
  194. package/Link/Link.d.ts +2 -2
  195. package/List/List.d.ts +8 -7
  196. package/List/components/ListItem.d.ts +7 -6
  197. package/List/components/ListItemAction.d.ts +7 -6
  198. package/List/components/ListItemHandle.d.ts +7 -6
  199. package/List/components/ListItemIcon.d.ts +7 -6
  200. package/List/components/ListItemSeparator.d.ts +7 -6
  201. package/Loader/Loader.d.ts +9 -8
  202. package/Loader/OverlayLoader.d.ts +7 -6
  203. package/MultiAutoComplete/MultiAutoComplete.d.ts +7 -6
  204. package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.d.ts +7 -6
  205. package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenter.test.js +1 -1
  206. package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenter.test.js.map +1 -1
  207. package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenterWithFreeInput.d.ts +3 -3
  208. package/MultiAutoComplete/primitives/useMultiAutoComplete.d.ts +3 -3
  209. package/MultiAutoComplete/primitives/useMultiAutoComplete.js +2 -3
  210. package/MultiAutoComplete/primitives/useMultiAutoComplete.js.map +1 -1
  211. package/MultiFilePicker/MultiFilePicker.d.ts +19 -18
  212. package/MultiFilePicker/primitives/MultiFilePickerPrimitive.d.ts +19 -18
  213. package/MultiSelect/MultiSelect.d.ts +7 -6
  214. package/MultiSelect/primitives/MultiSelectPrimitive.d.ts +10 -6
  215. package/MultiSelect/primitives/MultiSelectPrimitive.js +1 -1
  216. package/MultiSelect/primitives/MultiSelectPrimitive.js.map +1 -1
  217. package/Popover/Popover.d.ts +7 -6
  218. package/Popover/primitives/PopoverPrimitive.d.ts +7 -7
  219. package/ProgressBar/ProgressBar.d.ts +7 -6
  220. package/RadioGroup/RadioGroup.d.ts +7 -6
  221. package/RadioGroup/primitives/Radio.d.ts +7 -6
  222. package/RadioGroup/primitives/RadioGroupPrimitive.d.ts +5 -1
  223. package/RangeSlider/RangeSlider.d.ts +7 -6
  224. package/SegmentedControl/SegmentedControl.d.ts +8 -7
  225. package/SegmentedControl/SegmentedControlTabs.d.ts +5 -2
  226. package/SegmentedControl/primitives/SegmentedControlPrimitive.d.ts +1 -1
  227. package/Select/Select.d.ts +7 -6
  228. package/Select/primitives/components/SelectContent.js +1 -1
  229. package/Select/primitives/components/SelectContent.js.map +1 -1
  230. package/Select/primitives/components/SelectTrigger.d.ts +2 -2
  231. package/Separator/Separator.d.ts +9 -8
  232. package/Sidebar/Sidebar.d.ts +7 -6
  233. package/Sidebar/components/SidebarIcon.d.ts +7 -6
  234. package/Sidebar/components/SidebarProvider.d.ts +4 -4
  235. package/Sidebar/components/items/SidebarMenuGroup.d.ts +9 -8
  236. package/Sidebar/components/items/SidebarMenuItem.d.ts +11 -10
  237. package/Sidebar/components/items/SidebarMenuItemIcon.d.ts +7 -6
  238. package/Sidebar/components/items/SidebarMenuLink.d.ts +11 -10
  239. package/Sidebar/components/items/SidebarMenuProvider.d.ts +4 -4
  240. package/Sidebar/components/items/SidebarMenuRootItem.d.ts +9 -7
  241. package/Skeleton/Skeleton.d.ts +9 -7
  242. package/Skeleton/Skeleton.js +10 -4
  243. package/Skeleton/Skeleton.js.map +1 -1
  244. package/Skeleton/Skeleton.stories.d.ts +2 -0
  245. package/Skeleton/Skeleton.stories.js +28 -2
  246. package/Skeleton/Skeleton.stories.js.map +1 -1
  247. package/Slider/Slider.d.ts +7 -6
  248. package/SteppedProgress/SteppedProgress.d.ts +7 -6
  249. package/SteppedProgress/SteppedProgressItem.d.ts +7 -6
  250. package/Switch/Switch.d.ts +7 -6
  251. package/Switch/primitives/SwitchPrimitive.d.ts +10 -6
  252. package/Table/Table.d.ts +12 -10
  253. package/Table/components/Direction.d.ts +1 -1
  254. package/Tabs/Tabs.d.ts +8 -6
  255. package/Tabs/Tabs.js +5 -2
  256. package/Tabs/Tabs.js.map +1 -1
  257. package/Tabs/components/Content.d.ts +1 -1
  258. package/Tabs/components/List.d.ts +2 -2
  259. package/Tabs/components/Tab.d.ts +7 -6
  260. package/Tabs/components/Trigger.d.ts +3 -2
  261. package/Tabs/components/Trigger.js +8 -3
  262. package/Tabs/components/Trigger.js.map +1 -1
  263. package/Tag/Tag.d.ts +8 -7
  264. package/Tags/Tags.d.ts +7 -6
  265. package/Tags/primitives/TagsPrimitive.d.ts +7 -6
  266. package/Text/Text.d.ts +8 -7
  267. package/Textarea/Textarea.d.ts +7 -6
  268. package/Textarea/TextareaPrimitive.d.ts +9 -8
  269. package/Toast/Toast.d.ts +7 -6
  270. package/Toast/components/ToastActions.d.ts +7 -6
  271. package/Toast/components/ToastDescription.d.ts +7 -6
  272. package/Toast/components/ToastTitle.d.ts +7 -6
  273. package/Toast/useToast.stories.js.map +1 -1
  274. package/Toggle/Toggle.d.ts +7 -6
  275. package/Toggle/primitives/TogglePrimitive.d.ts +13 -9
  276. package/ToggleGroup/ToggleGroup.d.ts +7 -6
  277. package/ToggleGroup/primitives/ToggleGroupPrimitive.d.ts +13 -9
  278. package/Tooltip/Tooltip.d.ts +7 -6
  279. package/Tree/Tree.d.ts +7 -6
  280. package/Tree/components/Item.d.ts +7 -6
  281. package/Tree/components/ItemCollapseTrigger.d.ts +7 -6
  282. package/Tree/components/ItemContent.d.ts +8 -6
  283. package/Tree/components/ItemDragHandle.d.ts +7 -6
  284. package/Tree/components/ItemIcon.d.ts +7 -6
  285. package/Tree/components/ItemPlaceholder.d.ts +7 -6
  286. package/Tree/components/ItemSubIndentation.d.ts +7 -6
  287. package/Widget/Widget.d.ts +8 -22
  288. package/Widget/components/Icon.d.ts +7 -6
  289. package/Widget/components/WidgetAction.d.ts +8 -6
  290. package/Widget/components/WidgetContent.d.ts +5 -5
  291. package/exports/admin/ui.d.ts +2 -0
  292. package/exports/admin/ui.js +2 -0
  293. package/index.d.ts +3 -0
  294. package/index.js +3 -0
  295. package/package.json +25 -25
  296. package/theme.css +13 -1
  297. package/utils.js +52 -34
  298. package/utils.js.map +1 -1
@@ -6,21 +6,22 @@ declare const textOnlyPreviewVariants: (props?: ({
6
6
  small?: boolean | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  type TextOnlyPreviewProps = FilePreviewDefaultProps & React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof previewVariants> & VariantProps<typeof textOnlyPreviewVariants>;
9
- declare const TextOnlyPreview: (({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, small, variant, value, ...props }: TextOnlyPreviewProps) => React.JSX.Element) & {
10
- original: ({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, small, variant, value, ...props }: TextOnlyPreviewProps) => React.JSX.Element;
9
+ declare const DecoratableTextOnlyPreview: ({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, small, variant, value, ...props }: TextOnlyPreviewProps) => React.JSX.Element;
10
+ declare const TextOnlyPreview: typeof DecoratableTextOnlyPreview & {
11
+ original: typeof DecoratableTextOnlyPreview;
11
12
  originalName: string;
12
13
  displayName: string;
13
14
  } & {
14
- original: (({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, small, variant, value, ...props }: TextOnlyPreviewProps) => React.JSX.Element) & {
15
- original: ({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, small, variant, value, ...props }: TextOnlyPreviewProps) => React.JSX.Element;
15
+ original: typeof DecoratableTextOnlyPreview & {
16
+ original: typeof DecoratableTextOnlyPreview;
16
17
  originalName: string;
17
18
  displayName: string;
18
19
  };
19
20
  originalName: string;
20
21
  displayName: string;
21
22
  } & {
22
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, small, variant, value, ...props }: TextOnlyPreviewProps) => React.JSX.Element) & {
23
- original: ({ className, disabled, onRemoveItem, onReplaceItem, onEditItem, small, variant, value, ...props }: TextOnlyPreviewProps) => React.JSX.Element;
23
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableTextOnlyPreview & {
24
+ original: typeof DecoratableTextOnlyPreview;
24
25
  originalName: string;
25
26
  displayName: string;
26
27
  }>) => (props: unknown) => React.JSX.Element;
@@ -3,9 +3,5 @@ interface TruncatedFileNameProps {
3
3
  name: string;
4
4
  className?: string;
5
5
  }
6
- /**
7
- * A file name that truncates in the middle, keeping the extension (and a little of the stem)
8
- * visible: "tide-cc-statuses-v2.png" becomes "tide-cc-statu…-v2.png".
9
- */
10
6
  declare const TruncatedFileName: ({ name, className }: TruncatedFileNameProps) => React.JSX.Element;
11
7
  export { TruncatedFileName, type TruncatedFileNameProps };
@@ -1 +1 @@
1
- {"version":3,"file":"FilePicker/primitives/components/previews/TruncatedFileName.js","sources":["../../../../../src/FilePicker/primitives/components/previews/TruncatedFileName.tsx"],"sourcesContent":["import React from \"react\";\nimport { Text } from \"~/Text/index.js\";\nimport { cn } from \"~/utils.js\";\nimport { splitFileName } from \"./fileName.js\";\n\ninterface TruncatedFileNameProps {\n name: string;\n className?: string;\n}\n\n/**\n * A file name that truncates in the middle, keeping the extension (and a little of the stem)\n * visible: \"tide-cc-statuses-v2.png\" becomes \"tide-cc-statu…-v2.png\".\n */\nconst TruncatedFileName = ({ name, className }: TruncatedFileNameProps) => {\n const { head, tail } = splitFileName(name);\n\n return (\n <Text size=\"sm\" as=\"div\" className={cn(\"flex min-w-0\", className)} title={name}>\n <span className={\"truncate\"}>{head}</span>\n {tail ? <span className={\"shrink-0 whitespace-pre\"}>{tail}</span> : null}\n </Text>\n );\n};\n\nexport { TruncatedFileName, type TruncatedFileNameProps };\n"],"names":["TruncatedFileName","name","className","head","tail","splitFileName","Text","cn"],"mappings":";;;;AAcA,MAAMA,oBAAoB,CAAC,EAAEC,IAAI,EAAEC,SAAS,EAA0B;IAClE,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAGC,cAAcJ;IAErC,OAAO,WAAP,GACI,oBAACK,MAAIA;QAAC,MAAK;QAAK,IAAG;QAAM,WAAWC,GAAG,gBAAgBL;QAAY,OAAOD;qBACtE,oBAAC;QAAK,WAAW;OAAaE,OAC7BC,OAAO,WAAPA,GAAO,oBAAC;QAAK,WAAW;OAA4BA,QAAe;AAGhF"}
1
+ {"version":3,"file":"FilePicker/primitives/components/previews/TruncatedFileName.js","sources":["../../../../../src/FilePicker/primitives/components/previews/TruncatedFileName.tsx"],"sourcesContent":["import React from \"react\";\nimport { Text } from \"~/Text/index.js\";\nimport { cn } from \"~/utils.js\";\nimport { splitFileName } from \"./fileName.js\";\n\ninterface TruncatedFileNameProps {\n name: string;\n className?: string;\n}\n\nconst TruncatedFileName = ({ name, className }: TruncatedFileNameProps) => {\n const { head, tail } = splitFileName(name);\n\n return (\n <Text size=\"sm\" as=\"div\" className={cn(\"flex min-w-0\", className)} title={name}>\n <span className={\"truncate\"}>{head}</span>\n {tail ? <span className={\"shrink-0 whitespace-pre\"}>{tail}</span> : null}\n </Text>\n );\n};\n\nexport { TruncatedFileName, type TruncatedFileNameProps };\n"],"names":["TruncatedFileName","name","className","head","tail","splitFileName","Text","cn"],"mappings":";;;;AAUA,MAAMA,oBAAoB,CAAC,EAAEC,IAAI,EAAEC,SAAS,EAA0B;IAClE,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAGC,cAAcJ;IAErC,OAAO,WAAP,GACI,oBAACK,MAAIA;QAAC,MAAK;QAAK,IAAG;QAAM,WAAWC,GAAG,gBAAgBL;QAAY,OAAOD;qBACtE,oBAAC;QAAK,WAAW;OAAaE,OAC7BC,OAAO,WAAPA,GAAO,oBAAC;QAAK,WAAW;OAA4BA,QAAe;AAGhF"}
@@ -1,11 +1,3 @@
1
- /**
2
- * Splits a file name into the part that may be truncated and the part that must stay visible.
3
- *
4
- * CSS can only cut the tail of a string, which is the least useful end of a file name - it hides
5
- * the extension and any "-v2"/"-final" suffix, the two things that tell near-identical uploads
6
- * apart. Rendering the head in a truncating element and pinning the tail after it moves the
7
- * ellipsis into the middle without measuring anything.
8
- */
9
1
  export declare const splitFileName: (name: string) => {
10
2
  head: string;
11
3
  tail: string;
@@ -1 +1 @@
1
- {"version":3,"file":"FilePicker/primitives/components/previews/fileName.js","sources":["../../../../../src/FilePicker/primitives/components/previews/fileName.ts"],"sourcesContent":["/**\n * How many characters of the stem to keep alongside the extension when a file name is too long\n * to fit. Enough to preserve a version or ordinal suffix - \"…-v2.png\" rather than \"….png\".\n */\nconst TAIL_STEM_CHARS = 3;\n\n/**\n * Splits a file name into the part that may be truncated and the part that must stay visible.\n *\n * CSS can only cut the tail of a string, which is the least useful end of a file name - it hides\n * the extension and any \"-v2\"/\"-final\" suffix, the two things that tell near-identical uploads\n * apart. Rendering the head in a truncating element and pinning the tail after it moves the\n * ellipsis into the middle without measuring anything.\n */\nexport const splitFileName = (name: string) => {\n const dot = name.lastIndexOf(\".\");\n\n // No extension, or a dotfile like \".gitignore\" - there is no meaningful tail to pin.\n if (dot <= 0) {\n return { head: name, tail: \"\" };\n }\n\n const cut = dot - Math.min(TAIL_STEM_CHARS, dot);\n\n // The whole name is extension-and-a-bit; pinning all of it would defeat the truncation.\n if (cut <= 0) {\n return { head: name, tail: \"\" };\n }\n\n const head = name.slice(0, cut);\n const tail = name.slice(cut);\n\n // On a short name the pinned tail can end up longer than the part left to truncate\n // (\"photo.jpeg\" would pin \"oto.jpeg\"), which reads as nonsense. Such names rarely overflow\n // anyway, so fall back to ordinary end truncation.\n if (head.length <= tail.length) {\n return { head: name, tail: \"\" };\n }\n\n return { head, tail };\n};\n"],"names":["TAIL_STEM_CHARS","splitFileName","name","dot","cut","Math","head","tail"],"mappings":"AAIA,MAAMA,kBAAkB;AAUjB,MAAMC,gBAAgB,CAACC;IAC1B,MAAMC,MAAMD,KAAK,WAAW,CAAC;IAG7B,IAAIC,OAAO,GACP,OAAO;QAAE,MAAMD;QAAM,MAAM;IAAG;IAGlC,MAAME,MAAMD,MAAME,KAAK,GAAG,CAACL,iBAAiBG;IAG5C,IAAIC,OAAO,GACP,OAAO;QAAE,MAAMF;QAAM,MAAM;IAAG;IAGlC,MAAMI,OAAOJ,KAAK,KAAK,CAAC,GAAGE;IAC3B,MAAMG,OAAOL,KAAK,KAAK,CAACE;IAKxB,IAAIE,KAAK,MAAM,IAAIC,KAAK,MAAM,EAC1B,OAAO;QAAE,MAAML;QAAM,MAAM;IAAG;IAGlC,OAAO;QAAEI;QAAMC;IAAK;AACxB"}
1
+ {"version":3,"file":"FilePicker/primitives/components/previews/fileName.js","sources":["../../../../../src/FilePicker/primitives/components/previews/fileName.ts"],"sourcesContent":["const TAIL_STEM_CHARS = 3;\n\nexport const splitFileName = (name: string) => {\n const dot = name.lastIndexOf(\".\");\n\n if (dot <= 0) {\n return { head: name, tail: \"\" };\n }\n\n const cut = dot - Math.min(TAIL_STEM_CHARS, dot);\n\n if (cut <= 0) {\n return { head: name, tail: \"\" };\n }\n\n const head = name.slice(0, cut);\n const tail = name.slice(cut);\n\n if (head.length <= tail.length) {\n return { head: name, tail: \"\" };\n }\n\n return { head, tail };\n};\n"],"names":["TAIL_STEM_CHARS","splitFileName","name","dot","cut","Math","head","tail"],"mappings":"AAAA,MAAMA,kBAAkB;AAEjB,MAAMC,gBAAgB,CAACC;IAC1B,MAAMC,MAAMD,KAAK,WAAW,CAAC;IAE7B,IAAIC,OAAO,GACP,OAAO;QAAE,MAAMD;QAAM,MAAM;IAAG;IAGlC,MAAME,MAAMD,MAAME,KAAK,GAAG,CAACL,iBAAiBG;IAE5C,IAAIC,OAAO,GACP,OAAO;QAAE,MAAMF;QAAM,MAAM;IAAG;IAGlC,MAAMI,OAAOJ,KAAK,KAAK,CAAC,GAAGE;IAC3B,MAAMG,OAAOL,KAAK,KAAK,CAACE;IAExB,IAAIE,KAAK,MAAM,IAAIC,KAAK,MAAM,EAC1B,OAAO;QAAE,MAAML;QAAM,MAAM;IAAG;IAGlC,OAAO;QAAEI;QAAMC;IAAK;AACxB"}
@@ -1,4 +1,4 @@
1
1
  export declare const previewVariants: (props?: ({
2
- variant?: "base" | "transparent" | "light" | null | undefined;
2
+ variant?: "base" | "light" | "transparent" | null | undefined;
3
3
  disabled?: boolean | null | undefined;
4
4
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -1,58 +1,61 @@
1
1
  import React from "react";
2
2
  type FillViewportProps = React.HTMLAttributes<HTMLDivElement>;
3
- declare const FillViewportHeight: (({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element) & {
4
- original: ({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element;
3
+ declare const BaseFillViewportHeight: ({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element;
4
+ declare const BaseFillViewportWidth: ({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element;
5
+ declare const BaseFillViewport: ({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element;
6
+ declare const FillViewportHeight: typeof BaseFillViewportHeight & {
7
+ original: typeof BaseFillViewportHeight;
5
8
  originalName: string;
6
9
  displayName: string;
7
10
  } & {
8
- original: (({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element) & {
9
- original: ({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element;
11
+ original: typeof BaseFillViewportHeight & {
12
+ original: typeof BaseFillViewportHeight;
10
13
  originalName: string;
11
14
  displayName: string;
12
15
  };
13
16
  originalName: string;
14
17
  displayName: string;
15
18
  } & {
16
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element) & {
17
- original: ({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element;
19
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof BaseFillViewportHeight & {
20
+ original: typeof BaseFillViewportHeight;
18
21
  originalName: string;
19
22
  displayName: string;
20
23
  }>) => (props: unknown) => React.JSX.Element;
21
24
  };
22
- declare const FillViewportWidth: (({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element) & {
23
- original: ({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element;
25
+ declare const FillViewportWidth: typeof BaseFillViewportWidth & {
26
+ original: typeof BaseFillViewportWidth;
24
27
  originalName: string;
25
28
  displayName: string;
26
29
  } & {
27
- original: (({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element) & {
28
- original: ({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element;
30
+ original: typeof BaseFillViewportWidth & {
31
+ original: typeof BaseFillViewportWidth;
29
32
  originalName: string;
30
33
  displayName: string;
31
34
  };
32
35
  originalName: string;
33
36
  displayName: string;
34
37
  } & {
35
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element) & {
36
- original: ({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element;
38
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof BaseFillViewportWidth & {
39
+ original: typeof BaseFillViewportWidth;
37
40
  originalName: string;
38
41
  displayName: string;
39
42
  }>) => (props: unknown) => React.JSX.Element;
40
43
  };
41
- declare const FillViewport: (({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element) & {
42
- original: ({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element;
44
+ declare const FillViewport: typeof BaseFillViewport & {
45
+ original: typeof BaseFillViewport;
43
46
  originalName: string;
44
47
  displayName: string;
45
48
  } & {
46
- original: (({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element) & {
47
- original: ({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element;
49
+ original: typeof BaseFillViewport & {
50
+ original: typeof BaseFillViewport;
48
51
  originalName: string;
49
52
  displayName: string;
50
53
  };
51
54
  originalName: string;
52
55
  displayName: string;
53
56
  } & {
54
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element) & {
55
- original: ({ children, style: userStyle, ...rest }: FillViewportProps) => React.JSX.Element;
57
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof BaseFillViewport & {
58
+ original: typeof BaseFillViewport;
56
59
  originalName: string;
57
60
  displayName: string;
58
61
  }>) => (props: unknown) => React.JSX.Element;
@@ -7,21 +7,22 @@ declare const formComponentDescriptionVariants: (props?: ({
7
7
  type FormComponentDescriptionProps = TextProps & VariantProps<typeof formComponentDescriptionVariants> & {
8
8
  text?: React.ReactNode;
9
9
  };
10
- declare const FormComponentDescription: (({ text, disabled, className, ...props }: FormComponentDescriptionProps) => React.JSX.Element | null) & {
11
- original: ({ text, disabled, className, ...props }: FormComponentDescriptionProps) => React.JSX.Element | null;
10
+ declare const DecoratableFormComponentDescription: ({ text, disabled, className, ...props }: FormComponentDescriptionProps) => React.JSX.Element | null;
11
+ declare const FormComponentDescription: typeof DecoratableFormComponentDescription & {
12
+ original: typeof DecoratableFormComponentDescription;
12
13
  originalName: string;
13
14
  displayName: string;
14
15
  } & {
15
- original: (({ text, disabled, className, ...props }: FormComponentDescriptionProps) => React.JSX.Element | null) & {
16
- original: ({ text, disabled, className, ...props }: FormComponentDescriptionProps) => React.JSX.Element | null;
16
+ original: typeof DecoratableFormComponentDescription & {
17
+ original: typeof DecoratableFormComponentDescription;
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<(({ text, disabled, className, ...props }: FormComponentDescriptionProps) => React.JSX.Element | null) & {
24
- original: ({ text, disabled, className, ...props }: FormComponentDescriptionProps) => React.JSX.Element | null;
24
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableFormComponentDescription & {
25
+ original: typeof DecoratableFormComponentDescription;
25
26
  originalName: string;
26
27
  displayName: string;
27
28
  }>) => (props: unknown) => React.JSX.Element;
@@ -8,21 +8,22 @@ type FormComponentErrorMessageProps = TextProps & VariantProps<typeof formCompon
8
8
  text?: React.ReactNode;
9
9
  invalid?: boolean;
10
10
  };
11
- declare const FormComponentErrorMessage: (({ invalid, disabled, className, text, ...props }: FormComponentErrorMessageProps) => React.JSX.Element | null) & {
12
- original: ({ invalid, disabled, className, text, ...props }: FormComponentErrorMessageProps) => React.JSX.Element | null;
11
+ declare const DecoratableFormComponentErrorMessage: ({ invalid, disabled, className, text, ...props }: FormComponentErrorMessageProps) => React.JSX.Element | null;
12
+ declare const FormComponentErrorMessage: typeof DecoratableFormComponentErrorMessage & {
13
+ original: typeof DecoratableFormComponentErrorMessage;
13
14
  originalName: string;
14
15
  displayName: string;
15
16
  } & {
16
- original: (({ invalid, disabled, className, text, ...props }: FormComponentErrorMessageProps) => React.JSX.Element | null) & {
17
- original: ({ invalid, disabled, className, text, ...props }: FormComponentErrorMessageProps) => React.JSX.Element | null;
17
+ original: typeof DecoratableFormComponentErrorMessage & {
18
+ original: typeof DecoratableFormComponentErrorMessage;
18
19
  originalName: string;
19
20
  displayName: string;
20
21
  };
21
22
  originalName: string;
22
23
  displayName: string;
23
24
  } & {
24
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ invalid, disabled, className, text, ...props }: FormComponentErrorMessageProps) => React.JSX.Element | null) & {
25
- original: ({ invalid, disabled, className, text, ...props }: FormComponentErrorMessageProps) => React.JSX.Element | null;
25
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableFormComponentErrorMessage & {
26
+ original: typeof DecoratableFormComponentErrorMessage;
26
27
  originalName: string;
27
28
  displayName: string;
28
29
  }>) => (props: unknown) => React.JSX.Element;
@@ -8,21 +8,22 @@ interface FormComponentLabelProps extends React.HTMLAttributes<HTMLDivElement> {
8
8
  hint?: React.ReactNode;
9
9
  htmlFor?: string;
10
10
  }
11
- declare const FormComponentLabel: (({ htmlFor, text, required, disabled, hint, invalid, className, ...props }: FormComponentLabelProps) => React.JSX.Element | null) & {
12
- original: ({ htmlFor, text, required, disabled, hint, invalid, className, ...props }: FormComponentLabelProps) => React.JSX.Element | null;
11
+ declare const DecoratableFormComponentLabel: ({ htmlFor, text, required, disabled, hint, invalid, className, ...props }: FormComponentLabelProps) => React.JSX.Element | null;
12
+ declare const FormComponentLabel: typeof DecoratableFormComponentLabel & {
13
+ original: typeof DecoratableFormComponentLabel;
13
14
  originalName: string;
14
15
  displayName: string;
15
16
  } & {
16
- original: (({ htmlFor, text, required, disabled, hint, invalid, className, ...props }: FormComponentLabelProps) => React.JSX.Element | null) & {
17
- original: ({ htmlFor, text, required, disabled, hint, invalid, className, ...props }: FormComponentLabelProps) => React.JSX.Element | null;
17
+ original: typeof DecoratableFormComponentLabel & {
18
+ original: typeof DecoratableFormComponentLabel;
18
19
  originalName: string;
19
20
  displayName: string;
20
21
  };
21
22
  originalName: string;
22
23
  displayName: string;
23
24
  } & {
24
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ htmlFor, text, required, disabled, hint, invalid, className, ...props }: FormComponentLabelProps) => React.JSX.Element | null) & {
25
- original: ({ htmlFor, text, required, disabled, hint, invalid, className, ...props }: FormComponentLabelProps) => React.JSX.Element | null;
25
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableFormComponentLabel & {
26
+ original: typeof DecoratableFormComponentLabel;
26
27
  originalName: string;
27
28
  displayName: string;
28
29
  }>) => (props: unknown) => React.JSX.Element;
@@ -7,21 +7,22 @@ declare const formComponentNoteVariants: (props?: ({
7
7
  type FormComponentNoteProps = TextProps & VariantProps<typeof formComponentNoteVariants> & {
8
8
  text?: React.ReactNode;
9
9
  };
10
- declare const FormComponentNote: (({ disabled, text, className, ...props }: FormComponentNoteProps) => React.JSX.Element | null) & {
11
- original: ({ disabled, text, className, ...props }: FormComponentNoteProps) => React.JSX.Element | null;
10
+ declare const DecoratableFormComponentNote: ({ disabled, text, className, ...props }: FormComponentNoteProps) => React.JSX.Element | null;
11
+ declare const FormComponentNote: typeof DecoratableFormComponentNote & {
12
+ original: typeof DecoratableFormComponentNote;
12
13
  originalName: string;
13
14
  displayName: string;
14
15
  } & {
15
- original: (({ disabled, text, className, ...props }: FormComponentNoteProps) => React.JSX.Element | null) & {
16
- original: ({ disabled, text, className, ...props }: FormComponentNoteProps) => React.JSX.Element | null;
16
+ original: typeof DecoratableFormComponentNote & {
17
+ original: typeof DecoratableFormComponentNote;
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<(({ disabled, text, className, ...props }: FormComponentNoteProps) => React.JSX.Element | null) & {
24
- original: ({ disabled, text, className, ...props }: FormComponentNoteProps) => React.JSX.Element | null;
24
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableFormComponentNote & {
25
+ original: typeof DecoratableFormComponentNote;
25
26
  originalName: string;
26
27
  displayName: string;
27
28
  }>) => (props: unknown) => React.JSX.Element;
package/Grid/Grid.d.ts CHANGED
@@ -1,72 +1,74 @@
1
1
  import React from "react";
2
2
  import { type VariantProps } from "../utils.js";
3
3
  declare const columnVariants: (props?: ({
4
- span?: 1 | 2 | 4 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "auto" | null | undefined;
5
- offset?: 1 | 2 | 4 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | null | undefined;
6
- align?: "bottom" | "top" | "middle" | null | undefined;
4
+ span?: "auto" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | null | undefined;
5
+ offset?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | null | undefined;
6
+ align?: "bottom" | "middle" | "top" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  interface ColumnProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof columnVariants> {
9
9
  children?: React.ReactNode;
10
10
  }
11
- declare const Column: (({ span, align, children, className, offset, ...props }: ColumnProps) => React.JSX.Element) & {
12
- original: ({ span, align, children, className, offset, ...props }: ColumnProps) => React.JSX.Element;
11
+ declare const ColumnBase: ({ span, align, children, className, offset, ...props }: ColumnProps) => React.JSX.Element;
12
+ declare const Column: typeof ColumnBase & {
13
+ original: typeof ColumnBase;
13
14
  originalName: string;
14
15
  displayName: string;
15
16
  } & {
16
- original: (({ span, align, children, className, offset, ...props }: ColumnProps) => React.JSX.Element) & {
17
- original: ({ span, align, children, className, offset, ...props }: ColumnProps) => React.JSX.Element;
17
+ original: typeof ColumnBase & {
18
+ original: typeof ColumnBase;
18
19
  originalName: string;
19
20
  displayName: string;
20
21
  };
21
22
  originalName: string;
22
23
  displayName: string;
23
24
  } & {
24
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ span, align, children, className, offset, ...props }: ColumnProps) => React.JSX.Element) & {
25
- original: ({ span, align, children, className, offset, ...props }: ColumnProps) => React.JSX.Element;
25
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof ColumnBase & {
26
+ original: typeof ColumnBase;
26
27
  originalName: string;
27
28
  displayName: string;
28
29
  }>) => (props: unknown) => React.JSX.Element;
29
30
  };
30
31
  declare const gridVariants: (props?: ({
31
- gap?: "none" | "small" | "compact" | "micro" | "comfortable" | "spacious" | null | undefined;
32
+ gap?: "comfortable" | "compact" | "micro" | "none" | "small" | "spacious" | null | undefined;
32
33
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
33
34
  interface GridProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridVariants> {
34
35
  children: null | React.ReactElement<ColumnProps, typeof Column> | Array<React.ReactElement<ColumnProps, typeof Column> | null>;
35
36
  }
36
- declare const Grid: (({ gap, children, className, ...props }: GridProps) => React.JSX.Element) & {
37
- original: ({ gap, children, className, ...props }: GridProps) => React.JSX.Element;
37
+ declare const GridBase: ({ gap, children, className, ...props }: GridProps) => React.JSX.Element;
38
+ declare const Grid: typeof GridBase & {
39
+ original: typeof GridBase;
38
40
  originalName: string;
39
41
  displayName: string;
40
42
  } & {
41
- original: (({ gap, children, className, ...props }: GridProps) => React.JSX.Element) & {
42
- original: ({ gap, children, className, ...props }: GridProps) => React.JSX.Element;
43
+ original: typeof GridBase & {
44
+ original: typeof GridBase;
43
45
  originalName: string;
44
46
  displayName: string;
45
47
  };
46
48
  originalName: string;
47
49
  displayName: string;
48
50
  } & {
49
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ gap, children, className, ...props }: GridProps) => React.JSX.Element) & {
50
- original: ({ gap, children, className, ...props }: GridProps) => React.JSX.Element;
51
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof GridBase & {
52
+ original: typeof GridBase;
51
53
  originalName: string;
52
54
  displayName: string;
53
55
  }>) => (props: unknown) => React.JSX.Element;
54
56
  } & {
55
- Column: (({ span, align, children, className, offset, ...props }: ColumnProps) => React.JSX.Element) & {
56
- original: ({ span, align, children, className, offset, ...props }: ColumnProps) => React.JSX.Element;
57
+ Column: typeof ColumnBase & {
58
+ original: typeof ColumnBase;
57
59
  originalName: string;
58
60
  displayName: string;
59
61
  } & {
60
- original: (({ span, align, children, className, offset, ...props }: ColumnProps) => React.JSX.Element) & {
61
- original: ({ span, align, children, className, offset, ...props }: ColumnProps) => React.JSX.Element;
62
+ original: typeof ColumnBase & {
63
+ original: typeof ColumnBase;
62
64
  originalName: string;
63
65
  displayName: string;
64
66
  };
65
67
  originalName: string;
66
68
  displayName: string;
67
69
  } & {
68
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ span, align, children, className, offset, ...props }: ColumnProps) => React.JSX.Element) & {
69
- original: ({ span, align, children, className, offset, ...props }: ColumnProps) => React.JSX.Element;
70
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof ColumnBase & {
71
+ original: typeof ColumnBase;
70
72
  originalName: string;
71
73
  displayName: string;
72
74
  }>) => (props: unknown) => React.JSX.Element;
@@ -4,21 +4,22 @@ interface HeaderBarProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  middle?: React.ReactNode;
5
5
  end?: React.ReactNode;
6
6
  }
7
- declare const HeaderBar: (({ start, middle, end, className, ...props }: HeaderBarProps) => React.JSX.Element) & {
8
- original: ({ start, middle, end, className, ...props }: HeaderBarProps) => React.JSX.Element;
7
+ declare const HeaderBarBase: ({ start, middle, end, className, ...props }: HeaderBarProps) => React.JSX.Element;
8
+ declare const HeaderBar: typeof HeaderBarBase & {
9
+ original: typeof HeaderBarBase;
9
10
  originalName: string;
10
11
  displayName: string;
11
12
  } & {
12
- original: (({ start, middle, end, className, ...props }: HeaderBarProps) => React.JSX.Element) & {
13
- original: ({ start, middle, end, className, ...props }: HeaderBarProps) => React.JSX.Element;
13
+ original: typeof HeaderBarBase & {
14
+ original: typeof HeaderBarBase;
14
15
  originalName: string;
15
16
  displayName: string;
16
17
  };
17
18
  originalName: string;
18
19
  displayName: string;
19
20
  } & {
20
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ start, middle, end, className, ...props }: HeaderBarProps) => React.JSX.Element) & {
21
- original: ({ start, middle, end, className, ...props }: HeaderBarProps) => React.JSX.Element;
21
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof HeaderBarBase & {
22
+ original: typeof HeaderBarBase;
22
23
  originalName: string;
23
24
  displayName: string;
24
25
  }>) => (props: unknown) => React.JSX.Element;
@@ -3,26 +3,27 @@ import { type VariantProps } from "../utils.js";
3
3
  export type HeadingTags = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
4
4
  export type HeadingLevels = 1 | 2 | 3 | 4 | 5 | 6;
5
5
  declare const headingVariants: (props?: ({
6
- level?: 1 | 2 | 4 | 3 | 5 | 6 | null | undefined;
6
+ level?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement>, VariantProps<typeof headingVariants> {
9
9
  as?: HeadingTags;
10
10
  }
11
- declare const Heading: (({ children, level, className, as, ...props }: HeadingProps) => React.JSX.Element) & {
12
- original: ({ children, level, className, as, ...props }: HeadingProps) => React.JSX.Element;
11
+ declare const HeadingBase: ({ children, level, className, as, ...props }: HeadingProps) => React.JSX.Element;
12
+ declare const Heading: typeof HeadingBase & {
13
+ original: typeof HeadingBase;
13
14
  originalName: string;
14
15
  displayName: string;
15
16
  } & {
16
- original: (({ children, level, className, as, ...props }: HeadingProps) => React.JSX.Element) & {
17
- original: ({ children, level, className, as, ...props }: HeadingProps) => React.JSX.Element;
17
+ original: typeof HeadingBase & {
18
+ original: typeof HeadingBase;
18
19
  originalName: string;
19
20
  displayName: string;
20
21
  };
21
22
  originalName: string;
22
23
  displayName: string;
23
24
  } & {
24
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ children, level, className, as, ...props }: HeadingProps) => React.JSX.Element) & {
25
- original: ({ children, level, className, as, ...props }: HeadingProps) => React.JSX.Element;
25
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof HeadingBase & {
26
+ original: typeof HeadingBase;
26
27
  originalName: string;
27
28
  displayName: string;
28
29
  }>) => (props: unknown) => React.JSX.Element;
package/Icon/Icon.d.ts CHANGED
@@ -1,28 +1,29 @@
1
1
  import React from "react";
2
2
  import { type VariantProps } from "../utils.js";
3
3
  declare const iconVariants: (props?: ({
4
- size?: "sm" | "md" | "lg" | "xs" | null | undefined;
5
- color?: "accent" | "inherit" | "neutral-light" | "neutral-strong" | "neutral-strong-transparent" | "neutral-base" | "neutral-negative" | null | undefined;
4
+ size?: "lg" | "md" | "sm" | "xs" | null | undefined;
5
+ color?: "accent" | "inherit" | "neutral-base" | "neutral-light" | "neutral-negative" | "neutral-strong" | "neutral-strong-transparent" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  interface IconProps extends Omit<React.HTMLAttributes<HTMLOrSVGElement>, "color">, VariantProps<typeof iconVariants> {
8
8
  label: string;
9
9
  icon: React.ReactNode;
10
10
  }
11
- declare const Icon: ((props: IconProps) => React.JSX.Element) & {
12
- original: (props: IconProps) => React.JSX.Element;
11
+ declare const IconBase: (props: IconProps) => React.JSX.Element;
12
+ declare const Icon: typeof IconBase & {
13
+ original: typeof IconBase;
13
14
  originalName: string;
14
15
  displayName: string;
15
16
  } & {
16
- original: ((props: IconProps) => React.JSX.Element) & {
17
- original: (props: IconProps) => React.JSX.Element;
17
+ original: typeof IconBase & {
18
+ original: typeof IconBase;
18
19
  originalName: string;
19
20
  displayName: string;
20
21
  };
21
22
  originalName: string;
22
23
  displayName: string;
23
24
  } & {
24
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<((props: IconProps) => React.JSX.Element) & {
25
- original: (props: IconProps) => React.JSX.Element;
25
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof IconBase & {
26
+ original: typeof IconBase;
26
27
  originalName: string;
27
28
  displayName: string;
28
29
  }>) => (props: unknown) => React.JSX.Element;
@@ -2,21 +2,22 @@ import React from "react";
2
2
  import type { IconPickerPrimitiveProps } from "./primitives/index.js";
3
3
  import type { FormComponentProps } from "../FormComponent/index.js";
4
4
  type IconPickerProps = IconPickerPrimitiveProps & FormComponentProps;
5
- declare const IconPicker: (({ label, description, note, hint, required, disabled, validation, ...props }: IconPickerProps) => React.JSX.Element) & {
6
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: IconPickerProps) => React.JSX.Element;
5
+ declare const DecoratableIconPicker: ({ label, description, note, hint, required, disabled, validation, ...props }: IconPickerProps) => React.JSX.Element;
6
+ declare const IconPicker: 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 }: IconPickerProps) => React.JSX.Element) & {
11
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: IconPickerProps) => 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 }: IconPickerProps) => React.JSX.Element) & {
19
- original: ({ label, description, note, hint, required, disabled, validation, ...props }: IconPickerProps) => 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;
@@ -14,7 +14,7 @@ class IconPickerIcon {
14
14
  prefix: "fas",
15
15
  name: "star"
16
16
  });
17
- else {
17
+ {
18
18
  const values = value.split("/");
19
19
  return new IconPickerIcon({
20
20
  prefix: values[0],
@@ -1 +1 @@
1
- {"version":3,"file":"IconPicker/domains/IconPickerIcon.js","sources":["../../../src/IconPicker/domains/IconPickerIcon.tsx"],"sourcesContent":["import type { IconPickerIconDto } from \"./IconPickerIconDto.js\";\n\nexport class IconPickerIcon {\n private readonly _prefix: string;\n private readonly _name: string;\n\n protected constructor(data: { prefix: string; name: string }) {\n this._prefix = data.prefix;\n this._name = data.name;\n }\n\n static create(data: IconPickerIconDto) {\n return new IconPickerIcon({\n prefix: data.prefix,\n name: data.name\n });\n }\n\n static createFromString(value?: string) {\n if (typeof value === \"string\" && value.includes(\"/\")) {\n const values = value.split(\"/\");\n return new IconPickerIcon({\n prefix: values[0],\n name: values[1]\n });\n } else {\n return new IconPickerIcon({\n prefix: \"fas\",\n name: \"star\"\n });\n }\n }\n\n get prefix() {\n return this._prefix;\n }\n\n get name() {\n return this._name;\n }\n}\n"],"names":["IconPickerIcon","data","value","values"],"mappings":"AAEO,MAAMA;IAIT,YAAsBC,IAAsC,CAAE;QAC1D,IAAI,CAAC,OAAO,GAAGA,KAAK,MAAM;QAC1B,IAAI,CAAC,KAAK,GAAGA,KAAK,IAAI;IAC1B;IAEA,OAAO,OAAOA,IAAuB,EAAE;QACnC,OAAO,IAAID,eAAe;YACtB,QAAQC,KAAK,MAAM;YACnB,MAAMA,KAAK,IAAI;QACnB;IACJ;IAEA,OAAO,iBAAiBC,KAAc,EAAE;QACpC,KAAI,CAAiB,YAAjB,OAAOA,SAAsBA,MAAM,QAAQ,CAAC,IAAG,GAO/C,OAAO,IAAIF,eAAe;YACtB,QAAQ;YACR,MAAM;QACV;aAVkD;YAClD,MAAMG,SAASD,MAAM,KAAK,CAAC;YAC3B,OAAO,IAAIF,eAAe;gBACtB,QAAQG,MAAM,CAAC,EAAE;gBACjB,MAAMA,MAAM,CAAC,EAAE;YACnB;QACJ;IAMJ;IAEA,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,OAAO;IACvB;IAEA,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,KAAK;IACrB;AACJ"}
1
+ {"version":3,"file":"IconPicker/domains/IconPickerIcon.js","sources":["../../../src/IconPicker/domains/IconPickerIcon.tsx"],"sourcesContent":["import type { IconPickerIconDto } from \"./IconPickerIconDto.js\";\n\nexport class IconPickerIcon {\n private readonly _prefix: string;\n private readonly _name: string;\n\n protected constructor(data: { prefix: string; name: string }) {\n this._prefix = data.prefix;\n this._name = data.name;\n }\n\n static create(data: IconPickerIconDto) {\n return new IconPickerIcon({\n prefix: data.prefix,\n name: data.name\n });\n }\n\n static createFromString(value?: string) {\n if (typeof value === \"string\" && value.includes(\"/\")) {\n const values = value.split(\"/\");\n return new IconPickerIcon({\n prefix: values[0],\n name: values[1]\n });\n } else {\n return new IconPickerIcon({\n prefix: \"fas\",\n name: \"star\"\n });\n }\n }\n\n get prefix() {\n return this._prefix;\n }\n\n get name() {\n return this._name;\n }\n}\n"],"names":["IconPickerIcon","data","value","values"],"mappings":"AAEO,MAAMA;IAIT,YAAsBC,IAAsC,CAAE;QAC1D,IAAI,CAAC,OAAO,GAAGA,KAAK,MAAM;QAC1B,IAAI,CAAC,KAAK,GAAGA,KAAK,IAAI;IAC1B;IAEA,OAAO,OAAOA,IAAuB,EAAE;QACnC,OAAO,IAAID,eAAe;YACtB,QAAQC,KAAK,MAAM;YACnB,MAAMA,KAAK,IAAI;QACnB;IACJ;IAEA,OAAO,iBAAiBC,KAAc,EAAE;QACpC,KAAI,CAAiB,YAAjB,OAAOA,SAAsBA,MAAM,QAAQ,CAAC,IAAG,GAO/C,OAAO,IAAIF,eAAe;YACtB,QAAQ;YACR,MAAM;QACV;QAVkD;YAClD,MAAMG,SAASD,MAAM,KAAK,CAAC;YAC3B,OAAO,IAAIF,eAAe;gBACtB,QAAQG,MAAM,CAAC,EAAE;gBACjB,MAAMA,MAAM,CAAC,EAAE;YACnB;QACJ;IAMJ;IAEA,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,OAAO;IACvB;IAEA,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,KAAK;IACrB;AACJ"}
@@ -3,7 +3,7 @@ import type { InputPrimitiveProps } from "../../Input/index.js";
3
3
  import { type VariantProps } from "../../utils.js";
4
4
  import type { IconPickerIconDto } from "../domains/index.js";
5
5
  declare const iconPickerVariants: (props?: ({
6
- size?: "md" | "lg" | "xl" | null | undefined;
6
+ size?: "lg" | "md" | "xl" | null | undefined;
7
7
  disabled?: boolean | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  interface IconPickerPrimitiveProps extends VariantProps<typeof iconPickerVariants> {
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { type VariantProps } from "../../../utils.js";
3
3
  declare const iconPickerTriggerVariants: (props?: ({
4
- size?: "md" | "lg" | "xl" | null | undefined;
4
+ size?: "lg" | "md" | "xl" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  interface IconPickerTriggerProps extends VariantProps<typeof iconPickerTriggerVariants> {
7
7
  value?: string;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import type { ImageEditorAspectRatio, ImageEditorCrop, ImageEditorHotspot } from "./types.js";
3
+ interface AspectRatioPreviewProps {
4
+ src: string;
5
+ imageWidth: number;
6
+ imageHeight: number;
7
+ crop: ImageEditorCrop | undefined;
8
+ hotspot: ImageEditorHotspot | undefined;
9
+ aspectRatio: ImageEditorAspectRatio;
10
+ }
11
+ /**
12
+ * A single live preview showing how the current crop + hotspot renders at one
13
+ * target aspect ratio. Uses the shared preview geometry so it matches the site.
14
+ */
15
+ export declare const AspectRatioPreview: ({ src, imageWidth, imageHeight, crop, hotspot, aspectRatio }: AspectRatioPreviewProps) => React.JSX.Element;
16
+ export {};
@@ -0,0 +1,26 @@
1
+ import react from "react";
2
+ import { getPreviewStyles } from "./geometry.js";
3
+ const PREVIEW_HEIGHT = 120;
4
+ const AspectRatioPreview = ({ src, imageWidth, imageHeight, crop, hotspot, aspectRatio })=>{
5
+ const styles = getPreviewStyles(imageWidth, imageHeight, crop, hotspot, aspectRatio.ratio);
6
+ const width = Math.round(PREVIEW_HEIGHT * aspectRatio.ratio);
7
+ return /*#__PURE__*/ react.createElement("div", {
8
+ className: "flex flex-col items-center gap-xs"
9
+ }, /*#__PURE__*/ react.createElement("div", {
10
+ className: "relative overflow-hidden rounded-sm border border-neutral-dimmed bg-neutral-light",
11
+ style: {
12
+ width: `${width}px`,
13
+ height: `${PREVIEW_HEIGHT}px`
14
+ }
15
+ }, /*#__PURE__*/ react.createElement("img", {
16
+ src: src,
17
+ alt: "",
18
+ style: styles.image,
19
+ draggable: false
20
+ })), /*#__PURE__*/ react.createElement("span", {
21
+ className: "text-sm text-neutral-strong"
22
+ }, aspectRatio.label));
23
+ };
24
+ export { AspectRatioPreview };
25
+
26
+ //# sourceMappingURL=AspectRatioPreview.js.map