From 58a26faa1a1fbe43017125bbc90818cb5e0bc7b9 Mon Sep 17 00:00:00 2001 From: Owen Allen Date: Wed, 22 Jan 2025 09:27:16 +0000 Subject: [PATCH] Updates --- ...ddress-CBI7B4y7.js => Address-DZpOdq1E.js} | 4 +- ...PRaj4NG.js => Address.stories-iLj4QLHw.js} | 2 +- ...-B_7A.js => AdvancedSelection-CqBYSply.js} | 4 +- ... => AdvancedSelection.stories-FVRMi6fE.js} | 2 +- ...{Button-BBz0kfcw.js => Button-CIF8JiZP.js} | 2 +- ...nRow-B33hkYPE.js => ButtonRow-DfcfK47f.js} | 2 +- .../{Card-Dv9AIS3I.js => Card-TKyBNl97.js} | 2 +- ...ckbox-CODv9_Wr.js => Checkbox-D_4gEYtK.js} | 6 +- ...ckbox-Q_CVLB8I.js => Checkbox-xlAxlAoW.js} | 2 +- ...oKAU3V.js => Checkbox.stories-BhIIAygP.js} | 2 +- ...t-csbS6mbI.js => CheckboxList-DGXZFQKm.js} | 4 +- sb8/qa/assets/CheckboxList-Dbk8JkiG.js | 1 - sb8/qa/assets/CheckboxList-DjNmes3Y.js | 1 + .../assets/CheckboxList.stories-ATySsjxI.js | 13 + .../assets/CheckboxList.stories-CZU1ZcPG.js | 13 - .../{Chip-CBLlJcpj.js => Chip--PuipbNn.js} | 2 +- ...CL4zf-je.js => Color-PRSJMWNM-D1NSRxs2.js} | 2 +- ...-DyTCIv8L.js => ColorSelected-DERcqfqY.js} | 22 +- .../ConditionalFields.stories-CIK4w_Br.js | 41 -- .../ConditionalFields.stories-CuBZev29.js | 41 ++ .../ConditionalSections.stories-BzxNBa44.js | 63 +++ .../ConditionalSections.stories-CJrfGojB.js | 63 --- ...ontent-BaoMomP1.js => Content-DuMbf1nf.js} | 4 +- ...mT5bwpx.js => Content.stories-DKYWttwP.js} | 2 +- sb8/qa/assets/CopyField.stories-Bocg3aAo.js | 47 -- sb8/qa/assets/CopyField.stories-D8vl6OCM.js | 47 ++ ...vc.js => CustomFields.stories-CRHnzSTs.js} | 6 +- ...aView-CwejvtRG.js => DataView-DND1otZJ.js} | 4 +- ...jvnNCb.js => DataView.stories-CWoK1UlZ.js} | 2 +- sb8/qa/assets/DataViewFilterDate-CL8OtlEy.js | 8 - sb8/qa/assets/DataViewFilterDate-DAKF-JSr.js | 8 + ...=> DataViewFilterDate.stories-DcOwcaYR.js} | 2 +- .../DataViewFilterMultiselect-BsQipn6V.js | 8 - ... => DataViewFilterMultiselect-CauoR39J.js} | 2 +- .../DataViewFilterMultiselect-m9o243jr.js | 8 + ...ViewFilterMultiselect.stories-Dydvm6ni.js} | 2 +- ...Vs.js => DataViewFilterNumber-B7ljKOlC.js} | 2 +- .../assets/DataViewFilterNumber-Db9AapSJ.js | 2 + .../assets/DataViewFilterNumber-_ueFXW2q.js | 2 - ... DataViewFilterNumber.stories-CcLy8RTp.js} | 2 +- ...=> DataViewFilterSingleSelect-BNYZnb5V.js} | 2 +- ...n9mO.js => DataViewFilterText-ybZ_EsGC.js} | 2 +- ...ield-DkCPGkwj.js => DateField-8nd5V-aW.js} | 4 +- ...33Jds.js => DateField.stories-SlunRSWe.js} | 2 +- ...{Dialog-ClZZoRRz.js => Dialog-CLqCL8Td.js} | 2 +- ...b.js => DocsRenderer-K4EAMTCU-BDAkdMYL.js} | 2 +- ...O-Pu.js => DrawerForm.stories-XiMucFio.js} | 4 +- ...rawers-Bkf76uI9.js => Drawers-BZPRoBDM.js} | 4 +- ...xyyE3Gs.js => Drawers.stories-C3WqmCH-.js} | 2 +- .../{Form-CV-BOiW8.js => Form-DI4diVc8.js} | 496 +++++++++--------- .../{Form-ZKOA93g4.js => Form-DSFOHgtW.js} | 4 +- ...BF0qu.js => FormFieldCheckbox-CwhTDNnQ.js} | 4 +- .../FormFieldCheckbox.stories-BHmRuaqu.js | 44 ++ .../FormFieldCheckbox.stories-DVtzewRG.js | 42 -- .../assets/FormFieldCheckboxUtils-C4lbz8gc.js | 1 - ...BkhUwh2-.js => FormFieldChips-U8tQx-0d.js} | 4 +- .../assets/FormFieldChips.stories-Cq_Wv4ii.js | 89 ++++ .../assets/FormFieldChips.stories-DL9R8S6Y.js | 87 --- sb8/qa/assets/FormFieldColor-CgTjPGlE.js | 24 + sb8/qa/assets/FormFieldColor-DWS9aAmm.js | 24 - ....js => FormFieldColor.stories-DLYCqAR0.js} | 2 +- ...MYAoR.js => FormFieldDropdown-CR-nDfVw.js} | 4 +- .../FormFieldDropdown.stories-Bh2gLe0I.js | 46 -- .../FormFieldDropdown.stories-D35BKL1x.js | 48 ++ ...CHBP-Dz.js => FormFieldMatrix-odmLsK-d.js} | 4 +- ...js => FormFieldMatrix.stories-hYRhy76O.js} | 2 +- .../FormFieldNumber.stories-BrqMQ9MV.js | 41 ++ .../FormFieldNumber.stories-Csf0gWQQ.js | 41 -- ...EM.js => FormFieldNumberTable-DNouT4Gj.js} | 4 +- ... FormFieldNumberTable.stories-BCw2wRIo.js} | 2 +- ...BXzPUv3N.js => FormFieldPhone-n_ahMH9e.js} | 4 +- ....js => FormFieldPhone.stories-DTF10qcJ.js} | 2 +- ...CkerioW3.js => FormFieldRadio-Duq078w7.js} | 4 +- .../assets/FormFieldRadio.stories-Clhrqbs0.js | 44 ++ .../assets/FormFieldRadio.stories-VK59IpWl.js | 42 -- sb8/qa/assets/FormFieldRaw-QrK-N08f.js | 34 -- sb8/qa/assets/FormFieldRaw-fE5Yg1I_.js | 34 ++ ...gU.js => FormFieldRaw.stories-DlIpseF_.js} | 2 +- ...-CYzl5qoP.js => FormFieldText-D5DmeY_A.js} | 4 +- ...P.js => FormFieldText.stories-jyshk3Pt.js} | 2 +- ...tQy.js => FormFieldTextEditor-DLBmnRFw.js} | 4 +- ...> FormFieldTextEditor.stories--78U4bIU.js} | 56 +- ...84_158S.js => FormFieldToggle-D-jpjbJ2.js} | 4 +- ...js => FormFieldToggle.stories-BTwtv492.js} | 2 +- ...uO5E5cz.js => FormFieldUpload-BNG8bI8z.js} | 4 +- ...js => FormFieldUpload.stories-Dr8iB3Ae.js} | 2 +- ...eftNav-C7fBIJ7w.js => LeftNav-up3e2TVy.js} | 4 +- ...SXaWoff.js => LeftNav.stories-D14Sk1zq.js} | 12 +- ...CklJHx9Y.js => MapCoordinates-CyIb6kGW.js} | 4 +- ....js => MapCoordinates.stories-Dzx6pSuz.js} | 2 +- .../{Menu-BKhbDeZK.js => Menu-j5qQq5Sn.js} | 2 +- sb8/qa/assets/MultiSelectHelper-DmwpeCwC.js | 1 - sb8/qa/assets/MultiSelectHelper-RF8UoF_G.js | 1 + ...der-CYJBJiQf.js => PageHeader-1AoG5VyX.js} | 2 +- .../PerformanceWithSubmit.stories-BVRuYcxC.js | 36 ++ .../PerformanceWithSubmit.stories-YhcTQr7g.js | 36 -- ...4H1u.js => Playground.stories-CFe8bmy-.js} | 6 +- ...opover-ScjSa1PN.js => Popover-CzYH8svQ.js} | 2 +- ...t5WjSM6.js => Profile.stories-BlKq5dWw.js} | 4 +- .../QuickSubmitForm.stories-C9eWAmRX.js | 41 ++ .../QuickSubmitForm.stories-fTXIJDlJ.js | 41 -- ...on-77P2q9rL.js => RadioButton-o-uStK_I.js} | 2 +- .../RuntimeBehaviours.stories-B8lJPwq1.js | 88 ---- .../RuntimeBehaviours.stories-C77En4W6.js | 88 ++++ ...ideNav-BpDKwX7f.js => SideNav-D03BY5tv.js} | 2 +- ...ckbar-B46I4F3r.js => Snackbar-Wc0BObS9.js} | 2 +- ...pinner-BNqc11uu.js => Spinner-DyJuN7Qd.js} | 2 +- sb8/qa/assets/TimeField-CZTxZGU5.js | 23 + sb8/qa/assets/TimeField-DiePDYUp.js | 23 - ...PCXY9.js => TimeField.stories-lCNgopK_.js} | 2 +- ...{Toggle-B3IcLP0k.js => Toggle-jOgv7f_E.js} | 2 +- ...ary-DnscXVfa.js => TopSummary-C_3bhTOA.js} | 2 +- ...phy-MOP15uQe.js => Typography-Ca3FrB7Q.js} | 2 +- sb8/qa/assets/Validators.stories-Cf5JNoVm.js | 126 +++++ sb8/qa/assets/Validators.stories-Dtu8FbX3.js | 126 ----- .../VaryingSections.stories-CFfE-Gyx.js | 71 --- .../VaryingSections.stories-DjCsQGoV.js | 71 +++ ...8g.js => WithTooltip-KJL26V4Q-B7uSIuX9.js} | 2 +- ...9oUZD.js => column_transforms-Dko5dOVT.js} | 2 +- ...T4MBf.js => column_transforms-DwNjIJnr.js} | 2 +- sb8/qa/assets/debounce-CHvAeqRr.js | 1 + sb8/qa/assets/debounce-DO3dP4oK.js | 1 - ..._tSd.js => formatter-2WMMO6ZP-FuXLQW36.js} | 2 +- sb8/qa/assets/iframe-C5lwtss6.js | 2 + sb8/qa/assets/iframe-pNl7__mS.js | 2 - sb8/qa/assets/index-BU7KlZI9.js | 89 ---- .../{index-DgDEFTzX.js => index-C36bqT4L.js} | 2 +- sb8/qa/assets/index-CV8e2Lol.js | 89 ++++ .../{index-CGWOAm_e.js => index-vCrdABUF.js} | 10 +- sb8/qa/assets/isSymbol-CEVJpixJ.js | 1 - ...ptions-CstHLxTf.js => options-CJLEAYpf.js} | 2 +- ...review-BD9rhEZU.js => preview-DQSCoHL9.js} | 4 +- ...=> syntaxhighlighter-BP7B2CQK-Bmr7Ye6R.js} | 2 +- ...bTK9L.js => transform_boolean-DtHdTUf_.js} | 2 +- sb8/qa/assets/transform_chips-CHrXm3EB.js | 16 + sb8/qa/assets/transform_chips-q0J6IZAl.js | 16 - .../assets/transform_colorPicker-BiwRqio7.js | 16 - .../assets/transform_colorPicker-CVhxnVs4.js | 16 + .../assets/transform_dateFormat-Bw9T2tjO.js | 16 - .../assets/transform_dateFormat-b7FyNjdO.js | 16 + ...-D3q7rPO7.js => transform_get-DwBROQOu.js} | 2 +- ...DIdnA-HQ.js => transform_join-CK-YzdLf.js} | 2 +- ...MdA0MS.js => transform_mapGet-CAg4ID5E.js} | 2 +- sb8/qa/assets/transform_thumbnail-CAUNsFVx.js | 19 - sb8/qa/assets/transform_thumbnail-Dv6cqkY8.js | 19 + ...y-DAzNhfNr.js => useScrollSpy-BkTeMF6S.js} | 2 +- ...ggle-D55OlF8o.js => useToggle-_iVS_13-.js} | 2 +- sb8/qa/iframe.html | 2 +- sb8/qa/project.json | 2 +- 149 files changed, 1473 insertions(+), 1449 deletions(-) rename sb8/qa/assets/{Address-CBI7B4y7.js => Address-DZpOdq1E.js} (74%) rename sb8/qa/assets/{Address.stories-DPRaj4NG.js => Address.stories-iLj4QLHw.js} (99%) rename sb8/qa/assets/{AdvancedSelection-B18-B_7A.js => AdvancedSelection-CqBYSply.js} (70%) rename sb8/qa/assets/{AdvancedSelection.stories-BmuSKmDD.js => AdvancedSelection.stories-FVRMi6fE.js} (97%) rename sb8/qa/assets/{Button-BBz0kfcw.js => Button-CIF8JiZP.js} (95%) rename sb8/qa/assets/{ButtonRow-B33hkYPE.js => ButtonRow-DfcfK47f.js} (90%) rename sb8/qa/assets/{Card-Dv9AIS3I.js => Card-TKyBNl97.js} (91%) rename sb8/qa/assets/{Checkbox-CODv9_Wr.js => Checkbox-D_4gEYtK.js} (70%) rename sb8/qa/assets/{Checkbox-Q_CVLB8I.js => Checkbox-xlAxlAoW.js} (86%) rename sb8/qa/assets/{Checkbox.stories-CzoKAU3V.js => Checkbox.stories-BhIIAygP.js} (93%) rename sb8/qa/assets/{CheckboxList-csbS6mbI.js => CheckboxList-DGXZFQKm.js} (54%) delete mode 100644 sb8/qa/assets/CheckboxList-Dbk8JkiG.js create mode 100644 sb8/qa/assets/CheckboxList-DjNmes3Y.js create mode 100644 sb8/qa/assets/CheckboxList.stories-ATySsjxI.js delete mode 100644 sb8/qa/assets/CheckboxList.stories-CZU1ZcPG.js rename sb8/qa/assets/{Chip-CBLlJcpj.js => Chip--PuipbNn.js} (93%) rename sb8/qa/assets/{Color-PRSJMWNM-CL4zf-je.js => Color-PRSJMWNM-D1NSRxs2.js} (99%) rename sb8/qa/assets/{ColorSelected-DyTCIv8L.js => ColorSelected-DERcqfqY.js} (97%) delete mode 100644 sb8/qa/assets/ConditionalFields.stories-CIK4w_Br.js create mode 100644 sb8/qa/assets/ConditionalFields.stories-CuBZev29.js create mode 100644 sb8/qa/assets/ConditionalSections.stories-BzxNBa44.js delete mode 100644 sb8/qa/assets/ConditionalSections.stories-CJrfGojB.js rename sb8/qa/assets/{Content-BaoMomP1.js => Content-DuMbf1nf.js} (74%) rename sb8/qa/assets/{Content.stories-BmT5bwpx.js => Content.stories-DKYWttwP.js} (99%) delete mode 100644 sb8/qa/assets/CopyField.stories-Bocg3aAo.js create mode 100644 sb8/qa/assets/CopyField.stories-D8vl6OCM.js rename sb8/qa/assets/{CustomFields.stories-4_tbGFvc.js => CustomFields.stories-CRHnzSTs.js} (59%) rename sb8/qa/assets/{DataView-CwejvtRG.js => DataView-DND1otZJ.js} (86%) rename sb8/qa/assets/{DataView.stories-D8jvnNCb.js => DataView.stories-CWoK1UlZ.js} (99%) delete mode 100644 sb8/qa/assets/DataViewFilterDate-CL8OtlEy.js create mode 100644 sb8/qa/assets/DataViewFilterDate-DAKF-JSr.js rename sb8/qa/assets/{DataViewFilterDate.stories-DgC0Tat0.js => DataViewFilterDate.stories-DcOwcaYR.js} (98%) delete mode 100644 sb8/qa/assets/DataViewFilterMultiselect-BsQipn6V.js rename sb8/qa/assets/{DataViewFilterMultiselect-B6wYHAKN.js => DataViewFilterMultiselect-CauoR39J.js} (96%) create mode 100644 sb8/qa/assets/DataViewFilterMultiselect-m9o243jr.js rename sb8/qa/assets/{DataViewFilterMultiselect.stories-C7izyXi5.js => DataViewFilterMultiselect.stories-Dydvm6ni.js} (96%) rename sb8/qa/assets/{DataViewFilterNumber-BRF6XiVs.js => DataViewFilterNumber-B7ljKOlC.js} (96%) create mode 100644 sb8/qa/assets/DataViewFilterNumber-Db9AapSJ.js delete mode 100644 sb8/qa/assets/DataViewFilterNumber-_ueFXW2q.js rename sb8/qa/assets/{DataViewFilterNumber.stories-Cm13wqZe.js => DataViewFilterNumber.stories-CcLy8RTp.js} (90%) rename sb8/qa/assets/{DataViewFilterSingleSelect-on0F5d9x.js => DataViewFilterSingleSelect-BNYZnb5V.js} (94%) rename sb8/qa/assets/{DataViewFilterText-BBkxn9mO.js => DataViewFilterText-ybZ_EsGC.js} (95%) rename sb8/qa/assets/{DateField-DkCPGkwj.js => DateField-8nd5V-aW.js} (56%) rename sb8/qa/assets/{DateField.stories-D4s33Jds.js => DateField.stories-SlunRSWe.js} (98%) rename sb8/qa/assets/{Dialog-ClZZoRRz.js => Dialog-CLqCL8Td.js} (94%) rename sb8/qa/assets/{DocsRenderer-K4EAMTCU-BMcUCSyb.js => DocsRenderer-K4EAMTCU-BDAkdMYL.js} (86%) rename sb8/qa/assets/{DrawerForm.stories-BiW5O-Pu.js => DrawerForm.stories-XiMucFio.js} (83%) rename sb8/qa/assets/{Drawers-Bkf76uI9.js => Drawers-BZPRoBDM.js} (72%) rename sb8/qa/assets/{Drawers.stories-DxyyE3Gs.js => Drawers.stories-C3WqmCH-.js} (98%) rename sb8/qa/assets/{Form-CV-BOiW8.js => Form-DI4diVc8.js} (59%) rename sb8/qa/assets/{Form-ZKOA93g4.js => Form-DSFOHgtW.js} (95%) rename sb8/qa/assets/{FormFieldCheckbox-s51BF0qu.js => FormFieldCheckbox-CwhTDNnQ.js} (56%) create mode 100644 sb8/qa/assets/FormFieldCheckbox.stories-BHmRuaqu.js delete mode 100644 sb8/qa/assets/FormFieldCheckbox.stories-DVtzewRG.js delete mode 100644 sb8/qa/assets/FormFieldCheckboxUtils-C4lbz8gc.js rename sb8/qa/assets/{FormFieldChips-BkhUwh2-.js => FormFieldChips-U8tQx-0d.js} (59%) create mode 100644 sb8/qa/assets/FormFieldChips.stories-Cq_Wv4ii.js delete mode 100644 sb8/qa/assets/FormFieldChips.stories-DL9R8S6Y.js create mode 100644 sb8/qa/assets/FormFieldColor-CgTjPGlE.js delete mode 100644 sb8/qa/assets/FormFieldColor-DWS9aAmm.js rename sb8/qa/assets/{FormFieldColor.stories-s9HQTuzo.js => FormFieldColor.stories-DLYCqAR0.js} (97%) rename sb8/qa/assets/{FormFieldDropdown-C-oMYAoR.js => FormFieldDropdown-CR-nDfVw.js} (62%) delete mode 100644 sb8/qa/assets/FormFieldDropdown.stories-Bh2gLe0I.js create mode 100644 sb8/qa/assets/FormFieldDropdown.stories-D35BKL1x.js rename sb8/qa/assets/{FormFieldMatrix-BCHBP-Dz.js => FormFieldMatrix-odmLsK-d.js} (63%) rename sb8/qa/assets/{FormFieldMatrix.stories-Bb0XBc6b.js => FormFieldMatrix.stories-hYRhy76O.js} (99%) create mode 100644 sb8/qa/assets/FormFieldNumber.stories-BrqMQ9MV.js delete mode 100644 sb8/qa/assets/FormFieldNumber.stories-Csf0gWQQ.js rename sb8/qa/assets/{FormFieldNumberTable-DobM4UEM.js => FormFieldNumberTable-DNouT4Gj.js} (74%) rename sb8/qa/assets/{FormFieldNumberTable.stories-B-C5Nb11.js => FormFieldNumberTable.stories-BCw2wRIo.js} (96%) rename sb8/qa/assets/{FormFieldPhone-BXzPUv3N.js => FormFieldPhone-n_ahMH9e.js} (57%) rename sb8/qa/assets/{FormFieldPhone.stories-ChZb8VU-.js => FormFieldPhone.stories-DTF10qcJ.js} (98%) rename sb8/qa/assets/{FormFieldRadio-CkerioW3.js => FormFieldRadio-Duq078w7.js} (59%) create mode 100644 sb8/qa/assets/FormFieldRadio.stories-Clhrqbs0.js delete mode 100644 sb8/qa/assets/FormFieldRadio.stories-VK59IpWl.js delete mode 100644 sb8/qa/assets/FormFieldRaw-QrK-N08f.js create mode 100644 sb8/qa/assets/FormFieldRaw-fE5Yg1I_.js rename sb8/qa/assets/{FormFieldRaw.stories-Cf7RONgU.js => FormFieldRaw.stories-DlIpseF_.js} (98%) rename sb8/qa/assets/{FormFieldText-CYzl5qoP.js => FormFieldText-D5DmeY_A.js} (63%) rename sb8/qa/assets/{FormFieldText.stories-B-BETp3P.js => FormFieldText.stories-jyshk3Pt.js} (99%) rename sb8/qa/assets/{FormFieldTextEditor-DyKSJtQy.js => FormFieldTextEditor-DLBmnRFw.js} (74%) rename sb8/qa/assets/{FormFieldTextEditor.stories-Cn3zHCJJ.js => FormFieldTextEditor.stories--78U4bIU.js} (66%) rename sb8/qa/assets/{FormFieldToggle-D84_158S.js => FormFieldToggle-D-jpjbJ2.js} (51%) rename sb8/qa/assets/{FormFieldToggle.stories-UCzpItoW.js => FormFieldToggle.stories-BTwtv492.js} (98%) rename sb8/qa/assets/{FormFieldUpload-DuO5E5cz.js => FormFieldUpload-BNG8bI8z.js} (77%) rename sb8/qa/assets/{FormFieldUpload.stories-yO0SuKxn.js => FormFieldUpload.stories-Dr8iB3Ae.js} (99%) rename sb8/qa/assets/{LeftNav-C7fBIJ7w.js => LeftNav-up3e2TVy.js} (93%) rename sb8/qa/assets/{LeftNav.stories-tSXaWoff.js => LeftNav.stories-D14Sk1zq.js} (85%) rename sb8/qa/assets/{MapCoordinates-CklJHx9Y.js => MapCoordinates-CyIb6kGW.js} (62%) rename sb8/qa/assets/{MapCoordinates.stories-Dm8oc64D.js => MapCoordinates.stories-Dzx6pSuz.js} (98%) rename sb8/qa/assets/{Menu-BKhbDeZK.js => Menu-j5qQq5Sn.js} (91%) delete mode 100644 sb8/qa/assets/MultiSelectHelper-DmwpeCwC.js create mode 100644 sb8/qa/assets/MultiSelectHelper-RF8UoF_G.js rename sb8/qa/assets/{PageHeader-CYJBJiQf.js => PageHeader-1AoG5VyX.js} (91%) create mode 100644 sb8/qa/assets/PerformanceWithSubmit.stories-BVRuYcxC.js delete mode 100644 sb8/qa/assets/PerformanceWithSubmit.stories-YhcTQr7g.js rename sb8/qa/assets/{Playground.stories-yxXL4H1u.js => Playground.stories-CFe8bmy-.js} (51%) rename sb8/qa/assets/{Popover-ScjSa1PN.js => Popover-CzYH8svQ.js} (91%) rename sb8/qa/assets/{Profile.stories-wt5WjSM6.js => Profile.stories-BlKq5dWw.js} (54%) create mode 100644 sb8/qa/assets/QuickSubmitForm.stories-C9eWAmRX.js delete mode 100644 sb8/qa/assets/QuickSubmitForm.stories-fTXIJDlJ.js rename sb8/qa/assets/{RadioButton-77P2q9rL.js => RadioButton-o-uStK_I.js} (94%) delete mode 100644 sb8/qa/assets/RuntimeBehaviours.stories-B8lJPwq1.js create mode 100644 sb8/qa/assets/RuntimeBehaviours.stories-C77En4W6.js rename sb8/qa/assets/{SideNav-BpDKwX7f.js => SideNav-D03BY5tv.js} (96%) rename sb8/qa/assets/{Snackbar-B46I4F3r.js => Snackbar-Wc0BObS9.js} (92%) rename sb8/qa/assets/{Spinner-BNqc11uu.js => Spinner-DyJuN7Qd.js} (90%) create mode 100644 sb8/qa/assets/TimeField-CZTxZGU5.js delete mode 100644 sb8/qa/assets/TimeField-DiePDYUp.js rename sb8/qa/assets/{TimeField.stories-BX7PCXY9.js => TimeField.stories-lCNgopK_.js} (97%) rename sb8/qa/assets/{Toggle-B3IcLP0k.js => Toggle-jOgv7f_E.js} (94%) rename sb8/qa/assets/{TopSummary-DnscXVfa.js => TopSummary-C_3bhTOA.js} (92%) rename sb8/qa/assets/{Typography-MOP15uQe.js => Typography-Ca3FrB7Q.js} (98%) create mode 100644 sb8/qa/assets/Validators.stories-Cf5JNoVm.js delete mode 100644 sb8/qa/assets/Validators.stories-Dtu8FbX3.js delete mode 100644 sb8/qa/assets/VaryingSections.stories-CFfE-Gyx.js create mode 100644 sb8/qa/assets/VaryingSections.stories-DjCsQGoV.js rename sb8/qa/assets/{WithTooltip-KJL26V4Q-CBwv8e8g.js => WithTooltip-KJL26V4Q-B7uSIuX9.js} (71%) rename sb8/qa/assets/{column_transforms-D6a9oUZD.js => column_transforms-Dko5dOVT.js} (93%) rename sb8/qa/assets/{column_transforms-CdVT4MBf.js => column_transforms-DwNjIJnr.js} (79%) create mode 100644 sb8/qa/assets/debounce-CHvAeqRr.js delete mode 100644 sb8/qa/assets/debounce-DO3dP4oK.js rename sb8/qa/assets/{formatter-2WMMO6ZP-BGOy_tSd.js => formatter-2WMMO6ZP-FuXLQW36.js} (99%) create mode 100644 sb8/qa/assets/iframe-C5lwtss6.js delete mode 100644 sb8/qa/assets/iframe-pNl7__mS.js delete mode 100644 sb8/qa/assets/index-BU7KlZI9.js rename sb8/qa/assets/{index-DgDEFTzX.js => index-C36bqT4L.js} (96%) create mode 100644 sb8/qa/assets/index-CV8e2Lol.js rename sb8/qa/assets/{index-CGWOAm_e.js => index-vCrdABUF.js} (99%) delete mode 100644 sb8/qa/assets/isSymbol-CEVJpixJ.js rename sb8/qa/assets/{options-CstHLxTf.js => options-CJLEAYpf.js} (93%) rename sb8/qa/assets/{preview-BD9rhEZU.js => preview-DQSCoHL9.js} (73%) rename sb8/qa/assets/{syntaxhighlighter-BP7B2CQK-CzdqDOY2.js => syntaxhighlighter-BP7B2CQK-Bmr7Ye6R.js} (74%) rename sb8/qa/assets/{transform_boolean-C-4bTK9L.js => transform_boolean-DtHdTUf_.js} (91%) create mode 100644 sb8/qa/assets/transform_chips-CHrXm3EB.js delete mode 100644 sb8/qa/assets/transform_chips-q0J6IZAl.js delete mode 100644 sb8/qa/assets/transform_colorPicker-BiwRqio7.js create mode 100644 sb8/qa/assets/transform_colorPicker-CVhxnVs4.js delete mode 100644 sb8/qa/assets/transform_dateFormat-Bw9T2tjO.js create mode 100644 sb8/qa/assets/transform_dateFormat-b7FyNjdO.js rename sb8/qa/assets/{transform_get-D3q7rPO7.js => transform_get-DwBROQOu.js} (93%) rename sb8/qa/assets/{transform_join-DIdnA-HQ.js => transform_join-CK-YzdLf.js} (91%) rename sb8/qa/assets/{transform_mapGet-DVMdA0MS.js => transform_mapGet-CAg4ID5E.js} (94%) delete mode 100644 sb8/qa/assets/transform_thumbnail-CAUNsFVx.js create mode 100644 sb8/qa/assets/transform_thumbnail-Dv6cqkY8.js rename sb8/qa/assets/{useScrollSpy-DAzNhfNr.js => useScrollSpy-BkTeMF6S.js} (95%) rename sb8/qa/assets/{useToggle-D55OlF8o.js => useToggle-_iVS_13-.js} (98%) diff --git a/sb8/qa/assets/Address-CBI7B4y7.js b/sb8/qa/assets/Address-DZpOdq1E.js similarity index 74% rename from sb8/qa/assets/Address-CBI7B4y7.js rename to sb8/qa/assets/Address-DZpOdq1E.js index a34fbff97c..af3e60aa23 100644 --- a/sb8/qa/assets/Address-CBI7B4y7.js +++ b/sb8/qa/assets/Address-DZpOdq1E.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as n}from"./index-3-_tf5dF.js";import{M as s}from"./index-CGWOAm_e.js";import{s as o}from"./Address.stories-DPRaj4NG.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./renderButtons-BmHfsf_z.js";import"./Form-CV-BOiW8.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useMosaicTranslation-CZCb37QS.js";import"./createSvgIcon-Pzp5yWPs.js";import"./useId-DLncWxdO.js";import"./ButtonRow-CP4CrsnB.js";import"./Chip-CRqL1Gcl.js";import"./sizes-C6oSOElx.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./index-BU7KlZI9.js";import"./debounce-DO3dP4oK.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./ColorSelected-DyTCIv8L.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./optionGetters-DXvNsMp-.js";function i(r){const t={a:"a",code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...n(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{of:o}),` +import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as n}from"./index-3-_tf5dF.js";import{M as s}from"./index-vCrdABUF.js";import{s as o}from"./Address.stories-iLj4QLHw.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./renderButtons-BmHfsf_z.js";import"./Form-DI4diVc8.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./formControlState-DyMXFR7f.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./ColorSelected-DERcqfqY.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./optionGetters-DXvNsMp-.js";function i(r){const t={a:"a",code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...n(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{of:o}),` `,e.jsx(t.h1,{id:"address",children:"Address"}),` `,e.jsxs(t.p,{children:["This field implements the ",e.jsx(t.a,{href:"#generic-field-props-fielddef",children:e.jsx(t.strong,{children:"FieldDef"})})," interface."]}),` `,e.jsxs(t.ul,{children:[` @@ -53,4 +53,4 @@ const fields = useMemo(\r ],\r []\r ); -`})})]})}function Me(r={}){const{wrapper:t}={...n(),...r.components};return t?e.jsx(t,{...r,children:e.jsx(i,{...r})}):i(r)}export{Me as default}; +`})})]})}function be(r={}){const{wrapper:t}={...n(),...r.components};return t?e.jsx(t,{...r,children:e.jsx(i,{...r})}):i(r)}export{be as default}; diff --git a/sb8/qa/assets/Address.stories-DPRaj4NG.js b/sb8/qa/assets/Address.stories-iLj4QLHw.js similarity index 99% rename from sb8/qa/assets/Address.stories-DPRaj4NG.js rename to sb8/qa/assets/Address.stories-iLj4QLHw.js index 1756105339..7c464ab80a 100644 --- a/sb8/qa/assets/Address.stories-DPRaj4NG.js +++ b/sb8/qa/assets/Address.stories-iLj4QLHw.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as f}from"./index-BP8_t0zE.js";import{r as j}from"./renderButtons-BmHfsf_z.js";import{u as h,F}from"./Form-CV-BOiW8.js";import{g as _,a as C}from"./optionGetters-DXvNsMp-.js";const I={title:"FormFields/FormFieldAddress"},y=["undefined",1,2,3,4,5,-1],r={getOptionsCountries:_,getOptionsStates:C},V="AIzaSyArV4f-KFF86Zn9VWAu9wS4hHlG1TXxqac",q=[{id:1,address1:"137 Teaticket Highway",address2:"",city:"Falmouth",state:{label:"Massachusetts",value:"MA"},postalCode:"02536",country:{label:"United States",value:"US"},types:[{label:"Physical",value:"physical"}]},{id:2,address1:"555 East Main Street",address2:"",city:"Norfolk",state:{label:"Virginia",value:"VA"},postalCode:"23510",country:{label:"United States",value:"US"},types:[{label:"Physical",value:"physical"}]}],s=({label:n,disabled:i,required:d,skeleton:b,prepopulate:u,amountPerType:a,amountShipping:o,amountPhysical:l,amountBilling:m,googleKey:c})=>{const g=h(),{state:S,handleSubmit:O}=g,B=f.useMemo(()=>u?async()=>({address:q}):void 0,[u]),E=f.useMemo(()=>[{disabled:i,label:n,required:d,name:"address",type:"address",inputSettings:{amountPerType:a==="undefined"?void 0:Number(a),amountShipping:o==="undefined"?void 0:Number(o),amountPhysical:l==="undefined"?void 0:Number(l),amountBilling:m==="undefined"?void 0:Number(m),googleMapsApiKey:c,...r}}],[i,n,d,a,o,l,m,c]);return e.jsxs(e.Fragment,{children:[e.jsx(F,{...g,buttons:j(O),title:"Address field",fields:E,skeleton:b,getFormValues:B}),e.jsx("pre",{children:JSON.stringify(S,null," ")})]})};s.args={label:"Label",disabled:!1,required:!1,skeleton:!1,prepopulate:!1,amountPerType:"undefined",amountShipping:"undefined",amountPhysical:"undefined",amountBilling:"undefined",googleKey:V};s.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},prepopulate:{name:"Prepopulate"},amountPerType:{name:"Maximum of Each Type",control:{type:"select"},options:y},amountShipping:{name:"Shipping Maximum",control:{type:"select"},options:y},amountPhysical:{name:"Physical Maximum",control:{type:"select"},options:y},amountBilling:{name:"Billing Maximum",control:{type:"select"},options:y},googleKey:{name:"Google API Key"}};const t=({label:n,disabled:i,required:d,skeleton:b,prepopulate:u,subFields:a,googleKey:o})=>{const l=h(),{state:m,handleSubmit:c}=l,g=f.useMemo(()=>u?async()=>({address:q[0]}):void 0,[u]),S=f.useMemo(()=>[{disabled:i,label:n,required:d,name:"address",type:"addressSingle",inputSettings:{subFields:a,googleMapsApiKey:o,...r}}],[i,n,d,a,o]);return e.jsxs(e.Fragment,{children:[e.jsx(F,{...l,buttons:j(c),title:"Address Single field",fields:S,skeleton:b,getFormValues:g}),e.jsx("pre",{children:JSON.stringify(m,null," ")})]})};t.args={label:"Label",disabled:!1,required:!1,skeleton:!1,prepopulate:!1,subFields:["address1","address2","address3","country","city","state","postalCode"],googleKey:V};t.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},prepopulate:{name:"Prepopulate"},subFields:{name:"Sub-Fields",control:{type:"object"}},googleKey:{name:"Google API Key"}};const R=[{label:"Provide a physical address",name:"physicalOnly",type:"address",inputSettings:{amountPhysical:1,...r}},{label:"Provide 1 physical address and 1 shipping address",name:"physicalAndShipping",type:"address",inputSettings:{amountPhysical:1,amountShipping:1,...r}},{label:"Provide any combination of addresses with a maximum of 1 each",name:"anyCombinationMax1",type:"address",inputSettings:{...r}},{label:"Provide any combination of addresses with no maximum",name:"anyCombinationNoMax",type:"address",inputSettings:{amountPerType:-1,...r}}],p=()=>{const n=h();return e.jsx(F,{...n,title:"Address Field",fields:R})};var P,M,x;s.parameters={...s.parameters,docs:{...(P=s.parameters)==null?void 0:P.docs,source:{originalSource:`({ +import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as f}from"./index-BP8_t0zE.js";import{r as j}from"./renderButtons-BmHfsf_z.js";import{u as h,F}from"./Form-DI4diVc8.js";import{g as _,a as C}from"./optionGetters-DXvNsMp-.js";const I={title:"FormFields/FormFieldAddress"},y=["undefined",1,2,3,4,5,-1],r={getOptionsCountries:_,getOptionsStates:C},V="AIzaSyArV4f-KFF86Zn9VWAu9wS4hHlG1TXxqac",q=[{id:1,address1:"137 Teaticket Highway",address2:"",city:"Falmouth",state:{label:"Massachusetts",value:"MA"},postalCode:"02536",country:{label:"United States",value:"US"},types:[{label:"Physical",value:"physical"}]},{id:2,address1:"555 East Main Street",address2:"",city:"Norfolk",state:{label:"Virginia",value:"VA"},postalCode:"23510",country:{label:"United States",value:"US"},types:[{label:"Physical",value:"physical"}]}],s=({label:n,disabled:i,required:d,skeleton:b,prepopulate:u,amountPerType:a,amountShipping:o,amountPhysical:l,amountBilling:m,googleKey:c})=>{const g=h(),{state:S,handleSubmit:O}=g,B=f.useMemo(()=>u?async()=>({address:q}):void 0,[u]),E=f.useMemo(()=>[{disabled:i,label:n,required:d,name:"address",type:"address",inputSettings:{amountPerType:a==="undefined"?void 0:Number(a),amountShipping:o==="undefined"?void 0:Number(o),amountPhysical:l==="undefined"?void 0:Number(l),amountBilling:m==="undefined"?void 0:Number(m),googleMapsApiKey:c,...r}}],[i,n,d,a,o,l,m,c]);return e.jsxs(e.Fragment,{children:[e.jsx(F,{...g,buttons:j(O),title:"Address field",fields:E,skeleton:b,getFormValues:B}),e.jsx("pre",{children:JSON.stringify(S,null," ")})]})};s.args={label:"Label",disabled:!1,required:!1,skeleton:!1,prepopulate:!1,amountPerType:"undefined",amountShipping:"undefined",amountPhysical:"undefined",amountBilling:"undefined",googleKey:V};s.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},prepopulate:{name:"Prepopulate"},amountPerType:{name:"Maximum of Each Type",control:{type:"select"},options:y},amountShipping:{name:"Shipping Maximum",control:{type:"select"},options:y},amountPhysical:{name:"Physical Maximum",control:{type:"select"},options:y},amountBilling:{name:"Billing Maximum",control:{type:"select"},options:y},googleKey:{name:"Google API Key"}};const t=({label:n,disabled:i,required:d,skeleton:b,prepopulate:u,subFields:a,googleKey:o})=>{const l=h(),{state:m,handleSubmit:c}=l,g=f.useMemo(()=>u?async()=>({address:q[0]}):void 0,[u]),S=f.useMemo(()=>[{disabled:i,label:n,required:d,name:"address",type:"addressSingle",inputSettings:{subFields:a,googleMapsApiKey:o,...r}}],[i,n,d,a,o]);return e.jsxs(e.Fragment,{children:[e.jsx(F,{...l,buttons:j(c),title:"Address Single field",fields:S,skeleton:b,getFormValues:g}),e.jsx("pre",{children:JSON.stringify(m,null," ")})]})};t.args={label:"Label",disabled:!1,required:!1,skeleton:!1,prepopulate:!1,subFields:["address1","address2","address3","country","city","state","postalCode"],googleKey:V};t.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},prepopulate:{name:"Prepopulate"},subFields:{name:"Sub-Fields",control:{type:"object"}},googleKey:{name:"Google API Key"}};const R=[{label:"Provide a physical address",name:"physicalOnly",type:"address",inputSettings:{amountPhysical:1,...r}},{label:"Provide 1 physical address and 1 shipping address",name:"physicalAndShipping",type:"address",inputSettings:{amountPhysical:1,amountShipping:1,...r}},{label:"Provide any combination of addresses with a maximum of 1 each",name:"anyCombinationMax1",type:"address",inputSettings:{...r}},{label:"Provide any combination of addresses with no maximum",name:"anyCombinationNoMax",type:"address",inputSettings:{amountPerType:-1,...r}}],p=()=>{const n=h();return e.jsx(F,{...n,title:"Address Field",fields:R})};var P,M,x;s.parameters={...s.parameters,docs:{...(P=s.parameters)==null?void 0:P.docs,source:{originalSource:`({ label, disabled, required, diff --git a/sb8/qa/assets/AdvancedSelection-B18-B_7A.js b/sb8/qa/assets/AdvancedSelection-CqBYSply.js similarity index 70% rename from sb8/qa/assets/AdvancedSelection-B18-B_7A.js rename to sb8/qa/assets/AdvancedSelection-CqBYSply.js index 64e1ec7395..dfbd359209 100644 --- a/sb8/qa/assets/AdvancedSelection-B18-B_7A.js +++ b/sb8/qa/assets/AdvancedSelection-CqBYSply.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as i}from"./index-3-_tf5dF.js";import{M as o}from"./index-CGWOAm_e.js";import{s}from"./AdvancedSelection.stories-BmuSKmDD.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./index.browser-vcSNLBTf.js";import"./Form-CV-BOiW8.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useMosaicTranslation-CZCb37QS.js";import"./createSvgIcon-Pzp5yWPs.js";import"./useId-DLncWxdO.js";import"./ButtonRow-CP4CrsnB.js";import"./Chip-CRqL1Gcl.js";import"./sizes-C6oSOElx.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./index-BU7KlZI9.js";import"./debounce-DO3dP4oK.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./ColorSelected-DyTCIv8L.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./renderButtons-BmHfsf_z.js";import"./options-CstHLxTf.js";import"./MultiSelectHelper-DmwpeCwC.js";function r(n){const e={a:"a",code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...i(),...n.components};return t.jsxs(t.Fragment,{children:[t.jsx(o,{of:s}),` +import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as i}from"./index-3-_tf5dF.js";import{M as o}from"./index-vCrdABUF.js";import{s}from"./AdvancedSelection.stories-FVRMi6fE.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./index.browser-vcSNLBTf.js";import"./Form-DI4diVc8.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./formControlState-DyMXFR7f.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./ColorSelected-DERcqfqY.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./renderButtons-BmHfsf_z.js";import"./options-CJLEAYpf.js";import"./MultiSelectHelper-RF8UoF_G.js";function r(n){const e={a:"a",code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...i(),...n.components};return t.jsxs(t.Fragment,{children:[t.jsx(o,{of:s}),` `,t.jsx(e.h1,{id:"advanced-selection",children:"Advanced Selection"}),` `,t.jsxs(e.p,{children:["This field implements the ",t.jsx(e.a,{href:"#generic-field-props-fielddef",children:t.jsx(e.strong,{children:"FieldDef"})})," interface."]}),` `,t.jsxs(e.ul,{children:[` @@ -81,4 +81,4 @@ const fields = useMemo(\r ],\r []\r ); -`})})]})}function vt(n={}){const{wrapper:e}={...i(),...n.components};return e?t.jsx(e,{...n,children:t.jsx(r,{...n})}):r(n)}export{vt as default}; +`})})]})}function Ot(n={}){const{wrapper:e}={...i(),...n.components};return e?t.jsx(e,{...n,children:t.jsx(r,{...n})}):r(n)}export{Ot as default}; diff --git a/sb8/qa/assets/AdvancedSelection.stories-BmuSKmDD.js b/sb8/qa/assets/AdvancedSelection.stories-FVRMi6fE.js similarity index 97% rename from sb8/qa/assets/AdvancedSelection.stories-BmuSKmDD.js rename to sb8/qa/assets/AdvancedSelection.stories-FVRMi6fE.js index 0b01108967..dad46630d3 100644 --- a/sb8/qa/assets/AdvancedSelection.stories-BmuSKmDD.js +++ b/sb8/qa/assets/AdvancedSelection.stories-FVRMi6fE.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{r as _}from"./index-BP8_t0zE.js";import{n as T}from"./index.browser-vcSNLBTf.js";import{u as C,F as H}from"./Form-CV-BOiW8.js";import{r as M}from"./renderButtons-BmHfsf_z.js";import{o as s}from"./options-CstHLxTf.js";import{M as j,J as k,c as B}from"./MultiSelectHelper-DmwpeCwC.js";const E={title:"FormFields/FormFieldAdvancedSelection"},i=({label:r,required:g,skeleton:O,disabled:n,instructionText:o,helperText:l,optionsOrigin:a,getOptionsLimit:c,createNewOptionsKnob:p,selectLimit:d})=>{const e=C(),{state:S,handleSubmit:w}=e,v=s?s:[],b=new k(B),L=new j({api:b,labelColumn:"tag",valueColumn:"id",sortColumn:"sort_tag"}),J=async f=>{const D=T(),u={_id:D,tag:f,sort_tag:f,updated:new Date,created:new Date,id:D};s.push({label:u.tag,value:u.id});const q=[...await b.getData(),u];return await b.setData(q),{label:u.tag,value:u.id}},K=_.useMemo(()=>[{name:"advancedSelection",label:r,required:g,disabled:n,helperText:l,instructionText:o,type:"advancedSelection",inputSettings:{options:a==="Local"?v:void 0,getOptions:a==="DB"?L.getOptions.bind(L):void 0,getOptionsLimit:a==="DB"&&c?c:void 0,createNewOption:p?J:void 0,selectLimit:d}}],[r,g,n,l,o,c,v,a,p,d]);return t.jsxs(t.Fragment,{children:[t.jsx("pre",{children:JSON.stringify(S,null," ")}),t.jsx(H,{...e,buttons:M(w),title:"Advanced Selection Field",fields:K,skeleton:O})]})};i.args={label:"Label",disabled:!1,required:!1,skeleton:!1,instructionText:"Instruction text",helperText:"Helper text",optionsOrigin:"Local",getOptionsLimit:5,createNewOptionsKnob:!0,selectLimit:-1};i.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},instructionText:{name:"Instruction Text"},helperText:{name:"Helper Text"},optionsOrigin:{name:"Options Origin"},getOptionsLimit:{name:"Get Options Limit"},createNewOptionsKnob:{name:"Create New Option"},selectLimit:{name:"Select Limit"}};const m=()=>{const r=C(),{state:g,handleSubmit:O}=r,n=s?s:[],o=new k(B),l=new j({api:o,labelColumn:"tag",valueColumn:"id",sortColumn:"sort_tag"}),a=async p=>{const d=T(),e={_id:d,tag:p,sort_tag:p,updated:new Date,created:new Date,id:d};s.push({label:e.tag,value:e.id});const w=[...await o.getData(),e];return await o.setData(w),{label:e.tag,value:e.id}},c=_.useMemo(()=>[{name:"checkboxOptions",label:"Advanced selection with options prop",type:"advancedSelection",inputSettings:{options:n}},{name:"getOptions",label:"Advanced selection with getOptions prop",type:"advancedSelection",inputSettings:{getOptions:l.getOptions.bind(l),getOptionsLimit:5}},{name:"createNewOption",label:"Advanced selection with createNewOption prop",type:"advancedSelection",inputSettings:{options:n,getOptionsLimit:10,createNewOption:a}},{name:"selectLimitOfOptions",label:"Advanced selection with selectLimit prop (Max 2 options)",type:"advancedSelection",inputSettings:{options:n,getOptionsLimit:10,selectLimit:2}}],[n]);return t.jsxs(t.Fragment,{children:[t.jsx("pre",{children:JSON.stringify(g,null," ")}),t.jsx(H,{...r,buttons:M(O),title:"Form Title",description:"Description",fields:c})]})};var y,h,x;i.parameters={...i.parameters,docs:{...(y=i.parameters)==null?void 0:y.docs,source:{originalSource:`({ +import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{r as _}from"./index-BP8_t0zE.js";import{n as T}from"./index.browser-vcSNLBTf.js";import{u as C,F as H}from"./Form-DI4diVc8.js";import{r as M}from"./renderButtons-BmHfsf_z.js";import{o as s}from"./options-CJLEAYpf.js";import{M as j,J as k,c as B}from"./MultiSelectHelper-RF8UoF_G.js";const E={title:"FormFields/FormFieldAdvancedSelection"},i=({label:r,required:g,skeleton:O,disabled:n,instructionText:o,helperText:l,optionsOrigin:a,getOptionsLimit:c,createNewOptionsKnob:p,selectLimit:d})=>{const e=C(),{state:S,handleSubmit:w}=e,v=s?s:[],b=new k(B),L=new j({api:b,labelColumn:"tag",valueColumn:"id",sortColumn:"sort_tag"}),J=async f=>{const D=T(),u={_id:D,tag:f,sort_tag:f,updated:new Date,created:new Date,id:D};s.push({label:u.tag,value:u.id});const q=[...await b.getData(),u];return await b.setData(q),{label:u.tag,value:u.id}},K=_.useMemo(()=>[{name:"advancedSelection",label:r,required:g,disabled:n,helperText:l,instructionText:o,type:"advancedSelection",inputSettings:{options:a==="Local"?v:void 0,getOptions:a==="DB"?L.getOptions.bind(L):void 0,getOptionsLimit:a==="DB"&&c?c:void 0,createNewOption:p?J:void 0,selectLimit:d}}],[r,g,n,l,o,c,v,a,p,d]);return t.jsxs(t.Fragment,{children:[t.jsx("pre",{children:JSON.stringify(S,null," ")}),t.jsx(H,{...e,buttons:M(w),title:"Advanced Selection Field",fields:K,skeleton:O})]})};i.args={label:"Label",disabled:!1,required:!1,skeleton:!1,instructionText:"Instruction text",helperText:"Helper text",optionsOrigin:"Local",getOptionsLimit:5,createNewOptionsKnob:!0,selectLimit:-1};i.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},instructionText:{name:"Instruction Text"},helperText:{name:"Helper Text"},optionsOrigin:{name:"Options Origin"},getOptionsLimit:{name:"Get Options Limit"},createNewOptionsKnob:{name:"Create New Option"},selectLimit:{name:"Select Limit"}};const m=()=>{const r=C(),{state:g,handleSubmit:O}=r,n=s?s:[],o=new k(B),l=new j({api:o,labelColumn:"tag",valueColumn:"id",sortColumn:"sort_tag"}),a=async p=>{const d=T(),e={_id:d,tag:p,sort_tag:p,updated:new Date,created:new Date,id:d};s.push({label:e.tag,value:e.id});const w=[...await o.getData(),e];return await o.setData(w),{label:e.tag,value:e.id}},c=_.useMemo(()=>[{name:"checkboxOptions",label:"Advanced selection with options prop",type:"advancedSelection",inputSettings:{options:n}},{name:"getOptions",label:"Advanced selection with getOptions prop",type:"advancedSelection",inputSettings:{getOptions:l.getOptions.bind(l),getOptionsLimit:5}},{name:"createNewOption",label:"Advanced selection with createNewOption prop",type:"advancedSelection",inputSettings:{options:n,getOptionsLimit:10,createNewOption:a}},{name:"selectLimitOfOptions",label:"Advanced selection with selectLimit prop (Max 2 options)",type:"advancedSelection",inputSettings:{options:n,getOptionsLimit:10,selectLimit:2}}],[n]);return t.jsxs(t.Fragment,{children:[t.jsx("pre",{children:JSON.stringify(g,null," ")}),t.jsx(H,{...r,buttons:M(O),title:"Form Title",description:"Description",fields:c})]})};var y,h,x;i.parameters={...i.parameters,docs:{...(y=i.parameters)==null?void 0:y.docs,source:{originalSource:`({ label, required, skeleton, diff --git a/sb8/qa/assets/Button-BBz0kfcw.js b/sb8/qa/assets/Button-CIF8JiZP.js similarity index 95% rename from sb8/qa/assets/Button-BBz0kfcw.js rename to sb8/qa/assets/Button-CIF8JiZP.js index 842d3a2039..51c45c59e0 100644 --- a/sb8/qa/assets/Button-BBz0kfcw.js +++ b/sb8/qa/assets/Button-CIF8JiZP.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as e}from"./index-3-_tf5dF.js";import{M as i,C as p}from"./index-CGWOAm_e.js";import{s,P as m}from"./Button.stories-CEeIlZk2.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./Button-DuMlbF8s.js";import"./theme-DRtZtbPc.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./Create-CpnV7q0W.js";import"./styled-hJgfyZIG.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./createSvgIcon-DE5yaevU.js";import"./Delete-Bd9yuHmM.js";import"./Add-DakDrsh-.js";import"./CloudDownload-BiNecmWM.js";import"./Help-ICrZiAq7.js";import"./ButtonRow-CP4CrsnB.js";import"./testIds-DZf96GK8.js";import"./toggleOptions-1cXvXfFl.js";function r(n){const t={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...e(),...n.components};return o.jsxs(o.Fragment,{children:[o.jsx(i,{of:s}),` +import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as e}from"./index-3-_tf5dF.js";import{M as i,C as p}from"./index-vCrdABUF.js";import{s,P as m}from"./Button.stories-CEeIlZk2.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./Button-DuMlbF8s.js";import"./theme-DRtZtbPc.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./Create-CpnV7q0W.js";import"./styled-hJgfyZIG.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./createSvgIcon-DE5yaevU.js";import"./Delete-Bd9yuHmM.js";import"./Add-DakDrsh-.js";import"./CloudDownload-BiNecmWM.js";import"./Help-ICrZiAq7.js";import"./ButtonRow-CP4CrsnB.js";import"./testIds-DZf96GK8.js";import"./toggleOptions-1cXvXfFl.js";function r(n){const t={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...e(),...n.components};return o.jsxs(o.Fragment,{children:[o.jsx(i,{of:s}),` `,o.jsx(t.h1,{id:"button",children:"Button"}),` `,o.jsx(t.p,{children:"Displays a button."}),` `,o.jsx(t.h2,{id:"props",children:"Props"}),` diff --git a/sb8/qa/assets/ButtonRow-B33hkYPE.js b/sb8/qa/assets/ButtonRow-DfcfK47f.js similarity index 90% rename from sb8/qa/assets/ButtonRow-B33hkYPE.js rename to sb8/qa/assets/ButtonRow-DfcfK47f.js index b7e681b062..27be629144 100644 --- a/sb8/qa/assets/ButtonRow-B33hkYPE.js +++ b/sb8/qa/assets/ButtonRow-DfcfK47f.js @@ -1,3 +1,3 @@ -import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as i}from"./index-3-_tf5dF.js";import{M as p,C as n}from"./index-CGWOAm_e.js";import{s,P as e}from"./ButtonRow.stories-CWgewPhx.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./styled-components.browser.esm-8MQ3dTkk.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./toggleOptions-1cXvXfFl.js";import"./ButtonRow-CP4CrsnB.js";import"./theme-DRtZtbPc.js";import"./Button-DuMlbF8s.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./testIds-DZf96GK8.js";function m(o){const r={h1:"h1",...i(),...o.components};return t.jsxs(t.Fragment,{children:[t.jsx(p,{of:s}),` +import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as i}from"./index-3-_tf5dF.js";import{M as p,C as n}from"./index-vCrdABUF.js";import{s,P as e}from"./ButtonRow.stories-CWgewPhx.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./styled-components.browser.esm-8MQ3dTkk.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./toggleOptions-1cXvXfFl.js";import"./ButtonRow-CP4CrsnB.js";import"./theme-DRtZtbPc.js";import"./Button-DuMlbF8s.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./testIds-DZf96GK8.js";function m(o){const r={h1:"h1",...i(),...o.components};return t.jsxs(t.Fragment,{children:[t.jsx(p,{of:s}),` `,t.jsx(r.h1,{id:"buttonrow",children:"ButtonRow"}),` `,t.jsx(n,{of:e})]})}function H(o={}){const{wrapper:r}={...i(),...o.components};return r?t.jsx(r,{...o,children:t.jsx(m,{...o})}):m(o)}export{H as default}; diff --git a/sb8/qa/assets/Card-Dv9AIS3I.js b/sb8/qa/assets/Card-TKyBNl97.js similarity index 91% rename from sb8/qa/assets/Card-Dv9AIS3I.js rename to sb8/qa/assets/Card-TKyBNl97.js index 115b2af765..e68212b937 100644 --- a/sb8/qa/assets/Card-Dv9AIS3I.js +++ b/sb8/qa/assets/Card-TKyBNl97.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as n}from"./index-3-_tf5dF.js";import{M as p,C as r}from"./index-CGWOAm_e.js";import{s as m,P as s,R as c}from"./Card.stories-DyzAxzRX.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./styled-components.browser.esm-8MQ3dTkk.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./theme-DRtZtbPc.js";import"./testIds-DZf96GK8.js";import"./ButtonRow-CP4CrsnB.js";import"./Button-DuMlbF8s.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./Add-DakDrsh-.js";import"./styled-hJgfyZIG.js";import"./createSvgIcon-DE5yaevU.js";import"./Create-CpnV7q0W.js";import"./Delete-Bd9yuHmM.js";import"./formats-sBod7wm8.js";function e(i){const o={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...n(),...i.components};return t.jsxs(t.Fragment,{children:[t.jsx(p,{of:m}),` +import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as n}from"./index-3-_tf5dF.js";import{M as p,C as r}from"./index-vCrdABUF.js";import{s as m,P as s,R as c}from"./Card.stories-DyzAxzRX.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./styled-components.browser.esm-8MQ3dTkk.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./theme-DRtZtbPc.js";import"./testIds-DZf96GK8.js";import"./ButtonRow-CP4CrsnB.js";import"./Button-DuMlbF8s.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./Add-DakDrsh-.js";import"./styled-hJgfyZIG.js";import"./createSvgIcon-DE5yaevU.js";import"./Create-CpnV7q0W.js";import"./Delete-Bd9yuHmM.js";import"./formats-sBod7wm8.js";function e(i){const o={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...n(),...i.components};return t.jsxs(t.Fragment,{children:[t.jsx(p,{of:m}),` `,t.jsx(o.h1,{id:"card",children:"Card"}),` `,t.jsxs(o.p,{children:["The ",t.jsx(o.code,{children:"Card"})," component its a wrapper that will render any content that receives as the following RecentActivity component."]}),` `,t.jsx(o.h2,{id:"props",children:"Props"}),` diff --git a/sb8/qa/assets/Checkbox-CODv9_Wr.js b/sb8/qa/assets/Checkbox-D_4gEYtK.js similarity index 70% rename from sb8/qa/assets/Checkbox-CODv9_Wr.js rename to sb8/qa/assets/Checkbox-D_4gEYtK.js index d6ac58aee2..ce247f1980 100644 --- a/sb8/qa/assets/Checkbox-CODv9_Wr.js +++ b/sb8/qa/assets/Checkbox-D_4gEYtK.js @@ -1,4 +1,4 @@ -import{j as c}from"./jsx-runtime-nGUw9YhZ.js";import{r as s}from"./index-BP8_t0zE.js";import{s as $,t as a}from"./theme-DRtZtbPc.js";import{S as P,F as j}from"./FormControlLabel-f9znFBMA.js";import{a as B,g as S,s as F,q as R,b as m,d as r,j as _,u as w,_ as L,e as E,f as H}from"./generateUtilityClasses-kMkq-zAT.js";import{c as k}from"./createSvgIcon-BcZTMgP9.js";import{t as N}from"./testIds-DZf96GK8.js";const O=k(c.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),U=k(c.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),V=k(c.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function G(e){return S("MuiCheckbox",e)}const x=B("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),W=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],q=e=>{const{classes:o,indeterminate:t,color:i,size:l}=e,n={root:["root",t&&"indeterminate",`color${m(i)}`,`size${m(l)}`]},h=H(n,G,o);return r({},o,h)},A=F(P,{shouldForwardProp:e=>R(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.indeterminate&&o.indeterminate,o[`size${m(t.size)}`],t.color!=="default"&&o[`color${m(t.color)}`]]}})(({theme:e,ownerState:o})=>r({color:(e.vars||e).palette.text.secondary},!o.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${o.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:_(o.color==="default"?e.palette.action.active:e.palette[o.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},o.color!=="default"&&{[`&.${x.checked}, &.${x.indeterminate}`]:{color:(e.vars||e).palette[o.color].main},[`&.${x.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),D=c.jsx(U,{}),K=c.jsx(O,{}),X=c.jsx(V,{}),J=s.forwardRef(function(o,t){var i,l;const n=w({props:o,name:"MuiCheckbox"}),{checkedIcon:h=D,color:g="primary",icon:y=K,indeterminate:d=!1,indeterminateIcon:p=X,inputProps:I,size:u="medium",className:z}=n,M=L(n,W),C=d?p:y,b=d?p:h,f=r({},n,{color:g,indeterminate:d,size:u}),v=q(f);return c.jsx(A,r({type:"checkbox",inputProps:r({"data-indeterminate":d},I),icon:s.cloneElement(C,{fontSize:(i=C.props.fontSize)!=null?i:u}),checkedIcon:s.cloneElement(b,{fontSize:(l=b.props.fontSize)!=null?l:u}),ownerState:f,ref:t,className:E(v.root,z)},M,{classes:v}))}),Q=$(j)` +import{j as c}from"./jsx-runtime-nGUw9YhZ.js";import{r as s}from"./index-BP8_t0zE.js";import{s as g,t as a}from"./theme-DRtZtbPc.js";import{S as P,F as j}from"./FormControlLabel-f9znFBMA.js";import{a as B,g as S,s as F,q as R,b as m,d as i,j as _,u as w,_ as L,e as E,f as H}from"./generateUtilityClasses-kMkq-zAT.js";import{c as C}from"./createSvgIcon-BcZTMgP9.js";import{t as N}from"./testIds-DZf96GK8.js";const O=C(c.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),U=C(c.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),V=C(c.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function G(e){return S("MuiCheckbox",e)}const x=B("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),W=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],q=e=>{const{classes:o,indeterminate:t,color:r,size:l}=e,n={root:["root",t&&"indeterminate",`color${m(r)}`,`size${m(l)}`]},h=H(n,G,o);return i({},o,h)},A=F(P,{shouldForwardProp:e=>R(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.indeterminate&&o.indeterminate,o[`size${m(t.size)}`],t.color!=="default"&&o[`color${m(t.color)}`]]}})(({theme:e,ownerState:o})=>i({color:(e.vars||e).palette.text.secondary},!o.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${o.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:_(o.color==="default"?e.palette.action.active:e.palette[o.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},o.color!=="default"&&{[`&.${x.checked}, &.${x.indeterminate}`]:{color:(e.vars||e).palette[o.color].main},[`&.${x.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),D=c.jsx(U,{}),K=c.jsx(O,{}),X=c.jsx(V,{}),J=s.forwardRef(function(o,t){var r,l;const n=w({props:o,name:"MuiCheckbox"}),{checkedIcon:h=D,color:$="primary",icon:y=K,indeterminate:d=!1,indeterminateIcon:k=X,inputProps:I,size:u="medium",className:z}=n,M=L(n,W),p=d?k:y,b=d?k:h,f=i({},n,{color:$,indeterminate:d,size:u}),v=q(f);return c.jsx(A,i({type:"checkbox",inputProps:i({"data-indeterminate":d},I),icon:s.cloneElement(p,{fontSize:(r=p.props.fontSize)!=null?r:u}),checkedIcon:s.cloneElement(b,{fontSize:(l=b.props.fontSize)!=null?l:u}),ownerState:f,ref:t,className:E(v.root,z)},M,{classes:v}))}),Q=g(j)` &.MuiFormControlLabel-root { margin-left: 0px; margin-right: 0px; @@ -17,7 +17,7 @@ import{j as c}from"./jsx-runtime-nGUw9YhZ.js";import{r as s}from"./index-BP8_t0z max-width: 414px; align-self: center; } -`,T=$(J)` +`,T=g(J)` &.MuiCheckbox-colorPrimary { color: ${a.newColors.almostBlack[100]}; @@ -46,4 +46,4 @@ import{j as c}from"./jsx-runtime-nGUw9YhZ.js";import{r as s}from"./index-BP8_t0z custom-checkbox ${e.checked?"checked":""} ${e.className?e.className:""} - `,edge:e.edge,checked:e.checked,onClick:e.onClick,indeterminate:e.indeterminate,id:t})})})},se=s.memo(Y);export{se as C}; + `,edge:e.edge,checked:e.checked,onClick:e.onClick,onChange:e.onChange,indeterminate:e.indeterminate,id:t})})})},se=s.memo(Y);export{se as C}; diff --git a/sb8/qa/assets/Checkbox-Q_CVLB8I.js b/sb8/qa/assets/Checkbox-xlAxlAoW.js similarity index 86% rename from sb8/qa/assets/Checkbox-Q_CVLB8I.js rename to sb8/qa/assets/Checkbox-xlAxlAoW.js index 47c870fb3c..7b4114fa05 100644 --- a/sb8/qa/assets/Checkbox-Q_CVLB8I.js +++ b/sb8/qa/assets/Checkbox-xlAxlAoW.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as i}from"./index-3-_tf5dF.js";import{M as s,C as m}from"./index-CGWOAm_e.js";import{s as n,P as c}from"./Checkbox.stories-CzoKAU3V.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./Checkbox-CODv9_Wr.js";import"./theme-DRtZtbPc.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";function e(t){const r={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...i(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(s,{of:n}),` +import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as i}from"./index-3-_tf5dF.js";import{M as s,C as m}from"./index-vCrdABUF.js";import{s as n,P as c}from"./Checkbox.stories-BhIIAygP.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./Checkbox-D_4gEYtK.js";import"./theme-DRtZtbPc.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";function e(t){const r={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...i(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(s,{of:n}),` `,o.jsx(r.h1,{id:"checkbox",children:"Checkbox"}),` `,o.jsxs(r.p,{children:[o.jsx(r.code,{children:"Checkbox"})," is a simple wrapper for ",o.jsx(r.a,{href:"https://mui.com/material-ui/react-checkbox/#basic-checkboxes/",rel:"nofollow",children:"MUI Checkbox"})," but with our brand colors."]}),` `,o.jsx(r.h2,{id:"props",children:"Props"}),` diff --git a/sb8/qa/assets/Checkbox.stories-CzoKAU3V.js b/sb8/qa/assets/Checkbox.stories-BhIIAygP.js similarity index 93% rename from sb8/qa/assets/Checkbox.stories-CzoKAU3V.js rename to sb8/qa/assets/Checkbox.stories-BhIIAygP.js index 85295afae3..a7ac4d29eb 100644 --- a/sb8/qa/assets/Checkbox.stories-CzoKAU3V.js +++ b/sb8/qa/assets/Checkbox.stories-BhIIAygP.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-nGUw9YhZ.js";import{C as c}from"./Checkbox-CODv9_Wr.js";const i={title:"Components/Checkbox"},e=({label:t,checked:l,disabled:s,indeterminate:o})=>d.jsx(c,{label:t,checked:l,onClick:()=>null,disabled:s,indeterminate:o});e.args={label:"Example",checked:!1,disabled:!1,indeterminate:!1};e.argTypes={label:{name:"Label"},checked:{name:"Checked"},disabled:{name:"Disabled"},indeterminate:{name:"Indeterminate"}};var a,n,r;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:`({ +import{j as d}from"./jsx-runtime-nGUw9YhZ.js";import{C as c}from"./Checkbox-D_4gEYtK.js";const i={title:"Components/Checkbox"},e=({label:t,checked:l,disabled:s,indeterminate:o})=>d.jsx(c,{label:t,checked:l,onClick:()=>null,disabled:s,indeterminate:o});e.args={label:"Example",checked:!1,disabled:!1,indeterminate:!1};e.argTypes={label:{name:"Label"},checked:{name:"Checked"},disabled:{name:"Disabled"},indeterminate:{name:"Indeterminate"}};var a,n,r;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:`({ label, checked, disabled, diff --git a/sb8/qa/assets/CheckboxList-csbS6mbI.js b/sb8/qa/assets/CheckboxList-DGXZFQKm.js similarity index 54% rename from sb8/qa/assets/CheckboxList-csbS6mbI.js rename to sb8/qa/assets/CheckboxList-DGXZFQKm.js index 48da958c4b..d38400cc6d 100644 --- a/sb8/qa/assets/CheckboxList-csbS6mbI.js +++ b/sb8/qa/assets/CheckboxList-DGXZFQKm.js @@ -1,8 +1,8 @@ -import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as s}from"./index-3-_tf5dF.js";import{M as r,C as n}from"./index-CGWOAm_e.js";import{s as p,P as m}from"./CheckboxList.stories-CZU1ZcPG.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./theme-DRtZtbPc.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./FormFieldCheckboxUtils-C4lbz8gc.js";function e(i){const t={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...s(),...i.components};return o.jsxs(o.Fragment,{children:[o.jsx(r,{of:p}),` +import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as s}from"./index-3-_tf5dF.js";import{M as r,C as n}from"./index-vCrdABUF.js";import{s as p,P as c}from"./CheckboxList.stories-ATySsjxI.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./theme-DRtZtbPc.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./options-CJLEAYpf.js";function e(i){const t={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...s(),...i.components};return o.jsxs(o.Fragment,{children:[o.jsx(r,{of:p}),` `,o.jsx(t.h1,{id:"checkboxlist",children:"CheckboxList"}),` `,o.jsxs(t.p,{children:[o.jsx(t.code,{children:"CheckboxList"})," is for displaying a list of labeled checkboxes. Clicking the label or the checkbox will select the item."]}),` `,o.jsx(t.p,{children:"If you need a dropdown menu with a list of checkboxes use MenuSelect instead, that wraps this component but provides dropdown capability."}),` `,o.jsx(t.h2,{id:"props",children:"Props"}),` `,o.jsx(t.p,{children:o.jsx(t.a,{href:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/CheckboxList/CheckboxList.tsx",rel:"nofollow",children:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/CheckboxList/CheckboxList.tsx"})}),` `,o.jsx(t.h2,{id:"example",children:"Example"}),` -`,o.jsx(n,{of:m})]})}function B(i={}){const{wrapper:t}={...s(),...i.components};return t?o.jsx(t,{...i,children:o.jsx(e,{...i})}):e(i)}export{B as default}; +`,o.jsx(n,{of:c})]})}function A(i={}){const{wrapper:t}={...s(),...i.components};return t?o.jsx(t,{...i,children:o.jsx(e,{...i})}):e(i)}export{A as default}; diff --git a/sb8/qa/assets/CheckboxList-Dbk8JkiG.js b/sb8/qa/assets/CheckboxList-Dbk8JkiG.js deleted file mode 100644 index fefba9098a..0000000000 --- a/sb8/qa/assets/CheckboxList-Dbk8JkiG.js +++ /dev/null @@ -1 +0,0 @@ -import{j as X}from"./jsx-runtime-nGUw9YhZ.js";import{g as We,r as D}from"./index-BP8_t0zE.js";import{b as G,i as ee,_ as d,c as re,d as P,e as Cr,a as ae}from"./isSymbol-CEVJpixJ.js";import{C as mr}from"./Checkbox-CODv9_Wr.js";import{a as Tr,g as Sr,s as wr,d as Y,u as Or,_ as Ir,e as Pr,f as xr}from"./generateUtilityClasses-kMkq-zAT.js";import{u as Er,f as Mr}from"./formControlState-DyMXFR7f.js";function Dr(e,r){for(var a=-1,t=e==null?0:e.length,n=0,s=[];++a-1}var kr=Yr,Zr=N;function Jr(e,r){var a=this.__data__,t=Zr(a,e);return t<0?(++this.size,a.push([e,r])):a[t][1]=r,this}var Qr=Jr,Vr=Fr,ea=Br,ra=Wr,aa=kr,ta=Qr;function T(e){var r=-1,a=e==null?0:e.length;for(this.clear();++ri))return!1;var c=s.get(e),f=s.get(r);if(c&&f)return c==r&&f==e;var l=-1,v=!0,g=a&An?new pn:void 0;for(s.set(e,r),s.set(r,e);++l-1&&e%1==0&&e-1&&e%1==0&&e<=Ts}var ce=Ss,ws=G,Os=ce,Is=P,Ps="[object Arguments]",xs="[object Array]",Es="[object Boolean]",Ms="[object Date]",Ds="[object Error]",Ls="[object Function]",Fs="[object Map]",Rs="[object Number]",Gs="[object Object]",Ns="[object RegExp]",js="[object Set]",Hs="[object String]",Us="[object WeakMap]",Ks="[object ArrayBuffer]",Bs="[object DataView]",qs="[object Float32Array]",zs="[object Float64Array]",Ws="[object Int8Array]",Xs="[object Int16Array]",Ys="[object Int32Array]",ks="[object Uint8Array]",Zs="[object Uint8ClampedArray]",Js="[object Uint16Array]",Qs="[object Uint32Array]",h={};h[qs]=h[zs]=h[Ws]=h[Xs]=h[Ys]=h[ks]=h[Zs]=h[Js]=h[Qs]=!0;h[Ps]=h[xs]=h[Ks]=h[Es]=h[Bs]=h[Ms]=h[Ds]=h[Ls]=h[Fs]=h[Rs]=h[Gs]=h[Ns]=h[js]=h[Hs]=h[Us]=!1;function Vs(e){return Is(e)&&Os(e.length)&&!!h[ws(e)]}var ei=Vs;function ri(e){return function(r){return e(r)}}var tr=ri,R={exports:{}};R.exports;(function(e,r){var a=Cr,t=r&&!r.nodeType&&r,n=t&&!0&&e&&!e.nodeType&&e,s=n&&n.exports===t,o=s&&a.process,i=function(){try{var u=n&&n.require&&n.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();e.exports=i})(R,R.exports);var ai=R.exports,ti=ei,ni=tr,Ce=ai,me=Ce&&Ce.isTypedArray,si=me?ni(me):ti,nr=si,ii=cs,oi=ue,ui=p,ci=rr,fi=ar,li=nr,vi=Object.prototype,hi=vi.hasOwnProperty;function _i(e,r){var a=ui(e),t=!a&&oi(e),n=!a&&!t&&ci(e),s=!a&&!t&&!n&&li(e),o=a||t||n||s,i=o?ii(e.length,String):[],u=i.length;for(var c in e)(r||hi.call(e,c))&&!(o&&(c=="length"||n&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||fi(c,u)))&&i.push(c);return i}var $i=_i,gi=Object.prototype;function pi(e){var r=e&&e.constructor,a=typeof r=="function"&&r.prototype||gi;return e===a}var yi=pi;function di(e,r){return function(a){return e(r(a))}}var bi=di,Ai=bi,Ci=Ai(Object.keys,Object),mi=Ci,Ti=yi,Si=mi,wi=Object.prototype,Oi=wi.hasOwnProperty;function Ii(e){if(!Ti(e))return Si(e);var r=[];for(var a in Object(e))Oi.call(e,a)&&a!="constructor"&&r.push(a);return r}var Pi=Ii,xi=ke,Ei=ce;function Mi(e){return e!=null&&Ei(e.length)&&!xi(e)}var sr=Mi,Di=$i,Li=Pi,Fi=sr;function Ri(e){return Fi(e)?Di(e):Li(e)}var ir=Ri,Gi=Vn,Ni=os,ji=ir;function Hi(e){return Gi(e,ji,Ni)}var Ui=Hi,Te=Ui,Ki=1,Bi=Object.prototype,qi=Bi.hasOwnProperty;function zi(e,r,a,t,n,s){var o=a&Ki,i=Te(e),u=i.length,c=Te(r),f=c.length;if(u!=f&&!o)return!1;for(var l=u;l--;){var v=i[l];if(!(o?v in r:qi.call(r,v)))return!1}var g=s.get(e),_=s.get(r);if(g&&_)return g==r&&_==e;var $=!0;s.set(e,r),s.set(r,e);for(var y=o;++l0){if(++r>=Ec)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}var Fc=Lc,Rc=xc,Gc=Fc,Nc=Gc(Rc),jc=Nc,Hc=ve,Uc=Ac,Kc=jc;function Bc(e,r){return Kc(Uc(e,r,Hc),e+"")}var qc=Bc;function zc(e,r,a,t){for(var n=e.length,s=a+(t?1:-1);t?s--:++s-1}var dr=tf;function nf(e,r,a){for(var t=-1,n=e==null?0:e.length;++t=vf&&(s=lf,o=!1,r=new sf(r));e:for(;++n0&&a(i)?r>1?Ar(i,r-1,a,t,n):df(n,i):t||(n[n.length]=i)}return n}var Af=Ar;function Cf(){}var mf=Cf,W=or,Tf=mf,Sf=oe,wf=1/0,Of=W&&1/Sf(new W([,-0]))[1]==wf?function(e){return new W(e)}:Tf,If=Of,Pf=se,xf=dr,Ef=br,Mf=ie,Df=If,Lf=oe,Ff=200;function Rf(e,r,a){var t=-1,n=xf,s=e.length,o=!0,i=[],u=i;if(a)o=!1,n=Ef;else if(s>=Ff){var c=r?null:Df(e);if(c)return Lf(c);o=!1,n=Mf,u=new Pf}else u=r?[]:i;e:for(;++t{const{classes:r,row:a,error:t}=e;return xr({root:["root",a&&"row",t&&"error"]},al,r)},sl=wr("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:a}=e;return[r.root,a.row&&r.row]}})(({ownerState:e})=>Y({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),il=D.forwardRef(function(r,a){const t=Or({props:r,name:"MuiFormGroup"}),{className:n,row:s=!1}=t,o=Ir(t,tl),i=Er(),u=Mr({props:t,muiFormControl:i,states:["error"]}),c=Y({},t,{row:s,error:u.error}),f=nl(c);return X.jsx(sl,Y({className:Pr(f.root,n),ownerState:c,ref:a},o))}),_l=e=>{var s;const r=D.useId(),a=e.id||r,t=D.useCallback(o=>()=>{const i=rl(e.checked,[o],u=>u.value);e.onChange(i),e!=null&&e.onChangeCb&&e.onChangeCb(i)},[e.checked,e.onChange,e.options]),n=D.useMemo(()=>{var o;return(o=e==null?void 0:e.options)==null?void 0:o.map(i=>t(i))},[e.options,t]);return X.jsx(il,{className:`${e.className??""} listItem`,onBlur:e.onBlur,style:e.style,children:(s=e==null?void 0:e.options)==null?void 0:s.map((o,i)=>{var c,f;const u=((c=e==null?void 0:e.checked)==null?void 0:c.length)>0?((f=e.checked)==null?void 0:f.filter(l=>l.value===o.value).length)>0:!1;return X.jsx(mr,{className:u?"checked":"",checked:u,label:o.label,disabled:e.disabled,id:`${a}-${i}`,onClick:n[i],value:o.value},`${o.value}-${i}`)})})};export{bi as A,yi as B,_l as C,$i as D,os as E,il as F,Ve as G,rs as H,Vn as I,Sn as J,_o as K,ai as L,Je as M,rr as N,Ui as O,oo as P,mf as Q,Fc as R,yc as S,nu as T,hu as U,ke as V,Pi as W,Xf as X,se as _,_r as a,tr as b,ie as c,dr as d,br as e,qc as f,hl as g,fr as h,zf as i,pr as j,ve as k,p as l,gc as m,Ye as n,sr as o,ar as p,Af as q,ir as r,Xe as s,Uf as t,wc as u,gr as v,K as w,Hu as x,Ac as y,jc as z}; diff --git a/sb8/qa/assets/CheckboxList-DjNmes3Y.js b/sb8/qa/assets/CheckboxList-DjNmes3Y.js new file mode 100644 index 0000000000..1b3181bac0 --- /dev/null +++ b/sb8/qa/assets/CheckboxList-DjNmes3Y.js @@ -0,0 +1 @@ +import{j as C}from"./jsx-runtime-nGUw9YhZ.js";import{r as w}from"./index-BP8_t0zE.js";import{C as F}from"./Checkbox-D_4gEYtK.js";import{a as g,g as G,s as k,d as h,u as j,_ as v,e as I,f as N}from"./generateUtilityClasses-kMkq-zAT.js";import{u as R,f as $}from"./formControlState-DyMXFR7f.js";function M(s,e,r=o=>o){const o=[];for(const t of s)e.some(n=>r(t)===r(n))||o.push(t);for(const t of e)s.some(n=>r(t)===r(n))||o.push(t);return o}function U(s){return G("MuiFormGroup",s)}g("MuiFormGroup",["root","row","error"]);const _=["className","row"],b=s=>{const{classes:e,row:r,error:o}=s;return N({root:["root",r&&"row",o&&"error"]},U,e)},y=k("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(s,e)=>{const{ownerState:r}=s;return[e.root,r.row&&e.row]}})(({ownerState:s})=>h({display:"flex",flexDirection:"column",flexWrap:"wrap"},s.row&&{flexDirection:"row"})),D=w.forwardRef(function(e,r){const o=j({props:e,name:"MuiFormGroup"}),{className:t,row:n=!1}=o,m=v(o,_),i=R(),a=$({props:o,muiFormControl:i,states:["error"]}),u=h({},o,{row:n,error:a.error}),p=b(u);return C.jsx(y,h({className:I(p.root,t),ownerState:u,ref:r},m))}),B=s=>{const e=w.useId(),{className:r,checked:o,disabled:t,id:n=e,onBlur:m,onChange:i,options:a,style:u}=s,p=w.useCallback(({target:c})=>{const{value:f}=c,l=a.find(x=>x.value===f);if(!l)return;const d=M(o||[],[l],x=>x.value);i(d)},[o,i,a]);return C.jsx(D,{className:`${r??""} listItem`,onBlur:m,style:u,children:(a||[]).map(({value:c,label:f},l)=>C.jsx(F,{checked:(o||[]).some(d=>d.value===c),label:f,disabled:t,id:`${n}-${l}`,onChange:p,value:c},`${c}-${l}`))})};export{B as C,D as F}; diff --git a/sb8/qa/assets/CheckboxList.stories-ATySsjxI.js b/sb8/qa/assets/CheckboxList.stories-ATySsjxI.js new file mode 100644 index 0000000000..c2f0f7d42c --- /dev/null +++ b/sb8/qa/assets/CheckboxList.stories-ATySsjxI.js @@ -0,0 +1,13 @@ +import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{r as d}from"./index-BP8_t0zE.js";import{C as h}from"./CheckboxList-DjNmes3Y.js";import{o as p}from"./options-CJLEAYpf.js";const m={title:"Components/CheckboxList"},e=()=>{const[t,c]=d.useState([]),i=a=>{c(a)};return o.jsxs("div",{children:[o.jsxs("div",{children:["checked:",JSON.stringify(t)]}),o.jsx(h,{checked:t,options:p,onChange:i})]})};var s,n,r;e.parameters={...e.parameters,docs:{...(s=e.parameters)==null?void 0:s.docs,source:{originalSource:`(): ReactElement => { + const [checked, setChecked] = useState([]); + const onChange = c => { + setChecked(c); + }; + return
+
+ checked: + {JSON.stringify(checked)} +
+ +
; +}`,...(r=(n=e.parameters)==null?void 0:n.docs)==null?void 0:r.source}}};const l=["Playground"],g=Object.freeze(Object.defineProperty({__proto__:null,Playground:e,__namedExportsOrder:l,default:m},Symbol.toStringTag,{value:"Module"}));export{e as P,g as s}; diff --git a/sb8/qa/assets/CheckboxList.stories-CZU1ZcPG.js b/sb8/qa/assets/CheckboxList.stories-CZU1ZcPG.js deleted file mode 100644 index da574dc707..0000000000 --- a/sb8/qa/assets/CheckboxList.stories-CZU1ZcPG.js +++ /dev/null @@ -1,13 +0,0 @@ -import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{r as d}from"./index-BP8_t0zE.js";import{C as h}from"./CheckboxList-Dbk8JkiG.js";import{c as p}from"./FormFieldCheckboxUtils-C4lbz8gc.js";const m={title:"Components/CheckboxList"},e=()=>{const[t,r]=d.useState([]),i=a=>{r(a)};return o.jsxs("div",{children:[o.jsxs("div",{children:["checked:",JSON.stringify(t)]}),o.jsx(h,{checked:t,options:p,onChange:i})]})};var s,c,n;e.parameters={...e.parameters,docs:{...(s=e.parameters)==null?void 0:s.docs,source:{originalSource:`(): ReactElement => { - const [checked, setChecked] = useState([]); - const onChange = c => { - setChecked(c); - }; - return
-
- checked: - {JSON.stringify(checked)} -
- -
; -}`,...(n=(c=e.parameters)==null?void 0:c.docs)==null?void 0:n.source}}};const k=["Playground"],g=Object.freeze(Object.defineProperty({__proto__:null,Playground:e,__namedExportsOrder:k,default:m},Symbol.toStringTag,{value:"Module"}));export{e as P,g as s}; diff --git a/sb8/qa/assets/Chip-CBLlJcpj.js b/sb8/qa/assets/Chip--PuipbNn.js similarity index 93% rename from sb8/qa/assets/Chip-CBLlJcpj.js rename to sb8/qa/assets/Chip--PuipbNn.js index cc2611b25e..122663965b 100644 --- a/sb8/qa/assets/Chip-CBLlJcpj.js +++ b/sb8/qa/assets/Chip--PuipbNn.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as p}from"./index-3-_tf5dF.js";import{M as n,C as e}from"./index-CGWOAm_e.js";import{s,P as m}from"./Chip.stories-BFnDABM7.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./styled-components.browser.esm-8MQ3dTkk.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./Chip-CRqL1Gcl.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./theme-DRtZtbPc.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";function r(t){const i={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...p(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(n,{of:s}),` +import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as p}from"./index-3-_tf5dF.js";import{M as n,C as e}from"./index-vCrdABUF.js";import{s,P as m}from"./Chip.stories-BFnDABM7.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./styled-components.browser.esm-8MQ3dTkk.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./Chip-CRqL1Gcl.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./theme-DRtZtbPc.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";function r(t){const i={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...p(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(n,{of:s}),` `,o.jsx(i.h1,{id:"chip",children:"Chip"}),` `,o.jsxs(i.p,{children:["The ",o.jsx(i.code,{children:"Chip"})," component is built over a simple wrapper for ",o.jsx(i.a,{href:"https://mui.com/material-ui/react-chip/#main-content",rel:"nofollow",children:"MUI Chip"})," but with SimpleView brand colors."]}),` `,o.jsx(i.h2,{id:"props",children:"Props"}),` diff --git a/sb8/qa/assets/Color-PRSJMWNM-CL4zf-je.js b/sb8/qa/assets/Color-PRSJMWNM-D1NSRxs2.js similarity index 99% rename from sb8/qa/assets/Color-PRSJMWNM-CL4zf-je.js rename to sb8/qa/assets/Color-PRSJMWNM-D1NSRxs2.js index 6930eebafe..50d6b2014e 100644 --- a/sb8/qa/assets/Color-PRSJMWNM-CL4zf-je.js +++ b/sb8/qa/assets/Color-PRSJMWNM-D1NSRxs2.js @@ -1 +1 @@ -import{n as $,e as ue,T as Me,F as Ce,f as $e,g as Oe}from"./index-CGWOAm_e.js";import{a as h,r as m,g as fe}from"./index-BP8_t0zE.js";import{i as J}from"./index-DJqTsaQd.js";import{_ as Ne,i as Ie}from"./toString-BjCnz-8e.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./index-DrFu-skq.js";function N(){return(N=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=m.useRef(e),n=m.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var R=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,s.current)):M(!1)},j=function(){return M(!1)};function M(p){var b=i.current,w=V(o.current),E=p?w.addEventListener:w.removeEventListener;E(b?"touchmove":"mousemove",x),E(b?"touchend":"mouseup",j)}return[function(p){var b=p.nativeEvent,w=o.current;if(w&&(re(b),!function(k,O){return O&&!F(k)}(b,i.current)&&w)){if(F(b)){i.current=!0;var E=b.changedTouches||[];E.length&&(s.current=E[0].identifier)}w.focus(),a(ne(w,b,s.current)),M(!0)}},function(p){var b=p.which||p.keyCode;b<37||b>40||(p.preventDefault(),l({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},M]},[l,a]),d=c[0],f=c[1],g=c[2];return m.useEffect(function(){return g},[g]),h.createElement("div",N({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),H=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=H(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},je=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},Te=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:je(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},B=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),l=r*(1-n),s=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,s,l,l,i,r][c]),g:y(255*[i,r,r,s,l,l][c]),b:y(255*[l,l,i,r,r,s][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},P=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?P(y(255*o)):"";return"#"+P(t)+P(n)+P(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),l=a-Math.min(t,n,r),s=l?a===t?(n-r)/l:a===n?2+(r-t)/l:4+(t-n)/l:0;return{h:y(60*(s<0?s+6:s)),s:y(a?l/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=H(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:R(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:R(t.s+100*o.left,0,100),v:R(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=m.useState(function(){return e.toHsva(t)}),a=o[0],l=o[1],s=m.useRef({color:t,hsva:a});m.useEffect(function(){if(!e.equal(t,s.current.color)){var c=e.toHsva(t);s.current={hsva:c,color:t},l(c)}},[t,e]),m.useEffect(function(){var c;ve(a,s.current.hsva)||e.equal(c=e.fromHsva(a),s.current.color)||(s.current={hsva:a,color:c},r(c))},[a,e,r]);var i=m.useCallback(function(c){l(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?m.useLayoutEffect:m.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,l=Q(e,["className","colorModel","color","onChange"]),s=m.useRef(null);xe(s);var i=ye(n,o,a),c=i[0],d=i[1],f=H(["react-colorful",t]);return h.createElement("div",N({},l,{ref:s,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,N({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+B(Object.assign({},n,{a:0}))+", "+B(Object.assign({},n,{a:1}))+")"},a=H(["react-colorful__alpha",t]),l=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:R(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":l+"%","aria-valuenow":l,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:B(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,l=Q(e,["className","colorModel","color","onChange"]),s=m.useRef(null);xe(s);var i=ye(n,o,a),c=i[0],d=i[1],f=H(["react-colorful",t]);return h.createElement("div",N({},l,{ref:s,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:Te,fromHsva:B,equal:pe},Ae=function(e){return h.createElement(we,N({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,N({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const z=Ye,ke={};for(const e of Object.keys(z))ke[z[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),l=a-o;let s,i;a===o?s=0:t===a?s=(n-r)/l:n===a?s=2+(r-t)/l:r===a&&(s=4+(t-n)/l),s=Math.min(s*60,360),s<0&&(s+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=l/(a+o):i=l/(2-a-o),[s,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const l=e[0]/255,s=e[1]/255,i=e[2]/255,c=Math.max(l,s,i),d=c-Math.min(l,s,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(l),n=f(s),r=f(i),l===c?o=r-n:s===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,l=(1-n-o)/(1-o)||0,s=(1-r-o)/(1-o)||0;return[a*100,l*100,s*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(z)){const a=z[o],l=Je(e,a);l.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,l=t*.0193+n*.1192+r*.9505;return[o*100,a*100,l*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,l=500*(n-r),s=200*(r-o);return[a,l,s]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,l;if(n===0)return l=r*255,[l,l,l];r<.5?o=r*(1+n):o=r+n-r*n;const s=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?l=s+(o-s)*6*a:2*a<1?l=o:3*a<2?l=s+(o-s)*(2/3-a)*6:l=s,i[c]=l*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const l=(r+n)/2,s=r===0?2*o/(a+o):2*n/(r+n);return[t,s*100,l*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),l=255*r*(1-n),s=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,l];case 1:return[s,r,l];case 2:return[l,r,i];case 3:return[l,s,r];case 4:return[i,l,r];case 5:return[r,l,s]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,l;l=(2-n)*r;const s=(2-n)*o;return a=n*o,a/=s<=1?s:2-s,a=a||0,l/=2,[t,a*100,l*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const l=Math.floor(6*t),s=1-r;a=6*t-l,l&1&&(a=1-a);const i=n+a*(s-n);let c,d,f;switch(l){default:case 6:case 0:c=s,d=i,f=n;break;case 1:c=i,d=s,f=n;break;case 2:c=n,d=s,f=i;break;case 3:c=n,d=i,f=s;break;case 4:c=i,d=n,f=s;break;case 5:c=s,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),l=1-Math.min(1,n*(1-o)+o),s=1-Math.min(1,r*(1-o)+o);return[a*255,l*255,s*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,l;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,l=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),l=Math.min(Math.max(0,l),1),[o*255,a*255,l*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),l=200*(n-r);return[o,a,l]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,l;a=(t+16)/116,o=n/500+a,l=a-r/200;const s=a**3,i=o**3,c=l**3;return a=s>.008856?s:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,l=c>.008856?c:(l-16/116)/7.787,o*=95.047,a*=100,l*=108.883,[o,a,l]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const l=Math.sqrt(n*n+r*r);return[t,l,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),l=n*Math.sin(o);return[t,a,l]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let l=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(l+=60),l};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(s=>s+s).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,l=r&255;return[o,a,l]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),l=o-a;let s,i;return l<1?s=a/(1-l):s=0,l<=0?i=0:o===t?i=(n-r)/l%6:o===n?i=2+(r-t)/l:i=4+(t-n)/l,i/=6,i%=1,[i*360,l*100,s*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,l=a%1,s=1-l;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=l,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=l;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=l,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const W=_e;function Qe(){const e={},t=Object.keys(W);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function lt(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,l=0;l{I[e]={},Object.defineProperty(I[e],"channels",{value:U[e].channels}),Object.defineProperty(I[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];I[e][r]=lt(o),I[e][r].raw=at(o)})});var st=I;const _=fe(st);var it=Ne,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,le=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return le;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?le:+e}var Mt=Et,Ct=J,D=ut,se=Mt,$t="Expected a function",Ot=Math.max,Nt=Math.min;function It(e,t,n){var r,o,a,l,s,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=se(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Ot(se(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function x(v){var C=r,T=o;return r=o=void 0,c=v,l=e.apply(T,C),l}function j(v){return c=v,s=setTimeout(b,t),d?x(v):l}function M(v){var C=v-i,T=v-c,te=t-C;return f?Nt(te,a-T):te}function p(v){var C=v-i,T=v-c;return i===void 0||C>=t||C<0||f&&T>=a}function b(){var v=D();if(p(v))return w(v);s=setTimeout(b,M(v))}function w(v){return s=void 0,g&&r?x(v):(r=o=void 0,l)}function E(){s!==void 0&&clearTimeout(s),c=0,r=i=o=s=void 0}function k(){return s===void 0?l:w(D())}function O(){var v=D(),C=p(v);if(r=arguments,o=this,i=v,C){if(s===void 0)return j(i);if(f)return clearTimeout(s),s=setTimeout(b,t),x(i)}return s===void 0&&(s=setTimeout(b,t)),l}return O.cancel=E,O.flush=k,O}var St=It,Rt=St,jt=J,Tt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(Tt);return jt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=$.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Lt=$(ue)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),qt=$.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=$(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=$.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=$.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,style:t,...n})=>{let r=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...n,style:{...t,backgroundImage:r}})},Kt=$(Ce.Input)(({theme:e,readOnly:t})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=$($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),L=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},q={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},S=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[l,s,i,c]=ce(e),[d,f,g]=_.rgb.hsl([l,s,i])||[0,0,0];return{valid:t,value:e,keyword:_.rgb.keyword([l,s,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${_.rgb.hex([l,s,i]).toLowerCase()}`}}if(Ut.test(e)){let[l,s,i,c]=ce(e),[d,f,g]=_.hsl.rgb([l,s,i])||[0,0,0];return{valid:t,value:e,keyword:_.hsl.keyword([l,s,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${_.hsl.hex([l,s,i]).toLowerCase()}`}}let n=e.replace("#",""),r=_.keyword.rgb(n)||_.hex.rgb(n),o=_.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{_.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:_.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return q[n];if(n!=="hex")return(t==null?void 0:t[n])||q[n];if(!t.hex.startsWith("#"))try{return`#${_.keyword.hex(t.hex)}`}catch{return q.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:q.hex;let[o,a,l]=r[1].split("");return`#${o}${o}${a}${a}${l}${l}`},Zt=(e,t)=>{let[n,r]=m.useState(e||""),[o,a]=m.useState(()=>S(n)),[l,s]=m.useState((o==null?void 0:o.colorSpace)||"hex");m.useEffect(()=>{let f=e||"",g=S(f);r(f),a(g),s((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=m.useMemo(()=>Qt(n,o,l).toLowerCase(),[n,o,l]),c=m.useCallback(f=>{let g=S(f),x=(g==null?void 0:g.value)||f||"";r(x),x===""&&(a(void 0),t(void 0)),g&&(a(g),s(g.colorSpace),t(g.value))},[t]),d=m.useCallback(()=>{let f=L.indexOf(l)+1;f>=L.length&&(f=0),s(L[f]);let g=(o==null?void 0:o[L[f]])||"";r(g),t(g)},[o,l,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:l,cycleColorSpace:d}},X=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=m.useState(t!=null&&t.valid?[t]:[]);m.useEffect(()=>{t===void 0&&o([])},[t]);let a=m.useMemo(()=>(e||[]).map(s=>typeof s=="string"?S(s):s.title?{...S(s.color),keyword:s.title}:S(s.color)).concat(r).filter(Boolean).slice(-27),[e,r]),l=m.useCallback(s=>{s!=null&&s.valid&&(a.some(i=>X(i[n])===X(s[n]))||o(i=>i.concat(s)))},[n,a]);return{presets:a,addPreset:l}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:l=!1,argType:s})=>{var E;let i=m.useCallback(Ht(n,200),[n]),{value:c,realValue:d,updateValue:f,color:g,colorSpace:x,cycleColorSpace:j}=Zt(t,i),{presets:M,addPreset:p}=en(a,g,x),b=Jt[x],w=!!((E=s==null?void 0:s.table)!=null&&E.readonly);return h.createElement(Pt,{"aria-readonly":w},h.createElement(Lt,{startOpen:l,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>p(g),tooltip:h.createElement(qt,null,h.createElement(b,{color:d==="transparent"?"#000000":d,onChange:f,onFocus:r,onBlur:o}),M.length>0&&h.createElement(Wt,null,M.map((k,O)=>h.createElement(ue,{key:`${k.value}-${O}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:k.keyword||k.value})},h.createElement(ie,{value:k[x],active:g&&X(k[x])===X(g[x]),onClick:()=>f(k.value)})))))},h.createElement(ie,{value:d,style:{margin:4}})),h.createElement(Kt,{id:Oe(e),value:c,onChange:k=>f(k.target.value),onFocus:k=>k.target.select(),readOnly:w,placeholder:"Choose color..."}),c?h.createElement(Vt,{onClick:j}):null)},mn=tn;export{tn as ColorControl,mn as default}; +import{n as $,e as ue,T as Me,F as Ce,f as $e,g as Oe}from"./index-vCrdABUF.js";import{a as h,r as m,g as fe}from"./index-BP8_t0zE.js";import{i as J}from"./index-DJqTsaQd.js";import{_ as Ne,i as Ie}from"./toString-BjCnz-8e.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./index-DrFu-skq.js";function N(){return(N=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=m.useRef(e),n=m.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var R=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,s.current)):M(!1)},j=function(){return M(!1)};function M(p){var b=i.current,w=V(o.current),E=p?w.addEventListener:w.removeEventListener;E(b?"touchmove":"mousemove",x),E(b?"touchend":"mouseup",j)}return[function(p){var b=p.nativeEvent,w=o.current;if(w&&(re(b),!function(k,O){return O&&!F(k)}(b,i.current)&&w)){if(F(b)){i.current=!0;var E=b.changedTouches||[];E.length&&(s.current=E[0].identifier)}w.focus(),a(ne(w,b,s.current)),M(!0)}},function(p){var b=p.which||p.keyCode;b<37||b>40||(p.preventDefault(),l({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},M]},[l,a]),d=c[0],f=c[1],g=c[2];return m.useEffect(function(){return g},[g]),h.createElement("div",N({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),H=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=H(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},je=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},Te=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:je(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},B=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),l=r*(1-n),s=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,s,l,l,i,r][c]),g:y(255*[i,r,r,s,l,l][c]),b:y(255*[l,l,i,r,r,s][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},P=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?P(y(255*o)):"";return"#"+P(t)+P(n)+P(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),l=a-Math.min(t,n,r),s=l?a===t?(n-r)/l:a===n?2+(r-t)/l:4+(t-n)/l:0;return{h:y(60*(s<0?s+6:s)),s:y(a?l/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=H(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:R(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:R(t.s+100*o.left,0,100),v:R(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=m.useState(function(){return e.toHsva(t)}),a=o[0],l=o[1],s=m.useRef({color:t,hsva:a});m.useEffect(function(){if(!e.equal(t,s.current.color)){var c=e.toHsva(t);s.current={hsva:c,color:t},l(c)}},[t,e]),m.useEffect(function(){var c;ve(a,s.current.hsva)||e.equal(c=e.fromHsva(a),s.current.color)||(s.current={hsva:a,color:c},r(c))},[a,e,r]);var i=m.useCallback(function(c){l(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?m.useLayoutEffect:m.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,l=Q(e,["className","colorModel","color","onChange"]),s=m.useRef(null);xe(s);var i=ye(n,o,a),c=i[0],d=i[1],f=H(["react-colorful",t]);return h.createElement("div",N({},l,{ref:s,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,N({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+B(Object.assign({},n,{a:0}))+", "+B(Object.assign({},n,{a:1}))+")"},a=H(["react-colorful__alpha",t]),l=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:R(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":l+"%","aria-valuenow":l,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:B(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,l=Q(e,["className","colorModel","color","onChange"]),s=m.useRef(null);xe(s);var i=ye(n,o,a),c=i[0],d=i[1],f=H(["react-colorful",t]);return h.createElement("div",N({},l,{ref:s,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:Te,fromHsva:B,equal:pe},Ae=function(e){return h.createElement(we,N({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,N({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const z=Ye,ke={};for(const e of Object.keys(z))ke[z[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),l=a-o;let s,i;a===o?s=0:t===a?s=(n-r)/l:n===a?s=2+(r-t)/l:r===a&&(s=4+(t-n)/l),s=Math.min(s*60,360),s<0&&(s+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=l/(a+o):i=l/(2-a-o),[s,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const l=e[0]/255,s=e[1]/255,i=e[2]/255,c=Math.max(l,s,i),d=c-Math.min(l,s,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(l),n=f(s),r=f(i),l===c?o=r-n:s===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,l=(1-n-o)/(1-o)||0,s=(1-r-o)/(1-o)||0;return[a*100,l*100,s*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(z)){const a=z[o],l=Je(e,a);l.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,l=t*.0193+n*.1192+r*.9505;return[o*100,a*100,l*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,l=500*(n-r),s=200*(r-o);return[a,l,s]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,l;if(n===0)return l=r*255,[l,l,l];r<.5?o=r*(1+n):o=r+n-r*n;const s=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?l=s+(o-s)*6*a:2*a<1?l=o:3*a<2?l=s+(o-s)*(2/3-a)*6:l=s,i[c]=l*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const l=(r+n)/2,s=r===0?2*o/(a+o):2*n/(r+n);return[t,s*100,l*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),l=255*r*(1-n),s=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,l];case 1:return[s,r,l];case 2:return[l,r,i];case 3:return[l,s,r];case 4:return[i,l,r];case 5:return[r,l,s]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,l;l=(2-n)*r;const s=(2-n)*o;return a=n*o,a/=s<=1?s:2-s,a=a||0,l/=2,[t,a*100,l*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const l=Math.floor(6*t),s=1-r;a=6*t-l,l&1&&(a=1-a);const i=n+a*(s-n);let c,d,f;switch(l){default:case 6:case 0:c=s,d=i,f=n;break;case 1:c=i,d=s,f=n;break;case 2:c=n,d=s,f=i;break;case 3:c=n,d=i,f=s;break;case 4:c=i,d=n,f=s;break;case 5:c=s,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),l=1-Math.min(1,n*(1-o)+o),s=1-Math.min(1,r*(1-o)+o);return[a*255,l*255,s*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,l;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,l=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),l=Math.min(Math.max(0,l),1),[o*255,a*255,l*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),l=200*(n-r);return[o,a,l]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,l;a=(t+16)/116,o=n/500+a,l=a-r/200;const s=a**3,i=o**3,c=l**3;return a=s>.008856?s:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,l=c>.008856?c:(l-16/116)/7.787,o*=95.047,a*=100,l*=108.883,[o,a,l]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const l=Math.sqrt(n*n+r*r);return[t,l,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),l=n*Math.sin(o);return[t,a,l]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let l=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(l+=60),l};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(s=>s+s).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,l=r&255;return[o,a,l]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),l=o-a;let s,i;return l<1?s=a/(1-l):s=0,l<=0?i=0:o===t?i=(n-r)/l%6:o===n?i=2+(r-t)/l:i=4+(t-n)/l,i/=6,i%=1,[i*360,l*100,s*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,l=a%1,s=1-l;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=l,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=l;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=l,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const W=_e;function Qe(){const e={},t=Object.keys(W);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function lt(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,l=0;l{I[e]={},Object.defineProperty(I[e],"channels",{value:U[e].channels}),Object.defineProperty(I[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];I[e][r]=lt(o),I[e][r].raw=at(o)})});var st=I;const _=fe(st);var it=Ne,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,le=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return le;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?le:+e}var Mt=Et,Ct=J,D=ut,se=Mt,$t="Expected a function",Ot=Math.max,Nt=Math.min;function It(e,t,n){var r,o,a,l,s,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=se(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Ot(se(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function x(v){var C=r,T=o;return r=o=void 0,c=v,l=e.apply(T,C),l}function j(v){return c=v,s=setTimeout(b,t),d?x(v):l}function M(v){var C=v-i,T=v-c,te=t-C;return f?Nt(te,a-T):te}function p(v){var C=v-i,T=v-c;return i===void 0||C>=t||C<0||f&&T>=a}function b(){var v=D();if(p(v))return w(v);s=setTimeout(b,M(v))}function w(v){return s=void 0,g&&r?x(v):(r=o=void 0,l)}function E(){s!==void 0&&clearTimeout(s),c=0,r=i=o=s=void 0}function k(){return s===void 0?l:w(D())}function O(){var v=D(),C=p(v);if(r=arguments,o=this,i=v,C){if(s===void 0)return j(i);if(f)return clearTimeout(s),s=setTimeout(b,t),x(i)}return s===void 0&&(s=setTimeout(b,t)),l}return O.cancel=E,O.flush=k,O}var St=It,Rt=St,jt=J,Tt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(Tt);return jt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=$.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Lt=$(ue)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),qt=$.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=$(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=$.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=$.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,style:t,...n})=>{let r=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...n,style:{...t,backgroundImage:r}})},Kt=$(Ce.Input)(({theme:e,readOnly:t})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=$($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),L=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},q={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},S=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[l,s,i,c]=ce(e),[d,f,g]=_.rgb.hsl([l,s,i])||[0,0,0];return{valid:t,value:e,keyword:_.rgb.keyword([l,s,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${_.rgb.hex([l,s,i]).toLowerCase()}`}}if(Ut.test(e)){let[l,s,i,c]=ce(e),[d,f,g]=_.hsl.rgb([l,s,i])||[0,0,0];return{valid:t,value:e,keyword:_.hsl.keyword([l,s,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${_.hsl.hex([l,s,i]).toLowerCase()}`}}let n=e.replace("#",""),r=_.keyword.rgb(n)||_.hex.rgb(n),o=_.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{_.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:_.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return q[n];if(n!=="hex")return(t==null?void 0:t[n])||q[n];if(!t.hex.startsWith("#"))try{return`#${_.keyword.hex(t.hex)}`}catch{return q.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:q.hex;let[o,a,l]=r[1].split("");return`#${o}${o}${a}${a}${l}${l}`},Zt=(e,t)=>{let[n,r]=m.useState(e||""),[o,a]=m.useState(()=>S(n)),[l,s]=m.useState((o==null?void 0:o.colorSpace)||"hex");m.useEffect(()=>{let f=e||"",g=S(f);r(f),a(g),s((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=m.useMemo(()=>Qt(n,o,l).toLowerCase(),[n,o,l]),c=m.useCallback(f=>{let g=S(f),x=(g==null?void 0:g.value)||f||"";r(x),x===""&&(a(void 0),t(void 0)),g&&(a(g),s(g.colorSpace),t(g.value))},[t]),d=m.useCallback(()=>{let f=L.indexOf(l)+1;f>=L.length&&(f=0),s(L[f]);let g=(o==null?void 0:o[L[f]])||"";r(g),t(g)},[o,l,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:l,cycleColorSpace:d}},X=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=m.useState(t!=null&&t.valid?[t]:[]);m.useEffect(()=>{t===void 0&&o([])},[t]);let a=m.useMemo(()=>(e||[]).map(s=>typeof s=="string"?S(s):s.title?{...S(s.color),keyword:s.title}:S(s.color)).concat(r).filter(Boolean).slice(-27),[e,r]),l=m.useCallback(s=>{s!=null&&s.valid&&(a.some(i=>X(i[n])===X(s[n]))||o(i=>i.concat(s)))},[n,a]);return{presets:a,addPreset:l}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:l=!1,argType:s})=>{var E;let i=m.useCallback(Ht(n,200),[n]),{value:c,realValue:d,updateValue:f,color:g,colorSpace:x,cycleColorSpace:j}=Zt(t,i),{presets:M,addPreset:p}=en(a,g,x),b=Jt[x],w=!!((E=s==null?void 0:s.table)!=null&&E.readonly);return h.createElement(Pt,{"aria-readonly":w},h.createElement(Lt,{startOpen:l,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>p(g),tooltip:h.createElement(qt,null,h.createElement(b,{color:d==="transparent"?"#000000":d,onChange:f,onFocus:r,onBlur:o}),M.length>0&&h.createElement(Wt,null,M.map((k,O)=>h.createElement(ue,{key:`${k.value}-${O}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:k.keyword||k.value})},h.createElement(ie,{value:k[x],active:g&&X(k[x])===X(g[x]),onClick:()=>f(k.value)})))))},h.createElement(ie,{value:d,style:{margin:4}})),h.createElement(Kt,{id:Oe(e),value:c,onChange:k=>f(k.target.value),onFocus:k=>k.target.select(),readOnly:w,placeholder:"Choose color..."}),c?h.createElement(Vt,{onClick:j}):null)},mn=tn;export{tn as ColorControl,mn as default}; diff --git a/sb8/qa/assets/ColorSelected-DyTCIv8L.js b/sb8/qa/assets/ColorSelected-DERcqfqY.js similarity index 97% rename from sb8/qa/assets/ColorSelected-DyTCIv8L.js rename to sb8/qa/assets/ColorSelected-DERcqfqY.js index eeb0455266..3f8b54680e 100644 --- a/sb8/qa/assets/ColorSelected-DyTCIv8L.js +++ b/sb8/qa/assets/ColorSelected-DERcqfqY.js @@ -1,8 +1,8 @@ -import{r as c,g as qn,a as G}from"./index-BP8_t0zE.js";import{m as Kr,a as Qr,l as Jr,u as Zr,n as ea,v as Xn,p as ta,w as na,j as ra,x as aa,q as ia,y as oa,z as sa,C as la}from"./CheckboxList-Dbk8JkiG.js";import{_ as ca,D as ua,l as da}from"./index-BU7KlZI9.js";import{_ as Gn,u as Ne,a as fa}from"./useMosaicTranslation-CZCb37QS.js";import{r as ye,j as d}from"./jsx-runtime-nGUw9YhZ.js";import{s as M,t as R,B as Kt}from"./theme-DRtZtbPc.js";import{t as W}from"./testIds-DZf96GK8.js";import{T as ha,d as ma}from"./TitleWrapper-CYciWRcJ.js";import{B as rt}from"./ButtonRow-CP4CrsnB.js";import{i as ga}from"./isSymbol-CEVJpixJ.js";import{i as De}from"./generateUtilityClasses-kMkq-zAT.js";import{r as ke}from"./createSvgIcon-Pzp5yWPs.js";import{D as va}from"./FormFieldText.styled-Cq8lzkgl.js";import{B as Y,S as ba,c as wa,P as xa}from"./Button-DuMlbF8s.js";import{d as Ft}from"./DataViewPrimaryFilter.styled-auwRvG8E.js";import{r as Ie}from"./index-BxmsGmlx.js";import{C as kt}from"./Checkbox-CODv9_Wr.js";import{d as Ca}from"./MoreVert-gv79E1WA.js";import{u as kn,g as pn}from"./useToggle-lipGlewK.js";import{T as Sn}from"./Typography-Br_RMLnS.js";import{D as ya,a as Da,d as ka}from"./ChevronRight-bPXdPGpY.js";import{P as pa}from"./PageHeader-DvUko4so.js";function zt(e,t,n=!0){const r=e!==void 0?e:n;return(Array.isArray(r)?r:[r]).map(i=>i instanceof Function?i(t):i)}function Ut(e,t,n,r=!0){const a=c.useMemo(()=>{const i=Array.isArray(e),s=(i?e:[e]).map(l=>({...l,[n]:zt(l[n],t,r)}));return i?s:s[0]},[r,e,n,t]);return Array.isArray(a)?kn(a,n):kn(a,n)}var Sa=Qr,Aa=Kr,Ta=ca,Ra=Jr;function Ea(e,t){var n=Ra(e)?Sa:Ta;return n(e,Aa(t))}var Oa=Ea;const au=qn(Oa);function q(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Ma(e){return q(1,arguments),e instanceof Date||Gn(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ce(e){q(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Gn(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function _a(e){if(q(1,arguments),!Ma(e)&&typeof e!="number")return!1;var t=ce(e);return!isNaN(Number(t))}function Ae(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Pa(e,t){q(2,arguments);var n=ce(e).getTime(),r=Ae(t);return new Date(n+r)}function Ia(e,t){q(2,arguments);var n=Ae(t);return Pa(e,-n)}var ja=864e5;function $a(e){q(1,arguments);var t=ce(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),a=n-r;return Math.floor(a/ja)+1}function vt(e){q(1,arguments);var t=1,n=ce(e),r=n.getUTCDay(),a=(r=a.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function Na(e){q(1,arguments);var t=Kn(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=vt(n);return r}var La=6048e5;function Wa(e){q(1,arguments);var t=ce(e),n=vt(t).getTime()-Na(t).getTime();return Math.round(n/La)+1}var Ba={};function pt(){return Ba}function bt(e,t){var n,r,a,i,o,s,l,u;q(1,arguments);var f=pt(),h=Ae((n=(r=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=ce(e),m=g.getUTCDay(),w=(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=new Date(0);w.setUTCFullYear(h+1,0,m),w.setUTCHours(0,0,0,0);var b=bt(w,t),x=new Date(0);x.setUTCFullYear(h,0,m),x.setUTCHours(0,0,0,0);var v=bt(x,t);return f.getTime()>=b.getTime()?h+1:f.getTime()>=v.getTime()?h:h-1}function Va(e,t){var n,r,a,i,o,s,l,u;q(1,arguments);var f=pt(),h=Ae((n=(r=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1),g=Qn(e,t),m=new Date(0);m.setUTCFullYear(g,0,h),m.setUTCHours(0,0,0,0);var w=bt(m,t);return w}var Fa=6048e5;function za(e,t){q(1,arguments);var n=ce(e),r=bt(n,t).getTime()-Va(n,t).getTime();return Math.round(r/Fa)+1}function I(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return I(n==="yy"?a%100:a,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):I(r+1,2)},d:function(t,n){return I(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return I(t.getUTCHours()%12||12,n.length)},H:function(t,n){return I(t.getUTCHours(),n.length)},m:function(t,n){return I(t.getUTCMinutes(),n.length)},s:function(t,n){return I(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,r-3));return I(i,n.length)}},Pe={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ua={G:function(t,n,r){var a=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(a,{width:"abbreviated"});case"GGGGG":return r.era(a,{width:"narrow"});case"GGGG":default:return r.era(a,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return r.ordinalNumber(i,{unit:"year"})}return xe.y(t,n)},Y:function(t,n,r,a){var i=Qn(t,a),o=i>0?i:1-i;if(n==="YY"){var s=o%100;return I(s,2)}return n==="Yo"?r.ordinalNumber(o,{unit:"year"}):I(o,n.length)},R:function(t,n){var r=Kn(t);return I(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return I(r,n.length)},Q:function(t,n,r){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(a);case"QQ":return I(a,2);case"Qo":return r.ordinalNumber(a,{unit:"quarter"});case"QQQ":return r.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,n,r){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(a);case"qq":return I(a,2);case"qo":return r.ordinalNumber(a,{unit:"quarter"});case"qqq":return r.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,n,r){var a=t.getUTCMonth();switch(n){case"M":case"MM":return xe.M(t,n);case"Mo":return r.ordinalNumber(a+1,{unit:"month"});case"MMM":return r.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(a,{width:"wide",context:"formatting"})}},L:function(t,n,r){var a=t.getUTCMonth();switch(n){case"L":return String(a+1);case"LL":return I(a+1,2);case"Lo":return r.ordinalNumber(a+1,{unit:"month"});case"LLL":return r.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(a,{width:"wide",context:"standalone"})}},w:function(t,n,r,a){var i=za(t,a);return n==="wo"?r.ordinalNumber(i,{unit:"week"}):I(i,n.length)},I:function(t,n,r){var a=Wa(t);return n==="Io"?r.ordinalNumber(a,{unit:"week"}):I(a,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):xe.d(t,n)},D:function(t,n,r){var a=$a(t);return n==="Do"?r.ordinalNumber(a,{unit:"dayOfYear"}):I(a,n.length)},E:function(t,n,r){var a=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(a,{width:"short",context:"formatting"});case"EEEE":default:return r.day(a,{width:"wide",context:"formatting"})}},e:function(t,n,r,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(n){case"e":return String(o);case"ee":return I(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(t,n,r,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(n){case"c":return String(o);case"cc":return I(o,n.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(t,n,r){var a=t.getUTCDay(),i=a===0?7:a;switch(n){case"i":return String(i);case"ii":return I(i,n.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(a,{width:"short",context:"formatting"});case"iiii":default:return r.day(a,{width:"wide",context:"formatting"})}},a:function(t,n,r){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,n,r){var a=t.getUTCHours(),i;switch(a===12?i=Pe.noon:a===0?i=Pe.midnight:i=a/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,n,r){var a=t.getUTCHours(),i;switch(a>=17?i=Pe.evening:a>=12?i=Pe.afternoon:a>=4?i=Pe.morning:i=Pe.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),r.ordinalNumber(a,{unit:"hour"})}return xe.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):xe.H(t,n)},K:function(t,n,r){var a=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(a,{unit:"hour"}):I(a,n.length)},k:function(t,n,r){var a=t.getUTCHours();return a===0&&(a=24),n==="ko"?r.ordinalNumber(a,{unit:"hour"}):I(a,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):xe.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):xe.s(t,n)},S:function(t,n){return xe.S(t,n)},X:function(t,n,r,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(n){case"X":return Tn(o);case"XXXX":case"XX":return Se(o);case"XXXXX":case"XXX":default:return Se(o,":")}},x:function(t,n,r,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(n){case"x":return Tn(o);case"xxxx":case"xx":return Se(o);case"xxxxx":case"xxx":default:return Se(o,":")}},O:function(t,n,r,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+An(o,":");case"OOOO":default:return"GMT"+Se(o,":")}},z:function(t,n,r,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+An(o,":");case"zzzz":default:return"GMT"+Se(o,":")}},t:function(t,n,r,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return I(o,n.length)},T:function(t,n,r,a){var i=a._originalDate||t,o=i.getTime();return I(o,n.length)}};function An(e,t){var n=e>0?"-":"+",r=Math.abs(e),a=Math.floor(r/60),i=r%60;if(i===0)return n+String(a);var o=t;return n+String(a)+o+I(i,2)}function Tn(e,t){if(e%60===0){var n=e>0?"-":"+";return n+I(Math.abs(e)/60,2)}return Se(e,t)}function Se(e,t){var n=t||"",r=e>0?"-":"+",a=Math.abs(e),i=I(Math.floor(a/60),2),o=I(a%60,2);return r+i+n+o}var Rn=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Jn=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Ya=function(t,n){var r=t.match(/(P+)(p+)?/)||[],a=r[1],i=r[2];if(!i)return Rn(t,n);var o;switch(a){case"P":o=n.dateTime({width:"short"});break;case"PP":o=n.dateTime({width:"medium"});break;case"PPP":o=n.dateTime({width:"long"});break;case"PPPP":default:o=n.dateTime({width:"full"});break}return o.replace("{{date}}",Rn(a,n)).replace("{{time}}",Jn(i,n))},Ha={p:Jn,P:Ya};function qa(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var Xa=["D","DD"],Ga=["YY","YYYY"];function Ka(e){return Xa.indexOf(e)!==-1}function Qa(e){return Ga.indexOf(e)!==-1}function En(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Ja={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Za=function(t,n,r){var a,i=Ja[t];return typeof i=="string"?a=i:n===1?a=i.one:a=i.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+a:a+" ago":a};function It(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var ei={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ti={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ni={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ri={date:It({formats:ei,defaultWidth:"full"}),time:It({formats:ti,defaultWidth:"full"}),dateTime:It({formats:ni,defaultWidth:"full"})},ai={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ii=function(t,n,r,a){return ai[t]};function Xe(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",a;if(r==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return a[u]}}var oi={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},si={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},li={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ci={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ui={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},di={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},fi=function(t,n){var r=Number(t),a=r%100;if(a>20||a<10)switch(a%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},hi={ordinalNumber:fi,era:Xe({values:oi,defaultWidth:"wide"}),quarter:Xe({values:si,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Xe({values:li,defaultWidth:"wide"}),day:Xe({values:ci,defaultWidth:"wide"}),dayPeriod:Xe({values:ui,defaultWidth:"wide",formattingValues:di,defaultFormattingWidth:"wide"})};function Ge(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?gi(s,function(h){return h.test(o)}):mi(s,function(h){return h.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;var f=t.slice(o.length);return{value:u,rest:f}}}function mi(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function gi(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var a=r[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var bi=/^(\d+)(th|st|nd|rd)?/i,wi=/\d+/i,xi={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ci={any:[/^b/i,/^(a|c)/i]},yi={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Di={any:[/1/i,/2/i,/3/i,/4/i]},ki={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},pi={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Si={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ai={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Ti={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ri={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ei={ordinalNumber:vi({matchPattern:bi,parsePattern:wi,valueCallback:function(t){return parseInt(t,10)}}),era:Ge({matchPatterns:xi,defaultMatchWidth:"wide",parsePatterns:Ci,defaultParseWidth:"any"}),quarter:Ge({matchPatterns:yi,defaultMatchWidth:"wide",parsePatterns:Di,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ge({matchPatterns:ki,defaultMatchWidth:"wide",parsePatterns:pi,defaultParseWidth:"any"}),day:Ge({matchPatterns:Si,defaultMatchWidth:"wide",parsePatterns:Ai,defaultParseWidth:"any"}),dayPeriod:Ge({matchPatterns:Ti,defaultMatchWidth:"any",parsePatterns:Ri,defaultParseWidth:"any"})},Oi={code:"en-US",formatDistance:Za,formatLong:ri,formatRelative:ii,localize:hi,match:Ei,options:{weekStartsOn:0,firstWeekContainsDate:1}},Mi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_i=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pi=/^'([^]*?)'?$/,Ii=/''/g,ji=/[a-zA-Z]/;function iu(e,t,n){var r,a,i,o,s,l,u,f,h,g,m,w,b,x,v,C,y,k;q(2,arguments);var A=String(t),S=pt(),p=(r=(a=n==null?void 0:n.locale)!==null&&a!==void 0?a:S.locale)!==null&&r!==void 0?r:Oi,T=Ae((i=(o=(s=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(u=n.locale)===null||u===void 0||(f=u.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&o!==void 0?o:(h=S.locale)===null||h===void 0||(g=h.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var $=Ae((m=(w=(b=(x=n==null?void 0:n.weekStartsOn)!==null&&x!==void 0?x:n==null||(v=n.locale)===null||v===void 0||(C=v.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&b!==void 0?b:S.weekStartsOn)!==null&&w!==void 0?w:(y=S.locale)===null||y===void 0||(k=y.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&m!==void 0?m:0);if(!($>=0&&$<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!p.localize)throw new RangeError("locale must contain localize property");if(!p.formatLong)throw new RangeError("locale must contain formatLong property");var L=ce(e);if(!_a(L))throw new RangeError("Invalid time value");var P=qa(L),D=Ia(L,P),_={firstWeekContainsDate:T,weekStartsOn:$,locale:p,_originalDate:L},E=A.match(_i).map(function(N){var H=N[0];if(H==="p"||H==="P"){var B=Ha[H];return B(N,p.formatLong)}return N}).join("").match(Mi).map(function(N){if(N==="''")return"'";var H=N[0];if(H==="'")return $i(N);var B=Ua[H];if(B)return!(n!=null&&n.useAdditionalWeekYearTokens)&&Qa(N)&&En(N,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Ka(N)&&En(N,t,String(e)),B(D,N,p.localize,_);if(H.match(ji))throw new RangeError("Format string contains an unescaped latin alphabet character `"+H+"`");return N}).join("");return E}function $i(e){var t=e.match(Pi);return t?t[1].replace(Ii,"'"):e}var On=Zr;function Ni(e,t,n){t=="__proto__"&&On?On(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Li=Ni,jt,Mn;function Wi(){if(Mn)return jt;Mn=1;var e=Li,t=ea,n=Object.prototype,r=n.hasOwnProperty;function a(i,o,s){var l=i[o];(!(r.call(i,o)&&t(l,s))||s===void 0&&!(o in i))&&e(i,o,s)}return jt=a,jt}var $t,_n;function Bi(){if(_n)return $t;_n=1;var e=Wi(),t=Xn,n=ta,r=ga,a=na;function i(o,s,l,u){if(!r(o))return o;s=t(s,o);for(var f=-1,h=s.length,g=h-1,m=o;m!=null&&++fi instanceof Function?i(t):i)}function Ut(e,t,n,r=!0){const a=c.useMemo(()=>{const i=Array.isArray(e),s=(i?e:[e]).map(l=>({...l,[n]:zt(l[n],t,r)}));return i?s:s[0]},[r,e,n,t]);return Array.isArray(a)?kn(a,n):kn(a,n)}var Sa=Qr,Aa=Kr,Ta=Jr,Ra=Zr;function Ea(e,t){var n=Ra(e)?Sa:Ta;return n(e,Aa(t))}var Oa=Ea;const au=qn(Oa);function q(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Ma(e){return q(1,arguments),e instanceof Date||Gn(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ce(e){q(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Gn(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function _a(e){if(q(1,arguments),!Ma(e)&&typeof e!="number")return!1;var t=ce(e);return!isNaN(Number(t))}function Ae(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Pa(e,t){q(2,arguments);var n=ce(e).getTime(),r=Ae(t);return new Date(n+r)}function Ia(e,t){q(2,arguments);var n=Ae(t);return Pa(e,-n)}var ja=864e5;function $a(e){q(1,arguments);var t=ce(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),a=n-r;return Math.floor(a/ja)+1}function vt(e){q(1,arguments);var t=1,n=ce(e),r=n.getUTCDay(),a=(r=a.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function Na(e){q(1,arguments);var t=Kn(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=vt(n);return r}var La=6048e5;function Wa(e){q(1,arguments);var t=ce(e),n=vt(t).getTime()-Na(t).getTime();return Math.round(n/La)+1}var Ba={};function pt(){return Ba}function bt(e,t){var n,r,a,i,o,s,l,u;q(1,arguments);var f=pt(),h=Ae((n=(r=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=ce(e),m=g.getUTCDay(),w=(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=new Date(0);w.setUTCFullYear(h+1,0,m),w.setUTCHours(0,0,0,0);var b=bt(w,t),x=new Date(0);x.setUTCFullYear(h,0,m),x.setUTCHours(0,0,0,0);var v=bt(x,t);return f.getTime()>=b.getTime()?h+1:f.getTime()>=v.getTime()?h:h-1}function Va(e,t){var n,r,a,i,o,s,l,u;q(1,arguments);var f=pt(),h=Ae((n=(r=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1),g=Qn(e,t),m=new Date(0);m.setUTCFullYear(g,0,h),m.setUTCHours(0,0,0,0);var w=bt(m,t);return w}var Fa=6048e5;function za(e,t){q(1,arguments);var n=ce(e),r=bt(n,t).getTime()-Va(n,t).getTime();return Math.round(r/Fa)+1}function I(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return I(n==="yy"?a%100:a,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):I(r+1,2)},d:function(t,n){return I(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return I(t.getUTCHours()%12||12,n.length)},H:function(t,n){return I(t.getUTCHours(),n.length)},m:function(t,n){return I(t.getUTCMinutes(),n.length)},s:function(t,n){return I(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,r-3));return I(i,n.length)}},Pe={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ua={G:function(t,n,r){var a=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(a,{width:"abbreviated"});case"GGGGG":return r.era(a,{width:"narrow"});case"GGGG":default:return r.era(a,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return r.ordinalNumber(i,{unit:"year"})}return xe.y(t,n)},Y:function(t,n,r,a){var i=Qn(t,a),o=i>0?i:1-i;if(n==="YY"){var s=o%100;return I(s,2)}return n==="Yo"?r.ordinalNumber(o,{unit:"year"}):I(o,n.length)},R:function(t,n){var r=Kn(t);return I(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return I(r,n.length)},Q:function(t,n,r){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(a);case"QQ":return I(a,2);case"Qo":return r.ordinalNumber(a,{unit:"quarter"});case"QQQ":return r.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,n,r){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(a);case"qq":return I(a,2);case"qo":return r.ordinalNumber(a,{unit:"quarter"});case"qqq":return r.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,n,r){var a=t.getUTCMonth();switch(n){case"M":case"MM":return xe.M(t,n);case"Mo":return r.ordinalNumber(a+1,{unit:"month"});case"MMM":return r.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(a,{width:"wide",context:"formatting"})}},L:function(t,n,r){var a=t.getUTCMonth();switch(n){case"L":return String(a+1);case"LL":return I(a+1,2);case"Lo":return r.ordinalNumber(a+1,{unit:"month"});case"LLL":return r.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(a,{width:"wide",context:"standalone"})}},w:function(t,n,r,a){var i=za(t,a);return n==="wo"?r.ordinalNumber(i,{unit:"week"}):I(i,n.length)},I:function(t,n,r){var a=Wa(t);return n==="Io"?r.ordinalNumber(a,{unit:"week"}):I(a,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):xe.d(t,n)},D:function(t,n,r){var a=$a(t);return n==="Do"?r.ordinalNumber(a,{unit:"dayOfYear"}):I(a,n.length)},E:function(t,n,r){var a=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(a,{width:"short",context:"formatting"});case"EEEE":default:return r.day(a,{width:"wide",context:"formatting"})}},e:function(t,n,r,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(n){case"e":return String(o);case"ee":return I(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(t,n,r,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(n){case"c":return String(o);case"cc":return I(o,n.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(t,n,r){var a=t.getUTCDay(),i=a===0?7:a;switch(n){case"i":return String(i);case"ii":return I(i,n.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(a,{width:"short",context:"formatting"});case"iiii":default:return r.day(a,{width:"wide",context:"formatting"})}},a:function(t,n,r){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,n,r){var a=t.getUTCHours(),i;switch(a===12?i=Pe.noon:a===0?i=Pe.midnight:i=a/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,n,r){var a=t.getUTCHours(),i;switch(a>=17?i=Pe.evening:a>=12?i=Pe.afternoon:a>=4?i=Pe.morning:i=Pe.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),r.ordinalNumber(a,{unit:"hour"})}return xe.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):xe.H(t,n)},K:function(t,n,r){var a=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(a,{unit:"hour"}):I(a,n.length)},k:function(t,n,r){var a=t.getUTCHours();return a===0&&(a=24),n==="ko"?r.ordinalNumber(a,{unit:"hour"}):I(a,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):xe.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):xe.s(t,n)},S:function(t,n){return xe.S(t,n)},X:function(t,n,r,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(n){case"X":return Tn(o);case"XXXX":case"XX":return Se(o);case"XXXXX":case"XXX":default:return Se(o,":")}},x:function(t,n,r,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(n){case"x":return Tn(o);case"xxxx":case"xx":return Se(o);case"xxxxx":case"xxx":default:return Se(o,":")}},O:function(t,n,r,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+An(o,":");case"OOOO":default:return"GMT"+Se(o,":")}},z:function(t,n,r,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+An(o,":");case"zzzz":default:return"GMT"+Se(o,":")}},t:function(t,n,r,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return I(o,n.length)},T:function(t,n,r,a){var i=a._originalDate||t,o=i.getTime();return I(o,n.length)}};function An(e,t){var n=e>0?"-":"+",r=Math.abs(e),a=Math.floor(r/60),i=r%60;if(i===0)return n+String(a);var o=t;return n+String(a)+o+I(i,2)}function Tn(e,t){if(e%60===0){var n=e>0?"-":"+";return n+I(Math.abs(e)/60,2)}return Se(e,t)}function Se(e,t){var n=t||"",r=e>0?"-":"+",a=Math.abs(e),i=I(Math.floor(a/60),2),o=I(a%60,2);return r+i+n+o}var Rn=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Jn=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Ya=function(t,n){var r=t.match(/(P+)(p+)?/)||[],a=r[1],i=r[2];if(!i)return Rn(t,n);var o;switch(a){case"P":o=n.dateTime({width:"short"});break;case"PP":o=n.dateTime({width:"medium"});break;case"PPP":o=n.dateTime({width:"long"});break;case"PPPP":default:o=n.dateTime({width:"full"});break}return o.replace("{{date}}",Rn(a,n)).replace("{{time}}",Jn(i,n))},Ha={p:Jn,P:Ya};function qa(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var Xa=["D","DD"],Ga=["YY","YYYY"];function Ka(e){return Xa.indexOf(e)!==-1}function Qa(e){return Ga.indexOf(e)!==-1}function En(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Ja={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Za=function(t,n,r){var a,i=Ja[t];return typeof i=="string"?a=i:n===1?a=i.one:a=i.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+a:a+" ago":a};function It(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var ei={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ti={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ni={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ri={date:It({formats:ei,defaultWidth:"full"}),time:It({formats:ti,defaultWidth:"full"}),dateTime:It({formats:ni,defaultWidth:"full"})},ai={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ii=function(t,n,r,a){return ai[t]};function Xe(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",a;if(r==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return a[u]}}var oi={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},si={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},li={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ci={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ui={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},di={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},fi=function(t,n){var r=Number(t),a=r%100;if(a>20||a<10)switch(a%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},hi={ordinalNumber:fi,era:Xe({values:oi,defaultWidth:"wide"}),quarter:Xe({values:si,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Xe({values:li,defaultWidth:"wide"}),day:Xe({values:ci,defaultWidth:"wide"}),dayPeriod:Xe({values:ui,defaultWidth:"wide",formattingValues:di,defaultFormattingWidth:"wide"})};function Ge(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?gi(s,function(h){return h.test(o)}):mi(s,function(h){return h.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;var f=t.slice(o.length);return{value:u,rest:f}}}function mi(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function gi(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var a=r[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var bi=/^(\d+)(th|st|nd|rd)?/i,wi=/\d+/i,xi={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ci={any:[/^b/i,/^(a|c)/i]},yi={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Di={any:[/1/i,/2/i,/3/i,/4/i]},ki={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},pi={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Si={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ai={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Ti={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ri={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ei={ordinalNumber:vi({matchPattern:bi,parsePattern:wi,valueCallback:function(t){return parseInt(t,10)}}),era:Ge({matchPatterns:xi,defaultMatchWidth:"wide",parsePatterns:Ci,defaultParseWidth:"any"}),quarter:Ge({matchPatterns:yi,defaultMatchWidth:"wide",parsePatterns:Di,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ge({matchPatterns:ki,defaultMatchWidth:"wide",parsePatterns:pi,defaultParseWidth:"any"}),day:Ge({matchPatterns:Si,defaultMatchWidth:"wide",parsePatterns:Ai,defaultParseWidth:"any"}),dayPeriod:Ge({matchPatterns:Ti,defaultMatchWidth:"any",parsePatterns:Ri,defaultParseWidth:"any"})},Oi={code:"en-US",formatDistance:Za,formatLong:ri,formatRelative:ii,localize:hi,match:Ei,options:{weekStartsOn:0,firstWeekContainsDate:1}},Mi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_i=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pi=/^'([^]*?)'?$/,Ii=/''/g,ji=/[a-zA-Z]/;function iu(e,t,n){var r,a,i,o,s,l,u,f,h,g,m,w,b,x,v,C,y,k;q(2,arguments);var A=String(t),S=pt(),p=(r=(a=n==null?void 0:n.locale)!==null&&a!==void 0?a:S.locale)!==null&&r!==void 0?r:Oi,T=Ae((i=(o=(s=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(u=n.locale)===null||u===void 0||(f=u.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&o!==void 0?o:(h=S.locale)===null||h===void 0||(g=h.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var $=Ae((m=(w=(b=(x=n==null?void 0:n.weekStartsOn)!==null&&x!==void 0?x:n==null||(v=n.locale)===null||v===void 0||(C=v.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&b!==void 0?b:S.weekStartsOn)!==null&&w!==void 0?w:(y=S.locale)===null||y===void 0||(k=y.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&m!==void 0?m:0);if(!($>=0&&$<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!p.localize)throw new RangeError("locale must contain localize property");if(!p.formatLong)throw new RangeError("locale must contain formatLong property");var L=ce(e);if(!_a(L))throw new RangeError("Invalid time value");var P=qa(L),D=Ia(L,P),_={firstWeekContainsDate:T,weekStartsOn:$,locale:p,_originalDate:L},E=A.match(_i).map(function(N){var H=N[0];if(H==="p"||H==="P"){var B=Ha[H];return B(N,p.formatLong)}return N}).join("").match(Mi).map(function(N){if(N==="''")return"'";var H=N[0];if(H==="'")return $i(N);var B=Ua[H];if(B)return!(n!=null&&n.useAdditionalWeekYearTokens)&&Qa(N)&&En(N,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Ka(N)&&En(N,t,String(e)),B(D,N,p.localize,_);if(H.match(ji))throw new RangeError("Format string contains an unescaped latin alphabet character `"+H+"`");return N}).join("");return E}function $i(e){var t=e.match(Pi);return t?t[1].replace(Ii,"'"):e}var On=ea;function Ni(e,t,n){t=="__proto__"&&On?On(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Li=Ni,jt,Mn;function Wi(){if(Mn)return jt;Mn=1;var e=Li,t=ta,n=Object.prototype,r=n.hasOwnProperty;function a(i,o,s){var l=i[o];(!(r.call(i,o)&&t(l,s))||s===void 0&&!(o in i))&&e(i,o,s)}return jt=a,jt}var $t,_n;function Bi(){if(_n)return $t;_n=1;var e=Wi(),t=Xn,n=na,r=ma,a=ra;function i(o,s,l,u){if(!r(o))return o;s=t(s,o);for(var f=-1,h=s.length,g=h-1,m=o;m!=null&&++fe.activeFilters||[],[e.activeFilters]),i=a.map(v=>e.filters.find(C=>C.name===v)),o=e.filters.map(v=>({label:v.label,value:v.name})).sort((v,C)=>v.label.localeCompare(C.label)),s=c.useMemo(()=>a.map(v=>o.find(C=>C.value===v)).filter(Boolean),[o,a]),l=v=>{r({...n,anchorEl:v.currentTarget})},u=()=>{r({...n,anchorEl:null})},f=()=>{r({...n,dropdownOpen:!0})},h=function(){r({...n,dropdownOpen:!1})},g=function(v){const C=Object.fromEntries(Object.entries(e.filter).filter(A=>A[1])),y=lo(C,[...v.value]),k=Object.keys(y).join(",")!==Object.keys(C).join(",");e.onActiveFiltersChange({activeFilters:v.value,filter:k===!0?y:e.filter}),u()},m=v=>{const C=new RegExp(v.keyword,"i");return{docs:o.filter(k=>k.label.match(C)),hasMore:!1}},w=()=>{i.forEach(v=>{e.filter[v.name]!==void 0&&v.onChange(void 0)})},b=(v,C)=>((v!==void 0||e.filter[C.name])&&C.onChange(v),u());return d.jsx("div",{"data-testid":W.DATA_VIEW_FILTERS,className:"filterRow",children:((x=e==null?void 0:e.filters)==null?void 0:x.length)>0&&d.jsxs(ho,{"data-testid":W.DATA_VIEW_FILTER_BAR,children:[d.jsx(Y,{label:t("mosaic:DataView.filters"),variant:"text",color:"black",size:"small",iconPosition:"left",mIcon:Zn,mIconColor:R.newColors.almostBlack[100],onClick:l}),d.jsx(va,{anchorEl:n.anchorEl,onClose:u,onEntered:f,onExited:h,children:d.jsx(ua,{comparison:"",selected:s,getOptions:m,isOpen:n.dropdownOpen,onApply:g})}),(i==null?void 0:i.length)>0&&d.jsx(d.Fragment,{children:i.map(v=>{const C=v.component;return d.jsx(C,{label:v.label,args:v.args||{},data:e.filter[v.name]||{},onChange:y=>b(y,v)},v.name)})}),(i==null?void 0:i.length)>0&&d.jsx(Y,{label:t("mosaic:DataView.clear_filters"),variant:"text",size:"small",color:"teal",onClick:w})]})})}const go=M.div` +`;function mo(e){var x;const{t}=Ne(),[n,r]=c.useState({anchorEl:null,dropdownOpen:!1}),a=c.useMemo(()=>e.activeFilters||[],[e.activeFilters]),i=a.map(v=>e.filters.find(C=>C.name===v)),o=e.filters.map(v=>({label:v.label,value:v.name})).sort((v,C)=>v.label.localeCompare(C.label)),s=c.useMemo(()=>a.map(v=>o.find(C=>C.value===v)).filter(Boolean),[o,a]),l=v=>{r({...n,anchorEl:v.currentTarget})},u=()=>{r({...n,anchorEl:null})},f=()=>{r({...n,dropdownOpen:!0})},h=function(){r({...n,dropdownOpen:!1})},g=function(v){const C=Object.fromEntries(Object.entries(e.filter).filter(A=>A[1])),y=lo(C,[...v.value]),k=Object.keys(y).join(",")!==Object.keys(C).join(",");e.onActiveFiltersChange({activeFilters:v.value,filter:k===!0?y:e.filter}),u()},m=v=>{const C=new RegExp(v.keyword,"i");return{docs:o.filter(k=>k.label.match(C)),hasMore:!1}},w=()=>{i.forEach(v=>{e.filter[v.name]!==void 0&&v.onChange(void 0)})},b=(v,C)=>((v!==void 0||e.filter[C.name])&&C.onChange(v),u());return d.jsx("div",{"data-testid":W.DATA_VIEW_FILTERS,className:"filterRow",children:((x=e==null?void 0:e.filters)==null?void 0:x.length)>0&&d.jsxs(ho,{"data-testid":W.DATA_VIEW_FILTER_BAR,children:[d.jsx(Y,{label:t("mosaic:DataView.filters"),variant:"text",color:"black",size:"small",iconPosition:"left",mIcon:Zn,mIconColor:R.newColors.almostBlack[100],onClick:l}),d.jsx(ga,{anchorEl:n.anchorEl,onClose:u,onEntered:f,onExited:h,children:d.jsx(ca,{comparison:"",selected:s,getOptions:m,isOpen:n.dropdownOpen,onApply:g})}),(i==null?void 0:i.length)>0&&d.jsx(d.Fragment,{children:i.map(v=>{const C=v.component;return d.jsx(C,{label:v.label,args:v.args||{},data:e.filter[v.name]||{},onChange:y=>b(y,v)},v.name)})}),(i==null?void 0:i.length)>0&&d.jsx(Y,{label:t("mosaic:DataView.clear_filters"),variant:"text",size:"small",color:"teal",onClick:w})]})})}const go=M.div` border-bottom: 2px solid ${R.newColors.grey2[100]}; padding: 24px 24px 16px 24px; width: 100%; @@ -46,7 +46,7 @@ import{r as c,g as qn,a as G}from"./index-BP8_t0zE.js";import{m as Kr,a as Qr,l font-size: 14px; padding: 3px 0; letter-spacing: 1px; -`;function xo({currentView:e,onViewSave:t,onViewSaveAs:n,onViewList:r}){const{t:a}=Ne(),i=c.useMemo(()=>{const o=[];return t&&o.push({label:a("mosaic:DataView.overwrite_current_view"),onClick:t}),n&&o.push({label:a("mosaic:DataView.save_as_new_view"),onClick:n}),o},[t,n,a]);return d.jsx("div",{"data-testid":W.DATA_VIEW_VIEW_CONTROL,children:d.jsx("div",{className:"right",children:d.jsxs(rt,{children:[r?d.jsx(bo,{mIcon:Ft,iconPosition:"right",label:e?`${a("mosaic:DataView.view")}: ${e.label}`:a("mosaic:DataView.no_view_selected"),variant:"contained",size:"small",color:"gray",onClick:r,className:!e&&"no-view-selected"}):e&&d.jsx(wo,{children:`${a("mosaic:DataView.view")}: ${e.label}`}),d.jsx(Y,{mIcon:Ft,iconPosition:"right",label:a("mosaic:DataView.save_view"),variant:"text",size:"small",color:"teal",menuItems:i})]})})})}function Co({activeFilters:e,backLabel:t,buttons:n,currentView:r,disabled:a,filter:i,filters:o,onActiveFiltersChange:s,onBack:l,onViewSave:u,onViewSaveAs:f,onViewList:h,title:g}){const m=c.useMemo(()=>n===void 0?[]:n.map(b=>{const{name:x,...v}=b;return v.attrs={"data-mosaic-id":`button_${x}`},v.disabled=v.disabled===void 0?a:v.disabled,v}),[n,a]),w=r||u||f||h;return d.jsxs(go,{"data-testid":W.DATA_VIEW_TITLE_BAR,children:[d.jsxs(vo,{children:[d.jsxs("div",{className:"left",children:[g&&d.jsx(ha,{title:g,onBack:l,backLabel:t}),w&&d.jsx(xo,{currentView:r,onViewSave:u,onViewSaveAs:f,onViewList:h})]}),m.length>0&&d.jsx(rt,{buttons:m})]}),o&&d.jsx(mo,{filter:i,filters:o,activeFilters:e,onActiveFiltersChange:s})]})}var Jt={},yo=De;Object.defineProperty(Jt,"__esModule",{value:!0});var er=Jt.default=void 0,Do=yo(ke()),ko=ye();er=Jt.default=(0,Do.default)((0,ko.jsx)("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z"}),"GridOn");var Zt={},po=De;Object.defineProperty(Zt,"__esModule",{value:!0});var tr=Zt.default=void 0,So=po(ke()),Ao=ye();tr=Zt.default=(0,So.default)((0,Ao.jsx)("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z"}),"FormatListBulleted");function To(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(a=>a(r))},t)}const St=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Le(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function en(e){return"nodeType"in e}function K(e){var t,n;return e?Le(e)?e:en(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function tn(e){const{Document:t}=K(e);return e instanceof t}function at(e){return Le(e)?!1:e instanceof K(e).HTMLElement}function nr(e){return e instanceof K(e).SVGElement}function We(e){return e?Le(e)?e.document:en(e)?tn(e)?e:at(e)||nr(e)?e.ownerDocument:document:document:document}const ie=St?c.useLayoutEffect:c.useEffect;function nn(e){const t=c.useRef(e);return ie(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),a=0;a{e.current=setInterval(r,a)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function et(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return ie(()=>{n.current!==e&&(n.current=e)},t),n}function it(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function wt(e){const t=nn(e),n=c.useRef(null),r=c.useCallback(a=>{a!==n.current&&(t==null||t(a,n.current)),n.current=a},[]);return[n,r]}function Yt(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let Nt={};function ot(e,t){return c.useMemo(()=>{if(t)return t;const n=Nt[e]==null?0:Nt[e]+1;return Nt[e]=n,e+"-"+n},[e,t])}function rr(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a{const s=Object.entries(o);for(const[l,u]of s){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const je=rr(1),tt=rr(-1);function Eo(e){return"clientX"in e&&"clientY"in e}function rn(e){if(!e)return!1;const{KeyboardEvent:t}=K(e.target);return t&&e instanceof t}function Oo(e){if(!e)return!1;const{TouchEvent:t}=K(e.target);return t&&e instanceof t}function Ht(e){if(Oo(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Eo(e)?{x:e.clientX,y:e.clientY}:null}const $e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[$e.Translate.toString(e),$e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Pn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Mo(e){return e.matches(Pn)?e:e.querySelector(Pn)}const _o={display:"none"};function Po(e){let{id:t,value:n}=e;return G.createElement("div",{id:t,style:_o},n)}function Io(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const a={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return G.createElement("div",{id:t,style:a,role:"status","aria-live":r,"aria-atomic":!0},n)}function jo(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const ar=c.createContext(null);function $o(e){const t=c.useContext(ar);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function No(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:a,event:i}=r;e.forEach(o=>{var s;return(s=o[a])==null?void 0:s.call(o,i)})},[e]),t]}const Lo={draggable:` +`;function xo({currentView:e,onViewSave:t,onViewSaveAs:n,onViewList:r}){const{t:a}=Ne(),i=c.useMemo(()=>{const o=[];return t&&o.push({label:a("mosaic:DataView.overwrite_current_view"),onClick:t}),n&&o.push({label:a("mosaic:DataView.save_as_new_view"),onClick:n}),o},[t,n,a]);return d.jsx("div",{"data-testid":W.DATA_VIEW_VIEW_CONTROL,children:d.jsx("div",{className:"right",children:d.jsxs(rt,{children:[r?d.jsx(bo,{mIcon:Ft,iconPosition:"right",label:e?`${a("mosaic:DataView.view")}: ${e.label}`:a("mosaic:DataView.no_view_selected"),variant:"contained",size:"small",color:"gray",onClick:r,className:!e&&"no-view-selected"}):e&&d.jsx(wo,{children:`${a("mosaic:DataView.view")}: ${e.label}`}),d.jsx(Y,{mIcon:Ft,iconPosition:"right",label:a("mosaic:DataView.save_view"),variant:"text",size:"small",color:"teal",menuItems:i})]})})})}function Co({activeFilters:e,backLabel:t,buttons:n,currentView:r,disabled:a,filter:i,filters:o,onActiveFiltersChange:s,onBack:l,onViewSave:u,onViewSaveAs:f,onViewList:h,title:g}){const m=c.useMemo(()=>n===void 0?[]:n.map(b=>{const{name:x,...v}=b;return v.attrs={"data-mosaic-id":`button_${x}`},v.disabled=v.disabled===void 0?a:v.disabled,v}),[n,a]),w=r||u||f||h;return d.jsxs(go,{"data-testid":W.DATA_VIEW_TITLE_BAR,children:[d.jsxs(vo,{children:[d.jsxs("div",{className:"left",children:[g&&d.jsx(fa,{title:g,onBack:l,backLabel:t}),w&&d.jsx(xo,{currentView:r,onViewSave:u,onViewSaveAs:f,onViewList:h})]}),m.length>0&&d.jsx(rt,{buttons:m})]}),o&&d.jsx(mo,{filter:i,filters:o,activeFilters:e,onActiveFiltersChange:s})]})}var Jt={},yo=De;Object.defineProperty(Jt,"__esModule",{value:!0});var er=Jt.default=void 0,Do=yo(ke()),ko=ye();er=Jt.default=(0,Do.default)((0,ko.jsx)("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z"}),"GridOn");var Zt={},po=De;Object.defineProperty(Zt,"__esModule",{value:!0});var tr=Zt.default=void 0,So=po(ke()),Ao=ye();tr=Zt.default=(0,So.default)((0,Ao.jsx)("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z"}),"FormatListBulleted");function To(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(a=>a(r))},t)}const St=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Le(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function en(e){return"nodeType"in e}function K(e){var t,n;return e?Le(e)?e:en(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function tn(e){const{Document:t}=K(e);return e instanceof t}function at(e){return Le(e)?!1:e instanceof K(e).HTMLElement}function nr(e){return e instanceof K(e).SVGElement}function We(e){return e?Le(e)?e.document:en(e)?tn(e)?e:at(e)||nr(e)?e.ownerDocument:document:document:document}const ie=St?c.useLayoutEffect:c.useEffect;function nn(e){const t=c.useRef(e);return ie(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),a=0;a{e.current=setInterval(r,a)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function et(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return ie(()=>{n.current!==e&&(n.current=e)},t),n}function it(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function wt(e){const t=nn(e),n=c.useRef(null),r=c.useCallback(a=>{a!==n.current&&(t==null||t(a,n.current)),n.current=a},[]);return[n,r]}function Yt(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let Nt={};function ot(e,t){return c.useMemo(()=>{if(t)return t;const n=Nt[e]==null?0:Nt[e]+1;return Nt[e]=n,e+"-"+n},[e,t])}function rr(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a{const s=Object.entries(o);for(const[l,u]of s){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const je=rr(1),tt=rr(-1);function Eo(e){return"clientX"in e&&"clientY"in e}function rn(e){if(!e)return!1;const{KeyboardEvent:t}=K(e.target);return t&&e instanceof t}function Oo(e){if(!e)return!1;const{TouchEvent:t}=K(e.target);return t&&e instanceof t}function Ht(e){if(Oo(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Eo(e)?{x:e.clientX,y:e.clientY}:null}const $e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[$e.Translate.toString(e),$e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Pn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Mo(e){return e.matches(Pn)?e:e.querySelector(Pn)}const _o={display:"none"};function Po(e){let{id:t,value:n}=e;return G.createElement("div",{id:t,style:_o},n)}function Io(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const a={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return G.createElement("div",{id:t,style:a,role:"status","aria-live":r,"aria-atomic":!0},n)}function jo(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const ar=c.createContext(null);function $o(e){const t=c.useContext(ar);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function No(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:a,event:i}=r;e.forEach(o=>{var s;return(s=o[a])==null?void 0:s.call(o,i)})},[e]),t]}const Lo={draggable:` To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. @@ -187,7 +187,7 @@ import{r as c,g as qn,a as G}from"./index-BP8_t0zE.js";import{m as Kr,a as Qr,l ${({$hidden:e})=>e&&` visibility: hidden; `} -`;function Tl(e){const t=c.useMemo(()=>({row:e.originalRowData}),[e.originalRowData]),n=c.useMemo(()=>e.primaryActions||[],[e.primaryActions]),r=Ut(n,t,"show"),a=c.useMemo(()=>e.additionalActions||[],[e.additionalActions]),i=Ut(a,t,"show"),o=c.useMemo(()=>r.map(u=>{const{name:f,show:h,onClick:g,...m}=u,w=()=>{g({data:e.originalRowData})},b=[m.disabled,e.disabled,e.actionsHidden].some(x=>x);return c.createElement(Y,{...m,disabled:b,key:`primary_${f}`,attrs:{"data-mosaic-id":`action_primary_${f}`},onClick:w})}),[r,e.originalRowData,e.disabled,e.actionsHidden]),s=c.useMemo(()=>{if(!i.length)return[];const u=[e.disabled,e.actionsHidden].some(f=>f);return[d.jsx(Y,{color:"black",variant:"icon",mIcon:e.activeDisplay&&Ca,attrs:{"data-mosaic-id":"additional_actions_dropdown"},tooltip:"More actions",disabled:u,menuItems:i.map(f=>{const{name:h,show:g,onClick:m,...w}=f;return{...w,attrs:{"data-mosaic-id":`action_additional_${h}`},onClick:()=>{m({data:e.originalRowData})}}})},"additional")]},[i,e.originalRowData,e.disabled,e.actionsHidden]),l=c.useMemo(()=>[...o,...s],[o,s]);return d.jsx(Al,{$hidden:e.actionsHidden,children:l})}const Nr=c.memo(Tl),Rl=M.tr` +`;function Tl(e){const t=c.useMemo(()=>({row:e.originalRowData}),[e.originalRowData]),n=c.useMemo(()=>e.primaryActions||[],[e.primaryActions]),r=Ut(n,t,"show"),a=c.useMemo(()=>e.additionalActions||[],[e.additionalActions]),i=Ut(a,t,"show"),o=c.useMemo(()=>r.map(u=>{const{name:f,show:h,onClick:g,...m}=u,w=()=>{g({data:e.originalRowData})},b=[m.disabled,e.disabled,e.actionsHidden].some(x=>x);return c.createElement(Y,{...m,disabled:b,key:`primary_${f}`,attrs:{"data-mosaic-id":`action_primary_${f}`},onClick:w})}),[r,e.originalRowData,e.disabled,e.actionsHidden]),s=c.useMemo(()=>{if(!i.length)return[];const u=[e.disabled,e.actionsHidden].some(f=>f);return[d.jsx(Y,{color:"black",variant:"icon",mIcon:e.activeDisplay&&xa,attrs:{"data-mosaic-id":"additional_actions_dropdown"},tooltip:"More actions",disabled:u,menuItems:i.map(f=>{const{name:h,show:g,onClick:m,...w}=f;return{...w,attrs:{"data-mosaic-id":`action_additional_${h}`},onClick:()=>{m({data:e.originalRowData})}}})},"additional")]},[i,e.originalRowData,e.disabled,e.actionsHidden]),l=c.useMemo(()=>[...o,...s],[o,s]);return d.jsx(Al,{$hidden:e.actionsHidden,children:l})}const Nr=c.memo(Tl),Rl=M.tr` ${({$isDragOverlay:e})=>e&&` background: rgba(255,255,255,.9); box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); @@ -200,7 +200,7 @@ import{r as c,g as qn,a as G}from"./index-BP8_t0zE.js";import{m as Kr,a as Qr,l &.checked { background-color: ${R.newColors.grey1[100]}; } -`,El=M(ba)` +`,El=M(va)` &&{ cursor: grab; } @@ -372,7 +372,7 @@ import{r as c,g as qn,a as G}from"./index-BP8_t0zE.js";import{m as Kr,a as Qr,l flex-direction: column; height: 100%; font-size: 14px; -`,ql=M(ya)` +`,ql=M(Ca)` z-index: 1100; ${({$anchorStyle:e,$display:t})=>e&&` @@ -447,7 +447,7 @@ import{r as c,g as qn,a as G}from"./index-BP8_t0zE.js";import{m as Kr,a as Qr,l .MuiSvgIcon-root { color: ${R.newColors.grey3[100]}; } -`;function Jl({name:e,allColumns:t}){const n=t.find(f=>f.name===e);if(!n)throw new Error(`Column "${e}" not found in column list: ${t.map(({name:f})=>f).join(", ")}`);const{attributes:r,listeners:a,setNodeRef:i,transform:o,transition:s,isDragging:l}=Or({id:n.name}),u={transform:$e.Translate.toString(o),transition:s};return d.jsxs(Ql,{...r,...a,ref:i,style:u,$isDragging:l,children:[d.jsx(un,{}),d.jsx("span",{children:n.label})]})}function Zl({activeColumns:e,allColumns:t,onReorder:n}){const r=ir(Ct(Rt),Ct(Tt,{coordinateGetter:Mr}));function a(i){const{active:o,over:s}=i;o.id!==s.id&&n(Mt(e,e.indexOf(o.id),e.indexOf(s.id)))}return d.jsx("div",{children:d.jsx(Dr,{sensors:r,collisionDetection:cr,onDragEnd:a,autoScroll:{layoutShiftCompensation:!1},modifiers:[kr,Gs],children:d.jsx(Rr,{items:e,strategy:Sr,children:e.map(i=>d.jsx(Jl,{name:i,allColumns:t},i))})})})}function ec(e){const[t,n]=c.useState({activeColumns:e.columns.map(l=>l.name),checkedOptions:e.columns.map(l=>({label:l.label,value:l.name}))}),{t:r}=Ne(),a=function(){e.onClose(),e.onChange(t.activeColumns)},i=function(l){n({...t,activeColumns:l.map(u=>u.value),checkedOptions:l})},o=e.allColumns.map(l=>({label:l.label,value:l.name})).sort((l,u)=>l.label.localeCompare(u.label)),s=[{label:r("mosaic:common.cancel"),color:"gray",variant:"outlined",onClick:e.onClose},{label:r("mosaic:common.apply"),onClick:a,color:"yellow",variant:"contained"}];return d.jsxs("div",{children:[d.jsx(pa,{title:r("mosaic:DataView.table_settings"),buttons:s,onBack:e.onClose,backLabel:r("mosaic:DataView.cancel_table_settings")}),d.jsxs(Kl,{children:[d.jsxs("div",{className:"left",children:[d.jsx(Yn,{children:r("mosaic:DataView.columns")}),d.jsx(la,{options:o,checked:t.checkedOptions,onChange:i})]}),d.jsxs("div",{className:"right",children:[d.jsx(Yn,{children:r("mosaic:DataView.column_order")}),d.jsx(Zl,{activeColumns:t.activeColumns,onReorder:l=>n({...t,activeColumns:l}),allColumns:e.allColumns})]})]})]})}function tc(e){return d.jsx(Gl,{open:e.open,onClose:e.onClose,children:d.jsx(ec,{columns:e.columns,allColumns:e.allColumns,onChange:e.onChange,onClose:e.onClose})})}function nc(e){const[t,n]=c.useState({open:!1}),{t:r}=Ne(),a=function(){n({...t,open:!t.open})};return d.jsxs("div",{children:[d.jsx(Y,{color:"black",label:r("mosaic:DataView.columns"),variant:"text",mIcon:Da,onClick:a,size:"small",iconPosition:"left",tooltip:"Update columns and their order"}),e.onChange!==void 0&&d.jsx(tc,{open:t.open,columns:e.columns,allColumns:e.allColumns,onChange:e.onChange,onClose:a})]})}const rc=M.span` +`;function Jl({name:e,allColumns:t}){const n=t.find(f=>f.name===e);if(!n)throw new Error(`Column "${e}" not found in column list: ${t.map(({name:f})=>f).join(", ")}`);const{attributes:r,listeners:a,setNodeRef:i,transform:o,transition:s,isDragging:l}=Or({id:n.name}),u={transform:$e.Translate.toString(o),transition:s};return d.jsxs(Ql,{...r,...a,ref:i,style:u,$isDragging:l,children:[d.jsx(un,{}),d.jsx("span",{children:n.label})]})}function Zl({activeColumns:e,allColumns:t,onReorder:n}){const r=ir(Ct(Rt),Ct(Tt,{coordinateGetter:Mr}));function a(i){const{active:o,over:s}=i;o.id!==s.id&&n(Mt(e,e.indexOf(o.id),e.indexOf(s.id)))}return d.jsx("div",{children:d.jsx(Dr,{sensors:r,collisionDetection:cr,onDragEnd:a,autoScroll:{layoutShiftCompensation:!1},modifiers:[kr,Gs],children:d.jsx(Rr,{items:e,strategy:Sr,children:e.map(i=>d.jsx(Jl,{name:i,allColumns:t},i))})})})}function ec(e){const[t,n]=c.useState({activeColumns:e.columns.map(l=>l.name),checkedOptions:e.columns.map(l=>({label:l.label,value:l.name}))}),{t:r}=Ne(),a=function(){e.onClose(),e.onChange(t.activeColumns)},i=function(l){n({...t,activeColumns:l.map(u=>u.value),checkedOptions:l})},o=e.allColumns.map(l=>({label:l.label,value:l.name})).sort((l,u)=>l.label.localeCompare(u.label)),s=[{label:r("mosaic:common.cancel"),color:"gray",variant:"outlined",onClick:e.onClose},{label:r("mosaic:common.apply"),onClick:a,color:"yellow",variant:"contained"}];return d.jsxs("div",{children:[d.jsx(pa,{title:r("mosaic:DataView.table_settings"),buttons:s,onBack:e.onClose,backLabel:r("mosaic:DataView.cancel_table_settings")}),d.jsxs(Kl,{children:[d.jsxs("div",{className:"left",children:[d.jsx(Yn,{children:r("mosaic:DataView.columns")}),d.jsx(ka,{options:o,checked:t.checkedOptions,onChange:i})]}),d.jsxs("div",{className:"right",children:[d.jsx(Yn,{children:r("mosaic:DataView.column_order")}),d.jsx(Zl,{activeColumns:t.activeColumns,onReorder:l=>n({...t,activeColumns:l}),allColumns:e.allColumns})]})]})]})}function tc(e){return d.jsx(Gl,{open:e.open,onClose:e.onClose,children:d.jsx(ec,{columns:e.columns,allColumns:e.allColumns,onChange:e.onChange,onClose:e.onClose})})}function nc(e){const[t,n]=c.useState({open:!1}),{t:r}=Ne(),a=function(){n({...t,open:!t.open})};return d.jsxs("div",{children:[d.jsx(Y,{color:"black",label:r("mosaic:DataView.columns"),variant:"text",mIcon:ya,onClick:a,size:"small",iconPosition:"left",tooltip:"Update columns and their order"}),e.onChange!==void 0&&d.jsx(tc,{open:t.open,columns:e.columns,allColumns:e.allColumns,onChange:e.onChange,onClose:a})]})}const rc=M.span` & .normalButton > button { color: ${R.newColors.grey3[100]}; } @@ -476,7 +476,7 @@ import{r as c,g as qn,a as G}from"./index-BP8_t0zE.js";import{m as Kr,a as Qr,l & > .goButton { margin-left: 8px; } -`;function fc(e){const t=c.useContext(wa),[n,r]=c.useState({currentPage:e.currentPage,invalid:!1}),a=function(s){const l=Number(s.currentTarget.value),u=!Number.isInteger(l)||l<=0||l>e.totalPages;r({...n,invalid:u,currentPage:s.currentTarget.value})},i=()=>{n.invalid!==!0&&(t.onClose(),e.onSkipChange({skip:(n.currentPage-1)*e.limit}))},o=s=>{if(s.key==="Enter")return i()};return d.jsxs(dc,{className:` +`;function fc(e){const t=c.useContext(ba),[n,r]=c.useState({currentPage:e.currentPage,invalid:!1}),a=function(s){const l=Number(s.currentTarget.value),u=!Number.isInteger(l)||l<=0||l>e.totalPages;r({...n,invalid:u,currentPage:s.currentTarget.value})},i=()=>{n.invalid!==!0&&(t.onClose(),e.onSkipChange({skip:(n.currentPage-1)*e.limit}))},o=s=>{if(s.key==="Enter")return i()};return d.jsxs(dc,{className:` ${n.invalid?"invalid":""} `,children:[d.jsx("span",{children:"Page"}),d.jsx("input",{type:"text",onKeyDown:o,onChange:a,autoFocus:!0}),d.jsxs("span",{children:["of"," ",e.totalPages]}),d.jsx(Y,{className:"goButton",color:"blue",variant:"contained",size:"small",onClick:i,label:"Go"})]})}const hc=c.memo(fc),mc=M.span` display: inline-flex; @@ -496,7 +496,7 @@ import{r as c,g as qn,a as G}from"./index-BP8_t0zE.js";import{m as Kr,a as Qr,l } `,gc=M.span` font-weight: 400; -`,vc={"aria-label":"Previous Page"},bc={"aria-label":"Next Page"};function wc(e){const{t}=Ne(),n=Math.ceil(e.count/e.limit),r=(e.skip+e.limit)/e.limit,a=e.skip+1,i=Math.min(e.skip+e.limit,e.count),o=u=>()=>{e.onSkipChange({skip:u})},s=r===1,l=r===n;return n===0?null:d.jsxs(mc,{"data-testid":W.DATA_VIEW_PAGER,children:[d.jsx(Y,{color:"black",variant:"text",size:"small",tooltip:t("mosaic:DataView.jump_to_page"),label:d.jsxs("span",{children:[a,"-",i," ",d.jsx(gc,{children:"of"})," ",e.count]}),popover:d.jsx(hc,{currentPage:r,totalPages:n,limit:e.limit,onSkipChange:e.onSkipChange})}),d.jsx(Hn,{color:"gray",variant:"icon",size:"small",mIcon:ma,onClick:o(e.skip-e.limit),disabled:s,muiAttrs:vc}),d.jsx(Hn,{color:"gray",variant:"icon",size:"small",mIcon:ka,onClick:o(e.skip+e.limit),disabled:l,muiAttrs:bc})]})}const xc=c.memo(wc),Cc=M.div` +`,vc={"aria-label":"Previous Page"},bc={"aria-label":"Next Page"};function wc(e){const{t}=Ne(),n=Math.ceil(e.count/e.limit),r=(e.skip+e.limit)/e.limit,a=e.skip+1,i=Math.min(e.skip+e.limit,e.count),o=u=>()=>{e.onSkipChange({skip:u})},s=r===1,l=r===n;return n===0?null:d.jsxs(mc,{"data-testid":W.DATA_VIEW_PAGER,children:[d.jsx(Y,{color:"black",variant:"text",size:"small",tooltip:t("mosaic:DataView.jump_to_page"),label:d.jsxs("span",{children:[a,"-",i," ",d.jsx(gc,{children:"of"})," ",e.count]}),popover:d.jsx(hc,{currentPage:r,totalPages:n,limit:e.limit,onSkipChange:e.onSkipChange})}),d.jsx(Hn,{color:"gray",variant:"icon",size:"small",mIcon:ha,onClick:o(e.skip-e.limit),disabled:s,muiAttrs:vc}),d.jsx(Hn,{color:"gray",variant:"icon",size:"small",mIcon:Da,onClick:o(e.skip+e.limit),disabled:l,muiAttrs:bc})]})}const xc=c.memo(wc),Cc=M.div` align-items: center; display: flex; justify-content: space-between; @@ -558,7 +558,7 @@ import{r as c,g as qn,a as G}from"./index-BP8_t0zE.js";import{m as Kr,a as Qr,l ${t.sticky?"sticky":""} `,ref:n,"data-testid":W.DATA_VIEW,...t.attrs||{},children:[k&&d.jsx("div",{className:"headerRow title",children:d.jsx(Co,{title:t.title,onBack:t.onBack,backLabel:t.backLabel,buttons:t.buttons,filter:t.filter,filters:t.filters,activeFilters:t.activeFilters,onActiveFiltersChange:t.onActiveFiltersChange,disabled:t.disabled,currentView:t.currentView,onViewSave:t.onViewSave,onViewSaveAs:t.onViewSaveAs,onViewList:t.onViewList})}),A&&d.jsx("div",{className:"headerActions",children:d.jsx(_c,{activeColumnObjs:y,columns:t.columns,bulkActions:u,checked:t.checked,display:a,displayControlEnabled:o,displayOptionsFull:w,limit:t.limit,limitOptions:t.limitOptions,onLimitChange:t.onLimitChange,onDisplayChange:t.onDisplayChange,onSkipChange:t.onSkipChange,skip:t.skip,count:t.count,allColumns:t.columns,onColumnsChange:t.onColumnsChange,onCheckAllClick:f?h:void 0,onSortChange:t.onSortChange,sort:t.sort,data:t.data,checkedAllPages:t.checkedAllPages,allChecked:S,anyChecked:p,disabled:t.disabled})}),d.jsx("div",{ref:v,className:` viewContainer - `,children:d.jsx(x,{checked:t.checked,checkedAllPages:t.checkedAllPages,columns:t.columns,bulkActions:u,sort:t.sort,data:t.data,disabled:t.disabled,rowActions:L,activeColumns:t.activeColumns,gridColumnsMap:t.gridColumnsMap,limit:t.limit,count:t.count,rowCount:t.data.length,activeColumnObjs:y,onSortChange:t.onSortChange,onColumnsChange:t.onColumnsChange,onCheckAllClick:f?h:void 0,onCheckboxClick:f?g:void 0,onCheckAllPagesClick:m,onReorder:t.onReorder,showBulkAll:T,allChecked:S,anyChecked:p,actionsHidden:$||void 0})}),!t.loading&&!t.data.length&&(typeof r=="string"?d.jsx("div",{className:"noResults",children:d.jsx("p",{children:r})}):r)]})});fa({prefix:"DataView",bundle:da});const Ic=M.button` + `,children:d.jsx(x,{checked:t.checked,checkedAllPages:t.checkedAllPages,columns:t.columns,bulkActions:u,sort:t.sort,data:t.data,disabled:t.disabled,rowActions:L,activeColumns:t.activeColumns,gridColumnsMap:t.gridColumnsMap,limit:t.limit,count:t.count,rowCount:t.data.length,activeColumnObjs:y,onSortChange:t.onSortChange,onColumnsChange:t.onColumnsChange,onCheckAllClick:f?h:void 0,onCheckboxClick:f?g:void 0,onCheckAllPagesClick:m,onReorder:t.onReorder,showBulkAll:T,allChecked:S,anyChecked:p,actionsHidden:$||void 0})}),!t.loading&&!t.data.length&&(typeof r=="string"?d.jsx("div",{className:"noResults",children:d.jsx("p",{children:r})}):r)]})});da({prefix:"DataView",bundle:ua});const Ic=M.button` background: ${R.newColors.grey1[100]}; border: ${R.borders.simplyGrey}; cursor: pointer; @@ -571,5 +571,5 @@ import{r as c,g as qn,a as G}from"./index-BP8_t0zE.js";import{m as Kr,a as Qr,l height: 31px; pointer-events: ${({$disabled:e})=>e?"none":"auto"}; width: 80px; -`,su=M(xa)` +`,su=M(wa)` `,lu=e=>{const{disabled:t,color:n,onClick:r,displayColorPicker:a,id:i}=e;return d.jsx(Ic,{$disabled:t,$displayColorPicker:a,onClick:r,type:"button",id:i,children:d.jsx(jc,{"data-testid":"colordiv-test",$disabled:t,$color:n})})};export{zt as A,tr as B,lu as C,Gl as D,$l as E,Ut as F,su as P,Li as _,ou as a,Oa as b,Wi as c,Ae as d,Pa as e,iu as f,qa as g,pt as h,Qn as i,vt as j,za as k,Wa as l,au as m,Ha as n,Qa as o,En as p,Ka as q,q as r,bt as s,ce as t,Ia as u,Oi as v,I as w,_a as x,ro as y,Bi as z}; diff --git a/sb8/qa/assets/ConditionalFields.stories-CIK4w_Br.js b/sb8/qa/assets/ConditionalFields.stories-CIK4w_Br.js deleted file mode 100644 index f3d3763152..0000000000 --- a/sb8/qa/assets/ConditionalFields.stories-CIK4w_Br.js +++ /dev/null @@ -1,41 +0,0 @@ -import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as i}from"./index-BP8_t0zE.js";import{u as c,F as y}from"./Form-CV-BOiW8.js";import{r as h}from"./renderButtons-BmHfsf_z.js";import{O as f}from"./utils-BR2PSRFh.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./index-BxmsGmlx.js";import"./useMosaicTranslation-CZCb37QS.js";import"./createSvgIcon-Pzp5yWPs.js";import"./useId-DLncWxdO.js";import"./ButtonRow-CP4CrsnB.js";import"./Chip-CRqL1Gcl.js";import"./sizes-C6oSOElx.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./index-BU7KlZI9.js";import"./debounce-DO3dP4oK.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./ColorSelected-DyTCIv8L.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";const bt={title:"Components/Form"},t=({showState:d})=>{const o=c(),{state:l,handleSubmit:a}=o,n="SHOW";i.useEffect(()=>(document.body.style.margin="0px",()=>{document.body.style.margin=f}),[]);const u=i.useMemo(()=>[{name:"dependency",label:"Dependency",type:"text",instructionText:`Type "${n}" to show another field`,required:!0},{name:"dependent",label:"Dependent",type:"text",show:({data:r})=>(r==null?void 0:r.dependency)===n,required:!0}],[]);return e.jsxs(e.Fragment,{children:[d&&e.jsx("pre",{children:JSON.stringify(l,null," ")}),e.jsx("div",{style:{height:"100vh"},children:e.jsx(y,{...o,buttons:h(a),title:"Runtime behaviors",fields:u})})]})};t.args={showState:!1};t.argTypes={showState:{name:"Show state"}};var m,p,s;t.parameters={...t.parameters,docs:{...(m=t.parameters)==null?void 0:m.docs,source:{originalSource:`({ - showState -}: typeof ConditionalFields.args): ReactElement => { - const controller = useForm(); - const { - state, - handleSubmit - } = controller; - const KEY_PHRASE = "SHOW"; - useEffect(() => { - document.body.style.margin = "0px"; - return () => { - document.body.style.margin = ORIGINAL_BODY_MARGIN; - }; - }, []); - const fields = useMemo((): FieldDef[] => [{ - name: "dependency", - label: "Dependency", - type: "text", - instructionText: \`Type "\${KEY_PHRASE}" to show another field\`, - required: true - }, { - name: "dependent", - label: "Dependent", - type: "text", - show: ({ - data - }) => { - return data?.dependency === KEY_PHRASE; - }, - required: true - }], []); - return <> - {showState &&
{JSON.stringify(state, null, "  ")}
} -
-
-
- ; -}`,...(s=(p=t.parameters)==null?void 0:p.docs)==null?void 0:s.source}}};const Et=["ConditionalFields"];export{t as ConditionalFields,Et as __namedExportsOrder,bt as default}; diff --git a/sb8/qa/assets/ConditionalFields.stories-CuBZev29.js b/sb8/qa/assets/ConditionalFields.stories-CuBZev29.js new file mode 100644 index 0000000000..e498351c4e --- /dev/null +++ b/sb8/qa/assets/ConditionalFields.stories-CuBZev29.js @@ -0,0 +1,41 @@ +import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as i}from"./index-BP8_t0zE.js";import{u as c,F as y}from"./Form-DI4diVc8.js";import{r as h}from"./renderButtons-BmHfsf_z.js";import{O as f}from"./utils-BR2PSRFh.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./index-BxmsGmlx.js";import"./formControlState-DyMXFR7f.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./ColorSelected-DERcqfqY.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";const St={title:"Components/Form"},t=({showState:d})=>{const o=c(),{state:l,handleSubmit:a}=o,n="SHOW";i.useEffect(()=>(document.body.style.margin="0px",()=>{document.body.style.margin=f}),[]);const u=i.useMemo(()=>[{name:"dependency",label:"Dependency",type:"text",instructionText:`Type "${n}" to show another field`,required:!0},{name:"dependent",label:"Dependent",type:"text",show:({data:r})=>(r==null?void 0:r.dependency)===n,required:!0}],[]);return e.jsxs(e.Fragment,{children:[d&&e.jsx("pre",{children:JSON.stringify(l,null," ")}),e.jsx("div",{style:{height:"100vh"},children:e.jsx(y,{...o,buttons:h(a),title:"Runtime behaviors",fields:u})})]})};t.args={showState:!1};t.argTypes={showState:{name:"Show state"}};var m,p,s;t.parameters={...t.parameters,docs:{...(m=t.parameters)==null?void 0:m.docs,source:{originalSource:`({ + showState +}: typeof ConditionalFields.args): ReactElement => { + const controller = useForm(); + const { + state, + handleSubmit + } = controller; + const KEY_PHRASE = "SHOW"; + useEffect(() => { + document.body.style.margin = "0px"; + return () => { + document.body.style.margin = ORIGINAL_BODY_MARGIN; + }; + }, []); + const fields = useMemo((): FieldDef[] => [{ + name: "dependency", + label: "Dependency", + type: "text", + instructionText: \`Type "\${KEY_PHRASE}" to show another field\`, + required: true + }, { + name: "dependent", + label: "Dependent", + type: "text", + show: ({ + data + }) => { + return data?.dependency === KEY_PHRASE; + }, + required: true + }], []); + return <> + {showState &&
{JSON.stringify(state, null, "  ")}
} +
+ +
+ ; +}`,...(s=(p=t.parameters)==null?void 0:p.docs)==null?void 0:s.source}}};const bt=["ConditionalFields"];export{t as ConditionalFields,bt as __namedExportsOrder,St as default}; diff --git a/sb8/qa/assets/ConditionalSections.stories-BzxNBa44.js b/sb8/qa/assets/ConditionalSections.stories-BzxNBa44.js new file mode 100644 index 0000000000..0dd7952177 --- /dev/null +++ b/sb8/qa/assets/ConditionalSections.stories-BzxNBa44.js @@ -0,0 +1,63 @@ +import{j as n}from"./jsx-runtime-nGUw9YhZ.js";import{r}from"./index-BP8_t0zE.js";import{u as h,F as y}from"./Form-DI4diVc8.js";import{r as f}from"./renderButtons-BmHfsf_z.js";import{O as S}from"./utils-BR2PSRFh.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./index-BxmsGmlx.js";import"./formControlState-DyMXFR7f.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./ColorSelected-DERcqfqY.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";const _e={title:"Components/Form"},t=({showState:c})=>{const i=h(),{state:d,handleSubmit:l}=i,o="SHOW";r.useEffect(()=>(document.body.style.margin="0px",()=>{document.body.style.margin=S}),[]);const a=r.useMemo(()=>[{title:"Section 1",description:"Description for section 1",fields:[[["dependency"]],[["section_show"]]]},{title:"Section 2",description:"Description for section 2",fields:[[["dependent"]]],show:({data:e})=>(e==null?void 0:e.dependency)===o&&(e==null?void 0:e.section_show)}],[]),u=r.useMemo(()=>[{name:"dependency",label:"Dependency",type:"text",instructionText:`Type "${o}" to show another field`,required:!0},{name:"section_show",label:"Show another section",type:"toggle",show:({data:e})=>(e==null?void 0:e.dependency)===o},{name:"dependent",label:"Dependent",type:"text",required:!0}],[]);return n.jsxs(n.Fragment,{children:[c&&n.jsx("pre",{children:JSON.stringify(d,null," ")}),n.jsx("div",{style:{height:"100vh"},children:n.jsx(y,{...i,buttons:f(l),title:"Runtime behaviors",fields:u,sections:a})})]})};t.args={showState:!1};t.argTypes={showState:{name:"Show state"}};var s,p,m;t.parameters={...t.parameters,docs:{...(s=t.parameters)==null?void 0:s.docs,source:{originalSource:`({ + showState +}: typeof ConditionalSections.args): ReactElement => { + const controller = useForm(); + const { + state, + handleSubmit + } = controller; + const KEY_PHRASE = "SHOW"; + useEffect(() => { + document.body.style.margin = "0px"; + return () => { + document.body.style.margin = ORIGINAL_BODY_MARGIN; + }; + }, []); + const sections = useMemo(() => { + return [{ + title: "Section 1", + description: "Description for section 1", + fields: [ + // row 1 + [["dependency"]], + // row 2 + [["section_show"]]] + }, { + title: "Section 2", + description: "Description for section 2", + fields: [[["dependent"]]], + show: ({ + data + }) => data?.dependency === KEY_PHRASE && data?.section_show + }]; + }, []); + const fields = useMemo((): FieldDef[] => [{ + name: "dependency", + label: "Dependency", + type: "text", + instructionText: \`Type "\${KEY_PHRASE}" to show another field\`, + required: true + }, { + name: "section_show", + label: "Show another section", + type: "toggle", + show: ({ + data + }) => { + return data?.dependency === KEY_PHRASE; + } + }, { + name: "dependent", + label: "Dependent", + type: "text", + required: true + }], []); + return <> + {showState &&
{JSON.stringify(state, null, "  ")}
} +
+ +
+ ; +}`,...(m=(p=t.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};const be=["ConditionalSections"];export{t as ConditionalSections,be as __namedExportsOrder,_e as default}; diff --git a/sb8/qa/assets/ConditionalSections.stories-CJrfGojB.js b/sb8/qa/assets/ConditionalSections.stories-CJrfGojB.js deleted file mode 100644 index 794676ce29..0000000000 --- a/sb8/qa/assets/ConditionalSections.stories-CJrfGojB.js +++ /dev/null @@ -1,63 +0,0 @@ -import{j as n}from"./jsx-runtime-nGUw9YhZ.js";import{r}from"./index-BP8_t0zE.js";import{u as h,F as y}from"./Form-CV-BOiW8.js";import{r as f}from"./renderButtons-BmHfsf_z.js";import{O as S}from"./utils-BR2PSRFh.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./index-BxmsGmlx.js";import"./useMosaicTranslation-CZCb37QS.js";import"./createSvgIcon-Pzp5yWPs.js";import"./useId-DLncWxdO.js";import"./ButtonRow-CP4CrsnB.js";import"./Chip-CRqL1Gcl.js";import"./sizes-C6oSOElx.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./index-BU7KlZI9.js";import"./debounce-DO3dP4oK.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./ColorSelected-DyTCIv8L.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";const be={title:"Components/Form"},t=({showState:c})=>{const i=h(),{state:d,handleSubmit:l}=i,o="SHOW";r.useEffect(()=>(document.body.style.margin="0px",()=>{document.body.style.margin=S}),[]);const a=r.useMemo(()=>[{title:"Section 1",description:"Description for section 1",fields:[[["dependency"]],[["section_show"]]]},{title:"Section 2",description:"Description for section 2",fields:[[["dependent"]]],show:({data:e})=>(e==null?void 0:e.dependency)===o&&(e==null?void 0:e.section_show)}],[]),u=r.useMemo(()=>[{name:"dependency",label:"Dependency",type:"text",instructionText:`Type "${o}" to show another field`,required:!0},{name:"section_show",label:"Show another section",type:"toggle",show:({data:e})=>(e==null?void 0:e.dependency)===o},{name:"dependent",label:"Dependent",type:"text",required:!0}],[]);return n.jsxs(n.Fragment,{children:[c&&n.jsx("pre",{children:JSON.stringify(d,null," ")}),n.jsx("div",{style:{height:"100vh"},children:n.jsx(y,{...i,buttons:f(l),title:"Runtime behaviors",fields:u,sections:a})})]})};t.args={showState:!1};t.argTypes={showState:{name:"Show state"}};var s,p,m;t.parameters={...t.parameters,docs:{...(s=t.parameters)==null?void 0:s.docs,source:{originalSource:`({ - showState -}: typeof ConditionalSections.args): ReactElement => { - const controller = useForm(); - const { - state, - handleSubmit - } = controller; - const KEY_PHRASE = "SHOW"; - useEffect(() => { - document.body.style.margin = "0px"; - return () => { - document.body.style.margin = ORIGINAL_BODY_MARGIN; - }; - }, []); - const sections = useMemo(() => { - return [{ - title: "Section 1", - description: "Description for section 1", - fields: [ - // row 1 - [["dependency"]], - // row 2 - [["section_show"]]] - }, { - title: "Section 2", - description: "Description for section 2", - fields: [[["dependent"]]], - show: ({ - data - }) => data?.dependency === KEY_PHRASE && data?.section_show - }]; - }, []); - const fields = useMemo((): FieldDef[] => [{ - name: "dependency", - label: "Dependency", - type: "text", - instructionText: \`Type "\${KEY_PHRASE}" to show another field\`, - required: true - }, { - name: "section_show", - label: "Show another section", - type: "toggle", - show: ({ - data - }) => { - return data?.dependency === KEY_PHRASE; - } - }, { - name: "dependent", - label: "Dependent", - type: "text", - required: true - }], []); - return <> - {showState &&
{JSON.stringify(state, null, "  ")}
} -
- -
- ; -}`,...(m=(p=t.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};const ge=["ConditionalSections"];export{t as ConditionalSections,ge as __namedExportsOrder,be as default}; diff --git a/sb8/qa/assets/Content-BaoMomP1.js b/sb8/qa/assets/Content-DuMbf1nf.js similarity index 74% rename from sb8/qa/assets/Content-BaoMomP1.js rename to sb8/qa/assets/Content-DuMbf1nf.js index f3bed803dd..f9c7a1e05f 100644 --- a/sb8/qa/assets/Content-BaoMomP1.js +++ b/sb8/qa/assets/Content-DuMbf1nf.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as r}from"./index-3-_tf5dF.js";import{M as i,C as s}from"./index-CGWOAm_e.js";import{s as l,P as a}from"./Content.stories-BmT5bwpx.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./column_transforms-CdVT4MBf.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./theme-DRtZtbPc.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./ColorSelected-DyTCIv8L.js";import"./index-BU7KlZI9.js";import"./debounce-DO3dP4oK.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useId-DLncWxdO.js";import"./Chip-CRqL1Gcl.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useToggle-lipGlewK.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./TitleWrapper-CYciWRcJ.js";import"./containerQuery-C0QVV4Kt.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./Image-DW9YTXUC.js";import"./formats-sBod7wm8.js";import"./TooltipIcon-Bg8I7hop.js";import"./Edit-hiJ2yy-Y.js";import"./styled-hJgfyZIG.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./createSvgIcon-DE5yaevU.js";import"./Typography-aSbaE-Qi.js";function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...r(),...e.components};return t.jsxs(t.Fragment,{children:[t.jsx(i,{of:l}),` +import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as r}from"./index-3-_tf5dF.js";import{M as i,C as s}from"./index-vCrdABUF.js";import{s as l,P as a}from"./Content.stories-DKYWttwP.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./column_transforms-DwNjIJnr.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./theme-DRtZtbPc.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./formControlState-DyMXFR7f.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./ColorSelected-DERcqfqY.js";import"./TitleWrapper-CYciWRcJ.js";import"./containerQuery-C0QVV4Kt.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./Image-DW9YTXUC.js";import"./formats-sBod7wm8.js";import"./TooltipIcon-Bg8I7hop.js";import"./Edit-hiJ2yy-Y.js";import"./styled-hJgfyZIG.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./createSvgIcon-DE5yaevU.js";import"./Typography-aSbaE-Qi.js";function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...r(),...e.components};return t.jsxs(t.Fragment,{children:[t.jsx(i,{of:l}),` `,t.jsx(n.h1,{id:"content",children:"Content"}),` `,t.jsxs(n.p,{children:["The ",t.jsx(n.code,{children:"Content"})," helps to show the primary information from each specific record, with the possibility to add new subsections separate from the main form."]}),` `,t.jsx(n.h2,{id:"props",children:"Props"}),` @@ -128,4 +128,4 @@ const ContentExample = (): ReactElement => { }; `})}),` `,t.jsx(n.h2,{id:"playground",children:"Playground"}),` -`,t.jsx(s,{of:a})]})}function xt(e={}){const{wrapper:n}={...r(),...e.components};return n?t.jsx(n,{...e,children:t.jsx(o,{...e})}):o(e)}export{xt as default}; +`,t.jsx(s,{of:a})]})}function gt(e={}){const{wrapper:n}={...r(),...e.components};return n?t.jsx(n,{...e,children:t.jsx(o,{...e})}):o(e)}export{gt as default}; diff --git a/sb8/qa/assets/Content.stories-BmT5bwpx.js b/sb8/qa/assets/Content.stories-DKYWttwP.js similarity index 99% rename from sb8/qa/assets/Content.stories-BmT5bwpx.js rename to sb8/qa/assets/Content.stories-DKYWttwP.js index ac647ab88d..d0773d476d 100644 --- a/sb8/qa/assets/Content.stories-BmT5bwpx.js +++ b/sb8/qa/assets/Content.stories-DKYWttwP.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-nGUw9YhZ.js";import{r as g}from"./index-BP8_t0zE.js";import{F as G,d as on,e as an,f as sn,M as rn,T as ln,g as cn,C as mn,h as un,t as W,i as V,b as j,a as D,c as P,j as E}from"./column_transforms-CdVT4MBf.js";import{B as dn}from"./ButtonRow-CP4CrsnB.js";import{T as fn,B as hn}from"./TooltipIcon-Bg8I7hop.js";import{t as w}from"./testIds-DZf96GK8.js";import{u as pn,T as gn}from"./Button-DuMlbF8s.js";import"./Typography-Br_RMLnS.js";import{S as bn}from"./SubtitleText-Vdwjg1jD.js";import{g as yn}from"./useToggle-lipGlewK.js";import{C as Cn}from"./Chip-CRqL1Gcl.js";import{d as M}from"./Edit-hiJ2yy-Y.js";import{a as vn,g as kn,l as N,m as wn,s as _n,c as Y,u as Ln,_ as xn,n as Tn,b as Sn,d as Fn}from"./styled-hJgfyZIG.js";import{_}from"./extends-CF3RwP-h.js";import{T as Wn}from"./Typography-aSbaE-Qi.js";import{u as Vn}from"./createSvgIcon-DE5yaevU.js";function jn({tooltip:e}){const{anchorProps:t,tooltipProps:o}=pn();return n.jsxs(n.Fragment,{children:[n.jsx(fn,{...t,"data-testid":w.CONTENT_TOOLTIP_ICON}),n.jsx(gn,{...o,children:e})]})}const Dn=({label:e,transforms:t,value:o,tooltip:a})=>{const s=g.useMemo(()=>o===void 0||o===""||Array.isArray(o)&&!o.length?n.jsx(hn,{}):t?t.reduce((l,m)=>m({data:l}),o):o,[t,o]);return n.jsxs(G,{"data-testid":w.CONTENT_FIELD,$margin:!0,children:[n.jsxs(on,{children:[e,a&&n.jsx(jn,{tooltip:a})]}),n.jsx(an,{children:n.jsx(sn,{children:s})})]})};function Pn(e){let t=!1;const o=e.map(a=>a.map(s=>Array.isArray(s)?(t=!0,s[0]):s));return t&&console.warn("Providing content sections as string[][][] is deprecated and support will be removed in future releases. You should now define your sections as string[][]"),o}const b=e=>{const{fields:t,data:o,sections:a,title:s,buttons:l=[],variant:m}=e,u=m==="card",p=g.useMemo(()=>(a?Pn(a):t.map(({name:c,column:r})=>[r||c])).map((c,r)=>c.map((i,x)=>{const f=t.find(({name:T,column:S})=>(S||T)===i);if(i&&!f)throw new Error(`No field declared for field name '${i}'. (section ${r}, row ${x})`);if(!(f&&!yn(f.show,!0)))return f})).filter(c=>c.flat().length),[t,a]);return o?n.jsxs(rn,{className:u?"card-wrapper":"content-wrapper","data-testid":w.CONTENT,children:[n.jsxs(ln,{className:u?"title-bar":"",children:[n.jsx(bn,{maxLines:1,children:s}),l.length>0&&n.jsx(dn,{buttons:l,separator:!u})]}),n.jsx(cn,{className:u?"card-content":"",children:p.map((d,c)=>n.jsx(mn,{className:u?"card-row":"",$columns:d.length,"data-testid":w.CONTENT_ROW,children:d.map((r,i)=>r?g.createElement(Dn,{...r,key:r.name,value:o[r.column||r.name]}):n.jsx(G,{"data-testid":w.CONTENT_FIELD},i))},`${c}-row`))})]}):null};function Mn(e){return kn("MuiLink",e)}const An=vn("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),J={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Rn=e=>J[e]||e,En=({theme:e,ownerState:t})=>{const o=Rn(t.color),a=N(e,`palette.${o}`,!1)||t.color,s=N(e,`palette.${o}Channel`);return"vars"in e&&s?`rgba(${s} / 0.4)`:wn(a,.4)},Nn=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],In=e=>{const{classes:t,component:o,focusVisible:a,underline:s}=e,l={root:["root",`underline${Y(s)}`,o==="button"&&"button",a&&"focusVisible"]};return Fn(l,Mn,t)},Bn=_n(Wn,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[`underline${Y(o.underline)}`],o.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>_({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&_({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:En({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${An.focusVisible}`]:{outline:"auto"}})),L=g.forwardRef(function(t,o){const a=Ln({props:t,name:"MuiLink"}),{className:s,color:l="primary",component:m="a",onBlur:u,onFocus:p,TypographyClasses:d,underline:c="always",variant:r="inherit",sx:i}=a,x=xn(a,Nn),{isFocusVisibleRef:f,onBlur:T,onFocus:S,ref:Q}=Vn(),[X,A]=g.useState(!1),Z=Tn(o,Q),nn=C=>{T(C),f.current===!1&&A(!1),u&&u(C)},en=C=>{S(C),f.current===!0&&A(!0),p&&p(C)},R=_({},a,{color:l,component:m,focusVisible:X,underline:c,variant:r}),tn=In(R);return n.jsx(Bn,_({color:l,className:Sn(tn.root,s),classes:d,component:m,onBlur:nn,onFocus:en,ref:Z,ownerState:R,variant:r,sx:[...Object.keys(J).includes(l)?[]:[{color:l}],...Array.isArray(i)?i:[i]]},x))}),Un={title:"Components/Content"},F=[{label:"Chip as value 1",value:"chip_value1"},{label:"Chip as value 2",value:"chip_value2"},{label:"Chip as value 3",value:"chip_value3"}],y={tags:[{label:"Chip 1",value:"chip-1"},{label:"Chip 2",value:"chip-2"},{label:"Chip 3",value:"chip-3"},{label:"Chip 4",value:"chip-4"}],date:new Date("December 17, 1995 03:24:00"),toggle:!1,colorPicker:"#a8001791",thumbnail:"https://res.cloudinary.com/simpleview/image/upload/v1542821844/clients/grandrapids/_OD_0354_c78fbb66-c75a-4804-9430-9af38ed8e9d5.jpg",chipsAsValue:n.jsx(un,{children:F==null?void 0:F.map(e=>n.jsx(Cn,{label:e==null?void 0:e.label},`${e==null?void 0:e.label}-${e==null?void 0:e.value}`))}),undefinedValue:void 0,emptyStringValue:"",emptyArrayValue:[],animals:[{id:1,species:"Dog",color:"Brown"},{id:2,species:"Cat",color:"White"}],cars:[{id:1,make:"BMW",model:"M3"},{id:2,make:"Volkswagen",model:"Golf"}],multipleTransforms:"This is some text",fieldWithLongWord:"Pneumonoultramicroscopicsilicovolcanoconiosis",fieldWithLongURL:"https://simpleviewinc.github.io/sv-mosaic/master/?path=/story/components-content--kitchen-sink",fieldWithLongSentence:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi mollis diam non imperdiet luctus. Morbi in augue leo. Vestibulum non tellus in elit molestie pretium sollicitudin eget purus. Mauris varius, est sed placerat ornare, nulla libero consequat nisi, id tempor nibh felis non velit."},On={"Single Column":[[["tags"]],[["colorPicker"]],[["toggle"]],[["date"]],[["thumbnail"]],[["chipsAsValue"]],[["animals"]],[["cars"]],[["multipleTransforms"]]],"Two Columns":[[["tags"],["colorPicker"]],[["toggle"],["date"]],[["thumbnail"],["chipsAsValue"]],[["animals"],["cars"]],[["multipleTransforms"]]],"Three Columns":[[["tags"],["colorPicker"],[]],[["toggle"],["date"],["thumbnail"]],[["animals"],["cars"],["chipsAsValue"]],[["multipleTransforms"]]]},h=({title:e,variant:t,sectionConfigKey:o,showButtons:a,showFirstRowItems:s,amountContent:l})=>{const[m,u]=g.useState(!1),p=()=>{u(!m)},d=[{name:"edit",label:"Edit",mIcon:M,color:"gray",variant:"icon",show:[a!=="undefined",Number(a)>=1],onClick:function(){alert("Edit button clicked")}},{name:"showDetails",color:"teal",variant:"text",label:m?"Less Details":"More Details",onClick:p,show:[a!=="undefined",Number(a)>=2]}],c=[{name:"chips",label:"Chips using transform_chips()",tooltip:"This is a list of chips",transforms:[W()],column:"tags",show:s},{name:"toggle",label:"Toggle using transform_boolean()",tooltip:n.jsxs(n.Fragment,{children:["This came in as a boolean, but",n.jsx("br",{}),"will displayed as yes or no"]}),transforms:[V()]},{name:"date",label:"Date using transform_dateFormat()",transforms:[j()]},{name:"color",label:"Color using transform_colorPicker()",transforms:[D()],column:"colorPicker",show:s},{name:"thumbnail",label:"Thumbnail using transform_thumbnail()",transforms:[P({width:150,height:150})]},{name:"chipsAsValue",label:"Chips with no transform only value"},{name:"animals",label:"Animals",transforms:[E({columns:[{name:"species",label:"Species"},{name:"color",label:"Color"}]})]},{name:"cars",label:"Cars",transforms:[E({columns:[{name:"make",label:"Make"},{name:"model",label:"Model"}]})]},{name:"multipleTransforms",label:"Multiple Transforms",transforms:[({data:i})=>n.jsx("div",{style:{color:"red"},children:i}),({data:i})=>n.jsx("div",{style:{fontSize:"2rem"},children:i})]}],r=On[o];return n.jsxs(n.Fragment,{children:[n.jsx(b,{title:e,data:y,fields:c,sections:r.slice(0,m?void 0:2),buttons:d,variant:t}),l===2&&n.jsx(b,{title:"Second content",data:y,fields:c,sections:r,variant:t})]})};h.args={title:"Main Content Title",variant:"standard",sectionConfigKey:"Single Column",showButtons:"2",showFirstRowItems:!0,amountContent:1};h.argTypes={title:{name:"Title"},variant:{name:"Variant",options:["standard","card"],control:{type:"select"}},sectionConfigKey:{name:"Sections",options:["Single Column","Two Columns","Three Columns"],control:{type:"select"}},showButtons:{name:"Buttons",options:["1","2","0","undefined"],control:{type:"select"}},showFirstRowItems:{name:"Show first row"},amountContent:{name:"Amount of contents",options:[1,2],control:{type:"select"}}};const v=()=>{const e=[{name:"edit",label:"Edit",mIcon:M,color:"gray",variant:"icon",onClick:function(){alert("Edit button clicked")}},{name:"showDetails",color:"teal",variant:"text",label:"More Details",onClick:()=>alert("More details")}],t=[{name:"chips",label:"Chips using transform_chips()",transforms:[W()],column:"tags"},{name:"toggle",label:n.jsx(L,{href:"#",children:"Toggle using transform_boolean()"}),transforms:[V()]},{name:"date",label:"Date using transform_dateFormat()",transforms:[j()]},{name:"color",label:"Color using transform_colorPicker()",transforms:[D()],column:"colorPicker"},{name:"thumbnail",label:"Thumbnail using transform_thumbnail()",transforms:[P({width:150,height:150})]},{name:"chipsAsValue",label:"Chips with no transform only value"},{name:"undefinedValue",label:"Field with undefined value"},{name:"emptyStringValue",label:"Field with empty string value"},{name:"emptyArrayValue",label:"Field with empty array value"},{name:"fieldWithLongWord",label:"Long Word"},{name:"fieldWithLongURL",label:"Long URL",transforms:[({data:a})=>n.jsx(L,{href:a,children:a})]},{name:"fieldWithLongSentence",label:"Long Sentence"}],o=[["tags","colorPicker",void 0],["toggle","date","colorPicker"],["thumbnail","chipsAsValue",void 0],["undefinedValue","emptyStringValue","emptyArrayValue"],["fieldWithLongWord","fieldWithLongURL","fieldWithLongSentence"]];return n.jsxs(n.Fragment,{children:[n.jsx(b,{title:"Standard content",data:y,fields:t,sections:o,buttons:e}),n.jsx("br",{}),n.jsx(b,{title:"Card content",data:y,fields:t,sections:o,buttons:e,variant:"card"})]})},k=()=>{const e=[{name:"edit",label:"Edit",mIcon:M,color:"gray",variant:"icon",onClick:function(){alert("Edit button clicked")}},{name:"showDetails",color:"teal",variant:"text",label:"More Details",onClick:()=>alert("More details")}],t=[{name:"chips",label:"Chips using transform_chips()",transforms:[W()],column:"tags"},{name:"toggle",label:n.jsx(L,{href:"#",children:"Toggle using transform_boolean()"}),transforms:[V()]},{name:"date",label:"Date using transform_dateFormat()",transforms:[j()]},{name:"color",label:"Color using transform_colorPicker()",transforms:[D()],column:"colorPicker"},{name:"thumbnail",label:"Thumbnail using transform_thumbnail()",transforms:[P({width:150,height:150})]},{name:"chipsAsValue",label:"Chips with no transform only value"},{name:"undefinedValue",label:"Field with undefined value"},{name:"emptyStringValue",label:"Field with empty string value"},{name:"emptyArrayValue",label:"Field with empty array value"},{name:"fieldWithLongWord",label:"Long Word"},{name:"fieldWithLongURL",label:"Long URL",transforms:[({data:a})=>n.jsx(L,{href:a,children:a})]},{name:"fieldWithLongSentence",label:"Long Sentence"}],o=[[["tags"],["colorPicker"],[]],[["toggle"],["date"],["colorPicker"]],[["thumbnail"],["chipsAsValue"],[]],[["undefinedValue"],["emptyStringValue"],["emptyArrayValue"]],[["fieldWithLongWord"],["fieldWithLongURL"],["fieldWithLongSentence"]]];return n.jsxs(n.Fragment,{children:[n.jsx(b,{title:"Standard content",data:y,fields:t,sections:o,buttons:e}),n.jsx("br",{}),n.jsx(b,{title:"Card content",data:y,fields:t,sections:o,buttons:e,variant:"card"})]})};var I,B,U;h.parameters={...h.parameters,docs:{...(I=h.parameters)==null?void 0:I.docs,source:{originalSource:`({ +import{j as n}from"./jsx-runtime-nGUw9YhZ.js";import{r as g}from"./index-BP8_t0zE.js";import{F as G,d as on,e as an,f as sn,M as rn,T as ln,g as cn,C as mn,h as un,t as W,i as V,b as j,a as D,c as P,j as E}from"./column_transforms-DwNjIJnr.js";import{B as dn}from"./ButtonRow-CP4CrsnB.js";import{T as fn,B as hn}from"./TooltipIcon-Bg8I7hop.js";import{t as w}from"./testIds-DZf96GK8.js";import{u as pn,T as gn}from"./Button-DuMlbF8s.js";import"./Typography-Br_RMLnS.js";import{S as bn}from"./SubtitleText-Vdwjg1jD.js";import{g as yn}from"./useToggle-lipGlewK.js";import{C as Cn}from"./Chip-CRqL1Gcl.js";import{d as M}from"./Edit-hiJ2yy-Y.js";import{a as vn,g as kn,l as N,m as wn,s as _n,c as Y,u as Ln,_ as xn,n as Tn,b as Sn,d as Fn}from"./styled-hJgfyZIG.js";import{_}from"./extends-CF3RwP-h.js";import{T as Wn}from"./Typography-aSbaE-Qi.js";import{u as Vn}from"./createSvgIcon-DE5yaevU.js";function jn({tooltip:e}){const{anchorProps:t,tooltipProps:o}=pn();return n.jsxs(n.Fragment,{children:[n.jsx(fn,{...t,"data-testid":w.CONTENT_TOOLTIP_ICON}),n.jsx(gn,{...o,children:e})]})}const Dn=({label:e,transforms:t,value:o,tooltip:a})=>{const s=g.useMemo(()=>o===void 0||o===""||Array.isArray(o)&&!o.length?n.jsx(hn,{}):t?t.reduce((l,m)=>m({data:l}),o):o,[t,o]);return n.jsxs(G,{"data-testid":w.CONTENT_FIELD,$margin:!0,children:[n.jsxs(on,{children:[e,a&&n.jsx(jn,{tooltip:a})]}),n.jsx(an,{children:n.jsx(sn,{children:s})})]})};function Pn(e){let t=!1;const o=e.map(a=>a.map(s=>Array.isArray(s)?(t=!0,s[0]):s));return t&&console.warn("Providing content sections as string[][][] is deprecated and support will be removed in future releases. You should now define your sections as string[][]"),o}const b=e=>{const{fields:t,data:o,sections:a,title:s,buttons:l=[],variant:m}=e,u=m==="card",p=g.useMemo(()=>(a?Pn(a):t.map(({name:c,column:r})=>[r||c])).map((c,r)=>c.map((i,x)=>{const f=t.find(({name:T,column:S})=>(S||T)===i);if(i&&!f)throw new Error(`No field declared for field name '${i}'. (section ${r}, row ${x})`);if(!(f&&!yn(f.show,!0)))return f})).filter(c=>c.flat().length),[t,a]);return o?n.jsxs(rn,{className:u?"card-wrapper":"content-wrapper","data-testid":w.CONTENT,children:[n.jsxs(ln,{className:u?"title-bar":"",children:[n.jsx(bn,{maxLines:1,children:s}),l.length>0&&n.jsx(dn,{buttons:l,separator:!u})]}),n.jsx(cn,{className:u?"card-content":"",children:p.map((d,c)=>n.jsx(mn,{className:u?"card-row":"",$columns:d.length,"data-testid":w.CONTENT_ROW,children:d.map((r,i)=>r?g.createElement(Dn,{...r,key:r.name,value:o[r.column||r.name]}):n.jsx(G,{"data-testid":w.CONTENT_FIELD},i))},`${c}-row`))})]}):null};function Mn(e){return kn("MuiLink",e)}const An=vn("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),J={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Rn=e=>J[e]||e,En=({theme:e,ownerState:t})=>{const o=Rn(t.color),a=N(e,`palette.${o}`,!1)||t.color,s=N(e,`palette.${o}Channel`);return"vars"in e&&s?`rgba(${s} / 0.4)`:wn(a,.4)},Nn=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],In=e=>{const{classes:t,component:o,focusVisible:a,underline:s}=e,l={root:["root",`underline${Y(s)}`,o==="button"&&"button",a&&"focusVisible"]};return Fn(l,Mn,t)},Bn=_n(Wn,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[`underline${Y(o.underline)}`],o.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>_({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&_({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:En({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${An.focusVisible}`]:{outline:"auto"}})),L=g.forwardRef(function(t,o){const a=Ln({props:t,name:"MuiLink"}),{className:s,color:l="primary",component:m="a",onBlur:u,onFocus:p,TypographyClasses:d,underline:c="always",variant:r="inherit",sx:i}=a,x=xn(a,Nn),{isFocusVisibleRef:f,onBlur:T,onFocus:S,ref:Q}=Vn(),[X,A]=g.useState(!1),Z=Tn(o,Q),nn=C=>{T(C),f.current===!1&&A(!1),u&&u(C)},en=C=>{S(C),f.current===!0&&A(!0),p&&p(C)},R=_({},a,{color:l,component:m,focusVisible:X,underline:c,variant:r}),tn=In(R);return n.jsx(Bn,_({color:l,className:Sn(tn.root,s),classes:d,component:m,onBlur:nn,onFocus:en,ref:Z,ownerState:R,variant:r,sx:[...Object.keys(J).includes(l)?[]:[{color:l}],...Array.isArray(i)?i:[i]]},x))}),Un={title:"Components/Content"},F=[{label:"Chip as value 1",value:"chip_value1"},{label:"Chip as value 2",value:"chip_value2"},{label:"Chip as value 3",value:"chip_value3"}],y={tags:[{label:"Chip 1",value:"chip-1"},{label:"Chip 2",value:"chip-2"},{label:"Chip 3",value:"chip-3"},{label:"Chip 4",value:"chip-4"}],date:new Date("December 17, 1995 03:24:00"),toggle:!1,colorPicker:"#a8001791",thumbnail:"https://res.cloudinary.com/simpleview/image/upload/v1542821844/clients/grandrapids/_OD_0354_c78fbb66-c75a-4804-9430-9af38ed8e9d5.jpg",chipsAsValue:n.jsx(un,{children:F==null?void 0:F.map(e=>n.jsx(Cn,{label:e==null?void 0:e.label},`${e==null?void 0:e.label}-${e==null?void 0:e.value}`))}),undefinedValue:void 0,emptyStringValue:"",emptyArrayValue:[],animals:[{id:1,species:"Dog",color:"Brown"},{id:2,species:"Cat",color:"White"}],cars:[{id:1,make:"BMW",model:"M3"},{id:2,make:"Volkswagen",model:"Golf"}],multipleTransforms:"This is some text",fieldWithLongWord:"Pneumonoultramicroscopicsilicovolcanoconiosis",fieldWithLongURL:"https://simpleviewinc.github.io/sv-mosaic/master/?path=/story/components-content--kitchen-sink",fieldWithLongSentence:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi mollis diam non imperdiet luctus. Morbi in augue leo. Vestibulum non tellus in elit molestie pretium sollicitudin eget purus. Mauris varius, est sed placerat ornare, nulla libero consequat nisi, id tempor nibh felis non velit."},On={"Single Column":[[["tags"]],[["colorPicker"]],[["toggle"]],[["date"]],[["thumbnail"]],[["chipsAsValue"]],[["animals"]],[["cars"]],[["multipleTransforms"]]],"Two Columns":[[["tags"],["colorPicker"]],[["toggle"],["date"]],[["thumbnail"],["chipsAsValue"]],[["animals"],["cars"]],[["multipleTransforms"]]],"Three Columns":[[["tags"],["colorPicker"],[]],[["toggle"],["date"],["thumbnail"]],[["animals"],["cars"],["chipsAsValue"]],[["multipleTransforms"]]]},h=({title:e,variant:t,sectionConfigKey:o,showButtons:a,showFirstRowItems:s,amountContent:l})=>{const[m,u]=g.useState(!1),p=()=>{u(!m)},d=[{name:"edit",label:"Edit",mIcon:M,color:"gray",variant:"icon",show:[a!=="undefined",Number(a)>=1],onClick:function(){alert("Edit button clicked")}},{name:"showDetails",color:"teal",variant:"text",label:m?"Less Details":"More Details",onClick:p,show:[a!=="undefined",Number(a)>=2]}],c=[{name:"chips",label:"Chips using transform_chips()",tooltip:"This is a list of chips",transforms:[W()],column:"tags",show:s},{name:"toggle",label:"Toggle using transform_boolean()",tooltip:n.jsxs(n.Fragment,{children:["This came in as a boolean, but",n.jsx("br",{}),"will displayed as yes or no"]}),transforms:[V()]},{name:"date",label:"Date using transform_dateFormat()",transforms:[j()]},{name:"color",label:"Color using transform_colorPicker()",transforms:[D()],column:"colorPicker",show:s},{name:"thumbnail",label:"Thumbnail using transform_thumbnail()",transforms:[P({width:150,height:150})]},{name:"chipsAsValue",label:"Chips with no transform only value"},{name:"animals",label:"Animals",transforms:[E({columns:[{name:"species",label:"Species"},{name:"color",label:"Color"}]})]},{name:"cars",label:"Cars",transforms:[E({columns:[{name:"make",label:"Make"},{name:"model",label:"Model"}]})]},{name:"multipleTransforms",label:"Multiple Transforms",transforms:[({data:i})=>n.jsx("div",{style:{color:"red"},children:i}),({data:i})=>n.jsx("div",{style:{fontSize:"2rem"},children:i})]}],r=On[o];return n.jsxs(n.Fragment,{children:[n.jsx(b,{title:e,data:y,fields:c,sections:r.slice(0,m?void 0:2),buttons:d,variant:t}),l===2&&n.jsx(b,{title:"Second content",data:y,fields:c,sections:r,variant:t})]})};h.args={title:"Main Content Title",variant:"standard",sectionConfigKey:"Single Column",showButtons:"2",showFirstRowItems:!0,amountContent:1};h.argTypes={title:{name:"Title"},variant:{name:"Variant",options:["standard","card"],control:{type:"select"}},sectionConfigKey:{name:"Sections",options:["Single Column","Two Columns","Three Columns"],control:{type:"select"}},showButtons:{name:"Buttons",options:["1","2","0","undefined"],control:{type:"select"}},showFirstRowItems:{name:"Show first row"},amountContent:{name:"Amount of contents",options:[1,2],control:{type:"select"}}};const v=()=>{const e=[{name:"edit",label:"Edit",mIcon:M,color:"gray",variant:"icon",onClick:function(){alert("Edit button clicked")}},{name:"showDetails",color:"teal",variant:"text",label:"More Details",onClick:()=>alert("More details")}],t=[{name:"chips",label:"Chips using transform_chips()",transforms:[W()],column:"tags"},{name:"toggle",label:n.jsx(L,{href:"#",children:"Toggle using transform_boolean()"}),transforms:[V()]},{name:"date",label:"Date using transform_dateFormat()",transforms:[j()]},{name:"color",label:"Color using transform_colorPicker()",transforms:[D()],column:"colorPicker"},{name:"thumbnail",label:"Thumbnail using transform_thumbnail()",transforms:[P({width:150,height:150})]},{name:"chipsAsValue",label:"Chips with no transform only value"},{name:"undefinedValue",label:"Field with undefined value"},{name:"emptyStringValue",label:"Field with empty string value"},{name:"emptyArrayValue",label:"Field with empty array value"},{name:"fieldWithLongWord",label:"Long Word"},{name:"fieldWithLongURL",label:"Long URL",transforms:[({data:a})=>n.jsx(L,{href:a,children:a})]},{name:"fieldWithLongSentence",label:"Long Sentence"}],o=[["tags","colorPicker",void 0],["toggle","date","colorPicker"],["thumbnail","chipsAsValue",void 0],["undefinedValue","emptyStringValue","emptyArrayValue"],["fieldWithLongWord","fieldWithLongURL","fieldWithLongSentence"]];return n.jsxs(n.Fragment,{children:[n.jsx(b,{title:"Standard content",data:y,fields:t,sections:o,buttons:e}),n.jsx("br",{}),n.jsx(b,{title:"Card content",data:y,fields:t,sections:o,buttons:e,variant:"card"})]})},k=()=>{const e=[{name:"edit",label:"Edit",mIcon:M,color:"gray",variant:"icon",onClick:function(){alert("Edit button clicked")}},{name:"showDetails",color:"teal",variant:"text",label:"More Details",onClick:()=>alert("More details")}],t=[{name:"chips",label:"Chips using transform_chips()",transforms:[W()],column:"tags"},{name:"toggle",label:n.jsx(L,{href:"#",children:"Toggle using transform_boolean()"}),transforms:[V()]},{name:"date",label:"Date using transform_dateFormat()",transforms:[j()]},{name:"color",label:"Color using transform_colorPicker()",transforms:[D()],column:"colorPicker"},{name:"thumbnail",label:"Thumbnail using transform_thumbnail()",transforms:[P({width:150,height:150})]},{name:"chipsAsValue",label:"Chips with no transform only value"},{name:"undefinedValue",label:"Field with undefined value"},{name:"emptyStringValue",label:"Field with empty string value"},{name:"emptyArrayValue",label:"Field with empty array value"},{name:"fieldWithLongWord",label:"Long Word"},{name:"fieldWithLongURL",label:"Long URL",transforms:[({data:a})=>n.jsx(L,{href:a,children:a})]},{name:"fieldWithLongSentence",label:"Long Sentence"}],o=[[["tags"],["colorPicker"],[]],[["toggle"],["date"],["colorPicker"]],[["thumbnail"],["chipsAsValue"],[]],[["undefinedValue"],["emptyStringValue"],["emptyArrayValue"]],[["fieldWithLongWord"],["fieldWithLongURL"],["fieldWithLongSentence"]]];return n.jsxs(n.Fragment,{children:[n.jsx(b,{title:"Standard content",data:y,fields:t,sections:o,buttons:e}),n.jsx("br",{}),n.jsx(b,{title:"Card content",data:y,fields:t,sections:o,buttons:e,variant:"card"})]})};var I,B,U;h.parameters={...h.parameters,docs:{...(I=h.parameters)==null?void 0:I.docs,source:{originalSource:`({ title, variant, sectionConfigKey, diff --git a/sb8/qa/assets/CopyField.stories-Bocg3aAo.js b/sb8/qa/assets/CopyField.stories-Bocg3aAo.js deleted file mode 100644 index 312f2da3a6..0000000000 --- a/sb8/qa/assets/CopyField.stories-Bocg3aAo.js +++ /dev/null @@ -1,47 +0,0 @@ -import{j as r}from"./jsx-runtime-nGUw9YhZ.js";import{r as o}from"./index-BP8_t0zE.js";import{u as f,F as h}from"./Form-CV-BOiW8.js";import{r as g}from"./renderButtons-BmHfsf_z.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./index-BxmsGmlx.js";import"./useMosaicTranslation-CZCb37QS.js";import"./createSvgIcon-Pzp5yWPs.js";import"./useId-DLncWxdO.js";import"./ButtonRow-CP4CrsnB.js";import"./Chip-CRqL1Gcl.js";import"./sizes-C6oSOElx.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./index-BU7KlZI9.js";import"./debounce-DO3dP4oK.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./ColorSelected-DyTCIv8L.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";const xt={title:"Components/Form"},y=document.body.style.margin,t=({showState:p})=>{const i=f(),{state:e,methods:{setFieldValue:n},handleSubmit:d}=i;o.useEffect(()=>(document.body.style.margin="0px",()=>{document.body.style.margin=y}),[]);const u=o.useMemo(()=>[{name:"name",label:"Name",type:"text",required:!0},{name:"slug",label:"Slug",type:"text",required:!0,helperText:"The text for this field will be populated with a slugified version the name field, but only if this field hasn't been touched"}],[]);return o.useEffect(()=>{var m;if(!e.touched.slug){const c=(m=e.data.name)==null?void 0:m.trim().toLowerCase().replace(/ {1,}/g,"_").replace(/[^a-z_]/g,"");n({name:"slug",value:c})}},[n,e.data.name,e.touched]),r.jsxs(r.Fragment,{children:[p&&r.jsx("pre",{children:JSON.stringify(e,null," ")}),r.jsx("div",{style:{height:"100vh"},children:r.jsx(h,{...i,buttons:g(d),title:"Validators story",fields:u})})]})};t.args={showState:!1};t.argTypes={showState:{name:"Show state"}};var s,a,l;t.parameters={...t.parameters,docs:{...(s=t.parameters)==null?void 0:s.docs,source:{originalSource:`({ - showState -}: typeof CopyField.args): ReactElement => { - const controller = useForm(); - const { - state, - methods: { - setFieldValue - }, - handleSubmit - } = controller; - useEffect(() => { - document.body.style.margin = "0px"; - return () => { - document.body.style.margin = ORIGINAL_BODY_MARGIN; - }; - }, []); - const fields = useMemo((): FieldDef[] => [{ - name: "name", - label: "Name", - type: "text", - required: true - }, { - name: "slug", - label: "Slug", - type: "text", - required: true, - helperText: "The text for this field will be populated with a slugified version the name field, but only if this field hasn't been touched" - }], []); - useEffect(() => { - if (!state.touched.slug) { - const transformedLabel = state.data.name?.trim().toLowerCase().replace(/ {1,}/g, "_").replace(/[^a-z_]/g, ""); - setFieldValue({ - name: "slug", - value: transformedLabel - }); - } - }, [setFieldValue, state.data.name, state.touched]); - return <> - {showState &&
{JSON.stringify(state, null, "  ")}
} -
- -
- ; -}`,...(l=(a=t.parameters)==null?void 0:a.docs)==null?void 0:l.source}}};const Ft=["CopyField"];export{t as CopyField,Ft as __namedExportsOrder,xt as default}; diff --git a/sb8/qa/assets/CopyField.stories-D8vl6OCM.js b/sb8/qa/assets/CopyField.stories-D8vl6OCM.js new file mode 100644 index 0000000000..b9b37da4a7 --- /dev/null +++ b/sb8/qa/assets/CopyField.stories-D8vl6OCM.js @@ -0,0 +1,47 @@ +import{j as r}from"./jsx-runtime-nGUw9YhZ.js";import{r as o}from"./index-BP8_t0zE.js";import{u as f,F as h}from"./Form-DI4diVc8.js";import{r as g}from"./renderButtons-BmHfsf_z.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./index-BxmsGmlx.js";import"./formControlState-DyMXFR7f.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./ColorSelected-DERcqfqY.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";const bt={title:"Components/Form"},y=document.body.style.margin,t=({showState:p})=>{const i=f(),{state:e,methods:{setFieldValue:n},handleSubmit:d}=i;o.useEffect(()=>(document.body.style.margin="0px",()=>{document.body.style.margin=y}),[]);const u=o.useMemo(()=>[{name:"name",label:"Name",type:"text",required:!0},{name:"slug",label:"Slug",type:"text",required:!0,helperText:"The text for this field will be populated with a slugified version the name field, but only if this field hasn't been touched"}],[]);return o.useEffect(()=>{var m;if(!e.touched.slug){const c=(m=e.data.name)==null?void 0:m.trim().toLowerCase().replace(/ {1,}/g,"_").replace(/[^a-z_]/g,"");n({name:"slug",value:c})}},[n,e.data.name,e.touched]),r.jsxs(r.Fragment,{children:[p&&r.jsx("pre",{children:JSON.stringify(e,null," ")}),r.jsx("div",{style:{height:"100vh"},children:r.jsx(h,{...i,buttons:g(d),title:"Validators story",fields:u})})]})};t.args={showState:!1};t.argTypes={showState:{name:"Show state"}};var s,a,l;t.parameters={...t.parameters,docs:{...(s=t.parameters)==null?void 0:s.docs,source:{originalSource:`({ + showState +}: typeof CopyField.args): ReactElement => { + const controller = useForm(); + const { + state, + methods: { + setFieldValue + }, + handleSubmit + } = controller; + useEffect(() => { + document.body.style.margin = "0px"; + return () => { + document.body.style.margin = ORIGINAL_BODY_MARGIN; + }; + }, []); + const fields = useMemo((): FieldDef[] => [{ + name: "name", + label: "Name", + type: "text", + required: true + }, { + name: "slug", + label: "Slug", + type: "text", + required: true, + helperText: "The text for this field will be populated with a slugified version the name field, but only if this field hasn't been touched" + }], []); + useEffect(() => { + if (!state.touched.slug) { + const transformedLabel = state.data.name?.trim().toLowerCase().replace(/ {1,}/g, "_").replace(/[^a-z_]/g, ""); + setFieldValue({ + name: "slug", + value: transformedLabel + }); + } + }, [setFieldValue, state.data.name, state.touched]); + return <> + {showState &&
{JSON.stringify(state, null, "  ")}
} +
+ +
+ ; +}`,...(l=(a=t.parameters)==null?void 0:a.docs)==null?void 0:l.source}}};const xt=["CopyField"];export{t as CopyField,xt as __namedExportsOrder,bt as default}; diff --git a/sb8/qa/assets/CustomFields.stories-4_tbGFvc.js b/sb8/qa/assets/CustomFields.stories-CRHnzSTs.js similarity index 59% rename from sb8/qa/assets/CustomFields.stories-4_tbGFvc.js rename to sb8/qa/assets/CustomFields.stories-CRHnzSTs.js index 8ec53365e1..d4505c0d0c 100644 --- a/sb8/qa/assets/CustomFields.stories-4_tbGFvc.js +++ b/sb8/qa/assets/CustomFields.stories-CRHnzSTs.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{r as m}from"./index-BP8_t0zE.js";import{u as f,a as l,F as x}from"./Form-CV-BOiW8.js";import{r as y}from"./renderButtons-BmHfsf_z.js";import{O as v}from"./utils-BR2PSRFh.js";import{c as g,s as b}from"./styled-components.browser.esm-8MQ3dTkk.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./index-BxmsGmlx.js";import"./useMosaicTranslation-CZCb37QS.js";import"./createSvgIcon-Pzp5yWPs.js";import"./useId-DLncWxdO.js";import"./ButtonRow-CP4CrsnB.js";import"./Chip-CRqL1Gcl.js";import"./sizes-C6oSOElx.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./index-BU7KlZI9.js";import"./debounce-DO3dP4oK.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./ColorSelected-DyTCIv8L.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./tslib.es6-CRos2fHm.js";import"./emotion-unitless.esm-sScrWPmR.js";const Nt={title:"Components/Form"},F=g` +import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{r as l}from"./index-BP8_t0zE.js";import{u as f,a as m,F as x}from"./Form-DI4diVc8.js";import{r as y}from"./renderButtons-BmHfsf_z.js";import{O as v}from"./utils-BR2PSRFh.js";import{c as g,s as b}from"./styled-components.browser.esm-8MQ3dTkk.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./index-BxmsGmlx.js";import"./formControlState-DyMXFR7f.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./ColorSelected-DERcqfqY.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./tslib.es6-CRos2fHm.js";import"./emotion-unitless.esm-sScrWPmR.js";const Bt={title:"Components/Form"},F=g` 0% { transform: translateX(0) } 25% { transform: translateX(5px) } 50% { transform: translateX(-5px) } @@ -13,7 +13,7 @@ import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{r as m}from"./index-BP8_t0z animation-name: ${F}; animation-duration: 0.5s; animation-iteration-count: 1; -`,S=n=>{const{onChange:r,onBlur:i,value:o,error:e}=n;return t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",value:o,onChange:s=>r(s.target.value),onBlur:i,style:{padding:"1rem",fontSize:24,borderRadius:0,border:"2px dashed #ccc"},placeholder:"Title"}),e&&t.jsx(u,{children:e})]})},j=n=>{const{onChange:r,onBlur:i,value:o,error:e}=n;return t.jsxs(t.Fragment,{children:[t.jsx("textarea",{rows:10,value:o,cols:20,onChange:s=>r(s.target.value),onBlur:i,placeholder:"Start your story here...",style:{padding:"1rem",fontSize:18,fontFamily:"serif",borderRadius:0,border:"2px dashed #ccc"}}),e&&t.jsx(u,{children:e})]})},C=n=>{const{onChange:r,onBlur:i,value:o,fieldDef:{label:e}}=n;return t.jsx(t.Fragment,{children:t.jsxs("div",{children:[t.jsx("input",{type:"checkbox",id:"vehicle1",name:"vehicle1",value:"Bike",onChange:s=>r(o?void 0:s.target.value),onBlur:i,checked:o==="Bike"}),t.jsx("label",{htmlFor:"vehicle1",children:e})]})})},a=({showState:n})=>{const r=f(),{state:i,methods:{setFieldValue:o},handleSubmit:e}=r;m.useEffect(()=>(document.body.style.margin="0px",()=>{document.body.style.margin=v}),[]);const s=m.useMemo(()=>[{name:"title",label:"Title",type:S,validators:[l]},{name:"story",label:"Story",type:j,validators:[l]},{name:"checkbox",label:"Save as draft",type:C}],[]),h=function(){o({name:"text1",value:"My New Value"})};return t.jsxs(t.Fragment,{children:[n&&t.jsx("pre",{children:JSON.stringify(i,null," ")}),t.jsx("div",{style:{height:"100vh"},children:t.jsx(x,{...r,buttons:y(e),title:"Custom components",fields:s})}),t.jsx("div",{children:t.jsx("button",{onClick:h,children:"Set Text1 Value"})})]})};a.args={showState:!1};a.argTypes={showState:{name:"Show state"}};var p,d,c;a.parameters={...a.parameters,docs:{...(p=a.parameters)==null?void 0:p.docs,source:{originalSource:`({ +`,S=n=>{const{onChange:r,onBlur:i,value:o,error:e}=n;return t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",value:o,onChange:s=>r(s.target.value),onBlur:i,style:{padding:"1rem",fontSize:24,borderRadius:0,border:"2px dashed #ccc"},placeholder:"Title"}),e&&t.jsx(u,{children:e})]})},j=n=>{const{onChange:r,onBlur:i,value:o,error:e}=n;return t.jsxs(t.Fragment,{children:[t.jsx("textarea",{rows:10,value:o,cols:20,onChange:s=>r(s.target.value),onBlur:i,placeholder:"Start your story here...",style:{padding:"1rem",fontSize:18,fontFamily:"serif",borderRadius:0,border:"2px dashed #ccc"}}),e&&t.jsx(u,{children:e})]})},C=n=>{const{onChange:r,onBlur:i,value:o,fieldDef:{label:e}}=n;return t.jsx(t.Fragment,{children:t.jsxs("div",{children:[t.jsx("input",{type:"checkbox",id:"vehicle1",name:"vehicle1",value:"Bike",onChange:s=>r(o?void 0:s.target.value),onBlur:i,checked:o==="Bike"}),t.jsx("label",{htmlFor:"vehicle1",children:e})]})})},a=({showState:n})=>{const r=f(),{state:i,methods:{setFieldValue:o},handleSubmit:e}=r;l.useEffect(()=>(document.body.style.margin="0px",()=>{document.body.style.margin=v}),[]);const s=l.useMemo(()=>[{name:"title",label:"Title",type:S,validators:[m]},{name:"story",label:"Story",type:j,validators:[m]},{name:"checkbox",label:"Save as draft",type:C}],[]),h=function(){o({name:"text1",value:"My New Value"})};return t.jsxs(t.Fragment,{children:[n&&t.jsx("pre",{children:JSON.stringify(i,null," ")}),t.jsx("div",{style:{height:"100vh"},children:t.jsx(x,{...r,buttons:y(e),title:"Custom components",fields:s})}),t.jsx("div",{children:t.jsx("button",{onClick:h,children:"Set Text1 Value"})})]})};a.args={showState:!1};a.argTypes={showState:{name:"Show state"}};var p,d,c;a.parameters={...a.parameters,docs:{...(p=a.parameters)==null?void 0:p.docs,source:{originalSource:`({ showState }: typeof CustomFields.args): ReactElement => { const controller = useForm(); @@ -62,4 +62,4 @@ import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{r as m}from"./index-BP8_t0z ; -}`,...(c=(d=a.parameters)==null?void 0:d.docs)==null?void 0:c.source}}};const Ot=["CustomFields"];export{a as CustomFields,Ot as __namedExportsOrder,Nt as default}; +}`,...(c=(d=a.parameters)==null?void 0:d.docs)==null?void 0:c.source}}};const Nt=["CustomFields"];export{a as CustomFields,Nt as __namedExportsOrder,Bt as default}; diff --git a/sb8/qa/assets/DataView-CwejvtRG.js b/sb8/qa/assets/DataView-DND1otZJ.js similarity index 86% rename from sb8/qa/assets/DataView-CwejvtRG.js rename to sb8/qa/assets/DataView-DND1otZJ.js index a56bbb26f1..c16675bf50 100644 --- a/sb8/qa/assets/DataView-CwejvtRG.js +++ b/sb8/qa/assets/DataView-DND1otZJ.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as s}from"./index-3-_tf5dF.js";import{M as r}from"./index-CGWOAm_e.js";import{s as o}from"./DataView.stories-D8jvnNCb.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./uniqueId-BPI7foNJ.js";import"./styled-components.browser.esm-8MQ3dTkk.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./Add-DakDrsh-.js";import"./styled-hJgfyZIG.js";import"./createSvgIcon-DE5yaevU.js";import"./Create-CpnV7q0W.js";import"./Delete-Bd9yuHmM.js";import"./MultiSelectHelper-DmwpeCwC.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./theme-DRtZtbPc.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./index-BU7KlZI9.js";import"./debounce-DO3dP4oK.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useId-DLncWxdO.js";import"./Chip-CRqL1Gcl.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useToggle-lipGlewK.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./ColorSelected-DyTCIv8L.js";import"./TitleWrapper-CYciWRcJ.js";import"./containerQuery-C0QVV4Kt.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./index-DgDEFTzX.js";import"./Form-CV-BOiW8.js";import"./SideNav-D66jd1x5.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./DataViewPrimaryFilter-Bhm_12OS.js";import"./DataViewFilterSingleSelect-D3SYGgnd.js";import"./DataViewFilterText-CCoJQ17F.js";import"./useMosaicSettings-BhwODcT2.js";import"./column_transforms-CdVT4MBf.js";import"./Image-DW9YTXUC.js";import"./DataViewFilterNumber-BRF6XiVs.js";import"./DataViewFilterMultiselect-B6wYHAKN.js";function t(n){const i={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...s(),...n.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{of:o}),` +import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as s}from"./index-3-_tf5dF.js";import{M as r}from"./index-vCrdABUF.js";import{s as o}from"./DataView.stories-CWoK1UlZ.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./uniqueId-BPI7foNJ.js";import"./styled-components.browser.esm-8MQ3dTkk.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./Add-DakDrsh-.js";import"./styled-hJgfyZIG.js";import"./createSvgIcon-DE5yaevU.js";import"./Create-CpnV7q0W.js";import"./Delete-Bd9yuHmM.js";import"./MultiSelectHelper-RF8UoF_G.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./theme-DRtZtbPc.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./formControlState-DyMXFR7f.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./ColorSelected-DERcqfqY.js";import"./TitleWrapper-CYciWRcJ.js";import"./containerQuery-C0QVV4Kt.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./index-C36bqT4L.js";import"./Form-DI4diVc8.js";import"./SideNav-D66jd1x5.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./DataViewPrimaryFilter-Bhm_12OS.js";import"./DataViewFilterSingleSelect-D3SYGgnd.js";import"./DataViewFilterText-CCoJQ17F.js";import"./useMosaicSettings-BhwODcT2.js";import"./column_transforms-DwNjIJnr.js";import"./Image-DW9YTXUC.js";import"./DataViewFilterNumber-B7ljKOlC.js";import"./DataViewFilterMultiselect-CauoR39J.js";function t(n){const i={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...s(),...n.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{of:o}),` `,e.jsx(i.h1,{id:"dataview",children:"DataView"}),` `,e.jsxs(i.p,{children:["A ",e.jsx(i.code,{children:"DataView"})," is used to output a list or grid of items. It can support a whole variety of actions including primary actions, additional actions and bulk actions."]}),` `,e.jsx(i.h2,{id:"props",children:"Props"}),` @@ -85,4 +85,4 @@ import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as s}from" `,e.jsxs(i.li,{children:[e.jsx(i.strong,{children:"onAllClick"})," - Handler that will be invoked when doing a bulkAction that goes across the entire recordset. If not specified this action will not display during a bulkAll state."]}),` `]}),` `]}),` -`]})]})}function We(n={}){const{wrapper:i}={...s(),...n.components};return i?e.jsx(i,{...n,children:e.jsx(t,{...n})}):t(n)}export{We as default}; +`]})]})}function Se(n={}){const{wrapper:i}={...s(),...n.components};return i?e.jsx(i,{...n,children:e.jsx(t,{...n})}):t(n)}export{Se as default}; diff --git a/sb8/qa/assets/DataView.stories-D8jvnNCb.js b/sb8/qa/assets/DataView.stories-CWoK1UlZ.js similarity index 99% rename from sb8/qa/assets/DataView.stories-D8jvnNCb.js rename to sb8/qa/assets/DataView.stories-CWoK1UlZ.js index 4d0540b8ce..2bbf165c63 100644 --- a/sb8/qa/assets/DataView.stories-D8jvnNCb.js +++ b/sb8/qa/assets/DataView.stories-CWoK1UlZ.js @@ -1,4 +1,4 @@ -var Ie=Object.defineProperty;var Fe=(i,a,d)=>a in i?Ie(i,a,{enumerable:!0,configurable:!0,writable:!0,value:d}):i[a]=d;var H=(i,a,d)=>Fe(i,typeof a!="symbol"?a+"":a,d);import{r as R,j as l}from"./jsx-runtime-nGUw9YhZ.js";import{u as Ae}from"./uniqueId-BPI7foNJ.js";import{r as n}from"./index-BP8_t0zE.js";import{s as je}from"./styled-components.browser.esm-8MQ3dTkk.js";import{d as De}from"./Add-DakDrsh-.js";import{d as ke}from"./Create-CpnV7q0W.js";import{i as M}from"./styled-hJgfyZIG.js";import{r as I}from"./createSvgIcon-DE5yaevU.js";import{d as ne}from"./Delete-Bd9yuHmM.js";import{M as se,J as le,c as Le}from"./MultiSelectHelper-DmwpeCwC.js";import{a as fe,D as Ve}from"./ColorSelected-DyTCIv8L.js";import{D as $}from"./index-DgDEFTzX.js";import{D as Ze}from"./DataViewFilterSingleSelect-D3SYGgnd.js";import{D as B}from"./DataViewFilterText-CCoJQ17F.js";import"./index-BU7KlZI9.js";import{u as Oe}from"./useMosaicSettings-BhwODcT2.js";import{M as Be}from"./useMosaicTranslation-CZCb37QS.js";import{u as Ge,F as We}from"./Form-CV-BOiW8.js";import{k as x,c as pe,l as Ue,m as Ne,i as Je,b as Q}from"./column_transforms-CdVT4MBf.js";import{t as ee}from"./testIds-DZf96GK8.js";import{D as qe}from"./DataViewFilterNumber-BRF6XiVs.js";import{D as ae}from"./DataViewFilterMultiselect-B6wYHAKN.js";var U={},Ye=M;Object.defineProperty(U,"__esModule",{value:!0});var be=U.default=void 0,ze=Ye(I()),Xe=R();be=U.default=(0,ze.default)((0,Xe.jsx)("path",{d:"M21 12.4V7l-4-4H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h7.4zM15 15c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3M6 6h9v4H6zm13.99 10.25 1.77 1.77L16.77 23H15v-1.77zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71"}),"SaveAs");var N={},Ke=M;Object.defineProperty(N,"__esModule",{value:!0});var ge=N.default=void 0,He=Ke(I()),$e=R();ge=N.default=(0,He.default)((0,$e.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp");var J={},Qe=M;Object.defineProperty(J,"__esModule",{value:!0});var ue=J.default=void 0,ea=Qe(I()),aa=R();ue=J.default=(0,ea.default)((0,aa.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility");var q={},ia=M;Object.defineProperty(q,"__esModule",{value:!0});var _e=q.default=void 0,ta=ia(I()),ra=R();_e=q.default=(0,ta.default)((0,ra.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");const da=[{_id:"55842aafd989fc715e628959",title:"Sandy beaches of Lake Michigan only a short drive away.",categories_ids:["5594402c3c392ffe4438cbd8","55943f9f3c392ffe4438cae2","559c3acce3bd4253522eb134","55873d4ad989fc715e63fa2d"],image_id:"5584231bd989fc715e627fa1",description:"Sandy beaches only a short drive away.",target:!1,created:"2015-06-19T14:42:54.574Z",updated:"2020-02-10T23:17:16.692Z",content_owner:"default",image:{_id:"5584231bd989fc715e627fa1",title:"Lake Michigan Beach",notes:`Lake Michigan\r +var Ie=Object.defineProperty;var Fe=(i,a,d)=>a in i?Ie(i,a,{enumerable:!0,configurable:!0,writable:!0,value:d}):i[a]=d;var H=(i,a,d)=>Fe(i,typeof a!="symbol"?a+"":a,d);import{r as R,j as l}from"./jsx-runtime-nGUw9YhZ.js";import{u as Ae}from"./uniqueId-BPI7foNJ.js";import{r as n}from"./index-BP8_t0zE.js";import{s as je}from"./styled-components.browser.esm-8MQ3dTkk.js";import{d as De}from"./Add-DakDrsh-.js";import{d as ke}from"./Create-CpnV7q0W.js";import{i as M}from"./styled-hJgfyZIG.js";import{r as I}from"./createSvgIcon-DE5yaevU.js";import{d as ne}from"./Delete-Bd9yuHmM.js";import{M as se,J as le,c as Le}from"./MultiSelectHelper-RF8UoF_G.js";import{a as fe,D as Ve}from"./ColorSelected-DERcqfqY.js";import{D as $}from"./index-C36bqT4L.js";import{D as Ze}from"./DataViewFilterSingleSelect-D3SYGgnd.js";import{D as B}from"./DataViewFilterText-CCoJQ17F.js";import"./index-CV8e2Lol.js";import{u as Oe}from"./useMosaicSettings-BhwODcT2.js";import{M as Be}from"./useMosaicTranslation-CZCb37QS.js";import{u as Ge,F as We}from"./Form-DI4diVc8.js";import{k as x,c as pe,l as Ue,m as Ne,i as Je,b as Q}from"./column_transforms-DwNjIJnr.js";import{t as ee}from"./testIds-DZf96GK8.js";import{D as qe}from"./DataViewFilterNumber-B7ljKOlC.js";import{D as ae}from"./DataViewFilterMultiselect-CauoR39J.js";var U={},Ye=M;Object.defineProperty(U,"__esModule",{value:!0});var be=U.default=void 0,ze=Ye(I()),Xe=R();be=U.default=(0,ze.default)((0,Xe.jsx)("path",{d:"M21 12.4V7l-4-4H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h7.4zM15 15c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3M6 6h9v4H6zm13.99 10.25 1.77 1.77L16.77 23H15v-1.77zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71"}),"SaveAs");var N={},Ke=M;Object.defineProperty(N,"__esModule",{value:!0});var ge=N.default=void 0,He=Ke(I()),$e=R();ge=N.default=(0,He.default)((0,$e.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp");var J={},Qe=M;Object.defineProperty(J,"__esModule",{value:!0});var ue=J.default=void 0,ea=Qe(I()),aa=R();ue=J.default=(0,ea.default)((0,aa.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility");var q={},ia=M;Object.defineProperty(q,"__esModule",{value:!0});var _e=q.default=void 0,ta=ia(I()),ra=R();_e=q.default=(0,ta.default)((0,ra.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");const da=[{_id:"55842aafd989fc715e628959",title:"Sandy beaches of Lake Michigan only a short drive away.",categories_ids:["5594402c3c392ffe4438cbd8","55943f9f3c392ffe4438cae2","559c3acce3bd4253522eb134","55873d4ad989fc715e63fa2d"],image_id:"5584231bd989fc715e627fa1",description:"Sandy beaches only a short drive away.",target:!1,created:"2015-06-19T14:42:54.574Z",updated:"2020-02-10T23:17:16.692Z",content_owner:"default",image:{_id:"5584231bd989fc715e627fa1",title:"Lake Michigan Beach",notes:`Lake Michigan\r Holland\r Muskegon\r Grand Haven\r diff --git a/sb8/qa/assets/DataViewFilterDate-CL8OtlEy.js b/sb8/qa/assets/DataViewFilterDate-CL8OtlEy.js deleted file mode 100644 index 38b3ad9852..0000000000 --- a/sb8/qa/assets/DataViewFilterDate-CL8OtlEy.js +++ /dev/null @@ -1,8 +0,0 @@ -import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as r}from"./index-3-_tf5dF.js";import{M as p,C as s}from"./index-CGWOAm_e.js";import{s as a,P as m}from"./DataViewFilterDate.stories-DgC0Tat0.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./index-DgDEFTzX.js";import"./theme-DRtZtbPc.js";import"./ColorSelected-DyTCIv8L.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./index-BU7KlZI9.js";import"./debounce-DO3dP4oK.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useId-DLncWxdO.js";import"./Chip-CRqL1Gcl.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useToggle-lipGlewK.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./TitleWrapper-CYciWRcJ.js";import"./containerQuery-C0QVV4Kt.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./Form-CV-BOiW8.js";import"./SideNav-D66jd1x5.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./DataViewPrimaryFilter-Bhm_12OS.js";function i(e){const o={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...r(),...e.components};return t.jsxs(t.Fragment,{children:[t.jsx(p,{of:a}),` -`,t.jsx(o.h1,{id:"dataviewfilterdate",children:"DataViewFilterDate"}),` -`,t.jsxs(o.p,{children:[t.jsx(o.code,{children:"DataViewFilterDate"}),' is a filter that can be used to select records between a set of dates. The filter also allows developers to pass a specific set of "magic values" that when clicked will automatically set a date (e.g. "Today", "Last 2 months", etc). For more please take a look at the props. The ',t.jsx(o.code,{children:"args"})," object takes an optional ",t.jsx(o.code,{children:"minDate"})," prop which can be used to define a minimum date that can be chosen using the datepicker. By default, the minimum date is 01/01/1900."]}),` -`,t.jsx(o.h2,{id:"props",children:"Props"}),` -`,t.jsxs(o.p,{children:["All filters in ",t.jsx(o.code,{children:"DataView"})," have a shared props definition. You will need to pass the appropriate ",t.jsx(o.code,{children:"data"}),", ",t.jsx(o.code,{children:"args"})," and ",t.jsx(o.code,{children:"onChange"})," specific to this filter type."]}),` -`,t.jsx(o.p,{children:t.jsx(o.a,{href:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/DataViewFilterDate/DataViewFilterDateTypes.ts",rel:"nofollow",children:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/DataViewFilterDate/DataViewFilterDateTypes.ts"})}),` -`,t.jsx(o.p,{children:"To see how to use this component, go to any of its stories, make sure you’re on the “Canvas” tab (top left) and look for the “Story” addon (should be next to the knobs, if you can’t see any addons click on the menu to the right of the storybook logo, then make sure “Show addons” is active)."}),` -`,t.jsx(s,{of:m})]})}function vt(e={}){const{wrapper:o}={...r(),...e.components};return o?t.jsx(o,{...e,children:t.jsx(i,{...e})}):i(e)}export{vt as default}; diff --git a/sb8/qa/assets/DataViewFilterDate-DAKF-JSr.js b/sb8/qa/assets/DataViewFilterDate-DAKF-JSr.js new file mode 100644 index 0000000000..cb05f591d3 --- /dev/null +++ b/sb8/qa/assets/DataViewFilterDate-DAKF-JSr.js @@ -0,0 +1,8 @@ +import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as r}from"./index-3-_tf5dF.js";import{M as s,C as p}from"./index-vCrdABUF.js";import{s as a,P as m}from"./DataViewFilterDate.stories-DcOwcaYR.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./index-C36bqT4L.js";import"./theme-DRtZtbPc.js";import"./ColorSelected-DERcqfqY.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./formControlState-DyMXFR7f.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./TitleWrapper-CYciWRcJ.js";import"./containerQuery-C0QVV4Kt.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./Form-DI4diVc8.js";import"./SideNav-D66jd1x5.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./DataViewPrimaryFilter-Bhm_12OS.js";function i(e){const o={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...r(),...e.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{of:a}),` +`,t.jsx(o.h1,{id:"dataviewfilterdate",children:"DataViewFilterDate"}),` +`,t.jsxs(o.p,{children:[t.jsx(o.code,{children:"DataViewFilterDate"}),' is a filter that can be used to select records between a set of dates. The filter also allows developers to pass a specific set of "magic values" that when clicked will automatically set a date (e.g. "Today", "Last 2 months", etc). For more please take a look at the props. The ',t.jsx(o.code,{children:"args"})," object takes an optional ",t.jsx(o.code,{children:"minDate"})," prop which can be used to define a minimum date that can be chosen using the datepicker. By default, the minimum date is 01/01/1900."]}),` +`,t.jsx(o.h2,{id:"props",children:"Props"}),` +`,t.jsxs(o.p,{children:["All filters in ",t.jsx(o.code,{children:"DataView"})," have a shared props definition. You will need to pass the appropriate ",t.jsx(o.code,{children:"data"}),", ",t.jsx(o.code,{children:"args"})," and ",t.jsx(o.code,{children:"onChange"})," specific to this filter type."]}),` +`,t.jsx(o.p,{children:t.jsx(o.a,{href:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/DataViewFilterDate/DataViewFilterDateTypes.ts",rel:"nofollow",children:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/DataViewFilterDate/DataViewFilterDateTypes.ts"})}),` +`,t.jsx(o.p,{children:"To see how to use this component, go to any of its stories, make sure you’re on the “Canvas” tab (top left) and look for the “Story” addon (should be next to the knobs, if you can’t see any addons click on the menu to the right of the storybook logo, then make sure “Show addons” is active)."}),` +`,t.jsx(p,{of:m})]})}function gt(e={}){const{wrapper:o}={...r(),...e.components};return o?t.jsx(o,{...e,children:t.jsx(i,{...e})}):i(e)}export{gt as default}; diff --git a/sb8/qa/assets/DataViewFilterDate.stories-DgC0Tat0.js b/sb8/qa/assets/DataViewFilterDate.stories-DcOwcaYR.js similarity index 98% rename from sb8/qa/assets/DataViewFilterDate.stories-DgC0Tat0.js rename to sb8/qa/assets/DataViewFilterDate.stories-DcOwcaYR.js index 27d89bbdc8..dd00f72d1d 100644 --- a/sb8/qa/assets/DataViewFilterDate.stories-DgC0Tat0.js +++ b/sb8/qa/assets/DataViewFilterDate.stories-DcOwcaYR.js @@ -1,4 +1,4 @@ -import{j as l}from"./jsx-runtime-nGUw9YhZ.js";import{r as b}from"./index-BP8_t0zE.js";import{D as u}from"./index-DgDEFTzX.js";const f={title:"Components/DataViewFilterDate"},m=[{label:"Today",value:"today"},{label:"Yesterday",value:"yesterday"},{label:"Tomorrow",value:"tomorrow"},{label:"A really really long time ago",value:"a_really_really_long_time_ago"},{label:"Last year",value:"last_year"},{label:"Last 2 years",value:"last_2_years"},{label:"Last 3 years",value:"last_3_years"},{label:"Last 4 years",value:"last_4_years"},{label:"Last 5 years",value:"last_5_years"},{label:"Last 6 years",value:"last_6_years"},{label:"Last 7 years",value:"last_7_years"},{label:"Last 8 years",value:"last_8_years"},{label:"Last 9 years",value:"last_9_years"}],e=({showOptions:t})=>{const[o,r]=b.useState({}),n=m.slice(0,t),a=function(i){r(i)};return l.jsx(u,{label:"Date filter example",data:o,args:{options:t>0?n:void 0},onChange:a})};e.args={showOptions:0};e.argTypes={showOptions:{name:"Number of options to show",control:{type:"range",min:0,max:m.length}}};const s=()=>{const[t,o]=b.useState({regular:{},options:{}}),r=[{label:"Today",value:"today"},{label:"Yesterday",value:"yesterday"},{label:"Tomorrow",value:"tomorrow"},{label:"Last year",value:"last_year"},{label:"Last 2 years",value:"last_2_years"},{label:"Last 3 years",value:"last_3_years"}],n=function(a,i){const v={...t,[a]:i};o(v)};return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsx(u,{label:"Regular Date filter",data:t.regular,onChange:a=>n("regular",a),args:{options:void 0}}),l.jsx(u,{label:"Date filter with options",data:t.options,args:{options:r},onChange:a=>n("options",a)})]})};var y,p,c;e.parameters={...e.parameters,docs:{...(y=e.parameters)==null?void 0:y.docs,source:{originalSource:`({ +import{j as l}from"./jsx-runtime-nGUw9YhZ.js";import{r as b}from"./index-BP8_t0zE.js";import{D as u}from"./index-C36bqT4L.js";const f={title:"Components/DataViewFilterDate"},m=[{label:"Today",value:"today"},{label:"Yesterday",value:"yesterday"},{label:"Tomorrow",value:"tomorrow"},{label:"A really really long time ago",value:"a_really_really_long_time_ago"},{label:"Last year",value:"last_year"},{label:"Last 2 years",value:"last_2_years"},{label:"Last 3 years",value:"last_3_years"},{label:"Last 4 years",value:"last_4_years"},{label:"Last 5 years",value:"last_5_years"},{label:"Last 6 years",value:"last_6_years"},{label:"Last 7 years",value:"last_7_years"},{label:"Last 8 years",value:"last_8_years"},{label:"Last 9 years",value:"last_9_years"}],e=({showOptions:t})=>{const[o,r]=b.useState({}),n=m.slice(0,t),a=function(i){r(i)};return l.jsx(u,{label:"Date filter example",data:o,args:{options:t>0?n:void 0},onChange:a})};e.args={showOptions:0};e.argTypes={showOptions:{name:"Number of options to show",control:{type:"range",min:0,max:m.length}}};const s=()=>{const[t,o]=b.useState({regular:{},options:{}}),r=[{label:"Today",value:"today"},{label:"Yesterday",value:"yesterday"},{label:"Tomorrow",value:"tomorrow"},{label:"Last year",value:"last_year"},{label:"Last 2 years",value:"last_2_years"},{label:"Last 3 years",value:"last_3_years"}],n=function(a,i){const v={...t,[a]:i};o(v)};return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsx(u,{label:"Regular Date filter",data:t.regular,onChange:a=>n("regular",a),args:{options:void 0}}),l.jsx(u,{label:"Date filter with options",data:t.options,args:{options:r},onChange:a=>n("options",a)})]})};var y,p,c;e.parameters={...e.parameters,docs:{...(y=e.parameters)==null?void 0:y.docs,source:{originalSource:`({ showOptions }: typeof Playground.args): ReactElement => { const [state, setState] = useState({}); diff --git a/sb8/qa/assets/DataViewFilterMultiselect-BsQipn6V.js b/sb8/qa/assets/DataViewFilterMultiselect-BsQipn6V.js deleted file mode 100644 index 2ee9052167..0000000000 --- a/sb8/qa/assets/DataViewFilterMultiselect-BsQipn6V.js +++ /dev/null @@ -1,8 +0,0 @@ -import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as r}from"./index-3-_tf5dF.js";import{M as s,C as p}from"./index-CGWOAm_e.js";import{s as n,P as m}from"./DataViewFilterMultiselect.stories-C7izyXi5.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./index-BU7KlZI9.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./theme-DRtZtbPc.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./debounce-DO3dP4oK.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useId-DLncWxdO.js";import"./Chip-CRqL1Gcl.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useToggle-lipGlewK.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./MultiSelectHelper-DmwpeCwC.js";import"./DataViewFilterMultiselect-B6wYHAKN.js";import"./DataViewPrimaryFilter-Bhm_12OS.js";function e(i){const o={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...r(),...i.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{of:n}),` -`,t.jsx(o.h1,{id:"dataviewfiltermultiselect",children:"DataViewFilterMultiselect"}),` -`,t.jsxs(o.p,{children:[t.jsx(o.code,{children:"DataViewFilterMultiselect"})," is a filter that can be used to pick multiple values from an array of options."]}),` -`,t.jsx(o.h2,{id:"props",children:"Props"}),` -`,t.jsxs(o.p,{children:["All filters in ",t.jsx(o.code,{children:"DataView"})," have a shared props definition. You will need to pass the appropriate ",t.jsx(o.code,{children:"data"}),", ",t.jsx(o.code,{children:"args"})," and ",t.jsx(o.code,{children:"onChange"})," specific to this filter type."]}),` -`,t.jsx(o.p,{children:t.jsx(o.a,{href:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/DataViewFilterMultiselect/DataViewFilterMultiselectTypes.ts",rel:"nofollow",children:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/DataViewFilterMultiselect/DataViewFilterMultiselectTypes.ts"})}),` -`,t.jsx(o.p,{children:"To see how to use this component, go to any of its stories, make sure you’re on the “Canvas” tab (top left) and look for the “Story” addon (should be next to the knobs, if you can’t see any addons click on the menu to the right of the storybook logo, then make sure “Show addons” is active)."}),` -`,t.jsx(p,{of:m})]})}function rt(i={}){const{wrapper:o}={...r(),...i.components};return o?t.jsx(o,{...i,children:t.jsx(e,{...i})}):e(i)}export{rt as default}; diff --git a/sb8/qa/assets/DataViewFilterMultiselect-B6wYHAKN.js b/sb8/qa/assets/DataViewFilterMultiselect-CauoR39J.js similarity index 96% rename from sb8/qa/assets/DataViewFilterMultiselect-B6wYHAKN.js rename to sb8/qa/assets/DataViewFilterMultiselect-CauoR39J.js index 6fcdea755e..78dfbb526b 100644 --- a/sb8/qa/assets/DataViewFilterMultiselect-B6wYHAKN.js +++ b/sb8/qa/assets/DataViewFilterMultiselect-CauoR39J.js @@ -1 +1 @@ -import{j as a}from"./jsx-runtime-nGUw9YhZ.js";import{r as u}from"./index-BP8_t0zE.js";import{D as p}from"./DataViewPrimaryFilter-Bhm_12OS.js";import{D as w}from"./index-BU7KlZI9.js";import{D}from"./FormFieldText.styled-Cq8lzkgl.js";const b=[{label:"In",value:"in"},{label:"Not In",value:"not_in"},{label:"All",value:"all"},{label:"Exists",value:"exists"},{label:"Not Exists",value:"not_exists"}],O={in:"",not_in:"Not In - ",all:"All - "};function F(e){var c,r;const[t,l]=u.useState({anchorEl:null,selected:[],dropdownOpen:!1}),d=e.data.value||[],s=e.data.comparison||"in";u.useEffect(()=>{async function n(){const h=await e.args.getSelected(d);l(E=>({...E,selected:h}))}n()},[e.data]);const m=function(n){l({...t,anchorEl:n.currentTarget})},i=function(){l({...t,anchorEl:null})},f=function(){l({...t,dropdownOpen:!0})},x=function(){l({...t,dropdownOpen:!1})},g=function(n){n.value.length>0||n.comparison==="exists"||n.comparison==="not_exists"?e.onChange(n):e.onChange(void 0),i()};let o;s==="exists"?o="EXISTS":s==="not_exists"?o="NOT EXISTS":t.selected.length>0?o=`${O[s]}${(c=t.selected[0])==null?void 0:c.label}`:o="";const v=e.args&&e.args.comparisons?b.filter(n=>e.args.comparisons.includes(n.value)):void 0;return a.jsxs("span",{children:[a.jsx(p,{label:e.label,value:o,onClick:m,multiselect:t==null?void 0:t.selected}),a.jsx(D,{anchorEl:t.anchorEl,onClose:i,onEntered:f,onExited:x,children:a.jsx(w,{comparison:s,comparisons:v,selected:t.selected,getOptions:e.args.getOptions,isOpen:t.dropdownOpen,onApply:g,placeholder:(r=e.args)==null?void 0:r.placeholder,limit:e.args.limit})})]})}export{F as D}; +import{j as a}from"./jsx-runtime-nGUw9YhZ.js";import{r as u}from"./index-BP8_t0zE.js";import{D as p}from"./DataViewPrimaryFilter-Bhm_12OS.js";import{D as w}from"./index-CV8e2Lol.js";import{D}from"./FormFieldText.styled-Cq8lzkgl.js";const b=[{label:"In",value:"in"},{label:"Not In",value:"not_in"},{label:"All",value:"all"},{label:"Exists",value:"exists"},{label:"Not Exists",value:"not_exists"}],O={in:"",not_in:"Not In - ",all:"All - "};function F(e){var c,r;const[t,l]=u.useState({anchorEl:null,selected:[],dropdownOpen:!1}),d=e.data.value||[],s=e.data.comparison||"in";u.useEffect(()=>{async function n(){const h=await e.args.getSelected(d);l(E=>({...E,selected:h}))}n()},[e.data]);const m=function(n){l({...t,anchorEl:n.currentTarget})},i=function(){l({...t,anchorEl:null})},f=function(){l({...t,dropdownOpen:!0})},x=function(){l({...t,dropdownOpen:!1})},g=function(n){n.value.length>0||n.comparison==="exists"||n.comparison==="not_exists"?e.onChange(n):e.onChange(void 0),i()};let o;s==="exists"?o="EXISTS":s==="not_exists"?o="NOT EXISTS":t.selected.length>0?o=`${O[s]}${(c=t.selected[0])==null?void 0:c.label}`:o="";const v=e.args&&e.args.comparisons?b.filter(n=>e.args.comparisons.includes(n.value)):void 0;return a.jsxs("span",{children:[a.jsx(p,{label:e.label,value:o,onClick:m,multiselect:t==null?void 0:t.selected}),a.jsx(D,{anchorEl:t.anchorEl,onClose:i,onEntered:f,onExited:x,children:a.jsx(w,{comparison:s,comparisons:v,selected:t.selected,getOptions:e.args.getOptions,isOpen:t.dropdownOpen,onApply:g,placeholder:(r=e.args)==null?void 0:r.placeholder,limit:e.args.limit})})]})}export{F as D}; diff --git a/sb8/qa/assets/DataViewFilterMultiselect-m9o243jr.js b/sb8/qa/assets/DataViewFilterMultiselect-m9o243jr.js new file mode 100644 index 0000000000..0d97b272dc --- /dev/null +++ b/sb8/qa/assets/DataViewFilterMultiselect-m9o243jr.js @@ -0,0 +1,8 @@ +import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as r}from"./index-3-_tf5dF.js";import{M as s,C as n}from"./index-vCrdABUF.js";import{s as p,P as m}from"./DataViewFilterMultiselect.stories-Dydvm6ni.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./theme-DRtZtbPc.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./formControlState-DyMXFR7f.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./MultiSelectHelper-RF8UoF_G.js";import"./DataViewFilterMultiselect-CauoR39J.js";import"./DataViewPrimaryFilter-Bhm_12OS.js";function e(i){const o={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...r(),...i.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{of:p}),` +`,t.jsx(o.h1,{id:"dataviewfiltermultiselect",children:"DataViewFilterMultiselect"}),` +`,t.jsxs(o.p,{children:[t.jsx(o.code,{children:"DataViewFilterMultiselect"})," is a filter that can be used to pick multiple values from an array of options."]}),` +`,t.jsx(o.h2,{id:"props",children:"Props"}),` +`,t.jsxs(o.p,{children:["All filters in ",t.jsx(o.code,{children:"DataView"})," have a shared props definition. You will need to pass the appropriate ",t.jsx(o.code,{children:"data"}),", ",t.jsx(o.code,{children:"args"})," and ",t.jsx(o.code,{children:"onChange"})," specific to this filter type."]}),` +`,t.jsx(o.p,{children:t.jsx(o.a,{href:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/DataViewFilterMultiselect/DataViewFilterMultiselectTypes.ts",rel:"nofollow",children:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/DataViewFilterMultiselect/DataViewFilterMultiselectTypes.ts"})}),` +`,t.jsx(o.p,{children:"To see how to use this component, go to any of its stories, make sure you’re on the “Canvas” tab (top left) and look for the “Story” addon (should be next to the knobs, if you can’t see any addons click on the menu to the right of the storybook logo, then make sure “Show addons” is active)."}),` +`,t.jsx(n,{of:m})]})}function et(i={}){const{wrapper:o}={...r(),...i.components};return o?t.jsx(o,{...i,children:t.jsx(e,{...i})}):e(i)}export{et as default}; diff --git a/sb8/qa/assets/DataViewFilterMultiselect.stories-C7izyXi5.js b/sb8/qa/assets/DataViewFilterMultiselect.stories-Dydvm6ni.js similarity index 96% rename from sb8/qa/assets/DataViewFilterMultiselect.stories-C7izyXi5.js rename to sb8/qa/assets/DataViewFilterMultiselect.stories-Dydvm6ni.js index 239f91a731..41435e1d95 100644 --- a/sb8/qa/assets/DataViewFilterMultiselect.stories-C7izyXi5.js +++ b/sb8/qa/assets/DataViewFilterMultiselect.stories-Dydvm6ni.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-nGUw9YhZ.js";import{r as m}from"./index-BP8_t0zE.js";import"./index-BU7KlZI9.js";import{M as _,J as f,c as b}from"./MultiSelectHelper-DmwpeCwC.js";import{D as u}from"./DataViewFilterMultiselect-B6wYHAKN.js";const y={title:"Components/DataViewFilterMultiselect"},x=new f(b),e=new _({api:x,labelColumn:"tag",valueColumn:"id",sortColumn:"sort_tag"}),i=({showComparisons:s,limit:c})=>{const[n,r]=m.useState({comparison:"in",value:[]}),p=function(o){if(o===void 0)return r({...n,comparison:"",value:[]});r({...n,comparison:o.comparison||n.comparison,value:o.value})};return a.jsx(a.Fragment,{children:a.jsx(u,{label:"Multi Select Category",args:{getOptions:e.getOptions.bind(e),getSelected:e.getSelected.bind(e),comparisons:s&&["in","not_in","all","exists","not_exists"],limit:c},data:n,onChange:o=>p(o)},"multi_select_category")})};i.args={showComparisons:!1,limit:25};const l=()=>{const[s,c]=m.useState({comparison:"in",value:[]}),[n,r]=m.useState({comparison:"in",value:[]}),p=function(t){if(t===void 0)return c({...s,comparison:"",value:[]});c({...s,comparison:t.comparison||s.comparison,value:t.value})},o=function(t){if(t===void 0)return r({...n,comparison:"",value:[]});r({...n,comparison:t.comparison||n.comparison,value:t.value})};return a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Hide comparison selector"}),a.jsx(u,{label:"Multi Select Category Without Comparisons",args:{getOptions:e.getOptions.bind(e),getSelected:e.getSelected.bind(e)},data:s,onChange:t=>p(t)},"multi_select_category"),a.jsx("h2",{children:"Show comparison selector"}),a.jsx(u,{label:"Multi Select Category With Comparisons",args:{getOptions:e.getOptions.bind(e),getSelected:e.getSelected.bind(e),comparisons:["in","not_in","all","exists","not_exists"]},data:n,onChange:t=>o(t)},"multi_select_category_with_comparisons")]})};var g,d,S;i.parameters={...i.parameters,docs:{...(g=i.parameters)==null?void 0:g.docs,source:{originalSource:`({ +import{j as a}from"./jsx-runtime-nGUw9YhZ.js";import{r as m}from"./index-BP8_t0zE.js";import"./index-CV8e2Lol.js";import{M as _,J as f,c as b}from"./MultiSelectHelper-RF8UoF_G.js";import{D as u}from"./DataViewFilterMultiselect-CauoR39J.js";const y={title:"Components/DataViewFilterMultiselect"},x=new f(b),e=new _({api:x,labelColumn:"tag",valueColumn:"id",sortColumn:"sort_tag"}),i=({showComparisons:s,limit:c})=>{const[n,r]=m.useState({comparison:"in",value:[]}),p=function(o){if(o===void 0)return r({...n,comparison:"",value:[]});r({...n,comparison:o.comparison||n.comparison,value:o.value})};return a.jsx(a.Fragment,{children:a.jsx(u,{label:"Multi Select Category",args:{getOptions:e.getOptions.bind(e),getSelected:e.getSelected.bind(e),comparisons:s&&["in","not_in","all","exists","not_exists"],limit:c},data:n,onChange:o=>p(o)},"multi_select_category")})};i.args={showComparisons:!1,limit:25};const l=()=>{const[s,c]=m.useState({comparison:"in",value:[]}),[n,r]=m.useState({comparison:"in",value:[]}),p=function(t){if(t===void 0)return c({...s,comparison:"",value:[]});c({...s,comparison:t.comparison||s.comparison,value:t.value})},o=function(t){if(t===void 0)return r({...n,comparison:"",value:[]});r({...n,comparison:t.comparison||n.comparison,value:t.value})};return a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Hide comparison selector"}),a.jsx(u,{label:"Multi Select Category Without Comparisons",args:{getOptions:e.getOptions.bind(e),getSelected:e.getSelected.bind(e)},data:s,onChange:t=>p(t)},"multi_select_category"),a.jsx("h2",{children:"Show comparison selector"}),a.jsx(u,{label:"Multi Select Category With Comparisons",args:{getOptions:e.getOptions.bind(e),getSelected:e.getSelected.bind(e),comparisons:["in","not_in","all","exists","not_exists"]},data:n,onChange:t=>o(t)},"multi_select_category_with_comparisons")]})};var g,d,S;i.parameters={...i.parameters,docs:{...(g=i.parameters)==null?void 0:g.docs,source:{originalSource:`({ showComparisons, limit }: typeof Playground.args): ReactElement => { diff --git a/sb8/qa/assets/DataViewFilterNumber-BRF6XiVs.js b/sb8/qa/assets/DataViewFilterNumber-B7ljKOlC.js similarity index 96% rename from sb8/qa/assets/DataViewFilterNumber-BRF6XiVs.js rename to sb8/qa/assets/DataViewFilterNumber-B7ljKOlC.js index 911fa3d959..981a42c7c8 100644 --- a/sb8/qa/assets/DataViewFilterNumber-BRF6XiVs.js +++ b/sb8/qa/assets/DataViewFilterNumber-B7ljKOlC.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-nGUw9YhZ.js";import{r as n}from"./index-BP8_t0zE.js";import{D as E}from"./DataViewPrimaryFilter-Bhm_12OS.js";import{a as F,D as j}from"./FormFieldText.styled-Cq8lzkgl.js";import{s as w,B as x}from"./theme-DRtZtbPc.js";import{u as V,V as p,F as N}from"./Form-CV-BOiW8.js";import{t as y}from"./testIds-DZf96GK8.js";const A=w.div` +import{j as s}from"./jsx-runtime-nGUw9YhZ.js";import{r as n}from"./index-BP8_t0zE.js";import{D as E}from"./DataViewPrimaryFilter-Bhm_12OS.js";import{a as F,D as j}from"./FormFieldText.styled-Cq8lzkgl.js";import{s as w,B as x}from"./theme-DRtZtbPc.js";import{u as V,V as p,F as N}from"./Form-DI4diVc8.js";import{t as y}from"./testIds-DZf96GK8.js";const A=w.div` display: flex; flex-direction: column; justify-content: space-between; diff --git a/sb8/qa/assets/DataViewFilterNumber-Db9AapSJ.js b/sb8/qa/assets/DataViewFilterNumber-Db9AapSJ.js new file mode 100644 index 0000000000..84199c8d93 --- /dev/null +++ b/sb8/qa/assets/DataViewFilterNumber-Db9AapSJ.js @@ -0,0 +1,2 @@ +import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as m}from"./index-3-_tf5dF.js";import{M as p}from"./index-vCrdABUF.js";import{s as e}from"./DataViewFilterNumber.stories-CcLy8RTp.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./DataViewFilterNumber-B7ljKOlC.js";import"./DataViewPrimaryFilter-Bhm_12OS.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./theme-DRtZtbPc.js";import"./Button-DuMlbF8s.js";import"./ButtonBase-BP_P9WLq.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./testIds-DZf96GK8.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./useMosaicTranslation-CZCb37QS.js";import"./formControlState-DyMXFR7f.js";import"./Form-DI4diVc8.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./Chip-CRqL1Gcl.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./ColorSelected-DERcqfqY.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./FormFieldNumber.stories-BrqMQ9MV.js";import"./renderButtons-BmHfsf_z.js";function i(t){const r={h1:"h1",...m(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(p,{of:e}),` +`,o.jsx(r.h1,{id:"dataviewfilternumber",children:"DataViewFilterNumber"})]})}function Xt(t={}){const{wrapper:r}={...m(),...t.components};return r?o.jsx(r,{...t,children:o.jsx(i,{...t})}):i(t)}export{Xt as default}; diff --git a/sb8/qa/assets/DataViewFilterNumber-_ueFXW2q.js b/sb8/qa/assets/DataViewFilterNumber-_ueFXW2q.js deleted file mode 100644 index 65f3daf911..0000000000 --- a/sb8/qa/assets/DataViewFilterNumber-_ueFXW2q.js +++ /dev/null @@ -1,2 +0,0 @@ -import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as m}from"./index-3-_tf5dF.js";import{M as p}from"./index-CGWOAm_e.js";import{s as e}from"./DataViewFilterNumber.stories-Cm13wqZe.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./DataViewFilterNumber-BRF6XiVs.js";import"./DataViewPrimaryFilter-Bhm_12OS.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./theme-DRtZtbPc.js";import"./Button-DuMlbF8s.js";import"./ButtonBase-BP_P9WLq.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./testIds-DZf96GK8.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./useMosaicTranslation-CZCb37QS.js";import"./formControlState-DyMXFR7f.js";import"./Form-CV-BOiW8.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./ButtonRow-CP4CrsnB.js";import"./Chip-CRqL1Gcl.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./index-BU7KlZI9.js";import"./debounce-DO3dP4oK.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./ColorSelected-DyTCIv8L.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./FormFieldNumber.stories-Csf0gWQQ.js";import"./renderButtons-BmHfsf_z.js";function i(t){const r={h1:"h1",...m(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(p,{of:e}),` -`,o.jsx(r.h1,{id:"dataviewfilternumber",children:"DataViewFilterNumber"})]})}function bt(t={}){const{wrapper:r}={...m(),...t.components};return r?o.jsx(r,{...t,children:o.jsx(i,{...t})}):i(t)}export{bt as default}; diff --git a/sb8/qa/assets/DataViewFilterNumber.stories-Cm13wqZe.js b/sb8/qa/assets/DataViewFilterNumber.stories-CcLy8RTp.js similarity index 90% rename from sb8/qa/assets/DataViewFilterNumber.stories-Cm13wqZe.js rename to sb8/qa/assets/DataViewFilterNumber.stories-CcLy8RTp.js index 5993ce34cb..bbe98e4dad 100644 --- a/sb8/qa/assets/DataViewFilterNumber.stories-Cm13wqZe.js +++ b/sb8/qa/assets/DataViewFilterNumber.stories-CcLy8RTp.js @@ -1,4 +1,4 @@ -import{j as p}from"./jsx-runtime-nGUw9YhZ.js";import{r as u}from"./index-BP8_t0zE.js";import{D as c}from"./DataViewFilterNumber-BRF6XiVs.js";import{Playground as e}from"./FormFieldNumber.stories-Csf0gWQQ.js";const f={title:"Components/DataViewFilterNumber"},a=({decimalPlaces:i,prefix:n,suffix:o,sign:l})=>{const[m,g]=u.useState({});return p.jsx(c,{label:"Number filter example",data:m,args:{decimalPlaces:i,prefix:n,suffix:o,sign:l},onChange:g})};a.args={decimalPlaces:e.args.decimalPlaces,prefix:e.args.prefix,suffix:e.args.suffix,sign:e.args.sign};a.argTypes={decimalPlaces:e.argTypes.decimalPlaces,prefix:e.argTypes.prefix,suffix:e.argTypes.suffix,sign:e.argTypes.sign};var r,s,t;a.parameters={...a.parameters,docs:{...(r=a.parameters)==null?void 0:r.docs,source:{originalSource:`({ +import{j as p}from"./jsx-runtime-nGUw9YhZ.js";import{r as u}from"./index-BP8_t0zE.js";import{D as c}from"./DataViewFilterNumber-B7ljKOlC.js";import{Playground as e}from"./FormFieldNumber.stories-BrqMQ9MV.js";const f={title:"Components/DataViewFilterNumber"},a=({decimalPlaces:i,prefix:n,suffix:o,sign:l})=>{const[m,g]=u.useState({});return p.jsx(c,{label:"Number filter example",data:m,args:{decimalPlaces:i,prefix:n,suffix:o,sign:l},onChange:g})};a.args={decimalPlaces:e.args.decimalPlaces,prefix:e.args.prefix,suffix:e.args.suffix,sign:e.args.sign};a.argTypes={decimalPlaces:e.argTypes.decimalPlaces,prefix:e.argTypes.prefix,suffix:e.argTypes.suffix,sign:e.argTypes.sign};var r,s,t;a.parameters={...a.parameters,docs:{...(r=a.parameters)==null?void 0:r.docs,source:{originalSource:`({ decimalPlaces, prefix, suffix, diff --git a/sb8/qa/assets/DataViewFilterSingleSelect-on0F5d9x.js b/sb8/qa/assets/DataViewFilterSingleSelect-BNYZnb5V.js similarity index 94% rename from sb8/qa/assets/DataViewFilterSingleSelect-on0F5d9x.js rename to sb8/qa/assets/DataViewFilterSingleSelect-BNYZnb5V.js index 7487d106b5..22ae09c69a 100644 --- a/sb8/qa/assets/DataViewFilterSingleSelect-on0F5d9x.js +++ b/sb8/qa/assets/DataViewFilterSingleSelect-BNYZnb5V.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as r}from"./index-3-_tf5dF.js";import{M as n,C as s}from"./index-CGWOAm_e.js";import{s as p,P as a}from"./DataViewFilterSingleSelect.stories-DaAgu3i0.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./DataViewFilterSingleSelect-D3SYGgnd.js";import"./theme-DRtZtbPc.js";import"./DataViewPrimaryFilter-Bhm_12OS.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Button-DuMlbF8s.js";import"./ButtonBase-BP_P9WLq.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./testIds-DZf96GK8.js";function o(i){const t={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...r(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(n,{of:p}),` +import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as r}from"./index-3-_tf5dF.js";import{M as n,C as s}from"./index-vCrdABUF.js";import{s as p,P as a}from"./DataViewFilterSingleSelect.stories-DaAgu3i0.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./DataViewFilterSingleSelect-D3SYGgnd.js";import"./theme-DRtZtbPc.js";import"./DataViewPrimaryFilter-Bhm_12OS.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Button-DuMlbF8s.js";import"./ButtonBase-BP_P9WLq.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./testIds-DZf96GK8.js";function o(i){const t={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...r(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(n,{of:p}),` `,e.jsx(t.h1,{id:"dataviewfiltersingleselect",children:"DataViewFilterSingleSelect"}),` `,e.jsxs(t.p,{children:[e.jsx(t.code,{children:"DataViewFilterSingleSelect"})," is a filter that can be used to pick a single value from an array of options."]}),` `,e.jsx(t.h2,{id:"props",children:"Props"}),` diff --git a/sb8/qa/assets/DataViewFilterText-BBkxn9mO.js b/sb8/qa/assets/DataViewFilterText-ybZ_EsGC.js similarity index 95% rename from sb8/qa/assets/DataViewFilterText-BBkxn9mO.js rename to sb8/qa/assets/DataViewFilterText-ybZ_EsGC.js index b59b0f556d..8956819dad 100644 --- a/sb8/qa/assets/DataViewFilterText-BBkxn9mO.js +++ b/sb8/qa/assets/DataViewFilterText-ybZ_EsGC.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as r}from"./index-3-_tf5dF.js";import{M as s,C as n}from"./index-CGWOAm_e.js";import{s as a,P as p}from"./DataViewFilterText.stories-BtH90TiR.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./DataViewFilterText-CCoJQ17F.js";import"./DataViewPrimaryFilter-Bhm_12OS.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./theme-DRtZtbPc.js";import"./Button-DuMlbF8s.js";import"./ButtonBase-BP_P9WLq.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./testIds-DZf96GK8.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./useMosaicTranslation-CZCb37QS.js";import"./formControlState-DyMXFR7f.js";import"./sizes-C6oSOElx.js";function i(e){const o={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...r(),...e.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{of:a}),` +import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as r}from"./index-3-_tf5dF.js";import{M as s,C as n}from"./index-vCrdABUF.js";import{s as a,P as p}from"./DataViewFilterText.stories-BtH90TiR.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./DataViewFilterText-CCoJQ17F.js";import"./DataViewPrimaryFilter-Bhm_12OS.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./theme-DRtZtbPc.js";import"./Button-DuMlbF8s.js";import"./ButtonBase-BP_P9WLq.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./testIds-DZf96GK8.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./useMosaicTranslation-CZCb37QS.js";import"./formControlState-DyMXFR7f.js";import"./sizes-C6oSOElx.js";function i(e){const o={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...r(),...e.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{of:a}),` `,t.jsx(o.h1,{id:"dataviewfiltertext",children:"DataViewFilterText"}),` `,t.jsxs(o.p,{children:[t.jsx(o.code,{children:"DataViewFilterText"})," is a filter that can be used to show the records that match with a string (varies depending on the comparison selected)."]}),` `,t.jsx(o.h2,{id:"props",children:"Props"}),` diff --git a/sb8/qa/assets/DateField-DkCPGkwj.js b/sb8/qa/assets/DateField-8nd5V-aW.js similarity index 56% rename from sb8/qa/assets/DateField-DkCPGkwj.js rename to sb8/qa/assets/DateField-8nd5V-aW.js index b259998cb5..b131e9a755 100644 --- a/sb8/qa/assets/DateField-DkCPGkwj.js +++ b/sb8/qa/assets/DateField-8nd5V-aW.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as o}from"./index-3-_tf5dF.js";import{M as n}from"./index-CGWOAm_e.js";import{s as d}from"./DateField.stories-D4s33Jds.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./Form-CV-BOiW8.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useMosaicTranslation-CZCb37QS.js";import"./createSvgIcon-Pzp5yWPs.js";import"./useId-DLncWxdO.js";import"./ButtonRow-CP4CrsnB.js";import"./Chip-CRqL1Gcl.js";import"./sizes-C6oSOElx.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./index-BU7KlZI9.js";import"./debounce-DO3dP4oK.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./ColorSelected-DyTCIv8L.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./renderButtons-BmHfsf_z.js";function e(i){const r={a:"a",code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...o(),...i.components};return t.jsxs(t.Fragment,{children:[t.jsx(n,{of:d}),` +import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as o}from"./index-3-_tf5dF.js";import{M as n}from"./index-vCrdABUF.js";import{s as d}from"./DateField.stories-SlunRSWe.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./Form-DI4diVc8.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./formControlState-DyMXFR7f.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./ColorSelected-DERcqfqY.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./renderButtons-BmHfsf_z.js";function e(i){const r={a:"a",code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...o(),...i.components};return t.jsxs(t.Fragment,{children:[t.jsx(n,{of:d}),` `,t.jsx(r.h1,{id:"date",children:"Date"}),` `,t.jsxs(r.p,{children:["This field implements the ",t.jsx(r.a,{href:"#generic-field-props-fielddef",children:t.jsx(r.strong,{children:"FieldDef"})})," interface."]}),` `,t.jsxs(r.ul,{children:[` @@ -24,4 +24,4 @@ import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as o}from" ],\r []\r ); -`})})]})}function Dt(i={}){const{wrapper:r}={...o(),...i.components};return r?t.jsx(r,{...i,children:t.jsx(e,{...i})}):e(i)}export{Dt as default}; +`})})]})}function yt(i={}){const{wrapper:r}={...o(),...i.components};return r?t.jsx(r,{...i,children:t.jsx(e,{...i})}):e(i)}export{yt as default}; diff --git a/sb8/qa/assets/DateField.stories-D4s33Jds.js b/sb8/qa/assets/DateField.stories-SlunRSWe.js similarity index 98% rename from sb8/qa/assets/DateField.stories-D4s33Jds.js rename to sb8/qa/assets/DateField.stories-SlunRSWe.js index d32b959a6e..ceb70f9079 100644 --- a/sb8/qa/assets/DateField.stories-D4s33Jds.js +++ b/sb8/qa/assets/DateField.stories-SlunRSWe.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as l}from"./index-BP8_t0zE.js";import{u as q,t as v,F as j}from"./Form-CV-BOiW8.js";import{r as M}from"./renderButtons-BmHfsf_z.js";import{D as I}from"./formats-sBod7wm8.js";const P={title:"FormFields/FormFieldDateField"},R={date:new Date(2024,12,25,11,30)},a=({label:i,required:t,skeleton:p,disabled:n,instructionText:r,prepopulate:d,helperText:s,showTime:u,minDateStr:m,defaultTime:c})=>{const h=q(),{state:k,handleSubmit:$}=h,O=l.useMemo(()=>d?async()=>R:void 0,[d]),b=l.useMemo(()=>{if(!m||!v(m,I))return;const[T,f,V]=m.split("/");return new Date(V,T-1,f)},[m]),x=l.useMemo(()=>{if(!/\d{4}/.test(c))return;const[,T,f]=c.match(/(\d{2})(\d{2})/);return`${T}:${f}`},[c]),_=l.useMemo(()=>[{name:"date",type:"date",label:i,required:t,disabled:n,helperText:s,instructionText:r,inputSettings:{showTime:u,minDate:b,defaultTime:x}}],[i,t,n,s,r,u,b,x]);return e.jsxs(e.Fragment,{children:[e.jsx("pre",{children:JSON.stringify(k,null," ")}),e.jsx(j,{...h,buttons:M($),title:"Date Field",fields:_,skeleton:p,getFormValues:O})]})};a.args={label:"Label",disabled:!1,required:!1,skeleton:!1,instructionText:"Instruction text",prepopulate:!1,helperText:"Helper text",showTime:!1,minDateStr:"",defaultTime:""};a.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},instructionText:{name:"Instruction Text"},prepopulate:{name:"Prepopulate"},helperText:{name:"Helper Text"},showTime:{name:"Show Time"},minDateStr:{name:"Minimum Date"},defaultTime:{name:"Default Time"}};const E=async()=>({dateTimePrefilled:new Date("2023-07-31T14:00:00.000Z")}),o=()=>{const i=q(),{state:t,handleSubmit:p}=i,n="Helper text",r="Instruction text",d=l.useMemo(()=>[{name:"singleDate",type:"date",label:"Single Date Calendar",required:!1,disabled:!1,helperText:n,instructionText:r,inputSettings:{showTime:!1}},{name:"dateTime",type:"date",label:"Date Time Input",required:!1,disabled:!1,helperText:n,instructionText:r,inputSettings:{showTime:!0}},{name:"dateTimePrefilled",type:"date",label:"Date Time with preset values",required:!1,disabled:!1,helperText:n,instructionText:r,inputSettings:{showTime:!0}},{name:"requiredDateTime",type:"date",label:"Required Single Date Calendar",required:!0,disabled:!1,helperText:n,instructionText:r,inputSettings:{showTime:!0}}],[]);return e.jsxs(e.Fragment,{children:[e.jsx(j,{...i,buttons:M(p),title:"Date Field Calendar",description:"This is a description example",fields:d,getFormValues:E}),e.jsx("h3",{children:"Date.toString()"}),e.jsx("pre",{children:Object.keys(t.data).map((s,u)=>e.jsxs("div",{children:[s,":"," ",t.data[s]&&t.data[s].toString()]},u))}),e.jsx("h3",{children:"State"}),e.jsx("pre",{children:JSON.stringify(t,null," ")})]})};var g,D,S;a.parameters={...a.parameters,docs:{...(g=a.parameters)==null?void 0:g.docs,source:{originalSource:`({ +import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as l}from"./index-BP8_t0zE.js";import{u as q,t as v,F as j}from"./Form-DI4diVc8.js";import{r as M}from"./renderButtons-BmHfsf_z.js";import{D as I}from"./formats-sBod7wm8.js";const P={title:"FormFields/FormFieldDateField"},R={date:new Date(2024,12,25,11,30)},a=({label:i,required:t,skeleton:p,disabled:n,instructionText:r,prepopulate:d,helperText:s,showTime:u,minDateStr:m,defaultTime:c})=>{const h=q(),{state:k,handleSubmit:$}=h,O=l.useMemo(()=>d?async()=>R:void 0,[d]),b=l.useMemo(()=>{if(!m||!v(m,I))return;const[T,f,V]=m.split("/");return new Date(V,T-1,f)},[m]),x=l.useMemo(()=>{if(!/\d{4}/.test(c))return;const[,T,f]=c.match(/(\d{2})(\d{2})/);return`${T}:${f}`},[c]),_=l.useMemo(()=>[{name:"date",type:"date",label:i,required:t,disabled:n,helperText:s,instructionText:r,inputSettings:{showTime:u,minDate:b,defaultTime:x}}],[i,t,n,s,r,u,b,x]);return e.jsxs(e.Fragment,{children:[e.jsx("pre",{children:JSON.stringify(k,null," ")}),e.jsx(j,{...h,buttons:M($),title:"Date Field",fields:_,skeleton:p,getFormValues:O})]})};a.args={label:"Label",disabled:!1,required:!1,skeleton:!1,instructionText:"Instruction text",prepopulate:!1,helperText:"Helper text",showTime:!1,minDateStr:"",defaultTime:""};a.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},instructionText:{name:"Instruction Text"},prepopulate:{name:"Prepopulate"},helperText:{name:"Helper Text"},showTime:{name:"Show Time"},minDateStr:{name:"Minimum Date"},defaultTime:{name:"Default Time"}};const E=async()=>({dateTimePrefilled:new Date("2023-07-31T14:00:00.000Z")}),o=()=>{const i=q(),{state:t,handleSubmit:p}=i,n="Helper text",r="Instruction text",d=l.useMemo(()=>[{name:"singleDate",type:"date",label:"Single Date Calendar",required:!1,disabled:!1,helperText:n,instructionText:r,inputSettings:{showTime:!1}},{name:"dateTime",type:"date",label:"Date Time Input",required:!1,disabled:!1,helperText:n,instructionText:r,inputSettings:{showTime:!0}},{name:"dateTimePrefilled",type:"date",label:"Date Time with preset values",required:!1,disabled:!1,helperText:n,instructionText:r,inputSettings:{showTime:!0}},{name:"requiredDateTime",type:"date",label:"Required Single Date Calendar",required:!0,disabled:!1,helperText:n,instructionText:r,inputSettings:{showTime:!0}}],[]);return e.jsxs(e.Fragment,{children:[e.jsx(j,{...i,buttons:M(p),title:"Date Field Calendar",description:"This is a description example",fields:d,getFormValues:E}),e.jsx("h3",{children:"Date.toString()"}),e.jsx("pre",{children:Object.keys(t.data).map((s,u)=>e.jsxs("div",{children:[s,":"," ",t.data[s]&&t.data[s].toString()]},u))}),e.jsx("h3",{children:"State"}),e.jsx("pre",{children:JSON.stringify(t,null," ")})]})};var g,D,S;a.parameters={...a.parameters,docs:{...(g=a.parameters)==null?void 0:g.docs,source:{originalSource:`({ label, required, skeleton, diff --git a/sb8/qa/assets/Dialog-ClZZoRRz.js b/sb8/qa/assets/Dialog-CLqCL8Td.js similarity index 94% rename from sb8/qa/assets/Dialog-ClZZoRRz.js rename to sb8/qa/assets/Dialog-CLqCL8Td.js index 04a37b570f..889441b4b0 100644 --- a/sb8/qa/assets/Dialog-ClZZoRRz.js +++ b/sb8/qa/assets/Dialog-CLqCL8Td.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as s}from"./index-3-_tf5dF.js";import{M as e,C as n}from"./index-CGWOAm_e.js";import{s as a,P as p}from"./Dialog.stories-Dj32z5yF.js";import"./index-BP8_t0zE.js";import"./iframe-pNl7__mS.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./Dialog-BI8WLJ8j.js";import"./Button-DuMlbF8s.js";import"./theme-DRtZtbPc.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./useId-DLncWxdO.js";function r(t){const i={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...s(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(e,{of:a}),` +import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as s}from"./index-3-_tf5dF.js";import{M as e,C as n}from"./index-vCrdABUF.js";import{s as a,P as p}from"./Dialog.stories-Dj32z5yF.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./Dialog-BI8WLJ8j.js";import"./Button-DuMlbF8s.js";import"./theme-DRtZtbPc.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./useId-DLncWxdO.js";function r(t){const i={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...s(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(e,{of:a}),` `,o.jsx(i.h1,{id:"dialog",children:"Dialog"}),` `,o.jsxs(i.p,{children:["The ",o.jsx(i.code,{children:"Dialog"})," component is built over a wrapper for ",o.jsx(i.a,{href:"https://mui.com/components/dialogs/",rel:"nofollow",children:"Material-UI Dialog"})," but with SimpleView brand colors."]}),` `,o.jsx(i.p,{children:`A dialog is a type of modal window that appears in front of app content to provide critical information or ask for a decision.\r diff --git a/sb8/qa/assets/DocsRenderer-K4EAMTCU-BMcUCSyb.js b/sb8/qa/assets/DocsRenderer-K4EAMTCU-BDAkdMYL.js similarity index 86% rename from sb8/qa/assets/DocsRenderer-K4EAMTCU-BMcUCSyb.js rename to sb8/qa/assets/DocsRenderer-K4EAMTCU-BDAkdMYL.js index 2fa3b1ccec..c340b44067 100644 --- a/sb8/qa/assets/DocsRenderer-K4EAMTCU-BMcUCSyb.js +++ b/sb8/qa/assets/DocsRenderer-K4EAMTCU-BDAkdMYL.js @@ -1,2 +1,2 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-3-_tf5dF.js","./index-BP8_t0zE.js"])))=>i.map(i=>d[i]); -import{_ as p}from"./iframe-pNl7__mS.js";import{a as e,r as c}from"./index-BP8_t0zE.js";import{r as u,u as l}from"./react-18-DDrzupZ7.js";import{d as h,A as d,H as E,D as x}from"./index-CGWOAm_e.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";var D={code:h,a:d,...E},_=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},T=class{constructor(){this.render=async(t,r,n)=>{let s={...D,...r==null?void 0:r.components},m=x;return new Promise((i,a)=>{p(async()=>{const{MDXProvider:o}=await import("./index-3-_tf5dF.js");return{MDXProvider:o}},__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:o})=>u(e.createElement(_,{showException:a,key:Math.random()},e.createElement(o,{components:s},e.createElement(m,{context:t,docsParameter:r}))),n)).then(()=>i())})},this.unmount=t=>{l(t)}}};export{T as DocsRenderer,D as defaultComponents}; +import{_ as p}from"./iframe-C5lwtss6.js";import{a as e,r as c}from"./index-BP8_t0zE.js";import{r as u,u as l}from"./react-18-DDrzupZ7.js";import{d as h,A as d,H as E,D as x}from"./index-vCrdABUF.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";var D={code:h,a:d,...E},_=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},T=class{constructor(){this.render=async(t,r,n)=>{let s={...D,...r==null?void 0:r.components},m=x;return new Promise((i,a)=>{p(async()=>{const{MDXProvider:o}=await import("./index-3-_tf5dF.js");return{MDXProvider:o}},__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:o})=>u(e.createElement(_,{showException:a,key:Math.random()},e.createElement(o,{components:s},e.createElement(m,{context:t,docsParameter:r}))),n)).then(()=>i())})},this.unmount=t=>{l(t)}}};export{T as DocsRenderer,D as defaultComponents}; diff --git a/sb8/qa/assets/DrawerForm.stories-BiW5O-Pu.js b/sb8/qa/assets/DrawerForm.stories-XiMucFio.js similarity index 83% rename from sb8/qa/assets/DrawerForm.stories-BiW5O-Pu.js rename to sb8/qa/assets/DrawerForm.stories-XiMucFio.js index 280853c119..ca5952205f 100644 --- a/sb8/qa/assets/DrawerForm.stories-BiW5O-Pu.js +++ b/sb8/qa/assets/DrawerForm.stories-XiMucFio.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as p}from"./index-BP8_t0zE.js";import{u as F,v as T,F as P}from"./Form-CV-BOiW8.js";import{B as k}from"./Button-DuMlbF8s.js";import{D as A}from"./ColorSelected-DyTCIv8L.js";import{t as l,B as t}from"./theme-DRtZtbPc.js";import{u as D}from"./uniqueId-BPI7foNJ.js";import{S as o}from"./sizes-C6oSOElx.js";import{g as M,a as N}from"./optionGetters-DXvNsMp-.js";import{s as z}from"./styled-components.browser.esm-8MQ3dTkk.js";import{d as H}from"./AddCircleOutline-CXqn0GBH.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./CheckboxList-Dbk8JkiG.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-CODv9_Wr.js";import"./FormControlLabel-f9znFBMA.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./formControlState-DyMXFR7f.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-BVsvmf2Q.js";import"./useTheme-Cud-ikZw.js";import"./createSvgIcon-BcZTMgP9.js";import"./testIds-DZf96GK8.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./useMosaicTranslation-CZCb37QS.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useId-DLncWxdO.js";import"./Popper-BWFpCfKc.js";import"./index-BxmsGmlx.js";import"./ButtonRow-CP4CrsnB.js";import"./Chip-CRqL1Gcl.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./index-BU7KlZI9.js";import"./debounce-DO3dP4oK.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./MoreVert-gv79E1WA.js";import"./PageHeader-DvUko4so.js";import"./ChevronRight-bPXdPGpY.js";import"./toString-BjCnz-8e.js";import"./tslib.es6-CRos2fHm.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./styled-hJgfyZIG.js";import"./extends-CF3RwP-h.js";import"./createSvgIcon-DE5yaevU.js";const Je={title:"Components/Form"},n={type:"text",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",required:!0,inputSettings:{maxCharacters:20}},m={type:"address",required:!0,inputSettings:{getOptionsCountries:M,getOptionsStates:N,googleMapsApiKey:"AIzaSyArV4f-KFF86Zn9VWAu9wS4hHlG1TXxqac"}},a={type:"mapCoordinates",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",inputSettings:{googleMapsApiKey:"AIzaSyArV4f-KFF86Zn9VWAu9wS4hHlG1TXxqac"}},c=z.h2` +import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as p}from"./index-BP8_t0zE.js";import{u as F,v as T,F as P}from"./Form-DI4diVc8.js";import{B as k}from"./Button-DuMlbF8s.js";import{D as A}from"./ColorSelected-DERcqfqY.js";import{t as l,B as t}from"./theme-DRtZtbPc.js";import{u as D}from"./uniqueId-BPI7foNJ.js";import{S as o}from"./sizes-C6oSOElx.js";import{g as M,a as N}from"./optionGetters-DXvNsMp-.js";import{s as z}from"./styled-components.browser.esm-8MQ3dTkk.js";import{d as H}from"./AddCircleOutline-CXqn0GBH.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./formControlState-DyMXFR7f.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./index-BxmsGmlx.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./MoreVert-gv79E1WA.js";import"./PageHeader-DvUko4so.js";import"./ChevronRight-bPXdPGpY.js";import"./toString-BjCnz-8e.js";import"./tslib.es6-CRos2fHm.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./styled-hJgfyZIG.js";import"./extends-CF3RwP-h.js";import"./createSvgIcon-DE5yaevU.js";const $e={title:"Components/Form"},n={type:"text",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",required:!0,inputSettings:{maxCharacters:20}},m={type:"address",required:!0,inputSettings:{getOptionsCountries:M,getOptionsStates:N,googleMapsApiKey:"AIzaSyArV4f-KFF86Zn9VWAu9wS4hHlG1TXxqac"}},a={type:"mapCoordinates",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",inputSettings:{googleMapsApiKey:"AIzaSyArV4f-KFF86Zn9VWAu9wS4hHlG1TXxqac"}},c=z.h2` font-family: ${l.museoFont}; font-size: 26px; font-weight: ${l.fontWeight.light}; @@ -308,4 +308,4 @@ import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as p}from"./index-BP8_t0z