@webiny/admin-ui 6.4.0-beta.2 → 6.4.0-beta.4

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 (261) hide show
  1. package/Accordion/Accordion.stories.d.ts +1 -1
  2. package/Accordion/Accordion.stories.js.map +1 -1
  3. package/AdminUiProvider/AdminUiProvider.d.ts +3 -0
  4. package/AdminUiProvider/AdminUiProvider.js +15 -5
  5. package/AdminUiProvider/AdminUiProvider.js.map +1 -1
  6. package/AdminUiProvider/FileUrlFormatter.d.ts +7 -0
  7. package/AdminUiProvider/FileUrlFormatter.js +0 -0
  8. package/AdminUiProvider/index.d.ts +1 -0
  9. package/AdminUiProvider/index.js +1 -0
  10. package/Alert/Alert.stories.d.ts +1 -1
  11. package/Alert/Alert.stories.js.map +1 -1
  12. package/AutoComplete/AutoComplete.stories.d.ts +1 -1
  13. package/AutoComplete/AutoComplete.stories.js.map +1 -1
  14. package/AutoComplete/primitives/AutoCompletePrimitive.stories.d.ts +1 -1
  15. package/AutoComplete/primitives/AutoCompletePrimitive.stories.js.map +1 -1
  16. package/Avatar/Avatar.stories.d.ts +1 -1
  17. package/Avatar/Avatar.stories.js.map +1 -1
  18. package/Button/Button.stories.d.ts +1 -1
  19. package/Button/Button.stories.js.map +1 -1
  20. package/Button/IconButton.stories.d.ts +1 -1
  21. package/Button/IconButton.stories.js.map +1 -1
  22. package/Card/Card.stories.d.ts +1 -1
  23. package/Card/Card.stories.js.map +1 -1
  24. package/Checkbox/Checkbox.stories.d.ts +1 -1
  25. package/Checkbox/Checkbox.stories.js.map +1 -1
  26. package/Checkbox/primitives/CheckboxPrimitive.stories.d.ts +1 -1
  27. package/Checkbox/primitives/CheckboxPrimitive.stories.js.map +1 -1
  28. package/CheckboxGroup/CheckboxGroup.stories.d.ts +1 -1
  29. package/CheckboxGroup/CheckboxGroup.stories.js.map +1 -1
  30. package/CheckboxGroup/primitives/CheckboxGroupPrimitive.stories.d.ts +1 -1
  31. package/CheckboxGroup/primitives/CheckboxGroupPrimitive.stories.js.map +1 -1
  32. package/CodeEditor/CodeEditor.stories.d.ts +1 -1
  33. package/CodeEditor/CodeEditor.stories.js.map +1 -1
  34. package/CodeEditor/CodeEditorPrimitive.stories.d.ts +1 -1
  35. package/CodeEditor/CodeEditorPrimitive.stories.js.map +1 -1
  36. package/ColorPicker/ColorPicker.stories.d.ts +1 -1
  37. package/ColorPicker/ColorPicker.stories.js.map +1 -1
  38. package/ColorPicker/primitives/ColorPickerPrimitive.stories.d.ts +1 -1
  39. package/ColorPicker/primitives/ColorPickerPrimitive.stories.js.map +1 -1
  40. package/DataTable/DataTable.stories.d.ts +1 -1
  41. package/DataTable/DataTable.stories.js.map +1 -1
  42. package/DatePicker/DatePicker.stories.d.ts +1 -1
  43. package/DatePicker/DatePicker.stories.js.map +1 -1
  44. package/DatePicker/primitives/components/DatePickerTrigger.js +1 -1
  45. package/DatePicker/primitives/components/DatePickerTrigger.js.map +1 -1
  46. package/Dialog/Dialog.stories.d.ts +1 -1
  47. package/Dialog/Dialog.stories.js.map +1 -1
  48. package/DragCursor/DragCursor.d.ts +7 -0
  49. package/DragCursor/DragCursor.js +21 -0
  50. package/DragCursor/DragCursor.js.map +1 -0
  51. package/DragCursor/DragCursor.stories.d.ts +10 -0
  52. package/DragCursor/DragCursor.stories.js +97 -0
  53. package/DragCursor/DragCursor.stories.js.map +1 -0
  54. package/DragCursor/index.d.ts +1 -0
  55. package/DragCursor/index.js +1 -0
  56. package/Drawer/Drawer.stories.d.ts +1 -1
  57. package/Drawer/Drawer.stories.js.map +1 -1
  58. package/DropdownMenu/DropdownMenu.stories.d.ts +1 -1
  59. package/DropdownMenu/DropdownMenu.stories.js.map +1 -1
  60. package/FilePicker/FilePicker.stories.d.ts +1 -1
  61. package/FilePicker/FilePicker.stories.js.map +1 -1
  62. package/FilePicker/domains/FileItem.js +3 -2
  63. package/FilePicker/domains/FileItem.js.map +1 -1
  64. package/FilePicker/domains/FileItemDto.d.ts +9 -2
  65. package/FilePicker/primitives/FilePickerPrimitive.stories.d.ts +1 -1
  66. package/FilePicker/primitives/FilePickerPrimitive.stories.js.map +1 -1
  67. package/FilePicker/primitives/components/previews/FilePreview.js +5 -3
  68. package/FilePicker/primitives/components/previews/FilePreview.js.map +1 -1
  69. package/FilePicker/primitives/useFilePicker.js +24 -1
  70. package/FilePicker/primitives/useFilePicker.js.map +1 -1
  71. package/FillViewport/FillViewport.d.ts +60 -0
  72. package/FillViewport/FillViewport.js +67 -0
  73. package/FillViewport/FillViewport.js.map +1 -0
  74. package/FillViewport/index.d.ts +1 -0
  75. package/FillViewport/index.js +1 -0
  76. package/Grid/Grid.d.ts +1 -1
  77. package/Grid/Grid.js.map +1 -1
  78. package/Grid/Grid.stories.d.ts +1 -1
  79. package/Grid/Grid.stories.js.map +1 -1
  80. package/HeaderBar/HeaderBar.stories.d.ts +1 -1
  81. package/HeaderBar/HeaderBar.stories.js.map +1 -1
  82. package/Heading/Heading.stories.d.ts +1 -1
  83. package/Heading/Heading.stories.js.map +1 -1
  84. package/Icon/Icon.stories.d.ts +1 -1
  85. package/Icon/Icon.stories.js.map +1 -1
  86. package/IconPicker/IconPicker.stories.d.ts +1 -1
  87. package/IconPicker/IconPicker.stories.js.map +1 -1
  88. package/IconPicker/primitives/IconPickerPrimitive.stories.d.ts +1 -1
  89. package/IconPicker/primitives/IconPickerPrimitive.stories.js.map +1 -1
  90. package/Input/Input.stories.d.ts +1 -1
  91. package/Input/Input.stories.js.map +1 -1
  92. package/Input/InputPrimitive.stories.d.ts +1 -1
  93. package/Input/InputPrimitive.stories.js.map +1 -1
  94. package/Label/Label.stories.d.ts +1 -1
  95. package/Label/Label.stories.js.map +1 -1
  96. package/Link/Link.stories.d.ts +1 -1
  97. package/Link/Link.stories.js.map +1 -1
  98. package/List/List.stories.d.ts +1 -1
  99. package/List/List.stories.js.map +1 -1
  100. package/Loader/Loader.stories.d.ts +1 -1
  101. package/Loader/Loader.stories.js.map +1 -1
  102. package/Loader/OverlayLoader.stories.d.ts +1 -1
  103. package/Loader/OverlayLoader.stories.js.map +1 -1
  104. package/MultiAutoComplete/MultiAutoComplete.stories.d.ts +1 -1
  105. package/MultiAutoComplete/MultiAutoComplete.stories.js.map +1 -1
  106. package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.stories.d.ts +1 -1
  107. package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.stories.js.map +1 -1
  108. package/MultiFilePicker/MultiFilePicker.stories.d.ts +1 -1
  109. package/MultiFilePicker/MultiFilePicker.stories.js.map +1 -1
  110. package/MultiFilePicker/primitives/MultiFilePickerPrimitive.stories.d.ts +1 -1
  111. package/MultiFilePicker/primitives/MultiFilePickerPrimitive.stories.js.map +1 -1
  112. package/MultiSelect/MultiSelect.stories.d.ts +1 -1
  113. package/MultiSelect/MultiSelect.stories.js.map +1 -1
  114. package/Popover/Popover.stories.d.ts +1 -1
  115. package/Popover/Popover.stories.js.map +1 -1
  116. package/ProgressBar/ProgressBar.stories.d.ts +1 -1
  117. package/ProgressBar/ProgressBar.stories.js.map +1 -1
  118. package/RadioGroup/RadioGroup.stories.d.ts +1 -1
  119. package/RadioGroup/RadioGroup.stories.js.map +1 -1
  120. package/RadioGroup/primitives/RadioGroupPrimitive.stories.d.ts +1 -1
  121. package/RadioGroup/primitives/RadioGroupPrimitive.stories.js.map +1 -1
  122. package/RangeSlider/RangeSlider.stories.d.ts +1 -1
  123. package/RangeSlider/RangeSlider.stories.js.map +1 -1
  124. package/RangeSlider/primitives/RangeSliderPrimitive.stories.d.ts +1 -1
  125. package/RangeSlider/primitives/RangeSliderPrimitive.stories.js.map +1 -1
  126. package/ScrollArea/ScrollArea.stories.d.ts +1 -1
  127. package/ScrollArea/ScrollArea.stories.js.map +1 -1
  128. package/SegmentedControl/SegmentedControl.d.ts +4 -0
  129. package/SegmentedControl/SegmentedControl.js +6 -2
  130. package/SegmentedControl/SegmentedControl.js.map +1 -1
  131. package/SegmentedControl/SegmentedControl.stories.d.ts +5 -1
  132. package/SegmentedControl/SegmentedControl.stories.js +100 -2
  133. package/SegmentedControl/SegmentedControl.stories.js.map +1 -1
  134. package/SegmentedControl/SegmentedControlTab.d.ts +10 -0
  135. package/SegmentedControl/SegmentedControlTab.js +21 -0
  136. package/SegmentedControl/SegmentedControlTab.js.map +1 -0
  137. package/SegmentedControl/SegmentedControlTabs.d.ts +11 -0
  138. package/SegmentedControl/SegmentedControlTabs.js +71 -0
  139. package/SegmentedControl/SegmentedControlTabs.js.map +1 -0
  140. package/SegmentedControl/SegmentedControlTabsContext.d.ts +19 -0
  141. package/SegmentedControl/SegmentedControlTabsContext.js +11 -0
  142. package/SegmentedControl/SegmentedControlTabsContext.js.map +1 -0
  143. package/SegmentedControl/index.d.ts +2 -0
  144. package/SegmentedControl/index.js +2 -0
  145. package/SegmentedControl/primitives/SegmentedControlPrimitive.d.ts +5 -1
  146. package/SegmentedControl/primitives/SegmentedControlPrimitive.js +4 -3
  147. package/SegmentedControl/primitives/SegmentedControlPrimitive.js.map +1 -1
  148. package/SegmentedControl/primitives/SegmentedControlPrimitive.stories.d.ts +2 -1
  149. package/SegmentedControl/primitives/SegmentedControlPrimitive.stories.js +8 -1
  150. package/SegmentedControl/primitives/SegmentedControlPrimitive.stories.js.map +1 -1
  151. package/Select/Select.stories.d.ts +1 -1
  152. package/Select/Select.stories.js.map +1 -1
  153. package/Select/primitives/SelectPrimitive.stories.d.ts +1 -1
  154. package/Select/primitives/SelectPrimitive.stories.js.map +1 -1
  155. package/Separator/Separator.stories.d.ts +1 -1
  156. package/Separator/Separator.stories.js.map +1 -1
  157. package/Sidebar/Sidebar.d.ts +2 -0
  158. package/Sidebar/Sidebar.stories.d.ts +1 -1
  159. package/Sidebar/Sidebar.stories.js.map +1 -1
  160. package/Sidebar/components/items/SidebarMenuItem.d.ts +4 -1
  161. package/Sidebar/components/items/SidebarMenuItem.js +3 -1
  162. package/Sidebar/components/items/SidebarMenuItem.js.map +1 -1
  163. package/Sidebar/components/items/SidebarMenuItemBadge.d.ts +6 -0
  164. package/Sidebar/components/items/SidebarMenuItemBadge.js +7 -0
  165. package/Sidebar/components/items/SidebarMenuItemBadge.js.map +1 -0
  166. package/Sidebar/components/items/SidebarMenuLink.d.ts +3 -1
  167. package/Sidebar/components/items/SidebarMenuLink.js +3 -1
  168. package/Sidebar/components/items/SidebarMenuLink.js.map +1 -1
  169. package/Sidebar/components/items/SidebarMenuRootButton.d.ts +1 -1
  170. package/Sidebar/components/items/SidebarMenuRootButton.js +8 -3
  171. package/Sidebar/components/items/SidebarMenuRootButton.js.map +1 -1
  172. package/Sidebar/components/items/SidebarMenuSubButton.d.ts +1 -1
  173. package/Sidebar/components/items/SidebarMenuSubButton.js +8 -3
  174. package/Sidebar/components/items/SidebarMenuSubButton.js.map +1 -1
  175. package/Sidebar/components/items/SidebarMenuSubItemIndentation.js +2 -1
  176. package/Sidebar/components/items/SidebarMenuSubItemIndentation.js.map +1 -1
  177. package/Skeleton/Skeleton.stories.d.ts +1 -1
  178. package/Skeleton/Skeleton.stories.js.map +1 -1
  179. package/Slider/Slider.stories.d.ts +1 -1
  180. package/Slider/Slider.stories.js.map +1 -1
  181. package/Slider/primitives/SliderPrimitive.stories.d.ts +1 -1
  182. package/Slider/primitives/SliderPrimitive.stories.js.map +1 -1
  183. package/SteppedProgress/SteppedProgress.stories.d.ts +1 -1
  184. package/SteppedProgress/SteppedProgress.stories.js.map +1 -1
  185. package/Switch/Switch.stories.d.ts +1 -1
  186. package/Switch/Switch.stories.js.map +1 -1
  187. package/Switch/primitives/SwitchPrimitive.stories.d.ts +1 -1
  188. package/Switch/primitives/SwitchPrimitive.stories.js.map +1 -1
  189. package/Tabs/Tabs.js.map +1 -1
  190. package/Tabs/Tabs.stories.d.ts +1 -1
  191. package/Tabs/Tabs.stories.js.map +1 -1
  192. package/Tag/Tag.stories.d.ts +1 -1
  193. package/Tag/Tag.stories.js.map +1 -1
  194. package/Tags/Tags.stories.d.ts +1 -1
  195. package/Tags/Tags.stories.js.map +1 -1
  196. package/Tags/primitives/TagsPrimitive.stories.d.ts +1 -1
  197. package/Tags/primitives/TagsPrimitive.stories.js.map +1 -1
  198. package/Text/Text.stories.d.ts +1 -1
  199. package/Text/Text.stories.js.map +1 -1
  200. package/Textarea/Textarea.stories.d.ts +1 -1
  201. package/Textarea/Textarea.stories.js.map +1 -1
  202. package/Textarea/TextareaPrimitive.stories.d.ts +1 -1
  203. package/Textarea/TextareaPrimitive.stories.js.map +1 -1
  204. package/TimeAgo/TimeAgo.d.ts +3 -0
  205. package/TimeAgo/TimeAgo.js +45 -0
  206. package/TimeAgo/TimeAgo.js.map +1 -0
  207. package/TimeAgo/TimeAgo.stories.d.ts +15 -0
  208. package/TimeAgo/TimeAgo.stories.js +71 -0
  209. package/TimeAgo/TimeAgo.stories.js.map +1 -0
  210. package/TimeAgo/formatElapsed.d.ts +1 -0
  211. package/TimeAgo/formatElapsed.js +27 -0
  212. package/TimeAgo/formatElapsed.js.map +1 -0
  213. package/TimeAgo/getElapsedSeconds.d.ts +2 -0
  214. package/TimeAgo/getElapsedSeconds.js +9 -0
  215. package/TimeAgo/getElapsedSeconds.js.map +1 -0
  216. package/TimeAgo/getUpdateDelay.d.ts +3 -0
  217. package/TimeAgo/getUpdateDelay.js +24 -0
  218. package/TimeAgo/getUpdateDelay.js.map +1 -0
  219. package/TimeAgo/index.d.ts +2 -3
  220. package/TimeAgo/index.js +1 -1
  221. package/TimeAgo/toEpochMs.d.ts +2 -0
  222. package/TimeAgo/toEpochMs.js +8 -0
  223. package/TimeAgo/toEpochMs.js.map +1 -0
  224. package/TimeAgo/toISOString.d.ts +2 -0
  225. package/TimeAgo/toISOString.js +8 -0
  226. package/TimeAgo/toISOString.js.map +1 -0
  227. package/TimeAgo/types.d.ts +18 -0
  228. package/TimeAgo/types.js +0 -0
  229. package/Toast/useToast.stories.d.ts +1 -1
  230. package/Toast/useToast.stories.js.map +1 -1
  231. package/Toggle/Toggle.stories.d.ts +1 -1
  232. package/Toggle/Toggle.stories.js.map +1 -1
  233. package/Toggle/primitives/TogglePrimitive.stories.d.ts +1 -1
  234. package/Toggle/primitives/TogglePrimitive.stories.js.map +1 -1
  235. package/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
  236. package/ToggleGroup/ToggleGroup.stories.js.map +1 -1
  237. package/ToggleGroup/domains/ToggleGroupItem.d.ts +3 -0
  238. package/ToggleGroup/domains/ToggleGroupItem.js +6 -1
  239. package/ToggleGroup/domains/ToggleGroupItem.js.map +1 -1
  240. package/ToggleGroup/domains/ToggleGroupItemFormatted.d.ts +1 -0
  241. package/ToggleGroup/domains/ToggleGroupItemFormatter.js +2 -1
  242. package/ToggleGroup/domains/ToggleGroupItemFormatter.js.map +1 -1
  243. package/ToggleGroup/domains/ToggleGroupItemParams.d.ts +1 -0
  244. package/ToggleGroup/primitives/ToggleGroupPrimitive.js +11 -2
  245. package/ToggleGroup/primitives/ToggleGroupPrimitive.js.map +1 -1
  246. package/ToggleGroup/primitives/ToggleGroupPrimitive.stories.d.ts +1 -1
  247. package/ToggleGroup/primitives/ToggleGroupPrimitive.stories.js.map +1 -1
  248. package/Tooltip/Tooltip.stories.d.ts +1 -1
  249. package/Tooltip/Tooltip.stories.js.map +1 -1
  250. package/Tree/Tree.stories.d.ts +1 -1
  251. package/Tree/Tree.stories.js.map +1 -1
  252. package/Widget/Widget.stories.d.ts +1 -1
  253. package/Widget/Widget.stories.js.map +1 -1
  254. package/exports/admin/ui.d.ts +1 -0
  255. package/exports/admin/ui.js +1 -0
  256. package/index.d.ts +2 -0
  257. package/index.js +2 -0
  258. package/package.json +24 -26
  259. package/theme.css +3 -1
  260. package/utils.js +1 -0
  261. package/utils.js.map +1 -1
@@ -1,6 +1,7 @@
1
1
  import react from "react";
2
2
  import { cva } from "../../../utils.js";
3
3
  import { DivButton } from "./DivButton.js";
4
+ import { SidebarMenuItemBadge } from "./SidebarMenuItemBadge.js";
4
5
  import { useAdminUi } from "../../../index.js";
5
6
  const variants = cva([
6
7
  "flex w-full cursor-pointer items-center gap-sm",
@@ -26,7 +27,7 @@ const variants = cva([
26
27
  }
27
28
  }
28
29
  });
29
- const SidebarMenuSubButton = ({ onClick, variant, active, disabled, icon, pinnedIcon, action, text, className, to, ...linkProps })=>{
30
+ const SidebarMenuSubButton = ({ onClick, variant, active, disabled, icon, pinnedIcon, action, text, badge, className, to, ...linkProps })=>{
30
31
  const { linkComponent: LinkComponent } = useAdminUi();
31
32
  const sharedProps = {
32
33
  "data-sidebar": "menu-sub-button",
@@ -42,11 +43,15 @@ const SidebarMenuSubButton = ({ onClick, variant, active, disabled, icon, pinned
42
43
  ...sharedProps,
43
44
  to: to,
44
45
  ...linkProps
45
- }, icon, text) : /*#__PURE__*/ react.createElement(DivButton, {
46
+ }, icon, text, badge && ("string" == typeof badge ? /*#__PURE__*/ react.createElement(SidebarMenuItemBadge, {
47
+ text: badge
48
+ }) : badge)) : /*#__PURE__*/ react.createElement(DivButton, {
46
49
  ...sharedProps,
47
50
  disabled: disabled,
48
51
  tabIndex: "group-label" === variant ? -1 : void 0
49
- }, icon, text);
52
+ }, icon, text, badge && ("string" == typeof badge ? /*#__PURE__*/ react.createElement(SidebarMenuItemBadge, {
53
+ text: badge
54
+ }) : badge));
50
55
  return /*#__PURE__*/ react.createElement("div", {
51
56
  className: "flex items-center w-full relative group/menu-sub-button"
52
57
  }, content, action && /*#__PURE__*/ react.createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar/components/items/SidebarMenuSubButton.js","sources":["../../../../src/Sidebar/components/items/SidebarMenuSubButton.tsx"],"sourcesContent":["import React from \"react\";\nimport { cva } from \"~/utils.js\";\nimport type { SidebarMenuItemProps } from \"./SidebarMenuRootItem.js\";\nimport { DivButton } from \"./DivButton.js\";\nimport { DistributedOmit } from \"type-fest\";\nimport { useAdminUi } from \"~/index.js\";\n\nconst variants = cva(\n [\n \"flex w-full cursor-pointer items-center gap-sm\",\n \"text-md text-neutral-primary no-underline!\",\n \"rounded-md p-xs-plus pr-sm outline-none\",\n \"whitespace-nowrap overflow-hidden\",\n \"hover:bg-neutral-dark/5\",\n \"group-hover/menu-sub-button:bg-neutral-dark/5\",\n \"focus:bg-neutral-dark/5 focus:ring-none focus:ring-transparent\",\n \"data-[active=true]:bg-neutral-dark/5 data-[active=true]:font-semibold data-[active=true]:pointer-events-none\",\n \"group-data-[state=collapsed]:hidden\"\n ],\n {\n variants: {\n variant: {\n \"group-label\": [\n \"uppercase font-semibold text-neutral-muted! text-sm\",\n \"pt-md pb-xs-plus pointer-events-none\",\n \"hover:bg-transparent! group-hover/menu-sub-button:bg-transparent! focus:bg-transparent! cursor-default!\"\n ]\n },\n disabled: {\n true: \"pointer-events-none text-neutral-disabled!\"\n }\n }\n }\n);\n\ntype SidebarMenuSubButtonProps = DistributedOmit<SidebarMenuItemProps, \"children\">;\n\nconst SidebarMenuSubButton = ({\n onClick,\n variant,\n active,\n disabled,\n icon,\n\n // oxlint-disable-next-line\n pinnedIcon,\n\n action,\n text,\n className,\n to,\n ...linkProps\n}: SidebarMenuSubButtonProps) => {\n const { linkComponent: LinkComponent } = useAdminUi();\n\n const sharedProps = {\n \"data-sidebar\": \"menu-sub-button\",\n \"data-active\": active,\n className: variants({ variant, disabled, className }),\n onClick\n };\n\n const content = to ? (\n <LinkComponent {...sharedProps} to={to} {...linkProps}>\n {icon}\n {text}\n </LinkComponent>\n ) : (\n // We can't use the default button element here because the content of the button\n // can also contain a button, which is not allowed in HTML.\n <DivButton\n {...sharedProps}\n disabled={disabled}\n tabIndex={variant === \"group-label\" ? -1 : undefined}\n >\n {icon}\n {text}\n </DivButton>\n );\n\n return (\n <div className={\"flex items-center w-full relative group/menu-sub-button\"}>\n {content}\n\n {action && (\n <div className=\"absolute top-0 right-0 mr-sm h-full flex items-center\">\n {action}\n </div>\n )}\n </div>\n );\n};\n\nexport { SidebarMenuSubButton };\n"],"names":["variants","cva","SidebarMenuSubButton","onClick","variant","active","disabled","icon","pinnedIcon","action","text","className","to","linkProps","LinkComponent","useAdminUi","sharedProps","content","DivButton","undefined"],"mappings":";;;;AAOA,MAAMA,WAAWC,IACb;IACI;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH,EACD;IACI,UAAU;QACN,SAAS;YACL,eAAe;gBACX;gBACA;gBACA;aACH;QACL;QACA,UAAU;YACN,MAAM;QACV;IACJ;AACJ;AAKJ,MAAMC,uBAAuB,CAAC,EAC1BC,OAAO,EACPC,OAAO,EACPC,MAAM,EACNC,QAAQ,EACRC,IAAI,EAGJC,UAAU,EAEVC,MAAM,EACNC,IAAI,EACJC,SAAS,EACTC,EAAE,EACF,GAAGC,WACqB;IACxB,MAAM,EAAE,eAAeC,aAAa,EAAE,GAAGC;IAEzC,MAAMC,cAAc;QAChB,gBAAgB;QAChB,eAAeX;QACf,WAAWL,SAAS;YAAEI;YAASE;YAAUK;QAAU;QACnDR;IACJ;IAEA,MAAMc,UAAUL,KAAK,WAALA,GACZ,oBAACE,eAAAA;QAAe,GAAGE,WAAW;QAAE,IAAIJ;QAAK,GAAGC,SAAS;OAChDN,MACAG,Q,cAKL,oBAACQ,WAASA;QACL,GAAGF,WAAW;QACf,UAAUV;QACV,UAAUF,AAAY,kBAAZA,UAA4B,KAAKe;OAE1CZ,MACAG;IAIT,OAAO,WAAP,GACI,oBAAC;QAAI,WAAW;OACXO,SAEAR,UAAU,WAAVA,GACG,oBAAC;QAAI,WAAU;OACVA;AAKrB"}
1
+ {"version":3,"file":"Sidebar/components/items/SidebarMenuSubButton.js","sources":["../../../../src/Sidebar/components/items/SidebarMenuSubButton.tsx"],"sourcesContent":["import React from \"react\";\nimport { cva } from \"~/utils.js\";\nimport type { SidebarMenuItemProps } from \"./SidebarMenuRootItem.js\";\nimport { DivButton } from \"./DivButton.js\";\nimport { SidebarMenuItemBadge } from \"./SidebarMenuItemBadge.js\";\nimport { DistributedOmit } from \"type-fest\";\nimport { useAdminUi } from \"~/index.js\";\n\nconst variants = cva(\n [\n \"flex w-full cursor-pointer items-center gap-sm\",\n \"text-md text-neutral-primary no-underline!\",\n \"rounded-md p-xs-plus pr-sm outline-none\",\n \"whitespace-nowrap overflow-hidden\",\n \"hover:bg-neutral-dark/5\",\n \"group-hover/menu-sub-button:bg-neutral-dark/5\",\n \"focus:bg-neutral-dark/5 focus:ring-none focus:ring-transparent\",\n \"data-[active=true]:bg-neutral-dark/5 data-[active=true]:font-semibold data-[active=true]:pointer-events-none\",\n \"group-data-[state=collapsed]:hidden\"\n ],\n {\n variants: {\n variant: {\n \"group-label\": [\n \"uppercase font-semibold text-neutral-muted! text-sm\",\n \"pt-md pb-xs-plus pointer-events-none\",\n \"hover:bg-transparent! group-hover/menu-sub-button:bg-transparent! focus:bg-transparent! cursor-default!\"\n ]\n },\n disabled: {\n true: \"pointer-events-none text-neutral-disabled!\"\n }\n }\n }\n);\n\ntype SidebarMenuSubButtonProps = DistributedOmit<SidebarMenuItemProps, \"children\">;\n\nconst SidebarMenuSubButton = ({\n onClick,\n variant,\n active,\n disabled,\n icon,\n\n // oxlint-disable-next-line\n pinnedIcon,\n\n action,\n text,\n badge,\n className,\n to,\n ...linkProps\n}: SidebarMenuSubButtonProps) => {\n const { linkComponent: LinkComponent } = useAdminUi();\n\n const sharedProps = {\n \"data-sidebar\": \"menu-sub-button\",\n \"data-active\": active,\n className: variants({ variant, disabled, className }),\n onClick\n };\n\n const content = to ? (\n <LinkComponent {...sharedProps} to={to} {...linkProps}>\n {icon}\n {text}\n {badge && (typeof badge === \"string\" ? <SidebarMenuItemBadge text={badge} /> : badge)}\n </LinkComponent>\n ) : (\n // We can't use the default button element here because the content of the button\n // can also contain a button, which is not allowed in HTML.\n <DivButton\n {...sharedProps}\n disabled={disabled}\n tabIndex={variant === \"group-label\" ? -1 : undefined}\n >\n {icon}\n {text}\n {badge && (typeof badge === \"string\" ? <SidebarMenuItemBadge text={badge} /> : badge)}\n </DivButton>\n );\n\n return (\n <div className={\"flex items-center w-full relative group/menu-sub-button\"}>\n {content}\n\n {action && (\n <div className=\"absolute top-0 right-0 mr-sm h-full flex items-center\">\n {action}\n </div>\n )}\n </div>\n );\n};\n\nexport { SidebarMenuSubButton };\n"],"names":["variants","cva","SidebarMenuSubButton","onClick","variant","active","disabled","icon","pinnedIcon","action","text","badge","className","to","linkProps","LinkComponent","useAdminUi","sharedProps","content","SidebarMenuItemBadge","DivButton","undefined"],"mappings":";;;;;AAQA,MAAMA,WAAWC,IACb;IACI;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH,EACD;IACI,UAAU;QACN,SAAS;YACL,eAAe;gBACX;gBACA;gBACA;aACH;QACL;QACA,UAAU;YACN,MAAM;QACV;IACJ;AACJ;AAKJ,MAAMC,uBAAuB,CAAC,EAC1BC,OAAO,EACPC,OAAO,EACPC,MAAM,EACNC,QAAQ,EACRC,IAAI,EAGJC,UAAU,EAEVC,MAAM,EACNC,IAAI,EACJC,KAAK,EACLC,SAAS,EACTC,EAAE,EACF,GAAGC,WACqB;IACxB,MAAM,EAAE,eAAeC,aAAa,EAAE,GAAGC;IAEzC,MAAMC,cAAc;QAChB,gBAAgB;QAChB,eAAeZ;QACf,WAAWL,SAAS;YAAEI;YAASE;YAAUM;QAAU;QACnDT;IACJ;IAEA,MAAMe,UAAUL,KAAK,WAALA,GACZ,oBAACE,eAAAA;QAAe,GAAGE,WAAW;QAAE,IAAIJ;QAAK,GAAGC,SAAS;OAChDP,MACAG,MACAC,SAAU,CAAiB,YAAjB,OAAOA,QAAqB,WAAX,GAAW,oBAACQ,sBAAoBA;QAAC,MAAMR;SAAYA,KAAI,K,cAKvF,oBAACS,WAASA;QACL,GAAGH,WAAW;QACf,UAAUX;QACV,UAAUF,AAAY,kBAAZA,UAA4B,KAAKiB;OAE1Cd,MACAG,MACAC,SAAU,CAAiB,YAAjB,OAAOA,QAAqB,WAAX,GAAW,oBAACQ,sBAAoBA;QAAC,MAAMR;SAAYA,KAAI;IAI3F,OAAO,WAAP,GACI,oBAAC;QAAI,WAAW;OACXO,SAEAT,UAAU,WAAVA,GACG,oBAAC;QAAI,WAAU;OACVA;AAKrB"}
@@ -24,7 +24,8 @@ const SidebarMenuSubItemIndentation = ({ lvl, variant })=>/*#__PURE__*/ react.cr
24
24
  margin: "none",
25
25
  variant: "strong",
26
26
  className: separatorVariants({
27
- variant
27
+ variant,
28
+ className: "!h-full"
28
29
  })
29
30
  }))));
30
31
  export { SidebarMenuSubItemIndentation };
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar/components/items/SidebarMenuSubItemIndentation.js","sources":["../../../../src/Sidebar/components/items/SidebarMenuSubItemIndentation.tsx"],"sourcesContent":["import React from \"react\";\nimport { Separator } from \"~/Separator/index.js\";\n\nimport { cva, type VariantProps } from \"~/utils.js\";\n\nconst separatorVariants = cva([\"h-xl ml-px\"], {\n variants: {\n variant: {\n \"group-label\": \"h-[38px]!\"\n }\n }\n});\n\nexport interface SidebarMenuSubItemIndentationProps\n extends\n Omit<React.HTMLAttributes<HTMLLIElement>, \"content\">,\n VariantProps<typeof separatorVariants> {\n lvl: number;\n}\n\nconst SidebarMenuSubItemIndentation = ({ lvl, variant }: SidebarMenuSubItemIndentationProps) => {\n return (\n <div data-sidebar=\"indentation\" className={\"gap-x-xs flex mr-sm\"}>\n {Array.from({ length: lvl }, (_, index) => (\n <div data-sidebar={\"indentation-element\"} className={\"ml-md\"} key={lvl + index}>\n <Separator\n orientation={\"vertical\"}\n margin={\"none\"}\n variant={\"strong\"}\n className={separatorVariants({ variant })}\n />\n </div>\n ))}\n </div>\n );\n};\n\nexport { SidebarMenuSubItemIndentation };\n"],"names":["separatorVariants","cva","SidebarMenuSubItemIndentation","lvl","variant","Array","_","index","Separator"],"mappings":";;;AAKA,MAAMA,oBAAoBC,IAAI;IAAC;CAAa,EAAE;IAC1C,UAAU;QACN,SAAS;YACL,eAAe;QACnB;IACJ;AACJ;AASA,MAAMC,gCAAgC,CAAC,EAAEC,GAAG,EAAEC,OAAO,EAAsC,GAChF,WAAP,GACI,oBAAC;QAAI,gBAAa;QAAc,WAAW;OACtCC,MAAM,IAAI,CAAC;QAAE,QAAQF;IAAI,GAAG,CAACG,GAAGC,QAAAA,WAAAA,GAC7B,oBAAC;YAAI,gBAAc;YAAuB,WAAW;YAAS,KAAKJ,MAAMI;yBACrE,oBAACC,WAASA;YACN,aAAa;YACb,QAAQ;YACR,SAAS;YACT,WAAWR,kBAAkB;gBAAEI;YAAQ"}
1
+ {"version":3,"file":"Sidebar/components/items/SidebarMenuSubItemIndentation.js","sources":["../../../../src/Sidebar/components/items/SidebarMenuSubItemIndentation.tsx"],"sourcesContent":["import React from \"react\";\nimport { Separator } from \"~/Separator/index.js\";\n\nimport { cva, type VariantProps } from \"~/utils.js\";\n\nconst separatorVariants = cva([\"h-xl ml-px\"], {\n variants: {\n variant: {\n \"group-label\": \"h-[38px]!\"\n }\n }\n});\n\nexport interface SidebarMenuSubItemIndentationProps\n extends\n Omit<React.HTMLAttributes<HTMLLIElement>, \"content\">,\n VariantProps<typeof separatorVariants> {\n lvl: number;\n}\n\nconst SidebarMenuSubItemIndentation = ({ lvl, variant }: SidebarMenuSubItemIndentationProps) => {\n return (\n <div data-sidebar=\"indentation\" className={\"gap-x-xs flex mr-sm\"}>\n {Array.from({ length: lvl }, (_, index) => (\n <div data-sidebar={\"indentation-element\"} className={\"ml-md\"} key={lvl + index}>\n <Separator\n orientation={\"vertical\"}\n margin={\"none\"}\n variant={\"strong\"}\n className={separatorVariants({ variant, className: \"!h-full\" })}\n />\n </div>\n ))}\n </div>\n );\n};\n\nexport { SidebarMenuSubItemIndentation };\n"],"names":["separatorVariants","cva","SidebarMenuSubItemIndentation","lvl","variant","Array","_","index","Separator"],"mappings":";;;AAKA,MAAMA,oBAAoBC,IAAI;IAAC;CAAa,EAAE;IAC1C,UAAU;QACN,SAAS;YACL,eAAe;QACnB;IACJ;AACJ;AASA,MAAMC,gCAAgC,CAAC,EAAEC,GAAG,EAAEC,OAAO,EAAsC,GAChF,WAAP,GACI,oBAAC;QAAI,gBAAa;QAAc,WAAW;OACtCC,MAAM,IAAI,CAAC;QAAE,QAAQF;IAAI,GAAG,CAACG,GAAGC,QAAAA,WAAAA,GAC7B,oBAAC;YAAI,gBAAc;YAAuB,WAAW;YAAS,KAAKJ,MAAMI;yBACrE,oBAACC,WAASA;YACN,aAAa;YACb,QAAQ;YACR,SAAS;YACT,WAAWR,kBAAkB;gBAAEI;gBAAS,WAAW;YAAU"}
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { Skeleton } from "./Skeleton.js";
3
3
  declare const meta: Meta<typeof Skeleton>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton/Skeleton.stories.js","sources":["../../src/Skeleton/Skeleton.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { Skeleton } from \"./Skeleton.js\";\n\nconst meta: Meta<typeof Skeleton> = {\n title: \"Components/Skeleton\",\n component: Skeleton,\n parameters: {\n layout: \"padded\"\n },\n argTypes: {\n type: {\n control: \"select\",\n options: [\"text\", \"thumbnail\", \"area\"]\n },\n size: {\n control: \"select\",\n options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\", \"3xl\"]\n }\n }\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof Skeleton>;\n\nexport const Default: Story = {};\n\nexport const Text: Story = {\n args: {\n type: \"text\"\n }\n};\n\nexport const Thumbnail: Story = {\n args: {\n type: \"thumbnail\"\n }\n};\n\nexport const Area: Story = {\n args: {\n type: \"area\",\n className: \"w-1/2 h-32\"\n }\n};\n\nexport const MultipleAreas: Story = {\n render: () => (\n <div className=\"flex gap-md\">\n <div className=\"flex flex-col gap-md\">\n <Skeleton type=\"area\" className={\"w-32 h-32\"} />\n <Skeleton type=\"area\" className={\"w-32 h-32\"} />\n </div>\n <div>\n <Skeleton type=\"area\" className=\"w-32 h-full\" />\n </div>\n </div>\n )\n};\n\nexport const ExtraSmall: Story = {\n args: {\n size: \"xs\"\n }\n};\n\nexport const Small: Story = {\n args: {\n size: \"sm\"\n }\n};\n\nexport const Medium: Story = {\n args: {\n size: \"md\"\n }\n};\n\nexport const Large: Story = {\n args: {\n size: \"lg\"\n }\n};\n\nexport const ExtraLarge: Story = {\n args: {\n size: \"xl\"\n }\n};\n\nexport const DoubleExtraLarge: Story = {\n args: {\n size: \"xxl\"\n }\n};\n\nexport const TripleExtraLarge: Story = {\n args: {\n size: \"3xl\"\n }\n};\n\nexport const Documentation: Story = {\n args: {\n type: \"area\",\n size: \"lg\"\n },\n argTypes: {\n type: {\n control: \"select\",\n description: \"The type of skeleton to display\",\n options: [\"text\", \"thumbnail\", \"area\"]\n },\n size: {\n control: \"select\",\n description: \"The size of the skeleton\",\n options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\", \"3xl\"]\n }\n }\n};\n"],"names":["meta","Skeleton","Default","Text","Thumbnail","Area","MultipleAreas","ExtraSmall","Small","Medium","Large","ExtraLarge","DoubleExtraLarge","TripleExtraLarge","Documentation"],"mappings":";;AAIA,MAAMA,OAA8B;IAChC,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;IACA,UAAU;QACN,MAAM;YACF,SAAS;YACT,SAAS;gBAAC;gBAAQ;gBAAa;aAAO;QAC1C;QACA,MAAM;YACF,SAAS;YACT,SAAS;gBAAC;gBAAM;gBAAM;gBAAM;gBAAM;gBAAM;gBAAO;aAAM;QACzD;IACJ;AACJ;AAEA,yBAAeD;AAIR,MAAME,UAAiB,CAAC;AAExB,MAAMC,OAAc;IACvB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,YAAmB;IAC5B,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,OAAc;IACvB,MAAM;QACF,MAAM;QACN,WAAW;IACf;AACJ;AAEO,MAAMC,gBAAuB;IAChC,QAAQ,kBACJ,oBAAC;YAAI,WAAU;yBACX,oBAAC;YAAI,WAAU;yBACX,oBAACL,UAAQA;YAAC,MAAK;YAAO,WAAW;0BACjC,oBAACA,UAAQA;YAAC,MAAK;YAAO,WAAW;2BAErC,oBAAC,2BACG,oBAACA,UAAQA;YAAC,MAAK;YAAO,WAAU;;AAIhD;AAEO,MAAMM,aAAoB;IAC7B,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,QAAe;IACxB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,SAAgB;IACzB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,QAAe;IACxB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,aAAoB;IAC7B,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,mBAA0B;IACnC,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,mBAA0B;IACnC,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,gBAAuB;IAChC,MAAM;QACF,MAAM;QACN,MAAM;IACV;IACA,UAAU;QACN,MAAM;YACF,SAAS;YACT,aAAa;YACb,SAAS;gBAAC;gBAAQ;gBAAa;aAAO;QAC1C;QACA,MAAM;YACF,SAAS;YACT,aAAa;YACb,SAAS;gBAAC;gBAAM;gBAAM;gBAAM;gBAAM;gBAAM;gBAAO;aAAM;QACzD;IACJ;AACJ"}
1
+ {"version":3,"file":"Skeleton/Skeleton.stories.js","sources":["../../src/Skeleton/Skeleton.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Skeleton } from \"./Skeleton.js\";\n\nconst meta: Meta<typeof Skeleton> = {\n title: \"Components/Skeleton\",\n component: Skeleton,\n parameters: {\n layout: \"padded\"\n },\n argTypes: {\n type: {\n control: \"select\",\n options: [\"text\", \"thumbnail\", \"area\"]\n },\n size: {\n control: \"select\",\n options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\", \"3xl\"]\n }\n }\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof Skeleton>;\n\nexport const Default: Story = {};\n\nexport const Text: Story = {\n args: {\n type: \"text\"\n }\n};\n\nexport const Thumbnail: Story = {\n args: {\n type: \"thumbnail\"\n }\n};\n\nexport const Area: Story = {\n args: {\n type: \"area\",\n className: \"w-1/2 h-32\"\n }\n};\n\nexport const MultipleAreas: Story = {\n render: () => (\n <div className=\"flex gap-md\">\n <div className=\"flex flex-col gap-md\">\n <Skeleton type=\"area\" className={\"w-32 h-32\"} />\n <Skeleton type=\"area\" className={\"w-32 h-32\"} />\n </div>\n <div>\n <Skeleton type=\"area\" className=\"w-32 h-full\" />\n </div>\n </div>\n )\n};\n\nexport const ExtraSmall: Story = {\n args: {\n size: \"xs\"\n }\n};\n\nexport const Small: Story = {\n args: {\n size: \"sm\"\n }\n};\n\nexport const Medium: Story = {\n args: {\n size: \"md\"\n }\n};\n\nexport const Large: Story = {\n args: {\n size: \"lg\"\n }\n};\n\nexport const ExtraLarge: Story = {\n args: {\n size: \"xl\"\n }\n};\n\nexport const DoubleExtraLarge: Story = {\n args: {\n size: \"xxl\"\n }\n};\n\nexport const TripleExtraLarge: Story = {\n args: {\n size: \"3xl\"\n }\n};\n\nexport const Documentation: Story = {\n args: {\n type: \"area\",\n size: \"lg\"\n },\n argTypes: {\n type: {\n control: \"select\",\n description: \"The type of skeleton to display\",\n options: [\"text\", \"thumbnail\", \"area\"]\n },\n size: {\n control: \"select\",\n description: \"The size of the skeleton\",\n options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\", \"3xl\"]\n }\n }\n};\n"],"names":["meta","Skeleton","Default","Text","Thumbnail","Area","MultipleAreas","ExtraSmall","Small","Medium","Large","ExtraLarge","DoubleExtraLarge","TripleExtraLarge","Documentation"],"mappings":";;AAIA,MAAMA,OAA8B;IAChC,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;IACA,UAAU;QACN,MAAM;YACF,SAAS;YACT,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AAM;QACzD;IACJ;AACJ"}
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { Slider } from "./Slider.js";
3
3
  declare const meta: Meta<typeof Slider>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"Slider/Slider.stories.js","sources":["../../src/Slider/Slider.stories.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { Slider } from \"./Slider.js\";\n\nconst meta: Meta<typeof Slider> = {\n title: \"Components/Form/Slider\",\n component: Slider,\n argTypes: {\n onValueChange: { action: \"onValueChange\" },\n onValueCommit: { action: \"onValueCommit\" },\n disabled: {\n control: \"boolean\",\n defaultValue: false\n }\n },\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [value, setValue] = useState(args.value);\n return <Slider {...args} value={value} onValueChange={value => setValue(value)} />;\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Slider>;\n\nexport const Default: Story = {};\n\nexport const WithLabel: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\"\n }\n};\n\nexport const WithLabelRequired: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n required: true\n }\n};\n\nexport const WithDescription: Story = {\n args: {\n ...Default.args,\n description: \"Provide the required information for processing your request.\"\n }\n};\n\nexport const WithNotes: Story = {\n args: {\n ...Default.args,\n note: \"Note: Ensure your selection or input is accurate before proceeding.\"\n }\n};\n\nexport const WithErrors: Story = {\n args: {\n ...Default.args,\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Disabled: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n disabled: true\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 WithSideLabel: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n labelPosition: \"side\"\n }\n};\n\nexport const WithSideLabelRequired: Story = {\n args: {\n ...WithSideLabel.args,\n required: true\n }\n};\n\nexport const WithSideLabelAndDescription: Story = {\n args: {\n ...WithSideLabel.args,\n description: \"Provide the required information for processing your request.\"\n }\n};\n\nexport const WithSideLabelAndNotes: Story = {\n args: {\n ...WithSideLabel.args,\n note: \"Note: Ensure your selection or input is accurate before proceeding.\"\n }\n};\n\nexport const WithSideLabelAndErrors: Story = {\n args: {\n ...WithSideLabel.args,\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const WithSideLabelDisabled: Story = {\n args: {\n ...WithSideLabel.args,\n label: \"Any field label\",\n disabled: true\n }\n};\n\nexport const WithSideLabelFullExample: Story = {\n args: {\n ...WithSideLabel.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(args.value || 50);\n const [validation, setValidation] = useState({ isValid: true, message: \"\" });\n\n // Update value when args.value changes\n useEffect(() => {\n setValue(args.value ?? 50);\n }, [args.value]);\n\n const handleChange = (newValue: number) => {\n setValue(newValue);\n\n if (args.required && newValue === 0) {\n setValidation({ isValid: false, message: \"Please select a value\" });\n } else {\n setValidation({ isValid: true, message: \"\" });\n }\n };\n\n // Validate on required change or value change\n useEffect(() => {\n if (args.required && value === 0) {\n setValidation({ isValid: false, message: \"Please select a value\" });\n } else {\n setValidation({ isValid: true, message: \"\" });\n }\n }, [args.required, value]);\n\n return (\n <Slider\n {...args}\n value={value}\n onValueChange={handleChange}\n validation={validation}\n required={args.required}\n showTooltip={args.showTooltip}\n transformValue={args.transformValue}\n />\n );\n },\n args: {\n label: \"Volume Level\",\n required: true,\n disabled: false,\n description: \"Adjust the volume level of your device\",\n note: \"Note: Higher values may cause distortion on some devices\",\n min: 0,\n max: 100,\n step: 1,\n value: 50,\n showTooltip: true,\n transformValue: (value: number) => `${value}%`,\n validation: undefined\n },\n argTypes: {\n label: {\n description: \"Label text for the slider\",\n control: \"text\"\n },\n required: {\n description: \"Makes the field required when set to true\",\n control: \"boolean\"\n },\n disabled: {\n description: \"Disables the slider when set to true\",\n control: \"boolean\"\n },\n description: {\n description: \"Additional description text below the field\",\n control: \"text\"\n },\n note: {\n description: \"Additional note text below the field\",\n control: \"text\"\n },\n min: {\n description: \"Minimum value for the slider\",\n control: \"number\"\n },\n max: {\n description: \"Maximum value for the slider\",\n control: \"number\"\n },\n step: {\n description: \"Step increment for the slider\",\n control: \"number\"\n },\n value: {\n description: \"Current value of the slider\",\n control: \"number\"\n },\n showTooltip: {\n description: \"Whether to show a tooltip with the current value\",\n control: \"boolean\",\n defaultValue: true\n },\n transformValue: {\n description: \"Function to transform the numeric value to display text\"\n },\n labelPosition: {\n description: \"Position of the label relative to the slider\",\n control: \"radio\",\n options: [\"top\", \"side\"]\n },\n validation: {\n description:\n \"Object containing validation state and message. Please refer to the example code for details on usage.\"\n },\n onValueChange: {\n description: \"Function called when the slider value changes\"\n },\n onValueCommit: {\n description: \"Function called when the slider value is committed (on release)\"\n }\n }\n};\n"],"names":["meta","Slider","args","value","setValue","useState","Default","WithLabel","WithLabelRequired","WithDescription","WithNotes","WithErrors","Disabled","FullExample","WithSideLabel","WithSideLabelRequired","WithSideLabelAndDescription","WithSideLabelAndNotes","WithSideLabelAndErrors","WithSideLabelDisabled","WithSideLabelFullExample","Documentation","validation","setValidation","useEffect","handleChange","newValue","undefined"],"mappings":";;AAIA,MAAMA,OAA4B;IAC9B,OAAO;IACP,WAAWC;IACX,UAAU;QACN,eAAe;YAAE,QAAQ;QAAgB;QACzC,eAAe;YAAE,QAAQ;QAAgB;QACzC,UAAU;YACN,SAAS;YACT,cAAc;QAClB;IACJ;IAC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AG/C;IACA,MAAM;QACF,OAAO;QACP,UAAU;QACV,UAAU;QACV,aAAa;QACb,MAAM;QACN,KAAK;QACL,KAAK;QACL,MAAM;QACN,OAAO;QACP,aAAa;QACb,gBAAgB,CAACC,QAAkB,GAAGA,MAAM,CAAC,CAAC;QAC9C,YAAYwB;IAChB;IACA,UAAU;QACN,OAAO;YACH,aAAa;YACb,SAAS;QACb;QACA,UAAU;YACN,aAAa;YACb,SAAS;QACb;QACA,UAAU;YACN,aAAa;YACb,SAAS;QACb;QACA,aAAa;YACT,aAAa;YACb,SAAS;QACb;QACA,MAAM;YACF,aAAa;YACb,SAAS;QACb;QACA,KAAK;YACD,aAAa;YACb,SAAS;QACb;QACA,KAAK;YACD,aAAa;YACb,SAAS;QACb;QACA,MAAM;YACF,aAAa;YACb,SAAS;QACb;QACA,OAAO;YACH,aAAa;YACb,SAAS;QACb;QACA,aAAa;YACT,aAAa;YACb,SAAS;YACT,cAAc;QAClB;QACA,gBAAgB;YACZ,aAAa;QACjB;QACA,eAAe;YACX,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAO;aAAO;QAC5B;QACA,YAAY;YACR,aACI;QACR;QACA,eAAe;YACX,aAAa;QACjB;QACA,eAAe;YACX,aAAa;QACjB;IACJ;AACJ"}
1
+ {"version":3,"file":"Slider/Slider.stories.js","sources":["../../src/Slider/Slider.stories.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Slider } from \"./Slider.js\";\n\nconst meta: Meta<typeof Slider> = {\n title: \"Components/Form/Slider\",\n component: Slider,\n argTypes: {\n onValueChange: { action: \"onValueChange\" },\n onValueCommit: { action: \"onValueCommit\" },\n disabled: {\n control: \"boolean\",\n defaultValue: false\n }\n },\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [value, setValue] = useState(args.value);\n return <Slider {...args} value={value} onValueChange={value => setValue(value)} />;\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Slider>;\n\nexport const Default: Story = {};\n\nexport const WithLabel: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\"\n }\n};\n\nexport const WithLabelRequired: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n required: true\n }\n};\n\nexport const WithDescription: Story = {\n args: {\n ...Default.args,\n description: \"Provide the required information for processing your request.\"\n }\n};\n\nexport const WithNotes: Story = {\n args: {\n ...Default.args,\n note: \"Note: Ensure your selection or input is accurate before proceeding.\"\n }\n};\n\nexport const WithErrors: Story = {\n args: {\n ...Default.args,\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Disabled: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n disabled: true\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 WithSideLabel: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n labelPosition: \"side\"\n }\n};\n\nexport const WithSideLabelRequired: Story = {\n args: {\n ...WithSideLabel.args,\n required: true\n }\n};\n\nexport const WithSideLabelAndDescription: Story = {\n args: {\n ...WithSideLabel.args,\n description: \"Provide the required information for processing your request.\"\n }\n};\n\nexport const WithSideLabelAndNotes: Story = {\n args: {\n ...WithSideLabel.args,\n note: \"Note: Ensure your selection or input is accurate before proceeding.\"\n }\n};\n\nexport const WithSideLabelAndErrors: Story = {\n args: {\n ...WithSideLabel.args,\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const WithSideLabelDisabled: Story = {\n args: {\n ...WithSideLabel.args,\n label: \"Any field label\",\n disabled: true\n }\n};\n\nexport const WithSideLabelFullExample: Story = {\n args: {\n ...WithSideLabel.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(args.value || 50);\n const [validation, setValidation] = useState({ isValid: true, message: \"\" });\n\n // Update value when args.value changes\n useEffect(() => {\n setValue(args.value ?? 50);\n }, [args.value]);\n\n const handleChange = (newValue: number) => {\n setValue(newValue);\n\n if (args.required && newValue === 0) {\n setValidation({ isValid: false, message: \"Please select a value\" });\n } else {\n setValidation({ isValid: true, message: \"\" });\n }\n };\n\n // Validate on required change or value change\n useEffect(() => {\n if (args.required && value === 0) {\n setValidation({ isValid: false, message: \"Please select a value\" });\n } else {\n setValidation({ isValid: true, message: \"\" });\n }\n }, [args.required, value]);\n\n return (\n <Slider\n {...args}\n value={value}\n onValueChange={handleChange}\n validation={validation}\n required={args.required}\n showTooltip={args.showTooltip}\n transformValue={args.transformValue}\n />\n );\n },\n args: {\n label: \"Volume Level\",\n required: true,\n disabled: false,\n description: \"Adjust the volume level of your device\",\n note: \"Note: Higher values may cause distortion on some devices\",\n min: 0,\n max: 100,\n step: 1,\n value: 50,\n showTooltip: true,\n transformValue: (value: number) => `${value}%`,\n validation: undefined\n },\n argTypes: {\n label: {\n description: \"Label text for the slider\",\n control: \"text\"\n },\n required: {\n description: \"Makes the field required when set to true\",\n control: \"boolean\"\n },\n disabled: {\n description: \"Disables the slider when set to true\",\n control: \"boolean\"\n },\n description: {\n description: \"Additional description text below the field\",\n control: \"text\"\n },\n note: {\n description: \"Additional note text below the field\",\n control: \"text\"\n },\n min: {\n description: \"Minimum value for the slider\",\n control: \"number\"\n },\n max: {\n description: \"Maximum value for the slider\",\n control: \"number\"\n },\n step: {\n description: \"Step increment for the slider\",\n control: \"number\"\n },\n value: {\n description: \"Current value of the slider\",\n control: \"number\"\n },\n showTooltip: {\n description: \"Whether to show a tooltip with the current value\",\n control: \"boolean\",\n defaultValue: true\n },\n transformValue: {\n description: \"Function to transform the numeric value to display text\"\n },\n labelPosition: {\n description: \"Position of the label relative to the slider\",\n control: \"radio\",\n options: [\"top\", \"side\"]\n },\n validation: {\n description:\n \"Object containing validation state and message. Please refer to the example code for details on usage.\"\n },\n onValueChange: {\n description: \"Function called when the slider value changes\"\n },\n onValueCommit: {\n description: \"Function called when the slider value is committed (on release)\"\n }\n }\n};\n"],"names":["meta","Slider","args","value","setValue","useState","Default","WithLabel","WithLabelRequired","WithDescription","WithNotes","WithErrors","Disabled","FullExample","WithSideLabel","WithSideLabelRequired","WithSideLabelAndDescription","WithSideLabelAndNotes","WithSideLabelAndErrors","WithSideLabelDisabled","WithSideLabelFullExample","Documentation","validation","setValidation","useEffect","handleChange","newValue","undefined"],"mappings":";;AAIA,MAAMA,OAA4B;IAC9B,OAAO;IACP,WAAWC;IACX,UAAU;QACN,eAAe;YAAE,QAAQ;QAAgB;QACzC,eAAe;YAAE,QAAQ;QAAgB;QACzC,UAAU;YACN,SAAS;YACT,cAAc;QAClB;IACJ;IACA,YAAY;QACR,QAAQ;IACZ;IACA,QAAQC,CAAAA;QACJ,MAAM,CAACC,OAAOC,SAAS,GAAGC,SAASH,KAAK,KAAK;QAC7C,OAAO,WAAP,GAAO,oBAACD,QAAMA;YAAE,GAAGC,IAAI;YAAE,OAAOC;YAAO,eAAeA,CAAAA,QAASC,SAASD;;IAC5E;AACJ;AAEA,uBAAeH;AAGR,MAAMM,UAAiB,CAAC;AAExB,MAAMC,YAAmB;IAC5B,MAAM;QACF,GAAGD,QAAQ,IAAI;QACf,OAAO;IACX;AACJ;AAEO,MAAME,oBAA2B;IACpC,MAAM;QACF,GAAGF,QAAQ,IAAI;QACf,OAAO;QACP,UAAU;IACd;AACJ;AAEO,MAAMG,kBAAyB;IAClC,MAAM;QACF,GAAGH,QAAQ,IAAI;QACf,aAAa;IACjB;AACJ;AAEO,MAAMI,YAAmB;IAC5B,MAAM;QACF,GAAGJ,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMK,aAAoB;IAC7B,MAAM;QACF,GAAGL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aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAO;aAAO;QAC5B;QACA,YAAY;YACR,aACI;QACR;QACA,eAAe;YACX,aAAa;QACjB;QACA,eAAe;YACX,aAAa;QACjB;IACJ;AACJ"}
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { SliderPrimitive } from "./SliderPrimitive.js";
3
3
  declare const meta: Meta<typeof SliderPrimitive>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"Slider/primitives/SliderPrimitive.stories.js","sources":["../../../src/Slider/primitives/SliderPrimitive.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { SliderPrimitive } from \"./SliderPrimitive.js\";\nimport { Button } from \"~/Button/index.js\";\n\nconst meta: Meta<typeof SliderPrimitive> = {\n title: \"Components/Form Primitives/Slider\",\n component: SliderPrimitive,\n argTypes: {\n onValueChange: { action: \"onValueChange\" },\n onValueCommit: { action: \"onValueCommit\" }\n },\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [value, setValue] = useState(args.value);\n return <SliderPrimitive {...args} value={value} onValueChange={value => setValue(value)} />;\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof SliderPrimitive>;\n\nexport const Default: Story = {};\n\nexport const WithDefaultValue: Story = {\n args: {\n value: 50\n }\n};\n\nexport const WithMinAndMaxValues: Story = {\n args: {\n min: 10,\n max: 20\n }\n};\n\nexport const WithNegativeMinValue: Story = {\n args: {\n min: -100,\n max: 100,\n value: 0\n }\n};\n\nexport const WithSteps: Story = {\n args: {\n step: 10\n }\n};\n\nexport const Disabled: Story = {\n args: {\n disabled: true,\n value: 50\n }\n};\n\nexport const WithTooltip: Story = {\n args: {\n showTooltip: true\n }\n};\n\nexport const WithTooltipSideTop: Story = {\n args: {\n showTooltip: true,\n tooltipSide: \"top\"\n }\n};\n\nexport const WithTooltipAndCustomValueTransformer: Story = {\n args: {\n showTooltip: true,\n transformValue: (value: number) => {\n return `${Math.round(value)}%`;\n }\n }\n};\n\nexport const WithExternalValueControl: Story = {\n args: {\n showTooltip: true,\n transformValue: (value: number) => {\n return `${Math.round(value)}%`;\n }\n },\n render: args => {\n const defaultValue = 50;\n const [value, setValue] = useState(defaultValue);\n return (\n <div className={\"w-full\"}>\n <div>\n <SliderPrimitive\n {...args}\n value={value}\n onValueChange={value => setValue(value)}\n />\n </div>\n <div className={\"mt-4 text-center\"}>\n <Button text={\"Reset\"} onClick={() => setValue(defaultValue)} />\n </div>\n <div className={\"mt-4 text-center\"}>\n Current value: <code>{value}</code>\n </div>\n </div>\n );\n }\n};\n"],"names":["meta","SliderPrimitive","args","value","setValue","useState","Default","WithDefaultValue","WithMinAndMaxValues","WithNegativeMinValue","WithSteps","Disabled","WithTooltip","WithTooltipSideTop","WithTooltipAndCustomValueTransformer","Math","WithExternalValueControl","defaultValue","Button"],"mappings":";;;AAKA,MAAMA,OAAqC;IACvC,OAAO;IACP,WAAWC;IACX,UAAU;QACN,eAAe;YAAE,QAAQ;QAAgB;QACzC,eAAe;YAAE,QAAQ;QAAgB;IAC7C;IACA,YAAY;QACR,QAAQ;IACZ;IACA,QAAQC,CAAAA;QACJ,MAAM,CAACC,OAAOC,SAAS,GAAGC,SAASH,KAAK,KAAK;QAC7C,OAAO,WAAP,GAAO,oBAACD,iBAAeA;YAAE,GAAGC,IAAI;YAAE,OAAOC;YAAO,eAAeA,CAAAA,QAASC,SAASD;;IACrF;AACJ;AAEA,gCAAeH;AAGR,MAAMM,UAAiB,CAAC;AAExB,MAAMC,mBAA0B;IACnC,MAAM;QACF,OAAO;IACX;AACJ;AAEO,MAAMC,sBAA6B;IACtC,MAAM;QACF,KAAK;QACL,KAAK;IACT;AACJ;AAEO,MAAMC,uBAA8B;IACvC,MAAM;QACF,KAAK;QACL,KAAK;QACL,OAAO;IACX;AACJ;AAEO,MAAMC,YAAmB;IAC5B,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,WAAkB;IAC3B,MAAM;QACF,UAAU;QACV,OAAO;IACX;AACJ;AAEO,MAAMC,cAAqB;IAC9B,MAAM;QACF,aAAa;IACjB;AACJ;AAEO,MAAMC,qBAA4B;IACrC,MAAM;QACF,aAAa;QACb,aAAa;IACjB;AACJ;AAEO,MAAMC,uCAA8C;IACvD,MAAM;QACF,aAAa;QACb,gBAAgB,CAACX,QACN,GAAGY,KAAK,KAAK,CAACZ,OAAO,CAAC,CAAC;IAEtC;AACJ;AAEO,MAAMa,2BAAkC;IAC3C,MAAM;QACF,aAAa;QACb,gBAAgB,CAACb,QACN,GAAGY,KAAK,KAAK,CAACZ,OAAO,CAAC,CAAC;IAEtC;IACA,QAAQD,CAAAA;QACJ,MAAMe,eAAe;QACrB,MAAM,CAACd,OAAOC,SAAS,GAAGC,SAASY;QACnC,OAAO,WAAP,GACI,oBAAC;YAAI,WAAW;yBACZ,oBAAC,2BACG,oBAAChB,iBAAeA;YACX,GAAGC,IAAI;YACR,OAAOC;YACP,eAAeA,CAAAA,QAASC,SAASD;2BAGzC,oBAAC;YAAI,WAAW;yBACZ,oBAACe,QAAMA;YAAC,MAAM;YAAS,SAAS,IAAMd,SAASa;2BAEnD,oBAAC;YAAI,WAAW;WAAoB,iCACjB,oBAAC,cAAMd;IAItC;AACJ"}
1
+ {"version":3,"file":"Slider/primitives/SliderPrimitive.stories.js","sources":["../../../src/Slider/primitives/SliderPrimitive.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { SliderPrimitive } from \"./SliderPrimitive.js\";\nimport { Button } from \"~/Button/index.js\";\n\nconst meta: Meta<typeof SliderPrimitive> = {\n title: \"Components/Form Primitives/Slider\",\n component: SliderPrimitive,\n argTypes: {\n onValueChange: { action: \"onValueChange\" },\n onValueCommit: { action: \"onValueCommit\" }\n },\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [value, setValue] = useState(args.value);\n return <SliderPrimitive {...args} value={value} onValueChange={value => setValue(value)} />;\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof SliderPrimitive>;\n\nexport const Default: Story = {};\n\nexport const WithDefaultValue: Story = {\n args: {\n value: 50\n }\n};\n\nexport const WithMinAndMaxValues: Story = {\n args: {\n min: 10,\n max: 20\n }\n};\n\nexport const WithNegativeMinValue: Story = {\n args: {\n min: -100,\n max: 100,\n value: 0\n }\n};\n\nexport const WithSteps: Story = {\n args: {\n step: 10\n }\n};\n\nexport const Disabled: Story = {\n args: {\n disabled: true,\n value: 50\n }\n};\n\nexport const WithTooltip: Story = {\n args: {\n showTooltip: true\n }\n};\n\nexport const WithTooltipSideTop: Story = {\n args: {\n showTooltip: true,\n tooltipSide: \"top\"\n }\n};\n\nexport const WithTooltipAndCustomValueTransformer: Story = {\n args: {\n showTooltip: true,\n transformValue: (value: number) => {\n return `${Math.round(value)}%`;\n }\n }\n};\n\nexport const WithExternalValueControl: Story = {\n args: {\n showTooltip: true,\n transformValue: (value: number) => {\n return `${Math.round(value)}%`;\n }\n },\n render: args => {\n const defaultValue = 50;\n const [value, setValue] = useState(defaultValue);\n return (\n <div className={\"w-full\"}>\n <div>\n <SliderPrimitive\n {...args}\n value={value}\n onValueChange={value => setValue(value)}\n />\n </div>\n <div className={\"mt-4 text-center\"}>\n <Button text={\"Reset\"} onClick={() => setValue(defaultValue)} />\n </div>\n <div className={\"mt-4 text-center\"}>\n Current value: <code>{value}</code>\n </div>\n </div>\n );\n }\n};\n"],"names":["meta","SliderPrimitive","args","value","setValue","useState","Default","WithDefaultValue","WithMinAndMaxValues","WithNegativeMinValue","WithSteps","Disabled","WithTooltip","WithTooltipSideTop","WithTooltipAndCustomValueTransformer","Math","WithExternalValueControl","defaultValue","Button"],"mappings":";;;AAKA,MAAMA,OAAqC;IACvC,OAAO;IACP,WAAWC;IACX,UAAU;QACN,eAAe;YAAE,QAAQ;QAAgB;QACzC,eAAe;Y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W;yBACZ,oBAACe,QAAMA;YAAC,MAAM;YAAS,SAAS,IAAMd,SAASa;2BAEnD,oBAAC;YAAI,WAAW;WAAoB,iCACjB,oBAAC,cAAMd;IAItC;AACJ"}
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { SteppedProgress } from "./SteppedProgress.js";
3
3
  declare const meta: Meta<typeof SteppedProgress>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"SteppedProgress/SteppedProgress.stories.js","sources":["../../src/SteppedProgress/SteppedProgress.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { SteppedProgress } from \"./SteppedProgress.js\";\nimport { ProgressItemState } from \"~/SteppedProgress/domains/index.js\";\n\nconst meta: Meta<typeof SteppedProgress> = {\n title: \"Components/SteppedProgress\",\n component: SteppedProgress,\n argTypes: {},\n parameters: {\n layout: \"padded\"\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof SteppedProgress>;\n\nexport const Default: Story = {\n args: {\n items: [\n {\n label: \"Step\"\n },\n {\n label: \"Step In Progress\",\n state: ProgressItemState.IN_PROGRESS\n },\n {\n label: \"Step Completed\",\n state: ProgressItemState.COMPLETED\n },\n {\n label: \"Completed Affirmative\",\n state: ProgressItemState.COMPLETED_AFFIRMATIVE\n }\n ]\n }\n};\n\nexport const WithMultipleLines: Story = {\n decorators: [\n Story => (\n <div\n style={{\n width: \"240px\"\n }}\n >\n <Story />\n </div>\n )\n ],\n args: {\n items: [\n {\n label: \"Step but with multiple lines of text.\"\n },\n {\n label: \"Step in progress but with multiple lines of text.\",\n state: ProgressItemState.IN_PROGRESS\n },\n {\n label: \"Step completed but with multiple lines of text.\",\n state: ProgressItemState.COMPLETED\n },\n {\n label: \"Completed affirmative but with multiple lines of text.\",\n state: ProgressItemState.COMPLETED_AFFIRMATIVE\n }\n ]\n }\n};\n\nexport const Disabled: Story = {\n args: {\n items: [\n {\n label: \"Step\",\n disabled: true\n },\n {\n label: \"Step In Progress\",\n state: ProgressItemState.IN_PROGRESS,\n disabled: true\n },\n {\n label: \"Step Completed\",\n state: ProgressItemState.COMPLETED,\n disabled: true\n },\n {\n label: \"Completed Affirmative\",\n state: ProgressItemState.COMPLETED_AFFIRMATIVE,\n disabled: true\n }\n ]\n }\n};\n\nexport const Errored: Story = {\n args: {\n items: [\n {\n label: \"Step\",\n errored: true\n },\n {\n label: \"Step In Progress\",\n state: ProgressItemState.IN_PROGRESS,\n errored: true\n },\n {\n label: \"Step Completed\",\n state: ProgressItemState.COMPLETED,\n errored: true\n },\n {\n label: \"Completed Affirmative\",\n state: ProgressItemState.COMPLETED_AFFIRMATIVE,\n errored: true\n }\n ]\n }\n};\n\nexport const DisabledAndErrored: Story = {\n args: {\n items: [\n {\n label: \"Step\",\n disabled: true,\n errored: true\n },\n {\n label: \"Step In Progress\",\n state: ProgressItemState.IN_PROGRESS,\n disabled: true,\n errored: true\n },\n {\n label: \"Step Completed\",\n state: ProgressItemState.COMPLETED,\n disabled: true,\n errored: true\n },\n {\n label: \"Completed Affirmative\",\n state: ProgressItemState.COMPLETED_AFFIRMATIVE,\n disabled: true,\n errored: true\n }\n ]\n }\n};\n"],"names":["meta","SteppedProgress","Default","ProgressItemState","WithMultipleLines","Story","Disabled","Errored","DisabledAndErrored"],"mappings":";;;AAKA,MAAMA,OAAqC;IACvC,OAAO;IACP,WAAWC;IACX,UAAU,CAAC;IACX,YAAY;QACR,QAAQ;IACZ;AACJ;AAEA,gCAAeD;AAGR,MAAME,UAAiB;IAC1B,MAAM;QACF,OAAO;YACH;gBACI,OAAO;YACX;YACA;gBACI,OAAO;gBACP,OAAOC,kBAAkB,WAAW;YACxC;YACA;gBACI,OAAO;gBACP,OAAOA,kBAAkB,SAAS;YACtC;YACA;gBACI,OAAO;gBACP,OAAOA,kBAAkB,qBAAqB;YAClD;SACH;IACL;AACJ;AAEO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H;IACL;AACJ"}
1
+ {"version":3,"file":"SteppedProgress/SteppedProgress.stories.js","sources":["../../src/SteppedProgress/SteppedProgress.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { SteppedProgress } from \"./SteppedProgress.js\";\nimport { ProgressItemState } from \"~/SteppedProgress/domains/index.js\";\n\nconst meta: Meta<typeof SteppedProgress> = {\n title: \"Components/SteppedProgress\",\n component: SteppedProgress,\n argTypes: {},\n parameters: {\n layout: \"padded\"\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof SteppedProgress>;\n\nexport const Default: Story = {\n args: {\n items: [\n {\n label: \"Step\"\n },\n {\n label: \"Step In Progress\",\n state: ProgressItemState.IN_PROGRESS\n },\n {\n label: \"Step Completed\",\n state: ProgressItemState.COMPLETED\n },\n {\n label: \"Completed Affirmative\",\n state: ProgressItemState.COMPLETED_AFFIRMATIVE\n }\n ]\n }\n};\n\nexport const WithMultipleLines: Story = {\n decorators: [\n Story => (\n <div\n style={{\n width: \"240px\"\n }}\n >\n <Story />\n </div>\n )\n ],\n args: {\n items: [\n {\n label: \"Step but with multiple lines of text.\"\n },\n {\n label: \"Step in progress but with multiple lines of text.\",\n state: ProgressItemState.IN_PROGRESS\n },\n {\n label: \"Step completed but with multiple lines of text.\",\n state: ProgressItemState.COMPLETED\n },\n {\n label: \"Completed affirmative but with multiple lines of text.\",\n state: ProgressItemState.COMPLETED_AFFIRMATIVE\n }\n ]\n }\n};\n\nexport const Disabled: Story = {\n args: {\n items: [\n {\n label: \"Step\",\n disabled: true\n },\n {\n label: \"Step In Progress\",\n state: ProgressItemState.IN_PROGRESS,\n disabled: true\n },\n {\n label: \"Step Completed\",\n state: ProgressItemState.COMPLETED,\n disabled: true\n },\n {\n label: \"Completed Affirmative\",\n state: ProgressItemState.COMPLETED_AFFIRMATIVE,\n disabled: true\n }\n ]\n }\n};\n\nexport const Errored: Story = {\n args: {\n items: [\n {\n label: \"Step\",\n errored: true\n },\n {\n label: \"Step In Progress\",\n state: ProgressItemState.IN_PROGRESS,\n errored: true\n },\n {\n label: \"Step Completed\",\n state: ProgressItemState.COMPLETED,\n errored: true\n },\n {\n label: \"Completed Affirmative\",\n state: ProgressItemState.COMPLETED_AFFIRMATIVE,\n errored: true\n }\n ]\n }\n};\n\nexport const DisabledAndErrored: Story = {\n args: {\n items: [\n {\n label: \"Step\",\n disabled: true,\n errored: true\n },\n {\n label: \"Step In Progress\",\n state: ProgressItemState.IN_PROGRESS,\n disabled: true,\n errored: true\n },\n {\n label: \"Step Completed\",\n state: ProgressItemState.COMPLETED,\n disabled: true,\n errored: true\n },\n {\n label: \"Completed Affirmative\",\n state: ProgressItemState.COMPLETED_AFFIRMATIVE,\n disabled: true,\n errored: true\n }\n ]\n }\n};\n"],"names":["meta","SteppedProgress","Default","ProgressItemState","WithMultipleLines","Story","Disabled","Errored","DisabledAndErrored"],"mappings":";;;AAKA,MAAMA,OAAqC;IACvC,OAAO;IACP,WAAWC;IACX,UAAU,CAAC;IACX,YAAY;QACR,QAAQ;IACZ;AACJ;AAEA,gCAAeD;AAGR,MAAME,UAAiB;IAC1B,MAAM;QACF,OAAO;YACH;gBACI,OAAO;YACX;YACA;gBACI,OAAO;gBACP,OAAOC,kBAAkB,WAAW;YACxC;YACA;gBACI,OAAO;gBACP,OAAOA,kBAAkB,SAAS;YACtC;YACA;gBACI,OAAO;gBACP,OAAOA,kBAAkB,qBAAqB;YAClD;SACH;IACL;AACJ;AAEO,MAAMC,oBAA2B;IACpC,YAAY;QACRC,CAAAA,QAAAA,WAAAA,GACI,oBAAC;gBACG,OAAO;oBACH,OAAO;gBACX;6BAEA,oBAACA,OAAAA;KAGZ;IACD,MAAM;QACF,OAAO;YACH;gBACI,OAAO;YACX;YACA;gBACI,OAAO;gBACP,OAAOF,kBAAkB,WAAW;YACxC;YACA;gBACI,OAAO;gBACP,OAAOA,kBAAkB,SAAS;YACtC;YACA;gBACI,OAAO;gBACP,OAAOA,kBAAkB,qBAAqB;YAClD;SACH;IACL;AACJ;AAEO,MAAMG,WAAkB;IAC3B,MAAM;QACF,OAAO;YACH;gBACI,OAAO;gBACP,UAAU;YACd;YACA;gBACI,OAAO;gBACP,OAAOH,kBAAkB,WAAW;gBACpC,UAAU;YACd;YACA;gBACI,OAAO;gBACP,OAAOA,kBAAkB,SAAS;gBAClC,UAAU;YACd;YACA;gBACI,OAAO;gBACP,OAAOA,kBAAkB,qBAAqB;gBAC9C,UAAU;YACd;SACH;IACL;AACJ;AAEO,MAAMI,UAAiB;IAC1B,MAAM;QACF,OAAO;YACH;gBACI,OAAO;gBACP,SAAS;YACb;YACA;gBACI,OAAO;gBACP,OAAOJ,kBAAkB,WAAW;gBACpC,SAAS;YACb;YACA;gBACI,OAAO;gBACP,OAAOA,kBAAkB,SAAS;gBAClC,SAAS;YACb;YACA;gBACI,OAAO;gBACP,OAAOA,kBAAkB,qBAAqB;gBAC9C,SAAS;YACb;SACH;IACL;AACJ;AAEO,MAAMK,qBAA4B;IACrC,MAAM;QACF,OAAO;YACH;gBACI,OAAO;gBACP,UAAU;gBACV,SAAS;YACb;YACA;gBACI,OAAO;gBACP,OAAOL,kBAAkB,WAAW;gBACpC,UAAU;gBACV,SAAS;YACb;YACA;gBACI,OAAO;gBACP,OAAOA,kBAAkB,SAAS;gBAClC,UAAU;gBACV,SAAS;YACb;YACA;gBACI,OAAO;gBACP,OAAOA,kBAAkB,qBAAqB;gBAC9C,UAAU;gBACV,SAAS;YACb;SACH;IACL;AACJ"}
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { Switch } from "../Switch/index.js";
3
3
  declare const meta: Meta<typeof Switch>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"Switch/Switch.stories.js","sources":["../../src/Switch/Switch.stories.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { Switch } from \"~/Switch/index.js\";\nimport { Tooltip } from \"~/Tooltip/index.js\";\n\nconst meta: Meta<typeof Switch> = {\n title: \"Components/Form/Switch\",\n component: Switch,\n parameters: {\n layout: \"padded\"\n },\n argTypes: {\n disabled: {\n control: \"boolean\",\n defaultValue: false\n }\n },\n decorators: [\n Story => (\n <Tooltip.Provider>\n <Story />\n </Tooltip.Provider>\n )\n ],\n render: args => {\n const [checked, setChecked] = useState(args.checked);\n return <Switch {...args} checked={checked} onChange={value => setChecked(value)} />;\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Switch>;\n\nexport const Default: 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 ...Default.args,\n description: \"Provide the required information for processing your request.\"\n }\n};\n\nexport const WithNotes: Story = {\n args: {\n ...Default.args,\n note: \"Note: Ensure your selection or input is accurate before proceeding.\"\n }\n};\n\nexport const WithErrors: Story = {\n args: {\n ...Default.args,\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Disabled: Story = {\n args: {\n ...Default.args,\n disabled: true\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 [checked, setChecked] = useState(args.checked || false);\n const [validation, setValidation] = useState({ isValid: true, message: \"\" });\n\n // Update checked state when args.checked changes\n useEffect(() => {\n setChecked(args.checked || false);\n }, [args.checked]);\n\n const handleChange = (isChecked: boolean) => {\n setChecked(isChecked);\n\n // Simple required validation\n if (args.required && !isChecked) {\n setValidation({ isValid: false, message: \"This field is required\" });\n } else {\n setValidation({ isValid: true, message: \"\" });\n }\n };\n\n // Validate on required change\n useEffect(() => {\n if (args.required && !checked) {\n setValidation({ isValid: false, message: \"This field is required\" });\n } else {\n setValidation({ isValid: true, message: \"\" });\n }\n }, [args.required, checked]);\n\n return (\n <Switch\n {...args}\n checked={checked}\n onChange={handleChange}\n validation={validation}\n required={args.required}\n />\n );\n },\n args: {\n label: \"Enable feature\",\n checked: false,\n disabled: false,\n required: true,\n description: \"Enabling this feature will activate additional functionality.\",\n note: \"Note: This setting can be changed at any time.\",\n validation: undefined\n },\n argTypes: {\n label: {\n description: \"Label text for the switch\",\n control: \"text\"\n },\n checked: {\n description: \"Determines if the switch is checked\",\n control: \"boolean\"\n },\n disabled: {\n description: \"Disables the switch when set to true\",\n control: \"boolean\"\n },\n required: {\n description: \"Makes the switch required when set to true\",\n control: \"boolean\"\n },\n description: {\n description: \"Additional description text below the switch\",\n control: \"text\"\n },\n note: {\n description: \"Additional note text below the switch\",\n control: \"text\"\n },\n validation: {\n description:\n \"Object containing validation state and message. Please refer to the example code for details on usage.\"\n },\n onChange: {\n description: \"Function called when the switch state changes\"\n }\n }\n};\n"],"names":["meta","Switch","Story","Tooltip","args","checked","setChecked","useState","value","Default","WithLabelRequired","WithDescription","WithNotes","WithErrors","Disabled","FullExample","Documentation","validation","setValidation","useEffect","handleChange","isChecked","undefined"],"mappings":";;;AAKA,MAAMA,OAA4B;IAC9B,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;IACA,UAAU;QACN,UAAU;YACN,SAAS;YACT,cAAc;QAClB;IACJ;IACA,YAAY;QACRC,CAAAA,QAAAA,WAAAA,GACI,oBAACC,QAAQ,QAAQ,sBACb,oBAACD,OAAAA;KAGZ;IACD,QAAQE,CAAAA;QACJ,MAAM,CAACC,SAASC,WAAW,GAAGC,SAASH,KAAK,OAAO;QACnD,OAAO,WAAP,GAAO,oBAACH,QAAMA;YAAE,GAAGG,IAAI;YAAE,SAASC;YAAS,UAAUG,CAAAA,QAASF,WAAWE;;IAC7E;AACJ;AAEA,u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K,QAAQ;YAAEC;SAAQ;QAE3B,OAAO,WAAP,GACI,oBAACJ,QAAMA;YACF,GAAGG,IAAI;YACR,SAASC;YACT,UAAUe;YACV,YAAYH;YACZ,UAAUb,KAAK,QAAQ;;IAGnC;IACA,MAAM;QACF,OAAO;QACP,SAAS;QACT,UAAU;QACV,UAAU;QACV,aAAa;QACb,MAAM;QACN,YAAYkB;IAChB;IACA,UAAU;QACN,OAAO;YACH,aAAa;YACb,SAAS;QACb;QACA,SAAS;YACL,aAAa;YACb,SAAS;QACb;QACA,UAAU;YACN,aAAa;YACb,SAAS;QACb;QACA,UAAU;YACN,aAAa;YACb,SAAS;QACb;QACA,aAAa;YACT,aAAa;YACb,SAAS;QACb;QACA,MAAM;YACF,aAAa;YACb,SAAS;QACb;QACA,YAAY;YACR,aACI;QACR;QACA,UAAU;YACN,aAAa;QACjB;IACJ;AACJ"}
1
+ {"version":3,"file":"Switch/Switch.stories.js","sources":["../../src/Switch/Switch.stories.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Switch } from \"~/Switch/index.js\";\nimport { Tooltip } from \"~/Tooltip/index.js\";\n\nconst meta: Meta<typeof Switch> = {\n title: \"Components/Form/Switch\",\n component: Switch,\n parameters: {\n layout: \"padded\"\n },\n argTypes: {\n disabled: {\n control: \"boolean\",\n defaultValue: false\n }\n },\n decorators: [\n Story => (\n <Tooltip.Provider>\n <Story />\n </Tooltip.Provider>\n )\n ],\n render: args => {\n const [checked, setChecked] = useState(args.checked);\n return <Switch {...args} checked={checked} onChange={value => setChecked(value)} />;\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Switch>;\n\nexport const Default: 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 ...Default.args,\n description: \"Provide the required information for processing your request.\"\n }\n};\n\nexport const WithNotes: Story = {\n args: {\n ...Default.args,\n note: \"Note: Ensure your selection or input is accurate before proceeding.\"\n }\n};\n\nexport const WithErrors: Story = {\n args: {\n ...Default.args,\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Disabled: Story = {\n args: {\n ...Default.args,\n disabled: true\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 [checked, setChecked] = useState(args.checked || false);\n const [validation, setValidation] = useState({ isValid: true, message: \"\" });\n\n // Update checked state when args.checked changes\n useEffect(() => {\n setChecked(args.checked || false);\n }, [args.checked]);\n\n const handleChange = (isChecked: boolean) => {\n setChecked(isChecked);\n\n // Simple required validation\n if (args.required && !isChecked) {\n setValidation({ isValid: false, message: \"This field is required\" });\n } else {\n setValidation({ isValid: true, message: \"\" });\n }\n };\n\n // Validate on required change\n useEffect(() => {\n if (args.required && !checked) {\n setValidation({ isValid: false, message: \"This field is required\" });\n } else {\n setValidation({ isValid: true, message: \"\" });\n }\n }, [args.required, checked]);\n\n return (\n <Switch\n {...args}\n checked={checked}\n onChange={handleChange}\n validation={validation}\n required={args.required}\n />\n );\n },\n args: {\n label: \"Enable feature\",\n checked: false,\n disabled: false,\n required: true,\n description: \"Enabling this feature will activate additional functionality.\",\n note: \"Note: This setting can be changed at any time.\",\n validation: undefined\n },\n argTypes: {\n label: {\n description: \"Label text for the switch\",\n control: \"text\"\n },\n checked: {\n description: \"Determines if the switch is checked\",\n control: \"boolean\"\n },\n disabled: {\n description: \"Disables the switch when set to true\",\n control: \"boolean\"\n },\n required: {\n description: \"Makes the switch required when set to true\",\n control: \"boolean\"\n },\n description: {\n description: \"Additional description text below the switch\",\n control: \"text\"\n },\n note: {\n description: \"Additional note text below the switch\",\n control: \"text\"\n },\n validation: {\n description:\n \"Object containing validation state and message. Please refer to the example code for details on usage.\"\n },\n onChange: {\n description: \"Function called when the switch state changes\"\n }\n }\n};\n"],"names":["meta","Switch","Story","Tooltip","args","checked","setChecked","useState","value","Default","WithLabelRequired","WithDescription","WithNotes","WithErrors","Disabled","FullExample","Documentation","validation","setValidation","useEffect","handleChange","isChecked","undefined"],"mappings":";;;AAKA,MAAMA,OAA4B;IAC9B,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;IACA,UAAU;QACN,UAAU;YACN,SAAS;YACT,cAAc;QAClB;IACJ;IACA,YAAY;QACRC,CAAAA,QAAAA,WAAAA,GACI,oBAACC,QAAQ,QAAQ,sBACb,oBAACD,OAAAA;KAGZ;IACD,QAAQE,CAAAA;QACJ,MAAM,CAACC,SAASC,WAAW,GAAGC,SAASH,KAAK,OAAO;QACnD,OAAO,WAAP,GAAO,oBAACH,QAAMA;YAAE,GAAGG,IAAI;YAAE,SAASC;YAAS,UAAUG,CAAAA,QAASF,WAAWE;;IAC7E;AACJ;AAEA,uBAAeR;AAGR,MAAMS,UAAiB;IAC1B,MAAM;QACF,OAAO;IACX;AACJ;AAEO,MAAMC,oBAA2B;IACpC,MAAM;QACF,OAAO;QACP,UAAU;IACd;AACJ;AAEO,MAAMC,kBAAyB;IAClC,MAAM;QACF,GAAGF,QAAQ,IAAI;QACf,aAAa;IACjB;AACJ;AAEO,MAAMG,YAAmB;IAC5B,MAAM;QACF,GAAGH,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMI,aAAoB;IAC7B,MAAM;QACF,GAAGJ,QAAQ,IAAI;QACf,YAAY;YACR,SAAS;YACT,SAAS;QACb;IACJ;AACJ;AAEO,MAAMK,WAAkB;IAC3B,MAAM;QACF,GAAGL,QAAQ,IAAI;QACf,UAAU;IACd;AACJ;AAEO,MAAMM,cAAqB;IAC9B,MAAM;QACF,GAAGN,QAAQ,IAAI;QACf,OAAO;QACP,UAAU;QACV,aAA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- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { SwitchPrimitive } from "./SwitchPrimitive.js";
3
3
  declare const meta: Meta<typeof SwitchPrimitive>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"Switch/primitives/SwitchPrimitive.stories.js","sources":["../../../src/Switch/primitives/SwitchPrimitive.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { SwitchPrimitive } from \"./SwitchPrimitive.js\";\n\nconst meta: Meta<typeof SwitchPrimitive> = {\n title: \"Components/Form Primitives/Switch\",\n component: SwitchPrimitive,\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [checked, setChecked] = useState(args.checked);\n return (\n <SwitchPrimitive {...args} checked={checked} onChange={value => setChecked(value)} />\n );\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof SwitchPrimitive>;\n\nexport const Default: Story = {\n args: {\n label: \"Label\"\n }\n};\n\nexport const WithLeadingLabel: Story = {\n args: {\n label: \"Leading label\",\n labelPosition: \"start\"\n }\n};\n\nexport const WithLongLeadingLabel: Story = {\n args: {\n label: \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu aliquam lacus. Morbi eleifend, eros et vestibulum lobortis, mi elit scelerisque neque, sit amet dictum orci sem ac ante. In hac habitasse platea dictumst. Pellentesque molestie nisl tortor, eu dictum velit mollis vitae. Maecenas nec risus sit amet ante efficitur venenatis id eget eros. Aenean mollis vel dolor vitae vestibulum. Integer consectetur id diam eget iaculis. Praesent egestas ullamcorper libero vel eleifend.\",\n labelPosition: \"start\"\n }\n};\n\nexport const WithTrailingLabel: Story = {\n args: {\n label: \"Trailing label\",\n labelPosition: \"end\"\n }\n};\n\nexport const WithLongTrailingLabel: Story = {\n args: {\n label: \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu aliquam lacus. Morbi eleifend, eros et vestibulum lobortis, mi elit scelerisque neque, sit amet dictum orci sem ac ante. In hac habitasse platea dictumst. Pellentesque molestie nisl tortor, eu dictum velit mollis vitae. Maecenas nec risus sit amet ante efficitur venenatis id eget eros. Aenean mollis vel dolor vitae vestibulum. Integer consectetur id diam eget iaculis. Praesent egestas ullamcorper libero vel eleifend.\",\n labelPosition: \"end\"\n }\n};\n\nexport const Checked: Story = {\n args: {\n checked: true\n }\n};\n\nexport const Disabled: Story = {\n args: {\n label: \"Label\",\n disabled: true\n }\n};\n"],"names":["meta","SwitchPrimitive","args","checked","setChecked","useState","value","Default","WithLeadingLabel","WithLongLeadingLabel","WithTrailingLabel","WithLongTrailingLabel","Checked","Disabled"],"mappings":";;AAIA,MAAMA,OAAqC;IACvC,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;IACA,QAAQC,CAAAA;QACJ,MAAM,CAACC,SAASC,WAAW,GAAGC,SAASH,KAAK,OAAO;QACnD,OAAO,WAAP,GACI,oBAACD,iBAAeA;YAAE,GAAGC,IAAI;YAAE,SAASC;YAAS,UAAUG,CAAAA,QAASF,WAAWE;;IAEnF;AACJ;AAEA,gCAAeN;AAGR,MAAMO,UAAiB;IAC1B,MAAM;QACF,OAAO;IACX;AACJ;AAEO,MAAMC,mBAA0B;IACnC,MAAM;QACF,OAAO;QACP,eAAe;IACnB;AACJ;AAEO,MAAMC,uBAA8B;IACvC,MAAM;QACF,OAAO;QACP,eAAe;IACnB;AACJ;AAEO,MAAMC,oBAA2B;IACpC,MAAM;QACF,OAAO;QACP,eAAe;IACnB;AACJ;AAEO,MAAMC,wBAA+B;IACxC,MAAM;QACF,OAAO;QACP,eAAe;IACnB;AACJ;AAEO,MAAMC,UAAiB;IAC1B,MAAM;QACF,SAAS;IACb;AACJ;AAEO,MAAMC,WAAkB;IAC3B,MAAM;QACF,OAAO;QACP,UAAU;IACd;AACJ"}
1
+ {"version":3,"file":"Switch/primitives/SwitchPrimitive.stories.js","sources":["../../../src/Switch/primitives/SwitchPrimitive.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { SwitchPrimitive } from \"./SwitchPrimitive.js\";\n\nconst meta: Meta<typeof SwitchPrimitive> = {\n title: \"Components/Form Primitives/Switch\",\n component: SwitchPrimitive,\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [checked, setChecked] = useState(args.checked);\n return (\n <SwitchPrimitive {...args} checked={checked} onChange={value => setChecked(value)} />\n );\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof SwitchPrimitive>;\n\nexport const Default: Story = {\n args: {\n label: \"Label\"\n }\n};\n\nexport const WithLeadingLabel: Story = {\n args: {\n label: \"Leading label\",\n labelPosition: \"start\"\n }\n};\n\nexport const WithLongLeadingLabel: Story = {\n args: {\n label: \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu aliquam lacus. Morbi eleifend, eros et vestibulum lobortis, mi elit scelerisque neque, sit amet dictum orci sem ac ante. In hac habitasse platea dictumst. Pellentesque molestie nisl tortor, eu dictum velit mollis vitae. Maecenas nec risus sit amet ante efficitur venenatis id eget eros. Aenean mollis vel dolor vitae vestibulum. Integer consectetur id diam eget iaculis. Praesent egestas ullamcorper libero vel eleifend.\",\n labelPosition: \"start\"\n }\n};\n\nexport const WithTrailingLabel: Story = {\n args: {\n label: \"Trailing label\",\n labelPosition: \"end\"\n }\n};\n\nexport const WithLongTrailingLabel: Story = {\n args: {\n label: \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu aliquam lacus. Morbi eleifend, eros et vestibulum lobortis, mi elit scelerisque neque, sit amet dictum orci sem ac ante. In hac habitasse platea dictumst. Pellentesque molestie nisl tortor, eu dictum velit mollis vitae. Maecenas nec risus sit amet ante efficitur venenatis id eget eros. Aenean mollis vel dolor vitae vestibulum. Integer consectetur id diam eget iaculis. Praesent egestas ullamcorper libero vel eleifend.\",\n labelPosition: \"end\"\n }\n};\n\nexport const Checked: Story = {\n args: {\n checked: true\n }\n};\n\nexport const Disabled: Story = {\n args: {\n label: \"Label\",\n disabled: true\n }\n};\n"],"names":["meta","SwitchPrimitive","args","checked","setChecked","useState","value","Default","WithLeadingLabel","WithLongLeadingLabel","WithTrailingLabel","WithLongTrailingLabel","Checked","Disabled"],"mappings":";;AAIA,MAAMA,OAAqC;IACvC,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;IACA,QAAQC,CAAAA;QACJ,MAAM,CAACC,SAASC,WAAW,GAAGC,SAASH,KAAK,OAAO;QACnD,OAAO,WAAP,GACI,oBAACD,iBAAeA;YAAE,GAAGC,IAAI;YAAE,SAASC;YAAS,UAAUG,CAAAA,QAASF,WAAWE;;IAEnF;AACJ;AAEA,gCAAeN;AAGR,MAAMO,UAAiB;IAC1B,MAAM;QACF,OAAO;IACX;AACJ;AAEO,MAAMC,mBAA0B;IACnC,MAAM;QACF,OAAO;QACP,eAAe;IACnB;AACJ;AAEO,MAAMC,uBAA8B;IACvC,MAAM;QACF,OAAO;QACP,eAAe;IACnB;AACJ;AAEO,MAAMC,oBAA2B;IACpC,MAAM;QACF,OAAO;QACP,eAAe;IACnB;AACJ;AAEO,MAAMC,wBAA+B;IACxC,MAAM;QACF,OAAO;QACP,eAAe;IACnB;AACJ;AAEO,MAAMC,UAAiB;IAC1B,MAAM;QACF,SAAS;IACb;AACJ;AAEO,MAAMC,WAAkB;IAC3B,MAAM;QACF,OAAO;QACP,UAAU;IACd;AACJ"}
package/Tabs/Tabs.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs/Tabs.js","sources":["../../src/Tabs/Tabs.tsx"],"sourcesContent":["import React, { useMemo, useState } from \"react\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport { makeDecoratable, type VariantProps, withStaticProps } from \"~/utils.js\";\nimport type { ITabsContext, TabItem, TabProps, tabListVariants } from \"./components/index.js\";\nimport { Content, List, Tab, TabsContext, Trigger } from \"./components/index.js\";\n\nconst Root = TabsPrimitive.Root;\n\ninterface TabsProps extends Omit<TabsPrimitive.TabsProps, \"children\"> {\n tabs: React.ReactElement<TabProps>[];\n size?: VariantProps<typeof tabListVariants>[\"size\"];\n spacing?: VariantProps<typeof tabListVariants>[\"spacing\"];\n separator?: VariantProps<typeof tabListVariants>[\"separator\"];\n}\n\nconst DecoratableTabs = ({\n defaultValue: initialValue,\n size,\n spacing,\n separator,\n tabs: tabComponents,\n ...props\n}: TabsProps) => {\n const [tabs, setTabs] = useState<TabItem[]>([]);\n\n const defaultValue = useMemo(() => {\n // `defaultValue` prop works only at first render so we need to use the `tabComponents` instead of the `TabItems`\n return (\n initialValue ||\n tabComponents.find(tab => !tab.props.disabled && tab.props.visible !== false)?.props\n .value\n );\n }, [initialValue, tabComponents]);\n\n const triggers = useMemo(\n () => (\n // We need to generate a key like this to trigger a proper component re-render when child tabs change.\n <List\n key={tabs.map(tab => tab.id).join(\";\")}\n size={size}\n spacing={spacing}\n separator={separator}\n >\n {tabs.map(tab => (\n <Trigger\n data-testid={tab[\"data-testid\"]}\n disabled={tab.disabled}\n icon={tab.icon}\n key={tab.id}\n size={size}\n text={tab.trigger}\n value={tab.value}\n visible={tab.visible}\n />\n ))}\n </List>\n ),\n [tabs, size, spacing]\n );\n\n const contents = useMemo(\n () =>\n tabs.map(tab => (\n <Content\n key={tab.id}\n value={tab.value}\n content={tab.content}\n spacing={tab.spacing ?? spacing}\n className={tab.className}\n />\n )),\n [tabs, spacing]\n );\n\n const context: ITabsContext = useMemo(\n () => ({\n addTab(props) {\n setTabs(tabs => {\n const existingIndex = tabs.findIndex(tab => tab.value === props.value);\n if (existingIndex > -1) {\n return [\n ...tabs.slice(0, existingIndex),\n props,\n ...tabs.slice(existingIndex + 1)\n ];\n }\n return [...tabs, props];\n });\n },\n removeTab(id) {\n setTabs(tabs => tabs.filter(tab => tab.id !== id));\n }\n }),\n [setTabs]\n );\n\n return (\n <Root {...props} defaultValue={defaultValue}>\n {triggers}\n {contents}\n <TabsContext.Provider value={context}>{tabComponents}</TabsContext.Provider>\n </Root>\n );\n};\n\nconst BaseTabs = makeDecoratable(\"Tabs\", DecoratableTabs);\n\nconst Tabs = withStaticProps(BaseTabs, {\n Tab\n});\n\nexport { Tabs, type TabsProps };\n"],"names":["Root","TabsPrimitive","DecoratableTabs","initialValue","size","spacing","separator","tabComponents","props","tabs","setTabs","useState","defaultValue","useMemo","tab","triggers","List","Trigger","contents","Content","context","existingIndex","id","TabsContext","BaseTabs","makeDecoratable","Tabs","withStaticProps","Tab"],"mappings":";;;;AAMA,MAAMA,OAAOC,KAAAA,IAAkB;AAS/B,MAAMC,kBAAkB,CAAC,EACrB,cAAcC,YAAY,EAC1BC,IAAI,EACJC,OAAO,EACPC,SAAS,EACT,MAAMC,aAAa,EACnB,GAAGC,OACK;IACR,MAAM,CAACC,MAAMC,QAAQ,GAAGC,SAAoB,EAAE;IAE9C,MAAMC,eAAeC,QAAQ,IAGrBV,gBACAI,cAAc,IAAI,CAACO,CAAAA,MAAO,CAACA,IAAI,KAAK,CAAC,QAAQ,IAAIA,AAAsB,UAAtBA,IAAI,KAAK,CAAC,OAAO,GAAa,MAC1E,OAEV;QAACX;QAAcI;KAAc;IAEhC,MAAMQ,WAAWF,QACb,I,cAEI,oBAACG,MAAIA;YACD,KAAKP,KAAK,GAAG,CAACK,CAAAA,MAAOA,IAAI,EAAE,EAAE,IAAI,CAAC;YAClC,MAAMV;YACN,SAASC;YACT,WAAWC;WAEVG,KAAK,GAAG,CAACK,CAAAA,MAAAA,WAAAA,GACN,oBAACG,SAAOA;gBACJ,eAAaH,GAAG,CAAC,cAAc;gBAC/B,UAAUA,IAAI,QAAQ;gBACtB,MAAMA,IAAI,IAAI;gBACd,KAAKA,IAAI,EAAE;gBACX,MAAMV;gBACN,MAAMU,IAAI,OAAO;gBACjB,OAAOA,IAAI,KAAK;gBAChB,SAASA,IAAI,OAAO;kBAKpC;QAACL;QAAML;QAAMC;KAAQ;IAGzB,MAAMa,WAAWL,QACb,IACIJ,KAAK,GAAG,CAACK,CAAAA,MAAAA,WAAAA,GACL,oBAACK,SAAOA;gBACJ,KAAKL,IAAI,EAAE;gBACX,OAAOA,IAAI,KAAK;gBAChB,SAASA,IAAI,OAAO;gBACpB,SAASA,IAAI,OAAO,IAAIT;gBACxB,WAAWS,IAAI,SAAS;iBAGpC;QAACL;QAAMJ;KAAQ;IAGnB,MAAMe,UAAwBP,QAC1B,IAAO;YACH,QAAOL,KAAK;gBACRE,QAAQD,CAAAA;oBACJ,MAAMY,gBAAgBZ,KAAK,SAAS,CAACK,CAAAA,MAAOA,IAAI,KAAK,KAAKN,MAAM,KAAK;oBACrE,IAAIa,gBAAgB,IAChB,OAAO;2BACAZ,KAAK,KAAK,CAAC,GAAGY;wBACjBb;2BACGC,KAAK,KAAK,CAACY,gBAAgB;qBACjC;oBAEL,OAAO;2BAAIZ;wBAAMD;qBAAM;gBAC3B;YACJ;YACA,WAAUc,EAAE;gBACRZ,QAAQD,CAAAA,OAAQA,KAAK,MAAM,CAACK,CAAAA,MAAOA,IAAI,EAAE,KAAKQ;YAClD;QACJ,IACA;QAACZ;KAAQ;IAGb,OAAO,WAAP,GACI,oBAACV,MAAIA;QAAE,GAAGQ,KAAK;QAAE,cAAcI;OAC1BG,UACAG,UAAAA,WAAAA,GACD,oBAACK,YAAY,QAAQ;QAAC,OAAOH;OAAUb;AAGnD;AAEA,MAAMiB,WAAWC,gBAAgB,QAAQvB;AAEzC,MAAMwB,YAAOC,gBAAgBH,UAAU;IACnCI,KAAGA;AACP"}
1
+ {"version":3,"file":"Tabs/Tabs.js","sources":["../../src/Tabs/Tabs.tsx"],"sourcesContent":["import React, { useMemo, useState } from \"react\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport { makeDecoratable, type VariantProps, withStaticProps } from \"~/utils.js\";\nimport type { ITabsContext, TabItem, TabProps, tabListVariants } from \"./components/index.js\";\nimport { Content, List, Tab, TabsContext, Trigger } from \"./components/index.js\";\n\nconst Root = TabsPrimitive.Root;\n\ninterface TabsProps extends Omit<TabsPrimitive.TabsProps, \"children\"> {\n tabs: React.ReactElement<TabProps>[];\n size?: VariantProps<typeof tabListVariants>[\"size\"];\n spacing?: VariantProps<typeof tabListVariants>[\"spacing\"];\n separator?: VariantProps<typeof tabListVariants>[\"separator\"];\n}\n\nconst DecoratableTabs = ({\n defaultValue: initialValue,\n size,\n spacing,\n separator,\n tabs: tabComponents,\n ...props\n}: TabsProps) => {\n const [tabs, setTabs] = useState<TabItem[]>([]);\n\n const defaultValue = useMemo(() => {\n return (\n initialValue ||\n tabComponents.find(tab => !tab.props.disabled && tab.props.visible !== false)?.props\n .value\n );\n }, [initialValue, tabComponents]);\n\n const triggers = useMemo(\n () => (\n <List\n key={tabs.map(tab => tab.id).join(\";\")}\n size={size}\n spacing={spacing}\n separator={separator}\n >\n {tabs.map(tab => (\n <Trigger\n data-testid={tab[\"data-testid\"]}\n disabled={tab.disabled}\n icon={tab.icon}\n key={tab.id}\n size={size}\n text={tab.trigger}\n value={tab.value}\n visible={tab.visible}\n />\n ))}\n </List>\n ),\n [tabs, size, spacing]\n );\n\n const contents = useMemo(\n () =>\n tabs.map(tab => (\n <Content\n key={tab.id}\n value={tab.value}\n content={tab.content}\n spacing={tab.spacing ?? spacing}\n className={tab.className}\n />\n )),\n [tabs, spacing]\n );\n\n const context: ITabsContext = useMemo(\n () => ({\n addTab(props) {\n setTabs(tabs => {\n const existingIndex = tabs.findIndex(tab => tab.value === props.value);\n if (existingIndex > -1) {\n return [\n ...tabs.slice(0, existingIndex),\n props,\n ...tabs.slice(existingIndex + 1)\n ];\n }\n return [...tabs, props];\n });\n },\n removeTab(id) {\n setTabs(tabs => tabs.filter(tab => tab.id !== id));\n }\n }),\n [setTabs]\n );\n\n return (\n <Root {...props} defaultValue={defaultValue}>\n {triggers}\n {contents}\n <TabsContext.Provider value={context}>{tabComponents}</TabsContext.Provider>\n </Root>\n );\n};\n\nconst BaseTabs = makeDecoratable(\"Tabs\", DecoratableTabs);\n\nconst Tabs = withStaticProps(BaseTabs, {\n Tab\n});\n\nexport { Tabs, type TabsProps };\n"],"names":["Root","TabsPrimitive","DecoratableTabs","initialValue","size","spacing","separator","tabComponents","props","tabs","setTabs","useState","defaultValue","useMemo","tab","triggers","List","Trigger","contents","Content","context","existingIndex","id","TabsContext","BaseTabs","makeDecoratable","Tabs","withStaticProps","Tab"],"mappings":";;;;AAMA,MAAMA,OAAOC,KAAAA,IAAkB;AAS/B,MAAMC,kBAAkB,CAAC,EACrB,cAAcC,YAAY,EAC1BC,IAAI,EACJC,OAAO,EACPC,SAAS,EACT,MAAMC,aAAa,EACnB,GAAGC,OACK;IACR,MAAM,CAACC,MAAMC,QAAQ,GAAGC,SAAoB,EAAE;IAE9C,MAAMC,eAAeC,QAAQ,IAErBV,gBACAI,cAAc,IAAI,CAACO,CAAAA,MAAO,CAACA,IAAI,KAAK,CAAC,QAAQ,IAAIA,AAAsB,UAAtBA,IAAI,KAAK,CAAC,OAAO,GAAa,MAC1E,OAEV;QAACX;QAAcI;KAAc;IAEhC,MAAMQ,WAAWF,QACb,kBACI,oBAACG,MAAIA;YACD,KAAKP,KAAK,GAAG,CAACK,CAAAA,MAAOA,IAAI,EAAE,EAAE,IAAI,CAAC;YAClC,MAAMV;YACN,SAASC;YACT,WAAWC;WAEVG,KAAK,GAAG,CAACK,CAAAA,MAAAA,WAAAA,GACN,oBAACG,SAAOA;gBACJ,eAAaH,GAAG,CAAC,cAAc;gBAC/B,UAAUA,IAAI,QAAQ;gBACtB,MAAMA,IAAI,IAAI;gBACd,KAAKA,IAAI,EAAE;gBACX,MAAMV;gBACN,MAAMU,IAAI,OAAO;gBACjB,OAAOA,IAAI,KAAK;gBAChB,SAASA,IAAI,OAAO;kBAKpC;QAACL;QAAML;QAAMC;KAAQ;IAGzB,MAAMa,WAAWL,QACb,IACIJ,KAAK,GAAG,CAACK,CAAAA,MAAAA,WAAAA,GACL,oBAACK,SAAOA;gBACJ,KAAKL,IAAI,EAAE;gBACX,OAAOA,IAAI,KAAK;gBAChB,SAASA,IAAI,OAAO;gBACpB,SAASA,IAAI,OAAO,IAAIT;gBACxB,WAAWS,IAAI,SAAS;iBAGpC;QAACL;QAAMJ;KAAQ;IAGnB,MAAMe,UAAwBP,QAC1B,IAAO;YACH,QAAOL,KAAK;gBACRE,QAAQD,CAAAA;oBACJ,MAAMY,gBAAgBZ,KAAK,SAAS,CAACK,CAAAA,MAAOA,IAAI,KAAK,KAAKN,MAAM,KAAK;oBACrE,IAAIa,gBAAgB,IAChB,OAAO;2BACAZ,KAAK,KAAK,CAAC,GAAGY;wBACjBb;2BACGC,KAAK,KAAK,CAACY,gBAAgB;qBACjC;oBAEL,OAAO;2BAAIZ;wBAAMD;qBAAM;gBAC3B;YACJ;YACA,WAAUc,EAAE;gBACRZ,QAAQD,CAAAA,OAAQA,KAAK,MAAM,CAACK,CAAAA,MAAOA,IAAI,EAAE,KAAKQ;YAClD;QACJ,IACA;QAACZ;KAAQ;IAGb,OAAO,WAAP,GACI,oBAACV,MAAIA;QAAE,GAAGQ,KAAK;QAAE,cAAcI;OAC1BG,UACAG,UAAAA,WAAAA,GACD,oBAACK,YAAY,QAAQ;QAAC,OAAOH;OAAUb;AAGnD;AAEA,MAAMiB,WAAWC,gBAAgB,QAAQvB;AAEzC,MAAMwB,YAAOC,gBAAgBH,UAAU;IACnCI,KAAGA;AACP"}
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { Tabs } from "./Tabs.js";
3
3
  declare const meta: Meta<typeof Tabs>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs/Tabs.stories.js","sources":["../../src/Tabs/Tabs.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { ReactComponent as PersonIcon } from \"@webiny/icons/person.svg\";\nimport { ReactComponent as LockIcon } from \"@webiny/icons/lock.svg\";\nimport { Tabs } from \"./Tabs.js\";\n\nconst meta: Meta<typeof Tabs> = {\n title: \"Components/Tabs\",\n component: Tabs,\n parameters: {\n layout: \"padded\"\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Tabs>;\n\nexport const Default: Story = {\n args: {\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\nexport const SizeSmall: Story = {\n args: {\n ...Default.args,\n size: \"sm\"\n }\n};\n\nexport const SizeMedium: Story = {\n args: {\n ...Default.args,\n size: \"md\"\n }\n};\n\nexport const SizeLarge: Story = {\n args: {\n ...Default.args,\n size: \"lg\"\n }\n};\n\nexport const SizeExtraLarge: Story = {\n args: {\n ...Default.args,\n size: \"xl\"\n }\n};\n\nexport const SpacingExtraSmall: Story = {\n args: {\n ...Default.args,\n spacing: \"xs\"\n }\n};\n\nexport const SpacingSmall: Story = {\n args: {\n ...Default.args,\n spacing: \"sm\"\n }\n};\n\nexport const SpacingMedium: Story = {\n args: {\n ...Default.args,\n spacing: \"md\"\n }\n};\n\nexport const SpacingLarge: Story = {\n args: {\n ...Default.args,\n spacing: \"lg\"\n }\n};\n\nexport const SpacingExtraLarge: Story = {\n args: {\n ...Default.args,\n spacing: \"xl\"\n }\n};\n\nexport const SpacingDoubleExtraLarge: Story = {\n args: {\n ...Default.args,\n spacing: \"xxl\"\n }\n};\n\nexport const WithSeparator: Story = {\n args: {\n ...Default.args,\n separator: true\n }\n};\n\nexport const WithDefaultValue: Story = {\n args: {\n ...Default.args,\n defaultValue: \"password\"\n }\n};\n\nexport const WithControlledValue: Story = {\n args: {\n ...Default.args,\n value: \"password\"\n },\n render: args => {\n const [value, setValue] = useState(args.value);\n return <Tabs {...args} value={value} onValueChange={setValue} />;\n }\n};\n\nexport const WithIcons: Story = {\n args: {\n ...Default.args,\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n icon={<PersonIcon />}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n icon={<LockIcon />}\n />\n ]\n }\n};\n\nexport const WithDisabledTab: Story = {\n args: {\n ...Default.args,\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n disabled={true}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\nexport const WithHiddenTab: Story = {\n args: {\n ...Default.args,\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n visible={false}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\nexport const WithCustomTabSpacing: Story = {\n args: {\n ...Default.args,\n spacing: \"sm\",\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Tab with custom spacing XXL - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n spacing={\"xxl\"}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Tab with inherited spacing - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\n// Update the Documentation story to properly handle control changes\nexport const Documentation: Story = {\n render: args => {\n // Force re-render when args change by using a key\n return <Tabs key={JSON.stringify(args)} {...args} />;\n },\n args: {\n size: \"md\",\n spacing: \"lg\",\n separator: true,\n defaultValue: \"account\",\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - This tab contains account settings and personal information. Users can update their profile details, change email address, and manage notification preferences.\"\n }\n />,\n <Tabs.Tab\n key={\"security\"}\n value={\"security\"}\n trigger={\"Security\"}\n content={\n \"Security content - This tab contains security settings. Users can change their password, enable two-factor authentication, and review recent account activity.\"\n }\n />,\n <Tabs.Tab\n key={\"preferences\"}\n value={\"preferences\"}\n trigger={\"Preferences\"}\n content={\n \"Preferences content - This tab contains user preferences. Users can customize the interface, set language preferences, and configure other application settings.\"\n }\n />\n ],\n value: undefined\n },\n argTypes: {\n size: {\n description: \"Size of the tabs\",\n control: \"select\",\n options: [\"sm\", \"md\", \"lg\", \"xl\"],\n defaultValue: \"md\"\n },\n spacing: {\n description: \"Spacing around the tabs and content\",\n control: \"select\",\n options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\"],\n defaultValue: \"lg\"\n },\n separator: {\n description:\n \"Whether to show a separator line below the tabs, by default it's `false`.\",\n control: \"boolean\",\n defaultValue: false\n },\n defaultValue: {\n description: \"The value of the tab that should be active by default\",\n control: \"text\"\n },\n value: {\n description:\n \"The controlled value of the active tab, please refer to the example code for details.\"\n },\n tabs: {\n description: \"The tabs to render, please refer to the example code for details.\"\n }\n }\n};\n"],"names":["meta","Tabs","Default","SizeSmall","SizeMedium","SizeLarge","SizeExtraLarge","SpacingExtraSmall","SpacingSmall","SpacingMedium","SpacingLarge","SpacingExtraLarge","SpacingDoubleExtraLarge","WithSeparator","WithDefaultValue","WithControlledValue","args","value","setValue","useState","WithIcons","PersonIcon","LockIcon","WithDisabledTab","WithHiddenTab","WithCustomTabSpacing","Documentation","JSON","undefined"],"mappings":";;;;AAMA,MAAMA,OAA0B;IAC5B,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;AACJ;AAEA,qBAAeD;AAGR,MAAME,UAAiB;IAC1B,MAAM;QACF,MAAM;0BACF,oBAACD,KAAK,GAAG;gBACL,KAAK;gBACL,OAAO;gBACP,SAAS;gBACT,SACI;;0BAGR,oBAACA,KAAK,GAAG;gBACL,KAAK;gBACL,OAAO;gBACP,SAAS;gBACT,SACI;;SAGX;IACL;AACJ;AAEO,MAAME,YAAmB;IAC5B,MAAM;QACF,GAAGD,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAME,aAAoB;IAC7B,MAAM;QACF,GA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gBACL,KAAK;gBACL,OAAO;gBACP,SAAS;gBACT,SACI;;0BAGR,oBAACA,KAAK,GAAG;gBACL,KAAK;gBACL,OAAO;gBACP,SAAS;gBACT,SACI;;SAGX;QACD,OAAO2B;IACX;IACA,UAAU;QACN,MAAM;YACF,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAM;gBAAM;gBAAM;aAAK;YACjC,cAAc;QAClB;QACA,SAAS;YACL,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAM;gBAAM;gBAAM;gBAAM;gBAAM;aAAM;YAC9C,cAAc;QAClB;QACA,WAAW;YACP,aACI;YACJ,SAAS;YACT,cAAc;QAClB;QACA,cAAc;YACV,aAAa;YACb,SAAS;QACb;QACA,OAAO;YACH,aACI;QACR;QACA,MAAM;YACF,aAAa;QACjB;IACJ;AACJ"}
1
+ {"version":3,"file":"Tabs/Tabs.stories.js","sources":["../../src/Tabs/Tabs.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { ReactComponent as PersonIcon } from \"@webiny/icons/person.svg\";\nimport { ReactComponent as LockIcon } from \"@webiny/icons/lock.svg\";\nimport { Tabs } from \"./Tabs.js\";\n\nconst meta: Meta<typeof Tabs> = {\n title: \"Components/Tabs\",\n component: Tabs,\n parameters: {\n layout: \"padded\"\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Tabs>;\n\nexport const Default: Story = {\n args: {\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\nexport const SizeSmall: Story = {\n args: {\n ...Default.args,\n size: \"sm\"\n }\n};\n\nexport const SizeMedium: Story = {\n args: {\n ...Default.args,\n size: \"md\"\n }\n};\n\nexport const SizeLarge: Story = {\n args: {\n ...Default.args,\n size: \"lg\"\n }\n};\n\nexport const SizeExtraLarge: Story = {\n args: {\n ...Default.args,\n size: \"xl\"\n }\n};\n\nexport const SpacingExtraSmall: Story = {\n args: {\n ...Default.args,\n spacing: \"xs\"\n }\n};\n\nexport const SpacingSmall: Story = {\n args: {\n ...Default.args,\n spacing: \"sm\"\n }\n};\n\nexport const SpacingMedium: Story = {\n args: {\n ...Default.args,\n spacing: \"md\"\n }\n};\n\nexport const SpacingLarge: Story = {\n args: {\n ...Default.args,\n spacing: \"lg\"\n }\n};\n\nexport const SpacingExtraLarge: Story = {\n args: {\n ...Default.args,\n spacing: \"xl\"\n }\n};\n\nexport const SpacingDoubleExtraLarge: Story = {\n args: {\n ...Default.args,\n spacing: \"xxl\"\n }\n};\n\nexport const WithSeparator: Story = {\n args: {\n ...Default.args,\n separator: true\n }\n};\n\nexport const WithDefaultValue: Story = {\n args: {\n ...Default.args,\n defaultValue: \"password\"\n }\n};\n\nexport const WithControlledValue: Story = {\n args: {\n ...Default.args,\n value: \"password\"\n },\n render: args => {\n const [value, setValue] = useState(args.value);\n return <Tabs {...args} value={value} onValueChange={setValue} />;\n }\n};\n\nexport const WithIcons: Story = {\n args: {\n ...Default.args,\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n icon={<PersonIcon />}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n icon={<LockIcon />}\n />\n ]\n }\n};\n\nexport const WithDisabledTab: Story = {\n args: {\n ...Default.args,\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n disabled={true}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\nexport const WithHiddenTab: Story = {\n args: {\n ...Default.args,\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n visible={false}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\nexport const WithCustomTabSpacing: Story = {\n args: {\n ...Default.args,\n spacing: \"sm\",\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Tab with custom spacing XXL - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n spacing={\"xxl\"}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Tab with inherited spacing - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\n// Update the Documentation story to properly handle control changes\nexport const Documentation: Story = {\n render: args => {\n // Force re-render when args change by using a key\n return <Tabs key={JSON.stringify(args)} {...args} />;\n },\n args: {\n size: \"md\",\n spacing: \"lg\",\n separator: true,\n defaultValue: \"account\",\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - This tab contains account settings and personal information. Users can update their profile details, change email address, and manage notification preferences.\"\n }\n />,\n <Tabs.Tab\n key={\"security\"}\n value={\"security\"}\n trigger={\"Security\"}\n content={\n \"Security content - This tab contains security settings. Users can change their password, enable two-factor authentication, and review recent account activity.\"\n }\n />,\n <Tabs.Tab\n key={\"preferences\"}\n value={\"preferences\"}\n trigger={\"Preferences\"}\n content={\n \"Preferences content - This tab contains user preferences. Users can customize the interface, set language preferences, and configure other application settings.\"\n }\n />\n ],\n value: undefined\n },\n argTypes: {\n size: {\n description: \"Size of the tabs\",\n control: \"select\",\n options: [\"sm\", \"md\", \"lg\", \"xl\"],\n defaultValue: \"md\"\n },\n spacing: {\n description: \"Spacing around the tabs and content\",\n control: \"select\",\n options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\"],\n defaultValue: \"lg\"\n },\n separator: {\n description:\n \"Whether to show a separator line below the tabs, by default it's `false`.\",\n control: \"boolean\",\n defaultValue: false\n },\n defaultValue: {\n description: \"The value of the tab that should be active by default\",\n control: \"text\"\n },\n value: {\n description:\n \"The controlled value of the active tab, please refer to the example code for details.\"\n },\n tabs: {\n description: \"The tabs to render, please refer to the example code for details.\"\n }\n }\n};\n"],"names":["meta","Tabs","Default","SizeSmall","SizeMedium","SizeLarge","SizeExtraLarge","SpacingExtraSmall","SpacingSmall","SpacingMedium","SpacingLarge","SpacingExtraLarge","SpacingDoubleExtraLarge","WithSeparator","WithDefaultValue","WithControlledValue","args","value","setValue","useState","WithIcons","PersonIcon","LockIcon","WithDisabledTab","WithHiddenTab","WithCustomTabSpacing","Documentation","JSON","undefined"],"mappings":";;;;AAMA,MAAMA,OAA0B;IAC5B,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;AACJ;AAEA,qBAAeD;AAGR,MAAME,UAAiB;IAC1B,MAAM;QACF,MAAM;0BACF,oBAACD,KAAK,GAAG;gBACL,KAAK;gBACL,OAAO;gBACP,SAAS;gBACT,SACI;;0BAGR,oBAACA,KAAK,GAAG;gBACL,KAAK;gBACL,OAAO;gBACP,SAAS;gBACT,SACI;;SAGX;IACL;AACJ;AAEO,MAAME,YAAmB;IAC5B,MAAM;QACF,GAAGD,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAME,aAAoB;IAC7B,MAAM;QACF,GAAGF,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMG,YAAmB;IAC5B,MAAM;QACF,GAAGH,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMI,iBAAwB;IACjC,MAAM;QACF,GAAGJ,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMK,oBAA2B;IACpC,MAAM;QACF,GAAGL,QAAQ,IAAI;QACf,SAAS;IACb;AACJ;AAEO,MAAMM,eAAsB;IAC/B,MAAM;QACF,GAAGN,QAAQ,IAAI;QACf,SAAS;IACb;AACJ;AAEO,MAAMO,gBAAuB;IAChC,MAAM;QACF,GAAGP,QAAQ,IAAI;QACf,SAAS;IACb;AACJ;AAEO,MAAMQ,eAAsB;IAC/B,MAAM;QACF,GAAGR,QAAQ,IAAI;QACf,SAAS;IACb;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@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { Tag } from "./Tag.js";
3
3
  declare const meta: Meta<typeof Tag>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"Tag/Tag.stories.js","sources":["../../src/Tag/Tag.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { Tag } from \"./Tag.js\";\nimport { ReactComponent as InfoIcon } from \"@webiny/icons/info.svg\";\nimport { ReactComponent as AddIcon } from \"@webiny/icons/add.svg\";\n\nconst meta: Meta<typeof Tag> = {\n title: \"Components/Tag\",\n component: Tag,\n parameters: {\n layout: \"padded\"\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Tag>;\n\nexport const Default: Story = {\n args: {\n content: \"Label\",\n icon: <InfoIcon />\n }\n};\n\nexport const WithOnClickCallback: Story = {\n args: {\n ...Default.args,\n onClick: evt => {\n console.log(\"onClick\", evt);\n }\n }\n};\n\nexport const WithOnDismissCallback: Story = {\n args: {\n ...Default.args,\n onDismiss: evt => {\n console.log(\"onDismiss\", evt);\n }\n }\n};\n\nexport const WithCustomDismissIconElement: Story = {\n args: {\n ...WithOnDismissCallback.args,\n dismissIconElement: <AddIcon />,\n dismissIconLabel: \"Custom dismiss label\"\n }\n};\n\nexport const NeutralBase: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-base\"\n }\n};\n\nexport const NeutralBaseDisabled: Story = {\n args: {\n ...NeutralBase.args,\n disabled: true\n }\n};\n\nexport const NeutralBaseOutline: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-base-outline\"\n }\n};\n\nexport const NeutralBaseOutlineDisabled: Story = {\n args: {\n ...NeutralBaseOutline.args,\n disabled: true\n }\n};\n\nexport const NeutralLight: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-light\"\n }\n};\n\nexport const NeutralLightDisabled: Story = {\n args: {\n ...NeutralLight.args,\n disabled: true\n }\n};\n\nexport const NeutralMuted: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-muted\"\n }\n};\n\nexport const NeutralMutedDisabled: Story = {\n args: {\n ...NeutralMuted.args,\n disabled: true\n }\n};\n\nexport const NeutralStrong: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-strong\"\n }\n};\n\nexport const NeutralStrongDisabled: Story = {\n args: {\n ...NeutralStrong.args,\n disabled: true\n }\n};\n\nexport const NeutralXStrong: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-xstrong\"\n }\n};\n\nexport const NeutralXStrongDisabled: Story = {\n args: {\n ...NeutralXStrong.args,\n disabled: true\n }\n};\n\nexport const NeutralDark: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-dark\"\n }\n};\n\nexport const NeutralDarkDisabled: Story = {\n args: {\n ...NeutralDark.args,\n disabled: true\n }\n};\n\nexport const Accent: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"accent\"\n }\n};\n\nexport const AccentDisabled: Story = {\n args: {\n ...Accent.args,\n disabled: true\n }\n};\n\nexport const AccentLight: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"accent-light\"\n }\n};\n\nexport const AccentLightDisabled: Story = {\n args: {\n ...AccentLight.args,\n disabled: true\n }\n};\n\nexport const Success: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"success\"\n }\n};\n\nexport const SuccessDisabled: Story = {\n args: {\n ...Success.args,\n disabled: true\n }\n};\n\nexport const SuccessLight: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"success-light\"\n }\n};\n\nexport const SuccessLightDisabled: Story = {\n args: {\n ...SuccessLight.args,\n disabled: true\n }\n};\n\nexport const Warning: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"warning\"\n }\n};\n\nexport const WarningDisabled: Story = {\n args: {\n ...Warning.args,\n disabled: true\n }\n};\n\nexport const Destructive: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"destructive\"\n }\n};\n\nexport const DestructiveDisabled: Story = {\n args: {\n ...Destructive.args,\n disabled: true\n }\n};\n\nexport const FullExample: Story = {\n args: WithOnDismissCallback.args,\n render: args => {\n return (\n <div className={\"flex gap-sm\"}>\n <Tag {...args} content={\"Neutral base\"} variant={\"neutral-base\"} />\n <Tag {...args} content={\"Neutral base outline\"} variant={\"neutral-base-outline\"} />\n <Tag {...args} content={\"Neutral light\"} variant={\"neutral-light\"} />\n <Tag {...args} content={\"Neutral muted\"} variant={\"neutral-muted\"} />\n <Tag {...args} content={\"Neutral strong\"} variant={\"neutral-strong\"} />\n <Tag {...args} content={\"Neutral xstrong\"} variant={\"neutral-xstrong\"} />\n <Tag {...args} content={\"Neutral dark\"} variant={\"neutral-dark\"} />\n <Tag {...args} content={\"Success\"} variant={\"success\"} />\n <Tag {...args} content={\"Success light\"} variant={\"success-light\"} />\n <Tag {...args} content={\"Warning\"} variant={\"warning\"} />\n <Tag {...args} content={\"Destructive\"} variant={\"destructive\"} />\n <Tag {...args} content={\"Accent\"} variant={\"accent\"} />\n <Tag {...args} content={\"Accent light\"} variant={\"accent-light\"} />\n </div>\n );\n }\n};\n\nexport const WithSwatchColor: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-base-outline\",\n content: <>An alert that can be closed and also has action button.</>,\n swatchColor: \"#FF708F\"\n }\n};\n\nexport const Documentation: Story = {\n args: {\n content: \"Label\",\n variant: \"neutral-base\",\n disabled: false,\n onDismiss: undefined,\n dismissIconElement: undefined,\n dismissIconLabel: undefined\n },\n argTypes: {\n content: {\n description: \"The content of the tag. Please refer to the example code for details.\",\n control: \"text\"\n },\n variant: {\n description: \"The color variant of the tag.\",\n control: \"select\",\n options: [\n \"neutral-base\",\n \"neutral-base-outline\",\n \"neutral-light\",\n \"neutral-muted\",\n \"neutral-strong\",\n \"neutral-xstrong\",\n \"neutral-dark\",\n \"success\",\n \"success-light\",\n \"warning\",\n \"destructive\",\n \"accent\",\n \"accent-light\"\n ]\n },\n disabled: {\n description: \"Whether the tag is disabled.\",\n control: \"boolean\"\n },\n onDismiss: {\n description:\n \"Callback function when the tag is dismissed. Please refer to the 'Dismissible Tag' example code for details.\"\n },\n dismissIconElement: {\n description:\n \"Custom dismiss icon element. Please refer to the 'Custom Dismiss Icon' example code for details.\"\n },\n dismissIconLabel: {\n description:\n \"Custom dismiss icon label. Please refer to the 'Custom Dismiss Icon' example code for details.\"\n }\n }\n};\n"],"names":["meta","Tag","Default","InfoIcon","WithOnClickCallback","evt","console","WithOnDismissCallback","WithCustomDismissIconElement","AddIcon","NeutralBase","NeutralBaseDisabled","NeutralBaseOutline","NeutralBaseOutlineDisabled","NeutralLight","NeutralLightDisabled","NeutralMuted","NeutralMutedDisabled","NeutralStrong","NeutralStrongDisabled","NeutralXStrong","NeutralXStrongDisabled","NeutralDark","NeutralDarkDisabled","Accent","AccentDisabled","AccentLight","AccentLightDisabled","Success","SuccessDisabled","SuccessLight","SuccessLightDisabled","Warning","WarningDisabled","Destructive","DestructiveDisabled","FullExample","args","WithSwatchColor","Documentation","undefined"],"mappings":";;;;AAMA,MAAMA,OAAyB;IAC3B,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;AACJ;AAEA,oBAAeD;AAGR,MAAME,UAAiB;IAC1B,MAAM;QACF,SAAS;QACT,MAAM,WAAN,GAAM,oBAACC,gBAAQA;IACnB;AACJ;AAEO,MAAMC,sBAA6B;IACtC,MAAM;QACF,GAAGF,QAAQ,IAAI;QACf,SAASG,CAAAA;YACLC,QAAQ,GAAG,CAAC,WAAWD;QAC3B;IACJ;AACJ;AAEO,MAAME,wBAA+B;IACxC,MAAM;QACF,GAAGL,QAAQ,IAAI;QACf,WAAWG,CAAAA;YACPC,QAAQ,GAAG,CAAC,aAAaD;QAC7B;IACJ;AACJ;AAEO,MAAMG,+BAAsC;IAC/C,M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AAa;YACb,SAAS;QACb;QACA,WAAW;YACP,aACI;QACR;QACA,oBAAoB;YAChB,aACI;QACR;QACA,kBAAkB;YACd,aACI;QACR;IACJ;AACJ"}
1
+ {"version":3,"file":"Tag/Tag.stories.js","sources":["../../src/Tag/Tag.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Tag } from \"./Tag.js\";\nimport { ReactComponent as InfoIcon } from \"@webiny/icons/info.svg\";\nimport { ReactComponent as AddIcon } from \"@webiny/icons/add.svg\";\n\nconst meta: Meta<typeof Tag> = {\n title: \"Components/Tag\",\n component: Tag,\n parameters: {\n layout: \"padded\"\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Tag>;\n\nexport const Default: Story = {\n args: {\n content: \"Label\",\n icon: <InfoIcon />\n }\n};\n\nexport const WithOnClickCallback: Story = {\n args: {\n ...Default.args,\n onClick: evt => {\n console.log(\"onClick\", evt);\n }\n }\n};\n\nexport const WithOnDismissCallback: Story = {\n args: {\n ...Default.args,\n onDismiss: evt => {\n console.log(\"onDismiss\", evt);\n }\n }\n};\n\nexport const WithCustomDismissIconElement: Story = {\n args: {\n ...WithOnDismissCallback.args,\n dismissIconElement: <AddIcon />,\n dismissIconLabel: \"Custom dismiss label\"\n }\n};\n\nexport const NeutralBase: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-base\"\n }\n};\n\nexport const NeutralBaseDisabled: Story = {\n args: {\n ...NeutralBase.args,\n disabled: true\n }\n};\n\nexport const NeutralBaseOutline: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-base-outline\"\n }\n};\n\nexport const NeutralBaseOutlineDisabled: Story = {\n args: {\n ...NeutralBaseOutline.args,\n disabled: true\n }\n};\n\nexport const NeutralLight: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-light\"\n }\n};\n\nexport const NeutralLightDisabled: Story = {\n args: {\n ...NeutralLight.args,\n disabled: true\n }\n};\n\nexport const NeutralMuted: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-muted\"\n }\n};\n\nexport const NeutralMutedDisabled: Story = {\n args: {\n ...NeutralMuted.args,\n disabled: true\n }\n};\n\nexport const NeutralStrong: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-strong\"\n }\n};\n\nexport const NeutralStrongDisabled: Story = {\n args: {\n ...NeutralStrong.args,\n disabled: true\n }\n};\n\nexport const NeutralXStrong: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-xstrong\"\n }\n};\n\nexport const NeutralXStrongDisabled: Story = {\n args: {\n ...NeutralXStrong.args,\n disabled: true\n }\n};\n\nexport const NeutralDark: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-dark\"\n }\n};\n\nexport const NeutralDarkDisabled: Story = {\n args: {\n ...NeutralDark.args,\n disabled: true\n }\n};\n\nexport const Accent: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"accent\"\n }\n};\n\nexport const AccentDisabled: Story = {\n args: {\n ...Accent.args,\n disabled: true\n }\n};\n\nexport const AccentLight: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"accent-light\"\n }\n};\n\nexport const AccentLightDisabled: Story = {\n args: {\n ...AccentLight.args,\n disabled: true\n }\n};\n\nexport const Success: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"success\"\n }\n};\n\nexport const SuccessDisabled: Story = {\n args: {\n ...Success.args,\n disabled: true\n }\n};\n\nexport const SuccessLight: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"success-light\"\n }\n};\n\nexport const SuccessLightDisabled: Story = {\n args: {\n ...SuccessLight.args,\n disabled: true\n }\n};\n\nexport const Warning: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"warning\"\n }\n};\n\nexport const WarningDisabled: Story = {\n args: {\n ...Warning.args,\n disabled: true\n }\n};\n\nexport const Destructive: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"destructive\"\n }\n};\n\nexport const DestructiveDisabled: Story = {\n args: {\n ...Destructive.args,\n disabled: true\n }\n};\n\nexport const FullExample: Story = {\n args: WithOnDismissCallback.args,\n render: args => {\n return (\n <div className={\"flex gap-sm\"}>\n <Tag {...args} content={\"Neutral base\"} variant={\"neutral-base\"} />\n <Tag {...args} content={\"Neutral base outline\"} variant={\"neutral-base-outline\"} />\n <Tag {...args} content={\"Neutral light\"} variant={\"neutral-light\"} />\n <Tag {...args} content={\"Neutral muted\"} variant={\"neutral-muted\"} />\n <Tag {...args} content={\"Neutral strong\"} variant={\"neutral-strong\"} />\n <Tag {...args} content={\"Neutral xstrong\"} variant={\"neutral-xstrong\"} />\n <Tag {...args} content={\"Neutral dark\"} variant={\"neutral-dark\"} />\n <Tag {...args} content={\"Success\"} variant={\"success\"} />\n <Tag {...args} content={\"Success light\"} variant={\"success-light\"} />\n <Tag {...args} content={\"Warning\"} variant={\"warning\"} />\n <Tag {...args} content={\"Destructive\"} variant={\"destructive\"} />\n <Tag {...args} content={\"Accent\"} variant={\"accent\"} />\n <Tag {...args} content={\"Accent light\"} variant={\"accent-light\"} />\n </div>\n );\n }\n};\n\nexport const WithSwatchColor: Story = {\n args: {\n ...WithOnDismissCallback.args,\n variant: \"neutral-base-outline\",\n content: <>An alert that can be closed and also has action button.</>,\n swatchColor: \"#FF708F\"\n }\n};\n\nexport const Documentation: Story = {\n args: {\n content: \"Label\",\n variant: \"neutral-base\",\n disabled: false,\n onDismiss: undefined,\n dismissIconElement: undefined,\n dismissIconLabel: undefined\n },\n argTypes: {\n content: {\n description: \"The content of the tag. Please refer to the example code for details.\",\n control: \"text\"\n },\n variant: {\n description: \"The color variant of the tag.\",\n control: \"select\",\n options: [\n \"neutral-base\",\n \"neutral-base-outline\",\n \"neutral-light\",\n \"neutral-muted\",\n \"neutral-strong\",\n \"neutral-xstrong\",\n \"neutral-dark\",\n \"success\",\n \"success-light\",\n \"warning\",\n \"destructive\",\n \"accent\",\n \"accent-light\"\n ]\n },\n disabled: {\n description: \"Whether the tag is disabled.\",\n control: \"boolean\"\n },\n onDismiss: {\n description:\n \"Callback function when the tag is dismissed. Please refer to the 'Dismissible Tag' example code for details.\"\n },\n dismissIconElement: {\n description:\n \"Custom dismiss icon element. Please refer to the 'Custom Dismiss Icon' example code for details.\"\n },\n dismissIconLabel: {\n description:\n \"Custom dismiss icon label. Please refer to the 'Custom Dismiss Icon' example code for details.\"\n }\n }\n};\n"],"names":["meta","Tag","Default","InfoIcon","WithOnClickCallback","evt","console","WithOnDismissCallback","WithCustomDismissIconElement","AddIcon","NeutralBase","NeutralBaseDisabled","NeutralBaseOutline","NeutralBaseOutlineDisabled","NeutralLight","NeutralLightDisabled","NeutralMuted","NeutralMutedDisabled","NeutralStrong","NeutralStrongDisabled","NeutralXStrong","NeutralXStrongDisabled","NeutralDark","NeutralDarkDisabled","Accent","AccentDisabled","AccentLight","AccentLightDisabled","Success","SuccessDisabled","SuccessLight","SuccessLightDisabled","Warning","WarningDisabled","Destructive","DestructiveDisabled","FullExample","args","WithSwatchColor","Documentation","undefined"],"mappings":";;;;AAMA,MAAMA,OAAyB;IAC3B,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;AACJ;AAEA,oBAAeD;AAGR,MAAME,UAAiB;IAC1B,MAAM;QACF,SAAS;QACT,MAAM,WAAN,GAAM,oBAACC,gBAAQA;IACnB;AACJ;AAEO,MAAMC,sBAA6B;IACtC,MAAM;QACF,GAAGF,QAAQ,IAAI;QACf,SAASG,CAAAA;YACLC,QAAQ,GAAG,CAAC,WAAWD;QAC3B;IACJ;AACJ;AAEO,MAAME,wBAA+B;IACxC,MAAM;QACF,GAAGL,QAAQ,IAAI;QACf,WAAWG,CAAAA;YACPC,QAAQ,GAAG,CAAC,aAAaD;QAC7B;IACJ;AACJ;AAEO,MAAMG,+BAAsC;IAC/C,MAAM;QACF,GAAGD,sBAAsB,IAAI;QAC7B,oBAAoB,WAApB,GAAoB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YAChB,aACI;QACR;QACA,kBAAkB;YACd,aACI;QACR;IACJ;AACJ"}
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { Tags } from "./Tags.js";
3
3
  declare const meta: Meta<typeof Tags>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"Tags/Tags.stories.js","sources":["../../src/Tags/Tags.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { Tags } from \"./Tags.js\";\n\nconst meta: Meta<typeof Tags> = {\n title: \"Components/Form/Tags\",\n component: Tags,\n argTypes: {\n onChange: { action: \"onChange\" },\n onValueInput: { action: \"onValueInput\" },\n onValueAdd: { action: \"onValueAdd\" },\n onValueRemove: { action: \"onValueRemove\" },\n disabled: {\n control: \"boolean\",\n defaultValue: false\n }\n },\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [values, setValues] = useState(args.value);\n return <Tags {...args} value={values} onChange={setValues} />;\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Tags>;\n\nexport const Default: Story = {};\n\nexport const WithLabel: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\"\n }\n};\n\nexport const WithRequiredLabel: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n required: true\n }\n};\n\nexport const WithDescription: Story = {\n args: {\n ...Default.args,\n description: \"Provide the required information for processing your request.\"\n }\n};\n\nexport const WithNotes: Story = {\n args: {\n ...Default.args,\n note: \"Note: Ensure your selection or input is accurate before proceeding.\"\n }\n};\n\nexport const WithErrors: Story = {\n args: {\n ...Default.args,\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Disabled: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n disabled: true\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"],"names":["meta","Tags","args","values","setValues","useState","Default","WithLabel","WithRequiredLabel","WithDescription","WithNotes","WithErrors","Disabled","FullExample"],"mappings":";;AAIA,MAAMA,OAA0B;IAC5B,OAAO;IACP,WAAWC;IACX,UAAU;QACN,UAAU;YAAE,QAAQ;QAAW;QAC/B,cAAc;YAAE,QAAQ;QAAe;QACvC,YAAY;YAAE,QAAQ;QAAa;QACnC,eAAe;YAAE,QAAQ;QAAgB;QACzC,UAAU;YACN,SAAS;YACT,cAAc;QAClB;IACJ;IACA,YAAY;QACR,QAAQ;IACZ;IACA,QAAQC,CAAAA;QACJ,MAAM,CAACC,QAAQC,UAAU,GAAGC,SAASH,KAAK,KAAK;QAC/C,OAAO,WAAP,GAAO,oBAACD,MAAIA;YAAE,GAAGC,IAAI;YAAE,OAAOC;YAAQ,UAAUC;;IACpD;AACJ;AAEA,qBAAeJ;AAGR,MAAMM,UAAiB,CAAC;AAExB,MAAMC,YAAmB;IAC5B,MAAM;QACF,GAAGD,QAAQ,IAAI;QACf,OAAO;IACX;AACJ;AAEO,MAAME,oBAA2B;IACpC,MAAM;QACF,GAAGF,QAAQ,IAAI;QACf,OAAO;QACP,UAAU;IACd;AACJ;AAEO,MAAMG,kBAAyB;IAClC,MAAM;QACF,GAAGH,QAAQ,IAAI;QACf,aAAa;IACjB;AACJ;AAEO,MAAMI,YAAmB;IAC5B,MAAM;QACF,GAAGJ,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMK,aAAoB;IAC7B,MAAM;QACF,GAAGL,QAAQ,IAAI;QACf,YAAY;YACR,SAAS;YACT,SAAS;QACb;IACJ;AACJ;AAEO,MAAMM,WAAkB;IAC3B,MAAM;QACF,GAAGN,QAAQ,IAAI;QACf,OAAO;QACP,UAAU;IACd;AACJ;AAEO,MAAMO,cAAqB;IAC9B,MAAM;QACF,GAAGP,QAAQ,IAAI;QACf,OAAO;QACP,UAAU;QACV,aAAa;QACb,MAAM;QACN,YAAY;YACR,SAAS;YACT,SAAS;QACb;IACJ;AACJ"}
1
+ {"version":3,"file":"Tags/Tags.stories.js","sources":["../../src/Tags/Tags.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Tags } from \"./Tags.js\";\n\nconst meta: Meta<typeof Tags> = {\n title: \"Components/Form/Tags\",\n component: Tags,\n argTypes: {\n onChange: { action: \"onChange\" },\n onValueInput: { action: \"onValueInput\" },\n onValueAdd: { action: \"onValueAdd\" },\n onValueRemove: { action: \"onValueRemove\" },\n disabled: {\n control: \"boolean\",\n defaultValue: false\n }\n },\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [values, setValues] = useState(args.value);\n return <Tags {...args} value={values} onChange={setValues} />;\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Tags>;\n\nexport const Default: Story = {};\n\nexport const WithLabel: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\"\n }\n};\n\nexport const WithRequiredLabel: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n required: true\n }\n};\n\nexport const WithDescription: Story = {\n args: {\n ...Default.args,\n description: \"Provide the required information for processing your request.\"\n }\n};\n\nexport const WithNotes: Story = {\n args: {\n ...Default.args,\n note: \"Note: Ensure your selection or input is accurate before proceeding.\"\n }\n};\n\nexport const WithErrors: Story = {\n args: {\n ...Default.args,\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Disabled: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n disabled: true\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"],"names":["meta","Tags","args","values","setValues","useState","Default","WithLabel","WithRequiredLabel","WithDescription","WithNotes","WithErrors","Disabled","FullExample"],"mappings":";;AAIA,MAAMA,OAA0B;IAC5B,OAAO;IACP,WAAWC;IACX,UAAU;QACN,UAAU;YAAE,QAAQ;QAAW;QAC/B,cAAc;YAAE,QAAQ;QAAe;QACvC,YAAY;YAAE,QAAQ;QAAa;QACnC,eAAe;YAAE,QAAQ;QAAgB;QACzC,UAAU;YACN,SAAS;YACT,cAAc;QAClB;IACJ;IACA,YAAY;QACR,QAAQ;IACZ;IACA,QAAQC,CAAAA;QACJ,MAAM,CAACC,QAAQC,UAAU,GAAGC,SAASH,KAAK,KAAK;QAC/C,OAAO,WAAP,GAAO,oBAACD,MAAIA;YAAE,GAAGC,IAAI;YAAE,OAAOC;YAAQ,UAAUC;;IACpD;AACJ;AAEA,qBAAeJ;AAGR,MAAMM,UAAiB,CAAC;AAExB,MAAMC,YAAmB;IAC5B,MAAM;QACF,GAAGD,QAAQ,IAAI;QACf,OAAO;IACX;AACJ;AAEO,MAAME,oBAA2B;IACpC,MAAM;QACF,GAAGF,QAAQ,IAAI;QACf,OAAO;QACP,UAAU;IACd;AACJ;AAEO,MAAMG,kBAAyB;IAClC,MAAM;QACF,GAAGH,QAAQ,IAAI;QACf,aAAa;IACjB;AACJ;AAEO,MAAMI,YAAmB;IAC5B,MAAM;QACF,GAAGJ,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMK,aAAoB;IAC7B,MAAM;QACF,GAAGL,QAAQ,IAAI;QACf,YAAY;YACR,SAAS;YACT,SAAS;QACb;IACJ;AACJ;AAEO,MAAMM,WAAkB;IAC3B,MAAM;QACF,GAAGN,QAAQ,IAAI;QACf,OAAO;QACP,UAAU;IACd;AACJ;AAEO,MAAMO,cAAqB;IAC9B,MAAM;QACF,GAAGP,QAAQ,IAAI;QACf,OAAO;QACP,UAAU;QACV,aAAa;QACb,MAAM;QACN,YAAY;YACR,SAAS;YACT,SAAS;QACb;IACJ;AACJ"}
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react-webpack5";
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { TagsPrimitive } from "./TagsPrimitive.js";
3
3
  declare const meta: Meta<typeof TagsPrimitive>;
4
4
  export default meta;