@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,1236 @@
|
|
|
1
|
+
import { createContext as ze, useRef as q, useContext as Ye, useState as Q, useEffect as C, useCallback as $e, useMemo as Ot, isValidElement as Ft } from "react";
|
|
2
|
+
import { c as ue, k as x, m as y, o as K, p as ne, _ as Me, l as ct, a as N, ag as Qe, C as F, j as ee, $ as be, Z as Xe, a1 as re, M as j, X as Dt, b as Ce, ad as At, ah as lt, ai as Tt, aj as Rt, aa as Ne, a2 as ft, q as $t, g as dt, z as Ct, e as Ve, G as Mt, w as _t, i as pt } from "./LMDWO4NN-DyBcLLfK.js";
|
|
3
|
+
import { b as Le, c as et, r as Nt, d as Vt, F as Lt, i as Ht, g as It, e as kt, j as ye, u as Bt, k as qt } from "./PFRGBC2K-DobANx7W.js";
|
|
4
|
+
import { r as Be } from "./index-Cgx3BqdJ.js";
|
|
5
|
+
import { jsx as E, jsxs as Te, Fragment as Re } from "react/jsx-runtime";
|
|
6
|
+
import { a as te, e as jt } from "./YV4JVR4I-DOlaib2E.js";
|
|
7
|
+
import { u as vt, i as Wt } from "./KFH4SEIX-BuapSU1b.js";
|
|
8
|
+
import { u as zt } from "./WYCIER3C-DndYR0iO.js";
|
|
9
|
+
import { a as Yt } from "./BM6PGYQY-D4-MwCVB.js";
|
|
10
|
+
import { b as Ke, D as Xt, d as Kt, e as Ut } from "./RS7LB2H4-lmOMNc4h.js";
|
|
11
|
+
import { b as mt, P as Gt } from "./MTZPJQMC-DMklE0XE.js";
|
|
12
|
+
import { a as Zt, c as Jt, o as Qt, f as er, s as tr, b as rr, d as nr, l as or } from "./floating-ui.dom-2MezWvgs.js";
|
|
13
|
+
var tt = ze(null), sr = "span", gt = ue(
|
|
14
|
+
function(t) {
|
|
15
|
+
return t = x(y({}, t), {
|
|
16
|
+
style: y({
|
|
17
|
+
border: 0,
|
|
18
|
+
clip: "rect(0 0 0 0)",
|
|
19
|
+
height: "1px",
|
|
20
|
+
margin: "-1px",
|
|
21
|
+
overflow: "hidden",
|
|
22
|
+
padding: 0,
|
|
23
|
+
position: "absolute",
|
|
24
|
+
whiteSpace: "nowrap",
|
|
25
|
+
width: "1px"
|
|
26
|
+
}, t.style)
|
|
27
|
+
}), t;
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
K(function(t) {
|
|
31
|
+
const n = gt(t);
|
|
32
|
+
return ne(sr, n);
|
|
33
|
+
});
|
|
34
|
+
var ir = "span", ur = ue(
|
|
35
|
+
function(t) {
|
|
36
|
+
return t = x(y({
|
|
37
|
+
"data-focus-trap": "",
|
|
38
|
+
tabIndex: 0,
|
|
39
|
+
"aria-hidden": !0
|
|
40
|
+
}, t), {
|
|
41
|
+
style: y({
|
|
42
|
+
// Prevents unintended scroll jumps.
|
|
43
|
+
position: "fixed",
|
|
44
|
+
top: 0,
|
|
45
|
+
left: 0
|
|
46
|
+
}, t.style)
|
|
47
|
+
}), t = gt(t), t;
|
|
48
|
+
}
|
|
49
|
+
), Ae = K(function(t) {
|
|
50
|
+
const n = ur(t);
|
|
51
|
+
return ne(ir, n);
|
|
52
|
+
}), ar = "div";
|
|
53
|
+
function cr(e) {
|
|
54
|
+
return F(e).body;
|
|
55
|
+
}
|
|
56
|
+
function lr(e, t) {
|
|
57
|
+
return t ? typeof t == "function" ? t(e) : t : F(e).createElement("div");
|
|
58
|
+
}
|
|
59
|
+
function fr(e = "id") {
|
|
60
|
+
return `${e ? `${e}-` : ""}${Math.random().toString(36).slice(2, 8)}`;
|
|
61
|
+
}
|
|
62
|
+
function J(e) {
|
|
63
|
+
queueMicrotask(() => {
|
|
64
|
+
e == null || e.focus();
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
var ht = ue(function(t) {
|
|
68
|
+
var n = t, {
|
|
69
|
+
preserveTabOrder: r,
|
|
70
|
+
preserveTabOrderAnchor: o,
|
|
71
|
+
portalElement: s,
|
|
72
|
+
portalRef: u,
|
|
73
|
+
portal: i = !0
|
|
74
|
+
} = n, a = Me(n, [
|
|
75
|
+
"preserveTabOrder",
|
|
76
|
+
"preserveTabOrderAnchor",
|
|
77
|
+
"portalElement",
|
|
78
|
+
"portalRef",
|
|
79
|
+
"portal"
|
|
80
|
+
]);
|
|
81
|
+
const m = q(null), b = ct(m, a.ref), D = Ye(tt), [f, V] = Q(null), [L, H] = Q(
|
|
82
|
+
null
|
|
83
|
+
), I = q(null), M = q(null), _ = q(null), A = q(null);
|
|
84
|
+
return N(() => {
|
|
85
|
+
const l = m.current;
|
|
86
|
+
if (!l || !i) {
|
|
87
|
+
V(null);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const d = lr(l, s);
|
|
91
|
+
if (!d) {
|
|
92
|
+
V(null);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const g = d.isConnected;
|
|
96
|
+
if (g || (D || cr(l)).appendChild(d), d.id || (d.id = l.id ? `portal/${l.id}` : fr()), V(d), Qe(u, d), !g)
|
|
97
|
+
return () => {
|
|
98
|
+
d.remove(), Qe(u, null);
|
|
99
|
+
};
|
|
100
|
+
}, [i, s, D, u]), N(() => {
|
|
101
|
+
if (!i || !r || !o) return;
|
|
102
|
+
const d = F(o).createElement("span");
|
|
103
|
+
return d.style.position = "fixed", o.insertAdjacentElement("afterend", d), H(d), () => {
|
|
104
|
+
d.remove(), H(null);
|
|
105
|
+
};
|
|
106
|
+
}, [i, r, o]), C(() => {
|
|
107
|
+
if (!f || !r) return;
|
|
108
|
+
let l = 0;
|
|
109
|
+
const d = (g) => {
|
|
110
|
+
if (!be(g)) return;
|
|
111
|
+
const p = g.type === "focusin";
|
|
112
|
+
if (cancelAnimationFrame(l), p)
|
|
113
|
+
return Nt(f);
|
|
114
|
+
l = requestAnimationFrame(() => {
|
|
115
|
+
Vt(f, !0);
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
return f.addEventListener("focusin", d, !0), f.addEventListener("focusout", d, !0), () => {
|
|
119
|
+
cancelAnimationFrame(l), f.removeEventListener("focusin", d, !0), f.removeEventListener("focusout", d, !0);
|
|
120
|
+
};
|
|
121
|
+
}, [f, r]), a = ee(
|
|
122
|
+
a,
|
|
123
|
+
(l) => {
|
|
124
|
+
if (l = // While the portal node is not in the DOM, we need to pass the
|
|
125
|
+
// current context to the portal context, otherwise it's going to
|
|
126
|
+
// reset to the body element on nested portals.
|
|
127
|
+
/* @__PURE__ */ E(tt.Provider, { value: f || D, children: l }), !i) return l;
|
|
128
|
+
if (!f)
|
|
129
|
+
return /* @__PURE__ */ E(
|
|
130
|
+
"span",
|
|
131
|
+
{
|
|
132
|
+
ref: b,
|
|
133
|
+
id: a.id,
|
|
134
|
+
style: { position: "fixed" },
|
|
135
|
+
hidden: !0
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
l = /* @__PURE__ */ Te(Re, { children: [
|
|
139
|
+
r && f && /* @__PURE__ */ E(
|
|
140
|
+
Ae,
|
|
141
|
+
{
|
|
142
|
+
ref: M,
|
|
143
|
+
"data-focus-trap": a.id,
|
|
144
|
+
className: "__focus-trap-inner-before",
|
|
145
|
+
onFocus: (g) => {
|
|
146
|
+
be(g, f) ? J(Le()) : J(I.current);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
l,
|
|
151
|
+
r && f && /* @__PURE__ */ E(
|
|
152
|
+
Ae,
|
|
153
|
+
{
|
|
154
|
+
ref: _,
|
|
155
|
+
"data-focus-trap": a.id,
|
|
156
|
+
className: "__focus-trap-inner-after",
|
|
157
|
+
onFocus: (g) => {
|
|
158
|
+
be(g, f) ? J(et()) : J(A.current);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
] }), f && (l = Be.createPortal(l, f));
|
|
163
|
+
let d = /* @__PURE__ */ Te(Re, { children: [
|
|
164
|
+
r && f && /* @__PURE__ */ E(
|
|
165
|
+
Ae,
|
|
166
|
+
{
|
|
167
|
+
ref: I,
|
|
168
|
+
"data-focus-trap": a.id,
|
|
169
|
+
className: "__focus-trap-outer-before",
|
|
170
|
+
onFocus: (g) => {
|
|
171
|
+
!(g.relatedTarget === A.current) && be(g, f) ? J(M.current) : J(et());
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
r && // We're using position: fixed here so that the browser doesn't
|
|
176
|
+
// add margin to the element when setting gap on a parent element.
|
|
177
|
+
/* @__PURE__ */ E("span", { "aria-owns": f == null ? void 0 : f.id, style: { position: "fixed" } }),
|
|
178
|
+
r && f && /* @__PURE__ */ E(
|
|
179
|
+
Ae,
|
|
180
|
+
{
|
|
181
|
+
ref: A,
|
|
182
|
+
"data-focus-trap": a.id,
|
|
183
|
+
className: "__focus-trap-outer-after",
|
|
184
|
+
onFocus: (g) => {
|
|
185
|
+
if (be(g, f))
|
|
186
|
+
J(_.current);
|
|
187
|
+
else {
|
|
188
|
+
const p = Le();
|
|
189
|
+
if (p === M.current) {
|
|
190
|
+
requestAnimationFrame(() => {
|
|
191
|
+
var U;
|
|
192
|
+
return (U = Le()) == null ? void 0 : U.focus();
|
|
193
|
+
});
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
J(p);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
)
|
|
201
|
+
] });
|
|
202
|
+
return L && r && (d = Be.createPortal(
|
|
203
|
+
d,
|
|
204
|
+
L
|
|
205
|
+
)), /* @__PURE__ */ Te(Re, { children: [
|
|
206
|
+
d,
|
|
207
|
+
l
|
|
208
|
+
] });
|
|
209
|
+
},
|
|
210
|
+
[f, D, i, a.id, r, L]
|
|
211
|
+
), a = x(y({}, a), {
|
|
212
|
+
ref: b
|
|
213
|
+
}), a;
|
|
214
|
+
}), un = K(function(t) {
|
|
215
|
+
const n = ht(t);
|
|
216
|
+
return ne(ar, n);
|
|
217
|
+
}), rt = ze(0);
|
|
218
|
+
function dr({ level: e, children: t }) {
|
|
219
|
+
const n = Ye(rt), r = Math.max(
|
|
220
|
+
Math.min(e || n + 1, 6),
|
|
221
|
+
1
|
|
222
|
+
);
|
|
223
|
+
return /* @__PURE__ */ E(rt.Provider, { value: r, children: t });
|
|
224
|
+
}
|
|
225
|
+
var pr = "div", bt = ue(function(t) {
|
|
226
|
+
var n = t, { autoFocusOnShow: r = !0 } = n, o = Me(n, ["autoFocusOnShow"]);
|
|
227
|
+
return o = ee(
|
|
228
|
+
o,
|
|
229
|
+
(s) => /* @__PURE__ */ E(Lt.Provider, { value: r, children: s }),
|
|
230
|
+
[r]
|
|
231
|
+
), o;
|
|
232
|
+
});
|
|
233
|
+
K(function(t) {
|
|
234
|
+
const n = bt(t);
|
|
235
|
+
return ne(pr, n);
|
|
236
|
+
});
|
|
237
|
+
function vr(e, t) {
|
|
238
|
+
const r = F(e).createElement("button");
|
|
239
|
+
return r.type = "button", r.tabIndex = -1, r.textContent = "Dismiss popup", Object.assign(r.style, {
|
|
240
|
+
border: "0px",
|
|
241
|
+
clip: "rect(0 0 0 0)",
|
|
242
|
+
height: "1px",
|
|
243
|
+
margin: "-1px",
|
|
244
|
+
overflow: "hidden",
|
|
245
|
+
padding: "0px",
|
|
246
|
+
position: "absolute",
|
|
247
|
+
whiteSpace: "nowrap",
|
|
248
|
+
width: "1px"
|
|
249
|
+
}), r.addEventListener("click", t), e.prepend(r), () => {
|
|
250
|
+
r.removeEventListener("click", t), r.remove();
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
function mr(e) {
|
|
254
|
+
const t = q();
|
|
255
|
+
return C(() => {
|
|
256
|
+
if (!e) {
|
|
257
|
+
t.current = null;
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
return Xe("mousedown", (r) => {
|
|
261
|
+
t.current = r.target;
|
|
262
|
+
}, !0);
|
|
263
|
+
}, [e]), t;
|
|
264
|
+
}
|
|
265
|
+
var He = /* @__PURE__ */ new WeakMap();
|
|
266
|
+
function Ee(e, t, n) {
|
|
267
|
+
He.has(e) || He.set(e, /* @__PURE__ */ new Map());
|
|
268
|
+
const r = He.get(e), o = r.get(t);
|
|
269
|
+
if (!o)
|
|
270
|
+
return r.set(t, n()), () => {
|
|
271
|
+
var i;
|
|
272
|
+
(i = r.get(t)) == null || i(), r.delete(t);
|
|
273
|
+
};
|
|
274
|
+
const s = n(), u = () => {
|
|
275
|
+
s(), o(), r.delete(t);
|
|
276
|
+
};
|
|
277
|
+
return r.set(t, u), () => {
|
|
278
|
+
r.get(t) === u && (s(), r.set(t, o));
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
function Ue(e, t, n) {
|
|
282
|
+
return Ee(e, t, () => {
|
|
283
|
+
const o = e.getAttribute(t);
|
|
284
|
+
return e.setAttribute(t, n), () => {
|
|
285
|
+
o == null ? e.removeAttribute(t) : e.setAttribute(t, o);
|
|
286
|
+
};
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
function ie(e, t, n) {
|
|
290
|
+
return Ee(e, t, () => {
|
|
291
|
+
const o = t in e, s = e[t];
|
|
292
|
+
return e[t] = n, () => {
|
|
293
|
+
o ? e[t] = s : delete e[t];
|
|
294
|
+
};
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
function qe(e, t) {
|
|
298
|
+
return e ? Ee(e, "style", () => {
|
|
299
|
+
const r = e.style.cssText;
|
|
300
|
+
return Object.assign(e.style, t), () => {
|
|
301
|
+
e.style.cssText = r;
|
|
302
|
+
};
|
|
303
|
+
}) : () => {
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
function gr(e, t, n) {
|
|
307
|
+
return e ? Ee(e, t, () => {
|
|
308
|
+
const o = e.style.getPropertyValue(t);
|
|
309
|
+
return e.style.setProperty(t, n), () => {
|
|
310
|
+
o ? e.style.setProperty(t, o) : e.style.removeProperty(t);
|
|
311
|
+
};
|
|
312
|
+
}) : () => {
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
var hr = ["SCRIPT", "STYLE"];
|
|
316
|
+
function je(e) {
|
|
317
|
+
return `__ariakit-dialog-snapshot-${e}`;
|
|
318
|
+
}
|
|
319
|
+
function br(e, t) {
|
|
320
|
+
const n = F(t), r = je(e);
|
|
321
|
+
if (!n.body[r]) return !0;
|
|
322
|
+
do {
|
|
323
|
+
if (t === n.body) return !1;
|
|
324
|
+
if (t[r]) return !0;
|
|
325
|
+
if (!t.parentElement) return !1;
|
|
326
|
+
t = t.parentElement;
|
|
327
|
+
} while (!0);
|
|
328
|
+
}
|
|
329
|
+
function yr(e, t, n) {
|
|
330
|
+
return hr.includes(t.tagName) || !br(e, t) ? !1 : !n.some(
|
|
331
|
+
(r) => r && j(t, r)
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
function Ge(e, t, n, r) {
|
|
335
|
+
for (let o of t) {
|
|
336
|
+
if (!(o != null && o.isConnected)) continue;
|
|
337
|
+
const s = t.some((a) => !a || a === o ? !1 : a.contains(o)), u = F(o), i = o;
|
|
338
|
+
for (; o.parentElement && o !== u.body; ) {
|
|
339
|
+
if (r == null || r(o.parentElement, i), !s)
|
|
340
|
+
for (const a of o.parentElement.children)
|
|
341
|
+
yr(e, a, t) && n(a, i);
|
|
342
|
+
o = o.parentElement;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
function Er(e, t) {
|
|
347
|
+
const { body: n } = F(t[0]), r = [];
|
|
348
|
+
return Ge(e, t, (s) => {
|
|
349
|
+
r.push(ie(s, je(e), !0));
|
|
350
|
+
}), re(ie(n, je(e), !0), () => {
|
|
351
|
+
for (const s of r)
|
|
352
|
+
s();
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
function yt(e, ...t) {
|
|
356
|
+
if (!e) return !1;
|
|
357
|
+
const n = e.getAttribute("data-backdrop");
|
|
358
|
+
return n == null ? !1 : n === "" || n === "true" || !t.length ? !0 : t.some((r) => n === r);
|
|
359
|
+
}
|
|
360
|
+
function pe(e = "", t = !1) {
|
|
361
|
+
return `__ariakit-dialog-${t ? "ancestor" : "outside"}${e ? `-${e}` : ""}`;
|
|
362
|
+
}
|
|
363
|
+
function wr(e, t = "") {
|
|
364
|
+
return re(
|
|
365
|
+
ie(e, pe(), !0),
|
|
366
|
+
ie(e, pe(t), !0)
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
function Et(e, t = "") {
|
|
370
|
+
return re(
|
|
371
|
+
ie(e, pe("", !0), !0),
|
|
372
|
+
ie(e, pe(t, !0), !0)
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
function Ze(e, t) {
|
|
376
|
+
const n = pe(t, !0);
|
|
377
|
+
if (e[n]) return !0;
|
|
378
|
+
const r = pe(t);
|
|
379
|
+
do {
|
|
380
|
+
if (e[r]) return !0;
|
|
381
|
+
if (!e.parentElement) return !1;
|
|
382
|
+
e = e.parentElement;
|
|
383
|
+
} while (!0);
|
|
384
|
+
}
|
|
385
|
+
function nt(e, t) {
|
|
386
|
+
const n = [], r = t.map((s) => s == null ? void 0 : s.id);
|
|
387
|
+
return Ge(
|
|
388
|
+
e,
|
|
389
|
+
t,
|
|
390
|
+
(s) => {
|
|
391
|
+
yt(s, ...r) || n.unshift(wr(s, e));
|
|
392
|
+
},
|
|
393
|
+
(s, u) => {
|
|
394
|
+
u.hasAttribute("data-dialog") && u.id !== e || n.unshift(Et(s, e));
|
|
395
|
+
}
|
|
396
|
+
), () => {
|
|
397
|
+
for (const s of n)
|
|
398
|
+
s();
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
function Pr(e) {
|
|
402
|
+
return e.tagName === "HTML" ? !0 : j(F(e).body, e);
|
|
403
|
+
}
|
|
404
|
+
function xr(e, t) {
|
|
405
|
+
if (!e) return !1;
|
|
406
|
+
if (j(e, t)) return !0;
|
|
407
|
+
const n = t.getAttribute("aria-activedescendant");
|
|
408
|
+
if (n) {
|
|
409
|
+
const r = F(e).getElementById(n);
|
|
410
|
+
if (r)
|
|
411
|
+
return j(e, r);
|
|
412
|
+
}
|
|
413
|
+
return !1;
|
|
414
|
+
}
|
|
415
|
+
function Sr(e, t) {
|
|
416
|
+
if (!("clientY" in e)) return !1;
|
|
417
|
+
const n = t.getBoundingClientRect();
|
|
418
|
+
return n.width === 0 || n.height === 0 ? !1 : n.top <= e.clientY && e.clientY <= n.top + n.height && n.left <= e.clientX && e.clientX <= n.left + n.width;
|
|
419
|
+
}
|
|
420
|
+
function Ie({
|
|
421
|
+
store: e,
|
|
422
|
+
type: t,
|
|
423
|
+
listener: n,
|
|
424
|
+
capture: r,
|
|
425
|
+
domReady: o
|
|
426
|
+
}) {
|
|
427
|
+
const s = Ce(n), u = te(e, "open"), i = q(!1);
|
|
428
|
+
N(() => {
|
|
429
|
+
if (!u || !o) return;
|
|
430
|
+
const { contentElement: a } = e.getState();
|
|
431
|
+
if (!a) return;
|
|
432
|
+
const m = () => {
|
|
433
|
+
i.current = !0;
|
|
434
|
+
};
|
|
435
|
+
return a.addEventListener("focusin", m, !0), () => a.removeEventListener("focusin", m, !0);
|
|
436
|
+
}, [e, u, o]), C(() => u ? Xe(t, (m) => {
|
|
437
|
+
const { contentElement: b, disclosureElement: D } = e.getState(), f = m.target;
|
|
438
|
+
!b || !f || !Pr(f) || j(b, f) || xr(D, f) || f.hasAttribute("data-focus-trap") || Sr(m, b) || i.current && !Ze(f, b.id) || Ht(f) || s(m);
|
|
439
|
+
}, r) : void 0, [u, r]);
|
|
440
|
+
}
|
|
441
|
+
function ke(e, t) {
|
|
442
|
+
return typeof e == "function" ? e(t) : !!e;
|
|
443
|
+
}
|
|
444
|
+
function Or(e, t, n) {
|
|
445
|
+
const r = te(e, "open"), o = mr(r), s = { store: e, domReady: n, capture: !0 };
|
|
446
|
+
Ie(x(y({}, s), {
|
|
447
|
+
type: "click",
|
|
448
|
+
listener: (u) => {
|
|
449
|
+
const { contentElement: i } = e.getState(), a = o.current;
|
|
450
|
+
a && Dt(a) && Ze(a, i == null ? void 0 : i.id) && ke(t, u) && e.hide();
|
|
451
|
+
}
|
|
452
|
+
})), Ie(x(y({}, s), {
|
|
453
|
+
type: "focusin",
|
|
454
|
+
listener: (u) => {
|
|
455
|
+
const { contentElement: i } = e.getState();
|
|
456
|
+
i && u.target !== F(i) && ke(t, u) && e.hide();
|
|
457
|
+
}
|
|
458
|
+
})), Ie(x(y({}, s), {
|
|
459
|
+
type: "contextmenu",
|
|
460
|
+
listener: (u) => {
|
|
461
|
+
ke(t, u) && e.hide();
|
|
462
|
+
}
|
|
463
|
+
}));
|
|
464
|
+
}
|
|
465
|
+
var ot = ze({});
|
|
466
|
+
function Fr(e) {
|
|
467
|
+
const t = Ye(ot), [n, r] = Q([]), o = $e(
|
|
468
|
+
(i) => {
|
|
469
|
+
var a;
|
|
470
|
+
return r((m) => [...m, i]), re((a = t.add) == null ? void 0 : a.call(t, i), () => {
|
|
471
|
+
r((m) => m.filter((b) => b !== i));
|
|
472
|
+
});
|
|
473
|
+
},
|
|
474
|
+
[t]
|
|
475
|
+
);
|
|
476
|
+
N(() => jt(e, ["open", "contentElement"], (i) => {
|
|
477
|
+
var a;
|
|
478
|
+
if (i.open && i.contentElement)
|
|
479
|
+
return (a = t.add) == null ? void 0 : a.call(t, e);
|
|
480
|
+
}), [e, t]);
|
|
481
|
+
const s = Ot(() => ({ store: e, add: o }), [e, o]);
|
|
482
|
+
return { wrapElement: $e(
|
|
483
|
+
(i) => /* @__PURE__ */ E(ot.Provider, { value: s, children: i }),
|
|
484
|
+
[s]
|
|
485
|
+
), nestedDialogs: n };
|
|
486
|
+
}
|
|
487
|
+
function Dr({
|
|
488
|
+
attribute: e,
|
|
489
|
+
contentId: t,
|
|
490
|
+
contentElement: n,
|
|
491
|
+
enabled: r
|
|
492
|
+
}) {
|
|
493
|
+
const [o, s] = At(), u = $e(() => {
|
|
494
|
+
if (!r || !n) return !1;
|
|
495
|
+
const { body: i } = F(n), a = i.getAttribute(e);
|
|
496
|
+
return !a || a === t;
|
|
497
|
+
}, [o, r, n, e, t]);
|
|
498
|
+
return C(() => {
|
|
499
|
+
if (!r || !t || !n) return;
|
|
500
|
+
const { body: i } = F(n);
|
|
501
|
+
if (u())
|
|
502
|
+
return i.setAttribute(e, t), () => i.removeAttribute(e);
|
|
503
|
+
const a = new MutationObserver(() => Be.flushSync(s));
|
|
504
|
+
return a.observe(i, { attributeFilter: [e] }), () => a.disconnect();
|
|
505
|
+
}, [o, r, t, n, u, e]), u;
|
|
506
|
+
}
|
|
507
|
+
function Ar(e) {
|
|
508
|
+
const t = e.getBoundingClientRect().left;
|
|
509
|
+
return Math.round(t) + e.scrollLeft ? "paddingLeft" : "paddingRight";
|
|
510
|
+
}
|
|
511
|
+
function Tr(e, t, n) {
|
|
512
|
+
const r = Dr({
|
|
513
|
+
attribute: "data-dialog-prevent-body-scroll",
|
|
514
|
+
contentElement: e,
|
|
515
|
+
contentId: t,
|
|
516
|
+
enabled: n
|
|
517
|
+
});
|
|
518
|
+
C(() => {
|
|
519
|
+
if (!r() || !e) return;
|
|
520
|
+
const o = F(e), s = lt(e), { documentElement: u, body: i } = o, a = u.style.getPropertyValue("--scrollbar-width"), m = a ? Number.parseInt(a) : s.innerWidth - u.clientWidth, b = () => gr(
|
|
521
|
+
u,
|
|
522
|
+
"--scrollbar-width",
|
|
523
|
+
`${m}px`
|
|
524
|
+
), D = Ar(u), f = () => qe(i, {
|
|
525
|
+
overflow: "hidden",
|
|
526
|
+
[D]: `${m}px`
|
|
527
|
+
}), V = () => {
|
|
528
|
+
var H, I;
|
|
529
|
+
const { scrollX: M, scrollY: _, visualViewport: A } = s, l = (H = A == null ? void 0 : A.offsetLeft) != null ? H : 0, d = (I = A == null ? void 0 : A.offsetTop) != null ? I : 0, g = qe(i, {
|
|
530
|
+
position: "fixed",
|
|
531
|
+
overflow: "hidden",
|
|
532
|
+
top: `${-(_ - Math.floor(d))}px`,
|
|
533
|
+
left: `${-(M - Math.floor(l))}px`,
|
|
534
|
+
right: "0",
|
|
535
|
+
[D]: `${m}px`
|
|
536
|
+
});
|
|
537
|
+
return () => {
|
|
538
|
+
g(), process.env.NODE_ENV !== "test" && s.scrollTo({ left: M, top: _, behavior: "instant" });
|
|
539
|
+
};
|
|
540
|
+
}, L = Tt() && !Rt();
|
|
541
|
+
return re(
|
|
542
|
+
b(),
|
|
543
|
+
L ? V() : f()
|
|
544
|
+
);
|
|
545
|
+
}, [r, e]);
|
|
546
|
+
}
|
|
547
|
+
function Rr(e, ...t) {
|
|
548
|
+
if (!e) return !1;
|
|
549
|
+
const n = e.getAttribute("data-focus-trap");
|
|
550
|
+
return n == null ? !1 : t.length ? n === "" ? !1 : t.some((r) => n === r) : !0;
|
|
551
|
+
}
|
|
552
|
+
function wt() {
|
|
553
|
+
return "inert" in HTMLElement.prototype;
|
|
554
|
+
}
|
|
555
|
+
function $r(e) {
|
|
556
|
+
return Ue(e, "aria-hidden", "true");
|
|
557
|
+
}
|
|
558
|
+
function Pt(e, t) {
|
|
559
|
+
if (!("style" in e)) return Ne;
|
|
560
|
+
if (wt())
|
|
561
|
+
return ie(e, "inert", !0);
|
|
562
|
+
const r = It(e, !0).map((o) => {
|
|
563
|
+
if (t != null && t.some((u) => u && j(u, o))) return Ne;
|
|
564
|
+
const s = Ee(o, "focus", () => (o.focus = Ne, () => {
|
|
565
|
+
delete o.focus;
|
|
566
|
+
}));
|
|
567
|
+
return re(Ue(o, "tabindex", "-1"), s);
|
|
568
|
+
});
|
|
569
|
+
return re(
|
|
570
|
+
...r,
|
|
571
|
+
$r(e),
|
|
572
|
+
qe(e, {
|
|
573
|
+
pointerEvents: "none",
|
|
574
|
+
userSelect: "none",
|
|
575
|
+
cursor: "default"
|
|
576
|
+
})
|
|
577
|
+
);
|
|
578
|
+
}
|
|
579
|
+
function Cr(e, t) {
|
|
580
|
+
const n = [], r = t.map((s) => s == null ? void 0 : s.id);
|
|
581
|
+
return Ge(
|
|
582
|
+
e,
|
|
583
|
+
t,
|
|
584
|
+
(s) => {
|
|
585
|
+
yt(s, ...r) || Rr(s, ...r) || n.unshift(Pt(s, t));
|
|
586
|
+
},
|
|
587
|
+
(s) => {
|
|
588
|
+
s.hasAttribute("role") && (t.some((u) => u && j(u, s)) || n.unshift(Ue(s, "role", "none")));
|
|
589
|
+
}
|
|
590
|
+
), () => {
|
|
591
|
+
for (const s of n)
|
|
592
|
+
s();
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
var Mr = "div", _r = [
|
|
596
|
+
"a",
|
|
597
|
+
"button",
|
|
598
|
+
"details",
|
|
599
|
+
"dialog",
|
|
600
|
+
"div",
|
|
601
|
+
"form",
|
|
602
|
+
"h1",
|
|
603
|
+
"h2",
|
|
604
|
+
"h3",
|
|
605
|
+
"h4",
|
|
606
|
+
"h5",
|
|
607
|
+
"h6",
|
|
608
|
+
"header",
|
|
609
|
+
"img",
|
|
610
|
+
"input",
|
|
611
|
+
"label",
|
|
612
|
+
"li",
|
|
613
|
+
"nav",
|
|
614
|
+
"ol",
|
|
615
|
+
"p",
|
|
616
|
+
"section",
|
|
617
|
+
"select",
|
|
618
|
+
"span",
|
|
619
|
+
"summary",
|
|
620
|
+
"textarea",
|
|
621
|
+
"ul",
|
|
622
|
+
"svg"
|
|
623
|
+
];
|
|
624
|
+
ue(
|
|
625
|
+
function(t) {
|
|
626
|
+
return t;
|
|
627
|
+
}
|
|
628
|
+
);
|
|
629
|
+
var We = K(
|
|
630
|
+
// @ts-expect-error
|
|
631
|
+
function(t) {
|
|
632
|
+
return ne(Mr, t);
|
|
633
|
+
}
|
|
634
|
+
);
|
|
635
|
+
Object.assign(
|
|
636
|
+
We,
|
|
637
|
+
_r.reduce((e, t) => (e[t] = K(function(r) {
|
|
638
|
+
return ne(t, r);
|
|
639
|
+
}), e), {})
|
|
640
|
+
);
|
|
641
|
+
function Nr({
|
|
642
|
+
store: e,
|
|
643
|
+
backdrop: t,
|
|
644
|
+
alwaysVisible: n,
|
|
645
|
+
hidden: r
|
|
646
|
+
}) {
|
|
647
|
+
const o = q(null), s = zt({ disclosure: e }), u = te(e, "contentElement");
|
|
648
|
+
C(() => {
|
|
649
|
+
const m = o.current, b = u;
|
|
650
|
+
m && b && (m.style.zIndex = getComputedStyle(b).zIndex);
|
|
651
|
+
}, [u]), N(() => {
|
|
652
|
+
const m = u == null ? void 0 : u.id;
|
|
653
|
+
if (!m) return;
|
|
654
|
+
const b = o.current;
|
|
655
|
+
if (b)
|
|
656
|
+
return Et(b, m);
|
|
657
|
+
}, [u]);
|
|
658
|
+
const i = vt({
|
|
659
|
+
ref: o,
|
|
660
|
+
store: s,
|
|
661
|
+
role: "presentation",
|
|
662
|
+
"data-backdrop": (u == null ? void 0 : u.id) || "",
|
|
663
|
+
alwaysVisible: n,
|
|
664
|
+
hidden: r ?? void 0,
|
|
665
|
+
style: {
|
|
666
|
+
position: "fixed",
|
|
667
|
+
top: 0,
|
|
668
|
+
right: 0,
|
|
669
|
+
bottom: 0,
|
|
670
|
+
left: 0
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
if (!t) return null;
|
|
674
|
+
if (Ft(t))
|
|
675
|
+
return /* @__PURE__ */ E(We, x(y({}, i), { render: t }));
|
|
676
|
+
const a = typeof t != "boolean" ? t : "div";
|
|
677
|
+
return /* @__PURE__ */ E(We, x(y({}, i), { render: /* @__PURE__ */ E(a, {}) }));
|
|
678
|
+
}
|
|
679
|
+
var Vr = "div", st = _t();
|
|
680
|
+
function Lr(e) {
|
|
681
|
+
const t = dt();
|
|
682
|
+
return !t || e && j(e, t) ? !1 : !!ye(t);
|
|
683
|
+
}
|
|
684
|
+
function it(e, t = !1) {
|
|
685
|
+
if (!e) return null;
|
|
686
|
+
const n = "current" in e ? e.current : e;
|
|
687
|
+
return n ? t ? ye(n) ? n : null : n : null;
|
|
688
|
+
}
|
|
689
|
+
var xt = ue(function(t) {
|
|
690
|
+
var n = t, {
|
|
691
|
+
store: r,
|
|
692
|
+
open: o,
|
|
693
|
+
onClose: s,
|
|
694
|
+
focusable: u = !0,
|
|
695
|
+
modal: i = !0,
|
|
696
|
+
portal: a = !!i,
|
|
697
|
+
backdrop: m = !!i,
|
|
698
|
+
hideOnEscape: b = !0,
|
|
699
|
+
hideOnInteractOutside: D = !0,
|
|
700
|
+
getPersistentElements: f,
|
|
701
|
+
preventBodyScroll: V = !!i,
|
|
702
|
+
autoFocusOnShow: L = !0,
|
|
703
|
+
autoFocusOnHide: H = !0,
|
|
704
|
+
initialFocus: I,
|
|
705
|
+
finalFocus: M,
|
|
706
|
+
unmountOnHide: _,
|
|
707
|
+
unstable_treeSnapshotKey: A
|
|
708
|
+
} = n, l = Me(n, [
|
|
709
|
+
"store",
|
|
710
|
+
"open",
|
|
711
|
+
"onClose",
|
|
712
|
+
"focusable",
|
|
713
|
+
"modal",
|
|
714
|
+
"portal",
|
|
715
|
+
"backdrop",
|
|
716
|
+
"hideOnEscape",
|
|
717
|
+
"hideOnInteractOutside",
|
|
718
|
+
"getPersistentElements",
|
|
719
|
+
"preventBodyScroll",
|
|
720
|
+
"autoFocusOnShow",
|
|
721
|
+
"autoFocusOnHide",
|
|
722
|
+
"initialFocus",
|
|
723
|
+
"finalFocus",
|
|
724
|
+
"unmountOnHide",
|
|
725
|
+
"unstable_treeSnapshotKey"
|
|
726
|
+
]);
|
|
727
|
+
const d = Ke(), g = q(null), p = Yt({
|
|
728
|
+
store: r || d,
|
|
729
|
+
open: o,
|
|
730
|
+
setOpen(c) {
|
|
731
|
+
if (c) return;
|
|
732
|
+
const v = g.current;
|
|
733
|
+
if (!v) return;
|
|
734
|
+
const P = new Event("close", { bubbles: !1, cancelable: !0 });
|
|
735
|
+
s && v.addEventListener("close", s, { once: !0 }), v.dispatchEvent(P), P.defaultPrevented && p.setOpen(!0);
|
|
736
|
+
}
|
|
737
|
+
}), { portalRef: U, domReady: S } = ft(a, l.portalRef), O = l.preserveTabOrder, G = te(
|
|
738
|
+
p,
|
|
739
|
+
(c) => O && !i && c.mounted
|
|
740
|
+
), T = $t(l.id), w = te(p, "open"), R = te(p, "mounted"), k = te(p, "contentElement"), we = Wt(R, l.hidden, l.alwaysVisible);
|
|
741
|
+
Tr(k, T, V && !we), Or(p, D, S);
|
|
742
|
+
const { wrapElement: ae, nestedDialogs: Pe } = Fr(p);
|
|
743
|
+
l = ee(l, ae, [ae]), N(() => {
|
|
744
|
+
if (!w) return;
|
|
745
|
+
const c = g.current, v = dt(c, !0);
|
|
746
|
+
v && v.tagName !== "BODY" && (c && j(c, v) || p.setDisclosureElement(v));
|
|
747
|
+
}, [p, w]), st && C(() => {
|
|
748
|
+
if (!R) return;
|
|
749
|
+
const { disclosureElement: c } = p.getState();
|
|
750
|
+
if (!c || !Ct(c)) return;
|
|
751
|
+
const v = () => {
|
|
752
|
+
let P = !1;
|
|
753
|
+
const h = () => {
|
|
754
|
+
P = !0;
|
|
755
|
+
}, $ = { capture: !0, once: !0 };
|
|
756
|
+
c.addEventListener("focusin", h, $), Mt(c, "mouseup", () => {
|
|
757
|
+
c.removeEventListener("focusin", h, !0), !P && qt(c);
|
|
758
|
+
});
|
|
759
|
+
};
|
|
760
|
+
return c.addEventListener("mousedown", v), () => {
|
|
761
|
+
c.removeEventListener("mousedown", v);
|
|
762
|
+
};
|
|
763
|
+
}, [p, R]), C(() => {
|
|
764
|
+
if (!R || !S) return;
|
|
765
|
+
const c = g.current;
|
|
766
|
+
if (!c) return;
|
|
767
|
+
const v = lt(c), P = v.visualViewport || v, h = () => {
|
|
768
|
+
var $, Y;
|
|
769
|
+
const he = (Y = ($ = v.visualViewport) == null ? void 0 : $.height) != null ? Y : v.innerHeight;
|
|
770
|
+
c.style.setProperty("--dialog-viewport-height", `${he}px`);
|
|
771
|
+
};
|
|
772
|
+
return h(), P.addEventListener("resize", h), () => {
|
|
773
|
+
P.removeEventListener("resize", h);
|
|
774
|
+
};
|
|
775
|
+
}, [R, S]), C(() => {
|
|
776
|
+
if (!i || !R || !S) return;
|
|
777
|
+
const c = g.current;
|
|
778
|
+
if (!(!c || c.querySelector("[data-dialog-dismiss]")))
|
|
779
|
+
return vr(c, p.hide);
|
|
780
|
+
}, [p, i, R, S]), N(() => {
|
|
781
|
+
if (!wt() || w || !R || !S) return;
|
|
782
|
+
const c = g.current;
|
|
783
|
+
if (c)
|
|
784
|
+
return Pt(c);
|
|
785
|
+
}, [w, R, S]);
|
|
786
|
+
const Z = w && S;
|
|
787
|
+
N(() => {
|
|
788
|
+
if (!T || !Z) return;
|
|
789
|
+
const c = g.current;
|
|
790
|
+
return Er(T, [c]);
|
|
791
|
+
}, [T, Z, A]);
|
|
792
|
+
const ve = Ce(f);
|
|
793
|
+
N(() => {
|
|
794
|
+
if (!T || !Z) return;
|
|
795
|
+
const { disclosureElement: c } = p.getState(), v = g.current, P = ve() || [], h = [
|
|
796
|
+
v,
|
|
797
|
+
...P,
|
|
798
|
+
...Pe.map(($) => $.getState().contentElement)
|
|
799
|
+
];
|
|
800
|
+
return i ? re(
|
|
801
|
+
nt(T, h),
|
|
802
|
+
Cr(T, h)
|
|
803
|
+
) : nt(T, [c, ...h]);
|
|
804
|
+
}, [
|
|
805
|
+
T,
|
|
806
|
+
p,
|
|
807
|
+
Z,
|
|
808
|
+
ve,
|
|
809
|
+
Pe,
|
|
810
|
+
i,
|
|
811
|
+
A
|
|
812
|
+
]);
|
|
813
|
+
const me = !!L, ge = Ve(L), [xe, B] = Q(!1);
|
|
814
|
+
C(() => {
|
|
815
|
+
if (!w || !me || !S || !(k != null && k.isConnected)) return;
|
|
816
|
+
const c = it(I, !0) || // If no initial focus is specified, we try to focus the first element
|
|
817
|
+
// with the autofocus attribute. If it's an Ariakit component, the
|
|
818
|
+
// Focusable component will consume the autoFocus prop and add the
|
|
819
|
+
// data-autofocus attribute to the element instead.
|
|
820
|
+
k.querySelector(
|
|
821
|
+
"[data-autofocus=true],[autofocus]"
|
|
822
|
+
) || // We have to fallback to the first focusable element otherwise portaled
|
|
823
|
+
// dialogs with preserveTabOrder set to true will not receive focus
|
|
824
|
+
// properly because the elements aren't tabbable until the dialog receives
|
|
825
|
+
// focus.
|
|
826
|
+
kt(k, !0, a && G) || // Finally, we fallback to the dialog element itself.
|
|
827
|
+
k, v = ye(c);
|
|
828
|
+
ge(v ? c : null) && (B(!0), queueMicrotask(() => {
|
|
829
|
+
c.focus(), st && v && c.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
830
|
+
}));
|
|
831
|
+
}, [
|
|
832
|
+
w,
|
|
833
|
+
me,
|
|
834
|
+
S,
|
|
835
|
+
k,
|
|
836
|
+
I,
|
|
837
|
+
a,
|
|
838
|
+
G,
|
|
839
|
+
ge
|
|
840
|
+
]);
|
|
841
|
+
const W = !!H, _e = Ve(H), [ce, X] = Q(!1);
|
|
842
|
+
C(() => {
|
|
843
|
+
if (w)
|
|
844
|
+
return X(!0), () => X(!1);
|
|
845
|
+
}, [w]);
|
|
846
|
+
const oe = $e(
|
|
847
|
+
(c, v = !0) => {
|
|
848
|
+
const { disclosureElement: P } = p.getState();
|
|
849
|
+
if (Lr(c)) return;
|
|
850
|
+
let h = it(M) || P;
|
|
851
|
+
if (h != null && h.id) {
|
|
852
|
+
const Y = F(h), he = `[aria-activedescendant="${h.id}"]`, De = Y.querySelector(he);
|
|
853
|
+
De && (h = De);
|
|
854
|
+
}
|
|
855
|
+
if (h && !ye(h)) {
|
|
856
|
+
const Y = h.closest("[data-dialog]");
|
|
857
|
+
if (Y != null && Y.id) {
|
|
858
|
+
const he = F(Y), De = `[aria-controls~="${Y.id}"]`, Je = he.querySelector(De);
|
|
859
|
+
Je && (h = Je);
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
const $ = h && ye(h);
|
|
863
|
+
if (!$ && v) {
|
|
864
|
+
requestAnimationFrame(() => oe(c, !1));
|
|
865
|
+
return;
|
|
866
|
+
}
|
|
867
|
+
_e($ ? h : null) && $ && (h == null || h.focus({ preventScroll: !0 }));
|
|
868
|
+
},
|
|
869
|
+
[p, M, _e]
|
|
870
|
+
), z = q(!1);
|
|
871
|
+
N(() => {
|
|
872
|
+
if (w || !ce || !W) return;
|
|
873
|
+
const c = g.current;
|
|
874
|
+
z.current = !0, oe(c);
|
|
875
|
+
}, [w, ce, S, W, oe]), C(() => {
|
|
876
|
+
if (!ce || !W) return;
|
|
877
|
+
const c = g.current;
|
|
878
|
+
return () => {
|
|
879
|
+
if (z.current) {
|
|
880
|
+
z.current = !1;
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
883
|
+
oe(c);
|
|
884
|
+
};
|
|
885
|
+
}, [ce, W, oe]);
|
|
886
|
+
const Se = Ve(b);
|
|
887
|
+
C(() => !S || !R ? void 0 : Xe("keydown", (v) => {
|
|
888
|
+
if (v.key !== "Escape" || v.defaultPrevented) return;
|
|
889
|
+
const P = g.current;
|
|
890
|
+
if (!P || Ze(P)) return;
|
|
891
|
+
const h = v.target;
|
|
892
|
+
if (!h) return;
|
|
893
|
+
const { disclosureElement: $ } = p.getState();
|
|
894
|
+
!!(h.tagName === "BODY" || j(P, h) || !$ || j($, h)) && Se(v) && p.hide();
|
|
895
|
+
}, !0), [p, S, R, Se]), l = ee(
|
|
896
|
+
l,
|
|
897
|
+
(c) => /* @__PURE__ */ E(dr, { level: i ? 1 : void 0, children: c }),
|
|
898
|
+
[i]
|
|
899
|
+
);
|
|
900
|
+
const Oe = l.hidden, se = l.alwaysVisible;
|
|
901
|
+
l = ee(
|
|
902
|
+
l,
|
|
903
|
+
(c) => m ? /* @__PURE__ */ Te(Re, { children: [
|
|
904
|
+
/* @__PURE__ */ E(
|
|
905
|
+
Nr,
|
|
906
|
+
{
|
|
907
|
+
store: p,
|
|
908
|
+
backdrop: m,
|
|
909
|
+
hidden: Oe,
|
|
910
|
+
alwaysVisible: se
|
|
911
|
+
}
|
|
912
|
+
),
|
|
913
|
+
c
|
|
914
|
+
] }) : c,
|
|
915
|
+
[p, m, Oe, se]
|
|
916
|
+
);
|
|
917
|
+
const [le, Fe] = Q(), [fe, de] = Q();
|
|
918
|
+
return l = ee(
|
|
919
|
+
l,
|
|
920
|
+
(c) => /* @__PURE__ */ E(Xt, { value: p, children: /* @__PURE__ */ E(Kt.Provider, { value: Fe, children: /* @__PURE__ */ E(Ut.Provider, { value: de, children: c }) }) }),
|
|
921
|
+
[p]
|
|
922
|
+
), l = x(y({
|
|
923
|
+
id: T,
|
|
924
|
+
"data-dialog": "",
|
|
925
|
+
role: "dialog",
|
|
926
|
+
tabIndex: u ? -1 : void 0,
|
|
927
|
+
"aria-labelledby": le,
|
|
928
|
+
"aria-describedby": fe
|
|
929
|
+
}, l), {
|
|
930
|
+
ref: ct(g, l.ref)
|
|
931
|
+
}), l = bt(x(y({}, l), {
|
|
932
|
+
autoFocusOnShow: xe
|
|
933
|
+
})), l = vt(y({ store: p }, l)), l = Bt(x(y({}, l), { focusable: u })), l = ht(x(y({ portal: a }, l), { portalRef: U, preserveTabOrder: G })), l;
|
|
934
|
+
});
|
|
935
|
+
function St(e, t = Ke) {
|
|
936
|
+
return K(function(r) {
|
|
937
|
+
const o = t(), s = r.store || o;
|
|
938
|
+
return te(
|
|
939
|
+
s,
|
|
940
|
+
(i) => !r.unmountOnHide || (i == null ? void 0 : i.mounted) || !!r.open
|
|
941
|
+
) ? /* @__PURE__ */ E(e, y({}, r)) : null;
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
St(
|
|
945
|
+
K(function(t) {
|
|
946
|
+
const n = xt(t);
|
|
947
|
+
return ne(Vr, n);
|
|
948
|
+
}),
|
|
949
|
+
Ke
|
|
950
|
+
);
|
|
951
|
+
var Hr = "div";
|
|
952
|
+
function ut(e = 0, t = 0, n = 0, r = 0) {
|
|
953
|
+
if (typeof DOMRect == "function")
|
|
954
|
+
return new DOMRect(e, t, n, r);
|
|
955
|
+
const o = {
|
|
956
|
+
x: e,
|
|
957
|
+
y: t,
|
|
958
|
+
width: n,
|
|
959
|
+
height: r,
|
|
960
|
+
top: t,
|
|
961
|
+
right: e + n,
|
|
962
|
+
bottom: t + r,
|
|
963
|
+
left: e
|
|
964
|
+
};
|
|
965
|
+
return x(y({}, o), { toJSON: () => o });
|
|
966
|
+
}
|
|
967
|
+
function Ir(e) {
|
|
968
|
+
if (!e) return ut();
|
|
969
|
+
const { x: t, y: n, width: r, height: o } = e;
|
|
970
|
+
return ut(t, n, r, o);
|
|
971
|
+
}
|
|
972
|
+
function kr(e, t) {
|
|
973
|
+
return {
|
|
974
|
+
contextElement: e || void 0,
|
|
975
|
+
getBoundingClientRect: () => {
|
|
976
|
+
const r = e, o = t == null ? void 0 : t(r);
|
|
977
|
+
return o || !r ? Ir(o) : r.getBoundingClientRect();
|
|
978
|
+
}
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
function Br(e) {
|
|
982
|
+
return /^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e);
|
|
983
|
+
}
|
|
984
|
+
function at(e) {
|
|
985
|
+
const t = window.devicePixelRatio || 1;
|
|
986
|
+
return Math.round(e * t) / t;
|
|
987
|
+
}
|
|
988
|
+
function qr(e, t) {
|
|
989
|
+
return Qt(({ placement: n }) => {
|
|
990
|
+
var r;
|
|
991
|
+
const o = ((e == null ? void 0 : e.clientHeight) || 0) / 2, s = typeof t.gutter == "number" ? t.gutter + o : (r = t.gutter) != null ? r : o;
|
|
992
|
+
return {
|
|
993
|
+
crossAxis: !!n.split("-")[1] ? void 0 : t.shift,
|
|
994
|
+
mainAxis: s,
|
|
995
|
+
alignmentAxis: t.shift
|
|
996
|
+
};
|
|
997
|
+
});
|
|
998
|
+
}
|
|
999
|
+
function jr(e) {
|
|
1000
|
+
if (e.flip === !1) return;
|
|
1001
|
+
const t = typeof e.flip == "string" ? e.flip.split(" ") : void 0;
|
|
1002
|
+
return pt(
|
|
1003
|
+
!t || t.every(Br),
|
|
1004
|
+
process.env.NODE_ENV !== "production" && "`flip` expects a spaced-delimited list of placements"
|
|
1005
|
+
), er({
|
|
1006
|
+
padding: e.overflowPadding,
|
|
1007
|
+
fallbackPlacements: t
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
function Wr(e) {
|
|
1011
|
+
if (!(!e.slide && !e.overlap))
|
|
1012
|
+
return tr({
|
|
1013
|
+
mainAxis: e.slide,
|
|
1014
|
+
crossAxis: e.overlap,
|
|
1015
|
+
padding: e.overflowPadding,
|
|
1016
|
+
limiter: or()
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
function zr(e) {
|
|
1020
|
+
return nr({
|
|
1021
|
+
padding: e.overflowPadding,
|
|
1022
|
+
apply({ elements: t, availableWidth: n, availableHeight: r, rects: o }) {
|
|
1023
|
+
const s = t.floating, u = Math.round(o.reference.width);
|
|
1024
|
+
n = Math.floor(n), r = Math.floor(r), s.style.setProperty(
|
|
1025
|
+
"--popover-anchor-width",
|
|
1026
|
+
`${u}px`
|
|
1027
|
+
), s.style.setProperty(
|
|
1028
|
+
"--popover-available-width",
|
|
1029
|
+
`${n}px`
|
|
1030
|
+
), s.style.setProperty(
|
|
1031
|
+
"--popover-available-height",
|
|
1032
|
+
`${r}px`
|
|
1033
|
+
), e.sameWidth && (s.style.width = `${u}px`), e.fitViewport && (s.style.maxWidth = `${n}px`, s.style.maxHeight = `${r}px`);
|
|
1034
|
+
}
|
|
1035
|
+
});
|
|
1036
|
+
}
|
|
1037
|
+
function Yr(e, t) {
|
|
1038
|
+
if (e)
|
|
1039
|
+
return rr({
|
|
1040
|
+
element: e,
|
|
1041
|
+
padding: t.arrowPadding
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
var Xr = ue(
|
|
1045
|
+
function(t) {
|
|
1046
|
+
var n = t, {
|
|
1047
|
+
store: r,
|
|
1048
|
+
modal: o = !1,
|
|
1049
|
+
portal: s = !!o,
|
|
1050
|
+
preserveTabOrder: u = !0,
|
|
1051
|
+
autoFocusOnShow: i = !0,
|
|
1052
|
+
wrapperProps: a,
|
|
1053
|
+
fixed: m = !1,
|
|
1054
|
+
flip: b = !0,
|
|
1055
|
+
shift: D = 0,
|
|
1056
|
+
slide: f = !0,
|
|
1057
|
+
overlap: V = !1,
|
|
1058
|
+
sameWidth: L = !1,
|
|
1059
|
+
fitViewport: H = !1,
|
|
1060
|
+
gutter: I,
|
|
1061
|
+
arrowPadding: M = 4,
|
|
1062
|
+
overflowPadding: _ = 8,
|
|
1063
|
+
getAnchorRect: A,
|
|
1064
|
+
updatePosition: l
|
|
1065
|
+
} = n, d = Me(n, [
|
|
1066
|
+
"store",
|
|
1067
|
+
"modal",
|
|
1068
|
+
"portal",
|
|
1069
|
+
"preserveTabOrder",
|
|
1070
|
+
"autoFocusOnShow",
|
|
1071
|
+
"wrapperProps",
|
|
1072
|
+
"fixed",
|
|
1073
|
+
"flip",
|
|
1074
|
+
"shift",
|
|
1075
|
+
"slide",
|
|
1076
|
+
"overlap",
|
|
1077
|
+
"sameWidth",
|
|
1078
|
+
"fitViewport",
|
|
1079
|
+
"gutter",
|
|
1080
|
+
"arrowPadding",
|
|
1081
|
+
"overflowPadding",
|
|
1082
|
+
"getAnchorRect",
|
|
1083
|
+
"updatePosition"
|
|
1084
|
+
]);
|
|
1085
|
+
const g = mt();
|
|
1086
|
+
r = r || g, pt(
|
|
1087
|
+
r,
|
|
1088
|
+
process.env.NODE_ENV !== "production" && "Popover must receive a `store` prop or be wrapped in a PopoverProvider component."
|
|
1089
|
+
);
|
|
1090
|
+
const p = r.useState("arrowElement"), U = r.useState("anchorElement"), S = r.useState("disclosureElement"), O = r.useState("popoverElement"), G = r.useState("contentElement"), T = r.useState("placement"), w = r.useState("mounted"), R = r.useState("rendered"), k = q(null), [we, ae] = Q(!1), { portalRef: Pe, domReady: Z } = ft(s, d.portalRef), ve = Ce(A), me = Ce(l), ge = !!l;
|
|
1091
|
+
N(() => {
|
|
1092
|
+
if (!(O != null && O.isConnected)) return;
|
|
1093
|
+
O.style.setProperty(
|
|
1094
|
+
"--popover-overflow-padding",
|
|
1095
|
+
`${_}px`
|
|
1096
|
+
);
|
|
1097
|
+
const B = kr(U, ve), W = async () => {
|
|
1098
|
+
if (!w) return;
|
|
1099
|
+
p || (k.current = k.current || document.createElement("div"));
|
|
1100
|
+
const X = p || k.current, oe = [
|
|
1101
|
+
qr(X, { gutter: I, shift: D }),
|
|
1102
|
+
jr({ flip: b, overflowPadding: _ }),
|
|
1103
|
+
Wr({ slide: f, overlap: V, overflowPadding: _ }),
|
|
1104
|
+
Yr(X, { arrowPadding: M }),
|
|
1105
|
+
zr({
|
|
1106
|
+
sameWidth: L,
|
|
1107
|
+
fitViewport: H,
|
|
1108
|
+
overflowPadding: _
|
|
1109
|
+
})
|
|
1110
|
+
], z = await Jt(B, O, {
|
|
1111
|
+
placement: T,
|
|
1112
|
+
strategy: m ? "fixed" : "absolute",
|
|
1113
|
+
middleware: oe
|
|
1114
|
+
});
|
|
1115
|
+
r == null || r.setState("currentPlacement", z.placement), ae(!0);
|
|
1116
|
+
const Se = at(z.x), Oe = at(z.y);
|
|
1117
|
+
if (Object.assign(O.style, {
|
|
1118
|
+
top: "0",
|
|
1119
|
+
left: "0",
|
|
1120
|
+
transform: `translate3d(${Se}px,${Oe}px,0)`
|
|
1121
|
+
}), X && z.middlewareData.arrow) {
|
|
1122
|
+
const { x: se, y: le } = z.middlewareData.arrow, Fe = z.placement.split("-")[0], fe = X.clientWidth / 2, de = X.clientHeight / 2, c = se != null ? se + fe : -fe, v = le != null ? le + de : -de;
|
|
1123
|
+
O.style.setProperty(
|
|
1124
|
+
"--popover-transform-origin",
|
|
1125
|
+
{
|
|
1126
|
+
top: `${c}px calc(100% + ${de}px)`,
|
|
1127
|
+
bottom: `${c}px ${-de}px`,
|
|
1128
|
+
left: `calc(100% + ${fe}px) ${v}px`,
|
|
1129
|
+
right: `${-fe}px ${v}px`
|
|
1130
|
+
}[Fe]
|
|
1131
|
+
), Object.assign(X.style, {
|
|
1132
|
+
left: se != null ? `${se}px` : "",
|
|
1133
|
+
top: le != null ? `${le}px` : "",
|
|
1134
|
+
[Fe]: "100%"
|
|
1135
|
+
});
|
|
1136
|
+
}
|
|
1137
|
+
}, ce = Zt(B, O, async () => {
|
|
1138
|
+
ge ? (await me({ updatePosition: W }), ae(!0)) : await W();
|
|
1139
|
+
}, {
|
|
1140
|
+
// JSDOM doesn't support ResizeObserver
|
|
1141
|
+
elementResize: typeof ResizeObserver == "function"
|
|
1142
|
+
});
|
|
1143
|
+
return () => {
|
|
1144
|
+
ae(!1), ce();
|
|
1145
|
+
};
|
|
1146
|
+
}, [
|
|
1147
|
+
r,
|
|
1148
|
+
R,
|
|
1149
|
+
O,
|
|
1150
|
+
p,
|
|
1151
|
+
U,
|
|
1152
|
+
O,
|
|
1153
|
+
T,
|
|
1154
|
+
w,
|
|
1155
|
+
Z,
|
|
1156
|
+
m,
|
|
1157
|
+
b,
|
|
1158
|
+
D,
|
|
1159
|
+
f,
|
|
1160
|
+
V,
|
|
1161
|
+
L,
|
|
1162
|
+
H,
|
|
1163
|
+
I,
|
|
1164
|
+
M,
|
|
1165
|
+
_,
|
|
1166
|
+
ve,
|
|
1167
|
+
ge,
|
|
1168
|
+
me
|
|
1169
|
+
]), N(() => {
|
|
1170
|
+
if (!w || !Z || !(O != null && O.isConnected) || !(G != null && G.isConnected)) return;
|
|
1171
|
+
const B = () => {
|
|
1172
|
+
O.style.zIndex = getComputedStyle(G).zIndex;
|
|
1173
|
+
};
|
|
1174
|
+
B();
|
|
1175
|
+
let W = requestAnimationFrame(() => {
|
|
1176
|
+
W = requestAnimationFrame(B);
|
|
1177
|
+
});
|
|
1178
|
+
return () => cancelAnimationFrame(W);
|
|
1179
|
+
}, [w, Z, O, G]);
|
|
1180
|
+
const xe = m ? "fixed" : "absolute";
|
|
1181
|
+
return d = ee(
|
|
1182
|
+
d,
|
|
1183
|
+
(B) => /* @__PURE__ */ E(
|
|
1184
|
+
"div",
|
|
1185
|
+
x(y({}, a), {
|
|
1186
|
+
style: y({
|
|
1187
|
+
// https://floating-ui.com/docs/computeposition#initial-layout
|
|
1188
|
+
position: xe,
|
|
1189
|
+
top: 0,
|
|
1190
|
+
left: 0,
|
|
1191
|
+
width: "max-content"
|
|
1192
|
+
}, a == null ? void 0 : a.style),
|
|
1193
|
+
ref: r == null ? void 0 : r.setPopoverElement,
|
|
1194
|
+
children: B
|
|
1195
|
+
})
|
|
1196
|
+
),
|
|
1197
|
+
[r, xe, a]
|
|
1198
|
+
), d = ee(
|
|
1199
|
+
d,
|
|
1200
|
+
(B) => /* @__PURE__ */ E(Gt, { value: r, children: B }),
|
|
1201
|
+
[r]
|
|
1202
|
+
), d = x(y({
|
|
1203
|
+
// data-placing is not part of the public API. We're setting this here so
|
|
1204
|
+
// we can wait for the popover to be positioned before other components
|
|
1205
|
+
// move focus into it. For example, this attribute is observed by the
|
|
1206
|
+
// Combobox component with the autoSelect behavior.
|
|
1207
|
+
"data-placing": !we || void 0
|
|
1208
|
+
}, d), {
|
|
1209
|
+
style: y({
|
|
1210
|
+
position: "relative"
|
|
1211
|
+
}, d.style)
|
|
1212
|
+
}), d = xt(x(y({
|
|
1213
|
+
store: r,
|
|
1214
|
+
modal: o,
|
|
1215
|
+
portal: s,
|
|
1216
|
+
preserveTabOrder: u,
|
|
1217
|
+
preserveTabOrderAnchor: S || U,
|
|
1218
|
+
autoFocusOnShow: we && i
|
|
1219
|
+
}, d), {
|
|
1220
|
+
portalRef: Pe
|
|
1221
|
+
})), d;
|
|
1222
|
+
}
|
|
1223
|
+
), an = St(
|
|
1224
|
+
K(function(t) {
|
|
1225
|
+
const n = Xr(t);
|
|
1226
|
+
return ne(Hr, n);
|
|
1227
|
+
}),
|
|
1228
|
+
mt
|
|
1229
|
+
);
|
|
1230
|
+
export {
|
|
1231
|
+
an as P,
|
|
1232
|
+
We as R,
|
|
1233
|
+
un as a,
|
|
1234
|
+
St as c,
|
|
1235
|
+
Xr as u
|
|
1236
|
+
};
|