@nubisco/ui 5.18.1 → 5.19.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/{AccordionItem-Cg8wmypl.js → AccordionItem-BrpJObcb.js} +2 -2
- package/dist/{AccordionItem-CCndN0ln.cjs → AccordionItem-DVwcaU3f.cjs} +1 -1
- package/dist/ActionGroup-0u17QzT8.js +170 -0
- package/dist/ActionGroup-CMuposow.cjs +1 -0
- package/dist/{AiLabel-BxCWEOn-.js → AiLabel-BFrehX_F.js} +1 -1
- package/dist/{AiLabel-D4gkbAEC.cjs → AiLabel-kmL1-Hdo.cjs} +1 -1
- package/dist/{BarChart-DUy6vE_i.js → BarChart-DTStA9jd.js} +4 -4
- package/dist/{BarChart-B3B7wH20.cjs → BarChart-Dvrl4xeX.cjs} +1 -1
- package/dist/{Blueprint-DzzoerbM.js → Blueprint-CB5a7H5o.js} +2 -2
- package/dist/{Blueprint-CnXyZkSE.cjs → Blueprint-DIrWXKml.cjs} +1 -1
- package/dist/{BlueprintCard-2Q1zYWcN.js → BlueprintCard-BmuGjOCn.js} +1 -1
- package/dist/{BlueprintCard-D3Rr5cKO.cjs → BlueprintCard-DhnoClRB.cjs} +1 -1
- package/dist/{BlueprintControls-CuOAdppD.js → BlueprintControls-C0yhBzYT.js} +1 -1
- package/dist/{BlueprintControls-LCIgk-cb.cjs → BlueprintControls-Qtd2vep2.cjs} +1 -1
- package/dist/Board-CDrukIty.js +553 -0
- package/dist/Board-D1BkK3J5.cjs +1 -0
- package/dist/Breadcrumbs-B8eAWAvg.js +48 -0
- package/dist/Breadcrumbs-cTxSMgeW.cjs +1 -0
- package/dist/{Button-BZn2lmMA.cjs → Button-C0UUTgEB.cjs} +1 -1
- package/dist/{Button-BAfC7ySK.js → Button-IcCXOoCT.js} +1 -1
- package/dist/{Checkbox-BkRL6Ops.js → Checkbox-CXlovpPs.js} +2 -2
- package/dist/{Checkbox-D8Curaxc.cjs → Checkbox-CZVNZ2pn.cjs} +1 -1
- package/dist/{CheckboxGroup-Hu-wWRto.js → CheckboxGroup-AQ6XgVPU.js} +3 -3
- package/dist/{CheckboxGroup-fEs9Ye8M.cjs → CheckboxGroup-BuvjRAeC.cjs} +1 -1
- package/dist/{ColorStrip-Doh0adti.cjs → ColorStrip-D4vNVSeW.cjs} +1 -1
- package/dist/{ColorStrip-CcMzeYOw.js → ColorStrip-Dknkw-RX.js} +2 -2
- package/dist/{Confirm-Br9VOB2-.cjs → Confirm-DCkG5bUZ.cjs} +1 -1
- package/dist/{Confirm-DztLfQzB.js → Confirm-OMhu2Fuz.js} +8 -8
- package/dist/DataTable-CWMlmjMi.cjs +1 -0
- package/dist/DataTable-DaNZAixf.js +389 -0
- package/dist/DatePicker-BgMtkY76.cjs +1 -0
- package/dist/DatePicker-MDaQ2l8I.js +715 -0
- package/dist/{FileUploader-OJJIlvmH.js → FileUploader-DC1nE86P.js} +1 -1
- package/dist/{FileUploader-DPIAWehF.cjs → FileUploader-DehZc0gP.cjs} +1 -1
- package/dist/FloatingToolbar-J9ucYTsb.js +140 -0
- package/dist/FloatingToolbar-vWo7YmH3.cjs +1 -0
- package/dist/{Form-j4QMRkL5.js → Form-DJ1Hhwnm.js} +1 -1
- package/dist/{Form-u6XCVBqX.cjs → Form-WtS-IVIs.cjs} +1 -1
- package/dist/{GanttChart-C6uVsNrq.cjs → GanttChart-BJ_6YCza.cjs} +1 -1
- package/dist/{GanttChart-asYYkfjM.js → GanttChart-CwCH8pby.js} +3 -3
- package/dist/{ImageCropper-Bl8BjRur.cjs → ImageCropper-BfGyTTY5.cjs} +1 -1
- package/dist/{ImageCropper-DBjxzZhN.js → ImageCropper-Ds5Zq1J0.js} +2 -2
- package/dist/InfoHint-D35B8g96.cjs +1 -0
- package/dist/{InfoHint-CK96hjMo.js → InfoHint-ieo2S-YE.js} +41 -29
- package/dist/InlineEdit-9E8-8JQr.cjs +1 -0
- package/dist/{InlineEdit-DssyFZM6.js → InlineEdit-BCHxGdSy.js} +58 -25
- package/dist/{InlineLoading-DXsOmC3w.cjs → InlineLoading-B2L_asnZ.cjs} +1 -1
- package/dist/{InlineLoading-LCwTwjyJ.js → InlineLoading-DQzKEw-L.js} +1 -1
- package/dist/{InterpolationChart-w1GgDSDT.cjs → InterpolationChart-BXS1n0dY.cjs} +1 -1
- package/dist/{InterpolationChart-CdbT0AvE.js → InterpolationChart-CSEYS5aB.js} +3 -3
- package/dist/{LineChart-CmBBttxc.cjs → LineChart-C5bQNxQ-.cjs} +1 -1
- package/dist/{LineChart-BgnDKI8u.js → LineChart-DG_ows6r.js} +4 -4
- package/dist/Menu-BALfMobG.cjs +1 -0
- package/dist/Menu-D-zvh-SA.js +136 -0
- package/dist/{MenuBarItem-H1sFt0Mx.js → MenuBarItem-BDqp9LzY.js} +1 -1
- package/dist/{MenuBarItem-42bSEdWZ.cjs → MenuBarItem-Dmutkr1p.cjs} +1 -1
- package/dist/Modal-BNgLfB88.cjs +1 -0
- package/dist/{Modal-BvZulLj2.js → Modal-C97dRTiP.js} +35 -34
- package/dist/NotificationCenter-BpUiKPsp.cjs +1 -0
- package/dist/NotificationCenter-Br-YtY5w.js +584 -0
- package/dist/{NumberInput-DsjKITeI.cjs → NumberInput-1taaS5G3.cjs} +1 -1
- package/dist/{NumberInput-CrbTiAkP.js → NumberInput-DWf2LMGN.js} +3 -3
- package/dist/{Pagination-JW-O2kLk.js → Pagination-Br-k9zuG.js} +2 -2
- package/dist/{Pagination-Di4RPomA.cjs → Pagination-CCMhqtoz.cjs} +1 -1
- package/dist/{PieChart-CUckdHre.cjs → PieChart-BABG-xXQ.cjs} +1 -1
- package/dist/{PieChart-CpkjCb1W.js → PieChart-CmvfqpXR.js} +3 -3
- package/dist/{ProgressBar-Cn-FnvZR.cjs → ProgressBar-BHKgJ4UK.cjs} +1 -1
- package/dist/{ProgressBar-BF-2nm2N.js → ProgressBar-Blt5BdgQ.js} +2 -2
- package/dist/{Radio-pH924Ch3.js → Radio-DsYitO1Z.js} +3 -3
- package/dist/{Radio-CkFwMQZ-.cjs → Radio-zdXHagRQ.cjs} +1 -1
- package/dist/ReorderList-hHh9XYQY.cjs +1 -0
- package/dist/{ReorderList-DC83oBGi.js → ReorderList-v1aWbXjb.js} +31 -15
- package/dist/{Select-Det8tjo1.cjs → Select-ClkEzw5T.cjs} +1 -1
- package/dist/{Select-dJWuOWN0.js → Select-DIw08nte.js} +3 -3
- package/dist/Shell-CfHe8tIp.js +487 -0
- package/dist/Shell-DrXByQxR.cjs +1 -0
- package/dist/{SidebarCollapseToggle-VOdswrKP.cjs → SidebarCollapseToggle-BOLWB51F.cjs} +1 -1
- package/dist/{SidebarCollapseToggle-pNj344jL.js → SidebarCollapseToggle-IzDpcwPs.js} +2 -2
- package/dist/{Skeleton-3N9uC9k_.js → Skeleton-BLn8a0wV.js} +1 -1
- package/dist/{Skeleton-DEzKdU7W.cjs → Skeleton-lLu_CakO.cjs} +1 -1
- package/dist/{Slider-Clgfp-vI.cjs → Slider-Ca5ru23S.cjs} +1 -1
- package/dist/{Slider-Dxh4sXev.js → Slider-CrhYMw5S.js} +4 -4
- package/dist/{Spinner-DpldXeXq.js → Spinner-C7NYF-Xf.js} +1 -1
- package/dist/{Spinner-Cwlskvjj.cjs → Spinner-UsyGqwVq.cjs} +1 -1
- package/dist/{Stepper-BlRuqNKX.cjs → Stepper-BIWoeqFS.cjs} +1 -1
- package/dist/{Stepper-SLb_qc9m.js → Stepper-CrVuq2Ba.js} +1 -1
- package/dist/{StepperStep-DxQQgCrC.js → StepperStep-CBaZPJV7.js} +4 -4
- package/dist/{StepperStep-DoJ3MUEl.cjs → StepperStep-DCpcJbTJ.cjs} +1 -1
- package/dist/Submenu-BC9j6dvb.cjs +1 -0
- package/dist/Submenu-CnRi1GdL.js +149 -0
- package/dist/{Switch-CI_QKz2n.js → Switch-BiqjLsXd.js} +3 -3
- package/dist/{Switch-BnzV_QMu.cjs → Switch-CA01aJ7b.cjs} +1 -1
- package/dist/{TableOfContents-C6Qnq6aS.cjs → TableOfContents-DCfZ4DYi.cjs} +1 -1
- package/dist/{TableOfContents-DwnnMxv5.js → TableOfContents-EYrBCeci.js} +1 -1
- package/dist/Tabs-CrrG1hvh.cjs +1 -0
- package/dist/Tabs-D3pdOieX.js +180 -0
- package/dist/{TextInput--u9htMqc.cjs → TextInput-BdZPqTzI.cjs} +2 -2
- package/dist/{TextInput-C_i6Miob.js → TextInput-KQGVZCcT.js} +4 -4
- package/dist/{Toaster-sBQX6bee.js → Toaster-B4ce6OBe.js} +1 -1
- package/dist/{Toaster-noCUOlwh.cjs → Toaster-CubmjJ_C.cjs} +1 -1
- package/dist/{Tree-CR_288A-.cjs → Tree-CnaGeX7W.cjs} +1 -1
- package/dist/{Tree-C6rMUOja.js → Tree-E3A0GUIG.js} +1 -1
- package/dist/TreeNode-C2W4uFhP.cjs +1 -0
- package/dist/TreeNode-xv6es6z2.js +176 -0
- package/dist/UserMenu-CVXfSmUQ.cjs +1 -0
- package/dist/UserMenu-E-PhzT3T.js +313 -0
- package/dist/{Walkthrough-vAJctcje.js → Walkthrough-BxwgYRUB.js} +1 -1
- package/dist/{Walkthrough-DRx76ziA.cjs → Walkthrough-Dvyp-4Sr.cjs} +1 -1
- package/dist/all.cjs +1 -1
- package/dist/all.mjs +207 -203
- package/dist/component-styles.json +7 -0
- package/dist/components/AccordionItem.cjs +1 -1
- package/dist/components/AccordionItem.mjs +1 -1
- package/dist/components/AccordionItem.vue.d.ts.map +1 -1
- package/dist/components/ActionGroup.cjs +1 -0
- package/dist/components/ActionGroup.d.ts +64 -0
- package/dist/components/ActionGroup.mjs +2 -0
- package/dist/components/ActionGroup.vue.d.ts +24 -0
- package/dist/components/ActionGroup.vue.d.ts.map +1 -0
- package/dist/components/AiLabel.cjs +1 -1
- package/dist/components/AiLabel.mjs +1 -1
- package/dist/components/Avatar.cjs +1 -1
- package/dist/components/Avatar.mjs +1 -1
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Badge.mjs +1 -1
- package/dist/components/Banner.cjs +1 -1
- package/dist/components/Banner.mjs +1 -1
- package/dist/components/Blueprint.cjs +1 -1
- package/dist/components/Blueprint.mjs +1 -1
- package/dist/components/BlueprintBackground.cjs +1 -1
- package/dist/components/BlueprintBackground.mjs +1 -1
- package/dist/components/BlueprintCard.cjs +1 -1
- package/dist/components/BlueprintCard.mjs +1 -1
- package/dist/components/BlueprintCard.vue.d.ts +1 -1
- package/dist/components/BlueprintControls.cjs +1 -1
- package/dist/components/BlueprintControls.mjs +1 -1
- package/dist/components/BlueprintMinimap.cjs +1 -1
- package/dist/components/BlueprintMinimap.mjs +1 -1
- package/dist/components/Board.cjs +1 -1
- package/dist/components/Board.d.ts +8 -0
- package/dist/components/Board.mjs +1 -1
- package/dist/components/Board.vue.d.ts +7 -3
- package/dist/components/Board.vue.d.ts.map +1 -1
- package/dist/components/BottomPanel.cjs +1 -1
- package/dist/components/BottomPanel.mjs +1 -1
- package/dist/components/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs.mjs +1 -1
- package/dist/components/Breadcrumbs.vue.d.ts +12 -1
- package/dist/components/Breadcrumbs.vue.d.ts.map +1 -1
- package/dist/components/Button.cjs +1 -1
- package/dist/components/Button.mjs +1 -1
- package/dist/components/Button.vue.d.ts +3 -3
- package/dist/components/Button.vue.d.ts.map +1 -1
- package/dist/components/Calendar.cjs +1 -1
- package/dist/components/Calendar.mjs +1 -1
- package/dist/components/Card.cjs +1 -1
- package/dist/components/Card.mjs +1 -1
- package/dist/components/Card.vue.d.ts +1 -1
- package/dist/components/CardGrid.cjs +1 -1
- package/dist/components/CardGrid.mjs +1 -1
- package/dist/components/Charts/BarChart.cjs +1 -1
- package/dist/components/Charts/BarChart.mjs +1 -1
- package/dist/components/Charts/GanttChart.cjs +1 -1
- package/dist/components/Charts/GanttChart.mjs +1 -1
- package/dist/components/Charts/InterpolationChart.cjs +1 -1
- package/dist/components/Charts/InterpolationChart.mjs +1 -1
- package/dist/components/Charts/LineChart.cjs +1 -1
- package/dist/components/Charts/LineChart.mjs +1 -1
- package/dist/components/Charts/PieChart.cjs +1 -1
- package/dist/components/Charts/PieChart.mjs +1 -1
- package/dist/components/Charts/Sparkline.cjs +1 -1
- package/dist/components/Charts/Sparkline.mjs +1 -1
- package/dist/components/Checkbox.cjs +1 -1
- package/dist/components/Checkbox.mjs +1 -1
- package/dist/components/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/CheckboxGroup.cjs +1 -1
- package/dist/components/CheckboxGroup.mjs +1 -1
- package/dist/components/ColorStrip.cjs +1 -1
- package/dist/components/ColorStrip.mjs +1 -1
- package/dist/components/CommandPalette.cjs +1 -1
- package/dist/components/CommandPalette.mjs +1 -1
- package/dist/components/CommandPalette.vue.d.ts.map +1 -1
- package/dist/components/Confirm.cjs +1 -1
- package/dist/components/Confirm.mjs +1 -1
- package/dist/components/DataTable.cjs +1 -1
- package/dist/components/DataTable.d.ts +23 -0
- package/dist/components/DataTable.mjs +1 -1
- package/dist/components/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DatePicker.cjs +1 -1
- package/dist/components/DatePicker.mjs +1 -1
- package/dist/components/DatePicker.vue.d.ts +1 -1
- package/dist/components/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/DefinitionList.cjs +1 -1
- package/dist/components/DefinitionList.mjs +1 -1
- package/dist/components/DefinitionListItem.cjs +1 -1
- package/dist/components/DefinitionListItem.mjs +1 -1
- package/dist/components/DragHandle.cjs +1 -1
- package/dist/components/DragHandle.mjs +1 -1
- package/dist/components/EmptyState.cjs +1 -1
- package/dist/components/EmptyState.mjs +1 -1
- package/dist/components/Field.cjs +1 -1
- package/dist/components/Field.mjs +1 -1
- package/dist/components/FileUploader.cjs +1 -1
- package/dist/components/FileUploader.mjs +1 -1
- package/dist/components/Flag.cjs +1 -1
- package/dist/components/Flag.mjs +1 -1
- package/dist/components/FloatingToolbar.cjs +1 -1
- package/dist/components/FloatingToolbar.d.ts +11 -0
- package/dist/components/FloatingToolbar.mjs +1 -1
- package/dist/components/FloatingToolbar.vue.d.ts +1 -0
- package/dist/components/FloatingToolbar.vue.d.ts.map +1 -1
- package/dist/components/Form.cjs +1 -1
- package/dist/components/Form.mjs +1 -1
- package/dist/components/Grid.cjs +1 -1
- package/dist/components/Grid.mjs +1 -1
- package/dist/components/ImageCropper.cjs +1 -1
- package/dist/components/ImageCropper.mjs +1 -1
- package/dist/components/InfoHint.cjs +1 -1
- package/dist/components/InfoHint.mjs +1 -1
- package/dist/components/InfoHint.vue.d.ts.map +1 -1
- package/dist/components/InlineEdit.cjs +1 -1
- package/dist/components/InlineEdit.d.ts +5 -0
- package/dist/components/InlineEdit.mjs +1 -1
- package/dist/components/InlineEdit.vue.d.ts +1 -0
- package/dist/components/InlineEdit.vue.d.ts.map +1 -1
- package/dist/components/InlineLoading.cjs +1 -1
- package/dist/components/InlineLoading.mjs +1 -1
- package/dist/components/JsonTree.cjs +1 -1
- package/dist/components/JsonTree.mjs +1 -1
- package/dist/components/Label.cjs +1 -1
- package/dist/components/Label.mjs +1 -1
- package/dist/components/Layer.cjs +1 -1
- package/dist/components/Layer.mjs +1 -1
- package/dist/components/Menu.cjs +1 -1
- package/dist/components/Menu.mjs +1 -1
- package/dist/components/Menu.vue.d.ts.map +1 -1
- package/dist/components/MenuBar.cjs +1 -1
- package/dist/components/MenuBar.mjs +1 -1
- package/dist/components/MenuBarItem.cjs +1 -1
- package/dist/components/MenuBarItem.mjs +1 -1
- package/dist/components/MenuDivider.cjs +1 -1
- package/dist/components/MenuDivider.mjs +1 -1
- package/dist/components/MenuItem.cjs +1 -1
- package/dist/components/MenuItem.mjs +1 -1
- package/dist/components/MenuItem.vue.d.ts +1 -1
- package/dist/components/MenuItem.vue.d.ts.map +1 -1
- package/dist/components/Message.cjs +1 -1
- package/dist/components/Message.mjs +1 -1
- package/dist/components/Modal.cjs +1 -1
- package/dist/components/Modal.mjs +1 -1
- package/dist/components/Modal.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter.cjs +1 -1
- package/dist/components/NotificationCenter.d.ts +6 -1
- package/dist/components/NotificationCenter.mjs +1 -1
- package/dist/components/NotificationCenter.vue.d.ts +2 -1
- package/dist/components/NotificationCenter.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenterItem.cjs +1 -1
- package/dist/components/NotificationCenterItem.mjs +1 -1
- package/dist/components/NotificationCenterItem.vue.d.ts +1 -1
- package/dist/components/NubiscoMark.cjs +1 -1
- package/dist/components/NubiscoMark.mjs +1 -1
- package/dist/components/NubiscoPlatformMark.cjs +1 -1
- package/dist/components/NubiscoPlatformMark.mjs +1 -1
- package/dist/components/NumberInput.cjs +1 -1
- package/dist/components/NumberInput.mjs +1 -1
- package/dist/components/NumberInput.vue.d.ts +1 -1
- package/dist/components/NumberInput.vue.d.ts.map +1 -1
- package/dist/components/Pagination.cjs +1 -1
- package/dist/components/Pagination.mjs +1 -1
- package/dist/components/Panel.cjs +1 -1
- package/dist/components/Panel.mjs +1 -1
- package/dist/components/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar.mjs +1 -1
- package/dist/components/Radio.cjs +1 -1
- package/dist/components/Radio.mjs +1 -1
- package/dist/components/Radio.vue.d.ts.map +1 -1
- package/dist/components/ReorderList.cjs +1 -1
- package/dist/components/ReorderList.mjs +1 -1
- package/dist/components/ReorderList.vue.d.ts.map +1 -1
- package/dist/components/Select.cjs +1 -1
- package/dist/components/Select.mjs +1 -1
- package/dist/components/Select.vue.d.ts.map +1 -1
- package/dist/components/Shell.cjs +1 -1
- package/dist/components/Shell.mjs +1 -1
- package/dist/components/Shell.vue.d.ts +14 -1
- package/dist/components/Shell.vue.d.ts.map +1 -1
- package/dist/components/ShellPanel.cjs +1 -1
- package/dist/components/ShellPanel.mjs +1 -1
- package/dist/components/SidebarBrand.cjs +1 -1
- package/dist/components/SidebarBrand.mjs +1 -1
- package/dist/components/SidebarCollapseToggle.cjs +1 -1
- package/dist/components/SidebarCollapseToggle.mjs +1 -1
- package/dist/components/SidebarLink.cjs +1 -1
- package/dist/components/SidebarLink.mjs +1 -1
- package/dist/components/SidebarMenu.cjs +1 -1
- package/dist/components/SidebarMenu.mjs +1 -1
- package/dist/components/SidebarMenuGroup.cjs +1 -1
- package/dist/components/SidebarMenuGroup.mjs +1 -1
- package/dist/components/SidebarMenuItem.cjs +1 -1
- package/dist/components/SidebarMenuItem.mjs +1 -1
- package/dist/components/Skeleton.cjs +1 -1
- package/dist/components/Skeleton.mjs +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/Slider.vue.d.ts +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/Spinner.mjs +1 -1
- package/dist/components/Stepper.cjs +1 -1
- package/dist/components/Stepper.mjs +1 -1
- package/dist/components/StepperStep.cjs +1 -1
- package/dist/components/StepperStep.mjs +1 -1
- package/dist/components/Submenu.cjs +1 -1
- package/dist/components/Submenu.mjs +1 -1
- package/dist/components/Submenu.vue.d.ts.map +1 -1
- package/dist/components/Switch.cjs +1 -1
- package/dist/components/Switch.mjs +1 -1
- package/dist/components/Switch.vue.d.ts.map +1 -1
- package/dist/components/TableOfContents.cjs +1 -1
- package/dist/components/TableOfContents.mjs +1 -1
- package/dist/components/Tabs.cjs +1 -1
- package/dist/components/Tabs.mjs +1 -1
- package/dist/components/Tabs.vue.d.ts.map +1 -1
- package/dist/components/TextInput.cjs +1 -1
- package/dist/components/TextInput.mjs +1 -1
- package/dist/components/TextInput.vue.d.ts +4 -4
- package/dist/components/TextInput.vue.d.ts.map +1 -1
- package/dist/components/Toast.cjs +1 -1
- package/dist/components/Toast.mjs +1 -1
- package/dist/components/Toast.vue.d.ts +1 -1
- package/dist/components/Toast.vue.d.ts.map +1 -1
- package/dist/components/Toaster.cjs +1 -1
- package/dist/components/Toaster.mjs +1 -1
- package/dist/components/Tree.cjs +1 -1
- package/dist/components/Tree.mjs +1 -1
- package/dist/components/TreeNode.cjs +1 -1
- package/dist/components/TreeNode.mjs +1 -1
- package/dist/components/TreeNode.vue.d.ts.map +1 -1
- package/dist/components/UserMenu.cjs +1 -1
- package/dist/components/UserMenu.mjs +1 -1
- package/dist/components/UserMenu.vue.d.ts.map +1 -1
- package/dist/components/Walkthrough.cjs +1 -1
- package/dist/components/Walkthrough.mjs +1 -1
- package/dist/components/Wireframe.cjs +1 -1
- package/dist/components/Wireframe.mjs +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/manifest.d.ts +1 -0
- package/dist/components/manifest.d.ts.map +1 -1
- package/dist/components/manifest.js +1 -0
- package/dist/composables/useBlueprint.composable.cjs +1 -1
- package/dist/composables/useBlueprint.composable.mjs +1 -1
- package/dist/composables/useConfirm.composable.cjs +1 -1
- package/dist/composables/useConfirm.composable.mjs +3 -3
- package/dist/composables/useInlineLoading.composable.cjs +1 -1
- package/dist/composables/useInlineLoading.composable.mjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.cjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.mjs +1 -1
- package/dist/composables/usePhoneLayout.composable.cjs +1 -0
- package/dist/composables/usePhoneLayout.composable.d.ts +28 -0
- package/dist/composables/usePhoneLayout.composable.d.ts.map +1 -0
- package/dist/composables/usePhoneLayout.composable.mjs +25 -0
- package/dist/composables/useShellLayout.composable.cjs +1 -0
- package/dist/composables/useShellLayout.composable.d.ts +24 -0
- package/dist/composables/useShellLayout.composable.d.ts.map +1 -0
- package/dist/composables/useShellLayout.composable.mjs +14 -0
- package/dist/composables/useVisualViewportVar.composable.cjs +1 -0
- package/dist/composables/useVisualViewportVar.composable.d.ts +36 -0
- package/dist/composables/useVisualViewportVar.composable.d.ts.map +1 -0
- package/dist/composables/useVisualViewportVar.composable.mjs +30 -0
- package/dist/directives/ToolTip.directive.d.ts.map +1 -1
- package/dist/global.d.ts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +113 -110
- package/dist/{main-DgTv5UiQ.js → main-3k7sSIY5.js} +102 -99
- package/dist/main-DmyKNXAy.cjs +4 -0
- package/dist/main.d.ts +5 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/styles/AccordionItem.css +1 -1
- package/dist/styles/ActionGroup.css +1 -0
- package/dist/styles/Board.css +1 -1
- package/dist/styles/Breadcrumbs.css +1 -1
- package/dist/styles/Button.css +1 -1
- package/dist/styles/Checkbox.css +1 -1
- package/dist/styles/CommandPalette.css +1 -1
- package/dist/styles/DataTable.css +1 -1
- package/dist/styles/DatePicker.css +1 -1
- package/dist/styles/FloatingToolbar.css +1 -1
- package/dist/styles/InfoHint.css +1 -1
- package/dist/styles/InlineEdit.css +1 -1
- package/dist/styles/MenuItem.css +1 -1
- package/dist/styles/Modal.css +1 -1
- package/dist/styles/NotificationCenter.css +1 -1
- package/dist/styles/NumberInput.css +1 -1
- package/dist/styles/Radio.css +1 -1
- package/dist/styles/ReorderList.css +1 -1
- package/dist/styles/Select.css +1 -1
- package/dist/styles/Shell.css +1 -1
- package/dist/styles/Switch.css +1 -1
- package/dist/styles/Tabs.css +1 -1
- package/dist/styles/TextInput.css +1 -1
- package/dist/styles/TreeNode.css +1 -1
- package/dist/styles/UserMenu.css +1 -1
- package/dist/ui.css +26 -25
- package/package.json +1 -1
- package/src/styles/logic/_touch.scss +31 -0
- package/src/styles/logic/index.scss +1 -0
- package/src/styles/variables/_breakpoints.scss +36 -0
- package/dist/Board-6D49Yld8.js +0 -524
- package/dist/Board-Cp8XfgZm.cjs +0 -1
- package/dist/Breadcrumbs-BXsbR60g.js +0 -46
- package/dist/Breadcrumbs-CPucjD0z.cjs +0 -1
- package/dist/DataTable-8VaU0T7V.js +0 -358
- package/dist/DataTable-Mq7v4Dyk.cjs +0 -1
- package/dist/DatePicker-Cgnm0ku3.js +0 -704
- package/dist/DatePicker-DytDcACW.cjs +0 -1
- package/dist/FloatingToolbar-DpBbWZL6.cjs +0 -1
- package/dist/FloatingToolbar-_loB4pae.js +0 -134
- package/dist/InfoHint-Cs9-C043.cjs +0 -1
- package/dist/InlineEdit-CR9vOw3i.cjs +0 -1
- package/dist/Menu-CsA8dtMR.js +0 -128
- package/dist/Menu-Xt1MCf-q.cjs +0 -1
- package/dist/Modal-Xa9TIGNi.cjs +0 -1
- package/dist/NotificationCenter-B12PMiat.cjs +0 -1
- package/dist/NotificationCenter-B2kJXtA9.js +0 -569
- package/dist/ReorderList-CigXh_u8.cjs +0 -1
- package/dist/Shell-BzAv4AWb.cjs +0 -1
- package/dist/Shell-COpscGYO.js +0 -448
- package/dist/Submenu-QgPVi2bN.cjs +0 -1
- package/dist/Submenu-SQTJc81U.js +0 -148
- package/dist/Tabs-B5crovQe.cjs +0 -1
- package/dist/Tabs-DRrq4YCX.js +0 -149
- package/dist/TreeNode-CXaEp3-m.js +0 -175
- package/dist/TreeNode-kgKGox1Y.cjs +0 -1
- package/dist/UserMenu-C65Ky9ov.cjs +0 -1
- package/dist/UserMenu-ClcDEyTu.js +0 -301
- package/dist/main-BNXD4cwz.cjs +0 -4
- /package/dist/{Avatar-uYRUtK1R.js → Avatar-B8JS0B-W.js} +0 -0
- /package/dist/{Avatar-CLL3i8dn.cjs → Avatar-C-yA5Rqn.cjs} +0 -0
- /package/dist/{Badge-wDtZdOfk.js → Badge-D3oJVwDo.js} +0 -0
- /package/dist/{Badge-ouVFB318.cjs → Badge-Dkm7PBJ8.cjs} +0 -0
- /package/dist/{Banner-DKMPZuXR.js → Banner-C2DFPW-D.js} +0 -0
- /package/dist/{Banner-CtaMbfyG.cjs → Banner-DXfzpyxc.cjs} +0 -0
- /package/dist/{Blueprint.context-DQAE9pH9.cjs → Blueprint.context-CNt0_OyK.cjs} +0 -0
- /package/dist/{Blueprint.context-C51gyX3c.js → Blueprint.context-Cp__sufg.js} +0 -0
- /package/dist/{BlueprintBackground-CCuLvvq5.cjs → BlueprintBackground-CRbAZfZP.cjs} +0 -0
- /package/dist/{BlueprintBackground-DJhMflIN.js → BlueprintBackground-DqRpS-jP.js} +0 -0
- /package/dist/{BlueprintMinimap-C4hKP0wV.cjs → BlueprintMinimap-Bk6V5xcq.cjs} +0 -0
- /package/dist/{BlueprintMinimap-CUNeYFVd.js → BlueprintMinimap-KRlkpH14.js} +0 -0
- /package/dist/{BottomPanel-BkD7euB4.js → BottomPanel-Bt4k2PJn.js} +0 -0
- /package/dist/{BottomPanel-DvS5Q8c8.cjs → BottomPanel-C1mT0_I0.cjs} +0 -0
- /package/dist/{Calendar-D3ExPJ2t.cjs → Calendar-CI6TG85W.cjs} +0 -0
- /package/dist/{Calendar-DCoZLEcA.js → Calendar-CV-B4qeT.js} +0 -0
- /package/dist/{Card-ChgbYLJP.js → Card-BqIF-svL.js} +0 -0
- /package/dist/{Card-duvlUAg9.cjs → Card-Xmv6oz9a.cjs} +0 -0
- /package/dist/{CardGrid-Desk_vNP.cjs → CardGrid-BbGLqQmb.cjs} +0 -0
- /package/dist/{CardGrid-ChwQuHLa.js → CardGrid-CphjVIvE.js} +0 -0
- /package/dist/{ChartLegend-B_Y9TNfO.js → ChartLegend-BLTbVV2E.js} +0 -0
- /package/dist/{ChartLegend-k-7LH8-7.cjs → ChartLegend-DGgW0yjG.cjs} +0 -0
- /package/dist/{CheckboxGroup.context-DYPnnK72.cjs → CheckboxGroup.context-CBJMSIiT.cjs} +0 -0
- /package/dist/{CheckboxGroup.context-BssNljp4.js → CheckboxGroup.context-D-C4RVyg.js} +0 -0
- /package/dist/{CommandPalette-dNJMbapr.cjs → CommandPalette-C56CkOfF.cjs} +0 -0
- /package/dist/{CommandPalette-Bv_AnaSi.js → CommandPalette-CubX_Udj.js} +0 -0
- /package/dist/{DefinitionList-C5cqvaLy.cjs → DefinitionList-CSBl-Ogy.cjs} +0 -0
- /package/dist/{DefinitionList-fmy6J4Re.js → DefinitionList-MsqB9Lxo.js} +0 -0
- /package/dist/{DefinitionListItem-CJK5RkIw.js → DefinitionListItem-Ddz2wLyc.js} +0 -0
- /package/dist/{DefinitionListItem-CWqjObrZ.cjs → DefinitionListItem-DnphEEw1.cjs} +0 -0
- /package/dist/{DragHandle-CoJEyCLX.cjs → DragHandle-B_rMbMxm.cjs} +0 -0
- /package/dist/{DragHandle-DDJ1Hsmo.js → DragHandle-D9NnsyJc.js} +0 -0
- /package/dist/{EmptyState-xU5I0laM.js → EmptyState-B6pEj4jk.js} +0 -0
- /package/dist/{EmptyState-u1iAtZUB.cjs → EmptyState-DRbjP890.cjs} +0 -0
- /package/dist/{Field-CfktrvRe.cjs → Field-BZ2cHQlw.cjs} +0 -0
- /package/dist/{Field-D7ImyCWp.js → Field-tNwOATAd.js} +0 -0
- /package/dist/{Flag-k-Aakupd.js → Flag-C4SjTXTD.js} +0 -0
- /package/dist/{Flag-Pk2LFD1t.cjs → Flag-DFg5FTus.cjs} +0 -0
- /package/dist/{Grid-HifmWSUS.cjs → Grid-DiCxrPaO.cjs} +0 -0
- /package/dist/{Grid-DA2jibMM.js → Grid-iox-7xyH.js} +0 -0
- /package/dist/{JsonTree-BLgpxnrT.js → JsonTree-Do_bunoq.js} +0 -0
- /package/dist/{JsonTree-DGzMCcSN.cjs → JsonTree-DygODsNE.cjs} +0 -0
- /package/dist/{Label-BIM21I7D.cjs → Label-CZhQEyoi.cjs} +0 -0
- /package/dist/{Label-CiWiUQ_H.js → Label-DGK5nxFy.js} +0 -0
- /package/dist/{Layer-B47tXgJm.js → Layer-CPWK7fSy.js} +0 -0
- /package/dist/{Layer-Csk6CZPD.cjs → Layer-Dn8JBO94.cjs} +0 -0
- /package/dist/{MenuBar-cNc__THT.cjs → MenuBar-Cmty676_.cjs} +0 -0
- /package/dist/{MenuBar-CdBcgokD.js → MenuBar-DgoQm2e6.js} +0 -0
- /package/dist/{MenuDivider-DEy1DSW1.js → MenuDivider-Clt77czV.js} +0 -0
- /package/dist/{MenuDivider-GuRZ5Dek.cjs → MenuDivider-SpMk4am3.cjs} +0 -0
- /package/dist/{MenuItem-BKjhq9o2.js → MenuItem-BDLX2QWw.js} +0 -0
- /package/dist/{MenuItem-B-Q5sVlO.cjs → MenuItem-ZQcFYe4m.cjs} +0 -0
- /package/dist/{Message-DjxOb8mu.cjs → Message-C44ftsaT.cjs} +0 -0
- /package/dist/{Message-SQvoXiWl.js → Message-CHkTWe0K.js} +0 -0
- /package/dist/{NotificationCenterItem-pWiBpKMc.cjs → NotificationCenterItem-BP0VBTaB.cjs} +0 -0
- /package/dist/{NotificationCenterItem-yqlKqwI2.js → NotificationCenterItem-CjJh9W_a.js} +0 -0
- /package/dist/{NubiscoMark-BN6bzMMG.cjs → NubiscoMark-BumRk78m.cjs} +0 -0
- /package/dist/{NubiscoMark-Bj6eID79.js → NubiscoMark-eVqSGOjI.js} +0 -0
- /package/dist/{NubiscoPlatformMark-C0OeymWK.js → NubiscoPlatformMark-Ch6dCICn.js} +0 -0
- /package/dist/{NubiscoPlatformMark-CE-poDEU.cjs → NubiscoPlatformMark-IX-E5QQ_.cjs} +0 -0
- /package/dist/{Panel-PtasWgYu.cjs → Panel-Cd29GNxw.cjs} +0 -0
- /package/dist/{Panel-MK5IWy0W.js → Panel-Y8gOQKuw.js} +0 -0
- /package/dist/{ShellPanel-f75v2_V2.js → ShellPanel-BA7QLnzE.js} +0 -0
- /package/dist/{ShellPanel-DzMmoG81.cjs → ShellPanel-CC_QJlLu.cjs} +0 -0
- /package/dist/{SidebarBrand-B3hJvpkF.js → SidebarBrand-8yDIYIQZ.js} +0 -0
- /package/dist/{SidebarBrand-CHxEUgzI.cjs → SidebarBrand-u8Oau9DK.cjs} +0 -0
- /package/dist/{SidebarLink-QG3kJ2EO.js → SidebarLink-XVXCHDBm.js} +0 -0
- /package/dist/{SidebarLink-B_5TV_Y_.cjs → SidebarLink-pgjUnWzl.cjs} +0 -0
- /package/dist/{SidebarMenu-CHra29Qu.cjs → SidebarMenu-CA0y5Zle.cjs} +0 -0
- /package/dist/{SidebarMenu-B4oKxxC9.js → SidebarMenu-e0qP4Nh-.js} +0 -0
- /package/dist/{SidebarMenuGroup-D4zw60k-.js → SidebarMenuGroup-CGnMAAUM.js} +0 -0
- /package/dist/{SidebarMenuGroup-D3-id6rV.cjs → SidebarMenuGroup-VQLxJ1CS.cjs} +0 -0
- /package/dist/{SidebarMenuItem-rDAFayv3.cjs → SidebarMenuItem-CqDbzAAk.cjs} +0 -0
- /package/dist/{SidebarMenuItem-DKfynXs8.js → SidebarMenuItem-DwBLBW-N.js} +0 -0
- /package/dist/{Sparkline-C__UzqcW.js → Sparkline-Bbt4vFjI.js} +0 -0
- /package/dist/{Sparkline-hfnHBqr_.cjs → Sparkline-CdLiYBEr.cjs} +0 -0
- /package/dist/{Stepper.context-DtdxFiTP.js → Stepper.context-BgQfa8xl.js} +0 -0
- /package/dist/{Stepper.context-OTxRDrqb.cjs → Stepper.context-DBNE-GYb.cjs} +0 -0
- /package/dist/{Toast-DdjLfZW7.cjs → Toast-XjSCXTx8.cjs} +0 -0
- /package/dist/{Toast-C7ZcSqjz.js → Toast-q9KByfYq.js} +0 -0
- /package/dist/{TreeContext-CN8Jmm3J.js → TreeContext-BN1eHAL6.js} +0 -0
- /package/dist/{TreeContext-CRgX277A.cjs → TreeContext-PgcV87_V.cjs} +0 -0
- /package/dist/{Wireframe-yxCSPLE-.cjs → Wireframe-DDRVqrll.cjs} +0 -0
- /package/dist/{Wireframe-Lb8viOfl.js → Wireframe-ql6EOtd2.js} +0 -0
- /package/dist/{palette-CP7R55wd.cjs → palette-Cy2_8mLH.cjs} +0 -0
- /package/dist/{palette-BVXsOJol.js → palette-StNyj_sM.js} +0 -0
- /package/dist/{pixi-scene-CjZJN5UI.js → pixi-scene-CuO3As43.js} +0 -0
- /package/dist/{pixi-scene-Be5EU7HP.cjs → pixi-scene-DE1dBR9n.cjs} +0 -0
- /package/dist/{scales-DJ_hCmZX.cjs → scales-4WxjhxBm.cjs} +0 -0
- /package/dist/{scales-CsGzsNm7.js → scales-DlFF1BRk.js} +0 -0
- /package/dist/{useChartSize-DGUae61E.cjs → useChartSize-C-BIN0vc.cjs} +0 -0
- /package/dist/{useChartSize-6K6L_Xnm.js → useChartSize-UdZSuP3G.js} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-TdYpHGvK.js → useLoadingAnnouncer.composable-C7FA-Ui1.js} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-DeoNGDYL.cjs → useLoadingAnnouncer.composable-DMycMLn-.cjs} +0 -0
- /package/dist/{vue-i18n-CkVGSKx4.js → vue-i18n-B2FDvjI1.js} +0 -0
- /package/dist/{vue-i18n-Bhwom92P.cjs → vue-i18n-D3Ga_miE.cjs} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Icon-C8R_r_In.cjs`),t=require(`./composables/useSurfaceLayer.composable.cjs`),n=require(`./Label-BIM21I7D.cjs`),r=require(`./Message-DjxOb8mu.cjs`),i=require(`./Grid-HifmWSUS.cjs`),a=require(`./composables/useMenuSurface.composable.cjs`);let o=require(`vue`),s=require(`@nubisco/ui/icons/caret-right`),c=require(`@nubisco/ui/icons/calendar`),l=require(`@nubisco/ui/icons/caret-double-left`),u=require(`@nubisco/ui/icons/caret-left`),d=require(`@nubisco/ui/icons/caret-double-right`);var ee={class:`nb-date-picker__col`},te=[`id`,`value`,`placeholder`,`disabled`,`readonly`,`required`,`name`,`aria-invalid`,`aria-describedby`],ne=[`disabled`,`aria-label`],re={key:0,class:`nb-date-picker__col`},ie=[`id`,`value`,`placeholder`,`disabled`,`readonly`,`required`,`aria-invalid`,`aria-describedby`],ae=[`disabled`,`aria-label`],oe={key:0,class:`nb-date-picker__inner-header`},se=[`for`],ce={key:0,class:`nb-date-picker__asterisk`,"aria-hidden":`true`},le={class:`nb-date-picker__fluid-row`},ue=[`id`,`value`,`placeholder`,`disabled`,`readonly`,`required`,`name`,`aria-invalid`],de=[`disabled`,`aria-label`],fe={key:0,class:`nb-date-picker__inner-header`},pe=[`for`],me={key:0,class:`nb-date-picker__asterisk`,"aria-hidden":`true`},he={class:`nb-date-picker__fluid-row`},ge=[`id`,`value`,`placeholder`,`disabled`,`readonly`,`required`,`aria-invalid`],_e=[`disabled`,`aria-label`],ve=[`aria-label`],ye={class:`nb-date-picker__cal-header`},be=[`id`],xe=[`aria-labelledby`],Se={class:`nb-date-picker__cal-weekdays`},Ce=[`abbr`],we=[`aria-selected`,`aria-disabled`],Te=[`tabindex`,`disabled`,`aria-label`,`data-date`,`onClick`],f=(0,o.defineComponent)({inheritAttrs:!1,__name:`DatePicker`,props:{modelValue:{default:null},type:{default:`single`},endValue:{default:null},min:{default:void 0},max:{default:void 0},weekStart:{default:1},locale:{default:void 0},endPlaceholder:{default:``},endLabel:{default:``},endError:{default:``},endWarning:{default:``},disabledDates:{type:[Array,Function],default:void 0},readonly:{type:Boolean,default:!1},placeholder:{default:``},name:{default:``},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},id:{default:void 0},label:{default:``},error:{default:``},warning:{default:``},helper:{default:``},variant:{default:`default`},size:{default:`md`}},emits:[`update:modelValue`,`update:endValue`,`change`],setup(f,{expose:Ee,emit:De}){let p=f,{layerProps:Oe}=t.useSurfaceLayer({overlay:!0}),m=De,ke=`nb-date-picker-${(0,o.useId)()}`,h=(0,o.computed)(()=>p.id??ke),g=(0,o.computed)(()=>`${h.value}-end`),_=(0,o.computed)(()=>`${h.value}-helper`),v=(0,o.computed)(()=>`${h.value}-message`),Ae=(0,o.computed)(()=>`${h.value}-end-message`),je=(0,o.computed)(()=>`${h.value}-cal-title`),y=(0,o.ref)(null),Me=(0,o.computed)(()=>y.value!==null),b=(0,o.ref)(!1),x=(0,o.ref)(Q(new Date)),S=(0,o.ref)(null),C=(0,o.ref)(null),w=(0,o.ref)(null),T=(0,o.ref)(null);a.useMenuSurface(T);let Ne=(0,o.ref)({position:`fixed`,top:`0px`,left:`0px`,zIndex:`9999`}),E=(0,o.ref)(`start`),D=(0,o.computed)(()=>p.locale||navigator.language||`pt-PT`),O=(0,o.computed)(()=>new Intl.DateTimeFormat(D.value).formatToParts(new Date(2e3,0,15)).map(e=>e.type===`day`?`dd`:e.type===`month`?`mm`:e.type===`year`?`yyyy`:e.value).join(``));function k(e){if(!e)return``;let t=new Date(e+`T00:00:00`);return isNaN(t.getTime())?e:t.toLocaleDateString(D.value)}function Pe(e){return new Date(e+`T00:00:00`).toLocaleDateString(D.value,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`})}let Fe=(0,o.computed)(()=>k(p.modelValue??null)),Ie=(0,o.computed)(()=>k(p.endValue??null)),A=(0,o.computed)(()=>p.error?{variant:`error`,text:p.error}:p.warning?{variant:`warning`,text:p.warning}:null),j=(0,o.computed)(()=>p.type===`range`?p.endError?{variant:`error`,text:p.endError}:p.endWarning?{variant:`warning`,text:p.endWarning}:null:null),M=(0,o.computed)(()=>A.value?A.value:p.helper?{variant:`helper`,text:p.helper}:null),Le=(0,o.computed)(()=>{if(p.variant===`default`)return A.value?v.value:p.helper?_.value:void 0}),Re=(0,o.computed)(()=>{if(p.variant===`default`)return j.value?Ae.value:p.helper?_.value:void 0}),N=(0,o.computed)(()=>p.type===`range`&&!!p.endLabel),ze=(0,o.computed)(()=>p.endLabel||p.endPlaceholder);function P(e){return p.min!=null&&e<p.min||p.max!=null&&e>p.max?!0:p.disabledDates?typeof p.disabledDates==`function`?p.disabledDates(e):p.disabledDates.includes(e):!1}function Be(e){let t=e.trim();if(!t)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let e=new Date(t+`T00:00:00`);return isNaN(e.getTime())?null:t}let n=new Date(t);return isNaN(n.getTime())?null:Q(n)}function Ve(e){let t=e.target.value,n=Be(t);n&&P(n)||(n||t===``)&&(m(`update:modelValue`,n),m(`change`,n))}function F(e){let t=e.target.value,n=Be(t);n&&P(n)||(n||t===``)&&m(`update:endValue`,n)}function I(e){y.value=e.target===w.value?`end`:`start`,p.type!==`simple`&&!p.readonly&&(E.value=y.value,b.value?z():B())}function L(){y.value=null}function R(e){if(!(p.type===`simple`||p.readonly))switch(e.key){case`Escape`:b.value&&(V(),e.preventDefault());break;case`ArrowDown`:e.preventDefault(),b.value||B(),(0,o.nextTick)(U);break;case`Enter`:b.value||(e.preventDefault(),B(),(0,o.nextTick)(U));break}}function z(){let e=S.value?.querySelectorAll(`.nb-date-picker__input-wrapper`);if(!e?.length)return;let t=(E.value===`end`&&e.length>1?e[1]:e[0]).getBoundingClientRect();Ne.value={position:`fixed`,top:`${t.bottom+4}px`,left:`${t.left}px`,zIndex:`9999`}}function B(){if(p.disabled||p.readonly||p.type===`simple`||b.value)return;b.value=!0;let e=E.value===`end`&&p.endValue?p.endValue:p.modelValue,t=e?new Date(e+`T00:00:00`):new Date;Y.value=t.getFullYear(),X.value=t.getMonth(),x.value=e||Q(new Date),z()}function V(){b.value&&(b.value=!1,(0,o.nextTick)(()=>{E.value===`end`&&w.value?w.value.focus():C.value?.focus()}))}function H(){b.value?V():(E.value=`start`,B(),(0,o.nextTick)(U))}function U(){(0,o.nextTick)(()=>{(T.value?.querySelector(`[data-date="${x.value}"]`))?.focus()})}function He(e){P(e)||(p.type===`range`?E.value===`start`?(m(`update:modelValue`,e),m(`change`,e),E.value=`end`,x.value=e,(0,o.nextTick)(()=>w.value?.focus())):(p.modelValue&&e<p.modelValue?(m(`update:endValue`,p.modelValue),m(`update:modelValue`,e),m(`change`,e)):m(`update:endValue`,e),V()):(m(`update:modelValue`,e),m(`change`,e),V()))}function Ue(e){let t=new Date(x.value+`T00:00:00`),n=!0;switch(e.key){case`ArrowRight`:W(t,1);break;case`ArrowLeft`:W(t,-1);break;case`ArrowDown`:W(t,7);break;case`ArrowUp`:W(t,-7);break;case`Home`:We(t,`start`);break;case`End`:We(t,`end`);break;case`PageUp`:e.shiftKey?G(t,-12):G(t,-1);break;case`PageDown`:e.shiftKey?G(t,12):G(t,1);break;case`Enter`:case` `:e.preventDefault(),He(x.value);return;case`Escape`:V();break;case`Tab`:V();return;default:n=!1}n&&e.preventDefault()}function W(e,t){let n=new Date(e);n.setDate(n.getDate()+t),K(n)}function We(e,t){let n=e.getDay();p.weekStart===1&&(n=n===0?6:n-1);let r=t===`start`?-n:6-n,i=new Date(e);i.setDate(i.getDate()+r),K(i)}function G(e,t){let n=new Date(e);n.setMonth(n.getMonth()+t),n.getDate()!==e.getDate()&&n.setDate(0),K(n)}function K(e){let t=Q(e);p.min!=null&&t<p.min||p.max!=null&&t>p.max||(x.value=t,Y.value=e.getFullYear(),X.value=e.getMonth(),U())}function q(e){let t=e.target,n=S.value?.contains(t)??!1,r=T.value?.contains(t)??!1;!n&&!r&&V()}function J(){b.value&&z()}(0,o.watch)(b,e=>{e?(document.addEventListener(`mousedown`,q),window.addEventListener(`scroll`,J,!0),window.addEventListener(`resize`,J)):(document.removeEventListener(`mousedown`,q),window.removeEventListener(`scroll`,J,!0),window.removeEventListener(`resize`,J))}),(0,o.onBeforeUnmount)(()=>{document.removeEventListener(`mousedown`,q),window.removeEventListener(`scroll`,J,!0),window.removeEventListener(`resize`,J)});let Y=(0,o.ref)(new Date().getFullYear()),X=(0,o.ref)(new Date().getMonth());function Z(e){let t=Y.value*12+X.value+e;Y.value=Math.floor(t/12),X.value=(t%12+12)%12;let n=new Date(x.value+`T00:00:00`).getDate(),r=new Date(Y.value,X.value+1,0).getDate();x.value=Q(new Date(Y.value,X.value,Math.min(n,r))),U()}let Ge=()=>Z(-1),Ke=()=>Z(1),qe=()=>Z(-12),Je=()=>Z(12),Ye=(0,o.computed)(()=>{let e=new Date(Y.value,X.value,1).toLocaleDateString(D.value,{month:`long`,year:`numeric`});return e.charAt(0).toUpperCase()+e.slice(1)}),Xe=(0,o.computed)(()=>{let e=[],t=new Date(2024,0,p.weekStart===0?7:1);for(let n=0;n<7;n++){let r=new Date(t);r.setDate(t.getDate()+n);let i=r.toLocaleDateString(D.value,{weekday:`narrow`}).toUpperCase(),a=r.toLocaleDateString(D.value,{weekday:`long`});e.push({narrow:i,full:a.charAt(0).toUpperCase()+a.slice(1)})}return e});function Q(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}let Ze=(0,o.computed)(()=>Q(new Date)),Qe=(0,o.computed)(()=>{let e=Y.value,t=X.value,n=new Date(e,t,1),r=new Date(e,t+1,0),i=n.getDay();p.weekStart===1&&(i=i===0?6:i-1);let a=[],o=p.modelValue??null,s=p.endValue??null,c=o&&s?o<s?o:s:null,l=o&&s?o<s?s:o:null;function u(e,t){let n=Q(e);return{key:n,date:n,day:e.getDate(),inMonth:t,isToday:n===Ze.value,isSelected:n===o||n===s,inRange:c!=null&&l!=null&&n>c&&n<l,isRangeStart:n===c&&l!=null,isRangeEnd:n===l&&c!=null,isDisabled:P(n)}}for(let n=i-1;n>=0;n--)a.push(u(new Date(e,t,-n),!1));for(let n=1;n<=r.getDate();n++)a.push(u(new Date(e,t,n),!0));let d=7-a.length%7;if(d<7)for(let n=1;n<=d;n++)a.push(u(new Date(e,t+1,n),!1));return a}),$e=(0,o.computed)(()=>{let e=[];for(let t=0;t<Qe.value.length;t+=7)e.push(Qe.value.slice(t,t+7));return e}),et=(0,o.computed)(()=>[`nb-date-picker`,`nb-date-picker--${p.variant}`,`nb-date-picker--${p.size}`,`nb-date-picker--${p.type}`,{"nb-date-picker--focused":Me.value,"nb-date-picker--open":b.value,"nb-date-picker--error":!!p.error||!!p.endError,"nb-date-picker--warning":!p.error&&!p.endError&&(!!p.warning||!!p.endWarning),"nb-date-picker--disabled":p.disabled,"nb-date-picker--readonly":p.readonly}]),tt=(0,o.computed)(()=>({"nb-date-picker__input-wrapper--focused":y.value===`start`,"nb-date-picker__input-wrapper--error":!!p.error,"nb-date-picker__input-wrapper--warning":!p.error&&!!p.warning,"nb-date-picker__input-wrapper--disabled":p.disabled,"nb-date-picker__input-wrapper--readonly":p.readonly})),$=(0,o.computed)(()=>({"nb-date-picker__input-wrapper--focused":y.value===`end`,"nb-date-picker__input-wrapper--error":!!p.endError,"nb-date-picker__input-wrapper--warning":!p.endError&&!!p.endWarning,"nb-date-picker__input-wrapper--disabled":p.disabled,"nb-date-picker__input-wrapper--readonly":p.readonly}));return Ee({open:B,close:V,focus:()=>C.value?.focus()}),(t,a)=>((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,null,[(0,o.createElementVNode)(`div`,{ref_key:`rootRef`,ref:S,class:(0,o.normalizeClass)(et.value)},[f.variant===`default`?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:0},[t.$slots.label?(0,o.renderSlot)(t.$slots,`label`,{key:0}):f.label&&!N.value?((0,o.openBlock)(),(0,o.createBlock)(n.t,{key:1,for:h.value,required:f.required,disabled:f.disabled},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(f.label),1)]),_:1},8,[`for`,`required`,`disabled`])):(0,o.createCommentVNode)(``,!0),(0,o.createVNode)(i.t,{dir:`row`,gap:f.type===`range`?`sm`:void 0,class:`nb-date-picker__fields`},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`div`,ee,[N.value&&f.label?((0,o.openBlock)(),(0,o.createBlock)(n.t,{key:0,for:h.value,required:f.required,disabled:f.disabled},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(f.label),1)]),_:1},8,[`for`,`required`,`disabled`])):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`div`,{class:(0,o.normalizeClass)([`nb-date-picker__input-wrapper`,tt.value])},[(0,o.createElementVNode)(`input`,(0,o.mergeProps)({id:h.value,ref_key:`inputRef`,ref:C},t.$attrs,{type:`text`,class:`nb-date-picker__field`,value:Fe.value,placeholder:f.placeholder||O.value,disabled:f.disabled,readonly:f.readonly,required:f.required,name:f.name,"aria-invalid":f.error?!0:void 0,"aria-describedby":Le.value,onInput:a[0]||=e=>Ve(e),onFocus:I,onBlur:L,onKeydown:R}),null,16,te),f.type===`simple`?(0,o.createCommentVNode)(``,!0):((0,o.openBlock)(),(0,o.createElementBlock)(`button`,{key:0,type:`button`,class:`nb-date-picker__icon`,disabled:f.disabled||f.readonly,tabindex:`-1`,"aria-label":f.modelValue?`Change date, ${k(f.modelValue)}`:`Choose date`,onClick:H},[(0,o.createVNode)(e.t,{name:(0,o.unref)(c.regular),size:16},null,8,[`name`])],8,ne))],2)]),f.type===`range`?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,re,[N.value?((0,o.openBlock)(),(0,o.createBlock)(n.t,{key:0,for:g.value,required:f.required,disabled:f.disabled},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(f.endLabel),1)]),_:1},8,[`for`,`required`,`disabled`])):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`div`,{class:(0,o.normalizeClass)([`nb-date-picker__input-wrapper`,$.value])},[(0,o.createElementVNode)(`input`,{id:g.value,ref_key:`endInputRef`,ref:w,type:`text`,class:`nb-date-picker__field`,value:Ie.value,placeholder:f.endPlaceholder||O.value,disabled:f.disabled,readonly:f.readonly,required:f.required,"aria-invalid":f.endError?!0:void 0,"aria-describedby":Re.value,onInput:a[1]||=e=>F(e),onFocus:I,onBlur:L,onKeydown:R},null,40,ie),(0,o.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__icon`,disabled:f.disabled||f.readonly,tabindex:`-1`,"aria-label":f.endValue?`Change end date, ${k(f.endValue)}`:`Choose end date`,onClick:H},[(0,o.createVNode)(e.t,{name:(0,o.unref)(c.regular),size:16},null,8,[`name`])],8,ae)],2)])):(0,o.createCommentVNode)(``,!0)]),_:1},8,[`gap`]),A.value?((0,o.openBlock)(),(0,o.createBlock)(r.t,{key:2,id:v.value,variant:A.value.variant,class:`nb-date-picker__message`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(A.value.text),1)]),_:1},8,[`id`,`variant`])):(0,o.createCommentVNode)(``,!0),j.value?((0,o.openBlock)(),(0,o.createBlock)(r.t,{key:3,id:Ae.value,variant:j.value.variant,class:`nb-date-picker__message`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(j.value.text),1)]),_:1},8,[`id`,`variant`])):(0,o.createCommentVNode)(``,!0),!A.value&&!j.value&&f.helper?((0,o.openBlock)(),(0,o.createBlock)(r.t,{key:4,id:_.value,variant:`helper`,class:`nb-date-picker__message`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(f.helper),1)]),_:1},8,[`id`])):(0,o.createCommentVNode)(``,!0)],64)):f.variant===`fluid`?((0,o.openBlock)(),(0,o.createBlock)(i.t,{key:1,dir:`row`,gap:f.type===`range`?`sm`:void 0,class:`nb-date-picker__fields`},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`div`,{class:(0,o.normalizeClass)([`nb-date-picker__input-wrapper nb-date-picker__input-wrapper--fluid`,tt.value])},[f.label||t.$slots.label||M.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,oe,[t.$slots.label?(0,o.renderSlot)(t.$slots,`label`,{key:0}):((0,o.openBlock)(),(0,o.createElementBlock)(`label`,{key:1,for:h.value,class:`nb-date-picker__inner-label`},[(0,o.createTextVNode)((0,o.toDisplayString)(f.label)+` `,1),f.required?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,ce,`*`)):(0,o.createCommentVNode)(``,!0)],8,se)),M.value?((0,o.openBlock)(),(0,o.createBlock)(r.t,{key:2,variant:M.value.variant,"icon-only":``,class:`nb-date-picker__inner-message`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(M.value.text),1)]),_:1},8,[`variant`])):(0,o.createCommentVNode)(``,!0)])):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`div`,le,[(0,o.createElementVNode)(`input`,(0,o.mergeProps)({id:h.value,ref_key:`inputRef`,ref:C},t.$attrs,{type:`text`,class:`nb-date-picker__field`,value:Fe.value,placeholder:f.placeholder||O.value,disabled:f.disabled,readonly:f.readonly,required:f.required,name:f.name,"aria-invalid":f.error?!0:void 0,onInput:a[2]||=e=>Ve(e),onFocus:I,onBlur:L,onKeydown:R}),null,16,ue),f.type===`simple`?(0,o.createCommentVNode)(``,!0):((0,o.openBlock)(),(0,o.createElementBlock)(`button`,{key:0,type:`button`,class:`nb-date-picker__icon`,disabled:f.disabled||f.readonly,tabindex:`-1`,"aria-label":f.modelValue?`Change date, ${k(f.modelValue)}`:`Choose date`,onClick:H},[(0,o.createVNode)(e.t,{name:(0,o.unref)(c.regular),size:16},null,8,[`name`])],8,de))])],2),f.type===`range`?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:0,class:(0,o.normalizeClass)([`nb-date-picker__input-wrapper nb-date-picker__input-wrapper--fluid`,$.value])},[ze.value||j.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,fe,[(0,o.createElementVNode)(`label`,{for:g.value,class:`nb-date-picker__inner-label`},[(0,o.createTextVNode)((0,o.toDisplayString)(ze.value)+` `,1),f.required?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,me,`*`)):(0,o.createCommentVNode)(``,!0)],8,pe),j.value?((0,o.openBlock)(),(0,o.createBlock)(r.t,{key:0,variant:j.value.variant,"icon-only":``,class:`nb-date-picker__inner-message`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(j.value.text),1)]),_:1},8,[`variant`])):(0,o.createCommentVNode)(``,!0)])):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`div`,he,[(0,o.createElementVNode)(`input`,{id:g.value,ref_key:`endInputRef`,ref:w,type:`text`,class:`nb-date-picker__field`,value:Ie.value,placeholder:f.endPlaceholder||O.value,disabled:f.disabled,readonly:f.readonly,required:f.required,"aria-invalid":f.endError?!0:void 0,onInput:a[3]||=e=>F(e),onFocus:I,onBlur:L,onKeydown:R},null,40,ge),(0,o.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__icon`,disabled:f.disabled||f.readonly,tabindex:`-1`,"aria-label":f.endValue?`Change end date, ${k(f.endValue)}`:`Choose end date`,onClick:H},[(0,o.createVNode)(e.t,{name:(0,o.unref)(c.regular),size:16},null,8,[`name`])],8,_e)])],2)):(0,o.createCommentVNode)(``,!0)]),_:3},8,[`gap`])):(0,o.createCommentVNode)(``,!0)],2),((0,o.openBlock)(),(0,o.createBlock)(o.Teleport,{to:`body`},[b.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,(0,o.mergeProps)({key:0,ref_key:`calendarRef`,ref:T,role:`dialog`,"aria-modal":`true`,"aria-label":f.label?`${f.label} calendar`:`Date picker`,class:`nb-date-picker__calendar`},(0,o.unref)(Oe),{style:Ne.value,onKeydown:Ue,onMousedown:a[4]||=(0,o.withModifiers)(()=>{},[`prevent`])}),[(0,o.createElementVNode)(`div`,ye,[(0,o.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__cal-nav`,"aria-label":`Previous year`,onClick:qe},[(0,o.createVNode)(e.t,{name:(0,o.unref)(l.regular),size:16},null,8,[`name`])]),(0,o.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__cal-nav`,"aria-label":`Previous month`,onClick:Ge},[(0,o.createVNode)(e.t,{name:(0,o.unref)(u.regular),size:16},null,8,[`name`])]),(0,o.createElementVNode)(`span`,{id:je.value,class:`nb-date-picker__cal-title`,"aria-live":`polite`},(0,o.toDisplayString)(Ye.value),9,be),(0,o.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__cal-nav`,"aria-label":`Next month`,onClick:Ke},[(0,o.createVNode)(e.t,{name:(0,o.unref)(s.regular),size:16},null,8,[`name`])]),(0,o.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__cal-nav`,"aria-label":`Next year`,onClick:Je},[(0,o.createVNode)(e.t,{name:(0,o.unref)(d.regular),size:16},null,8,[`name`])])]),(0,o.createElementVNode)(`table`,{role:`grid`,"aria-labelledby":je.value,class:`nb-date-picker__cal-table`},[(0,o.createElementVNode)(`thead`,null,[(0,o.createElementVNode)(`tr`,Se,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(Xe.value,e=>((0,o.openBlock)(),(0,o.createElementBlock)(`th`,{key:e.narrow,scope:`col`,class:`nb-date-picker__cal-weekday`,abbr:e.full},(0,o.toDisplayString)(e.narrow),9,Ce))),128))])]),(0,o.createElementVNode)(`tbody`,null,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)($e.value,(e,t)=>((0,o.openBlock)(),(0,o.createElementBlock)(`tr`,{key:t},[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e,e=>((0,o.openBlock)(),(0,o.createElementBlock)(`td`,{key:e.key,role:`gridcell`,"aria-selected":e.isSelected||void 0,"aria-disabled":e.isDisabled||void 0},[(0,o.createElementVNode)(`button`,{type:`button`,class:(0,o.normalizeClass)([`nb-date-picker__cal-day`,{"nb-date-picker__cal-day--outside":!e.inMonth,"nb-date-picker__cal-day--today":e.isToday,"nb-date-picker__cal-day--selected":e.isSelected,"nb-date-picker__cal-day--in-range":e.inRange,"nb-date-picker__cal-day--range-start":e.isRangeStart,"nb-date-picker__cal-day--range-end":e.isRangeEnd,"nb-date-picker__cal-day--disabled":e.isDisabled,"nb-date-picker__cal-day--focused":e.date===x.value}]),tabindex:e.date===x.value?0:-1,disabled:e.isDisabled,"aria-label":Pe(e.date),"data-date":e.date,onClick:t=>He(e.date)},(0,o.toDisplayString)(e.day),11,Te)],8,we))),128))]))),128))])],8,xe)],16,ve)):(0,o.createCommentVNode)(``,!0)]))],64))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),t=require(`./composables/useSurfaceLayer.composable.cjs`),n=require(`./utils/anchorPosition.helper.cjs`);let r=require(`vue`);var i=[`aria-label`,`aria-orientation`],a=`button, [role="button"], a[href], input, select, textarea, [tabindex]`,o=(0,r.defineComponent)({__name:`FloatingToolbar`,props:{open:{type:Boolean,default:!1},anchor:{default:null},placement:{default:`top`},gap:{default:8},label:{},orientation:{default:`horizontal`},teleportTo:{default:`body`}},emits:[`close`,`update:open`],setup(e,{expose:o,emit:s}){let c=e,l=s,{layerProps:u}=t.useSurfaceLayer({overlay:!0}),d=(0,r.ref)(null),f=(0,r.ref)(c.placement),p=(0,r.ref)({top:0,left:0}),m=(0,r.ref)(!1),h=(0,r.ref)(0),g=(0,r.computed)(()=>({top:`${p.value.top}px`,left:`${p.value.left}px`}));function _(e){return`getBoundingClientRect`in e?e.getBoundingClientRect():e}function v(){let e=d.value;if(!e||!c.anchor)return;let t=_(c.anchor),r=n.viewportSize();m.value=r.width>0&&r.height>0&&(t.top+t.height<0||t.top>r.height||t.left+t.width<0||t.left>r.width);let i=n.placeAnchored(t,{width:e.offsetWidth,height:e.offsetHeight},{side:c.placement,gap:c.gap,viewport:r});f.value=i.side,p.value={top:i.top,left:i.left}}function y(){let e=d.value;return e?Array.from(e.querySelectorAll(a)).filter(t=>!t.disabled&&t.getAttribute(`aria-hidden`)!==`true`&&t.closest(`[role="toolbar"]`)===e):[]}function b(){let e=y();e.length&&(h.value>=e.length&&(h.value=e.length-1),h.value<0&&(h.value=0),e.forEach((e,t)=>{let n=t===h.value?`0`:`-1`;e.getAttribute(`tabindex`)!==n&&e.setAttribute(`tabindex`,n)}))}function x(e){let t=y();t.length&&(h.value=(e+t.length)%t.length,b(),t[h.value].focus())}function S(e){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),l(`close`),l(`update:open`,!1);return}let t=e.target;if(t.closest(`input, textarea, select, [contenteditable="true"]`))return;let n=c.orientation===`vertical`,r=n?`ArrowUp`:`ArrowLeft`,i=n?`ArrowDown`:`ArrowRight`,a=y(),o=a.indexOf(t);o!==-1&&(e.key===i?(e.preventDefault(),x(o+1)):e.key===r?(e.preventDefault(),x(o-1)):e.key===`Home`?(e.preventDefault(),x(0)):e.key===`End`&&(e.preventDefault(),x(a.length-1)))}function C(e){let t=y().indexOf(e.target);t!==-1&&(h.value=t,b())}function w(e){e.target?.closest(`input, textarea, select, [contenteditable="true"]`)||e.preventDefault()}function T(){x(h.value)}let E;function D(){window.addEventListener(`resize`,v),window.addEventListener(`scroll`,v,!0),typeof MutationObserver<`u`&&d.value&&(E=new MutationObserver(()=>b()),E.observe(d.value,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`disabled`]}))}function O(){typeof window>`u`||(window.removeEventListener(`resize`,v),window.removeEventListener(`scroll`,v,!0),E?.disconnect(),E=void 0)}let k=(0,r.computed)(()=>c.open&&!!c.anchor);return(0,r.watch)(k,e=>{typeof window>`u`||(O(),e&&(h.value=0,(0,r.nextTick)(()=>{D(),b(),v(),requestAnimationFrame(v)})))},{immediate:!0}),(0,r.watch)(()=>[c.anchor,c.placement,c.gap],()=>{k.value&&(0,r.nextTick)(v)}),(0,r.onBeforeUnmount)(O),o({reposition:v,focus:T,el:d}),(t,n)=>((0,r.openBlock)(),(0,r.createBlock)(r.Teleport,{to:e.teleportTo},[e.open&&e.anchor?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,(0,r.mergeProps)({key:0,ref_key:`toolbarRef`,ref:d,class:[`nb-floating-toolbar`,`nb-floating-toolbar--${f.value}`,`nb-floating-toolbar--${e.orientation}`,{"nb-floating-toolbar--anchor-hidden":m.value}]},(0,r.unref)(u),{role:`toolbar`,"aria-label":e.label,"aria-orientation":e.orientation,style:g.value,onMousedown:w,onKeydown:S,onFocusin:C}),[(0,r.renderSlot)(t.$slots,`default`,{},void 0,!0)],16,i)):(0,r.createCommentVNode)(``,!0)],8,[`to`]))}}),s=e.t(o,[[`__scopeId`,`data-v-3aac4230`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-O4QQSku4.js";
|
|
2
|
-
import { useSurfaceLayer as t } from "./composables/useSurfaceLayer.composable.mjs";
|
|
3
|
-
import { placeAnchored as n, viewportSize as r } from "./utils/anchorPosition.helper.mjs";
|
|
4
|
-
import { Teleport as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, defineComponent as l, mergeProps as u, nextTick as d, onBeforeUnmount as f, openBlock as p, ref as m, renderSlot as h, unref as g, watch as _ } from "vue";
|
|
5
|
-
//#region src/components/FloatingToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var v = ["aria-label", "aria-orientation"], y = "button, [role=\"button\"], a[href], input, select, textarea, [tabindex]", b = /* @__PURE__ */ e(/* @__PURE__ */ l({
|
|
7
|
-
__name: "FloatingToolbar",
|
|
8
|
-
props: {
|
|
9
|
-
open: {
|
|
10
|
-
type: Boolean,
|
|
11
|
-
default: !1
|
|
12
|
-
},
|
|
13
|
-
anchor: { default: null },
|
|
14
|
-
placement: { default: "top" },
|
|
15
|
-
gap: { default: 8 },
|
|
16
|
-
label: {},
|
|
17
|
-
orientation: { default: "horizontal" },
|
|
18
|
-
teleportTo: { default: "body" }
|
|
19
|
-
},
|
|
20
|
-
emits: ["close", "update:open"],
|
|
21
|
-
setup(e, { expose: l, emit: b }) {
|
|
22
|
-
let x = e, S = b, { layerProps: C } = t({ overlay: !0 }), w = m(null), T = m(x.placement), E = m({
|
|
23
|
-
top: 0,
|
|
24
|
-
left: 0
|
|
25
|
-
}), D = m(!1), O = m(0), k = a(() => ({
|
|
26
|
-
top: `${E.value.top}px`,
|
|
27
|
-
left: `${E.value.left}px`
|
|
28
|
-
}));
|
|
29
|
-
function A(e) {
|
|
30
|
-
return "getBoundingClientRect" in e ? e.getBoundingClientRect() : e;
|
|
31
|
-
}
|
|
32
|
-
function j() {
|
|
33
|
-
let e = w.value;
|
|
34
|
-
if (!e || !x.anchor) return;
|
|
35
|
-
let t = A(x.anchor), i = r();
|
|
36
|
-
D.value = i.width > 0 && i.height > 0 && (t.top + t.height < 0 || t.top > i.height || t.left + t.width < 0 || t.left > i.width);
|
|
37
|
-
let a = n(t, {
|
|
38
|
-
width: e.offsetWidth,
|
|
39
|
-
height: e.offsetHeight
|
|
40
|
-
}, {
|
|
41
|
-
side: x.placement,
|
|
42
|
-
gap: x.gap,
|
|
43
|
-
viewport: i
|
|
44
|
-
});
|
|
45
|
-
T.value = a.side, E.value = {
|
|
46
|
-
top: a.top,
|
|
47
|
-
left: a.left
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
function M() {
|
|
51
|
-
let e = w.value;
|
|
52
|
-
return e ? Array.from(e.querySelectorAll(y)).filter((t) => !t.disabled && t.getAttribute("aria-hidden") !== "true" && t.closest("[role=\"toolbar\"]") === e) : [];
|
|
53
|
-
}
|
|
54
|
-
function N() {
|
|
55
|
-
let e = M();
|
|
56
|
-
e.length && (O.value >= e.length && (O.value = e.length - 1), O.value < 0 && (O.value = 0), e.forEach((e, t) => {
|
|
57
|
-
let n = t === O.value ? "0" : "-1";
|
|
58
|
-
e.getAttribute("tabindex") !== n && e.setAttribute("tabindex", n);
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
61
|
-
function P(e) {
|
|
62
|
-
let t = M();
|
|
63
|
-
t.length && (O.value = (e + t.length) % t.length, N(), t[O.value].focus());
|
|
64
|
-
}
|
|
65
|
-
function F(e) {
|
|
66
|
-
if (e.key === "Escape") {
|
|
67
|
-
e.preventDefault(), e.stopPropagation(), S("close"), S("update:open", !1);
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
let t = e.target;
|
|
71
|
-
if (t.closest("input, textarea, select, [contenteditable=\"true\"]")) return;
|
|
72
|
-
let n = x.orientation === "vertical", r = n ? "ArrowUp" : "ArrowLeft", i = n ? "ArrowDown" : "ArrowRight", a = M(), o = a.indexOf(t);
|
|
73
|
-
o !== -1 && (e.key === i ? (e.preventDefault(), P(o + 1)) : e.key === r ? (e.preventDefault(), P(o - 1)) : e.key === "Home" ? (e.preventDefault(), P(0)) : e.key === "End" && (e.preventDefault(), P(a.length - 1)));
|
|
74
|
-
}
|
|
75
|
-
function I(e) {
|
|
76
|
-
let t = M().indexOf(e.target);
|
|
77
|
-
t !== -1 && (O.value = t, N());
|
|
78
|
-
}
|
|
79
|
-
function L(e) {
|
|
80
|
-
e.target?.closest("input, textarea, select, [contenteditable=\"true\"]") || e.preventDefault();
|
|
81
|
-
}
|
|
82
|
-
function R() {
|
|
83
|
-
P(O.value);
|
|
84
|
-
}
|
|
85
|
-
let z;
|
|
86
|
-
function B() {
|
|
87
|
-
window.addEventListener("resize", j), window.addEventListener("scroll", j, !0), typeof MutationObserver < "u" && w.value && (z = new MutationObserver(() => N()), z.observe(w.value, {
|
|
88
|
-
childList: !0,
|
|
89
|
-
subtree: !0,
|
|
90
|
-
attributes: !0,
|
|
91
|
-
attributeFilter: ["disabled"]
|
|
92
|
-
}));
|
|
93
|
-
}
|
|
94
|
-
function V() {
|
|
95
|
-
typeof window > "u" || (window.removeEventListener("resize", j), window.removeEventListener("scroll", j, !0), z?.disconnect(), z = void 0);
|
|
96
|
-
}
|
|
97
|
-
let H = a(() => x.open && !!x.anchor);
|
|
98
|
-
return _(H, (e) => {
|
|
99
|
-
typeof window > "u" || (V(), e && (O.value = 0, d(() => {
|
|
100
|
-
B(), N(), j(), requestAnimationFrame(j);
|
|
101
|
-
})));
|
|
102
|
-
}, { immediate: !0 }), _(() => [
|
|
103
|
-
x.anchor,
|
|
104
|
-
x.placement,
|
|
105
|
-
x.gap
|
|
106
|
-
], () => {
|
|
107
|
-
H.value && d(j);
|
|
108
|
-
}), f(V), l({
|
|
109
|
-
reposition: j,
|
|
110
|
-
focus: R,
|
|
111
|
-
el: w
|
|
112
|
-
}), (t, n) => (p(), o(i, { to: e.teleportTo }, [e.open && e.anchor ? (p(), c("div", u({
|
|
113
|
-
key: 0,
|
|
114
|
-
ref_key: "toolbarRef",
|
|
115
|
-
ref: w,
|
|
116
|
-
class: [
|
|
117
|
-
"nb-floating-toolbar",
|
|
118
|
-
`nb-floating-toolbar--${T.value}`,
|
|
119
|
-
`nb-floating-toolbar--${e.orientation}`,
|
|
120
|
-
{ "nb-floating-toolbar--anchor-hidden": D.value }
|
|
121
|
-
]
|
|
122
|
-
}, g(C), {
|
|
123
|
-
role: "toolbar",
|
|
124
|
-
"aria-label": e.label,
|
|
125
|
-
"aria-orientation": e.orientation,
|
|
126
|
-
style: k.value,
|
|
127
|
-
onMousedown: L,
|
|
128
|
-
onKeydown: F,
|
|
129
|
-
onFocusin: I
|
|
130
|
-
}), [h(t.$slots, "default", {}, void 0, !0)], 16, v)) : s("", !0)], 8, ["to"]));
|
|
131
|
-
}
|
|
132
|
-
}), [["__scopeId", "data-v-3aac4230"]]);
|
|
133
|
-
//#endregion
|
|
134
|
-
export { b as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),n=require(`./Icon-C8R_r_In.cjs`),r=require(`./composables/useStableId.composable.cjs`),i=require(`./composables/useSurfaceLayer.composable.cjs`),a=require(`./utils/anchorPosition.helper.cjs`);let o=require(`vue`),s=require(`@nubisco/ui/icons/info`);s=e.n(s);var c=[`data-term`],l=[`aria-label`,`aria-expanded`,`aria-describedby`,`disabled`],u={key:0,class:`nb-info-hint--title`},d={class:`nb-info-hint--body`},f=(0,o.defineComponent)({__name:`InfoHint`,props:{text:{default:void 0},title:{default:void 0},term:{default:void 0},placement:{default:`top`},size:{default:14},icon:{default:void 0},label:{default:void 0},openDelay:{default:120},closeDelay:{default:140},teleportTo:{default:`body`},disabled:{type:Boolean,default:!1}},emits:[`open`,`close`,`activate`],setup(e,{expose:t,emit:f}){let p=e,m=(0,o.computed)(()=>p.icon??s),h=f,g=`${r.useStableId({})}-popover`,{layerProps:_}=i.useSurfaceLayer({overlay:!0}),v=(0,o.ref)(null),y=(0,o.ref)(null),b=(0,o.ref)(!1),x=(0,o.ref)(!1),S=(0,o.ref)(p.placement),C=(0,o.ref)({top:0,left:0,arrowOffset:50}),w,T,E=(0,o.computed)(()=>({top:`${C.value.top}px`,left:`${C.value.left}px`,"--nb-info-hint-arrow-offset":`${C.value.arrowOffset}%`}));function D(){clearTimeout(w),clearTimeout(T),w=void 0,T=void 0}function O(){let e=v.value,t=y.value;if(!e||!t)return;let n=a.placeAnchored(e.getBoundingClientRect(),{width:t.offsetWidth,height:t.offsetHeight},{side:p.placement,viewport:a.viewportSize()});S.value=n.side,C.value={top:n.top,left:n.left,arrowOffset:n.arrowOffset}}function k(){p.disabled||b.value||(D(),b.value=!0,h(`open`),(0,o.nextTick)(()=>{O(),requestAnimationFrame(O)}))}function A(){b.value&&(D(),b.value=!1,x.value=!1,h(`close`))}function j(){p.disabled||(clearTimeout(T),T=void 0,!b.value&&(w=setTimeout(k,p.openDelay)))}function M(){clearTimeout(w),w=void 0,!x.value&&(T=setTimeout(A,p.closeDelay))}function N(){if(!p.disabled){if(x.value){A();return}x.value=!0,k(),h(`activate`,p.term)}}function P(e){if(e.key===`Escape`){b.value&&(e.preventDefault(),A());return}}function F(){p.disabled||(clearTimeout(T),T=void 0,k())}function I(e){if(x.value)return;let t=e.relatedTarget;t&&y.value?.contains(t)||A()}function L(e){let t=e.target;t&&(v.value?.contains(t)||y.value?.contains(t)||A())}function R(e){e.key===`Escape`&&A()}return(0,o.watch)(b,e=>{typeof document>`u`||(e?(document.addEventListener(`pointerdown`,L,!0),document.addEventListener(`keydown`,R),window.addEventListener(`resize`,O),window.addEventListener(`scroll`,O,!0)):(document.removeEventListener(`pointerdown`,L,!0),document.removeEventListener(`keydown`,R),window.removeEventListener(`resize`,O),window.removeEventListener(`scroll`,O,!0)))}),(0,o.watch)(()=>p.disabled,e=>{e&&A()}),(0,o.onBeforeUnmount)(()=>{D(),!(typeof document>`u`)&&(document.removeEventListener(`pointerdown`,L,!0),document.removeEventListener(`keydown`,R),window.removeEventListener(`resize`,O),window.removeEventListener(`scroll`,O,!0))}),t({open:k,close:A,isOpen:b}),(t,r)=>((0,o.openBlock)(),(0,o.createElementBlock)(`span`,{class:`nb-info-hint`,"data-term":e.term||void 0},[(0,o.createElementVNode)(`button`,{ref_key:`triggerRef`,ref:v,type:`button`,class:(0,o.normalizeClass)([`nb-info-hint--trigger`,{"nb-info-hint--trigger-open":b.value}]),"aria-label":e.label??`More information`,"aria-expanded":b.value,"aria-describedby":b.value?g:void 0,disabled:e.disabled,onClick:(0,o.withModifiers)(N,[`stop`]),onMousedown:r[0]||=(0,o.withModifiers)(()=>{},[`stop`]),onPointerdown:r[1]||=(0,o.withModifiers)(()=>{},[`stop`]),onKeydown:(0,o.withModifiers)(P,[`stop`]),onMouseenter:j,onMouseleave:M,onFocus:F,onBlur:I},[(0,o.createVNode)(n.t,{name:m.value,size:e.size,weight:`regular`},null,8,[`name`,`size`])],42,l),((0,o.openBlock)(),(0,o.createBlock)(o.Teleport,{to:e.teleportTo},[b.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,(0,o.mergeProps)({key:0,id:g,ref_key:`popoverRef`,ref:y,class:[`nb-info-hint--popover`,`nb-info-hint--popover-${S.value}`]},(0,o.unref)(_),{role:`tooltip`,style:E.value,onClick:r[2]||=(0,o.withModifiers)(()=>{},[`stop`]),onMousedown:r[3]||=(0,o.withModifiers)(()=>{},[`stop`]),onPointerdown:r[4]||=(0,o.withModifiers)(()=>{},[`stop`]),onMouseenter:j,onMouseleave:M}),[e.title?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,u,(0,o.toDisplayString)(e.title),1)):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`div`,d,[(0,o.renderSlot)(t.$slots,`default`,{},()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.text),1)],!0)])],16)):(0,o.createCommentVNode)(``,!0)],8,[`to`]))],8,c))}}),p=t.t(f,[[`__scopeId`,`data-v-a16b2efc`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return p}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),t=require(`./Icon-C8R_r_In.cjs`);let n=require(`vue`),r=require(`@nubisco/ui/icons/pencil-simple`);var i=[`id`,`value`,`aria-label`,`placeholder`,`onKeydown`],a=[`id`,`aria-label`,`disabled`],o=(0,n.defineComponent)({__name:`InlineEdit`,props:{modelValue:{},label:{},placeholder:{default:void 0},size:{default:`md`},disabled:{type:Boolean,default:!1},id:{}},emits:[`update:modelValue`,`commit`,`cancel`],setup(e,{expose:o,emit:s}){let c=e,l=s,u=(0,n.ref)(!1),d=(0,n.ref)(null),f=``,p=(0,n.computed)(()=>({md:14,lg:16,xl:18})[c.size??`md`]);function m(){c.disabled||(f=c.modelValue,u.value=!0,(0,n.nextTick)(()=>{d.value?.focus(),d.value?.select()}))}function h(e){l(`update:modelValue`,e.target.value)}function g(){u.value&&(u.value=!1,l(`commit`,c.modelValue))}function _(){u.value&&(u.value=!1,l(`update:modelValue`,f),l(`cancel`))}return o({start:m}),(o,s)=>u.value?((0,n.openBlock)(),(0,n.createElementBlock)(`input`,{key:0,id:e.id,ref_key:`input`,ref:d,class:(0,n.normalizeClass)([`nb-inline-edit__input`,`nb-inline-edit__input--${e.size}`]),value:e.modelValue,"aria-label":e.label,placeholder:e.placeholder,onInput:h,onBlur:g,onKeydown:[(0,n.withKeys)((0,n.withModifiers)(g,[`prevent`]),[`enter`]),(0,n.withKeys)((0,n.withModifiers)(_,[`prevent`]),[`esc`])]},null,42,i)):((0,n.openBlock)(),(0,n.createElementBlock)(`button`,{key:1,id:e.id,type:`button`,class:(0,n.normalizeClass)([`nb-inline-edit__text`,[`nb-inline-edit__text--${e.size}`,{"is-disabled":e.disabled}]]),"aria-label":`${e.label}: ${e.modelValue||e.placeholder||`empty`}. Press Enter to edit.`,disabled:e.disabled,onClick:m},[(0,n.createElementVNode)(`span`,{class:(0,n.normalizeClass)({"nb-inline-edit__placeholder":!e.modelValue})},(0,n.toDisplayString)(e.modelValue||e.placeholder),3),e.disabled?(0,n.createCommentVNode)(``,!0):((0,n.openBlock)(),(0,n.createBlock)(t.t,{key:0,class:`nb-inline-edit__pencil`,name:(0,n.unref)(r.regular),size:p.value},null,8,[`name`,`size`]))],10,a))}}),s=e.t(o,[[`__scopeId`,`data-v-f27298c9`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
package/dist/Menu-CsA8dtMR.js
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { Teleport as e, Transition as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createVNode as o, defineComponent as s, nextTick as c, normalizeClass as l, normalizeStyle as u, onBeforeUnmount as d, openBlock as f, provide as p, reactive as m, ref as h, renderSlot as g, watch as _, withCtx as v } from "vue";
|
|
2
|
-
//#endregion
|
|
3
|
-
//#region src/components/Menu.vue
|
|
4
|
-
var y = /* @__PURE__ */ s({
|
|
5
|
-
__name: "Menu",
|
|
6
|
-
props: {
|
|
7
|
-
open: {
|
|
8
|
-
type: Boolean,
|
|
9
|
-
default: !1
|
|
10
|
-
},
|
|
11
|
-
size: { default: "md" },
|
|
12
|
-
minWidth: { default: 160 },
|
|
13
|
-
maxWidth: { default: 288 }
|
|
14
|
-
},
|
|
15
|
-
emits: ["close", "update:open"],
|
|
16
|
-
setup(s, { expose: y, emit: b }) {
|
|
17
|
-
let x = s, S = b, C = h(null), w = h(-1), T = m([]), E = n(() => ({
|
|
18
|
-
position: "fixed",
|
|
19
|
-
top: `${D.top}px`,
|
|
20
|
-
left: `${D.left}px`,
|
|
21
|
-
minWidth: `${x.minWidth}px`,
|
|
22
|
-
maxWidth: `${x.maxWidth}px`,
|
|
23
|
-
zIndex: "var(--nb-zindex-menu)"
|
|
24
|
-
})), D = m({
|
|
25
|
-
top: 0,
|
|
26
|
-
left: 0
|
|
27
|
-
});
|
|
28
|
-
function O(e) {
|
|
29
|
-
D.top = e.bottom, D.left = e.left;
|
|
30
|
-
}
|
|
31
|
-
function k(e, t) {
|
|
32
|
-
D.top = t, D.left = e;
|
|
33
|
-
}
|
|
34
|
-
function A() {
|
|
35
|
-
S("close"), S("update:open", !1);
|
|
36
|
-
}
|
|
37
|
-
function j(e) {
|
|
38
|
-
return T.includes(e) || T.push(e), T.indexOf(e);
|
|
39
|
-
}
|
|
40
|
-
function M(e) {
|
|
41
|
-
let t = T.indexOf(e);
|
|
42
|
-
t >= 0 && T.splice(t, 1);
|
|
43
|
-
}
|
|
44
|
-
let N = /* @__PURE__ */ new Set();
|
|
45
|
-
function P(e) {
|
|
46
|
-
N.add(e);
|
|
47
|
-
}
|
|
48
|
-
function F(e) {
|
|
49
|
-
N.delete(e);
|
|
50
|
-
}
|
|
51
|
-
p("nb-menu", {
|
|
52
|
-
size: x.size,
|
|
53
|
-
close: A,
|
|
54
|
-
highlightedIndex: w.value,
|
|
55
|
-
registerItem: j,
|
|
56
|
-
unregisterItem: M,
|
|
57
|
-
registerSurface: P,
|
|
58
|
-
unregisterSurface: F
|
|
59
|
-
});
|
|
60
|
-
function I() {
|
|
61
|
-
return C.value ? Array.from(C.value.querySelectorAll("[role=\"menuitem\"], [role=\"menuitemcheckbox\"], [role=\"menuitemradio\"]")).filter((e) => !e.closest(".nb-submenu")) : [];
|
|
62
|
-
}
|
|
63
|
-
function L(e) {
|
|
64
|
-
let t = I();
|
|
65
|
-
e >= 0 && e < t.length && (w.value = e, t[e].focus());
|
|
66
|
-
}
|
|
67
|
-
function R(e) {
|
|
68
|
-
if (e.key === "Escape") {
|
|
69
|
-
if (e.defaultPrevented) return;
|
|
70
|
-
e.preventDefault(), e.stopPropagation(), A();
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
let t = I();
|
|
74
|
-
if (!t.length) return;
|
|
75
|
-
let n = t.indexOf(document.activeElement);
|
|
76
|
-
if (n >= 0 && (w.value = n), e.key === "ArrowDown") {
|
|
77
|
-
e.preventDefault(), e.stopPropagation();
|
|
78
|
-
let n = w.value + 1;
|
|
79
|
-
for (; n < t.length && t[n]?.getAttribute("aria-disabled") === "true";) n++;
|
|
80
|
-
n < t.length && L(n);
|
|
81
|
-
} else if (e.key === "ArrowUp") {
|
|
82
|
-
e.preventDefault(), e.stopPropagation();
|
|
83
|
-
let n = w.value - 1;
|
|
84
|
-
for (; n >= 0 && t[n]?.getAttribute("aria-disabled") === "true";) n--;
|
|
85
|
-
n >= 0 && L(n);
|
|
86
|
-
} else e.key === "Tab" && A();
|
|
87
|
-
}
|
|
88
|
-
function z(e) {
|
|
89
|
-
let t = e.target;
|
|
90
|
-
if (!(!C.value || C.value.contains(t))) {
|
|
91
|
-
for (let e of N) if (e.contains(t)) return;
|
|
92
|
-
A();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
function B() {
|
|
96
|
-
if (!C.value) return;
|
|
97
|
-
let e = C.value.getBoundingClientRect();
|
|
98
|
-
e.right > window.innerWidth && (D.left = Math.max(8, window.innerWidth - e.width - 8)), e.bottom > window.innerHeight && (D.top = Math.max(8, window.innerHeight - e.height - 8));
|
|
99
|
-
let t = window.innerHeight - D.top - 8;
|
|
100
|
-
C.value.style.maxHeight = `${t}px`;
|
|
101
|
-
}
|
|
102
|
-
return _(() => x.open, (e) => {
|
|
103
|
-
e ? (w.value = -1, document.addEventListener("mousedown", z), c(() => {
|
|
104
|
-
B(), I().length > 0 && L(0);
|
|
105
|
-
})) : (w.value = -1, document.removeEventListener("mousedown", z));
|
|
106
|
-
}), d(() => {
|
|
107
|
-
document.removeEventListener("mousedown", z);
|
|
108
|
-
}), y({
|
|
109
|
-
setPosition: O,
|
|
110
|
-
setPositionXY: k,
|
|
111
|
-
close: A,
|
|
112
|
-
el: C
|
|
113
|
-
}), (n, c) => (f(), r(e, { to: "body" }, [o(t, { name: "nb-menu" }, {
|
|
114
|
-
default: v(() => [s.open ? (f(), a("ul", {
|
|
115
|
-
key: 0,
|
|
116
|
-
ref_key: "menuRef",
|
|
117
|
-
ref: C,
|
|
118
|
-
role: "menu",
|
|
119
|
-
class: l(["nb-menu", `nb-menu--${s.size}`]),
|
|
120
|
-
style: u(E.value),
|
|
121
|
-
onKeydown: R
|
|
122
|
-
}, [g(n.$slots, "default")], 38)) : i("", !0)]),
|
|
123
|
-
_: 3
|
|
124
|
-
})]));
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
//#endregion
|
|
128
|
-
export { y as t };
|
package/dist/Menu-Xt1MCf-q.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);let e=require(`vue`);var t=(0,e.defineComponent)({__name:`Menu`,props:{open:{type:Boolean,default:!1},size:{default:`md`},minWidth:{default:160},maxWidth:{default:288}},emits:[`close`,`update:open`],setup(t,{expose:n,emit:r}){let i=t,a=r,o=(0,e.ref)(null),s=(0,e.ref)(-1),c=(0,e.reactive)([]),l=(0,e.computed)(()=>({position:`fixed`,top:`${u.top}px`,left:`${u.left}px`,minWidth:`${i.minWidth}px`,maxWidth:`${i.maxWidth}px`,zIndex:`var(--nb-zindex-menu)`})),u=(0,e.reactive)({top:0,left:0});function d(e){u.top=e.bottom,u.left=e.left}function f(e,t){u.top=t,u.left=e}function p(){a(`close`),a(`update:open`,!1)}function m(e){return c.includes(e)||c.push(e),c.indexOf(e)}function h(e){let t=c.indexOf(e);t>=0&&c.splice(t,1)}let g=new Set;function _(e){g.add(e)}function v(e){g.delete(e)}(0,e.provide)(`nb-menu`,{size:i.size,close:p,highlightedIndex:s.value,registerItem:m,unregisterItem:h,registerSurface:_,unregisterSurface:v});function y(){return o.value?Array.from(o.value.querySelectorAll(`[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]`)).filter(e=>!e.closest(`.nb-submenu`)):[]}function b(e){let t=y();e>=0&&e<t.length&&(s.value=e,t[e].focus())}function x(e){if(e.key===`Escape`){if(e.defaultPrevented)return;e.preventDefault(),e.stopPropagation(),p();return}let t=y();if(!t.length)return;let n=t.indexOf(document.activeElement);if(n>=0&&(s.value=n),e.key===`ArrowDown`){e.preventDefault(),e.stopPropagation();let n=s.value+1;for(;n<t.length&&t[n]?.getAttribute(`aria-disabled`)===`true`;)n++;n<t.length&&b(n)}else if(e.key===`ArrowUp`){e.preventDefault(),e.stopPropagation();let n=s.value-1;for(;n>=0&&t[n]?.getAttribute(`aria-disabled`)===`true`;)n--;n>=0&&b(n)}else e.key===`Tab`&&p()}function S(e){let t=e.target;if(!(!o.value||o.value.contains(t))){for(let e of g)if(e.contains(t))return;p()}}function C(){if(!o.value)return;let e=o.value.getBoundingClientRect();e.right>window.innerWidth&&(u.left=Math.max(8,window.innerWidth-e.width-8)),e.bottom>window.innerHeight&&(u.top=Math.max(8,window.innerHeight-e.height-8));let t=window.innerHeight-u.top-8;o.value.style.maxHeight=`${t}px`}return(0,e.watch)(()=>i.open,t=>{t?(s.value=-1,document.addEventListener(`mousedown`,S),(0,e.nextTick)(()=>{C(),y().length>0&&b(0)})):(s.value=-1,document.removeEventListener(`mousedown`,S))}),(0,e.onBeforeUnmount)(()=>{document.removeEventListener(`mousedown`,S)}),n({setPosition:d,setPositionXY:f,close:p,el:o}),(n,r)=>((0,e.openBlock)(),(0,e.createBlock)(e.Teleport,{to:`body`},[(0,e.createVNode)(e.Transition,{name:`nb-menu`},{default:(0,e.withCtx)(()=>[t.open?((0,e.openBlock)(),(0,e.createElementBlock)(`ul`,{key:0,ref_key:`menuRef`,ref:o,role:`menu`,class:(0,e.normalizeClass)([`nb-menu`,`nb-menu--${t.size}`]),style:(0,e.normalizeStyle)(l.value),onKeydown:x},[(0,e.renderSlot)(n.$slots,`default`)],38)):(0,e.createCommentVNode)(``,!0)]),_:3})]))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
package/dist/Modal-Xa9TIGNi.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),n=require(`./Size.d-GBIblj2D.cjs`),r=require(`./Icon-C8R_r_In.cjs`),i=require(`./composables/useSurfaceLayer.composable.cjs`),a=require(`./Button-BZn2lmMA.cjs`),o=require(`./Grid-HifmWSUS.cjs`),s=require(`./composables/useScrollLock.composable.cjs`),c=require(`./composables/useFocusTrap.composable.cjs`);let l=require(`vue`),u=require(`@nubisco/ui/icons/x`);u=e.n(u);var d=200,f=[`[data-nb-confirm-floating]`,`.nb-select__dropdown`,`.nb-menu`,`.nb-date-picker__calendar`,`.nb-user-menu__panel`,`.nb-sidebar-menu-item__flyout`],p=new Set;function m(e){let t=e.trim();return t?(p.add(t),()=>{p.delete(t)}):()=>{}}function h(e=[]){return[...f,...p,...e].map(e=>e.trim()).filter(Boolean).join(`,`)}function g(e,t){if(!e)return;let n=`${t?0:200}ms`;e.style.transitionDuration=n;let r=e.parentElement;r instanceof HTMLElement&&(r.style.transitionDuration=n)}var _=[`role`,`aria-labelledby`,`aria-describedby`,`aria-busy`],v={key:0,class:`nb-modal--header`},y=[`disabled`,`aria-disabled`],b=[`tabindex`,`role`,`aria-labelledby`],x=(0,l.defineComponent)({__name:`Modal`,props:{open:{type:Boolean,default:!1},title:{default:void 0},size:{default:n.r.Medium},closeOnOverlay:{type:Boolean,default:!0},role:{default:`dialog`},labelledBy:{default:void 0},describedBy:{default:void 0},busy:{type:Boolean,default:!1},closeDisabled:{type:Boolean,default:!1},closeAppearance:{default:`corner`},closeOnEscape:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:!0},initialFocus:{type:[String,Function],default:void 0},floatingSelectors:{default:void 0}},emits:[`close`],setup(e,{expose:t,emit:n}){let d=e,f=n,p=(0,l.useSlots)(),m=(0,l.computed)(()=>!!p.header||!!d.title),g=`nb-modal-title-${(0,l.useId)()}`,x=(0,l.ref)(null),S=(0,l.ref)(null),{layerProps:C}=i.useSurfaceLayer({overlay:!0});function w(){d.closeOnOverlay&&f(`close`)}function T(){let e=d.initialFocus;return e?typeof e==`function`?e():x.value?.querySelector(e)??null:null}c.useFocusTrap({container:()=>x.value,active:()=>d.open&&d.trapFocus,initialFocus:T,floatingSelector:()=>h(d.floatingSelectors)});let E=!1;function D(){E||(E=!0,s.acquireScrollLock())}function O(){E&&(E=!1,s.releaseScrollLock())}let k=(0,l.ref)(!1);function A(){let e=S.value;if(!e)return;let t=e.scrollHeight-e.clientHeight;!k.value&&t>4?k.value=!0:k.value&&t<=0&&(k.value=!1)}let j=null,M=null;function N(){let e=S.value;e&&(P(),typeof ResizeObserver<`u`&&(j=new ResizeObserver(()=>A()),j.observe(e)),typeof MutationObserver<`u`&&(M=new MutationObserver(()=>A()),M.observe(e,{childList:!0,subtree:!0,characterData:!0})),A())}function P(){j?.disconnect(),j=null,M?.disconnect(),M=null}(0,l.watch)(()=>d.open,async e=>{e?D():O(),await(0,l.nextTick)(),e?N():(P(),k.value=!1)},{immediate:!0}),(0,l.onUnmounted)(()=>{O(),P()});function F(){let e=x.value;if(!e)return!1;let t=Array.from(document.querySelectorAll(`[aria-modal="true"]`));return t.length===0||t[t.length-1]===e}function I(e){e.key===`Escape`&&(!d.open||!d.closeOnEscape||d.closeDisabled||F()&&f(`close`))}return(0,l.onMounted)(()=>{document.addEventListener(`keydown`,I),d.open&&N()}),(0,l.onUnmounted)(()=>{document.removeEventListener(`keydown`,I)}),t({dialogEl:()=>x.value,bodyEl:()=>S.value}),(t,n)=>((0,l.openBlock)(),(0,l.createBlock)(l.Teleport,{to:`body`},[(0,l.createVNode)(l.Transition,{name:`nb-modal`},{default:(0,l.withCtx)(()=>[e.open?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,class:`nb-modal--overlay`,onClick:(0,l.withModifiers)(w,[`self`])},[(0,l.createElementVNode)(`div`,(0,l.mergeProps)({ref_key:`contentRef`,ref:x,class:[`nb-modal--content`,`nb-modal--content--${e.size}`]},(0,l.unref)(C),{role:e.role,"aria-modal":`true`,"aria-labelledby":e.labelledBy??(m.value?g:void 0),"aria-describedby":e.describedBy,"aria-busy":e.busy?`true`:void 0,tabindex:`-1`,onClick:n[2]||=(0,l.withModifiers)(()=>{},[`stop`])}),[m.value?((0,l.openBlock)(),(0,l.createElementBlock)(`header`,v,[(0,l.createElementVNode)(`span`,{id:g,class:`nb-modal--title`},[(0,l.renderSlot)(t.$slots,`header`,{},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.title),1)],!0)]),e.closeAppearance===`button`?((0,l.openBlock)(),(0,l.createBlock)(a.t,{key:0,class:`nb-modal--close-button`,size:`sm`,variant:`ghost`,icon:u,"aria-label":`Close`,disabled:e.closeDisabled,onClick:n[0]||=e=>f(`close`)},null,8,[`disabled`])):((0,l.openBlock)(),(0,l.createElementBlock)(`button`,{key:1,class:`nb-modal--close`,"aria-label":`Close`,disabled:e.closeDisabled,"aria-disabled":e.closeDisabled?`true`:void 0,onClick:n[1]||=e=>f(`close`)},[(0,l.createVNode)(r.t,{name:(0,l.unref)(u.regular)},null,8,[`name`])],8,y))])):(0,l.createCommentVNode)(``,!0),(0,l.createElementVNode)(`main`,{ref_key:`bodyRef`,ref:S,class:`nb-modal--body`,tabindex:k.value?0:void 0,role:k.value?`region`:void 0,"aria-labelledby":k.value?e.labelledBy??(m.value?g:void 0):void 0},[(0,l.renderSlot)(t.$slots,`default`,{},void 0,!0)],8,b),t.$slots.footer?((0,l.openBlock)(),(0,l.createBlock)(o.t,{key:1,is:`footer`,justify:`end`,class:`nb-modal--footer`,distributed:``},{default:(0,l.withCtx)(()=>[(0,l.renderSlot)(t.$slots,`footer`,{},void 0,!0)]),_:3})):(0,l.createCommentVNode)(``,!0)],16,_)])):(0,l.createCommentVNode)(``,!0)]),_:3})]))}}),S=t.t(x,[[`__scopeId`,`data-v-fe02ca11`]]);Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return S}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./Icon-C8R_r_In.cjs`),n=require(`./EmptyState-u1iAtZUB.cjs`),r=require(`./Button-BZn2lmMA.cjs`),i=require(`./Spinner-Cwlskvjj.cjs`),a=require(`./Skeleton-DEzKdU7W.cjs`),o=require(`./NotificationCenterItem-pWiBpKMc.cjs`);let s=require(`vue`),c=require(`@nubisco/ui/icons/warning-circle`),l=require(`@nubisco/ui/icons/bell`);l=e.n(l);var u={key:0,class:`nb-notification-center__badge`,"aria-hidden":`true`},d=[`aria-describedby`,`aria-busy`],f={class:`nb-notification-center__header`},p={class:`nb-notification-center__sr`,role:`status`},m={class:`nb-notification-center__stale-text`},ee={class:`nb-notification-center__sr`},te=[`tabindex`],ne={key:4,class:`nb-notification-center__empty`},re={key:5,class:`nb-notification-center__footer`},h=new Set,g=8,_=8,v=96,y=88,b=200;function ie(e,{align:t,side:n,width:r,maxHeight:i,viewport:a}){let o=e.left+e.width;if(n===`right`&&a.width-o-g-_>=r){let n=e.top+e.height,r=t===`end`?n-_:a.height-e.top-_,s=Math.max(y+v,r),c=Math.min(i+v,s),l=Math.max(y,Math.min(i,s-v));return t===`end`?{top:Math.max(_,n-c),bottom:Math.max(_,a.height-n),left:o+g,side:`right`,maxListHeight:l}:{top:Math.max(_,Math.min(e.top,a.height-_-c)),left:o+g,side:`right`,maxListHeight:l}}let s=t===`start`?e.left:e.left+e.width-r,c=Math.min(Math.max(s,_),Math.max(_,a.width-r-_)),l=e.top+e.height,u=a.height-l-g-_,d=e.top-g-_,f=u<b&&d>u?`top`:`bottom`,p=Math.max(y,f===`top`?d:u),m=Math.max(y,Math.min(i,p-v)),ee=Math.min(i+v,p);return{top:f===`top`?Math.max(_,e.top-g-ee):l+g,left:c,side:f,maxListHeight:m}}function ae(e,t){return e.left<=t.width&&e.left+e.width>=0&&e.top<=t.height&&e.top+e.height>=0}var x=(0,s.defineComponent)({__name:`NotificationCenter`,props:{items:{default:()=>[]},unreadCount:{default:void 0},itemCount:{default:void 0},open:{type:Boolean,default:void 0},label:{default:`Notifications`},markAllLabel:{default:`Mark all as read`},markAllPendingLabel:{default:`Marking all as read`},markAllPending:{type:Boolean,default:!1},emptyTitle:{default:`No notifications`},emptyDescription:{default:`New activity shows up here.`},loadingLabel:{default:`Loading notifications`},loading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorTitle:{default:`Could not load notifications`},errorDescription:{default:`The request failed. Nothing has been lost.`},errorStaleLabel:{default:`These may be out of date.`},retryLabel:{default:`Try again`},showRetry:{type:Boolean,default:!0},maxCount:{default:99},width:{default:360},maxHeight:{default:384},align:{default:`end`},side:{default:`vertical`},showMarkAll:{type:Boolean,default:!0},interactive:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},closeOnNavigate:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},icon:{default:void 0},locale:{default:void 0},unreadLabel:{default:`Unread`},readLabel:{default:`Read`},formatUnread:{type:Function,default:e=>e===1?`1 unread`:`${e} unread`}},emits:[`update:open`,`open`,`close`,`select`,`mark-all-read`,`retry`],setup(e,{expose:g,emit:_}){let v=e,y=(0,s.computed)(()=>v.icon??l),b=_,x=(0,s.useSlots)(),S=`nb-notification-center-${(0,s.useId)()}`,oe=`${S}-title`,se=`${S}-trigger`,C=`${S}-error`,w=(0,s.ref)(null),T=(0,s.ref)(null),E=(0,s.ref)(null),D=(0,s.ref)(null),ce=(0,s.ref)(!1),O=(0,s.computed)(()=>v.open===void 0?ce.value:v.open),k=(0,s.computed)(()=>typeof v.unreadCount==`number`?Math.max(0,v.unreadCount):v.items.filter(e=>!e.read).length),le=(0,s.computed)(()=>k.value>v.maxCount?`${v.maxCount}+`:String(k.value)),ue=(0,s.computed)(()=>k.value>0?`${v.label}, ${v.formatUnread(k.value)}`:v.label),de=(0,s.computed)(()=>{if(typeof v.itemCount==`number`)return Math.max(0,v.itemCount);if(!x.default)return v.items.length}),fe=(0,s.computed)(()=>(de.value??0)>0),A=(0,s.computed)(()=>{if(v.loading)return`loading`;let e=de.value;return v.error&&(e===void 0||e===0)?`error`:e===void 0||e>0?`list`:`empty`}),pe=(0,s.computed)(()=>v.error&&!v.loading&&A.value===`list`&&fe.value);(0,s.ref)(!1),(0,s.watch)(()=>[O.value,!!x.default,v.itemCount],([e,t,n])=>{},{immediate:!0});function j(){b(`retry`)}let M=(0,s.computed)(()=>({id:se,"aria-haspopup":`dialog`,"aria-expanded":O.value?`true`:`false`,"aria-controls":O.value?S:void 0,"aria-label":ue.value,disabled:v.disabled||void 0})),N=(0,s.computed)(()=>({type:`button`,disabled:k.value===0&&!v.markAllPending,"aria-disabled":v.markAllPending?`true`:void 0,"aria-busy":v.markAllPending?`true`:void 0,onClick:Oe})),me=(0,s.computed)(()=>pe.value||A.value===`error`?C:void 0);function P(e){if(!e){E.value=null;return}let t=e instanceof HTMLElement?e:e.$el;E.value=t instanceof HTMLElement?t:null}let F=(0,s.ref)({top:0,left:0,side:`bottom`,maxListHeight:v.maxHeight});function I(){return{width:window.innerWidth,height:window.innerHeight}}function L(){let e=w.value?.getBoundingClientRect();e&&(F.value=ie(e,{align:v.align,side:v.side,width:v.width,maxHeight:v.maxHeight,viewport:I()}))}let he=(0,s.computed)(()=>F.value.bottom===void 0?{top:`${Math.round(F.value.top)}px`,left:`${Math.round(F.value.left)}px`,width:`${v.width}px`}:{bottom:`${Math.round(F.value.bottom)}px`,left:`${Math.round(F.value.left)}px`,width:`${v.width}px`}),R=(0,s.computed)(()=>({maxHeight:`${Math.round(F.value.maxListHeight)}px`})),ge=(0,s.computed)(()=>({"nb-notification-center__panel--start":v.align===`start`,"nb-notification-center__panel--above":F.value.side===`top`,"nb-notification-center__panel--beside":F.value.side===`right`}));function z(e){v.open===void 0&&(ce.value=e),b(`update:open`,e)}function B(){v.disabled||O.value||(L(),z(!0),b(`open`))}function V(e={}){if(!O.value)return;let t=D.value?.contains(document.activeElement);z(!1),b(`close`),(e.restoreFocus??t)&&(0,s.nextTick)(H)}function H(){let e=E.value;if(e?.isConnected){e.focus();return}(w.value?.querySelector(J))?.focus()}function U(){O.value?V({restoreFocus:!0}):B()}let W=(0,s.ref)(0),_e=new Set([`button`,`link`,`menuitem`,`option`]);function ve(e){if(e.tagName===`BUTTON`)return!e.hasAttribute(`disabled`);if(e.tagName===`A`)return e.hasAttribute(`href`);let t=e.getAttribute(`role`);return t!==null&&_e.has(t)}function G(){return D.value?Array.from(D.value.querySelectorAll(`[data-nb-notification-item]`)).filter(e=>!!ve(e)):[]}let ye=(0,s.ref)(void 0);function be(e){let t=T.value;ye.value=t&&t.childElementCount>0&&e.length===0?0:void 0}function K(e){let t=G();be(t),t.length&&(W.value=Math.min(Math.max(e,0),t.length-1),t.forEach((e,t)=>{e.setAttribute(`tabindex`,t===W.value?`0`:`-1`)}))}function q(e){let t=G();if(!t.length)return!1;let n=Math.min(Math.max(e,0),t.length-1);return K(n),t[n]?.focus(),!0}function xe(e){let t=e.target?.closest(`[data-nb-notification-item]`);if(!t)return;let n=G().indexOf(t);n>=0&&K(n)}let J=`a[href]:not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex="0"]`;function Se(e){return!!e?.closest?.(`input, textarea, select, [contenteditable=""], [contenteditable="true"]`)}function Ce(e){let t=G(),n=e.target?.closest(`[data-nb-notification-item]`),r=n?t.indexOf(n):-1;if(e.key===`Escape`){if(!we(e))return;e.preventDefault(),e.stopPropagation(),V({restoreFocus:!0});return}if(e.key===`Tab`){Te(e);return}if(!Se(e.target))switch(e.key){case`ArrowDown`:q(r<0?0:r+1)&&e.preventDefault();break;case`ArrowUp`:q(r<0?t.length-1:r-1)&&e.preventDefault();break;case`Home`:r>=0&&(e.preventDefault(),q(0));break;case`End`:r>=0&&(e.preventDefault(),q(t.length-1));break;default:break}}function we(e){if(e.defaultPrevented)return!1;let t=(e.target??document.activeElement)?.closest?.(`[aria-modal="true"]`);return!(t&&t!==D.value)}function Te(e){let t=D.value;if(!t)return;let n=Array.from(t.querySelectorAll(J)),r=document.activeElement,i=n[0],a=n[n.length-1],o=!n.length||r===i||!t.contains(r),c=!n.length||r===a;if(e.shiftKey?!o:!c)return;e.preventDefault();let l=e.shiftKey?E.value:Ee();V({restoreFocus:!1}),(0,s.nextTick)(()=>{l?.isConnected?l.focus():H()})}function Ee(){let e=E.value;if(!e)return null;let t=Array.from(document.querySelectorAll(J)).filter(e=>!D.value?.contains(e)).filter(e=>e.tabIndex>=0),n=t.indexOf(e);return n<0?null:t[n+1]??null}function De(e,t){b(`select`,e,t),v.closeOnSelect&&V({restoreFocus:!1})}function Y(e){if(!x.default)return;let t=e.target?.closest(`[data-nb-notification-item]`);if(t&&ve(t)){if(e.type===`keydown`){let n=e.key;if(n!==`Enter`&&n!==` `||t.tagName===`BUTTON`||t.tagName===`A`)return;e.preventDefault()}b(`select`,null,e),v.closeOnSelect&&V({restoreFocus:!1})}}function Oe(){v.markAllPending||b(`mark-all-read`)}function ke(e){let t=e.target;w.value?.contains(t)||D.value?.contains(t)||V({restoreFocus:!1})}function Ae(e){e.key===`Escape`&&(D.value?.contains(document.activeElement)||we(e)&&V({restoreFocus:w.value?.contains(document.activeElement)??!1}))}let X=0;function Z(){!O.value||X||(X=requestAnimationFrame(()=>{X=0,Me()}))}function je(){X&&=(cancelAnimationFrame(X),0)}function Me(){if(!O.value)return;let e=w.value?.getBoundingClientRect();if(e&&!ae(e,I())){V({restoreFocus:!1});return}L()}function Q(){v.closeOnNavigate&&V({restoreFocus:!1})}function Ne(){return window.navigation}function Pe(){document.addEventListener(`mousedown`,ke),document.addEventListener(`keydown`,Ae),window.addEventListener(`resize`,Z),window.addEventListener(`scroll`,Z,!0),window.addEventListener(`popstate`,Q),window.addEventListener(`hashchange`,Q),Ne()?.addEventListener(`navigate`,Q)}function Fe(){je(),document.removeEventListener(`mousedown`,ke),document.removeEventListener(`keydown`,Ae),window.removeEventListener(`resize`,Z),window.removeEventListener(`scroll`,Z,!0),window.removeEventListener(`popstate`,Q),window.removeEventListener(`hashchange`,Q),Ne()?.removeEventListener(`navigate`,Q)}let $=()=>V({restoreFocus:!1});return(0,s.watch)(O,e=>{if(e){for(let e of[...h])e!==$&&e();h.add($),Pe(),(0,s.nextTick)(()=>{L(),K(0),q(0)||D.value?.focus()})}else h.delete($),Fe(),W.value=0}),(0,s.watch)(()=>[v.items.length,A.value],()=>{O.value&&(0,s.nextTick)(()=>K(W.value))}),(0,s.onBeforeUnmount)(()=>{Fe(),h.delete($);let e=D.value;e?.isConnected&&e.remove()}),g({show:B,close:V,toggle:U,isOpen:O,unreadCount:k}),(l,h)=>((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{ref_key:`rootRef`,ref:w,class:`nb-notification-center`},[(0,s.renderSlot)(l.$slots,`trigger`,{open:O.value,toggle:U,show:B,close:V,unreadCount:k.value,badge:le.value,panelId:S,triggerProps:M.value,setTriggerRef:P},()=>[(0,s.createElementVNode)(`button`,(0,s.mergeProps)({ref:P,type:`button`,class:[`nb-notification-center__trigger`,{"nb-notification-center__trigger--active":O.value}]},M.value,{onClick:U}),[(0,s.createVNode)(t.t,{name:y.value,size:18},null,8,[`name`]),k.value>0?((0,s.openBlock)(),(0,s.createElementBlock)(`span`,u,(0,s.toDisplayString)(le.value),1)):(0,s.createCommentVNode)(``,!0)],16)]),((0,s.openBlock)(),(0,s.createBlock)(s.Teleport,{to:`body`},[(0,s.createVNode)(s.Transition,{name:`nb-notification-center-pop`},{default:(0,s.withCtx)(()=>[O.value?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{key:0,id:S,ref_key:`panelRef`,ref:D,class:(0,s.normalizeClass)([`nb-notification-center__panel`,ge.value]),style:(0,s.normalizeStyle)(he.value),role:`dialog`,tabindex:`-1`,"aria-labelledby":oe,"aria-describedby":me.value,"aria-busy":e.loading?`true`:void 0,onKeydown:Ce,onFocusin:xe},[(0,s.createElementVNode)(`div`,f,[(0,s.createElementVNode)(`h2`,{id:oe,class:`nb-notification-center__title`},(0,s.toDisplayString)(e.label),1),(0,s.renderSlot)(l.$slots,`header-start`,{close:V,unreadCount:k.value}),(0,s.renderSlot)(l.$slots,`header-actions`,{close:V,unreadCount:k.value,markAllRead:Oe,markAllPending:e.markAllPending,markAllProps:N.value,markAllText:e.markAllPending?e.markAllPendingLabel:e.markAllLabel},()=>[e.showMarkAll?((0,s.openBlock)(),(0,s.createElementBlock)(`button`,(0,s.mergeProps)({key:0,class:`nb-notification-center__mark-all`},N.value),[e.markAllPending?((0,s.openBlock)(),(0,s.createBlock)(i.t,{key:0,size:`xs`,tone:`inherit`,decorative:``})):(0,s.createCommentVNode)(``,!0),(0,s.createTextVNode)(` `+(0,s.toDisplayString)(e.markAllPending?e.markAllPendingLabel:e.markAllLabel),1)],16)):(0,s.createCommentVNode)(``,!0)])]),(0,s.createElementVNode)(`span`,p,(0,s.toDisplayString)(e.markAllPending?e.markAllPendingLabel:``),1),pe.value?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{key:0,id:C,class:`nb-notification-center__stale`,role:`status`},[(0,s.createVNode)(t.t,{name:(0,s.unref)(c.regular),size:14,"aria-hidden":`true`},null,8,[`name`]),(0,s.createElementVNode)(`span`,m,(0,s.toDisplayString)(e.errorStaleLabel),1),e.showRetry?((0,s.openBlock)(),(0,s.createElementBlock)(`button`,{key:0,type:`button`,class:`nb-notification-center__retry`,onClick:j},(0,s.toDisplayString)(e.retryLabel),1)):(0,s.createCommentVNode)(``,!0)])):(0,s.createCommentVNode)(``,!0),A.value===`loading`?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{key:1,class:`nb-notification-center__loading`,role:`status`,style:(0,s.normalizeStyle)(R.value)},[(0,s.createElementVNode)(`span`,ee,(0,s.toDisplayString)(e.loadingLabel),1),((0,s.openBlock)(),(0,s.createElementBlock)(s.Fragment,null,(0,s.renderList)(3,e=>(0,s.createVNode)(a.t,{key:e,variant:`text`,type:`body-sm`,lines:2,"last-line-width":`60%`})),64))],4)):A.value===`error`?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{key:2,id:C,class:`nb-notification-center__error`,role:`alert`},[(0,s.renderSlot)(l.$slots,`error`,{retry:j},()=>[(0,s.createVNode)(n.t,{size:`sm`,kind:`error`,title:e.errorTitle,description:e.errorDescription},(0,s.createSlots)({_:2},[e.showRetry?{name:`actions`,fn:(0,s.withCtx)(()=>[(0,s.createVNode)(r.t,{size:`sm`,variant:`secondary`,onClick:j},{default:(0,s.withCtx)(()=>[(0,s.createTextVNode)((0,s.toDisplayString)(e.retryLabel),1)]),_:1})]),key:`0`}:void 0]),1032,[`title`,`description`])])])):A.value===`list`?((0,s.openBlock)(),(0,s.createElementBlock)(`ul`,{key:3,ref_key:`listRef`,ref:T,class:`nb-notification-center__list`,role:`list`,tabindex:ye.value,style:(0,s.normalizeStyle)(R.value),onClick:Y,onKeydown:Y},[(0,s.renderSlot)(l.$slots,`default`,{close:V,items:e.items},()=>[((0,s.openBlock)(!0),(0,s.createElementBlock)(s.Fragment,null,(0,s.renderList)(e.items,t=>((0,s.openBlock)(),(0,s.createBlock)(o.t,{key:t.id,title:t.title,body:t.body,time:t.time,"time-label":t.timeLabel,read:t.read,variant:t.variant??`neutral`,icon:t.icon,href:t.href,interactive:t.interactive??e.interactive,locale:e.locale,"unread-label":e.unreadLabel,"read-label":e.readLabel,onSelect:e=>De(t,e)},null,8,[`title`,`body`,`time`,`time-label`,`read`,`variant`,`icon`,`href`,`interactive`,`locale`,`unread-label`,`read-label`,`onSelect`]))),128))])],44,te)):A.value===`empty`?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,ne,[(0,s.renderSlot)(l.$slots,`empty`,{},()=>[(0,s.createVNode)(n.t,{size:`sm`,icon:y.value,title:e.emptyTitle,description:e.emptyDescription},null,8,[`icon`,`title`,`description`])])])):(0,s.createCommentVNode)(``,!0),l.$slots.footer?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,re,[(0,s.renderSlot)(l.$slots,`footer`,{close:V})])):(0,s.createCommentVNode)(``,!0)],46,d)):(0,s.createCommentVNode)(``,!0)]),_:3})]))],512))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return x}});
|