@uva-glass/component-library 1.64.7 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/dist/Column-BUyVh2Oo.js.map +1 -1
  2. package/dist/MultiSelectItem-D9PxdX43.js.map +1 -1
  3. package/dist/SortableProvider-BUsvniX7.js.map +1 -1
  4. package/dist/{TablePlugin-BbiBRjod.js → TablePlugin-ByeOn0Zf.js} +5 -6
  5. package/dist/{TablePlugin-BbiBRjod.js.map → TablePlugin-ByeOn0Zf.js.map} +1 -1
  6. package/dist/assets/Label.css +1 -1
  7. package/dist/chunk-7R3XDUXW-C-tvzxWq.js +1685 -0
  8. package/dist/chunk-7R3XDUXW-C-tvzxWq.js.map +1 -0
  9. package/dist/components/Accordion/Accordion.js.map +1 -1
  10. package/dist/components/Accordion/Accordion.stories.js.map +1 -1
  11. package/dist/components/AccordionCard/AccordionCard.js.map +1 -1
  12. package/dist/components/AccordionCard/AccordionCard.stories.js.map +1 -1
  13. package/dist/components/ActionList/ActionList.js.map +1 -1
  14. package/dist/components/ActionList/ActionList.stories.js.map +1 -1
  15. package/dist/components/AppStatusBar/AppStatusBar.stories.js.map +1 -1
  16. package/dist/components/Attention/Attention.stories.js.map +1 -1
  17. package/dist/components/Backdrop/Backdrop.stories.js.map +1 -1
  18. package/dist/components/ButtonGroup/ButtonGroup.stories.js.map +1 -1
  19. package/dist/components/Buttons/Button.js.map +1 -1
  20. package/dist/components/Buttons/Button.stories.js +1 -1
  21. package/dist/components/Buttons/Button.stories.js.map +1 -1
  22. package/dist/components/Buttons/LinkButton.d.ts +1 -1
  23. package/dist/components/Buttons/LinkButton.js +1 -1
  24. package/dist/components/Buttons/LinkButton.js.map +1 -1
  25. package/dist/components/Buttons/LinkButton.stories.js +5 -5
  26. package/dist/components/Buttons/LinkButton.stories.js.map +1 -1
  27. package/dist/components/Buttons/MenuButton.js.map +1 -1
  28. package/dist/components/Buttons/MenuButton.stories.js +1 -1
  29. package/dist/components/Buttons/MenuButton.stories.js.map +1 -1
  30. package/dist/components/Card/Card.stories.js.map +1 -1
  31. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  32. package/dist/components/Checkbox/Checkbox.stories.js.map +1 -1
  33. package/dist/components/CheckboxButton/CheckboxButton.js.map +1 -1
  34. package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
  35. package/dist/components/CheckboxButton/CheckboxButton.stories.js.map +1 -1
  36. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
  37. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  38. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js.map +1 -1
  39. package/dist/components/CheckboxTree/CheckboxTree.js +6 -7
  40. package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
  41. package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
  42. package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
  43. package/dist/components/Drawer/Drawer.js.map +1 -1
  44. package/dist/components/Drawer/Drawer.stories.js +1 -1
  45. package/dist/components/Drawer/Drawer.stories.js.map +1 -1
  46. package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.js.map +1 -1
  47. package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.js.map +1 -1
  48. package/dist/components/FeedbackBox/FeedbackBox.stories.js.map +1 -1
  49. package/dist/components/FieldHint/FieldHint.js.map +1 -1
  50. package/dist/components/FieldHint/FieldHint.stories.js.map +1 -1
  51. package/dist/components/Fieldset/Fieldset.stories.js.map +1 -1
  52. package/dist/components/FormField/FormField.stories.js.map +1 -1
  53. package/dist/components/FormInput/FormInput.d.ts +3 -1
  54. package/dist/components/FormInput/FormInput.js +24 -24
  55. package/dist/components/FormInput/FormInput.js.map +1 -1
  56. package/dist/components/FormInput/FormInput.stories.js +1 -1
  57. package/dist/components/FormInput/FormInput.stories.js.map +1 -1
  58. package/dist/components/GridRow/GridRow.js.map +1 -1
  59. package/dist/components/GridRow/GridRow.stories.js.map +1 -1
  60. package/dist/components/HorizontalList/HorizontalList.js.map +1 -1
  61. package/dist/components/HorizontalList/HorizontalList.stories.js.map +1 -1
  62. package/dist/components/Icon/Icon.stories.js.map +1 -1
  63. package/dist/components/Icon/icons/index.js.map +1 -1
  64. package/dist/components/IconButton/IconButton.js.map +1 -1
  65. package/dist/components/IconButton/IconButton.stories.js +1 -1
  66. package/dist/components/IconButton/IconButton.stories.js.map +1 -1
  67. package/dist/components/InfoMessage/InfoMessage.stories.js.map +1 -1
  68. package/dist/components/Input/Input.js.map +1 -1
  69. package/dist/components/Input/Input.stories.js.map +1 -1
  70. package/dist/components/InputField/InputField.js.map +1 -1
  71. package/dist/components/InputField/InputField.stories.js +4 -5
  72. package/dist/components/InputField/InputField.stories.js.map +1 -1
  73. package/dist/components/Label/Label.d.ts +3 -1
  74. package/dist/components/Label/Label.js +14 -12
  75. package/dist/components/Label/Label.js.map +1 -1
  76. package/dist/components/Label/Label.stories.js.map +1 -1
  77. package/dist/components/MenuLink/MenuLink.d.ts +1 -1
  78. package/dist/components/MenuLink/MenuLink.js +5 -5
  79. package/dist/components/MenuLink/MenuLink.js.map +1 -1
  80. package/dist/components/MenuLink/MenuLink.stories.d.ts +1 -1
  81. package/dist/components/MenuLink/MenuLink.stories.js +1 -1
  82. package/dist/components/MenuLink/MenuLink.stories.js.map +1 -1
  83. package/dist/components/MetaDataList/MetaDataList.js.map +1 -1
  84. package/dist/components/MetaDataList/MetaDataList.stories.js.map +1 -1
  85. package/dist/components/ModalDialog/ModalDialog.js.map +1 -1
  86. package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
  87. package/dist/components/ModalDialog/ModalDialog.stories.js.map +1 -1
  88. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  89. package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
  90. package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
  91. package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -3
  92. package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
  93. package/dist/components/MultiSelect/index.js +1 -1
  94. package/dist/components/OverlayCloseButton/OverlayCloseButton.js.map +1 -1
  95. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
  96. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js.map +1 -1
  97. package/dist/components/PageOverlay/PageOverlay.js.map +1 -1
  98. package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
  99. package/dist/components/PeriodSelector/PeriodSelector.js +3 -4
  100. package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
  101. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  102. package/dist/components/PeriodSelector/PeriodSelector.stories.js.map +1 -1
  103. package/dist/components/Periods/Periods.js.map +1 -1
  104. package/dist/components/Periods/Periods.stories.js.map +1 -1
  105. package/dist/components/ProgrammeCard/ProgrammeCard.js.map +1 -1
  106. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +4 -5
  107. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
  108. package/dist/components/RadioButton/RadioButton.stories.js.map +1 -1
  109. package/dist/components/Repeater/Repeater.js.map +1 -1
  110. package/dist/components/Repeater/Repeater.stories.js.map +1 -1
  111. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +3 -4
  112. package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +1 -1
  113. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js.map +1 -1
  114. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +3 -4
  115. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
  116. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -3
  117. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js.map +1 -1
  118. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js.map +1 -1
  119. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +3 -4
  120. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
  121. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
  122. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js.map +1 -1
  123. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -3
  124. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js.map +1 -1
  125. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js.map +1 -1
  126. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +2 -3
  127. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +1 -1
  128. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
  129. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  130. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +1 -1
  131. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
  132. package/dist/components/RteEditor/Plugins/index.js +1 -1
  133. package/dist/components/RteEditor/Providers/LanguageProvider.js.map +1 -1
  134. package/dist/components/RteEditor/RteEditor.js +3 -4
  135. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  136. package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
  137. package/dist/components/RteEditor/helpers.js.map +1 -1
  138. package/dist/components/RteEditor/hooks/components/Flyout.js.map +1 -1
  139. package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
  140. package/dist/components/RteEditor/hooks/useTranslation.js.map +1 -1
  141. package/dist/components/RteEditor/translations.js.map +1 -1
  142. package/dist/components/SectionNotification/SectionNotification.stories.js.map +1 -1
  143. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  144. package/dist/components/SelectListbox/SelectListBox.stories.js.map +1 -1
  145. package/dist/components/SelectListbox/SelectListbox.js.map +1 -1
  146. package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
  147. package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
  148. package/dist/components/SelectListbox/components/SelectContainer.js.map +1 -1
  149. package/dist/components/SelectListbox/components/SelectOption.js.map +1 -1
  150. package/dist/components/SelectListbox/components/SelectOptionBox.js.map +1 -1
  151. package/dist/components/Sortable/Sortable.js.map +1 -1
  152. package/dist/components/Sortable/Sortable.stories.js +1 -1
  153. package/dist/components/Sortable/Sortable.stories.js.map +1 -1
  154. package/dist/components/Sortable/actions.js.map +1 -1
  155. package/dist/components/Sortable/components/SortableHandle.js.map +1 -1
  156. package/dist/components/Sortable/components/SortableItem.js.map +1 -1
  157. package/dist/components/Sortable/sortableReducer.js.map +1 -1
  158. package/dist/components/Spinner/Spinner.js.map +1 -1
  159. package/dist/components/Spinner/Spinner.stories.js.map +1 -1
  160. package/dist/components/StatusPill/StatusPill.js.map +1 -1
  161. package/dist/components/StatusPill/StatusPill.stories.js.map +1 -1
  162. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  163. package/dist/components/Tooltip/Tooltip.stories.js.map +1 -1
  164. package/dist/components/hooks/useDebounce.js.map +1 -1
  165. package/dist/components/hooks/useOnClickOutside.js.map +1 -1
  166. package/dist/components/hooks/usePositionedFloaters.js.map +1 -1
  167. package/dist/components/hooks/useResponsive.js.map +1 -1
  168. package/dist/components/index.js +1 -1
  169. package/dist/index-0wq-B7do.js.map +1 -1
  170. package/dist/index-2mUSc_Ki.js.map +1 -1
  171. package/dist/index-B9BWML6P.js.map +1 -1
  172. package/dist/{index-DQyNeMuh.js → index-DWzkl4aY.js} +7 -7
  173. package/dist/{index-DQyNeMuh.js.map → index-DWzkl4aY.js.map} +1 -1
  174. package/dist/index.js +1 -1
  175. package/dist/react-18-BIqxBxbW.js.map +1 -1
  176. package/dist/storyComponents/ClipboardButton/ClipboardButton.js.map +1 -1
  177. package/dist/storyComponents/Container/Container.js.map +1 -1
  178. package/dist/storybook__react.d.js.map +1 -1
  179. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxTree.js","sources":["../../../src/components/CheckboxTree/CheckboxTree.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport type { MouseEventHandler } from 'react';\n\nimport styles from './CheckboxTree.module.css';\n\nimport { Button, Checkbox, FormField, Icon, Label } from 'components';\nimport { useResponsive } from 'components/hooks/useResponsive';\n\n// TODO: Currently the checkbox tree shows odd behavior when a disabled checkbox is checked. When deselecting the parent checkbox, the disabled checkbox is deselected, and will never be checked again. We'll leave this for now, until we run into a real world example where this is necessary.\n\ntype CheckboxLeaf = {\n itemName: string;\n itemValue: string;\n disabled?: boolean;\n};\n\ntype CheckboxBranch = {\n itemName: string;\n children: CheckboxLeaf[];\n};\n\nexport interface CheckboxTreeProps {\n /** The title of the component. */\n title?: string;\n /** Array of checkbox groups with a label and array of children (itemName, itemValue and disabled boolean). */\n checkboxTree: CheckboxBranch[];\n /** Array of selected values. */\n defaultValue?: string[];\n /** Returns array of selected values. */\n onChange?: (value: string[]) => void;\n}\n\n/** Represents a component to render a tree of checkboxes. */\nexport const CheckboxTree = ({ title, checkboxTree, defaultValue, onChange }: CheckboxTreeProps) => {\n const checkboxNodes = useRef<HTMLInputElement[]>([]);\n const { lessThan } = useResponsive();\n\n const nodeArray = (selector: string, parent = document) => [].slice.call(parent.querySelectorAll(selector));\n\n const setValue = () => {\n const values = checkboxNodes.current.reduce((values, checkbox) => {\n if (checkbox.name && checkbox.checked) {\n values.push(checkbox.value);\n }\n return values;\n }, [] as string[]);\n\n if (onChange) onChange(values);\n };\n\n const setCheckboxesState = (check: HTMLInputElement) => {\n while (check) {\n const parent = check.closest('[data-ul]')?.parentNode?.querySelector('input');\n const siblings: HTMLInputElement[] = nodeArray(\n 'input',\n parent?.closest('[data-li]')?.querySelector('[data-ul]') as Document | undefined\n );\n\n const checkStatus = siblings.reduce((status, check) => {\n if (!check.disabled) status.push(check.checked);\n return status;\n }, [] as boolean[]);\n\n const every = checkStatus.every(Boolean);\n const some = checkStatus.some(Boolean);\n\n if (parent) {\n parent.checked = every;\n parent.indeterminate = !every && every !== some;\n }\n\n if (!parent || check === parent) {\n break;\n }\n\n check = parent;\n }\n };\n\n const setExpandedAttributes = (trigger: HTMLButtonElement, container: Element | null) => {\n const children = container?.querySelector('[data-ul]');\n\n (trigger.childNodes[0] as Element).classList.toggle(styles['checkbox-tree__branch--icon--expanded']);\n container\n ?.closest('[data-li]')\n ?.setAttribute(\n 'aria-expanded',\n container?.closest('[data-li]')?.getAttribute('aria-expanded') === 'false' ? 'true' : 'false'\n );\n\n if (children) {\n children.classList.toggle(styles['checkbox-tree__leaves--expanded']);\n }\n };\n\n const handleChange: MouseEventHandler<HTMLDivElement> = (event) => {\n const check = event.target as HTMLInputElement;\n\n if (!check || !check.parentNode || !check.parentNode.parentNode) return;\n const parentCheckbox = check.parentNode.parentNode as HTMLElement;\n\n if (\n lessThan.md &&\n check.previousElementSibling?.tagName === 'BUTTON' &&\n parentCheckbox.getAttribute('aria-expanded') === 'false'\n ) {\n event.preventDefault();\n setExpandedAttributes(parentCheckbox.querySelector('button') as HTMLButtonElement, parentCheckbox);\n return;\n }\n\n if (checkboxNodes.current.indexOf(check) === -1) return;\n\n const children: HTMLInputElement[] = (check.parentNode.parentNode as Document)\n ? nodeArray('input', check.parentNode.parentNode as Document)\n : [];\n\n children.forEach((child) => {\n return (child.checked = child.disabled ? false : check.checked);\n });\n\n setCheckboxesState(check);\n setValue();\n };\n\n const handleExpanded: MouseEventHandler<HTMLButtonElement> = (event) => {\n const target = event.target as HTMLButtonElement;\n const parent = target.closest('[data-li]');\n setExpandedAttributes(target, parent);\n };\n\n useEffect(() => {\n checkboxNodes.current = nodeArray('input') || [];\n }, []);\n\n useEffect(() => {\n if (defaultValue) {\n checkboxNodes.current.forEach((checkbox) => {\n if (defaultValue.includes(checkbox.value)) {\n checkbox.checked = true;\n setCheckboxesState(checkbox);\n }\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [defaultValue]);\n\n return (\n <div>\n {title && <span className={styles['checkbox-tree__header']}>{title}</span>}\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\n <div onClick={handleChange} data-ul role=\"tree\" tabIndex={0}>\n {checkboxTree.map(({ itemName, children }) => (\n <div\n key={itemName}\n className={styles['checkbox-tree__branch']}\n data-li\n aria-expanded={lessThan.md ? 'false' : 'true'}\n >\n <FormField inline className={styles['checkbox-tree__branch--formfield']}>\n <Button variant=\"blank\" onClick={handleExpanded}>\n <Icon\n name=\"CheveronRight\"\n size={16}\n className={clsx(styles['checkbox-tree__branch--icon'], {\n [styles['checkbox-tree__branch--icon--expanded']]: !lessThan.md,\n })}\n />\n </Button>\n <Checkbox id={itemName} disabled={children.every((checkbox) => checkbox.disabled)} />\n <Label htmlFor={itemName}>{itemName}</Label>\n </FormField>\n <div\n className={clsx(styles['checkbox-tree__leaves'], {\n [styles['checkbox-tree__leaves--expanded']]: !lessThan.md,\n })}\n data-ul\n >\n {children.map(({ itemName, itemValue, disabled }) => (\n <div key={itemName} className={styles['checkbox-tree__leaf']} data-li>\n <FormField inline className={styles['checkbox-tree__branch--formfield']}>\n <Checkbox id={itemName} name={itemName} value={itemValue} disabled={disabled} />\n <Label htmlFor={itemName}>{itemName}</Label>\n </FormField>\n </div>\n ))}\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n};\n"],"names":["CheckboxTree","title","checkboxTree","defaultValue","onChange","checkboxNodes","useRef","lessThan","useResponsive","nodeArray","selector","parent","setValue","values","checkbox","setCheckboxesState","check","_b","_a","checkStatus","_c","status","every","some","setExpandedAttributes","trigger","container","children","styles","handleChange","event","parentCheckbox","child","handleExpanded","target","useEffect","itemName","jsxs","FormField","jsx","Button","Icon","clsx","Checkbox","Label","itemVal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EAAE,UAAAS,GAAU,WAAAS,GAAW,UAAAC,EACpC,MAAA,gBAAAP,EAAC,OAAmB,EAAA,WAAWX,EAAO,qBAAqB,GAAG,WAAO,IACnE,UAAC,gBAAAS,EAAAC,GAAA,EAAU,QAAM,IAAC,WAAWV,EAAO,kCAAkC,GACpE,UAAA;AAAA,gBAAA,gBAAAW,EAACI,KAAS,IAAIP,GAAU,MAAMA,GAAU,OAAOS,GAAW,UAAAC,GAAoB;AAAA,gBAC7E,gBAAAP,EAAAK,GAAA,EAAM,SAASR,GAAW,UAAAA,GAAS;AAAA,cAAA,GACtC,EAAA,GAJQA,CAKV,CACD;AAAA,YAAA;AAAA,UACH;AAAA,QAAA;AAAA,MAAA;AAAA,MAhCKA;AAAA,IAkCR,CAAA,GACH;AAAA,EACF,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"CheckboxTree.js","sources":["../../../src/components/CheckboxTree/CheckboxTree.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport type { MouseEventHandler } from 'react';\n\nimport styles from './CheckboxTree.module.css';\n\nimport { Button, Checkbox, FormField, Icon, Label } from 'components';\nimport { useResponsive } from 'components/hooks/useResponsive';\n\n// TODO: Currently the checkbox tree shows odd behavior when a disabled checkbox is checked. When deselecting the parent checkbox, the disabled checkbox is deselected, and will never be checked again. We'll leave this for now, until we run into a real world example where this is necessary.\n\ntype CheckboxLeaf = {\n itemName: string;\n itemValue: string;\n disabled?: boolean;\n};\n\ntype CheckboxBranch = {\n itemName: string;\n children: CheckboxLeaf[];\n};\n\nexport interface CheckboxTreeProps {\n /** The title of the component. */\n title?: string;\n /** Array of checkbox groups with a label and array of children (itemName, itemValue and disabled boolean). */\n checkboxTree: CheckboxBranch[];\n /** Array of selected values. */\n defaultValue?: string[];\n /** Returns array of selected values. */\n onChange?: (value: string[]) => void;\n}\n\n/** Represents a component to render a tree of checkboxes. */\nexport const CheckboxTree = ({ title, checkboxTree, defaultValue, onChange }: CheckboxTreeProps) => {\n const checkboxNodes = useRef<HTMLInputElement[]>([]);\n const { lessThan } = useResponsive();\n\n const nodeArray = (selector: string, parent = document) => [].slice.call(parent.querySelectorAll(selector));\n\n const setValue = () => {\n const values = checkboxNodes.current.reduce((values, checkbox) => {\n if (checkbox.name && checkbox.checked) {\n values.push(checkbox.value);\n }\n return values;\n }, [] as string[]);\n\n if (onChange) onChange(values);\n };\n\n const setCheckboxesState = (check: HTMLInputElement) => {\n while (check) {\n const parent = check.closest('[data-ul]')?.parentNode?.querySelector('input');\n const siblings: HTMLInputElement[] = nodeArray(\n 'input',\n parent?.closest('[data-li]')?.querySelector('[data-ul]') as Document | undefined\n );\n\n const checkStatus = siblings.reduce((status, check) => {\n if (!check.disabled) status.push(check.checked);\n return status;\n }, [] as boolean[]);\n\n const every = checkStatus.every(Boolean);\n const some = checkStatus.some(Boolean);\n\n if (parent) {\n parent.checked = every;\n parent.indeterminate = !every && every !== some;\n }\n\n if (!parent || check === parent) {\n break;\n }\n\n check = parent;\n }\n };\n\n const setExpandedAttributes = (trigger: HTMLButtonElement, container: Element | null) => {\n const children = container?.querySelector('[data-ul]');\n\n (trigger.childNodes[0] as Element).classList.toggle(styles['checkbox-tree__branch--icon--expanded']);\n container\n ?.closest('[data-li]')\n ?.setAttribute(\n 'aria-expanded',\n container?.closest('[data-li]')?.getAttribute('aria-expanded') === 'false' ? 'true' : 'false'\n );\n\n if (children) {\n children.classList.toggle(styles['checkbox-tree__leaves--expanded']);\n }\n };\n\n const handleChange: MouseEventHandler<HTMLDivElement> = (event) => {\n const check = event.target as HTMLInputElement;\n\n if (!check || !check.parentNode || !check.parentNode.parentNode) return;\n const parentCheckbox = check.parentNode.parentNode as HTMLElement;\n\n if (\n lessThan.md &&\n check.previousElementSibling?.tagName === 'BUTTON' &&\n parentCheckbox.getAttribute('aria-expanded') === 'false'\n ) {\n event.preventDefault();\n setExpandedAttributes(parentCheckbox.querySelector('button') as HTMLButtonElement, parentCheckbox);\n return;\n }\n\n if (checkboxNodes.current.indexOf(check) === -1) return;\n\n const children: HTMLInputElement[] = (check.parentNode.parentNode as Document)\n ? nodeArray('input', check.parentNode.parentNode as Document)\n : [];\n\n children.forEach((child) => {\n return (child.checked = child.disabled ? false : check.checked);\n });\n\n setCheckboxesState(check);\n setValue();\n };\n\n const handleExpanded: MouseEventHandler<HTMLButtonElement> = (event) => {\n const target = event.target as HTMLButtonElement;\n const parent = target.closest('[data-li]');\n setExpandedAttributes(target, parent);\n };\n\n useEffect(() => {\n checkboxNodes.current = nodeArray('input') || [];\n }, []);\n\n useEffect(() => {\n if (defaultValue) {\n checkboxNodes.current.forEach((checkbox) => {\n if (defaultValue.includes(checkbox.value)) {\n checkbox.checked = true;\n setCheckboxesState(checkbox);\n }\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [defaultValue]);\n\n return (\n <div>\n {title && <span className={styles['checkbox-tree__header']}>{title}</span>}\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\n <div onClick={handleChange} data-ul role=\"tree\" tabIndex={0}>\n {checkboxTree.map(({ itemName, children }) => (\n <div\n key={itemName}\n className={styles['checkbox-tree__branch']}\n data-li\n aria-expanded={lessThan.md ? 'false' : 'true'}\n >\n <FormField inline className={styles['checkbox-tree__branch--formfield']}>\n <Button variant=\"blank\" onClick={handleExpanded}>\n <Icon\n name=\"CheveronRight\"\n size={16}\n className={clsx(styles['checkbox-tree__branch--icon'], {\n [styles['checkbox-tree__branch--icon--expanded']]: !lessThan.md,\n })}\n />\n </Button>\n <Checkbox id={itemName} disabled={children.every((checkbox) => checkbox.disabled)} />\n <Label htmlFor={itemName}>{itemName}</Label>\n </FormField>\n <div\n className={clsx(styles['checkbox-tree__leaves'], {\n [styles['checkbox-tree__leaves--expanded']]: !lessThan.md,\n })}\n data-ul\n >\n {children.map(({ itemName, itemValue, disabled }) => (\n <div key={itemName} className={styles['checkbox-tree__leaf']} data-li>\n <FormField inline className={styles['checkbox-tree__branch--formfield']}>\n <Checkbox id={itemName} name={itemName} value={itemValue} disabled={disabled} />\n <Label htmlFor={itemName}>{itemName}</Label>\n </FormField>\n </div>\n ))}\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n};\n"],"names":["CheckboxTree","title","checkboxTree","defaultValue","onChange","checkboxNodes","useRef","lessThan","useResponsive","nodeArray","selector","parent","setValue","values","checkbox","setCheckboxesState","check","_b","_a","checkStatus","_c","status","every","some","setExpandedAttributes","trigger","container","children","styles","handleChange","event","parentCheckbox","child","handleExpanded","target","useEffect","itemName","jsxs","FormField","jsx","Button","Icon","clsx","Checkbox","Label","itemValue","disabled"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCaA,KAAe,CAAC,EAAE,OAAAC,GAAO,cAAAC,GAAc,cAAAC,GAAc,UAAAC,QAAkC;AAC5F,QAAAC,IAAgBC,EAA2B,EAAE,GAC7C,EAAE,UAAAC,EAAS,IAAIC,EAAc,GAE7BC,IAAY,CAACC,GAAkBC,IAAS,aAAa,CAAA,EAAG,MAAM,KAAKA,EAAO,iBAAiBD,CAAQ,CAAC,GAEpGE,IAAW,MAAM;AACrB,UAAMC,IAASR,EAAc,QAAQ,OAAO,CAACQ,GAAQC,OAC/CA,EAAS,QAAQA,EAAS,WAC5BD,EAAO,KAAKC,EAAS,KAAK,GAErBD,IACN,EAAc;AAEb,IAAAT,OAAmBS,CAAM;AAAA,EAC/B,GAEME,IAAqB,CAACC,MAA4B;;AACtD,WAAOA,KAAO;AACZ,YAAML,KAASM,KAAAC,IAAAF,EAAM,QAAQ,WAAW,MAAzB,gBAAAE,EAA4B,eAA5B,gBAAAD,EAAwC,cAAc,UAM/DE,IAL+BV;AAAA,QACnC;AAAA,SACAW,IAAAT,KAAA,gBAAAA,EAAQ,QAAQ,iBAAhB,gBAAAS,EAA8B,cAAc;AAAA,MAC9C,EAE6B,OAAO,CAACC,GAAQL,OACtCA,EAAM,YAAiBK,EAAA,KAAKL,EAAM,OAAO,GACvC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AAA,IAAIP,GAAU,UAAUT,EAAS,MAAM,CAACb,MAAaA,EAAS,QAAQ,EAAG,CAAA;AAAA,YAClF,gBAAAyB,EAAAK,GAAA,EAAM,SAASR,GAAW,UAASA,EAAA,CAAA;AAAA,UAAA,GACtC;AAAA,UACA,gBAAAG;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWG,EAAKd,EAAO,uBAAuB,GAAG;AAAA,gBAC/C,CAACA,EAAO,iCAAiC,CAAC,GAAG,CAACrB,EAAS;AAAA,cAAA,CACxD;AAAA,cACD,WAAO;AAAA,cAEN,UAAAoB,EAAS,IAAI,CAAC,EAAE,UAAAS,GAAU,WAAAS,GAAW,UAAAC,EACpC,MAAA,gBAAAP,EAAC,OAAmB,EAAA,WAAWX,EAAO,qBAAqB,GAAG,WAAO,IACnE,UAAC,gBAAAS,EAAAC,GAAA,EAAU,QAAM,IAAC,WAAWV,EAAO,kCAAkC,GACpE,UAAA;AAAA,gBAAA,gBAAAW,EAACI,KAAS,IAAIP,GAAU,MAAMA,GAAU,OAAOS,GAAW,UAAAC,GAAoB;AAAA,gBAC7E,gBAAAP,EAAAK,GAAA,EAAM,SAASR,GAAW,UAAAA,EAAS,CAAA;AAAA,cAAA,EACtC,CAAA,EAAA,GAJQA,CAKV,CACD;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,MAhCKA;AAAA,IAAA,CAkCR,EACH,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { fn as m } from "../../index-DQyNeMuh.js";
2
+ import { fn as m } from "../../index-DWzkl4aY.js";
3
3
  import { CheckboxTree as e } from "./CheckboxTree.js";
4
4
  const i = [
5
5
  {
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxTree.stories.js","sources":["../../../src/components/CheckboxTree/CheckboxTree.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { CheckboxTreeProps } from './CheckboxTree';\n\nimport { CheckboxTree } from './CheckboxTree';\n\nconst MOCK_CHECKBOX_TREE = [\n {\n itemName: 'Semester 1',\n children: [\n {\n itemName: '1.1',\n itemValue: '1',\n disabled: true,\n },\n {\n itemName: '1.2',\n itemValue: '2',\n disabled: false,\n },\n {\n itemName: '1.3',\n itemValue: '3',\n disabled: false,\n },\n ],\n },\n {\n itemName: 'Semester 2',\n children: [\n {\n itemName: '2.1',\n itemValue: '4',\n disabled: false,\n },\n {\n itemName: '2.2',\n itemValue: '5',\n disabled: true,\n },\n {\n itemName: '2.3',\n itemValue: '6',\n disabled: false,\n },\n ],\n },\n {\n itemName: 'Semester 3',\n children: [\n {\n itemName: '3',\n itemValue: '7',\n disabled: false,\n },\n ],\n },\n];\n\nconst codeString = '<CheckboxTree title={} checkboxTree={} defaultValue={} onChange={} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/CheckboxTree',\n component: CheckboxTree,\n parameters: {\n inspectComponent: CheckboxTree,\n codeString: codeString,\n },\n} as Meta<CheckboxTreeProps>;\n\nconst Template: StoryFn<CheckboxTreeProps> = (args) => <CheckboxTree {...args} />;\n\nexport const CheckboxTreeExample = Template.bind({});\nCheckboxTreeExample.args = {\n title: 'Periode',\n checkboxTree: MOCK_CHECKBOX_TREE,\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n defaultValue: ['3', '4'],\n onChange: fn(),\n};\n"],"names":["MOCK_CHECKBOX_TREE","codeString","CheckboxTree_stories","CheckboxTree","Template","args","jsx","CheckboxTreeExample","fn"],"mappings":";;;AAOA,MAAMA,IAAqB;AAAA,EACzB;AAAA,IACE,UAAU;AAAA,IACV,UAAU;AAAA,MACR;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,UAAU;AAAA,MACR;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,UAAU;AAAA,MACR;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AACF,GAEMC,IAAa,0EAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAuC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAc,GAAGE,EAAM,CAAA,GAElEE,IAAsBH,EAAS,KAAK,EAAE;AACnDG,EAAoB,OAAO;AAAA,EACzB,OAAO;AAAA,EACP,cAAcP;AAAA;AAAA,EAEd,cAAc,CAAC,KAAK,GAAG;AAAA,EACvB,UAAUQ,EAAG;AACf;"}
1
+ {"version":3,"file":"CheckboxTree.stories.js","sources":["../../../src/components/CheckboxTree/CheckboxTree.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { CheckboxTreeProps } from './CheckboxTree';\n\nimport { CheckboxTree } from './CheckboxTree';\n\nconst MOCK_CHECKBOX_TREE = [\n {\n itemName: 'Semester 1',\n children: [\n {\n itemName: '1.1',\n itemValue: '1',\n disabled: true,\n },\n {\n itemName: '1.2',\n itemValue: '2',\n disabled: false,\n },\n {\n itemName: '1.3',\n itemValue: '3',\n disabled: false,\n },\n ],\n },\n {\n itemName: 'Semester 2',\n children: [\n {\n itemName: '2.1',\n itemValue: '4',\n disabled: false,\n },\n {\n itemName: '2.2',\n itemValue: '5',\n disabled: true,\n },\n {\n itemName: '2.3',\n itemValue: '6',\n disabled: false,\n },\n ],\n },\n {\n itemName: 'Semester 3',\n children: [\n {\n itemName: '3',\n itemValue: '7',\n disabled: false,\n },\n ],\n },\n];\n\nconst codeString = '<CheckboxTree title={} checkboxTree={} defaultValue={} onChange={} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/CheckboxTree',\n component: CheckboxTree,\n parameters: {\n inspectComponent: CheckboxTree,\n codeString: codeString,\n },\n} as Meta<CheckboxTreeProps>;\n\nconst Template: StoryFn<CheckboxTreeProps> = (args) => <CheckboxTree {...args} />;\n\nexport const CheckboxTreeExample = Template.bind({});\nCheckboxTreeExample.args = {\n title: 'Periode',\n checkboxTree: MOCK_CHECKBOX_TREE,\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n defaultValue: ['3', '4'],\n onChange: fn(),\n};\n"],"names":["MOCK_CHECKBOX_TREE","codeString","CheckboxTree_stories","CheckboxTree","Template","args","jsx","CheckboxTreeExample","fn"],"mappings":";;;AAOA,MAAMA,IAAqB;AAAA,EACzB;AAAA,IACE,UAAU;AAAA,IACV,UAAU;AAAA,MACR;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MAAA;AAAA,IACZ;AAAA,EAEJ;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,UAAU;AAAA,MACR;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MAAA;AAAA,IACZ;AAAA,EAEJ;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,UAAU;AAAA,MACR;AAAA,QACE,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MAAA;AAAA,IACZ;AAAA,EACF;AAEJ,GAEMC,IAAa,0EAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAuC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAc,GAAGE,GAAM,GAElEE,IAAsBH,EAAS,KAAK,CAAE,CAAA;AACnDG,EAAoB,OAAO;AAAA,EACzB,OAAO;AAAA,EACP,cAAcP;AAAA;AAAA,EAEd,cAAc,CAAC,KAAK,GAAG;AAAA,EACvB,UAAUQ,EAAG;AACf;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import { useDialog } from '@react-aria/dialog';\nimport { FocusScope } from '@react-aria/focus';\nimport { OverlayContainer, useModal, useOverlay, usePreventScroll } from '@react-aria/overlays';\nimport { clsx } from 'clsx';\nimport { useEffect, useRef, useState } from 'react';\n\nimport type { HTMLAttributes, PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './Drawer.module.css';\n\nimport { Backdrop } from 'components/Backdrop/Backdrop';\nimport { OverlayCloseButton } from 'components/OverlayCloseButton';\n\nexport interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'style' | 'className'> {\n /** The buttons to render in the drawer. */\n buttons?: ReactNode;\n /** true if the drawer should be open; otherwise, false. The default is false. */\n isOpen?: boolean;\n /** The callback method that is invoked when the drawer is closed. */\n onClose: () => void;\n /** The title of the drawer. */\n title: string;\n /** The aria-label of the close button. */\n closeButtonAriaValueText?: string;\n}\n\nconst closingDelay = 200;\n\n/** Represents a Drawer component. */\nexport function Drawer({\n buttons,\n children,\n isOpen,\n onClose,\n title,\n closeButtonAriaValueText = 'Close',\n ...restProps\n}: PropsWithChildren<DrawerProps>) {\n const [containerClassNames, setContainerClassNames] = useState(styles.drawer);\n // Hide content outside the modal from screen readers.\n const { modalProps } = useModal({ isDisabled: !isOpen });\n const contentRef = useRef<HTMLDivElement>(null);\n\n function onCloseDrawer() {\n setContainerClassNames(styles.drawer);\n\n globalThis.setTimeout(() => {\n onClose();\n }, closingDelay);\n }\n\n // Handle interacting outside the dialog and pressing\n // the Escape key to close the modal.\n const { overlayProps, underlayProps } = useOverlay(\n { isDismissable: true, isKeyboardDismissDisabled: false, isOpen, onClose: onCloseDrawer },\n contentRef\n );\n\n // Get props for the dialog and its title\n const { dialogProps, titleProps } = useDialog({}, contentRef);\n\n usePreventScroll({ isDisabled: !isOpen });\n\n useEffect(() => {\n // setting class name after render so that element can slide in after it is mounted and slide out\n // before it is unmounted\n setContainerClassNames(clsx(styles.drawer, { [styles['drawer--open']]: isOpen }));\n }, [isOpen]);\n\n return (\n <OverlayContainer>\n <Backdrop {...underlayProps}>\n <FocusScope contain restoreFocus>\n <aside\n {...modalProps}\n {...overlayProps}\n {...dialogProps}\n {...restProps}\n className={containerClassNames}\n ref={contentRef}\n >\n <header className={styles.drawer__header}>\n <h1 className={styles.drawer__heading} {...titleProps}>\n {title}\n </h1>\n\n <OverlayCloseButton aria-label={closeButtonAriaValueText} onClick={onCloseDrawer} />\n </header>\n\n <div className={styles.drawer__content}>{children}</div>\n\n {buttons && (\n <footer className={styles.drawer__footer}>\n <div className={styles.drawer__buttons}>{buttons}</div>\n </footer>\n )}\n </aside>\n </FocusScope>\n </Backdrop>\n </OverlayContainer>\n );\n}\n"],"names":["closingDelay","Drawer","buttons","children","isOpen","onClose","title","closeButtonAriaValueText","restProps","containerClassNames","setContainerClassNames","useState","styles","modalProps","useModal","contentRef","useRef","onCloseDrawer","overlayProps","underlayProps","useOverlay","dialogProps","titleProps","useDialog","usePreventScroll","useEffect","clsx","jsx","OverlayContainer","Backdrop","FocusScope","jsxs","OverlayCloseButton"],"mappings":";;;;;;;;;;;;;;;;GA0BMA,IAAe;AAGd,SAASC,EAAO;AAAA,EACrB,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,0BAAAC,IAA2B;AAAA,EAC3B,GAAGC;AACL,GAAmC;AACjC,QAAM,CAACC,GAAqBC,CAAsB,IAAIC,EAASC,EAAO,MAAM,GAEtE,EAAE,YAAAC,MAAeC,EAAS,EAAE,YAAY,CAACV,GAAQ,GACjDW,IAAaC,EAAuB,IAAI;AAE9C,WAASC,IAAgB;AACvB,IAAAP,EAAuBE,EAAO,MAAM,GAEpC,WAAW,WAAW,MAAM;AAClB,MAAAP;OACPL,CAAY;AAAA,EACjB;AAIM,QAAA,EAAE,cAAAkB,GAAc,eAAAC,EAAA,IAAkBC;AAAA,IACtC,EAAE,eAAe,IAAM,2BAA2B,IAAO,QAAAhB,GAAQ,SAASa,EAAc;AAAA,IACxFF;AAAA,EAAA,GAII,EAAE,aAAAM,GAAa,YAAAC,EAAA,IAAeC,EAAU,CAAA,GAAIR,CAAU;AAE5D,SAAAS,EAAiB,EAAE,YAAY,CAACpB,EAAQ,CAAA,GAExCqB,EAAU,MAAM;AAGS,IAAAf,EAAAgB,EAAKd,EAAO,QAAQ,EAAE,CAACA,EAAO,cAAc,CAAC,GAAGR,EAAQ,CAAA,CAAC;AAAA,EAAA,GAC/E,CAACA,CAAM,CAAC,GAGT,gBAAAuB,EAACC,GACC,EAAA,UAAA,gBAAAD,EAACE,GAAU,EAAA,GAAGV,GACZ,UAAA,gBAAAQ,EAACG,GAAW,EAAA,SAAO,IAAC,cAAY,IAC9B,UAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGlB;AAAA,MACH,GAAGK;AAAA,MACH,GAAGG;AAAA,MACH,GAAGb;AAAA,MACJ,WAAWC;AAAA,MACX,KAAKM;AAAA,MAEL,UAAA;AAAA,QAAC,gBAAAgB,EAAA,UAAA,EAAO,WAAWnB,EAAO,gBACxB,UAAA;AAAA,UAAA,gBAAAe,EAAC,QAAG,WAAWf,EAAO,iBAAkB,GAAGU,GACxC,UACHhB,GAAA;AAAA,UAEC,gBAAAqB,EAAAK,GAAA,EAAmB,cAAYzB,GAA0B,SAASU,GAAe;AAAA,QAAA,GACpF;AAAA,QAEC,gBAAAU,EAAA,OAAA,EAAI,WAAWf,EAAO,iBAAkB,UAAAT,GAAS;AAAA,QAEjDD,KACC,gBAAAyB,EAAC,UAAO,EAAA,WAAWf,EAAO,gBACxB,UAAC,gBAAAe,EAAA,OAAA,EAAI,WAAWf,EAAO,iBAAkB,UAAAV,EAAQ,CAAA,GACnD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAGN,GACF,EACF,CAAA;AAEJ;"}
1
+ {"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import { useDialog } from '@react-aria/dialog';\nimport { FocusScope } from '@react-aria/focus';\nimport { OverlayContainer, useModal, useOverlay, usePreventScroll } from '@react-aria/overlays';\nimport { clsx } from 'clsx';\nimport { useEffect, useRef, useState } from 'react';\n\nimport type { HTMLAttributes, PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './Drawer.module.css';\n\nimport { Backdrop } from 'components/Backdrop/Backdrop';\nimport { OverlayCloseButton } from 'components/OverlayCloseButton';\n\nexport interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'style' | 'className'> {\n /** The buttons to render in the drawer. */\n buttons?: ReactNode;\n /** true if the drawer should be open; otherwise, false. The default is false. */\n isOpen?: boolean;\n /** The callback method that is invoked when the drawer is closed. */\n onClose: () => void;\n /** The title of the drawer. */\n title: string;\n /** The aria-label of the close button. */\n closeButtonAriaValueText?: string;\n}\n\nconst closingDelay = 200;\n\n/** Represents a Drawer component. */\nexport function Drawer({\n buttons,\n children,\n isOpen,\n onClose,\n title,\n closeButtonAriaValueText = 'Close',\n ...restProps\n}: PropsWithChildren<DrawerProps>) {\n const [containerClassNames, setContainerClassNames] = useState(styles.drawer);\n // Hide content outside the modal from screen readers.\n const { modalProps } = useModal({ isDisabled: !isOpen });\n const contentRef = useRef<HTMLDivElement>(null);\n\n function onCloseDrawer() {\n setContainerClassNames(styles.drawer);\n\n globalThis.setTimeout(() => {\n onClose();\n }, closingDelay);\n }\n\n // Handle interacting outside the dialog and pressing\n // the Escape key to close the modal.\n const { overlayProps, underlayProps } = useOverlay(\n { isDismissable: true, isKeyboardDismissDisabled: false, isOpen, onClose: onCloseDrawer },\n contentRef\n );\n\n // Get props for the dialog and its title\n const { dialogProps, titleProps } = useDialog({}, contentRef);\n\n usePreventScroll({ isDisabled: !isOpen });\n\n useEffect(() => {\n // setting class name after render so that element can slide in after it is mounted and slide out\n // before it is unmounted\n setContainerClassNames(clsx(styles.drawer, { [styles['drawer--open']]: isOpen }));\n }, [isOpen]);\n\n return (\n <OverlayContainer>\n <Backdrop {...underlayProps}>\n <FocusScope contain restoreFocus>\n <aside\n {...modalProps}\n {...overlayProps}\n {...dialogProps}\n {...restProps}\n className={containerClassNames}\n ref={contentRef}\n >\n <header className={styles.drawer__header}>\n <h1 className={styles.drawer__heading} {...titleProps}>\n {title}\n </h1>\n\n <OverlayCloseButton aria-label={closeButtonAriaValueText} onClick={onCloseDrawer} />\n </header>\n\n <div className={styles.drawer__content}>{children}</div>\n\n {buttons && (\n <footer className={styles.drawer__footer}>\n <div className={styles.drawer__buttons}>{buttons}</div>\n </footer>\n )}\n </aside>\n </FocusScope>\n </Backdrop>\n </OverlayContainer>\n );\n}\n"],"names":["closingDelay","Drawer","buttons","children","isOpen","onClose","title","closeButtonAriaValueText","restProps","containerClassNames","setContainerClassNames","useState","styles","modalProps","useModal","contentRef","useRef","onCloseDrawer","overlayProps","underlayProps","useOverlay","dialogProps","titleProps","useDialog","usePreventScroll","useEffect","clsx","jsx","OverlayContainer","Backdrop","FocusScope","jsxs","OverlayCloseButton"],"mappings":";;;;;;;;;;;;;;;;GA0BMA,IAAe;AAGd,SAASC,EAAO;AAAA,EACrB,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,0BAAAC,IAA2B;AAAA,EAC3B,GAAGC;AACL,GAAmC;AACjC,QAAM,CAACC,GAAqBC,CAAsB,IAAIC,EAASC,EAAO,MAAM,GAEtE,EAAE,YAAAC,MAAeC,EAAS,EAAE,YAAY,CAACV,GAAQ,GACjDW,IAAaC,EAAuB,IAAI;AAE9C,WAASC,IAAgB;AACvB,IAAAP,EAAuBE,EAAO,MAAM,GAEpC,WAAW,WAAW,MAAM;AAClB,MAAAP,EAAA;AAAA,OACPL,CAAY;AAAA,EAAA;AAKX,QAAA,EAAE,cAAAkB,GAAc,eAAAC,EAAA,IAAkBC;AAAA,IACtC,EAAE,eAAe,IAAM,2BAA2B,IAAO,QAAAhB,GAAQ,SAASa,EAAc;AAAA,IACxFF;AAAA,EACF,GAGM,EAAE,aAAAM,GAAa,YAAAC,EAAA,IAAeC,EAAU,CAAA,GAAIR,CAAU;AAE5D,SAAAS,EAAiB,EAAE,YAAY,CAACpB,GAAQ,GAExCqB,EAAU,MAAM;AAGS,IAAAf,EAAAgB,EAAKd,EAAO,QAAQ,EAAE,CAACA,EAAO,cAAc,CAAC,GAAGR,EAAO,CAAC,CAAC;AAAA,EAAA,GAC/E,CAACA,CAAM,CAAC,GAGT,gBAAAuB,EAACC,GACC,EAAA,UAAA,gBAAAD,EAACE,GAAU,EAAA,GAAGV,GACZ,UAAA,gBAAAQ,EAACG,GAAW,EAAA,SAAO,IAAC,cAAY,IAC9B,UAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGlB;AAAA,MACH,GAAGK;AAAA,MACH,GAAGG;AAAA,MACH,GAAGb;AAAA,MACJ,WAAWC;AAAA,MACX,KAAKM;AAAA,MAEL,UAAA;AAAA,QAAC,gBAAAgB,EAAA,UAAA,EAAO,WAAWnB,EAAO,gBACxB,UAAA;AAAA,UAAA,gBAAAe,EAAC,QAAG,WAAWf,EAAO,iBAAkB,GAAGU,GACxC,UACHhB,GAAA;AAAA,UAEC,gBAAAqB,EAAAK,GAAA,EAAmB,cAAYzB,GAA0B,SAASU,EAAe,CAAA;AAAA,QAAA,GACpF;AAAA,QAEC,gBAAAU,EAAA,OAAA,EAAI,WAAWf,EAAO,iBAAkB,UAAAT,GAAS;AAAA,QAEjDD,KACC,gBAAAyB,EAAC,UAAO,EAAA,WAAWf,EAAO,gBACxB,UAAC,gBAAAe,EAAA,OAAA,EAAI,WAAWf,EAAO,iBAAkB,UAAAV,EAAA,CAAQ,EACnD,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,EAGN,CAAA,EACF,CAAA,GACF;AAEJ;"}
@@ -1,6 +1,6 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import { OverlayProvider as p } from "@react-aria/overlays";
3
- import { fn as m } from "../../index-DQyNeMuh.js";
3
+ import { fn as m } from "../../index-DWzkl4aY.js";
4
4
  import { useState as c } from "react";
5
5
  import { Drawer as r } from "./Drawer.js";
6
6
  import { Button as o } from "../Buttons/Button.js";
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.stories.js","sources":["../../../src/components/Drawer/Drawer.stories.tsx"],"sourcesContent":["import { OverlayProvider } from '@react-aria/overlays';\nimport { fn } from '@storybook/test';\nimport { useState } from 'react';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { DrawerProps } from './Drawer';\n\nimport { Drawer } from './Drawer';\n\nimport { Button } from 'components/Buttons';\nimport { ButtonGroup } from 'components/ButtonGroup';\n\nconst codeString = `\n <Drawer isOpen={isOpen} onClose={onCloseFunction} title={title} buttons={buttons}> {children} </Drawer>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/Drawer',\n component: Drawer,\n argTypes: {\n isOpen: {\n table: {\n disable: true,\n },\n },\n buttons: {\n table: {\n disable: true,\n },\n },\n closeButtonAriaValueText: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: Drawer,\n codeString: codeString,\n },\n} as Meta<DrawerProps>;\n\nconst Template: StoryFn<DrawerProps> = (args) => {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <OverlayProvider>\n <Button onClick={() => setIsOpen(!isOpen)} variant=\"primary\">\n Open drawer\n </Button>\n {isOpen && (\n <Drawer\n {...args}\n isOpen={isOpen}\n onClose={() => {\n fn()();\n return setIsOpen(!isOpen);\n }}\n >\n Example Drawer Content\n </Drawer>\n )}\n </OverlayProvider>\n );\n};\n\nconst defaultArgs: Partial<DrawerProps> = {\n title: 'Example Title',\n closeButtonAriaValueText: 'Close',\n};\n\nexport const DrawerExample = Template.bind({});\nDrawerExample.args = {\n ...defaultArgs,\n};\n\nexport const WithButtons = Template.bind({});\nWithButtons.args = {\n ...defaultArgs,\n buttons: (\n <ButtonGroup>\n <Button variant=\"primary\">Primary Example Button</Button>\n <Button variant=\"secondary\">Secondary Example Button</Button>\n </ButtonGroup>\n ),\n};\n"],"names":["codeString","Drawer_stories","Drawer","Template","args","isOpen","setIsOpen","useState","OverlayProvider","jsx","Button","fn","defaultArgs","DrawerExample","WithButtons","ButtonGroup"],"mappings":";;;;;;;;;AAYA,MAAMA,IAAa;AAAA;AAAA,GAKJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,0BAA0B;AAAA,MACxB,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAiC,CAACC,MAAS;AAC/C,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK;AAE1C,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAO,SAAS,MAAMJ,EAAU,CAACD,CAAM,GAAG,SAAQ,WAAU,UAE7D,cAAA,CAAA;AAAA,IACCA,KACC,gBAAAI;AAAA,MAACP;AAAA,MAAA;AAAA,QACE,GAAGE;AAAA,QACJ,QAAAC;AAAA,QACA,SAAS,OACPM,EAAK,EAAA,GACEL,EAAU,CAACD,CAAM;AAAA,QAE3B,UAAA;AAAA,MAAA;AAAA,IAED;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEMO,IAAoC;AAAA,EACxC,OAAO;AAAA,EACP,0BAA0B;AAC5B,GAEaC,IAAgBV,EAAS,KAAK,EAAE;AAC7CU,EAAc,OAAO;AAAA,EACnB,GAAGD;AACL;AAEO,MAAME,IAAcX,EAAS,KAAK,EAAE;AAC3CW,EAAY,OAAO;AAAA,EACjB,GAAGF;AAAA,EACH,2BACGG,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAN,EAAAC,GAAA,EAAO,SAAQ,WAAU,UAAsB,0BAAA;AAAA,IAC/C,gBAAAD,EAAAC,GAAA,EAAO,SAAQ,aAAY,UAAwB,4BAAA;AAAA,EAAA,GACtD;AAEJ;"}
1
+ {"version":3,"file":"Drawer.stories.js","sources":["../../../src/components/Drawer/Drawer.stories.tsx"],"sourcesContent":["import { OverlayProvider } from '@react-aria/overlays';\nimport { fn } from '@storybook/test';\nimport { useState } from 'react';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { DrawerProps } from './Drawer';\n\nimport { Drawer } from './Drawer';\n\nimport { Button } from 'components/Buttons';\nimport { ButtonGroup } from 'components/ButtonGroup';\n\nconst codeString = `\n <Drawer isOpen={isOpen} onClose={onCloseFunction} title={title} buttons={buttons}> {children} </Drawer>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/Drawer',\n component: Drawer,\n argTypes: {\n isOpen: {\n table: {\n disable: true,\n },\n },\n buttons: {\n table: {\n disable: true,\n },\n },\n closeButtonAriaValueText: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: Drawer,\n codeString: codeString,\n },\n} as Meta<DrawerProps>;\n\nconst Template: StoryFn<DrawerProps> = (args) => {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <OverlayProvider>\n <Button onClick={() => setIsOpen(!isOpen)} variant=\"primary\">\n Open drawer\n </Button>\n {isOpen && (\n <Drawer\n {...args}\n isOpen={isOpen}\n onClose={() => {\n fn()();\n return setIsOpen(!isOpen);\n }}\n >\n Example Drawer Content\n </Drawer>\n )}\n </OverlayProvider>\n );\n};\n\nconst defaultArgs: Partial<DrawerProps> = {\n title: 'Example Title',\n closeButtonAriaValueText: 'Close',\n};\n\nexport const DrawerExample = Template.bind({});\nDrawerExample.args = {\n ...defaultArgs,\n};\n\nexport const WithButtons = Template.bind({});\nWithButtons.args = {\n ...defaultArgs,\n buttons: (\n <ButtonGroup>\n <Button variant=\"primary\">Primary Example Button</Button>\n <Button variant=\"secondary\">Secondary Example Button</Button>\n </ButtonGroup>\n ),\n};\n"],"names":["codeString","Drawer_stories","Drawer","Template","args","isOpen","setIsOpen","useState","OverlayProvider","jsx","Button","fn","defaultArgs","DrawerExample","WithButtons","ButtonGroup"],"mappings":";;;;;;;;;AAYA,MAAMA,IAAa;AAAA;AAAA,GAKJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IAEb;AAAA,IACA,SAAS;AAAA,MACP,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IAEb;AAAA,IACA,0BAA0B;AAAA,MACxB,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EAEJ;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAiC,CAACC,MAAS;AAC/C,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK;AAE1C,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAO,SAAS,MAAMJ,EAAU,CAACD,CAAM,GAAG,SAAQ,WAAU,UAE7D,cAAA,CAAA;AAAA,IACCA,KACC,gBAAAI;AAAA,MAACP;AAAA,MAAA;AAAA,QACE,GAAGE;AAAA,QACJ,QAAAC;AAAA,QACA,SAAS,OACPM,IAAK,GACEL,EAAU,CAACD,CAAM;AAAA,QAE3B,UAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAED,GAEJ;AAEJ,GAEMO,IAAoC;AAAA,EACxC,OAAO;AAAA,EACP,0BAA0B;AAC5B,GAEaC,IAAgBV,EAAS,KAAK,CAAE,CAAA;AAC7CU,EAAc,OAAO;AAAA,EACnB,GAAGD;AACL;AAEO,MAAME,IAAcX,EAAS,KAAK,CAAE,CAAA;AAC3CW,EAAY,OAAO;AAAA,EACjB,GAAGF;AAAA,EACH,2BACGG,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAN,EAAAC,GAAA,EAAO,SAAQ,WAAU,UAAsB,0BAAA;AAAA,IAC/C,gBAAAD,EAAAC,GAAA,EAAO,SAAQ,aAAY,UAAwB,2BAAA,CAAA;AAAA,EAAA,EACtD,CAAA;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyStateDataDisplay.js","sources":["../../../src/components/EmptyStateDataDisplay/EmptyStateDataDisplay.tsx"],"sourcesContent":["import styles from './EmptyStateDataDisplay.module.css';\n\nimport { Icon } from 'components/Icon';\n\nexport interface EmptyStateDataDisplayProps {\n /** The main text to display. */\n label: string;\n /** The sub-text to display. */\n paragraph: string;\n}\n\n/** Represents a component to indicate an empty state. */\nexport function EmptyStateDataDisplay({ label, paragraph }: EmptyStateDataDisplayProps) {\n return (\n <div className={styles['empty-state-data-display_wrapper']}>\n <div className={styles['empty-state-data-display_icon-frame']}>\n <Icon name=\"CubeTransparent\" />\n </div>\n <div className={styles['empty-state-data-display_text-content']}>\n <label className={styles['empty-state-data-display_label']}>{label}</label>\n <p className={styles['empty-state-data-display_paragraph']}>{paragraph}</p>\n </div>\n </div>\n );\n}\n"],"names":["EmptyStateDataDisplay","label","paragraph","jsxs","styles","jsx","Icon"],"mappings":";;;;;;;;;AAYO,SAASA,EAAsB,EAAE,OAAAC,GAAO,WAAAC,KAAyC;AACtF,SACG,gBAAAC,EAAA,OAAA,EAAI,WAAWC,EAAO,kCAAkC,GACvD,UAAA;AAAA,IAAC,gBAAAC,EAAA,OAAA,EAAI,WAAWD,EAAO,qCAAqC,GAC1D,UAAC,gBAAAC,EAAAC,GAAA,EAAK,MAAK,kBAAA,CAAkB,EAC/B,CAAA;AAAA,IACC,gBAAAH,EAAA,OAAA,EAAI,WAAWC,EAAO,uCAAuC,GAC5D,UAAA;AAAA,MAAA,gBAAAC,EAAC,SAAM,EAAA,WAAWD,EAAO,gCAAgC,GAAI,UAAMH,GAAA;AAAA,wBAClE,KAAE,EAAA,WAAWG,EAAO,oCAAoC,GAAI,UAAUF,GAAA;AAAA,IAAA,GACzE;AAAA,EACF,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"EmptyStateDataDisplay.js","sources":["../../../src/components/EmptyStateDataDisplay/EmptyStateDataDisplay.tsx"],"sourcesContent":["import styles from './EmptyStateDataDisplay.module.css';\n\nimport { Icon } from 'components/Icon';\n\nexport interface EmptyStateDataDisplayProps {\n /** The main text to display. */\n label: string;\n /** The sub-text to display. */\n paragraph: string;\n}\n\n/** Represents a component to indicate an empty state. */\nexport function EmptyStateDataDisplay({ label, paragraph }: EmptyStateDataDisplayProps) {\n return (\n <div className={styles['empty-state-data-display_wrapper']}>\n <div className={styles['empty-state-data-display_icon-frame']}>\n <Icon name=\"CubeTransparent\" />\n </div>\n <div className={styles['empty-state-data-display_text-content']}>\n <label className={styles['empty-state-data-display_label']}>{label}</label>\n <p className={styles['empty-state-data-display_paragraph']}>{paragraph}</p>\n </div>\n </div>\n );\n}\n"],"names":["EmptyStateDataDisplay","label","paragraph","jsxs","styles","jsx","Icon"],"mappings":";;;;;;;;;AAYO,SAASA,EAAsB,EAAE,OAAAC,GAAO,WAAAC,KAAyC;AACtF,SACG,gBAAAC,EAAA,OAAA,EAAI,WAAWC,EAAO,kCAAkC,GACvD,UAAA;AAAA,IAAC,gBAAAC,EAAA,OAAA,EAAI,WAAWD,EAAO,qCAAqC,GAC1D,UAAC,gBAAAC,EAAAC,GAAA,EAAK,MAAK,kBAAA,CAAkB,EAC/B,CAAA;AAAA,IACC,gBAAAH,EAAA,OAAA,EAAI,WAAWC,EAAO,uCAAuC,GAC5D,UAAA;AAAA,MAAA,gBAAAC,EAAC,SAAM,EAAA,WAAWD,EAAO,gCAAgC,GAAI,UAAMH,GAAA;AAAA,wBAClE,KAAE,EAAA,WAAWG,EAAO,oCAAoC,GAAI,UAAUF,EAAA,CAAA;AAAA,IAAA,EACzE,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyStateDataDisplay.stories.js","sources":["../../../src/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { EmptyStateDataDisplayProps } from './EmptyStateDataDisplay';\n\nimport { EmptyStateDataDisplay } from './EmptyStateDataDisplay';\n\nconst codeString = '<EmptyStateDataDisplay label={label} paragraph={paragraph} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/EmptyStateDataDisplay',\n component: EmptyStateDataDisplay,\n parameters: {\n inspectComponent: EmptyStateDataDisplay,\n codeString: codeString,\n },\n} as Meta<EmptyStateDataDisplayProps>;\n\nconst Template: StoryFn<EmptyStateDataDisplayProps> = (args) => <EmptyStateDataDisplay {...args} />;\n\nexport const EmptyStateDataDisplayExample = Template.bind({});\nEmptyStateDataDisplayExample.args = {\n label: 'This is an example info empty state data display label',\n paragraph: 'This is an example info empty state data display paragraph',\n};\n"],"names":["codeString","EmptyStateDataDisplay_stories","EmptyStateDataDisplay","Template","args","jsx","EmptyStateDataDisplayExample"],"mappings":";;AAKA,MAAMA,IAAa,iEAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAgD,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAuB,GAAGE,EAAM,CAAA,GAEpFE,IAA+BH,EAAS,KAAK,EAAE;AAC5DG,EAA6B,OAAO;AAAA,EAClC,OAAO;AAAA,EACP,WAAW;AACb;"}
1
+ {"version":3,"file":"EmptyStateDataDisplay.stories.js","sources":["../../../src/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { EmptyStateDataDisplayProps } from './EmptyStateDataDisplay';\n\nimport { EmptyStateDataDisplay } from './EmptyStateDataDisplay';\n\nconst codeString = '<EmptyStateDataDisplay label={label} paragraph={paragraph} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/EmptyStateDataDisplay',\n component: EmptyStateDataDisplay,\n parameters: {\n inspectComponent: EmptyStateDataDisplay,\n codeString: codeString,\n },\n} as Meta<EmptyStateDataDisplayProps>;\n\nconst Template: StoryFn<EmptyStateDataDisplayProps> = (args) => <EmptyStateDataDisplay {...args} />;\n\nexport const EmptyStateDataDisplayExample = Template.bind({});\nEmptyStateDataDisplayExample.args = {\n label: 'This is an example info empty state data display label',\n paragraph: 'This is an example info empty state data display paragraph',\n};\n"],"names":["codeString","EmptyStateDataDisplay_stories","EmptyStateDataDisplay","Template","args","jsx","EmptyStateDataDisplayExample"],"mappings":";;AAKA,MAAMA,IAAa,iEAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAgD,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAuB,GAAGE,GAAM,GAEpFE,IAA+BH,EAAS,KAAK,CAAE,CAAA;AAC5DG,EAA6B,OAAO;AAAA,EAClC,OAAO;AAAA,EACP,WAAW;AACb;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FeedbackBox.stories.js","sources":["../../../src/components/FeedbackBox/FeedbackBox.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { FeedbackBoxProps } from './FeedbackBox';\n\nimport { FeedbackBox } from './FeedbackBox';\n\nimport { Container } from 'storyComponents/Container';\n\nconst codeString = '<FeedbackBox id={id} level={level} feedback={feedback} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/FeedbackBox',\n component: FeedbackBox,\n parameters: {\n inspectComponent: FeedbackBox,\n codeString,\n },\n} as Meta<FeedbackBoxProps>;\n\nconst Template: StoryFn<FeedbackBoxProps> = (args) => (\n <Container>\n <FeedbackBox {...args} />\n </Container>\n);\n\nexport const FeedbackBoxExample = Template.bind({});\nFeedbackBoxExample.args = {\n id: 'gba0d2d4',\n level: 'success',\n feedback: 'Example FeedbackBox text',\n};\n"],"names":["codeString","FeedbackBox_stories","FeedbackBox","Template","args","jsx","Container","FeedbackBoxExample"],"mappings":";;;AAOA,MAAMA,IAAa,6DAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAsC,CAACC,MAC3C,gBAAAC,EAACC,KACC,UAAC,gBAAAD,EAAAH,GAAA,EAAa,GAAGE,EAAM,CAAA,EACzB,CAAA,GAGWG,IAAqBJ,EAAS,KAAK,EAAE;AAClDI,EAAmB,OAAO;AAAA,EACxB,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,UAAU;AACZ;"}
1
+ {"version":3,"file":"FeedbackBox.stories.js","sources":["../../../src/components/FeedbackBox/FeedbackBox.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { FeedbackBoxProps } from './FeedbackBox';\n\nimport { FeedbackBox } from './FeedbackBox';\n\nimport { Container } from 'storyComponents/Container';\n\nconst codeString = '<FeedbackBox id={id} level={level} feedback={feedback} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/FeedbackBox',\n component: FeedbackBox,\n parameters: {\n inspectComponent: FeedbackBox,\n codeString,\n },\n} as Meta<FeedbackBoxProps>;\n\nconst Template: StoryFn<FeedbackBoxProps> = (args) => (\n <Container>\n <FeedbackBox {...args} />\n </Container>\n);\n\nexport const FeedbackBoxExample = Template.bind({});\nFeedbackBoxExample.args = {\n id: 'gba0d2d4',\n level: 'success',\n feedback: 'Example FeedbackBox text',\n};\n"],"names":["codeString","FeedbackBox_stories","FeedbackBox","Template","args","jsx","Container","FeedbackBoxExample"],"mappings":";;;AAOA,MAAMA,IAAa,6DAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAsC,CAACC,MAC3C,gBAAAC,EAACC,KACC,UAAC,gBAAAD,EAAAH,GAAA,EAAa,GAAGE,EAAA,CAAM,EACzB,CAAA,GAGWG,IAAqBJ,EAAS,KAAK,CAAE,CAAA;AAClDI,EAAmB,OAAO;AAAA,EACxB,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,UAAU;AACZ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FieldHint.js","sources":["../../../src/components/FieldHint/FieldHint.tsx"],"sourcesContent":["import styles from './FieldHint.module.css';\n\nimport { Spinner } from 'components/Spinner/Spinner';\n\nexport interface FieldHintProps {\n /** The value to display. */\n value?: string;\n /** The aria-valuetext value of the spinner component. */\n spinnerAriaValueText: string;\n /** true if the field hint is loading; otherwise, false. The default is false. */\n loading?: boolean;\n}\n\n/** Represents a component to show a hint for an input element. */\nexport function FieldHint({ value, spinnerAriaValueText, loading }: FieldHintProps) {\n return (\n <span className={styles['field-hint']}>\n {value && <>{value}</>}\n {!value && loading && <Spinner ariaValueText={spinnerAriaValueText} />}\n </span>\n );\n}\n"],"names":["FieldHint","value","spinnerAriaValueText","loading","jsxs","styles","jsx","Spinner"],"mappings":";;;;;AAcO,SAASA,EAAU,EAAE,OAAAC,GAAO,sBAAAC,GAAsB,SAAAC,KAA2B;AAClF,SACG,gBAAAC,EAAA,QAAA,EAAK,WAAWC,EAAO,YAAY,GACjC,UAAA;AAAA,IAAAJ,4BAAY,UAAMA,EAAA,CAAA;AAAA,IAClB,CAACA,KAASE,KAAY,gBAAAG,EAAAC,GAAA,EAAQ,eAAeL,GAAsB;AAAA,EACtE,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"FieldHint.js","sources":["../../../src/components/FieldHint/FieldHint.tsx"],"sourcesContent":["import styles from './FieldHint.module.css';\n\nimport { Spinner } from 'components/Spinner/Spinner';\n\nexport interface FieldHintProps {\n /** The value to display. */\n value?: string;\n /** The aria-valuetext value of the spinner component. */\n spinnerAriaValueText: string;\n /** true if the field hint is loading; otherwise, false. The default is false. */\n loading?: boolean;\n}\n\n/** Represents a component to show a hint for an input element. */\nexport function FieldHint({ value, spinnerAriaValueText, loading }: FieldHintProps) {\n return (\n <span className={styles['field-hint']}>\n {value && <>{value}</>}\n {!value && loading && <Spinner ariaValueText={spinnerAriaValueText} />}\n </span>\n );\n}\n"],"names":["FieldHint","value","spinnerAriaValueText","loading","jsxs","styles","jsx","Spinner"],"mappings":";;;;;AAcO,SAASA,EAAU,EAAE,OAAAC,GAAO,sBAAAC,GAAsB,SAAAC,KAA2B;AAClF,SACG,gBAAAC,EAAA,QAAA,EAAK,WAAWC,EAAO,YAAY,GACjC,UAAA;AAAA,IAAAJ,4BAAY,UAAMA,EAAA,CAAA;AAAA,IAClB,CAACA,KAASE,KAAY,gBAAAG,EAAAC,GAAA,EAAQ,eAAeL,EAAsB,CAAA;AAAA,EAAA,GACtE;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FieldHint.stories.js","sources":["../../../src/components/FieldHint/FieldHint.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { FieldHintProps } from './FieldHint';\n\nimport { FieldHint } from './FieldHint';\n\nconst codeString = '<FieldHint value={value} loading={loading} spinnerAriaValueText={spinnerAriaValueText} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/FieldHint',\n component: FieldHint,\n argTypes: {\n value: {\n control: 'text',\n },\n spinnerAriaValueText: {\n control: 'text',\n },\n },\n parameters: {\n inspectComponent: FieldHint,\n codeString: codeString,\n },\n} as Meta<FieldHintProps>;\n\nconst Template: StoryFn<FieldHintProps> = (args) => <FieldHint {...args} />;\n\nconst defaultArgs: Partial<FieldHintProps> = {\n spinnerAriaValueText: 'FieldHint Loading',\n};\n\nexport const FieldHintExample = Template.bind({});\nFieldHintExample.args = {\n value: 'This is a FieldHint',\n loading: false,\n ...defaultArgs,\n};\n\nexport const LoadingFieldHint = Template.bind({});\nLoadingFieldHint.args = {\n value: '',\n loading: true,\n ...defaultArgs,\n};\n"],"names":["codeString","FieldHint_stories","FieldHint","Template","args","jsx","defaultArgs","FieldHintExample","LoadingFieldHint"],"mappings":";;AAKA,MAAMA,IAAa,6FAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,sBAAsB;AAAA,MACpB,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAoC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAW,GAAGE,EAAM,CAAA,GAEnEE,IAAuC;AAAA,EAC3C,sBAAsB;AACxB,GAEaC,IAAmBJ,EAAS,KAAK,EAAE;AAChDI,EAAiB,OAAO;AAAA,EACtB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,GAAGD;AACL;AAEO,MAAME,IAAmBL,EAAS,KAAK,EAAE;AAChDK,EAAiB,OAAO;AAAA,EACtB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,GAAGF;AACL;"}
1
+ {"version":3,"file":"FieldHint.stories.js","sources":["../../../src/components/FieldHint/FieldHint.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { FieldHintProps } from './FieldHint';\n\nimport { FieldHint } from './FieldHint';\n\nconst codeString = '<FieldHint value={value} loading={loading} spinnerAriaValueText={spinnerAriaValueText} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/FieldHint',\n component: FieldHint,\n argTypes: {\n value: {\n control: 'text',\n },\n spinnerAriaValueText: {\n control: 'text',\n },\n },\n parameters: {\n inspectComponent: FieldHint,\n codeString: codeString,\n },\n} as Meta<FieldHintProps>;\n\nconst Template: StoryFn<FieldHintProps> = (args) => <FieldHint {...args} />;\n\nconst defaultArgs: Partial<FieldHintProps> = {\n spinnerAriaValueText: 'FieldHint Loading',\n};\n\nexport const FieldHintExample = Template.bind({});\nFieldHintExample.args = {\n value: 'This is a FieldHint',\n loading: false,\n ...defaultArgs,\n};\n\nexport const LoadingFieldHint = Template.bind({});\nLoadingFieldHint.args = {\n value: '',\n loading: true,\n ...defaultArgs,\n};\n"],"names":["codeString","FieldHint_stories","FieldHint","Template","args","jsx","defaultArgs","FieldHintExample","LoadingFieldHint"],"mappings":";;AAKA,MAAMA,IAAa,6FAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,sBAAsB;AAAA,MACpB,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAoC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAW,GAAGE,GAAM,GAEnEE,IAAuC;AAAA,EAC3C,sBAAsB;AACxB,GAEaC,IAAmBJ,EAAS,KAAK,CAAE,CAAA;AAChDI,EAAiB,OAAO;AAAA,EACtB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,GAAGD;AACL;AAEO,MAAME,IAAmBL,EAAS,KAAK,CAAE,CAAA;AAChDK,EAAiB,OAAO;AAAA,EACtB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,GAAGF;AACL;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Fieldset.stories.js","sources":["../../../src/components/Fieldset/Fieldset.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { PropsWithChildren } from 'react';\nimport type { FieldsetProps } from './Fieldset';\n\nimport { Fieldset } from './Fieldset';\n\nimport { InputField } from 'components/InputField';\nimport { Label } from 'components/Label';\nimport { Container } from 'storyComponents/Container';\nimport { FormField } from 'components/FormField';\n\nconst codeString = '<Fieldset legend={legend} description={description}>{children}</Fieldset>';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Fieldset',\n component: Fieldset,\n argTypes: {\n descriptionId: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: Fieldset,\n codeString: codeString,\n },\n} as Meta<PropsWithChildren<FieldsetProps>>;\n\nconst Template: StoryFn<PropsWithChildren<FieldsetProps>> = (args) => (\n <Container size=\"large\">\n <Fieldset {...args}>\n <FormField>\n <Label htmlFor=\"d6aa53fd\">Example label 1</Label>\n <InputField id=\"d6aa53fd\" />\n </FormField>\n <FormField>\n <Label htmlFor=\"4e7a2f22\">Example label 2</Label>\n <InputField id=\"4e7a2f22\" />\n </FormField>\n </Fieldset>\n </Container>\n);\n\nconst defaultArgs: Partial<PropsWithChildren<FieldsetProps>> = {\n legend: 'Fieldset example',\n inline: false,\n};\n\nexport const FieldsetExample = Template.bind({});\nFieldsetExample.args = {\n ...defaultArgs,\n};\n\nexport const WithDescriptionExample = Template.bind({});\nWithDescriptionExample.args = {\n ...defaultArgs,\n description: 'A Fieldset groups several controls as well as labels',\n};\n"],"names":["codeString","Fieldset_stories","Fieldset","Template","args","jsx","Container","jsxs","FormField","Label","InputField","defaultArgs","FieldsetExample","WithDescriptionExample"],"mappings":";;;;;;AAWA,MAAMA,IAAa,6EAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,eAAe;AAAA,MACb,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAsD,CAACC,MAC1D,gBAAAC,EAAAC,GAAA,EAAU,MAAK,SACd,UAAA,gBAAAC,EAACL,GAAU,EAAA,GAAGE,GACZ,UAAA;AAAA,EAAA,gBAAAG,EAACC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAH,EAAAI,GAAA,EAAM,SAAQ,YAAW,UAAe,mBAAA;AAAA,IACzC,gBAAAJ,EAACK,GAAW,EAAA,IAAG,WAAW,CAAA;AAAA,EAAA,GAC5B;AAAA,oBACCF,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAH,EAAAI,GAAA,EAAM,SAAQ,YAAW,UAAe,mBAAA;AAAA,IACzC,gBAAAJ,EAACK,GAAW,EAAA,IAAG,WAAW,CAAA;AAAA,EAAA,GAC5B;AAAA,EACF,CAAA,EACF,CAAA,GAGIC,IAAyD;AAAA,EAC7D,QAAQ;AAAA,EACR,QAAQ;AACV,GAEaC,IAAkBT,EAAS,KAAK,EAAE;AAC/CS,EAAgB,OAAO;AAAA,EACrB,GAAGD;AACL;AAEO,MAAME,IAAyBV,EAAS,KAAK,EAAE;AACtDU,EAAuB,OAAO;AAAA,EAC5B,GAAGF;AAAA,EACH,aAAa;AACf;"}
1
+ {"version":3,"file":"Fieldset.stories.js","sources":["../../../src/components/Fieldset/Fieldset.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { PropsWithChildren } from 'react';\nimport type { FieldsetProps } from './Fieldset';\n\nimport { Fieldset } from './Fieldset';\n\nimport { InputField } from 'components/InputField';\nimport { Label } from 'components/Label';\nimport { Container } from 'storyComponents/Container';\nimport { FormField } from 'components/FormField';\n\nconst codeString = '<Fieldset legend={legend} description={description}>{children}</Fieldset>';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Fieldset',\n component: Fieldset,\n argTypes: {\n descriptionId: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: Fieldset,\n codeString: codeString,\n },\n} as Meta<PropsWithChildren<FieldsetProps>>;\n\nconst Template: StoryFn<PropsWithChildren<FieldsetProps>> = (args) => (\n <Container size=\"large\">\n <Fieldset {...args}>\n <FormField>\n <Label htmlFor=\"d6aa53fd\">Example label 1</Label>\n <InputField id=\"d6aa53fd\" />\n </FormField>\n <FormField>\n <Label htmlFor=\"4e7a2f22\">Example label 2</Label>\n <InputField id=\"4e7a2f22\" />\n </FormField>\n </Fieldset>\n </Container>\n);\n\nconst defaultArgs: Partial<PropsWithChildren<FieldsetProps>> = {\n legend: 'Fieldset example',\n inline: false,\n};\n\nexport const FieldsetExample = Template.bind({});\nFieldsetExample.args = {\n ...defaultArgs,\n};\n\nexport const WithDescriptionExample = Template.bind({});\nWithDescriptionExample.args = {\n ...defaultArgs,\n description: 'A Fieldset groups several controls as well as labels',\n};\n"],"names":["codeString","Fieldset_stories","Fieldset","Template","args","jsx","Container","jsxs","FormField","Label","InputField","defaultArgs","FieldsetExample","WithDescriptionExample"],"mappings":";;;;;;AAWA,MAAMA,IAAa,6EAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,eAAe;AAAA,MACb,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EAEJ;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAsD,CAACC,MAC1D,gBAAAC,EAAAC,GAAA,EAAU,MAAK,SACd,UAAA,gBAAAC,EAACL,GAAU,EAAA,GAAGE,GACZ,UAAA;AAAA,EAAA,gBAAAG,EAACC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAH,EAAAI,GAAA,EAAM,SAAQ,YAAW,UAAe,mBAAA;AAAA,IACzC,gBAAAJ,EAACK,GAAW,EAAA,IAAG,WAAW,CAAA;AAAA,EAAA,GAC5B;AAAA,oBACCF,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAH,EAAAI,GAAA,EAAM,SAAQ,YAAW,UAAe,mBAAA;AAAA,IACzC,gBAAAJ,EAACK,GAAW,EAAA,IAAG,WAAW,CAAA;AAAA,EAAA,EAC5B,CAAA;AAAA,EAAA,CACF,EACF,CAAA,GAGIC,IAAyD;AAAA,EAC7D,QAAQ;AAAA,EACR,QAAQ;AACV,GAEaC,IAAkBT,EAAS,KAAK,CAAE,CAAA;AAC/CS,EAAgB,OAAO;AAAA,EACrB,GAAGD;AACL;AAEO,MAAME,IAAyBV,EAAS,KAAK,CAAE,CAAA;AACtDU,EAAuB,OAAO;AAAA,EAC5B,GAAGF;AAAA,EACH,aAAa;AACf;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.stories.js","sources":["../../../src/components/FormField/FormField.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { PropsWithChildren } from 'react';\nimport type { FormFieldProps } from './FormField';\n\nimport { FormField } from './FormField';\n\nimport { InputField } from 'components/InputField';\nimport { Label } from 'components/Label';\nimport { Container } from 'storyComponents/Container';\n\nconst codeString = '<FormField>{children}</FormField>';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/FormField',\n component: FormField,\n argTypes: {\n outerSpace: {\n control: 'boolean',\n },\n inline: {\n control: 'boolean',\n },\n },\n parameters: {\n inspectComponent: FormField,\n codeString: codeString,\n },\n} as Meta<PropsWithChildren<FormFieldProps>>;\n\nconst Template: StoryFn<PropsWithChildren<FormFieldProps>> = (args) => (\n <Container>\n <FormField {...args}>\n <Label htmlFor=\"d6aa53fd\">Example label 1</Label>\n <InputField id=\"d6aa53fd\" />\n </FormField>\n <FormField {...args}>\n <Label htmlFor=\"4e7a2f22\">Example label 2</Label>\n <InputField id=\"4e7a2f22\" />\n </FormField>\n </Container>\n);\n\nconst defaultArgs: Partial<PropsWithChildren<FormFieldProps>> = {\n outerSpace: false,\n inline: false,\n};\n\nexport const FormFieldExample = Template.bind({});\nFormFieldExample.args = {\n ...defaultArgs,\n};\n"],"names":["codeString","FormField_stories","FormField","Template","args","jsxs","Container","jsx","Label","InputField","defaultArgs","FormFieldExample"],"mappings":";;;;;AAUA,MAAMA,IAAa,qCAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,YAAY;AAAA,MACV,SAAS;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAuD,CAACC,MAC5D,gBAAAC,EAACC,GACC,EAAA,UAAA;AAAA,EAAC,gBAAAD,EAAAH,GAAA,EAAW,GAAGE,GACb,UAAA;AAAA,IAAC,gBAAAG,EAAAC,GAAA,EAAM,SAAQ,YAAW,UAAe,mBAAA;AAAA,IACzC,gBAAAD,EAACE,GAAW,EAAA,IAAG,WAAW,CAAA;AAAA,EAAA,GAC5B;AAAA,EACA,gBAAAJ,EAACH,GAAW,EAAA,GAAGE,GACb,UAAA;AAAA,IAAC,gBAAAG,EAAAC,GAAA,EAAM,SAAQ,YAAW,UAAe,mBAAA;AAAA,IACzC,gBAAAD,EAACE,GAAW,EAAA,IAAG,WAAW,CAAA;AAAA,EAAA,GAC5B;AAAA,EACF,CAAA,GAGIC,IAA0D;AAAA,EAC9D,YAAY;AAAA,EACZ,QAAQ;AACV,GAEaC,IAAmBR,EAAS,KAAK,EAAE;AAChDQ,EAAiB,OAAO;AAAA,EACtB,GAAGD;AACL;"}
1
+ {"version":3,"file":"FormField.stories.js","sources":["../../../src/components/FormField/FormField.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { PropsWithChildren } from 'react';\nimport type { FormFieldProps } from './FormField';\n\nimport { FormField } from './FormField';\n\nimport { InputField } from 'components/InputField';\nimport { Label } from 'components/Label';\nimport { Container } from 'storyComponents/Container';\n\nconst codeString = '<FormField>{children}</FormField>';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/FormField',\n component: FormField,\n argTypes: {\n outerSpace: {\n control: 'boolean',\n },\n inline: {\n control: 'boolean',\n },\n },\n parameters: {\n inspectComponent: FormField,\n codeString: codeString,\n },\n} as Meta<PropsWithChildren<FormFieldProps>>;\n\nconst Template: StoryFn<PropsWithChildren<FormFieldProps>> = (args) => (\n <Container>\n <FormField {...args}>\n <Label htmlFor=\"d6aa53fd\">Example label 1</Label>\n <InputField id=\"d6aa53fd\" />\n </FormField>\n <FormField {...args}>\n <Label htmlFor=\"4e7a2f22\">Example label 2</Label>\n <InputField id=\"4e7a2f22\" />\n </FormField>\n </Container>\n);\n\nconst defaultArgs: Partial<PropsWithChildren<FormFieldProps>> = {\n outerSpace: false,\n inline: false,\n};\n\nexport const FormFieldExample = Template.bind({});\nFormFieldExample.args = {\n ...defaultArgs,\n};\n"],"names":["codeString","FormField_stories","FormField","Template","args","jsxs","Container","jsx","Label","InputField","defaultArgs","FormFieldExample"],"mappings":";;;;;AAUA,MAAMA,IAAa,qCAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,YAAY;AAAA,MACV,SAAS;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAuD,CAACC,MAC5D,gBAAAC,EAACC,GACC,EAAA,UAAA;AAAA,EAAC,gBAAAD,EAAAH,GAAA,EAAW,GAAGE,GACb,UAAA;AAAA,IAAC,gBAAAG,EAAAC,GAAA,EAAM,SAAQ,YAAW,UAAe,mBAAA;AAAA,IACzC,gBAAAD,EAACE,GAAW,EAAA,IAAG,WAAW,CAAA;AAAA,EAAA,GAC5B;AAAA,EACA,gBAAAJ,EAACH,GAAW,EAAA,GAAGE,GACb,UAAA;AAAA,IAAC,gBAAAG,EAAAC,GAAA,EAAM,SAAQ,YAAW,UAAe,mBAAA;AAAA,IACzC,gBAAAD,EAACE,GAAW,EAAA,IAAG,WAAW,CAAA;AAAA,EAAA,EAC5B,CAAA;AAAA,GACF,GAGIC,IAA0D;AAAA,EAC9D,YAAY;AAAA,EACZ,QAAQ;AACV,GAEaC,IAAmBR,EAAS,KAAK,CAAE,CAAA;AAChDQ,EAAiB,OAAO;AAAA,EACtB,GAAGD;AACL;"}
@@ -13,5 +13,7 @@ export interface FormInputProps {
13
13
  notValidatedText?: string;
14
14
  /** Returns array of selected values as number */
15
15
  onChange: (value: string) => void;
16
+ /** Determines if the container wrapper is rendered. */
17
+ noContainer?: boolean;
16
18
  }
17
- export declare const FormInput: ({ id, label, labelPosition, type, required, notValidatedText, onChange, }: FormInputProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const FormInput: ({ id, label, labelPosition, type, required, notValidatedText, onChange, noContainer, }: FormInputProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,21 +1,20 @@
1
- import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
- import { c as l } from "../../clsx-OuTLNxxd.js";
1
+ import { jsxs as l, Fragment as b, jsx as e } from "react/jsx-runtime";
2
+ import { c } from "../../clsx-OuTLNxxd.js";
3
3
  import "react";
4
4
  import "../Buttons/Button.js";
5
5
  import "../Buttons/LinkButton.js";
6
6
  import "@react-aria/button";
7
- import { Label as s } from "../Label/Label.js";
7
+ import { Label as h } from "../Label/Label.js";
8
8
  import "@react-aria/dialog";
9
9
  import "@react-aria/focus";
10
10
  import "@react-aria/overlays";
11
11
  import "../OverlayCloseButton/OverlayCloseButton.js";
12
- import { FeedbackBox as u } from "../FeedbackBox/FeedbackBox.js";
12
+ import { FeedbackBox as j } from "../FeedbackBox/FeedbackBox.js";
13
13
  import "../GridRow/GridRow.js";
14
14
  import "../IconButton/IconButton.js";
15
15
  import "../Input/Input.js";
16
16
  import "../InputField/InputField.js";
17
- import "react-router-dom";
18
- import "../../TablePlugin-BbiBRjod.js";
17
+ import "../../TablePlugin-ByeOn0Zf.js";
19
18
  import "../RteEditor/Providers/LanguageProvider.js";
20
19
  import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
21
20
  import "../RteEditor/hooks/components/Flyout.js";
@@ -32,38 +31,39 @@ import '../../assets/FormInput.css';const r = {
32
31
  "form-field__input-container": "_form-field__input-container_c9jem_34",
33
32
  "form-field__input": "_form-field__input_c9jem_25",
34
33
  "form-field__input--error": "_form-field__input--error_c9jem_60"
35
- }, O = ({
34
+ }, P = ({
36
35
  id: t,
37
- label: m,
36
+ label: n,
38
37
  labelPosition: p = "top",
39
- type: _ = "text",
40
- required: c = !1,
38
+ type: m = "text",
39
+ required: a = !1,
41
40
  notValidatedText: i = "",
42
- onChange: n
41
+ onChange: _,
42
+ noContainer: d = !1
43
43
  }) => {
44
- const a = (e) => ["e", "E", "+", "-"].includes(e.key) && e.preventDefault(), d = (e) => {
45
- typeof n == "function" && n(e.target.value);
46
- };
47
- return /* @__PURE__ */ f("div", { className: l(r["form-field__container"], r[`form-field__container--label-${p}`]), children: [
48
- m && /* @__PURE__ */ o(s, { htmlFor: t, required: c, children: m }),
49
- /* @__PURE__ */ f("div", { className: r["form-field__input-feedback-container"], children: [
50
- /* @__PURE__ */ o("div", { className: r["form-field__input-container"], children: /* @__PURE__ */ o(
44
+ const s = (o) => ["e", "E", "+", "-"].includes(o.key) && o.preventDefault(), u = (o) => {
45
+ typeof _ == "function" && _(o.target.value);
46
+ }, f = /* @__PURE__ */ l(b, { children: [
47
+ n && /* @__PURE__ */ e(h, { htmlFor: t, required: a, alignRight: !0, children: n }),
48
+ /* @__PURE__ */ l("div", { className: r["form-field__input-feedback-container"], children: [
49
+ /* @__PURE__ */ e("div", { className: r["form-field__input-container"], children: /* @__PURE__ */ e(
51
50
  "input",
52
51
  {
53
52
  id: t,
54
- type: _,
55
- ..._ === "number" && { onKeyDown: a },
56
- onChange: d,
57
- className: l(r["form-field__input"], [
53
+ type: m,
54
+ ...m === "number" && { onKeyDown: s },
55
+ onChange: u,
56
+ className: c(r["form-field__input"], [
58
57
  i !== "" && r["form-field__input--error"]
59
58
  ])
60
59
  }
61
60
  ) }),
62
- i !== "" && /* @__PURE__ */ o(u, { level: "error", feedback: i })
61
+ i !== "" && /* @__PURE__ */ e(j, { level: "error", feedback: i })
63
62
  ] })
64
63
  ] });
64
+ return d ? f : /* @__PURE__ */ e("div", { className: c(r["form-field__container"], r[`form-field__container--label-${p}`]), children: f });
65
65
  };
66
66
  export {
67
- O as FormInput
67
+ P as FormInput
68
68
  };
69
69
  //# sourceMappingURL=FormInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormInput.js","sources":["../../../src/components/FormInput/FormInput.tsx"],"sourcesContent":["import clsx from 'clsx';\n\nimport styles from './FormInput.module.css';\n\nimport { FeedbackBox, Label } from 'components';\n\nexport interface FormInputProps {\n /** The id of the input element. */\n id: string;\n /** label text if empthy the label is not renderd */\n label: string;\n /** label position `top` or `left`. The default is `top`. */\n labelPosition?: 'top' | 'left';\n /** The type of the input element. */\n type?: 'text' | 'password' | 'email' | 'number';\n /** Shows red * */\n required?: boolean;\n /** error text to display if set */\n notValidatedText?: string;\n /** Returns array of selected values as number */\n onChange: (value: string) => void;\n}\n\nexport const FormInput = ({\n id,\n label,\n labelPosition = 'top',\n type = 'text',\n required = false,\n notValidatedText = '',\n onChange,\n}: FormInputProps) => {\n const blockInvalidChar = (event: React.KeyboardEvent<HTMLInputElement>) =>\n ['e', 'E', '+', '-'].includes(event.key) && event.preventDefault();\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (typeof onChange === 'function') {\n onChange(event.target.value);\n }\n };\n\n return (\n <div className={clsx(styles['form-field__container'], styles[`form-field__container--label-${labelPosition}`])}>\n {label && (\n <Label htmlFor={id} required={required}>\n {label}\n </Label>\n )}\n\n <div className={styles['form-field__input-feedback-container']}>\n <div className={styles['form-field__input-container']}>\n <input\n id={id}\n type={type}\n {...(type === 'number' && { onKeyDown: blockInvalidChar })}\n onChange={handleChange}\n className={clsx(styles['form-field__input'], [\n notValidatedText !== '' && styles['form-field__input--error'],\n ])}\n />\n </div>\n {notValidatedText !== '' && <FeedbackBox level=\"error\" feedback={notValidatedText} />}\n </div>\n </div>\n );\n};\n"],"names":["FormInput","id","label","labelPosition","type","required","notValidatedText","onChange","blockInvalidChar","event","handleChange","jsxs","clsx","styles","jsx","Label","FeedbackBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuBaA,IAAY,CAAC;AAAA,EACxB,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,kBAAAC,IAAmB;AAAA,EACnB,UAAAC;AACF,MAAsB;AACpB,QAAMC,IAAmB,CAACC,MACxB,CAAC,KAAK,KAAK,KAAK,GAAG,EAAE,SAASA,EAAM,GAAG,KAAKA,EAAM,eAAe,GAE7DC,IAAe,CAACD,MAA+C;AAC/D,IAAA,OAAOF,KAAa,cACbA,EAAAE,EAAM,OAAO,KAAK;AAAA,EAC7B;AAGF,SACG,gBAAAE,EAAA,OAAA,EAAI,WAAWC,EAAKC,EAAO,uBAAuB,GAAGA,EAAO,gCAAgCV,CAAa,EAAE,CAAC,GAC1G,UAAA;AAAA,IAAAD,KACE,gBAAAY,EAAAC,GAAA,EAAM,SAASd,GAAI,UAAAI,GACjB,UACHH,GAAA;AAAA,IAGD,gBAAAS,EAAA,OAAA,EAAI,WAAWE,EAAO,sCAAsC,GAC3D,UAAA;AAAA,MAAA,gBAAAC,EAAC,OAAI,EAAA,WAAWD,EAAO,6BAA6B,GAClD,UAAA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAAb;AAAA,UACA,MAAAG;AAAA,UACC,GAAIA,MAAS,YAAY,EAAE,WAAWI,EAAiB;AAAA,UACxD,UAAUE;AAAA,UACV,WAAWE,EAAKC,EAAO,mBAAmB,GAAG;AAAA,YAC3CP,MAAqB,MAAMO,EAAO,0BAA0B;AAAA,UAAA,CAC7D;AAAA,QAAA;AAAA,MAAA,GAEL;AAAA,MACCP,MAAqB,MAAM,gBAAAQ,EAACE,KAAY,OAAM,SAAQ,UAAUV,GAAkB;AAAA,IAAA,GACrF;AAAA,EACF,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"FormInput.js","sources":["../../../src/components/FormInput/FormInput.tsx"],"sourcesContent":["import clsx from 'clsx';\n\nimport styles from './FormInput.module.css';\n\nimport { FeedbackBox, Label } from 'components';\n\nexport interface FormInputProps {\n /** The id of the input element. */\n id: string;\n /** label text if empthy the label is not renderd */\n label: string;\n /** label position `top` or `left`. The default is `top`. */\n labelPosition?: 'top' | 'left';\n /** The type of the input element. */\n type?: 'text' | 'password' | 'email' | 'number';\n /** Shows red * */\n required?: boolean;\n /** error text to display if set */\n notValidatedText?: string;\n /** Returns array of selected values as number */\n onChange: (value: string) => void;\n /** Determines if the container wrapper is rendered. */\n noContainer?: boolean;\n}\n\nexport const FormInput = ({\n id,\n label,\n labelPosition = 'top',\n type = 'text',\n required = false,\n notValidatedText = '',\n onChange,\n noContainer = false,\n}: FormInputProps) => {\n const blockInvalidChar = (event: React.KeyboardEvent<HTMLInputElement>) =>\n ['e', 'E', '+', '-'].includes(event.key) && event.preventDefault();\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (typeof onChange === 'function') {\n onChange(event.target.value);\n }\n };\n\n const componentContent = (\n <>\n {label && (\n <Label htmlFor={id} required={required} alignRight>\n {label}\n </Label>\n )}\n\n <div className={styles['form-field__input-feedback-container']}>\n <div className={styles['form-field__input-container']}>\n <input\n id={id}\n type={type}\n {...(type === 'number' && { onKeyDown: blockInvalidChar })}\n onChange={handleChange}\n className={clsx(styles['form-field__input'], [\n notValidatedText !== '' && styles['form-field__input--error'],\n ])}\n />\n </div>\n {notValidatedText !== '' && <FeedbackBox level=\"error\" feedback={notValidatedText} />}\n </div>\n </>\n );\n\n return noContainer ? (\n componentContent\n ) : (\n <div className={clsx(styles['form-field__container'], styles[`form-field__container--label-${labelPosition}`])}>\n {componentContent}\n </div>\n );\n};\n"],"names":["FormInput","id","label","labelPosition","type","required","notValidatedText","onChange","noContainer","blockInvalidChar","event","handleChange","componentContent","jsxs","Fragment","Label","styles","jsx","clsx","FeedbackBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyBaA,IAAY,CAAC;AAAA,EACxB,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,kBAAAC,IAAmB;AAAA,EACnB,UAAAC;AAAA,EACA,aAAAC,IAAc;AAChB,MAAsB;AACpB,QAAMC,IAAmB,CAACC,MACxB,CAAC,KAAK,KAAK,KAAK,GAAG,EAAE,SAASA,EAAM,GAAG,KAAKA,EAAM,eAAe,GAE7DC,IAAe,CAACD,MAA+C;AAC/D,IAAA,OAAOH,KAAa,cACbA,EAAAG,EAAM,OAAO,KAAK;AAAA,EAE/B,GAEME,IAED,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAAZ,uBACEa,GAAM,EAAA,SAASd,GAAI,UAAAI,GAAoB,YAAU,IAC/C,UACHH,EAAA,CAAA;AAAA,IAGD,gBAAAW,EAAA,OAAA,EAAI,WAAWG,EAAO,sCAAsC,GAC3D,UAAA;AAAA,MAAA,gBAAAC,EAAC,OAAI,EAAA,WAAWD,EAAO,6BAA6B,GAClD,UAAA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAAhB;AAAA,UACA,MAAAG;AAAA,UACC,GAAIA,MAAS,YAAY,EAAE,WAAWK,EAAiB;AAAA,UACxD,UAAUE;AAAA,UACV,WAAWO,EAAKF,EAAO,mBAAmB,GAAG;AAAA,YAC3CV,MAAqB,MAAMU,EAAO,0BAA0B;AAAA,UAC7D,CAAA;AAAA,QAAA;AAAA,MAAA,GAEL;AAAA,MACCV,MAAqB,MAAM,gBAAAW,EAACE,KAAY,OAAM,SAAQ,UAAUb,EAAkB,CAAA;AAAA,IAAA,EACrF,CAAA;AAAA,EAAA,GACF;AAGF,SAAOE,IACLI,IAEC,gBAAAK,EAAA,OAAA,EAAI,WAAWC,EAAKF,EAAO,uBAAuB,GAAGA,EAAO,gCAAgCb,CAAa,EAAE,CAAC,GAC1G,UACHS,GAAA;AAEJ;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { fn as a } from "../../index-DQyNeMuh.js";
2
+ import { fn as a } from "../../index-DWzkl4aY.js";
3
3
  import { FormInput as t } from "./FormInput.js";
4
4
  const o = `
5
5
  // Has all HTMLInputElement props available except "className" and "style"
@@ -1 +1 @@
1
- {"version":3,"file":"FormInput.stories.js","sources":["../../../src/components/FormInput/FormInput.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { FormInputProps } from './FormInput';\n\nimport { FormInput } from './FormInput';\n\nconst codeString = `\n// Has all HTMLInputElement props available except \"className\" and \"style\" \n<FormInput />\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/FormInput',\n component: FormInput,\n argTypes: {},\n args: {},\n parameters: {\n inspectComponent: FormInput,\n codeString: codeString,\n },\n} as Meta<FormInputProps>;\n\nconst Template: StoryFn<FormInputProps> = (args) => {\n return <FormInput {...args} />;\n};\n\nexport const FromInputExample = Template.bind({});\n\nFromInputExample.args = {\n id: 'vak',\n label: 'Vaknaam (NL)',\n labelPosition: 'left',\n required: true,\n onChange: fn(),\n};\n"],"names":["codeString","FormInput_stories","FormInput","Template","args","jsx","FromInputExample","fn"],"mappings":";;;AAOA,MAAMA,IAAa;AAAA;AAAA;AAAA,GAMJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU,CAAC;AAAA,EACX,MAAM,CAAC;AAAA,EACP,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAoC,CAACC,MAClC,gBAAAC,EAACH,GAAW,EAAA,GAAGE,EAAM,CAAA,GAGjBE,IAAmBH,EAAS,KAAK,EAAE;AAEhDG,EAAiB,OAAO;AAAA,EACtB,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAU;AAAA,EACV,UAAUC,EAAG;AACf;"}
1
+ {"version":3,"file":"FormInput.stories.js","sources":["../../../src/components/FormInput/FormInput.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { FormInputProps } from './FormInput';\n\nimport { FormInput } from './FormInput';\n\nconst codeString = `\n// Has all HTMLInputElement props available except \"className\" and \"style\" \n<FormInput />\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/FormInput',\n component: FormInput,\n argTypes: {},\n args: {},\n parameters: {\n inspectComponent: FormInput,\n codeString: codeString,\n },\n} as Meta<FormInputProps>;\n\nconst Template: StoryFn<FormInputProps> = (args) => {\n return <FormInput {...args} />;\n};\n\nexport const FromInputExample = Template.bind({});\n\nFromInputExample.args = {\n id: 'vak',\n label: 'Vaknaam (NL)',\n labelPosition: 'left',\n required: true,\n onChange: fn(),\n};\n"],"names":["codeString","FormInput_stories","FormInput","Template","args","jsx","FromInputExample","fn"],"mappings":";;;AAOA,MAAMA,IAAa;AAAA;AAAA;AAAA,GAMJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU,CAAC;AAAA,EACX,MAAM,CAAC;AAAA,EACP,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAoC,CAACC,MAClC,gBAAAC,EAACH,GAAW,EAAA,GAAGE,EAAM,CAAA,GAGjBE,IAAmBH,EAAS,KAAK,CAAE,CAAA;AAEhDG,EAAiB,OAAO;AAAA,EACtB,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAU;AAAA,EACV,UAAUC,EAAG;AACf;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GridRow.js","sources":["../../../src/components/GridRow/GridRow.tsx"],"sourcesContent":["import clsx from 'clsx';\n\nimport type { CSSProperties, PropsWithChildren } from 'react';\n\nimport { Column } from './Column';\nimport styles from './GridRow.module.css';\n\ntype spacing = '0' | '025' | '050' | '075' | '100' | '125' | '150' | '175' | '200' | '250' | '300' | '350';\nexport interface GridRowProps {\n /** The horizontal padding between columns. */\n gutter?: spacing;\n /** The vertical padding (at the bottom) between rows. */\n marginBottom?: spacing;\n /** The vertical padding (at the top) between rows. */\n marginTop?: spacing;\n}\n\nconst gapStyles = {\n '0': { '--grid-gap': '0.25rem' },\n '025': { '--grid-gap': '0.25rem' },\n '050': { '--grid-gap': '0.5rem' },\n '075': { '--grid-gap': '0.75rem' },\n '100': { '--grid-gap': '1rem' },\n '125': { '--grid-gap': '1.25rem' },\n '150': { '--grid-gap': '1.5rem' },\n '175': { '--grid-gap': '1.75rem' },\n '200': { '--grid-gap': '2rem' },\n '250': { '--grid-gap': '2.5rem' },\n '300': { '--grid-gap': '3rem' },\n '350': { '--grid-gap': '3.5rem' },\n};\n\n/** Represents a component for a grid. */\nexport const GridRow = ({\n gutter = '200',\n marginBottom = '0',\n marginTop = '0',\n children,\n}: PropsWithChildren<GridRowProps>) => {\n return (\n <div\n className={clsx(\n styles['page-grid__row'],\n marginBottom && styles[`page-grid__row-mb-${marginBottom}`],\n marginTop && styles[`page-grid__row-mt-${marginTop}`]\n )}\n style={gutter && (gapStyles[gutter] as CSSProperties)}\n >\n {children}\n </div>\n );\n};\n\nGridRow.Column = Column;\n"],"names":["gapStyles","GridRow","gutter","marginBottom","marginTop","children","jsx","clsx","styles","Column"],"mappings":";;;AAiBA,MAAMA,IAAY;AAAA,EAChB,GAAK,EAAE,cAAc,UAAU;AAAA,EAC/B,OAAO,EAAE,cAAc,UAAU;AAAA,EACjC,OAAO,EAAE,cAAc,SAAS;AAAA,EAChC,OAAO,EAAE,cAAc,UAAU;AAAA,EACjC,KAAO,EAAE,cAAc,OAAO;AAAA,EAC9B,KAAO,EAAE,cAAc,UAAU;AAAA,EACjC,KAAO,EAAE,cAAc,SAAS;AAAA,EAChC,KAAO,EAAE,cAAc,UAAU;AAAA,EACjC,KAAO,EAAE,cAAc,OAAO;AAAA,EAC9B,KAAO,EAAE,cAAc,SAAS;AAAA,EAChC,KAAO,EAAE,cAAc,OAAO;AAAA,EAC9B,KAAO,EAAE,cAAc,SAAS;AAClC,GAGaC,IAAU,CAAC;AAAA,EACtB,QAAAC,IAAS;AAAA,EACT,cAAAC,IAAe;AAAA,EACf,WAAAC,IAAY;AAAA,EACZ,UAAAC;AACF,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACTC,EAAO,gBAAgB;AAAA,MACvBL,KAAgBK,EAAO,qBAAqBL,CAAY,EAAE;AAAA,MAC1DC,KAAaI,EAAO,qBAAqBJ,CAAS,EAAE;AAAA,IACtD;AAAA,IACA,OAAOF,KAAWF,EAAUE,CAAM;AAAA,IAEjC,UAAAG;AAAA,EAAA;AAAA;AAKPJ,EAAQ,SAASQ;"}
1
+ {"version":3,"file":"GridRow.js","sources":["../../../src/components/GridRow/GridRow.tsx"],"sourcesContent":["import clsx from 'clsx';\n\nimport type { CSSProperties, PropsWithChildren } from 'react';\n\nimport { Column } from './Column';\nimport styles from './GridRow.module.css';\n\ntype spacing = '0' | '025' | '050' | '075' | '100' | '125' | '150' | '175' | '200' | '250' | '300' | '350';\nexport interface GridRowProps {\n /** The horizontal padding between columns. */\n gutter?: spacing;\n /** The vertical padding (at the bottom) between rows. */\n marginBottom?: spacing;\n /** The vertical padding (at the top) between rows. */\n marginTop?: spacing;\n}\n\nconst gapStyles = {\n '0': { '--grid-gap': '0.25rem' },\n '025': { '--grid-gap': '0.25rem' },\n '050': { '--grid-gap': '0.5rem' },\n '075': { '--grid-gap': '0.75rem' },\n '100': { '--grid-gap': '1rem' },\n '125': { '--grid-gap': '1.25rem' },\n '150': { '--grid-gap': '1.5rem' },\n '175': { '--grid-gap': '1.75rem' },\n '200': { '--grid-gap': '2rem' },\n '250': { '--grid-gap': '2.5rem' },\n '300': { '--grid-gap': '3rem' },\n '350': { '--grid-gap': '3.5rem' },\n};\n\n/** Represents a component for a grid. */\nexport const GridRow = ({\n gutter = '200',\n marginBottom = '0',\n marginTop = '0',\n children,\n}: PropsWithChildren<GridRowProps>) => {\n return (\n <div\n className={clsx(\n styles['page-grid__row'],\n marginBottom && styles[`page-grid__row-mb-${marginBottom}`],\n marginTop && styles[`page-grid__row-mt-${marginTop}`]\n )}\n style={gutter && (gapStyles[gutter] as CSSProperties)}\n >\n {children}\n </div>\n );\n};\n\nGridRow.Column = Column;\n"],"names":["gapStyles","GridRow","gutter","marginBottom","marginTop","children","jsx","clsx","styles","Column"],"mappings":";;;AAiBA,MAAMA,IAAY;AAAA,EAChB,GAAK,EAAE,cAAc,UAAU;AAAA,EAC/B,OAAO,EAAE,cAAc,UAAU;AAAA,EACjC,OAAO,EAAE,cAAc,SAAS;AAAA,EAChC,OAAO,EAAE,cAAc,UAAU;AAAA,EACjC,KAAO,EAAE,cAAc,OAAO;AAAA,EAC9B,KAAO,EAAE,cAAc,UAAU;AAAA,EACjC,KAAO,EAAE,cAAc,SAAS;AAAA,EAChC,KAAO,EAAE,cAAc,UAAU;AAAA,EACjC,KAAO,EAAE,cAAc,OAAO;AAAA,EAC9B,KAAO,EAAE,cAAc,SAAS;AAAA,EAChC,KAAO,EAAE,cAAc,OAAO;AAAA,EAC9B,KAAO,EAAE,cAAc,SAAS;AAClC,GAGaC,IAAU,CAAC;AAAA,EACtB,QAAAC,IAAS;AAAA,EACT,cAAAC,IAAe;AAAA,EACf,WAAAC,IAAY;AAAA,EACZ,UAAAC;AACF,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACTC,EAAO,gBAAgB;AAAA,MACvBL,KAAgBK,EAAO,qBAAqBL,CAAY,EAAE;AAAA,MAC1DC,KAAaI,EAAO,qBAAqBJ,CAAS,EAAE;AAAA,IACtD;AAAA,IACA,OAAOF,KAAWF,EAAUE,CAAM;AAAA,IAEjC,UAAAG;AAAA,EAAA;AACH;AAIJJ,EAAQ,SAASQ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GridRow.stories.js","sources":["../../../src/components/GridRow/GridRow.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { GridRowProps } from './GridRow';\nimport type { CSSProperties } from 'react';\n\nimport { GridRow } from './GridRow';\n\nimport './GridRow.stories.css';\n\nconst gapStyles = {\n '0': { '--grid-gap': '0.25rem' },\n '025': { '--grid-gap': '0.25rem' },\n '050': { '--grid-gap': '0.5rem' },\n '075': { '--grid-gap': '0.75rem' },\n '100': { '--grid-gap': '1rem' },\n '125': { '--grid-gap': '1.25rem' },\n '150': { '--grid-gap': '1.5rem' },\n '175': { '--grid-gap': '1.75rem' },\n '200': { '--grid-gap': '2rem' },\n '250': { '--grid-gap': '2.5rem' },\n '300': { '--grid-gap': '3rem' },\n '350': { '--grid-gap': '3.5rem' },\n};\n\nconst codeString = `\n <GridRow gutter={gutter} marginTop={marginTop} marginBottom={marginBottom}>\n // Up to 12 GridRow.Column's can be added as needed.\n <GridRow.Column size={size} mediumSize={mediumSize} startPositon={startPositon}\n mediumStartPosition={mediumStartPosition}> {children} </GridRow.Column> </GridRow>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/GridRow',\n component: GridRow,\n argTypes: {\n gutter: {\n options: ['0', '025', '050', '075', '100', '125', '150', '175', '200', '250', '300', '350'],\n control: { type: 'select' },\n },\n marginBottom: {\n options: ['0', '025', '050', '075', '100', '125', '150', '175', '200', '250', '300', '350'],\n control: { type: 'select' },\n },\n marginTop: {\n options: ['0', '025', '050', '075', '100', '125', '150', '175', '200', '250', '300', '350'],\n control: { type: 'select' },\n },\n },\n parameters: {\n inspectComponent: GridRow,\n codeString: codeString,\n },\n} as Meta<GridRowProps>;\n\nconst Template: StoryFn<GridRowProps> = (args) => (\n <div className=\"page-wrapper\" style={args.gutter && (gapStyles[args.gutter] as CSSProperties)}>\n <GridRow {...args}>\n <GridRow.Column>Col-12</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"1\">Col-1</GridRow.Column>\n <GridRow.Column size=\"11\">Col-11</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"2\">Col-2</GridRow.Column>\n <GridRow.Column size=\"10\">Col-10</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"3\">Col-3</GridRow.Column>\n <GridRow.Column size=\"9\">Col-9</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"4\">Col-4</GridRow.Column>\n <GridRow.Column size=\"8\">Col-8</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"5\">Col-5</GridRow.Column>\n <GridRow.Column size=\"7\">Col-7</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"6\">Col-6</GridRow.Column>\n <GridRow.Column size=\"6\">Col-6</GridRow.Column>\n </GridRow>\n </div>\n);\n\nconst defaultArgs: Partial<GridRowProps> = {\n gutter: '200',\n marginBottom: '050',\n marginTop: '0',\n};\n\nexport const GridRowExample = Template.bind({});\nGridRowExample.args = {\n ...defaultArgs,\n};\n\nconst TemplateMedium: StoryFn<GridRowProps> = (args) => (\n <div className=\"page-wrapper\" style={args.gutter && (gapStyles[args.gutter] as CSSProperties)}>\n <GridRow {...args}>\n <GridRow.Column size=\"4\" mediumSize=\"6\">\n L: 4, Md: 6, S: 12\n </GridRow.Column>\n <GridRow.Column size=\"4\" mediumSize=\"6\">\n L: 4, Md: 6, S: 12\n </GridRow.Column>\n <GridRow.Column size=\"4\" mediumSize=\"12\">\n L: 4, Md: 12\n </GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"3\" mediumSize=\"6\">\n L: 3, Md: 6, S: 12\n </GridRow.Column>\n <GridRow.Column size=\"3\" mediumSize=\"6\">\n L: 3, Md: 12\n </GridRow.Column>\n <GridRow.Column size=\"6\" mediumSize=\"12\">\n L: 6, Md: 12, S: 12\n </GridRow.Column>\n </GridRow>\n </div>\n);\n\nexport const WithMediumBreakpoint = TemplateMedium.bind({});\nGridRowExample.args = {\n ...defaultArgs,\n};\n"],"names":["gapStyles","codeString","GridRow_stories","GridRow","Template","args","jsxs","jsx","defaultAr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":"GridRow.stories.js","sources":["../../../src/components/GridRow/GridRow.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { GridRowProps } from './GridRow';\nimport type { CSSProperties } from 'react';\n\nimport { GridRow } from './GridRow';\n\nimport './GridRow.stories.css';\n\nconst gapStyles = {\n '0': { '--grid-gap': '0.25rem' },\n '025': { '--grid-gap': '0.25rem' },\n '050': { '--grid-gap': '0.5rem' },\n '075': { '--grid-gap': '0.75rem' },\n '100': { '--grid-gap': '1rem' },\n '125': { '--grid-gap': '1.25rem' },\n '150': { '--grid-gap': '1.5rem' },\n '175': { '--grid-gap': '1.75rem' },\n '200': { '--grid-gap': '2rem' },\n '250': { '--grid-gap': '2.5rem' },\n '300': { '--grid-gap': '3rem' },\n '350': { '--grid-gap': '3.5rem' },\n};\n\nconst codeString = `\n <GridRow gutter={gutter} marginTop={marginTop} marginBottom={marginBottom}>\n // Up to 12 GridRow.Column's can be added as needed.\n <GridRow.Column size={size} mediumSize={mediumSize} startPositon={startPositon}\n mediumStartPosition={mediumStartPosition}> {children} </GridRow.Column> </GridRow>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/GridRow',\n component: GridRow,\n argTypes: {\n gutter: {\n options: ['0', '025', '050', '075', '100', '125', '150', '175', '200', '250', '300', '350'],\n control: { type: 'select' },\n },\n marginBottom: {\n options: ['0', '025', '050', '075', '100', '125', '150', '175', '200', '250', '300', '350'],\n control: { type: 'select' },\n },\n marginTop: {\n options: ['0', '025', '050', '075', '100', '125', '150', '175', '200', '250', '300', '350'],\n control: { type: 'select' },\n },\n },\n parameters: {\n inspectComponent: GridRow,\n codeString: codeString,\n },\n} as Meta<GridRowProps>;\n\nconst Template: StoryFn<GridRowProps> = (args) => (\n <div className=\"page-wrapper\" style={args.gutter && (gapStyles[args.gutter] as CSSProperties)}>\n <GridRow {...args}>\n <GridRow.Column>Col-12</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"1\">Col-1</GridRow.Column>\n <GridRow.Column size=\"11\">Col-11</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"2\">Col-2</GridRow.Column>\n <GridRow.Column size=\"10\">Col-10</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"3\">Col-3</GridRow.Column>\n <GridRow.Column size=\"9\">Col-9</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"4\">Col-4</GridRow.Column>\n <GridRow.Column size=\"8\">Col-8</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"5\">Col-5</GridRow.Column>\n <GridRow.Column size=\"7\">Col-7</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"6\">Col-6</GridRow.Column>\n <GridRow.Column size=\"6\">Col-6</GridRow.Column>\n </GridRow>\n </div>\n);\n\nconst defaultArgs: Partial<GridRowProps> = {\n gutter: '200',\n marginBottom: '050',\n marginTop: '0',\n};\n\nexport const GridRowExample = Template.bind({});\nGridRowExample.args = {\n ...defaultArgs,\n};\n\nconst TemplateMedium: StoryFn<GridRowProps> = (args) => (\n <div className=\"page-wrapper\" style={args.gutter && (gapStyles[args.gutter] as CSSProperties)}>\n <GridRow {...args}>\n <GridRow.Column size=\"4\" mediumSize=\"6\">\n L: 4, Md: 6, S: 12\n </GridRow.Column>\n <GridRow.Column size=\"4\" mediumSize=\"6\">\n L: 4, Md: 6, S: 12\n </GridRow.Column>\n <GridRow.Column size=\"4\" mediumSize=\"12\">\n L: 4, Md: 12\n </GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"3\" mediumSize=\"6\">\n L: 3, Md: 6, S: 12\n </GridRow.Column>\n <GridRow.Column size=\"3\" mediumSize=\"6\">\n L: 3, Md: 12\n </GridRow.Column>\n <GridRow.Column size=\"6\" mediumSize=\"12\">\n L: 6, Md: 12, S: 12\n </GridRow.Column>\n </GridRow>\n </div>\n);\n\nexport const WithMediumBreakpoint = TemplateMedium.bind({});\nGridRowExample.args = {\n ...defaultArgs,\n};\n"],"names":["gapStyles","codeString","GridRow_stories","GridRow","Template","args","jsxs","jsx","defaultArgs","GridRowExample","TemplateMedium","WithMediumBreakpoint"],"mappings":";;AAQA,MAAMA,IAAY;AAAA,EAChB,GAAK,EAAE,cAAc,UAAU;AAAA,EAC/B,OAAO,EAAE,cAAc,UAAU;AAAA,EACjC,OAAO,EAAE,cAAc,SAAS;AAAA,EAChC,OAAO,EAAE,cAAc,UAAU;AAAA,EACjC,KAAO,EAAE,cAAc,OAAO;AAAA,EAC9B,KAAO,EAAE,cAAc,UAAU;AAAA,EACjC,KAAO,EAAE,cAAc,SAAS;AAAA,EAChC,KAAO,EAAE,cAAc,UAAU;AAAA,EACjC,KAAO,EAAE,cAAc,OAAO;AAAA,EAC9B,KAAO,EAAE,cAAc,SAAS;AAAA,EAChC,KAAO,EAAE,cAAc,OAAO;AAAA,EAC9B,KAAO,EAAE,cAAc,SAAS;AAClC,GAEMC,IAAa;AAAA;AAAA;AAAA;AAAA;AAAA,GAQJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,SAAS,CAAC,KAAK,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK;AAAA,MAC1F,SAAS,EAAE,MAAM,SAAS;AAAA,IAC5B;AAAA,IACA,cAAc;AAAA,MACZ,SAAS,CAAC,KAAK,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK;AAAA,MAC1F,SAAS,EAAE,MAAM,SAAS;AAAA,IAC5B;AAAA,IACA,WAAW;AAAA,MACT,SAAS,CAAC,KAAK,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK;AAAA,MAC1F,SAAS,EAAE,MAAM,SAAS;AAAA,IAAA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AR,EAAe,MAAK,KAAI,YAAW,MAAK,UAEzC,sBAAA,CAAA;AAAA,EAAA,EACF,CAAA;AAAA,GACF,GAGWQ,IAAuBD,EAAe,KAAK,CAAE,CAAA;AAC1DD,EAAe,OAAO;AAAA,EACpB,GAAGD;AACL;"}
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalList.js","sources":["../../../src/components/HorizontalList/HorizontalList.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport styles from './HorizontalList.module.css';\n\nexport interface HorizontalListProps {\n /** The items to display. */\n values: ReactNode[];\n /** The separator to use. */\n separator?: ReactNode;\n}\n\n/** Represents a component to show text separated by a given separator in a horizontal direction. */\nexport const HorizontalList = ({ values, separator = '•' }: HorizontalListProps) => {\n return (\n <div className={styles['horizontal-list-wrapper']}>\n {values.map((value, index) => (\n <span className={styles['horizontal-list-value']} key={`${value?.toString()}-${index}`}>\n {value}\n {index < values.length - 1 && <span className={styles['horizontal-list-separator']}>{separator}</span>}\n </span>\n ))}\n </div>\n );\n};\n"],"names":["HorizontalList","values","separator","styles","value","index","jsxs","jsx"],"mappings":";;;;;GAYaA,IAAiB,CAAC,EAAE,QAAAC,GAAQ,WAAAC,IAAY,4BAEhD,OAAI,EAAA,WAAWC,EAAO,yBAAyB,GAC7C,UAAOF,EAAA,IAAI,CAACG,GAAOC,MACjB,gBAAAC,EAAA,QAAA,EAAK,WAAWH,EAAO,uBAAuB,GAC5C,UAAA;AAAA,EAAAC;AAAA,EACAC,IAAQJ,EAAO,SAAS,KAAK,gBAAAM,EAAC,UAAK,WAAWJ,EAAO,2BAA2B,GAAI,UAAUD,EAAA,CAAA;AAAA,KAF1C,GAAGE,KAAA,gBAAAA,EAAO,UAAU,IAAIC,CAAK,EAGpF,CACD,EACH,CAAA;"}
1
+ {"version":3,"file":"HorizontalList.js","sources":["../../../src/components/HorizontalList/HorizontalList.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport styles from './HorizontalList.module.css';\n\nexport interface HorizontalListProps {\n /** The items to display. */\n values: ReactNode[];\n /** The separator to use. */\n separator?: ReactNode;\n}\n\n/** Represents a component to show text separated by a given separator in a horizontal direction. */\nexport const HorizontalList = ({ values, separator = '•' }: HorizontalListProps) => {\n return (\n <div className={styles['horizontal-list-wrapper']}>\n {values.map((value, index) => (\n <span className={styles['horizontal-list-value']} key={`${value?.toString()}-${index}`}>\n {value}\n {index < values.length - 1 && <span className={styles['horizontal-list-separator']}>{separator}</span>}\n </span>\n ))}\n </div>\n );\n};\n"],"names":["HorizontalList","values","separator","styles","value","index","jsxs","jsx"],"mappings":";;;;;GAYaA,IAAiB,CAAC,EAAE,QAAAC,GAAQ,WAAAC,IAAY,4BAEhD,OAAI,EAAA,WAAWC,EAAO,yBAAyB,GAC7C,UAAOF,EAAA,IAAI,CAACG,GAAOC,MACjB,gBAAAC,EAAA,QAAA,EAAK,WAAWH,EAAO,uBAAuB,GAC5C,UAAA;AAAA,EAAAC;AAAA,EACAC,IAAQJ,EAAO,SAAS,KAAK,gBAAAM,EAAC,UAAK,WAAWJ,EAAO,2BAA2B,GAAI,UAAUD,EAAA,CAAA;AAAA,KAF1C,GAAGE,KAAA,gBAAAA,EAAO,UAAU,IAAIC,CAAK,EAGpF,CACD,GACH;"}
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalList.stories.js","sources":["../../../src/components/HorizontalList/HorizontalList.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { HorizontalListProps } from './HorizontalList';\n\nimport { HorizontalList } from './HorizontalList';\n\nimport { Button } from 'components/Buttons';\nimport { Icon } from 'components/Icon';\n\nconst codeString = '<HorizontalList values={values} separator=\"•\" />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/HorizontalList',\n component: HorizontalList,\n argTypes: {\n separator: {\n control: 'text',\n },\n },\n parameters: {\n inspectComponent: HorizontalList,\n codeString: codeString,\n },\n} as Meta<HorizontalListProps>;\n\nconst Template: StoryFn<HorizontalListProps> = (args) => <HorizontalList {...args} />;\n\nexport const HorizontalListExample = Template.bind({});\nHorizontalListExample.args = {\n values: ['Curabitur consequat', 'Lectus sit amet luctus vulputate', 'Nisi semi mattis'],\n};\n\nexport const WithComplexContent = Template.bind({});\nWithComplexContent.args = {\n values: [\n <a href=\"/?path=/story/atoms-horizontallist--with-complex-content\" key=\"1\">\n Curabitur consequat\n </a>,\n <Button type=\"button\" variant=\"primary\" key=\"2\">\n Lectus sit amet luctus vulputate\n </Button>,\n <Icon name=\"Sparkles\" key=\"3\" />,\n <strong key=\"4\">Nisi semi mattis</strong>,\n ],\n separator: <Icon name=\"CheveronRight\" size={16} />,\n};\n\nWithComplexContent.argTypes = {\n ...WithComplexContent.argTypes,\n separator: {\n table: {\n disable: true, // Disable separator controls for this specific story\n },\n },\n};\n"],"names":["codeString","HorizontalList_stories","HorizontalList","Template","args","jsx","HorizontalListExample","WithComplexContent","Button","Icon"],"mappings":";;;;;;AAQA,MAAMA,IAAa,oDAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,WAAW;AAAA,MACT,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAyC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAgB,GAAGE,EAAM,CAAA,GAEtEE,IAAwBH,EAAS,KAAK,EAAE;AACrDG,EAAsB,OAAO;AAAA,EAC3B,QAAQ,CAAC,uBAAuB,oCAAoC,kBAAkB;AACxF;AAEO,MAAMC,IAAqBJ,EAAS,KAAK,EAAE;AAClDI,EAAmB,OAAO;AAAA,EACxB,QAAQ;AAAA,IACL,gBAAAF,EAAA,KAAA,EAAE,MAAK,4DAAmE,mCAAJ,GAEvE;AAAA,sBACCG,GAAO,EAAA,MAAK,UAAS,SAAQ,WAAkB,gDAAJ,GAE5C;AAAA,IACC,gBAAAH,EAAAI,GAAA,EAAK,MAAK,WAAA,GAAe,GAAI;AAAA,IAC9B,gBAAAJ,EAAC,UAAe,EAAA,UAAA,mBAAA,GAAJ,GAAoB;AAAA,EAClC;AAAA,EACA,WAAY,gBAAAA,EAAAI,GAAA,EAAK,MAAK,iBAAgB,MAAM,IAAI;AAClD;AAEAF,EAAmB,WAAW;AAAA,EAC5B,GAAGA,EAAmB;AAAA,EACtB,WAAW;AAAA,IACT,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;"}
1
+ {"version":3,"file":"HorizontalList.stories.js","sources":["../../../src/components/HorizontalList/HorizontalList.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { HorizontalListProps } from './HorizontalList';\n\nimport { HorizontalList } from './HorizontalList';\n\nimport { Button } from 'components/Buttons';\nimport { Icon } from 'components/Icon';\n\nconst codeString = '<HorizontalList values={values} separator=\"•\" />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/HorizontalList',\n component: HorizontalList,\n argTypes: {\n separator: {\n control: 'text',\n },\n },\n parameters: {\n inspectComponent: HorizontalList,\n codeString: codeString,\n },\n} as Meta<HorizontalListProps>;\n\nconst Template: StoryFn<HorizontalListProps> = (args) => <HorizontalList {...args} />;\n\nexport const HorizontalListExample = Template.bind({});\nHorizontalListExample.args = {\n values: ['Curabitur consequat', 'Lectus sit amet luctus vulputate', 'Nisi semi mattis'],\n};\n\nexport const WithComplexContent = Template.bind({});\nWithComplexContent.args = {\n values: [\n <a href=\"/?path=/story/atoms-horizontallist--with-complex-content\" key=\"1\">\n Curabitur consequat\n </a>,\n <Button type=\"button\" variant=\"primary\" key=\"2\">\n Lectus sit amet luctus vulputate\n </Button>,\n <Icon name=\"Sparkles\" key=\"3\" />,\n <strong key=\"4\">Nisi semi mattis</strong>,\n ],\n separator: <Icon name=\"CheveronRight\" size={16} />,\n};\n\nWithComplexContent.argTypes = {\n ...WithComplexContent.argTypes,\n separator: {\n table: {\n disable: true, // Disable separator controls for this specific story\n },\n },\n};\n"],"names":["codeString","HorizontalList_stories","HorizontalList","Template","args","jsx","HorizontalListExample","WithComplexContent","Button","Icon"],"mappings":";;;;;;AAQA,MAAMA,IAAa,oDAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,WAAW;AAAA,MACT,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAyC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAgB,GAAGE,GAAM,GAEtEE,IAAwBH,EAAS,KAAK,CAAE,CAAA;AACrDG,EAAsB,OAAO;AAAA,EAC3B,QAAQ,CAAC,uBAAuB,oCAAoC,kBAAkB;AACxF;AAEO,MAAMC,IAAqBJ,EAAS,KAAK,CAAE,CAAA;AAClDI,EAAmB,OAAO;AAAA,EACxB,QAAQ;AAAA,IACL,gBAAAF,EAAA,KAAA,EAAE,MAAK,4DAAmE,mCAAJ,GAEvE;AAAA,sBACCG,GAAO,EAAA,MAAK,UAAS,SAAQ,WAAkB,gDAAJ,GAE5C;AAAA,IACC,gBAAAH,EAAAI,GAAA,EAAK,MAAK,WAAA,GAAe,GAAI;AAAA,IAC9B,gBAAAJ,EAAC,UAAe,EAAA,UAAA,mBAAA,GAAJ,GAAoB;AAAA,EAClC;AAAA,EACA,WAAY,gBAAAA,EAAAI,GAAA,EAAK,MAAK,iBAAgB,MAAM,GAAI,CAAA;AAClD;AAEAF,EAAmB,WAAW;AAAA,EAC5B,GAAGA,EAAmB;AAAA,EACtB,WAAW;AAAA,IACT,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IAAA;AAAA,EACX;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.stories.js","sources":["../../../src/components/Icon/Icon.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { IconProps } from './Icon';\n\nimport { Icon } from './Icon';\nimport { Icons } from './icons';\nimport styles from './story.module.css';\n\nimport { ClipboardButton } from 'storyComponents/ClipboardButton/';\n\nconst codeString = '<Icon name={iconName} size={size} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Icon',\n component: Icon,\n parameters: {\n inspectComponent: Icon,\n codeString: codeString,\n },\n} as Meta<IconProps>;\n\nconst Template: StoryFn<IconProps> = (args) => <Icon {...args} />;\n\nexport const IconExample = Template.bind({});\nIconExample.args = {\n name: 'ArrowDownOnSquare',\n size: 32,\n title: 'Optional Icon title',\n};\n\nexport const IconOverview = () => {\n return (\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(4, 1fr)',\n gridGap: '1rem',\n padding: '1rem',\n maxWidth: '1024px',\n }}\n >\n {Object.keys(Icons).map((name) => (\n <div key={name} className={styles.icon__wrapper}>\n <Icon name={name as keyof typeof Icons} size={48} />\n <div className={styles.icon__item}>\n <span>{name}</span>\n <ClipboardButton text={`<Icon icon={${name}} />`} />\n </div>\n </div>\n ))}\n </div>\n );\n};\n"],"names":["codeString","Icon_stories","Icon","Template","args","jsx","IconExample","IconOverview","Icons","name","jsxs","styles","ClipboardButton"],"mappings":";;;;;;;GASMA,IAAa,wCAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAA+B,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAM,GAAGE,EAAM,CAAA,GAElDE,IAAcH,EAAS,KAAK,EAAE;AAC3CG,EAAY,OAAO;AAAA,EACjB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AACT;AAEO,MAAMC,IAAe,MAExB,gBAAAF;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAO;AAAA,MACL,SAAS;AAAA,MACT,qBAAqB;AAAA,MACrB,SAAS;AAAA,MACT,SAAS;AAAA,MACT,UAAU;AAAA,IACZ;AAAA,IAEC,UAAA,OAAO,KAAKG,CAAK,EAAE,IAAI,CAACC,MACtB,gBAAAC,EAAA,OAAA,EAAe,WAAWC,EAAO,eAChC,UAAA;AAAA,MAAC,gBAAAN,EAAAH,GAAA,EAAK,MAAAO,GAAkC,MAAM,GAAI,CAAA;AAAA,MACjD,gBAAAC,EAAA,OAAA,EAAI,WAAWC,EAAO,YACrB,UAAA;AAAA,QAAA,gBAAAN,EAAC,UAAM,UAAKI,EAAA,CAAA;AAAA,QACX,gBAAAJ,EAAAO,GAAA,EAAgB,MAAM,eAAeH,CAAI,QAAQ;AAAA,MAAA,GACpD;AAAA,IAAA,EAAA,GALQA,CAMV,CACD;AAAA,EAAA;AAAA;"}
1
+ {"version":3,"file":"Icon.stories.js","sources":["../../../src/components/Icon/Icon.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { IconProps } from './Icon';\n\nimport { Icon } from './Icon';\nimport { Icons } from './icons';\nimport styles from './story.module.css';\n\nimport { ClipboardButton } from 'storyComponents/ClipboardButton/';\n\nconst codeString = '<Icon name={iconName} size={size} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Icon',\n component: Icon,\n parameters: {\n inspectComponent: Icon,\n codeString: codeString,\n },\n} as Meta<IconProps>;\n\nconst Template: StoryFn<IconProps> = (args) => <Icon {...args} />;\n\nexport const IconExample = Template.bind({});\nIconExample.args = {\n name: 'ArrowDownOnSquare',\n size: 32,\n title: 'Optional Icon title',\n};\n\nexport const IconOverview = () => {\n return (\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(4, 1fr)',\n gridGap: '1rem',\n padding: '1rem',\n maxWidth: '1024px',\n }}\n >\n {Object.keys(Icons).map((name) => (\n <div key={name} className={styles.icon__wrapper}>\n <Icon name={name as keyof typeof Icons} size={48} />\n <div className={styles.icon__item}>\n <span>{name}</span>\n <ClipboardButton text={`<Icon icon={${name}} />`} />\n </div>\n </div>\n ))}\n </div>\n );\n};\n"],"names":["codeString","Icon_stories","Icon","Template","args","jsx","IconExample","IconOverview","Icons","name","jsxs","styles","ClipboardButton"],"mappings":";;;;;;;GASMA,IAAa,wCAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAA+B,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAM,GAAGE,GAAM,GAElDE,IAAcH,EAAS,KAAK,CAAE,CAAA;AAC3CG,EAAY,OAAO;AAAA,EACjB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AACT;AAEO,MAAMC,IAAe,MAExB,gBAAAF;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAO;AAAA,MACL,SAAS;AAAA,MACT,qBAAqB;AAAA,MACrB,SAAS;AAAA,MACT,SAAS;AAAA,MACT,UAAU;AAAA,IACZ;AAAA,IAEC,UAAA,OAAO,KAAKG,CAAK,EAAE,IAAI,CAACC,MACtB,gBAAAC,EAAA,OAAA,EAAe,WAAWC,EAAO,eAChC,UAAA;AAAA,MAAC,gBAAAN,EAAAH,GAAA,EAAK,MAAAO,GAAkC,MAAM,GAAI,CAAA;AAAA,MACjD,gBAAAC,EAAA,OAAA,EAAI,WAAWC,EAAO,YACrB,UAAA;AAAA,QAAA,gBAAAN,EAAC,UAAM,UAAKI,EAAA,CAAA;AAAA,QACX,gBAAAJ,EAAAO,GAAA,EAAgB,MAAM,eAAeH,CAAI,OAAQ,CAAA;AAAA,MAAA,EACpD,CAAA;AAAA,IAAA,EAAA,GALQA,CAMV,CACD;AAAA,EAAA;AACH;"}