@uva-glass/component-library 3.0.10 → 3.0.12
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/Column-BL3dsYxn.js +101 -0
- package/dist/{Column-BUyVh2Oo.js.map → Column-BL3dsYxn.js.map} +1 -1
- package/dist/{Lexical.prod-CoFvB6ST.js → Lexical.prod-pVkgOp1j.js} +6 -6
- package/dist/Lexical.prod-pVkgOp1j.js.map +1 -0
- package/dist/{LexicalClipboard.prod-BceK2u8q.js → LexicalClipboard.prod-DIvwPtmL.js} +4 -4
- package/dist/{LexicalClipboard.prod-BceK2u8q.js.map → LexicalClipboard.prod-DIvwPtmL.js.map} +1 -1
- package/dist/{LexicalLink.prod-DgAdBBH7.js → LexicalLink.prod-NMeHB9CR.js} +3 -3
- package/dist/{LexicalLink.prod-DgAdBBH7.js.map → LexicalLink.prod-NMeHB9CR.js.map} +1 -1
- package/dist/{LexicalList.prod-BsGg0KUo.js → LexicalList.prod-CicvwkCx.js} +10 -8
- package/dist/LexicalList.prod-CicvwkCx.js.map +1 -0
- package/dist/{LexicalSelection.prod-CajyzNb9.js → LexicalSelection.prod-mQvH0_ap.js} +2 -2
- package/dist/{LexicalSelection.prod-CajyzNb9.js.map → LexicalSelection.prod-mQvH0_ap.js.map} +1 -1
- package/dist/{LexicalTable.prod-CNsOdwua.js → LexicalTable.prod-Bb6g8CAC.js} +240 -231
- package/dist/LexicalTable.prod-Bb6g8CAC.js.map +1 -0
- package/dist/{LexicalUtils.prod-CqRL6ZhZ.js → LexicalUtils.prod-C_aSRWfh.js} +2 -2
- package/dist/{LexicalUtils.prod-CqRL6ZhZ.js.map → LexicalUtils.prod-C_aSRWfh.js.map} +1 -1
- package/dist/{TablePlugin-CFD5PSMc.js → TablePlugin-o1MveXq2.js} +4 -4
- package/dist/{TablePlugin-CFD5PSMc.js.map → TablePlugin-o1MveXq2.js.map} +1 -1
- package/dist/TimelineItem-DmrymETS.js +52 -0
- package/dist/TimelineItem-DmrymETS.js.map +1 -0
- package/dist/__mocks__/svgrMock.js.map +1 -1
- package/dist/assets/Column.css +1 -1
- package/dist/assets/TimelineItem.css +1 -0
- package/dist/assets/VarIndicator.css +1 -1
- package/dist/assets/variables.css +3 -3
- package/dist/components/Accordion/Accordion.test.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
- package/dist/components/ActionList/ActionList.test.js.map +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
- package/dist/components/Attention/Attention.test.js.map +1 -1
- package/dist/components/Backdrop/Backdrop.test.js.map +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.test.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js.map +1 -1
- package/dist/components/Card/Card.test.d.ts +0 -0
- package/dist/components/Card/Card.test.js +10 -0
- package/dist/components/Card/Card.test.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.test.d.ts +0 -0
- package/dist/components/Checkbox/Checkbox.test.js +16 -0
- package/dist/components/Checkbox/Checkbox.test.js.map +1 -0
- package/dist/components/CheckboxButton/CheckboxButton.test.d.ts +0 -0
- package/dist/components/CheckboxButton/CheckboxButton.test.js +51 -0
- package/dist/components/CheckboxButton/CheckboxButton.test.js.map +1 -0
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.d.ts +0 -0
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +90 -0
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js.map +1 -0
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/GridRow/Column/Column.js +1 -1
- package/dist/components/GridRow/Column/index.js +1 -1
- package/dist/components/GridRow/GridRow.js +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/Label/Label.test.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +31 -31
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/Timeline/Timeline.d.ts +28 -0
- package/dist/components/Timeline/Timeline.js +29 -0
- package/dist/components/Timeline/Timeline.js.map +1 -0
- package/dist/components/Timeline/Timeline.stories.d.ts +5 -0
- package/dist/components/Timeline/Timeline.stories.js +43 -0
- package/dist/components/Timeline/Timeline.stories.js.map +1 -0
- package/dist/components/Timeline/Timeline.test.d.ts +0 -0
- package/dist/components/Timeline/Timeline.test.js +80 -0
- package/dist/components/Timeline/Timeline.test.js.map +1 -0
- package/dist/components/Timeline/TimelineItem.d.ts +2 -0
- package/dist/components/Timeline/TimelineItem.js +7 -0
- package/dist/components/Timeline/TimelineItem.js.map +1 -0
- package/dist/components/Timeline/index.d.ts +1 -0
- package/dist/components/Timeline/index.js +5 -0
- package/dist/components/Timeline/index.js.map +1 -0
- package/dist/components/Timeline/mockTimelineItem.d.ts +30 -0
- package/dist/components/Timeline/mockTimelineItem.js +95 -0
- package/dist/components/Timeline/mockTimelineItem.js.map +1 -0
- package/dist/components/VarIndicator/VarIndicator.js +11 -11
- package/dist/components/VarIndicator/VarIndicator.js.map +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js.map +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +23 -21
- package/dist/components/index.js.map +1 -1
- package/dist/{helpers-C-JeRM2f.js → helpers-CtrLGKFA.js} +4 -4
- package/dist/{helpers-C-JeRM2f.js.map → helpers-CtrLGKFA.js.map} +1 -1
- package/dist/index.js +23 -21
- package/dist/index.js.map +1 -1
- package/dist/setupTests.js.map +1 -1
- package/package.json +8 -8
- package/dist/Column-BUyVh2Oo.js +0 -101
- package/dist/Lexical.prod-CoFvB6ST.js.map +0 -1
- package/dist/LexicalList.prod-BsGg0KUo.js.map +0 -1
- package/dist/LexicalTable.prod-CNsOdwua.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimelineItem-DmrymETS.js","sources":["../src/components/Timeline/TimelineItem.tsx"],"sourcesContent":["import clsx from 'clsx';\n\nimport type { TimelineItemProps } from './Timeline';\n\nimport styles from 'components/Timeline/Timeline.module.css';\n\nexport const TimelineItem = ({ title, type, reason, subtitle, tasks, completed = false }: TimelineItemProps) => (\n <li\n className={clsx(styles['timeline__item'], {\n [styles['timeline__item--active']]: type === 'active' && !completed,\n [styles['timeline__item--todo']]: (type === 'active' && !completed) || (type === 'submitted' && !completed),\n [styles['timeline__item--submitted']]: type === 'submitted' && !completed,\n\n [styles['timeline__item--draft']]: type === 'draft',\n [styles['timeline__item--current']]: type === 'draft',\n [styles['timeline__item--rejected']]: type === 'rejected',\n [styles['timeline__item--submitted']]: type === 'submitted',\n [styles['timeline__item--verified']]: type === 'verified',\n })}\n >\n <span className={styles['timeline__item-title']} data-reason={reason}>\n {title}\n </span>\n {subtitle && <span className={styles['timeline__item-dark-label']}>{subtitle}</span>}\n {tasks &&\n tasks.map(({ title, assignee }, idx) => (\n <div className={styles['timeline__item-card']} key={`${title}_${idx}`}>\n <span\n className={clsx(type === 'rejected' ? styles['timeline__item-dark-label'] : styles['timeline__item-label'])}\n >\n {title}\n </span>\n <span className={clsx(type === 'rejected' ? styles['timeline__item-label'] : styles['timeline__item-info'])}>\n {assignee}\n </span>\n </div>\n ))}\n </li>\n);\n"],"names":["TimelineItem","title","type","reason","subtitle","tasks","completed","jsxs","clsx","styles","jsx","assignee","idx"],"mappings":";;;;;;;;;;;;;;;;;;GAMaA,IAAe,CAAC,EAAE,OAAAC,GAAO,MAAAC,GAAM,QAAAC,GAAQ,UAAAC,GAAU,OAAAC,GAAO,WAAAC,IAAY,GAAA,MAC/E,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAKC,EAAO,gBAAmB;AAAA,MACxC,CAACA,EAAO,wBAAwB,CAAC,GAAGP,MAAS,YAAY,CAACI;AAAA,MAC1D,CAACG,EAAO,sBAAsB,CAAC,GAAIP,MAAS,YAAY,CAACI,KAAeJ,MAAS,eAAe,CAACI;AAAA,MACjG,CAACG,EAAO,2BAA2B,CAAC,GAAGP,MAAS,eAAe,CAACI;AAAA,MAEhE,CAACG,EAAO,uBAAuB,CAAC,GAAGP,MAAS;AAAA,MAC5C,CAACO,EAAO,yBAAyB,CAAC,GAAGP,MAAS;AAAA,MAC9C,CAACO,EAAO,0BAA0B,CAAC,GAAGP,MAAS;AAAA,MAC/C,CAACO,EAAO,2BAA2B,CAAC,GAAGP,MAAS;AAAA,MAChD,CAACO,EAAO,0BAA0B,CAAC,GAAGP,MAAS;AAAA,IAAA,CAChD;AAAA,IAED,UAAA;AAAA,MAAA,gBAAAQ,EAAC,UAAK,WAAWD,EAAO,sBAAsB,GAAG,eAAaN,GAC3D,UACHF,GAAA;AAAA,MACCG,KAAa,gBAAAM,EAAA,QAAA,EAAK,WAAWD,EAAO,2BAA2B,GAAI,UAASL,GAAA;AAAA,MAC5EC,KACCA,EAAM,IAAI,CAAC,EAAE,OAAAJ,GAAO,UAAAU,EAAS,GAAGC,MAC7B,gBAAAL,EAAA,OAAA,EAAI,WAAWE,EAAO,qBAAqB,GAC1C,UAAA;AAAA,QAAA,gBAAAC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWF,EAAKN,MAAS,aAAaO,EAAO,2BAA2B,IAAIA,EAAO,sBAAsB,CAAC;AAAA,YAEzG,UAAAR;AAAAA,UAAA;AAAA,QACH;AAAA,QACC,gBAAAS,EAAA,QAAA,EAAK,WAAWF,EAAKN,MAAS,aAAaO,EAAO,sBAAsB,IAAIA,EAAO,qBAAqB,CAAC,GACvG,UACHE,EAAA,CAAA;AAAA,MAAA,EAAA,GARkD,GAAGV,CAAK,IAAIW,CAAG,EASnE,CACD;AAAA,IAAA;AAAA,EAAA;AACL;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svgrMock.js","sources":["../../src/__mocks__/svgrMock.tsx"],"sourcesContent":["import { forwardRef } from 'react';\
|
|
1
|
+
{"version":3,"file":"svgrMock.js","sources":["../../src/__mocks__/svgrMock.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nconst SvgrMock = forwardRef<HTMLSpanElement>((props, ref) => <span ref={ref} {...props} />);\nSvgrMock.displayName = 'SvgrMock';\n\nexport const ReactComponent = SvgrMock;\n// eslint-disable-next-line import/no-default-export\nexport default SvgrMock;\n"],"names":["SvgrMock","forwardRef","props","ref","ReactComponent"],"mappings":";;AAEM,MAAAA,IAAWC,EAA4B,CAACC,GAAOC,wBAAS,QAAK,EAAA,KAAAA,GAAW,GAAGD,GAAO,CAAE;AAC1FF,EAAS,cAAc;AAEhB,MAAMI,IAAiBJ;"}
|
package/dist/assets/Column.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._page-
|
|
1
|
+
._page-grid__row_10s51_1{--grid-cols: 12;display:flex;flex-wrap:wrap;min-width:100%}._page-grid__row-mt-0_10s51_9{margin-top:0}._page-grid__row-mt-025_10s51_13{margin-top:.25rem}._page-grid__row-mt-050_10s51_17{margin-top:.5rem}._page-grid__row-mt-075_10s51_21{margin-top:.75rem}._page-grid__row-mt-100_10s51_25{margin-top:1rem}._page-grid__row-mt-125_10s51_29{margin-top:1.25rem}._page-grid__row-mt-150_10s51_33{margin-top:1.5rem}._page-grid__row-mt-175_10s51_37{margin-top:1.75rem}._page-grid__row-mt-200_10s51_41{margin-top:2rem}._page-grid__row-mt-250_10s51_45{margin-top:2.5rem}._page-grid__row-mt-300_10s51_49{margin-top:3rem}._page-grid__row-mt-350_10s51_53{margin-top:3.5rem}._page-grid__row-mb-0_10s51_57{margin-bottom:0}._page-grid__row-mb-025_10s51_61{margin-bottom:.25rem}._page-grid__row-mb-050_10s51_65{margin-bottom:.5rem}._page-grid__row-mb-075_10s51_69{margin-bottom:.75rem}._page-grid__row-mb-100_10s51_73{margin-bottom:1rem}._page-grid__row-mb-125_10s51_77{margin-bottom:1.25rem}._page-grid__row-mb-150_10s51_81{margin-bottom:1.5rem}._page-grid__row-mb-175_10s51_85{margin-bottom:1.75rem}._page-grid__row-mb-200_10s51_89{margin-bottom:2rem}._page-grid__row-mb-250_10s51_93{margin-bottom:2.5rem}._page-grid__row-mb-300_10s51_97{margin-bottom:3rem}._page-grid__row-mb-350_10s51_101{margin-bottom:3.5rem}[class^=page-grid__col]{position:relative}._page-grid__col-12_10s51_109,._page-grid__col_10s51_109{flex-basis:100%;max-width:100%;padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-1_10s51_109{--collspan: 1;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-2_10s51_124{--collspan: 2;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-3_10s51_132{--collspan: 3;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-4_10s51_140{--collspan: 4;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-5_10s51_148{--collspan: 5;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-6_10s51_156{--collspan: 6;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-7_10s51_164{--collspan: 7;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-8_10s51_172{--collspan: 8;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-9_10s51_180{--collspan: 9;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-10_10s51_188{--collspan: 10;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-11_10s51_196{--collspan: 11;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-12_10s51_109{--collspan: 12;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}@media only screen and (max-width: 64rem){._page-grid__col-md-1_10s51_215{--collspan: 1;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-md-2_10s51_223{--collspan: 2;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-md-3_10s51_231{--collspan: 3;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-md-4_10s51_239{--collspan: 4;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-md-5_10s51_247{--collspan: 5;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-md-6_10s51_255{--collspan: 6;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-md-7_10s51_263{--collspan: 7;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-md-8_10s51_271{--collspan: 8;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-md-9_10s51_279{--collspan: 9;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-md-10_10s51_287{--collspan: 10;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-md-11_10s51_295{--collspan: 11;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}._page-grid__col-md-12_10s51_303{--collspan: 12;flex-basis:calc((var(--collspan) / var(--grid-cols) * 100%));max-width:calc((var(--collspan) / var(--grid-cols) * 100%));padding:0 calc(var(--grid-gap) / 2)}}._page-grid__col-start-position-1_10s51_312{margin-left:calc((1 / 12 * 100%))}._page-grid__col-start-position-2_10s51_316{margin-left:calc((2 / 12 * 100%))}._page-grid__col-start-position-3_10s51_320{margin-left:25%}._page-grid__col-start-position-4_10s51_324{margin-left:calc((4 / 12 * 100%))}._page-grid__col-start-position-5_10s51_328{margin-left:calc((5 / 12 * 100%))}._page-grid__col-start-position-6_10s51_332{margin-left:50%}._page-grid__col-start-position-7_10s51_336{margin-left:calc((7 / 12 * 100%))}._page-grid__col-start-position-8_10s51_340{margin-left:calc((8 / 12 * 100%))}._page-grid__col-start-position-9_10s51_344{margin-left:75%}._page-grid__col-start-position-10_10s51_348{margin-left:calc((10 / 12 * 100%))}._page-grid__col-start-position-11_10s51_352{margin-left:calc((11 / 12 * 100%))}@media only screen and (max-width: 64rem){._page-grid__col-md-start-position-1_10s51_359{margin-left:calc((1 / 12 * 100%))}._page-grid__col-md-start-position-2_10s51_363{margin-left:calc((2 / 12 * 100%))}._page-grid__col-md-start-position-3_10s51_367{margin-left:25%}._page-grid__col-md-start-position-4_10s51_371{margin-left:calc((4 / 12 * 100%))}._page-grid__col-md-start-position-5_10s51_375{margin-left:calc((5 / 12 * 100%))}._page-grid__col-md-start-position-6_10s51_379{margin-left:50%}._page-grid__col-md-start-position-7_10s51_383{margin-left:calc((7 / 12 * 100%))}._page-grid__col-md-start-position-8_10s51_387{margin-left:calc((8 / 12 * 100%))}._page-grid__col-md-start-position-9_10s51_391{margin-left:75%}._page-grid__col-md-start-position-10_10s51_395{margin-left:calc((10 / 12 * 100%))}._page-grid__col-md-start-position-11_10s51_399{margin-left:calc((11 / 12 * 100%))}}@media only screen and (max-width: 40rem){._page-grid__col-1_10s51_109,._page-grid__col-2_10s51_124,._page-grid__col-3_10s51_132,._page-grid__col-4_10s51_140,._page-grid__col-5_10s51_148,._page-grid__col-6_10s51_156,._page-grid__col-7_10s51_164,._page-grid__col-8_10s51_172,._page-grid__col-9_10s51_180,._page-grid__col-10_10s51_188,._page-grid__col-11_10s51_196{flex-basis:100%;margin-left:0;max-width:100%}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--gray-100: #faf9f9;--gray-200: #f5f4f4;--gray-300: #e7e5e4;--gray-400: #d6d3d1;--gray-500: #a8a19e;--gray-600: #78706c;--gray-700: #57514e;--gray-800: #433f3d;--gray-900: #282625;--uva-black: #000;--uva-white: #fff}._timeline__container_recyi_20{align-items:flex-start;background-color:var(--uva-white);display:flex;flex-direction:column;height:100%;justify-content:flex-start;padding:.25rem 1rem;width:100%}._timeline__button-container_recyi_31{margin-bottom:-.25rem;margin-left:1.5rem}._timeline__button-container--active_recyi_36{margin-bottom:.75rem}._timeline__list_recyi_40{list-style:none;margin:0;padding:0;width:100%}._timeline__item_recyi_47{display:flex;flex-direction:column;padding-bottom:1.25rem;position:relative;width:100%}._timeline__item_recyi_47:empty{min-height:1rem}._timeline__item_recyi_47:not(:last-child):before{background-color:var(--uva-black);border:none;bottom:-1rem;content:"";left:.25rem;position:absolute;top:1rem;width:1px}._timeline__item_recyi_47:last-child{padding-bottom:0}._timeline__item_recyi_47:nth-last-child(2):before{bottom:-.75rem}._timeline__item--todo_recyi_78:not(:last-child):before{background:repeating-linear-gradient(to bottom,transparent 0 4px,var(--gray-400) 4px 8px) 80%/2px 100% no-repeat}._timeline__item_recyi_47:empty:before{top:-1rem}._timeline__item-title_recyi_86{align-items:center;display:inline-flex;font-family:inherit;font-size:var(--font-size-sm);font-weight:var(--semibold);margin-bottom:.25rem;position:relative}._timeline__item-title_recyi_86:before{background-color:var(--uva-black);border-radius:50%;content:"";height:.375rem;margin-left:.0625rem;margin-right:1.0625rem;position:relative;width:.375rem}._timeline__item--current_recyi_107 ._timeline__item-title_recyi_86:before{height:.5rem;margin-left:0;margin-right:1rem;width:.5rem}._timeline__item--todo_recyi_78 ._timeline__item-title_recyi_86:before{background-color:var(--gray-400)}._timeline__item--rejected_recyi_118 ._timeline__item-title_recyi_86:before{border-radius:0;height:.125rem;margin-left:0;margin-right:1rem;width:.5rem}._timeline__item--draft_recyi_126:last-child ._timeline__item-title_recyi_86:before{background-color:var(--uva-black);border-radius:50%;content:"";height:.375rem;margin-left:.0625rem;margin-right:1.0625rem;position:relative;width:.375rem}._timeline__item-label_recyi_137,._timeline__item-dark-label_recyi_138{color:var(--gray-700);font-size:var(--font-size-text-non-essential)}._timeline__item-dark-label_recyi_138{color:var(--uva-black);margin-bottom:.25rem;margin-left:1.5rem}._timeline__item-card_recyi_149{display:flex;flex-direction:column;margin-bottom:.125rem;margin-left:1.5rem;padding:.5rem 0}._timeline__item-card_recyi_149 ._timeline__item-dark-label_recyi_138{margin-left:0}._timeline__item--verified_recyi_161 ._timeline__item-card_recyi_149{margin-top:-.25rem;padding:.125rem 0}._timeline__item--rejected_recyi_118{margin-bottom:-.25rem}._timeline__item--rejected_recyi_118 ._timeline__item-card_recyi_149{margin-top:-.25rem;padding:.125rem 0}._timeline__item--draft_recyi_126{margin-bottom:.5rem}._timeline__item--draft_recyi_126 ._timeline__item-card_recyi_149{margin-top:-.25rem;padding:.125rem 0}._timeline__item--todo_recyi_78 ._timeline__item-card_recyi_149{background-color:var(--gray-200);padding:.5rem .75rem}._timeline__item--submitted_recyi_189:not(._timeline__item--todo_recyi_78){margin-bottom:-.25rem}._timeline__item--submitted_recyi_189:not(._timeline__item--todo_recyi_78) ._timeline__item-card_recyi_149{margin-top:-.25rem;padding:.125rem 0}._timeline__item--draft_recyi_126:not(:last-child) ._timeline__item-card_recyi_149{background-color:var(--gray-200);padding:.5rem .75rem}._timeline__item--verified_recyi_161{margin-bottom:-.25rem}._timeline__item--verified_recyi_161 ._timeline__item-title_recyi_86:after{background-color:var(--gray-200);color:var(--color-grey-500);content:attr(data-reason);font-size:var(--font-size-text-non-essential);margin-left:.5rem;padding:.25rem .5rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--color-active: var(--color-forest-700);--color-active-hover: var(--color-uva-white);--color-background-active: var(--color-forest-100);--color-background-active-hover: var(--color-forest-700);--color-background-draft: var(--color-sky-100);--color-background-draft-hover: var(--color-navy-600);--color-background-submitted: var(--color-orange-100);--color-background-submitted-hover: var(--color-orange-900);--color-border-active: var(--color-forest-700);--color-border-draft: var(--color-navy-600);--color-border-submitted: var(--color-orange-900);--color-draft: var(--color-navy-600);--color-draft-hover: var(--color-uva-white);--color-label: var(--color-uva-black);--color-submitted: var(--color-orange-900);--color-submitted-hover: var(--color-uva-white);--color-forest-100: #edf4ee;--color-forest-700: #256835;--color-navy-600: #0562b4;--color-orange-100: #fff3e2;--color-orange-900: #a45c00;--color-sky-100: #eef8fb;--color-uva-black: #1b1918;--color-uva-white: #fff;--border-radius-var-indicator: .25rem}._var-
|
|
1
|
+
:root{--color-active: var(--color-forest-700);--color-active-hover: var(--color-uva-white);--color-background-active: var(--color-forest-100);--color-background-active-hover: var(--color-forest-700);--color-background-draft: var(--color-sky-100);--color-background-draft-hover: var(--color-navy-600);--color-background-submitted: var(--color-orange-100);--color-background-submitted-hover: var(--color-orange-900);--color-border-active: var(--color-forest-700);--color-border-draft: var(--color-navy-600);--color-border-submitted: var(--color-orange-900);--color-draft: var(--color-navy-600);--color-draft-hover: var(--color-uva-white);--color-label: var(--color-uva-black);--color-submitted: var(--color-orange-900);--color-submitted-hover: var(--color-uva-white);--color-forest-100: #edf4ee;--color-forest-700: #256835;--color-navy-600: #0562b4;--color-orange-100: #fff3e2;--color-orange-900: #a45c00;--color-sky-100: #eef8fb;--color-uva-black: #1b1918;--color-uva-white: #fff;--border-radius-var-indicator: .25rem}._var-indicator__container_1bf94_40{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid;border-radius:var(--border-radius-var-indicator);cursor:pointer;display:inline-flex;font-family:inherit;font-size:var(--font-size-default);font-weight:var(--semibold);gap:.375rem;height:2rem;justify-content:center;line-height:inherit;margin:0;padding:0 .75rem 0 .5rem;white-space:nowrap}._var-indicator__container--draft_1bf94_59,._var-indicator__container--rejected_1bf94_60{background-color:var(--color-background-draft);border-color:var(--color-border-draft);color:var(--color-draft)}._var-indicator__container--draft_1bf94_59:hover,._var-indicator__container--rejected_1bf94_60:hover{background-color:var(--color-background-draft-hover);color:var(--color-draft-hover)}._var-indicator__container--submitted_1bf94_72{background-color:var(--color-background-submitted);border-color:var(--color-border-submitted);color:var(--color-submitted)}._var-indicator__container--submitted_1bf94_72:hover{background-color:var(--color-background-submitted-hover);color:var(--color-submitted-hover)}._var-indicator__container--active_1bf94_83{background-color:var(--color-background-active);border-color:var(--color-border-active);color:var(--color-active)}._var-indicator__container--active_1bf94_83:hover{background-color:var(--color-background-active-hover);color:var(--color-active-hover)}._var-indicator__label_1bf94_94{color:var(--color-label)}._var-indicator__container--submitted_1bf94_72:hover ._var-indicator__label_1bf94_94,._var-indicator__container--draft_1bf94_59:hover ._var-indicator__label_1bf94_94,._var-indicator__container--rejected_1bf94_60:hover ._var-indicator__label_1bf94_94,._var-indicator__container--active_1bf94_83:hover ._var-indicator__label_1bf94_94{color:var(--color-uva-white)}._var-indicator__step-container_1bf94_105{align-items:center;display:inline flex;height:100%;justify-content:flex-start}._var-indicator__step-container_1bf94_105 svg{margin:0 -.5rem}
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
--color-amour: #ffe5ec;
|
|
42
42
|
--color-dandelion: #ffde66;
|
|
43
43
|
--color-natural-wood: #fff6d6;
|
|
44
|
-
--color-uva-black: #
|
|
44
|
+
--color-uva-black: #1f1d20;
|
|
45
45
|
--color-uva-red-transparent: rgba(189 0 50 / 10%);
|
|
46
|
-
--color-electric-violet: #
|
|
46
|
+
--color-electric-violet: #9747ff;
|
|
47
47
|
--color-lemon-grass: #99998a;
|
|
48
48
|
--color-vista-blue: #8feabb;
|
|
49
49
|
--color-medium-aquamarine: #62df9f;
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
--color-columbia-blue: #a1e7fc;
|
|
54
54
|
--color-light-cyan: #e1f8ff;
|
|
55
55
|
--color-lavender-transparent: rgba(235 235 236 / 50%);
|
|
56
|
-
--color-natural-wool: #
|
|
56
|
+
--color-natural-wool: #fff6d6;
|
|
57
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.test.js","sources":["../../../src/components/Accordion/Accordion.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\
|
|
1
|
+
{"version":3,"file":"Accordion.test.js","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"],"names":["render","Accordion","titleElement","screen","jsx","userEvent"],"mappings":";;;;;AAMA,SAAS,aAAa,MAAM;AAC1B,KAAG,iBAAiB,MAAM;AACxB,IAAAA,oBAAQC,GAAU,EAAA,OAAM,kBAAiB,SAAQ,gBAAe,CAAE;AAC5D,UAAAC,IAAeC,EAAO,UAAU,gBAAgB;AAC/C,WAAAD,CAAY,EAAE,kBAAkB,GACvC,OAAOA,CAAY,EAAE,gBAAgB,iBAAiB,OAAO;AAA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Y,EAAE,gBAAgB,iBAAiB,OAAO;AAAA,EAAA,CAC9D;AACH,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionCard.test.js","sources":["../../../src/components/AccordionCard/AccordionCard.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\
|
|
1
|
+
{"version":3,"file":"AccordionCard.test.js","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"],"names":["render","jsx","AccordionCard","screen","titleElement","contentElement","fireEvent","userEvent","waitFor"],"mappings":";;;;;AAMA,SAAS,iBAAiB,MAAM;AAC9B,KAAG,iBAAiB,MAAM;AACjB,IAAAA,EAAA,gBAAAC,EAACC,KAAc,OAAM,uBAAsB,SAAS,iBAAiB,UAAQ,IAAC,CAAE,GACvF,OAAOC,EAAO,UAAU,qBAAqB,CAAC,EAAE,kBAAkB,GAClE,OAAOA,EAAO,UAAU,eAAe,CAAC,EAAE,kBAAkB;AAAA,EAAA,CAC7D,GAED,GAAG,mDAAmD,MAAM;AACnD,IAAAH,EAAA,gBAAAC,EAACC,KAAc,OAAM,uBAAsB,SAAS,iBAAiB,UAAQ,IAAC,CAAE,GACvF,OAAOC,EAAO,UAAU,qBAAqB,CAAC,EAAE,kBAAkB,GAClE,OAAOA,EAAO,UAAU,eAAe,CAAC,EAAE,YAAY,mCAAmC;AAAA,EAAA,CAC1F,GAED,GAAG,6CAA6C,MAAM;AACpD,IAAAH,oBAAQE,GAAc,EAAA,OAAM,uBAAsB,SAAS,iBAAiB,CAAE;AACxE,UAAAE,IAAeD,EAAO,UAAU,qBAAqB,GACrDE,IAAiBF,EAAO,UAAU,eAAe;AAChD,WAAAC,CAAY,EAAE,kBAAkB,GACvCE,EAAU,MAAMF,CAAY,GACrB,OAAAC,CAAc,EAAE,YAAY,mCAAmC,GACtEC,EAAU,MAAMF,CAAY,GAC5B,OAAOC,CAAc,EAAE,IAAI,YAAY,mCAAmC;AAAA,EAAA,CAC3E,GAED,GAAG,uDAAuD,YAAY;AACpE,IAAAL,oBAAQE,GAAc,EAAA,OAAM,uBAAsB,SAAS,iBAAiB,CAAE;AACxE,UAAAE,IAAeD,EAAO,UAAU,QAAQ,GACxCE,IAAiBF,EAAO,UAAU,eAAe;AACvD,IAAAC,EAAa,MAAM,GACb,MAAAG,EAAU,SAAS,SAAS,GAClC,MAAMC,EAAQ,MAAM;AACX,aAAAH,CAAc,EAAE,YAAY,mCAAmC;AAAA,IAAA,CACvE,GACK,MAAAE,EAAU,SAAS,SAAS,GAClC,MAAMC,EAAQ,MAAM;AAClB,aAAOH,CAAc,EAAE,IAAI,YAAY,mCAAmC;AAAA,IAAA,CAC3E;AAAA,EAAA,CACF,GAED,GAAG,uDAAuD,YAAY;AACpE,IAAAL,oBAAQE,GAAc,EAAA,OAAM,uBAAsB,SAAS,iBAAiB,CAAE;AACxE,UAAAE,IAAeD,EAAO,UAAU,QAAQ,GACxCE,IAAiBF,EAAO,UAAU,eAAe;AACvD,IAAAC,EAAa,MAAM,GACb,MAAAG,EAAU,SAAS,SAAS,GAClC,MAAMC,EAAQ,MAAM;AACX,aAAAH,CAAc,EAAE,YAAY,mCAAmC;AAAA,IAAA,CACvE,GACK,MAAAE,EAAU,SAAS,SAAS,GAClC,MAAMC,EAAQ,MAAM;AAClB,aAAOH,CAAc,EAAE,IAAI,YAAY,mCAAmC;AAAA,IAAA,CAC3E;AAAA,EAAA,CACF;AACH,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionList.test.js","sources":["../../../src/components/ActionList/ActionList.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\
|
|
1
|
+
{"version":3,"file":"ActionList.test.js","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"],"names":["onClickSpy","BUTTON_LIST","jsx","render","ActionList","button","screen","triggerElement","actionListElement","userEvent","waitFor","actionButton"],"mappings":";;;;;AAMA,MAAMA,IAAa,KAAK,GAAG,GAErBC,IAAc;AAAA,oBACjB,UAAe,EAAA,MAAK,UAAS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IAAoBF,EAAO,UAAU,MAAM;AAC1C,WAAAC,CAAc,EAAE,kBAAkB,GAClC,OAAAC,CAAiB,EAAE,kBAAkB,GACtC,MAAAC,EAAU,MAAMF,CAAc,GACpC,MAAMG,EAAQ,MAAM;AACX,aAAAF,CAAiB,EAAE,YAAY,mBAAmB;AAAA,IAAA,CAC1D,GACK,MAAAC,EAAU,MAAMF,CAAc,GACpC,MAAMG,EAAQ,MAAM;AAClB,aAAOF,CAAiB,EAAE,IAAI,YAAY,mBAAmB;AAAA,IAAA,CAC9D;AAAA,EAAA,CACF,GAED,GAAG,gDAAgD,YAAY;AAC7D,IAAAL;AAAA,MACG,gBAAAD,EAAAE,GAAA,EAAW,OAAM,mBAAkB,SAAQ,cAAa,UAAS,oBAC/D,UAAYH,EAAA,IAAI,CAACI,MAAWA,CAAM,EACrC,CAAA;AAAA,IACF;AACM,UAAAE,IAAiBD,EAAO,UAAU,iBAAiB,GACnDE,IAAoBF,EAAO,UAAU,MAAM;AAC1C,WAAAC,CAAc,EAAE,kBAAkB,GAClC,OAAAC,CAAiB,EAAE,kBAAkB,GACtC,MAAAC,EAAU,MAAMF,CAAc,GACpC,MAAMG,EAAQ,MAAM;AACX,aAAAF,CAAiB,EAAE,YAAY,mBAAmB;AAAA,IAAA,CAC1D;AACK,UAAAG,IAAeL,EAAO,UAAU,eAAe;AAC/C,UAAAG,EAAU,MAAME,CAAY,GAC3B,OAAAX,CAAU,EAAE,sBAAsB,CAAC,GAC1C,MAAMU,EAAQ,MAAM;AAClB,aAAOF,CAAiB,EAAE,IAAI,YAAY,mBAAmB;AAAA,IAAA,CAC9D;AAAA,EAAA,CACF;AACH,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppStatusBar.test.js","sources":["../../../src/components/AppStatusBar/AppStatusBar.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\
|
|
1
|
+
{"version":3,"file":"AppStatusBar.test.js","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"],"names":["render","AppStatusBar","screen"],"mappings":";;;;AAKA,SAAS,gBAAgB,MAAM;AAC7B,KAAG,iBAAiB,MAAM;AACxB,IAAAA,oBAAQC,GAAa,EAAA,SAAQ,wBAAuB,UAAS,QAAO,CAAE,GACtE,OAAOC,EAAO,UAAU,sBAAsB,CAAC,EAAE,kBAAkB;AAAA,EAAA,CACpE;AACH,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Attention.test.js","sources":["../../../src/components/Attention/Attention.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\
|
|
1
|
+
{"version":3,"file":"Attention.test.js","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"],"names":["render","jsx","Attention","screen"],"mappings":";;;;AAKA,SAAS,aAAa,MAAM;AAC1B,KAAG,mCAAmC,MAAM;AACnC,IAAAA,EAAA,gBAAAC,EAACC,GAAU,EAAA,UAAA,oBAAiB,CAAA,CAAY,GAC/C,OAAOC,EAAO,UAAU,mBAAmB,CAAC,EAAE,kBAAkB;AAAA,EAAA,CACjE;AACH,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Backdrop.test.js","sources":["../../../src/components/Backdrop/Backdrop.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\
|
|
1
|
+
{"version":3,"file":"Backdrop.test.js","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"],"names":["render","jsx","Backdrop","screen"],"mappings":";;;;AAKA,SAAS,YAAY,MAAM;AACzB,KAAG,iBAAiB,MAAM;AACjB,IAAAA,EAAA,gBAAAC,EAACC,GAAS,EAAA,UAAA,mBAAgB,CAAA,CAAW,GAC5C,OAAOC,EAAO,UAAU,kBAAkB,CAAC,EAAE,kBAAkB;AAAA,EAAA,CAChE;AACH,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.test.js","sources":["../../../src/components/Buttons/Button.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\
|
|
1
|
+
{"version":3,"file":"Button.test.js","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"],"names":["onClickSpy","render","jsx","Button","screen","button","fireEvent"],"mappings":";;;;AAKA,MAAMA,IAAa,KAAK,GAAG;AAE3B,SAAS,UAAU,MAAM;AACvB,KAAG,yBAAyB,MAAM;AAChC,IAAAC,EAAQ,gBAAAC,EAAAC,GAAA,EAAO,SAAQ,WAAU,yBAAW,CAAS,GACrD,OAAOC,EAAO,UAAU,aAAa,CAAC,EAAE,kBAAkB;AAAA,EAAA,CAC3D,GAED,GAAG,2BAA2B,MAAM;AAClC,IAAAH,EAAQ,gBAAAC,EAAAC,GAAA,EAAO,SAAQ,aAAY,yBAAW,CAAS,GACvD,OAAOC,EAAO,UAAU,aAAa,CAAC,EAAE,kBAAkB,GAC1D,OAAOA,EAAO,UAAU,aAAa,CAAC,EAAE,YAAY,mBAAmB;AAAA,EAAA,CACxE,GAED,GAAG,qCAAqC,MAAM;AAC5C,IAAAH,EAAQ,gBAAAC,EAAAC,GAAA,EAAO,SAAQ,uBAAsB,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AQ,WAAU,SAASH,GAAY,UAE/C,cAAA,CAAA;AAAA,IACF;AACM,UAAAK,IAASD,EAAO,UAAU,aAAa;AACtC,WAAAC,CAAM,EAAE,kBAAkB,GACjCC,EAAU,MAAMD,CAAM,GACf,OAAAL,CAAU,EAAE,sBAAsB,CAAC;AAAA,EAAA,CAC3C;AACH,CAAC;"}
|
|
@@ -56,7 +56,7 @@ describe("LinkButton", () => {
|
|
|
56
56
|
children: /* @__PURE__ */ e(o, { variant: "blank-icon", to: "/", children: "Test LinkButton" })
|
|
57
57
|
})
|
|
58
58
|
), expect(t.getByText("Test LinkButton")).toBeInTheDocument(), expect(t.getByText("Test LinkButton")).toHaveClass("button--blank-icon");
|
|
59
|
-
}), it("should goto route when clicked",
|
|
59
|
+
}), it("should goto route when clicked", () => {
|
|
60
60
|
n(
|
|
61
61
|
r({
|
|
62
62
|
children: /* @__PURE__ */ e(o, { variant: "primary", to: "/", children: "Test LinkButton" })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkButton.test.js","sources":["../../../src/components/Buttons/LinkButton.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\
|
|
1
|
+
{"version":3,"file":"LinkButton.test.js","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"],"names":["routerContainer","children","BrowserRouter","jsx","Routes","Route","render","LinkButton","screen","fireEvent"],"mappings":";;;;;AAQA,MAAMA,IAAkB,CAAC,EAAE,UAAAC,EAAS,wBACjCC,GACC,EAAA,UAAA;AAAA,EAAC,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAE,GAAA,EAAM,MAAM,KAAK,SAAU,gBAAAF,EAAA,OAAA,EAAI,UAAU,aAAA,CAAA,EAAQ,CAAA,GACpD;AAAA,EACCF;AAAA,GACH;AAGF,SAAS,cAAc,MAAM;AAC3B,KAAG,iBAAiB,MAAM;AACxB,IAAAK;AAAA,MACEN,EAAgB;AAAA,QACd,UACG,gBAAAG,EAAAI,GAAA,EAAW,SAAQ,WAAU,IAAI,KAAK,UAEvC,kBAAA,CAAA;AAAA,MAEH,CAAA;AAAA,IACH,GACA,OAAOC,EAAO,UAAU,iBAAiB,CAAC,EAAE,kBAAkB;AAAA,EAAA,CAC/D,GAED,GAAG,yBAAyB,MAAM;AAChC,IAAAF;AAAA,MACEN,EAAgB;AAAA,QACd,UACG,gBAAAG,EAAAI,GAAA,EAAW,SAAQ,WAAU,IAAI,KAAK,UAEvC,kBAAA,CAAA;AAAA,MAEH,CAAA;AAAA,IACH,GACA,OAAOC,EAAO,UAAU,iBAAiB,CAAC,EAAE,kBAAkB,GAC9D,OAAOA,EAAO,UAAU,iBAAiB,CAAC,EAAE,YAAY,iBAAiB;AAAA,EAAA,CAC1E,GAED,GAAG,2BAA2B,MAAM;AAClC,IAAAF;AAAA,MACEN,EAAgB;AAAA,QACd,UACG,gBAAAG,EAAAI,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AAAI,GAAA,EAAW,SAAQ,gBAAe,IAAI,KAAK,UAE5C,kBAAA,CAAA;AAAA,MAEH,CAAA;AAAA,IACH,GACA,OAAOC,EAAO,UAAU,iBAAiB,CAAC,EAAE,kBAAkB,GAC9D,OAAOA,EAAO,UAAU,iBAAiB,CAAC,EAAE,YAAY,sBAAsB;AAAA,EAAA,CAC/E,GAED,GAAG,4BAA4B,MAAM;AACnC,IAAAF;AAAA,MACEN,EAAgB;AAAA,QACd,UACG,gBAAAG,EAAAI,GAAA,EAAW,SAAQ,cAAa,IAAI,KAAK,UAE1C,kBAAA,CAAA;AAAA,MAEH,CAAA;AAAA,IACH,GACA,OAAOC,EAAO,UAAU,iBAAiB,CAAC,EAAE,kBAAkB,GAC9D,OAAOA,EAAO,UAAU,iBAAiB,CAAC,EAAE,YAAY,oBAAoB;AAAA,EAAA,CAC7E,GAED,GAAG,kCAAkC,MAAM;AACzC,IAAAF;AAAA,MACEN,EAAgB;AAAA,QACd,UACG,gBAAAG,EAAAI,GAAA,EAAW,SAAQ,WAAU,IAAI,KAAK,UAEvC,kBAAA,CAAA;AAAA,MAEH,CAAA;AAAA,IACH,GACAE,EAAU,MAAMD,EAAO,UAAU,iBAAiB,CAAC,GACnD,OAAOA,EAAO,UAAU,YAAY,CAAC,EAAE,kBAAkB;AAAA,EAAA,CAC1D;AACH,CAAC;"}
|
|
@@ -56,7 +56,7 @@ describe("LinkButton", () => {
|
|
|
56
56
|
u(
|
|
57
57
|
/* @__PURE__ */ o(r, { variant: "blank-icon", onClick: n, buttonRef: t, children: "Test MenuButton" })
|
|
58
58
|
), expect(e.getByText("Test MenuButton")).toBeInTheDocument(), expect(e.getByText("Test MenuButton")).toHaveClass("button--blank-icon");
|
|
59
|
-
}), it("should fire when clicked",
|
|
59
|
+
}), it("should fire when clicked", () => {
|
|
60
60
|
const t = s();
|
|
61
61
|
u(
|
|
62
62
|
/* @__PURE__ */ o(r, { variant: "blank-icon", onClick: n, buttonRef: t, children: "Test MenuButton" })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.test.js","sources":["../../../src/components/Buttons/MenuButton.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\
|
|
1
|
+
{"version":3,"file":"MenuButton.test.js","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"],"names":["onClickSpy","testRef","createRef","render","jsx","MenuButton","screen","fireEvent"],"mappings":";;;;;AAQA,MAAMA,IAAa,KAAK,GAAG;AAE3B,SAAS,cAAc,MAAM;AAC3B,KAAG,iBAAiB,MAAM;AACxB,UAAMC,IAAUC,EAAU;AAC1B,IAAAC;AAAA,MACE,gBAAAC,EAACC,KAAW,SAAQ,WAAU,SAASL,GAAY,WAAWC,GAAyC,UAEvG,kBAAA,CAAA;AAAA,IACF,GACA,OAAOK,EAAO,UAAU,iBAAiB,CAAC,EAAE,kBAAkB;AAAA,EAAA,CAC/D,GAED,GAAG,yBAAyB,MAAM;AAChC,UAAML,IAAUC,EAAU;AAC1B,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AA,CACxF,GAED,GAAG,uBAAuB,MAAM;AAC9B,UAAML,IAAUC,EAAU;AAC1B,IAAAC;AAAA,MACE,gBAAAC,EAACC,KAAW,SAAQ,SAAQ,SAASL,GAAY,WAAWC,GAAyC,UAErG,kBAAA,CAAA;AAAA,IACF,GACA,OAAOK,EAAO,UAAU,iBAAiB,CAAC,EAAE,kBAAkB,GAC9D,OAAOA,EAAO,UAAU,iBAAiB,CAAC,EAAE,YAAY,eAAe;AAAA,EAAA,CACxE,GAED,GAAG,4BAA4B,MAAM;AACnC,UAAML,IAAUC,EAAU;AAC1B,IAAAC;AAAA,MACE,gBAAAC,EAACC,KAAW,SAAQ,cAAa,SAASL,GAAY,WAAWC,GAAyC,UAE1G,kBAAA,CAAA;AAAA,IACF,GACA,OAAOK,EAAO,UAAU,iBAAiB,CAAC,EAAE,kBAAkB,GAC9D,OAAOA,EAAO,UAAU,iBAAiB,CAAC,EAAE,YAAY,oBAAoB;AAAA,EAAA,CAC7E,GAED,GAAG,4BAA4B,MAAM;AACnC,UAAML,IAAUC,EAAU;AAC1B,IAAAC;AAAA,MACE,gBAAAC,EAACC,KAAW,SAAQ,cAAa,SAASL,GAAY,WAAWC,GAAyC,UAE1G,kBAAA,CAAA;AAAA,IACF,GACAM,EAAU,MAAMD,EAAO,UAAU,iBAAiB,CAAC,GAC5C,OAAAN,CAAU,EAAE,sBAAsB,CAAC;AAAA,EAAA,CAC3C;AACH,CAAC;"}
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-Z7qwJmRM.js";
|
|
3
|
+
import { r, s as d } from "../../react.esm-BOUd0cvD.js";
|
|
4
|
+
import { Card as o } from "./Card.js";
|
|
5
|
+
describe("Card", () => {
|
|
6
|
+
it("should render", () => {
|
|
7
|
+
r(/* @__PURE__ */ e(o, { header: "Header Card" })), expect(d.getByText("Header Card")).toBeInTheDocument();
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=Card.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.test.js","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"],"names":["render","jsx","Card","screen"],"mappings":";;;;AAKA,SAAS,QAAQ,MAAM;AACrB,KAAG,iBAAiB,MAAM;AACxB,IAAAA,EAAQ,gBAAAC,EAAAC,GAAA,EAAK,QAAO,cAAc,CAAA,CAAE,GACpC,OAAOC,EAAO,UAAU,aAAa,CAAC,EAAE,kBAAkB;AAAA,EAAA,CAC3D;AACH,CAAC;"}
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-Z7qwJmRM.js";
|
|
3
|
+
import { r as o, s as t } from "../../react.esm-BOUd0cvD.js";
|
|
4
|
+
import { Checkbox as h } from "./Checkbox.js";
|
|
5
|
+
describe("Checkbox", () => {
|
|
6
|
+
it("should render", () => {
|
|
7
|
+
o(/* @__PURE__ */ c(h, { id: "test-checkbox" }));
|
|
8
|
+
const e = t.getByRole("checkbox");
|
|
9
|
+
expect(e).toBeInTheDocument();
|
|
10
|
+
}), it("should be checked if clicked", () => {
|
|
11
|
+
o(/* @__PURE__ */ c(h, { id: "test-checkbox" }));
|
|
12
|
+
const e = t.getByRole("checkbox");
|
|
13
|
+
expect(e).toBeInTheDocument(), e.click(), expect(e).toBeChecked();
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=Checkbox.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.test.js","sources":["../../../src/components/Checkbox/Checkbox.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\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', () => {\n render(<Checkbox id=\"test-checkbox\" />);\n const checkbox = screen.getByRole('checkbox');\n expect(checkbox).toBeInTheDocument();\n checkbox.click();\n expect(checkbox).toBeChecked();\n });\n});\n"],"names":["render","jsx","Checkbox","checkbox","screen"],"mappings":";;;;AAKA,SAAS,YAAY,MAAM;AACzB,KAAG,iBAAiB,MAAM;AACxB,IAAAA,EAAQ,gBAAAC,EAAAC,GAAA,EAAS,IAAG,gBAAgB,CAAA,CAAE;AAChC,UAAAC,IAAWC,EAAO,UAAU,UAAU;AACrC,WAAAD,CAAQ,EAAE,kBAAkB;AAAA,EAAA,CACpC,GAED,GAAG,gCAAgC,MAAM;AACvC,IAAAH,EAAQ,gBAAAC,EAAAC,GAAA,EAAS,IAAG,gBAAgB,CAAA,CAAE;AAChC,UAAAC,IAAWC,EAAO,UAAU,UAAU;AACrC,WAAAD,CAAQ,EAAE,kBAAkB,GACnCA,EAAS,MAAM,GACR,OAAAA,CAAQ,EAAE,YAAY;AAAA,EAAA,CAC9B;AACH,CAAC;"}
|
|
File without changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-Z7qwJmRM.js";
|
|
3
|
+
import { r as n, s as t } from "../../react.esm-BOUd0cvD.js";
|
|
4
|
+
import { CheckboxButton as a } from "./CheckboxButton.js";
|
|
5
|
+
const c = jest.fn();
|
|
6
|
+
describe("CheckboxButton", () => {
|
|
7
|
+
it("should render", () => {
|
|
8
|
+
n(/* @__PURE__ */ l(a, { label: "2.1", value: "4", onSetValue: c }));
|
|
9
|
+
const e = t.getByRole("checkbox");
|
|
10
|
+
expect(e).toBeInTheDocument();
|
|
11
|
+
}), it("should be checked if clicked", () => {
|
|
12
|
+
n(/* @__PURE__ */ l(a, { label: "2.1", value: "4", onSetValue: c }));
|
|
13
|
+
const e = t.getByRole("checkbox");
|
|
14
|
+
expect(e).toBeInTheDocument(), e.click(), expect(e).toBeChecked(), expect(c).toHaveBeenCalledTimes(1);
|
|
15
|
+
}), it("should be disabled", () => {
|
|
16
|
+
n(/* @__PURE__ */ l(a, { label: "2.1", value: "4", onSetValue: c, disabled: !0 }));
|
|
17
|
+
const e = t.getByRole("checkbox");
|
|
18
|
+
expect(e).toBeInTheDocument(), expect(e).toBeDisabled();
|
|
19
|
+
}), it("should show noValid", () => {
|
|
20
|
+
n(/* @__PURE__ */ l(a, { label: "2.1", value: "4", onSetValue: c, notValid: !0 }));
|
|
21
|
+
const e = t.getByRole("checkbox");
|
|
22
|
+
expect(e).toBeInTheDocument();
|
|
23
|
+
const o = t.getByText("2.1");
|
|
24
|
+
expect(o).toHaveClass("checkbox-button--not-valid");
|
|
25
|
+
}), it("should render single variant", () => {
|
|
26
|
+
n(/* @__PURE__ */ l(a, { label: "2.1", value: "4", onSetValue: c, notValid: !0 }));
|
|
27
|
+
const e = t.getByRole("checkbox");
|
|
28
|
+
expect(e).toBeInTheDocument();
|
|
29
|
+
const o = t.getByText("2.1");
|
|
30
|
+
expect(o).toHaveClass("checkbox-button--single");
|
|
31
|
+
}), it("should render start variant", () => {
|
|
32
|
+
n(/* @__PURE__ */ l(a, { label: "2.1", value: "4", onSetValue: c, notValid: !0, variant: "start" }));
|
|
33
|
+
const e = t.getByRole("checkbox");
|
|
34
|
+
expect(e).toBeInTheDocument();
|
|
35
|
+
const o = t.getByText("2.1");
|
|
36
|
+
expect(o).toHaveClass("checkbox-button--start");
|
|
37
|
+
}), it("should render middle variant", () => {
|
|
38
|
+
n(/* @__PURE__ */ l(a, { label: "2.1", value: "4", onSetValue: c, notValid: !0, variant: "middle" }));
|
|
39
|
+
const e = t.getByRole("checkbox");
|
|
40
|
+
expect(e).toBeInTheDocument();
|
|
41
|
+
const o = t.getByText("2.1");
|
|
42
|
+
expect(o).toHaveClass("checkbox-button--middle");
|
|
43
|
+
}), it("should render end variant", () => {
|
|
44
|
+
n(/* @__PURE__ */ l(a, { label: "2.1", value: "4", onSetValue: c, notValid: !0, variant: "end" }));
|
|
45
|
+
const e = t.getByRole("checkbox");
|
|
46
|
+
expect(e).toBeInTheDocument();
|
|
47
|
+
const o = t.getByText("2.1");
|
|
48
|
+
expect(o).toHaveClass("checkbox-button--end");
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=CheckboxButton.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxButton.test.js","sources":["../../../src/components/CheckboxButton/CheckboxButton.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\r\nimport { render, screen } from '@testing-library/react';\r\n\r\nimport { CheckboxButton } from './CheckboxButton';\r\n\r\nconst onClickSpy = jest.fn();\r\n\r\ndescribe('CheckboxButton', () => {\r\n it('should render', () => {\r\n render(<CheckboxButton label=\"2.1\" value=\"4\" onSetValue={onClickSpy} />);\r\n const checkbox = screen.getByRole('checkbox');\r\n expect(checkbox).toBeInTheDocument();\r\n });\r\n\r\n it('should be checked if clicked', () => {\r\n render(<CheckboxButton label=\"2.1\" value=\"4\" onSetValue={onClickSpy} />);\r\n const checkbox = screen.getByRole('checkbox');\r\n expect(checkbox).toBeInTheDocument();\r\n checkbox.click();\r\n expect(checkbox).toBeChecked();\r\n expect(onClickSpy).toHaveBeenCalledTimes(1);\r\n });\r\n\r\n it('should be disabled', () => {\r\n render(<CheckboxButton label=\"2.1\" value=\"4\" onSetValue={onClickSpy} disabled={true} />);\r\n const checkbox = screen.getByRole('checkbox');\r\n expect(checkbox).toBeInTheDocument();\r\n expect(checkbox).toBeDisabled();\r\n });\r\n\r\n it('should show noValid', () => {\r\n render(<CheckboxButton label=\"2.1\" value=\"4\" onSetValue={onClickSpy} notValid={true} />);\r\n const checkbox = screen.getByRole('checkbox');\r\n expect(checkbox).toBeInTheDocument();\r\n const label = screen.getByText('2.1');\r\n expect(label).toHaveClass('checkbox-button--not-valid');\r\n });\r\n\r\n it('should render single variant', () => {\r\n render(<CheckboxButton label=\"2.1\" value=\"4\" onSetValue={onClickSpy} notValid={true} />);\r\n const checkbox = screen.getByRole('checkbox');\r\n expect(checkbox).toBeInTheDocument();\r\n const label = screen.getByText('2.1');\r\n expect(label).toHaveClass('checkbox-button--single');\r\n });\r\n\r\n it('should render start variant', () => {\r\n render(<CheckboxButton label=\"2.1\" value=\"4\" onSetValue={onClickSpy} notValid={true} variant=\"start\" />);\r\n const checkbox = screen.getByRole('checkbox');\r\n expect(checkbox).toBeInTheDocument();\r\n const label = screen.getByText('2.1');\r\n expect(label).toHaveClass('checkbox-button--start');\r\n });\r\n\r\n it('should render middle variant', () => {\r\n render(<CheckboxButton label=\"2.1\" value=\"4\" onSetValue={onClickSpy} notValid={true} variant=\"middle\" />);\r\n const checkbox = screen.getByRole('checkbox');\r\n expect(checkbox).toBeInTheDocument();\r\n const label = screen.getByText('2.1');\r\n expect(label).toHaveClass('checkbox-button--middle');\r\n });\r\n\r\n it('should render end variant', () => {\r\n render(<CheckboxButton label=\"2.1\" value=\"4\" onSetValue={onClickSpy} notValid={true} variant=\"end\" />);\r\n const checkbox = screen.getByRole('checkbox');\r\n expect(checkbox).toBeInTheDocument();\r\n const label = screen.getByText('2.1');\r\n expect(label).toHaveClass('checkbox-button--end');\r\n });\r\n});\r\n"],"names":["onClickSpy","render","jsx","CheckboxButton","checkbox","screen","label"],"mappings":";;;;AAKA,MAAMA,IAAa,KAAK,GAAG;AAE3B,SAAS,kBAAkB,MAAM;AAC/B,KAAG,iBAAiB,MAAM;AACjB,IAAAC,EAAA,gBAAAC,EAACC,KAAe,OAAM,OAAM,OAAM,KAAI,YAAYH,GAAY,CAAE;AACjE,UAAAI,IAAWC,EAAO,UAAU,UAAU;AACrC,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AACtC,IAAAL,EAAQ,gBAAAC,EAAAC,GAAA,EAAe,OAAM,OAAM,OAAM,KAAI,YAAYH,GAAY,UAAU,IAAM,SAAQ,QAAQ,CAAA,CAAE;AACjG,UAAAI,IAAWC,EAAO,UAAU,UAAU;AACrC,WAAAD,CAAQ,EAAE,kBAAkB;AAC7B,UAAAE,IAAQD,EAAO,UAAU,KAAK;AAC7B,WAAAC,CAAK,EAAE,YAAY,wBAAwB;AAAA,EAAA,CACnD,GAED,GAAG,gCAAgC,MAAM;AACvC,IAAAL,EAAQ,gBAAAC,EAAAC,GAAA,EAAe,OAAM,OAAM,OAAM,KAAI,YAAYH,GAAY,UAAU,IAAM,SAAQ,SAAS,CAAA,CAAE;AAClG,UAAAI,IAAWC,EAAO,UAAU,UAAU;AACrC,WAAAD,CAAQ,EAAE,kBAAkB;AAC7B,UAAAE,IAAQD,EAAO,UAAU,KAAK;AAC7B,WAAAC,CAAK,EAAE,YAAY,yBAAyB;AAAA,EAAA,CACpD,GAED,GAAG,6BAA6B,MAAM;AACpC,IAAAL,EAAQ,gBAAAC,EAAAC,GAAA,EAAe,OAAM,OAAM,OAAM,KAAI,YAAYH,GAAY,UAAU,IAAM,SAAQ,MAAM,CAAA,CAAE;AAC/F,UAAAI,IAAWC,EAAO,UAAU,UAAU;AACrC,WAAAD,CAAQ,EAAE,kBAAkB;AAC7B,UAAAE,IAAQD,EAAO,UAAU,KAAK;AAC7B,WAAAC,CAAK,EAAE,YAAY,sBAAsB;AAAA,EAAA,CACjD;AACH,CAAC;"}
|
|
File without changes
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-Z7qwJmRM.js";
|
|
3
|
+
import { r as c, s as e } from "../../react.esm-BOUd0cvD.js";
|
|
4
|
+
import { CheckboxButtonBar as a } from "./CheckboxButtonBar.js";
|
|
5
|
+
const n = jest.fn(), x = [
|
|
6
|
+
{
|
|
7
|
+
label: "1.1",
|
|
8
|
+
value: "1"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
label: "1.2",
|
|
12
|
+
value: "2"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
label: "1.3",
|
|
16
|
+
value: "3"
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
describe("CheckboxButton", () => {
|
|
20
|
+
it("should render", () => {
|
|
21
|
+
c(
|
|
22
|
+
/* @__PURE__ */ l(
|
|
23
|
+
a,
|
|
24
|
+
{
|
|
25
|
+
label: "Periode",
|
|
26
|
+
checkboxes: x,
|
|
27
|
+
defaultValues: ["1", "2"],
|
|
28
|
+
labelPosition: "top",
|
|
29
|
+
onSetValues: n
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
), expect(e.getByText("Periode")).toBeInTheDocument();
|
|
33
|
+
const t = e.getAllByRole("checkbox");
|
|
34
|
+
expect(t).toHaveLength(3);
|
|
35
|
+
}), it("should render required", () => {
|
|
36
|
+
c(
|
|
37
|
+
/* @__PURE__ */ l(
|
|
38
|
+
a,
|
|
39
|
+
{
|
|
40
|
+
label: "Periode",
|
|
41
|
+
required: !0,
|
|
42
|
+
checkboxes: x,
|
|
43
|
+
defaultValues: ["1", "2"],
|
|
44
|
+
labelPosition: "top",
|
|
45
|
+
onSetValues: n
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
const t = e.getByText("Periode");
|
|
50
|
+
expect(t).toHaveTextContent("Periode"), expect(t).toHaveClass("label--required");
|
|
51
|
+
const o = e.getAllByRole("checkbox");
|
|
52
|
+
expect(o).toHaveLength(3);
|
|
53
|
+
}), it("should render default checked", () => {
|
|
54
|
+
c(
|
|
55
|
+
/* @__PURE__ */ l(
|
|
56
|
+
a,
|
|
57
|
+
{
|
|
58
|
+
label: "Periode",
|
|
59
|
+
checkboxes: x,
|
|
60
|
+
defaultValues: ["1", "2"],
|
|
61
|
+
labelPosition: "top",
|
|
62
|
+
onSetValues: n
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
);
|
|
66
|
+
const t = e.getByText("Periode");
|
|
67
|
+
expect(t).toHaveTextContent("Periode");
|
|
68
|
+
const o = e.getAllByRole("checkbox");
|
|
69
|
+
expect(o).toHaveLength(3), expect(o[0]).toBeChecked(), expect(o[1]).toBeChecked(), expect(o[2]).not.toBeChecked();
|
|
70
|
+
}), it("should render notValidatedText and notValid style", () => {
|
|
71
|
+
c(
|
|
72
|
+
/* @__PURE__ */ l(
|
|
73
|
+
a,
|
|
74
|
+
{
|
|
75
|
+
label: "Periode",
|
|
76
|
+
notValidatedText: "Not Valid",
|
|
77
|
+
checkboxes: x,
|
|
78
|
+
defaultValues: ["1", "2"],
|
|
79
|
+
labelPosition: "top",
|
|
80
|
+
onSetValues: n
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
);
|
|
84
|
+
const t = e.getByText("Periode");
|
|
85
|
+
expect(t).toHaveTextContent("Periode"), expect(e.getByText("Not Valid")).toBeInTheDocument();
|
|
86
|
+
const o = e.getAllByRole("checkbox");
|
|
87
|
+
expect(o).toHaveLength(3), expect(e.getByText("1.1")).toHaveClass("checkbox-button--not-valid"), expect(e.getByText("1.2")).toHaveClass("checkbox-button--not-valid"), expect(e.getByText("1.3")).toHaveClass("checkbox-button--not-valid");
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
//# sourceMappingURL=CheckboxButtonBar.test.js.map
|