@namroodinc/liquid-editorial 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -5
- package/UPGRADING.md +372 -0
- package/dist/chunks/{Avatar-DdFEOumt.js → Avatar-6t78C9Np.js} +2 -2
- package/dist/chunks/{Avatar-DdFEOumt.js.map → Avatar-6t78C9Np.js.map} +1 -1
- package/dist/chunks/{Avatar-B_2lI7fS.cjs → Avatar-Cvj_DqG0.cjs} +2 -2
- package/dist/chunks/{Avatar-B_2lI7fS.cjs.map → Avatar-Cvj_DqG0.cjs.map} +1 -1
- package/dist/chunks/CollectionView-B18Ihv7X.cjs +2 -0
- package/dist/chunks/CollectionView-B18Ihv7X.cjs.map +1 -0
- package/dist/chunks/{CollectionView-Cr12UFWa.js → CollectionView-C-SwkPWC.js} +28 -29
- package/dist/chunks/CollectionView-C-SwkPWC.js.map +1 -0
- package/dist/chunks/ColourField-Dohdx7eW.cjs +2 -0
- package/dist/chunks/ColourField-Dohdx7eW.cjs.map +1 -0
- package/dist/chunks/{ColourField-B-tjjBfA.js → ColourField-DzZ--mQZ.js} +122 -122
- package/dist/chunks/ColourField-DzZ--mQZ.js.map +1 -0
- package/dist/chunks/DatePicker-Bjc4D8Kg.cjs +2 -0
- package/dist/chunks/DatePicker-Bjc4D8Kg.cjs.map +1 -0
- package/dist/chunks/DatePicker-DZVOtzoU.js +298 -0
- package/dist/chunks/DatePicker-DZVOtzoU.js.map +1 -0
- package/dist/chunks/Drawer-CcVF_p4b.cjs +2 -0
- package/dist/chunks/Drawer-CcVF_p4b.cjs.map +1 -0
- package/dist/chunks/Drawer-uhJvy3s9.js +172 -0
- package/dist/chunks/Drawer-uhJvy3s9.js.map +1 -0
- package/dist/chunks/EntryPicker-CBquan7o.js +685 -0
- package/dist/chunks/EntryPicker-CBquan7o.js.map +1 -0
- package/dist/chunks/EntryPicker-Dq72wjTt.cjs +2 -0
- package/dist/chunks/EntryPicker-Dq72wjTt.cjs.map +1 -0
- package/dist/chunks/FormEditor-CTcnpR51.cjs +2 -0
- package/dist/chunks/FormEditor-CTcnpR51.cjs.map +1 -0
- package/dist/chunks/{FormEditor-ucTbDyQt.js → FormEditor-D0J3JN-H.js} +177 -160
- package/dist/chunks/FormEditor-D0J3JN-H.js.map +1 -0
- package/dist/chunks/{LoadState-B7GTDlWv.js → LoadState-B056EPu7.js} +20 -19
- package/dist/chunks/LoadState-B056EPu7.js.map +1 -0
- package/dist/chunks/LoadState-BXLG-SkQ.cjs +2 -0
- package/dist/chunks/LoadState-BXLG-SkQ.cjs.map +1 -0
- package/dist/chunks/NumberField-CVsK4l9P.js +178 -0
- package/dist/chunks/NumberField-CVsK4l9P.js.map +1 -0
- package/dist/chunks/NumberField-Ccjpa_1d.cjs +2 -0
- package/dist/chunks/NumberField-Ccjpa_1d.cjs.map +1 -0
- package/dist/chunks/{RichTextEditor-CNkwWist.js → RichTextEditor-B6H6_3wk.js} +28 -28
- package/dist/chunks/{RichTextEditor-CNkwWist.js.map → RichTextEditor-B6H6_3wk.js.map} +1 -1
- package/dist/chunks/RichTextEditor-BIopdEDA.cjs +2 -0
- package/dist/chunks/RichTextEditor-BIopdEDA.cjs.map +1 -0
- package/dist/chunks/dialogLabel-3EeaH1Zl.cjs +2 -0
- package/dist/chunks/dialogLabel-3EeaH1Zl.cjs.map +1 -0
- package/dist/chunks/dialogLabel-BjtTix5C.js +176 -0
- package/dist/chunks/dialogLabel-BjtTix5C.js.map +1 -0
- package/dist/chunks/frame-BtIh7K-M.cjs +2 -0
- package/dist/chunks/frame-BtIh7K-M.cjs.map +1 -0
- package/dist/chunks/frame-CycTDnzE.js +164 -0
- package/dist/chunks/frame-CycTDnzE.js.map +1 -0
- package/dist/chunks/{group-C6EOgTgM.js → group-67F_I1yw.js} +3 -3
- package/dist/chunks/{group-C6EOgTgM.js.map → group-67F_I1yw.js.map} +1 -1
- package/dist/chunks/{group-QSnlx4jX.cjs → group-BSJHLagi.cjs} +2 -2
- package/dist/chunks/{group-QSnlx4jX.cjs.map → group-BSJHLagi.cjs.map} +1 -1
- package/dist/chunks/limit-BBnpe9o9.cjs +2 -0
- package/dist/chunks/limit-BBnpe9o9.cjs.map +1 -0
- package/dist/chunks/limit-BHHST_0G.js +15 -0
- package/dist/chunks/limit-BHHST_0G.js.map +1 -0
- package/dist/chunks/overlayLayer-BgnMskpk.js +158 -0
- package/dist/chunks/overlayLayer-BgnMskpk.js.map +1 -0
- package/dist/chunks/overlayLayer-YVudmo27.cjs +2 -0
- package/dist/chunks/overlayLayer-YVudmo27.cjs.map +1 -0
- package/dist/chunks/{useLimit-BOmHKdJE.js → useLimit-C471qZ4H.js} +2 -2
- package/dist/chunks/useLimit-C471qZ4H.js.map +1 -0
- package/dist/chunks/{useLimit-DXe_VmYl.cjs → useLimit-WWWDacob.cjs} +2 -2
- package/dist/chunks/useLimit-WWWDacob.cjs.map +1 -0
- package/dist/chunks/useTooltip-DajWQyNL.js +75 -0
- package/dist/chunks/useTooltip-DajWQyNL.js.map +1 -0
- package/dist/chunks/useTooltip-DtrE7QYu.cjs +2 -0
- package/dist/chunks/useTooltip-DtrE7QYu.cjs.map +1 -0
- package/dist/components/AppShell/index.cjs +1 -1
- package/dist/components/AppShell/index.cjs.map +1 -1
- package/dist/components/AppShell/index.js +4 -4
- package/dist/components/AppShell/index.js.map +1 -1
- package/dist/components/Avatar/index.cjs +1 -1
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/Badge/index.cjs +1 -1
- package/dist/components/Badge/index.cjs.map +1 -1
- package/dist/components/Badge/index.d.cts +3 -0
- package/dist/components/Badge/index.d.cts.map +1 -1
- package/dist/components/Badge/index.d.ts +3 -0
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.js +11 -10
- package/dist/components/Badge/index.js.map +1 -1
- package/dist/components/Badge/style.css +25 -2
- package/dist/components/Button/index.cjs.map +1 -1
- package/dist/components/Button/index.d.cts +4 -2
- package/dist/components/Button/index.d.cts.map +1 -1
- package/dist/components/Button/index.d.ts +4 -2
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Choice/index.cjs +1 -1
- package/dist/components/Choice/index.js +1 -1
- package/dist/components/CollectionView/filters.d.cts.map +1 -1
- package/dist/components/CollectionView/filters.d.ts.map +1 -1
- package/dist/components/CollectionView/index.cjs +1 -1
- package/dist/components/CollectionView/index.js +1 -1
- package/dist/components/ColourField/index.cjs +1 -1
- package/dist/components/ColourField/index.d.cts.map +1 -1
- package/dist/components/ColourField/index.d.ts.map +1 -1
- package/dist/components/ColourField/index.js +1 -1
- package/dist/components/DatePicker/index.cjs +1 -1
- package/dist/components/DatePicker/index.d.cts.map +1 -1
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +1 -1
- package/dist/components/Drawer/content.d.cts +27 -0
- package/dist/components/Drawer/content.d.cts.map +1 -0
- package/dist/components/Drawer/content.d.ts +27 -0
- package/dist/components/Drawer/content.d.ts.map +1 -0
- package/dist/components/Drawer/head.d.cts +10 -0
- package/dist/components/Drawer/head.d.cts.map +1 -0
- package/dist/components/Drawer/head.d.ts +10 -0
- package/dist/components/Drawer/head.d.ts.map +1 -0
- package/dist/components/Drawer/index.cjs +1 -2
- package/dist/components/Drawer/index.d.cts +21 -0
- package/dist/components/Drawer/index.d.cts.map +1 -1
- package/dist/components/Drawer/index.d.ts +21 -0
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +1 -102
- package/dist/components/Drawer/style.css +67 -0
- package/dist/components/EditLayout/index.cjs +1 -1
- package/dist/components/EditLayout/index.cjs.map +1 -1
- package/dist/components/EditLayout/index.js +10 -10
- package/dist/components/EditLayout/index.js.map +1 -1
- package/dist/components/EntryPicker/chosen.d.cts +16 -0
- package/dist/components/EntryPicker/chosen.d.cts.map +1 -0
- package/dist/components/EntryPicker/chosen.d.ts +16 -0
- package/dist/components/EntryPicker/chosen.d.ts.map +1 -0
- package/dist/components/EntryPicker/dialog.d.cts +22 -0
- package/dist/components/EntryPicker/dialog.d.cts.map +1 -0
- package/dist/components/EntryPicker/dialog.d.ts +22 -0
- package/dist/components/EntryPicker/dialog.d.ts.map +1 -0
- package/dist/components/EntryPicker/feedback.d.cts +20 -0
- package/dist/components/EntryPicker/feedback.d.cts.map +1 -0
- package/dist/components/EntryPicker/feedback.d.ts +20 -0
- package/dist/components/EntryPicker/feedback.d.ts.map +1 -0
- package/dist/components/EntryPicker/index.cjs +1 -1
- package/dist/components/EntryPicker/index.d.cts +4 -38
- package/dist/components/EntryPicker/index.d.cts.map +1 -1
- package/dist/components/EntryPicker/index.d.ts +4 -38
- package/dist/components/EntryPicker/index.d.ts.map +1 -1
- package/dist/components/EntryPicker/index.js +1 -1
- package/dist/components/EntryPicker/item.d.cts +10 -0
- package/dist/components/EntryPicker/item.d.cts.map +1 -0
- package/dist/components/EntryPicker/item.d.ts +10 -0
- package/dist/components/EntryPicker/item.d.ts.map +1 -0
- package/dist/components/EntryPicker/results.d.cts +11 -0
- package/dist/components/EntryPicker/results.d.cts.map +1 -0
- package/dist/components/EntryPicker/results.d.ts +11 -0
- package/dist/components/EntryPicker/results.d.ts.map +1 -0
- package/dist/components/EntryPicker/selected-items.d.cts +11 -0
- package/dist/components/EntryPicker/selected-items.d.cts.map +1 -0
- package/dist/components/EntryPicker/selected-items.d.ts +11 -0
- package/dist/components/EntryPicker/selected-items.d.ts.map +1 -0
- package/dist/components/EntryPicker/style.css +129 -14
- package/dist/components/EntryPicker/types.d.cts +61 -0
- package/dist/components/EntryPicker/types.d.cts.map +1 -0
- package/dist/components/EntryPicker/types.d.ts +61 -0
- package/dist/components/EntryPicker/types.d.ts.map +1 -0
- package/dist/components/EntryPicker/use-picker-data.d.cts +40 -0
- package/dist/components/EntryPicker/use-picker-data.d.cts.map +1 -0
- package/dist/components/EntryPicker/use-picker-data.d.ts +40 -0
- package/dist/components/EntryPicker/use-picker-data.d.ts.map +1 -0
- package/dist/components/EntryPicker/use-selected-items.d.cts +21 -0
- package/dist/components/EntryPicker/use-selected-items.d.cts.map +1 -0
- package/dist/components/EntryPicker/use-selected-items.d.ts +21 -0
- package/dist/components/EntryPicker/use-selected-items.d.ts.map +1 -0
- package/dist/components/Field/frame.d.cts.map +1 -1
- package/dist/components/Field/frame.d.ts.map +1 -1
- package/dist/components/Field/index.cjs +1 -1
- package/dist/components/Field/index.js +1 -1
- package/dist/components/Field/{limit-reading.d.cts → limit-announcer.d.cts} +1 -4
- package/dist/components/Field/limit-announcer.d.cts.map +1 -0
- package/dist/components/Field/{limit-reading.d.ts → limit-announcer.d.ts} +1 -4
- package/dist/components/Field/limit-announcer.d.ts.map +1 -0
- package/dist/components/Field/limit.d.cts +1 -5
- package/dist/components/Field/limit.d.cts.map +1 -1
- package/dist/components/Field/limit.d.ts +1 -5
- package/dist/components/Field/limit.d.ts.map +1 -1
- package/dist/components/Field/style.css +0 -39
- package/dist/components/Field/types.d.cts +7 -3
- package/dist/components/Field/types.d.cts.map +1 -1
- package/dist/components/Field/types.d.ts +7 -3
- package/dist/components/Field/types.d.ts.map +1 -1
- package/dist/components/Field/useLimit.d.cts +1 -1
- package/dist/components/Field/useLimit.d.cts.map +1 -1
- package/dist/components/Field/useLimit.d.ts +1 -1
- package/dist/components/Field/useLimit.d.ts.map +1 -1
- package/dist/components/FormEditor/README.md +103 -10
- package/dist/components/FormEditor/control.d.cts +3 -2
- package/dist/components/FormEditor/control.d.cts.map +1 -1
- package/dist/components/FormEditor/control.d.ts +3 -2
- package/dist/components/FormEditor/control.d.ts.map +1 -1
- package/dist/components/FormEditor/index.cjs +1 -1
- package/dist/components/FormEditor/index.d.cts +3 -2
- package/dist/components/FormEditor/index.d.cts.map +1 -1
- package/dist/components/FormEditor/index.d.ts +3 -2
- package/dist/components/FormEditor/index.d.ts.map +1 -1
- package/dist/components/FormEditor/index.js +1 -1
- package/dist/components/FormEditor/model.d.cts +14 -6
- package/dist/components/FormEditor/model.d.cts.map +1 -1
- package/dist/components/FormEditor/model.d.ts +14 -6
- package/dist/components/FormEditor/model.d.ts.map +1 -1
- package/dist/components/ImageCropper/index.cjs +1 -1
- package/dist/components/ImageCropper/index.cjs.map +1 -1
- package/dist/components/ImageCropper/index.js +6 -6
- package/dist/components/LimitReading/index.cjs +2 -0
- package/dist/components/LimitReading/index.cjs.map +1 -0
- package/dist/components/LimitReading/index.d.cts +5 -0
- package/dist/components/LimitReading/index.d.cts.map +1 -0
- package/dist/components/LimitReading/index.d.ts +5 -0
- package/dist/components/LimitReading/index.d.ts.map +1 -0
- package/dist/components/LimitReading/index.js +66 -0
- package/dist/components/LimitReading/index.js.map +1 -0
- package/dist/components/LimitReading/limit.d.cts +9 -0
- package/dist/components/LimitReading/limit.d.cts.map +1 -0
- package/dist/components/LimitReading/limit.d.ts +9 -0
- package/dist/components/LimitReading/limit.d.ts.map +1 -0
- package/dist/components/LimitReading/style.css +69 -0
- package/dist/components/LimitReading/types.d.cts +14 -0
- package/dist/components/LimitReading/types.d.cts.map +1 -0
- package/dist/components/LimitReading/types.d.ts +14 -0
- package/dist/components/LimitReading/types.d.ts.map +1 -0
- package/dist/components/LoadState/error.d.cts +3 -1
- package/dist/components/LoadState/error.d.cts.map +1 -1
- package/dist/components/LoadState/error.d.ts +3 -1
- package/dist/components/LoadState/error.d.ts.map +1 -1
- package/dist/components/LoadState/index.cjs +1 -1
- package/dist/components/LoadState/index.d.cts +3 -1
- package/dist/components/LoadState/index.d.cts.map +1 -1
- package/dist/components/LoadState/index.d.ts +3 -1
- package/dist/components/LoadState/index.d.ts.map +1 -1
- package/dist/components/LoadState/index.js +1 -1
- package/dist/components/Menu/index.cjs +1 -1
- package/dist/components/Menu/index.cjs.map +1 -1
- package/dist/components/Menu/index.d.cts.map +1 -1
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.js +50 -49
- package/dist/components/Menu/index.js.map +1 -1
- package/dist/components/Modal/index.cjs +1 -1
- package/dist/components/Modal/index.cjs.map +1 -1
- package/dist/components/Modal/index.d.cts +9 -0
- package/dist/components/Modal/index.d.cts.map +1 -1
- package/dist/components/Modal/index.d.ts +9 -0
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +71 -64
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/style.css +16 -0
- package/dist/components/NumberField/index.cjs +1 -1
- package/dist/components/NumberField/index.d.cts +1 -1
- package/dist/components/NumberField/index.d.cts.map +1 -1
- package/dist/components/NumberField/index.d.ts +1 -1
- package/dist/components/NumberField/index.d.ts.map +1 -1
- package/dist/components/NumberField/index.js +1 -1
- package/dist/components/NumberField/style.css +1 -1
- package/dist/components/Popover/index.cjs +1 -1
- package/dist/components/Popover/index.cjs.map +1 -1
- package/dist/components/Popover/index.d.cts +1 -1
- package/dist/components/Popover/index.d.cts.map +1 -1
- package/dist/components/Popover/index.d.ts +1 -1
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +57 -55
- package/dist/components/Popover/index.js.map +1 -1
- package/dist/components/Popover/style.css +6 -0
- package/dist/components/Popover/useTooltip.d.cts +2 -1
- package/dist/components/Popover/useTooltip.d.cts.map +1 -1
- package/dist/components/Popover/useTooltip.d.ts +2 -1
- package/dist/components/Popover/useTooltip.d.ts.map +1 -1
- package/dist/components/RichTextEditor/index.cjs +1 -1
- package/dist/components/RichTextEditor/index.js +1 -1
- package/dist/components/SearchField/index.cjs +1 -1
- package/dist/components/SearchField/index.cjs.map +1 -1
- package/dist/components/SearchField/index.d.cts +6 -1
- package/dist/components/SearchField/index.d.cts.map +1 -1
- package/dist/components/SearchField/index.d.ts +6 -1
- package/dist/components/SearchField/index.d.ts.map +1 -1
- package/dist/components/SearchField/index.js +32 -26
- package/dist/components/SearchField/index.js.map +1 -1
- package/dist/components/Select/index.cjs +1 -1
- package/dist/components/Select/index.cjs.map +1 -1
- package/dist/components/Select/index.d.cts.map +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +73 -72
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/SelectionCard/index.cjs +1 -1
- package/dist/components/SelectionCard/index.js +1 -1
- package/dist/components/Table/style.css +6 -1
- package/dist/components/TagsInput/index.cjs +1 -1
- package/dist/components/TagsInput/index.js +1 -1
- package/dist/components/TextField/index.cjs +1 -1
- package/dist/components/TextField/index.js +1 -1
- package/dist/components/Time/index.cjs +1 -1
- package/dist/components/Time/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +50 -48
- package/dist/internal/dialogFocus.d.cts +2 -0
- package/dist/internal/dialogFocus.d.cts.map +1 -1
- package/dist/internal/dialogFocus.d.ts +2 -0
- package/dist/internal/dialogFocus.d.ts.map +1 -1
- package/dist/internal/dialogLabel.d.cts +10 -0
- package/dist/internal/dialogLabel.d.cts.map +1 -0
- package/dist/internal/dialogLabel.d.ts +10 -0
- package/dist/internal/dialogLabel.d.ts.map +1 -0
- package/dist/internal/dialogStack.d.cts +11 -3
- package/dist/internal/dialogStack.d.cts.map +1 -1
- package/dist/internal/dialogStack.d.ts +11 -3
- package/dist/internal/dialogStack.d.ts.map +1 -1
- package/dist/internal/movableHost.d.cts +9 -5
- package/dist/internal/movableHost.d.cts.map +1 -1
- package/dist/internal/movableHost.d.ts +9 -5
- package/dist/internal/movableHost.d.ts.map +1 -1
- package/dist/internal/overlayLayer.d.cts +33 -0
- package/dist/internal/overlayLayer.d.cts.map +1 -0
- package/dist/internal/overlayLayer.d.ts +33 -0
- package/dist/internal/overlayLayer.d.ts.map +1 -0
- package/dist/internal/portalScope.d.cts.map +1 -1
- package/dist/internal/portalScope.d.ts.map +1 -1
- package/dist/internal/useDialogPortal.d.cts +9 -0
- package/dist/internal/useDialogPortal.d.cts.map +1 -0
- package/dist/internal/useDialogPortal.d.ts +9 -0
- package/dist/internal/useDialogPortal.d.ts.map +1 -0
- package/dist/internal/useLatest.d.cts +7 -0
- package/dist/internal/useLatest.d.cts.map +1 -0
- package/dist/internal/useLatest.d.ts +7 -0
- package/dist/internal/useLatest.d.ts.map +1 -0
- package/dist/internal/useModalDialog.d.cts +5 -1
- package/dist/internal/useModalDialog.d.cts.map +1 -1
- package/dist/internal/useModalDialog.d.ts +5 -1
- package/dist/internal/useModalDialog.d.ts.map +1 -1
- package/dist/styles.css +1 -0
- package/dist/tokens.css +1 -2
- package/package.json +1 -1
- package/dist/chunks/CollectionView-BIuOL917.cjs +0 -2
- package/dist/chunks/CollectionView-BIuOL917.cjs.map +0 -1
- package/dist/chunks/CollectionView-Cr12UFWa.js.map +0 -1
- package/dist/chunks/ColourField-B-tjjBfA.js.map +0 -1
- package/dist/chunks/ColourField-ynUP1pfN.cjs +0 -2
- package/dist/chunks/ColourField-ynUP1pfN.cjs.map +0 -1
- package/dist/chunks/DatePicker-01sor8iD.cjs +0 -2
- package/dist/chunks/DatePicker-01sor8iD.cjs.map +0 -1
- package/dist/chunks/DatePicker-DJAqXUDJ.js +0 -297
- package/dist/chunks/DatePicker-DJAqXUDJ.js.map +0 -1
- package/dist/chunks/EntryPicker-B88N69zH.js +0 -180
- package/dist/chunks/EntryPicker-B88N69zH.js.map +0 -1
- package/dist/chunks/EntryPicker-daSkD4aR.cjs +0 -2
- package/dist/chunks/EntryPicker-daSkD4aR.cjs.map +0 -1
- package/dist/chunks/FormEditor-C_4JbAnS.cjs +0 -2
- package/dist/chunks/FormEditor-C_4JbAnS.cjs.map +0 -1
- package/dist/chunks/FormEditor-ucTbDyQt.js.map +0 -1
- package/dist/chunks/LoadState-B7GTDlWv.js.map +0 -1
- package/dist/chunks/LoadState-C7tQ6fIP.cjs +0 -2
- package/dist/chunks/LoadState-C7tQ6fIP.cjs.map +0 -1
- package/dist/chunks/NumberField-1EYJdwDY.cjs +0 -2
- package/dist/chunks/NumberField-1EYJdwDY.cjs.map +0 -1
- package/dist/chunks/NumberField-DizR4NJv.js +0 -178
- package/dist/chunks/NumberField-DizR4NJv.js.map +0 -1
- package/dist/chunks/RichTextEditor-DAnjElUO.cjs +0 -2
- package/dist/chunks/RichTextEditor-DAnjElUO.cjs.map +0 -1
- package/dist/chunks/frame-C8TwdWBC.cjs +0 -2
- package/dist/chunks/frame-C8TwdWBC.cjs.map +0 -1
- package/dist/chunks/frame-DaC03_n-.js +0 -203
- package/dist/chunks/frame-DaC03_n-.js.map +0 -1
- package/dist/chunks/limit-BX6-o1a2.cjs +0 -2
- package/dist/chunks/limit-BX6-o1a2.cjs.map +0 -1
- package/dist/chunks/limit-ChteDN4T.js +0 -18
- package/dist/chunks/limit-ChteDN4T.js.map +0 -1
- package/dist/chunks/movableHost-CajG9_5Z.cjs +0 -2
- package/dist/chunks/movableHost-CajG9_5Z.cjs.map +0 -1
- package/dist/chunks/movableHost-NJj_FsAu.js +0 -23
- package/dist/chunks/movableHost-NJj_FsAu.js.map +0 -1
- package/dist/chunks/portalScope-AzzPM54i.js +0 -105
- package/dist/chunks/portalScope-AzzPM54i.js.map +0 -1
- package/dist/chunks/portalScope-BVA1-Ypu.cjs +0 -2
- package/dist/chunks/portalScope-BVA1-Ypu.cjs.map +0 -1
- package/dist/chunks/useLimit-BOmHKdJE.js.map +0 -1
- package/dist/chunks/useLimit-DXe_VmYl.cjs.map +0 -1
- package/dist/chunks/useModalDialog-Cgus9408.cjs +0 -2
- package/dist/chunks/useModalDialog-Cgus9408.cjs.map +0 -1
- package/dist/chunks/useModalDialog-Dh-_6A0j.js +0 -85
- package/dist/chunks/useModalDialog-Dh-_6A0j.js.map +0 -1
- package/dist/chunks/useTooltip-C5gvEoYk.js +0 -74
- package/dist/chunks/useTooltip-C5gvEoYk.js.map +0 -1
- package/dist/chunks/useTooltip-bTE_a2Xn.cjs +0 -2
- package/dist/chunks/useTooltip-bTE_a2Xn.cjs.map +0 -1
- package/dist/components/Drawer/index.cjs.map +0 -1
- package/dist/components/Drawer/index.js.map +0 -1
- package/dist/components/Field/limit-reading.d.cts.map +0 -1
- package/dist/components/Field/limit-reading.d.ts.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Button as e } from "../components/Button/index.js";
|
|
2
2
|
import { Field as t } from "../components/Field/index.js";
|
|
3
3
|
import { TextArea as n, TextField as r } from "../components/TextField/index.js";
|
|
4
|
-
import { n as i, r as a, t as o } from "./RichTextEditor-
|
|
4
|
+
import { n as i, r as a, t as o } from "./RichTextEditor-B6H6_3wk.js";
|
|
5
5
|
import { Container as s } from "../components/Container/index.js";
|
|
6
|
-
import { n as c, t as l } from "./EntryPicker-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { CheckboxCard as
|
|
6
|
+
import { n as c, t as l } from "./EntryPicker-CBquan7o.js";
|
|
7
|
+
import { Checkbox as u, ChoiceGroup as d, Radio as f } from "../components/Choice/index.js";
|
|
8
|
+
import { n as p } from "./decimal-hq_W9D3s.js";
|
|
9
|
+
import { t as m } from "./NumberField-CVsK4l9P.js";
|
|
10
|
+
import { Select as h } from "../components/Select/index.js";
|
|
11
|
+
import { Switch as g } from "../components/Switch/index.js";
|
|
12
|
+
import { i as _ } from "./colour-CYEF4Q_n.js";
|
|
13
|
+
import { t as v } from "./ColourField-DzZ--mQZ.js";
|
|
14
|
+
import { i as y, n as b, r as ee, t as x } from "./Slider-Cab6NqhK.js";
|
|
15
|
+
import { a as S, n as C } from "./DatePicker-DZVOtzoU.js";
|
|
16
|
+
import { TagsInput as w } from "../components/TagsInput/index.js";
|
|
17
|
+
import { CheckboxCard as te, RadioCard as ne, SelectionCardGroup as re } from "../components/SelectionCard/index.js";
|
|
18
18
|
import { useMemo as T, useState as E } from "react";
|
|
19
19
|
import { Fragment as ie, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
20
20
|
//#region src/components/RichTextEditor/expanded-width.ts
|
|
@@ -22,7 +22,7 @@ var ae = ["wide", "full"], oe = [
|
|
|
22
22
|
"sm",
|
|
23
23
|
"md",
|
|
24
24
|
"lg"
|
|
25
|
-
],
|
|
25
|
+
], se = /* @__PURE__ */ new Set([
|
|
26
26
|
"shortText",
|
|
27
27
|
"longText",
|
|
28
28
|
"richText",
|
|
@@ -41,88 +41,101 @@ var ae = ["wide", "full"], oe = [
|
|
|
41
41
|
"date",
|
|
42
42
|
"divider"
|
|
43
43
|
]);
|
|
44
|
-
function
|
|
44
|
+
function k(e) {
|
|
45
45
|
let t = /* @__PURE__ */ new Set();
|
|
46
46
|
for (let n of e.fields) {
|
|
47
47
|
if (!n.id?.trim() || t.has(n.id)) throw Error("Form field IDs must be nonempty and unique.");
|
|
48
|
-
if (!
|
|
49
|
-
n.type !== "divider" && (
|
|
48
|
+
if (!se.has(n.type)) throw Error(`Unsupported form field type: ${n.type}`);
|
|
49
|
+
n.type !== "divider" && (ce(n), N(n), ue(n)), t.add(n.id);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function ce(e) {
|
|
53
53
|
switch (e.type) {
|
|
54
54
|
case "select":
|
|
55
55
|
case "radioGroup":
|
|
56
|
-
case "checkboxGroup": return
|
|
56
|
+
case "checkboxGroup": return I(e);
|
|
57
57
|
case "slider":
|
|
58
|
-
case "rangeSlider": return
|
|
59
|
-
case "number": return
|
|
58
|
+
case "rangeSlider": return P(e);
|
|
59
|
+
case "number": return F(e);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
var
|
|
62
|
+
var le = /* @__PURE__ */ new Set([
|
|
63
63
|
"shortText",
|
|
64
64
|
"longText",
|
|
65
65
|
"tags",
|
|
66
66
|
"asset",
|
|
67
67
|
"reference"
|
|
68
68
|
]);
|
|
69
|
-
function
|
|
70
|
-
return
|
|
69
|
+
function A(e) {
|
|
70
|
+
return le.has(e.type);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
if (
|
|
72
|
+
function ue(e) {
|
|
73
|
+
if (A(e)) {
|
|
74
74
|
if (e.limitDisplay !== void 0 && !["used", "remaining"].includes(e.limitDisplay)) throw Error(`Field ${e.id} needs a limitDisplay of used or remaining.`);
|
|
75
75
|
if (e.limitVisibility !== void 0 && !["always", "nearLimit"].includes(e.limitVisibility)) throw Error(`Field ${e.id} needs a limitVisibility of always or nearLimit.`);
|
|
76
76
|
if (e.showLimitRing !== void 0 && typeof e.showLimitRing != "boolean") throw Error(`Field ${e.id} needs a boolean showLimitRing.`);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
return
|
|
79
|
+
function de(e, t, n, r) {
|
|
80
|
+
return A(e) ? {
|
|
81
81
|
limitDisplay: e.limitDisplay,
|
|
82
82
|
limitVisibility: e.limitVisibility,
|
|
83
83
|
showLimitRing: e.showLimitRing,
|
|
84
|
-
limit:
|
|
84
|
+
limit: fe(e, t, n ?? [], r)
|
|
85
85
|
} : {};
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function fe(e, t, n, r) {
|
|
88
88
|
switch (e.type) {
|
|
89
89
|
case "shortText":
|
|
90
90
|
case "longText": return e.maxLength === void 0 ? void 0 : {
|
|
91
|
-
count:
|
|
91
|
+
count: j(t).length,
|
|
92
92
|
max: e.maxLength
|
|
93
93
|
};
|
|
94
94
|
case "tags": return e.max === void 0 ? void 0 : {
|
|
95
95
|
count: J(t).length,
|
|
96
96
|
max: e.max
|
|
97
97
|
};
|
|
98
|
-
default:
|
|
98
|
+
default: {
|
|
99
|
+
if (!e.multiple) return null;
|
|
100
|
+
let { mode: t, max: i } = M(e, r);
|
|
101
|
+
return c(t, n.length, i);
|
|
102
|
+
}
|
|
99
103
|
}
|
|
100
104
|
}
|
|
101
|
-
function
|
|
105
|
+
function j(e) {
|
|
102
106
|
return typeof e == "string" ? e : "";
|
|
103
107
|
}
|
|
104
|
-
function
|
|
105
|
-
|
|
108
|
+
function M(e, t) {
|
|
109
|
+
let n = t?.mode ?? (e.multiple ? "multiple" : "single");
|
|
110
|
+
if (!e.multiple) return {
|
|
111
|
+
mode: n,
|
|
112
|
+
max: n === "multiple" ? 1 : void 0
|
|
113
|
+
};
|
|
114
|
+
let r = [z(e).max, t?.max].filter((e) => e !== void 0);
|
|
115
|
+
return {
|
|
116
|
+
mode: n,
|
|
117
|
+
max: r.length > 0 ? Math.min(...r) : void 0
|
|
118
|
+
};
|
|
106
119
|
}
|
|
107
|
-
function
|
|
120
|
+
function N(e) {
|
|
108
121
|
if (e.width !== void 0 && !oe.includes(e.width)) throw Error(`Field ${e.id} needs a width of sm, md or lg.`);
|
|
109
122
|
if (e.type === "richText" && e.expandedWidth !== void 0 && !ae.includes(e.expandedWidth)) throw Error(`Rich text field ${e.id} needs an expandedWidth of wide or full.`);
|
|
110
123
|
}
|
|
111
|
-
function
|
|
112
|
-
let { min: t, max: n, step: r } =
|
|
124
|
+
function P(e) {
|
|
125
|
+
let { min: t, max: n, step: r } = y(e);
|
|
113
126
|
if (![
|
|
114
127
|
t,
|
|
115
128
|
n,
|
|
116
129
|
r
|
|
117
130
|
].every(Number.isFinite) || t >= n || r <= 0) throw Error(`Slider field ${e.id} needs finite min < max and a positive step.`);
|
|
118
|
-
if (e.type === "rangeSlider" && r >
|
|
131
|
+
if (e.type === "rangeSlider" && r > p(n, -t)) throw Error(`Range slider ${e.id} needs room for at least one step.`);
|
|
119
132
|
}
|
|
120
|
-
function
|
|
133
|
+
function F(e) {
|
|
121
134
|
let { min: t, max: n, step: r = "any" } = e;
|
|
122
135
|
if ([t, n].some((e) => e !== void 0 && !Number.isFinite(e)) || t !== void 0 && n !== void 0 && t > n || r !== "any" && !(Number.isFinite(r) && r > 0)) throw Error(`Number field ${e.id} needs finite min <= max and a positive step or "any".`);
|
|
123
136
|
if ([e.decreaseLabel, e.increaseLabel].some((e) => e !== void 0 && (typeof e != "string" || !e.trim()))) throw Error(`Number field ${e.id} needs nonempty stepper labels.`);
|
|
124
137
|
}
|
|
125
|
-
function
|
|
138
|
+
function I(e) {
|
|
126
139
|
if (!Array.isArray(e.options)) {
|
|
127
140
|
let t = e.type === "select" ? "Select" : "Choice";
|
|
128
141
|
throw Error(`${t} field ${e.id} needs an options array.`);
|
|
@@ -131,7 +144,7 @@ function L(e) {
|
|
|
131
144
|
let t = e.options.map((e) => e.value);
|
|
132
145
|
if (t.some((e) => typeof e != "string" || !e.trim()) || new Set(t).size !== t.length) throw Error(`Choice field ${e.id} needs nonempty, unique option values.`);
|
|
133
146
|
}
|
|
134
|
-
var
|
|
147
|
+
var L = {
|
|
135
148
|
asset: {
|
|
136
149
|
key: "assetId",
|
|
137
150
|
itemLabel: "asset",
|
|
@@ -143,11 +156,11 @@ var R = {
|
|
|
143
156
|
itemsLabel: "entries"
|
|
144
157
|
}
|
|
145
158
|
};
|
|
146
|
-
function
|
|
159
|
+
function R(e) {
|
|
147
160
|
return e.type === "asset" || e.type === "reference" ? e.picker?.label ?? e.label : e.label;
|
|
148
161
|
}
|
|
149
|
-
function
|
|
150
|
-
let t =
|
|
162
|
+
function z(e) {
|
|
163
|
+
let t = L[e.type], { addLabel: n = `Choose ${R(e)}`, emptyLabel: r, itemLabel: i = t.itemLabel, itemsLabel: a = t.itemsLabel, max: o, isReorderable: s } = e.picker ?? {};
|
|
151
164
|
return {
|
|
152
165
|
addLabel: n,
|
|
153
166
|
emptyLabel: r,
|
|
@@ -157,39 +170,39 @@ function B(e) {
|
|
|
157
170
|
isReorderable: s
|
|
158
171
|
};
|
|
159
172
|
}
|
|
160
|
-
function
|
|
161
|
-
let { key: n } =
|
|
162
|
-
return (Array.isArray(t) ? t : t === void 0 ? [] : [t]).flatMap((e) =>
|
|
173
|
+
function B(e, t) {
|
|
174
|
+
let { key: n } = L[e.type];
|
|
175
|
+
return (Array.isArray(t) ? t : t === void 0 ? [] : [t]).flatMap((e) => H(e, n) ? [e[n]] : []);
|
|
163
176
|
}
|
|
164
|
-
function
|
|
177
|
+
function V(e) {
|
|
165
178
|
if (typeof e != "string") return;
|
|
166
179
|
let t = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(?:Z|\+00:00)$/.exec(e);
|
|
167
180
|
if (!t) return;
|
|
168
181
|
let n = `${t[1]}:${t[2] ?? "00"}.${(t[3] ?? "").padEnd(3, "0")}Z`, r = new Date(n);
|
|
169
182
|
if (Number.isFinite(r.getTime()) && r.toISOString() === n) return n;
|
|
170
183
|
}
|
|
171
|
-
function
|
|
184
|
+
function H(e, t) {
|
|
172
185
|
return !!e && typeof e == "object" && t in e && typeof e[t] == "string" && e[t].trim().length > 0;
|
|
173
186
|
}
|
|
174
|
-
function
|
|
175
|
-
return !!e.text?.trim() || e.type === "horizontalRule" || !!e.content?.some(
|
|
187
|
+
function U(e) {
|
|
188
|
+
return !!e.text?.trim() || e.type === "horizontalRule" || !!e.content?.some(U);
|
|
176
189
|
}
|
|
177
|
-
function
|
|
178
|
-
return `${
|
|
190
|
+
function W(e) {
|
|
191
|
+
return `${R(e)} is required.`;
|
|
179
192
|
}
|
|
180
|
-
function
|
|
193
|
+
function G(e, t) {
|
|
181
194
|
if (typeof t != "string") return "Enter text.";
|
|
182
|
-
if (e.required && !t.trim()) return
|
|
195
|
+
if (e.required && !t.trim()) return W(e);
|
|
183
196
|
if ((e.type === "shortText" || e.type === "longText") && e.maxLength !== void 0 && t.length > e.maxLength) return `Enter no more than ${e.maxLength} characters.`;
|
|
184
197
|
}
|
|
185
|
-
function
|
|
198
|
+
function K(e, t) {
|
|
186
199
|
let n = i(t);
|
|
187
200
|
if (n) return n;
|
|
188
|
-
if (e.required && !
|
|
201
|
+
if (e.required && !U(t)) return W(e);
|
|
189
202
|
}
|
|
190
203
|
function q(e, t) {
|
|
191
204
|
if (typeof t != "string") return "Choose an available option.";
|
|
192
|
-
if (t === "") return e.required ?
|
|
205
|
+
if (t === "") return e.required ? W(e) : void 0;
|
|
193
206
|
if ((e.type === "select" || e.type === "radioGroup") && e.options.length > 0 && !e.options.some((e) => e.value === t)) return "Choose an available option.";
|
|
194
207
|
}
|
|
195
208
|
function J(e) {
|
|
@@ -197,27 +210,27 @@ function J(e) {
|
|
|
197
210
|
}
|
|
198
211
|
function Y(e, t) {
|
|
199
212
|
if (!Array.isArray(t) || !t.every((e) => typeof e == "string" && e.trim()) || new Set(t).size !== t.length) return "Enter a list of unique, nonempty text values.";
|
|
200
|
-
if (e.required && !t.length) return
|
|
213
|
+
if (e.required && !t.length) return W(e);
|
|
201
214
|
if (e.type === "tags" && e.max !== void 0 && t.length > e.max) return `Enter no more than ${e.max} tags.`;
|
|
202
215
|
if (e.type === "checkboxGroup" && e.options.length && t.some((t) => !e.options.some((e) => e.value === t))) return "Choose available options.";
|
|
203
216
|
}
|
|
204
217
|
function X(e, t) {
|
|
205
218
|
if (typeof t != "number" || !Number.isFinite(t)) return "Enter a finite number.";
|
|
206
|
-
let { min: n, max: r } = e.type === "slider" || e.type === "rangeSlider" ?
|
|
219
|
+
let { min: n, max: r } = e.type === "slider" || e.type === "rangeSlider" ? y(e) : e.type === "number" ? e : {};
|
|
207
220
|
if (n !== void 0 && t < n) return `Enter a number of at least ${n}.`;
|
|
208
221
|
if (r !== void 0 && t > r) return `Enter a number no greater than ${r}.`;
|
|
209
222
|
}
|
|
210
223
|
function pe(e, t) {
|
|
211
224
|
if (typeof t != "string") return "Enter a valid calendar date (YYYY-MM-DD).";
|
|
212
|
-
if (!t) return e.required ?
|
|
213
|
-
if (!
|
|
225
|
+
if (!t) return e.required ? W(e) : void 0;
|
|
226
|
+
if (!S(t)) return "Enter a valid calendar date (YYYY-MM-DD).";
|
|
214
227
|
if (e.type === "date") {
|
|
215
228
|
if (e.min && t < e.min) return `Choose a date on or after ${e.min}.`;
|
|
216
229
|
if (e.max && t > e.max) return `Choose a date on or before ${e.max}.`;
|
|
217
230
|
}
|
|
218
231
|
}
|
|
219
232
|
function Z(e, t) {
|
|
220
|
-
return typeof e == "number" && Number.isFinite(e) ?
|
|
233
|
+
return typeof e == "number" && Number.isFinite(e) ? ee(e, t) : void 0;
|
|
221
234
|
}
|
|
222
235
|
function me(e, t) {
|
|
223
236
|
let n = e, r = Z(n?.min, t), i = Z(n?.max, t);
|
|
@@ -233,24 +246,24 @@ function he(e, t) {
|
|
|
233
246
|
let n = t, r = n.min, i = n.max, a = X(e, r) ?? X(e, i);
|
|
234
247
|
if (a) return a;
|
|
235
248
|
if (r > i) return "The start must not be greater than the end.";
|
|
236
|
-
if (e.type === "rangeSlider" &&
|
|
249
|
+
if (e.type === "rangeSlider" && p(i, -r) < y(e).step) return "Keep the range endpoints at least one step apart.";
|
|
237
250
|
}
|
|
238
251
|
function ge(e, t) {
|
|
239
|
-
return typeof t == "string" ? t.trim() ?
|
|
252
|
+
return typeof t == "string" ? t.trim() ? _(t) ? void 0 : "Enter a valid colour." : e.required ? W(e) : void 0 : "Enter a valid colour.";
|
|
240
253
|
}
|
|
241
254
|
function Q(e, t) {
|
|
242
255
|
if (e.type !== "asset" && e.type !== "reference") return;
|
|
243
|
-
let { key: n, itemLabel: r, itemsLabel: i } =
|
|
244
|
-
if (!e.multiple) return
|
|
245
|
-
if (!Array.isArray(t) || !t.every((e) =>
|
|
246
|
-
if (e.required && t.length === 0) return
|
|
256
|
+
let { key: n, itemLabel: r, itemsLabel: i } = L[e.type];
|
|
257
|
+
if (!e.multiple) return H(t, n) ? void 0 : `Choose an ${r}.`;
|
|
258
|
+
if (!Array.isArray(t) || !t.every((e) => H(e, n))) return `Choose a list of ${i}.`;
|
|
259
|
+
if (e.required && t.length === 0) return W(e);
|
|
247
260
|
let a = e.picker?.max;
|
|
248
|
-
if (a !== void 0 && t.length > a) return `Choose no more than ${a} ${
|
|
261
|
+
if (a !== void 0 && t.length > a) return `Choose no more than ${a} ${z(e).itemsLabel}.`;
|
|
249
262
|
}
|
|
250
263
|
var _e = {
|
|
251
|
-
shortText:
|
|
252
|
-
longText:
|
|
253
|
-
richText:
|
|
264
|
+
shortText: G,
|
|
265
|
+
longText: G,
|
|
266
|
+
richText: K,
|
|
254
267
|
number: X,
|
|
255
268
|
slider: X,
|
|
256
269
|
rangeSlider: he,
|
|
@@ -260,16 +273,16 @@ var _e = {
|
|
|
260
273
|
checkboxGroup: Y,
|
|
261
274
|
tags: Y,
|
|
262
275
|
boolean: (e, t) => typeof t == "boolean" ? void 0 : "Choose a boolean value.",
|
|
263
|
-
dateTime: (e, t) =>
|
|
276
|
+
dateTime: (e, t) => V(t) ? void 0 : "Enter a valid UTC date and time.",
|
|
264
277
|
select: q,
|
|
265
278
|
asset: Q,
|
|
266
279
|
reference: Q
|
|
267
280
|
};
|
|
268
281
|
function $(e, t) {
|
|
269
|
-
return t === void 0 ? e.required ?
|
|
282
|
+
return t === void 0 ? e.required ? W(e) : void 0 : _e[e.type](e, t);
|
|
270
283
|
}
|
|
271
284
|
function ve(e, t) {
|
|
272
|
-
return
|
|
285
|
+
return k(e), Object.fromEntries(e.fields.flatMap((e) => {
|
|
273
286
|
if (e.type === "divider") return [];
|
|
274
287
|
let n = $(e, Object.hasOwn(t, e.id) ? t[e.id] : void 0);
|
|
275
288
|
return n ? [[e.id, n]] : [];
|
|
@@ -289,14 +302,14 @@ function ye({ field: e, option: t, name: n, checked: r, isDisabled: i, invalid:
|
|
|
289
302
|
}
|
|
290
303
|
};
|
|
291
304
|
if (e.appearance === "card") {
|
|
292
|
-
let n = e.type === "radioGroup" ?
|
|
305
|
+
let n = e.type === "radioGroup" ? ne : te;
|
|
293
306
|
return /* @__PURE__ */ D(n, {
|
|
294
307
|
...s,
|
|
295
308
|
title: t.label,
|
|
296
309
|
description: t.description
|
|
297
310
|
});
|
|
298
311
|
}
|
|
299
|
-
let c = e.type === "radioGroup" ?
|
|
312
|
+
let c = e.type === "radioGroup" ? f : u;
|
|
300
313
|
return /* @__PURE__ */ D(c, {
|
|
301
314
|
...s,
|
|
302
315
|
children: /* @__PURE__ */ O("span", { children: [t.label, t.description && /* @__PURE__ */ D("span", {
|
|
@@ -306,7 +319,7 @@ function ye({ field: e, option: t, name: n, checked: r, isDisabled: i, invalid:
|
|
|
306
319
|
});
|
|
307
320
|
}
|
|
308
321
|
function be({ field: t, stored: n, isDisabled: r, required: i, accessibility: a, onChange: o }) {
|
|
309
|
-
let s = t.type === "checkboxGroup", c = s ? J(n) : typeof n == "string" && n ? [n] : [], l = t.appearance === "card" ?
|
|
322
|
+
let s = t.type === "checkboxGroup", c = s ? J(n) : typeof n == "string" && n ? [n] : [], l = t.appearance === "card" ? re : d;
|
|
310
323
|
return /* @__PURE__ */ O(ie, { children: [/* @__PURE__ */ D(l, {
|
|
311
324
|
...a,
|
|
312
325
|
label: t.label,
|
|
@@ -333,8 +346,8 @@ function be({ field: t, stored: n, isDisabled: r, required: i, accessibility: a,
|
|
|
333
346
|
//#endregion
|
|
334
347
|
//#region src/components/FormEditor/additional-control.tsx
|
|
335
348
|
function xe({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
|
|
336
|
-
let a =
|
|
337
|
-
return /* @__PURE__ */ D(
|
|
349
|
+
let a = y(e), o = Z(t, a);
|
|
350
|
+
return /* @__PURE__ */ D(b, {
|
|
338
351
|
...r,
|
|
339
352
|
...a,
|
|
340
353
|
prefix: e.prefix,
|
|
@@ -351,8 +364,8 @@ function xe({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i
|
|
|
351
364
|
});
|
|
352
365
|
}
|
|
353
366
|
function Se({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
|
|
354
|
-
let a =
|
|
355
|
-
return /* @__PURE__ */ D(
|
|
367
|
+
let a = y(e), o = me(t, a);
|
|
368
|
+
return /* @__PURE__ */ D(x, {
|
|
356
369
|
...r,
|
|
357
370
|
...a,
|
|
358
371
|
prefix: e.prefix,
|
|
@@ -395,7 +408,7 @@ function Ce({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
|
|
|
395
408
|
field: e,
|
|
396
409
|
...o
|
|
397
410
|
});
|
|
398
|
-
case "colour": return /* @__PURE__ */ D(
|
|
411
|
+
case "colour": return /* @__PURE__ */ D(v, {
|
|
399
412
|
...i,
|
|
400
413
|
required: r,
|
|
401
414
|
placeholder: e.placeholder,
|
|
@@ -409,11 +422,11 @@ function Ce({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
|
|
|
409
422
|
value: typeof t == "string" ? t : "",
|
|
410
423
|
onInput: (e) => {
|
|
411
424
|
let t = e.currentTarget.value;
|
|
412
|
-
t.trim() && !
|
|
425
|
+
t.trim() && !_(t) && a(t);
|
|
413
426
|
},
|
|
414
427
|
onValueChange: (e) => a(e === "" ? void 0 : e)
|
|
415
428
|
});
|
|
416
|
-
case "tags": return /* @__PURE__ */ D(
|
|
429
|
+
case "tags": return /* @__PURE__ */ D(w, {
|
|
417
430
|
...i,
|
|
418
431
|
required: r,
|
|
419
432
|
placeholder: e.placeholder,
|
|
@@ -422,7 +435,7 @@ function Ce({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
|
|
|
422
435
|
value: J(t),
|
|
423
436
|
onValueChange: a
|
|
424
437
|
});
|
|
425
|
-
case "date": return /* @__PURE__ */ D(
|
|
438
|
+
case "date": return /* @__PURE__ */ D(C, {
|
|
426
439
|
...i,
|
|
427
440
|
placeholder: e.placeholder,
|
|
428
441
|
min: e.min,
|
|
@@ -447,7 +460,7 @@ function we(e, t) {
|
|
|
447
460
|
return e.multiple ? n : n[0];
|
|
448
461
|
}
|
|
449
462
|
function Te({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
|
|
450
|
-
return /* @__PURE__ */ D(
|
|
463
|
+
return /* @__PURE__ */ D(m, {
|
|
451
464
|
...i,
|
|
452
465
|
required: r,
|
|
453
466
|
isDisabled: n,
|
|
@@ -469,7 +482,7 @@ function Te({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
|
|
|
469
482
|
}
|
|
470
483
|
function Ee({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
|
|
471
484
|
let o = !r && !e.options.some((e) => e.value === "");
|
|
472
|
-
return /* @__PURE__ */ D(
|
|
485
|
+
return /* @__PURE__ */ D(h, {
|
|
473
486
|
...i,
|
|
474
487
|
"aria-required": r || void 0,
|
|
475
488
|
isDisabled: n,
|
|
@@ -484,130 +497,133 @@ function Ee({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
|
|
|
484
497
|
onValueChange: (e) => a(e === "" ? void 0 : e)
|
|
485
498
|
});
|
|
486
499
|
}
|
|
487
|
-
function De({ field: e, selected: t, items: n,
|
|
500
|
+
function De({ field: e, selected: t, items: n, source: r, isDisabled: i, accessibility: a, onChange: o }) {
|
|
488
501
|
return /* @__PURE__ */ D(l, {
|
|
489
|
-
...
|
|
502
|
+
...a,
|
|
503
|
+
...r,
|
|
490
504
|
items: n,
|
|
491
505
|
value: t,
|
|
492
|
-
...
|
|
493
|
-
|
|
494
|
-
isDisabled:
|
|
495
|
-
onValueChange: (t) =>
|
|
506
|
+
...z(e),
|
|
507
|
+
...M(e, r),
|
|
508
|
+
isDisabled: i,
|
|
509
|
+
onValueChange: (t) => o(we(e, t))
|
|
496
510
|
});
|
|
497
511
|
}
|
|
498
|
-
function Oe({ field: e, stored: t, selected: i, items: s,
|
|
499
|
-
let
|
|
512
|
+
function Oe({ field: e, stored: t, selected: i, items: s, source: c, isDisabled: l, accessibility: { required: u, ...d }, onChange: f }) {
|
|
513
|
+
let p = {
|
|
500
514
|
stored: t,
|
|
501
|
-
isDisabled:
|
|
502
|
-
required:
|
|
503
|
-
accessibility:
|
|
504
|
-
onChange:
|
|
515
|
+
isDisabled: l,
|
|
516
|
+
required: u,
|
|
517
|
+
accessibility: d,
|
|
518
|
+
onChange: f
|
|
505
519
|
};
|
|
506
520
|
switch (e.type) {
|
|
507
521
|
case "shortText": return /* @__PURE__ */ D(r, {
|
|
508
|
-
...
|
|
509
|
-
required:
|
|
510
|
-
disabled:
|
|
522
|
+
...d,
|
|
523
|
+
required: u,
|
|
524
|
+
disabled: l,
|
|
511
525
|
placeholder: e.placeholder,
|
|
512
526
|
type: e.inputType,
|
|
513
527
|
maxLength: e.maxLength,
|
|
514
528
|
readOnly: e.readOnly,
|
|
515
529
|
autoFocus: e.autoFocus,
|
|
516
|
-
value:
|
|
517
|
-
onChange: (e) =>
|
|
530
|
+
value: j(t),
|
|
531
|
+
onChange: (e) => f(e.target.value)
|
|
518
532
|
});
|
|
519
533
|
case "longText": return /* @__PURE__ */ D(n, {
|
|
520
|
-
...
|
|
521
|
-
required:
|
|
522
|
-
disabled:
|
|
534
|
+
...d,
|
|
535
|
+
required: u,
|
|
536
|
+
disabled: l,
|
|
523
537
|
placeholder: e.placeholder,
|
|
524
538
|
rows: e.rows,
|
|
525
539
|
maxLength: e.maxLength,
|
|
526
540
|
readOnly: e.readOnly,
|
|
527
541
|
autoFocus: e.autoFocus,
|
|
528
|
-
value:
|
|
529
|
-
onChange: (e) =>
|
|
542
|
+
value: j(t),
|
|
543
|
+
onChange: (e) => f(e.target.value)
|
|
530
544
|
});
|
|
531
545
|
case "number": return /* @__PURE__ */ D(Te, {
|
|
532
546
|
field: e,
|
|
533
|
-
...
|
|
547
|
+
...p
|
|
534
548
|
});
|
|
535
|
-
case "boolean": return /* @__PURE__ */ D(
|
|
536
|
-
...
|
|
537
|
-
isDisabled:
|
|
549
|
+
case "boolean": return /* @__PURE__ */ D(g, {
|
|
550
|
+
...d,
|
|
551
|
+
isDisabled: l,
|
|
538
552
|
autoFocus: e.autoFocus,
|
|
539
553
|
isSelected: t === !0,
|
|
540
|
-
onSelectedChange:
|
|
554
|
+
onSelectedChange: f
|
|
541
555
|
});
|
|
542
556
|
case "dateTime": return /* @__PURE__ */ D(r, {
|
|
543
|
-
...
|
|
544
|
-
required:
|
|
545
|
-
disabled:
|
|
557
|
+
...d,
|
|
558
|
+
required: u,
|
|
559
|
+
disabled: l,
|
|
546
560
|
type: "datetime-local",
|
|
547
561
|
step: "0.001",
|
|
548
562
|
autoFocus: e.autoFocus,
|
|
549
|
-
value:
|
|
550
|
-
onChange: (e) =>
|
|
563
|
+
value: V(t)?.slice(0, -1) ?? "",
|
|
564
|
+
onChange: (e) => f(V(`${e.target.value}Z`))
|
|
551
565
|
});
|
|
552
566
|
case "richText": return /* @__PURE__ */ D(o, {
|
|
553
|
-
...
|
|
567
|
+
...d,
|
|
554
568
|
expandedWidth: e.expandedWidth,
|
|
555
569
|
label: e.label,
|
|
556
|
-
isRequired:
|
|
557
|
-
isDisabled:
|
|
570
|
+
isRequired: u,
|
|
571
|
+
isDisabled: l,
|
|
558
572
|
placeholder: e.placeholder,
|
|
559
573
|
format: "json",
|
|
560
574
|
value: t === void 0 ? a : t,
|
|
561
|
-
onChange:
|
|
575
|
+
onChange: f
|
|
562
576
|
});
|
|
563
577
|
case "select": return /* @__PURE__ */ D(Ee, {
|
|
564
578
|
field: e,
|
|
565
|
-
...
|
|
579
|
+
...p
|
|
566
580
|
});
|
|
567
581
|
case "asset":
|
|
568
582
|
case "reference": return /* @__PURE__ */ D(De, {
|
|
569
583
|
field: e,
|
|
570
584
|
items: s,
|
|
585
|
+
source: c,
|
|
571
586
|
selected: i ?? [],
|
|
572
|
-
...
|
|
587
|
+
...p
|
|
573
588
|
});
|
|
574
589
|
default: return /* @__PURE__ */ D(Ce, {
|
|
575
590
|
field: e,
|
|
576
|
-
...
|
|
591
|
+
...p
|
|
577
592
|
});
|
|
578
593
|
}
|
|
579
594
|
}
|
|
580
595
|
//#endregion
|
|
581
596
|
//#region src/components/FormEditor/index.tsx
|
|
582
|
-
function ke({ field: e, stored: n, items: r,
|
|
583
|
-
let
|
|
584
|
-
a,
|
|
597
|
+
function ke({ field: e, stored: n, items: r, source: i, isDisabled: a, error: o, isErrorVisible: c, onChange: l }) {
|
|
598
|
+
let u = T(() => o === void 0 && c ? $(e, n) : void 0, [
|
|
585
599
|
o,
|
|
600
|
+
c,
|
|
586
601
|
e,
|
|
587
602
|
n
|
|
588
|
-
]),
|
|
603
|
+
]), d = T(() => e.type === "asset" || e.type === "reference" ? B(e, n) : void 0, [e, n]);
|
|
589
604
|
return /* @__PURE__ */ D(s, {
|
|
590
605
|
width: e.width,
|
|
591
606
|
padded: !1,
|
|
592
607
|
center: !1,
|
|
593
608
|
className: "ds-form-editor__field",
|
|
594
609
|
children: /* @__PURE__ */ D(t, {
|
|
595
|
-
...
|
|
596
|
-
label: e.type === "dateTime" ? `${e.label} (UTC)` :
|
|
610
|
+
...de(e, n, d, i),
|
|
611
|
+
label: e.type === "dateTime" ? `${e.label} (UTC)` : R(e),
|
|
597
612
|
hint: e.hint,
|
|
598
613
|
labelHint: e.labelHint,
|
|
599
|
-
error:
|
|
614
|
+
error: o ?? u,
|
|
600
615
|
isRequired: e.required,
|
|
601
|
-
count:
|
|
602
|
-
isGroup:
|
|
616
|
+
count: d?.length ?? (e.type === "checkboxGroup" ? J(n).length : void 0),
|
|
617
|
+
isGroup: d !== void 0 || Ae.has(e.type),
|
|
603
618
|
children: (t) => /* @__PURE__ */ D(Oe, {
|
|
604
619
|
field: e,
|
|
605
620
|
stored: n,
|
|
606
|
-
selected:
|
|
621
|
+
selected: d,
|
|
607
622
|
items: r,
|
|
608
|
-
|
|
623
|
+
source: i,
|
|
624
|
+
isDisabled: a,
|
|
609
625
|
accessibility: t,
|
|
610
|
-
onChange:
|
|
626
|
+
onChange: l
|
|
611
627
|
})
|
|
612
628
|
})
|
|
613
629
|
});
|
|
@@ -622,39 +638,40 @@ var Ae = /* @__PURE__ */ new Set([
|
|
|
622
638
|
"date",
|
|
623
639
|
"colour"
|
|
624
640
|
]);
|
|
625
|
-
function Me({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, pickerItems: i = {},
|
|
626
|
-
let [
|
|
627
|
-
T(() =>
|
|
628
|
-
let
|
|
629
|
-
let i = { ...
|
|
630
|
-
n === void 0 ? delete i[e] : i[e] = n, t === void 0 &&
|
|
631
|
-
},
|
|
632
|
-
"--form-editor-columns":
|
|
633
|
-
"--form-editor-min-column":
|
|
641
|
+
function Me({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, pickerItems: i = {}, pickerSources: a = {}, errors: o = {}, isDisabled: s = !1, showAllErrors: c = !1, columns: l = 1, minColumnWidth: u = "16rem", className: d, style: f, ...p }) {
|
|
642
|
+
let [m, h] = E(n), [g, _] = E(() => /* @__PURE__ */ new Set()), v = t ?? m;
|
|
643
|
+
T(() => k(e), [e]);
|
|
644
|
+
let y = (e, n) => {
|
|
645
|
+
let i = { ...v };
|
|
646
|
+
n === void 0 ? delete i[e] : i[e] = n, t === void 0 && h(i), _((t) => new Set(t).add(e)), r?.(i, { fieldId: e });
|
|
647
|
+
}, b = l === "auto" ? { "--form-editor-min-column": u } : {
|
|
648
|
+
"--form-editor-columns": l,
|
|
649
|
+
"--form-editor-min-column": u
|
|
634
650
|
};
|
|
635
651
|
return /* @__PURE__ */ D("div", {
|
|
636
652
|
className: [
|
|
637
653
|
"ds-form-editor",
|
|
638
|
-
|
|
639
|
-
|
|
654
|
+
l === "auto" && "ds-form-editor--auto",
|
|
655
|
+
d
|
|
640
656
|
].filter(Boolean).join(" "),
|
|
641
657
|
style: {
|
|
642
|
-
...
|
|
643
|
-
...
|
|
658
|
+
...b,
|
|
659
|
+
...f
|
|
644
660
|
},
|
|
645
|
-
...
|
|
661
|
+
...p,
|
|
646
662
|
children: e.fields.map((e) => {
|
|
647
663
|
if (e.type === "divider") return /* @__PURE__ */ D("hr", { className: "ds-form-editor__divider" }, e.id);
|
|
648
|
-
let t = Object.hasOwn(
|
|
664
|
+
let t = Object.hasOwn(v, e.id) ? v[e.id] : void 0, n = s || !!e.isDisabled, r = n || "readOnly" in e && !!e.readOnly, l = typeof t == "string" ? t.trim() !== "" : t !== void 0, u = c || g.has(e.id) || l && je.has(e.type) || e.type === "number" && typeof t == "number";
|
|
649
665
|
return /* @__PURE__ */ D(ke, {
|
|
650
666
|
field: e,
|
|
651
667
|
stored: t,
|
|
652
668
|
items: i[e.id] ?? [],
|
|
669
|
+
source: a[e.id],
|
|
653
670
|
isDisabled: n,
|
|
654
|
-
error:
|
|
655
|
-
isErrorVisible:
|
|
671
|
+
error: o[e.id],
|
|
672
|
+
isErrorVisible: u,
|
|
656
673
|
onChange: (t) => {
|
|
657
|
-
r ||
|
|
674
|
+
r || y(e.id, t);
|
|
658
675
|
}
|
|
659
676
|
}, e.id);
|
|
660
677
|
})
|
|
@@ -663,4 +680,4 @@ function Me({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, picke
|
|
|
663
680
|
//#endregion
|
|
664
681
|
export { ve as n, Me as t };
|
|
665
682
|
|
|
666
|
-
//# sourceMappingURL=FormEditor-
|
|
683
|
+
//# sourceMappingURL=FormEditor-D0J3JN-H.js.map
|