@uva-glass/component-library 3.55.6 → 3.55.7
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.
- package/dist/Accordion-DvblEUVu.js.map +1 -1
- package/dist/AccordionCard-BXy-plB7.js.map +1 -1
- package/dist/ActionList-O9w1hqNg.js.map +1 -1
- package/dist/AddCatalogueLinkForm-rph4K9P0.js.map +1 -1
- package/dist/CheckboxButtonBar-5UMIFMKH.js.map +1 -1
- package/dist/ClipboardButton-geHjMl2J.js.map +1 -1
- package/dist/ControlsButton-B1XRpMUM.js.map +1 -1
- package/dist/CopyableText-DkyhZ6wk.js.map +1 -1
- package/dist/Drawer-e7UFHVg9.js.map +1 -1
- package/dist/EmptyStateDataDisplay-D0QiI8nE.js.map +1 -1
- package/dist/ExpandableInfoPanel-CnBVVNlJ.js.map +1 -1
- package/dist/FeedbackBar-ByKp32HE.js.map +1 -1
- package/dist/FieldHint-fxnEOsVZ.js.map +1 -1
- package/dist/Input-Bn-arMaC.js.map +1 -1
- package/dist/InputField-BWAy19w9.js.map +1 -1
- package/dist/Lexical.prod-CqPLSi0R.js.map +1 -1
- package/dist/LexicalClipboard.prod-BVw_sFpo.js.map +1 -1
- package/dist/LexicalComposerContext.prod-Ca-YN_fj.js.map +1 -1
- package/dist/LexicalExtension.prod-CUQTgbur.js.map +1 -1
- package/dist/LexicalLink.prod-DMhcqD9x.js.map +1 -1
- package/dist/LexicalList.prod-eYlcb5Ao.js.map +1 -1
- package/dist/LexicalTable.prod-DlOxUQou.js.map +1 -1
- package/dist/LexicalUtils.prod-BqcriFWV.js.map +1 -1
- package/dist/LinkContextMenu-ePn1iZ_z.js.map +1 -1
- package/dist/MenuLink-Cm1yZO_5.js.map +1 -1
- package/dist/ModalDialog-N50NGnd4.js.map +1 -1
- package/dist/MultiSelectBox-Cuh_o-A1.js.map +1 -1
- package/dist/MultiSelectItem-BF5xRjz5.js.map +1 -1
- package/dist/Notification-CIhsHuF0.js.map +1 -1
- package/dist/OverlayStepBar-CjaoYdsh.js.map +1 -1
- package/dist/PageOverlay-S4xsqJha.js.map +1 -1
- package/dist/PasteHandlerPlugin-BNp8ST0q.js.map +1 -1
- package/dist/Periods-BYETtB6R.js.map +1 -1
- package/dist/ProgrammeCard-76gG7ksx.js.map +1 -1
- package/dist/RadioGroup-JeTjVp5B.js.map +1 -1
- package/dist/Slider-BlLyrET9.js.map +1 -1
- package/dist/SortableProvider-8HYiBXJS.js.map +1 -1
- package/dist/Spinner-BpElTDIu.js.map +1 -1
- package/dist/StatusPill-DM7n3I4W.js.map +1 -1
- package/dist/TableCellContextMenu-D0IMQr3E.js.map +1 -1
- package/dist/TableCellResizerPlugin-Bc5y-Qbx.js.map +1 -1
- package/dist/TextArea-CuASC9bX.js.map +1 -1
- package/dist/ToggleSwitch-C7z7JVtx.js.map +1 -1
- package/dist/Tooltip-D27p9kh4.js.map +1 -1
- package/dist/VarIndicator-C-GueOZD.js.map +1 -1
- package/dist/assets/{src/css/fonts.css → fonts.css} +4 -4
- package/dist/chunk-SZQXB3JV-D6GR5B4F.js.map +1 -1
- package/dist/{client-8jeXrH7N.js → client-b7M3CmlC.js} +9 -9
- package/dist/{client-8jeXrH7N.js.map → client-b7M3CmlC.js.map} +1 -1
- package/dist/clsx-BD2qMUU1.js.map +1 -1
- package/dist/components/Accordion/Accordion.test.js +2 -2
- package/dist/components/Accordion/Accordion.test.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.test.js +2 -2
- package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
- package/dist/components/ActionList/ActionList.test.js +2 -2
- package/dist/components/ActionList/ActionList.test.js.map +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
- package/dist/components/Attention/Attention.test.js +1 -1
- package/dist/components/Attention/Attention.test.js.map +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +1 -1
- package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
- package/dist/components/Buttons/Button.test.js +1 -1
- package/dist/components/Buttons/Button.test.js.map +1 -1
- package/dist/components/Buttons/LinkButton.test.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js.map +1 -1
- package/dist/components/Buttons/MenuButton.js.map +1 -1
- package/dist/components/Buttons/MenuButton.test.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js.map +1 -1
- package/dist/components/Card/Card.test.js +1 -1
- package/dist/components/Card/Card.test.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +2 -2
- package/dist/components/Checkbox/Checkbox.test.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/Drawer/Drawer.stories.js.map +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.stories.js.map +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js.map +1 -1
- package/dist/components/Icon/Icon.js.map +1 -1
- package/dist/components/IconButton/IconButton.stories.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/Label/Label.test.js +1 -1
- package/dist/components/Label/Label.test.js.map +1 -1
- package/dist/components/MetaDataBar/MetaDataBar.test.js +1 -1
- package/dist/components/MetaDataBar/MetaDataBar.test.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js.map +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js.map +1 -1
- package/dist/components/Notification/Notification.test.js +1 -1
- package/dist/components/Notification/Notification.test.js.map +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.stories.js.map +1 -1
- package/dist/components/PageOverlay/PageOverlay.stories.js +2 -2
- package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js.map +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Providers/LanguageProvider.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
- package/dist/components/RteEditor/helpers.js.map +1 -1
- package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
- package/dist/components/RteEditor/hooks/useTranslation.js.map +1 -1
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js.map +1 -1
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js.map +1 -1
- package/dist/components/SearchField/SearchField.js.map +1 -1
- package/dist/components/SearchField/SearcheField.stories.js.map +1 -1
- package/dist/components/SearchField/components/ResultsOption.js.map +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js.map +1 -1
- package/dist/components/SelectListbox/SelectListbox.js.map +1 -1
- package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectContainer.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectOption.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectOptionBox.js.map +1 -1
- package/dist/components/Slider/Slider.stories.js.map +1 -1
- package/dist/components/Sortable/Sortable.js.map +1 -1
- package/dist/components/Sortable/components/SortableHandle.js.map +1 -1
- package/dist/components/Sortable/components/SortableItem.js.map +1 -1
- package/dist/components/Sortable/sortableReducer.js.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
- package/dist/components/StatusBadge/StatusBadge.test.js.map +1 -1
- package/dist/components/TextArea/TextArea.test.js +2 -2
- package/dist/components/TextArea/TextArea.test.js.map +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
- package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
- package/dist/components/WeekSelector/WeekSelector.js.map +1 -1
- package/dist/components/WeekSelector/WeekSelector.stories.js.map +1 -1
- package/dist/components/WeekSelector/components/WeekSelectorOption.js.map +1 -1
- package/dist/components/hooks/useDebounce.js.map +1 -1
- package/dist/components/hooks/useOnClickOutside.js.map +1 -1
- package/dist/components/hooks/usePositionedFloaters.js.map +1 -1
- package/dist/components/hooks/useResponsive.js.map +1 -1
- package/dist/components-BzxAULjf.js.map +1 -1
- package/dist/dist-V_v3kC0L.js.map +1 -1
- package/dist/{esm-BwHoYxVb.js → esm-BoujHjK5.js} +2 -2
- package/dist/{esm-BwHoYxVb.js.map → esm-BoujHjK5.js.map} +1 -1
- package/dist/helpers-B1VK8xTF.js.map +1 -1
- package/dist/lib-BvOQt8El.js.map +1 -1
- package/dist/{react-18-B7MZmX_Z.js → react-18-DxAWL8_m.js} +2 -2
- package/dist/{react-18-B7MZmX_Z.js.map → react-18-DxAWL8_m.js.map} +1 -1
- package/dist/{react.esm-D_F72rY1.js → react.esm-CweFe1CK.js} +2 -2
- package/dist/{react.esm-D_F72rY1.js.map → react.esm-CweFe1CK.js.map} +1 -1
- package/dist/setupTests.js +2 -2
- package/dist/setupTests.js.map +1 -1
- package/dist/storybook__react.d.js +1 -1
- package/dist/storybook__react.d.js.map +1 -1
- package/dist/test-Pa9Lwbsq.js.map +1 -1
- package/dist/test-utils-Cmn06m_x.js.map +1 -1
- package/package.json +7 -6
- /package/dist/assets/favicon/{src/assets/favicon/android-chrome-192x192.png → android-chrome-192x192.png} +0 -0
- /package/dist/assets/favicon/{src/assets/favicon/android-chrome-512x512.png → android-chrome-512x512.png} +0 -0
- /package/dist/assets/favicon/{src/assets/favicon/apple-touch-icon.png → apple-touch-icon.png} +0 -0
- /package/dist/assets/favicon/{src/assets/favicon/favicon-16x16.png → favicon-16x16.png} +0 -0
- /package/dist/assets/favicon/{src/assets/favicon/favicon-32x32.png → favicon-32x32.png} +0 -0
- /package/dist/assets/favicon/{src/assets/favicon/favicon.ico → favicon.ico} +0 -0
- /package/dist/assets/favicon/{src/assets/favicon/favicon.svg → favicon.svg} +0 -0
- /package/dist/assets/favicon/{src/assets/favicon/site.webmanifest → site.webmanifest} +0 -0
- /package/dist/assets/fonts/{src/assets/fonts/SourceSans3-Regular.otf.woff → SourceSans3-Regular.otf.woff} +0 -0
- /package/dist/assets/fonts/{src/assets/fonts/SourceSans3-Regular.otf.woff2 → SourceSans3-Regular.otf.woff2} +0 -0
- /package/dist/assets/fonts/{src/assets/fonts/SourceSans3-Semibold.otf.woff → SourceSans3-Semibold.otf.woff} +0 -0
- /package/dist/assets/fonts/{src/assets/fonts/SourceSans3-Semibold.otf.woff2 → SourceSans3-Semibold.otf.woff2} +0 -0
- /package/dist/assets/{src/css/globals.css → globals.css} +0 -0
- /package/dist/assets/{src/css/variables.css → variables.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clsx-BD2qMUU1.js","names":[],"sources":["../node_modules/clsx/dist/clsx.mjs"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,EAAE,GAAE;CAAC,IAAI,GAAE,GAAE,IAAE;
|
|
1
|
+
{"version":3,"file":"clsx-BD2qMUU1.js","names":[],"sources":["../node_modules/clsx/dist/clsx.mjs"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,EAAE,GAAE;CAAC,IAAI,GAAE,GAAE,IAAE;CAAG,IAAa,OAAO,KAAjB,YAA8B,OAAO,KAAjB,UAAmB,KAAG;MAAO,IAAa,OAAO,KAAjB,UAAmB,IAAG,MAAM,QAAQ,EAAE,EAAC;EAAC,IAAI,IAAE,EAAE;EAAO,KAAI,IAAE,GAAE,IAAE,GAAE,KAAI,EAAE,OAAK,IAAE,EAAE,EAAE,GAAG,MAAI,MAAI,KAAG,MAAK,KAAG;QAAQ,KAAI,KAAK,GAAE,EAAE,OAAK,MAAI,KAAG,MAAK,KAAG;CAAG,OAAO;;AAAE,SAAgB,IAAM;CAAC,KAAI,IAAI,GAAE,GAAE,IAAE,GAAE,IAAE,IAAG,IAAE,UAAU,QAAO,IAAE,GAAE,KAAI,CAAC,IAAE,UAAU,QAAM,IAAE,EAAE,EAAE,MAAI,MAAI,KAAG,MAAK,KAAG;CAAG,OAAO"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { t as e } from "../../Accordion-DvblEUVu.js";
|
|
3
|
-
import { i as t, n } from "../../react.esm-
|
|
4
|
-
import { t as r } from "../../esm-
|
|
3
|
+
import { i as t, n } from "../../react.esm-CweFe1CK.js";
|
|
4
|
+
import { t as r } from "../../esm-BoujHjK5.js";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/Accordion/Accordion.test.tsx
|
|
7
7
|
describe("Accordion", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.test.js","names":[],"sources":["../../../src/components/Accordion/Accordion.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { Accordion } from './Accordion';\n\ndescribe('Accordion', () => {\n it('should render', () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n expect(titleElement).toBeInTheDocument();\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('should display content when expanded by default', () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" expanded />);\n const titleElement = screen.getByText('Test Accordion');\n expect(titleElement).toBeInTheDocument();\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n });\n\n it('should toggle content visibility on click', async () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n await userEvent.click(titleElement);\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n await userEvent.click(titleElement);\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('should toggle content visibility on Enter key press', async () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n await userEvent.keyboard('[Tab]');\n await userEvent.keyboard('[Enter]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n await userEvent.keyboard('[Enter]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('should toggle content visibility on Space key press', async () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n await userEvent.keyboard('[Tab]');\n await userEvent.keyboard('[Space]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n await userEvent.keyboard('[Space]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n});\n"],"mappings":";;;;;;AAMA,SAAS,mBAAmB;
|
|
1
|
+
{"version":3,"file":"Accordion.test.js","names":[],"sources":["../../../src/components/Accordion/Accordion.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { Accordion } from './Accordion';\n\ndescribe('Accordion', () => {\n it('should render', () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n expect(titleElement).toBeInTheDocument();\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('should display content when expanded by default', () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" expanded />);\n const titleElement = screen.getByText('Test Accordion');\n expect(titleElement).toBeInTheDocument();\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n });\n\n it('should toggle content visibility on click', async () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n await userEvent.click(titleElement);\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n await userEvent.click(titleElement);\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('should toggle content visibility on Enter key press', async () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n await userEvent.keyboard('[Tab]');\n await userEvent.keyboard('[Enter]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n await userEvent.keyboard('[Enter]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('should toggle content visibility on Space key press', async () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n await userEvent.keyboard('[Tab]');\n await userEvent.keyboard('[Space]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n await userEvent.keyboard('[Space]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n});\n"],"mappings":";;;;;;AAMA,SAAS,mBAAmB;CAkC1B,AAjCA,GAAG,uBAAuB;EACxB,EAAO,kBAAC,GAAD;GAAW,OAAM;GAAiB,SAAQ;GAAiB,CAAA,CAAC;EACnE,IAAM,IAAe,EAAO,UAAU,iBAAiB;EAEvD,AADA,OAAO,EAAa,CAAC,mBAAmB,EACxC,OAAO,EAAa,CAAC,gBAAgB,iBAAiB,QAAQ;GAC9D,EAEF,GAAG,yDAAyD;EAC1D,EAAO,kBAAC,GAAD;GAAW,OAAM;GAAiB,SAAQ;GAAe,UAAA;GAAW,CAAA,CAAC;EAC5E,IAAM,IAAe,EAAO,UAAU,iBAAiB;EAEvD,AADA,OAAO,EAAa,CAAC,mBAAmB,EACxC,OAAO,EAAa,CAAC,gBAAgB,iBAAiB,OAAO;GAC7D,EAEF,GAAG,6CAA6C,YAAY;EAC1D,EAAO,kBAAC,GAAD;GAAW,OAAM;GAAiB,SAAQ;GAAiB,CAAA,CAAC;EACnE,IAAM,IAAe,EAAO,UAAU,iBAAiB;EAIvD,AAHA,MAAM,EAAU,MAAM,EAAa,EACnC,OAAO,EAAa,CAAC,gBAAgB,iBAAiB,OAAO,EAC7D,MAAM,EAAU,MAAM,EAAa,EACnC,OAAO,EAAa,CAAC,gBAAgB,iBAAiB,QAAQ;GAC9D,EAEF,GAAG,uDAAuD,YAAY;EACpE,EAAO,kBAAC,GAAD;GAAW,OAAM;GAAiB,SAAQ;GAAiB,CAAA,CAAC;EACnE,IAAM,IAAe,EAAO,UAAU,iBAAiB;EAKvD,AAJA,MAAM,EAAU,SAAS,QAAQ,EACjC,MAAM,EAAU,SAAS,UAAU,EACnC,OAAO,EAAa,CAAC,gBAAgB,iBAAiB,OAAO,EAC7D,MAAM,EAAU,SAAS,UAAU,EACnC,OAAO,EAAa,CAAC,gBAAgB,iBAAiB,QAAQ;GAC9D,EAEF,GAAG,uDAAuD,YAAY;EACpE,EAAO,kBAAC,GAAD;GAAW,OAAM;GAAiB,SAAQ;GAAiB,CAAA,CAAC;EACnE,IAAM,IAAe,EAAO,UAAU,iBAAiB;EAKvD,AAJA,MAAM,EAAU,SAAS,QAAQ,EACjC,MAAM,EAAU,SAAS,UAAU,EACnC,OAAO,EAAa,CAAC,gBAAgB,iBAAiB,OAAO,EAC7D,MAAM,EAAU,SAAS,UAAU,EACnC,OAAO,EAAa,CAAC,gBAAgB,iBAAiB,QAAQ;GAC9D;EACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { t as e } from "../../AccordionCard-BXy-plB7.js";
|
|
3
|
-
import { a as t, i as n, n as r, t as i } from "../../react.esm-
|
|
4
|
-
import { t as a } from "../../esm-
|
|
3
|
+
import { a as t, i as n, n as r, t as i } from "../../react.esm-CweFe1CK.js";
|
|
4
|
+
import { t as a } from "../../esm-BoujHjK5.js";
|
|
5
5
|
import { jsx as o } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/AccordionCard/AccordionCard.test.tsx
|
|
7
7
|
describe("AccordionCard", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionCard.test.js","names":[],"sources":["../../../src/components/AccordionCard/AccordionCard.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen, waitFor } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { AccordionCard } from './AccordionCard';\n\ndescribe('AccordionCard', () => {\n it('should render', () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} expanded />);\n expect(screen.getByText('Test Accordion Card')).toBeInTheDocument();\n expect(screen.getByText('TestComponent')).toBeInTheDocument();\n });\n\n it('should display content when expanded by default', () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} expanded />);\n expect(screen.getByText('Test Accordion Card')).toBeInTheDocument();\n expect(screen.getByText('TestComponent')).toHaveClass('accordion-card__content--expanded');\n });\n\n it('should toggle content visibility on click', () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\n const titleElement = screen.getByText('Test Accordion Card');\n const contentElement = screen.getByText('TestComponent');\n expect(titleElement).toBeInTheDocument();\n fireEvent.click(titleElement);\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\n fireEvent.click(titleElement);\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\n });\n\n it('should toggle content visibility on Enter key press', async () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\n const titleElement = screen.getByRole('button');\n const contentElement = screen.getByText('TestComponent');\n titleElement.focus();\n await userEvent.keyboard('[Enter]');\n await waitFor(() => {\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\n });\n await userEvent.keyboard('[Enter]');\n await waitFor(() => {\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\n });\n });\n\n it('should toggle content visibility on Space key press', async () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\n const titleElement = screen.getByRole('button');\n const contentElement = screen.getByText('TestComponent');\n titleElement.focus();\n await userEvent.keyboard('[Space]');\n await waitFor(() => {\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\n });\n await userEvent.keyboard('[Space]');\n await waitFor(() => {\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\n });\n });\n});\n"],"mappings":";;;;;;AAMA,SAAS,uBAAuB;
|
|
1
|
+
{"version":3,"file":"AccordionCard.test.js","names":[],"sources":["../../../src/components/AccordionCard/AccordionCard.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen, waitFor } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { AccordionCard } from './AccordionCard';\n\ndescribe('AccordionCard', () => {\n it('should render', () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} expanded />);\n expect(screen.getByText('Test Accordion Card')).toBeInTheDocument();\n expect(screen.getByText('TestComponent')).toBeInTheDocument();\n });\n\n it('should display content when expanded by default', () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} expanded />);\n expect(screen.getByText('Test Accordion Card')).toBeInTheDocument();\n expect(screen.getByText('TestComponent')).toHaveClass('accordion-card__content--expanded');\n });\n\n it('should toggle content visibility on click', () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\n const titleElement = screen.getByText('Test Accordion Card');\n const contentElement = screen.getByText('TestComponent');\n expect(titleElement).toBeInTheDocument();\n fireEvent.click(titleElement);\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\n fireEvent.click(titleElement);\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\n });\n\n it('should toggle content visibility on Enter key press', async () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\n const titleElement = screen.getByRole('button');\n const contentElement = screen.getByText('TestComponent');\n titleElement.focus();\n await userEvent.keyboard('[Enter]');\n await waitFor(() => {\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\n });\n await userEvent.keyboard('[Enter]');\n await waitFor(() => {\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\n });\n });\n\n it('should toggle content visibility on Space key press', async () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\n const titleElement = screen.getByRole('button');\n const contentElement = screen.getByText('TestComponent');\n titleElement.focus();\n await userEvent.keyboard('[Space]');\n await waitFor(() => {\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\n });\n await userEvent.keyboard('[Space]');\n await waitFor(() => {\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\n });\n });\n});\n"],"mappings":";;;;;;AAMA,SAAS,uBAAuB;CAuC9B,AAtCA,GAAG,uBAAuB;EAGxB,AAFA,EAAO,kBAAC,GAAD;GAAe,OAAM;GAAsB,SAAS;GAAiB,UAAA;GAAW,CAAA,CAAC,EACxF,OAAO,EAAO,UAAU,sBAAsB,CAAC,CAAC,mBAAmB,EACnE,OAAO,EAAO,UAAU,gBAAgB,CAAC,CAAC,mBAAmB;GAC7D,EAEF,GAAG,yDAAyD;EAG1D,AAFA,EAAO,kBAAC,GAAD;GAAe,OAAM;GAAsB,SAAS;GAAiB,UAAA;GAAW,CAAA,CAAC,EACxF,OAAO,EAAO,UAAU,sBAAsB,CAAC,CAAC,mBAAmB,EACnE,OAAO,EAAO,UAAU,gBAAgB,CAAC,CAAC,YAAY,oCAAoC;GAC1F,EAEF,GAAG,mDAAmD;EACpD,EAAO,kBAAC,GAAD;GAAe,OAAM;GAAsB,SAAS;GAAmB,CAAA,CAAC;EAC/E,IAAM,IAAe,EAAO,UAAU,sBAAsB,EACtD,IAAiB,EAAO,UAAU,gBAAgB;EAKxD,AAJA,OAAO,EAAa,CAAC,mBAAmB,EACxC,EAAU,MAAM,EAAa,EAC7B,OAAO,EAAe,CAAC,YAAY,oCAAoC,EACvE,EAAU,MAAM,EAAa,EAC7B,OAAO,EAAe,CAAC,IAAI,YAAY,oCAAoC;GAC3E,EAEF,GAAG,uDAAuD,YAAY;EACpE,EAAO,kBAAC,GAAD;GAAe,OAAM;GAAsB,SAAS;GAAmB,CAAA,CAAC;EAC/E,IAAM,IAAe,EAAO,UAAU,SAAS,EACzC,IAAiB,EAAO,UAAU,gBAAgB;EAOxD,AANA,EAAa,OAAO,EACpB,MAAM,EAAU,SAAS,UAAU,EACnC,MAAM,QAAc;GAClB,OAAO,EAAe,CAAC,YAAY,oCAAoC;IACvE,EACF,MAAM,EAAU,SAAS,UAAU,EACnC,MAAM,QAAc;GAClB,OAAO,EAAe,CAAC,IAAI,YAAY,oCAAoC;IAC3E;GACF,EAEF,GAAG,uDAAuD,YAAY;EACpE,EAAO,kBAAC,GAAD;GAAe,OAAM;GAAsB,SAAS;GAAmB,CAAA,CAAC;EAC/E,IAAM,IAAe,EAAO,UAAU,SAAS,EACzC,IAAiB,EAAO,UAAU,gBAAgB;EAOxD,AANA,EAAa,OAAO,EACpB,MAAM,EAAU,SAAS,UAAU,EACnC,MAAM,QAAc;GAClB,OAAO,EAAe,CAAC,YAAY,oCAAoC;IACvE,EACF,MAAM,EAAU,SAAS,UAAU,EACnC,MAAM,QAAc;GAClB,OAAO,EAAe,CAAC,IAAI,YAAY,oCAAoC;IAC3E;GACF;EACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { t as e } from "../../ActionList-O9w1hqNg.js";
|
|
3
|
-
import { a as t, i as n, n as r } from "../../react.esm-
|
|
4
|
-
import { t as i } from "../../esm-
|
|
3
|
+
import { a as t, i as n, n as r } from "../../react.esm-CweFe1CK.js";
|
|
4
|
+
import { t as i } from "../../esm-BoujHjK5.js";
|
|
5
5
|
import { jsx as a } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/ActionList/ActionList.test.tsx
|
|
7
7
|
var o = jest.fn(), s = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionList.test.js","names":[],"sources":["../../../src/components/ActionList/ActionList.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, waitFor } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { ActionList } from './ActionList';\n\nconst onClickSpy = jest.fn();\n\nconst BUTTON_LIST = [\n <button key=\"1\" type=\"button\" onClick={onClickSpy}>\n Test Action 1\n </button>,\n <button key=\"2\" type=\"button\">\n Test Action 2\n </button>,\n <button key=\"3\" type=\"button\">\n Test Action 3\n </button>,\n];\n\ndescribe('ActionList', () => {\n it('should render (variant primary)', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"primary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--primary');\n expect(screen.getByText('Test Action 1')).toBeInTheDocument();\n expect(screen.getByText('Test Action 2')).toBeInTheDocument();\n expect(screen.getByText('Test Action 3')).toBeInTheDocument();\n });\n\n it('should render variant secondary', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"secondary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--secondary');\n });\n\n it('should render variant destructive-primary', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"destructive-primary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--destructive-primary');\n });\n\n it('should render variant destructive-secondary', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"destructive-secondary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--destructive-secondary');\n });\n\n it('should render variant blank', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--blank');\n });\n\n it('should render variant blank-icon', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank-icon\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--blank-icon');\n });\n\n it('should toggle content visibility on click', async () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank-icon\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n const triggerElement = screen.getByText('Test ActionList');\n const actionListElement = screen.getByRole('menu');\n expect(triggerElement).toBeInTheDocument();\n expect(actionListElement).toBeInTheDocument();\n await userEvent.click(triggerElement);\n await waitFor(() => {\n expect(actionListElement).toHaveClass('action-list--open');\n });\n await userEvent.click(triggerElement);\n await waitFor(() => {\n expect(actionListElement).not.toHaveClass('action-list--open');\n });\n });\n\n it('should fire action on click on action button', async () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank-icon\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n const triggerElement = screen.getByText('Test ActionList');\n const actionListElement = screen.getByRole('menu');\n expect(triggerElement).toBeInTheDocument();\n expect(actionListElement).toBeInTheDocument();\n await userEvent.click(triggerElement);\n await waitFor(() => {\n expect(actionListElement).toHaveClass('action-list--open');\n });\n const actionButton = screen.getByText('Test Action 1');\n await userEvent.click(actionButton);\n expect(onClickSpy).toHaveBeenCalledTimes(1);\n await waitFor(() => {\n expect(actionListElement).not.toHaveClass('action-list--open');\n });\n });\n});\n"],"mappings":";;;;;;AAMA,IAAM,IAAa,KAAK,IAAI,EAEtB,IAAc;CAClB,kBAAC,UAAD;EAAgB,MAAK;EAAS,SAAS;YAAY;EAE1C,EAFG,IAEH;CACT,kBAAC,UAAD;EAAgB,MAAK;YAAS;EAErB,EAFG,IAEH;CACT,kBAAC,UAAD;EAAgB,MAAK;YAAS;EAErB,EAFG,IAEH;CACV;AAED,SAAS,oBAAoB;
|
|
1
|
+
{"version":3,"file":"ActionList.test.js","names":[],"sources":["../../../src/components/ActionList/ActionList.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, waitFor } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { ActionList } from './ActionList';\n\nconst onClickSpy = jest.fn();\n\nconst BUTTON_LIST = [\n <button key=\"1\" type=\"button\" onClick={onClickSpy}>\n Test Action 1\n </button>,\n <button key=\"2\" type=\"button\">\n Test Action 2\n </button>,\n <button key=\"3\" type=\"button\">\n Test Action 3\n </button>,\n];\n\ndescribe('ActionList', () => {\n it('should render (variant primary)', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"primary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--primary');\n expect(screen.getByText('Test Action 1')).toBeInTheDocument();\n expect(screen.getByText('Test Action 2')).toBeInTheDocument();\n expect(screen.getByText('Test Action 3')).toBeInTheDocument();\n });\n\n it('should render variant secondary', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"secondary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--secondary');\n });\n\n it('should render variant destructive-primary', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"destructive-primary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--destructive-primary');\n });\n\n it('should render variant destructive-secondary', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"destructive-secondary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--destructive-secondary');\n });\n\n it('should render variant blank', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--blank');\n });\n\n it('should render variant blank-icon', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank-icon\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--blank-icon');\n });\n\n it('should toggle content visibility on click', async () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank-icon\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n const triggerElement = screen.getByText('Test ActionList');\n const actionListElement = screen.getByRole('menu');\n expect(triggerElement).toBeInTheDocument();\n expect(actionListElement).toBeInTheDocument();\n await userEvent.click(triggerElement);\n await waitFor(() => {\n expect(actionListElement).toHaveClass('action-list--open');\n });\n await userEvent.click(triggerElement);\n await waitFor(() => {\n expect(actionListElement).not.toHaveClass('action-list--open');\n });\n });\n\n it('should fire action on click on action button', async () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank-icon\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n const triggerElement = screen.getByText('Test ActionList');\n const actionListElement = screen.getByRole('menu');\n expect(triggerElement).toBeInTheDocument();\n expect(actionListElement).toBeInTheDocument();\n await userEvent.click(triggerElement);\n await waitFor(() => {\n expect(actionListElement).toHaveClass('action-list--open');\n });\n const actionButton = screen.getByText('Test Action 1');\n await userEvent.click(actionButton);\n expect(onClickSpy).toHaveBeenCalledTimes(1);\n await waitFor(() => {\n expect(actionListElement).not.toHaveClass('action-list--open');\n });\n });\n});\n"],"mappings":";;;;;;AAMA,IAAM,IAAa,KAAK,IAAI,EAEtB,IAAc;CAClB,kBAAC,UAAD;EAAgB,MAAK;EAAS,SAAS;YAAY;EAE1C,EAFG,IAEH;CACT,kBAAC,UAAD;EAAgB,MAAK;YAAS;EAErB,EAFG,IAEH;CACT,kBAAC,UAAD;EAAgB,MAAK;YAAS;EAErB,EAFG,IAEH;CACV;AAED,SAAS,oBAAoB;CAoF3B,AAnFA,GAAG,yCAAyC;EAU1C,AATA,EACE,kBAAC,GAAD;GAAY,OAAM;GAAkB,SAAQ;GAAU,UAAS;aAC5D,EAAY,KAAK,MAAW,EAAO;GACzB,CAAA,CACd,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,kBAAkB,EAC1E,OAAO,EAAO,UAAU,gBAAgB,CAAC,CAAC,mBAAmB,EAC7D,OAAO,EAAO,UAAU,gBAAgB,CAAC,CAAC,mBAAmB,EAC7D,OAAO,EAAO,UAAU,gBAAgB,CAAC,CAAC,mBAAmB;GAC7D,EAEF,GAAG,yCAAyC;EAO1C,AANA,EACE,kBAAC,GAAD;GAAY,OAAM;GAAkB,SAAQ;GAAY,UAAS;aAC9D,EAAY,KAAK,MAAW,EAAO;GACzB,CAAA,CACd,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,oBAAoB;GAC5E,EAEF,GAAG,mDAAmD;EAOpD,AANA,EACE,kBAAC,GAAD;GAAY,OAAM;GAAkB,SAAQ;GAAsB,UAAS;aACxE,EAAY,KAAK,MAAW,EAAO;GACzB,CAAA,CACd,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,8BAA8B;GACtF,EAEF,GAAG,qDAAqD;EAOtD,AANA,EACE,kBAAC,GAAD;GAAY,OAAM;GAAkB,SAAQ;GAAwB,UAAS;aAC1E,EAAY,KAAK,MAAW,EAAO;GACzB,CAAA,CACd,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,gCAAgC;GACxF,EAEF,GAAG,qCAAqC;EAOtC,AANA,EACE,kBAAC,GAAD;GAAY,OAAM;GAAkB,SAAQ;GAAQ,UAAS;aAC1D,EAAY,KAAK,MAAW,EAAO;GACzB,CAAA,CACd,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,gBAAgB;GACxE,EAEF,GAAG,0CAA0C;EAO3C,AANA,EACE,kBAAC,GAAD;GAAY,OAAM;GAAkB,SAAQ;GAAa,UAAS;aAC/D,EAAY,KAAK,MAAW,EAAO;GACzB,CAAA,CACd,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,qBAAqB;GAC7E,EAEF,GAAG,6CAA6C,YAAY;EAC1D,EACE,kBAAC,GAAD;GAAY,OAAM;GAAkB,SAAQ;GAAa,UAAS;aAC/D,EAAY,KAAK,MAAW,EAAO;GACzB,CAAA,CACd;EACD,IAAM,IAAiB,EAAO,UAAU,kBAAkB,EACpD,IAAoB,EAAO,UAAU,OAAO;EAQlD,AAPA,OAAO,EAAe,CAAC,mBAAmB,EAC1C,OAAO,EAAkB,CAAC,mBAAmB,EAC7C,MAAM,EAAU,MAAM,EAAe,EACrC,MAAM,QAAc;GAClB,OAAO,EAAkB,CAAC,YAAY,oBAAoB;IAC1D,EACF,MAAM,EAAU,MAAM,EAAe,EACrC,MAAM,QAAc;GAClB,OAAO,EAAkB,CAAC,IAAI,YAAY,oBAAoB;IAC9D;GACF,EAEF,GAAG,gDAAgD,YAAY;EAC7D,EACE,kBAAC,GAAD;GAAY,OAAM;GAAkB,SAAQ;GAAa,UAAS;aAC/D,EAAY,KAAK,MAAW,EAAO;GACzB,CAAA,CACd;EACD,IAAM,IAAiB,EAAO,UAAU,kBAAkB,EACpD,IAAoB,EAAO,UAAU,OAAO;EAIlD,AAHA,OAAO,EAAe,CAAC,mBAAmB,EAC1C,OAAO,EAAkB,CAAC,mBAAmB,EAC7C,MAAM,EAAU,MAAM,EAAe,EACrC,MAAM,QAAc;GAClB,OAAO,EAAkB,CAAC,YAAY,oBAAoB;IAC1D;EACF,IAAM,IAAe,EAAO,UAAU,gBAAgB;EAGtD,AAFA,MAAM,EAAU,MAAM,EAAa,EACnC,OAAO,EAAW,CAAC,sBAAsB,EAAE,EAC3C,MAAM,QAAc;GAClB,OAAO,EAAkB,CAAC,IAAI,YAAY,oBAAoB;IAC9D;GACF;EACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { t as e } from "../../AppStatusBar-Bca0KFDR.js";
|
|
3
|
-
import { i as t, n } from "../../react.esm-
|
|
3
|
+
import { i as t, n } from "../../react.esm-CweFe1CK.js";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/AppStatusBar/AppStatusBar.test.tsx
|
|
6
6
|
describe("AppStatusBar", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppStatusBar.test.js","names":[],"sources":["../../../src/components/AppStatusBar/AppStatusBar.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { AppStatusBar } from './AppStatusBar';\n\ndescribe('AppStatusBar', () => {\n it('should render', () => {\n render(<AppStatusBar message=\"AppStatusBar message\" severity=\"info\" />);\n expect(screen.getByText('AppStatusBar message')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;AAKA,SAAS,sBAAsB;
|
|
1
|
+
{"version":3,"file":"AppStatusBar.test.js","names":[],"sources":["../../../src/components/AppStatusBar/AppStatusBar.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { AppStatusBar } from './AppStatusBar';\n\ndescribe('AppStatusBar', () => {\n it('should render', () => {\n render(<AppStatusBar message=\"AppStatusBar message\" severity=\"info\" />);\n expect(screen.getByText('AppStatusBar message')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;AAKA,SAAS,sBAAsB;CAC7B,GAAG,uBAAuB;EAExB,AADA,EAAO,kBAAC,GAAD;GAAc,SAAQ;GAAuB,UAAS;GAAS,CAAA,CAAC,EACvE,OAAO,EAAO,UAAU,uBAAuB,CAAC,CAAC,mBAAmB;GACpE;EACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { t as e } from "../../Attention-Bq5UU9I8.js";
|
|
3
|
-
import { i as t, n } from "../../react.esm-
|
|
3
|
+
import { i as t, n } from "../../react.esm-CweFe1CK.js";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/Attention/Attention.test.tsx
|
|
6
6
|
describe("Attention", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Attention.test.js","names":[],"sources":["../../../src/components/Attention/Attention.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Attention } from './Attention';\n\ndescribe('Attention', () => {\n it('should render (variant primary)', () => {\n render(<Attention>Attention message</Attention>);\n expect(screen.getByText('Attention message')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;AAKA,SAAS,mBAAmB;
|
|
1
|
+
{"version":3,"file":"Attention.test.js","names":[],"sources":["../../../src/components/Attention/Attention.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Attention } from './Attention';\n\ndescribe('Attention', () => {\n it('should render (variant primary)', () => {\n render(<Attention>Attention message</Attention>);\n expect(screen.getByText('Attention message')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;AAKA,SAAS,mBAAmB;CAC1B,GAAG,yCAAyC;EAE1C,AADA,EAAO,kBAAC,GAAD,EAAA,UAAW,qBAA6B,CAAA,CAAC,EAChD,OAAO,EAAO,UAAU,oBAAoB,CAAC,CAAC,mBAAmB;GACjE;EACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { t as e } from "../../Backdrop-D8AHeuBn.js";
|
|
3
|
-
import { i as t, n } from "../../react.esm-
|
|
3
|
+
import { i as t, n } from "../../react.esm-CweFe1CK.js";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/Backdrop/Backdrop.test.tsx
|
|
6
6
|
describe("Backdrop", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Backdrop.test.js","names":[],"sources":["../../../src/components/Backdrop/Backdrop.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Backdrop } from './Backdrop';\n\ndescribe('Backdrop', () => {\n it('should render', () => {\n render(<Backdrop>Backdrop overlay</Backdrop>);\n expect(screen.getByText('Backdrop overlay')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;AAKA,SAAS,kBAAkB;
|
|
1
|
+
{"version":3,"file":"Backdrop.test.js","names":[],"sources":["../../../src/components/Backdrop/Backdrop.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Backdrop } from './Backdrop';\n\ndescribe('Backdrop', () => {\n it('should render', () => {\n render(<Backdrop>Backdrop overlay</Backdrop>);\n expect(screen.getByText('Backdrop overlay')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;AAKA,SAAS,kBAAkB;CACzB,GAAG,uBAAuB;EAExB,AADA,EAAO,kBAAC,GAAD,EAAA,UAAU,oBAA2B,CAAA,CAAC,EAC7C,OAAO,EAAO,UAAU,mBAAmB,CAAC,CAAC,mBAAmB;GAChE;EACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { Button as e } from "./Button.js";
|
|
3
|
-
import { i as t, n, t as r } from "../../react.esm-
|
|
3
|
+
import { i as t, n, t as r } from "../../react.esm-CweFe1CK.js";
|
|
4
4
|
import { jsx as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/Buttons/Button.test.tsx
|
|
6
6
|
var a = jest.fn();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.test.js","names":[],"sources":["../../../src/components/Buttons/Button.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen } from '@testing-library/react';\n\nimport { Button } from './Button';\n\nconst onClickSpy = jest.fn();\n\ndescribe('Button', () => {\n it('should render primary', () => {\n render(<Button variant=\"primary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n });\n\n it('should render secondary', () => {\n render(<Button variant=\"secondary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--secondary');\n });\n\n it('should render destructive-primary', () => {\n render(<Button variant=\"destructive-primary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--destructive-primary');\n });\n\n it('should render destructive-secondary', () => {\n render(<Button variant=\"destructive-secondary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--destructive-secondary');\n });\n\n it('should render blank', () => {\n render(<Button variant=\"blank\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--blank');\n });\n\n it('should render as column', () => {\n render(\n <Button variant=\"primary\" displayColumn>\n Test Button\n </Button>\n );\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--wide-column');\n });\n\n it('should render disabled', () => {\n render(\n <Button variant=\"primary\" disabled>\n Test Button\n </Button>\n );\n const button = screen.getByText('Test Button');\n expect(button).toBeInTheDocument();\n expect(button).toHaveAttribute('disabled');\n fireEvent.click(button);\n expect(onClickSpy).toHaveBeenCalledTimes(0);\n });\n\n it('should call onClick when clicked', () => {\n render(\n <Button variant=\"primary\" onClick={onClickSpy}>\n Test Button\n </Button>\n );\n const button = screen.getByText('Test Button');\n expect(button).toBeInTheDocument();\n fireEvent.click(button);\n expect(onClickSpy).toHaveBeenCalledTimes(1);\n });\n});\n"],"mappings":";;;;;AAKA,IAAM,IAAa,KAAK,IAAI;AAE5B,SAAS,gBAAgB;
|
|
1
|
+
{"version":3,"file":"Button.test.js","names":[],"sources":["../../../src/components/Buttons/Button.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen } from '@testing-library/react';\n\nimport { Button } from './Button';\n\nconst onClickSpy = jest.fn();\n\ndescribe('Button', () => {\n it('should render primary', () => {\n render(<Button variant=\"primary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n });\n\n it('should render secondary', () => {\n render(<Button variant=\"secondary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--secondary');\n });\n\n it('should render destructive-primary', () => {\n render(<Button variant=\"destructive-primary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--destructive-primary');\n });\n\n it('should render destructive-secondary', () => {\n render(<Button variant=\"destructive-secondary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--destructive-secondary');\n });\n\n it('should render blank', () => {\n render(<Button variant=\"blank\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--blank');\n });\n\n it('should render as column', () => {\n render(\n <Button variant=\"primary\" displayColumn>\n Test Button\n </Button>\n );\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--wide-column');\n });\n\n it('should render disabled', () => {\n render(\n <Button variant=\"primary\" disabled>\n Test Button\n </Button>\n );\n const button = screen.getByText('Test Button');\n expect(button).toBeInTheDocument();\n expect(button).toHaveAttribute('disabled');\n fireEvent.click(button);\n expect(onClickSpy).toHaveBeenCalledTimes(0);\n });\n\n it('should call onClick when clicked', () => {\n render(\n <Button variant=\"primary\" onClick={onClickSpy}>\n Test Button\n </Button>\n );\n const button = screen.getByText('Test Button');\n expect(button).toBeInTheDocument();\n fireEvent.click(button);\n expect(onClickSpy).toHaveBeenCalledTimes(1);\n });\n});\n"],"mappings":";;;;;AAKA,IAAM,IAAa,KAAK,IAAI;AAE5B,SAAS,gBAAgB;CAqDvB,AApDA,GAAG,+BAA+B;EAEhC,AADA,EAAO,kBAAC,GAAD;GAAQ,SAAQ;aAAU;GAAoB,CAAA,CAAC,EACtD,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,mBAAmB;GAC3D,EAEF,GAAG,iCAAiC;EAGlC,AAFA,EAAO,kBAAC,GAAD;GAAQ,SAAQ;aAAY;GAAoB,CAAA,CAAC,EACxD,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,mBAAmB,EAC3D,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,YAAY,oBAAoB;GACxE,EAEF,GAAG,2CAA2C;EAG5C,AAFA,EAAO,kBAAC,GAAD;GAAQ,SAAQ;aAAsB;GAAoB,CAAA,CAAC,EAClE,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,mBAAmB,EAC3D,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,YAAY,8BAA8B;GAClF,EAEF,GAAG,6CAA6C;EAG9C,AAFA,EAAO,kBAAC,GAAD;GAAQ,SAAQ;aAAwB;GAAoB,CAAA,CAAC,EACpE,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,mBAAmB,EAC3D,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,YAAY,gCAAgC;GACpF,EAEF,GAAG,6BAA6B;EAG9B,AAFA,EAAO,kBAAC,GAAD;GAAQ,SAAQ;aAAQ;GAAoB,CAAA,CAAC,EACpD,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,mBAAmB,EAC3D,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,YAAY,gBAAgB;GACpE,EAEF,GAAG,iCAAiC;EAOlC,AANA,EACE,kBAAC,GAAD;GAAQ,SAAQ;GAAU,eAAA;aAAc;GAE/B,CAAA,CACV,EACD,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,mBAAmB,EAC3D,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,YAAY,sBAAsB;GAC1E,EAEF,GAAG,gCAAgC;EACjC,EACE,kBAAC,GAAD;GAAQ,SAAQ;GAAU,UAAA;aAAS;GAE1B,CAAA,CACV;EACD,IAAM,IAAS,EAAO,UAAU,cAAc;EAI9C,AAHA,OAAO,EAAO,CAAC,mBAAmB,EAClC,OAAO,EAAO,CAAC,gBAAgB,WAAW,EAC1C,EAAU,MAAM,EAAO,EACvB,OAAO,EAAW,CAAC,sBAAsB,EAAE;GAC3C,EAEF,GAAG,0CAA0C;EAC3C,EACE,kBAAC,GAAD;GAAQ,SAAQ;GAAU,SAAS;aAAY;GAEtC,CAAA,CACV;EACD,IAAM,IAAS,EAAO,UAAU,cAAc;EAG9C,AAFA,OAAO,EAAO,CAAC,mBAAmB,EAClC,EAAU,MAAM,EAAO,EACvB,OAAO,EAAW,CAAC,sBAAsB,EAAE;GAC3C;EACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { LinkButton as e } from "./LinkButton.js";
|
|
3
|
-
import { i as t, n, t as r } from "../../react.esm-
|
|
3
|
+
import { i as t, n, t as r } from "../../react.esm-CweFe1CK.js";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
import { BrowserRouter as o, Route as s, Routes as c } from "react-router";
|
|
6
6
|
//#region src/components/Buttons/LinkButton.test.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkButton.test.js","names":[],"sources":["../../../src/components/Buttons/LinkButton.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen } from '@testing-library/react';\nimport { BrowserRouter, Routes, Route } from 'react-router';\n\nimport type { ReactNode } from 'react';\n\nimport { LinkButton } from './LinkButton';\n\nconst routerContainer = ({ children }: { children: ReactNode }) => (\n <BrowserRouter>\n <Routes>\n <Route path={`/`} element={<div>Test route</div>} />\n </Routes>\n {children}\n </BrowserRouter>\n);\n\ndescribe('LinkButton', () => {\n it('should render', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"primary\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n });\n\n it('should render primary', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"primary\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--primary');\n });\n\n it('should render secondary', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"secondary\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--secondary');\n });\n\n it('should render destructive-primary', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"destructive-primary\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--destructive-primary');\n });\n\n it('should render destructive-secondary', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"destructive-secondary\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--destructive-secondary');\n });\n\n it('should render blank', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"blank\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--blank');\n });\n\n it('should render blank-subtle', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"blank-subtle\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--blank-subtle');\n });\n\n it('should render blank-icon', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"blank-icon\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--blank-icon');\n });\n\n it('should goto route when clicked', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"primary\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n fireEvent.click(screen.getByText('Test LinkButton'));\n expect(screen.getByText('Test route')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;;AAQA,IAAM,KAAmB,EAAE,kBACzB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;CAAO,MAAM;CAAK,SAAS,kBAAC,OAAD,EAAA,UAAK,cAAgB,CAAA;CAAI,CAAA,EAC7C,CAAA,EACR,EACa,EAAA,CAAA;AAGlB,SAAS,oBAAoB;
|
|
1
|
+
{"version":3,"file":"LinkButton.test.js","names":[],"sources":["../../../src/components/Buttons/LinkButton.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen } from '@testing-library/react';\nimport { BrowserRouter, Routes, Route } from 'react-router';\n\nimport type { ReactNode } from 'react';\n\nimport { LinkButton } from './LinkButton';\n\nconst routerContainer = ({ children }: { children: ReactNode }) => (\n <BrowserRouter>\n <Routes>\n <Route path={`/`} element={<div>Test route</div>} />\n </Routes>\n {children}\n </BrowserRouter>\n);\n\ndescribe('LinkButton', () => {\n it('should render', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"primary\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n });\n\n it('should render primary', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"primary\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--primary');\n });\n\n it('should render secondary', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"secondary\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--secondary');\n });\n\n it('should render destructive-primary', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"destructive-primary\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--destructive-primary');\n });\n\n it('should render destructive-secondary', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"destructive-secondary\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--destructive-secondary');\n });\n\n it('should render blank', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"blank\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--blank');\n });\n\n it('should render blank-subtle', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"blank-subtle\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--blank-subtle');\n });\n\n it('should render blank-icon', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"blank-icon\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n expect(screen.getByText('Test LinkButton')).toBeInTheDocument();\n expect(screen.getByText('Test LinkButton')).toHaveClass('button--blank-icon');\n });\n\n it('should goto route when clicked', () => {\n render(\n routerContainer({\n children: (\n <LinkButton variant=\"primary\" to={'/'}>\n Test LinkButton\n </LinkButton>\n ),\n })\n );\n fireEvent.click(screen.getByText('Test LinkButton'));\n expect(screen.getByText('Test route')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;;AAQA,IAAM,KAAmB,EAAE,kBACzB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;CAAO,MAAM;CAAK,SAAS,kBAAC,OAAD,EAAA,UAAK,cAAgB,CAAA;CAAI,CAAA,EAC7C,CAAA,EACR,EACa,EAAA,CAAA;AAGlB,SAAS,oBAAoB;CAgH3B,AA/GA,GAAG,uBAAuB;EAUxB,AATA,EACE,EAAgB,EACd,UACE,kBAAC,GAAD;GAAY,SAAQ;GAAU,IAAI;aAAK;GAE1B,CAAA,EAEhB,CAAC,CACH,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB;GAC/D,EAEF,GAAG,+BAA+B;EAWhC,AAVA,EACE,EAAgB,EACd,UACE,kBAAC,GAAD;GAAY,SAAQ;GAAU,IAAI;aAAK;GAE1B,CAAA,EAEhB,CAAC,CACH,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,kBAAkB;GAC1E,EAEF,GAAG,iCAAiC;EAWlC,AAVA,EACE,EAAgB,EACd,UACE,kBAAC,GAAD;GAAY,SAAQ;GAAY,IAAI;aAAK;GAE5B,CAAA,EAEhB,CAAC,CACH,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,oBAAoB;GAC5E,EAEF,GAAG,2CAA2C;EAW5C,AAVA,EACE,EAAgB,EACd,UACE,kBAAC,GAAD;GAAY,SAAQ;GAAsB,IAAI;aAAK;GAEtC,CAAA,EAEhB,CAAC,CACH,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,8BAA8B;GACtF,EAEF,GAAG,6CAA6C;EAW9C,AAVA,EACE,EAAgB,EACd,UACE,kBAAC,GAAD;GAAY,SAAQ;GAAwB,IAAI;aAAK;GAExC,CAAA,EAEhB,CAAC,CACH,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,gCAAgC;GACxF,EAEF,GAAG,6BAA6B;EAW9B,AAVA,EACE,EAAgB,EACd,UACE,kBAAC,GAAD;GAAY,SAAQ;GAAQ,IAAI;aAAK;GAExB,CAAA,EAEhB,CAAC,CACH,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,gBAAgB;GACxE,EAEF,GAAG,oCAAoC;EAWrC,AAVA,EACE,EAAgB,EACd,UACE,kBAAC,GAAD;GAAY,SAAQ;GAAe,IAAI;aAAK;GAE/B,CAAA,EAEhB,CAAC,CACH,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,uBAAuB;GAC/E,EAEF,GAAG,kCAAkC;EAWnC,AAVA,EACE,EAAgB,EACd,UACE,kBAAC,GAAD;GAAY,SAAQ;GAAa,IAAI;aAAK;GAE7B,CAAA,EAEhB,CAAC,CACH,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,qBAAqB;GAC7E,EAEF,GAAG,wCAAwC;EAWzC,AAVA,EACE,EAAgB,EACd,UACE,kBAAC,GAAD;GAAY,SAAQ;GAAU,IAAI;aAAK;GAE1B,CAAA,EAEhB,CAAC,CACH,EACD,EAAU,MAAM,EAAO,UAAU,kBAAkB,CAAC,EACpD,OAAO,EAAO,UAAU,aAAa,CAAC,CAAC,mBAAmB;GAC1D;EACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.js","names":[],"sources":["../../../src/components/Buttons/MenuButton.tsx"],"sourcesContent":["import { useButton } from '@react-aria/button';\nimport { clsx } from 'clsx';\n\nimport type { AriaButtonProps } from '@react-aria/button';\nimport type { IconProps } from 'components/Icon';\nimport type { RefObject } from 'react';\nimport type { UIButtonVariant } from 'types/UserInterface';\n\nimport { Icon } from 'components/Icon';\nimport styles from 'components/Buttons/Button.module.css';\n\nexport interface MenuButtonProps extends AriaButtonProps<'button'> {\n buttonRef: RefObject<HTMLButtonElement>;\n /** The variant of the button. */\n variant: UIButtonVariant;\n /** The icon to show. */\n iconName?: IconProps['name'];\n}\n\n/** Represents a button that is used to open a menu. */\nexport function MenuButton({ buttonRef, variant, iconName, children, ...restProps }: MenuButtonProps) {\n const { buttonProps } = useButton(restProps, buttonRef);\n\n return (\n <button {...buttonProps} ref={buttonRef} className={clsx(styles['button'], styles[`button--${variant}`])}>\n {children}\n {iconName && <Icon name={iconName} />}\n </button>\n );\n}\n"],"mappings":";;;;;;AAoBA,SAAgB,EAAW,EAAE,cAAW,YAAS,aAAU,aAAU,GAAG,KAA8B;CACpG,IAAM,EAAE,mBAAgB,EAAU,GAAW,EAAU;
|
|
1
|
+
{"version":3,"file":"MenuButton.js","names":[],"sources":["../../../src/components/Buttons/MenuButton.tsx"],"sourcesContent":["import { useButton } from '@react-aria/button';\nimport { clsx } from 'clsx';\n\nimport type { AriaButtonProps } from '@react-aria/button';\nimport type { IconProps } from 'components/Icon';\nimport type { RefObject } from 'react';\nimport type { UIButtonVariant } from 'types/UserInterface';\n\nimport { Icon } from 'components/Icon';\nimport styles from 'components/Buttons/Button.module.css';\n\nexport interface MenuButtonProps extends AriaButtonProps<'button'> {\n buttonRef: RefObject<HTMLButtonElement>;\n /** The variant of the button. */\n variant: UIButtonVariant;\n /** The icon to show. */\n iconName?: IconProps['name'];\n}\n\n/** Represents a button that is used to open a menu. */\nexport function MenuButton({ buttonRef, variant, iconName, children, ...restProps }: MenuButtonProps) {\n const { buttonProps } = useButton(restProps, buttonRef);\n\n return (\n <button {...buttonProps} ref={buttonRef} className={clsx(styles['button'], styles[`button--${variant}`])}>\n {children}\n {iconName && <Icon name={iconName} />}\n </button>\n );\n}\n"],"mappings":";;;;;;AAoBA,SAAgB,EAAW,EAAE,cAAW,YAAS,aAAU,aAAU,GAAG,KAA8B;CACpG,IAAM,EAAE,mBAAgB,EAAU,GAAW,EAAU;CAEvD,OACE,kBAAC,UAAD;EAAQ,GAAI;EAAa,KAAK;EAAW,WAAW,EAAK,EAAO,QAAW,EAAO,WAAW,KAAW;YAAxG,CACG,GACA,KAAY,kBAAC,GAAD,EAAM,MAAM,GAAY,CAAA,CAC9B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { MenuButton as e } from "./MenuButton.js";
|
|
3
|
-
import { i as t, n, t as r } from "../../react.esm-
|
|
3
|
+
import { i as t, n, t as r } from "../../react.esm-CweFe1CK.js";
|
|
4
4
|
import { createRef as i } from "react";
|
|
5
5
|
import { jsx as a } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/Buttons/MenuButton.test.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.test.js","names":[],"sources":["../../../src/components/Buttons/MenuButton.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen } from '@testing-library/react';\nimport { createRef } from 'react';\n\nimport type { RefObject } from 'react';\n\nimport { MenuButton } from './MenuButton';\n\nconst onClickSpy = jest.fn();\n\ndescribe('LinkButton', () => {\n it('should render', () => {\n const testRef = createRef();\n render(\n <MenuButton variant=\"primary\" onClick={onClickSpy} buttonRef={testRef as RefObject<HTMLButtonElement>}>\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n });\n\n it('should render primary', () => {\n const testRef = createRef();\n render(\n <MenuButton variant=\"primary\" onClick={onClickSpy} buttonRef={testRef as RefObject<HTMLButtonElement>}>\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n expect(screen.getByText('Test MenuButton')).toHaveClass('button--primary');\n });\n\n it('should render secondary', () => {\n const testRef = createRef();\n render(\n <MenuButton variant=\"secondary\" onClick={onClickSpy} buttonRef={testRef as RefObject<HTMLButtonElement>}>\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n expect(screen.getByText('Test MenuButton')).toHaveClass('button--secondary');\n });\n\n it('should render destructive-primary', () => {\n const testRef = createRef();\n render(\n <MenuButton\n variant=\"destructive-primary\"\n onClick={onClickSpy}\n buttonRef={testRef as RefObject<HTMLButtonElement>}\n >\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n expect(screen.getByText('Test MenuButton')).toHaveClass('button--destructive-primary');\n });\n\n it('should render destructive-secondary', () => {\n const testRef = createRef();\n render(\n <MenuButton\n variant=\"destructive-secondary\"\n onClick={onClickSpy}\n buttonRef={testRef as RefObject<HTMLButtonElement>}\n >\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n expect(screen.getByText('Test MenuButton')).toHaveClass('button--destructive-secondary');\n });\n\n it('should render blank', () => {\n const testRef = createRef();\n render(\n <MenuButton variant=\"blank\" onClick={onClickSpy} buttonRef={testRef as RefObject<HTMLButtonElement>}>\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n expect(screen.getByText('Test MenuButton')).toHaveClass('button--blank');\n });\n\n it('should render blank-icon', () => {\n const testRef = createRef();\n render(\n <MenuButton variant=\"blank-icon\" onClick={onClickSpy} buttonRef={testRef as RefObject<HTMLButtonElement>}>\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n expect(screen.getByText('Test MenuButton')).toHaveClass('button--blank-icon');\n });\n\n it('should fire when clicked', () => {\n const testRef = createRef();\n render(\n <MenuButton variant=\"blank-icon\" onClick={onClickSpy} buttonRef={testRef as RefObject<HTMLButtonElement>}>\n Test MenuButton\n </MenuButton>\n );\n fireEvent.click(screen.getByText('Test MenuButton'));\n expect(onClickSpy).toHaveBeenCalledTimes(1);\n });\n});\n"],"mappings":";;;;;;AAQA,IAAM,IAAa,KAAK,IAAI;AAE5B,SAAS,oBAAoB;
|
|
1
|
+
{"version":3,"file":"MenuButton.test.js","names":[],"sources":["../../../src/components/Buttons/MenuButton.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen } from '@testing-library/react';\nimport { createRef } from 'react';\n\nimport type { RefObject } from 'react';\n\nimport { MenuButton } from './MenuButton';\n\nconst onClickSpy = jest.fn();\n\ndescribe('LinkButton', () => {\n it('should render', () => {\n const testRef = createRef();\n render(\n <MenuButton variant=\"primary\" onClick={onClickSpy} buttonRef={testRef as RefObject<HTMLButtonElement>}>\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n });\n\n it('should render primary', () => {\n const testRef = createRef();\n render(\n <MenuButton variant=\"primary\" onClick={onClickSpy} buttonRef={testRef as RefObject<HTMLButtonElement>}>\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n expect(screen.getByText('Test MenuButton')).toHaveClass('button--primary');\n });\n\n it('should render secondary', () => {\n const testRef = createRef();\n render(\n <MenuButton variant=\"secondary\" onClick={onClickSpy} buttonRef={testRef as RefObject<HTMLButtonElement>}>\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n expect(screen.getByText('Test MenuButton')).toHaveClass('button--secondary');\n });\n\n it('should render destructive-primary', () => {\n const testRef = createRef();\n render(\n <MenuButton\n variant=\"destructive-primary\"\n onClick={onClickSpy}\n buttonRef={testRef as RefObject<HTMLButtonElement>}\n >\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n expect(screen.getByText('Test MenuButton')).toHaveClass('button--destructive-primary');\n });\n\n it('should render destructive-secondary', () => {\n const testRef = createRef();\n render(\n <MenuButton\n variant=\"destructive-secondary\"\n onClick={onClickSpy}\n buttonRef={testRef as RefObject<HTMLButtonElement>}\n >\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n expect(screen.getByText('Test MenuButton')).toHaveClass('button--destructive-secondary');\n });\n\n it('should render blank', () => {\n const testRef = createRef();\n render(\n <MenuButton variant=\"blank\" onClick={onClickSpy} buttonRef={testRef as RefObject<HTMLButtonElement>}>\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n expect(screen.getByText('Test MenuButton')).toHaveClass('button--blank');\n });\n\n it('should render blank-icon', () => {\n const testRef = createRef();\n render(\n <MenuButton variant=\"blank-icon\" onClick={onClickSpy} buttonRef={testRef as RefObject<HTMLButtonElement>}>\n Test MenuButton\n </MenuButton>\n );\n expect(screen.getByText('Test MenuButton')).toBeInTheDocument();\n expect(screen.getByText('Test MenuButton')).toHaveClass('button--blank-icon');\n });\n\n it('should fire when clicked', () => {\n const testRef = createRef();\n render(\n <MenuButton variant=\"blank-icon\" onClick={onClickSpy} buttonRef={testRef as RefObject<HTMLButtonElement>}>\n Test MenuButton\n </MenuButton>\n );\n fireEvent.click(screen.getByText('Test MenuButton'));\n expect(onClickSpy).toHaveBeenCalledTimes(1);\n });\n});\n"],"mappings":";;;;;;AAQA,IAAM,IAAa,KAAK,IAAI;AAE5B,SAAS,oBAAoB;CAqF3B,AApFA,GAAG,uBAAuB;EAOxB,AALA,EACE,kBAAC,GAAD;GAAY,SAAQ;GAAU,SAAS;GAAY,WAFrC,GAEgD;aAAyC;GAE1F,CAAA,CACd,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB;GAC/D,EAEF,GAAG,+BAA+B;EAQhC,AANA,EACE,kBAAC,GAAD;GAAY,SAAQ;GAAU,SAAS;GAAY,WAFrC,GAEgD;aAAyC;GAE1F,CAAA,CACd,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,kBAAkB;GAC1E,EAEF,GAAG,iCAAiC;EAQlC,AANA,EACE,kBAAC,GAAD;GAAY,SAAQ;GAAY,SAAS;GAAY,WAFvC,GAEkD;aAAyC;GAE5F,CAAA,CACd,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,oBAAoB;GAC5E,EAEF,GAAG,2CAA2C;EAY5C,AAVA,EACE,kBAAC,GAAD;GACE,SAAQ;GACR,SAAS;GACT,WALY,GAKD;aACZ;GAEY,CAAA,CACd,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,8BAA8B;GACtF,EAEF,GAAG,6CAA6C;EAY9C,AAVA,EACE,kBAAC,GAAD;GACE,SAAQ;GACR,SAAS;GACT,WALY,GAKD;aACZ;GAEY,CAAA,CACd,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,gCAAgC;GACxF,EAEF,GAAG,6BAA6B;EAQ9B,AANA,EACE,kBAAC,GAAD;GAAY,SAAQ;GAAQ,SAAS;GAAY,WAFnC,GAE8C;aAAyC;GAExF,CAAA,CACd,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,gBAAgB;GACxE,EAEF,GAAG,kCAAkC;EAQnC,AANA,EACE,kBAAC,GAAD;GAAY,SAAQ;GAAa,SAAS;GAAY,WAFxC,GAEmD;aAAyC;GAE7F,CAAA,CACd,EACD,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,mBAAmB,EAC/D,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,YAAY,qBAAqB;GAC7E,EAEF,GAAG,kCAAkC;EAQnC,AANA,EACE,kBAAC,GAAD;GAAY,SAAQ;GAAa,SAAS;GAAY,WAFxC,GAEmD;aAAyC;GAE7F,CAAA,CACd,EACD,EAAU,MAAM,EAAO,UAAU,kBAAkB,CAAC,EACpD,OAAO,EAAW,CAAC,sBAAsB,EAAE;GAC3C;EACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { t as e } from "../../Card-DMFyuTmy.js";
|
|
3
|
-
import { i as t, n } from "../../react.esm-
|
|
3
|
+
import { i as t, n } from "../../react.esm-CweFe1CK.js";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/Card/Card.test.tsx
|
|
6
6
|
describe("Card", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.test.js","names":[],"sources":["../../../src/components/Card/Card.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Card } from './Card';\n\ndescribe('Card', () => {\n it('should render', () => {\n render(<Card header=\"Header Card\" />);\n expect(screen.getByText('Header Card')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;AAKA,SAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"Card.test.js","names":[],"sources":["../../../src/components/Card/Card.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Card } from './Card';\n\ndescribe('Card', () => {\n it('should render', () => {\n render(<Card header=\"Header Card\" />);\n expect(screen.getByText('Header Card')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;AAKA,SAAS,cAAc;CACrB,GAAG,uBAAuB;EAExB,AADA,EAAO,kBAAC,GAAD,EAAM,QAAO,eAAgB,CAAA,CAAC,EACrC,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,mBAAmB;GAC3D;EACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { t as e } from "../../Checkbox-D6-b_4dC.js";
|
|
3
|
-
import { i as t, n } from "../../react.esm-
|
|
4
|
-
import { t as r } from "../../esm-
|
|
3
|
+
import { i as t, n } from "../../react.esm-CweFe1CK.js";
|
|
4
|
+
import { t as r } from "../../esm-BoujHjK5.js";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/Checkbox/Checkbox.test.tsx
|
|
7
7
|
describe("Checkbox", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.test.js","names":[],"sources":["../../../src/components/Checkbox/Checkbox.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { Checkbox } from './Checkbox';\n\ndescribe('Checkbox', () => {\n it('should render', () => {\n render(<Checkbox id=\"test-checkbox\" />);\n const checkbox = screen.getByRole('checkbox');\n expect(checkbox).toBeInTheDocument();\n });\n\n it('should be checked if clicked', async () => {\n render(<Checkbox id=\"test-checkbox\" />);\n const checkbox = screen.getByRole('checkbox');\n expect(checkbox).toBeInTheDocument();\n await userEvent.click(checkbox);\n expect(checkbox).toBeChecked();\n });\n});\n"],"mappings":";;;;;;AAMA,SAAS,kBAAkB;
|
|
1
|
+
{"version":3,"file":"Checkbox.test.js","names":[],"sources":["../../../src/components/Checkbox/Checkbox.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { Checkbox } from './Checkbox';\n\ndescribe('Checkbox', () => {\n it('should render', () => {\n render(<Checkbox id=\"test-checkbox\" />);\n const checkbox = screen.getByRole('checkbox');\n expect(checkbox).toBeInTheDocument();\n });\n\n it('should be checked if clicked', async () => {\n render(<Checkbox id=\"test-checkbox\" />);\n const checkbox = screen.getByRole('checkbox');\n expect(checkbox).toBeInTheDocument();\n await userEvent.click(checkbox);\n expect(checkbox).toBeChecked();\n });\n});\n"],"mappings":";;;;;;AAMA,SAAS,kBAAkB;CAOzB,AANA,GAAG,uBAAuB;EACxB,EAAO,kBAAC,GAAD,EAAU,IAAG,iBAAkB,CAAA,CAAC;EACvC,IAAM,IAAW,EAAO,UAAU,WAAW;EAC7C,OAAO,EAAS,CAAC,mBAAmB;GACpC,EAEF,GAAG,gCAAgC,YAAY;EAC7C,EAAO,kBAAC,GAAD,EAAU,IAAG,iBAAkB,CAAA,CAAC;EACvC,IAAM,IAAW,EAAO,UAAU,WAAW;EAG7C,AAFA,OAAO,EAAS,CAAC,mBAAmB,EACpC,MAAM,EAAU,MAAM,EAAS,EAC/B,OAAO,EAAS,CAAC,aAAa;GAC9B;EACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { t as e } from "../../CheckboxButtonBar-5UMIFMKH.js";
|
|
3
|
-
import { i as t, n } from "../../react.esm-
|
|
3
|
+
import { i as t, n } from "../../react.esm-CweFe1CK.js";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/CheckboxButtonBar/CheckboxButtonBar.test.tsx
|
|
6
6
|
var i = jest.fn(), a = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxButtonBar.test.js","names":[],"sources":["../../../src/components/CheckboxButtonBar/CheckboxButtonBar.test.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-magic-numbers */\nimport '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { CheckboxButtonBar } from './CheckboxButtonBar';\n\nconst onClickSpy = jest.fn();\n\nconst MOCK_CHECKBOXES = [\n {\n label: '1.1',\n value: '1',\n },\n {\n label: '1.2',\n value: '2',\n },\n {\n label: '1.3',\n value: '3',\n },\n];\n\ndescribe('CheckboxButton', () => {\n it('should render', () => {\n render(\n <CheckboxButtonBar\n label=\"Periode\"\n checkboxes={MOCK_CHECKBOXES}\n defaultValues={['1', '2']}\n labelPosition=\"top\"\n onSetValues={onClickSpy}\n />\n );\n expect(screen.getByText('Periode')).toBeInTheDocument();\n const checkbox = screen.getAllByRole('checkbox');\n expect(checkbox).toHaveLength(3);\n });\n\n it('should render required', () => {\n render(\n <CheckboxButtonBar\n label=\"Periode\"\n required={true}\n checkboxes={MOCK_CHECKBOXES}\n defaultValues={['1', '2']}\n labelPosition=\"top\"\n onSetValues={onClickSpy}\n />\n );\n const label = screen.getByText('Periode');\n expect(label).toHaveTextContent('Periode');\n expect(label).toHaveClass('label--required');\n const checkbox = screen.getAllByRole('checkbox');\n expect(checkbox).toHaveLength(3);\n });\n\n it('should render default checked', () => {\n render(\n <CheckboxButtonBar\n label=\"Periode\"\n checkboxes={MOCK_CHECKBOXES}\n defaultValues={['1', '2']}\n labelPosition=\"top\"\n onSetValues={onClickSpy}\n />\n );\n const label = screen.getByText('Periode');\n expect(label).toHaveTextContent('Periode');\n const checkbox = screen.getAllByRole('checkbox');\n expect(checkbox).toHaveLength(3);\n expect(checkbox[0]).toBeChecked();\n expect(checkbox[1]).toBeChecked();\n expect(checkbox[2]).not.toBeChecked();\n });\n\n it('should render notValidatedText and notValid style', () => {\n render(\n <CheckboxButtonBar\n label=\"Periode\"\n notValidatedText=\"Not Valid\"\n checkboxes={MOCK_CHECKBOXES}\n defaultValues={['1', '2']}\n labelPosition=\"top\"\n onSetValues={onClickSpy}\n />\n );\n const label = screen.getByText('Periode');\n expect(label).toHaveTextContent('Periode');\n expect(screen.getByText('Not Valid')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;AAMA,IAAM,IAAa,KAAK,IAAI,EAEtB,IAAkB;CACtB;EACE,OAAO;EACP,OAAO;EACR;CACD;EACE,OAAO;EACP,OAAO;EACR;CACD;EACE,OAAO;EACP,OAAO;EACR;CACF;AAED,SAAS,wBAAwB;
|
|
1
|
+
{"version":3,"file":"CheckboxButtonBar.test.js","names":[],"sources":["../../../src/components/CheckboxButtonBar/CheckboxButtonBar.test.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-magic-numbers */\nimport '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { CheckboxButtonBar } from './CheckboxButtonBar';\n\nconst onClickSpy = jest.fn();\n\nconst MOCK_CHECKBOXES = [\n {\n label: '1.1',\n value: '1',\n },\n {\n label: '1.2',\n value: '2',\n },\n {\n label: '1.3',\n value: '3',\n },\n];\n\ndescribe('CheckboxButton', () => {\n it('should render', () => {\n render(\n <CheckboxButtonBar\n label=\"Periode\"\n checkboxes={MOCK_CHECKBOXES}\n defaultValues={['1', '2']}\n labelPosition=\"top\"\n onSetValues={onClickSpy}\n />\n );\n expect(screen.getByText('Periode')).toBeInTheDocument();\n const checkbox = screen.getAllByRole('checkbox');\n expect(checkbox).toHaveLength(3);\n });\n\n it('should render required', () => {\n render(\n <CheckboxButtonBar\n label=\"Periode\"\n required={true}\n checkboxes={MOCK_CHECKBOXES}\n defaultValues={['1', '2']}\n labelPosition=\"top\"\n onSetValues={onClickSpy}\n />\n );\n const label = screen.getByText('Periode');\n expect(label).toHaveTextContent('Periode');\n expect(label).toHaveClass('label--required');\n const checkbox = screen.getAllByRole('checkbox');\n expect(checkbox).toHaveLength(3);\n });\n\n it('should render default checked', () => {\n render(\n <CheckboxButtonBar\n label=\"Periode\"\n checkboxes={MOCK_CHECKBOXES}\n defaultValues={['1', '2']}\n labelPosition=\"top\"\n onSetValues={onClickSpy}\n />\n );\n const label = screen.getByText('Periode');\n expect(label).toHaveTextContent('Periode');\n const checkbox = screen.getAllByRole('checkbox');\n expect(checkbox).toHaveLength(3);\n expect(checkbox[0]).toBeChecked();\n expect(checkbox[1]).toBeChecked();\n expect(checkbox[2]).not.toBeChecked();\n });\n\n it('should render notValidatedText and notValid style', () => {\n render(\n <CheckboxButtonBar\n label=\"Periode\"\n notValidatedText=\"Not Valid\"\n checkboxes={MOCK_CHECKBOXES}\n defaultValues={['1', '2']}\n labelPosition=\"top\"\n onSetValues={onClickSpy}\n />\n );\n const label = screen.getByText('Periode');\n expect(label).toHaveTextContent('Periode');\n expect(screen.getByText('Not Valid')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;AAMA,IAAM,IAAa,KAAK,IAAI,EAEtB,IAAkB;CACtB;EACE,OAAO;EACP,OAAO;EACR;CACD;EACE,OAAO;EACP,OAAO;EACR;CACD;EACE,OAAO;EACP,OAAO;EACR;CACF;AAED,SAAS,wBAAwB;CAqD/B,AApDA,GAAG,uBAAuB;EAUxB,AATA,EACE,kBAAC,GAAD;GACE,OAAM;GACN,YAAY;GACZ,eAAe,CAAC,KAAK,IAAI;GACzB,eAAc;GACd,aAAa;GACb,CAAA,CACH,EACD,OAAO,EAAO,UAAU,UAAU,CAAC,CAAC,mBAAmB;EACvD,IAAM,IAAW,EAAO,aAAa,WAAW;EAChD,OAAO,EAAS,CAAC,aAAa,EAAE;GAChC,EAEF,GAAG,gCAAgC;EACjC,EACE,kBAAC,GAAD;GACE,OAAM;GACN,UAAU;GACV,YAAY;GACZ,eAAe,CAAC,KAAK,IAAI;GACzB,eAAc;GACd,aAAa;GACb,CAAA,CACH;EACD,IAAM,IAAQ,EAAO,UAAU,UAAU;EAEzC,AADA,OAAO,EAAM,CAAC,kBAAkB,UAAU,EAC1C,OAAO,EAAM,CAAC,YAAY,kBAAkB;EAC5C,IAAM,IAAW,EAAO,aAAa,WAAW;EAChD,OAAO,EAAS,CAAC,aAAa,EAAE;GAChC,EAEF,GAAG,uCAAuC;EACxC,EACE,kBAAC,GAAD;GACE,OAAM;GACN,YAAY;GACZ,eAAe,CAAC,KAAK,IAAI;GACzB,eAAc;GACd,aAAa;GACb,CAAA,CACH;EACD,IAAM,IAAQ,EAAO,UAAU,UAAU;EACzC,OAAO,EAAM,CAAC,kBAAkB,UAAU;EAC1C,IAAM,IAAW,EAAO,aAAa,WAAW;EAIhD,AAHA,OAAO,EAAS,CAAC,aAAa,EAAE,EAChC,OAAO,EAAS,GAAG,CAAC,aAAa,EACjC,OAAO,EAAS,GAAG,CAAC,aAAa,EACjC,OAAO,EAAS,GAAG,CAAC,IAAI,aAAa;GACrC,EAEF,GAAG,2DAA2D;EAC5D,EACE,kBAAC,GAAD;GACE,OAAM;GACN,kBAAiB;GACjB,YAAY;GACZ,eAAe,CAAC,KAAK,IAAI;GACzB,eAAc;GACd,aAAa;GACb,CAAA,CACH;EACD,IAAM,IAAQ,EAAO,UAAU,UAAU;EAEzC,AADA,OAAO,EAAM,CAAC,kBAAkB,UAAU,EAC1C,OAAO,EAAO,UAAU,YAAY,CAAC,CAAC,mBAAmB;GACzD;EACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxTree.stories.js","names":[],"sources":["../../../src/components/CheckboxTree/CheckboxTree.stories.tsx"],"sourcesContent":["import { fn } from 'storybook/test';\nimport { action } from 'storybook/actions';\nimport { useState } from 'react';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { CheckboxLeaf, CheckboxBranch, CheckboxTreeProps } from './CheckboxTree';\n\nimport { CheckboxTree } from './CheckboxTree';\n\nimport { Chip } from 'components/Chip';\n\nconst createPeriodTree = (periodIndices: string[], numberOfPeriods: number, periodPerSemester: number) => {\n const allPeriods = Array.from({ length: numberOfPeriods }, (_, idx) => idx + 1);\n\n const periodValueToLabel = (value: string) => {\n const semester = Math.ceil(parseInt(value) / periodPerSemester);\n const period = semester === periodPerSemester ? '' : `.${parseInt(value) % periodPerSemester || periodPerSemester}`;\n return `${semester}${period}`;\n };\n\n const periodTree = allPeriods.map((periodIndex) => ({\n itemName: periodValueToLabel(String(periodIndex)),\n itemValue: periodIndex,\n disabled: false,\n }));\n\n const periodTreeObject = allPeriods.reduce((periods, currentPeriod, periodIndex) => {\n const semester = Math.ceil(currentPeriod / periodPerSemester);\n if (periodIndices.includes(String(periodIndex + 1))) {\n if (!periods[semester]) {\n periods[semester] = {\n itemName: `Semester ${semester}`,\n children: [],\n };\n }\n periods[semester].children.push({\n ...periodTree[periodIndex],\n itemValue: String(periodTree[periodIndex].itemValue),\n } as CheckboxLeaf);\n }\n return periods;\n }, [] as CheckboxBranch[]);\n\n return periodTreeObject;\n};\n\nconst NUMBER_OF_PERIODS = 7;\nconst PERIOD_PER_SEMESTER = 3;\n\nconst MOCK_CHECKBOX_TREE = createPeriodTree(\n ['1', '2', '3', '4', '5', '6', '7'],\n NUMBER_OF_PERIODS,\n PERIOD_PER_SEMESTER\n);\n\nconst codeString = '<CheckboxTree title={} checkboxTree={} selectedValues={} 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 selectedValues: ['3', '4'],\n onChange: fn(),\n};\n\nconst PERIOD_SEGMENT = 3;\n\nconst periodValueToLabel = (value: string) => {\n const semester = Math.ceil(parseInt(value) / PERIOD_SEGMENT);\n const period = semester === PERIOD_SEGMENT ? '' : `.${parseInt(value) % PERIOD_SEGMENT || PERIOD_SEGMENT}`;\n return `${semester}${period}`;\n};\n\nconst periodLabelToValue = (value: string): string => {\n const [row, col] = value.split('.').map(Number);\n return `${(row - 1) * PERIOD_SEGMENT + (col || 1)}`;\n};\n\nexport const CheckboxTreeWithChips: StoryFn<CheckboxTreeProps> = () => {\n const [activeFilters, setActiveFilters] = useState<string[]>(['5', '4', '1']);\n\n const handleRemoveActiveFilter = (filterToRemove: string) => {\n const newActiveFilters = JSON.parse(JSON.stringify(activeFilters)).filter(\n (filter: string) => filter !== periodLabelToValue(filterToRemove)\n );\n\n setActiveFilters(() => newActiveFilters);\n action('onChange value:')(newActiveFilters);\n };\n\n const handlePeriodChange = (value: string[]) => {\n setActiveFilters([...value]);\n action('onChange value:')(value);\n };\n\n return (\n <div style={{ width: '15rem' }}>\n <div style={{ display: 'flex', flexWrap: 'wrap', gap: '0.5rem', width: '100%', marginBottom: '1rem' }}>\n {activeFilters &&\n activeFilters.map((activeFilter, index) => (\n <Chip\n label={periodValueToLabel(activeFilter)}\n onDelete={handleRemoveActiveFilter}\n key={`${index}_${activeFilter}`}\n />\n ))}\n </div>\n <CheckboxTree\n title=\"Periode\"\n checkboxTree={MOCK_CHECKBOX_TREE}\n selectedValues={activeFilters}\n onChange={handlePeriodChange}\n />\n </div>\n );\n};\n"],"mappings":";;;;;;AAiDA,IAAM,MAtCoB,GAAyB,GAAyB,MAA8B;CACxG,IAAM,IAAa,MAAM,KAAK,EAAE,QAAQ,GAAiB,GAAG,GAAG,MAAQ,IAAM,EAAE,EAEzE,KAAsB,MAAkB;EAC5C,IAAM,IAAW,KAAK,KAAK,SAAS,EAAM,GAAG,EAAkB;
|
|
1
|
+
{"version":3,"file":"CheckboxTree.stories.js","names":[],"sources":["../../../src/components/CheckboxTree/CheckboxTree.stories.tsx"],"sourcesContent":["import { fn } from 'storybook/test';\nimport { action } from 'storybook/actions';\nimport { useState } from 'react';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { CheckboxLeaf, CheckboxBranch, CheckboxTreeProps } from './CheckboxTree';\n\nimport { CheckboxTree } from './CheckboxTree';\n\nimport { Chip } from 'components/Chip';\n\nconst createPeriodTree = (periodIndices: string[], numberOfPeriods: number, periodPerSemester: number) => {\n const allPeriods = Array.from({ length: numberOfPeriods }, (_, idx) => idx + 1);\n\n const periodValueToLabel = (value: string) => {\n const semester = Math.ceil(parseInt(value) / periodPerSemester);\n const period = semester === periodPerSemester ? '' : `.${parseInt(value) % periodPerSemester || periodPerSemester}`;\n return `${semester}${period}`;\n };\n\n const periodTree = allPeriods.map((periodIndex) => ({\n itemName: periodValueToLabel(String(periodIndex)),\n itemValue: periodIndex,\n disabled: false,\n }));\n\n const periodTreeObject = allPeriods.reduce((periods, currentPeriod, periodIndex) => {\n const semester = Math.ceil(currentPeriod / periodPerSemester);\n if (periodIndices.includes(String(periodIndex + 1))) {\n if (!periods[semester]) {\n periods[semester] = {\n itemName: `Semester ${semester}`,\n children: [],\n };\n }\n periods[semester].children.push({\n ...periodTree[periodIndex],\n itemValue: String(periodTree[periodIndex].itemValue),\n } as CheckboxLeaf);\n }\n return periods;\n }, [] as CheckboxBranch[]);\n\n return periodTreeObject;\n};\n\nconst NUMBER_OF_PERIODS = 7;\nconst PERIOD_PER_SEMESTER = 3;\n\nconst MOCK_CHECKBOX_TREE = createPeriodTree(\n ['1', '2', '3', '4', '5', '6', '7'],\n NUMBER_OF_PERIODS,\n PERIOD_PER_SEMESTER\n);\n\nconst codeString = '<CheckboxTree title={} checkboxTree={} selectedValues={} 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 selectedValues: ['3', '4'],\n onChange: fn(),\n};\n\nconst PERIOD_SEGMENT = 3;\n\nconst periodValueToLabel = (value: string) => {\n const semester = Math.ceil(parseInt(value) / PERIOD_SEGMENT);\n const period = semester === PERIOD_SEGMENT ? '' : `.${parseInt(value) % PERIOD_SEGMENT || PERIOD_SEGMENT}`;\n return `${semester}${period}`;\n};\n\nconst periodLabelToValue = (value: string): string => {\n const [row, col] = value.split('.').map(Number);\n return `${(row - 1) * PERIOD_SEGMENT + (col || 1)}`;\n};\n\nexport const CheckboxTreeWithChips: StoryFn<CheckboxTreeProps> = () => {\n const [activeFilters, setActiveFilters] = useState<string[]>(['5', '4', '1']);\n\n const handleRemoveActiveFilter = (filterToRemove: string) => {\n const newActiveFilters = JSON.parse(JSON.stringify(activeFilters)).filter(\n (filter: string) => filter !== periodLabelToValue(filterToRemove)\n );\n\n setActiveFilters(() => newActiveFilters);\n action('onChange value:')(newActiveFilters);\n };\n\n const handlePeriodChange = (value: string[]) => {\n setActiveFilters([...value]);\n action('onChange value:')(value);\n };\n\n return (\n <div style={{ width: '15rem' }}>\n <div style={{ display: 'flex', flexWrap: 'wrap', gap: '0.5rem', width: '100%', marginBottom: '1rem' }}>\n {activeFilters &&\n activeFilters.map((activeFilter, index) => (\n <Chip\n label={periodValueToLabel(activeFilter)}\n onDelete={handleRemoveActiveFilter}\n key={`${index}_${activeFilter}`}\n />\n ))}\n </div>\n <CheckboxTree\n title=\"Periode\"\n checkboxTree={MOCK_CHECKBOX_TREE}\n selectedValues={activeFilters}\n onChange={handlePeriodChange}\n />\n </div>\n );\n};\n"],"mappings":";;;;;;AAiDA,IAAM,MAtCoB,GAAyB,GAAyB,MAA8B;CACxG,IAAM,IAAa,MAAM,KAAK,EAAE,QAAQ,GAAiB,GAAG,GAAG,MAAQ,IAAM,EAAE,EAEzE,KAAsB,MAAkB;EAC5C,IAAM,IAAW,KAAK,KAAK,SAAS,EAAM,GAAG,EAAkB;EAE/D,OAAO,GAAG,IADK,MAAa,IAAoB,KAAK,IAAI,SAAS,EAAM,GAAG,KAAqB;IAI5F,IAAa,EAAW,KAAK,OAAiB;EAClD,UAAU,EAAmB,OAAO,EAAY,CAAC;EACjD,WAAW;EACX,UAAU;EACX,EAAE;CAmBH,OAjByB,EAAW,QAAQ,GAAS,GAAe,MAAgB;EAClF,IAAM,IAAW,KAAK,KAAK,IAAgB,EAAkB;EAa7D,OAZI,EAAc,SAAS,OAAO,IAAc,EAAE,CAAC,KAC5C,EAAQ,OACX,EAAQ,KAAY;GAClB,UAAU,YAAY;GACtB,UAAU,EAAE;GACb,GAEH,EAAQ,GAAU,SAAS,KAAK;GAC9B,GAAG,EAAW;GACd,WAAW,OAAO,EAAW,GAAa,UAAU;GACrD,CAAiB,GAEb;IACN,EAAE,CAEE;GAOP;CAAC;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAI,EACnC,GACA,EACD,EAKD,IAAe;CACb,OAAO;CACP,WAAW;CACX,YAAY;EACV,kBAAkB;EACN;EACb;CACF,EAIY,MAFiC,MAAS,kBAAC,GAAD,EAAc,GAAI,GAAQ,CAAA,EAErC,KAAK,EAAE,CAAC;AACpD,EAAoB,OAAO;CACzB,OAAO;CACP,cAAc;CAEd,gBAAgB,CAAC,KAAK,IAAI;CAC1B,UAAU,GAAI;CACf;AAED,IAAM,IAAiB,GAEjB,KAAsB,MAAkB;CAC5C,IAAM,IAAW,KAAK,KAAK,SAAS,EAAM,GAAG,EAAe;CAE5D,OAAO,GAAG,IADK,MAAa,IAAiB,KAAK,IAAI,SAAS,EAAM,GAAG,KAAkB;GAItF,KAAsB,MAA0B;CACpD,IAAM,CAAC,GAAK,KAAO,EAAM,MAAM,IAAI,CAAC,IAAI,OAAO;CAC/C,OAAO,IAAI,IAAM,KAAK,KAAkB,KAAO;GAGpC,UAA0D;CACrE,IAAM,CAAC,GAAe,KAAoB,EAAmB;EAAC;EAAK;EAAK;EAAI,CAAC,EAEvE,KAA4B,MAA2B;EAC3D,IAAM,IAAmB,KAAK,MAAM,KAAK,UAAU,EAAc,CAAC,CAAC,QAChE,MAAmB,MAAW,EAAmB,EAAe,CAClE;EAGD,AADA,QAAuB,EAAiB,EACxC,EAAO,kBAAkB,CAAC,EAAiB;;CAQ7C,OACE,kBAAC,OAAD;EAAK,OAAO,EAAE,OAAO,SAAS;YAA9B,CACE,kBAAC,OAAD;GAAK,OAAO;IAAE,SAAS;IAAQ,UAAU;IAAQ,KAAK;IAAU,OAAO;IAAQ,cAAc;IAAQ;aAClG,KACC,EAAc,KAAK,GAAc,MAC/B,kBAAC,GAAD;IACE,OAAO,EAAmB,EAAa;IACvC,UAAU;IAEV,EADK,GAAG,EAAM,GAAG,IACjB,CACF;GACA,CAAA,EACN,kBAAC,GAAD;GACE,OAAM;GACN,cAAc;GACd,gBAAgB;GAChB,WArBsB,MAAoB;IAE9C,AADA,EAAiB,CAAC,GAAG,EAAM,CAAC,EAC5B,EAAO,kBAAkB,CAAC,EAAM;;GAoB5B,CAAA,CACE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.stories.js","names":[],"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"],"mappings":";;;;;;;AAiBA,IAAA,IAAe;CACb,OAAO;CACP,WAAW;CACX,UAAU;EACR,QAAQ,EACN,OAAO,EACL,SAAS,IACV,EACF;EACD,SAAS,EACP,OAAO,EACL,SAAS,IACV,EACF;EACD,0BAA0B,EACxB,OAAO,EACL,SAAS,IACV,EACF;EACF;CACD,YAAY;EACV,kBAAkB;EACN;EACb;CACF,EAEK,KAAkC,MAAS;CAC/C,IAAM,CAAC,GAAQ,KAAa,EAAS,GAAM;
|
|
1
|
+
{"version":3,"file":"Drawer.stories.js","names":[],"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"],"mappings":";;;;;;;AAiBA,IAAA,IAAe;CACb,OAAO;CACP,WAAW;CACX,UAAU;EACR,QAAQ,EACN,OAAO,EACL,SAAS,IACV,EACF;EACD,SAAS,EACP,OAAO,EACL,SAAS,IACV,EACF;EACD,0BAA0B,EACxB,OAAO,EACL,SAAS,IACV,EACF;EACF;CACD,YAAY;EACV,kBAAkB;EACN;EACb;CACF,EAEK,KAAkC,MAAS;CAC/C,IAAM,CAAC,GAAQ,KAAa,EAAS,GAAM;CAE3C,OACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;EAAQ,eAAe,EAAU,CAAC,EAAO;EAAE,SAAQ;YAAU;EAEpD,CAAA,EACR,KACC,kBAAC,GAAD;EACE,GAAI;EACI;EACR,gBACE,GAAI,EAAE,EACC,EAAU,CAAC,EAAO;YAE5B;EAEQ,CAAA,CAEK,EAAA,CAAA;GAIhB,IAAoC;CACxC,OAAO;CACP,0BAA0B;CAC3B,EAEY,IAAgB,EAAS,KAAK,EAAE,CAAC;AAC9C,EAAc,OAAO,EACnB,GAAG,GACJ;AAED,IAAa,IAAc,EAAS,KAAK,EAAE,CAAC;AAC5C,EAAY,OAAO;CACjB,GAAG;CACH,SACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;EAAQ,SAAQ;YAAU;EAA+B,CAAA,EACzD,kBAAC,GAAD;EAAQ,SAAQ;YAAY;EAAiC,CAAA,CACjD,EAAA,CAAA;CAEjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackBar.stories.js","names":[],"sources":["../../../src/components/FeedbackBar/FeedbackBar.stories.tsx"],"sourcesContent":["import { useState, type PropsWithChildren } from 'react';\n\nimport type { Meta, StoryFn } from '@storybook/react';\n\nimport { FeedbackBar } from 'components/FeedbackBar';\nimport { Button } from 'components/Buttons';\nimport { Repeater } from 'components/Repeater';\nimport { ButtonGroup } from 'components/ButtonGroup';\n\nconst codeString = '<FeedbackBar>{children}</FeedbackBar>';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/FeedbackBar',\n component: FeedbackBar,\n parameters: {\n inspectComponent: FeedbackBar,\n codeString: codeString,\n },\n} as Meta<PropsWithChildren>;\n\nconst Template: StoryFn<PropsWithChildren> = (args) => {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <Repeater>\n <ButtonGroup>\n <Button variant=\"primary\" onClick={() => setIsOpen(true)}>\n Click to open FeedbackBar\n </Button>\n <Button variant=\"primary\" onClick={() => setIsOpen(false)}>\n Click to reset animation for FeedbackBar\n </Button>\n </ButtonGroup>\n {isOpen && <FeedbackBar {...args} />}\n </Repeater>\n );\n};\n\nexport const FeedbackBarExample = Template.bind({});\nFeedbackBarExample.args = {\n children: 'This is example feedback',\n};\n"],"mappings":";;;;;;AAYA,IAAA,IAAe;CACb,OAAO;CACP,WAAW;CACX,YAAY;EACV,kBAAkB;EACN;EACb;CACF,EAoBY,MAlBiC,MAAS;CACrD,IAAM,CAAC,GAAQ,KAAa,EAAS,GAAM;
|
|
1
|
+
{"version":3,"file":"FeedbackBar.stories.js","names":[],"sources":["../../../src/components/FeedbackBar/FeedbackBar.stories.tsx"],"sourcesContent":["import { useState, type PropsWithChildren } from 'react';\n\nimport type { Meta, StoryFn } from '@storybook/react';\n\nimport { FeedbackBar } from 'components/FeedbackBar';\nimport { Button } from 'components/Buttons';\nimport { Repeater } from 'components/Repeater';\nimport { ButtonGroup } from 'components/ButtonGroup';\n\nconst codeString = '<FeedbackBar>{children}</FeedbackBar>';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/FeedbackBar',\n component: FeedbackBar,\n parameters: {\n inspectComponent: FeedbackBar,\n codeString: codeString,\n },\n} as Meta<PropsWithChildren>;\n\nconst Template: StoryFn<PropsWithChildren> = (args) => {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <Repeater>\n <ButtonGroup>\n <Button variant=\"primary\" onClick={() => setIsOpen(true)}>\n Click to open FeedbackBar\n </Button>\n <Button variant=\"primary\" onClick={() => setIsOpen(false)}>\n Click to reset animation for FeedbackBar\n </Button>\n </ButtonGroup>\n {isOpen && <FeedbackBar {...args} />}\n </Repeater>\n );\n};\n\nexport const FeedbackBarExample = Template.bind({});\nFeedbackBarExample.args = {\n children: 'This is example feedback',\n};\n"],"mappings":";;;;;;AAYA,IAAA,IAAe;CACb,OAAO;CACP,WAAW;CACX,YAAY;EACV,kBAAkB;EACN;EACb;CACF,EAoBY,MAlBiC,MAAS;CACrD,IAAM,CAAC,GAAQ,KAAa,EAAS,GAAM;CAE3C,OACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;EAAQ,SAAQ;EAAU,eAAe,EAAU,GAAK;YAAE;EAEjD,CAAA,EACT,kBAAC,GAAD;EAAQ,SAAQ;EAAU,eAAe,EAAU,GAAM;YAAE;EAElD,CAAA,CACG,EAAA,CAAA,EACb,KAAU,kBAAC,GAAD,EAAa,GAAI,GAAQ,CAAA,CAC3B,EAAA,CAAA;GAI4B,KAAK,EAAE,CAAC;AACnD,EAAmB,OAAO,EACxB,UAAU,4BACX"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { t as e } from "../../FeedbackBar-ByKp32HE.js";
|
|
3
|
-
import { i as t, n, t as r } from "../../react.esm-
|
|
3
|
+
import { i as t, n, t as r } from "../../react.esm-CweFe1CK.js";
|
|
4
4
|
import { jsx as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/FeedbackBar/FeedbackBar.test.tsx
|
|
6
6
|
describe("FeedbackBar", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackBar.test.js","names":[],"sources":["../../../src/components/FeedbackBar/FeedbackBar.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen } from '@testing-library/react';\n\nimport { FeedbackBar } from './FeedbackBar';\n\ndescribe('FeedbackBar', () => {\n it('should render with children text', () => {\n render(<FeedbackBar>My feedback message</FeedbackBar>);\n expect(screen.getByText('My feedback message')).toBeInTheDocument();\n });\n\n it('should close when the close button is clicked', () => {\n render(<FeedbackBar>My closed feedback message</FeedbackBar>);\n\n expect(screen.getByRole('alert')).toHaveClass('feedback-bar--visible');\n\n const closeButton = screen.getByRole('button');\n fireEvent.click(closeButton);\n\n expect(screen.getByRole('alert')).not.toHaveClass('feedback-bar--visible');\n });\n});\n"],"mappings":";;;;;AAKA,SAAS,qBAAqB;
|
|
1
|
+
{"version":3,"file":"FeedbackBar.test.js","names":[],"sources":["../../../src/components/FeedbackBar/FeedbackBar.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen } from '@testing-library/react';\n\nimport { FeedbackBar } from './FeedbackBar';\n\ndescribe('FeedbackBar', () => {\n it('should render with children text', () => {\n render(<FeedbackBar>My feedback message</FeedbackBar>);\n expect(screen.getByText('My feedback message')).toBeInTheDocument();\n });\n\n it('should close when the close button is clicked', () => {\n render(<FeedbackBar>My closed feedback message</FeedbackBar>);\n\n expect(screen.getByRole('alert')).toHaveClass('feedback-bar--visible');\n\n const closeButton = screen.getByRole('button');\n fireEvent.click(closeButton);\n\n expect(screen.getByRole('alert')).not.toHaveClass('feedback-bar--visible');\n });\n});\n"],"mappings":";;;;;AAKA,SAAS,qBAAqB;CAM5B,AALA,GAAG,0CAA0C;EAE3C,AADA,EAAO,kBAAC,GAAD,EAAA,UAAa,uBAAiC,CAAA,CAAC,EACtD,OAAO,EAAO,UAAU,sBAAsB,CAAC,CAAC,mBAAmB;GACnE,EAEF,GAAG,uDAAuD;EAGxD,AAFA,EAAO,kBAAC,GAAD,EAAA,UAAa,8BAAwC,CAAA,CAAC,EAE7D,OAAO,EAAO,UAAU,QAAQ,CAAC,CAAC,YAAY,wBAAwB;EAEtE,IAAM,IAAc,EAAO,UAAU,SAAS;EAG9C,AAFA,EAAU,MAAM,EAAY,EAE5B,OAAO,EAAO,UAAU,QAAQ,CAAC,CAAC,IAAI,YAAY,wBAAwB;GAC1E;EACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","names":[],"sources":["../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import type { ReactNode, SVGAttributes } from 'react';\n\nimport { Icons } from './icons';\n\ntype IconName = keyof typeof Icons;\n\nexport interface IconProps extends Omit<SVGAttributes<SVGElement>, 'height' | 'width'> {\n /** The name of the icon to render. */\n name: IconName;\n /** The size (in pixels) of the icon to render. */\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n size?: 16 | 20 | 24 | 32 | 48 | 64 | 96 | 128;\n /** The title used for a tooltip. */\n title?: string;\n}\n\nconst defaultSize = 24;\n\n/** Represents a component to render an icon. */\nexport const Icon = ({ name, size = defaultSize, title, ...restProps }: IconProps): ReactNode => {\n const Icon = Icons[name];\n\n return <Icon aria-hidden={true} height={size} width={size} title={title} {...restProps} />;\n};\n"],"mappings":";;;AAgBA,IAAM,IAAc,IAGP,KAAQ,EAAE,SAAM,UAAO,GAAa,UAAO,GAAG,QAAsC;CAC/F,IAAM,IAAO,EAAM;
|
|
1
|
+
{"version":3,"file":"Icon.js","names":[],"sources":["../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import type { ReactNode, SVGAttributes } from 'react';\n\nimport { Icons } from './icons';\n\ntype IconName = keyof typeof Icons;\n\nexport interface IconProps extends Omit<SVGAttributes<SVGElement>, 'height' | 'width'> {\n /** The name of the icon to render. */\n name: IconName;\n /** The size (in pixels) of the icon to render. */\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n size?: 16 | 20 | 24 | 32 | 48 | 64 | 96 | 128;\n /** The title used for a tooltip. */\n title?: string;\n}\n\nconst defaultSize = 24;\n\n/** Represents a component to render an icon. */\nexport const Icon = ({ name, size = defaultSize, title, ...restProps }: IconProps): ReactNode => {\n const Icon = Icons[name];\n\n return <Icon aria-hidden={true} height={size} width={size} title={title} {...restProps} />;\n};\n"],"mappings":";;;AAgBA,IAAM,IAAc,IAGP,KAAQ,EAAE,SAAM,UAAO,GAAa,UAAO,GAAG,QAAsC;CAC/F,IAAM,IAAO,EAAM;CAEnB,OAAO,kBAAC,GAAD;EAAM,eAAa;EAAM,QAAQ;EAAM,OAAO;EAAa;EAAO,GAAI;EAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.stories.js","names":[],"sources":["../../../src/components/IconButton/IconButton.stories.tsx"],"sourcesContent":["import { fn } from 'storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { IconButtonProps } from 'components/IconButton';\n\nimport { IconButton } from 'components/IconButton';\nimport { Icon } from 'components/Icon';\n\nconst codeString = `<IconButton variant={variant} aria-label={aria-label} onClick={onClickFunction}>\n <Icon name={iconName} size={size} />\n </IconButton>`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/IconButton',\n component: IconButton,\n argTypes: {\n variant: {\n options: ['destructive'],\n control: { type: 'check' },\n },\n noBorder: {\n control: 'boolean',\n default: false,\n },\n wide: {\n control: 'boolean',\n default: false,\n },\n 'aria-label': {\n table: {\n disable: true,\n },\n },\n type: {\n options: ['button', 'submit', 'reset'],\n control: { type: 'select' },\n },\n children: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: IconButton,\n codeString: codeString,\n },\n} as Meta<IconButtonProps>;\n\nconst Template: StoryFn<IconButtonProps> = (args) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n const iconButtonArgs = { ...args, ...{ variant: variantArray.toString() } } as IconButtonProps;\n\n return <IconButton {...iconButtonArgs} />;\n};\n\nexport const IconButtonExample = Template.bind({});\nIconButtonExample.args = {\n 'aria-label': 'Trash',\n variant: 'destructive',\n noBorder: false,\n wide: false,\n disabled: false,\n children: <Icon name=\"Trash\" />,\n onClick: fn(),\n};\n"],"mappings":";;;;AAaA,IAAA,IAAe;CACb,OAAO;CACP,WAAW;CACX,UAAU;EACR,SAAS;GACP,SAAS,CAAC,cAAc;GACxB,SAAS,EAAE,MAAM,SAAS;GAC3B;EACD,UAAU;GACR,SAAS;GACT,SAAS;GACV;EACD,MAAM;GACJ,SAAS;GACT,SAAS;GACV;EACD,cAAc,EACZ,OAAO,EACL,SAAS,IACV,EACF;EACD,MAAM;GACJ,SAAS;IAAC;IAAU;IAAU;IAAQ;GACtC,SAAS,EAAE,MAAM,UAAU;GAC5B;EACD,UAAU,EACR,OAAO,EACL,SAAS,IACV,EACF;EACF;CACD,YAAY;EACV,kBAAkB;EACN;EACb;CACF,EAUY,MAR+B,MAAS;CAEnD,IAAM,IAAgB,EAAK,WAAmC,EAAE;
|
|
1
|
+
{"version":3,"file":"IconButton.stories.js","names":[],"sources":["../../../src/components/IconButton/IconButton.stories.tsx"],"sourcesContent":["import { fn } from 'storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { IconButtonProps } from 'components/IconButton';\n\nimport { IconButton } from 'components/IconButton';\nimport { Icon } from 'components/Icon';\n\nconst codeString = `<IconButton variant={variant} aria-label={aria-label} onClick={onClickFunction}>\n <Icon name={iconName} size={size} />\n </IconButton>`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/IconButton',\n component: IconButton,\n argTypes: {\n variant: {\n options: ['destructive'],\n control: { type: 'check' },\n },\n noBorder: {\n control: 'boolean',\n default: false,\n },\n wide: {\n control: 'boolean',\n default: false,\n },\n 'aria-label': {\n table: {\n disable: true,\n },\n },\n type: {\n options: ['button', 'submit', 'reset'],\n control: { type: 'select' },\n },\n children: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: IconButton,\n codeString: codeString,\n },\n} as Meta<IconButtonProps>;\n\nconst Template: StoryFn<IconButtonProps> = (args) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n const iconButtonArgs = { ...args, ...{ variant: variantArray.toString() } } as IconButtonProps;\n\n return <IconButton {...iconButtonArgs} />;\n};\n\nexport const IconButtonExample = Template.bind({});\nIconButtonExample.args = {\n 'aria-label': 'Trash',\n variant: 'destructive',\n noBorder: false,\n wide: false,\n disabled: false,\n children: <Icon name=\"Trash\" />,\n onClick: fn(),\n};\n"],"mappings":";;;;AAaA,IAAA,IAAe;CACb,OAAO;CACP,WAAW;CACX,UAAU;EACR,SAAS;GACP,SAAS,CAAC,cAAc;GACxB,SAAS,EAAE,MAAM,SAAS;GAC3B;EACD,UAAU;GACR,SAAS;GACT,SAAS;GACV;EACD,MAAM;GACJ,SAAS;GACT,SAAS;GACV;EACD,cAAc,EACZ,OAAO,EACL,SAAS,IACV,EACF;EACD,MAAM;GACJ,SAAS;IAAC;IAAU;IAAU;IAAQ;GACtC,SAAS,EAAE,MAAM,UAAU;GAC5B;EACD,UAAU,EACR,OAAO,EACL,SAAS,IACV,EACF;EACF;CACD,YAAY;EACV,kBAAkB;EACN;EACb;CACF,EAUY,MAR+B,MAAS;CAEnD,IAAM,IAAgB,EAAK,WAAmC,EAAE;CAGhE,OAAO,kBAAC,GAAD;EAFkB,GAAG;EAAW,SAAS,EAAa,UAAU;EAE9B,CAAA;GAGD,KAAK,EAAE,CAAC;AAClD,EAAkB,OAAO;CACvB,cAAc;CACd,SAAS;CACT,UAAU;CACV,MAAM;CACN,UAAU;CACV,UAAU,kBAAC,GAAD,EAAM,MAAK,SAAU,CAAA;CAC/B,SAAS,GAAI;CACd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.stories.js","names":[],"sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { fn } from 'storybook/test';\n\nimport type { ChangeEvent } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'storyComponents/Container';\nimport { Icon } from 'components';\n\nconst codeString = `\n// Has all HTMLInputElement props available except \"className\" and \"style\" \n<InputField aria-labelledby={aria-labelledby} id={id} onChange={onChangeFunction}\n value={value} type={type} clearTrigger={clearTrigger} />\n`;\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n width: {\n control: 'radio',\n options: [undefined, 'small', 'compact'],\n },\n type: {\n control: 'radio',\n options: ['text', 'password', 'email'],\n },\n background: {\n control: 'check',\n options: ['white'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: InputField,\n codeString: codeString,\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => {\n const [inputValue, setInputValue] = useState<InputFieldProps['value']>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.target.value);\n fn()('handleChange');\n };\n\n const handleClear = () => {\n setInputValue('');\n fn()('handleClear');\n };\n\n return (\n <Container>\n <InputField\n {...transformArgs(args)}\n value={inputValue}\n onChange={handleChange}\n onClear={handleClear}\n ref={inputRef}\n />\n </Container>\n );\n};\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithStringClearTrigger = Template.bind({});\nWithStringClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: 'Clear',\n};\n\nexport const WithIconClearTrigger = Template.bind({});\nWithIconClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: <Icon name=\"Cross\" />,\n};\n"],"mappings":";;;;;;;;AAYA,IAAM,IAAa,sOAMb,KAAiB,MAA0B;CAE/C,IAAM,IAAgB,EAAK,WAAmC,EAAE;
|
|
1
|
+
{"version":3,"file":"InputField.stories.js","names":[],"sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { fn } from 'storybook/test';\n\nimport type { ChangeEvent } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'storyComponents/Container';\nimport { Icon } from 'components';\n\nconst codeString = `\n// Has all HTMLInputElement props available except \"className\" and \"style\" \n<InputField aria-labelledby={aria-labelledby} id={id} onChange={onChangeFunction}\n value={value} type={type} clearTrigger={clearTrigger} />\n`;\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n width: {\n control: 'radio',\n options: [undefined, 'small', 'compact'],\n },\n type: {\n control: 'radio',\n options: ['text', 'password', 'email'],\n },\n background: {\n control: 'check',\n options: ['white'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: InputField,\n codeString: codeString,\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => {\n const [inputValue, setInputValue] = useState<InputFieldProps['value']>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.target.value);\n fn()('handleChange');\n };\n\n const handleClear = () => {\n setInputValue('');\n fn()('handleClear');\n };\n\n return (\n <Container>\n <InputField\n {...transformArgs(args)}\n value={inputValue}\n onChange={handleChange}\n onClear={handleClear}\n ref={inputRef}\n />\n </Container>\n );\n};\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithStringClearTrigger = Template.bind({});\nWithStringClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: 'Clear',\n};\n\nexport const WithIconClearTrigger = Template.bind({});\nWithIconClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: <Icon name=\"Cross\" />,\n};\n"],"mappings":";;;;;;;;AAYA,IAAM,IAAa,sOAMb,KAAiB,MAA0B;CAE/C,IAAM,IAAgB,EAAK,WAAmC,EAAE;CAChE,OAAO;EAAE,GAAG;EAAW,SAAS,EAAa,UAAU;EAAI;GAI7D,IAAe;CACb,OAAO;CACP,WAAW;CACX,UAAU;EACR,SAAS;GACP,SAAS,CAAC,QAAQ;GAClB,SAAS;GACV;EACD,OAAO;GACL,SAAS;GACT,SAAS;IAAC,KAAA;IAAW;IAAS;IAAU;GACzC;EACD,MAAM;GACJ,SAAS;GACT,SAAS;IAAC;IAAQ;IAAY;IAAQ;GACvC;EACD,YAAY;GACV,SAAS;GACT,SAAS,CAAC,QAAQ;GACnB;EACD,IAAI,EACF,SAAS,QACV;EACD,cAAc,EACZ,OAAO,EACL,SAAS,IACV,EACF;EACF;CACD,YAAY;EACV,kBAAkB;EACN;EACb;CACF,EAEK,KAAsC,MAAS;CACnD,IAAM,CAAC,GAAY,KAAiB,EAAmC,GAAG,EACpE,IAAW,EAAyB,KAAK,EAEzC,KAAgB,MAAyC;EAE7D,AADA,EAAc,EAAM,OAAO,MAAM,EACjC,GAAI,CAAC,eAAe;IAGhB,UAAoB;EAExB,AADA,EAAc,GAAG,EACjB,GAAI,CAAC,cAAc;;CAGrB,OACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;EACE,GAAI,EAAc,EAAK;EACvB,OAAO;EACP,UAAU;EACV,SAAS;EACT,KAAK;EACL,CAAA,EACQ,CAAA;GAIV,IAAwC;CAC5C,MAAM;CACN,SAAS,KAAA;CACT,IAAI;CACL,EAEY,IAAoB,EAAS,KAAK,EAAE,CAAC;AAClD,EAAkB,OAAO,EACvB,GAAG,GACJ;AAED,IAAa,IAAyB,EAAS,KAAK,EAAE,CAAC;AACvD,EAAuB,OAAO;CAC5B,GAAG;CACH,cAAc;CACf;AAED,IAAa,IAAuB,EAAS,KAAK,EAAE,CAAC;AACrD,EAAqB,OAAO;CAC1B,GAAG;CACH,cAAc,kBAAC,GAAD,EAAM,MAAK,SAAU,CAAA;CACpC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../dist-V_v3kC0L.js";
|
|
2
2
|
import { t as e } from "../../Label-o0BcWTUS.js";
|
|
3
|
-
import { i as t, n } from "../../react.esm-
|
|
3
|
+
import { i as t, n } from "../../react.esm-CweFe1CK.js";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/Label/Label.test.tsx
|
|
6
6
|
describe("Label", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.test.js","names":[],"sources":["../../../src/components/Label/Label.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Label } from './Label';\n\ndescribe('Label', () => {\n it('should render', () => {\n render(<Label htmlFor=\"testComponent\">Test label</Label>);\n expect(screen.getByText('Test label')).toBeInTheDocument();\n });\n\n it('should render with required', () => {\n render(\n <Label htmlFor=\"testComponent\" required={true}>\n Test label\n </Label>\n );\n expect(screen.getByText('Test label')).toHaveClass('label--required');\n });\n\n it('should render with noFontWeight', () => {\n render(\n <Label htmlFor=\"testComponent\" noFontWeight={true}>\n Test label\n </Label>\n );\n expect(screen.getByText('Test label')).toHaveClass('label--unset-font-weight');\n });\n\n it('should render with alignRight', () => {\n render(\n <Label htmlFor=\"testComponent\" alignRight={true}>\n Test label\n </Label>\n );\n expect(screen.getByText('Test label')).toHaveClass('label--align-right');\n });\n});\n"],"mappings":";;;;;AAKA,SAAS,eAAe;
|
|
1
|
+
{"version":3,"file":"Label.test.js","names":[],"sources":["../../../src/components/Label/Label.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Label } from './Label';\n\ndescribe('Label', () => {\n it('should render', () => {\n render(<Label htmlFor=\"testComponent\">Test label</Label>);\n expect(screen.getByText('Test label')).toBeInTheDocument();\n });\n\n it('should render with required', () => {\n render(\n <Label htmlFor=\"testComponent\" required={true}>\n Test label\n </Label>\n );\n expect(screen.getByText('Test label')).toHaveClass('label--required');\n });\n\n it('should render with noFontWeight', () => {\n render(\n <Label htmlFor=\"testComponent\" noFontWeight={true}>\n Test label\n </Label>\n );\n expect(screen.getByText('Test label')).toHaveClass('label--unset-font-weight');\n });\n\n it('should render with alignRight', () => {\n render(\n <Label htmlFor=\"testComponent\" alignRight={true}>\n Test label\n </Label>\n );\n expect(screen.getByText('Test label')).toHaveClass('label--align-right');\n });\n});\n"],"mappings":";;;;;AAKA,SAAS,eAAe;CAwBtB,AAvBA,GAAG,uBAAuB;EAExB,AADA,EAAO,kBAAC,GAAD;GAAO,SAAQ;aAAgB;GAAkB,CAAA,CAAC,EACzD,OAAO,EAAO,UAAU,aAAa,CAAC,CAAC,mBAAmB;GAC1D,EAEF,GAAG,qCAAqC;EAMtC,AALA,EACE,kBAAC,GAAD;GAAO,SAAQ;GAAgB,UAAU;aAAM;GAEvC,CAAA,CACT,EACD,OAAO,EAAO,UAAU,aAAa,CAAC,CAAC,YAAY,kBAAkB;GACrE,EAEF,GAAG,yCAAyC;EAM1C,AALA,EACE,kBAAC,GAAD;GAAO,SAAQ;GAAgB,cAAc;aAAM;GAE3C,CAAA,CACT,EACD,OAAO,EAAO,UAAU,aAAa,CAAC,CAAC,YAAY,2BAA2B;GAC9E,EAEF,GAAG,uCAAuC;EAMxC,AALA,EACE,kBAAC,GAAD;GAAO,SAAQ;GAAgB,YAAY;aAAM;GAEzC,CAAA,CACT,EACD,OAAO,EAAO,UAAU,aAAa,CAAC,CAAC,YAAY,qBAAqB;GACxE;EACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "../../MetaDataBar-C4QO9oBV.js";
|
|
2
|
-
import { i as t, n } from "../../react.esm-
|
|
2
|
+
import { i as t, n } from "../../react.esm-CweFe1CK.js";
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/MetaDataBar/MetaDataBar.test.tsx
|
|
5
5
|
jest.mock("components/Icon", () => ({ Icon: ({ name: e }) => /* @__PURE__ */ r("span", {
|