@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
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { Input } from "../Input/index.js";
3
3
  declare const meta: Meta<typeof Input>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"Input/Input.stories.js","sources":["../../src/Input/Input.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { Input } from \"~/Input/index.js\";\n\nconst meta: Meta<typeof Input> = {\n title: \"Components/Form/Input\",\n component: Input,\n argTypes: {\n onChange: { action: \"onChange\" },\n type: {\n control: \"select\",\n options: [\n \"text\",\n \"number\",\n \"email\",\n \"password\",\n \"tel\",\n \"url\",\n \"search\",\n \"date\",\n \"datetime-local\",\n \"month\",\n \"week\",\n \"time\",\n \"color\",\n \"file\",\n \"checkbox\",\n \"radio\",\n \"range\",\n \"hidden\",\n \"button\",\n \"submit\",\n \"reset\",\n \"image\"\n ],\n defaultValue: \"text\"\n },\n disabled: {\n control: \"boolean\",\n defaultValue: false\n }\n },\n parameters: {\n layout: \"padded\"\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Input>;\n\nexport const Default: Story = {};\n\nexport const WithLabel: Story = {\n args: {\n label: \"Any field label\"\n }\n};\n\nexport const WithLabelRequired: Story = {\n args: {\n label: \"Any field label\",\n required: true\n }\n};\n\nexport const WithDescription: Story = {\n args: {\n description: \"Provide the required information for processing your request.\"\n }\n};\n\nexport const WithNotes: Story = {\n args: {\n note: \"Note: Ensure your selection or input is accurate before proceeding.\"\n }\n};\n\nexport const WithErrors: Story = {\n args: {\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Disabled: Story = {\n args: {\n label: \"Any field label\",\n disabled: true\n }\n};\n\nexport const WithValidateFunction: Story = {\n render: args => {\n const [value, setValue] = useState(\"\");\n const [validation, setValidation] = useState<any>({ isValid: true, message: undefined });\n\n const validate = async () => {\n // Simulate API call delay\n await new Promise(resolve => setTimeout(resolve, 500));\n\n // Example validation: check if email already exists\n if (value.includes(\"exists@\")) {\n setValidation({ isValid: false, message: \"This email is already registered\" });\n } else {\n setValidation({ isValid: true, message: undefined });\n }\n };\n\n return (\n <Input\n {...args}\n type=\"email\"\n label=\"Email\"\n placeholder=\"Enter your email\"\n value={value}\n onChange={newValue => setValue(newValue)}\n validate={validate}\n validation={validation}\n />\n );\n }\n};\n\nexport const FullExample: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n required: true,\n description: \"Provide the required information for processing your request.\",\n note: \"Note: Ensure your selection or input is accurate before proceeding.\",\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Documentation: Story = {\n render: args => {\n const [value, setValue] = useState(\"\");\n const [validation, setValidation] = useState({ isValid: true, message: \"\" });\n\n const handleValidation = () => {\n if (args.required && !value.trim()) {\n setValidation({ isValid: false, message: \"This field is required\" });\n } else if (args.minLength && value.trim().length < args.minLength) {\n setValidation({\n isValid: false,\n message: `Must be at least ${args.minLength} characters long`\n });\n } else {\n setValidation({ isValid: true, message: \"\" });\n }\n };\n\n return (\n <Input\n {...args}\n value={value}\n onChange={newValue => setValue(newValue)}\n validation={validation}\n onBlur={handleValidation}\n onEnter={handleValidation}\n />\n );\n },\n args: {\n type: \"text\",\n size: \"lg\",\n variant: \"primary\",\n label: \"Full Name\",\n description: \"Enter your full name as it appears on your ID\",\n note: \"This will be used for official documentation\",\n placeholder: \"Enter your full name\",\n required: true,\n disabled: false,\n startIcon: undefined,\n endIcon: undefined,\n minLength: 3,\n maxLength: undefined,\n onChange: undefined,\n onBlur: undefined,\n onEnter: undefined,\n validation: undefined,\n validate: undefined\n },\n argTypes: {\n type: {\n description: \"HTML input type attribute\",\n control: \"select\",\n options: [\n \"text\",\n \"number\",\n \"email\",\n \"password\",\n \"tel\",\n \"url\",\n \"search\",\n \"date\",\n \"datetime-local\",\n \"month\",\n \"week\",\n \"time\",\n \"color\",\n \"file\"\n ],\n defaultValue: \"text\"\n },\n size: {\n description: \"Input field size\",\n control: \"select\",\n options: [\"md\", \"lg\", \"xl\"],\n defaultValue: \"lg\"\n },\n variant: {\n description: \"Input field style variant\",\n control: \"select\",\n options: [\"primary\", \"secondary\", \"ghost\", \"ghost-negative\"],\n defaultValue: \"primary\"\n },\n label: {\n description: \"Label text displayed above the input\",\n control: \"text\"\n },\n description: {\n description: \"Helper text displayed below the label\",\n control: \"text\"\n },\n note: {\n description: \"Additional note displayed below the input\",\n control: \"text\"\n },\n placeholder: {\n description: \"Placeholder text shown when input is empty\",\n control: \"text\"\n },\n required: {\n description: \"Makes the input field required\",\n control: \"boolean\",\n defaultValue: true\n },\n disabled: {\n description: \"Disables the input field\",\n control: \"boolean\",\n defaultValue: false\n },\n startIcon: {\n description: \"Icon displayed at the start of the input\"\n },\n endIcon: {\n description: \"Icon displayed at the end of the input\"\n },\n minLength: {\n description: \"Minimum number of characters required\",\n control: \"number\",\n defaultValue: 3\n },\n maxLength: {\n description:\n \"Maximum number of characters allowed. To apply this maxLength, update the code similarly to how it's done for minLength. Refer to the minLength example above for guidance.\",\n control: \"number\"\n },\n validation: {\n description:\n \"Validation state and error message. Please refer to the example code for details on usage.\"\n },\n validate: {\n description: \"Custom validation function\"\n },\n onChange: {\n description: \"Callback function when input value changes\"\n },\n onBlur: {\n description: \"Callback function when input loses focus\"\n },\n onEnter: {\n description: \"Callback function when Enter key is pressed\"\n }\n } // Removed forwardEventOnChange and inputRef\n};\n"],"names":["meta","Input","Default","WithLabel","WithLabelRequired","WithDescription","WithNotes","WithErrors","Disabled","WithValidateFunction","args","value","setValue","useState","validation","setValidation","undefined","validate","Promise","resolve","setTimeout","newValue","FullExample","Documentation","handleValidation"],"mappings":";;AAIA,MAAMA,OAA2B;IAC7B,OAAO;IACP,WAAWC;IACX,UAAU;QACN,UAAU;YAAE,QAAQ;QAAW;QAC/B,MAAM;YACF,SAAS;YACT,SAAS;gBACL;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;aACH;YACD,cAAc;QAClB;QACA,UAAU;YACN,SAAS;YACT,cAAc;QAClB;IACJ;IACA,YAAY;QACR,QAAQ;IACZ;AACJ;AAEA,sBAAeD;AAGR,MAAME,UAAiB,CAAC;AAExB,MAAMC,YAAmB;IAC5B,MAAM;QACF,OAAO;IACX;AACJ;AAEO,MAAMC,oBAA2B;IACpC,MAAM;QACF,OAAO;QACP,UAAU;IACd;AACJ;AAEO,MAAMC,kBAAyB;IAClC,MAAM;QACF,aAAa;I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;YACT,cAAc;QAClB;QACA,WAAW;YACP,aACI;YACJ,SAAS;QACb;QACA,YAAY;YACR,aACI;QACR;QACA,UAAU;YACN,aAAa;QACjB;QACA,UAAU;YACN,aAAa;QACjB;QACA,QAAQ;YACJ,aAAa;QACjB;QACA,SAAS;YACL,aAAa;QACjB;IACJ;AACJ"}
1
+ {"version":3,"file":"Input/Input.stories.js","sources":["../../src/Input/Input.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Input } from \"~/Input/index.js\";\n\nconst meta: Meta<typeof Input> = {\n title: \"Components/Form/Input\",\n component: Input,\n argTypes: {\n onChange: { action: \"onChange\" },\n type: {\n control: \"select\",\n options: [\n \"text\",\n \"number\",\n \"email\",\n \"password\",\n \"tel\",\n \"url\",\n \"search\",\n \"date\",\n \"datetime-local\",\n \"month\",\n \"week\",\n \"time\",\n \"color\",\n \"file\",\n \"checkbox\",\n \"radio\",\n \"range\",\n \"hidden\",\n \"button\",\n \"submit\",\n \"reset\",\n \"image\"\n ],\n defaultValue: \"text\"\n },\n disabled: {\n control: \"boolean\",\n defaultValue: false\n }\n },\n parameters: {\n layout: \"padded\"\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Input>;\n\nexport const Default: Story = {};\n\nexport const WithLabel: Story = {\n args: {\n label: \"Any field label\"\n }\n};\n\nexport const WithLabelRequired: Story = {\n args: {\n label: \"Any field label\",\n required: true\n }\n};\n\nexport const WithDescription: Story = {\n args: {\n description: \"Provide the required information for processing your request.\"\n }\n};\n\nexport const WithNotes: Story = {\n args: {\n note: \"Note: Ensure your selection or input is accurate before proceeding.\"\n }\n};\n\nexport const WithErrors: Story = {\n args: {\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Disabled: Story = {\n args: {\n label: \"Any field label\",\n disabled: true\n }\n};\n\nexport const WithValidateFunction: Story = {\n render: args => {\n const [value, setValue] = useState(\"\");\n const [validation, setValidation] = useState<any>({ isValid: true, message: undefined });\n\n const validate = async () => {\n // Simulate API call delay\n await new Promise(resolve => setTimeout(resolve, 500));\n\n // Example validation: check if email already exists\n if (value.includes(\"exists@\")) {\n setValidation({ isValid: false, message: \"This email is already registered\" });\n } else {\n setValidation({ isValid: true, message: undefined });\n }\n };\n\n return (\n <Input\n {...args}\n type=\"email\"\n label=\"Email\"\n placeholder=\"Enter your email\"\n value={value}\n onChange={newValue => setValue(newValue)}\n validate={validate}\n validation={validation}\n />\n );\n }\n};\n\nexport const FullExample: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n required: true,\n description: \"Provide the required information for processing your request.\",\n note: \"Note: Ensure your selection or input is accurate before proceeding.\",\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Documentation: Story = {\n render: args => {\n const [value, setValue] = useState(\"\");\n const [validation, setValidation] = useState({ isValid: true, message: \"\" });\n\n const handleValidation = () => {\n if (args.required && !value.trim()) {\n setValidation({ isValid: false, message: \"This field is required\" });\n } else if (args.minLength && value.trim().length < args.minLength) {\n setValidation({\n isValid: false,\n message: `Must be at least ${args.minLength} characters long`\n });\n } else {\n setValidation({ isValid: true, message: \"\" });\n }\n };\n\n return (\n <Input\n {...args}\n value={value}\n onChange={newValue => setValue(newValue)}\n validation={validation}\n onBlur={handleValidation}\n onEnter={handleValidation}\n />\n );\n },\n args: {\n type: \"text\",\n size: \"lg\",\n variant: \"primary\",\n label: \"Full Name\",\n description: \"Enter your full name as it appears on your ID\",\n note: \"This will be used for official documentation\",\n placeholder: \"Enter your full name\",\n required: true,\n disabled: false,\n startIcon: undefined,\n endIcon: undefined,\n minLength: 3,\n maxLength: undefined,\n onChange: undefined,\n onBlur: undefined,\n onEnter: undefined,\n validation: undefined,\n validate: undefined\n },\n argTypes: {\n type: {\n description: \"HTML input type attribute\",\n control: \"select\",\n options: [\n \"text\",\n \"number\",\n \"email\",\n \"password\",\n \"tel\",\n \"url\",\n \"search\",\n \"date\",\n \"datetime-local\",\n \"month\",\n \"week\",\n \"time\",\n \"color\",\n \"file\"\n ],\n defaultValue: \"text\"\n },\n size: {\n description: \"Input field size\",\n control: \"select\",\n options: [\"md\", \"lg\", \"xl\"],\n defaultValue: \"lg\"\n },\n variant: {\n description: \"Input field style variant\",\n control: \"select\",\n options: [\"primary\", \"secondary\", \"ghost\", \"ghost-negative\"],\n defaultValue: \"primary\"\n },\n label: {\n description: \"Label text displayed above the input\",\n control: \"text\"\n },\n description: {\n description: \"Helper text displayed below the label\",\n control: \"text\"\n },\n note: {\n description: \"Additional note displayed below the input\",\n control: \"text\"\n },\n placeholder: {\n description: \"Placeholder text shown when input is empty\",\n control: \"text\"\n },\n required: {\n description: \"Makes the input field required\",\n control: \"boolean\",\n defaultValue: true\n },\n disabled: {\n description: \"Disables the input field\",\n control: \"boolean\",\n defaultValue: false\n },\n startIcon: {\n description: \"Icon displayed at the start of the input\"\n },\n endIcon: {\n description: \"Icon displayed at the end of the input\"\n },\n minLength: {\n description: \"Minimum number of characters required\",\n control: \"number\",\n defaultValue: 3\n },\n maxLength: {\n description:\n \"Maximum number of characters allowed. To apply this maxLength, update the code similarly to how it's done for minLength. Refer to the minLength example above for guidance.\",\n control: \"number\"\n },\n validation: {\n description:\n \"Validation state and error message. Please refer to the example code for details on usage.\"\n },\n validate: {\n description: \"Custom validation function\"\n },\n onChange: {\n description: \"Callback function when input value changes\"\n },\n onBlur: {\n description: \"Callback function when input loses focus\"\n },\n onEnter: {\n description: \"Callback function when Enter key is pressed\"\n }\n } // Removed forwardEventOnChange and inputRef\n};\n"],"names":["meta","Input","Default","WithLabel","WithLabelRequired","WithDescription","WithNotes","WithErrors","Disabled","WithValidateFunction","args","value","setValue","useState","validation","setValidation","undefined","validate","Promise","resolve","setTimeout","newValue","FullExample","Documentation","handleValidation"],"mappings":";;AAIA,MAAMA,OAA2B;IAC7B,OAAO;IACP,WAAWC;IACX,UAAU;QACN,UAAU;YAAE,QAAQ;QAAW;QAC/B,MAAM;YACF,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AAK;YAC3B,cAAc;QAClB;QACA,SAAS;YACL,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAW;gBAAa;gBAAS;aAAiB;YAC5D,cAAc;QAClB;QACA,OAAO;YACH,aAAa;YACb,SAAS;QACb;QACA,aAAa;YACT,aAAa;YACb,SAAS;QACb;QACA,MAAM;YACF,aAAa;YACb,SAAS;QACb;QACA,aAAa;YACT,aAAa;YACb,SAAS;QACb;QACA,UAAU;YACN,aAAa;YACb,SAAS;YACT,cAAc;QAClB;QACA,UAAU;YACN,aAAa;YACb,SAAS;YACT,cAAc;QAClB;QACA,WAAW;YACP,aAAa;QACjB;QACA,SAAS;YACL,aAAa;QACjB;QACA,WAAW;YACP,aAAa;YACb,SAAS;YACT,cAAc;QAClB;QACA,WAAW;YACP,aACI;YACJ,SAAS;QACb;QACA,YAAY;YACR,aACI;QACR;QACA,UAAU;YACN,aAAa;QACjB;QACA,UAAU;YACN,aAAa;QACjB;QACA,QAAQ;YACJ,aAAa;QACjB;QACA,SAAS;YACL,aAAa;QACjB;IACJ;AACJ"}
@@ -14,8 +14,8 @@ declare const InputIcon: ({ icon, inputSize, className }: InputIconProps) => Rea
14
14
  * where the `inputVariants` is used to style a div that wraps multiple elements (input, Tags, icons, etc.)
15
15
  */
16
16
  declare const inputVariants: (props?: ({
17
- size?: "md" | "lg" | "xl" | null | undefined;
18
- variant?: "primary" | "secondary" | "ghost" | "ghost-negative" | null | undefined;
17
+ size?: "lg" | "md" | "xl" | null | undefined;
18
+ variant?: "ghost" | "ghost-negative" | "primary" | "secondary" | null | undefined;
19
19
  invalid?: boolean | null | undefined;
20
20
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
21
21
  type InputPrimitiveProps<TValue = any> = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> & VariantProps<typeof inputVariants> & {
@@ -56,21 +56,22 @@ type InputPrimitiveProps<TValue = any> = Omit<React.InputHTMLAttributes<HTMLInpu
56
56
  */
57
57
  autoSelect?: boolean;
58
58
  };
59
- declare const InputPrimitive: (({ autoSelect, className, disabled, endIcon, forwardEventOnChange, inputRef, invalid, maxLength, onChange: originalOnChange, onEnter, onEscape, onKeyDown: originalOnKeyDown, onFocus: originalOnFocus, size, startIcon, value, variant, ...props }: InputPrimitiveProps) => React.JSX.Element) & {
60
- original: ({ autoSelect, className, disabled, endIcon, forwardEventOnChange, inputRef, invalid, maxLength, onChange: originalOnChange, onEnter, onEscape, onKeyDown: originalOnKeyDown, onFocus: originalOnFocus, size, startIcon, value, variant, ...props }: InputPrimitiveProps) => React.JSX.Element;
59
+ declare const DecoratableInputPrimitive: ({ autoSelect, className, disabled, endIcon, forwardEventOnChange, inputRef, invalid, maxLength, onChange: originalOnChange, onEnter, onEscape, onKeyDown: originalOnKeyDown, onFocus: originalOnFocus, size, startIcon, value, variant, ...props }: InputPrimitiveProps) => React.JSX.Element;
60
+ declare const InputPrimitive: typeof DecoratableInputPrimitive & {
61
+ original: typeof DecoratableInputPrimitive;
61
62
  originalName: string;
62
63
  displayName: string;
63
64
  } & {
64
- original: (({ autoSelect, className, disabled, endIcon, forwardEventOnChange, inputRef, invalid, maxLength, onChange: originalOnChange, onEnter, onEscape, onKeyDown: originalOnKeyDown, onFocus: originalOnFocus, size, startIcon, value, variant, ...props }: InputPrimitiveProps) => React.JSX.Element) & {
65
- original: ({ autoSelect, className, disabled, endIcon, forwardEventOnChange, inputRef, invalid, maxLength, onChange: originalOnChange, onEnter, onEscape, onKeyDown: originalOnKeyDown, onFocus: originalOnFocus, size, startIcon, value, variant, ...props }: InputPrimitiveProps) => React.JSX.Element;
65
+ original: typeof DecoratableInputPrimitive & {
66
+ original: typeof DecoratableInputPrimitive;
66
67
  originalName: string;
67
68
  displayName: string;
68
69
  };
69
70
  originalName: string;
70
71
  displayName: string;
71
72
  } & {
72
- createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<(({ autoSelect, className, disabled, endIcon, forwardEventOnChange, inputRef, invalid, maxLength, onChange: originalOnChange, onEnter, onEscape, onKeyDown: originalOnKeyDown, onFocus: originalOnFocus, size, startIcon, value, variant, ...props }: InputPrimitiveProps) => React.JSX.Element) & {
73
- original: ({ autoSelect, className, disabled, endIcon, forwardEventOnChange, inputRef, invalid, maxLength, onChange: originalOnChange, onEnter, onEscape, onKeyDown: originalOnKeyDown, onFocus: originalOnFocus, size, startIcon, value, variant, ...props }: InputPrimitiveProps) => React.JSX.Element;
73
+ createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableInputPrimitive & {
74
+ original: typeof DecoratableInputPrimitive;
74
75
  originalName: string;
75
76
  displayName: string;
76
77
  }>) => (props: unknown) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { InputPrimitive } from "./InputPrimitive.js";
3
3
  declare const meta: Meta<typeof InputPrimitive>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"Input/InputPrimitive.stories.js","sources":["../../src/Input/InputPrimitive.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { ReactComponent as NotificationsIcon } from \"@webiny/icons/notifications.svg\";\nimport { ReactComponent as CalendarIcon } from \"@webiny/icons/calendar_month.svg\";\n\nimport { InputPrimitive } from \"./InputPrimitive.js\";\nimport { Icon } from \"~/Icon/index.js\";\n\nconst meta: Meta<typeof InputPrimitive> = {\n title: \"Components/Form Primitives/Input\",\n component: InputPrimitive,\n argTypes: {\n onChange: { action: \"onChange\" },\n onEnter: { action: \"onEnter\" },\n onKeyDown: { action: \"onKeyDown\" },\n type: {\n control: \"select\",\n options: [\n \"text\",\n \"number\",\n \"email\",\n \"password\",\n \"tel\",\n \"url\",\n \"search\",\n \"date\",\n \"datetime-local\",\n \"month\",\n \"week\",\n \"time\",\n \"color\",\n \"file\",\n \"checkbox\",\n \"radio\",\n \"range\",\n \"hidden\",\n \"button\",\n \"submit\",\n \"reset\",\n \"image\"\n ],\n defaultValue: \"text\"\n }\n },\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [value, setValue] = useState(args.value);\n return (\n <div className={\"w-full\"}>\n <InputPrimitive {...args} value={value} onChange={setValue} />\n <div className={\"mt-4 text-center\"}>\n Current selected value: <pre>{value}</pre>\n </div>\n </div>\n );\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof InputPrimitive>;\n\nexport const Default: Story = {};\n\nexport const MediumSize: Story = {\n args: {\n placeholder: \"Custom placeholder\",\n size: \"md\"\n }\n};\n\nexport const LargeSize: Story = {\n args: {\n placeholder: \"Custom placeholder\",\n size: \"lg\"\n }\n};\n\nexport const ExtraLargeSize: Story = {\n args: {\n placeholder: \"Custom placeholder\",\n size: \"xl\"\n }\n};\n\nexport const WithStartIcon: Story = {\n args: {\n placeholder: \"Custom placeholder\",\n startIcon: <Icon label={\"Bell\"} icon={<NotificationsIcon />} />\n }\n};\n\nexport const WithEndIcon: Story = {\n args: {\n placeholder: \"Custom placeholder\",\n endIcon: <Icon label={\"Calendar\"} icon={<CalendarIcon />} />\n }\n};\n\nexport const WithStartAndEndIcons: Story = {\n args: {\n placeholder: \"Custom placeholder\",\n startIcon: <Icon label={\"Bell\"} icon={<NotificationsIcon />} />,\n endIcon: <Icon label={\"Calendar\"} icon={<CalendarIcon />} />\n }\n};\n\nexport const PrimaryVariant: Story = {\n args: {\n ...WithStartAndEndIcons.args,\n variant: \"primary\",\n placeholder: \"Custom placeholder\"\n }\n};\n\nexport const PrimaryVariantDisabled: Story = {\n args: {\n ...PrimaryVariant.args,\n disabled: true\n }\n};\n\nexport const PrimaryVariantInvalid: Story = {\n args: {\n ...PrimaryVariant.args,\n invalid: true\n }\n};\n\nexport const SecondaryVariant: Story = {\n args: {\n ...WithStartAndEndIcons.args,\n variant: \"secondary\",\n placeholder: \"Custom placeholder\"\n }\n};\n\nexport const SecondaryVariantDisabled: Story = {\n args: {\n ...SecondaryVariant.args,\n disabled: true\n }\n};\n\nexport const SecondaryVariantInvalid: Story = {\n args: {\n ...SecondaryVariant.args,\n invalid: true\n }\n};\n\nexport const GhostVariant: Story = {\n args: {\n ...WithStartAndEndIcons.args,\n variant: \"ghost\",\n placeholder: \"Custom placeholder\"\n }\n};\n\nexport const GhostVariantDisabled: Story = {\n args: {\n ...GhostVariant.args,\n disabled: true\n }\n};\n\nexport const GhostVariantInvalid: Story = {\n args: {\n ...GhostVariant.args,\n invalid: true\n }\n};\n\nexport const GhostNegativeVariant: Story = {\n args: {\n ...WithStartAndEndIcons.args,\n variant: \"ghost-negative\",\n placeholder: \"Custom placeholder\"\n },\n decorators: [\n Story => (\n <div className=\"bg-neutral-dark text-neutral-light p-xl\">\n <Story />\n </div>\n )\n ]\n};\n\nexport const GhostNegativeVariantDisabled: Story = {\n args: {\n ...GhostNegativeVariant.args,\n disabled: true\n },\n decorators: [\n Story => (\n <div className=\"bg-neutral-dark text-neutral-light p-xl\">\n <Story />\n </div>\n )\n ]\n};\n\nexport const GhostNegativeVariantInvalid: Story = {\n args: {\n ...GhostNegativeVariant.args,\n invalid: true\n },\n decorators: [\n Story => (\n <div className=\"bg-neutral-dark text-neutral-light p-xl\">\n <Story />\n </div>\n )\n ]\n};\n\nexport const WithForwardEventOnChange: Story = {\n args: {\n ...Default.args,\n forwardEventOnChange: true\n }\n};\n"],"names":["meta","InputPrimitive","args","value","setValue","useState","Default","MediumSize","LargeSize","ExtraLargeSize","WithStartIcon","Icon","NotificationsIcon","WithEndIcon","CalendarIcon","WithStartAndEndIcons","PrimaryVariant","PrimaryVariantDisabled","PrimaryVariantInvalid","SecondaryVariant","SecondaryVariantDisabled","SecondaryVariantInvalid","GhostVariant","GhostVariantDisabled","GhostVariantInvalid","GhostNegativeVariant","Story","GhostNegativeVariantDisabled","GhostNegativeVariantInvalid","WithForwardEventOnChange"],"mappings":";;;;;AAQA,MAAMA,OAAoC;IACtC,OAAO;IACP,WAAWC;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AAME,8BAAqC;IAC9C,MAAM;QACF,GAAGH,qBAAqB,IAAI;QAC5B,SAAS;IACb;IACA,YAAY;QACRC,CAAAA,QAAAA,WAAAA,GACI,oBAAC;gBAAI,WAAU;6BACX,oBAACA,OAAAA;KAGZ;AACL;AAEO,MAAMG,2BAAkC;IAC3C,MAAM;QACF,GAAGvB,QAAQ,IAAI;QACf,sBAAsB;IAC1B;AACJ"}
1
+ {"version":3,"file":"Input/InputPrimitive.stories.js","sources":["../../src/Input/InputPrimitive.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { ReactComponent as NotificationsIcon } from \"@webiny/icons/notifications.svg\";\nimport { ReactComponent as CalendarIcon } from \"@webiny/icons/calendar_month.svg\";\n\nimport { InputPrimitive } from \"./InputPrimitive.js\";\nimport { Icon } from \"~/Icon/index.js\";\n\nconst meta: Meta<typeof InputPrimitive> = {\n title: \"Components/Form Primitives/Input\",\n component: InputPrimitive,\n argTypes: {\n onChange: { action: \"onChange\" },\n onEnter: { action: \"onEnter\" },\n onKeyDown: { action: \"onKeyDown\" },\n type: {\n control: \"select\",\n options: [\n \"text\",\n \"number\",\n \"email\",\n \"password\",\n \"tel\",\n \"url\",\n \"search\",\n \"date\",\n \"datetime-local\",\n \"month\",\n \"week\",\n \"time\",\n \"color\",\n \"file\",\n \"checkbox\",\n \"radio\",\n \"range\",\n \"hidden\",\n \"button\",\n \"submit\",\n \"reset\",\n \"image\"\n ],\n defaultValue: \"text\"\n }\n },\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [value, setValue] = useState(args.value);\n return (\n <div className={\"w-full\"}>\n <InputPrimitive {...args} value={value} onChange={setValue} />\n <div className={\"mt-4 text-center\"}>\n Current selected value: <pre>{value}</pre>\n </div>\n </div>\n );\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof InputPrimitive>;\n\nexport const Default: Story = {};\n\nexport const MediumSize: Story = {\n args: {\n placeholder: \"Custom placeholder\",\n size: \"md\"\n }\n};\n\nexport const LargeSize: Story = {\n args: {\n placeholder: \"Custom placeholder\",\n size: \"lg\"\n }\n};\n\nexport const ExtraLargeSize: Story = {\n args: {\n placeholder: \"Custom placeholder\",\n size: \"xl\"\n }\n};\n\nexport const WithStartIcon: Story = {\n args: {\n placeholder: \"Custom placeholder\",\n startIcon: <Icon label={\"Bell\"} icon={<NotificationsIcon />} />\n }\n};\n\nexport const WithEndIcon: Story = {\n args: {\n placeholder: \"Custom placeholder\",\n endIcon: <Icon label={\"Calendar\"} icon={<CalendarIcon />} />\n }\n};\n\nexport const WithStartAndEndIcons: Story = {\n args: {\n placeholder: \"Custom placeholder\",\n startIcon: <Icon label={\"Bell\"} icon={<NotificationsIcon />} />,\n endIcon: <Icon label={\"Calendar\"} icon={<CalendarIcon />} />\n }\n};\n\nexport const PrimaryVariant: Story = {\n args: {\n ...WithStartAndEndIcons.args,\n variant: \"primary\",\n placeholder: \"Custom placeholder\"\n }\n};\n\nexport const PrimaryVariantDisabled: Story = {\n args: {\n ...PrimaryVariant.args,\n disabled: true\n }\n};\n\nexport const PrimaryVariantInvalid: Story = {\n args: {\n ...PrimaryVariant.args,\n invalid: true\n }\n};\n\nexport const SecondaryVariant: Story = {\n args: {\n ...WithStartAndEndIcons.args,\n variant: \"secondary\",\n placeholder: \"Custom placeholder\"\n }\n};\n\nexport const SecondaryVariantDisabled: Story = {\n args: {\n ...SecondaryVariant.args,\n disabled: true\n }\n};\n\nexport const SecondaryVariantInvalid: Story = {\n args: {\n ...SecondaryVariant.args,\n invalid: true\n }\n};\n\nexport const GhostVariant: Story = {\n args: {\n ...WithStartAndEndIcons.args,\n variant: \"ghost\",\n placeholder: \"Custom placeholder\"\n }\n};\n\nexport const GhostVariantDisabled: Story = {\n args: {\n ...GhostVariant.args,\n disabled: true\n }\n};\n\nexport const GhostVariantInvalid: Story = {\n args: {\n ...GhostVariant.args,\n invalid: true\n }\n};\n\nexport const GhostNegativeVariant: Story = {\n args: {\n ...WithStartAndEndIcons.args,\n variant: \"ghost-negative\",\n placeholder: \"Custom placeholder\"\n },\n decorators: [\n Story => (\n <div className=\"bg-neutral-dark text-neutral-light p-xl\">\n <Story />\n </div>\n )\n ]\n};\n\nexport const GhostNegativeVariantDisabled: Story = {\n args: {\n ...GhostNegativeVariant.args,\n disabled: true\n },\n decorators: [\n Story => (\n <div className=\"bg-neutral-dark text-neutral-light p-xl\">\n <Story />\n </div>\n )\n ]\n};\n\nexport const GhostNegativeVariantInvalid: Story = {\n args: {\n ...GhostNegativeVariant.args,\n invalid: true\n },\n decorators: [\n Story => (\n <div className=\"bg-neutral-dark text-neutral-light p-xl\">\n <Story />\n </div>\n )\n ]\n};\n\nexport const WithForwardEventOnChange: Story = {\n args: {\n ...Default.args,\n forwardEventOnChange: true\n }\n};\n"],"names":["meta","InputPrimitive","args","value","setValue","useState","Default","MediumSize","LargeSize","ExtraLargeSize","WithStartIcon","Icon","NotificationsIcon","WithEndIcon","CalendarIcon","WithStartAndEndIcons","PrimaryVariant","PrimaryVariantDisabled","PrimaryVariantInvalid","SecondaryVariant","SecondaryVariantDisabled","SecondaryVariantInvalid","GhostVariant","GhostVariantDisabled","GhostVariantInvalid","GhostNegativeVariant","Story","GhostNegativeVariantDisabled","GhostNegativeVariantInvalid","WithForwardEventOnChange"],"mappings":";;;;;AAQA,MAAMA,OAAoC;IACtC,OAAO;IACP,WAAWC;IACX,UAAU;QACN,UAAU;YAAE,QAAQ;QAAW;QAC/B,SAAS;YAAE,QAAQ;QAAU;QAC7B,WAAW;YAAE,QAAQ;QAAY;QACjC,MAAM;YACF,SAAS;YACT,SAAS;gBACL;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;aACH;YACD,cAAc;QAClB;IACJ;IACA,YAAY;QACR,QAAQ;IACZ;IACA,QAAQC,CAAAA;QACJ,MAAM,C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;IACnC,MAAM;QACF,GAAGJ,qBAAqB,IAAI;QAC5B,SAAS;QACT,aAAa;IACjB;AACJ;AAEO,MAAMK,2BAAkC;IAC3C,MAAM;QACF,GAAGD,iBAAiB,IAAI;QACxB,UAAU;IACd;AACJ;AAEO,MAAME,0BAAiC;IAC1C,MAAM;QACF,GAAGF,iBAAiB,IAAI;QACxB,SAAS;IACb;AACJ;AAEO,MAAMG,eAAsB;IAC/B,MAAM;QACF,GAAGP,qBAAqB,IAAI;QAC5B,SAAS;QACT,aAAa;IACjB;AACJ;AAEO,MAAMQ,uBAA8B;IACvC,MAAM;QACF,GAAGD,aAAa,IAAI;QACpB,UAAU;IACd;AACJ;AAEO,MAAME,sBAA6B;IACtC,MAAM;QACF,GAAGF,aAAa,IAAI;QACpB,SAAS;IACb;AACJ;AAEO,MAAMG,uBAA8B;IACvC,MAAM;QACF,GAAGV,qBAAqB,IAAI;QAC5B,SAAS;QACT,aAAa;IACjB;IACA,YAAY;QACRW,CAAAA,QAAAA,WAAAA,GACI,oBAAC;gBAAI,WAAU;6BACX,oBAACA,OAAAA;KAGZ;AACL;AAEO,MAAMC,+BAAsC;IAC/C,MAAM;QACF,GAAGF,qBAAqB,IAAI;QAC5B,UAAU;IACd;IACA,YAAY;QACRC,CAAAA,QAAAA,WAAAA,GACI,oBAAC;gBAAI,WAAU;6BACX,oBAACA,OAAAA;KAGZ;AACL;AAEO,MAAME,8BAAqC;IAC9C,MAAM;QACF,GAAGH,qBAAqB,IAAI;QAC5B,SAAS;IACb;IACA,YAAY;QACRC,CAAAA,QAAAA,WAAAA,GACI,oBAAC;gBAAI,WAAU;6BACX,oBAACA,OAAAA;KAGZ;AACL;AAEO,MAAMG,2BAAkC;IAC3C,MAAM;QACF,GAAGvB,QAAQ,IAAI;QACf,sBAAsB;IAC1B;AACJ"}
package/Label/Label.d.ts CHANGED
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { Label as LabelPrimitive } from "radix-ui";
3
3
  import { type VariantProps } from "../utils.js";
4
4
  declare const labelVariants: (props?: ({
5
- weight?: "strong" | "light" | null | undefined;
5
+ weight?: "light" | "strong" | null | undefined;
6
6
  disabled?: boolean | null | undefined;
7
7
  invalid?: boolean | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -14,21 +14,22 @@ interface LabelProps extends Omit<React.ComponentPropsWithoutRef<typeof LabelPri
14
14
  required?: boolean;
15
15
  disabled?: boolean;
16
16
  }
17
- declare const Label: (({ className, disabled, description, hint, required, value, text, weight, invalid, ...props }: LabelProps) => React.JSX.Element | null) & {
18
- original: ({ className, disabled, description, hint, required, value, text, weight, invalid, ...props }: LabelProps) => React.JSX.Element | null;
17
+ declare const LabelBase: ({ className, disabled, description, hint, required, value, text, weight, invalid, ...props }: LabelProps) => React.JSX.Element | null;
18
+ declare const Label: typeof LabelBase & {
19
+ original: typeof LabelBase;
19
20
  originalName: string;
20
21
  displayName: string;
21
22
  } & {
22
- original: (({ className, disabled, description, hint, required, value, text, weight, invalid, ...props }: LabelProps) => React.JSX.Element | null) & {
23
- original: ({ className, disabled, description, hint, required, value, text, weight, invalid, ...props }: LabelProps) => React.JSX.Element | null;
23
+ original: typeof LabelBase & {
24
+ original: typeof LabelBase;
24
25
  originalName: string;
25
26
  displayName: string;
26
27
  };
27
28
  originalName: string;
28
29
  displayName: string;
29
30
  } & {
30
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ className, disabled, description, hint, required, value, text, weight, invalid, ...props }: LabelProps) => React.JSX.Element | null) & {
31
- original: ({ className, disabled, description, hint, required, value, text, weight, invalid, ...props }: LabelProps) => React.JSX.Element | null;
31
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof LabelBase & {
32
+ original: typeof LabelBase;
32
33
  originalName: string;
33
34
  displayName: string;
34
35
  }>) => (props: unknown) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { Label } from "./Label.js";
3
3
  declare const meta: Meta<typeof Label>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"Label/Label.stories.js","sources":["../../src/Label/Label.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\n\nimport { Label } from \"./Label.js\";\nimport { Tooltip } from \"~/Tooltip/index.js\";\nimport { Input } from \"~/Input/index.js\";\n\nconst meta: Meta<typeof Label> = {\n title: \"Components/Form/Label\",\n component: Label,\n parameters: {\n layout: \"padded\"\n },\n decorators: [\n Story => (\n <Tooltip.Provider>\n <Story />\n </Tooltip.Provider>\n )\n ]\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Label>;\n\nexport const Documentation: Story = {\n render: args => {\n const [value, setValue] = React.useState(\"\");\n\n return (\n <div className=\"mb-4 space-y-2\">\n <Label {...args} />\n <Input\n id={args.htmlFor}\n type=\"text\"\n placeholder=\"e.g. John Michael Doe\"\n required={args.required}\n value={value}\n onChange={e => setValue(e.target.value)}\n />\n </div>\n );\n },\n args: {\n text: \"Full Name\",\n htmlFor: \"full-name\",\n description: \"As shown on your government-issued ID\",\n hint: \"Include middle name if applicable\",\n required: true,\n disabled: false,\n weight: \"strong\",\n value: \"Label value will be shown here\",\n invalid: false\n },\n argTypes: {\n text: {\n description: \"The text content of the label\",\n control: \"text\"\n },\n htmlFor: {\n description: \"The ID of the form element this label is associated with\",\n control: \"text\"\n },\n description: {\n description: \"Additional descriptive text shown next to the label\",\n control: \"text\"\n },\n hint: {\n description: \"Tooltip hint text that appears on hover\",\n control: \"text\"\n },\n required: {\n description: \"Whether the associated form field is required\",\n control: \"boolean\"\n },\n disabled: {\n description: \"Whether the label should appear disabled\",\n control: \"boolean\"\n },\n weight: {\n description: \"The font weight of the label text\",\n control: \"select\",\n options: [\"strong\", \"light\"]\n },\n value: {\n description: \"Optional value to display on the right side of the label\",\n control: \"text\"\n },\n invalid: {\n description: \"Whether the label should appear in an invalid state\",\n control: \"boolean\"\n }\n }\n};\n\nexport const Default: Story = {\n args: {\n text: \"Test label\",\n htmlFor: \"test-field\"\n },\n render: args => (\n <>\n <input type=\"checkbox\" id={args.htmlFor} />\n <Label {...args} />\n </>\n )\n};\n\nexport const LightWeight: Story = {\n args: {\n ...Default.args,\n weight: \"light\"\n }\n};\n\nexport const Required: Story = {\n args: {\n ...Default.args,\n required: true\n }\n};\n\nexport const WithDescription: Story = {\n args: {\n ...Default.args,\n description: \"(description)\"\n }\n};\n\nexport const WithHint: Story = {\n args: {\n ...Default.args,\n hint: \"This is an additional message in case context to this label needs to be added\"\n }\n};\n\nexport const WithValue: Story = {\n args: {\n ...Default.args,\n value: 24\n },\n render: args => (\n <div className=\"w-64\">\n <Label {...args} />\n </div>\n )\n};\n\nexport const Disabled: Story = {\n args: {\n htmlFor: \"test-field-disabled\",\n text: \"Test label\",\n description: \"(description)\",\n hint: \"This is an additional message in case context to this label needs to be added\",\n required: true,\n disabled: true,\n value: 24\n },\n render: args => (\n <div className=\"w-64\">\n <Label {...args} />\n </div>\n )\n};\n"],"names":["meta","Label","Story","Tooltip","Documentation","args","value","setValue","React","Input","e","Default","LightWeight","Required","WithDescription","WithHint","WithValue","Disabled"],"mappings":";;;;AAOA,MAAMA,OAA2B;IAC7B,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;IACA,YAAY;QACRC,CAAAA,QAAAA,WAAAA,GACI,oBAACC,QAAQ,QAAQ,sBACb,oBAACD,OAAAA;KAGZ;AACL;AAEA,sBAAeF;AAGR,MAAMI,gBAAuB;IAChC,QAAQC,CAAAA;QACJ,MAAM,CAACC,OAAOC,SAAS,GAAGC,MAAAA,QAAc,CAAC;QAEzC,OAAO,WAAP,GACI,oBAAC;YAAI,WAAU;yBACX,oBAACP,OAAUI,OAAAA,WAAAA,GACX,oBAACI,OAAKA;YACF,IAAIJ,KAAK,OAAO;YAChB,MAAK;YACL,aAAY;YACZ,U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;YAAI,WAAU;yBACX,oBAACJ,OAAUI;AAGvB;AAEO,MAAMY,WAAkB;IAC3B,MAAM;QACF,SAAS;QACT,MAAM;QACN,aAAa;QACb,MAAM;QACN,UAAU;QACV,UAAU;QACV,OAAO;IACX;IACA,QAAQZ,CAAAA,OAAAA,WAAAA,GACJ,oBAAC;YAAI,WAAU;yBACX,oBAACJ,OAAUI;AAGvB"}
1
+ {"version":3,"file":"Label/Label.stories.js","sources":["../../src/Label/Label.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\n\nimport { Label } from \"./Label.js\";\nimport { Tooltip } from \"~/Tooltip/index.js\";\nimport { Input } from \"~/Input/index.js\";\n\nconst meta: Meta<typeof Label> = {\n title: \"Components/Form/Label\",\n component: Label,\n parameters: {\n layout: \"padded\"\n },\n decorators: [\n Story => (\n <Tooltip.Provider>\n <Story />\n </Tooltip.Provider>\n )\n ]\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Label>;\n\nexport const Documentation: Story = {\n render: args => {\n const [value, setValue] = React.useState(\"\");\n\n return (\n <div className=\"mb-4 space-y-2\">\n <Label {...args} />\n <Input\n id={args.htmlFor}\n type=\"text\"\n placeholder=\"e.g. John Michael Doe\"\n required={args.required}\n value={value}\n onChange={e => setValue(e.target.value)}\n />\n </div>\n );\n },\n args: {\n text: \"Full Name\",\n htmlFor: \"full-name\",\n description: \"As shown on your government-issued ID\",\n hint: \"Include middle name if applicable\",\n required: true,\n disabled: false,\n weight: \"strong\",\n value: \"Label value will be shown here\",\n invalid: false\n },\n argTypes: {\n text: {\n description: \"The text content of the label\",\n control: \"text\"\n },\n htmlFor: {\n description: \"The ID of the form element this label is associated with\",\n control: \"text\"\n },\n description: {\n description: \"Additional descriptive text shown next to the label\",\n control: \"text\"\n },\n hint: {\n description: \"Tooltip hint text that appears on hover\",\n control: \"text\"\n },\n required: {\n description: \"Whether the associated form field is required\",\n control: \"boolean\"\n },\n disabled: {\n description: \"Whether the label should appear disabled\",\n control: \"boolean\"\n },\n weight: {\n description: \"The font weight of the label text\",\n control: \"select\",\n options: [\"strong\", \"light\"]\n },\n value: {\n description: \"Optional value to display on the right side of the label\",\n control: \"text\"\n },\n invalid: {\n description: \"Whether the label should appear in an invalid state\",\n control: \"boolean\"\n }\n }\n};\n\nexport const Default: Story = {\n args: {\n text: \"Test label\",\n htmlFor: \"test-field\"\n },\n render: args => (\n <>\n <input type=\"checkbox\" id={args.htmlFor} />\n <Label {...args} />\n </>\n )\n};\n\nexport const LightWeight: Story = {\n args: {\n ...Default.args,\n weight: \"light\"\n }\n};\n\nexport const Required: Story = {\n args: {\n ...Default.args,\n required: true\n }\n};\n\nexport const WithDescription: Story = {\n args: {\n ...Default.args,\n description: \"(description)\"\n }\n};\n\nexport const WithHint: Story = {\n args: {\n ...Default.args,\n hint: \"This is an additional message in case context to this label needs to be added\"\n }\n};\n\nexport const WithValue: Story = {\n args: {\n ...Default.args,\n value: 24\n },\n render: args => (\n <div className=\"w-64\">\n <Label {...args} />\n </div>\n )\n};\n\nexport const Disabled: Story = {\n args: {\n htmlFor: \"test-field-disabled\",\n text: \"Test label\",\n description: \"(description)\",\n hint: \"This is an additional message in case context to this label needs to be added\",\n required: true,\n disabled: true,\n value: 24\n },\n render: args => (\n <div className=\"w-64\">\n <Label {...args} />\n </div>\n )\n};\n"],"names":["meta","Label","Story","Tooltip","Documentation","args","value","setValue","React","Input","e","Default","LightWeight","Required","WithDescription","WithHint","WithValue","Disabled"],"mappings":";;;;AAOA,MAAMA,OAA2B;IAC7B,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;IACA,YAAY;QACRC,CAAAA,QAAAA,WAAAA,GACI,oBAACC,QAAQ,QAAQ,sBACb,oBAACD,OAAAA;KAGZ;AACL;AAEA,sBAAeF;AAGR,MAAMI,gBAAuB;IAChC,QAAQC,CAAAA;QACJ,MAAM,CAACC,OAAOC,SAAS,GAAGC,MAAAA,QAAc,CAAC;QAEzC,OA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;QACf,MAAM;IACV;AACJ;AAEO,MAAMK,YAAmB;IAC5B,MAAM;QACF,GAAGL,QAAQ,IAAI;QACf,OAAO;IACX;IACA,QAAQN,CAAAA,OAAAA,WAAAA,GACJ,oBAAC;YAAI,WAAU;yBACX,oBAACJ,OAAUI;AAGvB;AAEO,MAAMY,WAAkB;IAC3B,MAAM;QACF,SAAS;QACT,MAAM;QACN,aAAa;QACb,MAAM;QACN,UAAU;QACV,UAAU;QACV,OAAO;IACX;IACA,QAAQZ,CAAAA,OAAAA,WAAAA,GACJ,oBAAC;YAAI,WAAU;yBACX,oBAACJ,OAAUI;AAGvB"}
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "../../utils.js";
3
3
  declare const labelValueVariants: (props?: ({
4
- weight?: "strong" | "light" | null | undefined;
4
+ weight?: "light" | "strong" | null | undefined;
5
5
  disabled?: boolean | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  interface LabelValueProps extends VariantProps<typeof labelValueVariants> {
package/Link/Link.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
2
  import { type VariantProps } from "../utils.js";
3
3
  import { LinkComponentProps } from "./LinkComponent.js";
4
- declare const linkVariants: (props?: ({
5
- size?: "sm" | "md" | "lg" | "xl" | "inherit" | null | undefined;
6
- variant?: "primary" | "secondary" | "primary-negative" | "secondary-negative" | null | undefined;
4
+ export declare const linkVariants: (props?: ({
5
+ size?: "inherit" | "lg" | "md" | "sm" | "xl" | null | undefined;
6
+ variant?: "primary" | "primary-negative" | "secondary" | "secondary-negative" | null | undefined;
7
7
  underline?: boolean | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  export type LinkProps = LinkComponentProps & VariantProps<typeof linkVariants> & {
package/Link/Link.js CHANGED
@@ -51,6 +51,6 @@ function LinkBase({ size, variant, underline, className, children, ...rest }) {
51
51
  }, children);
52
52
  }
53
53
  const Link = makeDecoratable("Link", LinkBase);
54
- export { Link };
54
+ export { Link, linkVariants };
55
55
 
56
56
  //# sourceMappingURL=Link.js.map
package/Link/Link.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Link/Link.js","sources":["../../src/Link/Link.tsx"],"sourcesContent":["import React from \"react\";\nimport { cva, type VariantProps, makeDecoratable, cn } from \"~/utils.js\";\nimport { useAdminUi } from \"~/index.js\";\nimport { LinkComponentProps } from \"./LinkComponent.js\";\n\nconst linkVariants = cva(\"font-sans rounded-xs\", {\n variants: {\n size: {\n inherit: \"[font-size:inherit]\",\n sm: \"text-sm\",\n md: \"text-md\",\n lg: \"text-lg\",\n xl: \"text-xl\"\n },\n variant: {\n primary: [\n \"text-accent-primary\",\n \"focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-primary-dimmed\"\n ],\n secondary: [\n \"text-neutral-primary\",\n \"focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-primary-dimmed\"\n ],\n \"primary-negative\": [\n \"text-accent-primary\",\n \"focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-primary-strong\"\n ],\n \"secondary-negative\": [\n \"text-neutral-light\",\n \"focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-primary-strong\"\n ]\n },\n underline: {\n true: \"underline hover:no-underline\",\n false: \"hover:underline\"\n }\n },\n defaultVariants: {\n size: \"inherit\",\n variant: \"primary\",\n underline: false\n }\n});\n\nexport type LinkProps = LinkComponentProps &\n VariantProps<typeof linkVariants> & {\n disabled?: boolean;\n };\n\nfunction LinkBase({ size, variant, underline, className, children, ...rest }: LinkProps) {\n const { linkComponent: LinkComponent } = useAdminUi();\n return (\n <LinkComponent\n {...rest}\n className={cn(linkVariants({ size, variant, underline }), className)}\n >\n {children}\n </LinkComponent>\n );\n}\n\nexport const Link = makeDecoratable(\"Link\", LinkBase);\n"],"names":["linkVariants","cva","LinkBase","size","variant","underline","className","children","rest","LinkComponent","useAdminUi","cn","Link","makeDecoratable"],"mappings":";;;AAKA,MAAMA,eAAeC,IAAI,wBAAwB;IAC7C,UAAU;QACN,MAAM;YACF,SAAS;YACT,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,IAAI;QACR;QACA,SAAS;YACL,SAAS;gBACL;gBACA;aACH;YACD,WAAW;gBACP;gBACA;aACH;YACD,oBAAoB;gBAChB;gBACA;aACH;YACD,sBAAsB;gBAClB;gBACA;aACH;QACL;QACA,WAAW;YACP,MAAM;YACN,OAAO;QACX;IACJ;IACA,iBAAiB;QACb,MAAM;QACN,SAAS;QACT,WAAW;IACf;AACJ;AAOA,SAASC,SAAS,EAAEC,IAAI,EAAEC,OAAO,EAAEC,SAAS,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,MAAiB;IACnF,MAAM,EAAE,eAAeC,aAAa,EAAE,GAAGC;IACzC,OAAO,WAAP,GACI,oBAACD,eAAAA;QACI,GAAGD,IAAI;QACR,WAAWG,GAAGX,aAAa;YAAEG;YAAMC;YAASC;QAAU,IAAIC;OAEzDC;AAGb;AAEO,MAAMK,OAAOC,gBAAgB,QAAQX"}
1
+ {"version":3,"file":"Link/Link.js","sources":["../../src/Link/Link.tsx"],"sourcesContent":["import React from \"react\";\nimport { cva, type VariantProps, makeDecoratable, cn } from \"~/utils.js\";\nimport { useAdminUi } from \"~/index.js\";\nimport { LinkComponentProps } from \"./LinkComponent.js\";\n\nexport const linkVariants = cva(\"font-sans rounded-xs\", {\n variants: {\n size: {\n inherit: \"[font-size:inherit]\",\n sm: \"text-sm\",\n md: \"text-md\",\n lg: \"text-lg\",\n xl: \"text-xl\"\n },\n variant: {\n primary: [\n \"text-accent-primary\",\n \"focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-primary-dimmed\"\n ],\n secondary: [\n \"text-neutral-primary\",\n \"focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-primary-dimmed\"\n ],\n \"primary-negative\": [\n \"text-accent-primary\",\n \"focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-primary-strong\"\n ],\n \"secondary-negative\": [\n \"text-neutral-light\",\n \"focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-primary-strong\"\n ]\n },\n underline: {\n true: \"underline hover:no-underline\",\n false: \"hover:underline\"\n }\n },\n defaultVariants: {\n size: \"inherit\",\n variant: \"primary\",\n underline: false\n }\n});\n\nexport type LinkProps = LinkComponentProps &\n VariantProps<typeof linkVariants> & {\n disabled?: boolean;\n };\n\nfunction LinkBase({ size, variant, underline, className, children, ...rest }: LinkProps) {\n const { linkComponent: LinkComponent } = useAdminUi();\n return (\n <LinkComponent\n {...rest}\n className={cn(linkVariants({ size, variant, underline }), className)}\n >\n {children}\n </LinkComponent>\n );\n}\n\nexport const Link = makeDecoratable(\"Link\", LinkBase);\n"],"names":["linkVariants","cva","LinkBase","size","variant","underline","className","children","rest","LinkComponent","useAdminUi","cn","Link","makeDecoratable"],"mappings":";;;AAKO,MAAMA,eAAeC,IAAI,wBAAwB;IACpD,UAAU;QACN,MAAM;YACF,SAAS;YACT,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,IAAI;QACR;QACA,SAAS;YACL,SAAS;gBACL;gBACA;aACH;YACD,WAAW;gBACP;gBACA;aACH;YACD,oBAAoB;gBAChB;gBACA;aACH;YACD,sBAAsB;gBAClB;gBACA;aACH;QACL;QACA,WAAW;YACP,MAAM;YACN,OAAO;QACX;IACJ;IACA,iBAAiB;QACb,MAAM;QACN,SAAS;QACT,WAAW;IACf;AACJ;AAOA,SAASC,SAAS,EAAEC,IAAI,EAAEC,OAAO,EAAEC,SAAS,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,MAAiB;IACnF,MAAM,EAAE,eAAeC,aAAa,EAAE,GAAGC;IACzC,OAAO,WAAP,GACI,oBAACD,eAAAA;QACI,GAAGD,IAAI;QACR,WAAWG,GAAGX,aAAa;YAAEG;YAAMC;YAASC;QAAU,IAAIC;OAEzDC;AAGb;AAEO,MAAMK,OAAOC,gBAAgB,QAAQX"}
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { Link } from "./Link.js";
3
3
  declare const meta: Meta<typeof Link>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"Link/Link.stories.js","sources":["../../src/Link/Link.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { Link } from \"./Link.js\";\nimport { Text } from \"~/Text/index.js\";\nimport { AdminUiProvider } from \"~/AdminUiProvider/index.js\";\nimport { LinkComponentProps } from \"~/Link/LinkComponent.js\";\n\nconst NoopLinkComponent = ({ to, ...props }: LinkComponentProps) => {\n return (\n <a\n href={to}\n {...props}\n onClick={e => {\n e.preventDefault();\n }}\n />\n );\n};\n\nconst meta: Meta<typeof Link> = {\n title: \"Components/Link\",\n component: Link,\n decorators: [\n (Story: React.ComponentType) => (\n <AdminUiProvider linkComponent={NoopLinkComponent}>\n <Story />\n </AdminUiProvider>\n )\n ],\n argTypes: {\n size: { control: \"select\", options: [\"sm\", \"md\", \"lg\", \"xl\"] },\n variant: { control: \"select\", options: [\"primary\", \"secondary\"] }\n }\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof Link>;\n\nexport const Default: Story = {\n args: {\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const LinkXl: Story = {\n args: {\n size: \"xl\",\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const LinkLg: Story = {\n args: {\n size: \"lg\",\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const LinkMd: Story = {\n args: {\n size: \"md\",\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const LinkSm: Story = {\n args: {\n size: \"sm\",\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const InheritedSize: Story = {\n name: \"Link with inherited size\",\n render: linkProps => {\n return (\n <Text>\n <Text size=\"lg\">\n Size of this text is set to large, so,&nbsp;\n <Link {...linkProps}>this link&apos;s</Link> size is also automatically set to\n large.\n </Text>\n </Text>\n );\n },\n args: {\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const WithUnderline: Story = {\n args: {\n underline: true,\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const PrimaryNegative: Story = {\n decorators: [\n Story => (\n <div className=\"bg-[#25292e] p-[300px] rounded-[5px] text-neutral-dimmed\">\n <Story />\n </div>\n )\n ],\n render: args => {\n return (\n <Text>\n Lorem <Link {...args}>ipsum dolor sit amet</Link>, consectetur adipiscing elit.\n Fusce tempus tortor eu sapien interdum rhoncus.\n </Text>\n );\n },\n args: {\n ...Default.args,\n variant: \"primary-negative\"\n }\n};\n\nexport const SecondaryNegative: Story = {\n decorators: [\n Story => (\n <div className=\"bg-[#25292e] p-[300px] rounded-[5px] text-neutral-dimmed\">\n <Story />\n </div>\n )\n ],\n render: args => {\n return (\n <Text>\n Lorem <Link {...args}>ipsum dolor sit amet</Link>, consectetur adipiscing elit.\n Fusce tempus tortor eu sapien interdum rhoncus.\n </Text>\n );\n },\n args: {\n ...Default.args,\n variant: \"secondary-negative\"\n }\n};\n\nexport const Documentation: Story = {\n args: {\n to: \"#\",\n variant: \"primary\",\n size: \"md\",\n underline: false,\n disabled: false,\n children: \"This is a link\"\n },\n argTypes: {\n to: {\n description:\n \"The URL or path the link points to. If it’s a relative path, you can pass it as-is—it will automatically resolve based on the parent route. For a full URL, be sure to pass the complete address starting with `https://...`\",\n control: \"text\",\n defaultValue: \"#\"\n },\n variant: {\n description: \"Visual style of the link\",\n control: \"select\",\n options: [\"primary\", \"secondary\", \"primary-negative\", \"secondary-negative\"],\n defaultValue: \"primary\"\n },\n size: {\n description: \"Size of the link text\",\n control: \"select\",\n options: [\"inherit\", \"sm\", \"md\", \"lg\", \"xl\"],\n defaultValue: \"inherit\"\n },\n underline: {\n description: \"Whether the link should be underlined by default\",\n control: \"boolean\",\n defaultValue: false\n },\n disabled: {\n description: \"Whether the link is disabled\",\n control: \"boolean\",\n defaultValue: false\n },\n children: {\n description: \"The content of the link. It can be any valid React node.\",\n control: \"text\",\n defaultValue: \"This is a link\"\n }\n }\n};\n"],"names":["NoopLinkComponent","to","props","e","meta","Link","Story","AdminUiProvider","Default","LinkXl","LinkLg","LinkMd","LinkSm","InheritedSize","linkProps","Text","WithUnderline","PrimaryNegative","args","SecondaryNegative","Documentation"],"mappings":";;;;AAOA,MAAMA,oBAAoB,CAAC,EAAEC,EAAE,EAAE,GAAGC,OAA2B,GACpD,WAAP,GACI,oBAAC;QACG,MAAMD;QACL,GAAGC,KAAK;QACT,SAASC,CAAAA;YACLA,EAAE,cAAc;QACpB;;AAKZ,MAAMC,OAA0B;IAC5B,OAAO;IACP,WAAWC;IACX,YAAY;QACR,CAACC,QAAAA,WAAAA,GACG,oBAACC,iBAAeA;gBAAC,eAAeP;6BAC5B,oBAACM,OAAAA;KAGZ;IACD,UAAU;QACN,MAAM;YAAE,SAAS;YAAU,SAAS;gBAAC;gBAAM;gBAAM;gBAAM;aAAK;QAAC;QAC7D,SAAS;YAAE,SAAS;YAAU,SAAS;gBAAC;gBAAW;aAAY;QAAC;IACpE;AACJ;AAEA,qBAAeF;AAIR,MAAMI,UAAiB;IAC1B,MAAM;QACF,IAAI;QACJ,UACI;IACR;AAC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ACA,UAAU;QACN,IAAI;YACA,aACI;YACJ,SAAS;YACT,cAAc;QAClB;QACA,SAAS;YACL,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAW;gBAAa;gBAAoB;aAAqB;YAC3E,cAAc;QAClB;QACA,MAAM;YACF,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAW;gBAAM;gBAAM;gBAAM;aAAK;YAC5C,cAAc;QAClB;QACA,WAAW;YACP,aAAa;YACb,SAAS;YACT,cAAc;QAClB;QACA,UAAU;YACN,aAAa;YACb,SAAS;YACT,cAAc;QAClB;QACA,UAAU;YACN,aAAa;YACb,SAAS;YACT,cAAc;QAClB;IACJ;AACJ"}
1
+ {"version":3,"file":"Link/Link.stories.js","sources":["../../src/Link/Link.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Link } from \"./Link.js\";\nimport { Text } from \"~/Text/index.js\";\nimport { AdminUiProvider } from \"~/AdminUiProvider/index.js\";\nimport { LinkComponentProps } from \"~/Link/LinkComponent.js\";\n\nconst NoopLinkComponent = ({ to, ...props }: LinkComponentProps) => {\n return (\n <a\n href={to}\n {...props}\n onClick={e => {\n e.preventDefault();\n }}\n />\n );\n};\n\nconst meta: Meta<typeof Link> = {\n title: \"Components/Link\",\n component: Link,\n decorators: [\n (Story: React.ComponentType) => (\n <AdminUiProvider linkComponent={NoopLinkComponent}>\n <Story />\n </AdminUiProvider>\n )\n ],\n argTypes: {\n size: { control: \"select\", options: [\"sm\", \"md\", \"lg\", \"xl\"] },\n variant: { control: \"select\", options: [\"primary\", \"secondary\"] }\n }\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof Link>;\n\nexport const Default: Story = {\n args: {\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const LinkXl: Story = {\n args: {\n size: \"xl\",\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const LinkLg: Story = {\n args: {\n size: \"lg\",\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const LinkMd: Story = {\n args: {\n size: \"md\",\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const LinkSm: Story = {\n args: {\n size: \"sm\",\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const InheritedSize: Story = {\n name: \"Link with inherited size\",\n render: linkProps => {\n return (\n <Text>\n <Text size=\"lg\">\n Size of this text is set to large, so,&nbsp;\n <Link {...linkProps}>this link&apos;s</Link> size is also automatically set to\n large.\n </Text>\n </Text>\n );\n },\n args: {\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const WithUnderline: Story = {\n args: {\n underline: true,\n to: \"#\",\n children:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.\"\n }\n};\n\nexport const PrimaryNegative: Story = {\n decorators: [\n Story => (\n <div className=\"bg-[#25292e] p-[300px] rounded-[5px] text-neutral-dimmed\">\n <Story />\n </div>\n )\n ],\n render: args => {\n return (\n <Text>\n Lorem <Link {...args}>ipsum dolor sit amet</Link>, consectetur adipiscing elit.\n Fusce tempus tortor eu sapien interdum rhoncus.\n </Text>\n );\n },\n args: {\n ...Default.args,\n variant: \"primary-negative\"\n }\n};\n\nexport const SecondaryNegative: Story = {\n decorators: [\n Story => (\n <div className=\"bg-[#25292e] p-[300px] rounded-[5px] text-neutral-dimmed\">\n <Story />\n </div>\n )\n ],\n render: args => {\n return (\n <Text>\n Lorem <Link {...args}>ipsum dolor sit amet</Link>, consectetur adipiscing elit.\n Fusce tempus tortor eu sapien interdum rhoncus.\n </Text>\n );\n },\n args: {\n ...Default.args,\n variant: \"secondary-negative\"\n }\n};\n\nexport const Documentation: Story = {\n args: {\n to: \"#\",\n variant: \"primary\",\n size: \"md\",\n underline: false,\n disabled: false,\n children: \"This is a link\"\n },\n argTypes: {\n to: {\n description:\n \"The URL or path the link points to. If it’s a relative path, you can pass it as-is—it will automatically resolve based on the parent route. For a full URL, be sure to pass the complete address starting with `https://...`\",\n control: \"text\",\n defaultValue: \"#\"\n },\n variant: {\n description: \"Visual style of the link\",\n control: \"select\",\n options: [\"primary\", \"secondary\", \"primary-negative\", \"secondary-negative\"],\n defaultValue: \"primary\"\n },\n size: {\n description: \"Size of the link text\",\n control: \"select\",\n options: [\"inherit\", \"sm\", \"md\", \"lg\", \"xl\"],\n defaultValue: \"inherit\"\n },\n underline: {\n description: \"Whether the link should be underlined by default\",\n control: \"boolean\",\n defaultValue: false\n },\n disabled: {\n description: \"Whether the link is disabled\",\n control: \"boolean\",\n defaultValue: false\n },\n children: {\n description: \"The content of the link. It can be any valid React node.\",\n control: \"text\",\n defaultValue: \"This is a link\"\n }\n }\n};\n"],"names":["NoopLinkComponent","to","props","e","meta","Link","Story","AdminUiProvider","Default","LinkXl","LinkLg","LinkMd","LinkSm","InheritedSize","linkProps","Text","WithUnderline","PrimaryNegative","args","SecondaryNegative","Documentation"],"mappings":";;;;AAOA,MAAMA,oBAAoB,CAAC,EAAEC,EAAE,EAAE,GAAGC,OAA2B,GACpD,WAAP,GACI,oBAAC;QACG,MAAMD;QACL,GAAGC,KAAK;QACT,SAASC,CAAAA;YACLA,EAAE,cAAc;QACpB;;AAKZ,MAAMC,OAA0B;IAC5B,OAAO;IACP,WAAWC;IACX,YAAY;QACR,CAACC,QAAAA,WAAAA,GACG,oBAACC,iBAAeA;gBAAC,eAAeP;6BAC5B,oBAACM,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ACD,QAAQY,CAAAA,OACG,WAAP,GACI,oBAACH,MAAIA,MAAC,wBACI,oBAACV,MAASa,MAAM,yBAA2B;IAK7D,MAAM;QACF,GAAGV,QAAQ,IAAI;QACf,SAAS;IACb;AACJ;AAEO,MAAMY,gBAAuB;IAChC,MAAM;QACF,IAAI;QACJ,SAAS;QACT,MAAM;QACN,WAAW;QACX,UAAU;QACV,UAAU;IACd;IACA,UAAU;QACN,IAAI;YACA,aACI;YACJ,SAAS;YACT,cAAc;QAClB;QACA,SAAS;YACL,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAW;gBAAa;gBAAoB;aAAqB;YAC3E,cAAc;QAClB;QACA,MAAM;YACF,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAW;gBAAM;gBAAM;gBAAM;aAAK;YAC5C,cAAc;QAClB;QACA,WAAW;YACP,aAAa;YACb,SAAS;YACT,cAAc;QAClB;QACA,UAAU;YACN,aAAa;YACb,SAAS;YACT,cAAc;QAClB;QACA,UAAU;YACN,aAAa;YACb,SAAS;YACT,cAAc;QAClB;IACJ;AACJ"}
package/List/List.d.ts CHANGED
@@ -3,26 +3,27 @@ import { type VariantProps } from "../utils.js";
3
3
  import { type ListItemProps } from "./components/index.js";
4
4
  declare const listVariants: (props?: ({
5
5
  variant?: "container" | "underline" | null | undefined;
6
- background?: "base" | "transparent" | "light" | null | undefined;
6
+ background?: "base" | "light" | "transparent" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  interface ListProps extends VariantProps<typeof listVariants>, Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
9
9
  children: React.ReactNode;
10
10
  }
11
- declare const List: (({ children, variant, background, className, ...props }: ListProps) => React.JSX.Element) & {
12
- original: ({ children, variant, background, className, ...props }: ListProps) => React.JSX.Element;
11
+ declare const DecoratableList: ({ children, variant, background, className, ...props }: ListProps) => React.JSX.Element;
12
+ declare const List: typeof DecoratableList & {
13
+ original: typeof DecoratableList;
13
14
  originalName: string;
14
15
  displayName: string;
15
16
  } & {
16
- original: (({ children, variant, background, className, ...props }: ListProps) => React.JSX.Element) & {
17
- original: ({ children, variant, background, className, ...props }: ListProps) => React.JSX.Element;
17
+ original: typeof DecoratableList & {
18
+ original: typeof DecoratableList;
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.js").ComponentDecorator<(({ children, variant, background, className, ...props }: ListProps) => React.JSX.Element) & {
25
- original: ({ children, variant, background, className, ...props }: ListProps) => React.JSX.Element;
25
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableList & {
26
+ original: typeof DecoratableList;
26
27
  originalName: string;
27
28
  displayName: string;
28
29
  }>) => (props: unknown) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { List } from "./List.js";
3
3
  declare const meta: Meta<typeof List>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"List/List.stories.js","sources":["../../src/List/List.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as ChartIcon } from \"@webiny/icons/insert_chart.svg\";\nimport { ReactComponent as MoreIcon } from \"@webiny/icons/more_vert.svg\";\nimport { ReactComponent as OpenIcon } from \"@webiny/icons/visibility.svg\";\nimport { ReactComponent as EditIcon } from \"@webiny/icons/edit.svg\";\nimport { ReactComponent as TrashIcon } from \"@webiny/icons/delete.svg\";\nimport { ReactComponent as UserIcon } from \"@webiny/icons/person.svg\";\nimport { ReactComponent as SettingsIcon } from \"@webiny/icons/settings.svg\";\nimport { ReactComponent as HelpIcon } from \"@webiny/icons/help.svg\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { List, type ListItemProps as BaseListItemProps } from \"./List.js\";\nimport { Avatar } from \"~/Avatar/index.js\";\n\nconst meta: Meta<typeof List> = {\n title: \"Components/List\",\n component: List,\n parameters: {\n layout: \"padded\"\n }\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof List>;\n\ninterface ListItemProps extends Omit<BaseListItemProps, \"title\"> {\n index: number;\n}\n\nconst ListItem = (props: ListItemProps) => {\n return <List.Item title={`List item ${props.index}`} {...props} />;\n};\n\nexport const Default: Story = {\n args: {\n children: (\n <>\n <ListItem index={1} />\n <ListItem index={2} />\n <ListItem index={3} />\n </>\n )\n }\n};\n\nexport const WithTransparentBackground: Story = {\n args: {\n background: \"transparent\",\n children: (\n <>\n <List.Item\n icon={<UserIcon />}\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n />\n <List.Item\n icon={<SettingsIcon />}\n title=\"Settings\"\n description=\"Configure application settings\"\n />\n <List.Item\n icon={<HelpIcon />}\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n />\n </>\n )\n },\n decorators: [\n Story => (\n <div className=\"bg-neutral-light p-md\">\n <Story />\n </div>\n )\n ]\n};\n\nexport const WithBaseBackground: Story = {\n args: {\n ...Default.args,\n background: \"base\"\n }\n};\n\nexport const WithLightBackground: Story = {\n args: {\n background: \"light\",\n children: (\n <>\n <List.Item\n icon={<UserIcon />}\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n />\n <List.Item\n icon={<SettingsIcon />}\n title=\"Settings\"\n description=\"Configure application settings\"\n />\n <List.Item\n icon={<HelpIcon />}\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n />\n </>\n )\n }\n};\n\nexport const WithUnderlineVariant: Story = {\n args: {\n ...Default.args,\n variant: \"underline\"\n }\n};\n\nexport const WithContainerVariant: Story = {\n args: {\n variant: \"container\",\n children: (\n <>\n <List.Item\n icon={<UserIcon />}\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n />\n <List.Item\n icon={<SettingsIcon />}\n title=\"Settings\"\n description=\"Configure application settings\"\n />\n <List.Item\n icon={<HelpIcon />}\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n />\n </>\n )\n },\n decorators: [\n Story => (\n <div className=\"bg-neutral-light p-md\">\n <Story />\n </div>\n )\n ]\n};\n\nexport const WithDescription: Story = {\n args: {\n children: (\n <>\n <List.Item\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n />\n <List.Item title=\"Settings\" description=\"Configure application settings\" />\n <List.Item\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n />\n </>\n )\n }\n};\n\nexport const WithIcon: Story = {\n args: {\n children: (\n <>\n <List.Item icon={<UserIcon />} title=\"User Profile\" />\n <List.Item icon={<SettingsIcon />} title=\"Settings\" />\n <List.Item icon={<HelpIcon />} title=\"Help & Support\" />\n </>\n )\n }\n};\n\nexport const WithIconsAndDescriptions: Story = {\n args: {\n children: (\n <>\n <List.Item\n icon={<UserIcon />}\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n />\n <List.Item\n icon={<SettingsIcon />}\n title=\"Settings\"\n description=\"Configure application settings\"\n />\n <List.Item\n icon={<HelpIcon />}\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n />\n </>\n )\n }\n};\n\nexport const WithAvatar: Story = {\n args: {\n ...Default.args,\n children: (\n <>\n <ListItem\n index={1}\n description=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n icon={\n <Avatar\n image={\n <Avatar.Image src=\"https://i.pravatar.cc/300?img=1\" alt=\"@webiny\" />\n }\n fallback={<Avatar.Fallback>W</Avatar.Fallback>}\n />\n }\n />\n <ListItem\n index={2}\n description=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n icon={\n <Avatar\n image={\n <Avatar.Image src=\"https://i.pravatar.cc/300?img=2\" alt=\"@webiny\" />\n }\n fallback={<Avatar.Fallback>W</Avatar.Fallback>}\n />\n }\n />\n </>\n )\n }\n};\n\nexport const WithHandle: Story = {\n args: {\n ...Default.args,\n children: (\n <>\n <ListItem\n index={1}\n description=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n handle={<List.Item.Handle />}\n />\n <ListItem\n index={2}\n description=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n handle={<List.Item.Handle />}\n />\n </>\n )\n }\n};\n\nexport const WithActions: Story = {\n ...Default,\n args: {\n children: (\n <>\n <ListItem\n index={1}\n description=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n icon={<List.Item.Icon icon={<ChartIcon />} label={\"Chart\"} />}\n actions={\n <>\n <List.Item.Action icon={<EditIcon />} />\n <List.Item.Action icon={<TrashIcon />} />\n <List.Item.Action.Separator />\n <List.Item.Action icon={<OpenIcon />} />\n <List.Item.Action icon={<MoreIcon />} />\n </>\n }\n />\n <ListItem\n index={2}\n description=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n icon={<List.Item.Icon icon={<ChartIcon />} label={\"Chart\"} />}\n actions={\n <>\n <List.Item.Action icon={<EditIcon />} />\n <List.Item.Action icon={<TrashIcon />} />\n <List.Item.Action.Separator />\n <List.Item.Action icon={<OpenIcon />} />\n <List.Item.Action icon={<MoreIcon />} />\n </>\n }\n />\n </>\n )\n }\n};\n\nexport const WithDisabled: Story = {\n args: {\n children: (\n <>\n <List.Item\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n onClick={() => alert(\"User Profile clicked\")}\n />\n <List.Item\n title=\"Settings\"\n description=\"Configure application settings\"\n disabled={true}\n onClick={() => alert(\"This alert won't show because the item is disabled\")}\n />\n <List.Item\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n onClick={() => alert(\"Help & Support clicked\")}\n />\n </>\n )\n }\n};\n\nexport const WithActivated: Story = {\n args: {\n children: (\n <>\n <List.Item\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n activated={true}\n onClick={() => console.log(\"User Profile clicked\")}\n />\n <List.Item\n title=\"Settings\"\n description=\"Configure application settings\"\n onClick={() => console.log(\"Settings clicked\")}\n />\n <List.Item\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n onClick={() => console.log(\"Help & Support clicked\")}\n />\n </>\n )\n }\n};\n\nexport const WithClickHandlers: Story = {\n args: {\n children: (\n <>\n <List.Item\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n onClick={() => alert(\"User Profile clicked\")}\n />\n <List.Item\n title=\"Settings\"\n description=\"Configure application settings\"\n onClick={() => alert(\"Settings clicked\")}\n />\n <List.Item\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n onClick={() => alert(\"Help & Support clicked\")}\n />\n </>\n )\n }\n};\n\nexport const WithSelectedItem: Story = {\n render: () => {\n // Using render function to handle state\n const [selectedIndex, setSelectedIndex] = React.useState(0);\n\n return (\n <List>\n <List.Item\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n selected={selectedIndex === 0}\n onClick={() => setSelectedIndex(0)}\n />\n <List.Item\n title=\"Settings\"\n description=\"Configure application settings\"\n selected={selectedIndex === 1}\n onClick={() => setSelectedIndex(1)}\n />\n <List.Item\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n selected={selectedIndex === 2}\n onClick={() => setSelectedIndex(2)}\n />\n </List>\n );\n }\n};\n\nexport const Documentation: Story = {\n args: {\n variant: \"underline\",\n background: \"base\",\n children: (\n <>\n <List.Item\n icon={<UserIcon />}\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n onClick={() => console.log(\"User Profile clicked\")}\n />\n <List.Item\n icon={<SettingsIcon />}\n title=\"Settings\"\n description=\"Configure application settings\"\n onClick={() => console.log(\"Settings clicked\")}\n />\n <List.Item\n icon={<HelpIcon />}\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n onClick={() => console.log(\"Help & Support clicked\")}\n />\n </>\n )\n },\n argTypes: {\n variant: {\n control: \"select\",\n options: [\"underline\", \"container\"],\n description: \"The visual style of the list\"\n },\n background: {\n control: \"select\",\n options: [\"base\", \"light\", \"transparent\"],\n description: \"The background color of the list\"\n },\n children: {\n description: \"The content of the list. Please refer to the example code for details.\"\n }\n },\n parameters: {\n docs: {\n description: {\n story: \"This example shows a List with icons, titles, descriptions, and click handlers.\"\n }\n }\n }\n};\n"],"names":["meta","List","ListItem","props","Default","WithTransparentBackground","UserIcon","SettingsIcon","HelpIcon","Story","WithBaseBackground","WithLightBackground","WithUnderlineVariant","WithContainerVariant","WithDescription","WithIcon","WithIconsAndDescriptions","WithAvatar","Avatar","WithHandle","WithActions","ChartIcon","EditIcon","TrashIcon","OpenIcon","MoreIcon","WithDisabled","alert","WithActivated","console","WithClickHandlers","WithSelectedItem","selectedIndex","setSelectedIndex","React","Documentation"],"mappings":";;;;;;;;;;;AAaA,MAAMA,OAA0B;IAC5B,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;AACJ;AAEA,qBAAeD;AAQf,MAAME,WAAW,CAACC,QACP,WAAP,GAAO,oBAACF,KAAK,IAAI;QAAC,OAAO,CAAC,UAAU,EAAEE,MAAM,KAAK,EAAE;QAAG,GAAGA,KAAK;;AAG3D,MAAMC,UAAiB;IAC1B,MAAM;QACF,UAAU,WAAV,GACI,wDACI,oBAACF,UAAQA;YAAC,OAAO;0BACjB,oBAACA,UAAQA;YAAC,OAAO;0BACjB,oBAACA,UAAQA;YAAC,OAAO;;IAG7B;AACJ;AAEO,MAAMG,4BAAmC;IAC5C,MAAM;QACF,YAAY;QACZ,UAAU,WAAV,GACI,wDACI,oBAACJ,KAAK,IAAI;YACN,oBAAM,oBAACK,2BAAQA;YACf,OAAM;YACN,aAAY;0BAEhB,oBAACL,KAAK,IAAI;YACN,oBAAM,oBAACM,6BAAYA;YACnB,OAAM;YACN,aAAY;0BAEhB,oBAACN,KAAK,IAAI;YACN,oBAAM,oBAACO,yBAAQA;YACf,OAAM;YACN,aAAY;;IAI5B;IACA,YAAY;QACRC,CAAAA,QAAAA,WAAAA,GACI,oBAAC;gBAAI,WAAU;6BACX,oBAACA,OAAAA;KAGZ;AACL;AAEO,MAAMC,qBAA4B;IACrC,MAAM;QACF,GAAGN,QAAQ,IAAI;QACf,YAAY;I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ACK,2BAAQA;YACf,OAAM;YACN,aAAY;YACZ,SAAS,IAAMuB,QAAQ,GAAG,CAAC;0BAE/B,oBAAC5B,KAAK,IAAI;YACN,oBAAM,oBAACM,6BAAYA;YACnB,OAAM;YACN,aAAY;YACZ,SAAS,IAAMsB,QAAQ,GAAG,CAAC;0BAE/B,oBAAC5B,KAAK,IAAI;YACN,oBAAM,oBAACO,yBAAQA;YACf,OAAM;YACN,aAAY;YACZ,SAAS,IAAMqB,QAAQ,GAAG,CAAC;;IAI3C;IACA,UAAU;QACN,SAAS;YACL,SAAS;YACT,SAAS;gBAAC;gBAAa;aAAY;YACnC,aAAa;QACjB;QACA,YAAY;YACR,SAAS;YACT,SAAS;gBAAC;gBAAQ;gBAAS;aAAc;YACzC,aAAa;QACjB;QACA,UAAU;YACN,aAAa;QACjB;IACJ;IACA,YAAY;QACR,MAAM;YACF,aAAa;gBACT,OAAO;YACX;QACJ;IACJ;AACJ"}
1
+ {"version":3,"file":"List/List.stories.js","sources":["../../src/List/List.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as ChartIcon } from \"@webiny/icons/insert_chart.svg\";\nimport { ReactComponent as MoreIcon } from \"@webiny/icons/more_vert.svg\";\nimport { ReactComponent as OpenIcon } from \"@webiny/icons/visibility.svg\";\nimport { ReactComponent as EditIcon } from \"@webiny/icons/edit.svg\";\nimport { ReactComponent as TrashIcon } from \"@webiny/icons/delete.svg\";\nimport { ReactComponent as UserIcon } from \"@webiny/icons/person.svg\";\nimport { ReactComponent as SettingsIcon } from \"@webiny/icons/settings.svg\";\nimport { ReactComponent as HelpIcon } from \"@webiny/icons/help.svg\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { List, type ListItemProps as BaseListItemProps } from \"./List.js\";\nimport { Avatar } from \"~/Avatar/index.js\";\n\nconst meta: Meta<typeof List> = {\n title: \"Components/List\",\n component: List,\n parameters: {\n layout: \"padded\"\n }\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof List>;\n\ninterface ListItemProps extends Omit<BaseListItemProps, \"title\"> {\n index: number;\n}\n\nconst ListItem = (props: ListItemProps) => {\n return <List.Item title={`List item ${props.index}`} {...props} />;\n};\n\nexport const Default: Story = {\n args: {\n children: (\n <>\n <ListItem index={1} />\n <ListItem index={2} />\n <ListItem index={3} />\n </>\n )\n }\n};\n\nexport const WithTransparentBackground: Story = {\n args: {\n background: \"transparent\",\n children: (\n <>\n <List.Item\n icon={<UserIcon />}\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n />\n <List.Item\n icon={<SettingsIcon />}\n title=\"Settings\"\n description=\"Configure application settings\"\n />\n <List.Item\n icon={<HelpIcon />}\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n />\n </>\n )\n },\n decorators: [\n Story => (\n <div className=\"bg-neutral-light p-md\">\n <Story />\n </div>\n )\n ]\n};\n\nexport const WithBaseBackground: Story = {\n args: {\n ...Default.args,\n background: \"base\"\n }\n};\n\nexport const WithLightBackground: Story = {\n args: {\n background: \"light\",\n children: (\n <>\n <List.Item\n icon={<UserIcon />}\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n />\n <List.Item\n icon={<SettingsIcon />}\n title=\"Settings\"\n description=\"Configure application settings\"\n />\n <List.Item\n icon={<HelpIcon />}\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n />\n </>\n )\n }\n};\n\nexport const WithUnderlineVariant: Story = {\n args: {\n ...Default.args,\n variant: \"underline\"\n }\n};\n\nexport const WithContainerVariant: Story = {\n args: {\n variant: \"container\",\n children: (\n <>\n <List.Item\n icon={<UserIcon />}\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n />\n <List.Item\n icon={<SettingsIcon />}\n title=\"Settings\"\n description=\"Configure application settings\"\n />\n <List.Item\n icon={<HelpIcon />}\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n />\n </>\n )\n },\n decorators: [\n Story => (\n <div className=\"bg-neutral-light p-md\">\n <Story />\n </div>\n )\n ]\n};\n\nexport const WithDescription: Story = {\n args: {\n children: (\n <>\n <List.Item\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n />\n <List.Item title=\"Settings\" description=\"Configure application settings\" />\n <List.Item\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n />\n </>\n )\n }\n};\n\nexport const WithIcon: Story = {\n args: {\n children: (\n <>\n <List.Item icon={<UserIcon />} title=\"User Profile\" />\n <List.Item icon={<SettingsIcon />} title=\"Settings\" />\n <List.Item icon={<HelpIcon />} title=\"Help & Support\" />\n </>\n )\n }\n};\n\nexport const WithIconsAndDescriptions: Story = {\n args: {\n children: (\n <>\n <List.Item\n icon={<UserIcon />}\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n />\n <List.Item\n icon={<SettingsIcon />}\n title=\"Settings\"\n description=\"Configure application settings\"\n />\n <List.Item\n icon={<HelpIcon />}\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n />\n </>\n )\n }\n};\n\nexport const WithAvatar: Story = {\n args: {\n ...Default.args,\n children: (\n <>\n <ListItem\n index={1}\n description=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n icon={\n <Avatar\n image={\n <Avatar.Image src=\"https://i.pravatar.cc/300?img=1\" alt=\"@webiny\" />\n }\n fallback={<Avatar.Fallback>W</Avatar.Fallback>}\n />\n }\n />\n <ListItem\n index={2}\n description=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n icon={\n <Avatar\n image={\n <Avatar.Image src=\"https://i.pravatar.cc/300?img=2\" alt=\"@webiny\" />\n }\n fallback={<Avatar.Fallback>W</Avatar.Fallback>}\n />\n }\n />\n </>\n )\n }\n};\n\nexport const WithHandle: Story = {\n args: {\n ...Default.args,\n children: (\n <>\n <ListItem\n index={1}\n description=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n handle={<List.Item.Handle />}\n />\n <ListItem\n index={2}\n description=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n handle={<List.Item.Handle />}\n />\n </>\n )\n }\n};\n\nexport const WithActions: Story = {\n ...Default,\n args: {\n children: (\n <>\n <ListItem\n index={1}\n description=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n icon={<List.Item.Icon icon={<ChartIcon />} label={\"Chart\"} />}\n actions={\n <>\n <List.Item.Action icon={<EditIcon />} />\n <List.Item.Action icon={<TrashIcon />} />\n <List.Item.Action.Separator />\n <List.Item.Action icon={<OpenIcon />} />\n <List.Item.Action icon={<MoreIcon />} />\n </>\n }\n />\n <ListItem\n index={2}\n description=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n icon={<List.Item.Icon icon={<ChartIcon />} label={\"Chart\"} />}\n actions={\n <>\n <List.Item.Action icon={<EditIcon />} />\n <List.Item.Action icon={<TrashIcon />} />\n <List.Item.Action.Separator />\n <List.Item.Action icon={<OpenIcon />} />\n <List.Item.Action icon={<MoreIcon />} />\n </>\n }\n />\n </>\n )\n }\n};\n\nexport const WithDisabled: Story = {\n args: {\n children: (\n <>\n <List.Item\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n onClick={() => alert(\"User Profile clicked\")}\n />\n <List.Item\n title=\"Settings\"\n description=\"Configure application settings\"\n disabled={true}\n onClick={() => alert(\"This alert won't show because the item is disabled\")}\n />\n <List.Item\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n onClick={() => alert(\"Help & Support clicked\")}\n />\n </>\n )\n }\n};\n\nexport const WithActivated: Story = {\n args: {\n children: (\n <>\n <List.Item\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n activated={true}\n onClick={() => console.log(\"User Profile clicked\")}\n />\n <List.Item\n title=\"Settings\"\n description=\"Configure application settings\"\n onClick={() => console.log(\"Settings clicked\")}\n />\n <List.Item\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n onClick={() => console.log(\"Help & Support clicked\")}\n />\n </>\n )\n }\n};\n\nexport const WithClickHandlers: Story = {\n args: {\n children: (\n <>\n <List.Item\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n onClick={() => alert(\"User Profile clicked\")}\n />\n <List.Item\n title=\"Settings\"\n description=\"Configure application settings\"\n onClick={() => alert(\"Settings clicked\")}\n />\n <List.Item\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n onClick={() => alert(\"Help & Support clicked\")}\n />\n </>\n )\n }\n};\n\nexport const WithSelectedItem: Story = {\n render: () => {\n // Using render function to handle state\n const [selectedIndex, setSelectedIndex] = React.useState(0);\n\n return (\n <List>\n <List.Item\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n selected={selectedIndex === 0}\n onClick={() => setSelectedIndex(0)}\n />\n <List.Item\n title=\"Settings\"\n description=\"Configure application settings\"\n selected={selectedIndex === 1}\n onClick={() => setSelectedIndex(1)}\n />\n <List.Item\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n selected={selectedIndex === 2}\n onClick={() => setSelectedIndex(2)}\n />\n </List>\n );\n }\n};\n\nexport const Documentation: Story = {\n args: {\n variant: \"underline\",\n background: \"base\",\n children: (\n <>\n <List.Item\n icon={<UserIcon />}\n title=\"User Profile\"\n description=\"View and edit your profile information\"\n onClick={() => console.log(\"User Profile clicked\")}\n />\n <List.Item\n icon={<SettingsIcon />}\n title=\"Settings\"\n description=\"Configure application settings\"\n onClick={() => console.log(\"Settings clicked\")}\n />\n <List.Item\n icon={<HelpIcon />}\n title=\"Help & Support\"\n description=\"Get assistance and view documentation\"\n onClick={() => console.log(\"Help & Support clicked\")}\n />\n </>\n )\n },\n argTypes: {\n variant: {\n control: \"select\",\n options: [\"underline\", \"container\"],\n description: \"The visual style of the list\"\n },\n background: {\n control: \"select\",\n options: [\"base\", \"light\", \"transparent\"],\n description: \"The background color of the list\"\n },\n children: {\n description: \"The content of the list. Please refer to the example code for details.\"\n }\n },\n parameters: {\n docs: {\n description: {\n story: \"This example shows a List with icons, titles, descriptions, and click handlers.\"\n }\n }\n }\n};\n"],"names":["meta","List","ListItem","props","Default","WithTransparentBackground","UserIcon","SettingsIcon","HelpIcon","Story","WithBaseBackground","WithLightBackground","WithUnderlineVariant","WithContainerVariant","WithDescription","WithIcon","WithIconsAndDescriptions","WithAvatar","Avatar","WithHandle","WithActions","ChartIcon","EditIcon","TrashIcon","OpenIcon","MoreIcon","WithDisabled","alert","WithActivated","console","WithClickHandlers","WithSelectedItem","selectedIndex","setSelectedIndex","React","Documentation"],"mappings":";;;;;;;;;;;AAaA,MAAMA,OAA0B;IAC5B,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;AACJ;AAEA,qBAAeD;AAQf,MAAME,WAAW,CAACC,QACP,WAAP,GAAO,oBAACF,KAAK,IAAI;QAAC,OAAO,CAAC,UAAU,EAAEE,MAAM,KAAK,EAAE;QAAG,GAAGA,KAAK;;AAG3D,MAAMC,UAAiB;IAC1B,MAAM;QACF,UAAU,WAAV,GACI,wDACI,oBAACF,UAAQA;YAAC,OAAO;0BACjB,oBAACA,UAAQA;YAAC,OAAO;0BACjB,oBAACA,UAAQA;YAAC,OAAO;;IAG7B;AACJ;AAEO,MAAMG,4BAAmC;IAC5C,MAAM;QACF,YAAY;QACZ,UAAU,WAAV,GACI,wDACI,oBAACJ,KAAK,IAAI;YACN,oBAAM,oBAACK,2BAAQA;YACf,OAAM;YACN,aAAY;0BAEhB,oBAACL,KAAK,IAAI;YACN,oBAAM,oBAACM,6BAAYA;YACnB,OAAM;YACN,aAAY;0BAEhB,oBAACN,KAAK,IAAI;YACN,oBAAM,oBAACO,yBAAQA;YACf,OAAM;YACN,aAAY;;IAI5B;IACA,YAAY;QACRC,CAAAA,QAAAA,WAAAA,GACI,oBAAC;gBAAI,WAAU;6BACX,oBAACA,OAAAA;KAGZ;AACL;AAEO,MAAMC,qBAA4B;IACrC,MAAM;QACF,GAAGN,QAAQ,IAAI;QACf,YAAY;IAChB;AACJ;AAEO,MAAMO,sBAA6B;IACtC,MAAM;QACF,YAAY;QACZ,UAAU,WAAV,GACI,wDACI,oBAACV,KAAK,IAAI;YACN,oBA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AM,oBAACM,6BAAYA;YACnB,OAAM;YACN,aAAY;YACZ,SAAS,IAAMsB,QAAQ,GAAG,CAAC;0BAE/B,oBAAC5B,KAAK,IAAI;YACN,oBAAM,oBAACO,yBAAQA;YACf,OAAM;YACN,aAAY;YACZ,SAAS,IAAMqB,QAAQ,GAAG,CAAC;;IAI3C;IACA,UAAU;QACN,SAAS;YACL,SAAS;YACT,SAAS;gBAAC;gBAAa;aAAY;YACnC,aAAa;QACjB;QACA,YAAY;YACR,SAAS;YACT,SAAS;gBAAC;gBAAQ;gBAAS;aAAc;YACzC,aAAa;QACjB;QACA,UAAU;YACN,aAAa;QACjB;IACJ;IACA,YAAY;QACR,MAAM;YACF,aAAa;gBACT,OAAO;YACX;QACJ;IACJ;AACJ"}
@@ -15,21 +15,22 @@ interface ListItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "titl
15
15
  colorMark?: string;
16
16
  sidePadding?: "md" | "lg";
17
17
  }
18
- declare const ListItem: (({ actions, children, className, description, activated, disabled, selected, handle, icon, colorMark, sidePadding, onClick, title, ...props }: ListItemProps) => React.JSX.Element) & {
19
- original: ({ actions, children, className, description, activated, disabled, selected, handle, icon, colorMark, sidePadding, onClick, title, ...props }: ListItemProps) => React.JSX.Element;
18
+ declare const DecoratableListItem: ({ actions, children, className, description, activated, disabled, selected, handle, icon, colorMark, sidePadding, onClick, title, ...props }: ListItemProps) => React.JSX.Element;
19
+ declare const ListItem: typeof DecoratableListItem & {
20
+ original: typeof DecoratableListItem;
20
21
  originalName: string;
21
22
  displayName: string;
22
23
  } & {
23
- original: (({ actions, children, className, description, activated, disabled, selected, handle, icon, colorMark, sidePadding, onClick, title, ...props }: ListItemProps) => React.JSX.Element) & {
24
- original: ({ actions, children, className, description, activated, disabled, selected, handle, icon, colorMark, sidePadding, onClick, title, ...props }: ListItemProps) => React.JSX.Element;
24
+ original: typeof DecoratableListItem & {
25
+ original: typeof DecoratableListItem;
25
26
  originalName: string;
26
27
  displayName: string;
27
28
  };
28
29
  originalName: string;
29
30
  displayName: string;
30
31
  } & {
31
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ actions, children, className, description, activated, disabled, selected, handle, icon, colorMark, sidePadding, onClick, title, ...props }: ListItemProps) => React.JSX.Element) & {
32
- original: ({ actions, children, className, description, activated, disabled, selected, handle, icon, colorMark, sidePadding, onClick, title, ...props }: ListItemProps) => React.JSX.Element;
32
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableListItem & {
33
+ original: typeof DecoratableListItem;
33
34
  originalName: string;
34
35
  displayName: string;
35
36
  }>) => (props: unknown) => React.JSX.Element;
@@ -1,21 +1,22 @@
1
1
  import * as React from "react";
2
2
  import type { IconButtonProps } from "../../Button/index.js";
3
3
  type ListItemActionProps = IconButtonProps;
4
- declare const ListItemAction: ((props: ListItemActionProps) => React.JSX.Element) & {
5
- original: (props: ListItemActionProps) => React.JSX.Element;
4
+ declare const DecoratableListItemAction: (props: ListItemActionProps) => React.JSX.Element;
5
+ declare const ListItemAction: typeof DecoratableListItemAction & {
6
+ original: typeof DecoratableListItemAction;
6
7
  originalName: string;
7
8
  displayName: string;
8
9
  } & {
9
- original: ((props: ListItemActionProps) => React.JSX.Element) & {
10
- original: (props: ListItemActionProps) => React.JSX.Element;
10
+ original: typeof DecoratableListItemAction & {
11
+ original: typeof DecoratableListItemAction;
11
12
  originalName: string;
12
13
  displayName: string;
13
14
  };
14
15
  originalName: string;
15
16
  displayName: string;
16
17
  } & {
17
- createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: ListItemActionProps) => React.JSX.Element) & {
18
- original: (props: ListItemActionProps) => React.JSX.Element;
18
+ createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableListItemAction & {
19
+ original: typeof DecoratableListItemAction;
19
20
  originalName: string;
20
21
  displayName: string;
21
22
  }>) => (props: unknown) => React.JSX.Element;