@nubisco/ui 5.53.0 → 5.55.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--XeLRz2P.js → AccordionItem-BY-p8UkV.js} +1 -1
- package/dist/{AccordionItem-BYSH6dZK.cjs → AccordionItem-p0mYXIj8.cjs} +1 -1
- package/dist/{ActionGroup-CkwZEnUN.js → ActionGroup-CjRSKyOa.js} +2 -2
- package/dist/{ActionGroup-McCtSDV8.cjs → ActionGroup-DIMZhC7N.cjs} +1 -1
- package/dist/AiLabel-BDccQ2iQ.js +242 -0
- package/dist/AiLabel-jRrBTu6c.cjs +1 -0
- package/dist/{AiProvider-DN3DecBN.cjs → AiProvider-CGB9EiSf.cjs} +1 -1
- package/dist/{AiProvider-lGUifyvk.js → AiProvider-CMbPWtU-.js} +4 -4
- package/dist/{BackToTop-BWj2PURK.js → BackToTop-BDFb1y3c.js} +1 -1
- package/dist/{BackToTop-CbGWaDiv.cjs → BackToTop-R6yiw3lt.cjs} +1 -1
- package/dist/{Banner-DksCkGVd.js → Banner-BjnbX4C3.js} +1 -1
- package/dist/{Banner-DsiuPzPh.cjs → Banner-C-mikJ5n.cjs} +1 -1
- package/dist/{BatchActions-iHu14Sfz.js → BatchActions-Kr2S6CJI.js} +2 -2
- package/dist/{BatchActions-xnTXMU6B.cjs → BatchActions-jfvfpZeT.cjs} +1 -1
- package/dist/{BlueprintControls-COcm1KWW.js → BlueprintControls-Bt4KoDp5.js} +1 -1
- package/dist/{BlueprintControls-3Lc3BcAk.cjs → BlueprintControls-zX5yxOB1.cjs} +1 -1
- package/dist/{Board-B2v-oPUr.js → Board-C3_cXRl6.js} +177 -176
- package/dist/Board-D6A-irdx.cjs +1 -0
- package/dist/{BottomPanel-cNzWs1-8.cjs → BottomPanel-C_u39INJ.cjs} +1 -1
- package/dist/{BottomPanel-C6r_9aLy.js → BottomPanel-CkEc9gvb.js} +1 -1
- package/dist/{Breadcrumbs-D1pYElI6.cjs → Breadcrumbs-0rRFiO31.cjs} +1 -1
- package/dist/{Breadcrumbs-B2SMDfCA.js → Breadcrumbs-DqagVknq.js} +2 -2
- package/dist/{Briefing-Cqw3zBQO.cjs → Briefing-B-O-9bhN.cjs} +1 -1
- package/dist/{Briefing-W7gtZwdT.js → Briefing-DNH-707q.js} +1 -1
- package/dist/{BriefingDestination-CeClIu61.js → BriefingDestination-BjNteNgh.js} +1 -1
- package/dist/{BriefingDestination-CtsWFs9U.cjs → BriefingDestination-Cs1y3z_5.cjs} +1 -1
- package/dist/Button-CGIbF1e-.cjs +1 -0
- package/dist/{Button-CxJMKPpw.js → Button-DmJ_J3UO.js} +55 -53
- package/dist/{ButtonSet-D7ieqb8C.js → ButtonSet-Cg1ixzOK.js} +1 -1
- package/dist/{ButtonSet-C2Z5sYSv.cjs → ButtonSet-SziuuT6_.cjs} +1 -1
- package/dist/{Calendar-BmC3wBlS.js → Calendar-fVDg_EgD.js} +1 -1
- package/dist/{Calendar-EO2vU4ls.cjs → Calendar-fsZN4OIr.cjs} +1 -1
- package/dist/{ChatMessage-DYv7Vniv.cjs → ChatMessage-B45Xhl8x.cjs} +1 -1
- package/dist/{ChatMessage-DSeGKAOq.js → ChatMessage-BDOdvI4h.js} +1 -1
- package/dist/{ChatThread-CCtckadF.cjs → ChatThread-B7F1r4t4.cjs} +1 -1
- package/dist/{ChatThread-D70zpB0f.js → ChatThread-DqvsnVOr.js} +3 -3
- package/dist/{CloseButton-F7W1E8oX.cjs → CloseButton-Bdk7rJ8E.cjs} +1 -1
- package/dist/{CloseButton-BMJBwHvG.js → CloseButton-CAPfd6yf.js} +1 -1
- package/dist/CommandPalette-BaRqoURY.cjs +1 -0
- package/dist/CommandPalette-DWv1UV8r.js +294 -0
- package/dist/{Confirm-Sl4LWoSK.cjs → Confirm-B5vMzPbN.cjs} +1 -1
- package/dist/{Confirm-BLXSK-OZ.js → Confirm-C4lT-6HD.js} +3 -3
- package/dist/{ContentSwitcher-CQvxg6RC.cjs → ContentSwitcher-DYxJZdcm.cjs} +1 -1
- package/dist/{ContentSwitcher-DuHRX4Y6.js → ContentSwitcher-NpFxiGbz.js} +1 -1
- package/dist/{CopyButton-DMuuBwJc.cjs → CopyButton-D-cnpfOJ.cjs} +1 -1
- package/dist/{CopyButton-CfEOWedU.js → CopyButton-MOJj3pS0.js} +1 -1
- package/dist/{DataTable-7GkgyPz9.js → DataTable-CcwD0PSJ.js} +3 -3
- package/dist/{DataTable-D8y7LUof.cjs → DataTable-xEw-NvHM.cjs} +1 -1
- package/dist/{DatePicker-BkHd2fJW.js → DatePicker-3pCNky8d.js} +235 -231
- package/dist/DatePicker-BrMicYUx.cjs +1 -0
- package/dist/{FileUploader-VBJtI2xh.js → FileUploader-CcGdRBxp.js} +1 -1
- package/dist/{FileUploader-CPTj5s_M.cjs → FileUploader-CcieVEGZ.cjs} +1 -1
- package/dist/FloatingToolbar-BV-iGNxe.js +120 -0
- package/dist/FloatingToolbar-C8xB4BzH.cjs +1 -0
- package/dist/{ImagePicker-D8qyyjVv.cjs → ImagePicker-5qPI77Jo.cjs} +1 -1
- package/dist/{ImagePicker-BkZVENEg.js → ImagePicker-BnHg403Q.js} +2 -2
- package/dist/InfoHint-CdluaJqE.cjs +1 -0
- package/dist/InfoHint-zMuSw_99.js +182 -0
- package/dist/{InlineLoading-CA0_IT29.cjs → InlineLoading-CqGrNWHf.cjs} +1 -1
- package/dist/{InlineLoading-Cknqq0vv.js → InlineLoading-_j2KKhNQ.js} +1 -1
- package/dist/{LogView-u_QhvV__.js → LogView-BLa9W5S7.js} +2 -2
- package/dist/{LogView-JjJVH_NA.cjs → LogView-BNztzJri.cjs} +1 -1
- package/dist/Menu-CWxBEMC4.js +193 -0
- package/dist/Menu-D0TerdRm.cjs +1 -0
- package/dist/{MenuBarItem-yr5aizl3.js → MenuBarItem-BYh4YWR4.js} +1 -1
- package/dist/{MenuBarItem-DlnIAhRw.cjs → MenuBarItem-DTOqacvg.cjs} +1 -1
- package/dist/Modal-CmGFLEo4.cjs +1 -0
- package/dist/{Modal-DaXgWyZN.js → Modal-DwL90AoV.js} +74 -70
- package/dist/NotificationCenter-EMlV-oPh.cjs +1 -0
- package/dist/NotificationCenter-YZnPMH7c.js +591 -0
- package/dist/{NumberInput-B7_EP2yg.js → NumberInput-B91ahziS.js} +1 -1
- package/dist/{NumberInput-CHWFFpDv.cjs → NumberInput-DLPSNgsr.cjs} +1 -1
- package/dist/{OverflowMenu-DXJ8waZo.js → OverflowMenu-DliuDrTK.js} +2 -2
- package/dist/{OverflowMenu-CWgdicDN.cjs → OverflowMenu-DuRgj1DU.cjs} +1 -1
- package/dist/{PageHeader-KKxiyfqh.cjs → PageHeader-BoEdR_T5.cjs} +1 -1
- package/dist/{PageHeader-Bypc30sW.js → PageHeader-c6117xYf.js} +1 -1
- package/dist/{Pagination-DTsfPCOs.cjs → Pagination-B3lmxggo.cjs} +1 -1
- package/dist/{Pagination-CjOtISav.js → Pagination-DwAc-4d9.js} +2 -2
- package/dist/{Search-xsC4Tm0d.js → Search-Bwdxxe29.js} +2 -2
- package/dist/{Search-CKXtAyrU.cjs → Search-DIZ1Ea45.cjs} +1 -1
- package/dist/Select-CDs-7QtW.js +619 -0
- package/dist/Select-CJqwMI69.cjs +1 -0
- package/dist/{Shell-BWLjIdD0.cjs → Shell-BZslT2aj.cjs} +1 -1
- package/dist/{Shell-DZfaTUo3.js → Shell-CRmhoU2H.js} +2 -2
- package/dist/{ShellPanel-K4vyQYQM.js → ShellPanel-C4vQJmRI.js} +1 -1
- package/dist/{ShellPanel-ColJQNUK.cjs → ShellPanel-DUBq5BL6.cjs} +1 -1
- package/dist/{SidebarCollapseToggle-DraqbhwM.js → SidebarCollapseToggle-C38R19gG.js} +1 -1
- package/dist/{SidebarCollapseToggle-CABmF-PC.cjs → SidebarCollapseToggle-DOck3Txy.cjs} +1 -1
- package/dist/SidebarMenuItem-DzJ_R2__.cjs +1 -0
- package/dist/SidebarMenuItem-E410HTei.js +302 -0
- package/dist/{Slider-BLkYlDHi.js → Slider-B6QXQMqb.js} +1 -1
- package/dist/{Slider-DGTE-3wW.cjs → Slider-B7m_luyq.cjs} +1 -1
- package/dist/Spinner-BlzVODzE.js +161 -0
- package/dist/Spinner-Bpfgl-mN.cjs +1 -0
- package/dist/{Stat-BCvXYr-z.cjs → Stat-BByeMKkT.cjs} +1 -1
- package/dist/{Stat-No3RhGB3.js → Stat-DWliDbWE.js} +1 -1
- package/dist/Submenu-BkHGYo7X.js +168 -0
- package/dist/Submenu-CCQnBpln.cjs +1 -0
- package/dist/{SuggestionList-Cxy4jjjd.cjs → SuggestionList-C61Dj6en.cjs} +1 -1
- package/dist/{SuggestionList-Dv4yQAi-.js → SuggestionList-D48Ojcf3.js} +1 -1
- package/dist/{TableOfContents-WDCjtpK6.js → TableOfContents-CeZX4dH0.js} +1 -1
- package/dist/{TableOfContents-BzG-BsKk.cjs → TableOfContents-D9FCu6gN.cjs} +1 -1
- package/dist/{TextInput-HEjIGR6p.js → TextInput-BeqDf1R7.js} +1 -1
- package/dist/{TextInput-CKSRFb0q.cjs → TextInput-SJ34hD2Y.cjs} +1 -1
- package/dist/{Toast-DHjc9WQU.cjs → Toast-CN5Jzkr5.cjs} +1 -1
- package/dist/{Toast-DxZ2xjeq.js → Toast-DIf2XRCa.js} +2 -2
- package/dist/Toaster-Dwjm0bsR.js +285 -0
- package/dist/Toaster-aJJvxlEr.cjs +1 -0
- package/dist/{UserMenu-C54sf0xb.js → UserMenu-BTihjCKC.js} +95 -91
- package/dist/UserMenu-CHkbByFS.cjs +1 -0
- package/dist/{Video-BFik9HZq.js → Video-Agby8uRA.js} +1 -1
- package/dist/{Video-Cnqsjo4n.cjs → Video-B93sRbBU.cjs} +1 -1
- package/dist/{Walkthrough-JqWDEe00.js → Walkthrough-BqGB1yaX.js} +64 -60
- package/dist/Walkthrough-sGAypY5d.cjs +1 -0
- package/dist/all.cjs +1 -1
- package/dist/all.mjs +212 -211
- package/dist/components/AccordionItem.cjs +1 -1
- package/dist/components/AccordionItem.mjs +1 -1
- package/dist/components/ActionGroup.cjs +1 -1
- package/dist/components/ActionGroup.mjs +1 -1
- package/dist/components/AiLabel.cjs +1 -1
- package/dist/components/AiLabel.mjs +1 -1
- package/dist/components/AiLabel.vue.d.ts.map +1 -1
- package/dist/components/AiProvider.cjs +1 -1
- package/dist/components/AiProvider.mjs +1 -1
- package/dist/components/BackToTop.cjs +1 -1
- package/dist/components/BackToTop.mjs +1 -1
- package/dist/components/Banner.cjs +1 -1
- package/dist/components/Banner.mjs +1 -1
- package/dist/components/BatchActions.cjs +1 -1
- package/dist/components/BatchActions.mjs +1 -1
- package/dist/components/BlueprintControls.cjs +1 -1
- package/dist/components/BlueprintControls.mjs +1 -1
- package/dist/components/Board.cjs +1 -1
- package/dist/components/Board.mjs +1 -1
- 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/Briefing.cjs +1 -1
- package/dist/components/Briefing.mjs +1 -1
- package/dist/components/BriefingDestination.cjs +1 -1
- package/dist/components/BriefingDestination.mjs +1 -1
- package/dist/components/Button.cjs +1 -1
- package/dist/components/Button.context.d.ts +21 -0
- package/dist/components/Button.context.d.ts.map +1 -0
- package/dist/components/Button.d.ts +10 -0
- package/dist/components/Button.mjs +1 -1
- package/dist/components/Button.vue.d.ts +1 -0
- package/dist/components/Button.vue.d.ts.map +1 -1
- package/dist/components/ButtonSet.cjs +1 -1
- package/dist/components/ButtonSet.mjs +1 -1
- package/dist/components/Calendar.cjs +1 -1
- package/dist/components/Calendar.mjs +1 -1
- package/dist/components/ChatMessage.cjs +1 -1
- package/dist/components/ChatMessage.mjs +1 -1
- package/dist/components/ChatThread.cjs +1 -1
- package/dist/components/ChatThread.mjs +1 -1
- package/dist/components/CloseButton.cjs +1 -1
- package/dist/components/CloseButton.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/ContentSwitcher.cjs +1 -1
- package/dist/components/ContentSwitcher.mjs +1 -1
- package/dist/components/CopyButton.cjs +1 -1
- package/dist/components/CopyButton.mjs +1 -1
- package/dist/components/DataTable.cjs +1 -1
- package/dist/components/DataTable.mjs +1 -1
- package/dist/components/DatePicker.cjs +1 -1
- package/dist/components/DatePicker.mjs +1 -1
- package/dist/components/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/FileUploader.cjs +1 -1
- package/dist/components/FileUploader.mjs +1 -1
- package/dist/components/FloatingToolbar.cjs +1 -1
- package/dist/components/FloatingToolbar.mjs +1 -1
- package/dist/components/FloatingToolbar.vue.d.ts.map +1 -1
- package/dist/components/ImagePicker.cjs +1 -1
- package/dist/components/ImagePicker.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/InlineLoading.cjs +1 -1
- package/dist/components/InlineLoading.mjs +1 -1
- package/dist/components/LogView.cjs +1 -1
- package/dist/components/LogView.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/MenuBarItem.cjs +1 -1
- package/dist/components/MenuBarItem.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.mjs +1 -1
- package/dist/components/NotificationCenter.vue.d.ts.map +1 -1
- package/dist/components/NumberInput.cjs +1 -1
- package/dist/components/NumberInput.mjs +1 -1
- package/dist/components/OverflowMenu.cjs +1 -1
- package/dist/components/OverflowMenu.mjs +1 -1
- package/dist/components/PageHeader.cjs +1 -1
- package/dist/components/PageHeader.mjs +1 -1
- package/dist/components/Pagination.cjs +1 -1
- package/dist/components/Pagination.mjs +1 -1
- package/dist/components/Search.cjs +1 -1
- package/dist/components/Search.mjs +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/ShellPanel.cjs +1 -1
- package/dist/components/ShellPanel.mjs +1 -1
- package/dist/components/SidebarCollapseToggle.cjs +1 -1
- package/dist/components/SidebarCollapseToggle.mjs +1 -1
- package/dist/components/SidebarMenuItem.cjs +1 -1
- package/dist/components/SidebarMenuItem.mjs +1 -1
- package/dist/components/SidebarMenuItem.vue.d.ts.map +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/Spinner.mjs +1 -1
- package/dist/components/Spinner.vue.d.ts.map +1 -1
- package/dist/components/Stat.cjs +1 -1
- package/dist/components/Stat.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/SuggestionList.cjs +1 -1
- package/dist/components/SuggestionList.mjs +1 -1
- package/dist/components/TableOfContents.cjs +1 -1
- package/dist/components/TableOfContents.mjs +1 -1
- package/dist/components/TextInput.cjs +1 -1
- package/dist/components/TextInput.mjs +1 -1
- package/dist/components/Toast.cjs +1 -1
- package/dist/components/Toast.mjs +1 -1
- package/dist/components/Toaster.cjs +1 -1
- package/dist/components/Toaster.mjs +1 -1
- package/dist/components/Toaster.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/Video.cjs +1 -1
- package/dist/components/Video.mjs +1 -1
- package/dist/components/Walkthrough.cjs +1 -1
- package/dist/components/Walkthrough.mjs +1 -1
- package/dist/components/Walkthrough.vue.d.ts.map +1 -1
- package/dist/composables/useConfirm.composable.cjs +1 -1
- package/dist/composables/useConfirm.composable.mjs +2 -2
- package/dist/composables/useTeleportReady.composable.cjs +1 -0
- package/dist/composables/useTeleportReady.composable.d.ts +30 -0
- package/dist/composables/useTeleportReady.composable.d.ts.map +1 -0
- package/dist/composables/useTeleportReady.composable.mjs +11 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +156 -155
- package/dist/main-BMIeIxGV.cjs +4 -0
- package/dist/{main-hHSQ2Z9E.js → main-BXz7vG2i.js} +203 -193
- package/dist/main.d.ts +19 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/styles/AiLabel.css +1 -1
- package/dist/styles/Button.css +1 -1
- package/dist/styles/FloatingToolbar.css +1 -1
- package/dist/styles/InfoHint.css +1 -1
- package/dist/styles/Modal.css +1 -1
- package/dist/styles/SidebarMenuItem.css +1 -1
- package/dist/styles/Spinner.css +1 -1
- package/dist/styles/Toaster.css +1 -1
- package/dist/styles/Walkthrough.css +1 -1
- package/dist/ui.css +9 -9
- package/package.json +1 -1
- package/dist/AiLabel-BwGuSf92.cjs +0 -1
- package/dist/AiLabel-CT7tpXv4.js +0 -240
- package/dist/Board-C43JjSsH.cjs +0 -1
- package/dist/Button-5ClGtoaz.cjs +0 -1
- package/dist/CommandPalette-DSE40a5L.cjs +0 -1
- package/dist/CommandPalette-DjkNy4l7.js +0 -290
- package/dist/DatePicker-CeDO01NZ.cjs +0 -1
- package/dist/FloatingToolbar-BikX_AsP.js +0 -116
- package/dist/FloatingToolbar-DWVY8Fxo.cjs +0 -1
- package/dist/InfoHint-BEzkNQTM.cjs +0 -1
- package/dist/InfoHint-BlHxrTw6.js +0 -178
- package/dist/Menu-7EgnchVu.js +0 -189
- package/dist/Menu-Bs2Co1sl.cjs +0 -1
- package/dist/Modal-CRbvPpfy.cjs +0 -1
- package/dist/NotificationCenter-D0PKt3fk.js +0 -587
- package/dist/NotificationCenter-fmSEnZDX.cjs +0 -1
- package/dist/Select-CPztC5IV.cjs +0 -1
- package/dist/Select-CqLa55kO.js +0 -615
- package/dist/SidebarMenuItem-DQRQtqrp.js +0 -300
- package/dist/SidebarMenuItem-Dwk7vKN5.cjs +0 -1
- package/dist/Spinner-DYFhiTB1.js +0 -160
- package/dist/Spinner-j13gRoUF.cjs +0 -1
- package/dist/Submenu-BDs-yAqv.js +0 -164
- package/dist/Submenu-BLjx2kWl.cjs +0 -1
- package/dist/Toaster-C227oHXu.js +0 -284
- package/dist/Toaster-IS3DUaZt.cjs +0 -1
- package/dist/UserMenu-BnGiKwDE.cjs +0 -1
- package/dist/Walkthrough-DHgb972k.cjs +0 -1
- package/dist/main-Dr-OZ97R.cjs +0 -4
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
2
|
-
import { t } from "./Icon-B2tiGiqZ.js";
|
|
3
|
-
import { useNbStrings as n } from "./composables/useNbStrings.composable.mjs";
|
|
4
|
-
import { useRouterLink as r } from "./composables/useRouterLink.composable.mjs";
|
|
5
|
-
import { t as ee } from "./Avatar-ZG-WROXx.js";
|
|
6
|
-
import { hasRenderableContent as i } from "./utils/slotContent.helper.mjs";
|
|
7
|
-
import { Fragment as a, Teleport as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, defineComponent as f, inject as p, mergeProps as te, nextTick as ne, normalizeClass as m, normalizeStyle as h, onBeforeUnmount as g, openBlock as _, provide as v, ref as y, renderSlot as b, resolveDynamicComponent as x, toDisplayString as S, toRef as C, unref as re, useSlots as ie, vShow as ae, watch as w, withCtx as T, withDirectives as oe } from "vue";
|
|
8
|
-
import { regular as se } from "@nubisco/ui/icons/caret-right";
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region src/components/SidebarVariantScope.vue
|
|
11
|
-
var ce = /* @__PURE__ */ f({
|
|
12
|
-
__name: "SidebarVariantScope",
|
|
13
|
-
props: { variant: {} },
|
|
14
|
-
setup(e) {
|
|
15
|
-
return v("nb-shell-sidebar-variant", C(e, "variant")), (e, t) => b(e.$slots, "default");
|
|
16
|
-
}
|
|
17
|
-
}), le = { class: "nb-sidebar-menu-item__label" }, ue = {
|
|
18
|
-
key: 0,
|
|
19
|
-
class: "nb-sidebar-menu-item__live",
|
|
20
|
-
"data-nb-sidebar-live": ""
|
|
21
|
-
}, de = { class: "nb-sidebar-menu-item__live-text" }, fe = ["title"], pe = {
|
|
22
|
-
key: 0,
|
|
23
|
-
class: "nb-sidebar-menu-item__children",
|
|
24
|
-
role: "group"
|
|
25
|
-
}, me = { class: "nb-sidebar-menu-item__flyout-header" }, he = { class: "nb-sidebar-menu-item__flyout-label" }, ge = ["title"], _e = ["aria-label"], E = /* @__PURE__ */ e(/* @__PURE__ */ f({
|
|
26
|
-
__name: "SidebarMenuItem",
|
|
27
|
-
props: {
|
|
28
|
-
label: {},
|
|
29
|
-
icon: { default: void 0 },
|
|
30
|
-
picture: { default: void 0 },
|
|
31
|
-
to: { default: void 0 },
|
|
32
|
-
href: { default: void 0 },
|
|
33
|
-
active: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: !1
|
|
36
|
-
},
|
|
37
|
-
disabled: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: !1
|
|
40
|
-
},
|
|
41
|
-
defaultExpanded: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: !1
|
|
44
|
-
},
|
|
45
|
-
badge: { default: void 0 },
|
|
46
|
-
badgeVariant: { default: "neutral" },
|
|
47
|
-
live: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
default: !1
|
|
50
|
-
},
|
|
51
|
-
liveLabel: { default: void 0 }
|
|
52
|
-
},
|
|
53
|
-
emits: ["click"],
|
|
54
|
-
setup(e, { emit: f }) {
|
|
55
|
-
let v = e, C = f, E = p("nb-shell-sidebar-variant", y("verbose")), D = s(() => E.value), O = ie(), k = s(() => {
|
|
56
|
-
let e = v.badge;
|
|
57
|
-
if (e === void 0) return;
|
|
58
|
-
let t = typeof e == "number" ? e : Number(String(e).trim());
|
|
59
|
-
if (!(!Number.isFinite(t) || String(e).trim() === "")) return t > 99 ? "99+" : String(t);
|
|
60
|
-
}), A = n(), j = s(() => v.liveLabel ?? A.value.sidebarMenuItemLive), M = s(() => {
|
|
61
|
-
let e = v.badge === void 0 ? v.label : `${v.label} (${v.badge})`;
|
|
62
|
-
return v.live ? `${e}, ${j.value}` : e;
|
|
63
|
-
}), N = s(() => {
|
|
64
|
-
let e = O.default?.();
|
|
65
|
-
return e ? i(e) : !1;
|
|
66
|
-
}), P = y(v.defaultExpanded || v.active), F = r(), I = s(() => {
|
|
67
|
-
if (typeof v.to == "string") return v.to;
|
|
68
|
-
if (v.href) return v.href;
|
|
69
|
-
}), L = s(() => N.value), R = s(() => v.to != null && !L.value && !!F.value), z = s(() => L.value ? "button" : R.value ? F.value : I.value ? "a" : "button"), ve = s(() => z.value === "a" ? { href: I.value } : {});
|
|
70
|
-
function ye(e) {
|
|
71
|
-
if (v.disabled) {
|
|
72
|
-
e.preventDefault();
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
if (L.value && D.value === "verbose") {
|
|
76
|
-
P.value = !P.value;
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
L.value && D.value === "compact" && we(e), C("click", e);
|
|
80
|
-
}
|
|
81
|
-
let B = y(null), V = y(null), H = y(!1), U = y(!1), W = y({}), G = null;
|
|
82
|
-
function K() {
|
|
83
|
-
if (D.value !== "compact") return;
|
|
84
|
-
G &&= (clearTimeout(G), null);
|
|
85
|
-
let e = J();
|
|
86
|
-
if (!e) return;
|
|
87
|
-
let t = e.getBoundingClientRect();
|
|
88
|
-
W.value = {
|
|
89
|
-
top: `${t.top}px`,
|
|
90
|
-
left: `${t.right + 8}px`
|
|
91
|
-
}, H.value = !0;
|
|
92
|
-
}
|
|
93
|
-
function q() {
|
|
94
|
-
U.value || (G && clearTimeout(G), G = setTimeout(() => {
|
|
95
|
-
H.value = !1, G = null;
|
|
96
|
-
}, 120));
|
|
97
|
-
}
|
|
98
|
-
function be() {
|
|
99
|
-
K();
|
|
100
|
-
}
|
|
101
|
-
function xe() {
|
|
102
|
-
q();
|
|
103
|
-
}
|
|
104
|
-
function Se() {
|
|
105
|
-
G &&= (clearTimeout(G), null);
|
|
106
|
-
}
|
|
107
|
-
function Ce() {
|
|
108
|
-
q();
|
|
109
|
-
}
|
|
110
|
-
function J() {
|
|
111
|
-
let e = B.value;
|
|
112
|
-
return e ? e instanceof HTMLElement ? e : e.$el ?? null : null;
|
|
113
|
-
}
|
|
114
|
-
function Y(e = !1) {
|
|
115
|
-
G &&= (clearTimeout(G), null), H.value = !1, U.value = !1, e && J()?.focus();
|
|
116
|
-
}
|
|
117
|
-
function X() {
|
|
118
|
-
let e = V.value;
|
|
119
|
-
return e ? Array.from(e.querySelectorAll("[role=\"menuitem\"]")).filter((e) => !e.hasAttribute("disabled") && e.getAttribute("aria-disabled") !== "true" && !e.closest("[style*=\"display: none\"]")) : [];
|
|
120
|
-
}
|
|
121
|
-
async function Z(e) {
|
|
122
|
-
K(), U.value = !0, e && (await ne(), X()[0]?.focus());
|
|
123
|
-
}
|
|
124
|
-
function we(e) {
|
|
125
|
-
if (H.value && U.value) {
|
|
126
|
-
Y();
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
Z(e.detail === 0);
|
|
130
|
-
}
|
|
131
|
-
function Q(e) {
|
|
132
|
-
!L.value || D.value !== "compact" || (e.key === "ArrowRight" || e.key === "ArrowDown" ? (e.preventDefault(), Z(!0)) : e.key === "Escape" && H.value && (e.preventDefault(), Y(!0)));
|
|
133
|
-
}
|
|
134
|
-
function Te(e) {
|
|
135
|
-
let t = X(), n = t.indexOf(document.activeElement);
|
|
136
|
-
switch (e.key) {
|
|
137
|
-
case "Escape":
|
|
138
|
-
case "ArrowLeft":
|
|
139
|
-
e.preventDefault(), e.stopPropagation(), Y(!0);
|
|
140
|
-
return;
|
|
141
|
-
case "ArrowDown":
|
|
142
|
-
e.preventDefault(), t[(n + 1) % t.length]?.focus();
|
|
143
|
-
return;
|
|
144
|
-
case "ArrowUp":
|
|
145
|
-
e.preventDefault(), t[(n - 1 + t.length) % t.length]?.focus();
|
|
146
|
-
return;
|
|
147
|
-
case "Home":
|
|
148
|
-
e.preventDefault(), t[0]?.focus();
|
|
149
|
-
return;
|
|
150
|
-
case "End":
|
|
151
|
-
e.preventDefault(), t[t.length - 1]?.focus();
|
|
152
|
-
return;
|
|
153
|
-
case "Tab":
|
|
154
|
-
Y(!0);
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
function Ee(e) {
|
|
159
|
-
let t = e.relatedTarget;
|
|
160
|
-
t && (V.value?.contains(t) || J()?.contains(t) || Y());
|
|
161
|
-
}
|
|
162
|
-
function De(e) {
|
|
163
|
-
let t = e.target?.closest("[role=\"menuitem\"]");
|
|
164
|
-
t && !t.hasAttribute("aria-expanded") && Y();
|
|
165
|
-
}
|
|
166
|
-
function $(e) {
|
|
167
|
-
let t = e.target;
|
|
168
|
-
t && (V.value?.contains(t) || J()?.contains(t) || Y());
|
|
169
|
-
}
|
|
170
|
-
return w(H, (e) => {
|
|
171
|
-
typeof document > "u" || (e ? document.addEventListener("pointerdown", $, !0) : document.removeEventListener("pointerdown", $, !0));
|
|
172
|
-
}), w(D, () => Y()), g(() => {
|
|
173
|
-
G && clearTimeout(G), typeof document < "u" && document.removeEventListener("pointerdown", $, !0);
|
|
174
|
-
}), (n, r) => (_(), u("li", {
|
|
175
|
-
class: m(["nb-sidebar-menu-item", [`nb-sidebar-menu-item--${D.value}`]]),
|
|
176
|
-
role: "none",
|
|
177
|
-
onMouseenter: be,
|
|
178
|
-
onMouseleave: xe
|
|
179
|
-
}, [
|
|
180
|
-
(_(), c(x(z.value), te({
|
|
181
|
-
ref_key: "rowRef",
|
|
182
|
-
ref: B,
|
|
183
|
-
class: ["nb-sidebar-menu-item__row", {
|
|
184
|
-
"nb-sidebar-menu-item__row--active": e.active,
|
|
185
|
-
"nb-sidebar-menu-item__row--disabled": e.disabled,
|
|
186
|
-
"nb-sidebar-menu-item__row--expandable": N.value && D.value === "verbose",
|
|
187
|
-
"nb-sidebar-menu-item__row--compact": D.value === "compact"
|
|
188
|
-
}],
|
|
189
|
-
type: z.value === "button" ? "button" : void 0,
|
|
190
|
-
to: R.value ? e.to : void 0
|
|
191
|
-
}, ve.value, {
|
|
192
|
-
disabled: z.value === "button" && !N.value && e.disabled || void 0,
|
|
193
|
-
"aria-disabled": e.disabled || void 0,
|
|
194
|
-
"aria-expanded": N.value ? D.value === "verbose" ? P.value : H.value : void 0,
|
|
195
|
-
"aria-haspopup": N.value && D.value === "compact" ? "menu" : void 0,
|
|
196
|
-
"aria-label": D.value === "compact" ? M.value : void 0,
|
|
197
|
-
role: "menuitem",
|
|
198
|
-
onClick: ye,
|
|
199
|
-
onKeydown: Q
|
|
200
|
-
}), {
|
|
201
|
-
default: T(() => [
|
|
202
|
-
e.picture === void 0 ? e.icon ? (_(), c(t, {
|
|
203
|
-
key: 1,
|
|
204
|
-
class: "nb-sidebar-menu-item__icon",
|
|
205
|
-
name: e.icon,
|
|
206
|
-
size: D.value === "compact" ? 18 : 16
|
|
207
|
-
}, null, 8, ["name", "size"])) : l("", !0) : (_(), c(ee, {
|
|
208
|
-
key: 0,
|
|
209
|
-
class: "nb-sidebar-menu-item__icon nb-sidebar-menu-item__picture",
|
|
210
|
-
name: e.label,
|
|
211
|
-
picture: e.picture,
|
|
212
|
-
size: D.value === "compact" ? 18 : 16,
|
|
213
|
-
decorative: ""
|
|
214
|
-
}, null, 8, [
|
|
215
|
-
"name",
|
|
216
|
-
"picture",
|
|
217
|
-
"size"
|
|
218
|
-
])),
|
|
219
|
-
D.value === "verbose" ? (_(), u(a, { key: 2 }, [
|
|
220
|
-
d("span", le, S(e.label), 1),
|
|
221
|
-
e.live ? (_(), u("span", ue, [d("span", de, S(j.value), 1)])) : l("", !0),
|
|
222
|
-
e.badge === void 0 ? l("", !0) : (_(), u("span", {
|
|
223
|
-
key: 1,
|
|
224
|
-
class: m(["nb-sidebar-menu-item__badge", [`nb-sidebar-menu-item__badge--${e.badgeVariant}`]])
|
|
225
|
-
}, S(e.badge), 3)),
|
|
226
|
-
N.value ? (_(), c(t, {
|
|
227
|
-
key: 2,
|
|
228
|
-
class: m(["nb-sidebar-menu-item__caret", { "nb-sidebar-menu-item__caret--expanded": P.value }]),
|
|
229
|
-
name: re(se),
|
|
230
|
-
size: "sm"
|
|
231
|
-
}, null, 8, ["class", "name"])) : l("", !0)
|
|
232
|
-
], 64)) : k.value === void 0 ? e.badge === void 0 ? l("", !0) : (_(), u("span", {
|
|
233
|
-
key: 4,
|
|
234
|
-
class: m(["nb-sidebar-menu-item__badge-dot", [`nb-sidebar-menu-item__badge-dot--${e.badgeVariant}`]]),
|
|
235
|
-
title: String(e.badge)
|
|
236
|
-
}, null, 10, fe)) : (_(), u("span", {
|
|
237
|
-
key: 3,
|
|
238
|
-
class: m(["nb-sidebar-menu-item__badge-count", [`nb-sidebar-menu-item__badge-count--${e.badgeVariant}`]]),
|
|
239
|
-
"aria-hidden": "true"
|
|
240
|
-
}, S(k.value), 3)),
|
|
241
|
-
e.live && D.value === "compact" ? (_(), u("span", {
|
|
242
|
-
key: 5,
|
|
243
|
-
class: m(["nb-sidebar-menu-item__live nb-sidebar-menu-item__live--compact", { "nb-sidebar-menu-item__live--below": e.badge !== void 0 }]),
|
|
244
|
-
"data-nb-sidebar-live": "",
|
|
245
|
-
"aria-hidden": "true"
|
|
246
|
-
}, null, 2)) : l("", !0)
|
|
247
|
-
]),
|
|
248
|
-
_: 1
|
|
249
|
-
}, 16, [
|
|
250
|
-
"class",
|
|
251
|
-
"type",
|
|
252
|
-
"to",
|
|
253
|
-
"disabled",
|
|
254
|
-
"aria-disabled",
|
|
255
|
-
"aria-expanded",
|
|
256
|
-
"aria-haspopup",
|
|
257
|
-
"aria-label"
|
|
258
|
-
])),
|
|
259
|
-
N.value && D.value === "verbose" ? oe((_(), u("ul", pe, [b(n.$slots, "default", {}, void 0, !0)], 512)), [[ae, P.value]]) : l("", !0),
|
|
260
|
-
D.value === "compact" && H.value ? (_(), c(o, {
|
|
261
|
-
key: 1,
|
|
262
|
-
to: "body"
|
|
263
|
-
}, [d("div", {
|
|
264
|
-
ref_key: "flyoutRef",
|
|
265
|
-
ref: V,
|
|
266
|
-
class: "nb-sidebar-menu-item__flyout",
|
|
267
|
-
style: h(W.value),
|
|
268
|
-
onMouseenter: Se,
|
|
269
|
-
onMouseleave: Ce,
|
|
270
|
-
onKeydown: Te,
|
|
271
|
-
onFocusout: Ee,
|
|
272
|
-
onClick: De
|
|
273
|
-
}, [d("div", me, [
|
|
274
|
-
d("span", he, S(e.label), 1),
|
|
275
|
-
e.live ? (_(), u("span", {
|
|
276
|
-
key: 0,
|
|
277
|
-
class: "nb-sidebar-menu-item__live",
|
|
278
|
-
title: j.value,
|
|
279
|
-
"aria-hidden": "true"
|
|
280
|
-
}, null, 8, ge)) : l("", !0),
|
|
281
|
-
e.badge === void 0 ? l("", !0) : (_(), u("span", {
|
|
282
|
-
key: 1,
|
|
283
|
-
class: m(["nb-sidebar-menu-item__badge", [`nb-sidebar-menu-item__badge--${e.badgeVariant}`]])
|
|
284
|
-
}, S(e.badge), 3))
|
|
285
|
-
]), N.value ? (_(), c(ce, {
|
|
286
|
-
key: 0,
|
|
287
|
-
variant: "verbose"
|
|
288
|
-
}, {
|
|
289
|
-
default: T(() => [d("ul", {
|
|
290
|
-
class: "nb-sidebar-menu-item__flyout-children",
|
|
291
|
-
role: "menu",
|
|
292
|
-
"aria-label": e.label
|
|
293
|
-
}, [b(n.$slots, "default", {}, void 0, !0)], 8, _e)]),
|
|
294
|
-
_: 3
|
|
295
|
-
})) : l("", !0)], 36)])) : l("", !0)
|
|
296
|
-
], 34));
|
|
297
|
-
}
|
|
298
|
-
}), [["__scopeId", "data-v-48a8a1aa"]]);
|
|
299
|
-
//#endregion
|
|
300
|
-
export { E as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./Icon-CssV4E2-.cjs`),n=require(`./composables/useNbStrings.composable.cjs`),ee=require(`./composables/useRouterLink.composable.cjs`),r=require(`./Avatar-UO0ySqkY.cjs`),i=require(`./utils/slotContent.helper.cjs`);let a=require(`vue`),o=require(`@nubisco/ui/icons/caret-right`);var s=(0,a.defineComponent)({__name:`SidebarVariantScope`,props:{variant:{}},setup(e){return(0,a.provide)(`nb-shell-sidebar-variant`,(0,a.toRef)(e,`variant`)),(e,t)=>(0,a.renderSlot)(e.$slots,`default`)}}),c={class:`nb-sidebar-menu-item__label`},l={key:0,class:`nb-sidebar-menu-item__live`,"data-nb-sidebar-live":``},u={class:`nb-sidebar-menu-item__live-text`},d=[`title`],f={key:0,class:`nb-sidebar-menu-item__children`,role:`group`},p={class:`nb-sidebar-menu-item__flyout-header`},m={class:`nb-sidebar-menu-item__flyout-label`},h=[`title`],g=[`aria-label`],_=(0,a.defineComponent)({__name:`SidebarMenuItem`,props:{label:{},icon:{default:void 0},picture:{default:void 0},to:{default:void 0},href:{default:void 0},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},defaultExpanded:{type:Boolean,default:!1},badge:{default:void 0},badgeVariant:{default:`neutral`},live:{type:Boolean,default:!1},liveLabel:{default:void 0}},emits:[`click`],setup(e,{emit:_}){let v=e,y=_,b=(0,a.inject)(`nb-shell-sidebar-variant`,(0,a.ref)(`verbose`)),x=(0,a.computed)(()=>b.value),S=(0,a.useSlots)(),C=(0,a.computed)(()=>{let e=v.badge;if(e===void 0)return;let t=typeof e==`number`?e:Number(String(e).trim());if(!(!Number.isFinite(t)||String(e).trim()===``))return t>99?`99+`:String(t)}),w=n.useNbStrings(),T=(0,a.computed)(()=>v.liveLabel??w.value.sidebarMenuItemLive),E=(0,a.computed)(()=>{let e=v.badge===void 0?v.label:`${v.label} (${v.badge})`;return v.live?`${e}, ${T.value}`:e}),D=(0,a.computed)(()=>{let e=S.default?.();return e?i.hasRenderableContent(e):!1}),O=(0,a.ref)(v.defaultExpanded||v.active),k=ee.useRouterLink(),A=(0,a.computed)(()=>{if(typeof v.to==`string`)return v.to;if(v.href)return v.href}),j=(0,a.computed)(()=>D.value),M=(0,a.computed)(()=>v.to!=null&&!j.value&&!!k.value),N=(0,a.computed)(()=>j.value?`button`:M.value?k.value:A.value?`a`:`button`),P=(0,a.computed)(()=>N.value===`a`?{href:A.value}:{});function F(e){if(v.disabled){e.preventDefault();return}if(j.value&&x.value===`verbose`){O.value=!O.value;return}j.value&&x.value===`compact`&&Q(e),y(`click`,e)}let I=(0,a.ref)(null),L=(0,a.ref)(null),R=(0,a.ref)(!1),z=(0,a.ref)(!1),B=(0,a.ref)({}),V=null;function H(){if(x.value!==`compact`)return;V&&=(clearTimeout(V),null);let e=J();if(!e)return;let t=e.getBoundingClientRect();B.value={top:`${t.top}px`,left:`${t.right+8}px`},R.value=!0}function U(){z.value||(V&&clearTimeout(V),V=setTimeout(()=>{R.value=!1,V=null},120))}function W(){H()}function G(){U()}function K(){V&&=(clearTimeout(V),null)}function q(){U()}function J(){let e=I.value;return e?e instanceof HTMLElement?e:e.$el??null:null}function Y(e=!1){V&&=(clearTimeout(V),null),R.value=!1,z.value=!1,e&&J()?.focus()}function X(){let e=L.value;return e?Array.from(e.querySelectorAll(`[role="menuitem"]`)).filter(e=>!e.hasAttribute(`disabled`)&&e.getAttribute(`aria-disabled`)!==`true`&&!e.closest(`[style*="display: none"]`)):[]}async function Z(e){H(),z.value=!0,e&&(await(0,a.nextTick)(),X()[0]?.focus())}function Q(e){if(R.value&&z.value){Y();return}Z(e.detail===0)}function te(e){!j.value||x.value!==`compact`||(e.key===`ArrowRight`||e.key===`ArrowDown`?(e.preventDefault(),Z(!0)):e.key===`Escape`&&R.value&&(e.preventDefault(),Y(!0)))}function ne(e){let t=X(),n=t.indexOf(document.activeElement);switch(e.key){case`Escape`:case`ArrowLeft`:e.preventDefault(),e.stopPropagation(),Y(!0);return;case`ArrowDown`:e.preventDefault(),t[(n+1)%t.length]?.focus();return;case`ArrowUp`:e.preventDefault(),t[(n-1+t.length)%t.length]?.focus();return;case`Home`:e.preventDefault(),t[0]?.focus();return;case`End`:e.preventDefault(),t[t.length-1]?.focus();return;case`Tab`:Y(!0);return}}function re(e){let t=e.relatedTarget;t&&(L.value?.contains(t)||J()?.contains(t)||Y())}function ie(e){let t=e.target?.closest(`[role="menuitem"]`);t&&!t.hasAttribute(`aria-expanded`)&&Y()}function $(e){let t=e.target;t&&(L.value?.contains(t)||J()?.contains(t)||Y())}return(0,a.watch)(R,e=>{typeof document>`u`||(e?document.addEventListener(`pointerdown`,$,!0):document.removeEventListener(`pointerdown`,$,!0))}),(0,a.watch)(x,()=>Y()),(0,a.onBeforeUnmount)(()=>{V&&clearTimeout(V),typeof document<`u`&&document.removeEventListener(`pointerdown`,$,!0)}),(n,ee)=>((0,a.openBlock)(),(0,a.createElementBlock)(`li`,{class:(0,a.normalizeClass)([`nb-sidebar-menu-item`,[`nb-sidebar-menu-item--${x.value}`]]),role:`none`,onMouseenter:W,onMouseleave:G},[((0,a.openBlock)(),(0,a.createBlock)((0,a.resolveDynamicComponent)(N.value),(0,a.mergeProps)({ref_key:`rowRef`,ref:I,class:[`nb-sidebar-menu-item__row`,{"nb-sidebar-menu-item__row--active":e.active,"nb-sidebar-menu-item__row--disabled":e.disabled,"nb-sidebar-menu-item__row--expandable":D.value&&x.value===`verbose`,"nb-sidebar-menu-item__row--compact":x.value===`compact`}],type:N.value===`button`?`button`:void 0,to:M.value?e.to:void 0},P.value,{disabled:N.value===`button`&&!D.value&&e.disabled||void 0,"aria-disabled":e.disabled||void 0,"aria-expanded":D.value?x.value===`verbose`?O.value:R.value:void 0,"aria-haspopup":D.value&&x.value===`compact`?`menu`:void 0,"aria-label":x.value===`compact`?E.value:void 0,role:`menuitem`,onClick:F,onKeydown:te}),{default:(0,a.withCtx)(()=>[e.picture===void 0?e.icon?((0,a.openBlock)(),(0,a.createBlock)(t.t,{key:1,class:`nb-sidebar-menu-item__icon`,name:e.icon,size:x.value===`compact`?18:16},null,8,[`name`,`size`])):(0,a.createCommentVNode)(``,!0):((0,a.openBlock)(),(0,a.createBlock)(r.t,{key:0,class:`nb-sidebar-menu-item__icon nb-sidebar-menu-item__picture`,name:e.label,picture:e.picture,size:x.value===`compact`?18:16,decorative:``},null,8,[`name`,`picture`,`size`])),x.value===`verbose`?((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:2},[(0,a.createElementVNode)(`span`,c,(0,a.toDisplayString)(e.label),1),e.live?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,l,[(0,a.createElementVNode)(`span`,u,(0,a.toDisplayString)(T.value),1)])):(0,a.createCommentVNode)(``,!0),e.badge===void 0?(0,a.createCommentVNode)(``,!0):((0,a.openBlock)(),(0,a.createElementBlock)(`span`,{key:1,class:(0,a.normalizeClass)([`nb-sidebar-menu-item__badge`,[`nb-sidebar-menu-item__badge--${e.badgeVariant}`]])},(0,a.toDisplayString)(e.badge),3)),D.value?((0,a.openBlock)(),(0,a.createBlock)(t.t,{key:2,class:(0,a.normalizeClass)([`nb-sidebar-menu-item__caret`,{"nb-sidebar-menu-item__caret--expanded":O.value}]),name:(0,a.unref)(o.regular),size:`sm`},null,8,[`class`,`name`])):(0,a.createCommentVNode)(``,!0)],64)):C.value===void 0?e.badge===void 0?(0,a.createCommentVNode)(``,!0):((0,a.openBlock)(),(0,a.createElementBlock)(`span`,{key:4,class:(0,a.normalizeClass)([`nb-sidebar-menu-item__badge-dot`,[`nb-sidebar-menu-item__badge-dot--${e.badgeVariant}`]]),title:String(e.badge)},null,10,d)):((0,a.openBlock)(),(0,a.createElementBlock)(`span`,{key:3,class:(0,a.normalizeClass)([`nb-sidebar-menu-item__badge-count`,[`nb-sidebar-menu-item__badge-count--${e.badgeVariant}`]]),"aria-hidden":`true`},(0,a.toDisplayString)(C.value),3)),e.live&&x.value===`compact`?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,{key:5,class:(0,a.normalizeClass)([`nb-sidebar-menu-item__live nb-sidebar-menu-item__live--compact`,{"nb-sidebar-menu-item__live--below":e.badge!==void 0}]),"data-nb-sidebar-live":``,"aria-hidden":`true`},null,2)):(0,a.createCommentVNode)(``,!0)]),_:1},16,[`class`,`type`,`to`,`disabled`,`aria-disabled`,`aria-expanded`,`aria-haspopup`,`aria-label`])),D.value&&x.value===`verbose`?(0,a.withDirectives)(((0,a.openBlock)(),(0,a.createElementBlock)(`ul`,f,[(0,a.renderSlot)(n.$slots,`default`,{},void 0,!0)],512)),[[a.vShow,O.value]]):(0,a.createCommentVNode)(``,!0),x.value===`compact`&&R.value?((0,a.openBlock)(),(0,a.createBlock)(a.Teleport,{key:1,to:`body`},[(0,a.createElementVNode)(`div`,{ref_key:`flyoutRef`,ref:L,class:`nb-sidebar-menu-item__flyout`,style:(0,a.normalizeStyle)(B.value),onMouseenter:K,onMouseleave:q,onKeydown:ne,onFocusout:re,onClick:ie},[(0,a.createElementVNode)(`div`,p,[(0,a.createElementVNode)(`span`,m,(0,a.toDisplayString)(e.label),1),e.live?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,{key:0,class:`nb-sidebar-menu-item__live`,title:T.value,"aria-hidden":`true`},null,8,h)):(0,a.createCommentVNode)(``,!0),e.badge===void 0?(0,a.createCommentVNode)(``,!0):((0,a.openBlock)(),(0,a.createElementBlock)(`span`,{key:1,class:(0,a.normalizeClass)([`nb-sidebar-menu-item__badge`,[`nb-sidebar-menu-item__badge--${e.badgeVariant}`]])},(0,a.toDisplayString)(e.badge),3))]),D.value?((0,a.openBlock)(),(0,a.createBlock)(s,{key:0,variant:`verbose`},{default:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`ul`,{class:`nb-sidebar-menu-item__flyout-children`,role:`menu`,"aria-label":e.label},[(0,a.renderSlot)(n.$slots,`default`,{},void 0,!0)],8,g)]),_:3})):(0,a.createCommentVNode)(``,!0)],36)])):(0,a.createCommentVNode)(``,!0)],34))}}),v=e.t(_,[[`__scopeId`,`data-v-48a8a1aa`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return v}});
|
package/dist/Spinner-DYFhiTB1.js
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { useReducedMotion as e } from "./composables/useReducedMotion.composable.mjs";
|
|
2
|
-
import { t } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
3
|
-
import { useStableId as n } from "./composables/useStableId.composable.mjs";
|
|
4
|
-
import { useNbStrings as r } from "./composables/useNbStrings.composable.mjs";
|
|
5
|
-
import { c as i, o as a, s as o, t as s, u as c } from "./useLoadingAnnouncer.composable-Cihu0ZHU.js";
|
|
6
|
-
import { Teleport as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, defineComponent as h, mergeProps as g, onBeforeUnmount as _, onMounted as v, openBlock as y, ref as b, renderSlot as x, toDisplayString as S, unref as C, watch as w, withModifiers as T } from "vue";
|
|
7
|
-
//#region src/components/Spinner.d.ts
|
|
8
|
-
var E = /* @__PURE__ */ function(e) {
|
|
9
|
-
return e.ExtraSmall = "xs", e.Small = "sm", e.Medium = "md", e.Large = "lg", e;
|
|
10
|
-
}(E || {}), D = /* @__PURE__ */ function(e) {
|
|
11
|
-
return e.None = "none", e.Container = "container", e.Page = "page", e;
|
|
12
|
-
}(D || {}), O = /* @__PURE__ */ function(e) {
|
|
13
|
-
return e.Primary = "primary", e.Inherit = "inherit", e;
|
|
14
|
-
}(O || {}), k = [
|
|
15
|
-
"id",
|
|
16
|
-
"tabindex",
|
|
17
|
-
"role",
|
|
18
|
-
"aria-live",
|
|
19
|
-
"aria-hidden"
|
|
20
|
-
], A = {
|
|
21
|
-
key: 0,
|
|
22
|
-
class: "nb-spinner__label",
|
|
23
|
-
"aria-hidden": "true"
|
|
24
|
-
}, j = {
|
|
25
|
-
key: 1,
|
|
26
|
-
class: "nb-spinner__announcement"
|
|
27
|
-
}, M = !1, N = /* @__PURE__ */ t(/* @__PURE__ */ h({
|
|
28
|
-
inheritAttrs: !1,
|
|
29
|
-
__name: "Spinner",
|
|
30
|
-
props: {
|
|
31
|
-
size: { default: E.Medium },
|
|
32
|
-
label: { default: void 0 },
|
|
33
|
-
showLabel: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: !1
|
|
36
|
-
},
|
|
37
|
-
overlay: { default: D.None },
|
|
38
|
-
tone: { default: O.Primary },
|
|
39
|
-
delay: { default: 0 },
|
|
40
|
-
completeLabel: { default: void 0 },
|
|
41
|
-
decorative: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: !1
|
|
44
|
-
},
|
|
45
|
-
id: { default: void 0 }
|
|
46
|
-
},
|
|
47
|
-
setup(t) {
|
|
48
|
-
let h = t, E = n(h), O = r(), N = u(() => h.label ?? O.value.spinnerLabel), P = Symbol("nb-spinner-page-overlay"), F = b(null), I = e(), L = u(() => h.overlay === D.Page), R = u(() => h.overlay === D.Container), z = u(() => h.decorative && !L.value), B = u(() => !z.value), V = b(h.delay <= 0), H;
|
|
49
|
-
function U() {
|
|
50
|
-
H &&= (clearTimeout(H), void 0);
|
|
51
|
-
}
|
|
52
|
-
w(() => h.delay, (e) => {
|
|
53
|
-
if (!V.value) {
|
|
54
|
-
if (U(), e <= 0) {
|
|
55
|
-
V.value = !0;
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
H = setTimeout(() => {
|
|
59
|
-
H = void 0, V.value = !0;
|
|
60
|
-
}, e);
|
|
61
|
-
}
|
|
62
|
-
}, { immediate: !0 });
|
|
63
|
-
let W = b(""), G;
|
|
64
|
-
function K() {
|
|
65
|
-
G &&= (clearTimeout(G), void 0);
|
|
66
|
-
}
|
|
67
|
-
w([
|
|
68
|
-
V,
|
|
69
|
-
B,
|
|
70
|
-
N
|
|
71
|
-
], ([e, t, n]) => {
|
|
72
|
-
if (K(), !e || !t) {
|
|
73
|
-
W.value = "";
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
if (W.value !== "") {
|
|
77
|
-
W.value = n;
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
G = setTimeout(() => {
|
|
81
|
-
G = void 0, W.value = n;
|
|
82
|
-
}, 0);
|
|
83
|
-
}, { immediate: !0 });
|
|
84
|
-
function q() {
|
|
85
|
-
typeof process < "u" && process.env.NODE_ENV === "production" || M || h.label !== void 0 || z.value || (M = !0, console.warn("[nubisco-ui] NbSpinner has no `label`, so it announces \"" + N.value + "\". Name what is loading (\"Loading invoices\"), or mark the spinner `decorative` when something else already announces the load."));
|
|
86
|
-
}
|
|
87
|
-
let J = null, Y = null;
|
|
88
|
-
function X() {
|
|
89
|
-
if (J === null) return;
|
|
90
|
-
let e = J;
|
|
91
|
-
J = null, e === "page" && c(P), Y?.(), Y = null;
|
|
92
|
-
}
|
|
93
|
-
function Z() {
|
|
94
|
-
let e = V.value ? L.value ? "page" : R.value ? "container" : null : null;
|
|
95
|
-
if (e === J || (X(), e === null)) return;
|
|
96
|
-
let t = F.value;
|
|
97
|
-
if (!t) return;
|
|
98
|
-
if (J = e, e === "page") {
|
|
99
|
-
a(P, t);
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
let n = t.parentElement;
|
|
103
|
-
n && (Y = o(n, t));
|
|
104
|
-
}
|
|
105
|
-
w([V, () => h.overlay], Z, { flush: "post" }), v(Z), v(q), _(() => {
|
|
106
|
-
V.value && B.value && s(h.completeLabel), U(), K(), X();
|
|
107
|
-
});
|
|
108
|
-
let Q = u(() => [
|
|
109
|
-
"nb-spinner",
|
|
110
|
-
`nb-spinner--${h.size}`,
|
|
111
|
-
`nb-spinner--tone-${h.tone}`,
|
|
112
|
-
`nb-spinner--overlay-${h.overlay}`,
|
|
113
|
-
{
|
|
114
|
-
"nb-spinner--with-label": h.showLabel && !z.value,
|
|
115
|
-
"nb-spinner--reduced-motion": I.value,
|
|
116
|
-
"nb-spinner--overlay-stacked": L.value && V.value && !i(P)
|
|
117
|
-
}
|
|
118
|
-
]);
|
|
119
|
-
return (e, n) => (y(), d(l, {
|
|
120
|
-
to: "body",
|
|
121
|
-
disabled: !L.value
|
|
122
|
-
}, [V.value ? (y(), p("div", g({ key: 0 }, e.$attrs, {
|
|
123
|
-
id: C(E),
|
|
124
|
-
ref_key: "rootEl",
|
|
125
|
-
ref: F,
|
|
126
|
-
class: Q.value,
|
|
127
|
-
tabindex: L.value ? -1 : void 0,
|
|
128
|
-
role: B.value ? "status" : void 0,
|
|
129
|
-
"aria-live": B.value ? "polite" : void 0,
|
|
130
|
-
"aria-hidden": z.value ? "true" : void 0
|
|
131
|
-
}), [
|
|
132
|
-
n[1] ||= m("svg", {
|
|
133
|
-
class: "nb-spinner__ring",
|
|
134
|
-
viewBox: "0 0 32 32",
|
|
135
|
-
"aria-hidden": "true",
|
|
136
|
-
focusable: "false"
|
|
137
|
-
}, [m("circle", {
|
|
138
|
-
class: "nb-spinner__track",
|
|
139
|
-
cx: "16",
|
|
140
|
-
cy: "16",
|
|
141
|
-
r: "14"
|
|
142
|
-
}), m("circle", {
|
|
143
|
-
class: "nb-spinner__arc",
|
|
144
|
-
cx: "16",
|
|
145
|
-
cy: "16",
|
|
146
|
-
r: "14"
|
|
147
|
-
})], -1),
|
|
148
|
-
t.showLabel && !z.value ? (y(), p("span", A, S(N.value), 1)) : f("", !0),
|
|
149
|
-
B.value ? (y(), p("span", j, S(W.value), 1)) : f("", !0),
|
|
150
|
-
e.$slots.default ? (y(), p("div", {
|
|
151
|
-
key: 2,
|
|
152
|
-
class: "nb-spinner__actions",
|
|
153
|
-
"aria-live": "off",
|
|
154
|
-
onClick: n[0] ||= T(() => {}, ["stop"])
|
|
155
|
-
}, [x(e.$slots, "default", {}, void 0, !0)])) : f("", !0)
|
|
156
|
-
], 16, k)) : f("", !0)], 8, ["disabled"]));
|
|
157
|
-
}
|
|
158
|
-
}), [["__scopeId", "data-v-833f43a0"]]);
|
|
159
|
-
//#endregion
|
|
160
|
-
export { O as i, D as n, E as r, N as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./composables/useReducedMotion.composable.cjs`),t=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),n=require(`./composables/useStableId.composable.cjs`),r=require(`./composables/useNbStrings.composable.cjs`),i=require(`./useLoadingAnnouncer.composable-vqmtAsfY.cjs`);let a=require(`vue`);var o=function(e){return e.ExtraSmall=`xs`,e.Small=`sm`,e.Medium=`md`,e.Large=`lg`,e}(o||{}),s=function(e){return e.None=`none`,e.Container=`container`,e.Page=`page`,e}(s||{}),c=function(e){return e.Primary=`primary`,e.Inherit=`inherit`,e}(c||{}),l=[`id`,`tabindex`,`role`,`aria-live`,`aria-hidden`],u={key:0,class:`nb-spinner__label`,"aria-hidden":`true`},d={key:1,class:`nb-spinner__announcement`},f=!1,p=(0,a.defineComponent)({inheritAttrs:!1,__name:`Spinner`,props:{size:{default:o.Medium},label:{default:void 0},showLabel:{type:Boolean,default:!1},overlay:{default:s.None},tone:{default:c.Primary},delay:{default:0},completeLabel:{default:void 0},decorative:{type:Boolean,default:!1},id:{default:void 0}},setup(t){let o=t,c=n.useStableId(o),p=r.useNbStrings(),m=(0,a.computed)(()=>o.label??p.value.spinnerLabel),h=Symbol(`nb-spinner-page-overlay`),g=(0,a.ref)(null),_=e.useReducedMotion(),v=(0,a.computed)(()=>o.overlay===s.Page),y=(0,a.computed)(()=>o.overlay===s.Container),b=(0,a.computed)(()=>o.decorative&&!v.value),x=(0,a.computed)(()=>!b.value),S=(0,a.ref)(o.delay<=0),C;function w(){C&&=(clearTimeout(C),void 0)}(0,a.watch)(()=>o.delay,e=>{if(!S.value){if(w(),e<=0){S.value=!0;return}C=setTimeout(()=>{C=void 0,S.value=!0},e)}},{immediate:!0});let T=(0,a.ref)(``),E;function D(){E&&=(clearTimeout(E),void 0)}(0,a.watch)([S,x,m],([e,t,n])=>{if(D(),!e||!t){T.value=``;return}if(T.value!==``){T.value=n;return}E=setTimeout(()=>{E=void 0,T.value=n},0)},{immediate:!0});function O(){typeof process<`u`&&process.env.NODE_ENV===`production`||f||o.label!==void 0||b.value||(f=!0,console.warn('[nubisco-ui] NbSpinner has no `label`, so it announces "'+m.value+'". Name what is loading ("Loading invoices"), or mark the spinner `decorative` when something else already announces the load.'))}let k=null,A=null;function j(){if(k===null)return;let e=k;k=null,e===`page`&&i.u(h),A?.(),A=null}function M(){let e=S.value?v.value?`page`:y.value?`container`:null:null;if(e===k||(j(),e===null))return;let t=g.value;if(!t)return;if(k=e,e===`page`){i.o(h,t);return}let n=t.parentElement;n&&(A=i.s(n,t))}(0,a.watch)([S,()=>o.overlay],M,{flush:`post`}),(0,a.onMounted)(M),(0,a.onMounted)(O),(0,a.onBeforeUnmount)(()=>{S.value&&x.value&&i.t(o.completeLabel),w(),D(),j()});let N=(0,a.computed)(()=>[`nb-spinner`,`nb-spinner--${o.size}`,`nb-spinner--tone-${o.tone}`,`nb-spinner--overlay-${o.overlay}`,{"nb-spinner--with-label":o.showLabel&&!b.value,"nb-spinner--reduced-motion":_.value,"nb-spinner--overlay-stacked":v.value&&S.value&&!i.c(h)}]);return(e,n)=>((0,a.openBlock)(),(0,a.createBlock)(a.Teleport,{to:`body`,disabled:!v.value},[S.value?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,(0,a.mergeProps)({key:0},e.$attrs,{id:(0,a.unref)(c),ref_key:`rootEl`,ref:g,class:N.value,tabindex:v.value?-1:void 0,role:x.value?`status`:void 0,"aria-live":x.value?`polite`:void 0,"aria-hidden":b.value?`true`:void 0}),[n[1]||=(0,a.createElementVNode)(`svg`,{class:`nb-spinner__ring`,viewBox:`0 0 32 32`,"aria-hidden":`true`,focusable:`false`},[(0,a.createElementVNode)(`circle`,{class:`nb-spinner__track`,cx:`16`,cy:`16`,r:`14`}),(0,a.createElementVNode)(`circle`,{class:`nb-spinner__arc`,cx:`16`,cy:`16`,r:`14`})],-1),t.showLabel&&!b.value?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,u,(0,a.toDisplayString)(m.value),1)):(0,a.createCommentVNode)(``,!0),x.value?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,d,(0,a.toDisplayString)(T.value),1)):(0,a.createCommentVNode)(``,!0),e.$slots.default?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:2,class:`nb-spinner__actions`,"aria-live":`off`,onClick:n[0]||=(0,a.withModifiers)(()=>{},[`stop`])},[(0,a.renderSlot)(e.$slots,`default`,{},void 0,!0)])):(0,a.createCommentVNode)(``,!0)],16,l)):(0,a.createCommentVNode)(``,!0)],8,[`disabled`]))}}),m=t.t(p,[[`__scopeId`,`data-v-833f43a0`]]);Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return m}});
|
package/dist/Submenu-BDs-yAqv.js
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./Icon-B2tiGiqZ.js";
|
|
2
|
-
import { usePhoneLayout as t } from "./composables/usePhoneLayout.composable.mjs";
|
|
3
|
-
import { Fragment as n, Teleport as r, Transition as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, inject as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onBeforeUnmount as g, openBlock as _, ref as v, renderSlot as y, toDisplayString as b, unref as x, useId as S, watch as C, withCtx as w, withKeys as T, withModifiers as E } from "vue";
|
|
4
|
-
import { regular as D } from "@nubisco/ui/icons/caret-right";
|
|
5
|
-
//#region src/components/Submenu.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var O = [
|
|
7
|
-
"aria-expanded",
|
|
8
|
-
"aria-disabled",
|
|
9
|
-
"aria-describedby",
|
|
10
|
-
"data-nb-explained",
|
|
11
|
-
"onKeydown"
|
|
12
|
-
], k = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "nb-menu-item__text"
|
|
15
|
-
}, A = { class: "nb-menu-item__label" }, j = {
|
|
16
|
-
key: 2,
|
|
17
|
-
class: "nb-menu-item__label"
|
|
18
|
-
}, M = /* @__PURE__ */ d({
|
|
19
|
-
__name: "Submenu",
|
|
20
|
-
props: {
|
|
21
|
-
icon: { default: void 0 },
|
|
22
|
-
label: {},
|
|
23
|
-
disabled: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: !1
|
|
26
|
-
},
|
|
27
|
-
disabledReason: { default: void 0 }
|
|
28
|
-
},
|
|
29
|
-
setup(d) {
|
|
30
|
-
let { phone: M } = t(), N = () => M.value ? "var(--nb-zindex-modal-dropdown)" : "var(--nb-zindex-menu)", P = d, F = a(() => P.disabled && !!P.disabledReason), I = `nb-submenu-reason-${S()}`, L = v(null), R = v(null), z = v(!1), B = f("nb-menu", null), V = null, H = null, U = a(() => `nb-menu--${B?.size ?? "md"}`), W = v({
|
|
31
|
-
position: "fixed",
|
|
32
|
-
top: "0px",
|
|
33
|
-
left: "0px",
|
|
34
|
-
zIndex: N()
|
|
35
|
-
});
|
|
36
|
-
function G() {
|
|
37
|
-
if (!L.value) return;
|
|
38
|
-
let e = L.value.getBoundingClientRect(), t = e.right, n = e.top;
|
|
39
|
-
t + 200 > window.innerWidth && (t = e.left - 200), n + 200 > window.innerHeight && (n = Math.max(8, window.innerHeight - 200)), W.value = {
|
|
40
|
-
position: "fixed",
|
|
41
|
-
top: `${n}px`,
|
|
42
|
-
left: `${t}px`,
|
|
43
|
-
zIndex: N()
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function K() {
|
|
47
|
-
P.disabled || (Q(), z.value = !0, G(), p(() => {
|
|
48
|
-
if (R.value && L.value) {
|
|
49
|
-
let e = L.value.getBoundingClientRect(), t = R.value.getBoundingClientRect(), n = e.right;
|
|
50
|
-
n + t.width > window.innerWidth && (n = e.left - t.width);
|
|
51
|
-
let r = e.top;
|
|
52
|
-
r + t.height > window.innerHeight && (r = Math.max(8, window.innerHeight - t.height)), W.value = {
|
|
53
|
-
position: "fixed",
|
|
54
|
-
top: `${r}px`,
|
|
55
|
-
left: `${n}px`,
|
|
56
|
-
zIndex: N()
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
61
|
-
function q() {
|
|
62
|
-
if (Q(), !z.value) return;
|
|
63
|
-
let e = !!R.value?.contains(document.activeElement);
|
|
64
|
-
z.value = !1, e && L.value?.focus();
|
|
65
|
-
}
|
|
66
|
-
function J() {
|
|
67
|
-
return R.value ? Array.from(R.value.querySelectorAll("[role=\"menuitem\"], [role=\"menuitemcheckbox\"], [role=\"menuitemradio\"]")) : [];
|
|
68
|
-
}
|
|
69
|
-
function Y(e, t) {
|
|
70
|
-
let n = J();
|
|
71
|
-
for (let r = e; r >= 0 && r < n.length; r += t) if (n[r].getAttribute("aria-disabled") !== "true" || n[r].hasAttribute("data-nb-explained")) {
|
|
72
|
-
n[r].focus();
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
function X() {
|
|
77
|
-
P.disabled || (K(), p(() => Y(0, 1)));
|
|
78
|
-
}
|
|
79
|
-
function Z(e) {
|
|
80
|
-
let t = J().indexOf(document.activeElement);
|
|
81
|
-
e.key === "ArrowDown" ? (e.preventDefault(), e.stopPropagation(), Y(t + 1, 1)) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), t > 0 && Y(t - 1, -1)) : e.key === "ArrowLeft" || e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), q()) : e.key === "Tab" && (q(), B?.close());
|
|
82
|
-
}
|
|
83
|
-
C(R, (e, t) => {
|
|
84
|
-
t && B?.unregisterSurface(t), e && B?.registerSurface(e);
|
|
85
|
-
});
|
|
86
|
-
function Q() {
|
|
87
|
-
V &&= (clearTimeout(V), null), H &&= (clearTimeout(H), null);
|
|
88
|
-
}
|
|
89
|
-
function $() {
|
|
90
|
-
Q(), V = setTimeout(K, 150);
|
|
91
|
-
}
|
|
92
|
-
function ee() {
|
|
93
|
-
Q(), H = setTimeout(q, 150);
|
|
94
|
-
}
|
|
95
|
-
function te() {
|
|
96
|
-
Q();
|
|
97
|
-
}
|
|
98
|
-
function ne() {
|
|
99
|
-
Q(), H = setTimeout(q, 150);
|
|
100
|
-
}
|
|
101
|
-
function re() {
|
|
102
|
-
P.disabled || (z.value ? q() : K());
|
|
103
|
-
}
|
|
104
|
-
return g(() => {
|
|
105
|
-
Q(), R.value && B?.unregisterSurface(R.value);
|
|
106
|
-
}), (t, a) => (_(), c(n, null, [l("li", {
|
|
107
|
-
ref_key: "triggerRef",
|
|
108
|
-
ref: L,
|
|
109
|
-
class: m(["nb-menu-item nb-submenu-trigger", {
|
|
110
|
-
"nb-menu-item--disabled": d.disabled,
|
|
111
|
-
"nb-menu-item--explained": F.value,
|
|
112
|
-
"nb-menu-item--highlighted": z.value
|
|
113
|
-
}]),
|
|
114
|
-
role: "menuitem",
|
|
115
|
-
"aria-haspopup": "menu",
|
|
116
|
-
"aria-expanded": z.value,
|
|
117
|
-
"aria-disabled": d.disabled || void 0,
|
|
118
|
-
"aria-describedby": F.value ? I : void 0,
|
|
119
|
-
"data-nb-explained": F.value || void 0,
|
|
120
|
-
tabindex: -1,
|
|
121
|
-
onMouseenter: $,
|
|
122
|
-
onMouseleave: ee,
|
|
123
|
-
onKeydown: [
|
|
124
|
-
T(E(X, ["prevent"]), ["right"]),
|
|
125
|
-
T(E(X, ["prevent"]), ["enter"]),
|
|
126
|
-
T(E(X, ["prevent"]), ["space"]),
|
|
127
|
-
T(E(q, ["prevent"]), ["left"]),
|
|
128
|
-
T(E(q, ["prevent"]), ["escape"])
|
|
129
|
-
],
|
|
130
|
-
onClick: re
|
|
131
|
-
}, [
|
|
132
|
-
d.icon ? (_(), o(e, {
|
|
133
|
-
key: 0,
|
|
134
|
-
name: d.icon,
|
|
135
|
-
size: 16,
|
|
136
|
-
class: "nb-menu-item__icon"
|
|
137
|
-
}, null, 8, ["name"])) : s("", !0),
|
|
138
|
-
F.value ? (_(), c("span", k, [l("span", A, b(d.label), 1), l("span", {
|
|
139
|
-
id: I,
|
|
140
|
-
class: "nb-menu-item__reason"
|
|
141
|
-
}, b(d.disabledReason), 1)])) : (_(), c("span", j, b(d.label), 1)),
|
|
142
|
-
u(e, {
|
|
143
|
-
name: x(D),
|
|
144
|
-
size: "sm",
|
|
145
|
-
class: "nb-submenu-trigger__caret"
|
|
146
|
-
}, null, 8, ["name"])
|
|
147
|
-
], 42, O), (_(), o(r, { to: "body" }, [u(i, { name: "nb-submenu" }, {
|
|
148
|
-
default: w(() => [z.value ? (_(), c("ul", {
|
|
149
|
-
key: 0,
|
|
150
|
-
ref_key: "submenuRef",
|
|
151
|
-
ref: R,
|
|
152
|
-
role: "menu",
|
|
153
|
-
class: m(["nb-menu nb-submenu", [U.value]]),
|
|
154
|
-
style: h(W.value),
|
|
155
|
-
onMouseenter: te,
|
|
156
|
-
onMouseleave: ne,
|
|
157
|
-
onKeydown: Z
|
|
158
|
-
}, [y(t.$slots, "default")], 38)) : s("", !0)]),
|
|
159
|
-
_: 3
|
|
160
|
-
})]))], 64));
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
//#endregion
|
|
164
|
-
export { M as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Icon-CssV4E2-.cjs`),t=require(`./composables/usePhoneLayout.composable.cjs`);let n=require(`vue`),r=require(`@nubisco/ui/icons/caret-right`);var i=[`aria-expanded`,`aria-disabled`,`aria-describedby`,`data-nb-explained`,`onKeydown`],a={key:1,class:`nb-menu-item__text`},o={class:`nb-menu-item__label`},s={key:2,class:`nb-menu-item__label`},c=(0,n.defineComponent)({__name:`Submenu`,props:{icon:{default:void 0},label:{},disabled:{type:Boolean,default:!1},disabledReason:{default:void 0}},setup(c){let{phone:l}=t.usePhoneLayout(),u=()=>l.value?`var(--nb-zindex-modal-dropdown)`:`var(--nb-zindex-menu)`,d=c,f=(0,n.computed)(()=>d.disabled&&!!d.disabledReason),p=`nb-submenu-reason-${(0,n.useId)()}`,m=(0,n.ref)(null),h=(0,n.ref)(null),g=(0,n.ref)(!1),_=(0,n.inject)(`nb-menu`,null),v=null,y=null,b=(0,n.computed)(()=>`nb-menu--${_?.size??`md`}`),x=(0,n.ref)({position:`fixed`,top:`0px`,left:`0px`,zIndex:u()});function S(){if(!m.value)return;let e=m.value.getBoundingClientRect(),t=e.right,n=e.top;t+200>window.innerWidth&&(t=e.left-200),n+200>window.innerHeight&&(n=Math.max(8,window.innerHeight-200)),x.value={position:`fixed`,top:`${n}px`,left:`${t}px`,zIndex:u()}}function C(){d.disabled||(k(),g.value=!0,S(),(0,n.nextTick)(()=>{if(h.value&&m.value){let e=m.value.getBoundingClientRect(),t=h.value.getBoundingClientRect(),n=e.right;n+t.width>window.innerWidth&&(n=e.left-t.width);let r=e.top;r+t.height>window.innerHeight&&(r=Math.max(8,window.innerHeight-t.height)),x.value={position:`fixed`,top:`${r}px`,left:`${n}px`,zIndex:u()}}}))}function w(){if(k(),!g.value)return;let e=!!h.value?.contains(document.activeElement);g.value=!1,e&&m.value?.focus()}function T(){return h.value?Array.from(h.value.querySelectorAll(`[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]`)):[]}function E(e,t){let n=T();for(let r=e;r>=0&&r<n.length;r+=t)if(n[r].getAttribute(`aria-disabled`)!==`true`||n[r].hasAttribute(`data-nb-explained`)){n[r].focus();return}}function D(){d.disabled||(C(),(0,n.nextTick)(()=>E(0,1)))}function O(e){let t=T().indexOf(document.activeElement);e.key===`ArrowDown`?(e.preventDefault(),e.stopPropagation(),E(t+1,1)):e.key===`ArrowUp`?(e.preventDefault(),e.stopPropagation(),t>0&&E(t-1,-1)):e.key===`ArrowLeft`||e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),w()):e.key===`Tab`&&(w(),_?.close())}(0,n.watch)(h,(e,t)=>{t&&_?.unregisterSurface(t),e&&_?.registerSurface(e)});function k(){v&&=(clearTimeout(v),null),y&&=(clearTimeout(y),null)}function A(){k(),v=setTimeout(C,150)}function j(){k(),y=setTimeout(w,150)}function M(){k()}function N(){k(),y=setTimeout(w,150)}function P(){d.disabled||(g.value?w():C())}return(0,n.onBeforeUnmount)(()=>{k(),h.value&&_?.unregisterSurface(h.value)}),(t,l)=>((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createElementVNode)(`li`,{ref_key:`triggerRef`,ref:m,class:(0,n.normalizeClass)([`nb-menu-item nb-submenu-trigger`,{"nb-menu-item--disabled":c.disabled,"nb-menu-item--explained":f.value,"nb-menu-item--highlighted":g.value}]),role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":g.value,"aria-disabled":c.disabled||void 0,"aria-describedby":f.value?p:void 0,"data-nb-explained":f.value||void 0,tabindex:-1,onMouseenter:A,onMouseleave:j,onKeydown:[(0,n.withKeys)((0,n.withModifiers)(D,[`prevent`]),[`right`]),(0,n.withKeys)((0,n.withModifiers)(D,[`prevent`]),[`enter`]),(0,n.withKeys)((0,n.withModifiers)(D,[`prevent`]),[`space`]),(0,n.withKeys)((0,n.withModifiers)(w,[`prevent`]),[`left`]),(0,n.withKeys)((0,n.withModifiers)(w,[`prevent`]),[`escape`])],onClick:P},[c.icon?((0,n.openBlock)(),(0,n.createBlock)(e.t,{key:0,name:c.icon,size:16,class:`nb-menu-item__icon`},null,8,[`name`])):(0,n.createCommentVNode)(``,!0),f.value?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,a,[(0,n.createElementVNode)(`span`,o,(0,n.toDisplayString)(c.label),1),(0,n.createElementVNode)(`span`,{id:p,class:`nb-menu-item__reason`},(0,n.toDisplayString)(c.disabledReason),1)])):((0,n.openBlock)(),(0,n.createElementBlock)(`span`,s,(0,n.toDisplayString)(c.label),1)),(0,n.createVNode)(e.t,{name:(0,n.unref)(r.regular),size:`sm`,class:`nb-submenu-trigger__caret`},null,8,[`name`])],42,i),((0,n.openBlock)(),(0,n.createBlock)(n.Teleport,{to:`body`},[(0,n.createVNode)(n.Transition,{name:`nb-submenu`},{default:(0,n.withCtx)(()=>[g.value?((0,n.openBlock)(),(0,n.createElementBlock)(`ul`,{key:0,ref_key:`submenuRef`,ref:h,role:`menu`,class:(0,n.normalizeClass)([`nb-menu nb-submenu`,[b.value]]),style:(0,n.normalizeStyle)(x.value),onMouseenter:M,onMouseleave:N,onKeydown:O},[(0,n.renderSlot)(t.$slots,`default`)],38)):(0,n.createCommentVNode)(``,!0)]),_:3})]))],64))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|