@wrdagency/blockout 0.1.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2NBKRL7C-DHf-2xkD.js +85 -0
- package/dist/{2RSXSRCN-qt84MtKs.js → 2RSXSRCN-bkYY_QT6.js} +23 -23
- package/dist/{4CMBR7SL-BAGv8IL2.js → 4CMBR7SL-BkCeHgv2.js} +31 -31
- package/dist/{5JTVDSTH-CG1NL6Fw.js → 5JTVDSTH-BiHTUReD.js} +27 -27
- package/dist/{5VQZOHHZ-CscZGerP.js → 5VQZOHHZ-BpLDJOFs.js} +1 -1
- package/dist/{6VRAQV3D-2rb_aClP.js → 6VRAQV3D-DIdyGLyW.js} +26 -26
- package/dist/A3WPL2ZJ-SF-cbtmp.js +11 -0
- package/dist/ArrowBendDownRight.es-mejk84um.js +32 -0
- package/dist/BM6PGYQY-D4-MwCVB.js +17 -0
- package/dist/{CaretDown.es-eySGHzTJ.js → CaretDown.es-BKFnosGJ.js} +3 -5
- package/dist/CaretDown.es-eyr5AnCc.js +8 -0
- package/dist/CaretLeft.es-C1wX08tw.js +32 -0
- package/dist/CaretRight.es-vnr78BGI.js +32 -0
- package/dist/DG5U6ZEL-u5QgMA8f.js +17 -0
- package/dist/DotsSixVertical.es-Ixbhxg7Z.js +38 -0
- package/dist/DotsThreeVertical.es-uadrGk3y.js +36 -0
- package/dist/EM5CXX6A-iTR0FDQv.js +14 -0
- package/dist/F5MUBM3I-Cv5aLv5o.js +54 -0
- package/dist/G7GW6PWC-FbNigUHQ.js +1236 -0
- package/dist/J2LQO3EC-DIOM09Y6.js +39 -0
- package/dist/KFH4SEIX-BuapSU1b.js +120 -0
- package/dist/{LMDWO4NN--KEvZePp.js → LMDWO4NN-DyBcLLfK.js} +60 -60
- package/dist/MR26YJYP-BdwVX8xi.js +283 -0
- package/dist/MTZPJQMC-DMklE0XE.js +12 -0
- package/dist/MagnifyingGlass.es-CLstwG_v.js +32 -0
- package/dist/O2PQ2652-CRn371N3.js +51 -0
- package/dist/P7GR5CS5-Btbh4-Mw.js +24 -0
- package/dist/{PFRGBC2K-BEg8ahbY.js → PFRGBC2K-DobANx7W.js} +93 -93
- package/dist/{RS7LB2H4-D0fWv5qu.js → RS7LB2H4-lmOMNc4h.js} +3 -3
- package/dist/RZ4GPYOB-1GOhO1-l.js +37 -0
- package/dist/RadioButton.es-D3QVjfF9.js +36 -0
- package/dist/{S43UC3DV-Dn8EFLaT.js → S43UC3DV-C5JWPIhF.js} +5 -5
- package/dist/{T7VMP3TM-DeRMoW8g.js → T7VMP3TM-DRNGQJpZ.js} +17 -17
- package/dist/{TP7N7UIH-BHb1rEeb.js → TP7N7UIH-DlW_S-4B.js} +13 -13
- package/dist/{UQQRIHDV-Bu8e1bYU.js → UQQRIHDV-eF2M9Cz2.js} +16 -16
- package/dist/{UYGDZTLQ-DcCmv5SE.js → UYGDZTLQ-DRLNvYE6.js} +4 -4
- package/dist/VIIRIBF3-DX-Wjw1-.js +18 -0
- package/dist/WMYDSCNQ-YGSwAHQE.js +62 -0
- package/dist/WYCIER3C-DndYR0iO.js +59 -0
- package/dist/X.es-TbGOnXOO.js +38 -0
- package/dist/{YV4JVR4I-kvospPUa.js → YV4JVR4I-DOlaib2E.js} +33 -33
- package/dist/assets/button.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/prosemirror.css +1 -0
- package/dist/assets/root.css +1 -0
- package/dist/assets/style.css +1 -1
- package/dist/assets/style10.css +1 -0
- package/dist/assets/style11.css +1 -0
- package/dist/assets/style12.css +1 -0
- package/dist/assets/style13.css +1 -0
- package/dist/assets/style14.css +1 -0
- package/dist/assets/style15.css +1 -0
- package/dist/assets/style16.css +1 -0
- package/dist/assets/style17.css +1 -0
- package/dist/assets/style18.css +1 -0
- package/dist/assets/style19.css +1 -0
- package/dist/assets/style2.css +1 -1
- package/dist/assets/style20.css +1 -0
- package/dist/assets/style21.css +1 -0
- package/dist/assets/style22.css +1 -0
- package/dist/assets/style23.css +1 -0
- package/dist/assets/style24.css +1 -0
- package/dist/assets/style25.css +1 -0
- package/dist/assets/style3.css +1 -1
- package/dist/assets/style4.css +1 -1
- package/dist/assets/style5.css +1 -0
- package/dist/assets/style6.css +1 -0
- package/dist/assets/style7.css +1 -0
- package/dist/assets/style8.css +1 -0
- package/dist/assets/style9.css +1 -0
- package/dist/assets/styles2.css +1 -0
- package/dist/assets/styles3.css +1 -0
- package/dist/assets/styles4.css +1 -0
- package/dist/assets/styles5.css +1 -0
- package/dist/base-jB1DIMnz.js +559 -0
- package/dist/commands-IQnqt4xL.js +5937 -0
- package/dist/components/avatar/index.d.ts +10 -0
- package/dist/components/avatar/index.js +42 -0
- package/dist/components/badge/index.d.ts +7 -0
- package/dist/components/badge/index.js +24 -0
- package/dist/components/breadcrumbs/index.d.ts +2 -1
- package/dist/components/breadcrumbs/index.js +31 -63
- package/dist/components/breadcrumbs/types.d.ts +2 -1
- package/dist/components/button/button.d.ts +1 -0
- package/dist/components/button/icon.js +31 -10
- package/dist/components/controls/base-control/affix.d.ts +1 -1
- package/dist/components/controls/base-control/index.js +35 -23
- package/dist/components/controls/base-control/props.d.ts +9 -1
- package/dist/components/controls/base-control/props.js +31 -12
- package/dist/components/controls/base-popover-control/index.js +41 -27
- package/dist/components/controls/card-number-control/cards/index.d.ts +0 -1
- package/dist/components/controls/card-number-control/cards/index.js +6 -8
- package/dist/components/controls/card-number-control/index.js +39 -435
- package/dist/components/controls/checkbox-control/index.d.ts +2 -0
- package/dist/components/controls/checkbox-control/index.js +80 -46
- package/dist/components/controls/choice-control/choice.js +30 -23
- package/dist/components/controls/choice-control/index.js +6 -5
- package/dist/components/controls/date-control/component.d.ts +8 -7
- package/dist/components/controls/date-control/component.js +27 -28
- package/dist/components/controls/date-control/index.d.ts +5 -9
- package/dist/components/controls/date-control/index.js +131 -35
- package/dist/components/controls/date-control/picker.d.ts +8 -0
- package/dist/components/controls/date-control/picker.js +18 -0
- package/dist/components/controls/date-control/types.d.ts +10 -13
- package/dist/components/controls/date-control/types.js +75 -52
- package/dist/components/controls/date-control/util.d.ts +1 -0
- package/dist/components/controls/date-control/util.js +1608 -0
- package/dist/components/controls/index.d.ts +3 -1
- package/dist/components/controls/index.js +32 -27
- package/dist/components/controls/list-control/index.d.ts +9 -0
- package/dist/components/controls/list-control/index.js +42 -0
- package/dist/components/controls/list-control/item.d.ts +10 -0
- package/dist/components/controls/list-control/item.js +108 -0
- package/dist/components/controls/list-control/list.d.ts +10 -0
- package/dist/components/controls/list-control/list.js +89 -0
- package/dist/components/controls/list-control/types.d.ts +6 -0
- package/dist/components/controls/markdown-control/commands.d.ts +1 -0
- package/dist/components/controls/markdown-control/commands.js +5 -0
- package/dist/components/controls/markdown-control/editor.d.ts +8 -0
- package/dist/components/controls/markdown-control/editor.js +807 -0
- package/dist/components/controls/markdown-control/index.d.ts +7 -0
- package/dist/components/controls/markdown-control/index.js +20 -0
- package/dist/components/controls/markdown-control/slash/base.d.ts +14 -0
- package/dist/components/controls/markdown-control/slash/base.js +9 -0
- package/dist/components/controls/markdown-control/slash/mentions.d.ts +6 -0
- package/dist/components/controls/markdown-control/slash/mentions.js +14 -0
- package/dist/components/controls/markdown-control/toolbar.d.ts +6 -0
- package/dist/components/controls/markdown-control/toolbar.js +10 -0
- package/dist/components/controls/number-control/index.js +8 -7
- package/dist/components/controls/password-control/index.js +4 -3
- package/dist/components/controls/recurrence-control/index.js +81 -100
- package/dist/components/controls/select-control/control.d.ts +3 -0
- package/dist/components/controls/select-control/control.js +53 -0
- package/dist/components/controls/select-control/index.d.ts +2 -1
- package/dist/components/controls/select-control/index.js +6 -5
- package/dist/components/controls/select-control/props.d.ts +14 -0
- package/dist/components/controls/select-control/props.js +1 -0
- package/dist/components/controls/select-control/select.d.ts +3 -0
- package/dist/components/controls/select-control/select.js +1186 -0
- package/dist/components/controls/text-control/index.js +11 -10
- package/dist/components/controls/textarea-control/index.js +7 -6
- package/dist/components/controls/toggle-control/index.d.ts +4 -3
- package/dist/components/controls/toggle-control/index.js +73 -53
- package/dist/components/controls/toggle-group-control/index.d.ts +1 -0
- package/dist/components/controls/toggle-group-control/index.js +35 -26
- package/dist/components/data-form/api.d.ts +2 -0
- package/dist/components/data-form/api.js +1826 -0
- package/dist/components/data-form/autosave.d.ts +4 -0
- package/dist/components/data-form/autosave.js +12 -0
- package/dist/components/data-form/context.d.ts +10 -0
- package/dist/components/data-form/context.js +10 -0
- package/dist/components/data-form/form.d.ts +11 -0
- package/dist/components/data-form/form.js +30 -0
- package/dist/components/data-form/index.js +14 -0
- package/dist/components/data-form/row.d.ts +7 -0
- package/dist/components/data-form/row.js +16 -0
- package/dist/components/data-form/status.d.ts +6 -0
- package/dist/components/data-form/status.js +37 -0
- package/dist/components/data-form/submit.d.ts +10 -0
- package/dist/components/data-form/submit.js +37 -0
- package/dist/components/data-form/types.d.ts +37 -0
- package/dist/components/data-form/types.js +1 -0
- package/dist/components/data-view/api.d.ts +24 -0
- package/dist/components/data-view/api.js +31 -0
- package/dist/components/data-view/data/apply.d.ts +10 -0
- package/dist/components/data-view/data/apply.js +346 -0
- package/dist/components/data-view/data/fields.d.ts +4 -0
- package/dist/components/data-view/data/fields.js +26 -0
- package/dist/components/data-view/data/filter.d.ts +8 -0
- package/dist/components/data-view/data/filter.js +48 -0
- package/dist/components/data-view/data/layout.d.ts +2 -0
- package/dist/components/data-view/data/layout.js +19 -0
- package/dist/components/data-view/data/normalize.d.ts +5 -0
- package/dist/components/data-view/data/normalize.js +80 -0
- package/dist/components/data-view/data/options.d.ts +10 -0
- package/dist/components/data-view/data/options.js +297 -0
- package/dist/components/data-view/index.d.ts +5 -0
- package/dist/components/data-view/index.js +9 -0
- package/dist/components/data-view/layouts/grid/empty.d.ts +2 -0
- package/dist/components/data-view/layouts/grid/empty.js +6 -0
- package/dist/components/data-view/layouts/grid/group.d.ts +2 -0
- package/dist/components/data-view/layouts/grid/group.js +57 -0
- package/dist/components/data-view/layouts/grid/index.d.ts +3 -0
- package/dist/components/data-view/layouts/grid/index.js +8 -0
- package/dist/components/data-view/layouts/grid/item.d.ts +2 -0
- package/dist/components/data-view/layouts/grid/item.js +98 -0
- package/dist/components/data-view/layouts/grid/root.d.ts +2 -0
- package/dist/components/data-view/layouts/grid/root.js +6 -0
- package/dist/components/data-view/layouts/kanban/empty.d.ts +2 -0
- package/dist/components/data-view/layouts/kanban/empty.js +6 -0
- package/dist/components/data-view/layouts/kanban/group.d.ts +2 -0
- package/dist/components/data-view/layouts/kanban/group.js +57 -0
- package/dist/components/data-view/layouts/kanban/index.d.ts +3 -0
- package/dist/components/data-view/layouts/kanban/index.js +8 -0
- package/dist/components/data-view/layouts/kanban/item.d.ts +2 -0
- package/dist/components/data-view/layouts/kanban/item.js +98 -0
- package/dist/components/data-view/layouts/kanban/root.d.ts +2 -0
- package/dist/components/data-view/layouts/kanban/root.js +18 -0
- package/dist/components/data-view/layouts/list/empty.d.ts +2 -0
- package/dist/components/data-view/layouts/list/empty.js +6 -0
- package/dist/components/data-view/layouts/list/group.d.ts +2 -0
- package/dist/components/data-view/layouts/list/group.js +57 -0
- package/dist/components/data-view/layouts/list/index.d.ts +3 -0
- package/dist/components/data-view/layouts/list/index.js +8 -0
- package/dist/components/data-view/layouts/list/item.d.ts +2 -0
- package/dist/components/data-view/layouts/list/item.js +77 -0
- package/dist/components/data-view/layouts/list/root.d.ts +2 -0
- package/dist/components/data-view/layouts/list/root.js +6 -0
- package/dist/components/data-view/layouts/table/empty.d.ts +2 -0
- package/dist/components/data-view/layouts/table/empty.js +54 -0
- package/dist/components/data-view/layouts/table/group.d.ts +2 -0
- package/dist/components/data-view/layouts/table/group.js +67 -0
- package/dist/components/data-view/layouts/table/index.d.ts +3 -0
- package/dist/components/data-view/layouts/table/index.js +8 -0
- package/dist/components/data-view/layouts/table/item.d.ts +2 -0
- package/dist/components/data-view/layouts/table/item.js +77 -0
- package/dist/components/data-view/layouts/table/root.d.ts +2 -0
- package/dist/components/data-view/layouts/table/root.js +134 -0
- package/dist/components/data-view/parts/body/empty.d.ts +2 -0
- package/dist/components/data-view/parts/body/empty.js +50 -0
- package/dist/components/data-view/parts/body/index.d.ts +2 -0
- package/dist/components/data-view/parts/body/index.js +64 -0
- package/dist/components/data-view/parts/controls/index.d.ts +5 -0
- package/dist/components/data-view/parts/controls/index.js +139 -0
- package/dist/components/data-view/parts/controls/search.d.ts +5 -0
- package/dist/components/data-view/parts/controls/search.js +77 -0
- package/dist/components/data-view/parts/filters/chip.d.ts +13 -0
- package/dist/components/data-view/parts/filters/chip.js +53 -0
- package/dist/components/data-view/parts/filters/editor.d.ts +10 -0
- package/dist/components/data-view/parts/filters/editor.js +89 -0
- package/dist/components/data-view/parts/filters/index.js +9 -0
- package/dist/components/data-view/parts/filters/list.d.ts +11 -0
- package/dist/components/data-view/parts/filters/list.js +108 -0
- package/dist/components/data-view/parts/filters/utils.d.ts +2 -0
- package/dist/components/data-view/parts/filters/utils.js +13 -0
- package/dist/components/data-view/parts/footer/actions.d.ts +2 -0
- package/dist/components/data-view/parts/footer/actions.js +104 -0
- package/dist/components/data-view/parts/footer/index.js +68 -0
- package/dist/components/data-view/parts/footer/selection.d.ts +2 -0
- package/dist/components/data-view/parts/footer/selection.js +61 -0
- package/dist/components/data-view/parts/index.d.ts +5 -0
- package/dist/components/data-view/parts/index.js +12 -0
- package/dist/components/data-view/parts/view-control/index.d.ts +6 -0
- package/dist/components/data-view/parts/view-control/index.js +215 -0
- package/dist/components/data-view/root.d.ts +18 -0
- package/dist/components/data-view/root.js +105 -0
- package/dist/components/data-view/slots/group/checkbox.d.ts +7 -0
- package/dist/components/data-view/slots/group/checkbox.js +41 -0
- package/dist/components/data-view/slots/group/context.d.ts +12 -0
- package/dist/components/data-view/slots/group/context.js +23 -0
- package/dist/components/data-view/slots/group/icon.d.ts +1 -0
- package/dist/components/data-view/slots/group/icon.js +4 -0
- package/dist/components/data-view/slots/group/index.js +5 -0
- package/dist/components/data-view/slots/group/label.d.ts +3 -0
- package/dist/components/data-view/slots/group/label.js +5 -0
- package/dist/components/data-view/slots/index.d.ts +4 -0
- package/dist/components/data-view/slots/index.js +9 -0
- package/dist/components/data-view/slots/item/actions.d.ts +6 -0
- package/dist/components/data-view/slots/item/actions.js +44 -0
- package/dist/components/data-view/slots/item/checkbox.d.ts +7 -0
- package/dist/components/data-view/slots/item/checkbox.js +87 -0
- package/dist/components/data-view/slots/item/context.d.ts +8 -0
- package/dist/components/data-view/slots/item/context.js +10 -0
- package/dist/components/data-view/slots/item/depth.d.ts +3 -0
- package/dist/components/data-view/slots/item/depth.js +9 -0
- package/dist/components/data-view/slots/item/description.d.ts +3 -0
- package/dist/components/data-view/slots/item/description.js +6 -0
- package/dist/components/data-view/slots/item/index.js +8 -0
- package/dist/components/data-view/slots/item/properties.d.ts +13 -0
- package/dist/components/data-view/slots/item/properties.js +8 -0
- package/dist/components/data-view/slots/item/relations.d.ts +7 -0
- package/dist/components/data-view/slots/item/relations.js +21 -0
- package/dist/components/data-view/slots/item/tags.d.ts +6 -0
- package/dist/components/data-view/slots/item/tags.js +7 -0
- package/dist/components/data-view/slots/item/thumbnail.d.ts +6 -0
- package/dist/components/data-view/slots/item/thumbnail.js +6 -0
- package/dist/components/data-view/slots/item/title.d.ts +3 -0
- package/dist/components/data-view/slots/item/title.js +17 -0
- package/dist/components/data-view/slots/item/util.d.ts +6 -0
- package/dist/components/data-view/slots/item/util.js +6 -0
- package/dist/components/data-view/slots/property/context.d.ts +8 -0
- package/dist/components/data-view/slots/property/context.js +10 -0
- package/dist/components/data-view/slots/property/field/editable.d.ts +3 -0
- package/dist/components/data-view/slots/property/field/editable.js +42 -0
- package/dist/components/data-view/slots/property/field/index.d.ts +3 -0
- package/dist/components/data-view/slots/property/field/index.js +7 -0
- package/dist/components/data-view/slots/property/field/static.d.ts +8 -0
- package/dist/components/data-view/slots/property/field/static.js +7 -0
- package/dist/components/data-view/slots/property/field/types.d.ts +5 -0
- package/dist/components/data-view/slots/property/field/types.js +1 -0
- package/dist/components/data-view/slots/property/index.js +5 -0
- package/dist/components/data-view/slots/property/label.d.ts +7 -0
- package/dist/components/data-view/slots/property/label.js +5 -0
- package/dist/components/data-view/slots/root/checkbox.d.ts +7 -0
- package/dist/components/data-view/slots/root/checkbox.js +40 -0
- package/dist/components/data-view/slots/root/context.d.ts +25 -0
- package/dist/components/data-view/slots/root/context.js +11 -0
- package/dist/components/data-view/slots/root/index.js +5 -0
- package/dist/components/data-view/types/actions.d.ts +15 -0
- package/dist/components/data-view/types/actions.js +1 -0
- package/dist/components/data-view/types/fields.d.ts +69 -0
- package/dist/components/data-view/types/fields.js +1 -0
- package/dist/components/data-view/types/filters.d.ts +19 -0
- package/dist/components/data-view/types/filters.js +1 -0
- package/dist/components/data-view/types/hierarchy.d.ts +13 -0
- package/dist/components/data-view/types/hierarchy.js +1 -0
- package/dist/components/data-view/types/index.d.ts +3 -0
- package/dist/components/data-view/types/index.js +1 -0
- package/dist/components/data-view/types/view.d.ts +47 -0
- package/dist/components/data-view/types/view.js +1 -0
- package/dist/components/filesystem/file.js +1 -1
- package/dist/components/filesystem/folder.js +46 -45
- package/dist/components/filesystem/index.js +1 -1
- package/dist/components/filesystem/list.js +1 -1
- package/dist/components/filesystem/root.js +1 -1
- package/dist/components/form/components/pagination.js +72 -17
- package/dist/components/index.d.ts +7 -2
- package/dist/components/index.js +69 -50
- package/dist/components/menu/index.d.ts +4 -0
- package/dist/components/menu/index.js +40 -129
- package/dist/components/menu/item.js +1 -1
- package/dist/components/menu/items/action.js +2 -1
- package/dist/components/menu/items/spacer.js +5 -5
- package/dist/components/menu/items/submenu.js +4 -3
- package/dist/components/menu/items/toggle.js +11 -10
- package/dist/components/menu/types.d.ts +1 -0
- package/dist/components/pagination/index.d.ts +10 -0
- package/dist/components/pagination/index.js +63 -0
- package/dist/components/progress/index.d.ts +2 -1
- package/dist/components/progress/index.js +29 -20
- package/dist/components/shell/index.js +8 -0
- package/dist/components/shell/pane.d.ts +9 -0
- package/dist/components/shell/pane.js +38 -0
- package/dist/components/shell/root.d.ts +6 -0
- package/dist/components/shell/root.js +18 -0
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/list.js +6 -6
- package/dist/components/tabs/panel.js +36 -35
- package/dist/components/tabs/root.js +42 -42
- package/dist/components/tabs/tab.js +15 -15
- package/dist/components/tag/index.js +8 -0
- package/dist/components/tag/list.d.ts +8 -0
- package/dist/components/tag/list.js +10 -0
- package/dist/components/tag/tag.d.ts +8 -0
- package/dist/components/tag/tag.js +26 -0
- package/dist/components/tag/types.d.ts +6 -0
- package/dist/components/tag/types.js +1 -0
- package/dist/components/toolbar/divider.d.ts +6 -0
- package/dist/components/toolbar/divider.js +24 -0
- package/dist/components/toolbar/index.js +19 -15
- package/dist/components/toolbar/root.js +67 -4
- package/dist/components/window/index.d.ts +8 -0
- package/dist/components/window/index.js +54 -0
- package/dist/{composite-provider-DNftbE5U.js → composite-provider-cs4korvf.js} +4 -4
- package/dist/filter-HYEwffYa.js +133 -0
- package/dist/floating-ui.dom-2MezWvgs.js +1070 -0
- package/dist/hooks/index.d.ts +4 -1
- package/dist/hooks/index.js +10 -4
- package/dist/hooks/input.js +13 -13
- package/dist/hooks/keyboard.d.ts +7 -0
- package/dist/hooks/keyboard.js +40 -0
- package/dist/hooks/selection.d.ts +19 -0
- package/dist/hooks/selection.js +57 -0
- package/dist/hooks/state.js +3 -3
- package/dist/hooks/temporary.d.ts +7 -0
- package/dist/hooks/temporary.js +12 -0
- package/dist/index-C2R91pmO.js +251 -0
- package/dist/index-CwFPDtaz.js +172 -0
- package/dist/index-D7vLJIGX.js +90 -0
- package/dist/index-DgyEPQBp.js +55 -0
- package/dist/index-EPj3dCzl.js +16324 -0
- package/dist/index-EQOyE9yF.js +73 -0
- package/dist/index.js +112 -63
- package/dist/item-B72AQ4I4.js +470 -0
- package/dist/picker-D0DleQso.js +858 -0
- package/dist/primitives/colourway/index.d.ts +9 -0
- package/dist/primitives/colourway/index.js +26 -0
- package/dist/primitives/colourway/util.d.ts +2 -0
- package/dist/primitives/colourway/util.js +146 -0
- package/dist/primitives/icon-label/index.d.ts +8 -0
- package/dist/primitives/icon-label/index.js +23 -0
- package/dist/primitives/index.d.ts +7 -0
- package/dist/primitives/index.js +34 -10
- package/dist/primitives/link/index.d.ts +5 -0
- package/dist/primitives/link/index.js +24 -0
- package/dist/primitives/popover/index.js +10 -0
- package/dist/primitives/popover/root.d.ts +10 -0
- package/dist/primitives/popover/root.js +5 -0
- package/dist/primitives/popover/target.d.ts +7 -0
- package/dist/primitives/popover/target.js +18 -0
- package/dist/primitives/popover/window.d.ts +6 -0
- package/dist/primitives/popover/window.js +38 -0
- package/dist/primitives/resizable/index.js +43 -32
- package/dist/primitives/scroll-area/index.js +4 -5
- package/dist/primitives/symbol/danger.d.ts +6 -0
- package/dist/primitives/symbol/danger.js +83 -0
- package/dist/primitives/symbol/index.d.ts +5 -0
- package/dist/primitives/symbol/index.js +12 -0
- package/dist/primitives/symbol/progress.d.ts +6 -0
- package/dist/primitives/symbol/progress.js +162 -0
- package/dist/primitives/symbol/types.d.ts +5 -0
- package/dist/primitives/symbol/types.js +1 -0
- package/dist/primitives/tooltip/index.d.ts +7 -0
- package/dist/primitives/tooltip/index.js +178 -0
- package/dist/primitives/truncate/index.js +14 -13
- package/dist/primitives/typography/heading.d.ts +16 -0
- package/dist/primitives/typography/heading.js +50 -0
- package/dist/primitives/typography/index.d.ts +2 -0
- package/dist/primitives/typography/index.js +12 -0
- package/dist/primitives/typography/paragraph.d.ts +9 -0
- package/dist/primitives/typography/paragraph.js +25 -0
- package/dist/protectedTokens-DdjZoCxO.js +587 -0
- package/dist/root-j6NM_Xfo.js +20 -0
- package/dist/sortable.esm-De3H-_AA.js +3009 -0
- package/dist/style-A7_0w2WD.js +397 -0
- package/dist/style-Bp4uISf6.js +670 -0
- package/dist/toolbar-j1SJvq8D.js +6283 -0
- package/dist/types/component.d.ts +1 -0
- package/dist/types/options.d.ts +1 -0
- package/dist/types/options.js +8 -2
- package/dist/types/util.d.ts +1 -0
- package/dist/types/util.js +1 -0
- package/dist/utils/array.d.ts +1 -0
- package/dist/utils/array.js +9 -0
- package/dist/utils/components.d.ts +2 -1
- package/dist/utils/components.js +11 -7
- package/dist/utils/object.d.ts +1 -0
- package/dist/utils/object.js +8 -0
- package/dist/utils/url.d.ts +1 -0
- package/dist/utils/url.js +6 -0
- package/package.json +23 -3
- package/dist/2NBKRL7C-BAzCMGOw.js +0 -85
- package/dist/ArrowRight.es-xyNbtVOa.js +0 -60
- package/dist/DG5U6ZEL-CVj-Czp2.js +0 -17
- package/dist/F5MUBM3I-87B2_4WK.js +0 -54
- package/dist/MTZPJQMC-DyCWBG18.js +0 -14
- package/dist/P7GR5CS5-BoOYUfSQ.js +0 -19
- package/dist/RZ4GPYOB-13-5LlEb.js +0 -37
- package/dist/VIIRIBF3-D5DmZNtI.js +0 -26
- package/dist/WMYDSCNQ-Dy1O-Kdl.js +0 -2405
- package/dist/WYCIER3C-DRn904Gy.js +0 -175
- package/dist/components/block-editor/editor.d.ts +0 -5
- package/dist/components/block-editor/editor.js +0 -6
- package/dist/components/block-editor/index.d.ts +0 -1
- package/dist/components/block-editor/index.js +0 -4
- package/dist/components/controls/card-number-control/cards/generic.d.ts +0 -2
- package/dist/components/controls/card-number-control/cards/generic.js +0 -19
- package/dist/components/controls/select-control/component.d.ts +0 -12
- package/dist/components/controls/select-control/component.js +0 -1892
- package/dist/components/data-table/column.d.ts +0 -4
- package/dist/components/data-table/column.js +0 -874
- package/dist/components/data-table/context.d.ts +0 -7
- package/dist/components/data-table/context.js +0 -36
- package/dist/components/data-table/example.d.ts +0 -1
- package/dist/components/data-table/example.js +0 -5
- package/dist/components/data-table/footer.js +0 -23
- package/dist/components/data-table/header.d.ts +0 -7
- package/dist/components/data-table/header.js +0 -358
- package/dist/components/data-table/index.d.ts +0 -10
- package/dist/components/data-table/index.js +0 -86
- package/dist/components/data-table/types.d.ts +0 -75
- package/dist/hooks/theme.d.ts +0 -8
- package/dist/hooks/theme.js +0 -14
- package/dist/index-1AjPIqTN.js +0 -73
- package/dist/item-B1ugJ7YQ.js +0 -764
- package/dist/root-CaKPdqzv.js +0 -73
- /package/dist/components/{data-table → controls/list-control}/types.js +0 -0
- /package/dist/components/{data-table/footer.d.ts → data-view/parts/footer/index.d.ts} +0 -0
|
@@ -0,0 +1,1186 @@
|
|
|
1
|
+
import { jsx as V, jsxs as re, Fragment as Te } from "react/jsx-runtime";
|
|
2
|
+
import { cn as Dt } from "../../../utils/css.js";
|
|
3
|
+
import '../../../assets/styles.css';import '../../../assets/style6.css';import '../../../assets/style5.css';import '../../../assets/style4.css';import '../../../assets/style3.css';import '../../../assets/style2.css';import '../../../assets/style.css';import '../../../assets/style9.css';/* empty css */
|
|
4
|
+
import { useMemo as Se, useState as ie, useRef as ne, useEffect as le, useCallback as $e, useContext as Oe, createContext as Ve, startTransition as Lt } from "react";
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
import "../../../primitives/popover/index.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import { ScrollArea as Kt } from "../../../primitives/scroll-area/index.js";
|
|
10
|
+
import "../../../primitives/symbol/index.js";
|
|
11
|
+
/* empty css */
|
|
12
|
+
/* empty css */
|
|
13
|
+
/* empty css */
|
|
14
|
+
/* empty css */
|
|
15
|
+
import { normalizeOption as Nt } from "../../../types/options.js";
|
|
16
|
+
import { s as Tt } from "../../../MagnifyingGlass.es-CLstwG_v.js";
|
|
17
|
+
import { m as Mt } from "../../../style-Bp4uISf6.js";
|
|
18
|
+
import { e as Rt, C as Ft } from "../../../P7GR5CS5-Btbh4-Mw.js";
|
|
19
|
+
import { c as Z, _ as ee, i as ce, k as R, m as C, r as Ue, o as te, p as oe, P as je, Q as se, S as D, R as j, T as Ie, e as T, b as G, G as qe, j as pe, l as Ce, a0 as We, B as ze, q as xe, s as Bt, U as Ge, V as Qe, W as Ht, d as $t, u as Ut, ab as Je, I as jt, a1 as qt, w as Wt, ac as zt, ad as Gt, ae as Qt, x as Me, af as we, aa as Jt, A as Xt, a as Pe, a4 as Yt, $ as Zt, K as eo, h as to } from "../../../LMDWO4NN-DyBcLLfK.js";
|
|
20
|
+
import { c as Xe, a as Ye } from "../../../O2PQ2652-CRn371N3.js";
|
|
21
|
+
import { c as Ze, d as et, b as tt } from "../../../4CMBR7SL-BkCeHgv2.js";
|
|
22
|
+
import { m as ot, o as oo, t as nt, c as rt, s as Q, e as J, g as lt, b as st, d as ve, u as it, p as no } from "../../../YV4JVR4I-DOlaib2E.js";
|
|
23
|
+
import { a as at, C as ro, b as ut, c as lo, d as so, e as ct, u as io, f as ao } from "../../../S43UC3DV-C5JWPIhF.js";
|
|
24
|
+
import { t as dt } from "../../../7PRQYBBV-91wrWGjk.js";
|
|
25
|
+
import { u as mt, a as _e, S as ft, b as uo, c as co, d as mo, e as Re } from "../../../DG5U6ZEL-u5QgMA8f.js";
|
|
26
|
+
import { u as fo } from "../../../MTZPJQMC-DMklE0XE.js";
|
|
27
|
+
import { u as vt } from "../../../T7VMP3TM-DRNGQJpZ.js";
|
|
28
|
+
import { u as vo, a as po } from "../../../WMYDSCNQ-YGSwAHQE.js";
|
|
29
|
+
import { i as pt } from "../../../KFH4SEIX-BuapSU1b.js";
|
|
30
|
+
import { u as bt } from "../../../5JTVDSTH-BiHTUReD.js";
|
|
31
|
+
import { c as bo, u as So } from "../../../G7GW6PWC-FbNigUHQ.js";
|
|
32
|
+
import { h as Ee } from "../../../PFRGBC2K-DobANx7W.js";
|
|
33
|
+
import { u as St } from "../../../UQQRIHDV-eF2M9Cz2.js";
|
|
34
|
+
import { u as ht } from "../../../6VRAQV3D-DIdyGLyW.js";
|
|
35
|
+
var ho = "span", go = {
|
|
36
|
+
top: "4,10 8,6 12,10",
|
|
37
|
+
right: "6,4 10,8 6,12",
|
|
38
|
+
bottom: "4,6 8,10 12,6",
|
|
39
|
+
left: "10,4 6,8 10,12"
|
|
40
|
+
}, gt = Z(function(o) {
|
|
41
|
+
var n = o, { store: e, placement: r } = n, i = ee(n, ["store", "placement"]);
|
|
42
|
+
const a = fo();
|
|
43
|
+
e = e || a, ce(
|
|
44
|
+
e,
|
|
45
|
+
process.env.NODE_ENV !== "production" && "PopoverDisclosureArrow must be wrapped in a PopoverDisclosure component."
|
|
46
|
+
);
|
|
47
|
+
const I = e.useState((s) => r || s.placement).split("-")[0], v = go[I], u = Se(
|
|
48
|
+
() => /* @__PURE__ */ V(
|
|
49
|
+
"svg",
|
|
50
|
+
{
|
|
51
|
+
display: "block",
|
|
52
|
+
fill: "none",
|
|
53
|
+
stroke: "currentColor",
|
|
54
|
+
strokeLinecap: "round",
|
|
55
|
+
strokeLinejoin: "round",
|
|
56
|
+
strokeWidth: 1.5,
|
|
57
|
+
viewBox: "0 0 16 16",
|
|
58
|
+
height: "1em",
|
|
59
|
+
width: "1em",
|
|
60
|
+
children: /* @__PURE__ */ V("polyline", { points: v })
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
[v]
|
|
64
|
+
);
|
|
65
|
+
return i = R(C({
|
|
66
|
+
children: u,
|
|
67
|
+
"aria-hidden": !0
|
|
68
|
+
}, i), {
|
|
69
|
+
style: C({
|
|
70
|
+
width: "1em",
|
|
71
|
+
height: "1em",
|
|
72
|
+
pointerEvents: "none"
|
|
73
|
+
}, i.style)
|
|
74
|
+
}), Ue(i);
|
|
75
|
+
});
|
|
76
|
+
te(
|
|
77
|
+
function(o) {
|
|
78
|
+
const n = gt(o);
|
|
79
|
+
return oe(ho, n);
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
function Co(t = {}) {
|
|
83
|
+
var o = t, {
|
|
84
|
+
combobox: n
|
|
85
|
+
} = o, e = je(o, [
|
|
86
|
+
"combobox"
|
|
87
|
+
]);
|
|
88
|
+
const r = ot(
|
|
89
|
+
e.store,
|
|
90
|
+
oo(n, [
|
|
91
|
+
"value",
|
|
92
|
+
"items",
|
|
93
|
+
"renderedItems",
|
|
94
|
+
"baseElement",
|
|
95
|
+
"arrowElement",
|
|
96
|
+
"anchorElement",
|
|
97
|
+
"contentElement",
|
|
98
|
+
"popoverElement",
|
|
99
|
+
"disclosureElement"
|
|
100
|
+
])
|
|
101
|
+
);
|
|
102
|
+
nt(e, r);
|
|
103
|
+
const i = r.getState(), a = Ze(se(j({}, e), {
|
|
104
|
+
store: r,
|
|
105
|
+
virtualFocus: D(
|
|
106
|
+
e.virtualFocus,
|
|
107
|
+
i.virtualFocus,
|
|
108
|
+
!0
|
|
109
|
+
),
|
|
110
|
+
includesBaseElement: D(
|
|
111
|
+
e.includesBaseElement,
|
|
112
|
+
i.includesBaseElement,
|
|
113
|
+
!1
|
|
114
|
+
),
|
|
115
|
+
activeId: D(
|
|
116
|
+
e.activeId,
|
|
117
|
+
i.activeId,
|
|
118
|
+
e.defaultActiveId,
|
|
119
|
+
null
|
|
120
|
+
),
|
|
121
|
+
orientation: D(
|
|
122
|
+
e.orientation,
|
|
123
|
+
i.orientation,
|
|
124
|
+
"vertical"
|
|
125
|
+
)
|
|
126
|
+
})), O = Xe(se(j({}, e), {
|
|
127
|
+
store: r,
|
|
128
|
+
placement: D(
|
|
129
|
+
e.placement,
|
|
130
|
+
i.placement,
|
|
131
|
+
"bottom-start"
|
|
132
|
+
)
|
|
133
|
+
})), I = new String(""), v = se(j(j({}, a.getState()), O.getState()), {
|
|
134
|
+
value: D(
|
|
135
|
+
e.value,
|
|
136
|
+
i.value,
|
|
137
|
+
e.defaultValue,
|
|
138
|
+
I
|
|
139
|
+
),
|
|
140
|
+
setValueOnMove: D(
|
|
141
|
+
e.setValueOnMove,
|
|
142
|
+
i.setValueOnMove,
|
|
143
|
+
!1
|
|
144
|
+
),
|
|
145
|
+
labelElement: D(i.labelElement, null),
|
|
146
|
+
selectElement: D(i.selectElement, null),
|
|
147
|
+
listElement: D(i.listElement, null)
|
|
148
|
+
}), u = rt(v, a, O, r);
|
|
149
|
+
return Q(
|
|
150
|
+
u,
|
|
151
|
+
() => J(u, ["value", "items"], (s) => {
|
|
152
|
+
if (s.value !== I || !s.items.length) return;
|
|
153
|
+
const b = s.items.find(
|
|
154
|
+
(w) => !w.disabled && w.value != null
|
|
155
|
+
);
|
|
156
|
+
(b == null ? void 0 : b.value) != null && u.setState("value", b.value);
|
|
157
|
+
})
|
|
158
|
+
), Q(
|
|
159
|
+
u,
|
|
160
|
+
() => J(u, ["mounted"], (s) => {
|
|
161
|
+
s.mounted || u.setState("activeId", v.activeId);
|
|
162
|
+
})
|
|
163
|
+
), Q(
|
|
164
|
+
u,
|
|
165
|
+
() => J(u, ["mounted", "items", "value"], (s) => {
|
|
166
|
+
if (n || s.mounted) return;
|
|
167
|
+
const b = dt(s.value), w = b[b.length - 1];
|
|
168
|
+
if (w == null) return;
|
|
169
|
+
const c = s.items.find(
|
|
170
|
+
(p) => !p.disabled && p.value === w
|
|
171
|
+
);
|
|
172
|
+
c && u.setState("activeId", c.id);
|
|
173
|
+
})
|
|
174
|
+
), Q(
|
|
175
|
+
u,
|
|
176
|
+
() => lt(u, ["setValueOnMove", "moves"], (s) => {
|
|
177
|
+
const { mounted: b, value: w, activeId: c } = u.getState();
|
|
178
|
+
if (!s.setValueOnMove && b || Array.isArray(w) || !s.moves || !c) return;
|
|
179
|
+
const p = a.item(c);
|
|
180
|
+
!p || p.disabled || p.value == null || u.setState("value", p.value);
|
|
181
|
+
})
|
|
182
|
+
), se(j(j(j({}, a), O), u), {
|
|
183
|
+
combobox: n,
|
|
184
|
+
setValue: (s) => u.setState("value", s),
|
|
185
|
+
setLabelElement: (s) => u.setState("labelElement", s),
|
|
186
|
+
setSelectElement: (s) => u.setState("selectElement", s),
|
|
187
|
+
setListElement: (s) => u.setState("listElement", s)
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
function xo(t) {
|
|
191
|
+
const o = at();
|
|
192
|
+
return t = R(C({}, t), {
|
|
193
|
+
combobox: t.combobox !== void 0 ? t.combobox : o
|
|
194
|
+
}), et(t);
|
|
195
|
+
}
|
|
196
|
+
function yo(t, o, n) {
|
|
197
|
+
return Ie(o, [n.combobox]), ve(t, n, "value", "setValue"), ve(t, n, "setValueOnMove"), Object.assign(
|
|
198
|
+
Ye(
|
|
199
|
+
tt(t, o, n),
|
|
200
|
+
o,
|
|
201
|
+
n
|
|
202
|
+
),
|
|
203
|
+
{ combobox: n.combobox }
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
function wo(t = {}) {
|
|
207
|
+
t = xo(t);
|
|
208
|
+
const [o, n] = st(Co, t);
|
|
209
|
+
return yo(o, n, t);
|
|
210
|
+
}
|
|
211
|
+
var Oo = "span", Po = Z(
|
|
212
|
+
function(o) {
|
|
213
|
+
var n = o, { store: e } = n, r = ee(n, ["store"]);
|
|
214
|
+
const i = mt();
|
|
215
|
+
return e = e || i, r = gt(C({ store: e }, r)), r;
|
|
216
|
+
}
|
|
217
|
+
), Eo = te(function(o) {
|
|
218
|
+
const n = Po(o);
|
|
219
|
+
return oe(Oo, n);
|
|
220
|
+
}), Vo = "button";
|
|
221
|
+
function Io(t) {
|
|
222
|
+
return Array.from(t.selectedOptions).map((o) => o.value);
|
|
223
|
+
}
|
|
224
|
+
function ge(t, o) {
|
|
225
|
+
return () => {
|
|
226
|
+
const n = o();
|
|
227
|
+
if (!n) return;
|
|
228
|
+
let e = 0, r = t.item(n);
|
|
229
|
+
const i = r;
|
|
230
|
+
for (; r && r.value == null; ) {
|
|
231
|
+
const a = o(++e);
|
|
232
|
+
if (!a) return;
|
|
233
|
+
if (r = t.item(a), r === i) break;
|
|
234
|
+
}
|
|
235
|
+
return r == null ? void 0 : r.id;
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
var _o = Z(function(o) {
|
|
239
|
+
var n = o, {
|
|
240
|
+
store: e,
|
|
241
|
+
name: r,
|
|
242
|
+
form: i,
|
|
243
|
+
required: a,
|
|
244
|
+
showOnKeyDown: O = !0,
|
|
245
|
+
moveOnKeyDown: I = !0,
|
|
246
|
+
toggleOnPress: v = !0,
|
|
247
|
+
toggleOnClick: u = v
|
|
248
|
+
} = n, s = ee(n, [
|
|
249
|
+
"store",
|
|
250
|
+
"name",
|
|
251
|
+
"form",
|
|
252
|
+
"required",
|
|
253
|
+
"showOnKeyDown",
|
|
254
|
+
"moveOnKeyDown",
|
|
255
|
+
"toggleOnPress",
|
|
256
|
+
"toggleOnClick"
|
|
257
|
+
]);
|
|
258
|
+
const b = _e();
|
|
259
|
+
e = e || b, ce(
|
|
260
|
+
e,
|
|
261
|
+
process.env.NODE_ENV !== "production" && "Select must receive a `store` prop or be wrapped in a SelectProvider component."
|
|
262
|
+
);
|
|
263
|
+
const w = s.onKeyDown, c = T(O), p = T(I), P = e.useState("placement").split("-")[0], h = e.useState("value"), M = Array.isArray(h), x = G((f) => {
|
|
264
|
+
var S;
|
|
265
|
+
if (w == null || w(f), f.defaultPrevented || !e) return;
|
|
266
|
+
const { orientation: q, items: W, activeId: X } = e.getState(), de = q !== "horizontal", ae = q !== "vertical", k = !!((S = W.find((he) => !he.disabled && he.value != null)) != null && S.rowId), fe = {
|
|
267
|
+
ArrowUp: (k || de) && ge(e, e.up),
|
|
268
|
+
ArrowRight: (k || ae) && ge(e, e.next),
|
|
269
|
+
ArrowDown: (k || de) && ge(e, e.down),
|
|
270
|
+
ArrowLeft: (k || ae) && ge(e, e.previous)
|
|
271
|
+
}[f.key];
|
|
272
|
+
fe && p(f) && (f.preventDefault(), e.move(fe()));
|
|
273
|
+
const be = P === "top" || P === "bottom";
|
|
274
|
+
({
|
|
275
|
+
ArrowDown: be,
|
|
276
|
+
ArrowUp: be,
|
|
277
|
+
ArrowLeft: P === "left",
|
|
278
|
+
ArrowRight: P === "right"
|
|
279
|
+
})[f.key] && c(f) && (f.preventDefault(), e.move(X), qe(f.currentTarget, "keyup", e.show));
|
|
280
|
+
});
|
|
281
|
+
s = pe(
|
|
282
|
+
s,
|
|
283
|
+
(f) => /* @__PURE__ */ V(ft, { value: e, children: f }),
|
|
284
|
+
[e]
|
|
285
|
+
);
|
|
286
|
+
const [U, A] = ie(!1), E = ne(!1);
|
|
287
|
+
le(() => {
|
|
288
|
+
const f = E.current;
|
|
289
|
+
E.current = !1, !f && A(!1);
|
|
290
|
+
}, [h]);
|
|
291
|
+
const B = e.useState((f) => {
|
|
292
|
+
var S;
|
|
293
|
+
return (S = f.labelElement) == null ? void 0 : S.id;
|
|
294
|
+
}), d = s["aria-label"], g = s["aria-labelledby"] || B, H = e.useState((f) => {
|
|
295
|
+
if (r)
|
|
296
|
+
return f.items;
|
|
297
|
+
}), $ = Se(() => [...new Set(H == null ? void 0 : H.map((f) => f.value).filter((f) => f != null))], [H]);
|
|
298
|
+
s = pe(
|
|
299
|
+
s,
|
|
300
|
+
(f) => r ? /* @__PURE__ */ re(Te, { children: [
|
|
301
|
+
/* @__PURE__ */ re(
|
|
302
|
+
"select",
|
|
303
|
+
{
|
|
304
|
+
style: {
|
|
305
|
+
border: 0,
|
|
306
|
+
clip: "rect(0 0 0 0)",
|
|
307
|
+
height: "1px",
|
|
308
|
+
margin: "-1px",
|
|
309
|
+
overflow: "hidden",
|
|
310
|
+
padding: 0,
|
|
311
|
+
position: "absolute",
|
|
312
|
+
whiteSpace: "nowrap",
|
|
313
|
+
width: "1px"
|
|
314
|
+
},
|
|
315
|
+
tabIndex: -1,
|
|
316
|
+
"aria-hidden": !0,
|
|
317
|
+
"aria-label": d,
|
|
318
|
+
"aria-labelledby": g,
|
|
319
|
+
name: r,
|
|
320
|
+
form: i,
|
|
321
|
+
required: a,
|
|
322
|
+
disabled: s.disabled,
|
|
323
|
+
value: h,
|
|
324
|
+
multiple: M,
|
|
325
|
+
onFocus: () => {
|
|
326
|
+
var S;
|
|
327
|
+
return (S = e == null ? void 0 : e.getState().selectElement) == null ? void 0 : S.focus();
|
|
328
|
+
},
|
|
329
|
+
onChange: (S) => {
|
|
330
|
+
E.current = !0, A(!0), e == null || e.setValue(
|
|
331
|
+
M ? Io(S.target) : S.target.value
|
|
332
|
+
);
|
|
333
|
+
},
|
|
334
|
+
children: [
|
|
335
|
+
dt(h).map((S) => S == null || $.includes(S) ? null : /* @__PURE__ */ V("option", { value: S, children: S }, S)),
|
|
336
|
+
$.map((S) => /* @__PURE__ */ V("option", { value: S, children: S }, S))
|
|
337
|
+
]
|
|
338
|
+
}
|
|
339
|
+
),
|
|
340
|
+
f
|
|
341
|
+
] }) : f,
|
|
342
|
+
[
|
|
343
|
+
e,
|
|
344
|
+
d,
|
|
345
|
+
g,
|
|
346
|
+
r,
|
|
347
|
+
i,
|
|
348
|
+
a,
|
|
349
|
+
h,
|
|
350
|
+
M,
|
|
351
|
+
$,
|
|
352
|
+
s.disabled
|
|
353
|
+
]
|
|
354
|
+
);
|
|
355
|
+
const m = /* @__PURE__ */ re(Te, { children: [
|
|
356
|
+
h,
|
|
357
|
+
/* @__PURE__ */ V(Eo, {})
|
|
358
|
+
] }), _ = e.useState("contentElement");
|
|
359
|
+
return s = R(C({
|
|
360
|
+
role: "combobox",
|
|
361
|
+
"aria-autocomplete": "none",
|
|
362
|
+
"aria-labelledby": B,
|
|
363
|
+
"aria-haspopup": We(_, "listbox"),
|
|
364
|
+
"data-autofill": U || void 0,
|
|
365
|
+
"data-name": r,
|
|
366
|
+
children: m
|
|
367
|
+
}, s), {
|
|
368
|
+
ref: Ce(e.setSelectElement, s.ref),
|
|
369
|
+
onKeyDown: x
|
|
370
|
+
}), s = vo(C({ store: e, toggleOnClick: u }, s)), s = vt(C({ store: e }, s)), s;
|
|
371
|
+
}), Ao = te(function(o) {
|
|
372
|
+
const n = _o(o);
|
|
373
|
+
return oe(Vo, n);
|
|
374
|
+
});
|
|
375
|
+
function ko(t = {}) {
|
|
376
|
+
const o = wo(t);
|
|
377
|
+
return /* @__PURE__ */ V(uo, { value: o, children: t.children });
|
|
378
|
+
}
|
|
379
|
+
var Do = "div";
|
|
380
|
+
function Lo(t, o) {
|
|
381
|
+
if (o != null)
|
|
382
|
+
return t == null ? !1 : Array.isArray(t) ? t.includes(o) : t === o;
|
|
383
|
+
}
|
|
384
|
+
var Ko = Z(
|
|
385
|
+
function(o) {
|
|
386
|
+
var n = o, {
|
|
387
|
+
store: e,
|
|
388
|
+
value: r,
|
|
389
|
+
getItem: i,
|
|
390
|
+
hideOnClick: a,
|
|
391
|
+
setValueOnClick: O = r != null,
|
|
392
|
+
preventScrollOnKeyDown: I = !0,
|
|
393
|
+
focusOnHover: v = !0
|
|
394
|
+
} = n, u = ee(n, [
|
|
395
|
+
"store",
|
|
396
|
+
"value",
|
|
397
|
+
"getItem",
|
|
398
|
+
"hideOnClick",
|
|
399
|
+
"setValueOnClick",
|
|
400
|
+
"preventScrollOnKeyDown",
|
|
401
|
+
"focusOnHover"
|
|
402
|
+
]), s;
|
|
403
|
+
const b = co();
|
|
404
|
+
e = e || b, ce(
|
|
405
|
+
e,
|
|
406
|
+
process.env.NODE_ENV !== "production" && "SelectItem must be wrapped in a SelectList or SelectPopover component."
|
|
407
|
+
);
|
|
408
|
+
const w = xe(u.id), c = Bt(u), { listElement: p, multiSelectable: L, selected: P, autoFocus: h } = it(e, {
|
|
409
|
+
listElement: "listElement",
|
|
410
|
+
multiSelectable(d) {
|
|
411
|
+
return Array.isArray(d.value);
|
|
412
|
+
},
|
|
413
|
+
selected(d) {
|
|
414
|
+
return Lo(d.value, r);
|
|
415
|
+
},
|
|
416
|
+
autoFocus(d) {
|
|
417
|
+
return r == null || d.value == null || d.activeId !== w && (e != null && e.item(d.activeId)) ? !1 : Array.isArray(d.value) ? d.value[d.value.length - 1] === r : d.value === r;
|
|
418
|
+
}
|
|
419
|
+
}), M = $e(
|
|
420
|
+
(d) => {
|
|
421
|
+
const g = R(C({}, d), {
|
|
422
|
+
value: c ? void 0 : r,
|
|
423
|
+
children: r
|
|
424
|
+
});
|
|
425
|
+
return i ? i(g) : g;
|
|
426
|
+
},
|
|
427
|
+
[c, r, i]
|
|
428
|
+
);
|
|
429
|
+
a = a ?? (r != null && !L);
|
|
430
|
+
const x = u.onClick, U = T(O), A = T(a), E = G((d) => {
|
|
431
|
+
x == null || x(d), !d.defaultPrevented && (Ge(d) || Qe(d) || (U(d) && r != null && (e == null || e.setValue((g) => Array.isArray(g) ? g.includes(r) ? g.filter((H) => H !== r) : [...g, r] : r)), A(d) && (e == null || e.hide())));
|
|
432
|
+
});
|
|
433
|
+
u = pe(
|
|
434
|
+
u,
|
|
435
|
+
(d) => /* @__PURE__ */ V(mo.Provider, { value: P ?? !1, children: d }),
|
|
436
|
+
[P]
|
|
437
|
+
), u = R(C({
|
|
438
|
+
id: w,
|
|
439
|
+
role: Ht(p),
|
|
440
|
+
"aria-selected": P,
|
|
441
|
+
children: r
|
|
442
|
+
}, u), {
|
|
443
|
+
autoFocus: (s = u.autoFocus) != null ? s : h,
|
|
444
|
+
onClick: E
|
|
445
|
+
}), u = ht(C({
|
|
446
|
+
store: e,
|
|
447
|
+
getItem: M,
|
|
448
|
+
preventScrollOnKeyDown: I
|
|
449
|
+
}, u));
|
|
450
|
+
const B = T(v);
|
|
451
|
+
return u = St(R(C({
|
|
452
|
+
store: e
|
|
453
|
+
}, u), {
|
|
454
|
+
// We have to disable focusOnHover when the popup is closed, otherwise
|
|
455
|
+
// the active item will change to null (the container) when the popup is
|
|
456
|
+
// closed by clicking on an item.
|
|
457
|
+
focusOnHover(d) {
|
|
458
|
+
if (!B(d)) return !1;
|
|
459
|
+
const g = e == null ? void 0 : e.getState();
|
|
460
|
+
return !!(g != null && g.open);
|
|
461
|
+
}
|
|
462
|
+
})), u;
|
|
463
|
+
}
|
|
464
|
+
), No = ze(
|
|
465
|
+
te(function(o) {
|
|
466
|
+
const n = Ko(o);
|
|
467
|
+
return oe(Do, n);
|
|
468
|
+
})
|
|
469
|
+
), To = "div", Fe = Ve(null), Ct = Z(
|
|
470
|
+
function(o) {
|
|
471
|
+
var n = o, {
|
|
472
|
+
store: e,
|
|
473
|
+
resetOnEscape: r = !0,
|
|
474
|
+
hideOnEnter: i = !0,
|
|
475
|
+
focusOnMove: a = !0,
|
|
476
|
+
composite: O,
|
|
477
|
+
alwaysVisible: I
|
|
478
|
+
} = n, v = ee(n, [
|
|
479
|
+
"store",
|
|
480
|
+
"resetOnEscape",
|
|
481
|
+
"hideOnEnter",
|
|
482
|
+
"focusOnMove",
|
|
483
|
+
"composite",
|
|
484
|
+
"alwaysVisible"
|
|
485
|
+
]);
|
|
486
|
+
const u = mt();
|
|
487
|
+
e = e || u, ce(
|
|
488
|
+
e,
|
|
489
|
+
process.env.NODE_ENV !== "production" && "SelectList must receive a `store` prop or be wrapped in a SelectProvider component."
|
|
490
|
+
);
|
|
491
|
+
const s = xe(v.id), b = e.useState("value"), w = Array.isArray(b), [c, p] = ie(b), L = e.useState("mounted");
|
|
492
|
+
le(() => {
|
|
493
|
+
L || p(b);
|
|
494
|
+
}, [L, b]), r = r && !w;
|
|
495
|
+
const P = v.onKeyDown, h = T(r), M = T(i), x = G((k) => {
|
|
496
|
+
P == null || P(k), !k.defaultPrevented && (k.key === "Escape" && h(k) && (e == null || e.setValue(c)), (k.key === " " || k.key === "Enter") && $t(k) && M(k) && (k.preventDefault(), e == null || e.hide()));
|
|
497
|
+
}), U = Oe(Re), A = ie(), [E, B] = U || A, d = Se(
|
|
498
|
+
() => [E, B],
|
|
499
|
+
[E]
|
|
500
|
+
), [g, H] = ie(null), $ = Oe(Fe);
|
|
501
|
+
le(() => {
|
|
502
|
+
if ($)
|
|
503
|
+
return $(e), () => $(null);
|
|
504
|
+
}, [$, e]), v = pe(
|
|
505
|
+
v,
|
|
506
|
+
(k) => /* @__PURE__ */ V(ft, { value: e, children: /* @__PURE__ */ V(Fe.Provider, { value: H, children: /* @__PURE__ */ V(Re.Provider, { value: d, children: k }) }) }),
|
|
507
|
+
[e, d]
|
|
508
|
+
);
|
|
509
|
+
const m = !!e.combobox;
|
|
510
|
+
O = O ?? (!m && g !== e);
|
|
511
|
+
const [_, f] = Ut(
|
|
512
|
+
O ? e.setListElement : null
|
|
513
|
+
), S = Je(_, "role", v.role), W = (O || (S === "listbox" || S === "menu" || S === "tree" || S === "grid")) && w || void 0, X = pt(L, v.hidden, I), de = X ? R(C({}, v.style), { display: "none" }) : v.style;
|
|
514
|
+
O && (v = C({
|
|
515
|
+
role: "listbox",
|
|
516
|
+
"aria-multiselectable": W
|
|
517
|
+
}, v));
|
|
518
|
+
const ae = e.useState(
|
|
519
|
+
(k) => {
|
|
520
|
+
var me;
|
|
521
|
+
return E || ((me = k.labelElement) == null ? void 0 : me.id);
|
|
522
|
+
}
|
|
523
|
+
);
|
|
524
|
+
return v = R(C({
|
|
525
|
+
id: s,
|
|
526
|
+
"aria-labelledby": ae,
|
|
527
|
+
hidden: X
|
|
528
|
+
}, v), {
|
|
529
|
+
ref: Ce(f, v.ref),
|
|
530
|
+
style: de,
|
|
531
|
+
onKeyDown: x
|
|
532
|
+
}), v = bt(R(C({ store: e }, v), { composite: O })), v = vt(C({ store: e, typeahead: !m }, v)), v;
|
|
533
|
+
}
|
|
534
|
+
), Mo = te(function(o) {
|
|
535
|
+
const n = Ct(o);
|
|
536
|
+
return oe(To, n);
|
|
537
|
+
}), Ro = "div", Fo = Z(
|
|
538
|
+
function(o) {
|
|
539
|
+
var n = o, { store: e, alwaysVisible: r } = n, i = ee(n, ["store", "alwaysVisible"]);
|
|
540
|
+
const a = _e();
|
|
541
|
+
return e = e || a, i = Ct(C({ store: e, alwaysVisible: r }, i)), i = So(C({ store: e, alwaysVisible: r }, i)), i;
|
|
542
|
+
}
|
|
543
|
+
), Bo = bo(
|
|
544
|
+
te(function(o) {
|
|
545
|
+
const n = Fo(o);
|
|
546
|
+
return oe(Ro, n);
|
|
547
|
+
}),
|
|
548
|
+
_e
|
|
549
|
+
);
|
|
550
|
+
Ve(null);
|
|
551
|
+
Ve(
|
|
552
|
+
null
|
|
553
|
+
);
|
|
554
|
+
var Ho = jt(
|
|
555
|
+
[Ft],
|
|
556
|
+
[Rt]
|
|
557
|
+
), $o = Ho.useContext, Uo = Wt() && zt();
|
|
558
|
+
function jo(t = {}) {
|
|
559
|
+
var o = t, {
|
|
560
|
+
tag: n
|
|
561
|
+
} = o, e = je(o, [
|
|
562
|
+
"tag"
|
|
563
|
+
]);
|
|
564
|
+
const r = ot(e.store, no(n, ["value", "rtl"]));
|
|
565
|
+
nt(e, r);
|
|
566
|
+
const i = n == null ? void 0 : n.getState(), a = r == null ? void 0 : r.getState(), O = D(
|
|
567
|
+
e.activeId,
|
|
568
|
+
a == null ? void 0 : a.activeId,
|
|
569
|
+
e.defaultActiveId,
|
|
570
|
+
null
|
|
571
|
+
), I = Ze(se(j({}, e), {
|
|
572
|
+
activeId: O,
|
|
573
|
+
includesBaseElement: D(
|
|
574
|
+
e.includesBaseElement,
|
|
575
|
+
a == null ? void 0 : a.includesBaseElement,
|
|
576
|
+
!0
|
|
577
|
+
),
|
|
578
|
+
orientation: D(
|
|
579
|
+
e.orientation,
|
|
580
|
+
a == null ? void 0 : a.orientation,
|
|
581
|
+
"vertical"
|
|
582
|
+
),
|
|
583
|
+
focusLoop: D(e.focusLoop, a == null ? void 0 : a.focusLoop, !0),
|
|
584
|
+
focusWrap: D(e.focusWrap, a == null ? void 0 : a.focusWrap, !0),
|
|
585
|
+
virtualFocus: D(
|
|
586
|
+
e.virtualFocus,
|
|
587
|
+
a == null ? void 0 : a.virtualFocus,
|
|
588
|
+
!0
|
|
589
|
+
)
|
|
590
|
+
})), v = Xe(se(j({}, e), {
|
|
591
|
+
placement: D(
|
|
592
|
+
e.placement,
|
|
593
|
+
a == null ? void 0 : a.placement,
|
|
594
|
+
"bottom-start"
|
|
595
|
+
)
|
|
596
|
+
})), u = D(
|
|
597
|
+
e.value,
|
|
598
|
+
a == null ? void 0 : a.value,
|
|
599
|
+
e.defaultValue,
|
|
600
|
+
""
|
|
601
|
+
), s = D(
|
|
602
|
+
e.selectedValue,
|
|
603
|
+
a == null ? void 0 : a.selectedValue,
|
|
604
|
+
i == null ? void 0 : i.values,
|
|
605
|
+
e.defaultSelectedValue,
|
|
606
|
+
""
|
|
607
|
+
), b = Array.isArray(s), w = se(j(j({}, I.getState()), v.getState()), {
|
|
608
|
+
value: u,
|
|
609
|
+
selectedValue: s,
|
|
610
|
+
resetValueOnSelect: D(
|
|
611
|
+
e.resetValueOnSelect,
|
|
612
|
+
a == null ? void 0 : a.resetValueOnSelect,
|
|
613
|
+
b
|
|
614
|
+
),
|
|
615
|
+
resetValueOnHide: D(
|
|
616
|
+
e.resetValueOnHide,
|
|
617
|
+
a == null ? void 0 : a.resetValueOnHide,
|
|
618
|
+
b && !n
|
|
619
|
+
),
|
|
620
|
+
activeValue: a == null ? void 0 : a.activeValue
|
|
621
|
+
}), c = rt(w, I, v, r);
|
|
622
|
+
return Uo && Q(
|
|
623
|
+
c,
|
|
624
|
+
() => J(c, ["virtualFocus"], () => {
|
|
625
|
+
c.setState("virtualFocus", !1);
|
|
626
|
+
})
|
|
627
|
+
), Q(c, () => {
|
|
628
|
+
if (n)
|
|
629
|
+
return qt(
|
|
630
|
+
J(c, ["selectedValue"], (p) => {
|
|
631
|
+
Array.isArray(p.selectedValue) && n.setValues(p.selectedValue);
|
|
632
|
+
}),
|
|
633
|
+
J(n, ["values"], (p) => {
|
|
634
|
+
c.setState("selectedValue", p.values);
|
|
635
|
+
})
|
|
636
|
+
);
|
|
637
|
+
}), Q(
|
|
638
|
+
c,
|
|
639
|
+
() => J(c, ["resetValueOnHide", "mounted"], (p) => {
|
|
640
|
+
p.resetValueOnHide && (p.mounted || c.setState("value", u));
|
|
641
|
+
})
|
|
642
|
+
), Q(
|
|
643
|
+
c,
|
|
644
|
+
() => J(c, ["open"], (p) => {
|
|
645
|
+
p.open || (c.setState("activeId", O), c.setState("moves", 0));
|
|
646
|
+
})
|
|
647
|
+
), Q(
|
|
648
|
+
c,
|
|
649
|
+
() => J(c, ["moves", "activeId"], (p, L) => {
|
|
650
|
+
p.moves === L.moves && c.setState("activeValue", void 0);
|
|
651
|
+
})
|
|
652
|
+
), Q(
|
|
653
|
+
c,
|
|
654
|
+
() => lt(c, ["moves", "renderedItems"], (p, L) => {
|
|
655
|
+
if (p.moves === L.moves) return;
|
|
656
|
+
const { activeId: P } = c.getState(), h = I.item(P);
|
|
657
|
+
c.setState("activeValue", h == null ? void 0 : h.value);
|
|
658
|
+
})
|
|
659
|
+
), se(j(j(j({}, v), I), c), {
|
|
660
|
+
tag: n,
|
|
661
|
+
setValue: (p) => c.setState("value", p),
|
|
662
|
+
resetValue: () => c.setState("value", w.value),
|
|
663
|
+
setSelectedValue: (p) => c.setState("selectedValue", p)
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
function qo(t) {
|
|
667
|
+
const o = $o();
|
|
668
|
+
return t = R(C({}, t), {
|
|
669
|
+
tag: t.tag !== void 0 ? t.tag : o
|
|
670
|
+
}), et(t);
|
|
671
|
+
}
|
|
672
|
+
function Wo(t, o, n) {
|
|
673
|
+
return Ie(o, [n.tag]), ve(t, n, "value", "setValue"), ve(t, n, "selectedValue", "setSelectedValue"), ve(t, n, "resetValueOnHide"), ve(t, n, "resetValueOnSelect"), Object.assign(
|
|
674
|
+
tt(
|
|
675
|
+
Ye(t, o, n),
|
|
676
|
+
o,
|
|
677
|
+
n
|
|
678
|
+
),
|
|
679
|
+
{ tag: n.tag }
|
|
680
|
+
);
|
|
681
|
+
}
|
|
682
|
+
function zo(t = {}) {
|
|
683
|
+
t = qo(t);
|
|
684
|
+
const [o, n] = st(jo, t);
|
|
685
|
+
return Wo(o, n, t);
|
|
686
|
+
}
|
|
687
|
+
var Go = "input";
|
|
688
|
+
function Be(t, o, n) {
|
|
689
|
+
if (!n) return !1;
|
|
690
|
+
const e = t.find((r) => !r.disabled && r.value);
|
|
691
|
+
return (e == null ? void 0 : e.value) === o;
|
|
692
|
+
}
|
|
693
|
+
function He(t, o) {
|
|
694
|
+
return !o || t == null ? !1 : (t = eo(t), o.length > t.length && o.toLowerCase().indexOf(t.toLowerCase()) === 0);
|
|
695
|
+
}
|
|
696
|
+
function Qo(t) {
|
|
697
|
+
return t.type === "input";
|
|
698
|
+
}
|
|
699
|
+
function Jo(t) {
|
|
700
|
+
return t === "inline" || t === "list" || t === "both" || t === "none";
|
|
701
|
+
}
|
|
702
|
+
function Xo(t) {
|
|
703
|
+
const o = t.find((n) => {
|
|
704
|
+
var e;
|
|
705
|
+
return n.disabled ? !1 : ((e = n.element) == null ? void 0 : e.getAttribute("role")) !== "tab";
|
|
706
|
+
});
|
|
707
|
+
return o == null ? void 0 : o.id;
|
|
708
|
+
}
|
|
709
|
+
var Yo = Z(
|
|
710
|
+
function(o) {
|
|
711
|
+
var n = o, {
|
|
712
|
+
store: e,
|
|
713
|
+
focusable: r = !0,
|
|
714
|
+
autoSelect: i = !1,
|
|
715
|
+
getAutoSelectId: a,
|
|
716
|
+
setValueOnChange: O,
|
|
717
|
+
showMinLength: I = 0,
|
|
718
|
+
showOnChange: v,
|
|
719
|
+
showOnMouseDown: u,
|
|
720
|
+
showOnClick: s = u,
|
|
721
|
+
showOnKeyDown: b,
|
|
722
|
+
showOnKeyPress: w = b,
|
|
723
|
+
blurActiveItemOnClick: c,
|
|
724
|
+
setValueOnClick: p = !0,
|
|
725
|
+
moveOnKeyPress: L = !0,
|
|
726
|
+
autoComplete: P = "list"
|
|
727
|
+
} = n, h = ee(n, [
|
|
728
|
+
"store",
|
|
729
|
+
"focusable",
|
|
730
|
+
"autoSelect",
|
|
731
|
+
"getAutoSelectId",
|
|
732
|
+
"setValueOnChange",
|
|
733
|
+
"showMinLength",
|
|
734
|
+
"showOnChange",
|
|
735
|
+
"showOnMouseDown",
|
|
736
|
+
"showOnClick",
|
|
737
|
+
"showOnKeyDown",
|
|
738
|
+
"showOnKeyPress",
|
|
739
|
+
"blurActiveItemOnClick",
|
|
740
|
+
"setValueOnClick",
|
|
741
|
+
"moveOnKeyPress",
|
|
742
|
+
"autoComplete"
|
|
743
|
+
]);
|
|
744
|
+
const M = at();
|
|
745
|
+
e = e || M, ce(
|
|
746
|
+
e,
|
|
747
|
+
process.env.NODE_ENV !== "production" && "Combobox must receive a `store` prop or be wrapped in a ComboboxProvider component."
|
|
748
|
+
);
|
|
749
|
+
const x = ne(null), [U, A] = Gt(), E = ne(!1), B = ne(!1), d = e.useState(
|
|
750
|
+
(l) => l.virtualFocus && i
|
|
751
|
+
), g = P === "inline" || P === "both", [H, $] = ie(g);
|
|
752
|
+
Qt(() => {
|
|
753
|
+
g && $(!0);
|
|
754
|
+
}, [g]);
|
|
755
|
+
const m = e.useState("value"), _ = ne();
|
|
756
|
+
le(() => J(e, ["selectedValue", "activeId"], (l, y) => {
|
|
757
|
+
_.current = y.selectedValue;
|
|
758
|
+
}), []);
|
|
759
|
+
const f = e.useState((l) => {
|
|
760
|
+
var y;
|
|
761
|
+
if (g && H && !(l.activeValue && Array.isArray(l.selectedValue) && (l.selectedValue.includes(l.activeValue) || (y = _.current) != null && y.includes(l.activeValue))))
|
|
762
|
+
return l.activeValue;
|
|
763
|
+
}), S = e.useState("renderedItems"), q = e.useState("open"), W = e.useState("contentElement"), X = Se(() => {
|
|
764
|
+
if (!g || !H) return m;
|
|
765
|
+
if (Be(
|
|
766
|
+
S,
|
|
767
|
+
f,
|
|
768
|
+
d
|
|
769
|
+
)) {
|
|
770
|
+
if (He(m, f)) {
|
|
771
|
+
const y = (f == null ? void 0 : f.slice(m.length)) || "";
|
|
772
|
+
return m + y;
|
|
773
|
+
}
|
|
774
|
+
return m;
|
|
775
|
+
}
|
|
776
|
+
return f || m;
|
|
777
|
+
}, [g, H, S, f, d, m]);
|
|
778
|
+
le(() => {
|
|
779
|
+
const l = x.current;
|
|
780
|
+
if (!l) return;
|
|
781
|
+
const y = () => $(!0);
|
|
782
|
+
return l.addEventListener("combobox-item-move", y), () => {
|
|
783
|
+
l.removeEventListener("combobox-item-move", y);
|
|
784
|
+
};
|
|
785
|
+
}, []), le(() => {
|
|
786
|
+
if (!g || !H || !f || !Be(
|
|
787
|
+
S,
|
|
788
|
+
f,
|
|
789
|
+
d
|
|
790
|
+
) || !He(m, f)) return;
|
|
791
|
+
let y = Jt;
|
|
792
|
+
return queueMicrotask(() => {
|
|
793
|
+
const K = x.current;
|
|
794
|
+
if (!K) return;
|
|
795
|
+
const { start: N, end: z } = Me(K), Y = m.length, F = f.length;
|
|
796
|
+
we(K, Y, F), y = () => {
|
|
797
|
+
if (!Ee(K)) return;
|
|
798
|
+
const { start: ue, end: kt } = Me(K);
|
|
799
|
+
ue === Y && kt === F && we(K, N, z);
|
|
800
|
+
};
|
|
801
|
+
}), () => y();
|
|
802
|
+
}, [
|
|
803
|
+
U,
|
|
804
|
+
g,
|
|
805
|
+
H,
|
|
806
|
+
f,
|
|
807
|
+
S,
|
|
808
|
+
d,
|
|
809
|
+
m
|
|
810
|
+
]);
|
|
811
|
+
const de = ne(null), ae = G(a), k = ne(null);
|
|
812
|
+
le(() => {
|
|
813
|
+
if (!q || !W) return;
|
|
814
|
+
const l = Xt(W);
|
|
815
|
+
if (!l) return;
|
|
816
|
+
de.current = l;
|
|
817
|
+
const y = () => {
|
|
818
|
+
E.current = !1;
|
|
819
|
+
}, K = () => {
|
|
820
|
+
if (!e || !E.current) return;
|
|
821
|
+
const { activeId: z } = e.getState();
|
|
822
|
+
z !== null && z !== k.current && (E.current = !1);
|
|
823
|
+
}, N = { passive: !0, capture: !0 };
|
|
824
|
+
return l.addEventListener("wheel", y, N), l.addEventListener("touchmove", y, N), l.addEventListener("scroll", K, N), () => {
|
|
825
|
+
l.removeEventListener("wheel", y, !0), l.removeEventListener("touchmove", y, !0), l.removeEventListener("scroll", K, !0);
|
|
826
|
+
};
|
|
827
|
+
}, [q, W, e]), Pe(() => {
|
|
828
|
+
m && (B.current || (E.current = !0));
|
|
829
|
+
}, [m]), Pe(() => {
|
|
830
|
+
d !== "always" && q || (E.current = q);
|
|
831
|
+
}, [d, q]);
|
|
832
|
+
const me = e.useState("resetValueOnSelect");
|
|
833
|
+
Ie(() => {
|
|
834
|
+
var l, y;
|
|
835
|
+
const K = E.current;
|
|
836
|
+
if (!e || !q || !K && !me) return;
|
|
837
|
+
const { baseElement: N, contentElement: z, activeId: Y } = e.getState();
|
|
838
|
+
if (!(N && !Ee(N))) {
|
|
839
|
+
if (z != null && z.hasAttribute("data-placing")) {
|
|
840
|
+
const F = new MutationObserver(A);
|
|
841
|
+
return F.observe(z, { attributeFilter: ["data-placing"] }), () => F.disconnect();
|
|
842
|
+
}
|
|
843
|
+
if (d && K) {
|
|
844
|
+
const F = ae(S), ue = F !== void 0 ? F : (l = Xo(S)) != null ? l : e.first();
|
|
845
|
+
k.current = ue, e.move(ue ?? null);
|
|
846
|
+
} else {
|
|
847
|
+
const F = (y = e.item(Y || e.first())) == null ? void 0 : y.element;
|
|
848
|
+
F && "scrollIntoView" in F && F.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
}, [
|
|
852
|
+
e,
|
|
853
|
+
q,
|
|
854
|
+
U,
|
|
855
|
+
m,
|
|
856
|
+
d,
|
|
857
|
+
me,
|
|
858
|
+
ae,
|
|
859
|
+
S
|
|
860
|
+
]), le(() => {
|
|
861
|
+
if (!g) return;
|
|
862
|
+
const l = x.current;
|
|
863
|
+
if (!l) return;
|
|
864
|
+
const y = [l, W].filter(
|
|
865
|
+
(N) => !!N
|
|
866
|
+
), K = (N) => {
|
|
867
|
+
y.every((z) => Zt(N, z)) && (e == null || e.setValue(X));
|
|
868
|
+
};
|
|
869
|
+
for (const N of y)
|
|
870
|
+
N.addEventListener("focusout", K);
|
|
871
|
+
return () => {
|
|
872
|
+
for (const N of y)
|
|
873
|
+
N.removeEventListener("focusout", K);
|
|
874
|
+
};
|
|
875
|
+
}, [g, W, e, X]);
|
|
876
|
+
const fe = (l) => l.currentTarget.value.length >= I, be = h.onChange, Ae = T(v ?? fe), ke = T(
|
|
877
|
+
// If the combobox is combined with tags, the value will be set by the tag
|
|
878
|
+
// input component.
|
|
879
|
+
O ?? !e.tag
|
|
880
|
+
), De = G((l) => {
|
|
881
|
+
if (be == null || be(l), l.defaultPrevented || !e) return;
|
|
882
|
+
const y = l.currentTarget, { value: K, selectionStart: N, selectionEnd: z } = y, Y = l.nativeEvent;
|
|
883
|
+
if (E.current = !0, Qo(Y) && (Y.isComposing && (E.current = !1, B.current = !0), g)) {
|
|
884
|
+
const F = Y.inputType === "insertText" || Y.inputType === "insertCompositionText", ue = N === K.length;
|
|
885
|
+
$(F && ue);
|
|
886
|
+
}
|
|
887
|
+
if (ke(l)) {
|
|
888
|
+
const F = K === e.getState().value;
|
|
889
|
+
e.setValue(K), queueMicrotask(() => {
|
|
890
|
+
we(y, N, z);
|
|
891
|
+
}), g && d && F && A();
|
|
892
|
+
}
|
|
893
|
+
Ae(l) && e.show(), (!d || !E.current) && e.setActiveId(null);
|
|
894
|
+
}), ye = h.onCompositionEnd, he = G((l) => {
|
|
895
|
+
E.current = !0, B.current = !1, ye == null || ye(l), !l.defaultPrevented && d && A();
|
|
896
|
+
}), Le = h.onMouseDown, xt = T(
|
|
897
|
+
c ?? (() => !!(e != null && e.getState().includesBaseElement))
|
|
898
|
+
), yt = T(p), wt = T(s ?? fe), Ot = G((l) => {
|
|
899
|
+
Le == null || Le(l), !l.defaultPrevented && (l.button || l.ctrlKey || e && (xt(l) && e.setActiveId(null), yt(l) && e.setValue(X), wt(l) && qe(l.currentTarget, "mouseup", e.show)));
|
|
900
|
+
}), Ke = h.onKeyDown, Pt = T(w ?? fe), Et = G((l) => {
|
|
901
|
+
if (Ke == null || Ke(l), l.repeat || (E.current = !1), l.defaultPrevented || l.ctrlKey || l.altKey || l.shiftKey || l.metaKey || !e) return;
|
|
902
|
+
const { open: y } = e.getState();
|
|
903
|
+
y || (l.key === "ArrowUp" || l.key === "ArrowDown") && Pt(l) && (l.preventDefault(), e.show());
|
|
904
|
+
}), Ne = h.onBlur, Vt = G((l) => {
|
|
905
|
+
E.current = !1, Ne == null || Ne(l), l.defaultPrevented;
|
|
906
|
+
}), It = xe(h.id), _t = Jo(P) ? P : void 0, At = e.useState((l) => l.activeId === null);
|
|
907
|
+
return h = R(C({
|
|
908
|
+
id: It,
|
|
909
|
+
role: "combobox",
|
|
910
|
+
"aria-autocomplete": _t,
|
|
911
|
+
"aria-haspopup": We(W, "listbox"),
|
|
912
|
+
"aria-expanded": q,
|
|
913
|
+
"aria-controls": W == null ? void 0 : W.id,
|
|
914
|
+
"data-active-item": At || void 0,
|
|
915
|
+
value: X
|
|
916
|
+
}, h), {
|
|
917
|
+
ref: Ce(x, h.ref),
|
|
918
|
+
onChange: De,
|
|
919
|
+
onCompositionEnd: he,
|
|
920
|
+
onMouseDown: Ot,
|
|
921
|
+
onKeyDown: Et,
|
|
922
|
+
onBlur: Vt
|
|
923
|
+
}), h = bt(R(C({
|
|
924
|
+
store: e,
|
|
925
|
+
focusable: r
|
|
926
|
+
}, h), {
|
|
927
|
+
// Enable inline autocomplete when the user moves from the combobox input
|
|
928
|
+
// to an item.
|
|
929
|
+
moveOnKeyPress: (l) => Yt(L, l) ? !1 : (g && $(!0), !0)
|
|
930
|
+
})), h = po(C({ store: e }, h)), C({ autoComplete: "off" }, h);
|
|
931
|
+
}
|
|
932
|
+
), Zo = te(function(o) {
|
|
933
|
+
const n = Yo(o);
|
|
934
|
+
return oe(Go, n);
|
|
935
|
+
});
|
|
936
|
+
function en(t = {}) {
|
|
937
|
+
const o = zo(t);
|
|
938
|
+
return /* @__PURE__ */ V(ro, { value: o, children: t.children });
|
|
939
|
+
}
|
|
940
|
+
var tn = "div";
|
|
941
|
+
function on(t, o) {
|
|
942
|
+
if (o != null)
|
|
943
|
+
return t == null ? !1 : Array.isArray(t) ? t.includes(o) : t === o;
|
|
944
|
+
}
|
|
945
|
+
function nn(t) {
|
|
946
|
+
var o;
|
|
947
|
+
return (o = {
|
|
948
|
+
menu: "menuitem",
|
|
949
|
+
listbox: "option",
|
|
950
|
+
tree: "treeitem"
|
|
951
|
+
}[t]) != null ? o : "option";
|
|
952
|
+
}
|
|
953
|
+
var rn = Z(
|
|
954
|
+
function(o) {
|
|
955
|
+
var n = o, {
|
|
956
|
+
store: e,
|
|
957
|
+
value: r,
|
|
958
|
+
hideOnClick: i,
|
|
959
|
+
setValueOnClick: a,
|
|
960
|
+
selectValueOnClick: O = !0,
|
|
961
|
+
resetValueOnSelect: I,
|
|
962
|
+
focusOnHover: v = !1,
|
|
963
|
+
moveOnKeyPress: u = !0,
|
|
964
|
+
getItem: s
|
|
965
|
+
} = n, b = ee(n, [
|
|
966
|
+
"store",
|
|
967
|
+
"value",
|
|
968
|
+
"hideOnClick",
|
|
969
|
+
"setValueOnClick",
|
|
970
|
+
"selectValueOnClick",
|
|
971
|
+
"resetValueOnSelect",
|
|
972
|
+
"focusOnHover",
|
|
973
|
+
"moveOnKeyPress",
|
|
974
|
+
"getItem"
|
|
975
|
+
]), w;
|
|
976
|
+
const c = ut();
|
|
977
|
+
e = e || c, ce(
|
|
978
|
+
e,
|
|
979
|
+
process.env.NODE_ENV !== "production" && "ComboboxItem must be wrapped in a ComboboxList or ComboboxPopover component."
|
|
980
|
+
);
|
|
981
|
+
const { resetValueOnSelectState: p, multiSelectable: L, selected: P } = it(e, {
|
|
982
|
+
resetValueOnSelectState: "resetValueOnSelect",
|
|
983
|
+
multiSelectable(m) {
|
|
984
|
+
return Array.isArray(m.selectedValue);
|
|
985
|
+
},
|
|
986
|
+
selected(m) {
|
|
987
|
+
return on(m.selectedValue, r);
|
|
988
|
+
}
|
|
989
|
+
}), h = $e(
|
|
990
|
+
(m) => {
|
|
991
|
+
const _ = R(C({}, m), { value: r });
|
|
992
|
+
return s ? s(_) : _;
|
|
993
|
+
},
|
|
994
|
+
[r, s]
|
|
995
|
+
);
|
|
996
|
+
a = a ?? !L, i = i ?? (r != null && !L);
|
|
997
|
+
const M = b.onClick, x = T(a), U = T(O), A = T(
|
|
998
|
+
(w = I ?? p) != null ? w : L
|
|
999
|
+
), E = T(i), B = G((m) => {
|
|
1000
|
+
M == null || M(m), !m.defaultPrevented && (Ge(m) || Qe(m) || (r != null && (U(m) && (A(m) && (e == null || e.resetValue()), e == null || e.setSelectedValue((_) => Array.isArray(_) ? _.includes(r) ? _.filter((f) => f !== r) : [..._, r] : r)), x(m) && (e == null || e.setValue(r))), E(m) && (e == null || e.hide())));
|
|
1001
|
+
}), d = b.onKeyDown, g = G((m) => {
|
|
1002
|
+
if (d == null || d(m), m.defaultPrevented) return;
|
|
1003
|
+
const _ = e == null ? void 0 : e.getState().baseElement;
|
|
1004
|
+
if (!_ || Ee(_)) return;
|
|
1005
|
+
(m.key.length === 1 || m.key === "Backspace" || m.key === "Delete") && (queueMicrotask(() => _.focus()), to(_) && (e == null || e.setValue(_.value)));
|
|
1006
|
+
});
|
|
1007
|
+
L && P != null && (b = C({
|
|
1008
|
+
"aria-selected": P
|
|
1009
|
+
}, b)), b = pe(
|
|
1010
|
+
b,
|
|
1011
|
+
(m) => /* @__PURE__ */ V(lo.Provider, { value: r, children: /* @__PURE__ */ V(so.Provider, { value: P ?? !1, children: m }) }),
|
|
1012
|
+
[r, P]
|
|
1013
|
+
);
|
|
1014
|
+
const H = Oe(ct);
|
|
1015
|
+
b = R(C({
|
|
1016
|
+
role: nn(H),
|
|
1017
|
+
children: r
|
|
1018
|
+
}, b), {
|
|
1019
|
+
onClick: B,
|
|
1020
|
+
onKeyDown: g
|
|
1021
|
+
});
|
|
1022
|
+
const $ = T(u);
|
|
1023
|
+
return b = ht(R(C({
|
|
1024
|
+
store: e
|
|
1025
|
+
}, b), {
|
|
1026
|
+
getItem: h,
|
|
1027
|
+
// Dispatch a custom event on the combobox input when moving to an item
|
|
1028
|
+
// with the keyboard so the Combobox component can enable inline
|
|
1029
|
+
// autocompletion.
|
|
1030
|
+
moveOnKeyPress: (m) => {
|
|
1031
|
+
if (!$(m)) return !1;
|
|
1032
|
+
const _ = new Event("combobox-item-move"), f = e == null ? void 0 : e.getState().baseElement;
|
|
1033
|
+
return f == null || f.dispatchEvent(_), !0;
|
|
1034
|
+
}
|
|
1035
|
+
})), b = St(C({ store: e, focusOnHover: v }, b)), b;
|
|
1036
|
+
}
|
|
1037
|
+
), ln = ze(
|
|
1038
|
+
te(function(o) {
|
|
1039
|
+
const n = rn(o);
|
|
1040
|
+
return oe(tn, n);
|
|
1041
|
+
})
|
|
1042
|
+
), sn = "div", an = Z(
|
|
1043
|
+
function(o) {
|
|
1044
|
+
var n = o, { store: e, alwaysVisible: r } = n, i = ee(n, ["store", "alwaysVisible"]);
|
|
1045
|
+
const a = ut(!0), O = io();
|
|
1046
|
+
e = e || O;
|
|
1047
|
+
const I = !!e && e === a;
|
|
1048
|
+
ce(
|
|
1049
|
+
e,
|
|
1050
|
+
process.env.NODE_ENV !== "production" && "ComboboxList must receive a `store` prop or be wrapped in a ComboboxProvider component."
|
|
1051
|
+
);
|
|
1052
|
+
const v = ne(null), u = xe(i.id), s = e.useState("mounted"), b = pt(s, i.hidden, r), w = b ? R(C({}, i.style), { display: "none" }) : i.style, c = e.useState(
|
|
1053
|
+
(A) => Array.isArray(A.selectedValue)
|
|
1054
|
+
), p = Je(v, "role", i.role), P = (p === "listbox" || p === "tree" || p === "grid") && c || void 0, [h, M] = ie(!1), x = e.useState("contentElement");
|
|
1055
|
+
Pe(() => {
|
|
1056
|
+
if (!s) return;
|
|
1057
|
+
const A = v.current;
|
|
1058
|
+
if (!A || x !== A) return;
|
|
1059
|
+
const E = () => {
|
|
1060
|
+
M(!!A.querySelector("[role='listbox']"));
|
|
1061
|
+
}, B = new MutationObserver(E);
|
|
1062
|
+
return B.observe(A, {
|
|
1063
|
+
subtree: !0,
|
|
1064
|
+
childList: !0,
|
|
1065
|
+
attributeFilter: ["role"]
|
|
1066
|
+
}), E(), () => B.disconnect();
|
|
1067
|
+
}, [s, x]), h || (i = C({
|
|
1068
|
+
role: "listbox",
|
|
1069
|
+
"aria-multiselectable": P
|
|
1070
|
+
}, i)), i = pe(
|
|
1071
|
+
i,
|
|
1072
|
+
(A) => /* @__PURE__ */ V(ao, { value: e, children: /* @__PURE__ */ V(ct.Provider, { value: p, children: A }) }),
|
|
1073
|
+
[e, p]
|
|
1074
|
+
);
|
|
1075
|
+
const U = u && (!a || !I) ? e.setContentElement : null;
|
|
1076
|
+
return i = R(C({
|
|
1077
|
+
id: u,
|
|
1078
|
+
hidden: b
|
|
1079
|
+
}, i), {
|
|
1080
|
+
ref: Ce(U, v, i.ref),
|
|
1081
|
+
style: w
|
|
1082
|
+
}), Ue(i);
|
|
1083
|
+
}
|
|
1084
|
+
), un = te(function(o) {
|
|
1085
|
+
const n = an(o);
|
|
1086
|
+
return oe(sn, n);
|
|
1087
|
+
});
|
|
1088
|
+
const jn = ({
|
|
1089
|
+
value: t,
|
|
1090
|
+
onChangeValue: o,
|
|
1091
|
+
options: n,
|
|
1092
|
+
searchable: e = !1,
|
|
1093
|
+
placeholder: r = "Choose an option...",
|
|
1094
|
+
prefix: i,
|
|
1095
|
+
suffix: a,
|
|
1096
|
+
children: O,
|
|
1097
|
+
withIcon: I,
|
|
1098
|
+
...v
|
|
1099
|
+
}) => {
|
|
1100
|
+
const [u, s] = ie(!1), [b, w] = ie(""), c = (n || []).map(Nt), p = Se(() => Mt(c, b, {
|
|
1101
|
+
baseSort: (x, U) => x.index < U.index ? -1 : 1,
|
|
1102
|
+
keys: ["label", "description"]
|
|
1103
|
+
}), [b]), L = e ? un : Mo, M = !!!c.find((x) => x.value === t);
|
|
1104
|
+
return /* @__PURE__ */ V(
|
|
1105
|
+
en,
|
|
1106
|
+
{
|
|
1107
|
+
resetValueOnHide: !0,
|
|
1108
|
+
open: u,
|
|
1109
|
+
setOpen: s,
|
|
1110
|
+
setValue: (x) => {
|
|
1111
|
+
Lt(() => {
|
|
1112
|
+
w(x);
|
|
1113
|
+
});
|
|
1114
|
+
},
|
|
1115
|
+
children: /* @__PURE__ */ re(
|
|
1116
|
+
ko,
|
|
1117
|
+
{
|
|
1118
|
+
value: M ? "" : t,
|
|
1119
|
+
setValue: o,
|
|
1120
|
+
open: u,
|
|
1121
|
+
setOpen: s,
|
|
1122
|
+
children: [
|
|
1123
|
+
/* @__PURE__ */ V(
|
|
1124
|
+
Ao,
|
|
1125
|
+
{
|
|
1126
|
+
className: Dt(
|
|
1127
|
+
"component-select__input",
|
|
1128
|
+
M && "component-select__input--placeholder"
|
|
1129
|
+
),
|
|
1130
|
+
...v,
|
|
1131
|
+
children: O
|
|
1132
|
+
}
|
|
1133
|
+
),
|
|
1134
|
+
u && /* @__PURE__ */ V(
|
|
1135
|
+
Bo,
|
|
1136
|
+
{
|
|
1137
|
+
className: "component-select__popover",
|
|
1138
|
+
"data-colour-scheme": "invert",
|
|
1139
|
+
wrapperProps: {
|
|
1140
|
+
className: "component-select__popover__wrapper"
|
|
1141
|
+
},
|
|
1142
|
+
fitViewport: !0,
|
|
1143
|
+
gutter: 8,
|
|
1144
|
+
overflowPadding: 4,
|
|
1145
|
+
shift: -1,
|
|
1146
|
+
children: /* @__PURE__ */ re(Kt, { className: "component-select__popover__scroll", axis: "y", children: [
|
|
1147
|
+
e && /* @__PURE__ */ re("div", { className: "component-select__popover__search-wrapper", children: [
|
|
1148
|
+
/* @__PURE__ */ V(Tt, { className: "component-select__popover__search-icon" }),
|
|
1149
|
+
/* @__PURE__ */ V(
|
|
1150
|
+
Zo,
|
|
1151
|
+
{
|
|
1152
|
+
autoSelect: !0,
|
|
1153
|
+
placeholder: "Search...",
|
|
1154
|
+
className: "component-select__popover__search"
|
|
1155
|
+
}
|
|
1156
|
+
)
|
|
1157
|
+
] }),
|
|
1158
|
+
/* @__PURE__ */ V(L, { className: "component-select__list", children: p.map((x) => /* @__PURE__ */ re(
|
|
1159
|
+
No,
|
|
1160
|
+
{
|
|
1161
|
+
disabled: x.disabled,
|
|
1162
|
+
value: x.value,
|
|
1163
|
+
className: "component-select__option",
|
|
1164
|
+
render: /* @__PURE__ */ V(ln, {}),
|
|
1165
|
+
children: [
|
|
1166
|
+
/* @__PURE__ */ re("div", { className: "component-select__option__label", children: [
|
|
1167
|
+
x.icon,
|
|
1168
|
+
x.label
|
|
1169
|
+
] }),
|
|
1170
|
+
x.description && /* @__PURE__ */ V("div", { className: "component-select__option__description", children: x.description })
|
|
1171
|
+
]
|
|
1172
|
+
},
|
|
1173
|
+
x.value
|
|
1174
|
+
)) })
|
|
1175
|
+
] })
|
|
1176
|
+
}
|
|
1177
|
+
)
|
|
1178
|
+
]
|
|
1179
|
+
}
|
|
1180
|
+
)
|
|
1181
|
+
}
|
|
1182
|
+
);
|
|
1183
|
+
};
|
|
1184
|
+
export {
|
|
1185
|
+
jn as Select
|
|
1186
|
+
};
|