@nubisco/ui 5.24.0 → 5.25.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/{AiLabel-BY0-FfJ4.cjs → AiLabel-BMeJMSLm.cjs} +1 -1
- package/dist/{AiLabel-B4nz_8J3.js → AiLabel-CGxUTm-X.js} +1 -1
- package/dist/AiProvider-BVT_8D6a.js +137 -0
- package/dist/AiProvider-BXWMTzi9.cjs +1 -0
- package/dist/AiUsage-CCMQdmZv.cjs +1 -0
- package/dist/AiUsage-q_WU2toP.js +74 -0
- package/dist/{Banner-BrN9hmXi.cjs → Banner-DQyHNDEP.cjs} +1 -1
- package/dist/{Banner-Bm2Hu1ei.js → Banner-r_cdQAMp.js} +4 -4
- package/dist/{BarChart-Cw-mjG2w.cjs → BarChart-CV1GzXgj.cjs} +1 -1
- package/dist/{BarChart-Bhwk1RAA.js → BarChart-DWH40Q0_.js} +4 -4
- package/dist/{Blueprint-CQW7F5Pi.js → Blueprint-CQ0UBrND.js} +2 -2
- package/dist/{Blueprint-BUMkQPNk.cjs → Blueprint-DxHaLr4P.cjs} +1 -1
- package/dist/{BlueprintCard-WpQ3eWHk.js → BlueprintCard-BpVITfop.js} +1 -1
- package/dist/{BlueprintCard-mGd4_94p.cjs → BlueprintCard-ndSnIVKE.cjs} +1 -1
- package/dist/Briefing-B_D0X4pk.cjs +1 -0
- package/dist/Briefing-Ce2nPMi-.js +90 -0
- package/dist/BriefingDestination-CA8Dv-tJ.js +67 -0
- package/dist/BriefingDestination-DIXsBoE2.cjs +1 -0
- package/dist/{Checkbox-CBEwKXH1.js → Checkbox-B3gBM6xy.js} +1 -1
- package/dist/{Checkbox-BvWPRa40.cjs → Checkbox-lWejJzIQ.cjs} +1 -1
- package/dist/{CheckboxGroup-DB8gbqAF.cjs → CheckboxGroup-OKmBXLpx.cjs} +1 -1
- package/dist/{CheckboxGroup-7MPMIbZT.js → CheckboxGroup-VqnA0eDK.js} +3 -3
- package/dist/{ColorStrip-Mm1SOzmg.cjs → ColorStrip-COhVH__l.cjs} +1 -1
- package/dist/{ColorStrip-BMWm-x-l.js → ColorStrip-c5l3AF0f.js} +14 -14
- package/dist/Confirm--cR6XRZQ.cjs +1 -0
- package/dist/Confirm-CHsxP6G_.js +313 -0
- package/dist/{DataTable-CvLbvDFT.js → DataTable-COfiHgll.js} +2 -2
- package/dist/{DataTable-DcS7jvxA.cjs → DataTable-XSEybeeP.cjs} +1 -1
- package/dist/{DatePicker-CjxX5dia.cjs → DatePicker-DIdEzzsG.cjs} +1 -1
- package/dist/{DatePicker-C4g1DKZM.js → DatePicker-ZiWlM0Ee.js} +13 -13
- package/dist/{EmptyState-v_HI2o5s.js → EmptyState-63UqLFX6.js} +6 -6
- package/dist/{EmptyState-CEF56DXZ.cjs → EmptyState-CV-UfKR6.cjs} +1 -1
- package/dist/{Form-DDnR6mdq.js → Form-2pXj4bhZ.js} +1 -1
- package/dist/{Form-DqGhhQKv.cjs → Form-CYesmztD.cjs} +1 -1
- package/dist/{GanttChart-jvuwmy_5.js → GanttChart-BTvjVa_d.js} +3 -3
- package/dist/{GanttChart-Cl-0ml4x.cjs → GanttChart-owqg5s-X.cjs} +1 -1
- package/dist/{ImageCropper-DJjEcz6Q.js → ImageCropper-CLyH3zZ-.js} +2 -2
- package/dist/{ImageCropper-CAqCuBq3.cjs → ImageCropper-DAU0ddvI.cjs} +1 -1
- package/dist/{InlineLoading-COgGKI27.js → InlineLoading-uGDGiTNv.js} +1 -1
- package/dist/{InlineLoading-C3wUvREF.cjs → InlineLoading-w5XKQdGi.cjs} +1 -1
- package/dist/{InterpolationChart-DB8oZyC7.js → InterpolationChart-Bt3_BiHO.js} +3 -3
- package/dist/{InterpolationChart-Dgol9kmR.cjs → InterpolationChart-C2MFUf1D.cjs} +1 -1
- package/dist/{LineChart-DLu7_qcT.js → LineChart-BE5DVpYZ.js} +4 -4
- package/dist/{LineChart-Do_NISVc.cjs → LineChart-Dt7wwxeW.cjs} +1 -1
- package/dist/{Message-CVzG-irA.js → Message-Cecz48PA.js} +4 -4
- package/dist/{Message-CjM5AAf0.cjs → Message-VfpaGblO.cjs} +1 -1
- package/dist/{Modal-b5eV95gR.js → Modal-CfcTmfeK.js} +1 -1
- package/dist/{Modal-stR5KDNF.cjs → Modal-CtCD-xEb.cjs} +1 -1
- package/dist/{NotificationCenter-kHVey4vK.cjs → NotificationCenter-CGhxyax1.cjs} +1 -1
- package/dist/{NotificationCenter-CltJiPh6.js → NotificationCenter-xL9_6BMt.js} +8 -8
- package/dist/{NotificationCenterItem-CXt7QYRf.cjs → NotificationCenterItem-C8zaSiem.cjs} +1 -1
- package/dist/{NotificationCenterItem-CTtvqo3b.js → NotificationCenterItem-CdzyTsCY.js} +4 -4
- package/dist/{NumberInput-Dt5KpjBd.cjs → NumberInput-BtPQ7p5y.cjs} +1 -1
- package/dist/{NumberInput-7hkGoOn3.js → NumberInput-Dk8ofnNJ.js} +2 -2
- package/dist/{Pagination-B284QH7x.js → Pagination-CSISbmpl.js} +1 -1
- package/dist/{Pagination-TcPX4VkA.cjs → Pagination-Ci1te4UW.cjs} +1 -1
- package/dist/{PieChart-yi1830We.js → PieChart-CQBJlBJI.js} +3 -3
- package/dist/{PieChart-hjwH4zpA.cjs → PieChart-DjFeDqdk.cjs} +1 -1
- package/dist/{ProgressBar-DLDd4cTS.js → ProgressBar-B2EXpOdC.js} +2 -2
- package/dist/{ProgressBar-ClrCBpPp.cjs → ProgressBar-D1O4iAxy.cjs} +1 -1
- package/dist/{Radio-DaN5EUk3.cjs → Radio-DALC1A47.cjs} +1 -1
- package/dist/{Radio-vHh-A9Lw.js → Radio-fgJU2hwQ.js} +2 -2
- package/dist/{Select-Cz9AAfUs.cjs → Select-CHuZfqLt.cjs} +1 -1
- package/dist/{Select-DLSDyOoF.js → Select-CwO5aX8j.js} +22 -22
- package/dist/{SidebarCollapseToggle-DeaWpfzA.js → SidebarCollapseToggle-CA6wQR0x.js} +2 -2
- package/dist/{SidebarCollapseToggle-CAfBF3AN.cjs → SidebarCollapseToggle-Cs4Azqiy.cjs} +1 -1
- package/dist/{Skeleton-Bx3VesCp.js → Skeleton-Ba4m2jYi.js} +1 -1
- package/dist/{Skeleton-D62xVkuM.cjs → Skeleton-Bgo6pIY2.cjs} +1 -1
- package/dist/{Slider-r83oBqJW.js → Slider-BAhq6cJT.js} +10 -10
- package/dist/{Slider-Cnpur-g4.cjs → Slider-BK5yS7Ih.cjs} +1 -1
- package/dist/{Spinner-Cex-1DDr.js → Spinner-BxnDJP1H.js} +1 -1
- package/dist/{Spinner-CLflP0Ge.cjs → Spinner-swPRQ7kf.cjs} +1 -1
- package/dist/{Stepper-ww4PLW-u.js → Stepper-BH7RO00M.js} +1 -1
- package/dist/{Stepper-ExfQjnbC.cjs → Stepper-Da0Ba3PE.cjs} +1 -1
- package/dist/{StepperStep-CyDcCslT.cjs → StepperStep-CI482bzO.cjs} +1 -1
- package/dist/{StepperStep-xCnHtaeb.js → StepperStep-CLd8c1dj.js} +1 -1
- package/dist/{Switch-odyGx4iV.js → Switch-DS297b1b.js} +4 -4
- package/dist/{Switch-Bd7OUmEG.cjs → Switch-a73y1wiu.cjs} +1 -1
- package/dist/{Tabs-DAtxkztl.js → Tabs-BzsQiQ2H.js} +1 -1
- package/dist/{Tabs-B7ZYrItJ.cjs → Tabs-D3daz-Xc.cjs} +1 -1
- package/dist/{TextInput-DWXb6yKh.cjs → TextInput-BkCOQWfT.cjs} +2 -2
- package/dist/{TextInput-BOuAvB8K.js → TextInput-Kt2ciMVI.js} +7 -7
- package/dist/{Toast-YEddFrhn.js → Toast-CeGAznEA.js} +8 -8
- package/dist/{Toast-DTDAT-A4.cjs → Toast-Ci4P6mM0.cjs} +1 -1
- package/dist/{Toaster-BpYvPdSk.cjs → Toaster-Cit4iNYG.cjs} +1 -1
- package/dist/{Toaster-Dfi6bj_6.js → Toaster-zIdIFToW.js} +1 -1
- package/dist/{Tree-aN3f3kZP.cjs → Tree-BiqO99_n.cjs} +1 -1
- package/dist/{Tree-BJv3cwiE.js → Tree-ZtXPSE7w.js} +1 -1
- package/dist/{TreeNode-xfWkYDCS.cjs → TreeNode-BcVuy7zd.cjs} +1 -1
- package/dist/{TreeNode-BD_8vNNF.js → TreeNode-HVTTXuRl.js} +1 -1
- package/dist/{UserMenu-C4SoJOF7.js → UserMenu-DuAQ0yne.js} +2 -2
- package/dist/{UserMenu-Cq2dws0F.cjs → UserMenu-FhWFKqzy.cjs} +1 -1
- package/dist/all.cjs +1 -1
- package/dist/all.mjs +201 -193
- package/dist/component-styles.json +29 -0
- package/dist/components/AiLabel.cjs +1 -1
- package/dist/components/AiLabel.mjs +1 -1
- package/dist/components/AiProvider.cjs +1 -0
- package/dist/components/AiProvider.d.ts +29 -0
- package/dist/components/AiProvider.mjs +2 -0
- package/dist/components/AiProvider.vue.d.ts +36 -0
- package/dist/components/AiProvider.vue.d.ts.map +1 -0
- package/dist/components/AiUsage.cjs +1 -0
- package/dist/components/AiUsage.d.ts +29 -0
- package/dist/components/AiUsage.mjs +2 -0
- package/dist/components/AiUsage.vue.d.ts +28 -0
- package/dist/components/AiUsage.vue.d.ts.map +1 -0
- package/dist/components/Avatar.cjs +1 -1
- package/dist/components/Avatar.mjs +1 -1
- package/dist/components/Avatar.vue.d.ts +1 -1
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Badge.mjs +1 -1
- package/dist/components/Badge.vue.d.ts +1 -1
- package/dist/components/Banner.cjs +1 -1
- package/dist/components/Banner.mjs +1 -1
- package/dist/components/Blueprint.cjs +1 -1
- package/dist/components/Blueprint.mjs +1 -1
- package/dist/components/BlueprintBackground.cjs +1 -1
- package/dist/components/BlueprintBackground.mjs +1 -1
- package/dist/components/BlueprintCard.cjs +1 -1
- package/dist/components/BlueprintCard.mjs +1 -1
- package/dist/components/BlueprintCard.vue.d.ts +1 -1
- package/dist/components/BlueprintControls.cjs +1 -1
- package/dist/components/BlueprintControls.mjs +1 -1
- package/dist/components/BlueprintMinimap.cjs +1 -1
- package/dist/components/BlueprintMinimap.mjs +1 -1
- package/dist/components/Board.cjs +1 -1
- package/dist/components/Board.mjs +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 -0
- package/dist/components/Briefing.d.ts +22 -0
- package/dist/components/Briefing.mjs +2 -0
- package/dist/components/Briefing.vue.d.ts +36 -0
- package/dist/components/Briefing.vue.d.ts.map +1 -0
- package/dist/components/BriefingDestination.cjs +1 -0
- package/dist/components/BriefingDestination.d.ts +16 -0
- package/dist/components/BriefingDestination.mjs +2 -0
- package/dist/components/BriefingDestination.vue.d.ts +25 -0
- package/dist/components/BriefingDestination.vue.d.ts.map +1 -0
- package/dist/components/Calendar.cjs +1 -1
- package/dist/components/Calendar.mjs +1 -1
- package/dist/components/Calendar.vue.d.ts +1 -1
- package/dist/components/Charts/BarChart.cjs +1 -1
- package/dist/components/Charts/BarChart.mjs +1 -1
- package/dist/components/Charts/GanttChart.cjs +1 -1
- package/dist/components/Charts/GanttChart.mjs +1 -1
- package/dist/components/Charts/InterpolationChart.cjs +1 -1
- package/dist/components/Charts/InterpolationChart.mjs +1 -1
- package/dist/components/Charts/LineChart.cjs +1 -1
- package/dist/components/Charts/LineChart.mjs +1 -1
- package/dist/components/Charts/PieChart.cjs +1 -1
- package/dist/components/Charts/PieChart.mjs +1 -1
- package/dist/components/Charts/Sparkline.cjs +1 -1
- package/dist/components/Charts/Sparkline.mjs +1 -1
- package/dist/components/Checkbox.cjs +1 -1
- package/dist/components/Checkbox.mjs +1 -1
- package/dist/components/CheckboxGroup.cjs +1 -1
- package/dist/components/CheckboxGroup.mjs +1 -1
- package/dist/components/ColorStrip.cjs +1 -1
- package/dist/components/ColorStrip.mjs +1 -1
- package/dist/components/CommandPalette.cjs +1 -1
- package/dist/components/CommandPalette.mjs +1 -1
- package/dist/components/Confirm.cjs +1 -1
- package/dist/components/Confirm.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 +3 -3
- package/dist/components/DefinitionList.cjs +1 -1
- package/dist/components/DefinitionList.mjs +1 -1
- package/dist/components/DefinitionListItem.cjs +1 -1
- package/dist/components/DefinitionListItem.mjs +1 -1
- package/dist/components/DragHandle.cjs +1 -1
- package/dist/components/DragHandle.mjs +1 -1
- package/dist/components/EmptyState.cjs +1 -1
- package/dist/components/EmptyState.mjs +1 -1
- package/dist/components/Field.cjs +1 -1
- package/dist/components/Field.mjs +1 -1
- package/dist/components/FileUploader.cjs +1 -1
- package/dist/components/FileUploader.mjs +1 -1
- package/dist/components/Flag.cjs +1 -1
- package/dist/components/Flag.mjs +1 -1
- package/dist/components/FloatingToolbar.cjs +1 -1
- package/dist/components/FloatingToolbar.mjs +1 -1
- package/dist/components/Form.cjs +1 -1
- package/dist/components/Form.mjs +1 -1
- package/dist/components/Grid.cjs +1 -1
- package/dist/components/Grid.mjs +1 -1
- package/dist/components/ImageCropper.cjs +1 -1
- package/dist/components/ImageCropper.mjs +1 -1
- package/dist/components/InlineEdit.cjs +1 -1
- package/dist/components/InlineEdit.mjs +1 -1
- package/dist/components/InlineLoading.cjs +1 -1
- package/dist/components/InlineLoading.mjs +1 -1
- package/dist/components/JsonTree.cjs +1 -1
- package/dist/components/JsonTree.mjs +1 -1
- package/dist/components/Label.cjs +1 -1
- package/dist/components/Label.mjs +1 -1
- package/dist/components/Layer.cjs +1 -1
- package/dist/components/Layer.mjs +1 -1
- package/dist/components/MenuBar.cjs +1 -1
- package/dist/components/MenuBar.mjs +1 -1
- package/dist/components/MenuBarItem.cjs +1 -1
- package/dist/components/MenuBarItem.mjs +1 -1
- package/dist/components/MenuDivider.cjs +1 -1
- package/dist/components/MenuDivider.mjs +1 -1
- package/dist/components/Message.cjs +1 -1
- package/dist/components/Message.mjs +1 -1
- package/dist/components/Modal.cjs +1 -1
- package/dist/components/Modal.mjs +1 -1
- package/dist/components/Modal.vue.d.ts +1 -1
- package/dist/components/NotificationCenter.cjs +1 -1
- package/dist/components/NotificationCenter.mjs +1 -1
- package/dist/components/NotificationCenterItem.cjs +1 -1
- package/dist/components/NotificationCenterItem.mjs +1 -1
- package/dist/components/NubiscoMark.cjs +1 -1
- package/dist/components/NubiscoMark.mjs +1 -1
- package/dist/components/NubiscoPlatformMark.cjs +1 -1
- package/dist/components/NubiscoPlatformMark.mjs +1 -1
- package/dist/components/NumberInput.cjs +1 -1
- package/dist/components/NumberInput.mjs +1 -1
- package/dist/components/NumberInput.vue.d.ts +1 -1
- package/dist/components/Pagination.cjs +1 -1
- package/dist/components/Pagination.mjs +1 -1
- package/dist/components/Panel.cjs +1 -1
- package/dist/components/Panel.mjs +1 -1
- package/dist/components/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar.mjs +1 -1
- package/dist/components/Radio.cjs +1 -1
- package/dist/components/Radio.mjs +1 -1
- package/dist/components/ReorderList.cjs +1 -1
- package/dist/components/ReorderList.mjs +1 -1
- package/dist/components/Select.cjs +1 -1
- package/dist/components/Select.mjs +1 -1
- package/dist/components/Select.vue.d.ts +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/SidebarBrand.cjs +1 -1
- package/dist/components/SidebarBrand.mjs +1 -1
- package/dist/components/SidebarCollapseToggle.cjs +1 -1
- package/dist/components/SidebarCollapseToggle.mjs +1 -1
- package/dist/components/SidebarLink.cjs +1 -1
- package/dist/components/SidebarLink.mjs +1 -1
- package/dist/components/SidebarMenu.cjs +1 -1
- package/dist/components/SidebarMenu.mjs +1 -1
- package/dist/components/SidebarMenuGroup.cjs +1 -1
- package/dist/components/SidebarMenuGroup.mjs +1 -1
- package/dist/components/SidebarMenuItem.cjs +1 -1
- package/dist/components/SidebarMenuItem.mjs +1 -1
- package/dist/components/Skeleton.cjs +1 -1
- package/dist/components/Skeleton.mjs +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/Slider.vue.d.ts +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/Spinner.mjs +1 -1
- package/dist/components/Stepper.cjs +1 -1
- package/dist/components/Stepper.mjs +1 -1
- package/dist/components/StepperStep.cjs +1 -1
- package/dist/components/StepperStep.mjs +1 -1
- package/dist/components/Submenu.cjs +1 -1
- package/dist/components/Submenu.mjs +1 -1
- package/dist/components/Switch.cjs +1 -1
- package/dist/components/Switch.mjs +1 -1
- package/dist/components/TableOfContents.cjs +1 -1
- package/dist/components/TableOfContents.mjs +1 -1
- package/dist/components/TableOfContents.vue.d.ts +1 -1
- package/dist/components/Tabs.cjs +1 -1
- package/dist/components/Tabs.mjs +1 -1
- package/dist/components/TextInput.cjs +1 -1
- package/dist/components/TextInput.mjs +1 -1
- package/dist/components/TextInput.vue.d.ts +2 -2
- package/dist/components/TextInput.vue.d.ts.map +1 -1
- package/dist/components/Toast.cjs +1 -1
- package/dist/components/Toast.mjs +1 -1
- package/dist/components/Toaster.cjs +1 -1
- package/dist/components/Toaster.mjs +1 -1
- package/dist/components/Tree.cjs +1 -1
- package/dist/components/Tree.mjs +1 -1
- package/dist/components/TreeNode.cjs +1 -1
- package/dist/components/TreeNode.mjs +1 -1
- package/dist/components/UserMenu.cjs +1 -1
- package/dist/components/UserMenu.mjs +1 -1
- package/dist/components/Video.cjs +1 -1
- package/dist/components/Video.mjs +1 -1
- package/dist/components/Video.vue.d.ts +1 -1
- package/dist/components/Walkthrough.cjs +1 -1
- package/dist/components/Walkthrough.mjs +1 -1
- package/dist/components/Wireframe.cjs +1 -1
- package/dist/components/Wireframe.mjs +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/manifest.d.ts +4 -0
- package/dist/components/manifest.d.ts.map +1 -1
- package/dist/components/manifest.js +4 -0
- package/dist/composables/useBlueprint.composable.cjs +1 -1
- package/dist/composables/useBlueprint.composable.mjs +1 -1
- package/dist/composables/useConfirm.composable.cjs +1 -1
- package/dist/composables/useConfirm.composable.mjs +3 -3
- package/dist/composables/useInlineLoading.composable.cjs +1 -1
- package/dist/composables/useInlineLoading.composable.mjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.cjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.mjs +1 -1
- package/dist/global.d.ts +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +108 -104
- package/dist/main.d.ts +8 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/styles/AiProvider.css +1 -0
- package/dist/styles/AiUsage.css +1 -0
- package/dist/styles/Briefing.css +1 -0
- package/dist/styles/BriefingDestination.css +1 -0
- package/dist/ui.css +12 -8
- package/package.json +1 -1
- package/dist/Confirm-CmQzDZFC.js +0 -313
- package/dist/Confirm-DfTjBTuJ.cjs +0 -1
- /package/dist/{Avatar-4BWmDFhO.js → Avatar-BibgBZuN.js} +0 -0
- /package/dist/{Avatar-BqiwSWeV.cjs → Avatar-BpPczEa8.cjs} +0 -0
- /package/dist/{Badge-CLgaADV-.cjs → Badge-D6nlcs4F.cjs} +0 -0
- /package/dist/{Badge-BH8qD-w8.js → Badge-DJx3RZxk.js} +0 -0
- /package/dist/{Blueprint.context-CfOZcttA.js → Blueprint.context-BU2ujsDD.js} +0 -0
- /package/dist/{Blueprint.context-NmqerYFf.cjs → Blueprint.context-DjbRPuLQ.cjs} +0 -0
- /package/dist/{BlueprintBackground-D52auBfC.cjs → BlueprintBackground-D5i-Rlmm.cjs} +0 -0
- /package/dist/{BlueprintBackground-Y-DxC7zj.js → BlueprintBackground-DtGJCzDy.js} +0 -0
- /package/dist/{BlueprintControls-Dqrr5aoC.cjs → BlueprintControls-BfTyqOwC.cjs} +0 -0
- /package/dist/{BlueprintControls-hQAFAlHB.js → BlueprintControls-COeG8N6G.js} +0 -0
- /package/dist/{BlueprintMinimap-D69cdbyQ.cjs → BlueprintMinimap-CujSRNvs.cjs} +0 -0
- /package/dist/{BlueprintMinimap-Ch9E_5bl.js → BlueprintMinimap-xwEOZlv6.js} +0 -0
- /package/dist/{Board-B_sqwxsN.cjs → Board-DmOzimbT.cjs} +0 -0
- /package/dist/{Board-nGnQkqJb.js → Board-R38Zb5t2.js} +0 -0
- /package/dist/{BottomPanel-DlrKsWHz.cjs → BottomPanel-Cpr7_cZI.cjs} +0 -0
- /package/dist/{BottomPanel-UDdEoJqh.js → BottomPanel-DdjpIyOA.js} +0 -0
- /package/dist/{Breadcrumbs-CRlWYf7S.js → Breadcrumbs-B0nEpUik.js} +0 -0
- /package/dist/{Breadcrumbs-Bw5LdW9D.cjs → Breadcrumbs-B8zyUzRM.cjs} +0 -0
- /package/dist/{Calendar-D-iSzX4T.cjs → Calendar-BPYKfErK.cjs} +0 -0
- /package/dist/{Calendar-CJd9UzLq.js → Calendar-C2KlJvo5.js} +0 -0
- /package/dist/{ChartLegend-C8_vklRf.js → ChartLegend-BtBKVnH3.js} +0 -0
- /package/dist/{ChartLegend-CTqPJ52N.cjs → ChartLegend-ndpGucTZ.cjs} +0 -0
- /package/dist/{CheckboxGroup.context-CcJlyjRV.js → CheckboxGroup.context-B2qjPnB2.js} +0 -0
- /package/dist/{CheckboxGroup.context-BJ_mXMo8.cjs → CheckboxGroup.context-DyFYVLH1.cjs} +0 -0
- /package/dist/{CommandPalette-BevB1sEi.js → CommandPalette-CU8gkgTx.js} +0 -0
- /package/dist/{CommandPalette-BxtsOesP.cjs → CommandPalette-zmNIqPex.cjs} +0 -0
- /package/dist/{DefinitionList-BM-83VTW.cjs → DefinitionList-COgbbyRS.cjs} +0 -0
- /package/dist/{DefinitionList-YSgdnnMD.js → DefinitionList-Xn-f_QhT.js} +0 -0
- /package/dist/{DefinitionListItem-Dx3z7niO.cjs → DefinitionListItem-B4bGJJJj.cjs} +0 -0
- /package/dist/{DefinitionListItem-DfTl4VTm.js → DefinitionListItem-ZRjLrhaI.js} +0 -0
- /package/dist/{DragHandle-DqcKoM4f.js → DragHandle-BbgSL4IW.js} +0 -0
- /package/dist/{DragHandle-C91bypG3.cjs → DragHandle-bosa6iXA.cjs} +0 -0
- /package/dist/{Field-glovCxOq.cjs → Field-DznERREe.cjs} +0 -0
- /package/dist/{Field-Csuq9cqO.js → Field-LiiMobFy.js} +0 -0
- /package/dist/{FileUploader-B8jyhhkN.cjs → FileUploader-BjYXOXxj.cjs} +0 -0
- /package/dist/{FileUploader-BAns0DbJ.js → FileUploader-DwKKUn71.js} +0 -0
- /package/dist/{Flag-B16fkljO.cjs → Flag-C326U1pM.cjs} +0 -0
- /package/dist/{Flag-e7J5iLc8.js → Flag-DBHUM-oa.js} +0 -0
- /package/dist/{FloatingToolbar-DkQDopOX.js → FloatingToolbar-B_VISp4J.js} +0 -0
- /package/dist/{FloatingToolbar-B6xZvl4M.cjs → FloatingToolbar-CMYR7_b_.cjs} +0 -0
- /package/dist/{Grid-By_NqGWQ.cjs → Grid-D8c0StGs.cjs} +0 -0
- /package/dist/{Grid-BF4ObsbF.js → Grid-XtnH-vr_.js} +0 -0
- /package/dist/{InlineEdit-wpQAg80H.cjs → InlineEdit-BLrO3i1p.cjs} +0 -0
- /package/dist/{InlineEdit-ak0WY89o.js → InlineEdit-BemWhcI3.js} +0 -0
- /package/dist/{JsonTree-CnEinkjy.cjs → JsonTree-B3TskapA.cjs} +0 -0
- /package/dist/{JsonTree-DJNeIkMt.js → JsonTree-DzEsyR3A.js} +0 -0
- /package/dist/{Label-CR6g53gz.cjs → Label-CVCNXFn1.cjs} +0 -0
- /package/dist/{Label-DkdjCPeM.js → Label-ciCAG21-.js} +0 -0
- /package/dist/{Layer-Bw8eiq3V.cjs → Layer-BRDO-CDw.cjs} +0 -0
- /package/dist/{Layer--aocK4Jq.js → Layer-DsNOdX44.js} +0 -0
- /package/dist/{MenuBar-DOHhu1YE.js → MenuBar-BTSnSFvG.js} +0 -0
- /package/dist/{MenuBar-IE1c-DnC.cjs → MenuBar-CFCpmpU7.cjs} +0 -0
- /package/dist/{MenuBarItem-B3DXNMZR.js → MenuBarItem-C7TPhYnN.js} +0 -0
- /package/dist/{MenuBarItem-DkJPAdkN.cjs → MenuBarItem-D1LSKPxk.cjs} +0 -0
- /package/dist/{MenuDivider-CZFNkoP5.js → MenuDivider-BosPmiMO.js} +0 -0
- /package/dist/{MenuDivider-D9Dw8VKM.cjs → MenuDivider-kpF-fk4u.cjs} +0 -0
- /package/dist/{NubiscoMark-Dvwu7mri.cjs → NubiscoMark-D4-pm2EX.cjs} +0 -0
- /package/dist/{NubiscoMark-DTPsWWI3.js → NubiscoMark-DgzvBHAd.js} +0 -0
- /package/dist/{NubiscoPlatformMark-COQnCydq.js → NubiscoPlatformMark-CayXaZGB.js} +0 -0
- /package/dist/{NubiscoPlatformMark-D2sQvlRb.cjs → NubiscoPlatformMark-DV2XeqiT.cjs} +0 -0
- /package/dist/{Panel-DXpXMlzK.js → Panel-Drfi9pqS.js} +0 -0
- /package/dist/{Panel-Yrl_AZTB.cjs → Panel-valtWFWI.cjs} +0 -0
- /package/dist/{ReorderList-DlO13mZ8.js → ReorderList-BDLxDc6t.js} +0 -0
- /package/dist/{ReorderList-DaDY714T.cjs → ReorderList-BdHgEL4G.cjs} +0 -0
- /package/dist/{Shell-CtpVIsIr.cjs → Shell-6Dwl2FnC.cjs} +0 -0
- /package/dist/{Shell-Cfdfqfvc.js → Shell-C9DK_Phw.js} +0 -0
- /package/dist/{ShellPanel-B2AgOmD5.js → ShellPanel-Cu3C3H9J.js} +0 -0
- /package/dist/{ShellPanel-Db3C1879.cjs → ShellPanel-rrSF7BQs.cjs} +0 -0
- /package/dist/{SidebarBrand-PUeotNqh.js → SidebarBrand-Ba6QIT1v.js} +0 -0
- /package/dist/{SidebarBrand-CUdKgDWl.cjs → SidebarBrand-BqSqQNPa.cjs} +0 -0
- /package/dist/{SidebarLink-COBTc762.cjs → SidebarLink-BbzeT8Tq.cjs} +0 -0
- /package/dist/{SidebarLink-DFxHQLCu.js → SidebarLink-Bi8GxvCf.js} +0 -0
- /package/dist/{SidebarMenu-DYqo6XE_.cjs → SidebarMenu-B4nng5Fz.cjs} +0 -0
- /package/dist/{SidebarMenu-DWEzNXfe.js → SidebarMenu-DoMgZO7c.js} +0 -0
- /package/dist/{SidebarMenuGroup-BHtxWHBk.cjs → SidebarMenuGroup-BdOpz4N1.cjs} +0 -0
- /package/dist/{SidebarMenuGroup-C2DHT9rs.js → SidebarMenuGroup-CmCPtZJD.js} +0 -0
- /package/dist/{SidebarMenuItem-DFAU-ROX.js → SidebarMenuItem-CWXKdUTX.js} +0 -0
- /package/dist/{SidebarMenuItem-BjdRY91e.cjs → SidebarMenuItem-j21WVpId.cjs} +0 -0
- /package/dist/{Sparkline-DL_g9GtX.js → Sparkline-C4gA55Pc.js} +0 -0
- /package/dist/{Sparkline-CeUnGfSA.cjs → Sparkline-DI7arXX0.cjs} +0 -0
- /package/dist/{Stepper.context-Doy3IafX.cjs → Stepper.context-Dxw8xYGX.cjs} +0 -0
- /package/dist/{Stepper.context-Dj8sqSeB.js → Stepper.context-q_CjX3CO.js} +0 -0
- /package/dist/{Submenu-Bay1plPK.cjs → Submenu-CpNOHf-e.cjs} +0 -0
- /package/dist/{Submenu-CAwlRk1P.js → Submenu-DKpL5htf.js} +0 -0
- /package/dist/{TableOfContents-CFXhJ6cZ.js → TableOfContents-BqF5y-1t.js} +0 -0
- /package/dist/{TableOfContents-CLB6iFCf.cjs → TableOfContents-C6xx7P4d.cjs} +0 -0
- /package/dist/{TreeContext-DXn-HNow.cjs → TreeContext-we7Xt7IP.cjs} +0 -0
- /package/dist/{TreeContext-D_NJ8vrP.js → TreeContext-xtlNBGhB.js} +0 -0
- /package/dist/{Video-B7VqDjou.cjs → Video-Bgzvf-C9.cjs} +0 -0
- /package/dist/{Video-r2VtGVlN.js → Video-CY0UEDLL.js} +0 -0
- /package/dist/{Walkthrough-C0WRD_PK.js → Walkthrough-KmxZqXxV.js} +0 -0
- /package/dist/{Walkthrough-CrmK6nRz.cjs → Walkthrough-oU-NaG_A.cjs} +0 -0
- /package/dist/{Wireframe-u15I8Ldj.js → Wireframe-Bf55dFWu.js} +0 -0
- /package/dist/{Wireframe-pfnyZFGe.cjs → Wireframe-CX8KvGJx.cjs} +0 -0
- /package/dist/{palette-0LscvyqA.cjs → palette-BoABA-De.cjs} +0 -0
- /package/dist/{palette-CxPgs-Dn.js → palette-VMXxKICH.js} +0 -0
- /package/dist/{pixi-scene-CN2JIn7_.js → pixi-scene-D57Y3MvT.js} +0 -0
- /package/dist/{pixi-scene-CRogQbky.cjs → pixi-scene-OOSMyGKD.cjs} +0 -0
- /package/dist/{scales-CFWdZe1z.cjs → scales-BWtB8m5D.cjs} +0 -0
- /package/dist/{scales-DMlq1jQZ.js → scales-DVJzRU1F.js} +0 -0
- /package/dist/{useChartSize-C8SNfQZL.cjs → useChartSize-D9UxUkiU.cjs} +0 -0
- /package/dist/{useChartSize-Dbm1f8au.js → useChartSize-Dyh37PYP.js} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-DCZIIefo.cjs → useLoadingAnnouncer.composable-BMMz4C1C.cjs} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-B9SAlQE6.js → useLoadingAnnouncer.composable-DY8jGEwJ.js} +0 -0
- /package/dist/{vue-i18n-CYAt-t4N.cjs → vue-i18n-B_5xehV9.cjs} +0 -0
- /package/dist/{vue-i18n-D5xWp3Q8.js → vue-i18n-Dzm-MDw4.js} +0 -0
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { useReducedMotion as e } from "./composables/useReducedMotion.composable.mjs";
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper-O4QQSku4.js";
|
|
3
|
+
import { t as n } from "./Icon-rREAqsu0.js";
|
|
4
|
+
import { t as r } from "./Button-IcCXOoCT.js";
|
|
5
|
+
import { t as i } from "./Message-Cecz48PA.js";
|
|
6
|
+
import { t as a } from "./TextInput-Kt2ciMVI.js";
|
|
7
|
+
import { i as o, r as ee, t as te } from "./Modal-CfcTmfeK.js";
|
|
8
|
+
import { computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, nextTick as h, normalizeClass as g, onMounted as ne, onUnmounted as re, openBlock as _, ref as v, renderSlot as ie, toDisplayString as y, unref as b, useId as ae, useSlots as oe, watch as x, withCtx as S, withKeys as se, withModifiers as ce } from "vue";
|
|
9
|
+
import { regular as le } from "@nubisco/ui/icons/check";
|
|
10
|
+
import { regular as ue } from "@nubisco/ui/icons/warning";
|
|
11
|
+
//#region src/components/Confirm.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var de = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "nb-confirm__message"
|
|
15
|
+
}, fe = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "nb-confirm__subject-kind"
|
|
18
|
+
}, pe = { class: "nb-confirm__subject-name" }, me = {
|
|
19
|
+
key: 1,
|
|
20
|
+
class: "nb-confirm__gate"
|
|
21
|
+
}, he = { class: "nb-confirm__live" }, ge = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "nb-confirm__status",
|
|
24
|
+
role: "status"
|
|
25
|
+
}, _e = {
|
|
26
|
+
key: 1,
|
|
27
|
+
class: "nb-confirm__status nb-confirm__status--success",
|
|
28
|
+
role: "status"
|
|
29
|
+
}, C = /* @__PURE__ */ t(/* @__PURE__ */ m({
|
|
30
|
+
__name: "Confirm",
|
|
31
|
+
props: {
|
|
32
|
+
open: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1
|
|
35
|
+
},
|
|
36
|
+
title: {},
|
|
37
|
+
message: { default: void 0 },
|
|
38
|
+
subject: { default: void 0 },
|
|
39
|
+
subjectLabel: { default: void 0 },
|
|
40
|
+
confirmLabel: { default: "Confirm" },
|
|
41
|
+
cancelLabel: { default: "Cancel" },
|
|
42
|
+
tone: { default: "danger" },
|
|
43
|
+
typeToConfirm: { default: void 0 },
|
|
44
|
+
typeToConfirmLabel: { default: void 0 },
|
|
45
|
+
typeToConfirmHelper: { default: void 0 },
|
|
46
|
+
busy: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
busyLabel: { default: "Working..." },
|
|
51
|
+
succeeded: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: !1
|
|
54
|
+
},
|
|
55
|
+
successLabel: { default: void 0 },
|
|
56
|
+
error: { default: void 0 },
|
|
57
|
+
size: { default: "sm" },
|
|
58
|
+
floatingSelectors: { default: () => [] },
|
|
59
|
+
contentClass: { default: void 0 }
|
|
60
|
+
},
|
|
61
|
+
emits: ["confirm", "cancel"],
|
|
62
|
+
setup(t, { expose: m, emit: C }) {
|
|
63
|
+
let w = t, T = C, E = ae(), D = `nb-confirm-title-${E}`, O = `nb-confirm-body-${E}`, ve = oe(), k = v(null), A = v(null), j = v(null), M = v(""), N = e(), P = s(() => w.busy || w.succeeded);
|
|
64
|
+
function F() {
|
|
65
|
+
return !!w.message || !!w.subject || !!ve.default;
|
|
66
|
+
}
|
|
67
|
+
let ye = s(() => w.tone === "danger" ? "danger" : "primary"), be = s(() => w.typeToConfirmLabel ?? `Type ${w.typeToConfirm} to confirm`), xe = s(() => !w.typeToConfirm || M.value.trim() === w.typeToConfirm), I = s(() => xe.value && !P.value);
|
|
68
|
+
function Se() {
|
|
69
|
+
I.value && T("confirm");
|
|
70
|
+
}
|
|
71
|
+
function L() {
|
|
72
|
+
let e = j.value?.$el;
|
|
73
|
+
return e instanceof HTMLElement ? e : null;
|
|
74
|
+
}
|
|
75
|
+
function R() {
|
|
76
|
+
return k.value?.closest("[role=\"dialog\"],[role=\"alertdialog\"]") ?? null;
|
|
77
|
+
}
|
|
78
|
+
function Ce() {
|
|
79
|
+
return typeof document > "u" ? [] : Array.from(document.querySelectorAll("[aria-modal=\"true\"]"));
|
|
80
|
+
}
|
|
81
|
+
function z() {
|
|
82
|
+
let e = R();
|
|
83
|
+
if (!e) return !1;
|
|
84
|
+
let t = Ce();
|
|
85
|
+
return t.length === 0 || t[t.length - 1] === e;
|
|
86
|
+
}
|
|
87
|
+
let we = [
|
|
88
|
+
"a[href]:not([tabindex=\"-1\"])",
|
|
89
|
+
"area[href]:not([tabindex=\"-1\"])",
|
|
90
|
+
"button:not([disabled]):not([tabindex=\"-1\"])",
|
|
91
|
+
"input:not([disabled]):not([type=\"hidden\"]):not([tabindex=\"-1\"])",
|
|
92
|
+
"select:not([disabled]):not([tabindex=\"-1\"])",
|
|
93
|
+
"textarea:not([disabled]):not([tabindex=\"-1\"])",
|
|
94
|
+
"summary:not([tabindex=\"-1\"])",
|
|
95
|
+
"audio[controls]:not([tabindex=\"-1\"])",
|
|
96
|
+
"video[controls]:not([tabindex=\"-1\"])",
|
|
97
|
+
"iframe:not([tabindex=\"-1\"])",
|
|
98
|
+
"[contenteditable]:not([contenteditable=\"false\"]):not([tabindex=\"-1\"])",
|
|
99
|
+
"[tabindex]:not([tabindex=\"-1\"])"
|
|
100
|
+
].map((e) => `${e}:not([hidden]):not([aria-hidden="true"])`).join(",");
|
|
101
|
+
function Te() {
|
|
102
|
+
return o(w.floatingSelectors);
|
|
103
|
+
}
|
|
104
|
+
function B(e) {
|
|
105
|
+
return e instanceof Element ? !!e.closest(Te()) : !1;
|
|
106
|
+
}
|
|
107
|
+
function V(e) {
|
|
108
|
+
let t = R();
|
|
109
|
+
return !!t && !!e && t.contains(e);
|
|
110
|
+
}
|
|
111
|
+
function H() {
|
|
112
|
+
let e = R();
|
|
113
|
+
return e ? Array.from(e.querySelectorAll(we)).filter((e) => e.getAttribute("aria-disabled") !== "true") : [];
|
|
114
|
+
}
|
|
115
|
+
function U() {
|
|
116
|
+
let e = R();
|
|
117
|
+
return e ? (e.focus(), !0) : !1;
|
|
118
|
+
}
|
|
119
|
+
function W() {
|
|
120
|
+
let e = H()[0];
|
|
121
|
+
e ? e.focus() : U();
|
|
122
|
+
}
|
|
123
|
+
let G = null;
|
|
124
|
+
function K() {
|
|
125
|
+
let e = G;
|
|
126
|
+
G = null, e?.isConnected && e.focus();
|
|
127
|
+
}
|
|
128
|
+
function q() {
|
|
129
|
+
ee(R(), N.value);
|
|
130
|
+
}
|
|
131
|
+
x(N, () => {
|
|
132
|
+
w.open && q();
|
|
133
|
+
}), x(() => [w.busy, w.error], async (e, t) => {
|
|
134
|
+
if (!w.open) return;
|
|
135
|
+
let [n, r] = e, i = t?.[0] ?? !1;
|
|
136
|
+
if (await h(), n) {
|
|
137
|
+
H().length === 0 && U();
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (i && r) {
|
|
141
|
+
let e = A.value;
|
|
142
|
+
e ? e.focus() : W();
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
let a = document.activeElement;
|
|
146
|
+
!V(a) && !B(a) && W();
|
|
147
|
+
}), x(() => w.open, async (e) => {
|
|
148
|
+
e ? (G = document.activeElement instanceof HTMLElement ? document.activeElement : null, M.value = "", await h(), q(), L() ? L()?.focus() : U()) : K();
|
|
149
|
+
}, { immediate: !0 });
|
|
150
|
+
function J() {
|
|
151
|
+
P.value || T("cancel");
|
|
152
|
+
}
|
|
153
|
+
let Y = !1, X = !1;
|
|
154
|
+
function Z(e) {
|
|
155
|
+
let t = e.target;
|
|
156
|
+
Y = V(t) || B(t);
|
|
157
|
+
}
|
|
158
|
+
function Q(e) {
|
|
159
|
+
X = V(e.target);
|
|
160
|
+
}
|
|
161
|
+
function Ee() {
|
|
162
|
+
let e = Y && !X;
|
|
163
|
+
Y = !1, !e && J();
|
|
164
|
+
}
|
|
165
|
+
function De(e) {
|
|
166
|
+
if (!w.open || B(document.activeElement)) return;
|
|
167
|
+
if (e.key === "Escape") {
|
|
168
|
+
if (!z()) return;
|
|
169
|
+
e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), J();
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (e.key !== "Tab" || !z()) return;
|
|
173
|
+
let t = H();
|
|
174
|
+
if (t.length === 0) {
|
|
175
|
+
e.preventDefault(), V(document.activeElement) || U();
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
let n = t[0], r = t[t.length - 1], i = document.activeElement;
|
|
179
|
+
e.shiftKey && (i === n || !V(i)) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r ? (e.preventDefault(), n.focus()) : V(i) || (e.preventDefault(), n.focus());
|
|
180
|
+
}
|
|
181
|
+
function $(e) {
|
|
182
|
+
if (!w.open) return;
|
|
183
|
+
let t = e.relatedTarget;
|
|
184
|
+
if (t instanceof Element) {
|
|
185
|
+
if (V(t) || B(t)) return;
|
|
186
|
+
} else if (t !== null) return;
|
|
187
|
+
requestAnimationFrame(() => {
|
|
188
|
+
if (!w.open) return;
|
|
189
|
+
let e = document.activeElement;
|
|
190
|
+
V(e) || B(e) || e && e !== document.body && !e.isConnected || z() && W();
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
return typeof document < "u" && (document.addEventListener("keydown", De, !0), document.addEventListener("focusout", $, !0), document.addEventListener("mousedown", Z, !0), document.addEventListener("touchstart", Z, !0), document.addEventListener("click", Q, !0)), ne(() => {
|
|
194
|
+
w.open && (q(), L() ? L()?.focus() : U());
|
|
195
|
+
}), re(() => {
|
|
196
|
+
typeof document < "u" && (document.removeEventListener("keydown", De, !0), document.removeEventListener("focusout", $, !0), document.removeEventListener("mousedown", Z, !0), document.removeEventListener("touchstart", Z, !0), document.removeEventListener("click", Q, !0)), K();
|
|
197
|
+
}), m({
|
|
198
|
+
focusCancel: () => L()?.focus(),
|
|
199
|
+
restoreFocus: K,
|
|
200
|
+
isTopmost: z
|
|
201
|
+
}), (e, o) => (_(), c(te, {
|
|
202
|
+
open: t.open,
|
|
203
|
+
size: t.size,
|
|
204
|
+
role: t.tone === "danger" ? "alertdialog" : "dialog",
|
|
205
|
+
"labelled-by": D,
|
|
206
|
+
"described-by": F() ? O : void 0,
|
|
207
|
+
busy: t.busy,
|
|
208
|
+
"close-on-overlay": !P.value,
|
|
209
|
+
"close-disabled": P.value,
|
|
210
|
+
"close-on-escape": !1,
|
|
211
|
+
"trap-focus": !1,
|
|
212
|
+
onClose: Ee
|
|
213
|
+
}, {
|
|
214
|
+
header: S(() => [d("span", {
|
|
215
|
+
id: D,
|
|
216
|
+
class: g(["nb-confirm__heading", `nb-confirm__heading--${t.tone}`])
|
|
217
|
+
}, [t.tone === "danger" ? (_(), c(n, {
|
|
218
|
+
key: 0,
|
|
219
|
+
name: b(ue),
|
|
220
|
+
size: 16,
|
|
221
|
+
"aria-hidden": "true"
|
|
222
|
+
}, null, 8, ["name"])) : l("", !0), d("span", null, y(t.title), 1)], 2)]),
|
|
223
|
+
footer: S(() => [p(r, {
|
|
224
|
+
ref_key: "cancelRef",
|
|
225
|
+
ref: j,
|
|
226
|
+
class: "nb-confirm__action nb-confirm__action--cancel",
|
|
227
|
+
variant: "ghost",
|
|
228
|
+
size: "lg",
|
|
229
|
+
disabled: P.value,
|
|
230
|
+
"data-nb-confirm": "cancel",
|
|
231
|
+
onClick: J
|
|
232
|
+
}, {
|
|
233
|
+
default: S(() => [f(y(t.cancelLabel), 1)]),
|
|
234
|
+
_: 1
|
|
235
|
+
}, 8, ["disabled"]), p(r, {
|
|
236
|
+
class: "nb-confirm__action nb-confirm__action--confirm",
|
|
237
|
+
variant: ye.value,
|
|
238
|
+
size: "lg",
|
|
239
|
+
disabled: !I.value,
|
|
240
|
+
loading: t.busy,
|
|
241
|
+
"data-nb-confirm": "confirm",
|
|
242
|
+
onClick: Se
|
|
243
|
+
}, {
|
|
244
|
+
default: S(() => [f(y(t.confirmLabel), 1)]),
|
|
245
|
+
_: 1
|
|
246
|
+
}, 8, [
|
|
247
|
+
"variant",
|
|
248
|
+
"disabled",
|
|
249
|
+
"loading"
|
|
250
|
+
])]),
|
|
251
|
+
default: S(() => [d("div", {
|
|
252
|
+
ref_key: "rootRef",
|
|
253
|
+
ref: k,
|
|
254
|
+
class: g(["nb-confirm", t.contentClass])
|
|
255
|
+
}, [
|
|
256
|
+
F() ? (_(), u("div", {
|
|
257
|
+
key: 0,
|
|
258
|
+
id: O,
|
|
259
|
+
class: "nb-confirm__body"
|
|
260
|
+
}, [ie(e.$slots, "default", {}, () => [t.message ? (_(), u("p", de, y(t.message), 1)) : l("", !0)], !0), t.subject ? (_(), u("p", {
|
|
261
|
+
key: 0,
|
|
262
|
+
class: g(["nb-confirm__subject", `nb-confirm__subject--${t.tone}`])
|
|
263
|
+
}, [t.subjectLabel ? (_(), u("span", fe, y(t.subjectLabel), 1)) : l("", !0), d("span", pe, y(t.subject), 1)], 2)) : l("", !0)])) : l("", !0),
|
|
264
|
+
t.typeToConfirm ? (_(), u("div", me, [p(a, {
|
|
265
|
+
modelValue: M.value,
|
|
266
|
+
"onUpdate:modelValue": o[0] ||= (e) => M.value = e,
|
|
267
|
+
class: "nb-confirm__gate-field",
|
|
268
|
+
label: be.value,
|
|
269
|
+
helper: t.typeToConfirmHelper,
|
|
270
|
+
disabled: P.value,
|
|
271
|
+
autocomplete: "off",
|
|
272
|
+
spellcheck: "false",
|
|
273
|
+
"data-nb-confirm": "gate",
|
|
274
|
+
onKeydown: o[1] ||= se(ce(() => {}, ["prevent"]), ["enter"])
|
|
275
|
+
}, null, 8, [
|
|
276
|
+
"modelValue",
|
|
277
|
+
"label",
|
|
278
|
+
"helper",
|
|
279
|
+
"disabled"
|
|
280
|
+
])])) : l("", !0),
|
|
281
|
+
d("div", he, [
|
|
282
|
+
t.busy ? (_(), u("p", ge, y(t.busyLabel), 1)) : l("", !0),
|
|
283
|
+
t.succeeded && t.successLabel ? (_(), u("p", _e, [p(n, {
|
|
284
|
+
name: b(le),
|
|
285
|
+
size: 14,
|
|
286
|
+
"aria-hidden": "true"
|
|
287
|
+
}, null, 8, ["name"]), d("span", null, y(t.successLabel), 1)])) : l("", !0),
|
|
288
|
+
t.error ? (_(), u("div", {
|
|
289
|
+
key: 2,
|
|
290
|
+
ref_key: "errorRef",
|
|
291
|
+
ref: A,
|
|
292
|
+
class: "nb-confirm__error",
|
|
293
|
+
tabindex: "-1"
|
|
294
|
+
}, [p(i, { variant: "error" }, {
|
|
295
|
+
default: S(() => [f(y(t.error), 1)]),
|
|
296
|
+
_: 1
|
|
297
|
+
})], 512)) : l("", !0)
|
|
298
|
+
])
|
|
299
|
+
], 2)]),
|
|
300
|
+
_: 3
|
|
301
|
+
}, 8, [
|
|
302
|
+
"open",
|
|
303
|
+
"size",
|
|
304
|
+
"role",
|
|
305
|
+
"described-by",
|
|
306
|
+
"busy",
|
|
307
|
+
"close-on-overlay",
|
|
308
|
+
"close-disabled"
|
|
309
|
+
]));
|
|
310
|
+
}
|
|
311
|
+
}), [["__scopeId", "data-v-683eafb1"]]);
|
|
312
|
+
//#endregion
|
|
313
|
+
export { C as t };
|
|
@@ -4,8 +4,8 @@ import { t as n } from "./Icon-rREAqsu0.js";
|
|
|
4
4
|
import { useSurfaceLayer as r } from "./composables/useSurfaceLayer.composable.mjs";
|
|
5
5
|
import { usePhoneLayout as i } from "./composables/usePhoneLayout.composable.mjs";
|
|
6
6
|
import { t as a } from "./Button-IcCXOoCT.js";
|
|
7
|
-
import { t as o } from "./Grid-
|
|
8
|
-
import { t as s } from "./Checkbox-
|
|
7
|
+
import { t as o } from "./Grid-XtnH-vr_.js";
|
|
8
|
+
import { t as s } from "./Checkbox-B3gBM6xy.js";
|
|
9
9
|
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, getCurrentInstance as ee, mergeProps as te, normalizeClass as _, normalizeStyle as ne, onBeforeUnmount as re, openBlock as v, ref as y, renderList as b, renderSlot as x, toDisplayString as S, unref as ie, useId as ae, useSlots as oe, watch as C, withCtx as w, withModifiers as T } from "vue";
|
|
10
10
|
import * as se from "@nubisco/ui/icons/arrow-up";
|
|
11
11
|
import * as ce from "@nubisco/ui/icons/arrows-down-up";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),n=require(`./Size.d-GBIblj2D.cjs`),r=require(`./Icon-C8R_r_In.cjs`),i=require(`./composables/useSurfaceLayer.composable.cjs`),a=require(`./composables/usePhoneLayout.composable.cjs`),o=require(`./Button-C0UUTgEB.cjs`),s=require(`./Grid-By_NqGWQ.cjs`),c=require(`./Checkbox-BvWPRa40.cjs`);let l=require(`vue`),u=require(`@nubisco/ui/icons/arrow-up`);u=e.n(u);let d=require(`@nubisco/ui/icons/arrows-down-up`);d=e.n(d);let f=require(`@nubisco/ui/icons/arrow-down`);f=e.n(f);var p=[`inert`,`aria-hidden`],m={key:0},h={key:0,class:`nb-data-table__title`},g={key:1,class:`nb-data-table__description`},ee=[`inert`,`aria-hidden`],te={key:1,class:`nb-data-table__batch`,role:`region`,"aria-label":`Table batch actions`},ne={class:`nb-data-table__batch-count`},re={class:`nb-data-table__batch-actions`},ie={class:`nb-data-table__scroll`},ae=[`role`,`aria-label`,`aria-busy`],oe={key:0,class:`nb-data-table__col-select`},se={key:1,class:`nb-data-table__col-actions`},ce=[`role`],le=[`role`],ue={key:0,scope:`col`,class:`nb-data-table__th nb-data-table__select-cell`},_=[`aria-sort`],de=[`onClick`],fe={class:`nb-data-table__th-label`},pe={key:1,class:`nb-data-table__th-label`},me={key:1,scope:`col`,class:`nb-data-table__th nb-data-table__actions-cell`},he=[`role`],ge={key:0,class:`nb-data-table__td`},v={key:1,class:`nb-data-table__td`},y={key:1,class:`nb-data-table__state-row`},b=[`colspan`],x={key:2,class:`nb-data-table__state-row`},_e=[`colspan`],ve=[`role`,`aria-selected`,`onClick`],ye=[`checked`,`aria-label`,`onChange`],be=[`role`,`data-label`],xe={key:1,class:`nb-data-table__footer`},S=(0,l.defineComponent)({__name:`DataTable`,props:{columns:{},rows:{},rowKey:{},size:{default:n.r.Medium},sortState:{default:null},selectable:{default:`none`},selected:{default:()=>[]},loading:{type:Boolean,default:!1},skeletonRows:{default:5},error:{default:void 0},emptyMessage:{default:void 0},stickyHeader:{type:Boolean,default:!0},zebra:{type:Boolean,default:!1},fill:{type:Boolean,default:!1},title:{default:void 0},description:{default:void 0},ariaLabel:{default:void 0},stackOnPhone:{type:Boolean,default:!1}},emits:[`sort`,`update:selected`,`row-click`],setup(e,{emit:t}){let n=e,{layerProps:S}=i.useSurfaceLayer(),C=t,w=(0,l.useSlots)(),T=`nb-data-table-select-${(0,l.useId)()}`,E=(0,l.computed)(()=>n.size),D=(0,l.computed)(()=>n.columns.filter(e=>!e.hidden)),O=(0,l.computed)(()=>n.selectable!==`none`),k=(0,l.computed)(()=>!!w[`row-actions`]),A=(0,l.computed)(()=>D.value.length+(O.value?1:0)+(k.value?1:0)),{phone:j}=a.usePhoneLayout(),M=(0,l.computed)(()=>n.stackOnPhone&&j.value),Se=(0,l.computed)(()=>(D.value.find(e=>e.primary)??D.value.find(e=>!e.phoneHidden&&!e.phoneMeta))?.key);function Ce(e){return e.phoneHidden?`nb-data-table__td--phone-hidden`:e.key===Se.value?`nb-data-table__td--primary`:e.phoneMeta?`nb-data-table__td--meta`:`nb-data-table__td--field`}let we=(0,l.computed)(()=>!n.loading&&!n.error&&n.rows.length>0&&(n.selectable===`multiple`||D.value.some(e=>e.sortable&&!e.phoneHidden)));function Te(e){if(e.width!=null)return{width:typeof e.width==`number`?`${e.width}px`:e.width}}function N(e,t){return t[e.key]}function Ee(e){return e==null?``:String(e)}let P=e=>e.column.render?.(e.row,N(e.column,e.row),e.rowIndex)??null;P.props=[`column`,`row`,`rowIndex`];function F(e){let t=n.rowKey;return typeof t==`function`?t(e):e[t]}let I=(0,l.computed)(()=>new Set(n.selected)),De=(0,l.computed)(()=>n.selected),L=(0,l.computed)(()=>n.selected.length);function R(e){return I.value.has(F(e))}let z=(0,l.computed)(()=>n.rows.map(e=>F(e))),B=(0,l.computed)(()=>z.value.length>0&&z.value.every(e=>I.value.has(e))),Oe=(0,l.computed)(()=>!B.value&&z.value.some(e=>I.value.has(e))),V=(0,l.ref)(null),H=!1;function U(e){H=e.shiftKey}(0,l.watch)(z,()=>{V.value=null});function ke(e,t){let r=F(e),i=new Set(n.selected),a=!i.has(r),o=V.value,s=e=>{a?i.add(e):i.delete(e)};if(H&&o!==null&&o!==t){let e=Math.min(o,t),r=Math.max(o,t);for(let t=e;t<=r;t++){let e=n.rows[t];e&&s(F(e))}}else s(r),V.value=t;H=!1,C(`update:selected`,[...i])}function Ae(e){C(`update:selected`,[F(e)])}function je(){let e=new Set(n.selected);B.value?z.value.forEach(t=>e.delete(t)):z.value.forEach(t=>e.add(t)),C(`update:selected`,[...e])}function W(){C(`update:selected`,[])}let G=(0,l.computed)(()=>n.selectable!==`none`&&!!w[`batch-actions`]),K=(0,l.computed)(()=>G.value&&L.value>0),Me=(0,l.computed)(()=>!!n.title||!!n.description||!!w.toolbar||!!w.search||!!w[`toolbar-actions`]),Ne=(0,l.computed)(()=>Me.value||G.value),q=(0,l.ref)(null),J=(0,l.ref)(null),Y=(0,l.ref)(null),X=(0,l.ref)(!1);function Z(){let e=J.value,t=Y.value;X.value=!!e&&!!t&&t.offsetTop>=e.offsetTop+e.offsetHeight-1}let Q=null;(0,l.watch)([q,J,Y],e=>{if(Q?.disconnect(),Z(),!(typeof ResizeObserver>`u`)){Q??=new ResizeObserver(Z);for(let t of e)t&&Q.observe(t)}},{flush:`post`}),(0,l.onBeforeUnmount)(()=>{Q?.disconnect(),Q=null});function $(e){return!!n.sortState&&n.sortState.key===e.key&&n.sortState.direction!==`none`}function Pe(e){return $(e)?n.sortState.direction===`asc`?`ascending`:`descending`:`none`}function Fe(e){return $(e)?n.sortState.direction===`asc`?u:f:d}function Ie(e){return e===`asc`?`desc`:e===`desc`?`none`:`asc`}function Le(e){let t=n.sortState&&n.sortState.key===e.key?n.sortState.direction:`none`;C(`sort`,{key:e.key,direction:Ie(t)})}let Re=(0,l.getCurrentInstance)(),ze=(0,l.computed)(()=>!!Re?.vnode.props?.onRowClick);function Be(e,t){C(`row-click`,e,t)}return(t,n)=>((0,l.openBlock)(),(0,l.createElementBlock)(`div`,(0,l.mergeProps)({class:[`nb-data-table`,`nb-data-table--${e.size}`,{"nb-data-table--zebra":e.zebra},{"nb-data-table--sticky":e.stickyHeader},{"nb-data-table--fill":e.fill},{"nb-data-table--stacked":M.value},{"nb-data-table--stacked-headless":M.value&&!we.value}]},(0,l.unref)(S)),[Ne.value?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,ref_key:`toolbarRef`,ref:q,class:(0,l.normalizeClass)([`nb-data-table__toolbar`,{"nb-data-table__toolbar--wrapped":X.value}])},[(0,l.createElementVNode)(`div`,{ref_key:`toolbarHeadingRef`,ref:J,class:`nb-data-table__toolbar-heading`,inert:K.value||void 0,"aria-hidden":K.value||void 0},[(0,l.renderSlot)(t.$slots,`toolbar`,{selectedCount:L.value},()=>[e.title||e.description?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,m,[e.title?((0,l.openBlock)(),(0,l.createElementBlock)(`h2`,h,(0,l.toDisplayString)(e.title),1)):(0,l.createCommentVNode)(``,!0),e.description?((0,l.openBlock)(),(0,l.createElementBlock)(`p`,g,(0,l.toDisplayString)(e.description),1)):(0,l.createCommentVNode)(``,!0)])):(0,l.createCommentVNode)(``,!0)],!0)],8,p),t.$slots.search||t.$slots[`toolbar-actions`]?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,ref_key:`toolbarToolsRef`,ref:Y,class:(0,l.normalizeClass)([`nb-data-table__toolbar-tools`,{"nb-data-table__toolbar-tools--grow-search":X.value&&!!t.$slots.search}]),inert:K.value||void 0,"aria-hidden":K.value||void 0},[(0,l.renderSlot)(t.$slots,`search`,{},void 0,!0),(0,l.renderSlot)(t.$slots,`toolbar-actions`,{},void 0,!0)],10,ee)):(0,l.createCommentVNode)(``,!0),K.value?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,te,[(0,l.createElementVNode)(`span`,ne,(0,l.toDisplayString)(L.value)+` selected `,1),(0,l.createElementVNode)(`div`,re,[(0,l.renderSlot)(t.$slots,`batch-actions`,{selectedKeys:De.value,clear:W},void 0,!0)]),(0,l.createVNode)(o.t,{class:`nb-data-table__batch-cancel`,variant:`ghost`,size:E.value,onClick:W},{default:(0,l.withCtx)(()=>[...n[2]||=[(0,l.createTextVNode)(` Cancel `,-1)]]),_:1},8,[`size`])])):(0,l.createCommentVNode)(``,!0)],2)):(0,l.createCommentVNode)(``,!0),(0,l.createElementVNode)(`div`,ie,[(0,l.createElementVNode)(`table`,{class:`nb-data-table__table`,role:M.value?`table`:void 0,"aria-label":e.ariaLabel||e.title||void 0,"aria-busy":e.loading||void 0},[(0,l.createElementVNode)(`colgroup`,null,[O.value?((0,l.openBlock)(),(0,l.createElementBlock)(`col`,oe)):(0,l.createCommentVNode)(``,!0),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(D.value,e=>((0,l.openBlock)(),(0,l.createElementBlock)(`col`,{key:`col-${e.key}`,style:(0,l.normalizeStyle)(Te(e))},null,4))),128)),k.value?((0,l.openBlock)(),(0,l.createElementBlock)(`col`,se)):(0,l.createCommentVNode)(``,!0)]),(0,l.createElementVNode)(`thead`,{class:`nb-data-table__head`,role:M.value?`rowgroup`:void 0},[(0,l.createElementVNode)(`tr`,{role:M.value?`row`:void 0},[O.value?((0,l.openBlock)(),(0,l.createElementBlock)(`th`,ue,[e.selectable===`multiple`?((0,l.openBlock)(),(0,l.createBlock)(c.t,{key:0,"model-value":B.value,indeterminate:Oe.value,"aria-label":`Select all rows`,"onUpdate:modelValue":je},null,8,[`model-value`,`indeterminate`])):(0,l.createCommentVNode)(``,!0)])):(0,l.createCommentVNode)(``,!0),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(D.value,e=>((0,l.openBlock)(),(0,l.createElementBlock)(`th`,{key:`th-${e.key}`,scope:`col`,class:(0,l.normalizeClass)([`nb-data-table__th`,`nb-data-table__th--${e.align||`left`}`,{"nb-data-table__th--sortable":e.sortable},{"nb-data-table__th--sorted":$(e)},M.value&&e.phoneHidden&&`nb-data-table__th--phone-hidden`]),"aria-sort":e.sortable?Pe(e):void 0},[e.sortable?((0,l.openBlock)(),(0,l.createElementBlock)(`button`,{key:0,type:`button`,class:`nb-data-table__sort`,onClick:t=>Le(e)},[(0,l.createElementVNode)(`span`,fe,[(0,l.renderSlot)(t.$slots,`header-${e.key}`,{column:e},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.header),1)],!0)]),(0,l.createVNode)(r.t,{name:Fe(e),class:`nb-data-table__sort-icon`,"aria-hidden":`true`},null,8,[`name`])],8,de)):((0,l.openBlock)(),(0,l.createElementBlock)(`span`,pe,[(0,l.renderSlot)(t.$slots,`header-${e.key}`,{column:e},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.header),1)],!0)]))],10,_))),128)),k.value?((0,l.openBlock)(),(0,l.createElementBlock)(`th`,me,[...n[3]||=[(0,l.createElementVNode)(`span`,{class:`nb-sr-only`},`Row actions`,-1)]])):(0,l.createCommentVNode)(``,!0)],8,le)],8,ce),(0,l.createElementVNode)(`tbody`,{class:`nb-data-table__body`,role:M.value?`rowgroup`:void 0},[e.loading?((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,{key:0},(0,l.renderList)(e.skeletonRows,e=>((0,l.openBlock)(),(0,l.createElementBlock)(`tr`,{key:`skeleton-${e}`,class:`nb-data-table__row nb-data-table__row--skeleton`},[O.value?((0,l.openBlock)(),(0,l.createElementBlock)(`td`,ge,[...n[4]||=[(0,l.createElementVNode)(`span`,{class:`nb-data-table__skeleton nb-data-table__skeleton--box`},null,-1)]])):(0,l.createCommentVNode)(``,!0),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(D.value,t=>((0,l.openBlock)(),(0,l.createElementBlock)(`td`,{key:`sk-${e}-${t.key}`,class:`nb-data-table__td`},[...n[5]||=[(0,l.createElementVNode)(`span`,{class:`nb-data-table__skeleton`},null,-1)]]))),128)),k.value?((0,l.openBlock)(),(0,l.createElementBlock)(`td`,v,[...n[6]||=[(0,l.createElementVNode)(`span`,{class:`nb-data-table__skeleton nb-data-table__skeleton--box`},null,-1)]])):(0,l.createCommentVNode)(``,!0)]))),128)):e.error?((0,l.openBlock)(),(0,l.createElementBlock)(`tr`,y,[(0,l.createElementVNode)(`td`,{colspan:A.value,class:`nb-data-table__state nb-data-table__state--error`},[(0,l.renderSlot)(t.$slots,`error`,{error:e.error},()=>[(0,l.createVNode)(s.t,{is:`span`,align:`center`,justify:`center`,gap:`xs`,class:`nb-data-table__state-inner`},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(r.t,{name:`warning-circle-fill`,"aria-hidden":`true`}),(0,l.createElementVNode)(`span`,null,(0,l.toDisplayString)(e.error),1)]),_:1})],!0)],8,b)])):e.rows.length?((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,{key:3},(0,l.renderList)(e.rows,(r,i)=>((0,l.openBlock)(),(0,l.createElementBlock)(`tr`,{key:F(r),class:(0,l.normalizeClass)([`nb-data-table__row`,{"nb-data-table__row--selected":R(r)},{"nb-data-table__row--clickable":ze.value}]),role:M.value?`row`:void 0,"aria-selected":e.selectable===`none`?void 0:R(r),onClick:e=>Be(r,i)},[O.value?((0,l.openBlock)(),(0,l.createElementBlock)(`td`,{key:0,class:`nb-data-table__td nb-data-table__select-cell`,onClick:n[0]||=(0,l.withModifiers)(()=>{},[`stop`]),onMousedown:U,onKeydown:U},[e.selectable===`multiple`?((0,l.openBlock)(),(0,l.createBlock)(c.t,{key:0,"model-value":R(r),"aria-label":`Select row ${i+1}`,"onUpdate:modelValue":e=>ke(r,i)},null,8,[`model-value`,`aria-label`,`onUpdate:modelValue`])):((0,l.openBlock)(),(0,l.createElementBlock)(`input`,{key:1,type:`radio`,class:`nb-data-table__radio`,name:T,checked:R(r),"aria-label":`Select row ${i+1}`,onChange:e=>Ae(r)},null,40,ye))],32)):(0,l.createCommentVNode)(``,!0),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(D.value,n=>((0,l.openBlock)(),(0,l.createElementBlock)(`td`,{key:`td-${F(r)}-${n.key}`,class:(0,l.normalizeClass)([`nb-data-table__td`,`nb-data-table__td--${n.align||`left`}`,n.cellClass,M.value&&Ce(n)]),role:M.value?`cell`:void 0,"data-label":e.stackOnPhone?n.header:void 0},[(0,l.renderSlot)(t.$slots,`cell-${n.key}`,{row:r,value:N(n,r),column:n,rowIndex:i},()=>[n.render?((0,l.openBlock)(),(0,l.createBlock)(P,{key:0,column:n,row:r,"row-index":i},null,8,[`column`,`row`,`row-index`])):((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:1},[(0,l.createTextVNode)((0,l.toDisplayString)(Ee(N(n,r))),1)],64))],!0)],10,be))),128)),k.value?((0,l.openBlock)(),(0,l.createElementBlock)(`td`,{key:1,class:`nb-data-table__td nb-data-table__actions-cell`,onClick:n[1]||=(0,l.withModifiers)(()=>{},[`stop`])},[(0,l.renderSlot)(t.$slots,`row-actions`,{row:r,rowIndex:i},void 0,!0)])):(0,l.createCommentVNode)(``,!0)],10,ve))),128)):((0,l.openBlock)(),(0,l.createElementBlock)(`tr`,x,[(0,l.createElementVNode)(`td`,{colspan:A.value,class:`nb-data-table__state nb-data-table__state--empty`},[(0,l.renderSlot)(t.$slots,`empty`,{},()=>[(0,l.createElementVNode)(`span`,null,(0,l.toDisplayString)(e.emptyMessage||`No data to display`),1)],!0)],8,_e)]))],8,he)],8,ae)]),t.$slots.footer?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,xe,[(0,l.renderSlot)(t.$slots,`footer`,{},void 0,!0)])):(0,l.createCommentVNode)(``,!0)],16))}}),C=t.t(S,[[`__scopeId`,`data-v-0d151db9`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return C}});
|
|
1
|
+
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),n=require(`./Size.d-GBIblj2D.cjs`),r=require(`./Icon-C8R_r_In.cjs`),i=require(`./composables/useSurfaceLayer.composable.cjs`),a=require(`./composables/usePhoneLayout.composable.cjs`),o=require(`./Button-C0UUTgEB.cjs`),s=require(`./Grid-D8c0StGs.cjs`),c=require(`./Checkbox-lWejJzIQ.cjs`);let l=require(`vue`),u=require(`@nubisco/ui/icons/arrow-up`);u=e.n(u);let d=require(`@nubisco/ui/icons/arrows-down-up`);d=e.n(d);let f=require(`@nubisco/ui/icons/arrow-down`);f=e.n(f);var p=[`inert`,`aria-hidden`],m={key:0},h={key:0,class:`nb-data-table__title`},g={key:1,class:`nb-data-table__description`},ee=[`inert`,`aria-hidden`],te={key:1,class:`nb-data-table__batch`,role:`region`,"aria-label":`Table batch actions`},ne={class:`nb-data-table__batch-count`},re={class:`nb-data-table__batch-actions`},ie={class:`nb-data-table__scroll`},ae=[`role`,`aria-label`,`aria-busy`],oe={key:0,class:`nb-data-table__col-select`},se={key:1,class:`nb-data-table__col-actions`},ce=[`role`],le=[`role`],ue={key:0,scope:`col`,class:`nb-data-table__th nb-data-table__select-cell`},_=[`aria-sort`],de=[`onClick`],fe={class:`nb-data-table__th-label`},pe={key:1,class:`nb-data-table__th-label`},me={key:1,scope:`col`,class:`nb-data-table__th nb-data-table__actions-cell`},he=[`role`],ge={key:0,class:`nb-data-table__td`},v={key:1,class:`nb-data-table__td`},y={key:1,class:`nb-data-table__state-row`},b=[`colspan`],x={key:2,class:`nb-data-table__state-row`},_e=[`colspan`],ve=[`role`,`aria-selected`,`onClick`],ye=[`checked`,`aria-label`,`onChange`],be=[`role`,`data-label`],xe={key:1,class:`nb-data-table__footer`},S=(0,l.defineComponent)({__name:`DataTable`,props:{columns:{},rows:{},rowKey:{},size:{default:n.r.Medium},sortState:{default:null},selectable:{default:`none`},selected:{default:()=>[]},loading:{type:Boolean,default:!1},skeletonRows:{default:5},error:{default:void 0},emptyMessage:{default:void 0},stickyHeader:{type:Boolean,default:!0},zebra:{type:Boolean,default:!1},fill:{type:Boolean,default:!1},title:{default:void 0},description:{default:void 0},ariaLabel:{default:void 0},stackOnPhone:{type:Boolean,default:!1}},emits:[`sort`,`update:selected`,`row-click`],setup(e,{emit:t}){let n=e,{layerProps:S}=i.useSurfaceLayer(),C=t,w=(0,l.useSlots)(),T=`nb-data-table-select-${(0,l.useId)()}`,E=(0,l.computed)(()=>n.size),D=(0,l.computed)(()=>n.columns.filter(e=>!e.hidden)),O=(0,l.computed)(()=>n.selectable!==`none`),k=(0,l.computed)(()=>!!w[`row-actions`]),A=(0,l.computed)(()=>D.value.length+(O.value?1:0)+(k.value?1:0)),{phone:j}=a.usePhoneLayout(),M=(0,l.computed)(()=>n.stackOnPhone&&j.value),Se=(0,l.computed)(()=>(D.value.find(e=>e.primary)??D.value.find(e=>!e.phoneHidden&&!e.phoneMeta))?.key);function Ce(e){return e.phoneHidden?`nb-data-table__td--phone-hidden`:e.key===Se.value?`nb-data-table__td--primary`:e.phoneMeta?`nb-data-table__td--meta`:`nb-data-table__td--field`}let we=(0,l.computed)(()=>!n.loading&&!n.error&&n.rows.length>0&&(n.selectable===`multiple`||D.value.some(e=>e.sortable&&!e.phoneHidden)));function Te(e){if(e.width!=null)return{width:typeof e.width==`number`?`${e.width}px`:e.width}}function N(e,t){return t[e.key]}function Ee(e){return e==null?``:String(e)}let P=e=>e.column.render?.(e.row,N(e.column,e.row),e.rowIndex)??null;P.props=[`column`,`row`,`rowIndex`];function F(e){let t=n.rowKey;return typeof t==`function`?t(e):e[t]}let I=(0,l.computed)(()=>new Set(n.selected)),De=(0,l.computed)(()=>n.selected),L=(0,l.computed)(()=>n.selected.length);function R(e){return I.value.has(F(e))}let z=(0,l.computed)(()=>n.rows.map(e=>F(e))),B=(0,l.computed)(()=>z.value.length>0&&z.value.every(e=>I.value.has(e))),Oe=(0,l.computed)(()=>!B.value&&z.value.some(e=>I.value.has(e))),V=(0,l.ref)(null),H=!1;function U(e){H=e.shiftKey}(0,l.watch)(z,()=>{V.value=null});function ke(e,t){let r=F(e),i=new Set(n.selected),a=!i.has(r),o=V.value,s=e=>{a?i.add(e):i.delete(e)};if(H&&o!==null&&o!==t){let e=Math.min(o,t),r=Math.max(o,t);for(let t=e;t<=r;t++){let e=n.rows[t];e&&s(F(e))}}else s(r),V.value=t;H=!1,C(`update:selected`,[...i])}function Ae(e){C(`update:selected`,[F(e)])}function je(){let e=new Set(n.selected);B.value?z.value.forEach(t=>e.delete(t)):z.value.forEach(t=>e.add(t)),C(`update:selected`,[...e])}function W(){C(`update:selected`,[])}let G=(0,l.computed)(()=>n.selectable!==`none`&&!!w[`batch-actions`]),K=(0,l.computed)(()=>G.value&&L.value>0),Me=(0,l.computed)(()=>!!n.title||!!n.description||!!w.toolbar||!!w.search||!!w[`toolbar-actions`]),Ne=(0,l.computed)(()=>Me.value||G.value),q=(0,l.ref)(null),J=(0,l.ref)(null),Y=(0,l.ref)(null),X=(0,l.ref)(!1);function Z(){let e=J.value,t=Y.value;X.value=!!e&&!!t&&t.offsetTop>=e.offsetTop+e.offsetHeight-1}let Q=null;(0,l.watch)([q,J,Y],e=>{if(Q?.disconnect(),Z(),!(typeof ResizeObserver>`u`)){Q??=new ResizeObserver(Z);for(let t of e)t&&Q.observe(t)}},{flush:`post`}),(0,l.onBeforeUnmount)(()=>{Q?.disconnect(),Q=null});function $(e){return!!n.sortState&&n.sortState.key===e.key&&n.sortState.direction!==`none`}function Pe(e){return $(e)?n.sortState.direction===`asc`?`ascending`:`descending`:`none`}function Fe(e){return $(e)?n.sortState.direction===`asc`?u:f:d}function Ie(e){return e===`asc`?`desc`:e===`desc`?`none`:`asc`}function Le(e){let t=n.sortState&&n.sortState.key===e.key?n.sortState.direction:`none`;C(`sort`,{key:e.key,direction:Ie(t)})}let Re=(0,l.getCurrentInstance)(),ze=(0,l.computed)(()=>!!Re?.vnode.props?.onRowClick);function Be(e,t){C(`row-click`,e,t)}return(t,n)=>((0,l.openBlock)(),(0,l.createElementBlock)(`div`,(0,l.mergeProps)({class:[`nb-data-table`,`nb-data-table--${e.size}`,{"nb-data-table--zebra":e.zebra},{"nb-data-table--sticky":e.stickyHeader},{"nb-data-table--fill":e.fill},{"nb-data-table--stacked":M.value},{"nb-data-table--stacked-headless":M.value&&!we.value}]},(0,l.unref)(S)),[Ne.value?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,ref_key:`toolbarRef`,ref:q,class:(0,l.normalizeClass)([`nb-data-table__toolbar`,{"nb-data-table__toolbar--wrapped":X.value}])},[(0,l.createElementVNode)(`div`,{ref_key:`toolbarHeadingRef`,ref:J,class:`nb-data-table__toolbar-heading`,inert:K.value||void 0,"aria-hidden":K.value||void 0},[(0,l.renderSlot)(t.$slots,`toolbar`,{selectedCount:L.value},()=>[e.title||e.description?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,m,[e.title?((0,l.openBlock)(),(0,l.createElementBlock)(`h2`,h,(0,l.toDisplayString)(e.title),1)):(0,l.createCommentVNode)(``,!0),e.description?((0,l.openBlock)(),(0,l.createElementBlock)(`p`,g,(0,l.toDisplayString)(e.description),1)):(0,l.createCommentVNode)(``,!0)])):(0,l.createCommentVNode)(``,!0)],!0)],8,p),t.$slots.search||t.$slots[`toolbar-actions`]?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,ref_key:`toolbarToolsRef`,ref:Y,class:(0,l.normalizeClass)([`nb-data-table__toolbar-tools`,{"nb-data-table__toolbar-tools--grow-search":X.value&&!!t.$slots.search}]),inert:K.value||void 0,"aria-hidden":K.value||void 0},[(0,l.renderSlot)(t.$slots,`search`,{},void 0,!0),(0,l.renderSlot)(t.$slots,`toolbar-actions`,{},void 0,!0)],10,ee)):(0,l.createCommentVNode)(``,!0),K.value?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,te,[(0,l.createElementVNode)(`span`,ne,(0,l.toDisplayString)(L.value)+` selected `,1),(0,l.createElementVNode)(`div`,re,[(0,l.renderSlot)(t.$slots,`batch-actions`,{selectedKeys:De.value,clear:W},void 0,!0)]),(0,l.createVNode)(o.t,{class:`nb-data-table__batch-cancel`,variant:`ghost`,size:E.value,onClick:W},{default:(0,l.withCtx)(()=>[...n[2]||=[(0,l.createTextVNode)(` Cancel `,-1)]]),_:1},8,[`size`])])):(0,l.createCommentVNode)(``,!0)],2)):(0,l.createCommentVNode)(``,!0),(0,l.createElementVNode)(`div`,ie,[(0,l.createElementVNode)(`table`,{class:`nb-data-table__table`,role:M.value?`table`:void 0,"aria-label":e.ariaLabel||e.title||void 0,"aria-busy":e.loading||void 0},[(0,l.createElementVNode)(`colgroup`,null,[O.value?((0,l.openBlock)(),(0,l.createElementBlock)(`col`,oe)):(0,l.createCommentVNode)(``,!0),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(D.value,e=>((0,l.openBlock)(),(0,l.createElementBlock)(`col`,{key:`col-${e.key}`,style:(0,l.normalizeStyle)(Te(e))},null,4))),128)),k.value?((0,l.openBlock)(),(0,l.createElementBlock)(`col`,se)):(0,l.createCommentVNode)(``,!0)]),(0,l.createElementVNode)(`thead`,{class:`nb-data-table__head`,role:M.value?`rowgroup`:void 0},[(0,l.createElementVNode)(`tr`,{role:M.value?`row`:void 0},[O.value?((0,l.openBlock)(),(0,l.createElementBlock)(`th`,ue,[e.selectable===`multiple`?((0,l.openBlock)(),(0,l.createBlock)(c.t,{key:0,"model-value":B.value,indeterminate:Oe.value,"aria-label":`Select all rows`,"onUpdate:modelValue":je},null,8,[`model-value`,`indeterminate`])):(0,l.createCommentVNode)(``,!0)])):(0,l.createCommentVNode)(``,!0),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(D.value,e=>((0,l.openBlock)(),(0,l.createElementBlock)(`th`,{key:`th-${e.key}`,scope:`col`,class:(0,l.normalizeClass)([`nb-data-table__th`,`nb-data-table__th--${e.align||`left`}`,{"nb-data-table__th--sortable":e.sortable},{"nb-data-table__th--sorted":$(e)},M.value&&e.phoneHidden&&`nb-data-table__th--phone-hidden`]),"aria-sort":e.sortable?Pe(e):void 0},[e.sortable?((0,l.openBlock)(),(0,l.createElementBlock)(`button`,{key:0,type:`button`,class:`nb-data-table__sort`,onClick:t=>Le(e)},[(0,l.createElementVNode)(`span`,fe,[(0,l.renderSlot)(t.$slots,`header-${e.key}`,{column:e},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.header),1)],!0)]),(0,l.createVNode)(r.t,{name:Fe(e),class:`nb-data-table__sort-icon`,"aria-hidden":`true`},null,8,[`name`])],8,de)):((0,l.openBlock)(),(0,l.createElementBlock)(`span`,pe,[(0,l.renderSlot)(t.$slots,`header-${e.key}`,{column:e},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.header),1)],!0)]))],10,_))),128)),k.value?((0,l.openBlock)(),(0,l.createElementBlock)(`th`,me,[...n[3]||=[(0,l.createElementVNode)(`span`,{class:`nb-sr-only`},`Row actions`,-1)]])):(0,l.createCommentVNode)(``,!0)],8,le)],8,ce),(0,l.createElementVNode)(`tbody`,{class:`nb-data-table__body`,role:M.value?`rowgroup`:void 0},[e.loading?((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,{key:0},(0,l.renderList)(e.skeletonRows,e=>((0,l.openBlock)(),(0,l.createElementBlock)(`tr`,{key:`skeleton-${e}`,class:`nb-data-table__row nb-data-table__row--skeleton`},[O.value?((0,l.openBlock)(),(0,l.createElementBlock)(`td`,ge,[...n[4]||=[(0,l.createElementVNode)(`span`,{class:`nb-data-table__skeleton nb-data-table__skeleton--box`},null,-1)]])):(0,l.createCommentVNode)(``,!0),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(D.value,t=>((0,l.openBlock)(),(0,l.createElementBlock)(`td`,{key:`sk-${e}-${t.key}`,class:`nb-data-table__td`},[...n[5]||=[(0,l.createElementVNode)(`span`,{class:`nb-data-table__skeleton`},null,-1)]]))),128)),k.value?((0,l.openBlock)(),(0,l.createElementBlock)(`td`,v,[...n[6]||=[(0,l.createElementVNode)(`span`,{class:`nb-data-table__skeleton nb-data-table__skeleton--box`},null,-1)]])):(0,l.createCommentVNode)(``,!0)]))),128)):e.error?((0,l.openBlock)(),(0,l.createElementBlock)(`tr`,y,[(0,l.createElementVNode)(`td`,{colspan:A.value,class:`nb-data-table__state nb-data-table__state--error`},[(0,l.renderSlot)(t.$slots,`error`,{error:e.error},()=>[(0,l.createVNode)(s.t,{is:`span`,align:`center`,justify:`center`,gap:`xs`,class:`nb-data-table__state-inner`},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(r.t,{name:`warning-circle-fill`,"aria-hidden":`true`}),(0,l.createElementVNode)(`span`,null,(0,l.toDisplayString)(e.error),1)]),_:1})],!0)],8,b)])):e.rows.length?((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,{key:3},(0,l.renderList)(e.rows,(r,i)=>((0,l.openBlock)(),(0,l.createElementBlock)(`tr`,{key:F(r),class:(0,l.normalizeClass)([`nb-data-table__row`,{"nb-data-table__row--selected":R(r)},{"nb-data-table__row--clickable":ze.value}]),role:M.value?`row`:void 0,"aria-selected":e.selectable===`none`?void 0:R(r),onClick:e=>Be(r,i)},[O.value?((0,l.openBlock)(),(0,l.createElementBlock)(`td`,{key:0,class:`nb-data-table__td nb-data-table__select-cell`,onClick:n[0]||=(0,l.withModifiers)(()=>{},[`stop`]),onMousedown:U,onKeydown:U},[e.selectable===`multiple`?((0,l.openBlock)(),(0,l.createBlock)(c.t,{key:0,"model-value":R(r),"aria-label":`Select row ${i+1}`,"onUpdate:modelValue":e=>ke(r,i)},null,8,[`model-value`,`aria-label`,`onUpdate:modelValue`])):((0,l.openBlock)(),(0,l.createElementBlock)(`input`,{key:1,type:`radio`,class:`nb-data-table__radio`,name:T,checked:R(r),"aria-label":`Select row ${i+1}`,onChange:e=>Ae(r)},null,40,ye))],32)):(0,l.createCommentVNode)(``,!0),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(D.value,n=>((0,l.openBlock)(),(0,l.createElementBlock)(`td`,{key:`td-${F(r)}-${n.key}`,class:(0,l.normalizeClass)([`nb-data-table__td`,`nb-data-table__td--${n.align||`left`}`,n.cellClass,M.value&&Ce(n)]),role:M.value?`cell`:void 0,"data-label":e.stackOnPhone?n.header:void 0},[(0,l.renderSlot)(t.$slots,`cell-${n.key}`,{row:r,value:N(n,r),column:n,rowIndex:i},()=>[n.render?((0,l.openBlock)(),(0,l.createBlock)(P,{key:0,column:n,row:r,"row-index":i},null,8,[`column`,`row`,`row-index`])):((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:1},[(0,l.createTextVNode)((0,l.toDisplayString)(Ee(N(n,r))),1)],64))],!0)],10,be))),128)),k.value?((0,l.openBlock)(),(0,l.createElementBlock)(`td`,{key:1,class:`nb-data-table__td nb-data-table__actions-cell`,onClick:n[1]||=(0,l.withModifiers)(()=>{},[`stop`])},[(0,l.renderSlot)(t.$slots,`row-actions`,{row:r,rowIndex:i},void 0,!0)])):(0,l.createCommentVNode)(``,!0)],10,ve))),128)):((0,l.openBlock)(),(0,l.createElementBlock)(`tr`,x,[(0,l.createElementVNode)(`td`,{colspan:A.value,class:`nb-data-table__state nb-data-table__state--empty`},[(0,l.renderSlot)(t.$slots,`empty`,{},()=>[(0,l.createElementVNode)(`span`,null,(0,l.toDisplayString)(e.emptyMessage||`No data to display`),1)],!0)],8,_e)]))],8,he)],8,ae)]),t.$slots.footer?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,xe,[(0,l.renderSlot)(t.$slots,`footer`,{},void 0,!0)])):(0,l.createCommentVNode)(``,!0)],16))}}),C=t.t(S,[[`__scopeId`,`data-v-0d151db9`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return C}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Icon-C8R_r_In.cjs`),t=require(`./composables/useSurfaceLayer.composable.cjs`),n=require(`./composables/usePhoneLayout.composable.cjs`),r=require(`./Label-CR6g53gz.cjs`),i=require(`./Message-CjM5AAf0.cjs`),a=require(`./Grid-By_NqGWQ.cjs`),o=require(`./composables/useMenuSurface.composable.cjs`),s=require(`./composables/useVisualViewportVar.composable.cjs`);let c=require(`vue`),l=require(`@nubisco/ui/icons/caret-right`),u=require(`@nubisco/ui/icons/calendar`),d=require(`@nubisco/ui/icons/caret-double-left`),ee=require(`@nubisco/ui/icons/caret-left`),te=require(`@nubisco/ui/icons/caret-double-right`);var ne={class:`nb-date-picker__col`},re=[`id`,`value`,`placeholder`,`disabled`,`readonly`,`required`,`name`,`aria-invalid`,`aria-describedby`],ie=[`disabled`,`aria-label`],ae={key:0,class:`nb-date-picker__col`},oe=[`id`,`value`,`placeholder`,`disabled`,`readonly`,`required`,`aria-invalid`,`aria-describedby`],se=[`disabled`,`aria-label`],ce={key:0,class:`nb-date-picker__inner-header`},le=[`for`],ue={key:0,class:`nb-date-picker__asterisk`,"aria-hidden":`true`},de={class:`nb-date-picker__fluid-row`},fe=[`id`,`value`,`placeholder`,`disabled`,`readonly`,`required`,`name`,`aria-invalid`],pe=[`disabled`,`aria-label`],me={key:0,class:`nb-date-picker__inner-header`},he=[`for`],ge={key:0,class:`nb-date-picker__asterisk`,"aria-hidden":`true`},_e={class:`nb-date-picker__fluid-row`},ve=[`id`,`value`,`placeholder`,`disabled`,`readonly`,`required`,`aria-invalid`],ye=[`disabled`,`aria-label`],be=[`aria-label`],xe={class:`nb-date-picker__cal-header`},Se=[`id`],Ce=[`aria-labelledby`],we={class:`nb-date-picker__cal-weekdays`},Te=[`abbr`],Ee=[`aria-selected`,`aria-disabled`],De=[`tabindex`,`disabled`,`aria-label`,`data-date`,`onClick`],f=(0,c.defineComponent)({inheritAttrs:!1,__name:`DatePicker`,props:{modelValue:{default:null},type:{default:`single`},endValue:{default:null},min:{default:void 0},max:{default:void 0},weekStart:{default:1},locale:{default:void 0},endPlaceholder:{default:``},endLabel:{default:``},endError:{default:``},endWarning:{default:``},disabledDates:{type:[Array,Function],default:void 0},readonly:{type:Boolean,default:!1},placeholder:{default:``},name:{default:``},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},id:{default:void 0},label:{default:``},error:{default:``},warning:{default:``},helper:{default:``},variant:{default:`default`},size:{default:`md`}},emits:[`update:modelValue`,`update:endValue`,`change`],setup(f,{expose:Oe,emit:ke}){let p=f,{layerProps:Ae}=t.useSurfaceLayer({overlay:!0}),m=ke,je=`nb-date-picker-${(0,c.useId)()}`,h=(0,c.computed)(()=>p.id??je),g=(0,c.computed)(()=>`${h.value}-end`),_=(0,c.computed)(()=>`${h.value}-helper`),Me=(0,c.computed)(()=>`${h.value}-message`),Ne=(0,c.computed)(()=>`${h.value}-end-message`),Pe=(0,c.computed)(()=>`${h.value}-cal-title`),v=(0,c.ref)(null),Fe=(0,c.computed)(()=>v.value!==null),y=(0,c.ref)(!1),b=(0,c.ref)($(new Date)),x=(0,c.ref)(null),S=(0,c.ref)(null),C=(0,c.ref)(null),w=(0,c.ref)(null);o.useMenuSurface(w);let{phone:T}=n.usePhoneLayout(),Ie=(0,c.ref)(null);s.useVisualViewportVar(()=>y.value);let Le=(0,c.ref)({position:`fixed`,top:`0px`,left:`0px`,zIndex:`9999`}),E=(0,c.ref)(`start`),D=(0,c.computed)(()=>p.locale||navigator.language||`pt-PT`),O=(0,c.computed)(()=>new Intl.DateTimeFormat(D.value).formatToParts(new Date(2e3,0,15)).map(e=>e.type===`day`?`dd`:e.type===`month`?`mm`:e.type===`year`?`yyyy`:e.value).join(``));function k(e){if(!e)return``;let t=new Date(e+`T00:00:00`);return isNaN(t.getTime())?e:t.toLocaleDateString(D.value)}function Re(e){return new Date(e+`T00:00:00`).toLocaleDateString(D.value,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`})}let A=(0,c.computed)(()=>k(p.modelValue??null)),ze=(0,c.computed)(()=>k(p.endValue??null)),j=(0,c.computed)(()=>p.error?{variant:`error`,text:p.error}:p.warning?{variant:`warning`,text:p.warning}:null),M=(0,c.computed)(()=>p.type===`range`?p.endError?{variant:`error`,text:p.endError}:p.endWarning?{variant:`warning`,text:p.endWarning}:null:null),N=(0,c.computed)(()=>j.value?j.value:p.helper?{variant:`helper`,text:p.helper}:null),Be=(0,c.computed)(()=>{if(p.variant===`default`)return j.value?Me.value:p.helper?_.value:void 0}),Ve=(0,c.computed)(()=>{if(p.variant===`default`)return M.value?Ne.value:p.helper?_.value:void 0}),P=(0,c.computed)(()=>p.type===`range`&&!!p.endLabel),He=(0,c.computed)(()=>p.endLabel||p.endPlaceholder);function F(e){return p.min!=null&&e<p.min||p.max!=null&&e>p.max?!0:p.disabledDates?typeof p.disabledDates==`function`?p.disabledDates(e):p.disabledDates.includes(e):!1}let Ue=(0,c.computed)(()=>new Intl.DateTimeFormat(D.value).formatToParts(new Date(2e3,0,15)).map(e=>e.type).filter(e=>e===`day`||e===`month`||e===`year`));function We(e,t,n){let r=new Date(e,t-1,n);return r.getMonth()!==t-1||r.getDate()!==n?null:(r.setFullYear(e),$(r))}function Ge(e){let t=e.split(/[\s./-]+/).filter(Boolean);if(t.length!==3)return null;let n=t[0].length===4?[`year`,`month`,`day`]:Ue.value;if(n.length!==3)return null;let r={day:0,month:0,year:0};for(let e=0;e<3;e++){let i=n[e],a=t[e];if(i===`year`?a.length!==4:a.length>2)return null;r[i]=Number(a)}return We(r.year,r.month,r.day)}function Ke(e){let t=e.trim();if(!t)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let e=new Date(t+`T00:00:00`);return isNaN(e.getTime())?null:t}if(/^[\d\s./-]+$/.test(t))return Ge(t);let n=new Date(t);return isNaN(n.getTime())?null:$(n)}function qe(e){let t=e.target.value,n=Ke(t);n&&F(n)||(n||t===``)&&(m(`update:modelValue`,n),m(`change`,n))}function Je(e){let t=e.target.value,n=Ke(t);n&&F(n)||(n||t===``)&&m(`update:endValue`,n)}function I(e){v.value=e.target===C.value?`end`:`start`,p.type!==`simple`&&!p.readonly&&(E.value=v.value,y.value?z():B())}function L(){v.value=null}function R(e){if(!(p.type===`simple`||p.readonly))switch(e.key){case`Escape`:y.value&&(V(),e.preventDefault());break;case`ArrowDown`:e.preventDefault(),y.value||B(),(0,c.nextTick)(U);break;case`Enter`:y.value||(e.preventDefault(),B(),(0,c.nextTick)(U));break}}function z(){let e=x.value?.querySelectorAll(`.nb-date-picker__input-wrapper`);if(!e?.length)return;let t=(E.value===`end`&&e.length>1?e[1]:e[0]).getBoundingClientRect(),n=w.value?.offsetWidth??0,r=w.value?.offsetHeight??0,i=t.left,a=t.bottom+4;n>0&&(i=Math.max(8,Math.min(i,window.innerWidth-n-8))),r>0&&a+r>window.innerHeight-8&&t.top-4-r>=8&&(a=t.top-4-r),Le.value={position:`fixed`,top:`${a}px`,left:`${i}px`,zIndex:`9999`}}function B(){if(p.disabled||p.readonly||p.type===`simple`||y.value)return;y.value=!0;let e=E.value===`end`&&p.endValue?p.endValue:p.modelValue,t=e?new Date(e+`T00:00:00`):new Date;X.value=t.getFullYear(),Z.value=t.getMonth(),b.value=e||$(new Date),z(),(0,c.nextTick)(z)}function V(){y.value&&(y.value=!1,(0,c.nextTick)(()=>{E.value===`end`&&C.value?C.value.focus():S.value?.focus()}))}function H(){y.value?V():(E.value=`start`,B(),(0,c.nextTick)(U))}function U(){(0,c.nextTick)(()=>{(w.value?.querySelector(`[data-date="${b.value}"]`))?.focus()})}function Ye(e){F(e)||(p.type===`range`?E.value===`start`?(m(`update:modelValue`,e),m(`change`,e),E.value=`end`,b.value=e,(0,c.nextTick)(()=>C.value?.focus())):(p.modelValue&&e<p.modelValue?(m(`update:endValue`,p.modelValue),m(`update:modelValue`,e),m(`change`,e)):m(`update:endValue`,e),V()):(m(`update:modelValue`,e),m(`change`,e),V()))}function Xe(e){let t=new Date(b.value+`T00:00:00`),n=!0;switch(e.key){case`ArrowRight`:W(t,1);break;case`ArrowLeft`:W(t,-1);break;case`ArrowDown`:W(t,7);break;case`ArrowUp`:W(t,-7);break;case`Home`:G(t,`start`);break;case`End`:G(t,`end`);break;case`PageUp`:e.shiftKey?K(t,-12):K(t,-1);break;case`PageDown`:e.shiftKey?K(t,12):K(t,1);break;case`Enter`:case` `:e.preventDefault(),Ye(b.value);return;case`Escape`:V();break;case`Tab`:V();return;default:n=!1}n&&e.preventDefault()}function W(e,t){let n=new Date(e);n.setDate(n.getDate()+t),q(n)}function G(e,t){let n=e.getDay();p.weekStart===1&&(n=n===0?6:n-1);let r=t===`start`?-n:6-n,i=new Date(e);i.setDate(i.getDate()+r),q(i)}function K(e,t){let n=new Date(e);n.setMonth(n.getMonth()+t),n.getDate()!==e.getDate()&&n.setDate(0),q(n)}function q(e){let t=$(e);p.min!=null&&t<p.min||p.max!=null&&t>p.max||(b.value=t,X.value=e.getFullYear(),Z.value=e.getMonth(),U())}function J(e){let t=e.target,n=x.value?.contains(t)??!1,r=w.value?.contains(t)??!1,i=Ie.value?.contains(t)??!1;!n&&!r&&!i&&V()}function Y(){y.value&&z()}(0,c.watch)(y,e=>{e?(document.addEventListener(`mousedown`,J),window.addEventListener(`scroll`,Y,!0),window.addEventListener(`resize`,Y)):(document.removeEventListener(`mousedown`,J),window.removeEventListener(`scroll`,Y,!0),window.removeEventListener(`resize`,Y))}),(0,c.onBeforeUnmount)(()=>{document.removeEventListener(`mousedown`,J),window.removeEventListener(`scroll`,Y,!0),window.removeEventListener(`resize`,Y)});let X=(0,c.ref)(new Date().getFullYear()),Z=(0,c.ref)(new Date().getMonth());function Q(e){let t=X.value*12+Z.value+e;X.value=Math.floor(t/12),Z.value=(t%12+12)%12;let n=new Date(b.value+`T00:00:00`).getDate(),r=new Date(X.value,Z.value+1,0).getDate();b.value=$(new Date(X.value,Z.value,Math.min(n,r))),U()}let Ze=()=>Q(-1),Qe=()=>Q(1),$e=()=>Q(-12),et=()=>Q(12),tt=(0,c.computed)(()=>{let e=new Date(X.value,Z.value,1).toLocaleDateString(D.value,{month:`long`,year:`numeric`});return e.charAt(0).toUpperCase()+e.slice(1)}),nt=(0,c.computed)(()=>{let e=[],t=new Date(2024,0,p.weekStart===0?7:1);for(let n=0;n<7;n++){let r=new Date(t);r.setDate(t.getDate()+n);let i=r.toLocaleDateString(D.value,{weekday:`narrow`}).toUpperCase(),a=r.toLocaleDateString(D.value,{weekday:`long`});e.push({narrow:i,full:a.charAt(0).toUpperCase()+a.slice(1)})}return e});function $(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}let rt=(0,c.computed)(()=>$(new Date)),it=(0,c.computed)(()=>{let e=X.value,t=Z.value,n=new Date(e,t,1),r=new Date(e,t+1,0),i=n.getDay();p.weekStart===1&&(i=i===0?6:i-1);let a=[],o=p.modelValue??null,s=p.endValue??null,c=o&&s?o<s?o:s:null,l=o&&s?o<s?s:o:null;function u(e,t){let n=$(e);return{key:n,date:n,day:e.getDate(),inMonth:t,isToday:n===rt.value,isSelected:n===o||n===s,inRange:c!=null&&l!=null&&n>c&&n<l,isRangeStart:n===c&&l!=null,isRangeEnd:n===l&&c!=null,isDisabled:F(n)}}for(let n=i-1;n>=0;n--)a.push(u(new Date(e,t,-n),!1));for(let n=1;n<=r.getDate();n++)a.push(u(new Date(e,t,n),!0));let d=7-a.length%7;if(d<7)for(let n=1;n<=d;n++)a.push(u(new Date(e,t+1,n),!1));return a}),at=(0,c.computed)(()=>{let e=[];for(let t=0;t<it.value.length;t+=7)e.push(it.value.slice(t,t+7));return e}),ot=(0,c.computed)(()=>[`nb-date-picker`,`nb-date-picker--${p.variant}`,`nb-date-picker--${p.size}`,`nb-date-picker--${p.type}`,{"nb-date-picker--focused":Fe.value,"nb-date-picker--open":y.value,"nb-date-picker--error":!!p.error||!!p.endError,"nb-date-picker--warning":!p.error&&!p.endError&&(!!p.warning||!!p.endWarning),"nb-date-picker--disabled":p.disabled,"nb-date-picker--readonly":p.readonly}]),st=(0,c.computed)(()=>({"nb-date-picker__input-wrapper--focused":v.value===`start`,"nb-date-picker__input-wrapper--error":!!p.error,"nb-date-picker__input-wrapper--warning":!p.error&&!!p.warning,"nb-date-picker__input-wrapper--disabled":p.disabled,"nb-date-picker__input-wrapper--readonly":p.readonly})),ct=(0,c.computed)(()=>({"nb-date-picker__input-wrapper--focused":v.value===`end`,"nb-date-picker__input-wrapper--error":!!p.endError,"nb-date-picker__input-wrapper--warning":!p.endError&&!!p.endWarning,"nb-date-picker__input-wrapper--disabled":p.disabled,"nb-date-picker__input-wrapper--readonly":p.readonly}));return Oe({open:B,close:V,focus:()=>S.value?.focus()}),(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,null,[(0,c.createElementVNode)(`div`,{ref_key:`rootRef`,ref:x,class:(0,c.normalizeClass)(ot.value)},[f.variant===`default`?((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:0},[t.$slots.label?(0,c.renderSlot)(t.$slots,`label`,{key:0}):f.label&&!P.value?((0,c.openBlock)(),(0,c.createBlock)(r.t,{key:1,for:h.value,required:f.required,disabled:f.disabled},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(f.label),1)]),_:1},8,[`for`,`required`,`disabled`])):(0,c.createCommentVNode)(``,!0),(0,c.createVNode)(a.t,{dir:`row`,gap:f.type===`range`?`sm`:void 0,class:`nb-date-picker__fields`},{default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`div`,ne,[P.value&&f.label?((0,c.openBlock)(),(0,c.createBlock)(r.t,{key:0,for:h.value,required:f.required,disabled:f.disabled},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(f.label),1)]),_:1},8,[`for`,`required`,`disabled`])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`nb-date-picker__input-wrapper`,st.value])},[(0,c.createElementVNode)(`input`,(0,c.mergeProps)({id:h.value,ref_key:`inputRef`,ref:S},t.$attrs,{type:`text`,class:`nb-date-picker__field`,value:A.value,placeholder:f.placeholder||O.value,disabled:f.disabled,readonly:f.readonly,required:f.required,name:f.name,"aria-invalid":f.error?!0:void 0,"aria-describedby":Be.value,onInput:n[0]||=e=>qe(e),onFocus:I,onBlur:L,onKeydown:R}),null,16,re),f.type===`simple`?(0,c.createCommentVNode)(``,!0):((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{key:0,type:`button`,class:`nb-date-picker__icon`,disabled:f.disabled||f.readonly,tabindex:`-1`,"aria-label":f.modelValue?`Change date, ${k(f.modelValue)}`:`Choose date`,onClick:H},[(0,c.createVNode)(e.t,{name:(0,c.unref)(u.regular),size:16},null,8,[`name`])],8,ie))],2)]),f.type===`range`?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,ae,[P.value?((0,c.openBlock)(),(0,c.createBlock)(r.t,{key:0,for:g.value,required:f.required,disabled:f.disabled},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(f.endLabel),1)]),_:1},8,[`for`,`required`,`disabled`])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`nb-date-picker__input-wrapper`,ct.value])},[(0,c.createElementVNode)(`input`,{id:g.value,ref_key:`endInputRef`,ref:C,type:`text`,class:`nb-date-picker__field`,value:ze.value,placeholder:f.endPlaceholder||O.value,disabled:f.disabled,readonly:f.readonly,required:f.required,"aria-invalid":f.endError?!0:void 0,"aria-describedby":Ve.value,onInput:n[1]||=e=>Je(e),onFocus:I,onBlur:L,onKeydown:R},null,40,oe),(0,c.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__icon`,disabled:f.disabled||f.readonly,tabindex:`-1`,"aria-label":f.endValue?`Change end date, ${k(f.endValue)}`:`Choose end date`,onClick:H},[(0,c.createVNode)(e.t,{name:(0,c.unref)(u.regular),size:16},null,8,[`name`])],8,se)],2)])):(0,c.createCommentVNode)(``,!0)]),_:1},8,[`gap`]),j.value?((0,c.openBlock)(),(0,c.createBlock)(i.t,{key:2,id:Me.value,variant:j.value.variant,class:`nb-date-picker__message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(j.value.text),1)]),_:1},8,[`id`,`variant`])):(0,c.createCommentVNode)(``,!0),M.value?((0,c.openBlock)(),(0,c.createBlock)(i.t,{key:3,id:Ne.value,variant:M.value.variant,class:`nb-date-picker__message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(M.value.text),1)]),_:1},8,[`id`,`variant`])):(0,c.createCommentVNode)(``,!0),!j.value&&!M.value&&f.helper?((0,c.openBlock)(),(0,c.createBlock)(i.t,{key:4,id:_.value,variant:`helper`,class:`nb-date-picker__message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(f.helper),1)]),_:1},8,[`id`])):(0,c.createCommentVNode)(``,!0)],64)):f.variant===`fluid`?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:1,dir:`row`,gap:f.type===`range`?`sm`:void 0,class:`nb-date-picker__fields`},{default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`nb-date-picker__input-wrapper nb-date-picker__input-wrapper--fluid`,st.value])},[f.label||t.$slots.label||N.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,ce,[t.$slots.label?(0,c.renderSlot)(t.$slots,`label`,{key:0}):((0,c.openBlock)(),(0,c.createElementBlock)(`label`,{key:1,for:h.value,class:`nb-date-picker__inner-label`},[(0,c.createTextVNode)((0,c.toDisplayString)(f.label)+` `,1),f.required?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,ue,`*`)):(0,c.createCommentVNode)(``,!0)],8,le)),N.value?((0,c.openBlock)(),(0,c.createBlock)(i.t,{key:2,variant:N.value.variant,"icon-only":``,class:`nb-date-picker__inner-message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(N.value.text),1)]),_:1},8,[`variant`])):(0,c.createCommentVNode)(``,!0)])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,de,[(0,c.createElementVNode)(`input`,(0,c.mergeProps)({id:h.value,ref_key:`inputRef`,ref:S},t.$attrs,{type:`text`,class:`nb-date-picker__field`,value:A.value,placeholder:f.placeholder||O.value,disabled:f.disabled,readonly:f.readonly,required:f.required,name:f.name,"aria-invalid":f.error?!0:void 0,onInput:n[2]||=e=>qe(e),onFocus:I,onBlur:L,onKeydown:R}),null,16,fe),f.type===`simple`?(0,c.createCommentVNode)(``,!0):((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{key:0,type:`button`,class:`nb-date-picker__icon`,disabled:f.disabled||f.readonly,tabindex:`-1`,"aria-label":f.modelValue?`Change date, ${k(f.modelValue)}`:`Choose date`,onClick:H},[(0,c.createVNode)(e.t,{name:(0,c.unref)(u.regular),size:16},null,8,[`name`])],8,pe))])],2),f.type===`range`?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:0,class:(0,c.normalizeClass)([`nb-date-picker__input-wrapper nb-date-picker__input-wrapper--fluid`,ct.value])},[He.value||M.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,me,[(0,c.createElementVNode)(`label`,{for:g.value,class:`nb-date-picker__inner-label`},[(0,c.createTextVNode)((0,c.toDisplayString)(He.value)+` `,1),f.required?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,ge,`*`)):(0,c.createCommentVNode)(``,!0)],8,he),M.value?((0,c.openBlock)(),(0,c.createBlock)(i.t,{key:0,variant:M.value.variant,"icon-only":``,class:`nb-date-picker__inner-message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(M.value.text),1)]),_:1},8,[`variant`])):(0,c.createCommentVNode)(``,!0)])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,_e,[(0,c.createElementVNode)(`input`,{id:g.value,ref_key:`endInputRef`,ref:C,type:`text`,class:`nb-date-picker__field`,value:ze.value,placeholder:f.endPlaceholder||O.value,disabled:f.disabled,readonly:f.readonly,required:f.required,"aria-invalid":f.endError?!0:void 0,onInput:n[3]||=e=>Je(e),onFocus:I,onBlur:L,onKeydown:R},null,40,ve),(0,c.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__icon`,disabled:f.disabled||f.readonly,tabindex:`-1`,"aria-label":f.endValue?`Change end date, ${k(f.endValue)}`:`Choose end date`,onClick:H},[(0,c.createVNode)(e.t,{name:(0,c.unref)(u.regular),size:16},null,8,[`name`])],8,ye)])],2)):(0,c.createCommentVNode)(``,!0)]),_:3},8,[`gap`])):(0,c.createCommentVNode)(``,!0)],2),((0,c.openBlock)(),(0,c.createBlock)(c.Teleport,{to:`body`},[y.value&&(0,c.unref)(T)?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:0,ref_key:`scrimRef`,ref:Ie,class:`nb-date-picker__scrim`,"aria-hidden":`true`,onClick:V},null,512)):(0,c.createCommentVNode)(``,!0),y.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,(0,c.mergeProps)({key:1,ref_key:`calendarRef`,ref:w,role:`dialog`,"aria-modal":`true`,"aria-label":f.label?`${f.label} calendar`:`Date picker`,class:[`nb-date-picker__calendar`,{"nb-date-picker__calendar--sheet":(0,c.unref)(T)}]},(0,c.unref)(Ae),{style:(0,c.unref)(T)?void 0:Le.value,onKeydown:Xe,onMousedown:n[4]||=(0,c.withModifiers)(()=>{},[`prevent`])}),[(0,c.createElementVNode)(`div`,xe,[(0,c.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__cal-nav`,"aria-label":`Previous year`,onClick:$e},[(0,c.createVNode)(e.t,{name:(0,c.unref)(d.regular),size:16},null,8,[`name`])]),(0,c.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__cal-nav`,"aria-label":`Previous month`,onClick:Ze},[(0,c.createVNode)(e.t,{name:(0,c.unref)(ee.regular),size:16},null,8,[`name`])]),(0,c.createElementVNode)(`span`,{id:Pe.value,class:`nb-date-picker__cal-title`,"aria-live":`polite`},(0,c.toDisplayString)(tt.value),9,Se),(0,c.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__cal-nav`,"aria-label":`Next month`,onClick:Qe},[(0,c.createVNode)(e.t,{name:(0,c.unref)(l.regular),size:16},null,8,[`name`])]),(0,c.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__cal-nav`,"aria-label":`Next year`,onClick:et},[(0,c.createVNode)(e.t,{name:(0,c.unref)(te.regular),size:16},null,8,[`name`])])]),(0,c.createElementVNode)(`table`,{role:`grid`,"aria-labelledby":Pe.value,class:`nb-date-picker__cal-table`},[(0,c.createElementVNode)(`thead`,null,[(0,c.createElementVNode)(`tr`,we,[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(nt.value,e=>((0,c.openBlock)(),(0,c.createElementBlock)(`th`,{key:e.narrow,scope:`col`,class:`nb-date-picker__cal-weekday`,abbr:e.full},(0,c.toDisplayString)(e.narrow),9,Te))),128))])]),(0,c.createElementVNode)(`tbody`,null,[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(at.value,(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`tr`,{key:t},[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(e,e=>((0,c.openBlock)(),(0,c.createElementBlock)(`td`,{key:e.key,role:`gridcell`,"aria-selected":e.isSelected||void 0,"aria-disabled":e.isDisabled||void 0},[(0,c.createElementVNode)(`button`,{type:`button`,class:(0,c.normalizeClass)([`nb-date-picker__cal-day`,{"nb-date-picker__cal-day--outside":!e.inMonth,"nb-date-picker__cal-day--today":e.isToday,"nb-date-picker__cal-day--selected":e.isSelected,"nb-date-picker__cal-day--in-range":e.inRange,"nb-date-picker__cal-day--range-start":e.isRangeStart,"nb-date-picker__cal-day--range-end":e.isRangeEnd,"nb-date-picker__cal-day--disabled":e.isDisabled,"nb-date-picker__cal-day--focused":e.date===b.value}]),tabindex:e.date===b.value?0:-1,disabled:e.isDisabled,"aria-label":Re(e.date),"data-date":e.date,onClick:t=>Ye(e.date)},(0,c.toDisplayString)(e.day),11,De)],8,Ee))),128))]))),128))])],8,Ce)],16,be)):(0,c.createCommentVNode)(``,!0)]))],64))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Icon-C8R_r_In.cjs`),t=require(`./composables/useSurfaceLayer.composable.cjs`),n=require(`./composables/usePhoneLayout.composable.cjs`),r=require(`./Grid-D8c0StGs.cjs`),i=require(`./Label-CVCNXFn1.cjs`),a=require(`./Message-VfpaGblO.cjs`),o=require(`./composables/useMenuSurface.composable.cjs`),s=require(`./composables/useVisualViewportVar.composable.cjs`);let c=require(`vue`),l=require(`@nubisco/ui/icons/caret-right`),u=require(`@nubisco/ui/icons/calendar`),d=require(`@nubisco/ui/icons/caret-double-left`),ee=require(`@nubisco/ui/icons/caret-left`),te=require(`@nubisco/ui/icons/caret-double-right`);var ne={class:`nb-date-picker__col`},re=[`id`,`value`,`placeholder`,`disabled`,`readonly`,`required`,`name`,`aria-invalid`,`aria-describedby`],ie=[`disabled`,`aria-label`],ae={key:0,class:`nb-date-picker__col`},oe=[`id`,`value`,`placeholder`,`disabled`,`readonly`,`required`,`aria-invalid`,`aria-describedby`],se=[`disabled`,`aria-label`],ce={key:0,class:`nb-date-picker__inner-header`},le=[`for`],ue={key:0,class:`nb-date-picker__asterisk`,"aria-hidden":`true`},de={class:`nb-date-picker__fluid-row`},fe=[`id`,`value`,`placeholder`,`disabled`,`readonly`,`required`,`name`,`aria-invalid`],pe=[`disabled`,`aria-label`],me={key:0,class:`nb-date-picker__inner-header`},he=[`for`],ge={key:0,class:`nb-date-picker__asterisk`,"aria-hidden":`true`},_e={class:`nb-date-picker__fluid-row`},ve=[`id`,`value`,`placeholder`,`disabled`,`readonly`,`required`,`aria-invalid`],ye=[`disabled`,`aria-label`],be=[`aria-label`],xe={class:`nb-date-picker__cal-header`},Se=[`id`],Ce=[`aria-labelledby`],we={class:`nb-date-picker__cal-weekdays`},Te=[`abbr`],Ee=[`aria-selected`,`aria-disabled`],De=[`tabindex`,`disabled`,`aria-label`,`data-date`,`onClick`],f=(0,c.defineComponent)({inheritAttrs:!1,__name:`DatePicker`,props:{modelValue:{default:null},type:{default:`single`},endValue:{default:null},min:{default:void 0},max:{default:void 0},weekStart:{default:1},locale:{default:void 0},endPlaceholder:{default:``},endLabel:{default:``},endError:{default:``},endWarning:{default:``},disabledDates:{type:[Array,Function],default:void 0},readonly:{type:Boolean,default:!1},placeholder:{default:``},name:{default:``},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},id:{default:void 0},label:{default:``},error:{default:``},warning:{default:``},helper:{default:``},variant:{default:`default`},size:{default:`md`}},emits:[`update:modelValue`,`update:endValue`,`change`],setup(f,{expose:Oe,emit:ke}){let p=f,{layerProps:Ae}=t.useSurfaceLayer({overlay:!0}),m=ke,je=`nb-date-picker-${(0,c.useId)()}`,h=(0,c.computed)(()=>p.id??je),g=(0,c.computed)(()=>`${h.value}-end`),_=(0,c.computed)(()=>`${h.value}-helper`),Me=(0,c.computed)(()=>`${h.value}-message`),Ne=(0,c.computed)(()=>`${h.value}-end-message`),Pe=(0,c.computed)(()=>`${h.value}-cal-title`),v=(0,c.ref)(null),Fe=(0,c.computed)(()=>v.value!==null),y=(0,c.ref)(!1),b=(0,c.ref)($(new Date)),x=(0,c.ref)(null),S=(0,c.ref)(null),C=(0,c.ref)(null),w=(0,c.ref)(null);o.useMenuSurface(w);let{phone:T}=n.usePhoneLayout(),Ie=(0,c.ref)(null);s.useVisualViewportVar(()=>y.value);let Le=(0,c.ref)({position:`fixed`,top:`0px`,left:`0px`,zIndex:`9999`}),E=(0,c.ref)(`start`),D=(0,c.computed)(()=>p.locale||navigator.language||`pt-PT`),O=(0,c.computed)(()=>new Intl.DateTimeFormat(D.value).formatToParts(new Date(2e3,0,15)).map(e=>e.type===`day`?`dd`:e.type===`month`?`mm`:e.type===`year`?`yyyy`:e.value).join(``));function k(e){if(!e)return``;let t=new Date(e+`T00:00:00`);return isNaN(t.getTime())?e:t.toLocaleDateString(D.value)}function Re(e){return new Date(e+`T00:00:00`).toLocaleDateString(D.value,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`})}let A=(0,c.computed)(()=>k(p.modelValue??null)),ze=(0,c.computed)(()=>k(p.endValue??null)),j=(0,c.computed)(()=>p.error?{variant:`error`,text:p.error}:p.warning?{variant:`warning`,text:p.warning}:null),M=(0,c.computed)(()=>p.type===`range`?p.endError?{variant:`error`,text:p.endError}:p.endWarning?{variant:`warning`,text:p.endWarning}:null:null),N=(0,c.computed)(()=>j.value?j.value:p.helper?{variant:`helper`,text:p.helper}:null),Be=(0,c.computed)(()=>{if(p.variant===`default`)return j.value?Me.value:p.helper?_.value:void 0}),Ve=(0,c.computed)(()=>{if(p.variant===`default`)return M.value?Ne.value:p.helper?_.value:void 0}),P=(0,c.computed)(()=>p.type===`range`&&!!p.endLabel),He=(0,c.computed)(()=>p.endLabel||p.endPlaceholder);function F(e){return p.min!=null&&e<p.min||p.max!=null&&e>p.max?!0:p.disabledDates?typeof p.disabledDates==`function`?p.disabledDates(e):p.disabledDates.includes(e):!1}let Ue=(0,c.computed)(()=>new Intl.DateTimeFormat(D.value).formatToParts(new Date(2e3,0,15)).map(e=>e.type).filter(e=>e===`day`||e===`month`||e===`year`));function We(e,t,n){let r=new Date(e,t-1,n);return r.getMonth()!==t-1||r.getDate()!==n?null:(r.setFullYear(e),$(r))}function Ge(e){let t=e.split(/[\s./-]+/).filter(Boolean);if(t.length!==3)return null;let n=t[0].length===4?[`year`,`month`,`day`]:Ue.value;if(n.length!==3)return null;let r={day:0,month:0,year:0};for(let e=0;e<3;e++){let i=n[e],a=t[e];if(i===`year`?a.length!==4:a.length>2)return null;r[i]=Number(a)}return We(r.year,r.month,r.day)}function Ke(e){let t=e.trim();if(!t)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let e=new Date(t+`T00:00:00`);return isNaN(e.getTime())?null:t}if(/^[\d\s./-]+$/.test(t))return Ge(t);let n=new Date(t);return isNaN(n.getTime())?null:$(n)}function qe(e){let t=e.target.value,n=Ke(t);n&&F(n)||(n||t===``)&&(m(`update:modelValue`,n),m(`change`,n))}function Je(e){let t=e.target.value,n=Ke(t);n&&F(n)||(n||t===``)&&m(`update:endValue`,n)}function I(e){v.value=e.target===C.value?`end`:`start`,p.type!==`simple`&&!p.readonly&&(E.value=v.value,y.value?z():B())}function L(){v.value=null}function R(e){if(!(p.type===`simple`||p.readonly))switch(e.key){case`Escape`:y.value&&(V(),e.preventDefault());break;case`ArrowDown`:e.preventDefault(),y.value||B(),(0,c.nextTick)(U);break;case`Enter`:y.value||(e.preventDefault(),B(),(0,c.nextTick)(U));break}}function z(){let e=x.value?.querySelectorAll(`.nb-date-picker__input-wrapper`);if(!e?.length)return;let t=(E.value===`end`&&e.length>1?e[1]:e[0]).getBoundingClientRect(),n=w.value?.offsetWidth??0,r=w.value?.offsetHeight??0,i=t.left,a=t.bottom+4;n>0&&(i=Math.max(8,Math.min(i,window.innerWidth-n-8))),r>0&&a+r>window.innerHeight-8&&t.top-4-r>=8&&(a=t.top-4-r),Le.value={position:`fixed`,top:`${a}px`,left:`${i}px`,zIndex:`9999`}}function B(){if(p.disabled||p.readonly||p.type===`simple`||y.value)return;y.value=!0;let e=E.value===`end`&&p.endValue?p.endValue:p.modelValue,t=e?new Date(e+`T00:00:00`):new Date;X.value=t.getFullYear(),Z.value=t.getMonth(),b.value=e||$(new Date),z(),(0,c.nextTick)(z)}function V(){y.value&&(y.value=!1,(0,c.nextTick)(()=>{E.value===`end`&&C.value?C.value.focus():S.value?.focus()}))}function H(){y.value?V():(E.value=`start`,B(),(0,c.nextTick)(U))}function U(){(0,c.nextTick)(()=>{(w.value?.querySelector(`[data-date="${b.value}"]`))?.focus()})}function Ye(e){F(e)||(p.type===`range`?E.value===`start`?(m(`update:modelValue`,e),m(`change`,e),E.value=`end`,b.value=e,(0,c.nextTick)(()=>C.value?.focus())):(p.modelValue&&e<p.modelValue?(m(`update:endValue`,p.modelValue),m(`update:modelValue`,e),m(`change`,e)):m(`update:endValue`,e),V()):(m(`update:modelValue`,e),m(`change`,e),V()))}function Xe(e){let t=new Date(b.value+`T00:00:00`),n=!0;switch(e.key){case`ArrowRight`:W(t,1);break;case`ArrowLeft`:W(t,-1);break;case`ArrowDown`:W(t,7);break;case`ArrowUp`:W(t,-7);break;case`Home`:G(t,`start`);break;case`End`:G(t,`end`);break;case`PageUp`:e.shiftKey?K(t,-12):K(t,-1);break;case`PageDown`:e.shiftKey?K(t,12):K(t,1);break;case`Enter`:case` `:e.preventDefault(),Ye(b.value);return;case`Escape`:V();break;case`Tab`:V();return;default:n=!1}n&&e.preventDefault()}function W(e,t){let n=new Date(e);n.setDate(n.getDate()+t),q(n)}function G(e,t){let n=e.getDay();p.weekStart===1&&(n=n===0?6:n-1);let r=t===`start`?-n:6-n,i=new Date(e);i.setDate(i.getDate()+r),q(i)}function K(e,t){let n=new Date(e);n.setMonth(n.getMonth()+t),n.getDate()!==e.getDate()&&n.setDate(0),q(n)}function q(e){let t=$(e);p.min!=null&&t<p.min||p.max!=null&&t>p.max||(b.value=t,X.value=e.getFullYear(),Z.value=e.getMonth(),U())}function J(e){let t=e.target,n=x.value?.contains(t)??!1,r=w.value?.contains(t)??!1,i=Ie.value?.contains(t)??!1;!n&&!r&&!i&&V()}function Y(){y.value&&z()}(0,c.watch)(y,e=>{e?(document.addEventListener(`mousedown`,J),window.addEventListener(`scroll`,Y,!0),window.addEventListener(`resize`,Y)):(document.removeEventListener(`mousedown`,J),window.removeEventListener(`scroll`,Y,!0),window.removeEventListener(`resize`,Y))}),(0,c.onBeforeUnmount)(()=>{document.removeEventListener(`mousedown`,J),window.removeEventListener(`scroll`,Y,!0),window.removeEventListener(`resize`,Y)});let X=(0,c.ref)(new Date().getFullYear()),Z=(0,c.ref)(new Date().getMonth());function Q(e){let t=X.value*12+Z.value+e;X.value=Math.floor(t/12),Z.value=(t%12+12)%12;let n=new Date(b.value+`T00:00:00`).getDate(),r=new Date(X.value,Z.value+1,0).getDate();b.value=$(new Date(X.value,Z.value,Math.min(n,r))),U()}let Ze=()=>Q(-1),Qe=()=>Q(1),$e=()=>Q(-12),et=()=>Q(12),tt=(0,c.computed)(()=>{let e=new Date(X.value,Z.value,1).toLocaleDateString(D.value,{month:`long`,year:`numeric`});return e.charAt(0).toUpperCase()+e.slice(1)}),nt=(0,c.computed)(()=>{let e=[],t=new Date(2024,0,p.weekStart===0?7:1);for(let n=0;n<7;n++){let r=new Date(t);r.setDate(t.getDate()+n);let i=r.toLocaleDateString(D.value,{weekday:`narrow`}).toUpperCase(),a=r.toLocaleDateString(D.value,{weekday:`long`});e.push({narrow:i,full:a.charAt(0).toUpperCase()+a.slice(1)})}return e});function $(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}let rt=(0,c.computed)(()=>$(new Date)),it=(0,c.computed)(()=>{let e=X.value,t=Z.value,n=new Date(e,t,1),r=new Date(e,t+1,0),i=n.getDay();p.weekStart===1&&(i=i===0?6:i-1);let a=[],o=p.modelValue??null,s=p.endValue??null,c=o&&s?o<s?o:s:null,l=o&&s?o<s?s:o:null;function u(e,t){let n=$(e);return{key:n,date:n,day:e.getDate(),inMonth:t,isToday:n===rt.value,isSelected:n===o||n===s,inRange:c!=null&&l!=null&&n>c&&n<l,isRangeStart:n===c&&l!=null,isRangeEnd:n===l&&c!=null,isDisabled:F(n)}}for(let n=i-1;n>=0;n--)a.push(u(new Date(e,t,-n),!1));for(let n=1;n<=r.getDate();n++)a.push(u(new Date(e,t,n),!0));let d=7-a.length%7;if(d<7)for(let n=1;n<=d;n++)a.push(u(new Date(e,t+1,n),!1));return a}),at=(0,c.computed)(()=>{let e=[];for(let t=0;t<it.value.length;t+=7)e.push(it.value.slice(t,t+7));return e}),ot=(0,c.computed)(()=>[`nb-date-picker`,`nb-date-picker--${p.variant}`,`nb-date-picker--${p.size}`,`nb-date-picker--${p.type}`,{"nb-date-picker--focused":Fe.value,"nb-date-picker--open":y.value,"nb-date-picker--error":!!p.error||!!p.endError,"nb-date-picker--warning":!p.error&&!p.endError&&(!!p.warning||!!p.endWarning),"nb-date-picker--disabled":p.disabled,"nb-date-picker--readonly":p.readonly}]),st=(0,c.computed)(()=>({"nb-date-picker__input-wrapper--focused":v.value===`start`,"nb-date-picker__input-wrapper--error":!!p.error,"nb-date-picker__input-wrapper--warning":!p.error&&!!p.warning,"nb-date-picker__input-wrapper--disabled":p.disabled,"nb-date-picker__input-wrapper--readonly":p.readonly})),ct=(0,c.computed)(()=>({"nb-date-picker__input-wrapper--focused":v.value===`end`,"nb-date-picker__input-wrapper--error":!!p.endError,"nb-date-picker__input-wrapper--warning":!p.endError&&!!p.endWarning,"nb-date-picker__input-wrapper--disabled":p.disabled,"nb-date-picker__input-wrapper--readonly":p.readonly}));return Oe({open:B,close:V,focus:()=>S.value?.focus()}),(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,null,[(0,c.createElementVNode)(`div`,{ref_key:`rootRef`,ref:x,class:(0,c.normalizeClass)(ot.value)},[f.variant===`default`?((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:0},[t.$slots.label?(0,c.renderSlot)(t.$slots,`label`,{key:0}):f.label&&!P.value?((0,c.openBlock)(),(0,c.createBlock)(i.t,{key:1,for:h.value,required:f.required,disabled:f.disabled},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(f.label),1)]),_:1},8,[`for`,`required`,`disabled`])):(0,c.createCommentVNode)(``,!0),(0,c.createVNode)(r.t,{dir:`row`,gap:f.type===`range`?`sm`:void 0,class:`nb-date-picker__fields`},{default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`div`,ne,[P.value&&f.label?((0,c.openBlock)(),(0,c.createBlock)(i.t,{key:0,for:h.value,required:f.required,disabled:f.disabled},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(f.label),1)]),_:1},8,[`for`,`required`,`disabled`])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`nb-date-picker__input-wrapper`,st.value])},[(0,c.createElementVNode)(`input`,(0,c.mergeProps)({id:h.value,ref_key:`inputRef`,ref:S},t.$attrs,{type:`text`,class:`nb-date-picker__field`,value:A.value,placeholder:f.placeholder||O.value,disabled:f.disabled,readonly:f.readonly,required:f.required,name:f.name,"aria-invalid":f.error?!0:void 0,"aria-describedby":Be.value,onInput:n[0]||=e=>qe(e),onFocus:I,onBlur:L,onKeydown:R}),null,16,re),f.type===`simple`?(0,c.createCommentVNode)(``,!0):((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{key:0,type:`button`,class:`nb-date-picker__icon`,disabled:f.disabled||f.readonly,tabindex:`-1`,"aria-label":f.modelValue?`Change date, ${k(f.modelValue)}`:`Choose date`,onClick:H},[(0,c.createVNode)(e.t,{name:(0,c.unref)(u.regular),size:16},null,8,[`name`])],8,ie))],2)]),f.type===`range`?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,ae,[P.value?((0,c.openBlock)(),(0,c.createBlock)(i.t,{key:0,for:g.value,required:f.required,disabled:f.disabled},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(f.endLabel),1)]),_:1},8,[`for`,`required`,`disabled`])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`nb-date-picker__input-wrapper`,ct.value])},[(0,c.createElementVNode)(`input`,{id:g.value,ref_key:`endInputRef`,ref:C,type:`text`,class:`nb-date-picker__field`,value:ze.value,placeholder:f.endPlaceholder||O.value,disabled:f.disabled,readonly:f.readonly,required:f.required,"aria-invalid":f.endError?!0:void 0,"aria-describedby":Ve.value,onInput:n[1]||=e=>Je(e),onFocus:I,onBlur:L,onKeydown:R},null,40,oe),(0,c.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__icon`,disabled:f.disabled||f.readonly,tabindex:`-1`,"aria-label":f.endValue?`Change end date, ${k(f.endValue)}`:`Choose end date`,onClick:H},[(0,c.createVNode)(e.t,{name:(0,c.unref)(u.regular),size:16},null,8,[`name`])],8,se)],2)])):(0,c.createCommentVNode)(``,!0)]),_:1},8,[`gap`]),j.value?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:2,id:Me.value,variant:j.value.variant,class:`nb-date-picker__message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(j.value.text),1)]),_:1},8,[`id`,`variant`])):(0,c.createCommentVNode)(``,!0),M.value?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:3,id:Ne.value,variant:M.value.variant,class:`nb-date-picker__message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(M.value.text),1)]),_:1},8,[`id`,`variant`])):(0,c.createCommentVNode)(``,!0),!j.value&&!M.value&&f.helper?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:4,id:_.value,variant:`helper`,class:`nb-date-picker__message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(f.helper),1)]),_:1},8,[`id`])):(0,c.createCommentVNode)(``,!0)],64)):f.variant===`fluid`?((0,c.openBlock)(),(0,c.createBlock)(r.t,{key:1,dir:`row`,gap:f.type===`range`?`sm`:void 0,class:`nb-date-picker__fields`},{default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`nb-date-picker__input-wrapper nb-date-picker__input-wrapper--fluid`,st.value])},[f.label||t.$slots.label||N.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,ce,[t.$slots.label?(0,c.renderSlot)(t.$slots,`label`,{key:0}):((0,c.openBlock)(),(0,c.createElementBlock)(`label`,{key:1,for:h.value,class:`nb-date-picker__inner-label`},[(0,c.createTextVNode)((0,c.toDisplayString)(f.label)+` `,1),f.required?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,ue,`*`)):(0,c.createCommentVNode)(``,!0)],8,le)),N.value?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:2,variant:N.value.variant,"icon-only":``,class:`nb-date-picker__inner-message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(N.value.text),1)]),_:1},8,[`variant`])):(0,c.createCommentVNode)(``,!0)])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,de,[(0,c.createElementVNode)(`input`,(0,c.mergeProps)({id:h.value,ref_key:`inputRef`,ref:S},t.$attrs,{type:`text`,class:`nb-date-picker__field`,value:A.value,placeholder:f.placeholder||O.value,disabled:f.disabled,readonly:f.readonly,required:f.required,name:f.name,"aria-invalid":f.error?!0:void 0,onInput:n[2]||=e=>qe(e),onFocus:I,onBlur:L,onKeydown:R}),null,16,fe),f.type===`simple`?(0,c.createCommentVNode)(``,!0):((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{key:0,type:`button`,class:`nb-date-picker__icon`,disabled:f.disabled||f.readonly,tabindex:`-1`,"aria-label":f.modelValue?`Change date, ${k(f.modelValue)}`:`Choose date`,onClick:H},[(0,c.createVNode)(e.t,{name:(0,c.unref)(u.regular),size:16},null,8,[`name`])],8,pe))])],2),f.type===`range`?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:0,class:(0,c.normalizeClass)([`nb-date-picker__input-wrapper nb-date-picker__input-wrapper--fluid`,ct.value])},[He.value||M.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,me,[(0,c.createElementVNode)(`label`,{for:g.value,class:`nb-date-picker__inner-label`},[(0,c.createTextVNode)((0,c.toDisplayString)(He.value)+` `,1),f.required?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,ge,`*`)):(0,c.createCommentVNode)(``,!0)],8,he),M.value?((0,c.openBlock)(),(0,c.createBlock)(a.t,{key:0,variant:M.value.variant,"icon-only":``,class:`nb-date-picker__inner-message`},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(M.value.text),1)]),_:1},8,[`variant`])):(0,c.createCommentVNode)(``,!0)])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,_e,[(0,c.createElementVNode)(`input`,{id:g.value,ref_key:`endInputRef`,ref:C,type:`text`,class:`nb-date-picker__field`,value:ze.value,placeholder:f.endPlaceholder||O.value,disabled:f.disabled,readonly:f.readonly,required:f.required,"aria-invalid":f.endError?!0:void 0,onInput:n[3]||=e=>Je(e),onFocus:I,onBlur:L,onKeydown:R},null,40,ve),(0,c.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__icon`,disabled:f.disabled||f.readonly,tabindex:`-1`,"aria-label":f.endValue?`Change end date, ${k(f.endValue)}`:`Choose end date`,onClick:H},[(0,c.createVNode)(e.t,{name:(0,c.unref)(u.regular),size:16},null,8,[`name`])],8,ye)])],2)):(0,c.createCommentVNode)(``,!0)]),_:3},8,[`gap`])):(0,c.createCommentVNode)(``,!0)],2),((0,c.openBlock)(),(0,c.createBlock)(c.Teleport,{to:`body`},[y.value&&(0,c.unref)(T)?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:0,ref_key:`scrimRef`,ref:Ie,class:`nb-date-picker__scrim`,"aria-hidden":`true`,onClick:V},null,512)):(0,c.createCommentVNode)(``,!0),y.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,(0,c.mergeProps)({key:1,ref_key:`calendarRef`,ref:w,role:`dialog`,"aria-modal":`true`,"aria-label":f.label?`${f.label} calendar`:`Date picker`,class:[`nb-date-picker__calendar`,{"nb-date-picker__calendar--sheet":(0,c.unref)(T)}]},(0,c.unref)(Ae),{style:(0,c.unref)(T)?void 0:Le.value,onKeydown:Xe,onMousedown:n[4]||=(0,c.withModifiers)(()=>{},[`prevent`])}),[(0,c.createElementVNode)(`div`,xe,[(0,c.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__cal-nav`,"aria-label":`Previous year`,onClick:$e},[(0,c.createVNode)(e.t,{name:(0,c.unref)(d.regular),size:16},null,8,[`name`])]),(0,c.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__cal-nav`,"aria-label":`Previous month`,onClick:Ze},[(0,c.createVNode)(e.t,{name:(0,c.unref)(ee.regular),size:16},null,8,[`name`])]),(0,c.createElementVNode)(`span`,{id:Pe.value,class:`nb-date-picker__cal-title`,"aria-live":`polite`},(0,c.toDisplayString)(tt.value),9,Se),(0,c.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__cal-nav`,"aria-label":`Next month`,onClick:Qe},[(0,c.createVNode)(e.t,{name:(0,c.unref)(l.regular),size:16},null,8,[`name`])]),(0,c.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__cal-nav`,"aria-label":`Next year`,onClick:et},[(0,c.createVNode)(e.t,{name:(0,c.unref)(te.regular),size:16},null,8,[`name`])])]),(0,c.createElementVNode)(`table`,{role:`grid`,"aria-labelledby":Pe.value,class:`nb-date-picker__cal-table`},[(0,c.createElementVNode)(`thead`,null,[(0,c.createElementVNode)(`tr`,we,[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(nt.value,e=>((0,c.openBlock)(),(0,c.createElementBlock)(`th`,{key:e.narrow,scope:`col`,class:`nb-date-picker__cal-weekday`,abbr:e.full},(0,c.toDisplayString)(e.narrow),9,Te))),128))])]),(0,c.createElementVNode)(`tbody`,null,[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(at.value,(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`tr`,{key:t},[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(e,e=>((0,c.openBlock)(),(0,c.createElementBlock)(`td`,{key:e.key,role:`gridcell`,"aria-selected":e.isSelected||void 0,"aria-disabled":e.isDisabled||void 0},[(0,c.createElementVNode)(`button`,{type:`button`,class:(0,c.normalizeClass)([`nb-date-picker__cal-day`,{"nb-date-picker__cal-day--outside":!e.inMonth,"nb-date-picker__cal-day--today":e.isToday,"nb-date-picker__cal-day--selected":e.isSelected,"nb-date-picker__cal-day--in-range":e.inRange,"nb-date-picker__cal-day--range-start":e.isRangeStart,"nb-date-picker__cal-day--range-end":e.isRangeEnd,"nb-date-picker__cal-day--disabled":e.isDisabled,"nb-date-picker__cal-day--focused":e.date===b.value}]),tabindex:e.date===b.value?0:-1,disabled:e.isDisabled,"aria-label":Re(e.date),"data-date":e.date,onClick:t=>Ye(e.date)},(0,c.toDisplayString)(e.day),11,De)],8,Ee))),128))]))),128))])],8,Ce)],16,be)):(0,c.createCommentVNode)(``,!0)]))],64))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./Icon-rREAqsu0.js";
|
|
2
2
|
import { useSurfaceLayer as t } from "./composables/useSurfaceLayer.composable.mjs";
|
|
3
3
|
import { usePhoneLayout as n } from "./composables/usePhoneLayout.composable.mjs";
|
|
4
|
-
import { t as r } from "./
|
|
5
|
-
import { t as i } from "./
|
|
6
|
-
import { t as a } from "./
|
|
4
|
+
import { t as r } from "./Grid-XtnH-vr_.js";
|
|
5
|
+
import { t as i } from "./Label-ciCAG21-.js";
|
|
6
|
+
import { t as a } from "./Message-Cecz48PA.js";
|
|
7
7
|
import { useMenuSurface as o } from "./composables/useMenuSurface.composable.mjs";
|
|
8
8
|
import { useVisualViewportVar as s } from "./composables/useVisualViewportVar.composable.mjs";
|
|
9
9
|
import { Fragment as c, Teleport as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, mergeProps as ee, nextTick as v, normalizeClass as y, onBeforeUnmount as te, openBlock as b, ref as x, renderList as ne, renderSlot as re, toDisplayString as S, unref as C, useId as ie, watch as ae, withCtx as w, withModifiers as oe } from "vue";
|
|
@@ -425,7 +425,7 @@ var de = { class: "nb-date-picker__col" }, fe = [
|
|
|
425
425
|
ref: qe,
|
|
426
426
|
class: y(Ot.value)
|
|
427
427
|
}, [_.variant === "default" ? (b(), p(c, { key: 0 }, [
|
|
428
|
-
t.$slots.label ? re(t.$slots, "label", { key: 0 }) : _.label && !rt.value ? (b(), d(
|
|
428
|
+
t.$slots.label ? re(t.$slots, "label", { key: 0 }) : _.label && !rt.value ? (b(), d(i, {
|
|
429
429
|
key: 1,
|
|
430
430
|
for: O.value,
|
|
431
431
|
required: _.required,
|
|
@@ -438,12 +438,12 @@ var de = { class: "nb-date-picker__col" }, fe = [
|
|
|
438
438
|
"required",
|
|
439
439
|
"disabled"
|
|
440
440
|
])) : f("", !0),
|
|
441
|
-
g(
|
|
441
|
+
g(r, {
|
|
442
442
|
dir: "row",
|
|
443
443
|
gap: _.type === "range" ? "sm" : void 0,
|
|
444
444
|
class: "nb-date-picker__fields"
|
|
445
445
|
}, {
|
|
446
|
-
default: w(() => [m("div", de, [rt.value && _.label ? (b(), d(
|
|
446
|
+
default: w(() => [m("div", de, [rt.value && _.label ? (b(), d(i, {
|
|
447
447
|
key: 0,
|
|
448
448
|
for: O.value,
|
|
449
449
|
required: _.required,
|
|
@@ -485,7 +485,7 @@ var de = { class: "nb-date-picker__col" }, fe = [
|
|
|
485
485
|
}, [g(e, {
|
|
486
486
|
name: C(T),
|
|
487
487
|
size: 16
|
|
488
|
-
}, null, 8, ["name"])], 8, pe))], 2)]), _.type === "range" ? (b(), p("div", me, [rt.value ? (b(), d(
|
|
488
|
+
}, null, 8, ["name"])], 8, pe))], 2)]), _.type === "range" ? (b(), p("div", me, [rt.value ? (b(), d(i, {
|
|
489
489
|
key: 0,
|
|
490
490
|
for: Ve.value,
|
|
491
491
|
required: _.required,
|
|
@@ -527,7 +527,7 @@ var de = { class: "nb-date-picker__col" }, fe = [
|
|
|
527
527
|
}, null, 8, ["name"])], 8, ge)], 2)])) : f("", !0)]),
|
|
528
528
|
_: 1
|
|
529
529
|
}, 8, ["gap"]),
|
|
530
|
-
R.value ? (b(), d(
|
|
530
|
+
R.value ? (b(), d(a, {
|
|
531
531
|
key: 2,
|
|
532
532
|
id: Ue.value,
|
|
533
533
|
variant: R.value.variant,
|
|
@@ -536,7 +536,7 @@ var de = { class: "nb-date-picker__col" }, fe = [
|
|
|
536
536
|
default: w(() => [h(S(R.value.text), 1)]),
|
|
537
537
|
_: 1
|
|
538
538
|
}, 8, ["id", "variant"])) : f("", !0),
|
|
539
|
-
z.value ? (b(), d(
|
|
539
|
+
z.value ? (b(), d(a, {
|
|
540
540
|
key: 3,
|
|
541
541
|
id: We.value,
|
|
542
542
|
variant: z.value.variant,
|
|
@@ -545,7 +545,7 @@ var de = { class: "nb-date-picker__col" }, fe = [
|
|
|
545
545
|
default: w(() => [h(S(z.value.text), 1)]),
|
|
546
546
|
_: 1
|
|
547
547
|
}, 8, ["id", "variant"])) : f("", !0),
|
|
548
|
-
!R.value && !z.value && _.helper ? (b(), d(
|
|
548
|
+
!R.value && !z.value && _.helper ? (b(), d(a, {
|
|
549
549
|
key: 4,
|
|
550
550
|
id: He.value,
|
|
551
551
|
variant: "helper",
|
|
@@ -554,7 +554,7 @@ var de = { class: "nb-date-picker__col" }, fe = [
|
|
|
554
554
|
default: w(() => [h(S(_.helper), 1)]),
|
|
555
555
|
_: 1
|
|
556
556
|
}, 8, ["id"])) : f("", !0)
|
|
557
|
-
], 64)) : _.variant === "fluid" ? (b(), d(
|
|
557
|
+
], 64)) : _.variant === "fluid" ? (b(), d(r, {
|
|
558
558
|
key: 1,
|
|
559
559
|
dir: "row",
|
|
560
560
|
gap: _.type === "range" ? "sm" : void 0,
|
|
@@ -564,7 +564,7 @@ var de = { class: "nb-date-picker__col" }, fe = [
|
|
|
564
564
|
key: 1,
|
|
565
565
|
for: O.value,
|
|
566
566
|
class: "nb-date-picker__inner-label"
|
|
567
|
-
}, [h(S(_.label) + " ", 1), _.required ? (b(), p("span", ye, "*")) : f("", !0)], 8, ve)), B.value ? (b(), d(
|
|
567
|
+
}, [h(S(_.label) + " ", 1), _.required ? (b(), p("span", ye, "*")) : f("", !0)], 8, ve)), B.value ? (b(), d(a, {
|
|
568
568
|
key: 2,
|
|
569
569
|
variant: B.value.variant,
|
|
570
570
|
"icon-only": "",
|
|
@@ -607,7 +607,7 @@ var de = { class: "nb-date-picker__col" }, fe = [
|
|
|
607
607
|
}, [it.value || z.value ? (b(), p("div", Ce, [m("label", {
|
|
608
608
|
for: Ve.value,
|
|
609
609
|
class: "nb-date-picker__inner-label"
|
|
610
|
-
}, [h(S(it.value) + " ", 1), _.required ? (b(), p("span", Te, "*")) : f("", !0)], 8, we), z.value ? (b(), d(
|
|
610
|
+
}, [h(S(it.value) + " ", 1), _.required ? (b(), p("span", Te, "*")) : f("", !0)], 8, we), z.value ? (b(), d(a, {
|
|
611
611
|
key: 0,
|
|
612
612
|
variant: z.value.variant,
|
|
613
613
|
"icon-only": "",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-O4QQSku4.js";
|
|
2
2
|
import { t } from "./Icon-rREAqsu0.js";
|
|
3
3
|
import { computed as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, openBlock as l, renderSlot as u, toDisplayString as d } from "vue";
|
|
4
|
-
import * as f from "@nubisco/ui/icons/
|
|
5
|
-
import * as p from "@nubisco/ui/icons/
|
|
6
|
-
import * as m from "@nubisco/ui/icons/
|
|
4
|
+
import * as f from "@nubisco/ui/icons/warning-circle";
|
|
5
|
+
import * as p from "@nubisco/ui/icons/tray";
|
|
6
|
+
import * as m from "@nubisco/ui/icons/magnifying-glass";
|
|
7
7
|
import * as h from "@nubisco/ui/icons/lock-simple";
|
|
8
8
|
//#region src/components/EmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
9
9
|
var g = {
|
|
@@ -33,9 +33,9 @@ var g = {
|
|
|
33
33
|
},
|
|
34
34
|
setup(e) {
|
|
35
35
|
let s = e, b = {
|
|
36
|
-
empty:
|
|
37
|
-
"no-results":
|
|
38
|
-
error:
|
|
36
|
+
empty: p,
|
|
37
|
+
"no-results": m,
|
|
38
|
+
error: f,
|
|
39
39
|
forbidden: h
|
|
40
40
|
}, x = n(() => s.icon === null ? null : s.icon ?? b[s.kind] ?? b.empty);
|
|
41
41
|
return (n, s) => (l(), i("div", { class: c(["nb-empty-state", [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),n=require(`./Icon-C8R_r_In.cjs`);let r=require(`vue`),i=require(`@nubisco/ui/icons/
|
|
1
|
+
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),n=require(`./Icon-C8R_r_In.cjs`);let r=require(`vue`),i=require(`@nubisco/ui/icons/warning-circle`);i=e.n(i);let a=require(`@nubisco/ui/icons/tray`);a=e.n(a);let o=require(`@nubisco/ui/icons/magnifying-glass`);o=e.n(o);let s=require(`@nubisco/ui/icons/lock-simple`);s=e.n(s);var c={key:0,class:`nb-empty-state__icon`},l={key:1,class:`nb-empty-state__title`},u={key:2,class:`nb-empty-state__description`},d={key:3,class:`nb-empty-state__actions`},f=(0,r.defineComponent)({__name:`EmptyState`,props:{title:{default:``},description:{default:``},icon:{default:void 0},kind:{default:`empty`},size:{default:`md`},bordered:{type:Boolean,default:!1}},setup(e){let t=e,f={empty:a,"no-results":o,error:i,forbidden:s},p=(0,r.computed)(()=>t.icon===null?null:t.icon??f[t.kind]??f.empty);return(t,i)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{class:(0,r.normalizeClass)([`nb-empty-state`,[`nb-empty-state--${e.size}`,`nb-empty-state--${e.kind}`,{"nb-empty-state--bordered":e.bordered}]])},[p.value||t.$slots.icon?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,c,[(0,r.renderSlot)(t.$slots,`icon`,{},()=>[(0,r.createVNode)(n.t,{name:p.value,size:e.size===`sm`?24:32},null,8,[`name`,`size`])],!0)])):(0,r.createCommentVNode)(``,!0),e.title||t.$slots.title?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,l,[(0,r.renderSlot)(t.$slots,`title`,{},()=>[(0,r.createTextVNode)((0,r.toDisplayString)(e.title),1)],!0)])):(0,r.createCommentVNode)(``,!0),e.description||t.$slots.default?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,u,[(0,r.renderSlot)(t.$slots,`default`,{},()=>[(0,r.createTextVNode)((0,r.toDisplayString)(e.description),1)],!0)])):(0,r.createCommentVNode)(``,!0),t.$slots.actions?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,d,[(0,r.renderSlot)(t.$slots,`actions`,{},void 0,!0)])):(0,r.createCommentVNode)(``,!0)],2))}}),p=t.t(f,[[`__scopeId`,`data-v-0508480f`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return p}});
|