@nubisco/ui 5.19.1 → 5.21.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-BFrehX_F.js → AiLabel-BKyoadhO.js} +1 -1
- package/dist/{AiLabel-kmL1-Hdo.cjs → AiLabel-DRx9pIMA.cjs} +1 -1
- package/dist/BarChart-D43kElHn.cjs +1 -0
- package/dist/BarChart-vpdxtX1H.js +294 -0
- package/dist/{Blueprint-DIrWXKml.cjs → Blueprint-BaTB7N_f.cjs} +1 -1
- package/dist/{Blueprint-CB5a7H5o.js → Blueprint-GvbvIrUB.js} +2 -2
- package/dist/{BlueprintCard-DhnoClRB.cjs → BlueprintCard-BS3PXYdC.cjs} +1 -1
- package/dist/{BlueprintCard-BmuGjOCn.js → BlueprintCard-lr2vhE8j.js} +1 -1
- package/dist/{Checkbox-CZVNZ2pn.cjs → Checkbox-BU9auHYV.cjs} +1 -1
- package/dist/{Checkbox-CXlovpPs.js → Checkbox-D_Gd5z5o.js} +1 -1
- package/dist/{CheckboxGroup-AQ6XgVPU.js → CheckboxGroup-BcgIYz9T.js} +3 -3
- package/dist/{CheckboxGroup-BuvjRAeC.cjs → CheckboxGroup-CPbEEem5.cjs} +1 -1
- package/dist/{ColorStrip-D4vNVSeW.cjs → ColorStrip-CFpoGu3-.cjs} +1 -1
- package/dist/{ColorStrip-Dknkw-RX.js → ColorStrip-NwjQnLcB.js} +2 -2
- package/dist/{Confirm-Dh1H2PMh.js → Confirm-Auq-9DpN.js} +3 -3
- package/dist/{Confirm-ue689l-w.cjs → Confirm-DtxCYbRy.cjs} +1 -1
- package/dist/CopyButton-BfjJRwj9.cjs +1 -0
- package/dist/CopyButton-CqrXMntq.js +65 -0
- package/dist/DataTable-CVIaedVs.cjs +1 -0
- package/dist/DataTable-eXsolKwX.js +412 -0
- package/dist/DatePicker-Bf-H59iv.cjs +1 -0
- package/dist/{DatePicker-DMiiGKYY.js → DatePicker-Dpe3oZUB.js} +116 -89
- package/dist/{Form-WtS-IVIs.cjs → Form-6Q-UfH77.cjs} +1 -1
- package/dist/{Form-DJ1Hhwnm.js → Form-BvmiAnWD.js} +1 -1
- package/dist/{GanttChart-CwCH8pby.js → GanttChart-C4rwEpeE.js} +3 -3
- package/dist/{GanttChart-BJ_6YCza.cjs → GanttChart-DZsawOGg.cjs} +1 -1
- package/dist/{ImageCropper-BfGyTTY5.cjs → ImageCropper-BIdQmSmG.cjs} +1 -1
- package/dist/{ImageCropper-Ds5Zq1J0.js → ImageCropper-D_IGt9rj.js} +2 -2
- package/dist/{InlineLoading-B2L_asnZ.cjs → InlineLoading-iZLgELpG.cjs} +1 -1
- package/dist/{InlineLoading-DQzKEw-L.js → InlineLoading-xvKhPBaV.js} +1 -1
- package/dist/{InterpolationChart-CSEYS5aB.js → InterpolationChart-BCHoGcM7.js} +3 -3
- package/dist/{InterpolationChart-BXS1n0dY.cjs → InterpolationChart-DKNJzd67.cjs} +1 -1
- package/dist/{LineChart-DG_ows6r.js → LineChart-ByG1jC-D.js} +29 -25
- package/dist/LineChart-Dt-NlGJs.cjs +1 -0
- package/dist/{Modal-BxSP1eyD.js → Modal-ByjVye2a.js} +1 -1
- package/dist/{Modal-sGlC__uQ.cjs → Modal-oT09Tx3v.cjs} +1 -1
- package/dist/{NotificationCenter-Br-YtY5w.js → NotificationCenter-CzMc-eOd.js} +4 -4
- package/dist/{NotificationCenter-BpUiKPsp.cjs → NotificationCenter-JXVpNYsI.cjs} +1 -1
- package/dist/{NumberInput-DWf2LMGN.js → NumberInput-CGTrgj8q.js} +2 -2
- package/dist/{NumberInput-1taaS5G3.cjs → NumberInput-CwbDxpTO.cjs} +1 -1
- package/dist/{Pagination-CCMhqtoz.cjs → Pagination-1CJyhaVf.cjs} +1 -1
- package/dist/{Pagination-Br-k9zuG.js → Pagination-Cf-bF0cO.js} +1 -1
- package/dist/{PieChart-BABG-xXQ.cjs → PieChart-C-4RKuvA.cjs} +1 -1
- package/dist/{PieChart-CmvfqpXR.js → PieChart-okqwoJfR.js} +3 -3
- package/dist/{ProgressBar-Blt5BdgQ.js → ProgressBar-DAKxcGUz.js} +2 -2
- package/dist/{ProgressBar-BHKgJ4UK.cjs → ProgressBar-WHd3-8_S.cjs} +1 -1
- package/dist/{Radio-zdXHagRQ.cjs → Radio-BKSNByp5.cjs} +1 -1
- package/dist/{Radio-DsYitO1Z.js → Radio-CuuNBw3O.js} +2 -2
- package/dist/Select-QByEv_Tv.js +489 -0
- package/dist/Select-S8UH8d2D.cjs +1 -0
- package/dist/{SidebarCollapseToggle-IzDpcwPs.js → SidebarCollapseToggle-D1hnbgoR.js} +2 -2
- package/dist/{SidebarCollapseToggle-BOLWB51F.cjs → SidebarCollapseToggle-DVXcdTnG.cjs} +1 -1
- package/dist/{Skeleton-BLn8a0wV.js → Skeleton-DOnMvGJH.js} +1 -1
- package/dist/{Skeleton-lLu_CakO.cjs → Skeleton-DpFPETOp.cjs} +1 -1
- package/dist/{Slider-Ca5ru23S.cjs → Slider-C3opYFvY.cjs} +1 -1
- package/dist/{Slider-CrhYMw5S.js → Slider-DB6lFos1.js} +4 -4
- package/dist/{Spinner-C7NYF-Xf.js → Spinner-B2YYYAXJ.js} +1 -1
- package/dist/{Spinner-UsyGqwVq.cjs → Spinner-CgizCUqT.cjs} +1 -1
- package/dist/{Stepper-BIWoeqFS.cjs → Stepper-CnwA6gOD.cjs} +1 -1
- package/dist/{Stepper-CrVuq2Ba.js → Stepper-DOobCMUg.js} +1 -1
- package/dist/{StepperStep-CBaZPJV7.js → StepperStep-Cp8n2JoE.js} +1 -1
- package/dist/{StepperStep-DCpcJbTJ.cjs → StepperStep-a7JuzE0O.cjs} +1 -1
- package/dist/{Switch-BiqjLsXd.js → Switch-64BBMyrL.js} +2 -2
- package/dist/{Switch-CA01aJ7b.cjs → Switch-BXvzo4G9.cjs} +1 -1
- package/dist/Tabs-BvUckpF4.cjs +1 -0
- package/dist/Tabs-DI_L9kv1.js +196 -0
- package/dist/{TextInput-KQGVZCcT.js → TextInput-7G3euyrE.js} +3 -3
- package/dist/{TextInput-BdZPqTzI.cjs → TextInput-O9WeHs5s.cjs} +1 -1
- package/dist/{Toaster-CubmjJ_C.cjs → Toaster-DuJnC4ix.cjs} +1 -1
- package/dist/{Toaster-B4ce6OBe.js → Toaster-qdmsFaEH.js} +1 -1
- package/dist/{Tree-CnaGeX7W.cjs → Tree-BTIZ0c3l.cjs} +1 -1
- package/dist/{Tree-E3A0GUIG.js → Tree-Ctd1iADF.js} +1 -1
- package/dist/{TreeNode-xv6es6z2.js → TreeNode-C5IZMjf-.js} +1 -1
- package/dist/{TreeNode-C2W4uFhP.cjs → TreeNode-C9uFja1c.cjs} +1 -1
- package/dist/{UserMenu-E-PhzT3T.js → UserMenu-BOoM0Mer.js} +2 -2
- package/dist/{UserMenu-CVXfSmUQ.cjs → UserMenu-DonTitqc.cjs} +1 -1
- package/dist/all.cjs +1 -1
- package/dist/all.mjs +192 -190
- package/dist/component-styles.json +5 -0
- package/dist/components/AiLabel.cjs +1 -1
- package/dist/components/AiLabel.mjs +1 -1
- package/dist/components/Avatar.cjs +1 -1
- package/dist/components/Avatar.mjs +1 -1
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Badge.mjs +1 -1
- package/dist/components/Banner.cjs +1 -1
- package/dist/components/Banner.mjs +1 -1
- package/dist/components/Blueprint.cjs +1 -1
- package/dist/components/Blueprint.mjs +1 -1
- package/dist/components/BlueprintBackground.cjs +1 -1
- package/dist/components/BlueprintBackground.mjs +1 -1
- package/dist/components/BlueprintCard.cjs +1 -1
- package/dist/components/BlueprintCard.mjs +1 -1
- package/dist/components/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/Calendar.cjs +1 -1
- package/dist/components/Calendar.mjs +1 -1
- package/dist/components/Charts/BarChart.cjs +1 -1
- package/dist/components/Charts/BarChart.d.ts +8 -1
- package/dist/components/Charts/BarChart.mjs +1 -1
- package/dist/components/Charts/BarChart.vue.d.ts.map +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.d.ts +8 -1
- package/dist/components/Charts/LineChart.mjs +1 -1
- package/dist/components/Charts/LineChart.vue.d.ts.map +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/Charts/shared/types.d.ts +7 -0
- 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/CopyButton.cjs +1 -0
- package/dist/components/CopyButton.d.ts +20 -0
- package/dist/components/CopyButton.mjs +2 -0
- package/dist/components/CopyButton.vue.d.ts +16 -0
- package/dist/components/CopyButton.vue.d.ts.map +1 -0
- package/dist/components/DataTable.cjs +1 -1
- package/dist/components/DataTable.mjs +1 -1
- package/dist/components/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DatePicker.cjs +1 -1
- package/dist/components/DatePicker.mjs +1 -1
- package/dist/components/DatePicker.vue.d.ts +1 -1
- package/dist/components/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/DefinitionList.cjs +1 -1
- package/dist/components/DefinitionList.mjs +1 -1
- package/dist/components/DefinitionListItem.cjs +1 -1
- package/dist/components/DefinitionListItem.mjs +1 -1
- package/dist/components/DragHandle.cjs +1 -1
- package/dist/components/DragHandle.mjs +1 -1
- package/dist/components/EmptyState.cjs +1 -1
- package/dist/components/EmptyState.mjs +1 -1
- package/dist/components/Field.cjs +1 -1
- package/dist/components/Field.mjs +1 -1
- package/dist/components/FileUploader.cjs +1 -1
- package/dist/components/FileUploader.mjs +1 -1
- package/dist/components/Flag.cjs +1 -1
- package/dist/components/Flag.mjs +1 -1
- package/dist/components/FloatingToolbar.cjs +1 -1
- package/dist/components/FloatingToolbar.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/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/Pagination.cjs +1 -1
- package/dist/components/Pagination.mjs +1 -1
- package/dist/components/Panel.cjs +1 -1
- package/dist/components/Panel.mjs +1 -1
- package/dist/components/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar.mjs +1 -1
- package/dist/components/Radio.cjs +1 -1
- package/dist/components/Radio.mjs +1 -1
- package/dist/components/Radio.vue.d.ts +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.d.ts +8 -0
- package/dist/components/Select.mjs +1 -1
- package/dist/components/Select.vue.d.ts +9 -7
- package/dist/components/Select.vue.d.ts.map +1 -1
- package/dist/components/Shell.cjs +1 -1
- package/dist/components/Shell.mjs +1 -1
- package/dist/components/ShellPanel.cjs +1 -1
- package/dist/components/ShellPanel.mjs +1 -1
- package/dist/components/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/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/Tabs.cjs +1 -1
- package/dist/components/Tabs.mjs +1 -1
- package/dist/components/Tabs.vue.d.ts.map +1 -1
- package/dist/components/TextInput.cjs +1 -1
- package/dist/components/TextInput.mjs +1 -1
- package/dist/components/TextInput.vue.d.ts +1 -1
- 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/Walkthrough.cjs +1 -1
- package/dist/components/Walkthrough.mjs +1 -1
- package/dist/components/Wireframe.cjs +1 -1
- package/dist/components/Wireframe.mjs +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/manifest.d.ts +1 -0
- package/dist/components/manifest.d.ts.map +1 -1
- package/dist/components/manifest.js +1 -0
- package/dist/composables/useBlueprint.composable.cjs +1 -1
- package/dist/composables/useBlueprint.composable.mjs +1 -1
- package/dist/composables/useConfirm.composable.cjs +1 -1
- package/dist/composables/useConfirm.composable.mjs +3 -3
- package/dist/composables/useInlineLoading.composable.cjs +1 -1
- package/dist/composables/useInlineLoading.composable.mjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.cjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.mjs +1 -1
- package/dist/global.d.ts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +104 -103
- package/dist/main.d.ts +3 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/styles/BarChart.css +1 -1
- package/dist/styles/CopyButton.css +1 -0
- package/dist/styles/DataTable.css +1 -1
- package/dist/styles/LineChart.css +1 -1
- package/dist/styles/Select.css +1 -1
- package/dist/styles/Tabs.css +1 -1
- package/dist/ui.css +6 -5
- package/package.json +1 -1
- package/dist/BarChart-DTStA9jd.js +0 -290
- package/dist/BarChart-Dvrl4xeX.cjs +0 -1
- package/dist/DataTable-CWMlmjMi.cjs +0 -1
- package/dist/DataTable-DaNZAixf.js +0 -389
- package/dist/DatePicker-tAhXSR2o.cjs +0 -1
- package/dist/LineChart-C5bQNxQ-.cjs +0 -1
- package/dist/Select-ClkEzw5T.cjs +0 -1
- package/dist/Select-DIw08nte.js +0 -437
- package/dist/Tabs-CrrG1hvh.cjs +0 -1
- package/dist/Tabs-D3pdOieX.js +0 -180
- /package/dist/{Avatar-C-yA5Rqn.cjs → Avatar-8g9ORf0G.cjs} +0 -0
- /package/dist/{Avatar-B8JS0B-W.js → Avatar-BVNfQGSr.js} +0 -0
- /package/dist/{Badge-D3oJVwDo.js → Badge-BTXYgn3x.js} +0 -0
- /package/dist/{Badge-Dkm7PBJ8.cjs → Badge-Q9diPwDN.cjs} +0 -0
- /package/dist/{Banner-C2DFPW-D.js → Banner-6TIXgL2R.js} +0 -0
- /package/dist/{Banner-DXfzpyxc.cjs → Banner-gpADtLFp.cjs} +0 -0
- /package/dist/{Blueprint.context-Cp__sufg.js → Blueprint.context-C4vHlqSG.js} +0 -0
- /package/dist/{Blueprint.context-CNt0_OyK.cjs → Blueprint.context-DoZRtnC4.cjs} +0 -0
- /package/dist/{BlueprintBackground-DqRpS-jP.js → BlueprintBackground-B2jBQy9K.js} +0 -0
- /package/dist/{BlueprintBackground-CRbAZfZP.cjs → BlueprintBackground-d5ycVcso.cjs} +0 -0
- /package/dist/{BlueprintControls-C0yhBzYT.js → BlueprintControls-BrUTlm_Y.js} +0 -0
- /package/dist/{BlueprintControls-Qtd2vep2.cjs → BlueprintControls-Cf5H3Ly7.cjs} +0 -0
- /package/dist/{BlueprintMinimap-Bk6V5xcq.cjs → BlueprintMinimap-BUQvahxH.cjs} +0 -0
- /package/dist/{BlueprintMinimap-KRlkpH14.js → BlueprintMinimap-DB7gUPTz.js} +0 -0
- /package/dist/{Board-CDrukIty.js → Board-D7I0nDfI.js} +0 -0
- /package/dist/{Board-D1BkK3J5.cjs → Board-v8b7YDzf.cjs} +0 -0
- /package/dist/{BottomPanel-Bt4k2PJn.js → BottomPanel-BltDni2C.js} +0 -0
- /package/dist/{BottomPanel-C1mT0_I0.cjs → BottomPanel-DTHLQ_Qr.cjs} +0 -0
- /package/dist/{Breadcrumbs-cTxSMgeW.cjs → Breadcrumbs-CcP2pnTk.cjs} +0 -0
- /package/dist/{Breadcrumbs-B8eAWAvg.js → Breadcrumbs-DUxB0VdV.js} +0 -0
- /package/dist/{Calendar-CV-B4qeT.js → Calendar-CAly1ZWu.js} +0 -0
- /package/dist/{Calendar-CI6TG85W.cjs → Calendar-DNDcCbdh.cjs} +0 -0
- /package/dist/{ChartLegend-DGgW0yjG.cjs → ChartLegend-Bm3lWWjg.cjs} +0 -0
- /package/dist/{ChartLegend-BLTbVV2E.js → ChartLegend-pWTcI_8-.js} +0 -0
- /package/dist/{CheckboxGroup.context-CBJMSIiT.cjs → CheckboxGroup.context-7VztaE1q.cjs} +0 -0
- /package/dist/{CheckboxGroup.context-D-C4RVyg.js → CheckboxGroup.context-DSWDQTzm.js} +0 -0
- /package/dist/{CommandPalette-CubX_Udj.js → CommandPalette-CQj6gn7o.js} +0 -0
- /package/dist/{CommandPalette-C56CkOfF.cjs → CommandPalette-_Y5CEU1X.cjs} +0 -0
- /package/dist/{DefinitionList-MsqB9Lxo.js → DefinitionList-B7_XqH2S.js} +0 -0
- /package/dist/{DefinitionList-CSBl-Ogy.cjs → DefinitionList-CSFWnojc.cjs} +0 -0
- /package/dist/{DefinitionListItem-DnphEEw1.cjs → DefinitionListItem-BoSGWlc6.cjs} +0 -0
- /package/dist/{DefinitionListItem-Ddz2wLyc.js → DefinitionListItem-CwookJTo.js} +0 -0
- /package/dist/{DragHandle-D9NnsyJc.js → DragHandle-DObJBJTl.js} +0 -0
- /package/dist/{DragHandle-B_rMbMxm.cjs → DragHandle-LknZzyau.cjs} +0 -0
- /package/dist/{EmptyState-B6pEj4jk.js → EmptyState-OFT7py0Y.js} +0 -0
- /package/dist/{EmptyState-DRbjP890.cjs → EmptyState-kKd8_FYg.cjs} +0 -0
- /package/dist/{Field-tNwOATAd.js → Field-C5vOxa-8.js} +0 -0
- /package/dist/{Field-BZ2cHQlw.cjs → Field-uEaPF5Wl.cjs} +0 -0
- /package/dist/{FileUploader-DC1nE86P.js → FileUploader-BThVgvR_.js} +0 -0
- /package/dist/{FileUploader-DehZc0gP.cjs → FileUploader-Ci8QdwIA.cjs} +0 -0
- /package/dist/{Flag-DFg5FTus.cjs → Flag-BfIeBiSa.cjs} +0 -0
- /package/dist/{Flag-C4SjTXTD.js → Flag-Bzq8UX26.js} +0 -0
- /package/dist/{FloatingToolbar-J9ucYTsb.js → FloatingToolbar-C4qGyarE.js} +0 -0
- /package/dist/{FloatingToolbar-vWo7YmH3.cjs → FloatingToolbar-DZs8kFYa.cjs} +0 -0
- /package/dist/{Grid-DiCxrPaO.cjs → Grid-BhBKhgln.cjs} +0 -0
- /package/dist/{Grid-iox-7xyH.js → Grid-Cc13B5BH.js} +0 -0
- /package/dist/{InlineEdit-9E8-8JQr.cjs → InlineEdit-Cmux9zMo.cjs} +0 -0
- /package/dist/{InlineEdit-BCHxGdSy.js → InlineEdit-CwxZh9RS.js} +0 -0
- /package/dist/{JsonTree-DygODsNE.cjs → JsonTree-BRXBiGbK.cjs} +0 -0
- /package/dist/{JsonTree-Do_bunoq.js → JsonTree-C3H2YKdl.js} +0 -0
- /package/dist/{Label-DGK5nxFy.js → Label-ByPjahGR.js} +0 -0
- /package/dist/{Label-CZhQEyoi.cjs → Label-wjk0O-kq.cjs} +0 -0
- /package/dist/{Layer-Dn8JBO94.cjs → Layer-C2smYk1p.cjs} +0 -0
- /package/dist/{Layer-CPWK7fSy.js → Layer-DRDUSJFB.js} +0 -0
- /package/dist/{MenuBar-Cmty676_.cjs → MenuBar-BUg3Rmg0.cjs} +0 -0
- /package/dist/{MenuBar-DgoQm2e6.js → MenuBar-CYwXbF0g.js} +0 -0
- /package/dist/{MenuBarItem-Cxxs8Dnr.js → MenuBarItem-CSorVwfy.js} +0 -0
- /package/dist/{MenuBarItem-dBEuTZ3Q.cjs → MenuBarItem-CbfKgiDU.cjs} +0 -0
- /package/dist/{MenuDivider-SpMk4am3.cjs → MenuDivider-C2YR-Eju.cjs} +0 -0
- /package/dist/{MenuDivider-Clt77czV.js → MenuDivider-DYrFiAQC.js} +0 -0
- /package/dist/{Message-CHkTWe0K.js → Message-DlxDNDdA.js} +0 -0
- /package/dist/{Message-C44ftsaT.cjs → Message-MKemyYRl.cjs} +0 -0
- /package/dist/{NotificationCenterItem-BP0VBTaB.cjs → NotificationCenterItem-0SzaPX5t.cjs} +0 -0
- /package/dist/{NotificationCenterItem-CjJh9W_a.js → NotificationCenterItem-5E6EJNp8.js} +0 -0
- /package/dist/{NubiscoMark-BumRk78m.cjs → NubiscoMark-BZHBU-Hr.cjs} +0 -0
- /package/dist/{NubiscoMark-eVqSGOjI.js → NubiscoMark-CVDS0VyU.js} +0 -0
- /package/dist/{NubiscoPlatformMark-Ch6dCICn.js → NubiscoPlatformMark-BKNLO5R5.js} +0 -0
- /package/dist/{NubiscoPlatformMark-IX-E5QQ_.cjs → NubiscoPlatformMark-CQ-MPQFs.cjs} +0 -0
- /package/dist/{Panel-Cd29GNxw.cjs → Panel-BYnLh1DT.cjs} +0 -0
- /package/dist/{Panel-Y8gOQKuw.js → Panel-KYvcxf_L.js} +0 -0
- /package/dist/{ReorderList-hHh9XYQY.cjs → ReorderList-WV4mkeuP.cjs} +0 -0
- /package/dist/{ReorderList-v1aWbXjb.js → ReorderList-u9pyTdeA.js} +0 -0
- /package/dist/{Shell-CfHe8tIp.js → Shell-DN74eBmE.js} +0 -0
- /package/dist/{Shell-DrXByQxR.cjs → Shell-Dmv8U1S6.cjs} +0 -0
- /package/dist/{ShellPanel-BA7QLnzE.js → ShellPanel-CvO-jf8v.js} +0 -0
- /package/dist/{ShellPanel-CC_QJlLu.cjs → ShellPanel-DnXAu2jC.cjs} +0 -0
- /package/dist/{SidebarBrand-8yDIYIQZ.js → SidebarBrand-CG9y4xEK.js} +0 -0
- /package/dist/{SidebarBrand-u8Oau9DK.cjs → SidebarBrand-Dyi_NM1K.cjs} +0 -0
- /package/dist/{SidebarLink-XVXCHDBm.js → SidebarLink-DDwp4Zr4.js} +0 -0
- /package/dist/{SidebarLink-pgjUnWzl.cjs → SidebarLink-DoXNAgxZ.cjs} +0 -0
- /package/dist/{SidebarMenu-e0qP4Nh-.js → SidebarMenu-BEfmvgr-.js} +0 -0
- /package/dist/{SidebarMenu-CA0y5Zle.cjs → SidebarMenu-CfEUpi__.cjs} +0 -0
- /package/dist/{SidebarMenuGroup-VQLxJ1CS.cjs → SidebarMenuGroup-BqBLbfoW.cjs} +0 -0
- /package/dist/{SidebarMenuGroup-CGnMAAUM.js → SidebarMenuGroup-ByHNJaEp.js} +0 -0
- /package/dist/{SidebarMenuItem-CqDbzAAk.cjs → SidebarMenuItem-BXO7-6mW.cjs} +0 -0
- /package/dist/{SidebarMenuItem-DwBLBW-N.js → SidebarMenuItem-DfpEwFWz.js} +0 -0
- /package/dist/{Sparkline-Bbt4vFjI.js → Sparkline-BSupaEBO.js} +0 -0
- /package/dist/{Sparkline-CdLiYBEr.cjs → Sparkline-Bj0C7f6j.cjs} +0 -0
- /package/dist/{Stepper.context-BgQfa8xl.js → Stepper.context-26sKIGs-.js} +0 -0
- /package/dist/{Stepper.context-DBNE-GYb.cjs → Stepper.context-C5STWFki.cjs} +0 -0
- /package/dist/{Submenu-BC9j6dvb.cjs → Submenu-CoCaEj3F.cjs} +0 -0
- /package/dist/{Submenu-CnRi1GdL.js → Submenu-OnSeKMTp.js} +0 -0
- /package/dist/{TableOfContents-DCfZ4DYi.cjs → TableOfContents-CnEiZ-XO.cjs} +0 -0
- /package/dist/{TableOfContents-EYrBCeci.js → TableOfContents-DjBNG0ti.js} +0 -0
- /package/dist/{Toast-XjSCXTx8.cjs → Toast-Wm-0U4X4.cjs} +0 -0
- /package/dist/{Toast-q9KByfYq.js → Toast-t80w8V3w.js} +0 -0
- /package/dist/{TreeContext-PgcV87_V.cjs → TreeContext-43FbckfR.cjs} +0 -0
- /package/dist/{TreeContext-BN1eHAL6.js → TreeContext-DBZ6DCFn.js} +0 -0
- /package/dist/{Walkthrough-Dvyp-4Sr.cjs → Walkthrough-B8phXDRA.cjs} +0 -0
- /package/dist/{Walkthrough-BxwgYRUB.js → Walkthrough-E_zGYzHh.js} +0 -0
- /package/dist/{Wireframe-DDRVqrll.cjs → Wireframe-C64EI3JN.cjs} +0 -0
- /package/dist/{Wireframe-ql6EOtd2.js → Wireframe-EQUemMFo.js} +0 -0
- /package/dist/{palette-Cy2_8mLH.cjs → palette-Bw_ZEUW9.cjs} +0 -0
- /package/dist/{palette-StNyj_sM.js → palette-DWJZEKeE.js} +0 -0
- /package/dist/{pixi-scene-CuO3As43.js → pixi-scene-D36iD2QV.js} +0 -0
- /package/dist/{pixi-scene-DE1dBR9n.cjs → pixi-scene-PTeatzhb.cjs} +0 -0
- /package/dist/{scales-4WxjhxBm.cjs → scales-CdS9bhNN.cjs} +0 -0
- /package/dist/{scales-DlFF1BRk.js → scales-qYu_XbF9.js} +0 -0
- /package/dist/{useChartSize-UdZSuP3G.js → useChartSize-D1SiiiO5.js} +0 -0
- /package/dist/{useChartSize-C-BIN0vc.cjs → useChartSize-FL0Z5O7-.cjs} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-DMycMLn-.cjs → useLoadingAnnouncer.composable-BfB0FyHh.cjs} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-C7FA-Ui1.js → useLoadingAnnouncer.composable-JILdPA0V.js} +0 -0
- /package/dist/{vue-i18n-B2FDvjI1.js → vue-i18n-C_Yfj1G0.js} +0 -0
- /package/dist/{vue-i18n-D3Ga_miE.cjs → vue-i18n-Cbsz5l3N.cjs} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),n=require(`./Size.d-GBIblj2D.cjs`),r=require(`./Icon-C8R_r_In.cjs`),i=require(`./composables/useSurfaceLayer.composable.cjs`),a=require(`./composables/usePhoneLayout.composable.cjs`),o=require(`./Button-C0UUTgEB.cjs`),s=require(`./Grid-DiCxrPaO.cjs`),c=require(`./Checkbox-CZVNZ2pn.cjs`);let l=require(`vue`),u=require(`@nubisco/ui/icons/arrows-down-up`);u=e.n(u);let d=require(`@nubisco/ui/icons/arrow-up`);d=e.n(d);let f=require(`@nubisco/ui/icons/arrow-down`);f=e.n(f);var p={key:0,class:`nb-data-table__toolbar`},m=[`inert`,`aria-hidden`],h={key:0},g={key:0,class:`nb-data-table__title`},_={key:1,class:`nb-data-table__description`},v=[`inert`,`aria-hidden`],y={key:1,class:`nb-data-table__batch`,role:`region`,"aria-label":`Table batch actions`},ee={class:`nb-data-table__batch-count`},te={class:`nb-data-table__batch-actions`},ne={class:`nb-data-table__scroll`},re=[`role`,`aria-label`,`aria-busy`],ie={key:0,class:`nb-data-table__col-select`},ae={key:1,class:`nb-data-table__col-actions`},oe=[`role`],se=[`role`],ce={key:0,scope:`col`,class:`nb-data-table__th nb-data-table__select-cell`},le=[`aria-sort`],ue=[`onClick`],de={class:`nb-data-table__th-label`},fe={key:1,class:`nb-data-table__th-label`},pe={key:1,scope:`col`,class:`nb-data-table__th nb-data-table__actions-cell`},me=[`role`],he={key:0,class:`nb-data-table__td`},ge={key:1,class:`nb-data-table__td`},_e={key:1,class:`nb-data-table__state-row`},b=[`colspan`],x={key:2,class:`nb-data-table__state-row`},S=[`colspan`],C=[`role`,`aria-selected`,`onClick`],w=[`checked`,`aria-label`,`onChange`],T=[`role`,`data-label`],E={key:1,class:`nb-data-table__footer`},D=(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:D}=i.useSurfaceLayer(),O=t,k=(0,l.useSlots)(),A=`nb-data-table-select-${(0,l.useId)()}`,j=(0,l.computed)(()=>n.size),M=(0,l.computed)(()=>n.columns.filter(e=>!e.hidden)),N=(0,l.computed)(()=>n.selectable!==`none`),P=(0,l.computed)(()=>!!k[`row-actions`]),F=(0,l.computed)(()=>M.value.length+(N.value?1:0)+(P.value?1:0)),{phone:I}=a.usePhoneLayout(),L=(0,l.computed)(()=>n.stackOnPhone&&I.value),ve=(0,l.computed)(()=>(M.value.find(e=>e.primary)??M.value.find(e=>!e.phoneHidden&&!e.phoneMeta))?.key);function ye(e){return e.phoneHidden?`nb-data-table__td--phone-hidden`:e.key===ve.value?`nb-data-table__td--primary`:e.phoneMeta?`nb-data-table__td--meta`:`nb-data-table__td--field`}let be=(0,l.computed)(()=>!n.loading&&!n.error&&n.rows.length>0&&(n.selectable===`multiple`||M.value.some(e=>e.sortable&&!e.phoneHidden)));function xe(e){if(e.width!=null)return{width:typeof e.width==`number`?`${e.width}px`:e.width}}function R(e,t){return t[e.key]}function Se(e){return e==null?``:String(e)}let z=e=>e.column.render?.(e.row,R(e.column,e.row),e.rowIndex)??null;z.props=[`column`,`row`,`rowIndex`];function B(e){let t=n.rowKey;return typeof t==`function`?t(e):e[t]}let V=(0,l.computed)(()=>new Set(n.selected)),Ce=(0,l.computed)(()=>n.selected),H=(0,l.computed)(()=>n.selected.length);function U(e){return V.value.has(B(e))}let W=(0,l.computed)(()=>n.rows.map(e=>B(e))),G=(0,l.computed)(()=>W.value.length>0&&W.value.every(e=>V.value.has(e))),we=(0,l.computed)(()=>!G.value&&W.value.some(e=>V.value.has(e))),K=(0,l.ref)(null),q=!1;function J(e){q=e.shiftKey}(0,l.watch)(W,()=>{K.value=null});function Te(e,t){let r=B(e),i=new Set(n.selected),a=!i.has(r),o=K.value,s=e=>{a?i.add(e):i.delete(e)};if(q&&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(B(e))}}else s(r),K.value=t;q=!1,O(`update:selected`,[...i])}function Ee(e){O(`update:selected`,[B(e)])}function De(){let e=new Set(n.selected);G.value?W.value.forEach(t=>e.delete(t)):W.value.forEach(t=>e.add(t)),O(`update:selected`,[...e])}function Y(){O(`update:selected`,[])}let X=(0,l.computed)(()=>n.selectable!==`none`&&!!k[`batch-actions`]),Z=(0,l.computed)(()=>X.value&&H.value>0),Oe=(0,l.computed)(()=>!!n.title||!!n.description||!!k.toolbar||!!k.search||!!k[`toolbar-actions`]),ke=(0,l.computed)(()=>Oe.value||X.value);function Q(e){return!!n.sortState&&n.sortState.key===e.key&&n.sortState.direction!==`none`}function Ae(e){return Q(e)?n.sortState.direction===`asc`?`ascending`:`descending`:`none`}function $(e){return Q(e)?n.sortState.direction===`asc`?d:f:u}function je(e){return e===`asc`?`desc`:e===`desc`?`none`:`asc`}function Me(e){let t=n.sortState&&n.sortState.key===e.key?n.sortState.direction:`none`;O(`sort`,{key:e.key,direction:je(t)})}let Ne=(0,l.getCurrentInstance)(),Pe=(0,l.computed)(()=>!!Ne?.vnode.props?.onRowClick);function Fe(e,t){O(`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":L.value},{"nb-data-table--stacked-headless":L.value&&!be.value}]},(0,l.unref)(D)),[ke.value?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,p,[(0,l.createElementVNode)(`div`,{class:`nb-data-table__toolbar-heading`,inert:Z.value||void 0,"aria-hidden":Z.value||void 0},[(0,l.renderSlot)(t.$slots,`toolbar`,{selectedCount:H.value},()=>[e.title||e.description?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,h,[e.title?((0,l.openBlock)(),(0,l.createElementBlock)(`h2`,g,(0,l.toDisplayString)(e.title),1)):(0,l.createCommentVNode)(``,!0),e.description?((0,l.openBlock)(),(0,l.createElementBlock)(`p`,_,(0,l.toDisplayString)(e.description),1)):(0,l.createCommentVNode)(``,!0)])):(0,l.createCommentVNode)(``,!0)],!0)],8,m),t.$slots.search||t.$slots[`toolbar-actions`]?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,class:`nb-data-table__toolbar-tools`,inert:Z.value||void 0,"aria-hidden":Z.value||void 0},[(0,l.renderSlot)(t.$slots,`search`,{},void 0,!0),(0,l.renderSlot)(t.$slots,`toolbar-actions`,{},void 0,!0)],8,v)):(0,l.createCommentVNode)(``,!0),Z.value?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,y,[(0,l.createElementVNode)(`span`,ee,(0,l.toDisplayString)(H.value)+` selected `,1),(0,l.createElementVNode)(`div`,te,[(0,l.renderSlot)(t.$slots,`batch-actions`,{selectedKeys:Ce.value,clear:Y},void 0,!0)]),(0,l.createVNode)(o.t,{class:`nb-data-table__batch-cancel`,variant:`ghost`,size:j.value,onClick:Y},{default:(0,l.withCtx)(()=>[...n[2]||=[(0,l.createTextVNode)(` Cancel `,-1)]]),_:1},8,[`size`])])):(0,l.createCommentVNode)(``,!0)])):(0,l.createCommentVNode)(``,!0),(0,l.createElementVNode)(`div`,ne,[(0,l.createElementVNode)(`table`,{class:`nb-data-table__table`,role:L.value?`table`:void 0,"aria-label":e.ariaLabel||e.title||void 0,"aria-busy":e.loading||void 0},[(0,l.createElementVNode)(`colgroup`,null,[N.value?((0,l.openBlock)(),(0,l.createElementBlock)(`col`,ie)):(0,l.createCommentVNode)(``,!0),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(M.value,e=>((0,l.openBlock)(),(0,l.createElementBlock)(`col`,{key:`col-${e.key}`,style:(0,l.normalizeStyle)(xe(e))},null,4))),128)),P.value?((0,l.openBlock)(),(0,l.createElementBlock)(`col`,ae)):(0,l.createCommentVNode)(``,!0)]),(0,l.createElementVNode)(`thead`,{class:`nb-data-table__head`,role:L.value?`rowgroup`:void 0},[(0,l.createElementVNode)(`tr`,{role:L.value?`row`:void 0},[N.value?((0,l.openBlock)(),(0,l.createElementBlock)(`th`,ce,[e.selectable===`multiple`?((0,l.openBlock)(),(0,l.createBlock)(c.t,{key:0,"model-value":G.value,indeterminate:we.value,"aria-label":`Select all rows`,"onUpdate:modelValue":De},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)(M.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":Q(e)},L.value&&e.phoneHidden&&`nb-data-table__th--phone-hidden`]),"aria-sort":e.sortable?Ae(e):void 0},[e.sortable?((0,l.openBlock)(),(0,l.createElementBlock)(`button`,{key:0,type:`button`,class:`nb-data-table__sort`,onClick:t=>Me(e)},[(0,l.createElementVNode)(`span`,de,[(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:$(e),class:`nb-data-table__sort-icon`,"aria-hidden":`true`},null,8,[`name`])],8,ue)):((0,l.openBlock)(),(0,l.createElementBlock)(`span`,fe,[(0,l.renderSlot)(t.$slots,`header-${e.key}`,{column:e},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.header),1)],!0)]))],10,le))),128)),P.value?((0,l.openBlock)(),(0,l.createElementBlock)(`th`,pe,[...n[3]||=[(0,l.createElementVNode)(`span`,{class:`nb-sr-only`},`Row actions`,-1)]])):(0,l.createCommentVNode)(``,!0)],8,se)],8,oe),(0,l.createElementVNode)(`tbody`,{class:`nb-data-table__body`,role:L.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`},[N.value?((0,l.openBlock)(),(0,l.createElementBlock)(`td`,he,[...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)(M.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)),P.value?((0,l.openBlock)(),(0,l.createElementBlock)(`td`,ge,[...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`,_e,[(0,l.createElementVNode)(`td`,{colspan:F.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:B(r),class:(0,l.normalizeClass)([`nb-data-table__row`,{"nb-data-table__row--selected":U(r)},{"nb-data-table__row--clickable":Pe.value}]),role:L.value?`row`:void 0,"aria-selected":e.selectable===`none`?void 0:U(r),onClick:e=>Fe(r,i)},[N.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:J,onKeydown:J},[e.selectable===`multiple`?((0,l.openBlock)(),(0,l.createBlock)(c.t,{key:0,"model-value":U(r),"aria-label":`Select row ${i+1}`,"onUpdate:modelValue":e=>Te(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:A,checked:U(r),"aria-label":`Select row ${i+1}`,onChange:e=>Ee(r)},null,40,w))],32)):(0,l.createCommentVNode)(``,!0),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(M.value,n=>((0,l.openBlock)(),(0,l.createElementBlock)(`td`,{key:`td-${B(r)}-${n.key}`,class:(0,l.normalizeClass)([`nb-data-table__td`,`nb-data-table__td--${n.align||`left`}`,n.cellClass,L.value&&ye(n)]),role:L.value?`cell`:void 0,"data-label":e.stackOnPhone?n.header:void 0},[(0,l.renderSlot)(t.$slots,`cell-${n.key}`,{row:r,value:R(n,r),column:n,rowIndex:i},()=>[n.render?((0,l.openBlock)(),(0,l.createBlock)(z,{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)(Se(R(n,r))),1)],64))],!0)],10,T))),128)),P.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,C))),128)):((0,l.openBlock)(),(0,l.createElementBlock)(`tr`,x,[(0,l.createElementVNode)(`td`,{colspan:F.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,S)]))],8,me)],8,re)]),t.$slots.footer?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,E,[(0,l.renderSlot)(t.$slots,`footer`,{},void 0,!0)])):(0,l.createCommentVNode)(``,!0)],16))}}),O=t.t(D,[[`__scopeId`,`data-v-a4bea523`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return O}});
|
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-O4QQSku4.js";
|
|
2
|
-
import { r as t } from "./Size.d-Bah6vMl3.js";
|
|
3
|
-
import { t as n } from "./Icon-rREAqsu0.js";
|
|
4
|
-
import { useSurfaceLayer as r } from "./composables/useSurfaceLayer.composable.mjs";
|
|
5
|
-
import { usePhoneLayout as i } from "./composables/usePhoneLayout.composable.mjs";
|
|
6
|
-
import { t as a } from "./Button-IcCXOoCT.js";
|
|
7
|
-
import { t as o } from "./Grid-iox-7xyH.js";
|
|
8
|
-
import { t as s } from "./Checkbox-CXlovpPs.js";
|
|
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, openBlock as v, ref as re, renderList as y, renderSlot as b, toDisplayString as x, unref as ie, useId as ae, useSlots as oe, watch as se, withCtx as S, withModifiers as C } from "vue";
|
|
10
|
-
import * as ce from "@nubisco/ui/icons/arrows-down-up";
|
|
11
|
-
import * as le from "@nubisco/ui/icons/arrow-up";
|
|
12
|
-
import * as ue from "@nubisco/ui/icons/arrow-down";
|
|
13
|
-
//#region src/components/DataTable.vue?vue&type=script&setup=true&lang.ts
|
|
14
|
-
var de = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "nb-data-table__toolbar"
|
|
17
|
-
}, fe = ["inert", "aria-hidden"], pe = { key: 0 }, me = {
|
|
18
|
-
key: 0,
|
|
19
|
-
class: "nb-data-table__title"
|
|
20
|
-
}, he = {
|
|
21
|
-
key: 1,
|
|
22
|
-
class: "nb-data-table__description"
|
|
23
|
-
}, ge = ["inert", "aria-hidden"], _e = {
|
|
24
|
-
key: 1,
|
|
25
|
-
class: "nb-data-table__batch",
|
|
26
|
-
role: "region",
|
|
27
|
-
"aria-label": "Table batch actions"
|
|
28
|
-
}, ve = { class: "nb-data-table__batch-count" }, ye = { class: "nb-data-table__batch-actions" }, be = { class: "nb-data-table__scroll" }, xe = [
|
|
29
|
-
"role",
|
|
30
|
-
"aria-label",
|
|
31
|
-
"aria-busy"
|
|
32
|
-
], Se = {
|
|
33
|
-
key: 0,
|
|
34
|
-
class: "nb-data-table__col-select"
|
|
35
|
-
}, Ce = {
|
|
36
|
-
key: 1,
|
|
37
|
-
class: "nb-data-table__col-actions"
|
|
38
|
-
}, we = ["role"], w = ["role"], T = {
|
|
39
|
-
key: 0,
|
|
40
|
-
scope: "col",
|
|
41
|
-
class: "nb-data-table__th nb-data-table__select-cell"
|
|
42
|
-
}, E = ["aria-sort"], D = ["onClick"], O = { class: "nb-data-table__th-label" }, k = {
|
|
43
|
-
key: 1,
|
|
44
|
-
class: "nb-data-table__th-label"
|
|
45
|
-
}, Te = {
|
|
46
|
-
key: 1,
|
|
47
|
-
scope: "col",
|
|
48
|
-
class: "nb-data-table__th nb-data-table__actions-cell"
|
|
49
|
-
}, Ee = ["role"], De = {
|
|
50
|
-
key: 0,
|
|
51
|
-
class: "nb-data-table__td"
|
|
52
|
-
}, Oe = {
|
|
53
|
-
key: 1,
|
|
54
|
-
class: "nb-data-table__td"
|
|
55
|
-
}, ke = {
|
|
56
|
-
key: 1,
|
|
57
|
-
class: "nb-data-table__state-row"
|
|
58
|
-
}, Ae = ["colspan"], je = {
|
|
59
|
-
key: 2,
|
|
60
|
-
class: "nb-data-table__state-row"
|
|
61
|
-
}, Me = ["colspan"], Ne = [
|
|
62
|
-
"role",
|
|
63
|
-
"aria-selected",
|
|
64
|
-
"onClick"
|
|
65
|
-
], Pe = [
|
|
66
|
-
"checked",
|
|
67
|
-
"aria-label",
|
|
68
|
-
"onChange"
|
|
69
|
-
], Fe = ["role", "data-label"], Ie = {
|
|
70
|
-
key: 1,
|
|
71
|
-
class: "nb-data-table__footer"
|
|
72
|
-
}, A = /* @__PURE__ */ e(/* @__PURE__ */ g({
|
|
73
|
-
__name: "DataTable",
|
|
74
|
-
props: {
|
|
75
|
-
columns: {},
|
|
76
|
-
rows: {},
|
|
77
|
-
rowKey: {},
|
|
78
|
-
size: { default: t.Medium },
|
|
79
|
-
sortState: { default: null },
|
|
80
|
-
selectable: { default: "none" },
|
|
81
|
-
selected: { default: () => [] },
|
|
82
|
-
loading: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
default: !1
|
|
85
|
-
},
|
|
86
|
-
skeletonRows: { default: 5 },
|
|
87
|
-
error: { default: void 0 },
|
|
88
|
-
emptyMessage: { default: void 0 },
|
|
89
|
-
stickyHeader: {
|
|
90
|
-
type: Boolean,
|
|
91
|
-
default: !0
|
|
92
|
-
},
|
|
93
|
-
zebra: {
|
|
94
|
-
type: Boolean,
|
|
95
|
-
default: !1
|
|
96
|
-
},
|
|
97
|
-
fill: {
|
|
98
|
-
type: Boolean,
|
|
99
|
-
default: !1
|
|
100
|
-
},
|
|
101
|
-
title: { default: void 0 },
|
|
102
|
-
description: { default: void 0 },
|
|
103
|
-
ariaLabel: { default: void 0 },
|
|
104
|
-
stackOnPhone: {
|
|
105
|
-
type: Boolean,
|
|
106
|
-
default: !1
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
emits: [
|
|
110
|
-
"sort",
|
|
111
|
-
"update:selected",
|
|
112
|
-
"row-click"
|
|
113
|
-
],
|
|
114
|
-
setup(e, { emit: t }) {
|
|
115
|
-
let g = e, { layerProps: A } = r(), j = t, M = oe(), Le = `nb-data-table-select-${ae()}`, Re = l(() => g.size), N = l(() => g.columns.filter((e) => !e.hidden)), P = l(() => g.selectable !== "none"), F = l(() => !!M["row-actions"]), I = l(() => N.value.length + (P.value ? 1 : 0) + (F.value ? 1 : 0)), { phone: ze } = i(), L = l(() => g.stackOnPhone && ze.value), Be = l(() => (N.value.find((e) => e.primary) ?? N.value.find((e) => !e.phoneHidden && !e.phoneMeta))?.key);
|
|
116
|
-
function Ve(e) {
|
|
117
|
-
return e.phoneHidden ? "nb-data-table__td--phone-hidden" : e.key === Be.value ? "nb-data-table__td--primary" : e.phoneMeta ? "nb-data-table__td--meta" : "nb-data-table__td--field";
|
|
118
|
-
}
|
|
119
|
-
let He = l(() => !g.loading && !g.error && g.rows.length > 0 && (g.selectable === "multiple" || N.value.some((e) => e.sortable && !e.phoneHidden)));
|
|
120
|
-
function Ue(e) {
|
|
121
|
-
if (e.width != null) return { width: typeof e.width == "number" ? `${e.width}px` : e.width };
|
|
122
|
-
}
|
|
123
|
-
function R(e, t) {
|
|
124
|
-
return t[e.key];
|
|
125
|
-
}
|
|
126
|
-
function We(e) {
|
|
127
|
-
return e == null ? "" : String(e);
|
|
128
|
-
}
|
|
129
|
-
let z = (e) => e.column.render?.(e.row, R(e.column, e.row), e.rowIndex) ?? null;
|
|
130
|
-
z.props = [
|
|
131
|
-
"column",
|
|
132
|
-
"row",
|
|
133
|
-
"rowIndex"
|
|
134
|
-
];
|
|
135
|
-
function B(e) {
|
|
136
|
-
let t = g.rowKey;
|
|
137
|
-
return typeof t == "function" ? t(e) : e[t];
|
|
138
|
-
}
|
|
139
|
-
let V = l(() => new Set(g.selected)), Ge = l(() => g.selected), H = l(() => g.selected.length);
|
|
140
|
-
function U(e) {
|
|
141
|
-
return V.value.has(B(e));
|
|
142
|
-
}
|
|
143
|
-
let W = l(() => g.rows.map((e) => B(e))), G = l(() => W.value.length > 0 && W.value.every((e) => V.value.has(e))), Ke = l(() => !G.value && W.value.some((e) => V.value.has(e))), K = re(null), q = !1;
|
|
144
|
-
function J(e) {
|
|
145
|
-
q = e.shiftKey;
|
|
146
|
-
}
|
|
147
|
-
se(W, () => {
|
|
148
|
-
K.value = null;
|
|
149
|
-
});
|
|
150
|
-
function qe(e, t) {
|
|
151
|
-
let n = B(e), r = new Set(g.selected), i = !r.has(n), a = K.value, o = (e) => {
|
|
152
|
-
i ? r.add(e) : r.delete(e);
|
|
153
|
-
};
|
|
154
|
-
if (q && a !== null && a !== t) {
|
|
155
|
-
let e = Math.min(a, t), n = Math.max(a, t);
|
|
156
|
-
for (let t = e; t <= n; t++) {
|
|
157
|
-
let e = g.rows[t];
|
|
158
|
-
e && o(B(e));
|
|
159
|
-
}
|
|
160
|
-
} else o(n), K.value = t;
|
|
161
|
-
q = !1, j("update:selected", [...r]);
|
|
162
|
-
}
|
|
163
|
-
function Je(e) {
|
|
164
|
-
j("update:selected", [B(e)]);
|
|
165
|
-
}
|
|
166
|
-
function Ye() {
|
|
167
|
-
let e = new Set(g.selected);
|
|
168
|
-
G.value ? W.value.forEach((t) => e.delete(t)) : W.value.forEach((t) => e.add(t)), j("update:selected", [...e]);
|
|
169
|
-
}
|
|
170
|
-
function Y() {
|
|
171
|
-
j("update:selected", []);
|
|
172
|
-
}
|
|
173
|
-
let X = l(() => g.selectable !== "none" && !!M["batch-actions"]), Z = l(() => X.value && H.value > 0), Q = l(() => !!g.title || !!g.description || !!M.toolbar || !!M.search || !!M["toolbar-actions"]), Xe = l(() => Q.value || X.value);
|
|
174
|
-
function $(e) {
|
|
175
|
-
return !!g.sortState && g.sortState.key === e.key && g.sortState.direction !== "none";
|
|
176
|
-
}
|
|
177
|
-
function Ze(e) {
|
|
178
|
-
return $(e) ? g.sortState.direction === "asc" ? "ascending" : "descending" : "none";
|
|
179
|
-
}
|
|
180
|
-
function Qe(e) {
|
|
181
|
-
return $(e) ? g.sortState.direction === "asc" ? le : ue : ce;
|
|
182
|
-
}
|
|
183
|
-
function $e(e) {
|
|
184
|
-
return e === "asc" ? "desc" : e === "desc" ? "none" : "asc";
|
|
185
|
-
}
|
|
186
|
-
function et(e) {
|
|
187
|
-
let t = g.sortState && g.sortState.key === e.key ? g.sortState.direction : "none";
|
|
188
|
-
j("sort", {
|
|
189
|
-
key: e.key,
|
|
190
|
-
direction: $e(t)
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
let tt = ee(), nt = l(() => !!tt?.vnode.props?.onRowClick);
|
|
194
|
-
function rt(e, t) {
|
|
195
|
-
j("row-click", e, t);
|
|
196
|
-
}
|
|
197
|
-
return (t, r) => (v(), f("div", te({ class: [
|
|
198
|
-
"nb-data-table",
|
|
199
|
-
`nb-data-table--${e.size}`,
|
|
200
|
-
{ "nb-data-table--zebra": e.zebra },
|
|
201
|
-
{ "nb-data-table--sticky": e.stickyHeader },
|
|
202
|
-
{ "nb-data-table--fill": e.fill },
|
|
203
|
-
{ "nb-data-table--stacked": L.value },
|
|
204
|
-
{ "nb-data-table--stacked-headless": L.value && !He.value }
|
|
205
|
-
] }, ie(A)), [
|
|
206
|
-
Xe.value ? (v(), f("div", de, [
|
|
207
|
-
p("div", {
|
|
208
|
-
class: "nb-data-table__toolbar-heading",
|
|
209
|
-
inert: Z.value || void 0,
|
|
210
|
-
"aria-hidden": Z.value || void 0
|
|
211
|
-
}, [b(t.$slots, "toolbar", { selectedCount: H.value }, () => [e.title || e.description ? (v(), f("div", pe, [e.title ? (v(), f("h2", me, x(e.title), 1)) : d("", !0), e.description ? (v(), f("p", he, x(e.description), 1)) : d("", !0)])) : d("", !0)], !0)], 8, fe),
|
|
212
|
-
t.$slots.search || t.$slots["toolbar-actions"] ? (v(), f("div", {
|
|
213
|
-
key: 0,
|
|
214
|
-
class: "nb-data-table__toolbar-tools",
|
|
215
|
-
inert: Z.value || void 0,
|
|
216
|
-
"aria-hidden": Z.value || void 0
|
|
217
|
-
}, [b(t.$slots, "search", {}, void 0, !0), b(t.$slots, "toolbar-actions", {}, void 0, !0)], 8, ge)) : d("", !0),
|
|
218
|
-
Z.value ? (v(), f("div", _e, [
|
|
219
|
-
p("span", ve, x(H.value) + " selected ", 1),
|
|
220
|
-
p("div", ye, [b(t.$slots, "batch-actions", {
|
|
221
|
-
selectedKeys: Ge.value,
|
|
222
|
-
clear: Y
|
|
223
|
-
}, void 0, !0)]),
|
|
224
|
-
h(a, {
|
|
225
|
-
class: "nb-data-table__batch-cancel",
|
|
226
|
-
variant: "ghost",
|
|
227
|
-
size: Re.value,
|
|
228
|
-
onClick: Y
|
|
229
|
-
}, {
|
|
230
|
-
default: S(() => [...r[2] ||= [m(" Cancel ", -1)]]),
|
|
231
|
-
_: 1
|
|
232
|
-
}, 8, ["size"])
|
|
233
|
-
])) : d("", !0)
|
|
234
|
-
])) : d("", !0),
|
|
235
|
-
p("div", be, [p("table", {
|
|
236
|
-
class: "nb-data-table__table",
|
|
237
|
-
role: L.value ? "table" : void 0,
|
|
238
|
-
"aria-label": e.ariaLabel || e.title || void 0,
|
|
239
|
-
"aria-busy": e.loading || void 0
|
|
240
|
-
}, [
|
|
241
|
-
p("colgroup", null, [
|
|
242
|
-
P.value ? (v(), f("col", Se)) : d("", !0),
|
|
243
|
-
(v(!0), f(c, null, y(N.value, (e) => (v(), f("col", {
|
|
244
|
-
key: `col-${e.key}`,
|
|
245
|
-
style: ne(Ue(e))
|
|
246
|
-
}, null, 4))), 128)),
|
|
247
|
-
F.value ? (v(), f("col", Ce)) : d("", !0)
|
|
248
|
-
]),
|
|
249
|
-
p("thead", {
|
|
250
|
-
class: "nb-data-table__head",
|
|
251
|
-
role: L.value ? "rowgroup" : void 0
|
|
252
|
-
}, [p("tr", { role: L.value ? "row" : void 0 }, [
|
|
253
|
-
P.value ? (v(), f("th", T, [e.selectable === "multiple" ? (v(), u(s, {
|
|
254
|
-
key: 0,
|
|
255
|
-
"model-value": G.value,
|
|
256
|
-
indeterminate: Ke.value,
|
|
257
|
-
"aria-label": "Select all rows",
|
|
258
|
-
"onUpdate:modelValue": Ye
|
|
259
|
-
}, null, 8, ["model-value", "indeterminate"])) : d("", !0)])) : d("", !0),
|
|
260
|
-
(v(!0), f(c, null, y(N.value, (e) => (v(), f("th", {
|
|
261
|
-
key: `th-${e.key}`,
|
|
262
|
-
scope: "col",
|
|
263
|
-
class: _([
|
|
264
|
-
"nb-data-table__th",
|
|
265
|
-
`nb-data-table__th--${e.align || "left"}`,
|
|
266
|
-
{ "nb-data-table__th--sortable": e.sortable },
|
|
267
|
-
{ "nb-data-table__th--sorted": $(e) },
|
|
268
|
-
L.value && e.phoneHidden && "nb-data-table__th--phone-hidden"
|
|
269
|
-
]),
|
|
270
|
-
"aria-sort": e.sortable ? Ze(e) : void 0
|
|
271
|
-
}, [e.sortable ? (v(), f("button", {
|
|
272
|
-
key: 0,
|
|
273
|
-
type: "button",
|
|
274
|
-
class: "nb-data-table__sort",
|
|
275
|
-
onClick: (t) => et(e)
|
|
276
|
-
}, [p("span", O, [b(t.$slots, `header-${e.key}`, { column: e }, () => [m(x(e.header), 1)], !0)]), h(n, {
|
|
277
|
-
name: Qe(e),
|
|
278
|
-
class: "nb-data-table__sort-icon",
|
|
279
|
-
"aria-hidden": "true"
|
|
280
|
-
}, null, 8, ["name"])], 8, D)) : (v(), f("span", k, [b(t.$slots, `header-${e.key}`, { column: e }, () => [m(x(e.header), 1)], !0)]))], 10, E))), 128)),
|
|
281
|
-
F.value ? (v(), f("th", Te, [...r[3] ||= [p("span", { class: "nb-sr-only" }, "Row actions", -1)]])) : d("", !0)
|
|
282
|
-
], 8, w)], 8, we),
|
|
283
|
-
p("tbody", {
|
|
284
|
-
class: "nb-data-table__body",
|
|
285
|
-
role: L.value ? "rowgroup" : void 0
|
|
286
|
-
}, [e.loading ? (v(!0), f(c, { key: 0 }, y(e.skeletonRows, (e) => (v(), f("tr", {
|
|
287
|
-
key: `skeleton-${e}`,
|
|
288
|
-
class: "nb-data-table__row nb-data-table__row--skeleton"
|
|
289
|
-
}, [
|
|
290
|
-
P.value ? (v(), f("td", De, [...r[4] ||= [p("span", { class: "nb-data-table__skeleton nb-data-table__skeleton--box" }, null, -1)]])) : d("", !0),
|
|
291
|
-
(v(!0), f(c, null, y(N.value, (t) => (v(), f("td", {
|
|
292
|
-
key: `sk-${e}-${t.key}`,
|
|
293
|
-
class: "nb-data-table__td"
|
|
294
|
-
}, [...r[5] ||= [p("span", { class: "nb-data-table__skeleton" }, null, -1)]]))), 128)),
|
|
295
|
-
F.value ? (v(), f("td", Oe, [...r[6] ||= [p("span", { class: "nb-data-table__skeleton nb-data-table__skeleton--box" }, null, -1)]])) : d("", !0)
|
|
296
|
-
]))), 128)) : e.error ? (v(), f("tr", ke, [p("td", {
|
|
297
|
-
colspan: I.value,
|
|
298
|
-
class: "nb-data-table__state nb-data-table__state--error"
|
|
299
|
-
}, [b(t.$slots, "error", { error: e.error }, () => [h(o, {
|
|
300
|
-
is: "span",
|
|
301
|
-
align: "center",
|
|
302
|
-
justify: "center",
|
|
303
|
-
gap: "xs",
|
|
304
|
-
class: "nb-data-table__state-inner"
|
|
305
|
-
}, {
|
|
306
|
-
default: S(() => [h(n, {
|
|
307
|
-
name: "warning-circle-fill",
|
|
308
|
-
"aria-hidden": "true"
|
|
309
|
-
}), p("span", null, x(e.error), 1)]),
|
|
310
|
-
_: 1
|
|
311
|
-
})], !0)], 8, Ae)])) : e.rows.length ? (v(!0), f(c, { key: 3 }, y(e.rows, (n, i) => (v(), f("tr", {
|
|
312
|
-
key: B(n),
|
|
313
|
-
class: _([
|
|
314
|
-
"nb-data-table__row",
|
|
315
|
-
{ "nb-data-table__row--selected": U(n) },
|
|
316
|
-
{ "nb-data-table__row--clickable": nt.value }
|
|
317
|
-
]),
|
|
318
|
-
role: L.value ? "row" : void 0,
|
|
319
|
-
"aria-selected": e.selectable === "none" ? void 0 : U(n),
|
|
320
|
-
onClick: (e) => rt(n, i)
|
|
321
|
-
}, [
|
|
322
|
-
P.value ? (v(), f("td", {
|
|
323
|
-
key: 0,
|
|
324
|
-
class: "nb-data-table__td nb-data-table__select-cell",
|
|
325
|
-
onClick: r[0] ||= C(() => {}, ["stop"]),
|
|
326
|
-
onMousedown: J,
|
|
327
|
-
onKeydown: J
|
|
328
|
-
}, [e.selectable === "multiple" ? (v(), u(s, {
|
|
329
|
-
key: 0,
|
|
330
|
-
"model-value": U(n),
|
|
331
|
-
"aria-label": `Select row ${i + 1}`,
|
|
332
|
-
"onUpdate:modelValue": (e) => qe(n, i)
|
|
333
|
-
}, null, 8, [
|
|
334
|
-
"model-value",
|
|
335
|
-
"aria-label",
|
|
336
|
-
"onUpdate:modelValue"
|
|
337
|
-
])) : (v(), f("input", {
|
|
338
|
-
key: 1,
|
|
339
|
-
type: "radio",
|
|
340
|
-
class: "nb-data-table__radio",
|
|
341
|
-
name: Le,
|
|
342
|
-
checked: U(n),
|
|
343
|
-
"aria-label": `Select row ${i + 1}`,
|
|
344
|
-
onChange: (e) => Je(n)
|
|
345
|
-
}, null, 40, Pe))], 32)) : d("", !0),
|
|
346
|
-
(v(!0), f(c, null, y(N.value, (r) => (v(), f("td", {
|
|
347
|
-
key: `td-${B(n)}-${r.key}`,
|
|
348
|
-
class: _([
|
|
349
|
-
"nb-data-table__td",
|
|
350
|
-
`nb-data-table__td--${r.align || "left"}`,
|
|
351
|
-
r.cellClass,
|
|
352
|
-
L.value && Ve(r)
|
|
353
|
-
]),
|
|
354
|
-
role: L.value ? "cell" : void 0,
|
|
355
|
-
"data-label": e.stackOnPhone ? r.header : void 0
|
|
356
|
-
}, [b(t.$slots, `cell-${r.key}`, {
|
|
357
|
-
row: n,
|
|
358
|
-
value: R(r, n),
|
|
359
|
-
column: r,
|
|
360
|
-
rowIndex: i
|
|
361
|
-
}, () => [r.render ? (v(), u(z, {
|
|
362
|
-
key: 0,
|
|
363
|
-
column: r,
|
|
364
|
-
row: n,
|
|
365
|
-
"row-index": i
|
|
366
|
-
}, null, 8, [
|
|
367
|
-
"column",
|
|
368
|
-
"row",
|
|
369
|
-
"row-index"
|
|
370
|
-
])) : (v(), f(c, { key: 1 }, [m(x(We(R(r, n))), 1)], 64))], !0)], 10, Fe))), 128)),
|
|
371
|
-
F.value ? (v(), f("td", {
|
|
372
|
-
key: 1,
|
|
373
|
-
class: "nb-data-table__td nb-data-table__actions-cell",
|
|
374
|
-
onClick: r[1] ||= C(() => {}, ["stop"])
|
|
375
|
-
}, [b(t.$slots, "row-actions", {
|
|
376
|
-
row: n,
|
|
377
|
-
rowIndex: i
|
|
378
|
-
}, void 0, !0)])) : d("", !0)
|
|
379
|
-
], 10, Ne))), 128)) : (v(), f("tr", je, [p("td", {
|
|
380
|
-
colspan: I.value,
|
|
381
|
-
class: "nb-data-table__state nb-data-table__state--empty"
|
|
382
|
-
}, [b(t.$slots, "empty", {}, () => [p("span", null, x(e.emptyMessage || "No data to display"), 1)], !0)], 8, Me)]))], 8, Ee)
|
|
383
|
-
], 8, xe)]),
|
|
384
|
-
t.$slots.footer ? (v(), f("div", Ie, [b(t.$slots, "footer", {}, void 0, !0)])) : d("", !0)
|
|
385
|
-
], 16));
|
|
386
|
-
}
|
|
387
|
-
}), [["__scopeId", "data-v-a4bea523"]]);
|
|
388
|
-
//#endregion
|
|
389
|
-
export { A as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Icon-C8R_r_In.cjs`),t=require(`./composables/useSurfaceLayer.composable.cjs`),n=require(`./composables/usePhoneLayout.composable.cjs`),r=require(`./Label-CZhQEyoi.cjs`),i=require(`./Message-C44ftsaT.cjs`),a=require(`./Grid-DiCxrPaO.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(),E=(0,c.ref)(null);s.useVisualViewportVar(()=>y.value);let Ie=(0,c.ref)({position:`fixed`,top:`0px`,left:`0px`,zIndex:`9999`}),D=(0,c.ref)(`start`),O=(0,c.computed)(()=>p.locale||navigator.language||`pt-PT`),k=(0,c.computed)(()=>new Intl.DateTimeFormat(O.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 A(e){if(!e)return``;let t=new Date(e+`T00:00:00`);return isNaN(t.getTime())?e:t.toLocaleDateString(O.value)}function Le(e){return new Date(e+`T00:00:00`).toLocaleDateString(O.value,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`})}let Re=(0,c.computed)(()=>A(p.modelValue??null)),ze=(0,c.computed)(()=>A(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),F=(0,c.computed)(()=>p.endLabel||p.endPlaceholder);function I(e){return p.min!=null&&e<p.min||p.max!=null&&e>p.max?!0:p.disabledDates?typeof p.disabledDates==`function`?p.disabledDates(e):p.disabledDates.includes(e):!1}function He(e){let t=e.trim();if(!t)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let e=new Date(t+`T00:00:00`);return isNaN(e.getTime())?null:t}let n=new Date(t);return isNaN(n.getTime())?null:$(n)}function Ue(e){let t=e.target.value,n=He(t);n&&I(n)||(n||t===``)&&(m(`update:modelValue`,n),m(`change`,n))}function We(e){let t=e.target.value,n=He(t);n&&I(n)||(n||t===``)&&m(`update:endValue`,n)}function L(e){v.value=e.target===C.value?`end`:`start`,p.type!==`simple`&&!p.readonly&&(D.value=v.value,y.value?B():V())}function R(){v.value=null}function z(e){if(!(p.type===`simple`||p.readonly))switch(e.key){case`Escape`:y.value&&(H(),e.preventDefault());break;case`ArrowDown`:e.preventDefault(),y.value||V(),(0,c.nextTick)(W);break;case`Enter`:y.value||(e.preventDefault(),V(),(0,c.nextTick)(W));break}}function B(){let e=x.value?.querySelectorAll(`.nb-date-picker__input-wrapper`);if(!e?.length)return;let t=(D.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),Ie.value={position:`fixed`,top:`${a}px`,left:`${i}px`,zIndex:`9999`}}function V(){if(p.disabled||p.readonly||p.type===`simple`||y.value)return;y.value=!0;let e=D.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),B(),(0,c.nextTick)(B)}function H(){y.value&&(y.value=!1,(0,c.nextTick)(()=>{D.value===`end`&&C.value?C.value.focus():S.value?.focus()}))}function U(){y.value?H():(D.value=`start`,V(),(0,c.nextTick)(W))}function W(){(0,c.nextTick)(()=>{(w.value?.querySelector(`[data-date="${b.value}"]`))?.focus()})}function Ge(e){I(e)||(p.type===`range`?D.value===`start`?(m(`update:modelValue`,e),m(`change`,e),D.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),H()):(m(`update:modelValue`,e),m(`change`,e),H()))}function Ke(e){let t=new Date(b.value+`T00:00:00`),n=!0;switch(e.key){case`ArrowRight`:G(t,1);break;case`ArrowLeft`:G(t,-1);break;case`ArrowDown`:G(t,7);break;case`ArrowUp`:G(t,-7);break;case`Home`:qe(t,`start`);break;case`End`:qe(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(),Ge(b.value);return;case`Escape`:H();break;case`Tab`:H();return;default:n=!1}n&&e.preventDefault()}function G(e,t){let n=new Date(e);n.setDate(n.getDate()+t),q(n)}function qe(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(),W())}function J(e){let t=e.target,n=x.value?.contains(t)??!1,r=w.value?.contains(t)??!1,i=E.value?.contains(t)??!1;!n&&!r&&!i&&H()}function Y(){y.value&&B()}(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))),W()}let Je=()=>Q(-1),Ye=()=>Q(1),Xe=()=>Q(-12),Ze=()=>Q(12),Qe=(0,c.computed)(()=>{let e=new Date(X.value,Z.value,1).toLocaleDateString(O.value,{month:`long`,year:`numeric`});return e.charAt(0).toUpperCase()+e.slice(1)}),$e=(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(O.value,{weekday:`narrow`}).toUpperCase(),a=r.toLocaleDateString(O.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 et=(0,c.computed)(()=>$(new Date)),tt=(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===et.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:I(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}),nt=(0,c.computed)(()=>{let e=[];for(let t=0;t<tt.value.length;t+=7)e.push(tt.value.slice(t,t+7));return e}),rt=(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}]),it=(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})),at=(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:V,close:H,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)(rt.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`,it.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:Re.value,placeholder:f.placeholder||k.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=>Ue(e),onFocus:L,onBlur:R,onKeydown:z}),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, ${A(f.modelValue)}`:`Choose date`,onClick:U},[(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`,at.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||k.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=>We(e),onFocus:L,onBlur:R,onKeydown:z},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, ${A(f.endValue)}`:`Choose end date`,onClick:U},[(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`,it.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:Re.value,placeholder:f.placeholder||k.value,disabled:f.disabled,readonly:f.readonly,required:f.required,name:f.name,"aria-invalid":f.error?!0:void 0,onInput:n[2]||=e=>Ue(e),onFocus:L,onBlur:R,onKeydown:z}),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, ${A(f.modelValue)}`:`Choose date`,onClick:U},[(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`,at.value])},[F.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)(F.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||k.value,disabled:f.disabled,readonly:f.readonly,required:f.required,"aria-invalid":f.endError?!0:void 0,onInput:n[3]||=e=>We(e),onFocus:L,onBlur:R,onKeydown:z},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, ${A(f.endValue)}`:`Choose end date`,onClick:U},[(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:E,class:`nb-date-picker__scrim`,"aria-hidden":`true`,onClick:H},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:Ie.value,onKeydown:Ke,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:Xe},[(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:Je},[(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)(Qe.value),9,Se),(0,c.createElementVNode)(`button`,{type:`button`,class:`nb-date-picker__cal-nav`,"aria-label":`Next month`,onClick:Ye},[(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:Ze},[(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)($e.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)(nt.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":Le(e.date),"data-date":e.date,onClick:t=>Ge(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 +0,0 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),t=require(`./palette-Cy2_8mLH.cjs`),n=require(`./ChartLegend-DGgW0yjG.cjs`),r=require(`./scales-4WxjhxBm.cjs`),i=require(`./useChartSize-C-BIN0vc.cjs`);let a=require(`vue`);var o=[`width`,`height`,`aria-label`],s={key:0},c=[`x1`,`x2`,`y1`,`y2`],l={class:`nb-chart__axis`},u=[`x`,`y`],d={class:`nb-chart__axis`},f=[`x`,`y`],p=[`x1`,`x2`,`y1`,`y2`],m=[`d`,`fill`],h=[`d`,`stroke`],g=[`cx`,`cy`,`r`,`fill`],_=[`x1`,`x2`,`y1`,`y2`],v=(0,a.defineComponent)({__name:`LineChart`,props:{series:{default:()=>[]},area:{type:Boolean,default:!1},points:{type:Boolean,default:!1},curve:{default:`smooth`},title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>t.n}},setup(e){let v=e,y={top:12,right:16,bottom:28,left:44},b=(0,a.ref)(null),x=i.t(b,{width:480,height:240}),S=(0,a.computed)(()=>v.series.map((e,n)=>({name:e.name,data:e.data,color:e.color??t.i(n,v.colors)}))),C=(0,a.computed)(()=>(v.series[0]?.data??[]).map(e=>e.x)),w=(0,a.computed)(()=>{let e=v.series.flatMap(e=>e.data.map(e=>e.y));return e.length?r.i(Math.min(0,...e),Math.max(...e),.1):[0,1]}),T=(0,a.computed)(()=>r.r(w.value,[Math.max(y.top,x.value.height-y.bottom),y.top])),E=(0,a.computed)(()=>T.value.ticks(5)),D=(0,a.computed)(()=>Math.max(0,x.value.width-y.left-y.right)),O=e=>{let t=C.value.length;return t<=1?y.left+D.value/2:y.left+e/(t-1)*D.value},k=(0,a.computed)(()=>{let e=C.value,t=Math.max(1,Math.ceil(e.length/6)),n=[];for(let r=0;r<e.length;r+=t)n.push({index:r,value:e[r]});return e.length&&n[n.length-1].index!==e.length-1&&n.push({index:e.length-1,value:e[e.length-1]}),n}),A=e=>e.length?M(e.map((e,t)=>[O(t),T.value(e.y)]),v.curve):``,j=e=>{if(!e.length)return``;let t=e.map((e,t)=>[O(t),T.value(e.y)]),n=x.value.height-y.bottom;return`${M(t,v.curve)} L${t[t.length-1][0]},${n} L${t[0][0]},${n} Z`},M=(e,t)=>{if(!e.length)return``;if(e.length===1)return`M${e[0][0]},${e[0][1]}`;if(t===`linear`)return e.map((e,t)=>`${t===0?`M`:`L`}${e[0]},${e[1]}`).join(` `);if(t===`step`){let t=`M${e[0][0]},${e[0][1]}`;for(let n=1;n<e.length;n++){let[r,i]=e[n-1],[a,o]=e[n],s=(r+a)/2;t+=` L${s},${i} L${s},${o} L${a},${o}`}return t}let n=.2,r=`M${e[0][0]},${e[0][1]}`;for(let t=0;t<e.length-1;t++){let i=e[t-1]??e[t],a=e[t],o=e[t+1],s=e[t+2]??o,c=a[0]+(o[0]-i[0])*n,l=a[1]+(o[1]-i[1])*n,u=o[0]-(s[0]-a[0])*n,d=o[1]-(s[1]-a[1])*n;r+=` C${c},${l} ${u},${d} ${o[0]},${o[1]}`}return r},N=e=>Math.abs(e)>=1e3?`${(e/1e3).toFixed(1)}k`:Number.isInteger(e)?String(e):e.toFixed(1),P=(0,a.ref)(null),F=(0,a.ref)({x:0,y:0}),I=e=>{let t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,r=C.value.length;if(!r)return;let i=(n-y.left)/Math.max(1,D.value);P.value=Math.round(Math.min(1,Math.max(0,i))*(r-1)),F.value={x:e.clientX-t.left+12,y:e.clientY-t.top+12}},L=(0,a.computed)(()=>P.value===null?[]:S.value.map(e=>({label:e.name,value:N(e.data[P.value]?.y??0),color:e.color})));return(r,i)=>((0,a.openBlock)(),(0,a.createBlock)(t.u,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":e.showLegend&&S.value.length>0},{legend:(0,a.withCtx)(()=>[(0,a.createVNode)(n.t,{items:S.value.map(e=>({label:e.name,color:e.color}))},null,8,[`items`])]),default:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`div`,{ref_key:`root`,ref:b,class:`nb-line-chart`},[((0,a.openBlock)(),(0,a.createElementBlock)(`svg`,{width:(0,a.unref)(x).width,height:(0,a.unref)(x).height,class:`nb-chart__svg`,role:`img`,"aria-label":e.title||`Line chart`,onMouseleave:i[0]||=e=>P.value=null,onMousemove:I},[e.showGrid&&(0,a.unref)(x).width>0?((0,a.openBlock)(),(0,a.createElementBlock)(`g`,s,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(E.value,e=>((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:`grid-${e}`,class:`nb-chart__gridline`,x1:y.left,x2:(0,a.unref)(x).width-y.right,y1:T.value(e),y2:T.value(e)},null,8,c))),128))])):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`g`,l,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(E.value,e=>((0,a.openBlock)(),(0,a.createElementBlock)(`text`,{key:`yt-${e}`,x:y.left-6,y:T.value(e),"text-anchor":`end`,"dominant-baseline":`middle`},(0,a.toDisplayString)(N(e)),9,u))),128))]),(0,a.createElementVNode)(`g`,d,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(k.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`text`,{key:`xt-${t}`,x:O(e.index),y:(0,a.unref)(x).height-y.bottom+14,"text-anchor":`middle`},(0,a.toDisplayString)(e.value),9,f))),128))]),(0,a.createElementVNode)(`line`,{class:`nb-chart__axis-line`,x1:y.left,x2:(0,a.unref)(x).width-y.right,y1:(0,a.unref)(x).height-y.bottom,y2:(0,a.unref)(x).height-y.bottom},null,8,p),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(S.value,(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`g`,{key:`s-${n}`},[e.area?((0,a.openBlock)(),(0,a.createElementBlock)(`path`,{key:0,class:`nb-chart__area`,d:j(t.data),fill:t.color,opacity:`0.18`},null,8,m)):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`path`,{class:`nb-chart__line`,d:A(t.data),stroke:t.color,fill:`none`,"stroke-width":`2`,"stroke-linejoin":`round`,"stroke-linecap":`round`},null,8,h),e.points?((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,{key:1},(0,a.renderList)(t.data,(e,r)=>((0,a.openBlock)(),(0,a.createElementBlock)(`circle`,{key:`p-${n}-${r}`,cx:O(r),cy:T.value(e.y),r:P.value===r?4:3,fill:t.color,class:`nb-chart__point`},null,8,g))),128)):(0,a.createCommentVNode)(``,!0)]))),128)),P.value===null?(0,a.createCommentVNode)(``,!0):((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:1,class:`nb-chart__hover-line`,x1:O(P.value),x2:O(P.value),y1:y.top,y2:(0,a.unref)(x).height-y.bottom},null,8,_))],40,o)),(0,a.createVNode)(t.l,{visible:e.showTooltip&&P.value!==null,x:F.value.x,y:F.value.y,title:P.value===null?``:String(C.value[P.value]),rows:L.value},null,8,[`visible`,`x`,`y`,`title`,`rows`])],512)]),_:1},8,[`title`,`subtitle`,`height`,`show-legend`]))}}),y=e.t(v,[[`__scopeId`,`data-v-728da300`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return y}});
|
package/dist/Select-ClkEzw5T.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Icon-C8R_r_In.cjs`),t=require(`./Label-CZhQEyoi.cjs`),n=require(`./Message-C44ftsaT.cjs`),r=require(`./Grid-DiCxrPaO.cjs`),i=require(`./composables/useMenuSurface.composable.cjs`);let a=require(`vue`),o=require(`@nubisco/ui/icons/caret-down`),s=require(`@nubisco/ui/icons/caret-up`);var c=[`id`,`aria-expanded`,`aria-disabled`,`aria-required`,`disabled`],l=[`id`,`aria-expanded`,`aria-disabled`,`aria-required`,`disabled`],u={key:1,class:`nb-select__inner-label`},d={key:0,class:`nb-select__asterisk`,"aria-hidden":`true`},f=[`aria-multiselectable`],p=[`aria-labelledby`],m=[`id`],h=[`aria-selected`,`aria-disabled`,`onMouseenter`,`onClick`],g={key:0,class:`nb-select__option-check`,"aria-hidden":`true`},_={key:0,viewBox:`0 0 10 8`,fill:`none`,width:`10`,height:`8`},v={class:`nb-select__option-label`},y={key:0,class:`nb-select__empty`},b=[`placeholder`,`onKeydown`],x=(0,a.defineComponent)({__name:`Select`,props:{modelValue:{default:null},options:{default:()=>[]},multiple:{type:Boolean,default:!1},creatable:{type:Boolean,default:!1},createPlaceholder:{default:``},placeholder:{default:`Select…`},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`,`change`,`create`],setup(x,{expose:S,emit:C}){let w=x,T=C,E=(0,a.ref)(``);function D(){let e=E.value.trim();e&&(T(`create`,e),E.value=``)}let O=(0,a.ref)(!1),k=(0,a.ref)(!1),A=(0,a.ref)(-1),j=(0,a.ref)(null),M=(0,a.ref)(null),N=(0,a.ref)(null);i.useMenuSurface(N);let P=(0,a.ref)({position:`fixed`,top:`0px`,left:`0px`,width:`0px`,zIndex:`9999`}),F=`nb-select-${(0,a.useId)()}`,I=(0,a.computed)(()=>w.id??F),L=(0,a.computed)(()=>w.modelValue==null?[]:Array.isArray(w.modelValue)?w.modelValue:[w.modelValue]),R=(0,a.computed)(()=>{if(!(w.multiple||L.value.length!==1))return(w.options??[]).find(e=>e.value===L.value[0])?.icon}),z=(0,a.computed)(()=>{if(L.value.length===0)return``;let e=w.options??[];return w.multiple?L.value.length===1?e.find(e=>e.value===L.value[0])?.label??String(L.value[0]):L.value.length===2?L.value.map(t=>e.find(e=>e.value===t)?.label??String(t)).join(`, `):`${L.value.length} selected`:e.find(e=>e.value===L.value[0])?.label??String(L.value[0])});function B(e){return L.value.includes(e)}let V=(0,a.computed)(()=>{let e=[];return(w.options??[]).forEach((t,n)=>{let r=e[e.length-1];(!r||r.name!==t.group)&&e.push({key:`${e.length}:${t.group??``}`,name:t.group,labelId:`${I.value}-group-${e.length}`,entries:[]}),e[e.length-1].entries.push({option:t,index:n})}),e});function H(e,t){let n=w.options??[];for(let r=e+t;r>=0&&r<n.length;r+=t)if(!n[r].disabled)return r;return e}function U(e){if(e.disabled)return;let t;if(w.multiple){let n=[...L.value],r=n.indexOf(e.value);r>=0?n.splice(r,1):n.push(e.value),t=n}else t=e.value,K();T(`update:modelValue`,t),T(`change`,t)}function W(){if(!M.value)return;let e=M.value.getBoundingClientRect(),t=N.value?.offsetHeight??0,n=window.innerHeight-e.bottom,r=e.top;P.value={position:`fixed`,top:t>0&&n<t&&r>n?`${e.top-t}px`:`${e.bottom}px`,left:`${e.left}px`,width:`${e.width}px`,zIndex:`9999`}}function G(){if(w.disabled)return;O.value=!0,W();let e=w.options??[];A.value=L.value.length>0?Math.max(0,e.findIndex(e=>e.value===L.value[0])):-1,(0,a.nextTick)(()=>{W(),Z()})}function K(){O.value=!1,A.value=-1}function q(){O.value?K():G()}function J(e){let t=e.target,n=j.value?.contains(t)??!1,r=N.value?.contains(t)??!1;!n&&!r&&K()}function Y(){O.value&&W()}(0,a.watch)(O,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,a.onBeforeUnmount)(()=>{document.removeEventListener(`mousedown`,J),window.removeEventListener(`scroll`,Y,!0),window.removeEventListener(`resize`,Y)});function X(e){let t=w.options??[];if(!O.value){(e.key===`Enter`||e.key===` `||e.key===`ArrowDown`)&&(e.preventDefault(),G());return}e.key===`Escape`?(K(),e.preventDefault()):e.key===`Tab`?K():e.key===`ArrowDown`?(e.preventDefault(),A.value=H(A.value,1),Z()):e.key===`ArrowUp`?(e.preventDefault(),A.value>0&&(A.value=H(A.value,-1)),Z()):(e.key===`Enter`||e.key===` `)&&A.value>=0&&(e.preventDefault(),U(t[A.value]))}function Z(){(0,a.nextTick)(()=>{!N.value||A.value<0||N.value.querySelectorAll(`.nb-select__option`)[A.value]?.scrollIntoView({block:`nearest`})})}let Q=(0,a.computed)(()=>[`nb-select`,`nb-select--${w.variant}`,`nb-select--${w.size}`,{"nb-select--open":O.value,"nb-select--focused":k.value&&!O.value,"nb-select--error":!!w.error,"nb-select--warning":!w.error&&!!w.warning,"nb-select--multiple":w.multiple}]);return S({open:G,close:K}),(i,S)=>((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,null,[(0,a.createElementVNode)(`div`,{ref_key:`rootRef`,ref:j,class:(0,a.normalizeClass)(Q.value),onKeydown:X},[x.variant===`default`?((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:0},[i.$slots.label?(0,a.renderSlot)(i.$slots,`label`,{key:0}):x.label?((0,a.openBlock)(),(0,a.createBlock)(t.t,{key:1,for:I.value,required:x.required,disabled:x.disabled},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(x.label),1)]),_:1},8,[`for`,`required`,`disabled`])):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`button`,{id:I.value,ref_key:`triggerRef`,ref:M,type:`button`,class:`nb-select__trigger`,role:`combobox`,"aria-expanded":O.value,"aria-haspopup":`listbox`,"aria-disabled":x.disabled||void 0,"aria-required":x.required||void 0,disabled:x.disabled||void 0,onClick:q,onFocus:S[0]||=e=>k.value=!0,onBlur:S[1]||=e=>k.value=!1},[(0,a.createElementVNode)(`span`,{class:(0,a.normalizeClass)([`nb-select__value`,{"nb-select__value--placeholder":!z.value,"nb-select__value--with-icon":!!R.value}])},[R.value?((0,a.openBlock)(),(0,a.createBlock)(e.t,{key:0,class:`nb-select__value-icon`,name:R.value,size:16},null,8,[`name`])):(0,a.createCommentVNode)(``,!0),z.value?(0,a.renderSlot)(i.$slots,`value`,{key:1,values:L.value},()=>[(0,a.createTextVNode)((0,a.toDisplayString)(z.value),1)]):((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:2},[(0,a.createTextVNode)((0,a.toDisplayString)(x.placeholder),1)],64))],2),x.error?((0,a.openBlock)(),(0,a.createBlock)(n.t,{key:0,variant:`error`,"icon-only":!0,class:`nb-select__status-icon`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(x.error),1)]),_:1})):x.warning?((0,a.openBlock)(),(0,a.createBlock)(n.t,{key:1,variant:`warning`,"icon-only":!0,class:`nb-select__status-icon`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(x.warning),1)]),_:1})):(0,a.createCommentVNode)(``,!0),(0,a.createVNode)(r.t,{align:`center`,justify:`center`,class:`nb-select__caret`},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(e.t,{name:O.value?(0,a.unref)(s.regular):(0,a.unref)(o.regular),size:16},null,8,[`name`])]),_:1})],40,c),x.error?((0,a.openBlock)(),(0,a.createBlock)(n.t,{key:2,variant:`error`,class:`nb-select__message`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(x.error),1)]),_:1})):x.warning?((0,a.openBlock)(),(0,a.createBlock)(n.t,{key:3,variant:`warning`,class:`nb-select__message`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(x.warning),1)]),_:1})):x.helper?((0,a.openBlock)(),(0,a.createBlock)(n.t,{key:4,variant:`helper`,class:`nb-select__message`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(x.helper),1)]),_:1})):(0,a.createCommentVNode)(``,!0)],64)):x.variant===`fluid`?((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:1},[(0,a.createElementVNode)(`button`,{id:I.value,ref_key:`triggerRef`,ref:M,type:`button`,class:`nb-select__trigger`,role:`combobox`,"aria-expanded":O.value,"aria-haspopup":`listbox`,"aria-disabled":x.disabled||void 0,"aria-required":x.required||void 0,disabled:x.disabled||void 0,onClick:q,onFocus:S[2]||=e=>k.value=!0,onBlur:S[3]||=e=>k.value=!1},[x.label||i.$slots.label?((0,a.openBlock)(),(0,a.createBlock)(r.t,{key:0,dir:`row`,align:`center`,gap:`xs`,class:`nb-select__inner-header`},{default:(0,a.withCtx)(()=>[i.$slots.label?(0,a.renderSlot)(i.$slots,`label`,{key:0}):((0,a.openBlock)(),(0,a.createElementBlock)(`label`,u,[(0,a.createTextVNode)((0,a.toDisplayString)(x.label)+` `,1),x.required?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,d,`*`)):(0,a.createCommentVNode)(``,!0)])),x.helper&&!x.error&&!x.warning?((0,a.openBlock)(),(0,a.createBlock)(n.t,{key:2,variant:`helper`,"icon-only":!0,class:`nb-select__inner-message`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(x.helper),1)]),_:1})):(0,a.createCommentVNode)(``,!0)]),_:3})):(0,a.createCommentVNode)(``,!0),(0,a.createVNode)(r.t,{dir:`row`,align:`end`,flex:``,class:`nb-select__value-row`},{default:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`span`,{class:(0,a.normalizeClass)([`nb-select__value`,{"nb-select__value--placeholder":!z.value,"nb-select__value--with-icon":!!R.value}])},[R.value?((0,a.openBlock)(),(0,a.createBlock)(e.t,{key:0,class:`nb-select__value-icon`,name:R.value,size:16},null,8,[`name`])):(0,a.createCommentVNode)(``,!0),z.value?(0,a.renderSlot)(i.$slots,`value`,{key:1,values:L.value},()=>[(0,a.createTextVNode)((0,a.toDisplayString)(z.value),1)]):((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:2},[(0,a.createTextVNode)((0,a.toDisplayString)(x.placeholder),1)],64))],2),(0,a.createVNode)(r.t,{align:`center`,justify:`center`,class:`nb-select__caret`},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(e.t,{name:O.value?(0,a.unref)(s.regular):(0,a.unref)(o.regular),size:16},null,8,[`name`])]),_:1})]),_:3})],40,l),x.error?((0,a.openBlock)(),(0,a.createBlock)(n.t,{key:0,variant:`error`,class:`nb-select__fluid-message`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(x.error),1)]),_:1})):x.warning?((0,a.openBlock)(),(0,a.createBlock)(n.t,{key:1,variant:`warning`,class:`nb-select__fluid-message`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(x.warning),1)]),_:1})):(0,a.createCommentVNode)(``,!0)],64)):(0,a.createCommentVNode)(``,!0)],34),((0,a.openBlock)(),(0,a.createBlock)(a.Teleport,{to:`body`},[O.value?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:0,ref_key:`dropdownRef`,ref:N,class:`nb-select__dropdown`,style:(0,a.normalizeStyle)(P.value),role:`listbox`,"aria-multiselectable":x.multiple||void 0},[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(V.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:t.key,class:`nb-select__group`,role:`group`,"aria-labelledby":t.name?t.labelId:void 0},[t.name?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:0,id:t.labelId,class:`nb-select__group-label`},(0,a.toDisplayString)(t.name),9,m)):(0,a.createCommentVNode)(``,!0),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(t.entries,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:t.option.value,class:(0,a.normalizeClass)([`nb-select__option`,{"nb-select__option--selected":B(t.option.value),"nb-select__option--highlighted":A.value===t.index,"nb-select__option--disabled":t.option.disabled}]),role:`option`,"aria-selected":B(t.option.value),"aria-disabled":t.option.disabled||void 0,onMouseenter:e=>A.value=t.index,onClick:e=>U(t.option)},[x.multiple?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,g,[B(t.option.value)?((0,a.openBlock)(),(0,a.createElementBlock)(`svg`,_,[...S[7]||=[(0,a.createElementVNode)(`path`,{d:`M1 4l3 3 5-6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,-1)]])):(0,a.createCommentVNode)(``,!0)])):(0,a.createCommentVNode)(``,!0),t.option.icon?((0,a.openBlock)(),(0,a.createBlock)(e.t,{key:1,class:`nb-select__option-icon`,name:t.option.icon,size:16},null,8,[`name`])):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`span`,v,[(0,a.renderSlot)(i.$slots,`option`,{option:t.option},()=>[(0,a.createTextVNode)((0,a.toDisplayString)(t.option.label),1)])])],42,h))),128))],8,p))),128)),!x.options||x.options.length===0?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,y,` No options `)):(0,a.createCommentVNode)(``,!0),x.creatable?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:1,class:`nb-select__create`,onMousedown:S[6]||=(0,a.withModifiers)(()=>{},[`prevent`])},[(0,a.withDirectives)((0,a.createElementVNode)(`input`,{"onUpdate:modelValue":S[4]||=e=>E.value=e,type:`text`,class:`nb-select__create-input`,placeholder:x.createPlaceholder||`Add new…`,onKeydown:[(0,a.withKeys)((0,a.withModifiers)(D,[`prevent`]),[`enter`]),S[5]||=(0,a.withModifiers)(()=>{},[`stop`])]},null,40,b),[[a.vModelText,E.value]])],32)):(0,a.createCommentVNode)(``,!0)],12,f)):(0,a.createCommentVNode)(``,!0)]))],64))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return x}});
|