@nubisco/ui 5.48.1 → 5.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccordionItem--XeLRz2P.js +119 -0
- package/dist/AccordionItem-BYSH6dZK.cjs +1 -0
- package/dist/ActionGroup-CZWoWOYj.cjs +1 -0
- package/dist/ActionGroup-DEeOrkKF.js +137 -0
- package/dist/{AiLabel-DywBjSzr.js → AiLabel-CSSIkvKP.js} +20 -20
- package/dist/{AiLabel-pRN10dQV.cjs → AiLabel-DSKUOcZs.cjs} +1 -1
- package/dist/{AiProvider-DY1xxZff.cjs → AiProvider-BLGmpN6e.cjs} +1 -1
- package/dist/{AiProvider-D8O_YaaP.js → AiProvider-BY5kxf6u.js} +6 -6
- package/dist/{AiUsage-HcYF6RQ2.js → AiUsage-BOrAXk2-.js} +2 -2
- package/dist/{AiUsage-DRj51zK5.cjs → AiUsage-fQqE0B6N.cjs} +1 -1
- package/dist/BackToTop-DgFlV4p4.cjs +1 -0
- package/dist/BackToTop-DrgXqZgF.js +51 -0
- package/dist/Banner-CazPCK0F.js +89 -0
- package/dist/Banner-CyU3PPnt.cjs +1 -0
- package/dist/{BarChart-IX4imFVT.cjs → BarChart-3YO4YfUt.cjs} +1 -1
- package/dist/{BarChart-tB6MOMoR.js → BarChart-CDvhhPk0.js} +4 -4
- package/dist/BatchActions-CLCwxCoa.js +86 -0
- package/dist/BatchActions-DfAPQSU6.cjs +1 -0
- package/dist/{Blueprint-46DWDZmu.js → Blueprint-CGGNppmS.js} +2 -2
- package/dist/{Blueprint-NyUNNf-G.cjs → Blueprint-DBIXzLYg.cjs} +1 -1
- package/dist/{BlueprintCard-DDNP1vkk.js → BlueprintCard-CqlU0QFY.js} +114 -116
- package/dist/BlueprintCard-DGUNttWj.cjs +1 -0
- package/dist/{BlueprintControls-D0MdXrVv.js → BlueprintControls-1l0QVtB7.js} +49 -75
- package/dist/BlueprintControls-C3ffD6W8.cjs +1 -0
- package/dist/{Board-CaFH4-Qw.js → Board-DEBP52eI.js} +178 -190
- package/dist/Board-DIbzPDsD.cjs +1 -0
- package/dist/BottomPanel-1EkHEQ_H.js +81 -0
- package/dist/BottomPanel-n2jWpFH7.cjs +1 -0
- package/dist/Breadcrumbs-CCPzuiiv.cjs +1 -0
- package/dist/Breadcrumbs-CQsziZK3.js +185 -0
- package/dist/{Briefing-CoDyU3k4.js → Briefing-0A1frO4v.js} +3 -3
- package/dist/{Briefing-B_ofl8Rt.cjs → Briefing-AqSz-ZdZ.cjs} +1 -1
- package/dist/{BriefingDestination-DAu5S2HI.cjs → BriefingDestination-CqyKzyXx.cjs} +1 -1
- package/dist/{BriefingDestination-CK4XdAOo.js → BriefingDestination-v3kNa6o_.js} +4 -4
- package/dist/Button-BHFtgOXA.cjs +1 -0
- package/dist/Button-tpOmP8iV.js +699 -0
- package/dist/ButtonSet-BV76HHgD.js +67 -0
- package/dist/ButtonSet-Bj9mIOW2.cjs +1 -0
- package/dist/Calendar-Bf0Nk0rA.js +153 -0
- package/dist/Calendar-D9J17bTp.cjs +1 -0
- package/dist/Card-C6KAn4tN.cjs +1 -0
- package/dist/Card-qNem4s60.js +162 -0
- package/dist/{Checkbox-DXQpih7I.js → Checkbox-BgXXVsCC.js} +1 -1
- package/dist/{Checkbox-7JJdh4sN.cjs → Checkbox-DPPln6oG.cjs} +1 -1
- package/dist/{CheckboxGroup-B8T3zLQC.cjs → CheckboxGroup-B2a3ezEK.cjs} +1 -1
- package/dist/{CheckboxGroup-BHn1hpzh.js → CheckboxGroup-Ck1ylAX9.js} +3 -3
- package/dist/ChipGroup-CVDk4ElV.js +74 -0
- package/dist/ChipGroup-DojKPHhq.cjs +1 -0
- package/dist/CloseButton-9TTFHFmx.cjs +1 -0
- package/dist/CloseButton-CdH12Hdn.js +48 -0
- package/dist/{ColorStrip-BW1nFTja.js → ColorStrip-CuF9ZGoO.js} +2 -2
- package/dist/{ColorStrip-AEg8dQbl.cjs → ColorStrip-bpguV5b2.cjs} +1 -1
- package/dist/CommandPalette-CCEzVWfb.cjs +1 -0
- package/dist/{CommandPalette-CD75Qytr.js → CommandPalette-D1DuzaA1.js} +100 -85
- package/dist/Confirm-CZNS6FNr.js +331 -0
- package/dist/Confirm-DbrEaYlJ.cjs +1 -0
- package/dist/{ContainedListItem-CSE8d5M6.js → ContainedListItem-8z2bmoRG.js} +20 -18
- package/dist/ContainedListItem-BKvHedZO.cjs +1 -0
- package/dist/ContentSwitcher-B-PUG0FE.js +99 -0
- package/dist/ContentSwitcher-CYSF2B-a.cjs +1 -0
- package/dist/CopyButton-CQ9tcyfs.js +60 -0
- package/dist/CopyButton-DRvJ4rf5.cjs +1 -0
- package/dist/DataTable-DDqMaOqP.js +545 -0
- package/dist/DataTable-DQUX-6li.cjs +1 -0
- package/dist/DatePicker-Du21bjhe.cjs +1 -0
- package/dist/DatePicker-fS84mRE6.js +761 -0
- package/dist/FileUploader-UzgK5RKz.cjs +1 -0
- package/dist/FileUploader-dzVu4iSo.js +195 -0
- package/dist/FloatingToolbar-BTmWtGU7.js +116 -0
- package/dist/FloatingToolbar-DDCJuaq0.cjs +1 -0
- package/dist/{Form-D6rgkJ_Y.cjs → Form-D2KHlP7N.cjs} +1 -1
- package/dist/{Form-1UVOFWaf.js → Form-igwYeEVI.js} +1 -1
- package/dist/{GanttChart-B_LqsmcR.cjs → GanttChart-ClFarMf-.cjs} +1 -1
- package/dist/{GanttChart-cZguVXW8.js → GanttChart-N05mLdsn.js} +3 -3
- package/dist/{ImageCropper-CJ2mCj9z.cjs → ImageCropper-CoYR_Hhy.cjs} +1 -1
- package/dist/{ImageCropper-BFKMYthJ.js → ImageCropper-wQknqxNK.js} +2 -2
- package/dist/ImagePicker-Dhj01jq7.cjs +1 -0
- package/dist/ImagePicker-zkoay3zZ.js +171 -0
- package/dist/InfoHint-BEzkNQTM.cjs +1 -0
- package/dist/InfoHint-BlHxrTw6.js +178 -0
- package/dist/InlineEdit-DBMKJ3xP.cjs +1 -0
- package/dist/InlineEdit-Y8i0ibjH.js +117 -0
- package/dist/{InlineLoading-D8T0WO05.js → InlineLoading-CDJ_ZJ6v.js} +1 -1
- package/dist/{InlineLoading-CB_1PwMx.cjs → InlineLoading-DKCzcjZJ.cjs} +1 -1
- package/dist/InputGroup-BYThVO5L.js +86 -0
- package/dist/InputGroup-BYoHNpY0.cjs +1 -0
- package/dist/InputGroup.context-BHj-IvcT.cjs +1 -0
- package/dist/InputGroup.context-Dd4e6fGT.js +28 -0
- package/dist/{InterpolationChart-CttBiNWU.js → InterpolationChart-BX8-UOeZ.js} +3 -3
- package/dist/{InterpolationChart-CYWJFUcs.cjs → InterpolationChart-DaqKUIWi.cjs} +1 -1
- package/dist/{LineChart-DNDSJQrB.cjs → LineChart-CGXpi9l8.cjs} +1 -1
- package/dist/{LineChart-J8gCM2Ba.js → LineChart-CplGrv8-.js} +4 -4
- package/dist/Menu-7EgnchVu.js +189 -0
- package/dist/Menu-Bs2Co1sl.cjs +1 -0
- package/dist/{MenuBarItem-BLdVIz0j.js → MenuBarItem-CQsy3y2I.js} +1 -1
- package/dist/{MenuBarItem-B8H9KfFo.cjs → MenuBarItem-Dd9hNBra.cjs} +1 -1
- package/dist/MenuItem-DFfE_k0L.cjs +1 -0
- package/dist/{MenuItem-BerQIsRQ.js → MenuItem-DMYDHaa0.js} +44 -28
- package/dist/Modal-BSGKOUi_.js +223 -0
- package/dist/Modal-D0hGHXic.cjs +1 -0
- package/dist/NotificationCenter-_CK8Eejg.js +587 -0
- package/dist/NotificationCenter-xg0ZCegj.cjs +1 -0
- package/dist/NumberInput-B-TvTlXI.js +383 -0
- package/dist/NumberInput-DaZI9hc3.cjs +1 -0
- package/dist/OverflowMenu-DFOJSaS7.cjs +1 -0
- package/dist/OverflowMenu-OCAeE3W0.js +126 -0
- package/dist/{PageHeader-CFMhwRcw.js → PageHeader-1wou3Him.js} +2 -2
- package/dist/{PageHeader-BVcTzPcW.cjs → PageHeader-BfUlrscM.cjs} +1 -1
- package/dist/{Pagination-zTp1lrSP.js → Pagination-CUat0BVv.js} +26 -26
- package/dist/{Pagination-VmE04nzc.cjs → Pagination-DypRMTsC.cjs} +1 -1
- package/dist/{Panel-7qPoq2lb.cjs → Panel-NC6_ZogV.cjs} +1 -1
- package/dist/{Panel-D5OHjaTP.js → Panel-zyzu638n.js} +1 -1
- package/dist/{PieChart-Ct8oicOS.cjs → PieChart-DQhs44eH.cjs} +1 -1
- package/dist/{PieChart-CAB3b8LE.js → PieChart-D_02nX0-.js} +3 -3
- package/dist/{PrimaryActionScope-B7VLsHzT.cjs → PrimaryActionScope-Dp2gvqwk.cjs} +1 -1
- package/dist/{PrimaryActionScope-CRdjZE0V.js → PrimaryActionScope-sogYOZXZ.js} +1 -1
- package/dist/{ProgressBar-DK-j6Bzv.js → ProgressBar-Bp-pe6sU.js} +2 -2
- package/dist/{ProgressBar-CfJJf7Sc.cjs → ProgressBar-z912Ppfm.cjs} +1 -1
- package/dist/{Radio-CWWt_o_F.js → Radio-DcMkavI8.js} +2 -2
- package/dist/{Radio-D0YjKuB2.cjs → Radio-DuvSK9tl.cjs} +1 -1
- package/dist/Search-BnGuTcHp.js +130 -0
- package/dist/Search-CfH1Q9GB.cjs +1 -0
- package/dist/Select-BxPZtw_Q.js +604 -0
- package/dist/Select-uwMyqZ2S.cjs +1 -0
- package/dist/Shell-B2y5hn9K.cjs +1 -0
- package/dist/Shell-Bh6s0T89.js +536 -0
- package/dist/ShellPanel-BDE6Y773.cjs +1 -0
- package/dist/ShellPanel-CB71IKMY.js +89 -0
- package/dist/{SidebarCollapseToggle-C6aLQTYv.cjs → SidebarCollapseToggle-CqVURaqs.cjs} +1 -1
- package/dist/{SidebarCollapseToggle-D5yQ-8Vu.js → SidebarCollapseToggle-Dm4QMGpc.js} +2 -2
- package/dist/{SidebarHeaderToggle-Bdh1Z9aF.cjs → SidebarHeaderToggle-KW1yBlpF.cjs} +1 -1
- package/dist/{SidebarHeaderToggle-C-QIOLnU.js → SidebarHeaderToggle-daU1HfJH.js} +3 -3
- package/dist/Skeleton-CMuZJ1dR.cjs +1 -0
- package/dist/{Skeleton-C1e02dcW.js → Skeleton-Hmb5a2G_.js} +48 -31
- package/dist/{Slider-BAXKJCNG.js → Slider-BP-oEeJs.js} +4 -4
- package/dist/{Slider-BaM5cclm.cjs → Slider-D3YgGPcY.cjs} +1 -1
- package/dist/{Spinner-PT95bjWq.cjs → Spinner-BTN06wsE.cjs} +1 -1
- package/dist/{Spinner-CbBPddUx.js → Spinner-C3MeCm2k.js} +1 -1
- package/dist/{Stat-C9XaqyaG.cjs → Stat-BoQUn69z.cjs} +1 -1
- package/dist/{Stat-DJJln4rH.js → Stat-Bz0NCLTm.js} +2 -2
- package/dist/{Stepper-DV0q0Dfv.cjs → Stepper-BLyPFPge.cjs} +1 -1
- package/dist/{Stepper-B4xqkWXg.js → Stepper-BXPgrQE8.js} +1 -1
- package/dist/{StepperStep-iGyGKnQL.cjs → StepperStep-DGeyZQXY.cjs} +1 -1
- package/dist/{StepperStep-BYhlgeb1.js → StepperStep-DLr_ctr4.js} +1 -1
- package/dist/SuggestionList-DjtF5POh.cjs +1 -0
- package/dist/SuggestionList-SYGj7Sjv.js +225 -0
- package/dist/{Switch-D3j7PPhY.cjs → Switch-CQj6AsQh.cjs} +1 -1
- package/dist/{Switch-CbYMiEbQ.js → Switch-CqLfdT_m.js} +2 -2
- package/dist/{TableOfContents-CM0HKSde.js → TableOfContents-BIzH0Twf.js} +24 -34
- package/dist/{TableOfContents-By2Non4K.cjs → TableOfContents-Ct-Kwm8X.cjs} +1 -1
- package/dist/{Tabs--lz44FBk.js → Tabs-B_bsdxWy.js} +1 -1
- package/dist/{Tabs-DKikiz0_.cjs → Tabs-CTMUPND5.cjs} +1 -1
- package/dist/TextInput-BVTKUEey.cjs +2 -0
- package/dist/TextInput-DqaVhKud.js +438 -0
- package/dist/Toast-BaMGYx8-.js +118 -0
- package/dist/Toast-BvZywdtO.cjs +1 -0
- package/dist/{Toaster-CJMQM8JU.cjs → Toaster-CYSWYmUm.cjs} +1 -1
- package/dist/{Toaster-DxBW9XQ0.js → Toaster-DtUkjQM_.js} +1 -1
- package/dist/Toolbar-BmJeXz4C.cjs +1 -0
- package/dist/Toolbar-tOeTdj8a.js +48 -0
- package/dist/Toolbar.context-Bli1SqM3.js +4 -0
- package/dist/Toolbar.context-D3Uj5o0_.cjs +1 -0
- package/dist/{Tree-DP2NPXOL.cjs → Tree-CeXSIcpy.cjs} +1 -1
- package/dist/{Tree-CkcFwDr7.js → Tree-RRVk_0QJ.js} +1 -1
- package/dist/{TreeNode-DCnlEEpj.js → TreeNode-D9fc2RE_.js} +1 -1
- package/dist/{TreeNode-CtklZefA.cjs → TreeNode-z6APXuvr.cjs} +1 -1
- package/dist/UserMenu-BGIIKwi6.cjs +1 -0
- package/dist/{UserMenu-CWRMaPGO.js → UserMenu-GGR8K7gP.js} +109 -102
- package/dist/Video-BxNkDWqi.cjs +1 -0
- package/dist/Video-DD01piHm.js +106 -0
- package/dist/Walkthrough-C_5h67cq.cjs +1 -0
- package/dist/Walkthrough-DpxYuLMU.js +333 -0
- package/dist/all.cjs +1 -1
- package/dist/all.mjs +272 -254
- package/dist/component-styles.json +88 -2
- package/dist/components/AccordionItem.cjs +1 -1
- package/dist/components/AccordionItem.mjs +1 -1
- package/dist/components/AccordionItem.vue.d.ts.map +1 -1
- package/dist/components/ActionGroup.cjs +1 -1
- package/dist/components/ActionGroup.d.ts +41 -9
- package/dist/components/ActionGroup.mjs +1 -1
- package/dist/components/ActionGroup.vue.d.ts +2 -2
- package/dist/components/ActionGroup.vue.d.ts.map +1 -1
- package/dist/components/AiLabel.cjs +1 -1
- package/dist/components/AiLabel.mjs +1 -1
- package/dist/components/AiProvider.cjs +1 -1
- package/dist/components/AiProvider.mjs +1 -1
- package/dist/components/AiUsage.cjs +1 -1
- package/dist/components/AiUsage.mjs +1 -1
- package/dist/components/BackToTop.cjs +1 -1
- package/dist/components/BackToTop.mjs +1 -1
- package/dist/components/BackToTop.vue.d.ts.map +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/Banner.vue.d.ts.map +1 -1
- package/dist/components/BatchActions.cjs +1 -0
- package/dist/components/BatchActions.d.ts +43 -0
- package/dist/components/BatchActions.mjs +2 -0
- package/dist/components/BatchActions.vue.d.ts +30 -0
- package/dist/components/BatchActions.vue.d.ts.map +1 -0
- package/dist/components/Blueprint.cjs +1 -1
- package/dist/components/Blueprint.mjs +1 -1
- package/dist/components/Blueprint.vue.d.ts +2 -2
- package/dist/components/BlueprintBackground.cjs +1 -1
- package/dist/components/BlueprintBackground.mjs +1 -1
- package/dist/components/BlueprintCard.cjs +1 -1
- package/dist/components/BlueprintCard.mjs +1 -1
- package/dist/components/BlueprintCard.vue.d.ts.map +1 -1
- package/dist/components/BlueprintControls.cjs +1 -1
- package/dist/components/BlueprintControls.mjs +1 -1
- package/dist/components/BlueprintControls.vue.d.ts.map +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/Board.vue.d.ts +2 -2
- package/dist/components/Board.vue.d.ts.map +1 -1
- package/dist/components/BottomPanel.cjs +1 -1
- package/dist/components/BottomPanel.mjs +1 -1
- package/dist/components/BottomPanel.vue.d.ts +2 -2
- package/dist/components/BottomPanel.vue.d.ts.map +1 -1
- package/dist/components/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs.mjs +1 -1
- package/dist/components/Breadcrumbs.vue.d.ts.map +1 -1
- package/dist/components/Briefing.cjs +1 -1
- package/dist/components/Briefing.mjs +1 -1
- package/dist/components/BriefingDestination.cjs +1 -1
- package/dist/components/BriefingDestination.mjs +1 -1
- package/dist/components/Button.cjs +1 -1
- package/dist/components/Button.d.ts +38 -1
- package/dist/components/Button.mjs +1 -1
- package/dist/components/Button.vue.d.ts +4 -0
- package/dist/components/Button.vue.d.ts.map +1 -1
- package/dist/components/ButtonSet.cjs +1 -0
- package/dist/components/ButtonSet.d.ts +43 -0
- package/dist/components/ButtonSet.mjs +2 -0
- package/dist/components/ButtonSet.vue.d.ts +11 -0
- package/dist/components/ButtonSet.vue.d.ts.map +1 -0
- package/dist/components/Calendar.cjs +1 -1
- package/dist/components/Calendar.mjs +1 -1
- package/dist/components/Calendar.vue.d.ts +2 -2
- package/dist/components/Calendar.vue.d.ts.map +1 -1
- package/dist/components/Card.cjs +1 -1
- package/dist/components/Card.mjs +1 -1
- package/dist/components/Card.vue.d.ts +11 -10
- package/dist/components/Card.vue.d.ts.map +1 -1
- package/dist/components/CardGrid.cjs +1 -1
- package/dist/components/CardGrid.d.ts +15 -0
- package/dist/components/CardGrid.mjs +1 -1
- package/dist/components/Charts/BarChart.cjs +1 -1
- package/dist/components/Charts/BarChart.mjs +1 -1
- package/dist/components/Charts/GanttChart.cjs +1 -1
- package/dist/components/Charts/GanttChart.mjs +1 -1
- package/dist/components/Charts/InterpolationChart.cjs +1 -1
- package/dist/components/Charts/InterpolationChart.mjs +1 -1
- package/dist/components/Charts/LineChart.cjs +1 -1
- package/dist/components/Charts/LineChart.mjs +1 -1
- package/dist/components/Charts/PieChart.cjs +1 -1
- package/dist/components/Charts/PieChart.mjs +1 -1
- package/dist/components/Charts/Sparkline.cjs +1 -1
- package/dist/components/Charts/Sparkline.mjs +1 -1
- package/dist/components/Checkbox.cjs +1 -1
- package/dist/components/Checkbox.mjs +1 -1
- package/dist/components/CheckboxGroup.cjs +1 -1
- package/dist/components/CheckboxGroup.mjs +1 -1
- package/dist/components/ChipGroup.cjs +1 -0
- package/dist/components/ChipGroup.d.ts +29 -0
- package/dist/components/ChipGroup.mjs +2 -0
- package/dist/components/ChipGroup.vue.d.ts +14 -0
- package/dist/components/ChipGroup.vue.d.ts.map +1 -0
- package/dist/components/CloseButton.cjs +1 -0
- package/dist/components/CloseButton.d.ts +26 -0
- package/dist/components/CloseButton.mjs +2 -0
- package/dist/components/CloseButton.vue.d.ts +19 -0
- package/dist/components/CloseButton.vue.d.ts.map +1 -0
- package/dist/components/ColorStrip.cjs +1 -1
- package/dist/components/ColorStrip.mjs +1 -1
- package/dist/components/CommandPalette.cjs +1 -1
- package/dist/components/CommandPalette.mjs +1 -1
- package/dist/components/CommandPalette.vue.d.ts.map +1 -1
- package/dist/components/Confirm.cjs +1 -1
- package/dist/components/Confirm.d.ts +7 -5
- package/dist/components/Confirm.mjs +1 -1
- package/dist/components/Confirm.vue.d.ts +1 -1
- package/dist/components/Confirm.vue.d.ts.map +1 -1
- package/dist/components/ContainedList.cjs +1 -1
- package/dist/components/ContainedList.d.ts +7 -0
- package/dist/components/ContainedList.mjs +1 -1
- package/dist/components/ContainedListItem.cjs +1 -1
- package/dist/components/ContainedListItem.mjs +1 -1
- package/dist/components/ContainedListItem.vue.d.ts +1 -0
- package/dist/components/ContainedListItem.vue.d.ts.map +1 -1
- package/dist/components/ContentSwitcher.cjs +1 -0
- package/dist/components/ContentSwitcher.d.ts +36 -0
- package/dist/components/ContentSwitcher.mjs +2 -0
- package/dist/components/ContentSwitcher.vue.d.ts +13 -0
- package/dist/components/ContentSwitcher.vue.d.ts.map +1 -0
- package/dist/components/CopyButton.cjs +1 -1
- package/dist/components/CopyButton.mjs +1 -1
- package/dist/components/CopyButton.vue.d.ts.map +1 -1
- package/dist/components/DataTable.cjs +1 -1
- package/dist/components/DataTable.d.ts +12 -1
- package/dist/components/DataTable.mjs +1 -1
- package/dist/components/DataTable.vue.d.ts +1 -0
- 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 +2 -2
- 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/FileUploader.vue.d.ts.map +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/FloatingToolbar.vue.d.ts +1 -3
- package/dist/components/FloatingToolbar.vue.d.ts.map +1 -1
- package/dist/components/Form.cjs +1 -1
- package/dist/components/Form.mjs +1 -1
- package/dist/components/Grid.cjs +1 -1
- package/dist/components/Grid.mjs +1 -1
- package/dist/components/Grid.vue.d.ts +1 -1
- package/dist/components/ImageCropper.cjs +1 -1
- package/dist/components/ImageCropper.mjs +1 -1
- package/dist/components/ImagePicker.cjs +1 -1
- package/dist/components/ImagePicker.mjs +1 -1
- package/dist/components/ImagePicker.vue.d.ts.map +1 -1
- package/dist/components/InfoHint.cjs +1 -1
- package/dist/components/InfoHint.mjs +1 -1
- package/dist/components/InfoHint.vue.d.ts.map +1 -1
- package/dist/components/InlineEdit.cjs +1 -1
- package/dist/components/InlineEdit.mjs +1 -1
- package/dist/components/InlineEdit.vue.d.ts.map +1 -1
- package/dist/components/InlineLoading.cjs +1 -1
- package/dist/components/InlineLoading.mjs +1 -1
- package/dist/components/InputGroup.cjs +1 -0
- package/dist/components/InputGroup.context.d.ts +54 -0
- package/dist/components/InputGroup.context.d.ts.map +1 -0
- package/dist/components/InputGroup.d.ts +37 -0
- package/dist/components/InputGroup.mjs +2 -0
- package/dist/components/InputGroup.vue.d.ts +27 -0
- package/dist/components/InputGroup.vue.d.ts.map +1 -0
- package/dist/components/JsonTree.cjs +1 -1
- package/dist/components/JsonTree.mjs +1 -1
- package/dist/components/Label.cjs +1 -1
- package/dist/components/Label.mjs +1 -1
- package/dist/components/Layer.cjs +1 -1
- package/dist/components/Layer.mjs +1 -1
- package/dist/components/Menu.cjs +1 -1
- package/dist/components/Menu.d.ts +21 -0
- package/dist/components/Menu.mjs +1 -1
- package/dist/components/Menu.vue.d.ts +2 -0
- package/dist/components/Menu.vue.d.ts.map +1 -1
- package/dist/components/MenuBar.cjs +1 -1
- package/dist/components/MenuBar.mjs +1 -1
- package/dist/components/MenuBarItem.cjs +1 -1
- package/dist/components/MenuBarItem.mjs +1 -1
- package/dist/components/MenuDivider.cjs +1 -1
- package/dist/components/MenuDivider.mjs +1 -1
- package/dist/components/MenuItem.cjs +1 -1
- package/dist/components/MenuItem.mjs +1 -1
- package/dist/components/MenuItem.vue.d.ts +1 -0
- package/dist/components/MenuItem.vue.d.ts.map +1 -1
- package/dist/components/Message.cjs +1 -1
- package/dist/components/Message.mjs +1 -1
- package/dist/components/Modal.cjs +1 -1
- package/dist/components/Modal.d.ts +11 -7
- package/dist/components/Modal.mjs +1 -1
- package/dist/components/Modal.vue.d.ts +3 -3
- package/dist/components/Modal.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter.cjs +1 -1
- package/dist/components/NotificationCenter.d.ts +2 -1
- package/dist/components/NotificationCenter.mjs +1 -1
- package/dist/components/NotificationCenter.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenterItem.cjs +1 -1
- package/dist/components/NotificationCenterItem.mjs +1 -1
- package/dist/components/NubiscoMark.cjs +1 -1
- package/dist/components/NubiscoMark.mjs +1 -1
- package/dist/components/NubiscoPlatformMark.cjs +1 -1
- package/dist/components/NubiscoPlatformMark.mjs +1 -1
- package/dist/components/NumberInput.cjs +1 -1
- package/dist/components/NumberInput.mjs +1 -1
- package/dist/components/NumberInput.vue.d.ts.map +1 -1
- package/dist/components/OverflowMenu.cjs +1 -0
- package/dist/components/OverflowMenu.d.ts +41 -0
- package/dist/components/OverflowMenu.mjs +2 -0
- package/dist/components/OverflowMenu.vue.d.ts +36 -0
- package/dist/components/OverflowMenu.vue.d.ts.map +1 -0
- package/dist/components/PageHeader.cjs +1 -1
- package/dist/components/PageHeader.mjs +1 -1
- package/dist/components/PageLayout.cjs +1 -1
- package/dist/components/PageLayout.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/ReorderList.cjs +1 -1
- package/dist/components/ReorderList.mjs +1 -1
- package/dist/components/Search.cjs +1 -0
- package/dist/components/Search.d.ts +36 -0
- package/dist/components/Search.mjs +2 -0
- package/dist/components/Search.vue.d.ts +32 -0
- package/dist/components/Search.vue.d.ts.map +1 -0
- package/dist/components/Select.cjs +1 -1
- package/dist/components/Select.d.ts +4 -1
- package/dist/components/Select.mjs +1 -1
- package/dist/components/Select.vue.d.ts +6 -6
- package/dist/components/Select.vue.d.ts.map +1 -1
- package/dist/components/Shell.cjs +1 -1
- package/dist/components/Shell.d.ts +1 -0
- package/dist/components/Shell.mjs +1 -1
- package/dist/components/Shell.vue.d.ts +2 -2
- package/dist/components/Shell.vue.d.ts.map +1 -1
- package/dist/components/ShellPanel.cjs +1 -1
- package/dist/components/ShellPanel.mjs +1 -1
- package/dist/components/ShellPanel.vue.d.ts +2 -2
- package/dist/components/ShellPanel.vue.d.ts.map +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/SidebarHeaderToggle.cjs +1 -1
- package/dist/components/SidebarHeaderToggle.mjs +1 -1
- package/dist/components/SidebarHeaderToggle.vue.d.ts.map +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/SidebarStatus.cjs +1 -1
- package/dist/components/SidebarStatus.mjs +1 -1
- package/dist/components/Skeleton.cjs +1 -1
- package/dist/components/Skeleton.d.ts +20 -1
- package/dist/components/Skeleton.mjs +1 -1
- package/dist/components/Skeleton.vue.d.ts +3 -0
- package/dist/components/Skeleton.vue.d.ts.map +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/Spinner.mjs +1 -1
- package/dist/components/Stat.cjs +1 -1
- package/dist/components/Stat.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/StructuredList.cjs +1 -1
- package/dist/components/StructuredList.mjs +1 -1
- package/dist/components/StructuredList.vue.d.ts +2 -2
- package/dist/components/Submenu.cjs +1 -1
- package/dist/components/Submenu.mjs +1 -1
- package/dist/components/SuggestionList.cjs +1 -1
- package/dist/components/SuggestionList.d.ts +8 -0
- package/dist/components/SuggestionList.mjs +1 -1
- package/dist/components/SuggestionList.vue.d.ts +3 -0
- package/dist/components/SuggestionList.vue.d.ts.map +1 -1
- package/dist/components/Switch.cjs +1 -1
- package/dist/components/Switch.mjs +1 -1
- package/dist/components/TableOfContents.cjs +1 -1
- package/dist/components/TableOfContents.mjs +1 -1
- package/dist/components/TableOfContents.vue.d.ts.map +1 -1
- package/dist/components/Tabs.cjs +1 -1
- package/dist/components/Tabs.mjs +1 -1
- package/dist/components/TextInput.cjs +1 -1
- package/dist/components/TextInput.mjs +1 -1
- package/dist/components/TextInput.vue.d.ts +20 -4
- package/dist/components/TextInput.vue.d.ts.map +1 -1
- package/dist/components/Toast.cjs +1 -1
- package/dist/components/Toast.mjs +1 -1
- package/dist/components/Toast.vue.d.ts +4 -1
- package/dist/components/Toast.vue.d.ts.map +1 -1
- package/dist/components/Toaster.cjs +1 -1
- package/dist/components/Toaster.mjs +1 -1
- package/dist/components/Toolbar.cjs +1 -0
- package/dist/components/Toolbar.context.d.ts +22 -0
- package/dist/components/Toolbar.context.d.ts.map +1 -0
- package/dist/components/Toolbar.d.ts +26 -0
- package/dist/components/Toolbar.mjs +2 -0
- package/dist/components/Toolbar.vue.d.ts +24 -0
- package/dist/components/Toolbar.vue.d.ts.map +1 -0
- package/dist/components/Tree.cjs +1 -1
- package/dist/components/Tree.mjs +1 -1
- package/dist/components/TreeNode.cjs +1 -1
- package/dist/components/TreeNode.mjs +1 -1
- package/dist/components/TreeNode.vue.d.ts +1 -1
- package/dist/components/UserMenu.cjs +1 -1
- package/dist/components/UserMenu.mjs +1 -1
- package/dist/components/UserMenu.vue.d.ts.map +1 -1
- package/dist/components/Video.cjs +1 -1
- package/dist/components/Video.mjs +1 -1
- package/dist/components/Video.vue.d.ts.map +1 -1
- package/dist/components/Walkthrough.cjs +1 -1
- package/dist/components/Walkthrough.mjs +1 -1
- package/dist/components/Walkthrough.vue.d.ts.map +1 -1
- package/dist/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 +9 -0
- package/dist/components/manifest.d.ts.map +1 -1
- package/dist/components/manifest.js +9 -0
- package/dist/composables/useBlueprint.composable.cjs +1 -1
- package/dist/composables/useBlueprint.composable.mjs +1 -1
- package/dist/composables/useConfirm.composable.cjs +1 -1
- package/dist/composables/useConfirm.composable.mjs +3 -3
- package/dist/composables/useInlineLoading.composable.cjs +1 -1
- package/dist/composables/useInlineLoading.composable.mjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.cjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.mjs +1 -1
- package/dist/composables/useNbStrings.composable.cjs +1 -1
- package/dist/composables/useNbStrings.composable.d.ts +77 -0
- package/dist/composables/useNbStrings.composable.d.ts.map +1 -1
- package/dist/composables/useNbStrings.composable.mjs +68 -0
- package/dist/composables/useRovingFocus.composable.cjs +1 -0
- package/dist/composables/useRovingFocus.composable.d.ts +22 -0
- package/dist/composables/useRovingFocus.composable.d.ts.map +1 -0
- package/dist/composables/useRovingFocus.composable.mjs +56 -0
- package/dist/directives/ToolTip.directive.d.ts +56 -0
- package/dist/directives/ToolTip.directive.d.ts.map +1 -1
- package/dist/global.d.ts +18 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +152 -143
- package/dist/main-Bo1B-xzL.cjs +4 -0
- package/dist/main-nO1LQzsc.js +744 -0
- package/dist/main.d.ts +21 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/styles/AccordionItem.css +1 -1
- package/dist/styles/ActionGroup.css +1 -1
- package/dist/styles/Banner.css +1 -1
- package/dist/styles/BatchActions.css +1 -0
- package/dist/styles/BlueprintCard.css +1 -1
- package/dist/styles/BlueprintControls.css +1 -1
- package/dist/styles/Board.css +1 -1
- package/dist/styles/BottomPanel.css +1 -1
- package/dist/styles/Breadcrumbs.css +1 -1
- package/dist/styles/Button.css +1 -1
- package/dist/styles/ButtonSet.css +1 -0
- package/dist/styles/Calendar.css +1 -1
- package/dist/styles/Card.css +1 -1
- package/dist/styles/ChipGroup.css +1 -0
- package/dist/styles/CommandPalette.css +1 -1
- package/dist/styles/Confirm.css +1 -1
- package/dist/styles/ContainedListItem.css +1 -1
- package/dist/styles/ContentSwitcher.css +1 -0
- package/dist/styles/DataTable.css +1 -1
- package/dist/styles/DatePicker.css +1 -1
- package/dist/styles/FileUploader.css +1 -1
- package/dist/styles/FloatingToolbar.css +1 -1
- package/dist/styles/ImagePicker.css +1 -1
- package/dist/styles/InfoHint.css +1 -1
- package/dist/styles/InlineEdit.css +1 -1
- package/dist/styles/InputGroup.css +1 -0
- package/dist/styles/MenuItem.css +1 -1
- package/dist/styles/Modal.css +1 -1
- package/dist/styles/NotificationCenter.css +1 -1
- package/dist/styles/NumberInput.css +1 -1
- package/dist/styles/OverflowMenu.css +1 -0
- package/dist/styles/Pagination.css +1 -1
- package/dist/styles/Search.css +1 -0
- package/dist/styles/Select.css +1 -1
- package/dist/styles/Shell.css +1 -1
- package/dist/styles/ShellPanel.css +1 -1
- package/dist/styles/SidebarHeaderToggle.css +1 -1
- package/dist/styles/Skeleton.css +1 -1
- package/dist/styles/SuggestionList.css +1 -1
- package/dist/styles/TableOfContents.css +1 -1
- package/dist/styles/TextInput.css +1 -1
- package/dist/styles/Toast.css +1 -1
- package/dist/styles/Toolbar.css +1 -0
- package/dist/styles/UserMenu.css +1 -1
- package/dist/styles/Walkthrough.css +1 -1
- package/dist/ui.css +45 -37
- package/dist/utils/actionFit.helper.cjs +1 -0
- package/dist/utils/actionFit.helper.d.ts +20 -0
- package/dist/utils/actionFit.helper.d.ts.map +1 -0
- package/dist/utils/actionFit.helper.mjs +13 -0
- package/package.json +2 -2
- package/src/styles/_theme.scss +11 -4
- package/src/styles/logic/_field.scss +22 -0
- package/src/styles/logic/_focus.scss +20 -0
- package/src/styles/logic/index.scss +1 -0
- package/src/utils/actionFit.helper.ts +40 -0
- package/dist/AccordionItem-DFwj28eL.js +0 -118
- package/dist/AccordionItem-DhZD2kJL.cjs +0 -1
- package/dist/ActionGroup-CJoBGUvw.js +0 -171
- package/dist/ActionGroup-CU9YQboQ.cjs +0 -1
- package/dist/BackToTop-C5gFfuu7.cjs +0 -1
- package/dist/BackToTop-DZhl6N_Q.js +0 -56
- package/dist/Banner-5uX-ujbu.js +0 -93
- package/dist/Banner-CiIQKSxv.cjs +0 -1
- package/dist/BlueprintCard-Cda5rPZu.cjs +0 -1
- package/dist/BlueprintControls-DnUoI9qp.cjs +0 -1
- package/dist/Board-BNB96CXm.cjs +0 -1
- package/dist/BottomPanel-CYxavAS0.cjs +0 -1
- package/dist/BottomPanel-vFcIk2nf.js +0 -115
- package/dist/Breadcrumbs-B-pjVWeD.js +0 -184
- package/dist/Breadcrumbs-CqDYLfIQ.cjs +0 -1
- package/dist/Button-C0N1cyOQ.cjs +0 -1
- package/dist/Button-CuwzIVWv.js +0 -132
- package/dist/Calendar-Bbk7bPW1.cjs +0 -1
- package/dist/Calendar-EiqHtUG2.js +0 -155
- package/dist/Card-B5FTcFEQ.cjs +0 -1
- package/dist/Card-DUTWbKv7.js +0 -143
- package/dist/CommandPalette-C8-2XCrf.cjs +0 -1
- package/dist/Confirm-BA-t4jPF.cjs +0 -1
- package/dist/Confirm-MmMvMttu.js +0 -313
- package/dist/ContainedListItem-Dj7TcGpO.cjs +0 -1
- package/dist/CopyButton-Bcc2BDJ8.js +0 -65
- package/dist/CopyButton-CwHAVKQ6.cjs +0 -1
- package/dist/DataTable-D4KrQH5E.js +0 -485
- package/dist/DataTable-DVJnvBQM.cjs +0 -1
- package/dist/DatePicker-BmuVSyZ3.cjs +0 -1
- package/dist/DatePicker-CagtB0Sd.js +0 -743
- package/dist/FileUploader-B9j-HmX3.js +0 -193
- package/dist/FileUploader-BolhAWrI.cjs +0 -1
- package/dist/FloatingToolbar-CYOuKLd7.js +0 -140
- package/dist/FloatingToolbar-DxUUozlf.cjs +0 -1
- package/dist/ImagePicker-CZEFzYC8.js +0 -171
- package/dist/ImagePicker-CebI8MDy.cjs +0 -1
- package/dist/InfoHint-DVrm41q9.js +0 -177
- package/dist/InfoHint-WYitTbYz.cjs +0 -1
- package/dist/InlineEdit-DViLVwtn.js +0 -116
- package/dist/InlineEdit-DfkmTudh.cjs +0 -1
- package/dist/Menu-CLDGxi-1.cjs +0 -1
- package/dist/Menu-C_UsGyKX.js +0 -177
- package/dist/MenuItem-CvpxnM4W.cjs +0 -1
- package/dist/Modal-1i_nDqvM.cjs +0 -1
- package/dist/Modal-CxIl02xU.js +0 -229
- package/dist/NotificationCenter-CXn7sGFw.cjs +0 -1
- package/dist/NotificationCenter-Cu_vs-jh.js +0 -584
- package/dist/NumberInput-CMxlZ54a.cjs +0 -1
- package/dist/NumberInput-Dy0leAIF.js +0 -324
- package/dist/Select-Bz4tf2H_.cjs +0 -1
- package/dist/Select-hL8I-aNK.js +0 -603
- package/dist/Shell-BxGBrQsM.js +0 -536
- package/dist/Shell-BzXh23BU.cjs +0 -1
- package/dist/ShellPanel-DzkkJYVd.js +0 -126
- package/dist/ShellPanel-XYKkAc5n.cjs +0 -1
- package/dist/Skeleton-CqZ9O0X0.cjs +0 -1
- package/dist/SuggestionList-BJjbVvt2.cjs +0 -1
- package/dist/SuggestionList-Bdx7CK__.js +0 -189
- package/dist/TextInput-BXyJQfGx.js +0 -348
- package/dist/TextInput-DKp819VS.cjs +0 -2
- package/dist/Toast-BKrvlON6.cjs +0 -1
- package/dist/Toast-fRHhhjZV.js +0 -115
- package/dist/UserMenu-GJHs1fKI.cjs +0 -1
- package/dist/Video-D1WOYCYH.cjs +0 -1
- package/dist/Video-DrDqaCXl.js +0 -104
- package/dist/Walkthrough-DXMDgB9t.cjs +0 -1
- package/dist/Walkthrough-D_vfYTWP.js +0 -327
- package/dist/main-BTximdIU.js +0 -1255
- package/dist/main-DkNxc78b.cjs +0 -4
- package/dist/motion-BjVtMTXD.cjs +0 -1
- package/dist/motion-C0h9XZQZ.js +0 -18
- /package/dist/{Badge-CfICqXrd.cjs → Badge-BYfdJcdD.cjs} +0 -0
- /package/dist/{Badge-BFsoJcCK.js → Badge-scjsdx_V.js} +0 -0
- /package/dist/{Blueprint.context-B3d5-4jD.cjs → Blueprint.context-BX56xsrT.cjs} +0 -0
- /package/dist/{Blueprint.context-B4bRLj7m.js → Blueprint.context-Bz6Jy1Ou.js} +0 -0
- /package/dist/{BlueprintBackground-5OOF-VpK.js → BlueprintBackground-DPjZeMwY.js} +0 -0
- /package/dist/{BlueprintBackground-D_JokLTK.cjs → BlueprintBackground-yHRGclEz.cjs} +0 -0
- /package/dist/{BlueprintMinimap-CACuVJqI.cjs → BlueprintMinimap-qskDNYyr.cjs} +0 -0
- /package/dist/{BlueprintMinimap-Ehrltju2.js → BlueprintMinimap-xnsyS1M8.js} +0 -0
- /package/dist/{Card.link-eRkbFiF1.cjs → Card.link-Bw2B_lPO.cjs} +0 -0
- /package/dist/{Card.link-CB8_CTbn.js → Card.link-CdvubtHJ.js} +0 -0
- /package/dist/{CardGrid-DzjiR2wg.cjs → CardGrid-DPaITpcU.cjs} +0 -0
- /package/dist/{CardGrid-BOhFOzTs.js → CardGrid-j0TFmVrQ.js} +0 -0
- /package/dist/{ChartLegend-C81jju4k.cjs → ChartLegend-COJeG-2B.cjs} +0 -0
- /package/dist/{ChartLegend-fsJqOyGj.js → ChartLegend-LDNukufA.js} +0 -0
- /package/dist/{CheckboxGroup.context-C8p21aqH.cjs → CheckboxGroup.context-ADwiY4gy.cjs} +0 -0
- /package/dist/{CheckboxGroup.context-Cu0BA648.js → CheckboxGroup.context-C1QB-Zsq.js} +0 -0
- /package/dist/{ContainedList-DV8kZgTS.cjs → ContainedList-CBWwEmoK.cjs} +0 -0
- /package/dist/{ContainedList-7uMU4e4Z.js → ContainedList-PUA2OJ08.js} +0 -0
- /package/dist/{DefinitionList-DIPobaPW.js → DefinitionList-BOVcW-V7.js} +0 -0
- /package/dist/{DefinitionList-BuRW4drr.cjs → DefinitionList-CndoLDLs.cjs} +0 -0
- /package/dist/{DefinitionListItem-CbVnrShi.js → DefinitionListItem-C3VrLhWY.js} +0 -0
- /package/dist/{DefinitionListItem-Bf9amK8a.cjs → DefinitionListItem-CLztc8mQ.cjs} +0 -0
- /package/dist/{DragHandle-snItY92k.cjs → DragHandle-Bz2N22Sm.cjs} +0 -0
- /package/dist/{DragHandle-dCNBfHJe.js → DragHandle-Cc7WrUj7.js} +0 -0
- /package/dist/{EmptyState-B8EM9ynK.cjs → EmptyState-Db0Zrrk2.cjs} +0 -0
- /package/dist/{EmptyState-D-fku2DD.js → EmptyState-DhlJV0C6.js} +0 -0
- /package/dist/{Field-3S8uGW95.cjs → Field-COMPegVv.cjs} +0 -0
- /package/dist/{Field-DK5iec3Z.js → Field-D12Dja-u.js} +0 -0
- /package/dist/{Flag-myXFwopO.js → Flag-DyDqHJy3.js} +0 -0
- /package/dist/{Flag-CNx_cE4Q.cjs → Flag-gM91kXTi.cjs} +0 -0
- /package/dist/{Grid-jlgLOwom.js → Grid-B7d8x0tA.js} +0 -0
- /package/dist/{Grid-C0muGlj3.cjs → Grid-BOtE_jXr.cjs} +0 -0
- /package/dist/{JsonTree-Bmj8WtzK.cjs → JsonTree-MjCO8_Xk.cjs} +0 -0
- /package/dist/{JsonTree-BWfMcWOV.js → JsonTree-VbXpLPoG.js} +0 -0
- /package/dist/{Label-CTOPIIbR.cjs → Label-CjxnZgNy.cjs} +0 -0
- /package/dist/{Label-BDMCrURR.js → Label-xwHw_UbN.js} +0 -0
- /package/dist/{Layer-BJeI6Q6N.js → Layer-Btb-b9Mk.js} +0 -0
- /package/dist/{Layer-D-MNrLiB.cjs → Layer-D0NqQYM0.cjs} +0 -0
- /package/dist/{MenuBar-aLDr7-eJ.cjs → MenuBar-BVgGbppN.cjs} +0 -0
- /package/dist/{MenuBar-DyJufs5b.js → MenuBar-M2eiYZG0.js} +0 -0
- /package/dist/{MenuDivider-aZIXvYsH.js → MenuDivider-B3tNv2aj.js} +0 -0
- /package/dist/{MenuDivider-D75yF8o8.cjs → MenuDivider-BSMtwoUU.cjs} +0 -0
- /package/dist/{Message-Bija1nMK.cjs → Message-BJO4MjiQ.cjs} +0 -0
- /package/dist/{Message-BONOwoVY.js → Message-DCeg8qsC.js} +0 -0
- /package/dist/{NotificationCenterItem-zdOMnxv1.cjs → NotificationCenterItem-D0agavaK.cjs} +0 -0
- /package/dist/{NotificationCenterItem-BbbBFYEu.js → NotificationCenterItem-O6SR_6KR.js} +0 -0
- /package/dist/{NubiscoMark-Cf7Ek83E.cjs → NubiscoMark-3StsXBoJ.cjs} +0 -0
- /package/dist/{NubiscoMark-BLT8ULAl.js → NubiscoMark-XJWPWIc0.js} +0 -0
- /package/dist/{NubiscoPlatformMark-Dca7vi6H.js → NubiscoPlatformMark-BgQLjI89.js} +0 -0
- /package/dist/{NubiscoPlatformMark-CXMSQDYh.cjs → NubiscoPlatformMark-D8WIp4On.cjs} +0 -0
- /package/dist/{PageLayout-DQKfOSQq.js → PageLayout-BMcT2mzU.js} +0 -0
- /package/dist/{PageLayout-Dw4JYS3k.cjs → PageLayout-DHi1w1PD.cjs} +0 -0
- /package/dist/{PrimaryAction.context-BkYkcMlm.js → PrimaryAction.context-DZUcR5ER.js} +0 -0
- /package/dist/{PrimaryAction.context-2v_jcQAo.cjs → PrimaryAction.context-DnzRVqGH.cjs} +0 -0
- /package/dist/{ReorderList-B1CYGR0e.js → ReorderList-DmjW30Mw.js} +0 -0
- /package/dist/{ReorderList-DBW8TBu6.cjs → ReorderList-qScXc3-v.cjs} +0 -0
- /package/dist/{SidebarBrand-FHBO4Dw3.js → SidebarBrand-CZf-kRyZ.js} +0 -0
- /package/dist/{SidebarBrand-CX-BgI4X.cjs → SidebarBrand-D2u7hX-v.cjs} +0 -0
- /package/dist/{SidebarLink-xtGCDABj.js → SidebarLink-BuRBmv_k.js} +0 -0
- /package/dist/{SidebarLink-DTGVapwa.cjs → SidebarLink-CSTNfb2F.cjs} +0 -0
- /package/dist/{SidebarMenu-CnsOBXeM.cjs → SidebarMenu-CAthEmyy.cjs} +0 -0
- /package/dist/{SidebarMenu-D24o7HS-.js → SidebarMenu-CgWUHllQ.js} +0 -0
- /package/dist/{SidebarMenuGroup-DJasr_cx.cjs → SidebarMenuGroup-B9JGPBcF.cjs} +0 -0
- /package/dist/{SidebarMenuGroup-Bjc2IeK5.js → SidebarMenuGroup-DdWg57Wv.js} +0 -0
- /package/dist/{SidebarMenuItem-UFeKPTvc.js → SidebarMenuItem-BvvoDIjK.js} +0 -0
- /package/dist/{SidebarMenuItem-DP4L8ljr.cjs → SidebarMenuItem-eFnj5QoE.cjs} +0 -0
- /package/dist/{SidebarStatus-D-CfUYFc.js → SidebarStatus-CnTnYL4x.js} +0 -0
- /package/dist/{SidebarStatus-YfLW9xzC.cjs → SidebarStatus-CvjuggXO.cjs} +0 -0
- /package/dist/{Sparkline-MAi1Fh2T.cjs → Sparkline-B7kUEfuW.cjs} +0 -0
- /package/dist/{Sparkline-m3wbt-f1.js → Sparkline-CVzkzaOJ.js} +0 -0
- /package/dist/{Stepper.context-DUIDhN9Q.cjs → Stepper.context-Brnt5IZv.cjs} +0 -0
- /package/dist/{Stepper.context-DqfEvgGM.js → Stepper.context-CRKX8lxW.js} +0 -0
- /package/dist/{StructuredList-h9JFXpF4.cjs → StructuredList-BexC0c1Z.cjs} +0 -0
- /package/dist/{StructuredList-BSfuLANB.js → StructuredList-DuBBP01p.js} +0 -0
- /package/dist/{Submenu-Dxo3DUDA.cjs → Submenu-DRkHiWsD.cjs} +0 -0
- /package/dist/{Submenu-BnMaJKYm.js → Submenu-Dnj5MiFy.js} +0 -0
- /package/dist/{TextInput.context-DV1MgL_Q.js → TextInput.context-B-mipPOo.js} +0 -0
- /package/dist/{TextInput.context-UTLuljcO.cjs → TextInput.context-ChkcqMNM.cjs} +0 -0
- /package/dist/{TreeContext-TZ35sT5B.cjs → TreeContext-B2Io2oii.cjs} +0 -0
- /package/dist/{TreeContext--GZ21fCm.js → TreeContext-Cs4iAw0d.js} +0 -0
- /package/dist/{Wireframe-CL0rjsos.cjs → Wireframe-3fvc4I5-.cjs} +0 -0
- /package/dist/{Wireframe-BxUNaH2g.js → Wireframe-C_Ca3wCn.js} +0 -0
- /package/dist/{palette-CWU7exM6.js → palette-6bEW4KUN.js} +0 -0
- /package/dist/{palette-B7XEOMVB.cjs → palette-LbOzdAXj.cjs} +0 -0
- /package/dist/{pixi-scene-BKyneWmd.cjs → pixi-scene-CQ1qoZvX.cjs} +0 -0
- /package/dist/{pixi-scene-TbaBQ2-u.js → pixi-scene-DFCEvc1j.js} +0 -0
- /package/dist/{scales-CNW8JgKC.js → scales-BGzTviac.js} +0 -0
- /package/dist/{scales-B8IbC7t_.cjs → scales-BRSHTjbp.cjs} +0 -0
- /package/dist/{useChartSize-CftshgoY.js → useChartSize-05CLdiR0.js} +0 -0
- /package/dist/{useChartSize-B6Bes760.cjs → useChartSize-CUZ7BuGD.cjs} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-Dn1mqnqe.cjs → useLoadingAnnouncer.composable-CEPRjDi3.cjs} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-BAwecV1M.js → useLoadingAnnouncer.composable-c0XX_xNT.js} +0 -0
- /package/dist/{vue-i18n-DSR949qU.js → vue-i18n-DaD-yZmK.js} +0 -0
- /package/dist/{vue-i18n-DIvTc6LM.cjs → vue-i18n-ZdR0XDmN.cjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Button-BHFtgOXA.cjs`),t=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),n=require(`./Icon-CssV4E2-.cjs`),r=require(`./composables/useStableId.composable.cjs`),i=require(`./composables/useSurfaceLayer.composable.cjs`),a=require(`./composables/useNbStrings.composable.cjs`);let o=require(`vue`),s=require(`@nubisco/ui/icons/x`),c=require(`@nubisco/ui/icons/circle-notch`);var l=function(e){return e.Primary=`primary`,e.Secondary=`secondary`,e.Ghost=`ghost`,e.Danger=`danger`,e.Success=`success`,e.Warning=`warning`,e}(l||{}),u=function(e){return e.Idle=`idle`,e.Loading=`loading`,e.Success=`success`,e}(u||{}),d={key:0,class:`nb-file-uploader__heading`},f={key:1,class:`nb-file-uploader__description`},p={class:`nb-file-uploader__drop-label`},m=[`accept`,`multiple`,`disabled`],h={key:4,class:`nb-file-uploader__list`},g={class:`nb-file-uploader__name`},_={class:`nb-file-uploader__status`},v=[`id`],y=(0,o.defineComponent)({__name:`FileUploader`,props:{heading:{},description:{},buttonLabel:{default:`Add file`},variant:{default:l.Primary},accept:{},multiple:{type:Boolean,default:!1},maxSize:{},disabled:{type:Boolean,default:!1},id:{}},emits:[`change`,`remove`],setup(t,{expose:l,emit:y}){let b=t,{layerProps:x}=i.useSurfaceLayer(),S=r.useStableId({}),C=a.useNbStrings(),w=y,T=(0,o.ref)(null),E=(0,o.ref)([]),D=(0,o.ref)(!1),O=0;(0,o.watch)(()=>b.disabled,e=>{e&&(O=0,D.value=!1)});function k(){b.disabled||T.value?.click()}function A(e){if(b.maxSize&&e.size>b.maxSize)return`File exceeds size limit.`;if(b.accept){let t=b.accept.split(`,`).map(e=>e.trim().toLowerCase()),n=e.name.toLowerCase();if(!t.some(t=>t.startsWith(`.`)?n.endsWith(t):t.includes(`/`)?e.type===t||e.type.startsWith(t.replaceAll(`*`,``)):!1))return`File type not accepted.`}}function j(e){let t=Array.from(e);b.multiple||(E.value=[]);for(let e of t){let t=A(e);E.value.push({file:e,status:u.Idle,error:t})}w(`change`,E.value.filter(e=>!e.error).map(e=>e.file))}function M(e){let t=e.target;if(b.disabled){t.value=``;return}t.files?.length&&(j(t.files),t.value=``)}function N(){b.disabled||(O++,D.value=!0)}function P(){O--,O<=0&&(O=0,D.value=!1)}function F(e){b.disabled&&e.dataTransfer&&(e.dataTransfer.dropEffect=`none`)}function I(e){if(O=0,D.value=!1,b.disabled)return;let t=e.dataTransfer?.files;t?.length&&j(t)}function L(e){if(b.disabled)return;let t=E.value[e];E.value.splice(e,1),w(`remove`,t.file),w(`change`,E.value.filter(e=>!e.error).map(e=>e.file))}function R(e,t,n){E.value[e]&&(E.value[e].status=t,E.value[e].error=n)}return l({files:E,setFileStatus:R}),(r,i)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,(0,o.mergeProps)({class:[`nb-file-uploader`,{"nb-file-uploader--disabled":t.disabled}]},(0,o.unref)(x),{onDragenter:(0,o.withModifiers)(N,[`prevent`]),onDragover:(0,o.withModifiers)(F,[`prevent`]),onDragleave:(0,o.withModifiers)(P,[`prevent`]),onDrop:(0,o.withModifiers)(I,[`prevent`])}),[t.heading?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,d,(0,o.toDisplayString)(t.heading),1)):(0,o.createCommentVNode)(``,!0),t.description?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,f,(0,o.toDisplayString)(t.description),1)):(0,o.createCommentVNode)(``,!0),D.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:2,class:(0,o.normalizeClass)([`nb-file-uploader__dropzone`,`nb-file-uploader__dropzone--${t.variant}`])},[(0,o.createElementVNode)(`span`,p,(0,o.toDisplayString)((0,o.unref)(C).fileUploaderDropHint),1)],2)):((0,o.openBlock)(),(0,o.createBlock)(e.t,{key:3,class:`nb-file-uploader__btn`,variant:t.variant,disabled:t.disabled,onClick:(0,o.withModifiers)(k,[`stop`])},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(t.buttonLabel),1)]),_:1},8,[`variant`,`disabled`])),(0,o.createElementVNode)(`input`,{ref_key:`inputRef`,ref:T,type:`file`,class:`nb-file-uploader__input`,hidden:``,accept:t.accept,multiple:t.multiple,disabled:t.disabled,onChange:M},null,40,m),E.value.length?((0,o.openBlock)(),(0,o.createElementBlock)(`ul`,h,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(E.value,(r,i)=>((0,o.openBlock)(),(0,o.createElementBlock)(`li`,{key:i,class:(0,o.normalizeClass)([`nb-file-uploader__item`,{"nb-file-uploader__item--error":r.error,"nb-file-uploader__item--success":r.status===`success`}])},[(0,o.createElementVNode)(`span`,g,(0,o.toDisplayString)(r.file.name),1),(0,o.createElementVNode)(`span`,_,[r.status===`loading`?((0,o.openBlock)(),(0,o.createBlock)(n.t,{key:0,name:(0,o.unref)(c.regular),class:`nb-file-uploader__spinner`},null,8,[`name`])):r.status===`success`?((0,o.openBlock)(),(0,o.createBlock)(n.t,{key:1,name:`check-circle-fill`,class:`nb-file-uploader__check`})):(0,o.createCommentVNode)(``,!0),r.error?((0,o.openBlock)(),(0,o.createBlock)(n.t,{key:2,name:`warning-circle-fill`,class:`nb-file-uploader__warn`})):(0,o.createCommentVNode)(``,!0),r.status===`loading`?(0,o.createCommentVNode)(``,!0):((0,o.openBlock)(),(0,o.createBlock)(e.t,{key:3,variant:`ghost`,icon:(0,o.unref)(s.regular),size:`xs`,class:`nb-file-uploader__remove`,label:(0,o.unref)(C).fileUploaderRemove,"aria-label":(0,o.unref)(C).fileUploaderRemoveFile(r.file.name),"aria-describedby":r.error?`${(0,o.unref)(S)}-error-${i}`:void 0,disabled:t.disabled,onClick:e=>L(i)},null,8,[`icon`,`label`,`aria-label`,`aria-describedby`,`disabled`,`onClick`]))]),r.error?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:0,id:`${(0,o.unref)(S)}-error-${i}`,class:`nb-file-uploader__error`,role:`alert`},(0,o.toDisplayString)(r.error),9,v)):(0,o.createCommentVNode)(``,!0)],2))),128))])):(0,o.createCommentVNode)(``,!0)],16))}}),b=t.t(y,[[`__scopeId`,`data-v-7e0b7153`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return b}});
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { t as e } from "./Button-tpOmP8iV.js";
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
3
|
+
import { t as n } from "./Icon-B2tiGiqZ.js";
|
|
4
|
+
import { useStableId as r } from "./composables/useStableId.composable.mjs";
|
|
5
|
+
import { useSurfaceLayer as i } from "./composables/useSurfaceLayer.composable.mjs";
|
|
6
|
+
import { useNbStrings as a } from "./composables/useNbStrings.composable.mjs";
|
|
7
|
+
import { Fragment as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, defineComponent as f, mergeProps as p, normalizeClass as m, openBlock as h, ref as g, renderList as _, toDisplayString as v, unref as y, watch as b, withCtx as x, withModifiers as S } from "vue";
|
|
8
|
+
import { regular as C } from "@nubisco/ui/icons/x";
|
|
9
|
+
import { regular as w } from "@nubisco/ui/icons/circle-notch";
|
|
10
|
+
//#region src/types/Variants.d.ts
|
|
11
|
+
var T = /* @__PURE__ */ function(e) {
|
|
12
|
+
return e.Primary = "primary", e.Secondary = "secondary", e.Ghost = "ghost", e.Danger = "danger", e.Success = "success", e.Warning = "warning", e;
|
|
13
|
+
}(T || {}), E = /* @__PURE__ */ function(e) {
|
|
14
|
+
return e.Idle = "idle", e.Loading = "loading", e.Success = "success", e;
|
|
15
|
+
}(E || {}), D = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "nb-file-uploader__heading"
|
|
18
|
+
}, O = {
|
|
19
|
+
key: 1,
|
|
20
|
+
class: "nb-file-uploader__description"
|
|
21
|
+
}, k = { class: "nb-file-uploader__drop-label" }, A = [
|
|
22
|
+
"accept",
|
|
23
|
+
"multiple",
|
|
24
|
+
"disabled"
|
|
25
|
+
], j = {
|
|
26
|
+
key: 4,
|
|
27
|
+
class: "nb-file-uploader__list"
|
|
28
|
+
}, M = { class: "nb-file-uploader__name" }, N = { class: "nb-file-uploader__status" }, P = ["id"], F = /* @__PURE__ */ t(/* @__PURE__ */ f({
|
|
29
|
+
__name: "FileUploader",
|
|
30
|
+
props: {
|
|
31
|
+
heading: {},
|
|
32
|
+
description: {},
|
|
33
|
+
buttonLabel: { default: "Add file" },
|
|
34
|
+
variant: { default: T.Primary },
|
|
35
|
+
accept: {},
|
|
36
|
+
multiple: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !1
|
|
39
|
+
},
|
|
40
|
+
maxSize: {},
|
|
41
|
+
disabled: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: !1
|
|
44
|
+
},
|
|
45
|
+
id: {}
|
|
46
|
+
},
|
|
47
|
+
emits: ["change", "remove"],
|
|
48
|
+
setup(t, { expose: f, emit: T }) {
|
|
49
|
+
let F = t, { layerProps: I } = i(), L = r({}), R = a(), z = T, B = g(null), V = g([]), H = g(!1), U = 0;
|
|
50
|
+
b(() => F.disabled, (e) => {
|
|
51
|
+
e && (U = 0, H.value = !1);
|
|
52
|
+
});
|
|
53
|
+
function W() {
|
|
54
|
+
F.disabled || B.value?.click();
|
|
55
|
+
}
|
|
56
|
+
function G(e) {
|
|
57
|
+
if (F.maxSize && e.size > F.maxSize) return "File exceeds size limit.";
|
|
58
|
+
if (F.accept) {
|
|
59
|
+
let t = F.accept.split(",").map((e) => e.trim().toLowerCase()), n = e.name.toLowerCase();
|
|
60
|
+
if (!t.some((t) => t.startsWith(".") ? n.endsWith(t) : t.includes("/") ? e.type === t || e.type.startsWith(t.replaceAll("*", "")) : !1)) return "File type not accepted.";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function K(e) {
|
|
64
|
+
let t = Array.from(e);
|
|
65
|
+
F.multiple || (V.value = []);
|
|
66
|
+
for (let e of t) {
|
|
67
|
+
let t = G(e);
|
|
68
|
+
V.value.push({
|
|
69
|
+
file: e,
|
|
70
|
+
status: E.Idle,
|
|
71
|
+
error: t
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
z("change", V.value.filter((e) => !e.error).map((e) => e.file));
|
|
75
|
+
}
|
|
76
|
+
function q(e) {
|
|
77
|
+
let t = e.target;
|
|
78
|
+
if (F.disabled) {
|
|
79
|
+
t.value = "";
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
t.files?.length && (K(t.files), t.value = "");
|
|
83
|
+
}
|
|
84
|
+
function J() {
|
|
85
|
+
F.disabled || (U++, H.value = !0);
|
|
86
|
+
}
|
|
87
|
+
function Y() {
|
|
88
|
+
U--, U <= 0 && (U = 0, H.value = !1);
|
|
89
|
+
}
|
|
90
|
+
function X(e) {
|
|
91
|
+
F.disabled && e.dataTransfer && (e.dataTransfer.dropEffect = "none");
|
|
92
|
+
}
|
|
93
|
+
function Z(e) {
|
|
94
|
+
if (U = 0, H.value = !1, F.disabled) return;
|
|
95
|
+
let t = e.dataTransfer?.files;
|
|
96
|
+
t?.length && K(t);
|
|
97
|
+
}
|
|
98
|
+
function Q(e) {
|
|
99
|
+
if (F.disabled) return;
|
|
100
|
+
let t = V.value[e];
|
|
101
|
+
V.value.splice(e, 1), z("remove", t.file), z("change", V.value.filter((e) => !e.error).map((e) => e.file));
|
|
102
|
+
}
|
|
103
|
+
function $(e, t, n) {
|
|
104
|
+
V.value[e] && (V.value[e].status = t, V.value[e].error = n);
|
|
105
|
+
}
|
|
106
|
+
return f({
|
|
107
|
+
files: V,
|
|
108
|
+
setFileStatus: $
|
|
109
|
+
}), (r, i) => (h(), l("div", p({ class: ["nb-file-uploader", { "nb-file-uploader--disabled": t.disabled }] }, y(I), {
|
|
110
|
+
onDragenter: S(J, ["prevent"]),
|
|
111
|
+
onDragover: S(X, ["prevent"]),
|
|
112
|
+
onDragleave: S(Y, ["prevent"]),
|
|
113
|
+
onDrop: S(Z, ["prevent"])
|
|
114
|
+
}), [
|
|
115
|
+
t.heading ? (h(), l("p", D, v(t.heading), 1)) : c("", !0),
|
|
116
|
+
t.description ? (h(), l("p", O, v(t.description), 1)) : c("", !0),
|
|
117
|
+
H.value ? (h(), l("div", {
|
|
118
|
+
key: 2,
|
|
119
|
+
class: m(["nb-file-uploader__dropzone", `nb-file-uploader__dropzone--${t.variant}`])
|
|
120
|
+
}, [u("span", k, v(y(R).fileUploaderDropHint), 1)], 2)) : (h(), s(e, {
|
|
121
|
+
key: 3,
|
|
122
|
+
class: "nb-file-uploader__btn",
|
|
123
|
+
variant: t.variant,
|
|
124
|
+
disabled: t.disabled,
|
|
125
|
+
onClick: S(W, ["stop"])
|
|
126
|
+
}, {
|
|
127
|
+
default: x(() => [d(v(t.buttonLabel), 1)]),
|
|
128
|
+
_: 1
|
|
129
|
+
}, 8, ["variant", "disabled"])),
|
|
130
|
+
u("input", {
|
|
131
|
+
ref_key: "inputRef",
|
|
132
|
+
ref: B,
|
|
133
|
+
type: "file",
|
|
134
|
+
class: "nb-file-uploader__input",
|
|
135
|
+
hidden: "",
|
|
136
|
+
accept: t.accept,
|
|
137
|
+
multiple: t.multiple,
|
|
138
|
+
disabled: t.disabled,
|
|
139
|
+
onChange: q
|
|
140
|
+
}, null, 40, A),
|
|
141
|
+
V.value.length ? (h(), l("ul", j, [(h(!0), l(o, null, _(V.value, (r, i) => (h(), l("li", {
|
|
142
|
+
key: i,
|
|
143
|
+
class: m(["nb-file-uploader__item", {
|
|
144
|
+
"nb-file-uploader__item--error": r.error,
|
|
145
|
+
"nb-file-uploader__item--success": r.status === "success"
|
|
146
|
+
}])
|
|
147
|
+
}, [
|
|
148
|
+
u("span", M, v(r.file.name), 1),
|
|
149
|
+
u("span", N, [
|
|
150
|
+
r.status === "loading" ? (h(), s(n, {
|
|
151
|
+
key: 0,
|
|
152
|
+
name: y(w),
|
|
153
|
+
class: "nb-file-uploader__spinner"
|
|
154
|
+
}, null, 8, ["name"])) : r.status === "success" ? (h(), s(n, {
|
|
155
|
+
key: 1,
|
|
156
|
+
name: "check-circle-fill",
|
|
157
|
+
class: "nb-file-uploader__check"
|
|
158
|
+
})) : c("", !0),
|
|
159
|
+
r.error ? (h(), s(n, {
|
|
160
|
+
key: 2,
|
|
161
|
+
name: "warning-circle-fill",
|
|
162
|
+
class: "nb-file-uploader__warn"
|
|
163
|
+
})) : c("", !0),
|
|
164
|
+
r.status === "loading" ? c("", !0) : (h(), s(e, {
|
|
165
|
+
key: 3,
|
|
166
|
+
variant: "ghost",
|
|
167
|
+
icon: y(C),
|
|
168
|
+
size: "xs",
|
|
169
|
+
class: "nb-file-uploader__remove",
|
|
170
|
+
label: y(R).fileUploaderRemove,
|
|
171
|
+
"aria-label": y(R).fileUploaderRemoveFile(r.file.name),
|
|
172
|
+
"aria-describedby": r.error ? `${y(L)}-error-${i}` : void 0,
|
|
173
|
+
disabled: t.disabled,
|
|
174
|
+
onClick: (e) => Q(i)
|
|
175
|
+
}, null, 8, [
|
|
176
|
+
"icon",
|
|
177
|
+
"label",
|
|
178
|
+
"aria-label",
|
|
179
|
+
"aria-describedby",
|
|
180
|
+
"disabled",
|
|
181
|
+
"onClick"
|
|
182
|
+
]))
|
|
183
|
+
]),
|
|
184
|
+
r.error ? (h(), l("div", {
|
|
185
|
+
key: 0,
|
|
186
|
+
id: `${y(L)}-error-${i}`,
|
|
187
|
+
class: "nb-file-uploader__error",
|
|
188
|
+
role: "alert"
|
|
189
|
+
}, v(r.error), 9, P)) : c("", !0)
|
|
190
|
+
], 2))), 128))])) : c("", !0)
|
|
191
|
+
], 16));
|
|
192
|
+
}
|
|
193
|
+
}), [["__scopeId", "data-v-7e0b7153"]]);
|
|
194
|
+
//#endregion
|
|
195
|
+
export { E as n, F as t };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
2
|
+
import { useSurfaceLayer as t } from "./composables/useSurfaceLayer.composable.mjs";
|
|
3
|
+
import { usePhoneLayout as n } from "./composables/usePhoneLayout.composable.mjs";
|
|
4
|
+
import { placeAnchored as r, viewportSize as i } from "./utils/anchorPosition.helper.mjs";
|
|
5
|
+
import { useVisualViewportVar as a } from "./composables/useVisualViewportVar.composable.mjs";
|
|
6
|
+
import { useRovingFocus as o } from "./composables/useRovingFocus.composable.mjs";
|
|
7
|
+
import { Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, defineComponent as f, mergeProps as p, nextTick as m, onBeforeUnmount as h, openBlock as g, ref as _, renderSlot as v, unref as y, watch as b } from "vue";
|
|
8
|
+
//#region src/components/FloatingToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var x = ["aria-label", "aria-orientation"], S = /* @__PURE__ */ e(/* @__PURE__ */ f({
|
|
10
|
+
__name: "FloatingToolbar",
|
|
11
|
+
props: {
|
|
12
|
+
open: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
15
|
+
},
|
|
16
|
+
anchor: { default: null },
|
|
17
|
+
placement: { default: "top" },
|
|
18
|
+
gap: { default: 8 },
|
|
19
|
+
label: {},
|
|
20
|
+
orientation: { default: "horizontal" },
|
|
21
|
+
teleportTo: { default: "body" },
|
|
22
|
+
dock: { default: "none" }
|
|
23
|
+
},
|
|
24
|
+
emits: ["close", "update:open"],
|
|
25
|
+
setup(e, { expose: f, emit: S }) {
|
|
26
|
+
let C = e, w = S, { layerProps: T } = t({ overlay: !0 }), E = _(null), D = _(C.placement), O = _({
|
|
27
|
+
top: 0,
|
|
28
|
+
left: 0
|
|
29
|
+
}), k = _(!1), A = c(() => ({
|
|
30
|
+
top: `${O.value.top}px`,
|
|
31
|
+
left: `${O.value.left}px`
|
|
32
|
+
}));
|
|
33
|
+
function j(e) {
|
|
34
|
+
return "getBoundingClientRect" in e ? e.getBoundingClientRect() : e;
|
|
35
|
+
}
|
|
36
|
+
function M() {
|
|
37
|
+
let e = E.value;
|
|
38
|
+
if (!e || !C.anchor) return;
|
|
39
|
+
let t = j(C.anchor), n = i();
|
|
40
|
+
k.value = n.width > 0 && n.height > 0 && (t.top + t.height < 0 || t.top > n.height || t.left + t.width < 0 || t.left > n.width);
|
|
41
|
+
let a = r(t, {
|
|
42
|
+
width: e.offsetWidth,
|
|
43
|
+
height: e.offsetHeight
|
|
44
|
+
}, {
|
|
45
|
+
side: C.placement,
|
|
46
|
+
gap: C.gap,
|
|
47
|
+
viewport: n
|
|
48
|
+
});
|
|
49
|
+
D.value = a.side, O.value = {
|
|
50
|
+
top: a.top,
|
|
51
|
+
left: a.left
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
let N = o(E, {
|
|
55
|
+
orientation: () => C.orientation,
|
|
56
|
+
includeFields: !0
|
|
57
|
+
});
|
|
58
|
+
function P(e) {
|
|
59
|
+
if (e.key === "Escape") {
|
|
60
|
+
e.preventDefault(), e.stopPropagation(), w("close"), w("update:open", !1);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
N.onKeydown(e);
|
|
64
|
+
}
|
|
65
|
+
let F = N.onFocusIn;
|
|
66
|
+
function I(e) {
|
|
67
|
+
e.target?.closest("input, textarea, select, [contenteditable=\"true\"]") || e.preventDefault();
|
|
68
|
+
}
|
|
69
|
+
let L = N.focus;
|
|
70
|
+
function R() {
|
|
71
|
+
window.addEventListener("resize", M), window.addEventListener("scroll", M, !0);
|
|
72
|
+
}
|
|
73
|
+
function z() {
|
|
74
|
+
typeof window > "u" || (window.removeEventListener("resize", M), window.removeEventListener("scroll", M, !0));
|
|
75
|
+
}
|
|
76
|
+
let B = c(() => C.open && !!C.anchor), { phone: V } = n(), H = c(() => C.dock === "phone" && V.value);
|
|
77
|
+
return a(() => B.value && C.dock === "phone"), b(B, (e) => {
|
|
78
|
+
typeof window > "u" || (z(), e && (N.activeIndex.value = 0, m(() => {
|
|
79
|
+
R(), N.sync(), M(), requestAnimationFrame(M);
|
|
80
|
+
})));
|
|
81
|
+
}, { immediate: !0 }), b(() => [
|
|
82
|
+
C.anchor,
|
|
83
|
+
C.placement,
|
|
84
|
+
C.gap
|
|
85
|
+
], () => {
|
|
86
|
+
B.value && m(M);
|
|
87
|
+
}), h(z), f({
|
|
88
|
+
reposition: M,
|
|
89
|
+
focus: L,
|
|
90
|
+
el: E
|
|
91
|
+
}), (t, n) => (g(), l(s, { to: e.teleportTo }, [e.open && e.anchor ? (g(), d("div", p({
|
|
92
|
+
key: 0,
|
|
93
|
+
ref_key: "toolbarRef",
|
|
94
|
+
ref: E,
|
|
95
|
+
class: [
|
|
96
|
+
"nb-floating-toolbar",
|
|
97
|
+
`nb-floating-toolbar--${D.value}`,
|
|
98
|
+
`nb-floating-toolbar--${e.orientation}`,
|
|
99
|
+
{
|
|
100
|
+
"nb-floating-toolbar--anchor-hidden": k.value && !H.value,
|
|
101
|
+
"nb-floating-toolbar--docked": H.value
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}, y(T), {
|
|
105
|
+
role: "toolbar",
|
|
106
|
+
"aria-label": e.label,
|
|
107
|
+
"aria-orientation": e.orientation,
|
|
108
|
+
style: H.value ? void 0 : A.value,
|
|
109
|
+
onMousedown: I,
|
|
110
|
+
onKeydown: P,
|
|
111
|
+
onFocusin: n[0] ||= (...e) => y(F) && y(F)(...e)
|
|
112
|
+
}), [v(t.$slots, "default", {}, void 0, !0)], 16, x)) : u("", !0)], 8, ["to"]));
|
|
113
|
+
}
|
|
114
|
+
}), [["__scopeId", "data-v-2d3a10c5"]]);
|
|
115
|
+
//#endregion
|
|
116
|
+
export { S as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./composables/useSurfaceLayer.composable.cjs`),n=require(`./composables/usePhoneLayout.composable.cjs`),r=require(`./utils/anchorPosition.helper.cjs`),i=require(`./composables/useVisualViewportVar.composable.cjs`),a=require(`./composables/useRovingFocus.composable.cjs`);let o=require(`vue`);var s=[`aria-label`,`aria-orientation`],c=(0,o.defineComponent)({__name:`FloatingToolbar`,props:{open:{type:Boolean,default:!1},anchor:{default:null},placement:{default:`top`},gap:{default:8},label:{},orientation:{default:`horizontal`},teleportTo:{default:`body`},dock:{default:`none`}},emits:[`close`,`update:open`],setup(e,{expose:c,emit:l}){let u=e,d=l,{layerProps:f}=t.useSurfaceLayer({overlay:!0}),p=(0,o.ref)(null),m=(0,o.ref)(u.placement),h=(0,o.ref)({top:0,left:0}),g=(0,o.ref)(!1),_=(0,o.computed)(()=>({top:`${h.value.top}px`,left:`${h.value.left}px`}));function v(e){return`getBoundingClientRect`in e?e.getBoundingClientRect():e}function y(){let e=p.value;if(!e||!u.anchor)return;let t=v(u.anchor),n=r.viewportSize();g.value=n.width>0&&n.height>0&&(t.top+t.height<0||t.top>n.height||t.left+t.width<0||t.left>n.width);let i=r.placeAnchored(t,{width:e.offsetWidth,height:e.offsetHeight},{side:u.placement,gap:u.gap,viewport:n});m.value=i.side,h.value={top:i.top,left:i.left}}let b=a.useRovingFocus(p,{orientation:()=>u.orientation,includeFields:!0});function x(e){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),d(`close`),d(`update:open`,!1);return}b.onKeydown(e)}let S=b.onFocusIn;function C(e){e.target?.closest(`input, textarea, select, [contenteditable="true"]`)||e.preventDefault()}let w=b.focus;function T(){window.addEventListener(`resize`,y),window.addEventListener(`scroll`,y,!0)}function E(){typeof window>`u`||(window.removeEventListener(`resize`,y),window.removeEventListener(`scroll`,y,!0))}let D=(0,o.computed)(()=>u.open&&!!u.anchor),{phone:O}=n.usePhoneLayout(),k=(0,o.computed)(()=>u.dock===`phone`&&O.value);return i.useVisualViewportVar(()=>D.value&&u.dock===`phone`),(0,o.watch)(D,e=>{typeof window>`u`||(E(),e&&(b.activeIndex.value=0,(0,o.nextTick)(()=>{T(),b.sync(),y(),requestAnimationFrame(y)})))},{immediate:!0}),(0,o.watch)(()=>[u.anchor,u.placement,u.gap],()=>{D.value&&(0,o.nextTick)(y)}),(0,o.onBeforeUnmount)(E),c({reposition:y,focus:w,el:p}),(t,n)=>((0,o.openBlock)(),(0,o.createBlock)(o.Teleport,{to:e.teleportTo},[e.open&&e.anchor?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,(0,o.mergeProps)({key:0,ref_key:`toolbarRef`,ref:p,class:[`nb-floating-toolbar`,`nb-floating-toolbar--${m.value}`,`nb-floating-toolbar--${e.orientation}`,{"nb-floating-toolbar--anchor-hidden":g.value&&!k.value,"nb-floating-toolbar--docked":k.value}]},(0,o.unref)(f),{role:`toolbar`,"aria-label":e.label,"aria-orientation":e.orientation,style:k.value?void 0:_.value,onMousedown:C,onKeydown:x,onFocusin:n[0]||=(...e)=>(0,o.unref)(S)&&(0,o.unref)(S)(...e)}),[(0,o.renderSlot)(t.$slots,`default`,{},void 0,!0)],16,s)):(0,o.createCommentVNode)(``,!0)],8,[`to`]))}}),l=e.t(c,[[`__scopeId`,`data-v-2d3a10c5`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Grid-
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Grid-BOtE_jXr.cjs`);let t=require(`vue`);var n=(0,t.defineComponent)({__name:`Form`,props:{title:{default:void 0}},setup(n){return(r,i)=>((0,t.openBlock)(),(0,t.createBlock)(e.t,{is:`form`,dir:`col`,gap:`md`,class:`nb-form`},{default:(0,t.withCtx)(()=>[n.title?((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:0,is:`h4`,class:`nb-form--header`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.title),1)]),_:1})):(0,t.createCommentVNode)(``,!0),r.$slots.message?((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:1,is:`p`,class:`nb-form--message`},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`message`)]),_:3})):(0,t.createCommentVNode)(``,!0),r.$slots.default?((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:2,is:`div`,dir:`col`,gap:`sm`,class:`nb-form--body`},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`default`)]),_:3})):(0,t.createCommentVNode)(``,!0),r.$slots.footer?((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:3,is:`footer`,class:`nb-form--footer`,justify:`end`},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`footer`)]),_:3})):(0,t.createCommentVNode)(``,!0)]),_:3}))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./Grid-
|
|
1
|
+
import { t as e } from "./Grid-B7d8x0tA.js";
|
|
2
2
|
import { createBlock as t, createCommentVNode as n, createTextVNode as r, defineComponent as i, openBlock as a, renderSlot as o, toDisplayString as s, withCtx as c } from "vue";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/components/Form.vue
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./composables/useNbStrings.composable.cjs`),n=require(`./palette-B7XEOMVB.cjs`),r=require(`./ChartLegend-C81jju4k.cjs`),i=require(`./scales-B8IbC7t_.cjs`);let a=require(`vue`);var o={class:`nb-gantt__list-body`},s=[`onClick`],c={class:`nb-gantt__list-group-label`},l=[`onMouseenter`],u=[`title`],d=[`width`],f={class:`nb-gantt__time-header`},p=[`x`,`y`],m=[`x1`,`x2`],h=[`width`,`height`,`aria-label`],g={key:0},_=[`x1`,`x2`,`y2`],v=[`y`,`width`,`height`],y=[`x1`,`x2`,`y2`],b=[`x`,`y`,`width`,`height`],x=[`points`],ee=[`points`],te=[`x`,`y`,`width`,`height`,`fill`,`onMouseenter`,`onMousemove`],ne=[`x`,`y`,`width`,`height`,`fill`],re=[`points`,`fill`,`onMouseenter`,`onMousemove`],ie=[`d`],ae=[`points`],oe=[`y`,`width`,`height`,`onMouseenter`],S=40,C=(0,a.defineComponent)({__name:`GanttChart`,props:{tasks:{default:()=>[]},dependencies:{default:()=>[]},groups:{default:()=>[]},timeScale:{default:`week`},locale:{default:void 0},rowHeight:{default:36},listWidth:{default:200},showTodayMarker:{type:Boolean,default:!0},today:{default:void 0},showProgress:{type:Boolean,default:!0},statusColors:{default:void 0},title:{default:void 0},subtitle:{default:void 0},height:{default:400},showLegend:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>n.n}},setup(e){let C=t.useNbStrings(),w=e,T=(0,a.computed)(()=>w.locale||(typeof navigator<`u`?navigator.language:``)||`en`),E={default:n.r(1),"on-track":n.r(3),"at-risk":n.r(4),behind:n.r(5),complete:n.r(2)},D=(0,a.computed)(()=>({...E,...w.statusColors})),O=(0,a.computed)(()=>Math.round(w.rowHeight*.22)),k=(0,a.computed)(()=>w.rowHeight-O.value*2),A=(0,a.computed)(()=>Math.round(w.rowHeight*.28)),j=(0,a.ref)(new Set((w.groups??[]).filter(e=>e.collapsed).map(e=>e.id))),se=e=>{let t=new Set(j.value);t.has(e)?t.delete(e):t.add(e),j.value=t},ce=(0,a.computed)(()=>(w.groups?.length??0)>0),M=(0,a.computed)(()=>{let e=w.tasks??[],t=w.groups??[];if(!t.length)return e.map(e=>({id:e.id,label:e.label,type:`task`,milestone:e.milestone}));let n=[],r=new Map(t.map(e=>[e.id,e])),i=new Map,a=[];for(let t of e)if(t.group&&r.has(t.group)){let e=i.get(t.group)??[];e.push(t),i.set(t.group,e)}else a.push(t);for(let e of t)if(n.push({id:e.id,label:e.label,type:`group`}),!j.value.has(e.id))for(let t of i.get(e.id)??[])n.push({id:t.id,label:t.label,type:`task`,milestone:t.milestone,indent:!0});for(let e of a)n.push({id:e.id,label:e.label,type:`task`,milestone:e.milestone});return n}),le=(0,a.computed)(()=>M.value.filter(e=>e.type===`task`)),N=(0,a.computed)(()=>{let e=new Map;return M.value.forEach((t,n)=>e.set(t.id,n)),e}),P=e=>typeof e==`string`?new Date(e).getTime():e.getTime(),F=(0,a.computed)(()=>{let e=w.tasks??[];if(!e.length){let e=Date.now();return[e,e+7*864e5]}let t=1/0,n=-1/0;for(let r of e){let e=P(r.start),i=r.end?P(r.end):e;e<t&&(t=e),i>n&&(n=i)}let r=I(w.timeScale);return[t-r,n+r]}),I=e=>{let t=864e5;return e===`day`?t:e===`week`?7*t:e===`month`?30*t:e===`quarter`?91*t:365*t},L=(0,a.computed)(()=>{let e=w.timeScale;return e===`day`?40:e===`week`?120:e===`month`?180:e===`quarter`?240:360}),R=(0,a.computed)(()=>L.value/I(w.timeScale)),z=(0,a.computed)(()=>F.value[0]),B=(0,a.computed)(()=>Math.max(200,Math.ceil((F.value[1]-F.value[0])*R.value))),V=(0,a.computed)(()=>M.value.length*w.rowHeight),H=(0,a.computed)(()=>i.a(new Date(F.value[0]),new Date(F.value[1]),w.timeScale,R.value,z.value)),U=(0,a.computed)(()=>{if(!w.showTodayMarker)return null;let e=i.n(w.today?new Date(w.today):new Date,z.value,R.value);return e<0||e>B.value?null:e}),W=(e,t)=>e.color?e.color:e.status&&e.status!==`default`?D.value[e.status]:n.i(t,w.colors),G=e=>(typeof e==`string`?new Date(e):e).toLocaleDateString(T.value,{month:`short`,day:`numeric`,year:`numeric`}),ue=(0,a.computed)(()=>(w.tasks??[]).filter(e=>!e.milestone&&e.end).map((e,t)=>{let n=N.value.get(e.id);if(n===void 0)return null;let r=i.n(e.start,z.value,R.value),a=i.n(e.end,z.value,R.value);return{id:e.id,x:r,y:n*w.rowHeight,width:Math.max(a-r,4),color:W(e,t),status:e.status??`default`,progress:e.progress??0,label:e.label,start:G(e.start),end:G(e.end)}}).filter(Boolean)),de=(0,a.computed)(()=>(w.tasks??[]).filter(e=>e.milestone).map((e,t)=>{let n=N.value.get(e.id);return n===void 0?null:{id:e.id,x:i.n(e.start,z.value,R.value),y:n*w.rowHeight,color:W(e,t),label:e.label,date:G(e.start)}}).filter(Boolean)),fe=(0,a.computed)(()=>{let e=w.groups??[],t=w.tasks??[];return e.length?e.map(e=>{let n=N.value.get(e.id);if(n===void 0)return null;let r=t.filter(t=>t.group===e.id);if(!r.length)return null;let a=1/0,o=-1/0;for(let e of r){let t=P(e.start),n=e.end?P(e.end):t;t<a&&(a=t),n>o&&(o=n)}let s=i.n(new Date(a),z.value,R.value),c=i.n(new Date(o),z.value,R.value);return{id:e.id,x:s,y:n*w.rowHeight,width:Math.max(c-s,4)}}).filter(Boolean):[]}),K=(e,t)=>`${e},${t} ${e-5},${t+5} ${e+5},${t+5}`,q=(e,t,n)=>`${e},${t-n} ${e+n},${t} ${e},${t+n} ${e-n},${t}`,J=(0,a.computed)(()=>{let e=w.dependencies??[];if(!e.length)return[];let t=new Map((w.tasks??[]).map(e=>[e.id,e]));return e.map(e=>{let n=t.get(e.from),r=t.get(e.to);if(!n||!r)return null;let a=N.value.get(e.from),o=N.value.get(e.to);if(a===void 0||o===void 0)return null;let s=e.type??`finish-to-start`,c=w.rowHeight,l,u,d,f;s===`finish-to-start`?(l=n.milestone?i.n(n.start,z.value,R.value)+A.value:i.n(n.end??n.start,z.value,R.value),u=a*c+c/2,d=r.milestone?i.n(r.start,z.value,R.value)-A.value:i.n(r.start,z.value,R.value),f=o*c+c/2):s===`start-to-start`?(l=i.n(n.start,z.value,R.value),u=a*c+c/2,d=i.n(r.start,z.value,R.value),f=o*c+c/2):s===`finish-to-finish`?(l=i.n(n.end??n.start,z.value,R.value),u=a*c+c/2,d=i.n(r.end??r.start,z.value,R.value),f=o*c+c/2):(l=i.n(n.start,z.value,R.value),u=a*c+c/2,d=i.n(r.end??r.start,z.value,R.value),f=o*c+c/2);let p=l+(d-l)*.5,m=d>l+12?`M${l},${u} H${p} V${f} H${d}`:`M${l},${u} H${l+12} V${(u+f)/2} H${d-12} V${f} H${d}`,h=d,g=f;return{path:m,arrowhead:`${h},${g} ${h-6},${g-4} ${h-6},${g+4}`}}).filter(Boolean)}),Y=(0,a.ref)(null),X=(0,a.ref)(null),Z=(0,a.reactive)({x:0,y:0}),Q=(0,a.ref)(null),pe=(e,t)=>{if(!Y.value)return;let n=Y.value.getBoundingClientRect();Z.x=e.clientX-n.left+12,Z.y=e.clientY-n.top+12,X.value=t.id,Q.value={title:t.label,rows:[{label:`Start`,value:t.start,color:t.color},{label:`End`,value:t.end,color:t.color},...t.progress>0?[{label:`Progress`,value:`${t.progress}%`,color:t.color}]:[]]}},me=(e,t)=>{if(!Y.value)return;let n=Y.value.getBoundingClientRect();Z.x=e.clientX-n.left+12,Z.y=e.clientY-n.top+12,X.value=t.id,Q.value={title:t.label,rows:[{label:`Date`,value:t.date,color:t.color}]}},$=(0,a.computed)(()=>{let e=new Set;for(let t of w.tasks??[])e.add(t.status??`default`);let t={default:`Default`,"on-track":`On track`,"at-risk":`At risk`,behind:`Behind`,complete:`Complete`};return Array.from(e).map(e=>({label:t[e],color:D.value[e]}))});return(t,i)=>((0,a.openBlock)(),(0,a.createBlock)(n.u,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":e.showLegend&&$.value.length>1},{legend:(0,a.withCtx)(()=>[(0,a.createVNode)(r.t,{items:$.value},null,8,[`items`])]),default:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`div`,{class:(0,a.normalizeClass)([`nb-gantt`,{"nb-gantt--has-groups":ce.value}])},[(0,a.createElementVNode)(`div`,{class:`nb-gantt__list`,style:(0,a.normalizeStyle)({width:`${e.listWidth}px`})},[(0,a.createElementVNode)(`div`,{class:`nb-gantt__list-header`,style:(0,a.normalizeStyle)({height:`${S}px`})},` Tasks `,4),(0,a.createElementVNode)(`div`,o,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(M.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:t.id},[t.type===`group`?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:0,class:`nb-gantt__list-group`,style:(0,a.normalizeStyle)({height:`${e.rowHeight}px`}),onClick:e=>se(t.id)},[(0,a.createElementVNode)(`span`,{class:(0,a.normalizeClass)([`nb-gantt__list-caret`,{"is-collapsed":j.value.has(t.id)}])},`▸`,2),(0,a.createElementVNode)(`span`,c,(0,a.toDisplayString)(t.label),1)],12,s)):((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:1,class:(0,a.normalizeClass)([`nb-gantt__list-row`,{"is-hovered":X.value===t.id,"is-milestone":t.milestone}]),style:(0,a.normalizeStyle)({height:`${e.rowHeight}px`,paddingLeft:t.indent?`20px`:void 0}),onMouseenter:e=>X.value=t.id,onMouseleave:i[0]||=e=>X.value=null},[(0,a.createElementVNode)(`span`,{class:`nb-gantt__list-label`,title:t.label},(0,a.toDisplayString)(t.label),9,u)],46,l))],64))),128))])],4),(0,a.createElementVNode)(`div`,{ref_key:`timelineEl`,ref:Y,class:`nb-gantt__timeline`},[((0,a.openBlock)(),(0,a.createElementBlock)(`svg`,{class:`nb-gantt__header-svg`,width:B.value,height:S},[(0,a.createElementVNode)(`g`,f,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(H.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`text`,{key:`th-${t}`,x:e.x+4,y:S-6,class:`nb-gantt__time-label`},(0,a.toDisplayString)(e.label),9,p))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(H.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:`tl-${t}`,x1:e.x,x2:e.x,y1:0,y2:S,class:`nb-gantt__header-gridline`},null,8,m))),128))])],8,d)),((0,a.openBlock)(),(0,a.createElementBlock)(`svg`,{class:`nb-gantt__svg`,width:B.value,height:V.value,role:`img`,"aria-label":e.title||(0,a.unref)(C).chartGantt,onMouseleave:i[4]||=e=>X.value=null},[e.showGrid?((0,a.openBlock)(),(0,a.createElementBlock)(`g`,g,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(H.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:`grid-${t}`,class:`nb-gantt__gridline`,x1:e.x,x2:e.x,y1:0,y2:V.value},null,8,_))),128))])):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`g`,null,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(M.value,(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`rect`,{key:`stripe-${t.id}`,class:(0,a.normalizeClass)([`nb-gantt__row-stripe`,{"is-even":n%2==0,"is-group":t.type===`group`}]),x:0,y:n*e.rowHeight,width:B.value,height:e.rowHeight},null,10,v))),128))]),e.showTodayMarker&&U.value!==null?((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:1,class:`nb-gantt__today-line`,x1:U.value,x2:U.value,y1:0,y2:V.value},null,8,y)):(0,a.createCommentVNode)(``,!0),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(fe.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`g`,{key:`summary-${t.id}`},[(0,a.createElementVNode)(`rect`,{class:`nb-gantt__summary-bar`,x:t.x,y:t.y+e.rowHeight*.35,width:Math.max(t.width,2),height:e.rowHeight*.3,rx:`2`},null,8,b),(0,a.createElementVNode)(`polygon`,{class:`nb-gantt__summary-caret`,points:K(t.x,t.y+e.rowHeight*.65)},null,8,x),(0,a.createElementVNode)(`polygon`,{class:`nb-gantt__summary-caret`,points:K(t.x+t.width,t.y+e.rowHeight*.65)},null,8,ee)]))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(ue.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`g`,{key:`bar-${t.id}`},[(0,a.createElementVNode)(`rect`,{class:(0,a.normalizeClass)([`nb-gantt__bar`,[`nb-gantt__bar--${t.status}`,{"is-hovered":X.value===t.id,"is-dim":X.value!==null&&X.value!==t.id}]]),x:t.x,y:t.y+O.value,width:Math.max(t.width,4),height:k.value,rx:`3`,fill:t.color,onMouseenter:e=>X.value=t.id,onMouseleave:i[1]||=e=>X.value=null,onMousemove:e=>pe(e,t)},null,42,te),e.showProgress&&t.progress>0?((0,a.openBlock)(),(0,a.createElementBlock)(`rect`,{key:0,class:`nb-gantt__bar-progress`,x:t.x,y:t.y+O.value,width:Math.max(t.width*(t.progress/100),2),height:k.value,rx:`3`,fill:t.color,"pointer-events":`none`},null,8,ne)):(0,a.createCommentVNode)(``,!0)]))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(de.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`g`,{key:`ms-${t.id}`},[(0,a.createElementVNode)(`polygon`,{class:(0,a.normalizeClass)([`nb-gantt__milestone`,{"is-hovered":X.value===t.id,"is-dim":X.value!==null&&X.value!==t.id}]),points:q(t.x,t.y+e.rowHeight/2,A.value),fill:t.color,onMouseenter:e=>X.value=t.id,onMouseleave:i[2]||=e=>X.value=null,onMousemove:e=>me(e,t)},null,42,re)]))),128)),(0,a.createElementVNode)(`g`,null,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(J.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`path`,{key:`dep-${t}`,class:`nb-gantt__dependency`,d:e.path,fill:`none`},null,8,ie))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(J.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`polygon`,{key:`dep-arrow-${t}`,class:`nb-gantt__dependency-arrow`,points:e.arrowhead},null,8,ae))),128))]),(0,a.createElementVNode)(`g`,null,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(le.value,(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`rect`,{key:`hover-${t.id}`,x:0,y:n*e.rowHeight,width:B.value,height:e.rowHeight,fill:`transparent`,onMouseenter:e=>X.value=t.id,onMouseleave:i[3]||=e=>X.value=null},null,40,oe))),128))])],40,h)),(0,a.createVNode)(n.l,{visible:e.showTooltip&&X.value!==null&&Q.value!==null,x:Z.x,y:Z.y,title:Q.value?.title??``,rows:Q.value?.rows??[]},null,8,[`visible`,`x`,`y`,`title`,`rows`])],512)],2)]),_:1},8,[`title`,`subtitle`,`height`,`show-legend`]))}}),w=e.t(C,[[`__scopeId`,`data-v-b4a32e39`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return w}});
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./composables/useNbStrings.composable.cjs`),n=require(`./palette-LbOzdAXj.cjs`),r=require(`./ChartLegend-COJeG-2B.cjs`),i=require(`./scales-BRSHTjbp.cjs`);let a=require(`vue`);var o={class:`nb-gantt__list-body`},s=[`onClick`],c={class:`nb-gantt__list-group-label`},l=[`onMouseenter`],u=[`title`],d=[`width`],f={class:`nb-gantt__time-header`},p=[`x`,`y`],m=[`x1`,`x2`],h=[`width`,`height`,`aria-label`],g={key:0},_=[`x1`,`x2`,`y2`],v=[`y`,`width`,`height`],y=[`x1`,`x2`,`y2`],b=[`x`,`y`,`width`,`height`],x=[`points`],ee=[`points`],te=[`x`,`y`,`width`,`height`,`fill`,`onMouseenter`,`onMousemove`],ne=[`x`,`y`,`width`,`height`,`fill`],re=[`points`,`fill`,`onMouseenter`,`onMousemove`],ie=[`d`],ae=[`points`],oe=[`y`,`width`,`height`,`onMouseenter`],S=40,C=(0,a.defineComponent)({__name:`GanttChart`,props:{tasks:{default:()=>[]},dependencies:{default:()=>[]},groups:{default:()=>[]},timeScale:{default:`week`},locale:{default:void 0},rowHeight:{default:36},listWidth:{default:200},showTodayMarker:{type:Boolean,default:!0},today:{default:void 0},showProgress:{type:Boolean,default:!0},statusColors:{default:void 0},title:{default:void 0},subtitle:{default:void 0},height:{default:400},showLegend:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>n.n}},setup(e){let C=t.useNbStrings(),w=e,T=(0,a.computed)(()=>w.locale||(typeof navigator<`u`?navigator.language:``)||`en`),E={default:n.r(1),"on-track":n.r(3),"at-risk":n.r(4),behind:n.r(5),complete:n.r(2)},D=(0,a.computed)(()=>({...E,...w.statusColors})),O=(0,a.computed)(()=>Math.round(w.rowHeight*.22)),k=(0,a.computed)(()=>w.rowHeight-O.value*2),A=(0,a.computed)(()=>Math.round(w.rowHeight*.28)),j=(0,a.ref)(new Set((w.groups??[]).filter(e=>e.collapsed).map(e=>e.id))),se=e=>{let t=new Set(j.value);t.has(e)?t.delete(e):t.add(e),j.value=t},ce=(0,a.computed)(()=>(w.groups?.length??0)>0),M=(0,a.computed)(()=>{let e=w.tasks??[],t=w.groups??[];if(!t.length)return e.map(e=>({id:e.id,label:e.label,type:`task`,milestone:e.milestone}));let n=[],r=new Map(t.map(e=>[e.id,e])),i=new Map,a=[];for(let t of e)if(t.group&&r.has(t.group)){let e=i.get(t.group)??[];e.push(t),i.set(t.group,e)}else a.push(t);for(let e of t)if(n.push({id:e.id,label:e.label,type:`group`}),!j.value.has(e.id))for(let t of i.get(e.id)??[])n.push({id:t.id,label:t.label,type:`task`,milestone:t.milestone,indent:!0});for(let e of a)n.push({id:e.id,label:e.label,type:`task`,milestone:e.milestone});return n}),le=(0,a.computed)(()=>M.value.filter(e=>e.type===`task`)),N=(0,a.computed)(()=>{let e=new Map;return M.value.forEach((t,n)=>e.set(t.id,n)),e}),P=e=>typeof e==`string`?new Date(e).getTime():e.getTime(),F=(0,a.computed)(()=>{let e=w.tasks??[];if(!e.length){let e=Date.now();return[e,e+7*864e5]}let t=1/0,n=-1/0;for(let r of e){let e=P(r.start),i=r.end?P(r.end):e;e<t&&(t=e),i>n&&(n=i)}let r=I(w.timeScale);return[t-r,n+r]}),I=e=>{let t=864e5;return e===`day`?t:e===`week`?7*t:e===`month`?30*t:e===`quarter`?91*t:365*t},L=(0,a.computed)(()=>{let e=w.timeScale;return e===`day`?40:e===`week`?120:e===`month`?180:e===`quarter`?240:360}),R=(0,a.computed)(()=>L.value/I(w.timeScale)),z=(0,a.computed)(()=>F.value[0]),B=(0,a.computed)(()=>Math.max(200,Math.ceil((F.value[1]-F.value[0])*R.value))),V=(0,a.computed)(()=>M.value.length*w.rowHeight),H=(0,a.computed)(()=>i.a(new Date(F.value[0]),new Date(F.value[1]),w.timeScale,R.value,z.value)),U=(0,a.computed)(()=>{if(!w.showTodayMarker)return null;let e=i.n(w.today?new Date(w.today):new Date,z.value,R.value);return e<0||e>B.value?null:e}),W=(e,t)=>e.color?e.color:e.status&&e.status!==`default`?D.value[e.status]:n.i(t,w.colors),G=e=>(typeof e==`string`?new Date(e):e).toLocaleDateString(T.value,{month:`short`,day:`numeric`,year:`numeric`}),ue=(0,a.computed)(()=>(w.tasks??[]).filter(e=>!e.milestone&&e.end).map((e,t)=>{let n=N.value.get(e.id);if(n===void 0)return null;let r=i.n(e.start,z.value,R.value),a=i.n(e.end,z.value,R.value);return{id:e.id,x:r,y:n*w.rowHeight,width:Math.max(a-r,4),color:W(e,t),status:e.status??`default`,progress:e.progress??0,label:e.label,start:G(e.start),end:G(e.end)}}).filter(Boolean)),de=(0,a.computed)(()=>(w.tasks??[]).filter(e=>e.milestone).map((e,t)=>{let n=N.value.get(e.id);return n===void 0?null:{id:e.id,x:i.n(e.start,z.value,R.value),y:n*w.rowHeight,color:W(e,t),label:e.label,date:G(e.start)}}).filter(Boolean)),fe=(0,a.computed)(()=>{let e=w.groups??[],t=w.tasks??[];return e.length?e.map(e=>{let n=N.value.get(e.id);if(n===void 0)return null;let r=t.filter(t=>t.group===e.id);if(!r.length)return null;let a=1/0,o=-1/0;for(let e of r){let t=P(e.start),n=e.end?P(e.end):t;t<a&&(a=t),n>o&&(o=n)}let s=i.n(new Date(a),z.value,R.value),c=i.n(new Date(o),z.value,R.value);return{id:e.id,x:s,y:n*w.rowHeight,width:Math.max(c-s,4)}}).filter(Boolean):[]}),K=(e,t)=>`${e},${t} ${e-5},${t+5} ${e+5},${t+5}`,q=(e,t,n)=>`${e},${t-n} ${e+n},${t} ${e},${t+n} ${e-n},${t}`,J=(0,a.computed)(()=>{let e=w.dependencies??[];if(!e.length)return[];let t=new Map((w.tasks??[]).map(e=>[e.id,e]));return e.map(e=>{let n=t.get(e.from),r=t.get(e.to);if(!n||!r)return null;let a=N.value.get(e.from),o=N.value.get(e.to);if(a===void 0||o===void 0)return null;let s=e.type??`finish-to-start`,c=w.rowHeight,l,u,d,f;s===`finish-to-start`?(l=n.milestone?i.n(n.start,z.value,R.value)+A.value:i.n(n.end??n.start,z.value,R.value),u=a*c+c/2,d=r.milestone?i.n(r.start,z.value,R.value)-A.value:i.n(r.start,z.value,R.value),f=o*c+c/2):s===`start-to-start`?(l=i.n(n.start,z.value,R.value),u=a*c+c/2,d=i.n(r.start,z.value,R.value),f=o*c+c/2):s===`finish-to-finish`?(l=i.n(n.end??n.start,z.value,R.value),u=a*c+c/2,d=i.n(r.end??r.start,z.value,R.value),f=o*c+c/2):(l=i.n(n.start,z.value,R.value),u=a*c+c/2,d=i.n(r.end??r.start,z.value,R.value),f=o*c+c/2);let p=l+(d-l)*.5,m=d>l+12?`M${l},${u} H${p} V${f} H${d}`:`M${l},${u} H${l+12} V${(u+f)/2} H${d-12} V${f} H${d}`,h=d,g=f;return{path:m,arrowhead:`${h},${g} ${h-6},${g-4} ${h-6},${g+4}`}}).filter(Boolean)}),Y=(0,a.ref)(null),X=(0,a.ref)(null),Z=(0,a.reactive)({x:0,y:0}),Q=(0,a.ref)(null),pe=(e,t)=>{if(!Y.value)return;let n=Y.value.getBoundingClientRect();Z.x=e.clientX-n.left+12,Z.y=e.clientY-n.top+12,X.value=t.id,Q.value={title:t.label,rows:[{label:`Start`,value:t.start,color:t.color},{label:`End`,value:t.end,color:t.color},...t.progress>0?[{label:`Progress`,value:`${t.progress}%`,color:t.color}]:[]]}},me=(e,t)=>{if(!Y.value)return;let n=Y.value.getBoundingClientRect();Z.x=e.clientX-n.left+12,Z.y=e.clientY-n.top+12,X.value=t.id,Q.value={title:t.label,rows:[{label:`Date`,value:t.date,color:t.color}]}},$=(0,a.computed)(()=>{let e=new Set;for(let t of w.tasks??[])e.add(t.status??`default`);let t={default:`Default`,"on-track":`On track`,"at-risk":`At risk`,behind:`Behind`,complete:`Complete`};return Array.from(e).map(e=>({label:t[e],color:D.value[e]}))});return(t,i)=>((0,a.openBlock)(),(0,a.createBlock)(n.u,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":e.showLegend&&$.value.length>1},{legend:(0,a.withCtx)(()=>[(0,a.createVNode)(r.t,{items:$.value},null,8,[`items`])]),default:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`div`,{class:(0,a.normalizeClass)([`nb-gantt`,{"nb-gantt--has-groups":ce.value}])},[(0,a.createElementVNode)(`div`,{class:`nb-gantt__list`,style:(0,a.normalizeStyle)({width:`${e.listWidth}px`})},[(0,a.createElementVNode)(`div`,{class:`nb-gantt__list-header`,style:(0,a.normalizeStyle)({height:`${S}px`})},` Tasks `,4),(0,a.createElementVNode)(`div`,o,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(M.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:t.id},[t.type===`group`?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:0,class:`nb-gantt__list-group`,style:(0,a.normalizeStyle)({height:`${e.rowHeight}px`}),onClick:e=>se(t.id)},[(0,a.createElementVNode)(`span`,{class:(0,a.normalizeClass)([`nb-gantt__list-caret`,{"is-collapsed":j.value.has(t.id)}])},`▸`,2),(0,a.createElementVNode)(`span`,c,(0,a.toDisplayString)(t.label),1)],12,s)):((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:1,class:(0,a.normalizeClass)([`nb-gantt__list-row`,{"is-hovered":X.value===t.id,"is-milestone":t.milestone}]),style:(0,a.normalizeStyle)({height:`${e.rowHeight}px`,paddingLeft:t.indent?`20px`:void 0}),onMouseenter:e=>X.value=t.id,onMouseleave:i[0]||=e=>X.value=null},[(0,a.createElementVNode)(`span`,{class:`nb-gantt__list-label`,title:t.label},(0,a.toDisplayString)(t.label),9,u)],46,l))],64))),128))])],4),(0,a.createElementVNode)(`div`,{ref_key:`timelineEl`,ref:Y,class:`nb-gantt__timeline`},[((0,a.openBlock)(),(0,a.createElementBlock)(`svg`,{class:`nb-gantt__header-svg`,width:B.value,height:S},[(0,a.createElementVNode)(`g`,f,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(H.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`text`,{key:`th-${t}`,x:e.x+4,y:S-6,class:`nb-gantt__time-label`},(0,a.toDisplayString)(e.label),9,p))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(H.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:`tl-${t}`,x1:e.x,x2:e.x,y1:0,y2:S,class:`nb-gantt__header-gridline`},null,8,m))),128))])],8,d)),((0,a.openBlock)(),(0,a.createElementBlock)(`svg`,{class:`nb-gantt__svg`,width:B.value,height:V.value,role:`img`,"aria-label":e.title||(0,a.unref)(C).chartGantt,onMouseleave:i[4]||=e=>X.value=null},[e.showGrid?((0,a.openBlock)(),(0,a.createElementBlock)(`g`,g,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(H.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:`grid-${t}`,class:`nb-gantt__gridline`,x1:e.x,x2:e.x,y1:0,y2:V.value},null,8,_))),128))])):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`g`,null,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(M.value,(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`rect`,{key:`stripe-${t.id}`,class:(0,a.normalizeClass)([`nb-gantt__row-stripe`,{"is-even":n%2==0,"is-group":t.type===`group`}]),x:0,y:n*e.rowHeight,width:B.value,height:e.rowHeight},null,10,v))),128))]),e.showTodayMarker&&U.value!==null?((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:1,class:`nb-gantt__today-line`,x1:U.value,x2:U.value,y1:0,y2:V.value},null,8,y)):(0,a.createCommentVNode)(``,!0),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(fe.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`g`,{key:`summary-${t.id}`},[(0,a.createElementVNode)(`rect`,{class:`nb-gantt__summary-bar`,x:t.x,y:t.y+e.rowHeight*.35,width:Math.max(t.width,2),height:e.rowHeight*.3,rx:`2`},null,8,b),(0,a.createElementVNode)(`polygon`,{class:`nb-gantt__summary-caret`,points:K(t.x,t.y+e.rowHeight*.65)},null,8,x),(0,a.createElementVNode)(`polygon`,{class:`nb-gantt__summary-caret`,points:K(t.x+t.width,t.y+e.rowHeight*.65)},null,8,ee)]))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(ue.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`g`,{key:`bar-${t.id}`},[(0,a.createElementVNode)(`rect`,{class:(0,a.normalizeClass)([`nb-gantt__bar`,[`nb-gantt__bar--${t.status}`,{"is-hovered":X.value===t.id,"is-dim":X.value!==null&&X.value!==t.id}]]),x:t.x,y:t.y+O.value,width:Math.max(t.width,4),height:k.value,rx:`3`,fill:t.color,onMouseenter:e=>X.value=t.id,onMouseleave:i[1]||=e=>X.value=null,onMousemove:e=>pe(e,t)},null,42,te),e.showProgress&&t.progress>0?((0,a.openBlock)(),(0,a.createElementBlock)(`rect`,{key:0,class:`nb-gantt__bar-progress`,x:t.x,y:t.y+O.value,width:Math.max(t.width*(t.progress/100),2),height:k.value,rx:`3`,fill:t.color,"pointer-events":`none`},null,8,ne)):(0,a.createCommentVNode)(``,!0)]))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(de.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`g`,{key:`ms-${t.id}`},[(0,a.createElementVNode)(`polygon`,{class:(0,a.normalizeClass)([`nb-gantt__milestone`,{"is-hovered":X.value===t.id,"is-dim":X.value!==null&&X.value!==t.id}]),points:q(t.x,t.y+e.rowHeight/2,A.value),fill:t.color,onMouseenter:e=>X.value=t.id,onMouseleave:i[2]||=e=>X.value=null,onMousemove:e=>me(e,t)},null,42,re)]))),128)),(0,a.createElementVNode)(`g`,null,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(J.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`path`,{key:`dep-${t}`,class:`nb-gantt__dependency`,d:e.path,fill:`none`},null,8,ie))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(J.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`polygon`,{key:`dep-arrow-${t}`,class:`nb-gantt__dependency-arrow`,points:e.arrowhead},null,8,ae))),128))]),(0,a.createElementVNode)(`g`,null,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(le.value,(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`rect`,{key:`hover-${t.id}`,x:0,y:n*e.rowHeight,width:B.value,height:e.rowHeight,fill:`transparent`,onMouseenter:e=>X.value=t.id,onMouseleave:i[3]||=e=>X.value=null},null,40,oe))),128))])],40,h)),(0,a.createVNode)(n.l,{visible:e.showTooltip&&X.value!==null&&Q.value!==null,x:Z.x,y:Z.y,title:Q.value?.title??``,rows:Q.value?.rows??[]},null,8,[`visible`,`x`,`y`,`title`,`rows`])],512)],2)]),_:1},8,[`title`,`subtitle`,`height`,`show-legend`]))}}),w=e.t(C,[[`__scopeId`,`data-v-b4a32e39`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return w}});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
2
2
|
import { useNbStrings as t } from "./composables/useNbStrings.composable.mjs";
|
|
3
|
-
import { i as n, l as r, n as i, r as a, u as o } from "./palette-
|
|
4
|
-
import { t as s } from "./ChartLegend-
|
|
5
|
-
import { a as c, n as l } from "./scales-
|
|
3
|
+
import { i as n, l as r, n as i, r as a, u as o } from "./palette-6bEW4KUN.js";
|
|
4
|
+
import { t as s } from "./ChartLegend-LDNukufA.js";
|
|
5
|
+
import { a as c, n as l } from "./scales-BGzTviac.js";
|
|
6
6
|
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, normalizeClass as v, normalizeStyle as y, openBlock as b, reactive as ee, ref as x, renderList as S, toDisplayString as C, unref as te, withCtx as w } from "vue";
|
|
7
7
|
//#region src/components/Charts/GanttChart.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var T = { class: "nb-gantt__list-body" }, ne = ["onClick"], re = { class: "nb-gantt__list-group-label" }, ie = ["onMouseenter"], ae = ["title"], oe = ["width"], E = { class: "nb-gantt__time-header" }, se = ["x", "y"], ce = ["x1", "x2"], le = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./Grid-C0muGlj3.cjs`),n=require(`./vue-i18n-DIvTc6LM.cjs`);let r=require(`vue`);var i=function(e){return e.TopLeft=`top-left`,e.Top=`top`,e.TopRight=`top-right`,e.Right=`right`,e.BottomRight=`bottom-right`,e.Bottom=`bottom`,e.BottomLeft=`bottom-left`,e.Left=`left`,e}(i||{}),a={class:`nb-image-cropper`},o=[`onMousedown`,`onTouchstart`],s=[`src`,`alt`],c=700,l=400,u=(0,r.defineComponent)({__name:`ImageCropper`,props:{image:{},cropAsCircle:{type:Boolean,default:!1},outputAsCircle:{type:Boolean,default:!1},lockAspectRatio:{type:Boolean,default:!1},showPreview:{type:Boolean,default:!1}},emits:[`crop`],setup(e,{emit:u}){let d={en:{X:`X`,Y:`Y`,WIDTH:`Width`,HEIGHT:`Height`,IMAGE_THUMBNAIL:`Cropped preview`},pt:{X:`X`,Y:`Y`,WIDTH:`Largura`,HEIGHT:`Altura`,IMAGE_THUMBNAIL:`Pré-visualização recortada`}},{t:f,te:p,locale:m}=n.t({useScope:`global`});function h(e){if(p(e))return f(e);let t=e.slice(7);return d[String(m.value).toLowerCase().split(`-`)[0]]?.[t]??d.en[t]??e}let g=e,_=u,v=(0,r.ref)(null),y=null,b=new Image,x=null,S={x:1,y:1},C=(0,r.ref)({x:50,y:50,width:200,height:200}),w=(0,r.ref)(null),T=(0,r.ref)(null),E=!1,D=!1,O={x:0,y:0},k=!1,A={x:0,y:0},j={x:0,y:0,width:0,height:0},M=null,N=!1,P=[{name:i.TopLeft},{name:i.Top},{name:i.TopRight},{name:i.Right},{name:i.BottomRight},{name:i.Bottom},{name:i.BottomLeft},{name:i.Left}],F=()=>{if(!g.image){console.error(`No image file provided`);return}x&&=(URL.revokeObjectURL(x),null),b.onload=()=>{let{drawWidth:e,drawHeight:t}=I();if(v.value){v.value.width=e,v.value.height=t;let n=(v.value.width-b.width*S.x)/2,r=(v.value.height-b.height*S.y)/2;if(g.cropAsCircle||g.lockAspectRatio){let e=Math.min(b.width*S.x,b.height*S.y)*.5;C.value={x:n+(b.width*S.x-e)/2,y:r+(b.height*S.y-e)/2,width:e,height:e}}else C.value={x:n+(b.width*S.x*.5-b.width*S.x*.25),y:r+(b.height*S.y*.5-b.height*S.y*.25),width:b.width*S.x*.5,height:b.height*S.y*.5};L(),Q()}},b.onerror=()=>{console.error(`Failed to load image`)},x=URL.createObjectURL(g.image),b.src=x};(0,r.onMounted)(()=>{v.value&&(y=v.value.getContext(`2d`),y&&(y.imageSmoothingEnabled=!0,y.imageSmoothingQuality=`high`),g.image&&F())}),(0,r.onBeforeUnmount)(()=>{x&&=(URL.revokeObjectURL(x),null);let e=w.value;e&&(URL.revokeObjectURL(e),w.value=null)}),(0,r.watch)(()=>g.image,e=>{e&&F()}),(0,r.watch)(()=>[g.cropAsCircle,g.outputAsCircle,g.lockAspectRatio],()=>{v.value&&y&&L()});let I=()=>{let e=b.width/b.height,t=c,n=l;return e>c/l?n=c/e:t=l*e,S.x=t/b.width,S.y=n/b.height,{drawWidth:t,drawHeight:n}},L=()=>{if(y&&v.value){y.clearRect(0,0,v.value.width,v.value.height);let e=(v.value.width-b.width*S.x)/2,t=(v.value.height-b.height*S.y)/2;y.drawImage(b,0,0,b.width,b.height,e,t,b.width*S.x,b.height*S.y),R()}},R=()=>{y&&v.value&&(y.save(),y.beginPath(),g.cropAsCircle?y.arc(C.value.x+C.value.width/2,C.value.y+C.value.height/2,C.value.width/2,0,Math.PI*2):y.rect(C.value.x,C.value.y,C.value.width,C.value.height),y.rect(0,0,v.value.width,v.value.height),y.clip(`evenodd`),y.fillStyle=`rgba(0, 0, 0, 0.5)`,y.fillRect(0,0,v.value.width,v.value.height),y.restore(),y.save(),y.strokeStyle=`rgba(255, 255, 255, 0.8)`,y.lineWidth=1,y.setLineDash([5,5]),y.imageSmoothingEnabled=!1,g.cropAsCircle?(y.beginPath(),y.arc(C.value.x+C.value.width/2,C.value.y+C.value.height/2,C.value.width/2,0,Math.PI*2),y.stroke()):y.strokeRect(C.value.x,C.value.y,C.value.width,C.value.height),y.restore())},z=(0,r.computed)(()=>{if(g.cropAsCircle){let e=C.value.x+C.value.width/2,t=C.value.y+C.value.height/2,n=C.value.width/2;return{"top-left":{left:`${e-n-5}px`,top:`${t-n-5}px`},top:{left:`${e-5}px`,top:`${t-n-5}px`},"top-right":{left:`${e+n-5}px`,top:`${t-n-5}px`},right:{left:`${e+n-5}px`,top:`${t-5}px`},"bottom-right":{left:`${e+n-5}px`,top:`${t+n-5}px`},bottom:{left:`${e-5}px`,top:`${t+n-5}px`},"bottom-left":{left:`${e-n-5}px`,top:`${t+n-5}px`},left:{left:`${e-n-5}px`,top:`${t-5}px`}}}else return{"top-left":{left:`${C.value.x-5}px`,top:`${C.value.y-5}px`},top:{left:`${C.value.x+C.value.width/2-5}px`,top:`${C.value.y-5}px`},"top-right":{left:`${C.value.x+C.value.width-5}px`,top:`${C.value.y-5}px`},right:{left:`${C.value.x+C.value.width-5}px`,top:`${C.value.y+C.value.height/2-5}px`},"bottom-right":{left:`${C.value.x+C.value.width-5}px`,top:`${C.value.y+C.value.height-5}px`},bottom:{left:`${C.value.x+C.value.width/2-5}px`,top:`${C.value.y+C.value.height-5}px`},"bottom-left":{left:`${C.value.x-5}px`,top:`${C.value.y+C.value.height-5}px`},left:{left:`${C.value.x-5}px`,top:`${C.value.y+C.value.height/2-5}px`}}}),B=e=>{if(`touches`in e&&e.touches.length>0){let t=e.touches[0];return{clientX:t.clientX,clientY:t.clientY}}else if(`clientX`in e&&`clientY`in e)return{clientX:e.clientX,clientY:e.clientY};return{clientX:0,clientY:0}},V=e=>{let t=v.value;if(!t)return null;let{clientX:n,clientY:r}=B(e),{left:i,top:a}=t.getBoundingClientRect();return{x:n-i,y:r-a}},H=e=>{e.preventDefault();let t=V(e);if(!t)return;let{x:n,y:r}=t;X(n,r)&&(D=!0,E=!0,O={x:n-C.value.x,y:r-C.value.y})},U=e=>{D?G(e):k&&J(e)},W=()=>{D&&(K(),D=!1,Q()),k&&(Y(),Q()),E=!1,D=!1},G=e=>{if(E){let t=V(e);if(!t)return;let{x:n,y:r}=t;C.value.x=Math.floor(n-O.x),C.value.y=Math.floor(r-O.y),L()}},K=()=>{E&&=(Z(),L(),!1)},q=(e,t)=>{e.preventDefault();let n=V(e);n&&(k=!0,M=t,A={x:n.x,y:n.y},j={...C.value},N=e instanceof MouseEvent&&e.shiftKey)},J=e=>{if(!k)return;if(g.lockAspectRatio&&v.value){let t=V(e);if(!t)return;let{x:n,y:r}=t,i=j.x+j.width/2,a=j.y+j.height/2;if(g.cropAsCircle){let e=Math.max(Math.abs(n-i),Math.abs(r-a)),t=e*2;C.value={x:i-e,y:a-e,width:t,height:t}}else{let e=j.width/j.height,t=Math.abs(n-i),r=Math.max(t*2,50),o=r/e;C.value={x:i-r/2,y:a-o/2,width:r,height:o}}L();return}let t=V(e);if(!t)return;let{x:n,y:r}=t,i=n-A.x,a=r-A.y;N=e instanceof MouseEvent&&e.shiftKey;let o={...j};switch(M){case`top-left`:o.x+=i,o.y+=a,o.width-=i,o.height-=a;break;case`top`:o.y+=a,o.height-=a;break;case`top-right`:o.y+=a,o.width+=i,o.height-=a;break;case`right`:o.width+=i;break;case`bottom-right`:o.width+=i,o.height+=a;break;case`bottom`:o.height+=a;break;case`bottom-left`:o.x+=i,o.width-=i,o.height+=a;break;case`left`:o.x+=i,o.width-=i;break}if(o.width<50&&(o.width=50),o.height<50&&(o.height=50),N&&M){let e=j.width/j.height;[`left`,`right`].includes(M)?(o.height=o.width/e,M===`left`&&(o.y=j.y-(o.height-j.height)/2)):[`top`,`bottom`].includes(M)&&(o.width=o.height*e,M===`top`&&(o.x=j.x-(o.width-j.width)/2))}C.value=o,L()},Y=()=>{k&&(Z(),L(),k=!1,M=null)},X=(e,t)=>{if(g.cropAsCircle){let n=C.value.x+C.value.width/2,r=C.value.y+C.value.height/2,i=C.value.width/2,a=e-n,o=t-r;return a*a+o*o<=i*i}else return e>=C.value.x-2&&e<=C.value.x+C.value.width+2&&t>=C.value.y-2&&t<=C.value.y+C.value.height+2},Z=()=>{let e=v.value.width,t=v.value.height;if(C.value.width<50&&(C.value.width=50),C.value.height<50&&(C.value.height=50),g.lockAspectRatio)if(g.cropAsCircle)C.value.height=C.value.width;else{let e=j.width/j.height;C.value.height=C.value.width/e}else if(N){let e=j.width/j.height;C.value.height=C.value.width/e}if(g.cropAsCircle||g.lockAspectRatio){let n=C.value.width/C.value.height;(C.value.width>e||C.value.height>t)&&(C.value.width>C.value.height?(C.value.width=e,C.value.height=e/n):(C.value.height=t,C.value.width=t*n)),C.value.x<0&&(C.value.x=0),C.value.y<0&&(C.value.y=0),C.value.x+C.value.width>e&&(C.value.x=e-C.value.width),C.value.y+C.value.height>t&&(C.value.y=t-C.value.height)}else C.value.x<0&&(C.value.x=0),C.value.y<0&&(C.value.y=0),C.value.width>e&&(C.value.width=e,C.value.x=0),C.value.height>t&&(C.value.height=t,C.value.y=0),C.value.x+C.value.width>e&&(C.value.x=e-C.value.width),C.value.y+C.value.height>t&&(C.value.y=t-C.value.height)},Q=()=>{if(v.value&&y){let e=(v.value.width-b.width*S.x)/2,t=(v.value.height-b.height*S.y)/2,n=(C.value.x-e)/S.x,r=(C.value.y-t)/S.y,i=C.value.width/S.x,a=C.value.height/S.y,o={x:Math.round(n),y:Math.round(r),width:Math.round(i),height:Math.round(a)},s=Math.max(0,Math.min(o.x,b.width)),c=Math.max(0,Math.min(o.y,b.height)),l=Math.min(o.width,b.width-s),u=Math.min(o.height,b.height-c),d=document.createElement(`canvas`);d.width=l,d.height=u;let f=d.getContext(`2d`);f&&(f.drawImage(b,s,c,l,u,0,0,l,u),g.cropAsCircle&&g.outputAsCircle&&(f.globalCompositeOperation=`destination-in`,f.beginPath(),f.arc(l/2,u/2,l/2,0,Math.PI*2),f.closePath(),f.fill(),f.globalCompositeOperation=`source-over`),d.toBlob(e=>{if(e){let t=w.value;t&&URL.revokeObjectURL(t),w.value=URL.createObjectURL(e),T.value=o,_(`crop`,{blob:e,geometry:o})}},`image/jpeg`,.8))}};return(0,r.watch)(()=>g,()=>{Q()},{deep:!0}),(n,i)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,a,[(0,r.createElementVNode)(`div`,{class:`canvas-container`,onMousedown:H,onMousemove:U,onMouseup:W,onMouseleave:W,onTouchstart:H,onTouchmove:U,onTouchend:W},[(0,r.createElementVNode)(`canvas`,{ref_key:`canvas`,ref:v},null,512),((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(P,e=>(0,r.createElementVNode)(`div`,{key:e.name,class:(0,r.normalizeClass)([`resize-handle`,e.name]),style:(0,r.normalizeStyle)(z.value[e.name]),onMousedown:(0,r.withModifiers)(t=>q(t,e.name),[`stop`]),onTouchstart:(0,r.withModifiers)(t=>q(t,e.name),[`stop`])},null,46,o)),64))],32),e.showPreview&&w.value&&T.value?((0,r.openBlock)(),(0,r.createBlock)(t.t,{key:0,class:`cropped-image-preview`},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(t.t,{is:`ul`,dir:`col`,justify:`center`,gap:`sm`},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.X`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.x.toFixed(0)),1)]),(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.Y`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.y.toFixed(0)),1)]),(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.WIDTH`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.width.toFixed(0)),1)]),(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.HEIGHT`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.height.toFixed(0)),1)])]),_:1}),(0,r.createElementVNode)(`img`,{src:w.value,alt:h(`common.IMAGE_THUMBNAIL`)},null,8,s)]),_:1})):(0,r.createCommentVNode)(``,!0)]))}}),d=e.t(u,[[`__scopeId`,`data-v-057c9675`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}});
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./Grid-BOtE_jXr.cjs`),n=require(`./vue-i18n-ZdR0XDmN.cjs`);let r=require(`vue`);var i=function(e){return e.TopLeft=`top-left`,e.Top=`top`,e.TopRight=`top-right`,e.Right=`right`,e.BottomRight=`bottom-right`,e.Bottom=`bottom`,e.BottomLeft=`bottom-left`,e.Left=`left`,e}(i||{}),a={class:`nb-image-cropper`},o=[`onMousedown`,`onTouchstart`],s=[`src`,`alt`],c=700,l=400,u=(0,r.defineComponent)({__name:`ImageCropper`,props:{image:{},cropAsCircle:{type:Boolean,default:!1},outputAsCircle:{type:Boolean,default:!1},lockAspectRatio:{type:Boolean,default:!1},showPreview:{type:Boolean,default:!1}},emits:[`crop`],setup(e,{emit:u}){let d={en:{X:`X`,Y:`Y`,WIDTH:`Width`,HEIGHT:`Height`,IMAGE_THUMBNAIL:`Cropped preview`},pt:{X:`X`,Y:`Y`,WIDTH:`Largura`,HEIGHT:`Altura`,IMAGE_THUMBNAIL:`Pré-visualização recortada`}},{t:f,te:p,locale:m}=n.t({useScope:`global`});function h(e){if(p(e))return f(e);let t=e.slice(7);return d[String(m.value).toLowerCase().split(`-`)[0]]?.[t]??d.en[t]??e}let g=e,_=u,v=(0,r.ref)(null),y=null,b=new Image,x=null,S={x:1,y:1},C=(0,r.ref)({x:50,y:50,width:200,height:200}),w=(0,r.ref)(null),T=(0,r.ref)(null),E=!1,D=!1,O={x:0,y:0},k=!1,A={x:0,y:0},j={x:0,y:0,width:0,height:0},M=null,N=!1,P=[{name:i.TopLeft},{name:i.Top},{name:i.TopRight},{name:i.Right},{name:i.BottomRight},{name:i.Bottom},{name:i.BottomLeft},{name:i.Left}],F=()=>{if(!g.image){console.error(`No image file provided`);return}x&&=(URL.revokeObjectURL(x),null),b.onload=()=>{let{drawWidth:e,drawHeight:t}=I();if(v.value){v.value.width=e,v.value.height=t;let n=(v.value.width-b.width*S.x)/2,r=(v.value.height-b.height*S.y)/2;if(g.cropAsCircle||g.lockAspectRatio){let e=Math.min(b.width*S.x,b.height*S.y)*.5;C.value={x:n+(b.width*S.x-e)/2,y:r+(b.height*S.y-e)/2,width:e,height:e}}else C.value={x:n+(b.width*S.x*.5-b.width*S.x*.25),y:r+(b.height*S.y*.5-b.height*S.y*.25),width:b.width*S.x*.5,height:b.height*S.y*.5};L(),Q()}},b.onerror=()=>{console.error(`Failed to load image`)},x=URL.createObjectURL(g.image),b.src=x};(0,r.onMounted)(()=>{v.value&&(y=v.value.getContext(`2d`),y&&(y.imageSmoothingEnabled=!0,y.imageSmoothingQuality=`high`),g.image&&F())}),(0,r.onBeforeUnmount)(()=>{x&&=(URL.revokeObjectURL(x),null);let e=w.value;e&&(URL.revokeObjectURL(e),w.value=null)}),(0,r.watch)(()=>g.image,e=>{e&&F()}),(0,r.watch)(()=>[g.cropAsCircle,g.outputAsCircle,g.lockAspectRatio],()=>{v.value&&y&&L()});let I=()=>{let e=b.width/b.height,t=c,n=l;return e>c/l?n=c/e:t=l*e,S.x=t/b.width,S.y=n/b.height,{drawWidth:t,drawHeight:n}},L=()=>{if(y&&v.value){y.clearRect(0,0,v.value.width,v.value.height);let e=(v.value.width-b.width*S.x)/2,t=(v.value.height-b.height*S.y)/2;y.drawImage(b,0,0,b.width,b.height,e,t,b.width*S.x,b.height*S.y),R()}},R=()=>{y&&v.value&&(y.save(),y.beginPath(),g.cropAsCircle?y.arc(C.value.x+C.value.width/2,C.value.y+C.value.height/2,C.value.width/2,0,Math.PI*2):y.rect(C.value.x,C.value.y,C.value.width,C.value.height),y.rect(0,0,v.value.width,v.value.height),y.clip(`evenodd`),y.fillStyle=`rgba(0, 0, 0, 0.5)`,y.fillRect(0,0,v.value.width,v.value.height),y.restore(),y.save(),y.strokeStyle=`rgba(255, 255, 255, 0.8)`,y.lineWidth=1,y.setLineDash([5,5]),y.imageSmoothingEnabled=!1,g.cropAsCircle?(y.beginPath(),y.arc(C.value.x+C.value.width/2,C.value.y+C.value.height/2,C.value.width/2,0,Math.PI*2),y.stroke()):y.strokeRect(C.value.x,C.value.y,C.value.width,C.value.height),y.restore())},z=(0,r.computed)(()=>{if(g.cropAsCircle){let e=C.value.x+C.value.width/2,t=C.value.y+C.value.height/2,n=C.value.width/2;return{"top-left":{left:`${e-n-5}px`,top:`${t-n-5}px`},top:{left:`${e-5}px`,top:`${t-n-5}px`},"top-right":{left:`${e+n-5}px`,top:`${t-n-5}px`},right:{left:`${e+n-5}px`,top:`${t-5}px`},"bottom-right":{left:`${e+n-5}px`,top:`${t+n-5}px`},bottom:{left:`${e-5}px`,top:`${t+n-5}px`},"bottom-left":{left:`${e-n-5}px`,top:`${t+n-5}px`},left:{left:`${e-n-5}px`,top:`${t-5}px`}}}else return{"top-left":{left:`${C.value.x-5}px`,top:`${C.value.y-5}px`},top:{left:`${C.value.x+C.value.width/2-5}px`,top:`${C.value.y-5}px`},"top-right":{left:`${C.value.x+C.value.width-5}px`,top:`${C.value.y-5}px`},right:{left:`${C.value.x+C.value.width-5}px`,top:`${C.value.y+C.value.height/2-5}px`},"bottom-right":{left:`${C.value.x+C.value.width-5}px`,top:`${C.value.y+C.value.height-5}px`},bottom:{left:`${C.value.x+C.value.width/2-5}px`,top:`${C.value.y+C.value.height-5}px`},"bottom-left":{left:`${C.value.x-5}px`,top:`${C.value.y+C.value.height-5}px`},left:{left:`${C.value.x-5}px`,top:`${C.value.y+C.value.height/2-5}px`}}}),B=e=>{if(`touches`in e&&e.touches.length>0){let t=e.touches[0];return{clientX:t.clientX,clientY:t.clientY}}else if(`clientX`in e&&`clientY`in e)return{clientX:e.clientX,clientY:e.clientY};return{clientX:0,clientY:0}},V=e=>{let t=v.value;if(!t)return null;let{clientX:n,clientY:r}=B(e),{left:i,top:a}=t.getBoundingClientRect();return{x:n-i,y:r-a}},H=e=>{e.preventDefault();let t=V(e);if(!t)return;let{x:n,y:r}=t;X(n,r)&&(D=!0,E=!0,O={x:n-C.value.x,y:r-C.value.y})},U=e=>{D?G(e):k&&J(e)},W=()=>{D&&(K(),D=!1,Q()),k&&(Y(),Q()),E=!1,D=!1},G=e=>{if(E){let t=V(e);if(!t)return;let{x:n,y:r}=t;C.value.x=Math.floor(n-O.x),C.value.y=Math.floor(r-O.y),L()}},K=()=>{E&&=(Z(),L(),!1)},q=(e,t)=>{e.preventDefault();let n=V(e);n&&(k=!0,M=t,A={x:n.x,y:n.y},j={...C.value},N=e instanceof MouseEvent&&e.shiftKey)},J=e=>{if(!k)return;if(g.lockAspectRatio&&v.value){let t=V(e);if(!t)return;let{x:n,y:r}=t,i=j.x+j.width/2,a=j.y+j.height/2;if(g.cropAsCircle){let e=Math.max(Math.abs(n-i),Math.abs(r-a)),t=e*2;C.value={x:i-e,y:a-e,width:t,height:t}}else{let e=j.width/j.height,t=Math.abs(n-i),r=Math.max(t*2,50),o=r/e;C.value={x:i-r/2,y:a-o/2,width:r,height:o}}L();return}let t=V(e);if(!t)return;let{x:n,y:r}=t,i=n-A.x,a=r-A.y;N=e instanceof MouseEvent&&e.shiftKey;let o={...j};switch(M){case`top-left`:o.x+=i,o.y+=a,o.width-=i,o.height-=a;break;case`top`:o.y+=a,o.height-=a;break;case`top-right`:o.y+=a,o.width+=i,o.height-=a;break;case`right`:o.width+=i;break;case`bottom-right`:o.width+=i,o.height+=a;break;case`bottom`:o.height+=a;break;case`bottom-left`:o.x+=i,o.width-=i,o.height+=a;break;case`left`:o.x+=i,o.width-=i;break}if(o.width<50&&(o.width=50),o.height<50&&(o.height=50),N&&M){let e=j.width/j.height;[`left`,`right`].includes(M)?(o.height=o.width/e,M===`left`&&(o.y=j.y-(o.height-j.height)/2)):[`top`,`bottom`].includes(M)&&(o.width=o.height*e,M===`top`&&(o.x=j.x-(o.width-j.width)/2))}C.value=o,L()},Y=()=>{k&&(Z(),L(),k=!1,M=null)},X=(e,t)=>{if(g.cropAsCircle){let n=C.value.x+C.value.width/2,r=C.value.y+C.value.height/2,i=C.value.width/2,a=e-n,o=t-r;return a*a+o*o<=i*i}else return e>=C.value.x-2&&e<=C.value.x+C.value.width+2&&t>=C.value.y-2&&t<=C.value.y+C.value.height+2},Z=()=>{let e=v.value.width,t=v.value.height;if(C.value.width<50&&(C.value.width=50),C.value.height<50&&(C.value.height=50),g.lockAspectRatio)if(g.cropAsCircle)C.value.height=C.value.width;else{let e=j.width/j.height;C.value.height=C.value.width/e}else if(N){let e=j.width/j.height;C.value.height=C.value.width/e}if(g.cropAsCircle||g.lockAspectRatio){let n=C.value.width/C.value.height;(C.value.width>e||C.value.height>t)&&(C.value.width>C.value.height?(C.value.width=e,C.value.height=e/n):(C.value.height=t,C.value.width=t*n)),C.value.x<0&&(C.value.x=0),C.value.y<0&&(C.value.y=0),C.value.x+C.value.width>e&&(C.value.x=e-C.value.width),C.value.y+C.value.height>t&&(C.value.y=t-C.value.height)}else C.value.x<0&&(C.value.x=0),C.value.y<0&&(C.value.y=0),C.value.width>e&&(C.value.width=e,C.value.x=0),C.value.height>t&&(C.value.height=t,C.value.y=0),C.value.x+C.value.width>e&&(C.value.x=e-C.value.width),C.value.y+C.value.height>t&&(C.value.y=t-C.value.height)},Q=()=>{if(v.value&&y){let e=(v.value.width-b.width*S.x)/2,t=(v.value.height-b.height*S.y)/2,n=(C.value.x-e)/S.x,r=(C.value.y-t)/S.y,i=C.value.width/S.x,a=C.value.height/S.y,o={x:Math.round(n),y:Math.round(r),width:Math.round(i),height:Math.round(a)},s=Math.max(0,Math.min(o.x,b.width)),c=Math.max(0,Math.min(o.y,b.height)),l=Math.min(o.width,b.width-s),u=Math.min(o.height,b.height-c),d=document.createElement(`canvas`);d.width=l,d.height=u;let f=d.getContext(`2d`);f&&(f.drawImage(b,s,c,l,u,0,0,l,u),g.cropAsCircle&&g.outputAsCircle&&(f.globalCompositeOperation=`destination-in`,f.beginPath(),f.arc(l/2,u/2,l/2,0,Math.PI*2),f.closePath(),f.fill(),f.globalCompositeOperation=`source-over`),d.toBlob(e=>{if(e){let t=w.value;t&&URL.revokeObjectURL(t),w.value=URL.createObjectURL(e),T.value=o,_(`crop`,{blob:e,geometry:o})}},`image/jpeg`,.8))}};return(0,r.watch)(()=>g,()=>{Q()},{deep:!0}),(n,i)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,a,[(0,r.createElementVNode)(`div`,{class:`canvas-container`,onMousedown:H,onMousemove:U,onMouseup:W,onMouseleave:W,onTouchstart:H,onTouchmove:U,onTouchend:W},[(0,r.createElementVNode)(`canvas`,{ref_key:`canvas`,ref:v},null,512),((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(P,e=>(0,r.createElementVNode)(`div`,{key:e.name,class:(0,r.normalizeClass)([`resize-handle`,e.name]),style:(0,r.normalizeStyle)(z.value[e.name]),onMousedown:(0,r.withModifiers)(t=>q(t,e.name),[`stop`]),onTouchstart:(0,r.withModifiers)(t=>q(t,e.name),[`stop`])},null,46,o)),64))],32),e.showPreview&&w.value&&T.value?((0,r.openBlock)(),(0,r.createBlock)(t.t,{key:0,class:`cropped-image-preview`},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(t.t,{is:`ul`,dir:`col`,justify:`center`,gap:`sm`},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.X`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.x.toFixed(0)),1)]),(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.Y`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.y.toFixed(0)),1)]),(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.WIDTH`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.width.toFixed(0)),1)]),(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.HEIGHT`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.height.toFixed(0)),1)])]),_:1}),(0,r.createElementVNode)(`img`,{src:w.value,alt:h(`common.IMAGE_THUMBNAIL`)},null,8,s)]),_:1})):(0,r.createCommentVNode)(``,!0)]))}}),d=e.t(u,[[`__scopeId`,`data-v-057c9675`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
2
|
-
import { t } from "./Grid-
|
|
3
|
-
import { t as n } from "./vue-i18n-
|
|
2
|
+
import { t } from "./Grid-B7d8x0tA.js";
|
|
3
|
+
import { t as n } from "./vue-i18n-DaD-yZmK.js";
|
|
4
4
|
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, normalizeClass as f, normalizeStyle as p, onBeforeUnmount as ee, onMounted as te, openBlock as m, ref as h, renderList as ne, toDisplayString as g, watch as _, withCtx as v, withModifiers as y } from "vue";
|
|
5
5
|
//#region src/components/ImageCropper.d.ts
|
|
6
6
|
var b = /* @__PURE__ */ function(e) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./Button-BHFtgOXA.cjs`),n=require(`./Icon-CssV4E2-.cjs`),r=require(`./composables/useNbStrings.composable.cjs`),i=require(`./Spinner-BTN06wsE.cjs`);let a=require(`vue`),o=require(`@nubisco/ui/icons/plus`);o=e.n(o);let s=require(`@nubisco/ui/icons/trash`);s=e.n(s);var c=[`aria-label`,`aria-busy`,`disabled`],l=[`src`,`alt`],u={key:1,class:`nb-image-picker__empty`},d={class:`nb-image-picker__label`},f={key:2,class:`nb-image-picker__drop`},p={key:0,class:`nb-image-picker__loading`},m=[`accept`,`disabled`],h=(0,a.defineComponent)({__name:`ImagePicker`,props:{src:{default:``},alt:{default:``},label:{default:void 0},dropLabel:{default:void 0},replaceLabel:{default:void 0},removeLabel:{default:void 0},accept:{default:`image/*`},maxSize:{default:void 0},removable:{type:Boolean,default:!0},removeDisabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:`10rem`},ratio:{default:`1 / 1`},fit:{default:`contain`},id:{}},emits:[`pick`,`remove`,`reject`],setup(e,{expose:h,emit:g}){let _=e,v=r.useNbStrings(),y=(0,a.computed)(()=>({add:_.label??v.value.imagePickerAdd,drop:_.dropLabel??v.value.imagePickerDrop,replace:_.replaceLabel??v.value.imagePickerReplace,remove:_.removeLabel??v.value.imagePickerRemove})),b=g,x=(0,a.ref)(null),S=(0,a.ref)(!1),C=0,w=(0,a.computed)(()=>!!_.src),T=(0,a.computed)(()=>_.disabled||_.loading),E=(0,a.computed)(()=>({"--nb-image-picker-size":typeof _.size==`number`?`${_.size}px`:_.size,"--nb-image-picker-ratio":_.ratio,"--nb-image-picker-fit":_.fit}));(0,a.watch)(T,e=>{e&&(C=0,S.value=!1)});function D(){T.value||x.value?.click()}function O(e){let t=_.accept.split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean);if(t.length===0)return!0;let n=e.name.toLowerCase(),r=e.type.toLowerCase();return t.some(e=>e.startsWith(`.`)?n.endsWith(e):e.endsWith(`/*`)?r.startsWith(e.slice(0,-1)):r===e)}function k(e){if(!O(e))return b(`reject`,{file:e,reason:`type`});if(_.maxSize&&e.size>_.maxSize)return b(`reject`,{file:e,reason:`size`});b(`pick`,e)}function A(e){let t=e.target,n=t.files?.[0];t.value=``,n&&!T.value&&k(n)}function j(){T.value||(C++,S.value=!0)}function M(){C--,C<=0&&(C=0,S.value=!1)}function N(e){T.value&&e.dataTransfer&&(e.dataTransfer.dropEffect=`none`)}function P(e){if(C=0,S.value=!1,T.value)return;let t=e.dataTransfer?.files?.[0];t&&k(t)}return h({open:D}),(r,h)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{class:(0,a.normalizeClass)([`nb-image-picker`,{"nb-image-picker--filled":w.value,"nb-image-picker--dragging":S.value,"nb-image-picker--loading":e.loading,"nb-image-picker--disabled":e.disabled}]),style:(0,a.normalizeStyle)(E.value),onDragenter:(0,a.withModifiers)(j,[`prevent`]),onDragover:(0,a.withModifiers)(N,[`prevent`]),onDragleave:(0,a.withModifiers)(M,[`prevent`]),onDrop:(0,a.withModifiers)(P,[`prevent`])},[(0,a.createElementVNode)(`button`,{type:`button`,class:`nb-image-picker__surface`,"aria-label":w.value?y.value.replace:y.value.add,"aria-busy":e.loading||void 0,disabled:e.disabled||e.loading,onClick:D},[w.value?((0,a.openBlock)(),(0,a.createElementBlock)(`img`,{key:0,class:`nb-image-picker__image`,src:e.src,alt:e.alt},null,8,l)):((0,a.openBlock)(),(0,a.createElementBlock)(`span`,u,[(0,a.createVNode)(n.t,{name:o,size:20,"aria-hidden":`true`}),(0,a.createElementVNode)(`span`,d,(0,a.toDisplayString)(y.value.add),1)])),S.value?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,f,(0,a.toDisplayString)(y.value.drop),1)):(0,a.createCommentVNode)(``,!0)],8,c),e.loading?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,p,[(0,a.createVNode)(i.t,{size:`md`,decorative:``})])):(0,a.createCommentVNode)(``,!0),w.value&&e.removable?((0,a.openBlock)(),(0,a.createBlock)(t.t,{key:1,class:`nb-image-picker__remove`,variant:`ghost`,size:`xs`,icon:s,label:y.value.remove,"tooltip-position":`left`,disabled:e.removeDisabled||e.disabled||e.loading,onClick:h[0]||=(0,a.withModifiers)(e=>b(`remove`),[`stop`])},null,8,[`label`,`disabled`])):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`input`,{ref_key:`inputRef`,ref:x,type:`file`,class:`nb-image-picker__input`,tabindex:`-1`,"aria-hidden":`true`,accept:e.accept,disabled:e.disabled||e.loading,onChange:A},null,40,m)],38))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}});
|