@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
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
import { t as e } from "./Button-DmJ_J3UO.js";
|
|
2
|
+
import { useTeleportReady as t } from "./composables/useTeleportReady.composable.mjs";
|
|
3
|
+
import { t as n } from "./Icon-B2tiGiqZ.js";
|
|
4
|
+
import { usePhoneLayout as r } from "./composables/usePhoneLayout.composable.mjs";
|
|
5
|
+
import { useNbStrings as i } from "./composables/useNbStrings.composable.mjs";
|
|
6
|
+
import { t as a } from "./Spinner-BlzVODzE.js";
|
|
7
|
+
import { t as o } from "./EmptyState-DE1pPuw-.js";
|
|
8
|
+
import { t as s } from "./CloseButton-CAPfd6yf.js";
|
|
9
|
+
import { t as c } from "./Skeleton-DFi5DNiP.js";
|
|
10
|
+
import { t as l } from "./NotificationCenterItem-Hf0S6Jls.js";
|
|
11
|
+
import { Fragment as u, Teleport as ee, Transition as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as te, createTextVNode as ne, createVNode as _, defineComponent as v, mergeProps as re, nextTick as y, normalizeClass as ie, normalizeStyle as ae, onBeforeUnmount as oe, openBlock as b, ref as x, renderList as se, renderSlot as S, toDisplayString as C, unref as ce, useId as le, useSlots as ue, watch as w, withCtx as T } from "vue";
|
|
12
|
+
import { regular as de } from "@nubisco/ui/icons/warning-circle";
|
|
13
|
+
import * as fe from "@nubisco/ui/icons/bell";
|
|
14
|
+
//#region src/components/NotificationCenter.vue?vue&type=script&setup=true&lang.ts
|
|
15
|
+
var pe = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "nb-notification-center__badge",
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}, me = ["aria-describedby", "aria-busy"], he = { class: "nb-notification-center__header" }, ge = {
|
|
20
|
+
class: "nb-notification-center__sr",
|
|
21
|
+
role: "status"
|
|
22
|
+
}, _e = { class: "nb-notification-center__stale-text" }, ve = { class: "nb-notification-center__sr" }, ye = ["tabindex"], be = {
|
|
23
|
+
key: 4,
|
|
24
|
+
class: "nb-notification-center__empty"
|
|
25
|
+
}, xe = {
|
|
26
|
+
key: 5,
|
|
27
|
+
class: "nb-notification-center__footer"
|
|
28
|
+
}, E = /* @__PURE__ */ new Set(), D = 8, O = 8, k = 96, A = 88, j = 200;
|
|
29
|
+
function Se(e, { align: t, side: n, width: r, maxHeight: i, viewport: a }) {
|
|
30
|
+
let o = e.left + e.width;
|
|
31
|
+
if (n === "right" && a.width - o - D - O >= r) {
|
|
32
|
+
let n = e.top + e.height, r = t === "end" ? n - O : a.height - e.top - O, s = Math.max(A + k, r), c = Math.min(i + k, s), l = Math.max(A, Math.min(i, s - k));
|
|
33
|
+
return t === "end" ? {
|
|
34
|
+
top: Math.max(O, n - c),
|
|
35
|
+
bottom: Math.max(O, a.height - n),
|
|
36
|
+
left: o + D,
|
|
37
|
+
side: "right",
|
|
38
|
+
maxListHeight: l
|
|
39
|
+
} : {
|
|
40
|
+
top: Math.max(O, Math.min(e.top, a.height - O - c)),
|
|
41
|
+
left: o + D,
|
|
42
|
+
side: "right",
|
|
43
|
+
maxListHeight: l
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
let s = t === "start" ? e.left : e.left + e.width - r, c = Math.min(Math.max(s, O), Math.max(O, a.width - r - O)), l = e.top + e.height, u = a.height - l - D - O, ee = e.top - D - O, d = u < j && ee > u ? "top" : "bottom", f = Math.max(A, d === "top" ? ee : u), p = Math.max(A, Math.min(i, f - k)), m = Math.min(i + k, f);
|
|
47
|
+
return {
|
|
48
|
+
top: d === "top" ? Math.max(O, e.top - D - m) : l + D,
|
|
49
|
+
left: c,
|
|
50
|
+
side: d,
|
|
51
|
+
maxListHeight: p
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function Ce(e, t) {
|
|
55
|
+
return e.left <= t.width && e.left + e.width >= 0 && e.top <= t.height && e.top + e.height >= 0;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/components/NotificationCenter.vue
|
|
59
|
+
var M = /* @__PURE__ */ v({
|
|
60
|
+
__name: "NotificationCenter",
|
|
61
|
+
props: {
|
|
62
|
+
items: { default: () => [] },
|
|
63
|
+
unreadCount: { default: void 0 },
|
|
64
|
+
itemCount: { default: void 0 },
|
|
65
|
+
open: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: void 0
|
|
68
|
+
},
|
|
69
|
+
label: { default: "Notifications" },
|
|
70
|
+
markAllLabel: { default: "Mark all as read" },
|
|
71
|
+
markAllPendingLabel: { default: "Marking all as read" },
|
|
72
|
+
markAllPending: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: !1
|
|
75
|
+
},
|
|
76
|
+
emptyTitle: { default: "No notifications" },
|
|
77
|
+
emptyDescription: { default: "New activity shows up here." },
|
|
78
|
+
loadingLabel: { default: "Loading notifications" },
|
|
79
|
+
loading: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: !1
|
|
82
|
+
},
|
|
83
|
+
error: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: !1
|
|
86
|
+
},
|
|
87
|
+
errorTitle: { default: "Could not load notifications" },
|
|
88
|
+
errorDescription: { default: "The request failed. Nothing has been lost." },
|
|
89
|
+
errorStaleLabel: { default: "These may be out of date." },
|
|
90
|
+
retryLabel: { default: "Try again" },
|
|
91
|
+
showRetry: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: !0
|
|
94
|
+
},
|
|
95
|
+
maxCount: { default: 99 },
|
|
96
|
+
width: { default: 360 },
|
|
97
|
+
closeLabel: { default: void 0 },
|
|
98
|
+
maxHeight: { default: 384 },
|
|
99
|
+
align: { default: "end" },
|
|
100
|
+
side: { default: "vertical" },
|
|
101
|
+
showMarkAll: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
default: !0
|
|
104
|
+
},
|
|
105
|
+
interactive: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: !0
|
|
108
|
+
},
|
|
109
|
+
closeOnSelect: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: !0
|
|
112
|
+
},
|
|
113
|
+
closeOnNavigate: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: !0
|
|
116
|
+
},
|
|
117
|
+
disabled: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: !1
|
|
120
|
+
},
|
|
121
|
+
icon: { default: void 0 },
|
|
122
|
+
locale: { default: void 0 },
|
|
123
|
+
unreadLabel: { default: "Unread" },
|
|
124
|
+
readLabel: { default: "Read" },
|
|
125
|
+
formatUnread: {
|
|
126
|
+
type: Function,
|
|
127
|
+
default: (e) => `${e} unread`
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
emits: [
|
|
131
|
+
"update:open",
|
|
132
|
+
"open",
|
|
133
|
+
"close",
|
|
134
|
+
"select",
|
|
135
|
+
"mark-all-read",
|
|
136
|
+
"retry"
|
|
137
|
+
],
|
|
138
|
+
setup(v, { expose: D, emit: O }) {
|
|
139
|
+
let k = t(), A = i(), j = v, M = f(() => j.icon ?? fe), N = O, P = ue(), F = `nb-notification-center-${le()}`, we = `${F}-title`, Te = `${F}-trigger`, I = `${F}-error`, L = x(null), Ee = x(null), R = x(null), z = x(null), De = x(!1), B = f(() => j.open === void 0 ? De.value : j.open), V = f(() => typeof j.unreadCount == "number" ? Math.max(0, j.unreadCount) : j.items.filter((e) => !e.read).length), Oe = f(() => V.value > j.maxCount ? `${j.maxCount}+` : String(V.value)), ke = f(() => V.value > 0 ? `${j.label}, ${j.formatUnread(V.value)}` : j.label), Ae = f(() => {
|
|
140
|
+
if (typeof j.itemCount == "number") return Math.max(0, j.itemCount);
|
|
141
|
+
if (!P.default) return j.items.length;
|
|
142
|
+
}), je = f(() => (Ae.value ?? 0) > 0), H = f(() => {
|
|
143
|
+
if (j.loading) return "loading";
|
|
144
|
+
let e = Ae.value;
|
|
145
|
+
return j.error && (e === void 0 || e === 0) ? "error" : e === void 0 || e > 0 ? "list" : "empty";
|
|
146
|
+
}), Me = f(() => j.error && !j.loading && H.value === "list" && je.value);
|
|
147
|
+
x(!1), w(() => [
|
|
148
|
+
B.value,
|
|
149
|
+
!!P.default,
|
|
150
|
+
j.itemCount
|
|
151
|
+
], ([e, t, n]) => {}, { immediate: !0 });
|
|
152
|
+
function Ne() {
|
|
153
|
+
N("retry");
|
|
154
|
+
}
|
|
155
|
+
let Pe = f(() => ({
|
|
156
|
+
id: Te,
|
|
157
|
+
"aria-haspopup": "dialog",
|
|
158
|
+
"aria-expanded": B.value ? "true" : "false",
|
|
159
|
+
"aria-controls": B.value ? F : void 0,
|
|
160
|
+
"aria-label": ke.value,
|
|
161
|
+
disabled: j.disabled || void 0
|
|
162
|
+
})), Fe = f(() => ({
|
|
163
|
+
type: "button",
|
|
164
|
+
disabled: V.value === 0 && !j.markAllPending,
|
|
165
|
+
"aria-disabled": j.markAllPending ? "true" : void 0,
|
|
166
|
+
"aria-busy": j.markAllPending ? "true" : void 0,
|
|
167
|
+
onClick: st
|
|
168
|
+
})), Ie = f(() => Me.value || H.value === "error" ? I : void 0);
|
|
169
|
+
function Le(e) {
|
|
170
|
+
if (!e) {
|
|
171
|
+
R.value = null;
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
let t = e instanceof HTMLElement ? e : e.$el;
|
|
175
|
+
R.value = t instanceof HTMLElement ? t : null;
|
|
176
|
+
}
|
|
177
|
+
let U = x({
|
|
178
|
+
top: 0,
|
|
179
|
+
left: 0,
|
|
180
|
+
side: "bottom",
|
|
181
|
+
maxListHeight: j.maxHeight
|
|
182
|
+
});
|
|
183
|
+
function Re() {
|
|
184
|
+
return {
|
|
185
|
+
width: window.innerWidth,
|
|
186
|
+
height: window.innerHeight
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function ze() {
|
|
190
|
+
let e = L.value?.getBoundingClientRect();
|
|
191
|
+
e && (U.value = Se(e, {
|
|
192
|
+
align: j.align,
|
|
193
|
+
side: j.side,
|
|
194
|
+
width: j.width,
|
|
195
|
+
maxHeight: j.maxHeight,
|
|
196
|
+
viewport: Re()
|
|
197
|
+
}));
|
|
198
|
+
}
|
|
199
|
+
let { phone: Be } = r(), W = f(() => Be.value), Ve = f(() => {
|
|
200
|
+
if (!W.value) return U.value.bottom === void 0 ? {
|
|
201
|
+
top: `${Math.round(U.value.top)}px`,
|
|
202
|
+
left: `${Math.round(U.value.left)}px`,
|
|
203
|
+
width: `${j.width}px`
|
|
204
|
+
} : {
|
|
205
|
+
bottom: `${Math.round(U.value.bottom)}px`,
|
|
206
|
+
left: `${Math.round(U.value.left)}px`,
|
|
207
|
+
width: `${j.width}px`
|
|
208
|
+
};
|
|
209
|
+
}), He = f(() => W.value ? void 0 : { maxHeight: `${Math.round(U.value.maxListHeight)}px` }), Ue = f(() => ({
|
|
210
|
+
"nb-notification-center__panel--sheet": W.value,
|
|
211
|
+
"nb-notification-center__panel--start": j.align === "start",
|
|
212
|
+
"nb-notification-center__panel--above": !W.value && U.value.side === "top",
|
|
213
|
+
"nb-notification-center__panel--beside": !W.value && U.value.side === "right"
|
|
214
|
+
}));
|
|
215
|
+
function We(e) {
|
|
216
|
+
j.open === void 0 && (De.value = e), N("update:open", e);
|
|
217
|
+
}
|
|
218
|
+
function Ge() {
|
|
219
|
+
j.disabled || B.value || (ze(), We(!0), N("open"));
|
|
220
|
+
}
|
|
221
|
+
function G(e = {}) {
|
|
222
|
+
if (!B.value) return;
|
|
223
|
+
let t = z.value?.contains(document.activeElement);
|
|
224
|
+
We(!1), N("close"), (e.restoreFocus ?? t) && y(Ke);
|
|
225
|
+
}
|
|
226
|
+
function Ke() {
|
|
227
|
+
let e = R.value;
|
|
228
|
+
if (e?.isConnected) {
|
|
229
|
+
e.focus();
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
(L.value?.querySelector($e))?.focus();
|
|
233
|
+
}
|
|
234
|
+
function qe() {
|
|
235
|
+
B.value ? G({ restoreFocus: !0 }) : Ge();
|
|
236
|
+
}
|
|
237
|
+
let K = x(0), Je = new Set([
|
|
238
|
+
"button",
|
|
239
|
+
"link",
|
|
240
|
+
"menuitem",
|
|
241
|
+
"option"
|
|
242
|
+
]);
|
|
243
|
+
function Ye(e) {
|
|
244
|
+
if (e.tagName === "BUTTON") return !e.hasAttribute("disabled");
|
|
245
|
+
if (e.tagName === "A") return e.hasAttribute("href");
|
|
246
|
+
let t = e.getAttribute("role");
|
|
247
|
+
return t !== null && Je.has(t);
|
|
248
|
+
}
|
|
249
|
+
function q() {
|
|
250
|
+
return z.value ? Array.from(z.value.querySelectorAll("[data-nb-notification-item]")).filter((e) => !!Ye(e)) : [];
|
|
251
|
+
}
|
|
252
|
+
let Xe = x(void 0);
|
|
253
|
+
function Ze(e) {
|
|
254
|
+
let t = Ee.value;
|
|
255
|
+
Xe.value = t && t.childElementCount > 0 && e.length === 0 ? 0 : void 0;
|
|
256
|
+
}
|
|
257
|
+
function J(e) {
|
|
258
|
+
let t = q();
|
|
259
|
+
Ze(t), t.length && (K.value = Math.min(Math.max(e, 0), t.length - 1), t.forEach((e, t) => {
|
|
260
|
+
e.setAttribute("tabindex", t === K.value ? "0" : "-1");
|
|
261
|
+
}));
|
|
262
|
+
}
|
|
263
|
+
function Y(e) {
|
|
264
|
+
let t = q();
|
|
265
|
+
if (!t.length) return !1;
|
|
266
|
+
let n = Math.min(Math.max(e, 0), t.length - 1);
|
|
267
|
+
return J(n), t[n]?.focus(), !0;
|
|
268
|
+
}
|
|
269
|
+
function Qe(e) {
|
|
270
|
+
let t = e.target?.closest("[data-nb-notification-item]");
|
|
271
|
+
if (!t) return;
|
|
272
|
+
let n = q().indexOf(t);
|
|
273
|
+
n >= 0 && J(n);
|
|
274
|
+
}
|
|
275
|
+
let $e = "a[href]:not([tabindex=\"-1\"]), button:not([disabled]):not([tabindex=\"-1\"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex=\"0\"]";
|
|
276
|
+
function et(e) {
|
|
277
|
+
return !!e?.closest?.("input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"]");
|
|
278
|
+
}
|
|
279
|
+
function tt(e) {
|
|
280
|
+
let t = q(), n = e.target?.closest("[data-nb-notification-item]"), r = n ? t.indexOf(n) : -1;
|
|
281
|
+
if (e.key === "Escape") {
|
|
282
|
+
if (!nt(e)) return;
|
|
283
|
+
e.preventDefault(), e.stopPropagation(), G({ restoreFocus: !0 });
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
if (e.key === "Tab") {
|
|
287
|
+
rt(e);
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
if (!et(e.target)) switch (e.key) {
|
|
291
|
+
case "ArrowDown":
|
|
292
|
+
Y(r < 0 ? 0 : r + 1) && e.preventDefault();
|
|
293
|
+
break;
|
|
294
|
+
case "ArrowUp":
|
|
295
|
+
Y(r < 0 ? t.length - 1 : r - 1) && e.preventDefault();
|
|
296
|
+
break;
|
|
297
|
+
case "Home":
|
|
298
|
+
r >= 0 && (e.preventDefault(), Y(0));
|
|
299
|
+
break;
|
|
300
|
+
case "End":
|
|
301
|
+
r >= 0 && (e.preventDefault(), Y(t.length - 1));
|
|
302
|
+
break;
|
|
303
|
+
default: break;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
function nt(e) {
|
|
307
|
+
if (e.defaultPrevented) return !1;
|
|
308
|
+
let t = (e.target ?? document.activeElement)?.closest?.("[aria-modal=\"true\"]");
|
|
309
|
+
return !(t && t !== z.value);
|
|
310
|
+
}
|
|
311
|
+
function rt(e) {
|
|
312
|
+
let t = z.value;
|
|
313
|
+
if (!t) return;
|
|
314
|
+
let n = Array.from(t.querySelectorAll($e)), r = document.activeElement, i = n[0], a = n[n.length - 1], o = !n.length || r === i || !t.contains(r), s = !n.length || r === a;
|
|
315
|
+
if (e.shiftKey ? !o : !s) return;
|
|
316
|
+
e.preventDefault();
|
|
317
|
+
let c = e.shiftKey ? R.value : it();
|
|
318
|
+
G({ restoreFocus: !1 }), y(() => {
|
|
319
|
+
c?.isConnected ? c.focus() : Ke();
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
function it() {
|
|
323
|
+
let e = R.value;
|
|
324
|
+
if (!e) return null;
|
|
325
|
+
let t = Array.from(document.querySelectorAll($e)).filter((e) => !z.value?.contains(e)).filter((e) => e.tabIndex >= 0), n = t.indexOf(e);
|
|
326
|
+
return n < 0 ? null : t[n + 1] ?? null;
|
|
327
|
+
}
|
|
328
|
+
function at(e, t) {
|
|
329
|
+
N("select", e, t), j.closeOnSelect && G({ restoreFocus: !1 });
|
|
330
|
+
}
|
|
331
|
+
function ot(e) {
|
|
332
|
+
if (!P.default) return;
|
|
333
|
+
let t = e.target?.closest("[data-nb-notification-item]");
|
|
334
|
+
if (t && Ye(t)) {
|
|
335
|
+
if (e.type === "keydown") {
|
|
336
|
+
let n = e.key;
|
|
337
|
+
if (n !== "Enter" && n !== " " || t.tagName === "BUTTON" || t.tagName === "A") return;
|
|
338
|
+
e.preventDefault();
|
|
339
|
+
}
|
|
340
|
+
N("select", null, e), j.closeOnSelect && G({ restoreFocus: !1 });
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
function st() {
|
|
344
|
+
j.markAllPending || N("mark-all-read");
|
|
345
|
+
}
|
|
346
|
+
function ct(e) {
|
|
347
|
+
let t = e.target;
|
|
348
|
+
L.value?.contains(t) || z.value?.contains(t) || G({ restoreFocus: !1 });
|
|
349
|
+
}
|
|
350
|
+
function lt(e) {
|
|
351
|
+
e.key === "Escape" && (z.value?.contains(document.activeElement) || nt(e) && G({ restoreFocus: L.value?.contains(document.activeElement) ?? !1 }));
|
|
352
|
+
}
|
|
353
|
+
let X = 0;
|
|
354
|
+
function Z() {
|
|
355
|
+
!B.value || X || (X = requestAnimationFrame(() => {
|
|
356
|
+
X = 0, dt();
|
|
357
|
+
}));
|
|
358
|
+
}
|
|
359
|
+
function ut() {
|
|
360
|
+
X &&= (cancelAnimationFrame(X), 0);
|
|
361
|
+
}
|
|
362
|
+
function dt() {
|
|
363
|
+
if (!B.value || W.value) return;
|
|
364
|
+
let e = L.value?.getBoundingClientRect();
|
|
365
|
+
if (e && !Ce(e, Re())) {
|
|
366
|
+
G({ restoreFocus: !1 });
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
ze();
|
|
370
|
+
}
|
|
371
|
+
function Q() {
|
|
372
|
+
j.closeOnNavigate && G({ restoreFocus: !1 });
|
|
373
|
+
}
|
|
374
|
+
function ft() {
|
|
375
|
+
return window.navigation;
|
|
376
|
+
}
|
|
377
|
+
function pt() {
|
|
378
|
+
document.addEventListener("mousedown", ct), document.addEventListener("keydown", lt), window.addEventListener("resize", Z), window.addEventListener("scroll", Z, !0), window.addEventListener("popstate", Q), window.addEventListener("hashchange", Q), ft()?.addEventListener("navigate", Q);
|
|
379
|
+
}
|
|
380
|
+
function mt() {
|
|
381
|
+
ut(), document.removeEventListener("mousedown", ct), document.removeEventListener("keydown", lt), window.removeEventListener("resize", Z), window.removeEventListener("scroll", Z, !0), window.removeEventListener("popstate", Q), window.removeEventListener("hashchange", Q), ft()?.removeEventListener("navigate", Q);
|
|
382
|
+
}
|
|
383
|
+
let $ = () => G({ restoreFocus: !1 });
|
|
384
|
+
return w(B, (e) => {
|
|
385
|
+
if (e) {
|
|
386
|
+
for (let e of [...E]) e !== $ && e();
|
|
387
|
+
E.add($), pt(), y(() => {
|
|
388
|
+
ze(), J(0), Y(0) || z.value?.focus();
|
|
389
|
+
});
|
|
390
|
+
} else E.delete($), mt(), K.value = 0;
|
|
391
|
+
}), w(() => [j.items.length, H.value], () => {
|
|
392
|
+
B.value && y(() => J(K.value));
|
|
393
|
+
}), oe(() => {
|
|
394
|
+
mt(), E.delete($);
|
|
395
|
+
let e = z.value;
|
|
396
|
+
e?.isConnected && e.remove();
|
|
397
|
+
}), D({
|
|
398
|
+
show: Ge,
|
|
399
|
+
close: G,
|
|
400
|
+
toggle: qe,
|
|
401
|
+
isOpen: B,
|
|
402
|
+
unreadCount: V
|
|
403
|
+
}), (t, r) => (b(), h("div", {
|
|
404
|
+
ref_key: "rootRef",
|
|
405
|
+
ref: L,
|
|
406
|
+
class: "nb-notification-center"
|
|
407
|
+
}, [S(t.$slots, "trigger", {
|
|
408
|
+
open: B.value,
|
|
409
|
+
toggle: qe,
|
|
410
|
+
show: Ge,
|
|
411
|
+
close: G,
|
|
412
|
+
unreadCount: V.value,
|
|
413
|
+
badge: Oe.value,
|
|
414
|
+
panelId: F,
|
|
415
|
+
triggerProps: Pe.value,
|
|
416
|
+
setTriggerRef: Le
|
|
417
|
+
}, () => [_(e, re({
|
|
418
|
+
ref: Le,
|
|
419
|
+
class: ["nb-notification-center__trigger", { "nb-notification-center__trigger--active": B.value }],
|
|
420
|
+
variant: "ghost",
|
|
421
|
+
size: "sm",
|
|
422
|
+
icon: M.value,
|
|
423
|
+
label: v.label
|
|
424
|
+
}, Pe.value, { onClick: qe }), null, 16, [
|
|
425
|
+
"class",
|
|
426
|
+
"icon",
|
|
427
|
+
"label"
|
|
428
|
+
]), V.value > 0 ? (b(), h("span", pe, C(Oe.value), 1)) : m("", !0)]), (b(), p(ee, {
|
|
429
|
+
to: "body",
|
|
430
|
+
disabled: !ce(k)
|
|
431
|
+
}, [_(d, { name: "nb-notification-center-pop" }, {
|
|
432
|
+
default: T(() => [B.value ? (b(), h("div", {
|
|
433
|
+
key: 0,
|
|
434
|
+
id: F,
|
|
435
|
+
ref_key: "panelRef",
|
|
436
|
+
ref: z,
|
|
437
|
+
class: ie(["nb-notification-center__panel", Ue.value]),
|
|
438
|
+
style: ae(Ve.value),
|
|
439
|
+
role: "dialog",
|
|
440
|
+
tabindex: "-1",
|
|
441
|
+
"aria-labelledby": we,
|
|
442
|
+
"aria-describedby": Ie.value,
|
|
443
|
+
"aria-busy": v.loading ? "true" : void 0,
|
|
444
|
+
onKeydown: tt,
|
|
445
|
+
onFocusin: Qe
|
|
446
|
+
}, [
|
|
447
|
+
g("div", he, [
|
|
448
|
+
g("h2", {
|
|
449
|
+
id: we,
|
|
450
|
+
class: "nb-notification-center__title"
|
|
451
|
+
}, C(v.label), 1),
|
|
452
|
+
S(t.$slots, "header-start", {
|
|
453
|
+
close: G,
|
|
454
|
+
unreadCount: V.value
|
|
455
|
+
}),
|
|
456
|
+
S(t.$slots, "header-actions", {
|
|
457
|
+
close: G,
|
|
458
|
+
unreadCount: V.value,
|
|
459
|
+
markAllRead: st,
|
|
460
|
+
markAllPending: v.markAllPending,
|
|
461
|
+
markAllProps: Fe.value,
|
|
462
|
+
markAllText: v.markAllPending ? v.markAllPendingLabel : v.markAllLabel
|
|
463
|
+
}, () => [v.showMarkAll ? (b(), h("button", re({
|
|
464
|
+
key: 0,
|
|
465
|
+
class: "nb-notification-center__mark-all"
|
|
466
|
+
}, Fe.value), [v.markAllPending ? (b(), p(a, {
|
|
467
|
+
key: 0,
|
|
468
|
+
size: "xs",
|
|
469
|
+
tone: "inherit",
|
|
470
|
+
decorative: ""
|
|
471
|
+
})) : m("", !0), ne(" " + C(v.markAllPending ? v.markAllPendingLabel : v.markAllLabel), 1)], 16)) : m("", !0)]),
|
|
472
|
+
W.value ? (b(), p(s, {
|
|
473
|
+
key: 0,
|
|
474
|
+
class: "nb-notification-center__close",
|
|
475
|
+
size: "lg",
|
|
476
|
+
label: v.closeLabel ?? ce(A).notificationCenterClose,
|
|
477
|
+
onClick: r[0] ||= (e) => G()
|
|
478
|
+
}, null, 8, ["label"])) : m("", !0)
|
|
479
|
+
]),
|
|
480
|
+
g("span", ge, C(v.markAllPending ? v.markAllPendingLabel : ""), 1),
|
|
481
|
+
Me.value ? (b(), h("div", {
|
|
482
|
+
key: 0,
|
|
483
|
+
id: I,
|
|
484
|
+
class: "nb-notification-center__stale",
|
|
485
|
+
role: "status"
|
|
486
|
+
}, [
|
|
487
|
+
_(n, {
|
|
488
|
+
name: ce(de),
|
|
489
|
+
size: "sm",
|
|
490
|
+
"aria-hidden": "true"
|
|
491
|
+
}, null, 8, ["name"]),
|
|
492
|
+
g("span", _e, C(v.errorStaleLabel), 1),
|
|
493
|
+
v.showRetry ? (b(), h("button", {
|
|
494
|
+
key: 0,
|
|
495
|
+
type: "button",
|
|
496
|
+
class: "nb-notification-center__retry",
|
|
497
|
+
onClick: Ne
|
|
498
|
+
}, C(v.retryLabel), 1)) : m("", !0)
|
|
499
|
+
])) : m("", !0),
|
|
500
|
+
H.value === "loading" ? (b(), h("div", {
|
|
501
|
+
key: 1,
|
|
502
|
+
class: "nb-notification-center__loading",
|
|
503
|
+
role: "status",
|
|
504
|
+
style: ae(He.value)
|
|
505
|
+
}, [g("span", ve, C(v.loadingLabel), 1), (b(), h(u, null, se(3, (e) => _(c, {
|
|
506
|
+
key: e,
|
|
507
|
+
variant: "text",
|
|
508
|
+
type: "body-sm",
|
|
509
|
+
lines: 2,
|
|
510
|
+
"last-line-width": "60%"
|
|
511
|
+
})), 64))], 4)) : H.value === "error" ? (b(), h("div", {
|
|
512
|
+
key: 2,
|
|
513
|
+
id: I,
|
|
514
|
+
class: "nb-notification-center__error",
|
|
515
|
+
role: "alert"
|
|
516
|
+
}, [S(t.$slots, "error", { retry: Ne }, () => [_(o, {
|
|
517
|
+
size: "sm",
|
|
518
|
+
kind: "error",
|
|
519
|
+
title: v.errorTitle,
|
|
520
|
+
description: v.errorDescription
|
|
521
|
+
}, te({ _: 2 }, [v.showRetry ? {
|
|
522
|
+
name: "actions",
|
|
523
|
+
fn: T(() => [_(e, {
|
|
524
|
+
size: "sm",
|
|
525
|
+
variant: "secondary",
|
|
526
|
+
onClick: Ne
|
|
527
|
+
}, {
|
|
528
|
+
default: T(() => [ne(C(v.retryLabel), 1)]),
|
|
529
|
+
_: 1
|
|
530
|
+
})]),
|
|
531
|
+
key: "0"
|
|
532
|
+
} : void 0]), 1032, ["title", "description"])])])) : H.value === "list" ? (b(), h("ul", {
|
|
533
|
+
key: 3,
|
|
534
|
+
ref_key: "listRef",
|
|
535
|
+
ref: Ee,
|
|
536
|
+
class: "nb-notification-center__list",
|
|
537
|
+
role: "list",
|
|
538
|
+
tabindex: Xe.value,
|
|
539
|
+
style: ae(He.value),
|
|
540
|
+
onClick: ot,
|
|
541
|
+
onKeydown: ot
|
|
542
|
+
}, [S(t.$slots, "default", {
|
|
543
|
+
close: G,
|
|
544
|
+
items: v.items
|
|
545
|
+
}, () => [(b(!0), h(u, null, se(v.items, (e) => (b(), p(l, {
|
|
546
|
+
key: e.id,
|
|
547
|
+
title: e.title,
|
|
548
|
+
body: e.body,
|
|
549
|
+
time: e.time,
|
|
550
|
+
"time-label": e.timeLabel,
|
|
551
|
+
read: e.read,
|
|
552
|
+
variant: e.variant ?? "neutral",
|
|
553
|
+
icon: e.icon,
|
|
554
|
+
href: e.href,
|
|
555
|
+
interactive: e.interactive ?? v.interactive,
|
|
556
|
+
locale: v.locale,
|
|
557
|
+
"unread-label": v.unreadLabel,
|
|
558
|
+
"read-label": v.readLabel,
|
|
559
|
+
onSelect: (t) => at(e, t)
|
|
560
|
+
}, null, 8, [
|
|
561
|
+
"title",
|
|
562
|
+
"body",
|
|
563
|
+
"time",
|
|
564
|
+
"time-label",
|
|
565
|
+
"read",
|
|
566
|
+
"variant",
|
|
567
|
+
"icon",
|
|
568
|
+
"href",
|
|
569
|
+
"interactive",
|
|
570
|
+
"locale",
|
|
571
|
+
"unread-label",
|
|
572
|
+
"read-label",
|
|
573
|
+
"onSelect"
|
|
574
|
+
]))), 128))])], 44, ye)) : H.value === "empty" ? (b(), h("div", be, [S(t.$slots, "empty", {}, () => [_(o, {
|
|
575
|
+
size: "sm",
|
|
576
|
+
icon: M.value,
|
|
577
|
+
title: v.emptyTitle,
|
|
578
|
+
description: v.emptyDescription
|
|
579
|
+
}, null, 8, [
|
|
580
|
+
"icon",
|
|
581
|
+
"title",
|
|
582
|
+
"description"
|
|
583
|
+
])])])) : m("", !0),
|
|
584
|
+
t.$slots.footer ? (b(), h("div", xe, [S(t.$slots, "footer", { close: G })])) : m("", !0)
|
|
585
|
+
], 46, me)) : m("", !0)]),
|
|
586
|
+
_: 3
|
|
587
|
+
})], 8, ["disabled"]))], 512));
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
//#endregion
|
|
591
|
+
export { M as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./Button-
|
|
1
|
+
import { t as e } from "./Button-DmJ_J3UO.js";
|
|
2
2
|
import { t } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
3
3
|
import { useStableId as ee } from "./composables/useStableId.composable.mjs";
|
|
4
4
|
import { useNbStrings as n } from "./composables/useNbStrings.composable.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Button-5ClGtoaz.cjs`),t=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),n=require(`./composables/useStableId.composable.cjs`),r=require(`./composables/useNbStrings.composable.cjs`),i=require(`./Label-CjxnZgNy.cjs`),a=require(`./Message-B1CQ0Bcf.cjs`),o=require(`./InputGroup.context-BHj-IvcT.cjs`),s=require(`./composables/useFieldMessage.composable.cjs`);let c=require(`vue`),l=require(`@nubisco/ui/icons/plus`),u=require(`@nubisco/ui/icons/minus`);var d=[`id`,`aria-invalid`,`aria-describedby`,`placeholder`,`min`,`max`,`step`,`disabled`,`required`],f={class:`nb-number-input__steppers`},p={key:0,class:`nb-number-input__inner-header`},m=[`for`],h={key:0,class:`nb-number-input__asterisk`,"aria-hidden":`true`},g={class:`nb-number-input__fluid-row`},_=[`id`,`aria-invalid`,`aria-describedby`,`placeholder`,`min`,`max`,`step`,`disabled`,`required`],v={class:`nb-number-input__steppers`},y=(0,c.defineComponent)({__name:`NumberInput`,props:{modelValue:{default:null},min:{default:void 0},max:{default:void 0},step:{default:1},placeholder:{default:``},name:{},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`,`change`],setup(t,{expose:y,emit:b}){let x=r.useNbStrings(),S=t,C=b,w=(0,c.ref)(null),T=(0,c.ref)(!1),E=o.n(S,n.useStableId({})),D=E.grouped,O=E.id,k=E.size,A=E.disabled,{ids:j,messageId:M,invalid:N,live:P,key:F}=s.useFieldMessage(S,O),I=(0,c.computed)(()=>s.joinDescribedBy(D?void 0:M.value,E.describedBy.value)),L=(0,c.computed)(()=>N.value??(E.status.value===`error`?`true`:void 0)),R=(0,c.computed)(()=>!D&&!!S.error||E.status.value===`error`),z=(0,c.computed)(()=>!R.value&&(!D&&!!S.warning||E.status.value===`warning`)),B=(0,c.computed)(()=>S.min!==void 0&&S.modelValue!==null&&S.modelValue!==void 0&&S.modelValue<=S.min),V=(0,c.computed)(()=>S.max!==void 0&&S.modelValue!==null&&S.modelValue!==void 0&&S.modelValue>=S.max);function H(e){let t=e;return S.min!==void 0&&(t=Math.max(S.min,t)),S.max!==void 0&&(t=Math.min(S.max,t)),t}function U(e){w.value&&(w.value.value=e==null?``:String(e))}(0,c.onMounted)(()=>U(S.modelValue)),(0,c.watch)(()=>S.modelValue,e=>{T.value||U(e)});function W(){let e=H((S.modelValue??0)+S.step);C(`update:modelValue`,e),C(`change`,e),U(e)}function G(){let e=H((S.modelValue??0)-S.step);C(`update:modelValue`,e),C(`change`,e),U(e)}function K(){if(!w.value)return;let e=w.value.value;if(e===``)C(`update:modelValue`,null);else{let t=parseFloat(e);isNaN(t)||C(`update:modelValue`,t)}}function q(){if(T.value=!1,!w.value)return;let e=w.value.value;if(e===``){C(`update:modelValue`,null),C(`change`,null);return}let t=parseFloat(e);if(!isNaN(t)){let e=H(t);C(`update:modelValue`,e),C(`change`,e),U(e)}}let J=(0,c.computed)(()=>[`nb-number-input`,`nb-number-input--${S.variant}`,`nb-number-input--${k.value}`,{"nb-number-input--error":R.value,"nb-number-input--warning":z.value,"nb-number-input--disabled":A.value}]),Y=(0,c.computed)(()=>({"nb-number-input__field-wrapper--focused":T.value,"nb-number-input__field-wrapper--error":R.value,"nb-number-input__field-wrapper--warning":z.value,"nb-number-input__field-wrapper--disabled":A.value}));return y({focus:()=>w.value?.focus()}),(n,r)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{class:(0,c.normalizeClass)(J.value)},[t.variant===`default`?((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:0},[t.label&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(i.t,{key:0,for:(0,c.unref)(O),required:t.required,disabled:(0,c.unref)(A)},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.label),1)]),_:1},8,[`for`,`required`,`disabled`])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`nb-number-input__field-wrapper`,Y.value])},[(0,c.createElementVNode)(`input`,{id:(0,c.unref)(O),ref_key:`inputRef`,ref:w,"aria-invalid":L.value,"aria-describedby":I.value,type:`number`,class:`nb-number-input__field`,placeholder:t.placeholder,min:t.min,max:t.max,step:t.step,disabled:(0,c.unref)(A),required:t.required,onInput:K,onBlur:q,onKeydown:r[0]||=(0,c.withKeys)((0,c.withModifiers)(()=>w.value?.blur(),[`prevent`]),[`enter`]),onFocus:r[1]||=e=>T.value=!0},null,40,d),t.error&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:0,variant:`error`,"icon-only":!0,live:`off`,"aria-hidden":`true`,class:`nb-number-input__status`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.error),1)]),_:1})):t.warning&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:1,variant:`warning`,"icon-only":!0,live:`off`,"aria-hidden":`true`,class:`nb-number-input__status`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.warning),1)]),_:1})):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,f,[r[8]||=(0,c.createElementVNode)(`span`,{class:`nb-number-input__divider`,"aria-hidden":`true`},null,-1),(0,c.createVNode)(e.t,{variant:`ghost`,icon:(0,c.unref)(u.regular),size:(0,c.unref)(k),label:(0,c.unref)(x).numberInputDecrease,"tooltip-position":`top`,class:(0,c.normalizeClass)([`nb-number-input__stepper`,{"nb-number-input__stepper--at-limit":B.value}]),tabindex:`-1`,disabled:(0,c.unref)(A),"aria-disabled":B.value||void 0,onMousedown:r[2]||=(0,c.withModifiers)(()=>{},[`prevent`]),onClick:G},null,8,[`icon`,`size`,`label`,`class`,`disabled`,`aria-disabled`]),r[9]||=(0,c.createElementVNode)(`span`,{class:`nb-number-input__divider`,"aria-hidden":`true`},null,-1),(0,c.createVNode)(e.t,{variant:`ghost`,icon:(0,c.unref)(l.regular),size:(0,c.unref)(k),label:(0,c.unref)(x).numberInputIncrease,"tooltip-position":`top`,class:(0,c.normalizeClass)([`nb-number-input__stepper`,{"nb-number-input__stepper--at-limit":V.value}]),tabindex:`-1`,disabled:(0,c.unref)(A),"aria-disabled":V.value||void 0,onMousedown:r[3]||=(0,c.withModifiers)(()=>{},[`prevent`]),onClick:W},null,8,[`icon`,`size`,`label`,`class`,`disabled`,`aria-disabled`])])],2),t.error&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{id:(0,c.unref)(j).error,key:(0,c.unref)(F),variant:`error`,live:(0,c.unref)(P),class:`nb-number-input__message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.error),1)]),_:1},8,[`id`,`live`])):t.warning&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{id:(0,c.unref)(j).warning,key:(0,c.unref)(F),variant:`warning`,live:(0,c.unref)(P),class:`nb-number-input__message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.warning),1)]),_:1},8,[`id`,`live`])):t.helper&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{id:(0,c.unref)(j).helper,key:(0,c.unref)(F),variant:`helper`,live:(0,c.unref)(P),class:`nb-number-input__message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.helper),1)]),_:1},8,[`id`,`live`])):(0,c.createCommentVNode)(``,!0)],64)):t.variant===`fluid`?((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:1},[(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`nb-number-input__field-wrapper`,Y.value])},[t.label&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,p,[(0,c.createElementVNode)(`label`,{for:(0,c.unref)(O),class:`nb-number-input__inner-label`},[(0,c.createTextVNode)((0,c.toDisplayString)(t.label)+` `,1),t.required?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,h,`*`)):(0,c.createCommentVNode)(``,!0)],8,m),t.helper&&!t.error&&!t.warning?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:0,id:(0,c.unref)(j).helper,variant:`helper`,live:`off`,"icon-only":!0,class:`nb-number-input__inner-message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.helper),1)]),_:1},8,[`id`])):(0,c.createCommentVNode)(``,!0)])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,g,[(0,c.createElementVNode)(`input`,{id:(0,c.unref)(O),ref_key:`inputRef`,ref:w,"aria-invalid":L.value,"aria-describedby":I.value,type:`number`,class:`nb-number-input__field`,placeholder:t.placeholder,min:t.min,max:t.max,step:t.step,disabled:(0,c.unref)(A),required:t.required,onInput:K,onBlur:q,onKeydown:r[4]||=(0,c.withKeys)((0,c.withModifiers)(()=>w.value?.blur(),[`prevent`]),[`enter`]),onFocus:r[5]||=e=>T.value=!0},null,40,_),t.error&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:0,variant:`error`,"icon-only":!0,live:`off`,"aria-hidden":`true`,class:`nb-number-input__status`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.error),1)]),_:1})):t.warning&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:1,variant:`warning`,"icon-only":!0,live:`off`,"aria-hidden":`true`,class:`nb-number-input__status`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.warning),1)]),_:1})):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,v,[r[10]||=(0,c.createElementVNode)(`span`,{class:`nb-number-input__divider`,"aria-hidden":`true`},null,-1),(0,c.createVNode)(e.t,{variant:`ghost`,icon:(0,c.unref)(u.regular),size:(0,c.unref)(k),label:(0,c.unref)(x).numberInputDecrease,"tooltip-position":`top`,class:(0,c.normalizeClass)([`nb-number-input__stepper`,{"nb-number-input__stepper--at-limit":B.value}]),tabindex:`-1`,disabled:(0,c.unref)(A),"aria-disabled":B.value||void 0,onMousedown:r[6]||=(0,c.withModifiers)(()=>{},[`prevent`]),onClick:G},null,8,[`icon`,`size`,`label`,`class`,`disabled`,`aria-disabled`]),r[11]||=(0,c.createElementVNode)(`span`,{class:`nb-number-input__divider`,"aria-hidden":`true`},null,-1),(0,c.createVNode)(e.t,{variant:`ghost`,icon:(0,c.unref)(l.regular),size:(0,c.unref)(k),label:(0,c.unref)(x).numberInputIncrease,"tooltip-position":`top`,class:(0,c.normalizeClass)([`nb-number-input__stepper`,{"nb-number-input__stepper--at-limit":V.value}]),tabindex:`-1`,disabled:(0,c.unref)(A),"aria-disabled":V.value||void 0,onMousedown:r[7]||=(0,c.withModifiers)(()=>{},[`prevent`]),onClick:W},null,8,[`icon`,`size`,`label`,`class`,`disabled`,`aria-disabled`])])])],2),t.error&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{id:(0,c.unref)(j).error,key:(0,c.unref)(F),variant:`error`,live:(0,c.unref)(P),class:`nb-number-input__fluid-message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.error),1)]),_:1},8,[`id`,`live`])):t.warning&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{id:(0,c.unref)(j).warning,key:(0,c.unref)(F),variant:`warning`,live:(0,c.unref)(P),class:`nb-number-input__fluid-message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.warning),1)]),_:1},8,[`id`,`live`])):(0,c.createCommentVNode)(``,!0)],64)):(0,c.createCommentVNode)(``,!0)],2))}}),b=t.t(y,[[`__scopeId`,`data-v-3d9d7c38`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return b}});
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Button-CGIbF1e-.cjs`),t=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),n=require(`./composables/useStableId.composable.cjs`),r=require(`./composables/useNbStrings.composable.cjs`),i=require(`./Label-CjxnZgNy.cjs`),a=require(`./Message-B1CQ0Bcf.cjs`),o=require(`./InputGroup.context-BHj-IvcT.cjs`),s=require(`./composables/useFieldMessage.composable.cjs`);let c=require(`vue`),l=require(`@nubisco/ui/icons/plus`),u=require(`@nubisco/ui/icons/minus`);var d=[`id`,`aria-invalid`,`aria-describedby`,`placeholder`,`min`,`max`,`step`,`disabled`,`required`],f={class:`nb-number-input__steppers`},p={key:0,class:`nb-number-input__inner-header`},m=[`for`],h={key:0,class:`nb-number-input__asterisk`,"aria-hidden":`true`},g={class:`nb-number-input__fluid-row`},_=[`id`,`aria-invalid`,`aria-describedby`,`placeholder`,`min`,`max`,`step`,`disabled`,`required`],v={class:`nb-number-input__steppers`},y=(0,c.defineComponent)({__name:`NumberInput`,props:{modelValue:{default:null},min:{default:void 0},max:{default:void 0},step:{default:1},placeholder:{default:``},name:{},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`,`change`],setup(t,{expose:y,emit:b}){let x=r.useNbStrings(),S=t,C=b,w=(0,c.ref)(null),T=(0,c.ref)(!1),E=o.n(S,n.useStableId({})),D=E.grouped,O=E.id,k=E.size,A=E.disabled,{ids:j,messageId:M,invalid:N,live:P,key:F}=s.useFieldMessage(S,O),I=(0,c.computed)(()=>s.joinDescribedBy(D?void 0:M.value,E.describedBy.value)),L=(0,c.computed)(()=>N.value??(E.status.value===`error`?`true`:void 0)),R=(0,c.computed)(()=>!D&&!!S.error||E.status.value===`error`),z=(0,c.computed)(()=>!R.value&&(!D&&!!S.warning||E.status.value===`warning`)),B=(0,c.computed)(()=>S.min!==void 0&&S.modelValue!==null&&S.modelValue!==void 0&&S.modelValue<=S.min),V=(0,c.computed)(()=>S.max!==void 0&&S.modelValue!==null&&S.modelValue!==void 0&&S.modelValue>=S.max);function H(e){let t=e;return S.min!==void 0&&(t=Math.max(S.min,t)),S.max!==void 0&&(t=Math.min(S.max,t)),t}function U(e){w.value&&(w.value.value=e==null?``:String(e))}(0,c.onMounted)(()=>U(S.modelValue)),(0,c.watch)(()=>S.modelValue,e=>{T.value||U(e)});function W(){let e=H((S.modelValue??0)+S.step);C(`update:modelValue`,e),C(`change`,e),U(e)}function G(){let e=H((S.modelValue??0)-S.step);C(`update:modelValue`,e),C(`change`,e),U(e)}function K(){if(!w.value)return;let e=w.value.value;if(e===``)C(`update:modelValue`,null);else{let t=parseFloat(e);isNaN(t)||C(`update:modelValue`,t)}}function q(){if(T.value=!1,!w.value)return;let e=w.value.value;if(e===``){C(`update:modelValue`,null),C(`change`,null);return}let t=parseFloat(e);if(!isNaN(t)){let e=H(t);C(`update:modelValue`,e),C(`change`,e),U(e)}}let J=(0,c.computed)(()=>[`nb-number-input`,`nb-number-input--${S.variant}`,`nb-number-input--${k.value}`,{"nb-number-input--error":R.value,"nb-number-input--warning":z.value,"nb-number-input--disabled":A.value}]),Y=(0,c.computed)(()=>({"nb-number-input__field-wrapper--focused":T.value,"nb-number-input__field-wrapper--error":R.value,"nb-number-input__field-wrapper--warning":z.value,"nb-number-input__field-wrapper--disabled":A.value}));return y({focus:()=>w.value?.focus()}),(n,r)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{class:(0,c.normalizeClass)(J.value)},[t.variant===`default`?((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:0},[t.label&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(i.t,{key:0,for:(0,c.unref)(O),required:t.required,disabled:(0,c.unref)(A)},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.label),1)]),_:1},8,[`for`,`required`,`disabled`])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`nb-number-input__field-wrapper`,Y.value])},[(0,c.createElementVNode)(`input`,{id:(0,c.unref)(O),ref_key:`inputRef`,ref:w,"aria-invalid":L.value,"aria-describedby":I.value,type:`number`,class:`nb-number-input__field`,placeholder:t.placeholder,min:t.min,max:t.max,step:t.step,disabled:(0,c.unref)(A),required:t.required,onInput:K,onBlur:q,onKeydown:r[0]||=(0,c.withKeys)((0,c.withModifiers)(()=>w.value?.blur(),[`prevent`]),[`enter`]),onFocus:r[1]||=e=>T.value=!0},null,40,d),t.error&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:0,variant:`error`,"icon-only":!0,live:`off`,"aria-hidden":`true`,class:`nb-number-input__status`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.error),1)]),_:1})):t.warning&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:1,variant:`warning`,"icon-only":!0,live:`off`,"aria-hidden":`true`,class:`nb-number-input__status`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.warning),1)]),_:1})):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,f,[r[8]||=(0,c.createElementVNode)(`span`,{class:`nb-number-input__divider`,"aria-hidden":`true`},null,-1),(0,c.createVNode)(e.t,{variant:`ghost`,icon:(0,c.unref)(u.regular),size:(0,c.unref)(k),label:(0,c.unref)(x).numberInputDecrease,"tooltip-position":`top`,class:(0,c.normalizeClass)([`nb-number-input__stepper`,{"nb-number-input__stepper--at-limit":B.value}]),tabindex:`-1`,disabled:(0,c.unref)(A),"aria-disabled":B.value||void 0,onMousedown:r[2]||=(0,c.withModifiers)(()=>{},[`prevent`]),onClick:G},null,8,[`icon`,`size`,`label`,`class`,`disabled`,`aria-disabled`]),r[9]||=(0,c.createElementVNode)(`span`,{class:`nb-number-input__divider`,"aria-hidden":`true`},null,-1),(0,c.createVNode)(e.t,{variant:`ghost`,icon:(0,c.unref)(l.regular),size:(0,c.unref)(k),label:(0,c.unref)(x).numberInputIncrease,"tooltip-position":`top`,class:(0,c.normalizeClass)([`nb-number-input__stepper`,{"nb-number-input__stepper--at-limit":V.value}]),tabindex:`-1`,disabled:(0,c.unref)(A),"aria-disabled":V.value||void 0,onMousedown:r[3]||=(0,c.withModifiers)(()=>{},[`prevent`]),onClick:W},null,8,[`icon`,`size`,`label`,`class`,`disabled`,`aria-disabled`])])],2),t.error&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{id:(0,c.unref)(j).error,key:(0,c.unref)(F),variant:`error`,live:(0,c.unref)(P),class:`nb-number-input__message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.error),1)]),_:1},8,[`id`,`live`])):t.warning&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{id:(0,c.unref)(j).warning,key:(0,c.unref)(F),variant:`warning`,live:(0,c.unref)(P),class:`nb-number-input__message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.warning),1)]),_:1},8,[`id`,`live`])):t.helper&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{id:(0,c.unref)(j).helper,key:(0,c.unref)(F),variant:`helper`,live:(0,c.unref)(P),class:`nb-number-input__message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.helper),1)]),_:1},8,[`id`,`live`])):(0,c.createCommentVNode)(``,!0)],64)):t.variant===`fluid`?((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:1},[(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`nb-number-input__field-wrapper`,Y.value])},[t.label&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,p,[(0,c.createElementVNode)(`label`,{for:(0,c.unref)(O),class:`nb-number-input__inner-label`},[(0,c.createTextVNode)((0,c.toDisplayString)(t.label)+` `,1),t.required?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,h,`*`)):(0,c.createCommentVNode)(``,!0)],8,m),t.helper&&!t.error&&!t.warning?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:0,id:(0,c.unref)(j).helper,variant:`helper`,live:`off`,"icon-only":!0,class:`nb-number-input__inner-message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.helper),1)]),_:1},8,[`id`])):(0,c.createCommentVNode)(``,!0)])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,g,[(0,c.createElementVNode)(`input`,{id:(0,c.unref)(O),ref_key:`inputRef`,ref:w,"aria-invalid":L.value,"aria-describedby":I.value,type:`number`,class:`nb-number-input__field`,placeholder:t.placeholder,min:t.min,max:t.max,step:t.step,disabled:(0,c.unref)(A),required:t.required,onInput:K,onBlur:q,onKeydown:r[4]||=(0,c.withKeys)((0,c.withModifiers)(()=>w.value?.blur(),[`prevent`]),[`enter`]),onFocus:r[5]||=e=>T.value=!0},null,40,_),t.error&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:0,variant:`error`,"icon-only":!0,live:`off`,"aria-hidden":`true`,class:`nb-number-input__status`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.error),1)]),_:1})):t.warning&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:1,variant:`warning`,"icon-only":!0,live:`off`,"aria-hidden":`true`,class:`nb-number-input__status`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.warning),1)]),_:1})):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,v,[r[10]||=(0,c.createElementVNode)(`span`,{class:`nb-number-input__divider`,"aria-hidden":`true`},null,-1),(0,c.createVNode)(e.t,{variant:`ghost`,icon:(0,c.unref)(u.regular),size:(0,c.unref)(k),label:(0,c.unref)(x).numberInputDecrease,"tooltip-position":`top`,class:(0,c.normalizeClass)([`nb-number-input__stepper`,{"nb-number-input__stepper--at-limit":B.value}]),tabindex:`-1`,disabled:(0,c.unref)(A),"aria-disabled":B.value||void 0,onMousedown:r[6]||=(0,c.withModifiers)(()=>{},[`prevent`]),onClick:G},null,8,[`icon`,`size`,`label`,`class`,`disabled`,`aria-disabled`]),r[11]||=(0,c.createElementVNode)(`span`,{class:`nb-number-input__divider`,"aria-hidden":`true`},null,-1),(0,c.createVNode)(e.t,{variant:`ghost`,icon:(0,c.unref)(l.regular),size:(0,c.unref)(k),label:(0,c.unref)(x).numberInputIncrease,"tooltip-position":`top`,class:(0,c.normalizeClass)([`nb-number-input__stepper`,{"nb-number-input__stepper--at-limit":V.value}]),tabindex:`-1`,disabled:(0,c.unref)(A),"aria-disabled":V.value||void 0,onMousedown:r[7]||=(0,c.withModifiers)(()=>{},[`prevent`]),onClick:W},null,8,[`icon`,`size`,`label`,`class`,`disabled`,`aria-disabled`])])])],2),t.error&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{id:(0,c.unref)(j).error,key:(0,c.unref)(F),variant:`error`,live:(0,c.unref)(P),class:`nb-number-input__fluid-message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.error),1)]),_:1},8,[`id`,`live`])):t.warning&&!(0,c.unref)(D)?((0,c.openBlock)(),(0,c.createBlock)(a.t,{id:(0,c.unref)(j).warning,key:(0,c.unref)(F),variant:`warning`,live:(0,c.unref)(P),class:`nb-number-input__fluid-message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(t.warning),1)]),_:1},8,[`id`,`live`])):(0,c.createCommentVNode)(``,!0)],64)):(0,c.createCommentVNode)(``,!0)],2))}}),b=t.t(y,[[`__scopeId`,`data-v-3d9d7c38`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return b}});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "./Button-
|
|
1
|
+
import { t as e } from "./Button-DmJ_J3UO.js";
|
|
2
2
|
import { useNbStrings as t } from "./composables/useNbStrings.composable.mjs";
|
|
3
3
|
import { t as n } from "./Toolbar.context-Bli1SqM3.js";
|
|
4
|
-
import { t as r } from "./Menu-
|
|
4
|
+
import { t as r } from "./Menu-CWxBEMC4.js";
|
|
5
5
|
import { t as i } from "./MenuItem-DMYDHaa0.js";
|
|
6
6
|
import { Fragment as a, computed as o, createBlock as s, createElementBlock as c, createVNode as l, defineComponent as u, inject as d, nextTick as f, openBlock as p, ref as m, renderList as h, renderSlot as g, withCtx as _ } from "vue";
|
|
7
7
|
import * as v from "@nubisco/ui/icons/dots-three";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./Button-
|
|
1
|
+
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./Button-CGIbF1e-.cjs`),n=require(`./composables/useNbStrings.composable.cjs`),r=require(`./Toolbar.context-D3Uj5o0_.cjs`),i=require(`./Menu-D0TerdRm.cjs`),a=require(`./MenuItem-DFfE_k0L.cjs`);let o=require(`vue`),s=require(`@nubisco/ui/icons/dots-three`);s=e.n(s);var c={class:`nb-overflow-menu`},l=(0,o.defineComponent)({__name:`OverflowMenu`,props:{items:{default:()=>[]},label:{default:void 0},icon:{default:()=>s},size:{default:void 0},align:{default:`end`},disabled:{type:Boolean,default:!1},tooltipPosition:{default:`bottom`}},emits:[`select`,`update:open`],setup(e,{expose:s,emit:l}){let u=e,d=l,f=n.useNbStrings(),p=(0,o.inject)(r.t,null),m=(0,o.computed)(()=>u.label??f.value.overflowMenuLabel),h=(0,o.computed)(()=>{let e=u.size??p?.size.value??`md`;return e===`xxs`||e===`xs`?`xs`:e===`sm`||e===`md`?e:`lg`}),g=(0,o.ref)(!1),_=(0,o.ref)(null),v=(0,o.ref)(null);function y(){return v.value?.$el??null}let b=!1;function x(){b=g.value}function S(){if(u.disabled||g.value)return;let e=y()?.getBoundingClientRect();e&&_.value?.setPosition(e),g.value=!0,d(`update:open`,!0)}function C(){g.value&&(g.value=!1,d(`update:open`,!1))}function w(){if(b||g.value){b=!1,C();return}S()}function T(e){e.key===`ArrowDown`&&(e.preventDefault(),S())}function E(e){if(e)return;C();let t=document.activeElement;(!t||t===document.body||!t.isConnected)&&(0,o.nextTick)(()=>y()?.focus())}function D(e){e.disabled||e.loading||(e.onSelect?.(),d(`select`,e.id))}return s({open:S,close:C,isOpen:g}),(n,r)=>((0,o.openBlock)(),(0,o.createElementBlock)(`span`,c,[(0,o.createVNode)(t.t,{ref_key:`triggerRef`,ref:v,class:`nb-overflow-menu__trigger`,variant:`ghost`,size:e.size,icon:e.icon,label:m.value,"tooltip-position":e.tooltipPosition,disabled:e.disabled,"aria-haspopup":`menu`,"aria-expanded":g.value,onMousedown:x,onClick:w,onKeydown:T},null,8,[`size`,`icon`,`label`,`tooltip-position`,`disabled`,`aria-expanded`]),(0,o.createVNode)(i.t,{ref_key:`menuRef`,ref:_,open:g.value,size:h.value,align:e.align,"onUpdate:open":E},{default:(0,o.withCtx)(()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.items,e=>((0,o.openBlock)(),(0,o.createBlock)(a.t,{key:e.id,label:e.label,icon:e.icon,disabled:e.disabled||e.loading,"disabled-reason":e.disabled?e.disabledReason:void 0,danger:e.danger,selectable:e.pressed!==void 0,selected:e.pressed,onSelect:t=>D(e)},null,8,[`label`,`icon`,`disabled`,`disabled-reason`,`danger`,`selectable`,`selected`,`onSelect`]))),128)),(0,o.renderSlot)(n.$slots,`default`)]),_:3},8,[`open`,`size`,`align`])]))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|