@webiny/admin-ui 0.0.0-unstable.7be00a75a9 → 0.0.0-unstable.7c2def32a7

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 (595) hide show
  1. package/Accordion/Accordion.d.ts +7 -6
  2. package/Accordion/Accordion.stories.d.ts +1 -1
  3. package/Accordion/Accordion.stories.js.map +1 -1
  4. package/Accordion/components/AccordionContent.js +4 -1
  5. package/Accordion/components/AccordionContent.js.map +1 -1
  6. package/Accordion/components/AccordionItem.d.ts +8 -6
  7. package/Accordion/components/AccordionItem.js.map +1 -1
  8. package/Accordion/components/AccordionItemAction.d.ts +7 -6
  9. package/Accordion/components/AccordionItemDragHandle.d.ts +2 -1
  10. package/Accordion/components/AccordionItemDragHandle.js +2 -1
  11. package/Accordion/components/AccordionItemDragHandle.js.map +1 -1
  12. package/Accordion/components/AccordionItemIcon.d.ts +7 -6
  13. package/Accordion/components/AccordionItemSeparator.d.ts +7 -6
  14. package/Accordion/components/AccordionTrigger.js +4 -2
  15. package/Accordion/components/AccordionTrigger.js.map +1 -1
  16. package/Alert/Alert.d.ts +21 -19
  17. package/Alert/Alert.stories.d.ts +1 -1
  18. package/Alert/Alert.stories.js.map +1 -1
  19. package/AutoComplete/AutoComplete.d.ts +7 -6
  20. package/AutoComplete/AutoComplete.stories.d.ts +1 -1
  21. package/AutoComplete/AutoComplete.stories.js.map +1 -1
  22. package/AutoComplete/primitives/AutoCompletePrimitive.d.ts +13 -6
  23. package/AutoComplete/primitives/AutoCompletePrimitive.js +1 -0
  24. package/AutoComplete/primitives/AutoCompletePrimitive.js.map +1 -1
  25. package/AutoComplete/primitives/AutoCompletePrimitive.stories.d.ts +1 -1
  26. package/AutoComplete/primitives/AutoCompletePrimitive.stories.js.map +1 -1
  27. package/Avatar/Avatar.d.ts +9 -8
  28. package/Avatar/Avatar.stories.d.ts +1 -1
  29. package/Avatar/Avatar.stories.js.map +1 -1
  30. package/Avatar/components/AvatarFallback.d.ts +7 -6
  31. package/Avatar/components/AvatarImage.d.ts +7 -6
  32. package/BetaBadge/BetaBadge.d.ts +6 -0
  33. package/BetaBadge/BetaBadge.js +7 -0
  34. package/BetaBadge/BetaBadge.js.map +1 -0
  35. package/Breadcrumbs/Breadcrumbs.d.ts +54 -0
  36. package/Breadcrumbs/Breadcrumbs.js +66 -0
  37. package/Breadcrumbs/Breadcrumbs.js.map +1 -0
  38. package/Breadcrumbs/Breadcrumbs.stories.d.ts +9 -0
  39. package/Breadcrumbs/Breadcrumbs.stories.js +71 -0
  40. package/Breadcrumbs/Breadcrumbs.stories.js.map +1 -0
  41. package/Breadcrumbs/index.d.ts +1 -0
  42. package/Breadcrumbs/index.js +1 -0
  43. package/Button/Button.d.ts +10 -9
  44. package/Button/Button.js +7 -0
  45. package/Button/Button.js.map +1 -1
  46. package/Button/Button.mdx +13 -0
  47. package/Button/Button.stories.d.ts +2 -1
  48. package/Button/Button.stories.js +9 -2
  49. package/Button/Button.stories.js.map +1 -1
  50. package/Button/CopyButton.d.ts +7 -6
  51. package/Button/IconButton.d.ts +10 -9
  52. package/Button/IconButton.stories.d.ts +1 -1
  53. package/Button/IconButton.stories.js.map +1 -1
  54. package/Calendar/Calendar.d.ts +7 -6
  55. package/Calendar/calendarClassNames.js +1 -1
  56. package/Calendar/calendarClassNames.js.map +1 -1
  57. package/Card/Card.d.ts +8 -22
  58. package/Card/Card.stories.d.ts +1 -1
  59. package/Card/Card.stories.js.map +1 -1
  60. package/Card/components/CancelAction.d.ts +8 -6
  61. package/Card/components/CardContent.d.ts +6 -6
  62. package/Card/components/CardTitle.d.ts +2 -2
  63. package/Card/components/ConfirmAction.d.ts +8 -6
  64. package/Card/components/Icon.d.ts +7 -6
  65. package/Checkbox/Checkbox.d.ts +7 -6
  66. package/Checkbox/Checkbox.stories.d.ts +1 -1
  67. package/Checkbox/Checkbox.stories.js.map +1 -1
  68. package/Checkbox/primitives/CheckboxPrimitive.d.ts +17 -12
  69. package/Checkbox/primitives/CheckboxPrimitive.stories.d.ts +1 -1
  70. package/Checkbox/primitives/CheckboxPrimitive.stories.js.map +1 -1
  71. package/CheckboxGroup/CheckboxGroup.d.ts +7 -6
  72. package/CheckboxGroup/CheckboxGroup.stories.d.ts +1 -1
  73. package/CheckboxGroup/CheckboxGroup.stories.js.map +1 -1
  74. package/CheckboxGroup/primitives/CheckboxGroupPrimitive.d.ts +20 -12
  75. package/CheckboxGroup/primitives/CheckboxGroupPrimitive.stories.d.ts +1 -1
  76. package/CheckboxGroup/primitives/CheckboxGroupPrimitive.stories.js.map +1 -1
  77. package/CodeEditor/CodeEditor.d.ts +7 -6
  78. package/CodeEditor/CodeEditor.stories.d.ts +1 -1
  79. package/CodeEditor/CodeEditor.stories.js.map +1 -1
  80. package/CodeEditor/CodeEditorPrimitive.d.ts +7 -6
  81. package/CodeEditor/CodeEditorPrimitive.js +3 -1
  82. package/CodeEditor/CodeEditorPrimitive.js.map +1 -1
  83. package/CodeEditor/CodeEditorPrimitive.stories.d.ts +1 -1
  84. package/CodeEditor/CodeEditorPrimitive.stories.js.map +1 -1
  85. package/ColorPicker/ColorPicker.d.ts +7 -6
  86. package/ColorPicker/ColorPicker.stories.d.ts +1 -1
  87. package/ColorPicker/ColorPicker.stories.js.map +1 -1
  88. package/ColorPicker/primitives/ColorPickerPrimitive.d.ts +7 -6
  89. package/ColorPicker/primitives/ColorPickerPrimitive.stories.d.ts +1 -1
  90. package/ColorPicker/primitives/ColorPickerPrimitive.stories.js.map +1 -1
  91. package/Command/Command.d.ts +10 -8
  92. package/Command/components/List.d.ts +1 -1
  93. package/Command/components/List.js +9 -5
  94. package/Command/components/List.js.map +1 -1
  95. package/DataList/DataListModal.d.ts +6 -3
  96. package/DataTable/DataTable.d.ts +23 -12
  97. package/DataTable/DataTable.js +18 -7
  98. package/DataTable/DataTable.js.map +1 -1
  99. package/DataTable/DataTable.stories.d.ts +1 -1
  100. package/DataTable/DataTable.stories.js.map +1 -1
  101. package/DataTable/components/ColumnsVisibility.d.ts +5 -4
  102. package/DataTable/components/ColumnsVisibility.js +7 -3
  103. package/DataTable/components/ColumnsVisibility.js.map +1 -1
  104. package/DatePicker/DatePicker.d.ts +11 -7
  105. package/DatePicker/DatePicker.js +10 -2
  106. package/DatePicker/DatePicker.js.map +1 -1
  107. package/DatePicker/DatePicker.stories.d.ts +11 -1
  108. package/DatePicker/DatePicker.stories.js +44 -1
  109. package/DatePicker/DatePicker.stories.js.map +1 -1
  110. package/DatePicker/primitives/BirthdayPicker.d.ts +13 -0
  111. package/DatePicker/primitives/BirthdayPicker.js +355 -0
  112. package/DatePicker/primitives/BirthdayPicker.js.map +1 -0
  113. package/DatePicker/primitives/BirthdayPickerCell.d.ts +14 -0
  114. package/DatePicker/primitives/BirthdayPickerCell.js +19 -0
  115. package/DatePicker/primitives/BirthdayPickerCell.js.map +1 -0
  116. package/DatePicker/primitives/BirthdayPickerSegments.d.ts +9 -0
  117. package/DatePicker/primitives/BirthdayPickerSegments.js +43 -0
  118. package/DatePicker/primitives/BirthdayPickerSegments.js.map +1 -0
  119. package/DatePicker/primitives/DateOnlyPicker.js +2 -2
  120. package/DatePicker/primitives/DateOnlyPicker.js.map +1 -1
  121. package/DatePicker/primitives/DatePickerPrimitive.d.ts +7 -6
  122. package/DatePicker/primitives/DatePickerPrimitive.js +3 -0
  123. package/DatePicker/primitives/DatePickerPrimitive.js.map +1 -1
  124. package/DatePicker/primitives/DateRangePicker.js +3 -3
  125. package/DatePicker/primitives/DateRangePicker.js.map +1 -1
  126. package/DatePicker/primitives/DateTimePicker.d.ts +1 -1
  127. package/DatePicker/primitives/DateTimePicker.js +26 -18
  128. package/DatePicker/primitives/DateTimePicker.js.map +1 -1
  129. package/DatePicker/primitives/MultipleDatesPicker.js +3 -3
  130. package/DatePicker/primitives/MultipleDatesPicker.js.map +1 -1
  131. package/DatePicker/primitives/components/DatePickerTrigger.js +2 -2
  132. package/DatePicker/primitives/components/DatePickerTrigger.js.map +1 -1
  133. package/DatePicker/utils/birthdayHelpers.d.ts +77 -0
  134. package/DatePicker/utils/birthdayHelpers.js +145 -0
  135. package/DatePicker/utils/birthdayHelpers.js.map +1 -0
  136. package/DatePicker/utils/birthdayHelpers.test.d.ts +1 -0
  137. package/DatePicker/utils/birthdayHelpers.test.js +394 -0
  138. package/DatePicker/utils/birthdayHelpers.test.js.map +1 -0
  139. package/DatePicker/utils/dateHelpers.d.ts +6 -1
  140. package/DatePicker/utils/dateHelpers.js +13 -5
  141. package/DatePicker/utils/dateHelpers.js.map +1 -1
  142. package/DatePicker/utils/dateHelpers.test.d.ts +1 -0
  143. package/DatePicker/utils/dateHelpers.test.js +32 -0
  144. package/DatePicker/utils/dateHelpers.test.js.map +1 -0
  145. package/DatePicker/utils/index.d.ts +1 -0
  146. package/DatePicker/utils/index.js +1 -0
  147. package/DatePicker/utils/timezoneHelpers.d.ts +3 -0
  148. package/DatePicker/utils/timezoneHelpers.js +32 -0
  149. package/DatePicker/utils/timezoneHelpers.js.map +1 -0
  150. package/DatePicker/utils/types.d.ts +15 -2
  151. package/Dialog/Dialog.d.ts +8 -22
  152. package/Dialog/Dialog.stories.d.ts +1 -1
  153. package/Dialog/Dialog.stories.js.map +1 -1
  154. package/Dialog/components/CancelAction.d.ts +8 -6
  155. package/Dialog/components/ConfirmAction.d.ts +8 -6
  156. package/Dialog/components/DialogContent.d.ts +1 -1
  157. package/Dialog/components/DialogFooter.d.ts +1 -1
  158. package/Dialog/components/DialogTitle.d.ts +1 -1
  159. package/Dialog/components/Icon.d.ts +7 -6
  160. package/DragCursor/DragCursor.d.ts +7 -0
  161. package/DragCursor/DragCursor.js +21 -0
  162. package/DragCursor/DragCursor.js.map +1 -0
  163. package/DragCursor/DragCursor.stories.d.ts +10 -0
  164. package/DragCursor/DragCursor.stories.js +97 -0
  165. package/DragCursor/DragCursor.stories.js.map +1 -0
  166. package/DragCursor/index.d.ts +1 -0
  167. package/DragCursor/index.js +1 -0
  168. package/Drawer/Drawer.d.ts +18 -28
  169. package/Drawer/Drawer.js +2 -1
  170. package/Drawer/Drawer.js.map +1 -1
  171. package/Drawer/Drawer.stories.d.ts +2 -1
  172. package/Drawer/Drawer.stories.js +21 -2
  173. package/Drawer/Drawer.stories.js.map +1 -1
  174. package/Drawer/components/CancelButton.d.ts +8 -6
  175. package/Drawer/components/ConfirmButton.d.ts +8 -6
  176. package/Drawer/components/DrawerContent.d.ts +1 -1
  177. package/Drawer/components/DrawerHeader.d.ts +2 -2
  178. package/Drawer/components/DrawerHeader.js +11 -8
  179. package/Drawer/components/DrawerHeader.js.map +1 -1
  180. package/Drawer/components/Icon.d.ts +7 -6
  181. package/Drawer/components/Icon.js +3 -4
  182. package/Drawer/components/Icon.js.map +1 -1
  183. package/DropdownMenu/DropdownMenu.stories.d.ts +1 -1
  184. package/DropdownMenu/DropdownMenu.stories.js.map +1 -1
  185. package/DropdownMenu/components/DropdownMenuItem.d.ts +8 -2
  186. package/DropdownMenu/components/DropdownMenuItem.js +11 -3
  187. package/DropdownMenu/components/DropdownMenuItem.js.map +1 -1
  188. package/DropdownMenu/components/DropdownMenuLink.d.ts +9 -8
  189. package/DropdownMenu/components/DropdownMenuSeparator.d.ts +7 -6
  190. package/EditableTitle/EditableTitle.d.ts +67 -0
  191. package/EditableTitle/EditableTitle.js +73 -0
  192. package/EditableTitle/EditableTitle.js.map +1 -0
  193. package/EditableTitle/index.d.ts +1 -0
  194. package/EditableTitle/index.js +1 -0
  195. package/EmptyState/EmptyState.d.ts +43 -0
  196. package/EmptyState/EmptyState.js +93 -0
  197. package/EmptyState/EmptyState.js.map +1 -0
  198. package/EmptyState/EmptyState.stories.d.ts +13 -0
  199. package/EmptyState/EmptyState.stories.js +136 -0
  200. package/EmptyState/EmptyState.stories.js.map +1 -0
  201. package/EmptyState/illustrations/ContentIllustration.d.ts +2 -0
  202. package/EmptyState/illustrations/ContentIllustration.js +100 -0
  203. package/EmptyState/illustrations/ContentIllustration.js.map +1 -0
  204. package/EmptyState/illustrations/LayoutIllustration.d.ts +2 -0
  205. package/EmptyState/illustrations/LayoutIllustration.js +93 -0
  206. package/EmptyState/illustrations/LayoutIllustration.js.map +1 -0
  207. package/EmptyState/illustrations/ListingIllustration.d.ts +2 -0
  208. package/EmptyState/illustrations/ListingIllustration.js +92 -0
  209. package/EmptyState/illustrations/ListingIllustration.js.map +1 -0
  210. package/EmptyState/illustrations/SelectIllustration.d.ts +2 -0
  211. package/EmptyState/illustrations/SelectIllustration.js +100 -0
  212. package/EmptyState/illustrations/SelectIllustration.js.map +1 -0
  213. package/EmptyState/illustrations/TableIllustration.d.ts +2 -0
  214. package/EmptyState/illustrations/TableIllustration.js +233 -0
  215. package/EmptyState/illustrations/TableIllustration.js.map +1 -0
  216. package/EmptyState/illustrations/UploadIllustration.d.ts +2 -0
  217. package/EmptyState/illustrations/UploadIllustration.js +77 -0
  218. package/EmptyState/illustrations/UploadIllustration.js.map +1 -0
  219. package/EmptyState/illustrations/index.d.ts +6 -0
  220. package/EmptyState/illustrations/index.js +6 -0
  221. package/EmptyState/index.d.ts +1 -0
  222. package/EmptyState/index.js +1 -0
  223. package/FilePicker/FilePicker.d.ts +19 -18
  224. package/FilePicker/FilePicker.stories.d.ts +7 -1
  225. package/FilePicker/FilePicker.stories.js +24 -1
  226. package/FilePicker/FilePicker.stories.js.map +1 -1
  227. package/FilePicker/primitives/FilePickerPrimitive.d.ts +20 -19
  228. package/FilePicker/primitives/FilePickerPrimitive.stories.d.ts +1 -1
  229. package/FilePicker/primitives/FilePickerPrimitive.stories.js.map +1 -1
  230. package/FilePicker/primitives/components/Trigger.d.ts +1 -1
  231. package/FilePicker/primitives/components/previews/ImagePreview/ImagePreview.d.ts +19 -7
  232. package/FilePicker/primitives/components/previews/ImagePreview/ImagePreview.js +15 -6
  233. package/FilePicker/primitives/components/previews/ImagePreview/ImagePreview.js.map +1 -1
  234. package/FilePicker/primitives/components/previews/ItemActions.js +1 -1
  235. package/FilePicker/primitives/components/previews/ItemActions.js.map +1 -1
  236. package/FilePicker/primitives/components/previews/ItemDescription.js +1 -1
  237. package/FilePicker/primitives/components/previews/ItemDescription.js.map +1 -1
  238. package/FilePicker/primitives/components/previews/RichItemPreview/FileType.d.ts +5 -0
  239. package/FilePicker/primitives/components/previews/RichItemPreview/FileType.js +45 -0
  240. package/FilePicker/primitives/components/previews/RichItemPreview/FileType.js.map +1 -0
  241. package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.d.ts +5 -0
  242. package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.js +14 -0
  243. package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.js.map +1 -0
  244. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.d.ts +12 -6
  245. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js +54 -12
  246. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js.map +1 -1
  247. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.d.ts +11 -1
  248. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js +8 -61
  249. package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js.map +1 -1
  250. package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.d.ts +11 -0
  251. package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js +24 -0
  252. package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js.map +1 -0
  253. package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.d.ts +10 -0
  254. package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.js +46 -0
  255. package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.js.map +1 -0
  256. package/FilePicker/primitives/components/previews/TextOnlyPreview/TextOnlyPreview.d.ts +7 -6
  257. package/FilePicker/primitives/components/previews/TruncatedFileName.d.ts +7 -0
  258. package/FilePicker/primitives/components/previews/TruncatedFileName.js +20 -0
  259. package/FilePicker/primitives/components/previews/TruncatedFileName.js.map +1 -0
  260. package/FilePicker/primitives/components/previews/fileName.d.ts +4 -0
  261. package/FilePicker/primitives/components/previews/fileName.js +26 -0
  262. package/FilePicker/primitives/components/previews/fileName.js.map +1 -0
  263. package/FilePicker/primitives/components/previews/index.d.ts +1 -0
  264. package/FilePicker/primitives/components/previews/index.js +1 -0
  265. package/FilePicker/primitives/components/previews/variants.d.ts +1 -1
  266. package/FillViewport/FillViewport.d.ts +63 -0
  267. package/FillViewport/FillViewport.js +67 -0
  268. package/FillViewport/FillViewport.js.map +1 -0
  269. package/FillViewport/index.d.ts +1 -0
  270. package/FillViewport/index.js +1 -0
  271. package/FormComponent/Description.d.ts +7 -6
  272. package/FormComponent/ErrorMessage.d.ts +7 -6
  273. package/FormComponent/Label.d.ts +7 -6
  274. package/FormComponent/Note.d.ts +7 -6
  275. package/Grid/Grid.d.ts +25 -23
  276. package/Grid/Grid.js.map +1 -1
  277. package/Grid/Grid.stories.d.ts +1 -1
  278. package/Grid/Grid.stories.js.map +1 -1
  279. package/HeaderBar/HeaderBar.d.ts +7 -6
  280. package/HeaderBar/HeaderBar.stories.d.ts +1 -1
  281. package/HeaderBar/HeaderBar.stories.js.map +1 -1
  282. package/Heading/Heading.d.ts +8 -7
  283. package/Heading/Heading.stories.d.ts +1 -1
  284. package/Heading/Heading.stories.js.map +1 -1
  285. package/Icon/Icon.d.ts +9 -8
  286. package/Icon/Icon.stories.d.ts +1 -1
  287. package/Icon/Icon.stories.js.map +1 -1
  288. package/IconPicker/IconPicker.d.ts +7 -6
  289. package/IconPicker/IconPicker.stories.d.ts +1 -1
  290. package/IconPicker/IconPicker.stories.js.map +1 -1
  291. package/IconPicker/primitives/IconPickerPrimitive.d.ts +1 -1
  292. package/IconPicker/primitives/IconPickerPrimitive.js +1 -2
  293. package/IconPicker/primitives/IconPickerPrimitive.js.map +1 -1
  294. package/IconPicker/primitives/IconPickerPrimitive.stories.d.ts +1 -1
  295. package/IconPicker/primitives/IconPickerPrimitive.stories.js.map +1 -1
  296. package/IconPicker/primitives/components/IconPickerTrigger.d.ts +1 -1
  297. package/ImageEditor/AspectRatioPreview.d.ts +16 -0
  298. package/ImageEditor/AspectRatioPreview.js +26 -0
  299. package/ImageEditor/AspectRatioPreview.js.map +1 -0
  300. package/ImageEditor/CropHotspotEditor.d.ts +22 -0
  301. package/ImageEditor/CropHotspotEditor.js +402 -0
  302. package/ImageEditor/CropHotspotEditor.js.map +1 -0
  303. package/ImageEditor/ImageEditor.d.ts +18 -0
  304. package/ImageEditor/ImageEditor.js +151 -0
  305. package/ImageEditor/ImageEditor.js.map +1 -0
  306. package/ImageEditor/ImageEditor.stories.d.ts +6 -0
  307. package/ImageEditor/ImageEditor.stories.js +42 -0
  308. package/ImageEditor/ImageEditor.stories.js.map +1 -0
  309. package/ImageEditor/MetaFields.d.ts +12 -0
  310. package/ImageEditor/MetaFields.js +20 -0
  311. package/ImageEditor/MetaFields.js.map +1 -0
  312. package/ImageEditor/SectionLabel.d.ts +8 -0
  313. package/ImageEditor/SectionLabel.js +7 -0
  314. package/ImageEditor/SectionLabel.js.map +1 -0
  315. package/ImageEditor/geometry.d.ts +46 -0
  316. package/ImageEditor/geometry.js +126 -0
  317. package/ImageEditor/geometry.js.map +1 -0
  318. package/ImageEditor/index.d.ts +3 -0
  319. package/ImageEditor/index.js +3 -0
  320. package/ImageEditor/types.d.ts +52 -0
  321. package/ImageEditor/types.js +35 -0
  322. package/ImageEditor/types.js.map +1 -0
  323. package/Input/Input.d.ts +7 -6
  324. package/Input/Input.stories.d.ts +1 -1
  325. package/Input/Input.stories.js.map +1 -1
  326. package/Input/InputPrimitive.d.ts +9 -8
  327. package/Input/InputPrimitive.stories.d.ts +1 -1
  328. package/Input/InputPrimitive.stories.js.map +1 -1
  329. package/Label/Label.d.ts +8 -7
  330. package/Label/Label.stories.d.ts +1 -1
  331. package/Label/Label.stories.js.map +1 -1
  332. package/Label/components/LabelValue.d.ts +1 -1
  333. package/Link/Link.d.ts +3 -3
  334. package/Link/Link.js +1 -1
  335. package/Link/Link.js.map +1 -1
  336. package/Link/Link.stories.d.ts +1 -1
  337. package/Link/Link.stories.js.map +1 -1
  338. package/List/List.d.ts +8 -7
  339. package/List/List.stories.d.ts +1 -1
  340. package/List/List.stories.js.map +1 -1
  341. package/List/components/ListItem.d.ts +7 -6
  342. package/List/components/ListItemAction.d.ts +7 -6
  343. package/List/components/ListItemHandle.d.ts +7 -6
  344. package/List/components/ListItemIcon.d.ts +7 -6
  345. package/List/components/ListItemSeparator.d.ts +7 -6
  346. package/Loader/Loader.d.ts +9 -8
  347. package/Loader/Loader.stories.d.ts +1 -1
  348. package/Loader/Loader.stories.js.map +1 -1
  349. package/Loader/OverlayLoader.d.ts +7 -6
  350. package/Loader/OverlayLoader.stories.d.ts +1 -1
  351. package/Loader/OverlayLoader.stories.js.map +1 -1
  352. package/Markdown/Markdown.d.ts +47 -0
  353. package/Markdown/Markdown.js +17 -0
  354. package/Markdown/Markdown.js.map +1 -0
  355. package/Markdown/index.d.ts +1 -0
  356. package/Markdown/index.js +1 -0
  357. package/MultiAutoComplete/MultiAutoComplete.d.ts +7 -6
  358. package/MultiAutoComplete/MultiAutoComplete.stories.d.ts +1 -1
  359. package/MultiAutoComplete/MultiAutoComplete.stories.js.map +1 -1
  360. package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.d.ts +13 -6
  361. package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.js +1 -0
  362. package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.js.map +1 -1
  363. package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.stories.d.ts +1 -1
  364. package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.stories.js.map +1 -1
  365. package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenterWithFreeInput.d.ts +3 -3
  366. package/MultiAutoComplete/primitives/useMultiAutoComplete.d.ts +3 -3
  367. package/MultiFilePicker/MultiFilePicker.d.ts +19 -18
  368. package/MultiFilePicker/MultiFilePicker.stories.d.ts +1 -1
  369. package/MultiFilePicker/MultiFilePicker.stories.js.map +1 -1
  370. package/MultiFilePicker/primitives/MultiFilePickerPrimitive.d.ts +19 -18
  371. package/MultiFilePicker/primitives/MultiFilePickerPrimitive.stories.d.ts +1 -1
  372. package/MultiFilePicker/primitives/MultiFilePickerPrimitive.stories.js.map +1 -1
  373. package/MultiSelect/MultiSelect.d.ts +7 -6
  374. package/MultiSelect/MultiSelect.stories.d.ts +1 -1
  375. package/MultiSelect/MultiSelect.stories.js.map +1 -1
  376. package/MultiSelect/primitives/MultiSelectPrimitive.d.ts +10 -6
  377. package/MultiSelect/primitives/MultiSelectPrimitive.js +12 -5
  378. package/MultiSelect/primitives/MultiSelectPrimitive.js.map +1 -1
  379. package/Popover/Popover.d.ts +7 -6
  380. package/Popover/Popover.stories.d.ts +8 -1
  381. package/Popover/Popover.stories.js +24 -1
  382. package/Popover/Popover.stories.js.map +1 -1
  383. package/Popover/primitives/PopoverPrimitive.d.ts +7 -7
  384. package/Popover/primitives/components/PopoverContent.js +6 -1
  385. package/Popover/primitives/components/PopoverContent.js.map +1 -1
  386. package/ProgressBar/ProgressBar.d.ts +7 -6
  387. package/ProgressBar/ProgressBar.stories.d.ts +1 -1
  388. package/ProgressBar/ProgressBar.stories.js.map +1 -1
  389. package/RadioGroup/RadioGroup.d.ts +7 -6
  390. package/RadioGroup/RadioGroup.stories.d.ts +1 -1
  391. package/RadioGroup/RadioGroup.stories.js.map +1 -1
  392. package/RadioGroup/primitives/Radio.d.ts +7 -6
  393. package/RadioGroup/primitives/RadioGroupPrimitive.d.ts +5 -1
  394. package/RadioGroup/primitives/RadioGroupPrimitive.stories.d.ts +1 -1
  395. package/RadioGroup/primitives/RadioGroupPrimitive.stories.js.map +1 -1
  396. package/RangeSlider/RangeSlider.d.ts +7 -6
  397. package/RangeSlider/RangeSlider.stories.d.ts +1 -1
  398. package/RangeSlider/RangeSlider.stories.js.map +1 -1
  399. package/RangeSlider/primitives/RangeSliderPrimitive.stories.d.ts +1 -1
  400. package/RangeSlider/primitives/RangeSliderPrimitive.stories.js.map +1 -1
  401. package/ScrollArea/ScrollArea.d.ts +16 -2
  402. package/ScrollArea/ScrollArea.js +25 -11
  403. package/ScrollArea/ScrollArea.js.map +1 -1
  404. package/ScrollArea/ScrollArea.stories.d.ts +1 -1
  405. package/ScrollArea/ScrollArea.stories.js.map +1 -1
  406. package/SegmentedControl/SegmentedControl.d.ts +11 -6
  407. package/SegmentedControl/SegmentedControl.js +6 -2
  408. package/SegmentedControl/SegmentedControl.js.map +1 -1
  409. package/SegmentedControl/SegmentedControl.stories.d.ts +5 -1
  410. package/SegmentedControl/SegmentedControl.stories.js +100 -2
  411. package/SegmentedControl/SegmentedControl.stories.js.map +1 -1
  412. package/SegmentedControl/SegmentedControlTab.d.ts +10 -0
  413. package/SegmentedControl/SegmentedControlTab.js +21 -0
  414. package/SegmentedControl/SegmentedControlTab.js.map +1 -0
  415. package/SegmentedControl/SegmentedControlTabs.d.ts +14 -0
  416. package/SegmentedControl/SegmentedControlTabs.js +71 -0
  417. package/SegmentedControl/SegmentedControlTabs.js.map +1 -0
  418. package/SegmentedControl/SegmentedControlTabsContext.d.ts +19 -0
  419. package/SegmentedControl/SegmentedControlTabsContext.js +11 -0
  420. package/SegmentedControl/SegmentedControlTabsContext.js.map +1 -0
  421. package/SegmentedControl/index.d.ts +2 -0
  422. package/SegmentedControl/index.js +2 -0
  423. package/SegmentedControl/primitives/SegmentedControlPrimitive.d.ts +6 -2
  424. package/SegmentedControl/primitives/SegmentedControlPrimitive.js +4 -3
  425. package/SegmentedControl/primitives/SegmentedControlPrimitive.js.map +1 -1
  426. package/SegmentedControl/primitives/SegmentedControlPrimitive.stories.d.ts +2 -1
  427. package/SegmentedControl/primitives/SegmentedControlPrimitive.stories.js +8 -1
  428. package/SegmentedControl/primitives/SegmentedControlPrimitive.stories.js.map +1 -1
  429. package/Select/Select.d.ts +7 -6
  430. package/Select/Select.stories.d.ts +1 -1
  431. package/Select/Select.stories.js.map +1 -1
  432. package/Select/primitives/SelectPrimitive.stories.d.ts +1 -1
  433. package/Select/primitives/SelectPrimitive.stories.js.map +1 -1
  434. package/Select/primitives/components/SelectContent.js +4 -6
  435. package/Select/primitives/components/SelectContent.js.map +1 -1
  436. package/Select/primitives/components/SelectTrigger.d.ts +2 -2
  437. package/Separator/Separator.d.ts +9 -8
  438. package/Separator/Separator.stories.d.ts +1 -1
  439. package/Separator/Separator.stories.js.map +1 -1
  440. package/Sidebar/Sidebar.d.ts +9 -6
  441. package/Sidebar/Sidebar.stories.d.ts +1 -1
  442. package/Sidebar/Sidebar.stories.js.map +1 -1
  443. package/Sidebar/components/SidebarContent.js +1 -1
  444. package/Sidebar/components/SidebarContent.js.map +1 -1
  445. package/Sidebar/components/SidebarIcon.d.ts +7 -6
  446. package/Sidebar/components/SidebarProvider.d.ts +4 -4
  447. package/Sidebar/components/SidebarRoot.js +1 -1
  448. package/Sidebar/components/SidebarRoot.js.map +1 -1
  449. package/Sidebar/components/items/SidebarMenuGroup.d.ts +9 -8
  450. package/Sidebar/components/items/SidebarMenuItem.d.ts +13 -9
  451. package/Sidebar/components/items/SidebarMenuItem.js +3 -1
  452. package/Sidebar/components/items/SidebarMenuItem.js.map +1 -1
  453. package/Sidebar/components/items/SidebarMenuItemBadge.d.ts +6 -0
  454. package/Sidebar/components/items/SidebarMenuItemBadge.js +7 -0
  455. package/Sidebar/components/items/SidebarMenuItemBadge.js.map +1 -0
  456. package/Sidebar/components/items/SidebarMenuItemIcon.d.ts +7 -6
  457. package/Sidebar/components/items/SidebarMenuLink.d.ts +12 -9
  458. package/Sidebar/components/items/SidebarMenuLink.js +3 -1
  459. package/Sidebar/components/items/SidebarMenuLink.js.map +1 -1
  460. package/Sidebar/components/items/SidebarMenuProvider.d.ts +4 -4
  461. package/Sidebar/components/items/SidebarMenuRootButton.d.ts +1 -1
  462. package/Sidebar/components/items/SidebarMenuRootButton.js +8 -3
  463. package/Sidebar/components/items/SidebarMenuRootButton.js.map +1 -1
  464. package/Sidebar/components/items/SidebarMenuRootItem.d.ts +9 -7
  465. package/Sidebar/components/items/SidebarMenuSubButton.d.ts +1 -1
  466. package/Sidebar/components/items/SidebarMenuSubButton.js +14 -6
  467. package/Sidebar/components/items/SidebarMenuSubButton.js.map +1 -1
  468. package/Sidebar/components/items/SidebarMenuSubItem.js +3 -3
  469. package/Sidebar/components/items/SidebarMenuSubItem.js.map +1 -1
  470. package/Sidebar/components/items/SidebarMenuSubItemIndentation.js +2 -1
  471. package/Sidebar/components/items/SidebarMenuSubItemIndentation.js.map +1 -1
  472. package/Skeleton/Skeleton.d.ts +9 -7
  473. package/Skeleton/Skeleton.js +10 -4
  474. package/Skeleton/Skeleton.js.map +1 -1
  475. package/Skeleton/Skeleton.stories.d.ts +3 -1
  476. package/Skeleton/Skeleton.stories.js +28 -2
  477. package/Skeleton/Skeleton.stories.js.map +1 -1
  478. package/Slider/Slider.d.ts +7 -6
  479. package/Slider/Slider.stories.d.ts +1 -1
  480. package/Slider/Slider.stories.js.map +1 -1
  481. package/Slider/primitives/SliderPrimitive.stories.d.ts +1 -1
  482. package/Slider/primitives/SliderPrimitive.stories.js.map +1 -1
  483. package/SteppedProgress/SteppedProgress.d.ts +7 -6
  484. package/SteppedProgress/SteppedProgress.stories.d.ts +1 -1
  485. package/SteppedProgress/SteppedProgress.stories.js.map +1 -1
  486. package/SteppedProgress/SteppedProgressItem.d.ts +7 -6
  487. package/Switch/Switch.d.ts +10 -9
  488. package/Switch/Switch.js +21 -7
  489. package/Switch/Switch.js.map +1 -1
  490. package/Switch/Switch.stories.d.ts +1 -1
  491. package/Switch/Switch.stories.js.map +1 -1
  492. package/Switch/domains/SwitchItemDto.d.ts +1 -1
  493. package/Switch/primitives/SwitchPrimitive.d.ts +10 -6
  494. package/Switch/primitives/SwitchPrimitive.js +4 -3
  495. package/Switch/primitives/SwitchPrimitive.js.map +1 -1
  496. package/Switch/primitives/SwitchPrimitive.stories.d.ts +1 -1
  497. package/Switch/primitives/SwitchPrimitive.stories.js.map +1 -1
  498. package/Table/Table.d.ts +12 -10
  499. package/Table/components/Direction.d.ts +1 -1
  500. package/Tabs/Tabs.d.ts +14 -7
  501. package/Tabs/Tabs.js +32 -11
  502. package/Tabs/Tabs.js.map +1 -1
  503. package/Tabs/Tabs.mdx +27 -0
  504. package/Tabs/Tabs.stories.d.ts +2 -1
  505. package/Tabs/Tabs.stories.js +19 -1
  506. package/Tabs/Tabs.stories.js.map +1 -1
  507. package/Tabs/components/Content.d.ts +1 -1
  508. package/Tabs/components/List.d.ts +2 -2
  509. package/Tabs/components/Tab.d.ts +7 -6
  510. package/Tabs/components/Trigger.d.ts +3 -2
  511. package/Tabs/components/Trigger.js +8 -3
  512. package/Tabs/components/Trigger.js.map +1 -1
  513. package/Tag/Tag.d.ts +8 -7
  514. package/Tag/Tag.stories.d.ts +1 -1
  515. package/Tag/Tag.stories.js.map +1 -1
  516. package/Tags/Tags.d.ts +7 -6
  517. package/Tags/Tags.stories.d.ts +1 -1
  518. package/Tags/Tags.stories.js.map +1 -1
  519. package/Tags/primitives/TagsPrimitive.d.ts +7 -6
  520. package/Tags/primitives/TagsPrimitive.stories.d.ts +1 -1
  521. package/Tags/primitives/TagsPrimitive.stories.js.map +1 -1
  522. package/Text/Text.d.ts +8 -7
  523. package/Text/Text.stories.d.ts +1 -1
  524. package/Text/Text.stories.js.map +1 -1
  525. package/Textarea/Textarea.d.ts +7 -6
  526. package/Textarea/Textarea.stories.d.ts +1 -1
  527. package/Textarea/Textarea.stories.js.map +1 -1
  528. package/Textarea/TextareaPrimitive.d.ts +9 -8
  529. package/Textarea/TextareaPrimitive.stories.d.ts +1 -1
  530. package/Textarea/TextareaPrimitive.stories.js.map +1 -1
  531. package/TimeAgo/TimeAgo.stories.d.ts +1 -1
  532. package/TimeAgo/TimeAgo.stories.js.map +1 -1
  533. package/TimeAgo/getElapsedSeconds.js +3 -3
  534. package/TimeAgo/getElapsedSeconds.js.map +1 -1
  535. package/Toast/Toast.d.ts +7 -6
  536. package/Toast/components/ToastActions.d.ts +7 -6
  537. package/Toast/components/ToastDescription.d.ts +7 -6
  538. package/Toast/components/ToastTitle.d.ts +7 -6
  539. package/Toast/useToast.stories.d.ts +1 -1
  540. package/Toast/useToast.stories.js.map +1 -1
  541. package/Toggle/Toggle.d.ts +7 -6
  542. package/Toggle/Toggle.stories.d.ts +1 -1
  543. package/Toggle/Toggle.stories.js.map +1 -1
  544. package/Toggle/primitives/TogglePrimitive.d.ts +13 -9
  545. package/Toggle/primitives/TogglePrimitive.stories.d.ts +1 -1
  546. package/Toggle/primitives/TogglePrimitive.stories.js.map +1 -1
  547. package/ToggleGroup/ToggleGroup.d.ts +7 -6
  548. package/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
  549. package/ToggleGroup/ToggleGroup.stories.js.map +1 -1
  550. package/ToggleGroup/domains/ToggleGroupItem.d.ts +3 -0
  551. package/ToggleGroup/domains/ToggleGroupItem.js +6 -1
  552. package/ToggleGroup/domains/ToggleGroupItem.js.map +1 -1
  553. package/ToggleGroup/domains/ToggleGroupItemFormatted.d.ts +1 -0
  554. package/ToggleGroup/domains/ToggleGroupItemFormatter.js +2 -1
  555. package/ToggleGroup/domains/ToggleGroupItemFormatter.js.map +1 -1
  556. package/ToggleGroup/domains/ToggleGroupItemParams.d.ts +1 -0
  557. package/ToggleGroup/primitives/ToggleGroupPrimitive.d.ts +13 -9
  558. package/ToggleGroup/primitives/ToggleGroupPrimitive.js +12 -3
  559. package/ToggleGroup/primitives/ToggleGroupPrimitive.js.map +1 -1
  560. package/ToggleGroup/primitives/ToggleGroupPrimitive.stories.d.ts +1 -1
  561. package/ToggleGroup/primitives/ToggleGroupPrimitive.stories.js.map +1 -1
  562. package/Tooltip/Tooltip.d.ts +7 -6
  563. package/Tooltip/Tooltip.stories.d.ts +1 -1
  564. package/Tooltip/Tooltip.stories.js.map +1 -1
  565. package/Tree/Tree.d.ts +7 -6
  566. package/Tree/Tree.stories.d.ts +1 -1
  567. package/Tree/Tree.stories.js.map +1 -1
  568. package/Tree/components/Item.d.ts +7 -6
  569. package/Tree/components/ItemCollapseTrigger.d.ts +7 -6
  570. package/Tree/components/ItemContent.d.ts +8 -6
  571. package/Tree/components/ItemDragHandle.d.ts +7 -6
  572. package/Tree/components/ItemIcon.d.ts +7 -6
  573. package/Tree/components/ItemPlaceholder.d.ts +7 -6
  574. package/Tree/components/ItemSubIndentation.d.ts +7 -6
  575. package/Tree/useTree.js +6 -2
  576. package/Tree/useTree.js.map +1 -1
  577. package/Widget/Widget.d.ts +8 -22
  578. package/Widget/Widget.stories.d.ts +1 -1
  579. package/Widget/Widget.stories.js.map +1 -1
  580. package/Widget/components/Icon.d.ts +7 -6
  581. package/Widget/components/WidgetAction.d.ts +8 -6
  582. package/Widget/components/WidgetContent.d.ts +5 -5
  583. package/exports/admin/ui.d.ts +3 -0
  584. package/exports/admin/ui.js +3 -0
  585. package/hooks/index.d.ts +1 -0
  586. package/hooks/index.js +1 -0
  587. package/hooks/useEscapeScrollLock.d.ts +13 -0
  588. package/hooks/useEscapeScrollLock.js +21 -0
  589. package/hooks/useEscapeScrollLock.js.map +1 -0
  590. package/index.d.ts +8 -0
  591. package/index.js +8 -0
  592. package/package.json +33 -35
  593. package/theme.css +52 -0
  594. package/utils.js +53 -34
  595. package/utils.js.map +1 -1
@@ -4,6 +4,16 @@ import type { RichItemPreviewProps } from "../../../../../FilePicker/primitives/
4
4
  type RichItemThumbnailProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & FileItemFormatted & {
5
5
  preview?: RichItemPreviewProps["preview"];
6
6
  disabled?: boolean;
7
+ /**
8
+ * `tile` is the fixed square that sits beside the file details; `banner` spans the full
9
+ * width of a stacked layout, where the panel is too narrow to afford a column for it.
10
+ */
11
+ variant?: "tile" | "banner";
12
+ /** Optional custom image renderer for the thumbnail (e.g. a cropped preview). */
13
+ renderImage?: (args: {
14
+ url: string;
15
+ name: string;
16
+ }) => React.ReactNode;
7
17
  };
8
- declare const RichItemThumbnail: ({ url, name, className, mimeType, preview, disabled }: RichItemThumbnailProps) => React.JSX.Element;
18
+ declare const RichItemThumbnail: ({ url, name, className, mimeType, preview, disabled, variant, renderImage }: RichItemThumbnailProps) => React.JSX.Element;
9
19
  export { RichItemThumbnail, type RichItemThumbnailProps };
@@ -1,70 +1,17 @@
1
1
  import react from "react";
2
- import { ReactComponent } from "@webiny/icons/image.svg";
3
- import { Icon } from "../../../../../Icon/index.js";
4
2
  import { cn } from "../../../../../utils.js";
5
- import csv from "../assets/csv.js";
6
- import doc from "../assets/doc.js";
7
- import docx from "../assets/docx.js";
8
- import file from "../assets/file.js";
9
- import pdf from "../assets/pdf.js";
10
- import ppt from "../assets/ppt.js";
11
- import pptx from "../assets/pptx.js";
12
- import txt from "../assets/txt.js";
13
- import xls from "../assets/xls.js";
14
- import xlsx from "../assets/xlsx.js";
15
- const Thumbnail = ({ url, name })=>/*#__PURE__*/ react.createElement("div", {
16
- className: "size-full bg-neutral-muted"
17
- }, /*#__PURE__*/ react.createElement("img", {
18
- src: url,
19
- alt: name,
20
- className: "size-full object-cover"
21
- }));
22
- const FileType = ({ mimeType = "", name })=>{
23
- const getMimeTypeSrc = (mimeType)=>{
24
- switch(mimeType){
25
- case "text/csv":
26
- return csv;
27
- case "application/msword":
28
- return doc;
29
- case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
30
- return docx;
31
- case "application/pdf":
32
- return pdf;
33
- case "application/vnd.ms-powerpoint":
34
- return ppt;
35
- case "application/vnd.openxmlformats-officedocument.presentationml.presentation":
36
- return pptx;
37
- case "text/plain":
38
- return txt;
39
- case "application/vnd.ms-excel":
40
- return xls;
41
- case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
42
- return xlsx;
43
- default:
44
- return file;
45
- }
46
- };
47
- return /*#__PURE__*/ react.createElement("img", {
48
- src: getMimeTypeSrc(mimeType),
49
- alt: name,
50
- className: "size-full p-sm-extra"
51
- });
52
- };
53
- const Placeholder = ({ name })=>/*#__PURE__*/ react.createElement("div", {
54
- className: "size-full flex justify-center items-center bg-transparent"
55
- }, /*#__PURE__*/ react.createElement(Icon, {
56
- icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
57
- label: name,
58
- size: "lg",
59
- color: "neutral-light"
60
- }));
61
- const RichItemThumbnail = ({ url, name, className, mimeType, preview, disabled })=>{
3
+ import { FileType } from "./FileType.js";
4
+ import { Placeholder } from "./Placeholder.js";
5
+ import { Thumbnail } from "./Thumbnail.js";
6
+ const RichItemThumbnail = ({ url, name, className, mimeType, preview, disabled, variant = "tile", renderImage })=>{
62
7
  const isImage = mimeType?.startsWith("image/");
63
8
  return /*#__PURE__*/ react.createElement("div", {
64
- className: cn("size-[56px] m-xs rounded-sm overflow-hidden relative", disabled && "[&_img]:filter [&_img]:grayscale [&_img]:opacity-50", className)
9
+ className: cn("rounded-sm overflow-hidden relative", "banner" === variant ? "w-full h-[96px]" : "size-[56px] m-xs", disabled && "[&_img]:filter [&_img]:grayscale [&_img]:opacity-50", className)
65
10
  }, "thumbnail" === preview || isImage ? /*#__PURE__*/ react.createElement(Thumbnail, {
66
11
  url: url,
67
- name: name
12
+ name: name,
13
+ fit: "banner" === variant ? "contain" : "cover",
14
+ renderImage: renderImage
68
15
  }) : "placeholder" === preview ? /*#__PURE__*/ react.createElement(Placeholder, {
69
16
  name: name
70
17
  }) : /*#__PURE__*/ react.createElement(FileType, {
@@ -1 +1 @@
1
- {"version":3,"file":"FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js","sources":["../../../../../../src/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as PlaceholderIcon } from \"@webiny/icons/image.svg\";\nimport type { FileItemFormatted } from \"~/FilePicker/index.js\";\nimport { Icon } from \"~/Icon/index.js\";\nimport { cn } from \"~/utils.js\";\nimport type { RichItemPreviewProps } from \"~/FilePicker/primitives/components/index.js\";\n\nimport csvThumb from \"../assets/csv.svg\";\nimport docThumb from \"../assets/doc.svg\";\nimport docxThumb from \"../assets/docx.svg\";\nimport fileThumb from \"../assets/file.svg\";\nimport pdfThumb from \"../assets/pdf.svg\";\nimport pptThumb from \"../assets/ppt.svg\";\nimport pptxThumb from \"../assets/pptx.svg\";\nimport txtThumb from \"../assets/txt.svg\";\nimport xlsThumb from \"../assets/xls.svg\";\nimport xlsxThumb from \"../assets/xlsx.svg\";\n\ntype RichItemThumbnailProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> &\n FileItemFormatted & {\n preview?: RichItemPreviewProps[\"preview\"];\n disabled?: boolean;\n };\n\ntype ThumbnailProps = Pick<FileItemFormatted, \"url\" | \"name\">;\n\nconst Thumbnail = ({ url, name }: ThumbnailProps) => {\n return (\n <div className={\"size-full bg-neutral-muted\"}>\n <img src={url} alt={name} className=\"size-full object-cover\" />\n </div>\n );\n};\n\ntype FileTypeProps = Pick<FileItemFormatted, \"mimeType\" | \"name\">;\n\nconst FileType = ({ mimeType = \"\", name }: FileTypeProps) => {\n const getMimeTypeSrc = (mimeType: string) => {\n switch (mimeType) {\n case \"text/csv\": // .csv\n return csvThumb;\n case \"application/msword\": // .doc\n return docThumb;\n case \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\": // .docx\n return docxThumb;\n case \"application/pdf\": // .pdf\n return pdfThumb;\n case \"application/vnd.ms-powerpoint\": // .ppt\n return pptThumb;\n case \"application/vnd.openxmlformats-officedocument.presentationml.presentation\": // .pptx\n return pptxThumb;\n case \"text/plain\": // .txt\n return txtThumb;\n case \"application/vnd.ms-excel\": // .xls\n return xlsThumb;\n case \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\": // .xlsx\n return xlsxThumb;\n default:\n return fileThumb;\n }\n };\n\n return <img src={getMimeTypeSrc(mimeType)} alt={name} className=\"size-full p-sm-extra\" />;\n};\n\ntype PlaceholderProps = Pick<FileItemFormatted, \"name\">;\n\nconst Placeholder = ({ name }: PlaceholderProps) => {\n return (\n <div className={\"size-full flex justify-center items-center bg-transparent\"}>\n <Icon icon={<PlaceholderIcon />} label={name} size={\"lg\"} color={\"neutral-light\"} />\n </div>\n );\n};\n\nconst RichItemThumbnail = ({\n url,\n name,\n className,\n mimeType,\n preview,\n disabled\n}: RichItemThumbnailProps) => {\n const isImage = mimeType?.startsWith(\"image/\");\n\n return (\n <div\n className={cn(\n \"size-[56px] m-xs rounded-sm overflow-hidden relative\",\n disabled && \"[&_img]:filter [&_img]:grayscale [&_img]:opacity-50\",\n className\n )}\n >\n {preview === \"thumbnail\" || isImage ? (\n <Thumbnail url={url} name={name} />\n ) : preview === \"placeholder\" ? (\n <Placeholder name={name} />\n ) : (\n <FileType mimeType={mimeType} name={name} />\n )}\n </div>\n );\n};\n\nexport { RichItemThumbnail, type RichItemThumbnailProps };\n"],"names":["Thumbnail","url","name","FileType","mimeType","getMimeTypeSrc","csvThumb","docThumb","docxThumb","pdfThumb","pptThumb","pptxThumb","txtThumb","xlsThumb","xlsxThumb","fileThumb","Placeholder","Icon","PlaceholderIcon","RichItemThumbnail","className","preview","disabled","isImage","cn"],"mappings":";;;;;;;;;;;;;;AA0BA,MAAMA,YAAY,CAAC,EAAEC,GAAG,EAAEC,IAAI,EAAkB,GACrC,WAAP,GACI,oBAAC;QAAI,WAAW;qBACZ,oBAAC;QAAI,KAAKD;QAAK,KAAKC;QAAM,WAAU;;AAOhD,MAAMC,WAAW,CAAC,EAAEC,WAAW,EAAE,EAAEF,IAAI,EAAiB;IACpD,MAAMG,iBAAiB,CAACD;QACpB,OAAQA;YACJ,KAAK;gBACD,OAAOE;YACX,KAAK;gBACD,OAAOC;YACX,KAAK;gBACD,OAAOC;YACX,KAAK;gBACD,OAAOC;YACX,KAAK;gBACD,OAAOC;YACX,KAAK;gBACD,OAAOC;YACX,KAAK;gBACD,OAAOC;YACX,KAAK;gBACD,OAAOC;YACX,KAAK;gBACD,OAAOC;YACX;gBACI,OAAOC;QACf;IACJ;IAEA,OAAO,WAAP,GAAO,oBAAC;QAAI,KAAKV,eAAeD;QAAW,KAAKF;QAAM,WAAU;;AACpE;AAIA,MAAMc,cAAc,CAAC,EAAEd,IAAI,EAAoB,GACpC,WAAP,GACI,oBAAC;QAAI,WAAW;qBACZ,oBAACe,MAAIA;QAAC,oBAAM,oBAACC,gBAAeA;QAAK,OAAOhB;QAAM,MAAM;QAAM,OAAO;;AAK7E,MAAMiB,oBAAoB,CAAC,EACvBlB,GAAG,EACHC,IAAI,EACJkB,SAAS,EACThB,QAAQ,EACRiB,OAAO,EACPC,QAAQ,EACa;IACrB,MAAMC,UAAUnB,UAAU,WAAW;IAErC,OAAO,WAAP,GACI,oBAAC;QACG,WAAWoB,GACP,wDACAF,YAAY,uDACZF;OAGHC,AAAY,gBAAZA,WAA2BE,UAAU,WAAVA,GACxB,oBAACvB,WAASA;QAAC,KAAKC;QAAK,MAAMC;SAC3BmB,AAAY,kBAAZA,UAA4B,WAAhB,GACZ,oBAACL,aAAWA;QAAC,MAAMd;uBAEnB,oBAACC,UAAQA;QAAC,UAAUC;QAAU,MAAMF;;AAIpD"}
1
+ {"version":3,"file":"FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js","sources":["../../../../../../src/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FileItemFormatted } from \"~/FilePicker/index.js\";\nimport { cn } from \"~/utils.js\";\nimport type { RichItemPreviewProps } from \"~/FilePicker/primitives/components/index.js\";\nimport { FileType } from \"./FileType.js\";\nimport { Placeholder } from \"./Placeholder.js\";\nimport { Thumbnail } from \"./Thumbnail.js\";\n\ntype RichItemThumbnailProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> &\n FileItemFormatted & {\n preview?: RichItemPreviewProps[\"preview\"];\n disabled?: boolean;\n /**\n * `tile` is the fixed square that sits beside the file details; `banner` spans the full\n * width of a stacked layout, where the panel is too narrow to afford a column for it.\n */\n variant?: \"tile\" | \"banner\";\n /** Optional custom image renderer for the thumbnail (e.g. a cropped preview). */\n renderImage?: (args: { url: string; name: string }) => React.ReactNode;\n };\n\nconst RichItemThumbnail = ({\n url,\n name,\n className,\n mimeType,\n preview,\n disabled,\n variant = \"tile\",\n renderImage\n}: RichItemThumbnailProps) => {\n const isImage = mimeType?.startsWith(\"image/\");\n\n return (\n <div\n className={cn(\n \"rounded-sm overflow-hidden relative\",\n variant === \"banner\" ? \"w-full h-[96px]\" : \"size-[56px] m-xs\",\n disabled && \"[&_img]:filter [&_img]:grayscale [&_img]:opacity-50\",\n className\n )}\n >\n {preview === \"thumbnail\" || isImage ? (\n <Thumbnail\n url={url}\n name={name}\n fit={variant === \"banner\" ? \"contain\" : \"cover\"}\n renderImage={renderImage}\n />\n ) : preview === \"placeholder\" ? (\n <Placeholder name={name} />\n ) : (\n <FileType mimeType={mimeType} name={name} />\n )}\n </div>\n );\n};\n\nexport { RichItemThumbnail, type RichItemThumbnailProps };\n"],"names":["RichItemThumbnail","url","name","className","mimeType","preview","disabled","variant","renderImage","isImage","cn","Thumbnail","Placeholder","FileType"],"mappings":";;;;;AAqBA,MAAMA,oBAAoB,CAAC,EACvBC,GAAG,EACHC,IAAI,EACJC,SAAS,EACTC,QAAQ,EACRC,OAAO,EACPC,QAAQ,EACRC,UAAU,MAAM,EAChBC,WAAW,EACU;IACrB,MAAMC,UAAUL,UAAU,WAAW;IAErC,OAAO,WAAP,GACI,oBAAC;QACG,WAAWM,GACP,uCACAH,AAAY,aAAZA,UAAuB,oBAAoB,oBAC3CD,YAAY,uDACZH;OAGHE,AAAY,gBAAZA,WAA2BI,UAAU,WAAVA,GACxB,oBAACE,WAASA;QACN,KAAKV;QACL,MAAMC;QACN,KAAKK,AAAY,aAAZA,UAAuB,YAAY;QACxC,aAAaC;SAEjBH,AAAY,kBAAZA,UAA4B,WAAhB,GACZ,oBAACO,aAAWA;QAAC,MAAMV;uBAEnB,oBAACW,UAAQA;QAAC,UAAUT;QAAU,MAAMF;;AAIpD"}
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import type { FileItemFormatted } from "../../../../../FilePicker/index.js";
3
+ type ThumbnailProps = Pick<FileItemFormatted, "url" | "name"> & {
4
+ fit: "cover" | "contain";
5
+ renderImage?: (args: {
6
+ url: string;
7
+ name: string;
8
+ }) => React.ReactNode;
9
+ };
10
+ declare const Thumbnail: ({ url, name, fit, renderImage }: ThumbnailProps) => React.JSX.Element;
11
+ export { Thumbnail, type ThumbnailProps };
@@ -0,0 +1,24 @@
1
+ import react from "react";
2
+ const Thumbnail = ({ url, name, fit, renderImage })=>{
3
+ const customImage = "function" == typeof renderImage ? renderImage({
4
+ url,
5
+ name
6
+ }) : false;
7
+ if ("contain" === fit) return /*#__PURE__*/ react.createElement("div", {
8
+ className: "size-full p-xs bg-neutral-muted flex items-center justify-center"
9
+ }, customImage || /*#__PURE__*/ react.createElement("img", {
10
+ src: url,
11
+ alt: name,
12
+ className: "max-h-full max-w-full rounded-xs"
13
+ }));
14
+ return /*#__PURE__*/ react.createElement("div", {
15
+ className: "size-full bg-neutral-muted"
16
+ }, customImage || /*#__PURE__*/ react.createElement("img", {
17
+ src: url,
18
+ alt: name,
19
+ className: "size-full object-cover"
20
+ }));
21
+ };
22
+ export { Thumbnail };
23
+
24
+ //# sourceMappingURL=Thumbnail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js","sources":["../../../../../../src/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FileItemFormatted } from \"~/FilePicker/index.js\";\n\ntype ThumbnailProps = Pick<FileItemFormatted, \"url\" | \"name\"> & {\n fit: \"cover\" | \"contain\";\n renderImage?: (args: { url: string; name: string }) => React.ReactNode;\n};\n\nconst Thumbnail = ({ url, name, fit, renderImage }: ThumbnailProps) => {\n const customImage = typeof renderImage === \"function\" ? renderImage({ url, name }) : false;\n\n if (fit === \"contain\") {\n return (\n <div className={\"size-full p-xs bg-neutral-muted flex items-center justify-center\"}>\n {customImage || (\n <img src={url} alt={name} className={\"max-h-full max-w-full rounded-xs\"} />\n )}\n </div>\n );\n }\n\n return (\n <div className={\"size-full bg-neutral-muted\"}>\n {customImage || <img src={url} alt={name} className={\"size-full object-cover\"} />}\n </div>\n );\n};\n\nexport { Thumbnail, type ThumbnailProps };\n"],"names":["Thumbnail","url","name","fit","renderImage","customImage"],"mappings":";AAQA,MAAMA,YAAY,CAAC,EAAEC,GAAG,EAAEC,IAAI,EAAEC,GAAG,EAAEC,WAAW,EAAkB;IAC9D,MAAMC,cAAc,AAAuB,cAAvB,OAAOD,cAA6BA,YAAY;QAAEH;QAAKC;IAAK,KAAK;IAErF,IAAIC,AAAQ,cAARA,KACA,OAAO,WAAP,GACI,oBAAC;QAAI,WAAW;OACXE,eAAe,WAAfA,GACG,oBAAC;QAAI,KAAKJ;QAAK,KAAKC;QAAM,WAAW;;IAMrD,OAAO,WAAP,GACI,oBAAC;QAAI,WAAW;OACXG,eAAe,WAAfA,GAAe,oBAAC;QAAI,KAAKJ;QAAK,KAAKC;QAAM,WAAW;;AAGjE"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ interface ThumbnailActionsProps {
3
+ onRemoveItem?: () => void;
4
+ onEditItem?: () => void;
5
+ onReplaceItem?: () => void;
6
+ disabled?: boolean;
7
+ className?: string;
8
+ }
9
+ declare const ThumbnailActions: ({ className, disabled, onEditItem, onRemoveItem, onReplaceItem }: ThumbnailActionsProps) => React.JSX.Element;
10
+ export { ThumbnailActions, type ThumbnailActionsProps };
@@ -0,0 +1,46 @@
1
+ import react, { useCallback } from "react";
2
+ import { ReactComponent } from "@webiny/icons/file_upload.svg";
3
+ import { ReactComponent as edit_svg_ReactComponent } from "@webiny/icons/edit.svg";
4
+ import { ReactComponent as delete_svg_ReactComponent } from "@webiny/icons/delete.svg";
5
+ import { IconButton } from "../../../../../Button/index.js";
6
+ import { Tooltip } from "../../../../../Tooltip/index.js";
7
+ import { cn } from "../../../../../utils.js";
8
+ const Action = ({ icon, label, onAction, disabled })=>{
9
+ const onClick = useCallback((event)=>{
10
+ event.stopPropagation();
11
+ onAction();
12
+ }, [
13
+ onAction
14
+ ]);
15
+ return /*#__PURE__*/ react.createElement(Tooltip, {
16
+ content: label,
17
+ trigger: /*#__PURE__*/ react.createElement(IconButton, {
18
+ variant: "tertiary",
19
+ size: "sm",
20
+ icon: icon,
21
+ onClick: onClick,
22
+ disabled: disabled
23
+ })
24
+ });
25
+ };
26
+ const ThumbnailActions = ({ className, disabled, onEditItem, onRemoveItem, onReplaceItem })=>/*#__PURE__*/ react.createElement("div", {
27
+ className: cn("invisible group-hover:visible", "flex items-center gap-xxs", "absolute top-xs-plus right-xs-plus", className)
28
+ }, onReplaceItem && /*#__PURE__*/ react.createElement(Action, {
29
+ icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
30
+ label: "Replace",
31
+ onAction: onReplaceItem,
32
+ disabled: disabled
33
+ }), onEditItem && /*#__PURE__*/ react.createElement(Action, {
34
+ icon: /*#__PURE__*/ react.createElement(edit_svg_ReactComponent, null),
35
+ label: "Edit",
36
+ onAction: onEditItem,
37
+ disabled: disabled
38
+ }), onRemoveItem && /*#__PURE__*/ react.createElement(Action, {
39
+ icon: /*#__PURE__*/ react.createElement(delete_svg_ReactComponent, null),
40
+ label: "Remove",
41
+ onAction: onRemoveItem,
42
+ disabled: disabled
43
+ }));
44
+ export { ThumbnailActions };
45
+
46
+ //# sourceMappingURL=ThumbnailActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.js","sources":["../../../../../../src/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.tsx"],"sourcesContent":["import React, { useCallback } from \"react\";\nimport { ReactComponent as ReplaceIcon } from \"@webiny/icons/file_upload.svg\";\nimport { ReactComponent as EditIcon } from \"@webiny/icons/edit.svg\";\nimport { ReactComponent as TrashIcon } from \"@webiny/icons/delete.svg\";\nimport { IconButton } from \"~/Button/index.js\";\nimport { Tooltip } from \"~/Tooltip/index.js\";\nimport { cn } from \"~/utils.js\";\n\ninterface ActionProps {\n icon: React.JSX.Element;\n label: string;\n onAction: () => void;\n disabled?: boolean;\n}\n\nconst Action = ({ icon, label, onAction, disabled }: ActionProps) => {\n const onClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation();\n onAction();\n },\n [onAction]\n );\n\n return (\n <Tooltip\n content={label}\n trigger={\n <IconButton\n variant={\"tertiary\"}\n size={\"sm\"}\n icon={icon}\n onClick={onClick}\n disabled={disabled}\n />\n }\n />\n );\n};\n\ninterface ThumbnailActionsProps {\n onRemoveItem?: () => void;\n onEditItem?: () => void;\n onReplaceItem?: () => void;\n disabled?: boolean;\n className?: string;\n}\n\nconst ThumbnailActions = ({\n className,\n disabled,\n onEditItem,\n onRemoveItem,\n onReplaceItem\n}: ThumbnailActionsProps) => {\n return (\n <div\n className={cn(\n \"invisible group-hover:visible\",\n \"flex items-center gap-xxs\",\n \"absolute top-xs-plus right-xs-plus\",\n className\n )}\n >\n {onReplaceItem && (\n <Action\n icon={<ReplaceIcon />}\n label={\"Replace\"}\n onAction={onReplaceItem}\n disabled={disabled}\n />\n )}\n {onEditItem && (\n <Action\n icon={<EditIcon />}\n label={\"Edit\"}\n onAction={onEditItem}\n disabled={disabled}\n />\n )}\n {onRemoveItem && (\n <Action\n icon={<TrashIcon />}\n label={\"Remove\"}\n onAction={onRemoveItem}\n disabled={disabled}\n />\n )}\n </div>\n );\n};\n\nexport { ThumbnailActions, type ThumbnailActionsProps };\n"],"names":["Action","icon","label","onAction","disabled","onClick","useCallback","event","Tooltip","IconButton","ThumbnailActions","className","onEditItem","onRemoveItem","onReplaceItem","cn","ReplaceIcon","EditIcon","TrashIcon"],"mappings":";;;;;;;AAeA,MAAMA,SAAS,CAAC,EAAEC,IAAI,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,QAAQ,EAAe;IAC5D,MAAMC,UAAUC,YACZ,CAACC;QACGA,MAAM,eAAe;QACrBJ;IACJ,GACA;QAACA;KAAS;IAGd,OAAO,WAAP,GACI,oBAACK,SAAOA;QACJ,SAASN;QACT,uBACI,oBAACO,YAAUA;YACP,SAAS;YACT,MAAM;YACN,MAAMR;YACN,SAASI;YACT,UAAUD;;;AAK9B;AAUA,MAAMM,mBAAmB,CAAC,EACtBC,SAAS,EACTP,QAAQ,EACRQ,UAAU,EACVC,YAAY,EACZC,aAAa,EACO,GACb,WAAP,GACI,oBAAC;QACG,WAAWC,GACP,iCACA,6BACA,sCACAJ;OAGHG,iBAAiB,WAAjBA,GACG,oBAACd,QAAMA;QACH,oBAAM,oBAACgB,gBAAWA;QAClB,OAAO;QACP,UAAUF;QACV,UAAUV;QAGjBQ,cAAc,WAAdA,GACG,oBAACZ,QAAMA;QACH,oBAAM,oBAACiB,yBAAQA;QACf,OAAO;QACP,UAAUL;QACV,UAAUR;QAGjBS,gBAAgB,WAAhBA,GACG,oBAACb,QAAMA;QACH,oBAAM,oBAACkB,2BAASA;QAChB,OAAO;QACP,UAAUL;QACV,UAAUT"}
@@ -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;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface TruncatedFileNameProps {
3
+ name: string;
4
+ className?: string;
5
+ }
6
+ declare const TruncatedFileName: ({ name, className }: TruncatedFileNameProps) => React.JSX.Element;
7
+ export { TruncatedFileName, type TruncatedFileNameProps };
@@ -0,0 +1,20 @@
1
+ import react from "react";
2
+ import { Text } from "../../../../Text/index.js";
3
+ import { cn } from "../../../../utils.js";
4
+ import { splitFileName } from "./fileName.js";
5
+ const TruncatedFileName = ({ name, className })=>{
6
+ const { head, tail } = splitFileName(name);
7
+ return /*#__PURE__*/ react.createElement(Text, {
8
+ size: "sm",
9
+ as: "div",
10
+ className: cn("flex min-w-0", className),
11
+ title: name
12
+ }, /*#__PURE__*/ react.createElement("span", {
13
+ className: "truncate"
14
+ }, head), tail ? /*#__PURE__*/ react.createElement("span", {
15
+ className: "shrink-0 whitespace-pre"
16
+ }, tail) : null);
17
+ };
18
+ export { TruncatedFileName };
19
+
20
+ //# sourceMappingURL=TruncatedFileName.js.map
@@ -0,0 +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\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"}
@@ -0,0 +1,4 @@
1
+ export declare const splitFileName: (name: string) => {
2
+ head: string;
3
+ tail: string;
4
+ };
@@ -0,0 +1,26 @@
1
+ const TAIL_STEM_CHARS = 3;
2
+ const splitFileName = (name)=>{
3
+ const dot = name.lastIndexOf(".");
4
+ if (dot <= 0) return {
5
+ head: name,
6
+ tail: ""
7
+ };
8
+ const cut = dot - Math.min(TAIL_STEM_CHARS, dot);
9
+ if (cut <= 0) return {
10
+ head: name,
11
+ tail: ""
12
+ };
13
+ const head = name.slice(0, cut);
14
+ const tail = name.slice(cut);
15
+ if (head.length <= tail.length) return {
16
+ head: name,
17
+ tail: ""
18
+ };
19
+ return {
20
+ head,
21
+ tail
22
+ };
23
+ };
24
+ export { splitFileName };
25
+
26
+ //# sourceMappingURL=fileName.js.map
@@ -0,0 +1 @@
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"}
@@ -2,3 +2,4 @@ export * from "./FilePreview.js";
2
2
  export * from "./ImagePreview/index.js";
3
3
  export * from "./RichItemPreview/index.js";
4
4
  export * from "./TextOnlyPreview/index.js";
5
+ export * from "./TruncatedFileName.js";
@@ -2,3 +2,4 @@ export * from "./FilePreview.js";
2
2
  export * from "./ImagePreview/index.js";
3
3
  export * from "./RichItemPreview/index.js";
4
4
  export * from "./TextOnlyPreview/index.js";
5
+ export * from "./TruncatedFileName.js";
@@ -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;
@@ -0,0 +1,63 @@
1
+ import React from "react";
2
+ type FillViewportProps = React.HTMLAttributes<HTMLDivElement>;
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;
8
+ originalName: string;
9
+ displayName: string;
10
+ } & {
11
+ original: typeof BaseFillViewportHeight & {
12
+ original: typeof BaseFillViewportHeight;
13
+ originalName: string;
14
+ displayName: string;
15
+ };
16
+ originalName: string;
17
+ displayName: string;
18
+ } & {
19
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof BaseFillViewportHeight & {
20
+ original: typeof BaseFillViewportHeight;
21
+ originalName: string;
22
+ displayName: string;
23
+ }>) => (props: unknown) => React.JSX.Element;
24
+ };
25
+ declare const FillViewportWidth: typeof BaseFillViewportWidth & {
26
+ original: typeof BaseFillViewportWidth;
27
+ originalName: string;
28
+ displayName: string;
29
+ } & {
30
+ original: typeof BaseFillViewportWidth & {
31
+ original: typeof BaseFillViewportWidth;
32
+ originalName: string;
33
+ displayName: string;
34
+ };
35
+ originalName: string;
36
+ displayName: string;
37
+ } & {
38
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof BaseFillViewportWidth & {
39
+ original: typeof BaseFillViewportWidth;
40
+ originalName: string;
41
+ displayName: string;
42
+ }>) => (props: unknown) => React.JSX.Element;
43
+ };
44
+ declare const FillViewport: typeof BaseFillViewport & {
45
+ original: typeof BaseFillViewport;
46
+ originalName: string;
47
+ displayName: string;
48
+ } & {
49
+ original: typeof BaseFillViewport & {
50
+ original: typeof BaseFillViewport;
51
+ originalName: string;
52
+ displayName: string;
53
+ };
54
+ originalName: string;
55
+ displayName: string;
56
+ } & {
57
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof BaseFillViewport & {
58
+ original: typeof BaseFillViewport;
59
+ originalName: string;
60
+ displayName: string;
61
+ }>) => (props: unknown) => React.JSX.Element;
62
+ };
63
+ export { FillViewportHeight, FillViewportWidth, FillViewport };
@@ -0,0 +1,67 @@
1
+ import react, { useEffect, useRef, useState } from "react";
2
+ import { makeDecoratable } from "../utils.js";
3
+ function useFillViewportStyle(axis) {
4
+ const ref = useRef(null);
5
+ const [style, setStyle] = useState();
6
+ useEffect(()=>{
7
+ const el = ref.current;
8
+ if (!el) return;
9
+ const measure = ()=>{
10
+ const rect = el.getBoundingClientRect();
11
+ const next = {};
12
+ if ("width" === axis || "both" === axis) next.width = window.innerWidth - rect.left;
13
+ if ("height" === axis || "both" === axis) next.height = window.innerHeight - rect.top;
14
+ setStyle(next);
15
+ };
16
+ measure();
17
+ const ro = new ResizeObserver(measure);
18
+ ro.observe(document.documentElement);
19
+ return ()=>ro.disconnect();
20
+ }, []);
21
+ return {
22
+ ref,
23
+ style
24
+ };
25
+ }
26
+ const BaseFillViewportHeight = ({ children, style: userStyle, ...rest })=>{
27
+ const { ref, style } = useFillViewportStyle("height");
28
+ return /*#__PURE__*/ react.createElement("div", {
29
+ ...rest,
30
+ ref: ref,
31
+ "data-fill-viewport": "height",
32
+ style: void 0 !== style ? {
33
+ height: style.height,
34
+ ...userStyle
35
+ } : userStyle
36
+ }, children);
37
+ };
38
+ const BaseFillViewportWidth = ({ children, style: userStyle, ...rest })=>{
39
+ const { ref, style } = useFillViewportStyle("width");
40
+ return /*#__PURE__*/ react.createElement("div", {
41
+ ...rest,
42
+ ref: ref,
43
+ "data-fill-viewport": "width",
44
+ style: void 0 !== style ? {
45
+ width: style.width,
46
+ ...userStyle
47
+ } : userStyle
48
+ }, children);
49
+ };
50
+ const BaseFillViewport = ({ children, style: userStyle, ...rest })=>{
51
+ const { ref, style } = useFillViewportStyle("both");
52
+ return /*#__PURE__*/ react.createElement("div", {
53
+ ...rest,
54
+ ref: ref,
55
+ "data-fill-viewport": "both",
56
+ style: void 0 !== style ? {
57
+ ...style,
58
+ ...userStyle
59
+ } : userStyle
60
+ }, children);
61
+ };
62
+ const FillViewportHeight = makeDecoratable("FillViewportHeight", BaseFillViewportHeight);
63
+ const FillViewportWidth = makeDecoratable("FillViewportWidth", BaseFillViewportWidth);
64
+ const FillViewport = makeDecoratable("FillViewport", BaseFillViewport);
65
+ export { FillViewport, FillViewportHeight, FillViewportWidth };
66
+
67
+ //# sourceMappingURL=FillViewport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FillViewport/FillViewport.js","sources":["../../src/FillViewport/FillViewport.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport { makeDecoratable } from \"~/utils.js\";\n\ninterface FillViewportStyle {\n width?: number;\n height?: number;\n}\n\nfunction useFillViewportStyle(axis: \"width\" | \"height\" | \"both\") {\n const ref = useRef<HTMLDivElement>(null);\n const [style, setStyle] = useState<FillViewportStyle>();\n\n useEffect(() => {\n const el = ref.current;\n if (!el) {\n return;\n }\n\n const measure = () => {\n const rect = el.getBoundingClientRect();\n const next: FillViewportStyle = {};\n\n if (axis === \"width\" || axis === \"both\") {\n next.width = window.innerWidth - rect.left;\n }\n\n if (axis === \"height\" || axis === \"both\") {\n next.height = window.innerHeight - rect.top;\n }\n\n setStyle(next);\n };\n\n measure();\n\n const ro = new ResizeObserver(measure);\n ro.observe(document.documentElement);\n\n return () => ro.disconnect();\n }, []);\n\n return { ref, style };\n}\n\ntype FillViewportProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst BaseFillViewportHeight = ({ children, style: userStyle, ...rest }: FillViewportProps) => {\n const { ref, style } = useFillViewportStyle(\"height\");\n\n return (\n <div\n {...rest}\n ref={ref}\n data-fill-viewport=\"height\"\n style={style !== undefined ? { height: style.height, ...userStyle } : userStyle}\n >\n {children}\n </div>\n );\n};\n\nconst BaseFillViewportWidth = ({ children, style: userStyle, ...rest }: FillViewportProps) => {\n const { ref, style } = useFillViewportStyle(\"width\");\n\n return (\n <div\n {...rest}\n ref={ref}\n data-fill-viewport=\"width\"\n style={style !== undefined ? { width: style.width, ...userStyle } : userStyle}\n >\n {children}\n </div>\n );\n};\n\nconst BaseFillViewport = ({ children, style: userStyle, ...rest }: FillViewportProps) => {\n const { ref, style } = useFillViewportStyle(\"both\");\n\n return (\n <div\n {...rest}\n ref={ref}\n data-fill-viewport=\"both\"\n style={style !== undefined ? { ...style, ...userStyle } : userStyle}\n >\n {children}\n </div>\n );\n};\n\nconst FillViewportHeight = makeDecoratable(\"FillViewportHeight\", BaseFillViewportHeight);\nconst FillViewportWidth = makeDecoratable(\"FillViewportWidth\", BaseFillViewportWidth);\nconst FillViewport = makeDecoratable(\"FillViewport\", BaseFillViewport);\n\nexport { FillViewportHeight, FillViewportWidth, FillViewport };\n"],"names":["useFillViewportStyle","axis","ref","useRef","style","setStyle","useState","useEffect","el","measure","rect","next","window","ro","ResizeObserver","document","BaseFillViewportHeight","children","userStyle","rest","undefined","BaseFillViewportWidth","BaseFillViewport","FillViewportHeight","makeDecoratable","FillViewportWidth","FillViewport"],"mappings":";;AAQA,SAASA,qBAAqBC,IAAiC;IAC3D,MAAMC,MAAMC,OAAuB;IACnC,MAAM,CAACC,OAAOC,SAAS,GAAGC;IAE1BC,UAAU;QACN,MAAMC,KAAKN,IAAI,OAAO;QACtB,IAAI,CAACM,IACD;QAGJ,MAAMC,UAAU;YACZ,MAAMC,OAAOF,GAAG,qBAAqB;YACrC,MAAMG,OAA0B,CAAC;YAEjC,IAAIV,AAAS,YAATA,QAAoBA,AAAS,WAATA,MACpBU,KAAK,KAAK,GAAGC,OAAO,UAAU,GAAGF,KAAK,IAAI;YAG9C,IAAIT,AAAS,aAATA,QAAqBA,AAAS,WAATA,MACrBU,KAAK,MAAM,GAAGC,OAAO,WAAW,GAAGF,KAAK,GAAG;YAG/CL,SAASM;QACb;QAEAF;QAEA,MAAMI,KAAK,IAAIC,eAAeL;QAC9BI,GAAG,OAAO,CAACE,SAAS,eAAe;QAEnC,OAAO,IAAMF,GAAG,UAAU;IAC9B,GAAG,EAAE;IAEL,OAAO;QAAEX;QAAKE;IAAM;AACxB;AAIA,MAAMY,yBAAyB,CAAC,EAAEC,QAAQ,EAAE,OAAOC,SAAS,EAAE,GAAGC,MAAyB;IACtF,MAAM,EAAEjB,GAAG,EAAEE,KAAK,EAAE,GAAGJ,qBAAqB;IAE5C,OAAO,WAAP,GACI,oBAAC;QACI,GAAGmB,IAAI;QACR,KAAKjB;QACL,sBAAmB;QACnB,OAAOE,AAAUgB,WAAVhB,QAAsB;YAAE,QAAQA,MAAM,MAAM;YAAE,GAAGc,SAAS;QAAC,IAAIA;OAErED;AAGb;AAEA,MAAMI,wBAAwB,CAAC,EAAEJ,QAAQ,EAAE,OAAOC,SAAS,EAAE,GAAGC,MAAyB;IACrF,MAAM,EAAEjB,GAAG,EAAEE,KAAK,EAAE,GAAGJ,qBAAqB;IAE5C,OAAO,WAAP,GACI,oBAAC;QACI,GAAGmB,IAAI;QACR,KAAKjB;QACL,sBAAmB;QACnB,OAAOE,AAAUgB,WAAVhB,QAAsB;YAAE,OAAOA,MAAM,KAAK;YAAE,GAAGc,SAAS;QAAC,IAAIA;OAEnED;AAGb;AAEA,MAAMK,mBAAmB,CAAC,EAAEL,QAAQ,EAAE,OAAOC,SAAS,EAAE,GAAGC,MAAyB;IAChF,MAAM,EAAEjB,GAAG,EAAEE,KAAK,EAAE,GAAGJ,qBAAqB;IAE5C,OAAO,WAAP,GACI,oBAAC;QACI,GAAGmB,IAAI;QACR,KAAKjB;QACL,sBAAmB;QACnB,OAAOE,AAAUgB,WAAVhB,QAAsB;YAAE,GAAGA,KAAK;YAAE,GAAGc,SAAS;QAAC,IAAIA;OAEzDD;AAGb;AAEA,MAAMM,qBAAqBC,gBAAgB,sBAAsBR;AACjE,MAAMS,oBAAoBD,gBAAgB,qBAAqBH;AAC/D,MAAMK,eAAeF,gBAAgB,gBAAgBF"}
@@ -0,0 +1 @@
1
+ export * from "./FillViewport.js";
@@ -0,0 +1 @@
1
+ export * from "./FillViewport.js";
@@ -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;