admin-ui-starter-kit 0.6.1 → 0.6.2
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/.agents/skills/component-library-rules/references/components/services__hooks.md +6 -1
- package/dist/_shared/{overlays-CdtMAkKG.js → overlays-DW8OIK5R.js} +134 -47
- package/dist/_shared/overlays-DW8OIK5R.js.map +1 -0
- package/dist/_shared/overlays-Du65iCkx.cjs +2 -0
- package/dist/_shared/overlays-Du65iCkx.cjs.map +1 -0
- package/dist/components/features/card/index.cjs +1 -1
- package/dist/components/features/card/index.js +1 -1
- package/dist/components/features/media-library/index.cjs +1 -1
- package/dist/components/features/media-library/index.js +1 -1
- package/dist/components/features/overlays/hooks/index.d.ts +1 -0
- package/dist/components/features/overlays/hooks/index.d.ts.map +1 -1
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +33 -0
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts.map +1 -0
- package/dist/components/features/overlays/index.cjs +1 -1
- package/dist/components/features/overlays/index.d.ts +1 -1
- package/dist/components/features/overlays/index.d.ts.map +1 -1
- package/dist/components/features/overlays/index.js +2 -2
- package/dist/services/actions/index.cjs +1 -1
- package/dist/services/actions/index.js +1 -1
- package/dist/showcase/assets/{AreaChart-CGkuyNyy.js → AreaChart-CFYg5vW0.js} +1 -1
- package/dist/showcase/assets/{CompositeItem-DAQ048AO.js → CompositeItem-C1v8tfgt.js} +1 -1
- package/dist/showcase/assets/{CompositeRoot-8-OuCMMq.js → CompositeRoot-DVtTCBlx.js} +1 -1
- package/dist/showcase/assets/{DialogTrigger-1P-jwcoH.js → DialogTrigger-CiVZgbZe.js} +1 -1
- package/dist/showcase/assets/{LabelableContext-BDyZArAc.js → LabelableContext-CNcXHqnK.js} +1 -1
- package/dist/showcase/assets/{PreviewLayout-wYGhlcJt.js → PreviewLayout-CBTybzKu.js} +1 -1
- package/dist/showcase/assets/{RadioGroup-DuiI4W--.js → RadioGroup-DTNAD-0J.js} +1 -1
- package/dist/showcase/assets/{ScrollAreaCorner-Df5uTkWT.js → ScrollAreaCorner-Gau2B-d1.js} +1 -1
- package/dist/showcase/assets/{Separator-BuTBo5a_.js → Separator-DOIh4aar.js} +1 -1
- package/dist/showcase/assets/{ToolbarRootContext-B4S4Fn7d.js → ToolbarRootContext-BbugmthZ.js} +1 -1
- package/dist/showcase/assets/{accordion-D3beuJpC.js → accordion-CB4ePZYm.js} +1 -1
- package/dist/showcase/assets/{accordion-variants-BTMpfSPI.js → accordion-variants-De2q5GIH.js} +1 -1
- package/dist/showcase/assets/{action-menu-DsAr1OqF.js → action-menu-wJVcvfmC.js} +1 -1
- package/dist/showcase/assets/{actions-BzyHAEZR.js → actions-BL1lpPFC.js} +1 -1
- package/dist/showcase/assets/{activities-BgoelWKu.js → activities-C578ZINa.js} +1 -1
- package/dist/showcase/assets/{activities-feed-card-DI4MIm3-.js → activities-feed-card-BeXMgsNO.js} +1 -1
- package/dist/showcase/assets/{admin-n-JemkNh.js → admin-DKJPb23G.js} +1 -1
- package/dist/showcase/assets/{ai-artifact-C8CmZ94f.js → ai-artifact-BaYtjrP5.js} +1 -1
- package/dist/showcase/assets/{ai-chat-CTQQ4e4X.js → ai-chat-DxxlaytU.js} +1 -1
- package/dist/showcase/assets/{ai-elements-DGnlBq8E.js → ai-elements-BWraZPyC.js} +1 -1
- package/dist/showcase/assets/{ai-BXyk1mT0.js → ai-ewP8qLOJ.js} +1 -1
- package/dist/showcase/assets/{ai-tool-call-bHnWNBtN.js → ai-tool-call-Da4srLLe.js} +1 -1
- package/dist/showcase/assets/{alert-bPnj3_cC.js → alert-CQI2pomK.js} +1 -1
- package/dist/showcase/assets/{alert-CIHGXUul.js → alert-S12iMEhF.js} +1 -1
- package/dist/showcase/assets/{alert-N79A6qIx.js → alert-xINZmLgm.js} +1 -1
- package/dist/showcase/assets/{api-key-list-Bf1KoRJq.js → api-key-list-CL6je8dF.js} +1 -1
- package/dist/showcase/assets/{api-key-list-DyZ_DaRx.js → api-key-list-wxmuRN1m.js} +1 -1
- package/dist/showcase/assets/{app-sidebar-Co0LUSvz.js → app-sidebar-LVtcgiT_.js} +1 -1
- package/dist/showcase/assets/arrow-down-JuqwH6gj.js +1 -0
- package/dist/showcase/assets/arrow-left-BFq65-Ch.js +1 -0
- package/dist/showcase/assets/arrow-right-B4iFg3l1.js +1 -0
- package/dist/showcase/assets/arrow-up-RWJP_FHU.js +1 -0
- package/dist/showcase/assets/arrow-up-right-DdWl37XF.js +1 -0
- package/dist/showcase/assets/{avatar-CJaCYGWf.js → avatar-BEvs3dD_.js} +1 -1
- package/dist/showcase/assets/{avatar-DKLsNeBi.js → avatar-Bv9x1eBh.js} +1 -1
- package/dist/showcase/assets/{avatar-CxwFyL4T.js → avatar-CC3R0R-x.js} +1 -1
- package/dist/showcase/assets/{avatar-D3kvVy00.js → avatar-D29-FL5U.js} +1 -1
- package/dist/showcase/assets/{badge-CSMmwDLr.js → badge-B1YIk7bi.js} +1 -1
- package/dist/showcase/assets/{badge-check-TQRmqI7C.js → badge-check-DGmg0_g_.js} +1 -1
- package/dist/showcase/assets/{bell-CwRy7zpP.js → bell-Cq9n0a2v.js} +1 -1
- package/dist/showcase/assets/{bot-Bt02Uzhq.js → bot-DxRjlJlO.js} +1 -1
- package/dist/showcase/assets/{box-Bfv5RQBf.js → box-CIh-_2DI.js} +1 -1
- package/dist/showcase/assets/{braces-CxUoAPd4.js → braces-BI_smuFG.js} +1 -1
- package/dist/showcase/assets/{brain-CNapE0CP.js → brain-BCAmDdGT.js} +1 -1
- package/dist/showcase/assets/{brand-CBq1YoS0.js → brand-CYmrK-FI.js} +1 -1
- package/dist/showcase/assets/{breadcrumb-DyXpErBT.js → breadcrumb-DXOwTQNp.js} +1 -1
- package/dist/showcase/assets/{breadcrumb-DRioiUd_.js → breadcrumb-DdDGc08y.js} +1 -1
- package/dist/showcase/assets/{breadcrumbs-BzHeoItO.js → breadcrumbs-SwqzwYW_.js} +1 -1
- package/dist/showcase/assets/{briefcase-N74Hu0O2.js → briefcase-CKrv_pkI.js} +1 -1
- package/dist/showcase/assets/{building-2-D81ygy-F.js → building-2-4f1nNGpT.js} +1 -1
- package/dist/showcase/assets/{button-Bgqg7AmN.js → button-B9I1TrfQ.js} +1 -1
- package/dist/showcase/assets/{button-group-DPV1XIW3.js → button-group-DUfRVZy2.js} +1 -1
- package/dist/showcase/assets/{buttons-qpZWlILG.js → buttons-Crl8nJKG.js} +1 -1
- package/dist/showcase/assets/{calendar-DcYyOrNY.js → calendar-4Uqeswbn.js} +1 -1
- package/dist/showcase/assets/{calendar-D-CSqGtC.js → calendar-Cl5l4Ip1.js} +1 -1
- package/dist/showcase/assets/{calendar-BXG5CwbY.js → calendar-DxjW_eNc.js} +1 -1
- package/dist/showcase/assets/{calendar-days-CNNiyV9e.js → calendar-days-DmDuaOAc.js} +1 -1
- package/dist/showcase/assets/{camera-D0yVo0xC.js → camera-j8dT39qf.js} +1 -1
- package/dist/showcase/assets/{card-Bl-y9-8y.js → card-BQ_zBZlQ.js} +1 -1
- package/dist/showcase/assets/{card-CH7Ev3xS.js → card-DRalKV4i.js} +1 -1
- package/dist/showcase/assets/{card-primitives-CiU5lL3a.js → card-primitives-Bn6nhqUA.js} +1 -1
- package/dist/showcase/assets/{card-radio-group-DpeIWyiO.js → card-radio-group-Dq7AUPTp.js} +1 -1
- package/dist/showcase/assets/{cards-7xave3ub.js → cards-MR2JolOy.js} +1 -1
- package/dist/showcase/assets/{carousel--kHTFkC7.js → carousel-DMceNGDq.js} +1 -1
- package/dist/showcase/assets/{cell-renderers-Cx8rAZln.js → cell-renderers-VbI9xEAd.js} +1 -1
- package/dist/showcase/assets/{chart-DU8INHbt.js → chart-DW4naldz.js} +1 -1
- package/dist/showcase/assets/{chart-column-Dbekq8cy.js → chart-column-CbUwWFn7.js} +1 -1
- package/dist/showcase/assets/checkbox-BJ1yDAQ3.js +1 -0
- package/dist/showcase/assets/{checkbox-ClPnzko9.js → checkbox-BqwbtGCF.js} +1 -1
- package/dist/showcase/assets/chevron-down-CBa5t2E0.js +1 -0
- package/dist/showcase/assets/chevron-left-Dqne-r3m.js +1 -0
- package/dist/showcase/assets/chevron-up-DiMFydbr.js +1 -0
- package/dist/showcase/assets/chevrons-up-down-umMKLBIL.js +1 -0
- package/dist/showcase/assets/{circle-alert-9j29FrsT.js → circle-alert-BObXfzSP.js} +1 -1
- package/dist/showcase/assets/circle-check-BPhdxh7K.js +1 -0
- package/dist/showcase/assets/circle-check-big-BsQpd0CS.js +1 -0
- package/dist/showcase/assets/circle-dbSBYjvr.js +1 -0
- package/dist/showcase/assets/circle-dot-Bj1an-fp.js +1 -0
- package/dist/showcase/assets/{circle-question-mark-BRiF5RV4.js → circle-question-mark-BeRdyU_C.js} +1 -1
- package/dist/showcase/assets/{circle-x-BF20gddw.js → circle-x-Dh3sb4UC.js} +1 -1
- package/dist/showcase/assets/clock-3-R65SwQwa.js +1 -0
- package/dist/showcase/assets/clock-BApGqXwn.js +1 -0
- package/dist/showcase/assets/{code-xml-D2f-X63y.js → code-xml-q7JPxij0.js} +1 -1
- package/dist/showcase/assets/{collapsible-Ru5-bssh.js → collapsible-BbiGHywy.js} +1 -1
- package/dist/showcase/assets/{collapsible-CF0oQTVS.js → collapsible-DDV7VHy5.js} +1 -1
- package/dist/showcase/assets/{combobox-DpJTW_Rq.js → combobox-Dv_OkynR.js} +1 -1
- package/dist/showcase/assets/{command-Dno8Ogez.js → command-BSmiujfZ.js} +1 -1
- package/dist/showcase/assets/{command-LRFStKBy.js → command-Cw81GF7c.js} +1 -1
- package/dist/showcase/assets/{comment-composer-Dht7nfbv.js → comment-composer-C09JANlW.js} +1 -1
- package/dist/showcase/assets/{comment-item-B6IgQsMr.js → comment-item-DsQshj1L.js} +1 -1
- package/dist/showcase/assets/{comments-B3ksV3Mn.js → comments-CO3QCKyX.js} +1 -1
- package/dist/showcase/assets/{commerce-B1_Offbz.js → commerce-BvnnX8Ui.js} +1 -1
- package/dist/showcase/assets/{composite-BjQWIYF-.js → composite-BjZbcKJw.js} +1 -1
- package/dist/showcase/assets/{contact-card-Bss4YHZz.js → contact-card-Dq50G6UK.js} +1 -1
- package/dist/showcase/assets/{content-container-D4BM1Zro.js → content-container-BQZdQhX2.js} +1 -1
- package/dist/showcase/assets/{copyable-Dst8oaw5.js → copyable-BdfWxV6u.js} +1 -1
- package/dist/showcase/assets/{copyable-C0J88R_R.js → copyable-lUNYfscm.js} +1 -1
- package/dist/showcase/assets/{course-card-BuqwjqtO.js → course-card-BTIFY84q.js} +1 -1
- package/dist/showcase/assets/{cpu-CFy0M0rN.js → cpu-CzkgJ-zb.js} +1 -1
- package/dist/showcase/assets/{credit-card-CFq0S1Ma.js → credit-card-D_wnXbTK.js} +1 -1
- package/dist/showcase/assets/{css-variables-BAALjDwD.js → css-variables-BVjcOHGr.js} +1 -1
- package/dist/showcase/assets/{currency-BZzZRv2_.js → currency-BCX6yQ2j.js} +1 -1
- package/dist/showcase/assets/{dark-surfaces-CVKt2Yww.js → dark-surfaces-BO6sWHrV.js} +1 -1
- package/dist/showcase/assets/{data-view-D6_zyFwk.js → data-view-C8ThO9ha.js} +1 -1
- package/dist/showcase/assets/{data-view-Be0uoLqL.js → data-view-DqpNNGp5.js} +1 -1
- package/dist/showcase/assets/{database-DSC-ysYT.js → database-Ad0l2Bjl.js} +1 -1
- package/dist/showcase/assets/{date-block-Bgu_LMxB.js → date-block-CMKpiRdA.js} +1 -1
- package/dist/showcase/assets/{date-picker-ByYEZGMg.js → date-picker-CRogiefV.js} +1 -1
- package/dist/showcase/assets/{date-pickers-DzSQrvWs.js → date-pickers-CuRRGP-F.js} +1 -1
- package/dist/showcase/assets/{dense-info-BhFkOQbt.js → dense-info-BL_cGFVK.js} +1 -1
- package/dist/showcase/assets/{design-system-consistency-D6iCJLcr.js → design-system-consistency-BarrI2Uj.js} +1 -1
- package/dist/showcase/assets/{dialog-DzrcsKvl.js → dialog-BEKecyE3.js} +1 -1
- package/dist/showcase/assets/{dialog-C1heXuxu.js → dialog-DbEG3v2T.js} +1 -1
- package/dist/showcase/assets/{display-utilities-eu-EVMrx.js → display-utilities-CQRcCpjT.js} +1 -1
- package/dist/showcase/assets/{dist-BlIID0_L.js → dist-CS2Ky1_m.js} +1 -1
- package/dist/showcase/assets/{dist-DV4Tv32d.js → dist-q3PLGr1_.js} +1 -1
- package/dist/showcase/assets/{dollar-sign-qp4G3P_K.js → dollar-sign-lghPxE96.js} +1 -1
- package/dist/showcase/assets/{download-zlcHjSdS.js → download-Cx5kUzHm.js} +1 -1
- package/dist/showcase/assets/{dropdown-menu-DZ47rJaE.js → dropdown-menu-CXYQqRJA.js} +1 -1
- package/dist/showcase/assets/{dropzone-Dx4EqBHu.js → dropzone-DK0kBLfC.js} +1 -1
- package/dist/showcase/assets/{earth-BuXqXHh6.js → earth-BgJkqIAs.js} +1 -1
- package/dist/showcase/assets/{ellipsis-DgAjMZHc.js → ellipsis-CP0hyAeS.js} +1 -1
- package/dist/showcase/assets/{ellipsis-vertical-BA8_YMyV.js → ellipsis-vertical-BdpRiDbb.js} +1 -1
- package/dist/showcase/assets/{empty-DXjKmyNv.js → empty-CO_e2e_g.js} +1 -1
- package/dist/showcase/assets/{empty-item-DIGWYsI0.js → empty-item-D39AT9RK.js} +1 -1
- package/dist/showcase/assets/{empty-state-CkixFVN1.js → empty-state-CTQjlkxC.js} +1 -1
- package/dist/showcase/assets/{empty-state-BSc0tQNC.js → empty-state-Luba-tbF.js} +1 -1
- package/dist/showcase/assets/{enhanced-activities-CKbHgR4f.js → enhanced-activities-e2k5R4sk.js} +1 -1
- package/dist/showcase/assets/{enhanced-combobox-DAKQyFUg.js → enhanced-combobox-CY9QcVEl.js} +1 -1
- package/dist/showcase/assets/{esm-C3PfkuOc.js → esm-DPz8A4Wl.js} +1 -1
- package/dist/showcase/assets/{event-calendar-rNju8jaT.js → event-calendar-DuQntfyO.js} +1 -1
- package/dist/showcase/assets/{event-log-BUK1blGb.js → event-log-B8B_0-q5.js} +1 -1
- package/dist/showcase/assets/{example-PsbgbESI.js → example-Rrx9vj75.js} +1 -1
- package/dist/showcase/assets/{external-link-CgB9zfWz.js → external-link-BkCjE03j.js} +1 -1
- package/dist/showcase/assets/{eye-YnIHbdKe.js → eye-BKhfxIeD.js} +1 -1
- package/dist/showcase/assets/{feature-announcement-CWwjAPI1.js → feature-announcement-CRN6kk4B.js} +1 -1
- package/dist/showcase/assets/{file-3Z2xkc-8.js → file-BBUnjRPN.js} +1 -1
- package/dist/showcase/assets/{file-text-BQeGXxPG.js → file-text-Clv0qFr3.js} +1 -1
- package/dist/showcase/assets/{filter-layout-D7YskzbC.js → filter-layout-Bskvgeps.js} +1 -1
- package/dist/showcase/assets/{filters-2YY_wVwq.js → filters-DqE5xQEz.js} +1 -1
- package/dist/showcase/assets/{flag-Bw3wwRgF.js → flag-BQ0Brbw9.js} +1 -1
- package/dist/showcase/assets/{folder-open-CZ5Bq4lK.js → folder-open-CuUaUrxa.js} +1 -1
- package/dist/showcase/assets/{form-field-AWNJL9FM.js → form-field-Dg_Az7lk.js} +1 -1
- package/dist/showcase/assets/{format-DUU7-42g.js → format-BnF8gL8z.js} +1 -1
- package/dist/showcase/assets/{forms-CWJ3HBbk.js → forms-D2SGtkKv.js} +1 -1
- package/dist/showcase/assets/{funnel-vxNNph7w.js → funnel-qCC9cfXa.js} +1 -1
- package/dist/showcase/assets/{generic-DlyFJDj6.js → generic-0wwhvFWa.js} +1 -1
- package/dist/showcase/assets/{getPseudoElementBounds-CibNto5h.js → getPseudoElementBounds-DyTpOaBA.js} +1 -1
- package/dist/showcase/assets/{gift-BjRHqTcQ.js → gift-ibO6X3CO.js} +1 -1
- package/dist/showcase/assets/{giftcard-cards-DcujCFff.js → giftcard-cards-BJ0gmgv0.js} +1 -1
- package/dist/showcase/assets/{git-branch-B7XnpQE0.js → git-branch-QLvR3_wX.js} +1 -1
- package/dist/showcase/assets/{global-search-Ct7I1Xd2.js → global-search-B2zvjiO2.js} +1 -1
- package/dist/showcase/assets/{global-search-CWvNfmpe.js → global-search-BtYqFKyN.js} +1 -1
- package/dist/showcase/assets/{globe-CHleXWd2.js → globe-Byoz7QmA.js} +1 -1
- package/dist/showcase/assets/{gradient-card-Bw4oJljh.js → gradient-card-CymI8itB.js} +1 -1
- package/dist/showcase/assets/{hash-BVGqnm6_.js → hash-DL-sHZny.js} +1 -1
- package/dist/showcase/assets/{header-CgApizpk.js → header-C9RMgEgD.js} +1 -1
- package/dist/showcase/assets/{header-notifications-B2v1Mdri.js → header-notifications-BT643QVK.js} +1 -1
- package/dist/showcase/assets/{heart-BwvHCA-d.js → heart-gHsYuS4V.js} +1 -1
- package/dist/showcase/assets/{hooks-A_AQLIRZ.js → hooks-Dj4gswMj.js} +6 -3
- package/dist/showcase/assets/{house-opqNxOmP.js → house-Dew9jimg.js} +1 -1
- package/dist/showcase/assets/{icon-badge-CsG95J1Z.js → icon-badge-C-mGQdGQ.js} +1 -1
- package/dist/showcase/assets/{icon-badge-ognVhKWR.js → icon-badge-GMIN-bca.js} +1 -1
- package/dist/showcase/assets/{image-apDSlTAx.js → image-Cda8layy.js} +1 -1
- package/dist/showcase/assets/{inbox-WrbeTKEw.js → inbox-hJEV8TEx.js} +1 -1
- package/dist/showcase/assets/{index-QESvAJrb.js → index-o71HAmc3.js} +2 -2
- package/dist/showcase/assets/inertValue-BRyHstYf.js +1 -0
- package/dist/showcase/assets/{info-C3G9KRCx.js → info-B4aULRpz.js} +1 -1
- package/dist/showcase/assets/{inline-stat-BnjUqzDM.js → inline-stat-BzXB3FNC.js} +1 -1
- package/dist/showcase/assets/{inline-stat-CO01t7SJ.js → inline-stat-CDQocPgN.js} +1 -1
- package/dist/showcase/assets/{input-CBJy1dMs.js → input-CLysAarX.js} +1 -1
- package/dist/showcase/assets/{input-yYoqWQQ7.js → input-CYTQ9nWN.js} +1 -1
- package/dist/showcase/assets/{input-group-CZyYSq4r.js → input-group-DYMTMed1.js} +1 -1
- package/dist/showcase/assets/{input-group-Dfqufdp4.js → input-group-DtkAnPaQ.js} +1 -1
- package/dist/showcase/assets/{inputs-Bhw_FGDY.js → inputs-C2flJn12.js} +1 -1
- package/dist/showcase/assets/{installation-DnvS2ZUn.js → installation-CCvBKDNO.js} +1 -1
- package/dist/showcase/assets/{invoice-header-B9Ak8GXX.js → invoice-header-C1G_aVIm.js} +1 -1
- package/dist/showcase/assets/{invoice-items-DY5zUZhE.js → invoice-items-Ak0CMjDh.js} +1 -1
- package/dist/showcase/assets/{invoice-mini-BAryECEH.js → invoice-mini-B7Dda49y.js} +1 -1
- package/dist/showcase/assets/{invoice-table-BUvjee74.js → invoice-table-Bl9InDl0.js} +1 -1
- package/dist/showcase/assets/isSameDay-Bd_8WAf0.js +1 -0
- package/dist/showcase/assets/isToday-DSGtoEUa.js +1 -0
- package/dist/showcase/assets/{italic-CjQCLJci.js → italic-CJzEjX5j.js} +1 -1
- package/dist/showcase/assets/{item-DxPwk321.js → item-BL_Y_0ou.js} +1 -1
- package/dist/showcase/assets/{item-BMSdEK3V.js → item-Oe2aHuvr.js} +1 -1
- package/dist/showcase/assets/{item-D1Jxrpia.js → item-nf1zOtF7.js} +1 -1
- package/dist/showcase/assets/{kanban-DXWCGieQ.js → kanban-CB5Hghoo.js} +1 -1
- package/dist/showcase/assets/{key-round-DpuhXiJQ.js → key-round-BQwcojkz.js} +1 -1
- package/dist/showcase/assets/{label-D1wLK5nY.js → label-HtkE4eII.js} +1 -1
- package/dist/showcase/assets/{languages-CGYZVmbV.js → languages-69N5-h2e.js} +1 -1
- package/dist/showcase/assets/{layers-DJZSVGAu.js → layers-CBPYgoAb.js} +1 -1
- package/dist/showcase/assets/{layout-app-shell-UX63nzTO.js → layout-app-shell-BfNh8jd0.js} +1 -1
- package/dist/showcase/assets/{layout-auth-Bav5BBqp.js → layout-auth-Ct29XkSH.js} +1 -1
- package/dist/showcase/assets/{layout-containers-DMHD2zdV.js → layout-containers-DWN4xKbf.js} +1 -1
- package/dist/showcase/assets/{layout-header-CGesu_kM.js → layout-header-DUX4zFrH.js} +1 -1
- package/dist/showcase/assets/{layout-page-DHXu8SIv.js → layout-page-CsqULW71.js} +1 -1
- package/dist/showcase/assets/{layout-primitives-CokzGwd2.js → layout-primitives-CQJ0_wTo.js} +1 -1
- package/dist/showcase/assets/{layout-sidebar-CLUYajcu.js → layout-sidebar-la-tC4xZ.js} +1 -1
- package/dist/showcase/assets/{layout-users-DHUNAnFA.js → layout-users-6fAYxZ3Z.js} +1 -1
- package/dist/showcase/assets/{layout-workspace-y0v2FpDW.js → layout-workspace-BbDOjmrE.js} +1 -1
- package/dist/showcase/assets/{lib-g_kR7X9Z.js → lib-C46V0Rr-.js} +1 -1
- package/dist/showcase/assets/{list-checks-CXt8visd.js → list-checks-BkQYzehf.js} +1 -1
- package/dist/showcase/assets/{lock-CpZ5kLUd.js → lock-CMrS2EKU.js} +1 -1
- package/dist/showcase/assets/{lock-keyhole-Cy2raRO6.js → lock-keyhole-B1BEkNvm.js} +1 -1
- package/dist/showcase/assets/{mail-Cj6uT4TA.js → mail-Bo_4xDQw.js} +1 -1
- package/dist/showcase/assets/{mail-check-Di70bdf6.js → mail-check-BprACMug.js} +1 -1
- package/dist/showcase/assets/{map-DMXbG_04.js → map-Br-xZYf0.js} +3 -3
- package/dist/showcase/assets/{map-pin-EKhu7vEj.js → map-pin-COrIVMWa.js} +1 -1
- package/dist/showcase/assets/{media-library-Dnp9S0oW.js → media-library-DyPu-kR9.js} +1 -1
- package/dist/showcase/assets/{mention-inline-suggestions-Bp-fVNYF.js → mention-inline-suggestions-BTunE4RJ.js} +1 -1
- package/dist/showcase/assets/{mentions-DNRk30XZ.js → mentions-BXSq2eCS.js} +1 -1
- package/dist/showcase/assets/{menus-DFURb5VL.js → menus-USrp5qP5.js} +1 -1
- package/dist/showcase/assets/{message-square-DG0qIsG_.js → message-square-Cyrr-QgJ.js} +1 -1
- package/dist/showcase/assets/{metadata-list-Cb1DQd4S.js → metadata-list-BJTye3J8.js} +1 -1
- package/dist/showcase/assets/{metadata-list-BhlsEWYT.js → metadata-list-CoRYXjEw.js} +1 -1
- package/dist/showcase/assets/{metric-BkzIsP8H.js → metric-DdC_pWnF.js} +1 -1
- package/dist/showcase/assets/{metric-bar-CU73nx89.js → metric-bar-PGG8KQS0.js} +1 -1
- package/dist/showcase/assets/{metric-grid-BMLMbLjE.js → metric-grid-ZqDufV_5.js} +1 -1
- package/dist/showcase/assets/{metric-trend-chip-Dutl5uZo.js → metric-trend-chip-BhCRReMp.js} +1 -1
- package/dist/showcase/assets/{metrics-analytics-bar-AqG2oyIy.js → metrics-analytics-bar-U3gehGfQ.js} +1 -1
- package/dist/showcase/assets/{metrics-analytics-cards-CrFHmR2f.js → metrics-analytics-cards-CzbLGAWi.js} +1 -1
- package/dist/showcase/assets/{metrics-comparison-CY-DyLv7.js → metrics-comparison-B1z3nUpo.js} +1 -1
- package/dist/showcase/assets/{metrics-heatmap-BmX_CkiP.js → metrics-heatmap-DZeqRxFz.js} +1 -1
- package/dist/showcase/assets/{metrics-inline-badge-C1IFjdJN.js → metrics-inline-badge-CPyhCHXj.js} +1 -1
- package/dist/showcase/assets/{metrics-kpi-row-8Kbn034e.js → metrics-kpi-row-COVuNReW.js} +1 -1
- package/dist/showcase/assets/{metrics-micro-grid-CodO02yA.js → metrics-micro-grid-BNSrw6sM.js} +1 -1
- package/dist/showcase/assets/{metrics-overview-CdPqEAAG.js → metrics-overview-3IHComMd.js} +1 -1
- package/dist/showcase/assets/{metrics-stat-cards-Cw7UMWmb.js → metrics-stat-cards-6Owbjvmc.js} +1 -1
- package/dist/showcase/assets/minus-CwzskYaZ.js +1 -0
- package/dist/showcase/assets/{money-display-CFfUZLus.js → money-display-CUkeS9k1.js} +1 -1
- package/dist/showcase/assets/{month-year-picker-ChVcYm9f.js → month-year-picker-CCCTmZHv.js} +1 -1
- package/dist/showcase/assets/{navigation-Boyt1q-1.js → navigation-BUReVn4R.js} +1 -1
- package/dist/showcase/assets/{navigation-CThYYxkL.js → navigation-CSzYKdcR.js} +1 -1
- package/dist/showcase/assets/{navigation-extras-CxLc-Mqx.js → navigation-extras-DmUhDPMz.js} +1 -1
- package/dist/showcase/assets/{onboarding-checklist-C15gqmFc.js → onboarding-checklist-C3JhV5Gb.js} +1 -1
- package/dist/showcase/assets/{overflow-tab-bar-B2Htn-Ft.js → overflow-tab-bar-CEdrls-W.js} +1 -1
- package/dist/showcase/assets/{overlays-CPZfp0nk.js → overlays-BKKEzmF4.js} +1 -1
- package/dist/showcase/assets/{overlays-Cpj4akiw.js → overlays-C1UodoAu.js} +1 -1
- package/dist/showcase/assets/{overview-BB-Xbkff.js → overview-Dq0MqK32.js} +1 -1
- package/dist/showcase/assets/{package-DLn6nx-u.js → package-BaQGBJmO.js} +1 -1
- package/dist/showcase/assets/{package-check-B0wyBUSU.js → package-check-C8HJfDxS.js} +1 -1
- package/dist/showcase/assets/{page-BPFNsNh7.js → page-DvMaeo43.js} +1 -1
- package/dist/showcase/assets/{page-action-button-DMS8Vcmz.js → page-action-button-B5ZGYpYy.js} +1 -1
- package/dist/showcase/assets/{page-header-BGqE9hzO.js → page-header-Y-96EPMp.js} +1 -1
- package/dist/showcase/assets/{pagination-Be6ynLCp.js → pagination-Br1AfDte.js} +1 -1
- package/dist/showcase/assets/{pagination-T4FmLNHn.js → pagination-yLAHxKpc.js} +1 -1
- package/dist/showcase/assets/{paperclip-B_kxXzSN.js → paperclip-BBDKiZeH.js} +1 -1
- package/dist/showcase/assets/{password-input-qfQ5eIU4.js → password-input-iwrucadb.js} +1 -1
- package/dist/showcase/assets/{pencil-DlDLApli.js → pencil-BUhkJ_Nn.js} +1 -1
- package/dist/showcase/assets/{phone-D8tvvbSQ.js → phone-DtJDFH70.js} +1 -1
- package/dist/showcase/assets/plus-4gOvUk-5.js +1 -0
- package/dist/showcase/assets/{popover-Bu7aaPjE.js → popover-C8YAdHfL.js} +1 -1
- package/dist/showcase/assets/{popover-BsCx2XMI.js → popover-D9ZDWqLl.js} +1 -1
- package/dist/showcase/assets/{popover-menu-CD_JfEeq.js → popover-menu-C5M9Up4M.js} +1 -1
- package/dist/showcase/assets/{products-BzHX1ta0.js → products-DrKTk8Aw.js} +1 -1
- package/dist/showcase/assets/{progress-CpW2ZGAy.js → progress-C1qKfCZB.js} +1 -1
- package/dist/showcase/assets/{progress-jIJ_EIKE.js → progress-CpD58Wl0.js} +1 -1
- package/dist/showcase/assets/{props-table-CCcohuyT.js → props-table-C6gPyO49.js} +1 -1
- package/dist/showcase/assets/{quote-Bc9eHVKi.js → quote-BXTU9evS.js} +1 -1
- package/dist/showcase/assets/{receipt-B77_VWtt.js → receipt-Dwc4p04P.js} +1 -1
- package/dist/showcase/assets/{receipt-text-BlL_TJsS.js → receipt-text-DBEu6Gym.js} +1 -1
- package/dist/showcase/assets/{refinement-guide-BpzOvT_R.js → refinement-guide-DeO_yM8U.js} +1 -1
- package/dist/showcase/assets/{refresh-cw-CELG4taF.js → refresh-cw-BpV3OG_s.js} +1 -1
- package/dist/showcase/assets/{resolveValueLabel-LRTUaJTb.js → resolveValueLabel-DZTrDdG0.js} +1 -1
- package/dist/showcase/assets/{resource-BT8_ck3n.js → resource-BLGoRFou.js} +1 -1
- package/dist/showcase/assets/{resource-C7J3yZp6.js → resource-D5AQesdN.js} +1 -1
- package/dist/showcase/assets/{resource-selector-card-Ay8ImvKg.js → resource-selector-card-BKzeUE0k.js} +1 -1
- package/dist/showcase/assets/{rich-text-editor-DVtTVuZ6.js → rich-text-editor-DYkPamiq.js} +1 -1
- package/dist/showcase/assets/{rich-text-editor-CdGVvtsm.js → rich-text-editor-k1dtT5bX.js} +1 -1
- package/dist/showcase/assets/rotate-ccw-Dajwztf1.js +1 -0
- package/dist/showcase/assets/{route-CgBh1oKF.js → route-5uO9C0gV.js} +1 -1
- package/dist/showcase/assets/{save-BFsAGR7O.js → save-DONvClxa.js} +1 -1
- package/dist/showcase/assets/{schema-form-CaF-lBkN.js → schema-form-BMQmx4JI.js} +1 -1
- package/dist/showcase/assets/{scroll-area-BkZULoZA.js → scroll-area-CnAyhKQ_.js} +1 -1
- package/dist/showcase/assets/{scroll-area-CpDi_6FP.js → scroll-area-CxwfyjX3.js} +1 -1
- package/dist/showcase/assets/{section-D-N8Ze16.js → section-Dd6X6IKg.js} +1 -1
- package/dist/showcase/assets/{select-ReMZs8K6.js → select-CJSyu7sS.js} +1 -1
- package/dist/showcase/assets/{select-C9Mfb_Gj.js → select-Du9VvUxt.js} +1 -1
- package/dist/showcase/assets/{send-C6PbwpHN.js → send-3ANJL7UB.js} +1 -1
- package/dist/showcase/assets/{separator-CywPSoE0.js → separator-BiXjWmP-.js} +1 -1
- package/dist/showcase/assets/{separator-Ha9YxI2x.js → separator-y9i6EG-N.js} +1 -1
- package/dist/showcase/assets/{settings-2-CVq5Uyv5.js → settings-2-Ynd1Lcz4.js} +1 -1
- package/dist/showcase/assets/{settings-DkTHc0Ob.js → settings-CqdZB-OI.js} +1 -1
- package/dist/showcase/assets/{sheet-k-P0gWlk.js → sheet-CzFOcAwE.js} +1 -1
- package/dist/showcase/assets/{shield-Cme7_JJR.js → shield-Dmxwcn3w.js} +1 -1
- package/dist/showcase/assets/{shield-alert-CxV0S5w0.js → shield-alert-RrMsBuWp.js} +1 -1
- package/dist/showcase/assets/{shield-check-BW_7p6Xf.js → shield-check-Bnw8RAvI.js} +1 -1
- package/dist/showcase/assets/{shopping-bag-CoR8AMYU.js → shopping-bag-DGXTQNOf.js} +1 -1
- package/dist/showcase/assets/{showcase-m3FzbvoC.js → showcase-DMRZCqmg.js} +1 -1
- package/dist/showcase/assets/{sidebar-bz_FzvjM.js → sidebar-C0tsWnrh.js} +1 -1
- package/dist/showcase/assets/{sidebar.context-BWMPnGn6.js → sidebar.context-DXGEPgaT.js} +1 -1
- package/dist/showcase/assets/{skeleton-BJMnQDgf.js → skeleton-BFa4FHSC.js} +1 -1
- package/dist/showcase/assets/{skeleton-DoWW5XZD.js → skeleton-DOJ1RAcJ.js} +1 -1
- package/dist/showcase/assets/{slider-BH1Gtp_p.js → slider-BjQs0C8N.js} +1 -1
- package/dist/showcase/assets/{smart-card-C6-idFYI.js → smart-card-BwSFemlj.js} +1 -1
- package/dist/showcase/assets/{sonner-CGZ3FC4U.js → sonner-BXMIK3eQ.js} +1 -1
- package/dist/showcase/assets/{sortable.esm-CE0TA9V_.js → sortable.esm-BeBA3gT5.js} +1 -1
- package/dist/showcase/assets/{sparkles-8yQFcmte.js → sparkles-Bc0I4qTf.js} +1 -1
- package/dist/showcase/assets/{spinner-CO8LjtjY.js → spinner-HyNCtTyd.js} +1 -1
- package/dist/showcase/assets/{spinner-BYUX0luk.js → spinner-LskR5l9T.js} +1 -1
- package/dist/showcase/assets/{spinner-CNveVfOr.js → spinner-mtwVRe8M.js} +1 -1
- package/dist/showcase/assets/{square-pen-CWylvezY.js → square-pen-BrZ2OxTe.js} +1 -1
- package/dist/showcase/assets/{stacked-avatars-DiNA5OJK.js → stacked-avatars-DOAFRjmZ.js} +1 -1
- package/dist/showcase/assets/{star-t53uwwyp.js → star-lUSxI166.js} +1 -1
- package/dist/showcase/assets/startOfDay-BLhx9b6k.js +1 -0
- package/dist/showcase/assets/{styles-CwpnwrEQ.js → styles-COpnijXU.js} +1 -1
- package/dist/showcase/assets/{suggestions-CvxZxsmc.js → suggestions-ftPYc9p6.js} +1 -1
- package/dist/showcase/assets/{switch-CewkokYT.js → switch-DirKCDsg.js} +1 -1
- package/dist/showcase/assets/{switch-D-7uqDR8.js → switch-DoPIN_UN.js} +1 -1
- package/dist/showcase/assets/{sync-DnBSRAwH.js → sync-C2DEiaQz.js} +1 -1
- package/dist/showcase/assets/{table-ds5oNU0h.js → table-D6GywZEx.js} +1 -1
- package/dist/showcase/assets/{table-3cUcSCBR.js → table-Dex8CcfW.js} +1 -1
- package/dist/showcase/assets/{table-actions-CrujG5R-.js → table-actions-CJg82sW0.js} +1 -1
- package/dist/showcase/assets/{tabs-GG911oaV.js → tabs-B9tgdMRD.js} +1 -1
- package/dist/showcase/assets/{tabs-C-hJfSn5.js → tabs-C0fSpkON.js} +1 -1
- package/dist/showcase/assets/{tags-input-DBeIaeVn.js → tags-input-CJSpILy6.js} +1 -1
- package/dist/showcase/assets/{text-button-EZojp9Ye.js → text-button-CoPZBQiq.js} +1 -1
- package/dist/showcase/assets/{text-link-DcKeYjEX.js → text-link-d9JIRU2N.js} +1 -1
- package/dist/showcase/assets/{textarea-DgNgSl1g.js → textarea-BN4PUX-V.js} +1 -1
- package/dist/showcase/assets/{textarea-PXKZSiRa.js → textarea-CBhdtg5X.js} +1 -1
- package/dist/showcase/assets/{timelines-CaF_Ze8z.js → timelines-F_mzbAPA.js} +1 -1
- package/dist/showcase/assets/{toggle-group-D_iuhL1G.js → toggle-group-8ESepeYW.js} +1 -1
- package/dist/showcase/assets/{toggles-BKaayRmE.js → toggles-B2Cg5NVG.js} +1 -1
- package/dist/showcase/assets/{toggles-group-DRAksOw2.js → toggles-group-BTmtSzAa.js} +1 -1
- package/dist/showcase/assets/{tooltip-B_LnC5D2.js → tooltip-DNsHZ3ZE.js} +1 -1
- package/dist/showcase/assets/{trash-2-DhUpICQq.js → trash-2-Bf5dpRjn.js} +1 -1
- package/dist/showcase/assets/trending-up-RSklVrcZ.js +1 -0
- package/dist/showcase/assets/{truck-D6SGLjv1.js → truck-CqmeajvP.js} +1 -1
- package/dist/showcase/assets/{typography-qEz6MMn9.js → typography-DJjQO_Ld.js} +1 -1
- package/dist/showcase/assets/{ui-badge-BA334hdB.js → ui-badge-BwkZfeBs.js} +1 -1
- package/dist/showcase/assets/{ui-card-CjqUyGvB.js → ui-card-B3mtVa60.js} +1 -1
- package/dist/showcase/assets/{ui-table-cDgI6WMk.js → ui-table-DM-avYTi.js} +1 -1
- package/dist/showcase/assets/{upload-tray-BcA-7pqW.js → upload-tray-CFI_7lcB.js} +1 -1
- package/dist/showcase/assets/{use-layout-link-DIUWH-oo.js → use-layout-link-BI4MRSHG.js} +1 -1
- package/dist/showcase/assets/{useAnchoredPopupScrollLock-BavpibMb.js → useAnchoredPopupScrollLock-DRs8fnir.js} +1 -1
- package/dist/showcase/assets/{useAriaLabelledBy-HDEJjv0f.js → useAriaLabelledBy-DhgmwFn7.js} +1 -1
- package/dist/showcase/assets/{useCollapsiblePanel-CL0pCuxO.js → useCollapsiblePanel-vGthv_MA.js} +1 -1
- package/dist/showcase/assets/{useCompositeItem-LkMSD9DW.js → useCompositeItem-g1FeYTbw.js} +1 -1
- package/dist/showcase/assets/{useCompositeListItem-C_oLUvf8.js → useCompositeListItem-CyULeWSL.js} +1 -1
- package/dist/showcase/assets/{useLabelableId-DDpjUdIO.js → useLabelableId-CBWpOnwZ.js} +1 -1
- package/dist/showcase/assets/{useOpenInteractionType-DQOSh-Eu.js → useOpenInteractionType-CQSuD7yw.js} +1 -1
- package/dist/showcase/assets/useRender-Dm8qJkvr.js +1 -0
- package/dist/showcase/assets/{useTriggerFocusGuards-BPFrAxlp.js → useTriggerFocusGuards-B6KAsVMk.js} +1 -1
- package/dist/showcase/assets/{useValueChanged-lYlHqRM1.js → useValueChanged-DXek_Wx7.js} +1 -1
- package/dist/showcase/assets/user-B35DABNz.js +1 -0
- package/dist/showcase/assets/{user-plus-B1Pi7SNv.js → user-plus-C69GplWt.js} +1 -1
- package/dist/showcase/assets/{users-DAlxvktS.js → users-DDgUGkgw.js} +1 -1
- package/dist/showcase/assets/{vendor-profile-ClJ6G6SO.js → vendor-profile-Zfh99jtA.js} +1 -1
- package/dist/showcase/assets/{video-DxooIkh-.js → video-CDERYmRS.js} +1 -1
- package/dist/showcase/assets/{wrench-BiwmotMF.js → wrench-PjtfaRuJ.js} +1 -1
- package/dist/showcase/assets/x-FNPo6qUv.js +1 -0
- package/dist/showcase/assets/{zap-a90eC6iO.js → zap-CzjU6LH0.js} +1 -1
- package/dist/showcase/index.html +1 -1
- package/package.json +1 -1
- package/dist/_shared/overlays-CdtMAkKG.js.map +0 -1
- package/dist/_shared/overlays-Diy_H0Au.cjs +0 -2
- package/dist/_shared/overlays-Diy_H0Au.cjs.map +0 -1
- package/dist/showcase/assets/arrow-down-BttnoDxP.js +0 -1
- package/dist/showcase/assets/arrow-left-B1kFGJ8v.js +0 -1
- package/dist/showcase/assets/arrow-right-Md96ra7v.js +0 -1
- package/dist/showcase/assets/arrow-up-B9e9cP-q.js +0 -1
- package/dist/showcase/assets/arrow-up-right-BOHJNdrp.js +0 -1
- package/dist/showcase/assets/checkbox-Qhh92dbS.js +0 -1
- package/dist/showcase/assets/chevron-down-BqrI6QzQ.js +0 -1
- package/dist/showcase/assets/chevron-left-TJKYH3rG.js +0 -1
- package/dist/showcase/assets/chevron-up-CPuAmh-d.js +0 -1
- package/dist/showcase/assets/chevrons-up-down-DZB44PVY.js +0 -1
- package/dist/showcase/assets/circle-CY0DkTje.js +0 -1
- package/dist/showcase/assets/circle-check-BkFKejsY.js +0 -1
- package/dist/showcase/assets/circle-check-big-vu3Znqdx.js +0 -1
- package/dist/showcase/assets/circle-dot-CsBIkbEH.js +0 -1
- package/dist/showcase/assets/clock-3-mhWDhdka.js +0 -1
- package/dist/showcase/assets/clock-Dd-urPd2.js +0 -1
- package/dist/showcase/assets/inertValue-DrANZiJk.js +0 -1
- package/dist/showcase/assets/isSameDay-DVP1ae2V.js +0 -1
- package/dist/showcase/assets/isToday-CNAQB-p9.js +0 -1
- package/dist/showcase/assets/minus-B1es6KJX.js +0 -1
- package/dist/showcase/assets/plus-BkhJjfUv.js +0 -1
- package/dist/showcase/assets/rotate-ccw-MwEZ1b11.js +0 -1
- package/dist/showcase/assets/startOfDay-BKFJecZ3.js +0 -1
- package/dist/showcase/assets/trending-up-Kfm5l65O.js +0 -1
- package/dist/showcase/assets/useRender-CnmFaF3Y.js +0 -1
- package/dist/showcase/assets/user-DLuRcjl0.js +0 -1
- package/dist/showcase/assets/x-idpnOHil.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./chunk-QTnfLwEv.js";import{t}from"./react-sKtkuLrH.js";import{f as n,p as r}from"./section-D-N8Ze16.js";import{t as i}from"./arrow-up-right-BOHJNdrp.js";import{d as a,n as o}from"./index-QESvAJrb.js";import{t as s}from"./smart-card-C6-idFYI.js";import{Zn as c,t as l,u}from"./AreaChart-CGkuyNyy.js";import{t as d}from"./analytics.strings-B9262Jmq.js";import{n as f,t as p}from"./format-metric-value-BTsvOjZQ.js";import{t as m}from"./metric-trend-chip-Dutl5uZo.js";var h=e(t(),1),g=a(),_={positive:`var(--success)`,negative:`var(--destructive)`,neutral:`var(--muted-foreground)`};function v({data:e,trend:t=`neutral`,color:n,className:r,animated:i=!0,"aria-label":a=`Trend sparkline`}){let s=(0,h.useId)(),d=(0,h.useMemo)(()=>`metric-spark-${s.replaceAll(`:`,``)}`,[s]),f=n??_[t],p=(0,h.useMemo)(()=>!Array.isArray(e)||e.length===0?[]:e.map((e,t)=>({i:t,v:e})),[e]);return p.length===0?(0,g.jsx)(`div`,{className:o(`metric-sparkline--component`,`w-full`,r),"aria-hidden":`true`}):(0,g.jsx)(`div`,{className:o(`w-full`,r),role:`img`,"aria-label":a,children:(0,g.jsx)(c,{width:`100%`,height:`100%`,initialDimension:{width:1,height:1},children:(0,g.jsxs)(l,{data:p,margin:{top:2,right:0,bottom:0,left:0},children:[(0,g.jsx)(`defs`,{children:(0,g.jsxs)(`linearGradient`,{id:d,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,g.jsx)(`stop`,{offset:`0%`,stopColor:f,stopOpacity:.25}),(0,g.jsx)(`stop`,{offset:`100%`,stopColor:f,stopOpacity:0})]})}),(0,g.jsx)(u,{type:`monotone`,dataKey:`v`,stroke:f,strokeWidth:1.75,fill:`url(#${d})`,dot:!1,activeDot:!1,isAnimationActive:i,animationDuration:600})]})})})}v.displayName=`MetricSparkline`;var y=({className:e})=>(0,g.jsx)(`div`,{className:o(`animate-pulse rounded bg-muted`,e)});function b({variant:e=`default`,size:t=`md`,className:n}){let r=t===`sm`?`p-3`:t===`lg`?`p-5`:`p-4`;return e===`card`||e===`bordered`||e===`accent`||e===`colored`?(0,g.jsxs)(`div`,{className:o(`metric-skeleton--component`,`rounded-xl border border-border bg-card shadow-sm`,r,n),"aria-busy":`true`,"aria-live":`polite`,children:[(0,g.jsx)(y,{className:`h-3 w-24`}),(0,g.jsx)(y,{className:o(`mt-3`,t===`lg`?`h-9 w-40`:`h-7 w-32`)}),(0,g.jsx)(y,{className:`mt-2 h-3 w-20`}),(0,g.jsx)(y,{className:`mt-3 h-8 w-full`})]}):e===`compact`?(0,g.jsxs)(`div`,{className:o(`flex items-center gap-3`,n),"aria-busy":`true`,children:[(0,g.jsx)(y,{className:`size-9 rounded-lg`}),(0,g.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,g.jsx)(y,{className:`h-3 w-20`}),(0,g.jsx)(y,{className:`h-4 w-28`})]}),(0,g.jsx)(y,{className:`h-5 w-12 rounded-full`})]}):e===`minimal`?(0,g.jsxs)(`div`,{className:o(`inline-flex items-baseline gap-2`,n),"aria-busy":`true`,children:[(0,g.jsx)(y,{className:`h-3 w-12`}),(0,g.jsx)(y,{className:`h-3 w-16`})]}):(0,g.jsxs)(`div`,{className:o(`flex flex-col gap-1.5`,r,n),"aria-busy":`true`,children:[(0,g.jsx)(y,{className:`h-3 w-20`}),(0,g.jsx)(y,{className:`h-5 w-28`}),(0,g.jsx)(y,{className:`mt-1 h-6 w-full`})]})}b.displayName=`MetricSkeleton`;var x={default:{border:`border-border`,bg:`bg-card`,bar:`bg-foreground`,dot:`bg-foreground`,ring:`ring-border`},primary:{border:`border-primary/25`,bg:`bg-primary/5`,bar:`bg-primary`,dot:`bg-primary`,ring:`ring-primary/20`},success:{border:`border-success/30`,bg:`bg-success/5`,bar:`bg-success`,dot:`bg-success`,ring:`ring-success/20`},warning:{border:`border-warning/40`,bg:`bg-warning/10`,bar:`bg-warning`,dot:`bg-warning`,ring:`ring-warning/30`},danger:{border:`border-destructive/30`,bg:`bg-destructive/5`,bar:`bg-destructive`,dot:`bg-destructive`,ring:`ring-destructive/20`},info:{border:`border-info/30`,bg:`bg-info/5`,bar:`bg-info`,dot:`bg-info`,ring:`ring-info/20`}},S={sm:`text-sm`,md:`text-lg`,lg:`text-xl`},C={sm:`text-xl`,md:`text-3xl`,lg:`text-4xl`},w={sm:`h-6`,md:`h-8`,lg:`h-10`},T=16;function E(e){let{data:t,variant:n=`default`,size:i=`md`,colorScheme:a=`default`,showSparkline:s=!0,showChange:c=!0,showIcon:l=!0,loading:u=!1,error:m=!1,errorLabel:_,progress:v=0,className:y,"aria-label":x}=e,S=(0,h.useMemo)(()=>p(t),[t]),C=(0,h.useMemo)(()=>f(t),[t]);if(u)return(0,g.jsx)(b,{variant:n,size:i,className:o(`metric--component`,y)});if(m)return(0,g.jsx)(`div`,{className:o(`flex items-center justify-center rounded-lg border border-border bg-card p-4 text-muted-foreground`,y),children:(0,g.jsx)(r,{children:_??d.metricErrorLabel})});let w={data:t,formattedValue:S,trend:C,size:i,showSparkline:s,showChange:c,showIcon:l,colorScheme:a,ariaLabel:x??t.label,className:y};switch(n){case`card`:return(0,g.jsx)(O,{...w});case`compact`:return(0,g.jsx)(k,{...w});case`minimal`:return(0,g.jsx)(A,{...w});case`bordered`:return(0,g.jsx)(j,{...w});case`accent`:return(0,g.jsx)(M,{...w});case`colored`:return(0,g.jsx)(N,{...w,progress:v});default:return(0,g.jsx)(D,{...w})}}E.displayName=`Metric`;function D({data:e,formattedValue:t,trend:i,size:a,showSparkline:s,showChange:c,showIcon:l,ariaLabel:u,className:d}){let f=e.icon;return(0,g.jsxs)(`div`,{className:o(`flex min-w-0 flex-col gap-1`,d),"aria-label":u,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0 text-muted-foreground`,children:[!!l&&!!f&&(0,g.jsx)(f,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,g.jsx)(r,{size:`xs`,type:`secondary`,weight:`medium`,className:`truncate`,children:e.label})]}),(0,g.jsx)(n,{tag:`h5`,className:o(`font-bold tabular-nums tracking-tight border-none pb-0 leading-tight truncate`,S[a]),title:t,children:t}),!!c&&!!e.change&&(0,g.jsx)(`div`,{className:`min-w-0`,children:(0,g.jsx)(m,{change:e.change,trend:e.trend,size:a,variant:`compact`})}),!!e.subtitle&&(0,g.jsx)(r,{size:`xs`,type:`secondary`,className:`truncate`,children:e.subtitle}),!!s&&!!e.sparkline?.length&&(0,g.jsx)(v,{data:e.sparkline,trend:i,className:o(`mt-auto`,w[a])}),!!e.footer&&(0,g.jsx)(r,{size:`xxs`,type:`discrete`,className:`truncate`,children:e.footer})]})}function O({data:e,formattedValue:t,trend:i,size:a,showSparkline:c,showChange:l,showIcon:u,ariaLabel:d,className:f}){let p=e.icon,h=!!(e.href||e.onClick),_=a===`sm`?`small`:`default`,y=(0,g.jsxs)(s,{title:e.label,icon:u&&p?(0,g.jsx)(p,{className:`size-4`,"aria-hidden":`true`}):null,tooltip:e.tooltip,padding:_,className:o(h&&`cursor-pointer transition-shadow hover:shadow-md`,f),"aria-label":d,children:[(0,g.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,g.jsx)(n,{tag:a===`sm`?`h5`:a===`lg`?`h3`:`h4`,className:o(`font-bold tabular-nums tracking-tight border-none pb-0 leading-none`,C[a]),children:t}),!!l&&!!e.change&&(0,g.jsx)(m,{change:e.change,trend:e.trend,size:a,variant:`badge`})]}),!!e.subtitle&&(0,g.jsx)(r,{type:`secondary`,className:`mt-2`,children:e.subtitle}),!!c&&!!e.sparkline?.length&&(0,g.jsx)(v,{data:e.sparkline,trend:i,className:o(`mt-3`,a===`lg`?`h-12`:`h-10`)}),!!e.footer&&(0,g.jsx)(r,{size:`xs`,type:`secondary`,className:`mt-2`,children:e.footer})]});return h&&e.onClick?(0,g.jsx)(`div`,{role:`button`,tabIndex:0,onClick:e.onClick,onKeyDown:t=>(t.key===`Enter`||t.key===` `)&&e.onClick?.(),className:`rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,children:y}):y}function k({data:e,formattedValue:t,size:n,showChange:i,showIcon:a,ariaLabel:s,className:c}){let l=e.icon;return(0,g.jsxs)(`div`,{className:o(`flex items-center gap-3`,c),"aria-label":s,children:[!!a&&!!l&&(0,g.jsx)(`span`,{className:`inline-flex size-9 shrink-0 items-center justify-center rounded-lg bg-muted/60 text-muted-foreground`,children:(0,g.jsx)(l,{className:`size-4`,"aria-hidden":`true`})}),(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsx)(r,{size:`xs`,type:`secondary`,className:`truncate`,children:e.label}),(0,g.jsx)(r,{tag:`span`,size:n===`sm`?`sm`:`lg`,weight:`bold`,className:`block truncate tabular-nums`,children:t})]}),!!i&&!!e.change&&(0,g.jsx)(m,{change:e.change,trend:e.trend,size:n,variant:`badge`,className:`shrink-0`})]})}function A({data:e,formattedValue:t,size:n,showChange:i,ariaLabel:a,className:s}){return(0,g.jsxs)(`span`,{className:o(`inline-flex items-baseline gap-2`,s),"aria-label":a,children:[(0,g.jsxs)(r,{tag:`span`,size:n===`lg`?`sm`:`xs`,type:`secondary`,children:[e.label,`:`]}),(0,g.jsx)(r,{tag:`span`,size:n===`lg`?`sm`:`xs`,weight:`semibold`,className:`tabular-nums`,children:t}),!!i&&!!e.change&&(0,g.jsx)(m,{change:e.change,trend:e.trend,size:`sm`,variant:`inline`})]})}function j({data:e,formattedValue:t,trend:i,size:a,showSparkline:s,showChange:c,showIcon:l,colorScheme:u,ariaLabel:d,className:f}){let p=e.icon,h=x[u];return(0,g.jsxs)(`div`,{className:o(`flex flex-col gap-3 rounded-xl border p-4 shadow-sm`,h.border,h.bg,f),"aria-label":d,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 text-muted-foreground`,children:[!!l&&!!p&&(0,g.jsx)(p,{className:`size-4 shrink-0`,"aria-hidden":`true`}),(0,g.jsx)(r,{size:`xs`,type:`secondary`,weight:`medium`,children:e.label})]}),!!c&&!!e.change&&(0,g.jsx)(m,{change:e.change,trend:e.trend,size:a,variant:`badge`})]}),(0,g.jsx)(n,{tag:a===`lg`?`h3`:`h4`,className:o(`font-bold tabular-nums tracking-tight border-none pb-0 leading-none`,C[a]),children:t}),!!e.subtitle&&(0,g.jsx)(r,{size:`xs`,type:`secondary`,children:e.subtitle}),!!s&&!!e.sparkline?.length&&(0,g.jsx)(v,{data:e.sparkline,trend:i,className:w[a]}),!!e.footer&&(0,g.jsx)(r,{size:`xxs`,type:`discrete`,children:e.footer})]})}function M({data:e,formattedValue:t,trend:i,size:a,showSparkline:s,showChange:c,ariaLabel:l,className:u}){let d=e.icon;return(0,g.jsxs)(`div`,{className:o(`dark relative flex flex-col overflow-hidden rounded-lg bg-card text-card-foreground shadow-sm ring-1 ring-border`,u),"aria-label":l,children:[(0,g.jsxs)(`div`,{className:`flex flex-col gap-2 p-5`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,g.jsx)(r,{size:`xs`,type:`secondary`,weight:`medium`,className:`uppercase tracking-wider`,children:e.label}),!!d&&(0,g.jsx)(`span`,{className:`inline-flex size-7 items-center justify-center rounded-lg bg-foreground/[0.08]`,children:(0,g.jsx)(d,{className:`size-3.5 text-muted-foreground`,"aria-hidden":`true`})})]}),(0,g.jsxs)(`div`,{className:`flex items-baseline gap-2.5`,children:[(0,g.jsx)(n,{tag:`h3`,className:o(`font-bold tabular-nums tracking-tight border-none pb-0 leading-none text-foreground`,C[a]),children:t}),!!c&&!!e.change&&(0,g.jsx)(m,{change:e.change,trend:e.trend,size:a,variant:`compact`})]}),!!e.subtitle&&(0,g.jsx)(r,{size:`xs`,type:`secondary`,children:e.subtitle})]}),!!s&&!!e.sparkline?.length&&(0,g.jsx)(v,{data:e.sparkline,trend:i,className:`h-12 w-full`})]})}function N({data:e,formattedValue:t,size:a,showChange:s,colorScheme:c,ariaLabel:l,className:u,progress:d=0}){let f=x[c==="default"?`primary`:c],p=Math.round(Math.min(Math.max(d,0),100)/100*T);return(0,g.jsxs)(`div`,{className:o(`rounded-xl bg-card p-5 shadow-sm border border-border/50`,u),"aria-label":l,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(r,{size:`xs`,type:`secondary`,weight:`medium`,className:`truncate`,children:e.label}),(0,g.jsx)(`span`,{className:o(`size-1.5 rounded-full shrink-0`,f.dot),"aria-hidden":`true`})]}),(0,g.jsxs)(`div`,{className:`mt-2.5 flex items-baseline gap-2`,children:[(0,g.jsx)(n,{tag:`h3`,className:o(`font-bold tabular-nums tracking-tight border-none pb-0 leading-none`,C[a]),children:t}),!!e.subtitle&&(0,g.jsx)(r,{size:`xs`,type:`secondary`,children:e.subtitle})]}),(0,g.jsx)(`div`,{className:`mt-4 flex items-center gap-0.5`,role:`progressbar`,"aria-label":`${e.label} progress`,"aria-valuenow":d,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${d}%`,children:Array.from({length:T},(e,t)=>(0,g.jsx)(`div`,{className:o(`h-6 w-1.5 rounded-sm transition-colors`,t<p?f.bar:`bg-muted`)},`seg-${t}`))}),!!s&&!!e.change&&(0,g.jsx)(`div`,{className:`mt-3`,children:(0,g.jsx)(m,{change:e.change,trend:e.trend,size:a,variant:`default`})}),!!e.footer&&(0,g.jsxs)(`div`,{className:`mt-2 inline-flex items-center gap-1 text-muted-foreground`,children:[(0,g.jsx)(i,{className:`size-3`,"aria-hidden":`true`}),(0,g.jsx)(r,{size:`xxs`,type:`secondary`,children:e.footer})]})]})}export{b as n,v as r,E as t};
|
|
1
|
+
import{r as e}from"./chunk-QTnfLwEv.js";import{t}from"./react-sKtkuLrH.js";import{f as n,p as r}from"./section-Dd6X6IKg.js";import{t as i}from"./arrow-up-right-DdWl37XF.js";import{d as a,n as o}from"./index-o71HAmc3.js";import{t as s}from"./smart-card-BwSFemlj.js";import{Zn as c,t as l,u}from"./AreaChart-CFYg5vW0.js";import{t as d}from"./analytics.strings-B9262Jmq.js";import{n as f,t as p}from"./format-metric-value-BTsvOjZQ.js";import{t as m}from"./metric-trend-chip-BhCRReMp.js";var h=e(t(),1),g=a(),_={positive:`var(--success)`,negative:`var(--destructive)`,neutral:`var(--muted-foreground)`};function v({data:e,trend:t=`neutral`,color:n,className:r,animated:i=!0,"aria-label":a=`Trend sparkline`}){let s=(0,h.useId)(),d=(0,h.useMemo)(()=>`metric-spark-${s.replaceAll(`:`,``)}`,[s]),f=n??_[t],p=(0,h.useMemo)(()=>!Array.isArray(e)||e.length===0?[]:e.map((e,t)=>({i:t,v:e})),[e]);return p.length===0?(0,g.jsx)(`div`,{className:o(`metric-sparkline--component`,`w-full`,r),"aria-hidden":`true`}):(0,g.jsx)(`div`,{className:o(`w-full`,r),role:`img`,"aria-label":a,children:(0,g.jsx)(c,{width:`100%`,height:`100%`,initialDimension:{width:1,height:1},children:(0,g.jsxs)(l,{data:p,margin:{top:2,right:0,bottom:0,left:0},children:[(0,g.jsx)(`defs`,{children:(0,g.jsxs)(`linearGradient`,{id:d,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,g.jsx)(`stop`,{offset:`0%`,stopColor:f,stopOpacity:.25}),(0,g.jsx)(`stop`,{offset:`100%`,stopColor:f,stopOpacity:0})]})}),(0,g.jsx)(u,{type:`monotone`,dataKey:`v`,stroke:f,strokeWidth:1.75,fill:`url(#${d})`,dot:!1,activeDot:!1,isAnimationActive:i,animationDuration:600})]})})})}v.displayName=`MetricSparkline`;var y=({className:e})=>(0,g.jsx)(`div`,{className:o(`animate-pulse rounded bg-muted`,e)});function b({variant:e=`default`,size:t=`md`,className:n}){let r=t===`sm`?`p-3`:t===`lg`?`p-5`:`p-4`;return e===`card`||e===`bordered`||e===`accent`||e===`colored`?(0,g.jsxs)(`div`,{className:o(`metric-skeleton--component`,`rounded-xl border border-border bg-card shadow-sm`,r,n),"aria-busy":`true`,"aria-live":`polite`,children:[(0,g.jsx)(y,{className:`h-3 w-24`}),(0,g.jsx)(y,{className:o(`mt-3`,t===`lg`?`h-9 w-40`:`h-7 w-32`)}),(0,g.jsx)(y,{className:`mt-2 h-3 w-20`}),(0,g.jsx)(y,{className:`mt-3 h-8 w-full`})]}):e===`compact`?(0,g.jsxs)(`div`,{className:o(`flex items-center gap-3`,n),"aria-busy":`true`,children:[(0,g.jsx)(y,{className:`size-9 rounded-lg`}),(0,g.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,g.jsx)(y,{className:`h-3 w-20`}),(0,g.jsx)(y,{className:`h-4 w-28`})]}),(0,g.jsx)(y,{className:`h-5 w-12 rounded-full`})]}):e===`minimal`?(0,g.jsxs)(`div`,{className:o(`inline-flex items-baseline gap-2`,n),"aria-busy":`true`,children:[(0,g.jsx)(y,{className:`h-3 w-12`}),(0,g.jsx)(y,{className:`h-3 w-16`})]}):(0,g.jsxs)(`div`,{className:o(`flex flex-col gap-1.5`,r,n),"aria-busy":`true`,children:[(0,g.jsx)(y,{className:`h-3 w-20`}),(0,g.jsx)(y,{className:`h-5 w-28`}),(0,g.jsx)(y,{className:`mt-1 h-6 w-full`})]})}b.displayName=`MetricSkeleton`;var x={default:{border:`border-border`,bg:`bg-card`,bar:`bg-foreground`,dot:`bg-foreground`,ring:`ring-border`},primary:{border:`border-primary/25`,bg:`bg-primary/5`,bar:`bg-primary`,dot:`bg-primary`,ring:`ring-primary/20`},success:{border:`border-success/30`,bg:`bg-success/5`,bar:`bg-success`,dot:`bg-success`,ring:`ring-success/20`},warning:{border:`border-warning/40`,bg:`bg-warning/10`,bar:`bg-warning`,dot:`bg-warning`,ring:`ring-warning/30`},danger:{border:`border-destructive/30`,bg:`bg-destructive/5`,bar:`bg-destructive`,dot:`bg-destructive`,ring:`ring-destructive/20`},info:{border:`border-info/30`,bg:`bg-info/5`,bar:`bg-info`,dot:`bg-info`,ring:`ring-info/20`}},S={sm:`text-sm`,md:`text-lg`,lg:`text-xl`},C={sm:`text-xl`,md:`text-3xl`,lg:`text-4xl`},w={sm:`h-6`,md:`h-8`,lg:`h-10`},T=16;function E(e){let{data:t,variant:n=`default`,size:i=`md`,colorScheme:a=`default`,showSparkline:s=!0,showChange:c=!0,showIcon:l=!0,loading:u=!1,error:m=!1,errorLabel:_,progress:v=0,className:y,"aria-label":x}=e,S=(0,h.useMemo)(()=>p(t),[t]),C=(0,h.useMemo)(()=>f(t),[t]);if(u)return(0,g.jsx)(b,{variant:n,size:i,className:o(`metric--component`,y)});if(m)return(0,g.jsx)(`div`,{className:o(`flex items-center justify-center rounded-lg border border-border bg-card p-4 text-muted-foreground`,y),children:(0,g.jsx)(r,{children:_??d.metricErrorLabel})});let w={data:t,formattedValue:S,trend:C,size:i,showSparkline:s,showChange:c,showIcon:l,colorScheme:a,ariaLabel:x??t.label,className:y};switch(n){case`card`:return(0,g.jsx)(O,{...w});case`compact`:return(0,g.jsx)(k,{...w});case`minimal`:return(0,g.jsx)(A,{...w});case`bordered`:return(0,g.jsx)(j,{...w});case`accent`:return(0,g.jsx)(M,{...w});case`colored`:return(0,g.jsx)(N,{...w,progress:v});default:return(0,g.jsx)(D,{...w})}}E.displayName=`Metric`;function D({data:e,formattedValue:t,trend:i,size:a,showSparkline:s,showChange:c,showIcon:l,ariaLabel:u,className:d}){let f=e.icon;return(0,g.jsxs)(`div`,{className:o(`flex min-w-0 flex-col gap-1`,d),"aria-label":u,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0 text-muted-foreground`,children:[!!l&&!!f&&(0,g.jsx)(f,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,g.jsx)(r,{size:`xs`,type:`secondary`,weight:`medium`,className:`truncate`,children:e.label})]}),(0,g.jsx)(n,{tag:`h5`,className:o(`font-bold tabular-nums tracking-tight border-none pb-0 leading-tight truncate`,S[a]),title:t,children:t}),!!c&&!!e.change&&(0,g.jsx)(`div`,{className:`min-w-0`,children:(0,g.jsx)(m,{change:e.change,trend:e.trend,size:a,variant:`compact`})}),!!e.subtitle&&(0,g.jsx)(r,{size:`xs`,type:`secondary`,className:`truncate`,children:e.subtitle}),!!s&&!!e.sparkline?.length&&(0,g.jsx)(v,{data:e.sparkline,trend:i,className:o(`mt-auto`,w[a])}),!!e.footer&&(0,g.jsx)(r,{size:`xxs`,type:`discrete`,className:`truncate`,children:e.footer})]})}function O({data:e,formattedValue:t,trend:i,size:a,showSparkline:c,showChange:l,showIcon:u,ariaLabel:d,className:f}){let p=e.icon,h=!!(e.href||e.onClick),_=a===`sm`?`small`:`default`,y=(0,g.jsxs)(s,{title:e.label,icon:u&&p?(0,g.jsx)(p,{className:`size-4`,"aria-hidden":`true`}):null,tooltip:e.tooltip,padding:_,className:o(h&&`cursor-pointer transition-shadow hover:shadow-md`,f),"aria-label":d,children:[(0,g.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,g.jsx)(n,{tag:a===`sm`?`h5`:a===`lg`?`h3`:`h4`,className:o(`font-bold tabular-nums tracking-tight border-none pb-0 leading-none`,C[a]),children:t}),!!l&&!!e.change&&(0,g.jsx)(m,{change:e.change,trend:e.trend,size:a,variant:`badge`})]}),!!e.subtitle&&(0,g.jsx)(r,{type:`secondary`,className:`mt-2`,children:e.subtitle}),!!c&&!!e.sparkline?.length&&(0,g.jsx)(v,{data:e.sparkline,trend:i,className:o(`mt-3`,a===`lg`?`h-12`:`h-10`)}),!!e.footer&&(0,g.jsx)(r,{size:`xs`,type:`secondary`,className:`mt-2`,children:e.footer})]});return h&&e.onClick?(0,g.jsx)(`div`,{role:`button`,tabIndex:0,onClick:e.onClick,onKeyDown:t=>(t.key===`Enter`||t.key===` `)&&e.onClick?.(),className:`rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,children:y}):y}function k({data:e,formattedValue:t,size:n,showChange:i,showIcon:a,ariaLabel:s,className:c}){let l=e.icon;return(0,g.jsxs)(`div`,{className:o(`flex items-center gap-3`,c),"aria-label":s,children:[!!a&&!!l&&(0,g.jsx)(`span`,{className:`inline-flex size-9 shrink-0 items-center justify-center rounded-lg bg-muted/60 text-muted-foreground`,children:(0,g.jsx)(l,{className:`size-4`,"aria-hidden":`true`})}),(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsx)(r,{size:`xs`,type:`secondary`,className:`truncate`,children:e.label}),(0,g.jsx)(r,{tag:`span`,size:n===`sm`?`sm`:`lg`,weight:`bold`,className:`block truncate tabular-nums`,children:t})]}),!!i&&!!e.change&&(0,g.jsx)(m,{change:e.change,trend:e.trend,size:n,variant:`badge`,className:`shrink-0`})]})}function A({data:e,formattedValue:t,size:n,showChange:i,ariaLabel:a,className:s}){return(0,g.jsxs)(`span`,{className:o(`inline-flex items-baseline gap-2`,s),"aria-label":a,children:[(0,g.jsxs)(r,{tag:`span`,size:n===`lg`?`sm`:`xs`,type:`secondary`,children:[e.label,`:`]}),(0,g.jsx)(r,{tag:`span`,size:n===`lg`?`sm`:`xs`,weight:`semibold`,className:`tabular-nums`,children:t}),!!i&&!!e.change&&(0,g.jsx)(m,{change:e.change,trend:e.trend,size:`sm`,variant:`inline`})]})}function j({data:e,formattedValue:t,trend:i,size:a,showSparkline:s,showChange:c,showIcon:l,colorScheme:u,ariaLabel:d,className:f}){let p=e.icon,h=x[u];return(0,g.jsxs)(`div`,{className:o(`flex flex-col gap-3 rounded-xl border p-4 shadow-sm`,h.border,h.bg,f),"aria-label":d,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 text-muted-foreground`,children:[!!l&&!!p&&(0,g.jsx)(p,{className:`size-4 shrink-0`,"aria-hidden":`true`}),(0,g.jsx)(r,{size:`xs`,type:`secondary`,weight:`medium`,children:e.label})]}),!!c&&!!e.change&&(0,g.jsx)(m,{change:e.change,trend:e.trend,size:a,variant:`badge`})]}),(0,g.jsx)(n,{tag:a===`lg`?`h3`:`h4`,className:o(`font-bold tabular-nums tracking-tight border-none pb-0 leading-none`,C[a]),children:t}),!!e.subtitle&&(0,g.jsx)(r,{size:`xs`,type:`secondary`,children:e.subtitle}),!!s&&!!e.sparkline?.length&&(0,g.jsx)(v,{data:e.sparkline,trend:i,className:w[a]}),!!e.footer&&(0,g.jsx)(r,{size:`xxs`,type:`discrete`,children:e.footer})]})}function M({data:e,formattedValue:t,trend:i,size:a,showSparkline:s,showChange:c,ariaLabel:l,className:u}){let d=e.icon;return(0,g.jsxs)(`div`,{className:o(`dark relative flex flex-col overflow-hidden rounded-lg bg-card text-card-foreground shadow-sm ring-1 ring-border`,u),"aria-label":l,children:[(0,g.jsxs)(`div`,{className:`flex flex-col gap-2 p-5`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,g.jsx)(r,{size:`xs`,type:`secondary`,weight:`medium`,className:`uppercase tracking-wider`,children:e.label}),!!d&&(0,g.jsx)(`span`,{className:`inline-flex size-7 items-center justify-center rounded-lg bg-foreground/[0.08]`,children:(0,g.jsx)(d,{className:`size-3.5 text-muted-foreground`,"aria-hidden":`true`})})]}),(0,g.jsxs)(`div`,{className:`flex items-baseline gap-2.5`,children:[(0,g.jsx)(n,{tag:`h3`,className:o(`font-bold tabular-nums tracking-tight border-none pb-0 leading-none text-foreground`,C[a]),children:t}),!!c&&!!e.change&&(0,g.jsx)(m,{change:e.change,trend:e.trend,size:a,variant:`compact`})]}),!!e.subtitle&&(0,g.jsx)(r,{size:`xs`,type:`secondary`,children:e.subtitle})]}),!!s&&!!e.sparkline?.length&&(0,g.jsx)(v,{data:e.sparkline,trend:i,className:`h-12 w-full`})]})}function N({data:e,formattedValue:t,size:a,showChange:s,colorScheme:c,ariaLabel:l,className:u,progress:d=0}){let f=x[c==="default"?`primary`:c],p=Math.round(Math.min(Math.max(d,0),100)/100*T);return(0,g.jsxs)(`div`,{className:o(`rounded-xl bg-card p-5 shadow-sm border border-border/50`,u),"aria-label":l,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(r,{size:`xs`,type:`secondary`,weight:`medium`,className:`truncate`,children:e.label}),(0,g.jsx)(`span`,{className:o(`size-1.5 rounded-full shrink-0`,f.dot),"aria-hidden":`true`})]}),(0,g.jsxs)(`div`,{className:`mt-2.5 flex items-baseline gap-2`,children:[(0,g.jsx)(n,{tag:`h3`,className:o(`font-bold tabular-nums tracking-tight border-none pb-0 leading-none`,C[a]),children:t}),!!e.subtitle&&(0,g.jsx)(r,{size:`xs`,type:`secondary`,children:e.subtitle})]}),(0,g.jsx)(`div`,{className:`mt-4 flex items-center gap-0.5`,role:`progressbar`,"aria-label":`${e.label} progress`,"aria-valuenow":d,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${d}%`,children:Array.from({length:T},(e,t)=>(0,g.jsx)(`div`,{className:o(`h-6 w-1.5 rounded-sm transition-colors`,t<p?f.bar:`bg-muted`)},`seg-${t}`))}),!!s&&!!e.change&&(0,g.jsx)(`div`,{className:`mt-3`,children:(0,g.jsx)(m,{change:e.change,trend:e.trend,size:a,variant:`default`})}),!!e.footer&&(0,g.jsxs)(`div`,{className:`mt-2 inline-flex items-center gap-1 text-muted-foreground`,children:[(0,g.jsx)(i,{className:`size-3`,"aria-hidden":`true`}),(0,g.jsx)(r,{size:`xxs`,type:`secondary`,children:e.footer})]})]})}export{b as n,v as r,E as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e}from"./section-
|
|
1
|
+
import{p as e}from"./section-Dd6X6IKg.js";import{t}from"./calendar-DxjW_eNc.js";import{r as n}from"./example-Rrx9vj75.js";import{d as r,n as i}from"./index-o71HAmc3.js";import{t as a}from"./metric-DdC_pWnF.js";var o=r();function s({metrics:r,period:s,onPeriodChange:c,variant:l=`default`,size:u=`sm`,showSparklines:d=!0,showChanges:f=!0,footerText:p,className:m}){let h=(0,o.jsx)(`div`,{className:`grid min-w-0 flex-1 grid-cols-1 divide-y divide-border lg:flex lg:items-stretch lg:divide-x lg:divide-y-0`,children:r.map(e=>(0,o.jsx)(`div`,{className:`min-w-0 px-4 py-2.5 lg:min-w-36 lg:flex-1`,children:(0,o.jsx)(a,{data:e,variant:`default`,size:u,showSparkline:d,showChange:f})},e.id))}),g=!!s&&(0,o.jsx)(`div`,{className:`flex shrink-0 items-center border-b border-border px-3 py-2 lg:border-b-0 lg:py-0`,children:(0,o.jsxs)(n,{variant:`secondary`,buttonStyle:`ghost`,className:`gap-1.5`,onClick:c?()=>c(s.value):void 0,children:[(0,o.jsx)(t,{className:`size-3.5`,"aria-hidden":`true`}),(0,o.jsx)(e,{size:`xs`,weight:`medium`,children:s.label})]})});return l===`gradient`?(0,o.jsxs)(`div`,{className:i(`metric-bar--component`,`w-full`,`rounded-lg bg-gradient-to-r from-primary/8 via-info/5 to-success/8 p-px`,m),children:[(0,o.jsxs)(`div`,{className:`flex min-w-0 flex-col overflow-hidden rounded-radius bg-card lg:flex-row`,children:[g&&(0,o.jsxs)(o.Fragment,{children:[g,(0,o.jsx)(`div`,{className:`hidden w-px bg-border lg:block`,"aria-hidden":`true`})]}),h]}),!!p&&(0,o.jsx)(`div`,{className:`rounded-b-radius border-t border-border/50 bg-card px-4 py-2`,children:(0,o.jsx)(e,{size:`xxs`,type:`discrete`,children:p})})]}):(0,o.jsxs)(`div`,{className:i(`metric-bar--component flex w-full flex-col overflow-hidden rounded-lg border border-border bg-card shadow-sm`,m),children:[(0,o.jsxs)(`div`,{className:`flex min-w-0 flex-col overflow-hidden lg:flex-row`,children:[g&&(0,o.jsxs)(o.Fragment,{children:[g,(0,o.jsx)(`div`,{className:`hidden w-px bg-border lg:block`,"aria-hidden":`true`})]}),h]}),!!p&&(0,o.jsx)(`div`,{className:`border-t border-border/50 px-4 py-2`,children:(0,o.jsx)(e,{size:`xxs`,type:`discrete`,children:p})})]})}s.displayName=`MetricBar`;export{s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,n as t}from"./index-
|
|
1
|
+
import{d as e,n as t}from"./index-o71HAmc3.js";import{t as n}from"./metric-DdC_pWnF.js";var r=e(),i={sm:`gap-2`,md:`gap-3`,lg:`gap-4`};function a(e){return e<=1?`grid-cols-1`:e===2?`grid-cols-1 sm:grid-cols-2`:e===3?`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3`:e===4?`grid-cols-1 sm:grid-cols-2 lg:grid-cols-4`:e===5||e===6?`grid-cols-2 sm:grid-cols-3 lg:grid-cols-6`:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4`}var o={1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3`,4:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-4`,6:`grid-cols-2 sm:grid-cols-3 lg:grid-cols-6`};function s({metrics:e,variant:s=`card`,size:c=`md`,colorScheme:l=`default`,columns:u=`auto`,gap:d=`md`,showSparklines:f=!0,showChanges:p=!0,showIcons:m=!0,loading:h=!1,className:g}){return(0,r.jsx)(`div`,{className:t(`metric-grid--component`,`grid`,u===`auto`?a(e.length):o[u],i[d],g),children:e.map(e=>(0,r.jsx)(n,{data:e,variant:s,size:c,colorScheme:l,showSparkline:f,showChange:p,showIcon:m,loading:h},e.id))})}s.displayName=`MetricGrid`;export{s as t};
|
package/dist/showcase/assets/{metric-trend-chip-Dutl5uZo.js → metric-trend-chip-BhCRReMp.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e}from"./section-
|
|
1
|
+
import{p as e}from"./section-Dd6X6IKg.js";import{t}from"./arrow-down-JuqwH6gj.js";import{t as n}from"./arrow-up-RWJP_FHU.js";import{t as r}from"./minus-CwzskYaZ.js";import{d as i,n as a}from"./index-o71HAmc3.js";var o=i(),s={positive:{text:`text-success`,badge:`bg-success/10 text-success`,arrow:`text-success`},negative:{text:`text-destructive`,badge:`bg-destructive/10 text-destructive`,arrow:`text-destructive`},neutral:{text:`text-muted-foreground`,badge:`bg-muted text-muted-foreground`,arrow:`text-muted-foreground`}},c={sm:`size-3`,md:`size-3.5`,lg:`size-4`},l={sm:`xxs`,md:`xs`,lg:`sm`},u={sm:`px-1.5 py-0.5`,md:`px-2 py-0.5`,lg:`px-2.5 py-1`};function d(e,t){return e||(t===`up`?`positive`:t===`down`?`negative`:`neutral`)}function f({change:i,trend:f,size:p=`md`,variant:m=`default`,className:h}){let g=d(f,i.direction),_=i.direction===`up`?n:i.direction===`down`?t:r,v=s[g],y=String(i.value),b=i.direction===`up`?`+`:(i.direction,``);return m===`inline`?(0,o.jsxs)(e,{tag:`span`,size:l[p],weight:`medium`,className:a(`metric-trend-chip--component`,v.text,`tabular-nums`,h),children:[b,y]}):m===`compact`?(0,o.jsxs)(`span`,{className:a(`inline-flex items-center gap-0.5`,v.text,h),children:[(0,o.jsx)(_,{className:c[p],strokeWidth:2.5,"aria-hidden":`true`}),(0,o.jsx)(e,{tag:`span`,size:l[p],weight:`semibold`,className:`text-current tabular-nums`,children:y})]}):m===`badge`?(0,o.jsxs)(`span`,{className:a(`inline-flex items-center gap-1 rounded-full font-medium tabular-nums`,v.badge,u[p],h),children:[(0,o.jsx)(_,{className:c[p],strokeWidth:2.5,"aria-hidden":`true`}),(0,o.jsx)(e,{tag:`span`,size:l[p],weight:`semibold`,className:`text-current tabular-nums`,children:y}),!!i.label&&(0,o.jsx)(e,{tag:`span`,size:l[p],className:`text-current opacity-70`,children:i.label})]}):(0,o.jsxs)(`span`,{className:a(`inline-flex items-center gap-1`,v.text,h),children:[(0,o.jsx)(_,{className:c[p],strokeWidth:2.5,"aria-hidden":`true`}),(0,o.jsx)(e,{tag:`span`,size:l[p],weight:`semibold`,className:`tabular-nums`,children:y}),!!i.label&&(0,o.jsx)(e,{tag:`span`,size:l[p],type:`secondary`,children:i.label})]})}f.displayName=`MetricTrendChip`;export{f as t};
|
package/dist/showcase/assets/{metrics-analytics-bar-AqG2oyIy.js → metrics-analytics-bar-U3gehGfQ.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-QTnfLwEv.js";import{n as t,t as n}from"./section-
|
|
1
|
+
import{n as e}from"./chunk-QTnfLwEv.js";import{n as t,t as n}from"./section-Dd6X6IKg.js";import{t as r}from"./example-Rrx9vj75.js";import{t as i}from"./credit-card-D_wnXbTK.js";import{t as a}from"./dollar-sign-lghPxE96.js";import{t as o}from"./shopping-bag-DGXTQNOf.js";import{t as s}from"./users-DDgUGkgw.js";import{d as c}from"./index-o71HAmc3.js";import{t as l}from"./props-table-C6gPyO49.js";import{t as u}from"./metric-bar-PGG8KQS0.js";import{t as d}from"./metric-grid-ZqDufV_5.js";var f=e({MetricBarDefault:()=>v,MetricBarGradientFrame:()=>y,MetricGridCompactCardsAlternative:()=>b}),p=c(),m=[12,18,15,25,22,30,28,35,32,40,38,45],h=[40,38,35,30,28,25,22,20,18,15,12,10],g=[{id:`rev`,label:`Revenue`,value:`52.3K`,change:{value:`12.5%`,direction:`up`},sparkline:m,icon:a},{id:`ord`,label:`Orders`,value:`284`,change:{value:`8.1%`,direction:`up`},sparkline:m,icon:o},{id:`cust`,label:`Customers`,value:`856`,change:{value:`2.3%`,direction:`down`},sparkline:h,icon:s},{id:`aov`,label:`Avg. Order`,value:`184 USD`,change:{value:`0%`,direction:`neutral`},sparkline:[20,22,21,23,20,22,21,23,22,21,23,22],icon:i}],_=[{id:`rev`,label:`Total Revenue`,value:`52,340 USD`,change:{value:`12.5%`,direction:`up`},sparkline:m},{id:`profit`,label:`Net Profit`,value:`31,404 USD`,change:{value:`8.7%`,direction:`up`},sparkline:[5,8,6,10,9,12,11,14]},{id:`exp`,label:`Expenses`,value:`20,936 USD`,change:{value:`3.2%`,direction:`down`},sparkline:h,trend:`positive`}];function v(){return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(u,{period:{label:`Last 30 days`,value:`last_30`},metrics:g})})}function y(){return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(u,{variant:`gradient`,metrics:_,footerText:`Updated just now`})})}function b(){return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(d,{metrics:g,variant:`compact`,columns:4})})}var x=`import { CreditCard, DollarSign, ShoppingBag, Users } from 'lucide-react';
|
|
2
2
|
import { MetricBar, MetricGrid, type MetricData } from '@/components/composed/analytics';
|
|
3
3
|
|
|
4
4
|
const UP = [12, 18, 15, 25, 22, 30, 28, 35, 32, 40, 38, 45];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{f as r,n as i,p as a,t as o}from"./section-
|
|
1
|
+
import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{f as r,n as i,p as a,t as o}from"./section-Dd6X6IKg.js";import{t as s}from"./example-Rrx9vj75.js";import{d as c,n as l}from"./index-o71HAmc3.js";import{t as u}from"./props-table-C6gPyO49.js";import{Zn as d,t as f,u as p}from"./AreaChart-CFYg5vW0.js";import{t as m}from"./metric-trend-chip-BhCRReMp.js";var h=t(n(),1),g=c(),_={green:`bg-gradient-to-br from-success via-primary to-success`,purple:`bg-gradient-to-br from-info via-primary to-info`,warm:`bg-gradient-to-br from-warning via-destructive to-warning`,ocean:`bg-gradient-to-br from-info via-primary to-info`},v=`var(--inverse-foreground)`,y=`var(--inverse-muted)`;function b({title:e,value:t,change:n,data:i,theme:o=`green`,subtitle:s,className:c}){let u=`metric-grad-${(0,h.useId)().replaceAll(`:`,``)}`;return(0,g.jsxs)(`div`,{className:l(`metric-gradient--component`,`relative overflow-hidden rounded-lg p-5 text-inverse-foreground shadow-sm ring-1 ring-inverse-border`,_[o],c),children:[(0,g.jsxs)(`div`,{className:`relative flex items-start justify-between gap-3`,children:[(0,g.jsxs)(`div`,{className:`min-w-0`,children:[(0,g.jsx)(a,{size:`xs`,weight:`medium`,className:`uppercase tracking-wider text-inverse-muted`,children:e}),!!t&&(0,g.jsx)(r,{tag:`h3`,className:`mt-1 text-3xl font-bold tabular-nums tracking-tight border-none pb-0 leading-none text-inverse-foreground`,children:t}),!!s&&(0,g.jsx)(a,{size:`xs`,className:`mt-1 text-inverse-muted`,children:s})]}),!!n&&(0,g.jsx)(m,{change:n,trend:n.direction===`up`?`positive`:n.direction===`down`?`negative`:`neutral`,size:`sm`,variant:`badge`,className:`shrink-0 !bg-inverse-surface-strong !text-inverse-foreground`})]}),(0,g.jsx)(`div`,{className:`relative -mx-1 mt-3 h-24`,children:(0,g.jsx)(d,{width:`100%`,height:`100%`,initialDimension:{width:1,height:1},children:(0,g.jsxs)(f,{data:i,margin:{top:4,right:0,bottom:0,left:0},children:[(0,g.jsx)(`defs`,{children:(0,g.jsxs)(`linearGradient`,{id:u,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,g.jsx)(`stop`,{offset:`0%`,stopColor:v,stopOpacity:.3}),(0,g.jsx)(`stop`,{offset:`100%`,stopColor:v,stopOpacity:0})]})}),(0,g.jsx)(p,{type:`monotone`,dataKey:`value`,stroke:y,strokeWidth:2,fill:`url(#${u})`,dot:!1,activeDot:{r:4,strokeWidth:2,fill:v,stroke:y},isAnimationActive:!0,animationDuration:800})]})})})]})}b.displayName=`MetricGradient`;var x=e({FourThemes:()=>C}),S=[{label:`Jan`,value:4200},{label:`Feb`,value:3800},{label:`Mar`,value:5100},{label:`Apr`,value:4600},{label:`May`,value:5800},{label:`Jun`,value:6200},{label:`Jul`,value:5900},{label:`Aug`,value:7100},{label:`Sep`,value:6800},{label:`Oct`,value:7500},{label:`Nov`,value:8200},{label:`Dec`,value:9100}];function C(){return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2 xl:grid-cols-4`,children:[(0,g.jsx)(b,{title:`Growth`,value:`32.4K`,change:{value:`15.2%`,direction:`up`},data:S,theme:`green`,subtitle:`vs last quarter`}),(0,g.jsx)(b,{title:`Engagement`,value:`8,940`,change:{value:`4.7%`,direction:`up`},data:S,theme:`purple`,subtitle:`active users`}),(0,g.jsx)(b,{title:`Conversions`,value:`4.8%`,change:{value:`0.3%`,direction:`down`},data:S,theme:`warm`,subtitle:`checkout rate`}),(0,g.jsx)(b,{title:`Sessions`,value:`124K`,change:{value:`8.1%`,direction:`up`},data:S,theme:`ocean`,subtitle:`last 30 days`})]})})}var w=`import { MetricGradient, type MetricDataPoint } from '@/components/composed/analytics';
|
|
2
2
|
|
|
3
3
|
const data: MetricDataPoint[] = [
|
|
4
4
|
{ label: 'Jan', value: 4200 }, { label: 'Feb', value: 3800 }, { label: 'Mar', value: 5100 },
|
package/dist/showcase/assets/{metrics-comparison-CY-DyLv7.js → metrics-comparison-B1z3nUpo.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-QTnfLwEv.js";import{f as t,n,p as r,t as i}from"./section-
|
|
1
|
+
import{n as e}from"./chunk-QTnfLwEv.js";import{f as t,n,p as r,t as i}from"./section-Dd6X6IKg.js";import{t as a}from"./arrow-down-JuqwH6gj.js";import{t as o}from"./arrow-right-B4iFg3l1.js";import{t as s}from"./arrow-up-RWJP_FHU.js";import{t as c}from"./example-Rrx9vj75.js";import{N as l,d as u,l as d,n as f}from"./index-o71HAmc3.js";import{t as p}from"./props-table-C6gPyO49.js";import{t as m}from"./smart-card-BwSFemlj.js";import{t as h}from"./format-metric-value-BTsvOjZQ.js";var g=d(`equal`,[[`line`,{x1:`5`,x2:`19`,y1:`9`,y2:`9`,key:`1nwqeh`}],[`line`,{x1:`5`,x2:`19`,y1:`15`,y2:`15`,key:`g8yjpy`}]]),_=u(),v={title:`Comparison`,currentLabel:`This period`,previousLabel:`Previous period`,suffix:`vs previous`};function y(e){if(e==null)return null;if(typeof e==`number`)return e;let t=Number(e);return Number.isFinite(t)?t:null}function b({current:e,previous:n,title:i,currentPeriod:c,previousPeriod:u,className:d,strings:p}){let b=l(v,p),x=y(e.value),S=y(n.value),C=x!==null&&S!==null,w=C?x-S:0,T=C&&S!==0?Math.round(w/S*100):0,E=w>0,D=w===0,O=D?g:E?s:a,k=D?{box:`bg-muted/40`,chip:`bg-card text-muted-foreground border border-border/60`}:E?{box:`bg-success/10`,chip:`bg-success/15 text-success`}:{box:`bg-destructive/10`,chip:`bg-destructive/15 text-destructive`};return(0,_.jsxs)(m,{title:i??b.title,className:f(`metric-comparison--component`,d),children:[!!(c||u)&&(0,_.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[!!c&&(0,_.jsx)(r,{tag:`span`,size:`xxs`,weight:`medium`,className:`rounded-full bg-muted px-2 py-0.5 uppercase tracking-wider text-muted-foreground`,children:c}),!!u&&(0,_.jsx)(r,{tag:`span`,size:`xxs`,weight:`medium`,className:`rounded-full bg-muted px-2 py-0.5 uppercase tracking-wider text-muted-foreground`,children:u})]}),(0,_.jsxs)(`div`,{className:`mt-3 grid items-stretch gap-2 grid-cols-1 sm:grid-cols-[1fr_auto_1fr]`,children:[(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/60 bg-card px-3 py-2.5`,children:[(0,_.jsx)(r,{size:`xxs`,type:`secondary`,weight:`medium`,className:`uppercase tracking-wider`,children:b.currentLabel}),(0,_.jsx)(t,{tag:`h5`,className:`text-xl tabular-nums tracking-tight border-none pb-0`,children:h(e)})]}),(0,_.jsxs)(`div`,{className:`flex items-center justify-center text-muted-foreground/60`,children:[(0,_.jsx)(o,{className:`hidden size-4 sm:block`,"aria-hidden":`true`}),(0,_.jsx)(a,{className:`size-4 sm:hidden`,"aria-hidden":`true`})]}),(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/60 bg-muted/30 px-3 py-2.5`,children:[(0,_.jsx)(r,{size:`xxs`,type:`secondary`,weight:`medium`,className:`uppercase tracking-wider`,children:b.previousLabel}),(0,_.jsx)(t,{tag:`h5`,className:`text-xl tabular-nums tracking-tight border-none pb-0 text-muted-foreground`,children:h(n)})]})]}),!!C&&(0,_.jsxs)(`div`,{className:f(`mt-3 flex flex-wrap items-center gap-2 rounded-lg px-3 py-2`,k.box),children:[(0,_.jsxs)(`div`,{className:f(`inline-flex items-center gap-1 rounded-full px-2 py-0.5`,k.chip),children:[(0,_.jsx)(O,{className:`size-3`,strokeWidth:2.5,"aria-hidden":`true`}),(0,_.jsxs)(r,{tag:`span`,size:`xs`,weight:`semibold`,className:`tabular-nums`,children:[E?`+`:D?``:`−`,(t=>{let n=Math.abs(t);return h({...e,value:n})})(w)]})]}),(0,_.jsxs)(r,{size:`xs`,type:`secondary`,className:f(`tabular-nums`,E&&`text-success`,!E&&!D&&`text-destructive`),children:[E?`+`:D?``:`−`,Math.abs(T),`% `,b.suffix]})]})]})}b.displayName=`MetricComparison`;var x=e({Default:()=>E,FlatNoChange:()=>k,PercentageValues:()=>O,WithCurrencyOverrideEUR:()=>D}),S={current:{id:`cur`,label:`Current`,value:48250,valueType:`currency`,currency:`USD`},previous:{id:`prev`,label:`Previous`,value:41800,valueType:`currency`,currency:`USD`}},C={current:{id:`cur`,label:`Current`,value:148500,valueType:`currency`,currency:`EUR`},previous:{id:`prev`,label:`Previous`,value:132100,valueType:`currency`,currency:`EUR`}},w={current:{id:`cur`,label:`Current`,value:.082,valueType:`percentage`},previous:{id:`prev`,label:`Previous`,value:.094,valueType:`percentage`}},T={current:{id:`cur`,label:`Current`,value:1240,valueType:`number`},previous:{id:`prev`,label:`Previous`,value:1240,valueType:`number`}};function E(){return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(b,{title:`Monthly Revenue`,current:S.current,previous:S.previous,currentPeriod:`Mar 2026`,previousPeriod:`Feb 2026`})})}function D(){return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(b,{title:`Quarterly Revenue`,current:C.current,previous:C.previous,currentPeriod:`Q1 2026`,previousPeriod:`Q4 2025`})})}function O(){return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(b,{title:`Conversion rate`,current:w.current,previous:w.previous,currentPeriod:`This week`,previousPeriod:`Last week`})})}function k(){return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(b,{title:`Active sessions`,current:T.current,previous:T.previous})})}var A=`import { MetricComparison, type MetricData } from '@/components/composed/analytics';
|
|
2
2
|
|
|
3
3
|
const monthly: { current: MetricData; previous: MetricData } = {
|
|
4
4
|
current: { id: 'cur', label: 'Current', value: 48250, valueType: 'currency', currency: 'USD' },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-QTnfLwEv.js";import{n as t,p as n,t as r}from"./section-
|
|
1
|
+
import{n as e}from"./chunk-QTnfLwEv.js";import{n as t,p as n,t as r}from"./section-Dd6X6IKg.js";import{t as i}from"./example-Rrx9vj75.js";import{N as a,d as o,n as s}from"./index-o71HAmc3.js";import{t as c}from"./props-table-C6gPyO49.js";import{t as l}from"./smart-card-BwSFemlj.js";import{t as u}from"./analytics.strings-B9262Jmq.js";var d=o(),f={0:`bg-muted`,1:`bg-success/20`,2:`bg-success/40`,3:`bg-success/65`,4:`bg-success`};function p(e,t){if(e.length===0)return{weeks:[],monthLabels:[]};let n=[...e].sort((e,t)=>e.date.localeCompare(t.date)),r=new Date(n[0].date+`T00:00:00`),i=new Date(n[n.length-1].date+`T00:00:00`),a=r.getDay(),o=a===0?-6:1-a,s=new Date(r);s.setDate(s.getDate()+o);let c=new Map;for(let e of n)c.set(e.date,e.level);let l=[],u=[],d=-1,f=[],p=new Date(s);for(;p<=i;){let e=p.toISOString().slice(0,10),n=(p.getDay()+6)%7;n===0&&f.length>0&&(l.push(f),f=[]);let r=p.getMonth();if(r!==d){let e=n===0?l.length:l.length+1;u.find(t=>t.weekIndex===e)||u.push({label:t[r],weekIndex:e}),d=r}let i=c.get(e)??0;f.push({date:e,level:i}),p.setDate(p.getDate()+1)}if(f.length>0){for(;f.length<7;)f.push(null);l.push(f)}return{weeks:l,monthLabels:u}}function m({title:e,description:t,data:r,className:i,strings:o}){let c=a(u,o),{weeks:m,monthLabels:h}=p(r,c.heatmapMonthNames);return(0,d.jsxs)(l,{title:e,description:t,className:s(`activity-heatmap--component`,i),children:[(0,d.jsxs)(`div`,{className:`overflow-x-auto`,children:[(0,d.jsx)(`div`,{className:`relative mb-1`,style:{paddingLeft:`28px`,height:`12px`},children:(0,d.jsx)(`div`,{className:`relative flex`,style:{width:`${m.length*15}px`},children:h.filter((e,t,n)=>t===0||e.weekIndex-n[t-1].weekIndex>=3).map(e=>(0,d.jsx)(n,{size:`xxs`,type:`secondary`,className:`absolute leading-none whitespace-nowrap`,style:{left:`${e.weekIndex*15}px`,top:0},children:e.label},`${e.label}-${e.weekIndex}`))})}),(0,d.jsxs)(`div`,{className:`flex gap-0`,children:[(0,d.jsx)(`div`,{className:`mr-1 flex flex-col gap-0.75`,children:c.heatmapDayLabels.map((e,t)=>(0,d.jsx)(`div`,{className:`flex h-3 w-6 items-center justify-end`,children:!!e&&(0,d.jsx)(n,{size:`xxs`,type:`secondary`,className:`leading-none`,children:e})},`day-${t}`))}),(0,d.jsx)(`div`,{className:`flex gap-0.75`,children:m.map((e,t)=>(0,d.jsx)(`div`,{className:`flex flex-col gap-0.75`,children:e.map((e,n)=>{let r=e?`${e.date}: Level ${e.level}`:void 0;return(0,d.jsx)(`div`,{className:s(`size-3 rounded-sm`,e?f[e.level]:`bg-transparent`),title:r},`d-${t}-${n}`)})},`w-${t}`))})]})]}),(0,d.jsxs)(`div`,{className:`mt-4 flex items-center justify-end gap-1.5`,children:[(0,d.jsx)(n,{size:`xxs`,type:`secondary`,children:c.heatmapLegendLess}),[0,1,2,3,4].map(e=>(0,d.jsx)(`div`,{className:s(`size-3 rounded-sm`,f[e])},`legend-${e}`)),(0,d.jsx)(n,{size:`xxs`,type:`secondary`,children:c.heatmapLegendMore})]})]})}m.displayName=`ActivityHeatmap`;var h=e({OrderActivity:()=>v});function g(){let e=[],t=new Date(`2026-06-19T00:00:00Z`);for(let n=89;n>=0;n--){let r=new Date(t);r.setDate(r.getDate()-n);let i=(n*37+17)%100/100,a=i<.15?0:i<.35?1:i<.6?2:i<.8?3:4;e.push({date:r.toISOString().slice(0,10),level:a})}return e}var _=g();function v(){return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(`div`,{className:`max-w-2xl`,children:(0,d.jsx)(m,{title:`Order Activity`,description:`Last 90 days`,data:_})})})}var y=`import { ActivityHeatmap, type ActivityHeatmapDay } from '@/components/composed/analytics';
|
|
2
2
|
|
|
3
3
|
function generate(): ActivityHeatmapDay[] {
|
|
4
4
|
const days: ActivityHeatmapDay[] = [];
|
package/dist/showcase/assets/{metrics-inline-badge-C1IFjdJN.js → metrics-inline-badge-CPyhCHXj.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-QTnfLwEv.js";import{n as t,p as n,t as r}from"./section-
|
|
1
|
+
import{n as e}from"./chunk-QTnfLwEv.js";import{n as t,p as n,t as r}from"./section-Dd6X6IKg.js";import{t as i}from"./example-Rrx9vj75.js";import{d as a,n as o}from"./index-o71HAmc3.js";import{t as s}from"./props-table-C6gPyO49.js";var c=a(),l={sm:`gap-1 rounded-full px-2 py-0.5`,md:`gap-1.5 rounded-full px-2.5 py-1`,base:`gap-1.5 rounded-full px-2.5 py-1`,lg:`gap-1.5 rounded-full px-3 py-1`},u={sm:`xxs`,md:`xxs`,base:`xxs`,lg:`xs`},d={sm:`xxs`,md:`xs`,base:`xs`,lg:`xs`},f={sm:`xxs`,md:`xxs`,base:`xxs`,lg:`xxs`};function p({metrics:e,className:t}){return(0,c.jsx)(`div`,{className:o(`inline-metric--component`,`flex flex-wrap gap-1.5`,t),children:e.map(e=>{let t=e.size??`base`;return(0,c.jsxs)(`span`,{className:o(`inline-flex items-center bg-card ring-1 ring-border/60`,l[t]??l.base),children:[(0,c.jsx)(n,{tag:`span`,size:u[t]??`xxs`,type:`secondary`,children:e.label}),(0,c.jsx)(n,{tag:`span`,size:d[t]??`xs`,weight:`semibold`,className:`tabular-nums`,children:e.value}),(0,c.jsxs)(n,{tag:`span`,size:f[t]??`xxs`,weight:`medium`,className:o(`tabular-nums inline-flex items-center gap-0.5 rounded-full px-1`,e.up?`bg-success/10 text-success`:`bg-destructive/10 text-destructive`),children:[e.up?`↑`:`↓`,e.change]})]},e.label)})})}p.displayName=`InlineMetricBadge`;var m=e({MixedSizesDirections:()=>h});function h(){return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(p,{metrics:[{label:`Revenue`,value:`52.3K`,change:`+12%`,up:!0,size:`md`},{label:`Orders`,value:`1,284`,change:`+8%`,up:!0,size:`md`},{label:`Returns`,value:`23`,change:`-5%`,up:!1,size:`sm`},{label:`AOV`,value:`351 USD`,change:`+3%`,up:!0,size:`lg`}]})})}var g=`import { InlineMetricBadge } from '@/components/composed/data-display/inline-metric';
|
|
2
2
|
|
|
3
3
|
export function MixedSizesDirections() {
|
|
4
4
|
return (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-QTnfLwEv.js";import{n as t,p as n,t as r}from"./section-
|
|
1
|
+
import{n as e}from"./chunk-QTnfLwEv.js";import{n as t,p as n,t as r}from"./section-Dd6X6IKg.js";import{t as i}from"./example-Rrx9vj75.js";import{d as a,n as o}from"./index-o71HAmc3.js";import{t as s}from"./props-table-C6gPyO49.js";var c=a(),l=`ring-1 ring-border/50 shadow-sm`;function u({kpis:e,className:t}){return(0,c.jsx)(`div`,{className:o(`mini-kpi--component`,`inline-flex items-center divide-x divide-border/50 rounded-xl bg-card px-2 py-2`,l,t),children:e.map(e=>(0,c.jsxs)(`div`,{className:`flex flex-col items-center px-4`,children:[(0,c.jsx)(n,{weight:`bold`,className:`tabular-nums`,children:e.value}),(0,c.jsx)(n,{size:`xs`,type:`secondary`,className:`text-xxs`,children:e.label})]},e.label))})}u.displayName=`MiniKpiRow`;var d=e({Example3KPIs:()=>p,Example4KPIs:()=>f});function f(){return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(u,{kpis:[{value:`2,847`,label:`Orders`},{value:`142K`,label:`Revenue`},{value:`94.2%`,label:`Fulfillment`},{value:`4.8`,label:`Rating`}]})})}function p(){return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(u,{kpis:[{value:`128`,label:`Active`},{value:`24`,label:`Pending`},{value:`7`,label:`Overdue`}]})})}var m=`import { MiniKpiRow } from '@/components/composed/data-display/mini-kpi';
|
|
2
2
|
|
|
3
3
|
export function Example4KPIs() {
|
|
4
4
|
return (
|
package/dist/showcase/assets/{metrics-micro-grid-CodO02yA.js → metrics-micro-grid-BNSrw6sM.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{n as r,p as i,t as a}from"./section-
|
|
1
|
+
import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{n as r,p as i,t as a}from"./section-Dd6X6IKg.js";import{t as o}from"./example-Rrx9vj75.js";import{d as s,n as c}from"./index-o71HAmc3.js";import{t as l}from"./props-table-C6gPyO49.js";import{t as u}from"./smart-card-BwSFemlj.js";import{Zn as d,t as f,u as p}from"./AreaChart-CFYg5vW0.js";var m=t(n(),1),h=s(),g=[`bars`,`line`,`dots`,`progress`,`area`,`pie`],_={bars:`var(--primary)`,line:`var(--info)`,dots:`var(--warning)`,progress:`var(--success)`,area:`var(--primary)`,pie:`var(--success)`},v=[`var(--success)`,`var(--info)`,`var(--warning)`];function y({data:e,color:t}){let n=Math.max(...e,1);return(0,h.jsx)(`div`,{className:c(`metric-micro-grid--component`,`flex h-5 items-end gap-0.5`),children:e.slice(0,6).map((e,r)=>(0,h.jsx)(`div`,{className:`flex-1 rounded-t-sm`,style:{height:`${e/n*100}%`,backgroundColor:t,opacity:.8}},`bar-${r}`))})}function b({data:e,color:t}){let n=Math.max(...e,1),r=Math.min(...e),i=n-r||1,a=e.slice(0,6);return(0,h.jsx)(`svg`,{viewBox:`0 0 60 16`,className:`h-5 w-full`,preserveAspectRatio:`none`,children:(0,h.jsx)(`polyline`,{fill:`none`,stroke:t,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,points:a.map((e,t)=>`${t/Math.max(a.length-1,1)*60},${16-(e-r)/i*14}`).join(` `)})})}function x({data:e,color:t}){let n=Math.max(...e,1);return(0,h.jsx)(`div`,{className:`flex h-5 items-end justify-around`,children:e.slice(0,5).map((e,r)=>(0,h.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full`,style:{marginBottom:`${e/n*12}px`,backgroundColor:t}},`dot-${r}`))})}function S({data:e,color:t}){let n=e[0]??0,r=e[1]??100;return(0,h.jsx)(`div`,{className:`h-1.5 w-full overflow-hidden rounded-full bg-muted`,children:(0,h.jsx)(`div`,{className:`h-full rounded-full transition-all`,style:{width:`${Math.min(n/r*100,100)}%`,backgroundColor:t}})})}function C({data:e,color:t}){let n=`micro-area-${(0,m.useId)().replaceAll(`:`,``)}`;return(0,h.jsx)(`div`,{className:`h-5 w-full`,children:(0,h.jsx)(d,{width:`100%`,height:`100%`,initialDimension:{width:1,height:1},children:(0,h.jsxs)(f,{data:e.map((e,t)=>({i:t,v:e})),margin:{top:0,right:0,bottom:0,left:0},children:[(0,h.jsx)(`defs`,{children:(0,h.jsxs)(`linearGradient`,{id:n,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,h.jsx)(`stop`,{offset:`0%`,stopColor:t,stopOpacity:.3}),(0,h.jsx)(`stop`,{offset:`100%`,stopColor:t,stopOpacity:0})]})}),(0,h.jsx)(p,{type:`monotone`,dataKey:`v`,stroke:t,strokeWidth:1.25,fill:`url(#${n})`})]})})})}function w({data:e}){let t=e.reduce((e,t)=>e+t,0)||1,n=0;return(0,h.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`h-6 w-6`,children:e.slice(0,3).map((e,r)=>{let i=e/t*360,a=n;n+=i;let o=(a-90)*Math.PI/180,s=(a+i-90)*Math.PI/180,c=+(i>180);return(0,h.jsx)(`path`,{d:`M12,12 L${12+10*Math.cos(o)},${12+10*Math.sin(o)} A10,10 0 ${c},1 ${12+10*Math.cos(s)},${12+10*Math.sin(s)} Z`,fill:v[r%v.length]},`slice-${r}`)})})}function T({kind:e,data:t}){let n=_[e];return e===`bars`?(0,h.jsx)(y,{data:t,color:n}):e===`line`?(0,h.jsx)(b,{data:t,color:n}):e===`dots`?(0,h.jsx)(x,{data:t,color:n}):e===`progress`?(0,h.jsx)(S,{data:t,color:n}):e===`area`?(0,h.jsx)(C,{data:t,color:n}):(0,h.jsx)(w,{data:t})}function E({title:e=`Overview`,cells:t,className:n}){return(0,h.jsx)(u,{title:e,className:n,padding:`default`,children:(0,h.jsx)(`div`,{className:`grid grid-cols-3 grid-rows-2 -m-2`,children:t.slice(0,6).map((e,t)=>(0,h.jsxs)(`div`,{className:c(`flex flex-col gap-1.5 px-3 py-2.5`,t%3!=2&&`border-r border-border/50`,t<3&&`border-b border-border/50`),children:[(0,h.jsx)(i,{size:`xxs`,type:`secondary`,className:`truncate uppercase tracking-wider`,children:e.label}),(0,h.jsx)(i,{tag:`span`,weight:`bold`,className:`tabular-nums truncate`,children:e.value}),(0,h.jsx)(`div`,{className:`mt-auto`,children:(0,h.jsx)(T,{kind:e.chart??g[t],data:e.data})})]},e.id??e.label))})})}E.displayName=`MetricMicroGrid`;var D=e({DefaultAutoAssignedCharts:()=>O,PinnedChartKinds:()=>k});function O(){return(0,h.jsx)(h.Fragment,{children:(0,h.jsx)(`div`,{className:`max-w-lg`,children:(0,h.jsx)(E,{title:`Overview`,cells:[{label:`Revenue`,value:`87.4K`,data:[42,55,60,65,75]},{label:`Orders`,value:`1,284`,data:[80,85,90,100,110,105]},{label:`Avg Value`,value:`68.1`,data:[58,62,64,68]},{label:`Vouchers`,value:`73%`,data:[73,100]},{label:`Growth`,value:`+12%`,data:[42,48,55,52,60,58,65,70,75]},{label:`Channels`,value:`3`,data:[520,186,94]}]})})})}function k(){return(0,h.jsx)(h.Fragment,{children:(0,h.jsx)(`div`,{className:`max-w-lg`,children:(0,h.jsx)(E,{title:`Force per-cell chart`,cells:[{label:`Sessions`,value:`1.2M`,data:[200,210,240,260,290,320],chart:`area`},{label:`Users`,value:`24K`,data:[80,85,90,100,110,105],chart:`line`},{label:`Bounce`,value:`32%`,data:[32,100],chart:`progress`},{label:`Pages`,value:`4.2`,data:[3.8,4,4.1,4.2,4.3],chart:`bars`},{label:`Devices`,value:`3`,data:[520,186,94],chart:`pie`},{label:`Sources`,value:`8`,data:[4,6,5,7,8],chart:`dots`}]})})})}var A=`import { MetricMicroGrid } from '@/components/composed/analytics';
|
|
2
2
|
|
|
3
3
|
export function DefaultAutoAssignedCharts() {
|
|
4
4
|
return (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-QTnfLwEv.js";import{n as t,p as n,t as r}from"./section-
|
|
1
|
+
import{n as e}from"./chunk-QTnfLwEv.js";import{n as t,p as n,t as r}from"./section-Dd6X6IKg.js";import{t as i}from"./example-Rrx9vj75.js";import{t as a}from"./dollar-sign-lghPxE96.js";import{t as o}from"./shopping-bag-DGXTQNOf.js";import{t as s}from"./trending-up-RSklVrcZ.js";import{t as c}from"./users-DDgUGkgw.js";import{d as l}from"./index-o71HAmc3.js";import{t as u}from"./props-table-C6gPyO49.js";import{t as d}from"./metric-trend-chip-BhCRReMp.js";import{n as f,r as p,t as m}from"./metric-DdC_pWnF.js";import{t as h}from"./metric-bar-PGG8KQS0.js";import{t as g}from"./metric-grid-ZqDufV_5.js";var _=e({ErrorState:()=>P,LiveLoadingState:()=>N,LoadingSkeletons:()=>M,MetricBarDefault:()=>w,MetricBarGradientFrame:()=>T,MetricGridCardVariant:()=>E,MetricGridCompactList:()=>D,MetricMinimalInlineCopy:()=>k,MetricSizesSmMdLg:()=>O,MetricSparklineExample:()=>j,MetricTrendChipExample:()=>A}),v=l(),y={id:`revenue`,label:`Revenue`,value:24820,valueType:`currency`,currency:`USD`,change:{value:`12.4%`,direction:`up`},sparkline:[120,140,132,158,167,180,198,220,240,248],icon:a,subtitle:`This month`},b={id:`orders`,label:`Orders`,value:312,valueType:`number`,change:{value:`4.1%`,direction:`up`},sparkline:[22,28,25,30,35,33,38,41,39,44],icon:o},x={id:`customers`,label:`Active customers`,value:1820,valueType:`number`,change:{value:`2.3%`,direction:`down`},sparkline:[200,198,205,195,188,182,178,180,184,182],icon:c},S={id:`conversion`,label:`Conversion`,value:.082,valueType:`percentage`,change:{value:`0.6%`,direction:`up`},sparkline:[.07,.071,.073,.075,.078,.079,.081,.082],icon:s},C=[y,b,x,S];function w(){return(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(h,{period:{label:`This month`,value:`this_month`},metrics:C})})}function T(){return(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(h,{period:{label:`This month`,value:`this_month`},metrics:C,variant:`gradient`,footerText:`Updated 2 minutes ago`})})}function E(){return(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(g,{metrics:C,variant:`card`,columns:4})})}function D(){return(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(g,{metrics:C,variant:`compact`,columns:2})})}function O(){return(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(`div`,{className:`space-y-3`,children:[(0,v.jsx)(m,{data:b,variant:`bordered`,size:`sm`}),(0,v.jsx)(m,{data:b,variant:`bordered`,size:`md`}),(0,v.jsx)(m,{data:b,variant:`bordered`,size:`lg`})]})})}function k(){return(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(`div`,{className:`flex flex-wrap gap-x-6 gap-y-2 rounded-lg border border-border bg-card p-4`,children:[(0,v.jsx)(m,{data:y,variant:`minimal`}),(0,v.jsx)(m,{data:b,variant:`minimal`}),(0,v.jsx)(m,{data:x,variant:`minimal`}),(0,v.jsx)(m,{data:S,variant:`minimal`})]})})}function A(){return(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,v.jsx)(d,{change:{value:`12.4%`,direction:`up`},variant:`default`}),(0,v.jsx)(d,{change:{value:`12.4%`,direction:`up`},variant:`badge`}),(0,v.jsx)(d,{change:{value:`3.2%`,direction:`down`},variant:`badge`}),(0,v.jsx)(d,{change:{value:`0%`,direction:`neutral`},variant:`badge`}),(0,v.jsx)(d,{change:{value:`5.1%`,direction:`up`},variant:`compact`}),(0,v.jsx)(d,{change:{value:`5.1%`,direction:`up`},variant:`inline`})]})})}function j(){return(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-3`,children:[(0,v.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-3`,children:[(0,v.jsx)(n,{size:`xxs`,type:`secondary`,weight:`medium`,className:`uppercase tracking-wider`,children:`Positive`}),(0,v.jsx)(`div`,{className:`mt-1 h-12 w-full`,children:(0,v.jsx)(p,{data:[120,140,132,158,167,180,198,220,240,248],trend:`positive`})})]}),(0,v.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-3`,children:[(0,v.jsx)(n,{size:`xxs`,type:`secondary`,weight:`medium`,className:`uppercase tracking-wider`,children:`Negative`}),(0,v.jsx)(`div`,{className:`mt-1 h-12 w-full`,children:(0,v.jsx)(p,{data:[200,198,205,195,188,182,178,180,184,182],trend:`negative`})})]}),(0,v.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-3`,children:[(0,v.jsx)(n,{size:`xxs`,type:`secondary`,weight:`medium`,className:`uppercase tracking-wider`,children:`Neutral`}),(0,v.jsx)(`div`,{className:`mt-1 h-12 w-full`,children:(0,v.jsx)(p,{data:[15,20,18,24,22,28,31,35,38,42,45,48],trend:`neutral`})})]})]})})}function M(){return(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4`,children:[(0,v.jsx)(f,{variant:`card`}),(0,v.jsx)(f,{variant:`bordered`}),(0,v.jsx)(f,{variant:`accent`}),(0,v.jsx)(f,{variant:`compact`})]})})}function N(){return(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(g,{metrics:C,variant:`card`,columns:4,loading:!0})})}function P(){return(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(m,{data:y,variant:`card`,error:!0,errorLabel:`Couldn't load this metric`})})}var F=`import { DollarSign, ShoppingBag, TrendingUp, Users } from 'lucide-react';
|
|
2
2
|
import {
|
|
3
3
|
Metric,
|
|
4
4
|
MetricBar,
|
package/dist/showcase/assets/{metrics-stat-cards-Cw7UMWmb.js → metrics-stat-cards-6Owbjvmc.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-QTnfLwEv.js";import{n as t,t as n}from"./section-
|
|
1
|
+
import{n as e}from"./chunk-QTnfLwEv.js";import{n as t,t as n}from"./section-Dd6X6IKg.js";import{t as r}from"./example-Rrx9vj75.js";import{d as i}from"./index-o71HAmc3.js";import{t as a}from"./props-table-C6gPyO49.js";import{t as o}from"./metric-DdC_pWnF.js";var s=e({MetricAccent:()=>m,MetricColored:()=>h}),c=i(),l=[12,18,15,25,22,30,28,35,32,40,38,45],u=[40,38,35,30,28,25,22,20,18,15,12,10],d={id:`sales`,label:`Total Sales`,value:`52,340 USD`,change:{value:`8.2%`,direction:`up`},subtitle:`vs. last month`,sparkline:l},f={id:`refunds`,label:`Refunds`,value:`1,230 USD`,change:{value:`15.4%`,direction:`down`},subtitle:`3 refunds`,sparkline:u,trend:`negative`},p=[{data:{id:`rev`,label:`Revenue`,value:`124.5K`,subtitle:`Projects`,change:{value:`12.5%`,direction:`up`}},scheme:`primary`,progress:75},{data:{id:`done`,label:`Completed`,value:`892`,subtitle:`Tasks`,change:{value:`5.3%`,direction:`up`}},scheme:`success`,progress:88},{data:{id:`pend`,label:`Pending`,value:`34`,subtitle:`Reviews`,change:{value:`0%`,direction:`neutral`}},scheme:`warning`,progress:42},{data:{id:`visits`,label:`Visits`,value:`18.4K`,subtitle:`This week`,change:{value:`2.1%`,direction:`down`}},scheme:`info`,progress:60}];function m(){return(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,c.jsx)(o,{data:d,variant:`accent`}),(0,c.jsx)(o,{data:f,variant:`accent`})]})})}function h(){return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2 lg:grid-cols-4`,children:p.map(({data:e,scheme:t,progress:n})=>(0,c.jsx)(o,{data:e,variant:`colored`,colorScheme:t,progress:n},e.id))})})}var g=`import { Metric, type MetricData } from '@/components/composed/analytics';
|
|
2
2
|
|
|
3
3
|
const UP = [12, 18, 15, 25, 22, 30, 28, 35, 32, 40, 38, 45];
|
|
4
4
|
const DOWN = [40, 38, 35, 30, 28, 25, 22, 20, 18, 15, 12, 10];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as e}from"./index-o71HAmc3.js";var t=e(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./chunk-QTnfLwEv.js";import{t}from"./react-sKtkuLrH.js";import{O as n,p as r,w as i}from"./section-
|
|
1
|
+
import{r as e}from"./chunk-QTnfLwEv.js";import{t}from"./react-sKtkuLrH.js";import{O as n,p as r,w as i}from"./section-Dd6X6IKg.js";import{d as a,n as o}from"./index-o71HAmc3.js";var s=e(t(),1);function c(e){let t=i(),{defaultCurrency:n,displayCurrency:r,locale:a,dualPricingEnabled:o,displayMode:c,dualPricingDisplay:l,formatMode:u}=(0,s.useMemo)(()=>{let n={...t,...e},r=n.defaultCurrency??`USD`;return{defaultCurrency:r,displayCurrency:n.displayCurrency??r,locale:n.locale,dualPricingEnabled:n.dualPricingEnabled??!1,displayMode:n.displayMode??`default_only`,dualPricingDisplay:n.dualPricingDisplay??`lines`,formatMode:n.formatMode??`with_code`}},[t,e]);return{defaultCurrency:n,displayCurrency:r,dualPricingEnabled:o,displayMode:c,dualPricingDisplay:l,formatMode:u,shouldShowDualPricing:()=>o?c===`dual`:!1,formatAmount:(e,t,n)=>{let r=typeof e==`string`?parseFloat(e):e;if(!Number.isFinite(r))return t?`${String(e)} ${t}`.trim():String(e);let i=new Intl.NumberFormat(a,{minimumFractionDigits:2,maximumFractionDigits:2}).format(r);switch(u){case`decimal`:return i;case`with_code`:return t?`${i} ${t}`:i;case`with_symbol`:return n?`${n}${i}`:t?`${i} ${t}`:i;case`locale_aware`:if(!t)return i;try{return new Intl.NumberFormat(a,{style:`currency`,currency:t}).format(r)}catch{return`${i} ${t}`}default:return t?`${i} ${t}`:i}},getCurrencySymbol:e=>({BGN:`лв`,EUR:`€`,USD:`$`,GBP:`£`,JPY:`¥`})[e]??e}}var l=a(),u=e=>{if(e==null)return null;let t=typeof e==`number`?e:Number.parseFloat(String(e).trim());return Number.isFinite(t)?t:null},d=e=>{let t=u(e?.value);return t===null?null:{value:t,currency:e?.currency?String(e.currency):null,symbol:e?.symbol?String(e.symbol):null}},f=e=>{let t=u(e?.amount);return t===null?null:{value:t,currency:e?.currency?String(e.currency):null,symbol:null}},p=e=>{let t=u(e?.amount);return t===null?null:{value:t,currency:e?.currency?String(e.currency):null,symbol:null}};function m({money:e,moneyPair:t,amount:i,pair:a,showPair:s=!1,dualPricingDisplay:u,alignment:m,emptyLabel:h=`—`,variant:g=`default`,secondaryEmphasis:_=`discrete`,className:v,size:y,align:b=`right`,weight:x=`medium`,tag:S=`span`,...C}){let{defaultTextSize:w}=n(),T=y??w??`sm`,{displayCurrency:E,dualPricingDisplay:D,shouldShowDualPricing:O,formatAmount:k,getCurrencySymbol:A}=c(),j=u??D??`lines`,M=(O()||s)&&t?.primary?f(t.primary):null,N=f(e),P=d(i),F=M??N??P??null,I=F?.currency??E??null,L=(s||O())&&!!(t??a??e?.pair),R=g===`minimal`||_===`hidden`?null:(()=>{if(!L)return null;if(t?.primary&&t?.secondary)return f(t.secondary);if(e?.pair)return p(e.pair);if(a?.source||a?.target){let e=d(a?.source??null),t=d(a?.target??null);if(!e&&!t)return null;let n=e?.currency??null,r=t?.currency??null;return I&&r===I?e:I&&n===I?t:E&&r===E?e:E&&n===E?t:t??e}return null})(),z=m??b,B=z===`left`?`text-left`:z===`center`?`text-center`:`text-right`,V=z===`left`?`justify-start`:z===`center`?`justify-center`:`justify-end`;if(!F)return(0,l.jsx)(r,{tag:S,size:T,type:`secondary`,align:z,className:o(`money-display--component`,`money--display inline-flex flex-col tabular-nums`,B,v),...C,children:h});let H=k(F.value,I??``,F.symbol??(I?A(I):void 0)),U=R?k(R.value,R.currency??``,R.symbol??(R.currency?A(R.currency):void 0)):null,W=_===`match`?T:_===`muted`?`xs`:`xxs`,G=_===`match`?void 0:_===`muted`?`secondary`:`discrete`;return j===`inline`&&U?(0,l.jsxs)(`span`,{className:o(`money--display inline-flex items-baseline gap-1.5 tabular-nums whitespace-nowrap`,V,v),...C,children:[(0,l.jsx)(r,{tag:`span`,size:T,weight:x,children:H}),(0,l.jsx)(r,{tag:`span`,size:`xxs`,type:`discrete`,"aria-hidden":`true`,children:`·`}),(0,l.jsx)(r,{tag:`span`,size:W,type:G,weight:`regular`,children:U})]}):(0,l.jsxs)(r,{tag:S,size:T,align:z,className:o(`money--display inline-flex flex-col tabular-nums leading-tight`,B,v),...C,children:[(0,l.jsx)(r,{tag:`span`,size:T,weight:x,children:H}),!!U&&(0,l.jsx)(r,{tag:`span`,size:W,align:z,type:G,className:`block whitespace-nowrap font-normal leading-tight`,children:U})]})}m.displayName=`MoneyDisplay`;export{c as n,m as t};
|
package/dist/showcase/assets/{month-year-picker-ChVcYm9f.js → month-year-picker-CCCTmZHv.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./chunk-QTnfLwEv.js";import{t}from"./react-sKtkuLrH.js";import{t as n}from"./format-
|
|
1
|
+
import{r as e}from"./chunk-QTnfLwEv.js";import{t}from"./react-sKtkuLrH.js";import{t as n}from"./format-BnF8gL8z.js";import{p as r}from"./section-Dd6X6IKg.js";import{t as i}from"./calendar-DxjW_eNc.js";import{r as a}from"./example-Rrx9vj75.js";import{N as o,d as s,m as c,n as l}from"./index-o71HAmc3.js";import{a as u,i as d,n as f,o as p,t as m}from"./select-Du9VvUxt.js";import{t as h}from"./label-HtkE4eII.js";import{i as g,t as _}from"./popover-C8YAdHfL.js";import{t as v}from"./popover-D9ZDWqLl.js";import{a as y,n as b,o as ee,r as x}from"./date-picker-CRogiefV.js";var S=e(t(),1),C=s();function w({value:e,defaultValue:t,onChange:s,format:w=`yyyy-MM`,readableFormat:T=`MMMM yyyy`,placeholder:E,label:D,hint:O,error:k,disabled:A=!1,className:j,closeOnSelect:M=!0,translations:N,strings:P,locale:F,header:I,footer:L,fromYear:R,toYear:z}){let B=new Date().getFullYear(),[V,H]=S.useState(!1),[U,W]=S.useState(e??t),G=F??c,K=o(x,P??N),q=S.useId(),J=S.useMemo(()=>{let e=R??2017,t=z??2035;return Array.from({length:t-e+1},(t,n)=>e+n)},[R,z]),Y=S.useMemo(()=>Array.from({length:12},(e,t)=>n(new Date(2e3,t,1),`MMMM`,{locale:G})),[G]);S.useEffect(()=>{e!==void 0&&W(e)},[e]);let X=S.useCallback((e,t)=>{let r=new Date(t,e,1);return{month:e,year:t,formatted:n(r,w),readable:n(r,T,{locale:G}),date:r}},[w,T,G]),Z=S.useCallback(e=>{W({month:parseInt(String(e),10),year:U?.year??B})},[U?.year,B]),Q=S.useCallback(e=>{let t=parseInt(String(e),10);W({month:U?.month??0,year:t})},[U?.month]),te=S.useCallback(()=>{U&&(s?.(X(U.month,U.year)),M&&H(!1))},[U,s,X,M]),$=S.useMemo(()=>U?n(new Date(U.year,U.month,1),T,{locale:G}):E??K.selectMonthYear,[U,T,G,E,K.selectMonthYear]);return(0,C.jsxs)(`div`,{className:l(`month-year-picker--component`,`flex flex-col gap-2`,j),children:[!!D&&(0,C.jsx)(h,{htmlFor:q,className:l(k&&`text-destructive`),children:D}),(0,C.jsxs)(_,{open:V,onOpenChange:H,children:[(0,C.jsx)(g,{render:e=>(0,C.jsxs)(a,{...e,id:q,variant:`secondary`,buttonStyle:`outline`,"aria-invalid":!!k,className:l(`w-full justify-start text-left font-normal`,b,!U&&`text-muted-foreground`,e.className),disabled:A,children:[(0,C.jsx)(i,{className:`mr-control-gap size-icon`}),$]})}),(0,C.jsxs)(v,{className:`w-80 p-0`,align:`start`,children:[!!I&&(0,C.jsx)(y,{config:I}),(0,C.jsxs)(`div`,{className:`p-4 space-y-4`,children:[(0,C.jsxs)(`div`,{className:`space-y-2`,children:[(0,C.jsx)(h,{htmlFor:`month-select`,children:K.month}),(0,C.jsxs)(m,{value:U?.month?.toString(),onValueChange:Z,disabled:A,children:[(0,C.jsx)(u,{id:`month-select`,className:`w-full`,children:(0,C.jsx)(p,{placeholder:K.month})}),(0,C.jsx)(f,{children:Y.map((e,t)=>(0,C.jsx)(d,{value:t.toString(),children:e},e))})]})]}),(0,C.jsxs)(`div`,{className:`space-y-2`,children:[(0,C.jsx)(h,{htmlFor:`year-select`,children:K.year}),(0,C.jsxs)(m,{value:U?.year?.toString(),onValueChange:Q,disabled:A,children:[(0,C.jsx)(u,{id:`year-select`,className:`w-full`,children:(0,C.jsx)(p,{placeholder:K.year})}),(0,C.jsx)(f,{children:J.map(e=>(0,C.jsx)(d,{value:e.toString(),children:e},e))})]})]})]}),(0,C.jsx)(`div`,{className:`p-4 pt-0`,children:(0,C.jsx)(a,{className:`w-full`,onClick:te,disabled:A||!U,children:K.confirm})}),!!L&&!!U&&(0,C.jsx)(ee,{config:L,output:X(U.month,U.year),hasSelection:!!U,autoSummary:$})]})]}),!!k&&(0,C.jsx)(r,{type:`error`,children:k}),!!O&&!k&&(0,C.jsx)(r,{type:`secondary`,children:O})]})}w.displayName=`MonthYearPicker`;export{w as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{f as r,n as i,o as a,p as o,t as s}from"./section-D-N8Ze16.js";import{t as c}from"./bell-CwRy7zpP.js";import{t as l}from"./chart-column-Dbekq8cy.js";import{$n as u,r as d,t as f}from"./example-PsbgbESI.js";import{t as p}from"./chevron-down-BqrI6QzQ.js";import{t as m}from"./credit-card-CFq0S1Ma.js";import{t as ee}from"./database-DSC-ysYT.js";import{t as te}from"./ellipsis-DgAjMZHc.js";import{t as ne}from"./file-text-BQeGXxPG.js";import{t as h}from"./folder-open-CZ5Bq4lK.js";import{t as g}from"./globe-CHleXWd2.js";import{t as _}from"./house-opqNxOmP.js";import{t as re}from"./inbox-WrbeTKEw.js";import{t as v}from"./message-square-DG0qIsG_.js";import{t as ie}from"./plus-BkhJjfUv.js";import{t as y}from"./settings-DkTHc0Ob.js";import{t as b}from"./shield-Cme7_JJR.js";import{t as x}from"./square-pen-CWylvezY.js";import{t as ae}from"./star-t53uwwyp.js";import{t as oe}from"./trash-2-DhUpICQq.js";import{t as S}from"./users-DAlxvktS.js";import{N as se,d as ce,n as C}from"./index-QESvAJrb.js";import{t as w}from"./props-table-CCcohuyT.js";import{t as le}from"./separator-Ha9YxI2x.js";import{t as ue}from"./breadcrumbs-BzHeoItO.js";import{n as T,t as de}from"./action-menu-DsAr1OqF.js";import{t as E}from"./overflow-tab-bar-B2Htn-Ft.js";var D=t(n(),1),O=ce();function k({locales:e,onRenderLabel:t,variant:n=`buttons`,onSelect:r}){let i=(0,D.useCallback)((e,t)=>{t||r?.(e)},[r]);return e.length===0?null:n===`inline`?(0,O.jsxs)(`div`,{className:C(`language-switcher--component`,`flex items-center justify-center gap-2.5`),children:[(0,O.jsx)(g,{className:`size-4 text-muted-foreground/70`,"aria-hidden":`true`}),(0,O.jsx)(`div`,{className:`flex items-center justify-center gap-2.5`,children:e.map((n,r)=>{let a=t?t(n):n.nativeLabel;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`button`,{type:`button`,onClick:()=>i(n.value,n.active),className:C(`text-xs transition-colors`,n.active?`text-primary font-medium`:`text-muted-foreground hover:text-foreground`),children:a}),r<e.length-1&&(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`size-1 rounded-full bg-border`})]},n.value)})})]}):(0,O.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:e.map(e=>{let n=t?t(e):e.nativeLabel;return(0,O.jsx)(d,{type:`button`,variant:`secondary`,buttonStyle:e.active?`solid`:`ghost`,onClick:()=>i(e.value,e.active),className:C(`min-w-18 justify-center transition-colors`,e.active?`font-semibold text-primary`:`text-muted-foreground`),children:n},e.value)})})}k.displayName=`LanguageSwitcher`;function A(e){if(e.length===0)return`/`;try{let t=typeof window<`u`?window.location.origin:`http://localhost`,n=new URL(e,t).pathname.replace(/\/+$/,``);return n.length>0?n:`/`}catch{let t=(e.split(`?`)[0]??e).replace(/\/+$/,``);return t.length>0?t:`/`}}function j({items:e,currentPath:t,activeClassName:n,itemClassName:r}){let i=A(t??(typeof window<`u`?window.location.pathname:``)),a=typeof n==`string`&&n.length>0?n:`bg-muted`,o=e.map(e=>({item:e,normalizedPath:A(e.href)})),s=o.filter(({normalizedPath:e})=>i===e||i.startsWith(`${e}/`)).sort((e,t)=>t.normalizedPath.length-e.normalizedPath.length)[0]?.normalizedPath??null;return(0,O.jsx)(`nav`,{className:C(`aside-navigation-menu--component`,`flex flex-col space-y-1 space-x-0`),children:o.map(({item:e,normalizedPath:t})=>(0,O.jsx)(u,{variant:`secondary`,buttonStyle:`ghost`,size:`default`,fullWidth:!0,className:C(`justify-start`,r,t===s?a:null),nativeButton:!1,render:t=>(0,O.jsx)(`a`,{...t,href:e.href}),children:e.title},e.href))})}j.displayName=`AsideNavigationMenu`;function M({items:e,currentPath:t,className:n,ariaLabel:r=`Tab navigation`}){let i=t??(typeof window<`u`?window.location.pathname:``),a=(0,D.useMemo)(()=>e.map(e=>{let t=i===e.href,n=null;if(typeof e.icon==`string`)n=(0,O.jsx)(`span`,{className:`text-inherit`,children:e.icon});else if(e.icon){let t=e.icon;n=(0,O.jsx)(t,{className:`size-icon-sm`})}return{key:e.href,item:e,isActive:t,iconNode:n,ariaCurrent:t?`page`:void 0}}),[i,e]);return(0,O.jsx)(`div`,{className:C(`tab-navigation-menu--component`,`w-full`,n),children:(0,O.jsx)(`nav`,{className:`inline-flex bg-muted rounded-full items-center gap-1 p-1`,"aria-label":r,children:a.map(({key:e,item:t,isActive:n,iconNode:r,ariaCurrent:i})=>(0,O.jsxs)(`a`,{href:t.href,className:C(`flex h-control whitespace-nowrap items-center gap-space-sm`,`rounded-full px-control`,`text-sm font-medium`,`transition-all duration-200`,`focus-visible:outline-none focus-visible:ring-2`,`focus-visible:ring-ring focus-visible:ring-offset-2`,{"bg-background text-foreground shadow-sm":n,"text-muted-foreground hover:text-foreground hover:bg-background/50":!n}),"aria-current":i,children:[!!r&&(0,O.jsx)(`span`,{className:`text-inherit`,children:r}),t.title,!!t.badge&&(0,O.jsx)(`span`,{className:C(`ml-space-sm rounded-full px-space-md py-space-2xs text-xxs font-medium`,n?`bg-primary/10 text-primary`:`bg-muted-foreground/10 text-muted-foreground`),children:t.badge})]},e))})})}M.displayName=`TabNavigationMenu`;var N={tabsAria:`Tabs`};function P({items:e,currentUrl:t,strings:n}){let r=se(N,n),i=t??(typeof window<`u`?window.location.pathname:`/`),a=e=>{try{return new URL(e,window.location.origin).pathname.replace(/\/+$/,``)}catch{return e.replace(/\/+$/,``).split(`?`)[0]}},o=a(i);return(0,O.jsx)(`div`,{className:C(`navigation-tabs--component`,`navigation-tabs-container w-full`),children:(0,O.jsx)(`nav`,{className:`inline-flex items-center gap-1 rounded-lg bg-muted/60 p-1`,"aria-label":r.tabsAria,children:e.map(e=>{let t=o===a(e.url);return(0,O.jsx)(`a`,{href:e.url,className:C(`flex h-control whitespace-nowrap items-center gap-space-sm rounded-md border border-transparent bg-background px-control text-sm leading-tight text-foreground transition-all duration-150 hover:bg-primary hover:text-background`,{"!bg-primary !text-background font-semibold":t}),children:e.label},e.url)})})})}P.displayName=`NavigationTabs`;function F({eyebrow:e,title:t,description:n,badge:i,breadcrumbs:s,actions:c,children:l,className:u,withSeparator:d=!0}){return(0,O.jsxs)(`header`,{className:C(`page-header--component`,`w-full`,u),children:[!!s&&(0,O.jsx)(`div`,{className:`mb-3`,children:s}),(0,O.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[!!e&&(0,O.jsx)(o,{size:`xxs`,type:`secondary`,weight:`semibold`,className:`mb-1 uppercase tracking-wider`,children:e}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(r,{tag:`h2`,className:`text-2xl border-0 pb-0`,children:t}),!!i&&(0,O.jsx)(a,{variant:i.variant??`secondary`,children:i.label})]}),!!n&&(0,O.jsx)(o,{type:`secondary`,className:`mt-1 max-w-2xl`,children:n})]}),!!c&&(0,O.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:c})]}),!!l&&(0,O.jsx)(`div`,{className:`mt-4`,children:l}),!!d&&(0,O.jsx)(le,{className:`mt-4`})]})}F.displayName=`PageHeader`;function I({items:e,rootMargin:t=`-40% 0px -50% 0px`,className:n,onSelect:r}){let[i,a]=(0,D.useState)(e[0]?.id??null);return(0,D.useEffect)(()=>{let n=new IntersectionObserver(e=>{let t=e.find(e=>e.isIntersecting);t?.target.id&&a(t.target.id)},{rootMargin:t,threshold:0});return e.forEach(e=>{let t=document.getElementById(e.id);t&&n.observe(t)}),()=>n.disconnect()},[e,t]),(0,O.jsx)(`nav`,{className:C(`section-nav--component`,`flex flex-col gap-0.5`,n),"aria-label":`Section navigation`,children:e.map(e=>{let t=e.icon,n=i===e.id;return(0,O.jsxs)(`a`,{href:`#${e.id}`,onClick:t=>{t.preventDefault(),document.getElementById(e.id)?.scrollIntoView({behavior:`smooth`,block:`start`}),a(e.id),r?.(e.id)},className:C(`flex items-center gap-2 rounded-md px-2 py-1.5 transition-colors`,n?`bg-primary/10 text-primary`:`text-muted-foreground hover:bg-muted/50 hover:text-foreground`),children:[!!t&&(0,O.jsx)(t,{className:`size-3.5 shrink-0`}),(0,O.jsx)(o,{tag:`span`,weight:n?`semibold`:`medium`,children:e.label})]},e.id)})})}I.displayName=`SectionNav`;function L(e){if(e.length===0)return`/`;try{let t=typeof window<`u`?window.location.origin:`http://localhost`,n=new URL(e,t).pathname.replace(/\/+$/,``);return n.length>0?n:`/`}catch{let t=(e.split(`?`)[0]??e).replace(/\/+$/,``);return t.length>0?t:`/`}}function R({groups:e,currentPath:t,className:n,itemClassName:r,activeItemClassName:i,ariaLabel:s=`Side navigation`}){let c=L(t??(typeof window<`u`?window.location.pathname:``)),l=(0,D.useMemo)(()=>e.flatMap(e=>e.items.map(t=>({groupId:e.id,normalizedPath:L(t.href)}))),[e]).filter(({normalizedPath:e})=>c===e||c.startsWith(`${e}/`)).sort((e,t)=>t.normalizedPath.length-e.normalizedPath.length)[0]?.normalizedPath??null,[u,d]=(0,D.useState)(()=>Object.fromEntries(e.map(e=>[e.id,!!e.defaultCollapsed]))),f=e=>d(t=>({...t,[e]:!t[e]})),m=i&&i.length>0?i:`bg-primary/5 text-primary`;return(0,O.jsx)(`nav`,{className:C(`side-nav--component`,`flex flex-col gap-4`,n),"aria-label":s,children:e.map(e=>{let t=e.collapsible!==!1&&u[e.id],n=!!e.label,i=!t;return(0,O.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[!!n&&(e.collapsible===!1?(0,O.jsx)(o,{tag:`div`,size:`xs`,type:`secondary`,weight:`medium`,className:`px-3 py-1.5 uppercase tracking-wider`,children:e.label}):(0,O.jsxs)(`button`,{type:`button`,onClick:()=>f(e.id),className:C(`flex w-full items-center justify-between px-3 py-1.5 rounded-md`,`text-xs font-medium uppercase tracking-wider text-muted-foreground`,`hover:text-foreground transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40`),"aria-expanded":!t,children:[(0,O.jsx)(`span`,{children:e.label}),(0,O.jsx)(p,{className:C(`size-3.5 transition-transform`,t&&`-rotate-90`),"aria-hidden":`true`})]})),!!i&&(0,O.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:e.items.map(e=>{let t=e.icon,n=L(e.href)===l;return(0,O.jsxs)(`a`,{href:e.disabled?void 0:e.href,"aria-current":n?`page`:void 0,"aria-disabled":e.disabled||void 0,className:C(`group flex items-center gap-2.5 rounded-md px-3 py-1.5`,`text-sm transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,`hover:bg-muted/60`,e.disabled&&`pointer-events-none opacity-50`,n&&m,r),children:[!!t&&(0,O.jsx)(t,{className:C(`size-4 shrink-0`,n?`text-primary`:`text-muted-foreground`)}),(0,O.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),!!e.badge&&(0,O.jsx)(a,{variant:n?`primary`:`secondary`,className:`shrink-0`,children:e.badge})]},e.href)})})]},e.id)})})}R.displayName=`SideNav`;var z=e({ActionMenuExample:()=>U,AsideNavigationMenuExample:()=>K,BreadcrumbsSizes:()=>H,LanguageSwitcherButtons:()=>W,LanguageSwitcherInline:()=>G,NavigationTabsRound:()=>J,OverflowTabBarResponsiveWithMoreMenu:()=>X,PageHeaderExample:()=>B,SectionNavSticky:()=>V,SideNavCollapsibleGroups:()=>Y,TabNavigationMenuExample:()=>q});function B(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(F,{eyebrow:`Settings`,title:`Team & Permissions`,description:`Invite teammates, set roles, and audit recent activity.`,badge:{label:`Beta`,variant:`info`},actions:(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(d,{icon:ie,children:`Invite`})})})})}function V(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsxs)(`div`,{className:`grid gap-6 md:grid-cols-[200px_1fr]`,children:[(0,O.jsx)(`aside`,{className:`md:sticky md:top-24 md:self-start`,children:(0,O.jsx)(I,{items:[{id:`nav-overview`,label:`Overview`,icon:_},{id:`nav-orders`,label:`Orders`,icon:h},{id:`nav-team`,label:`Team`,icon:S},{id:`nav-preferences`,label:`Preferences`,icon:y}]})}),(0,O.jsxs)(`div`,{className:`space-y-6`,children:[(0,O.jsxs)(`section`,{id:`nav-overview`,className:`min-h-35 rounded-md border border-border p-4`,children:[(0,O.jsx)(`strong`,{children:`Overview`}),` — section anchor target.`]}),(0,O.jsxs)(`section`,{id:`nav-orders`,className:`min-h-35 rounded-md border border-border p-4`,children:[(0,O.jsx)(`strong`,{children:`Orders`}),` — section anchor target.`]}),(0,O.jsxs)(`section`,{id:`nav-team`,className:`min-h-35 rounded-md border border-border p-4`,children:[(0,O.jsx)(`strong`,{children:`Team`}),` — section anchor target.`]}),(0,O.jsxs)(`section`,{id:`nav-preferences`,className:`min-h-35 rounded-md border border-border p-4`,children:[(0,O.jsx)(`strong`,{children:`Preferences`}),` — section anchor target.`]})]})]})})}function H(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(`div`,{className:`space-y-2`,children:[`default`,`small`].map(e=>(0,O.jsx)(ue,{size:e,breadcrumbs:[{label:`Dashboard`,href:`#/`},{label:`Orders`,href:`#/orders`},{label:`INV-2026-0392`}]},e))})})}function U(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsxs)(de,{align:`end`,children:[(0,O.jsx)(T,{icon:x,label:`Edit`,onClick:()=>{}}),(0,O.jsx)(T,{icon:te,label:`Duplicate`,onClick:()=>{}}),(0,O.jsx)(T,{icon:oe,label:`Delete`,variant:`error`,onClick:()=>{}})]})})}function W(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(k,{locales:[{value:`en`,label:`English`,nativeLabel:`English`,active:!0},{value:`bg`,label:`USAn`,nativeLabel:`Български`,active:!1}],onSelect:()=>{}})})}function G(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(k,{variant:`inline`,locales:[{value:`en`,label:`English`,nativeLabel:`EN`,active:!0},{value:`bg`,label:`USAn`,nativeLabel:`БГ`,active:!1},{value:`de`,label:`German`,nativeLabel:`DE`,active:!1}],onSelect:()=>{}})})}function K(){let[e]=(0,D.useState)(`/dashboard/orders`);return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(`div`,{className:`max-w-xs rounded-md border border-border bg-card p-2`,children:(0,O.jsx)(j,{currentPath:e,items:[{title:`Home`,href:`#/`,icon:_},{title:`Orders`,href:`#/dashboard/orders`,icon:h},{title:`Customers`,href:`#/customers`,icon:S},{title:`Settings`,href:`#/settings`,icon:y}]})})})}function q(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(M,{currentPath:`#/orders`,items:[{title:`Overview`,href:`#/overview`},{title:`Orders`,href:`#/orders`,badge:`12`},{title:`Invoices`,href:`#/invoices`}]})})}function J(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(P,{currentUrl:`#/orders`,items:[{url:`#/overview`,label:`Overview`,active:!1},{url:`#/orders`,label:`Orders`,active:!0},{url:`#/invoices`,label:`Invoices`,active:!1}]})})}function Y(){let[e]=(0,D.useState)(`/dashboard/orders`);return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(`div`,{className:`max-w-xs rounded-md border border-border bg-card p-3`,children:(0,O.jsx)(R,{currentPath:e,groups:[{id:`main`,label:`Main`,items:[{label:`Inbox`,href:`#/inbox`,icon:re,badge:`12`},{label:`Orders`,href:`#/dashboard/orders`,icon:h,badge:`3`},{label:`Customers`,href:`#/customers`,icon:S},{label:`Reviews`,href:`#/reviews`,icon:ae}]},{id:`admin`,label:`Admin`,items:[{label:`Permissions`,href:`#/admin/permissions`,icon:b},{label:`Reports`,href:`#/admin/reports`,icon:l},{label:`Settings`,href:`#/admin/settings`,icon:y,disabled:!0}]}]})})})}function X(){let[e,t]=(0,D.useState)(`overview`);return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(E,{value:e,onChange:t,items:[{id:`overview`,label:`Overview`,icon:_},{id:`orders`,label:`Orders`,icon:h,badge:`12`},{id:`invoices`,label:`Invoices`,icon:ne},{id:`customers`,label:`Customers`,icon:S},{id:`messages`,label:`Messages`,icon:v,badge:`4`},{id:`alerts`,label:`Alerts`,icon:c},{id:`billing`,label:`Billing`,icon:m},{id:`data`,label:`Data`,icon:ee}]})})}var Z=`import { useState } from 'react';
|
|
1
|
+
import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{f as r,n as i,o as a,p as o,t as s}from"./section-Dd6X6IKg.js";import{t as c}from"./bell-Cq9n0a2v.js";import{t as l}from"./chart-column-CbUwWFn7.js";import{$n as u,r as d,t as f}from"./example-Rrx9vj75.js";import{t as p}from"./chevron-down-CBa5t2E0.js";import{t as m}from"./credit-card-D_wnXbTK.js";import{t as ee}from"./database-Ad0l2Bjl.js";import{t as te}from"./ellipsis-CP0hyAeS.js";import{t as ne}from"./file-text-Clv0qFr3.js";import{t as h}from"./folder-open-CuUaUrxa.js";import{t as g}from"./globe-Byoz7QmA.js";import{t as _}from"./house-Dew9jimg.js";import{t as re}from"./inbox-hJEV8TEx.js";import{t as v}from"./message-square-Cyrr-QgJ.js";import{t as ie}from"./plus-4gOvUk-5.js";import{t as y}from"./settings-CqdZB-OI.js";import{t as b}from"./shield-Dmxwcn3w.js";import{t as x}from"./square-pen-BrZ2OxTe.js";import{t as ae}from"./star-lUSxI166.js";import{t as oe}from"./trash-2-Bf5dpRjn.js";import{t as S}from"./users-DDgUGkgw.js";import{N as se,d as ce,n as C}from"./index-o71HAmc3.js";import{t as w}from"./props-table-C6gPyO49.js";import{t as le}from"./separator-y9i6EG-N.js";import{t as ue}from"./breadcrumbs-SwqzwYW_.js";import{n as T,t as de}from"./action-menu-wJVcvfmC.js";import{t as E}from"./overflow-tab-bar-CEdrls-W.js";var D=t(n(),1),O=ce();function k({locales:e,onRenderLabel:t,variant:n=`buttons`,onSelect:r}){let i=(0,D.useCallback)((e,t)=>{t||r?.(e)},[r]);return e.length===0?null:n===`inline`?(0,O.jsxs)(`div`,{className:C(`language-switcher--component`,`flex items-center justify-center gap-2.5`),children:[(0,O.jsx)(g,{className:`size-4 text-muted-foreground/70`,"aria-hidden":`true`}),(0,O.jsx)(`div`,{className:`flex items-center justify-center gap-2.5`,children:e.map((n,r)=>{let a=t?t(n):n.nativeLabel;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`button`,{type:`button`,onClick:()=>i(n.value,n.active),className:C(`text-xs transition-colors`,n.active?`text-primary font-medium`:`text-muted-foreground hover:text-foreground`),children:a}),r<e.length-1&&(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`size-1 rounded-full bg-border`})]},n.value)})})]}):(0,O.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:e.map(e=>{let n=t?t(e):e.nativeLabel;return(0,O.jsx)(d,{type:`button`,variant:`secondary`,buttonStyle:e.active?`solid`:`ghost`,onClick:()=>i(e.value,e.active),className:C(`min-w-18 justify-center transition-colors`,e.active?`font-semibold text-primary`:`text-muted-foreground`),children:n},e.value)})})}k.displayName=`LanguageSwitcher`;function A(e){if(e.length===0)return`/`;try{let t=typeof window<`u`?window.location.origin:`http://localhost`,n=new URL(e,t).pathname.replace(/\/+$/,``);return n.length>0?n:`/`}catch{let t=(e.split(`?`)[0]??e).replace(/\/+$/,``);return t.length>0?t:`/`}}function j({items:e,currentPath:t,activeClassName:n,itemClassName:r}){let i=A(t??(typeof window<`u`?window.location.pathname:``)),a=typeof n==`string`&&n.length>0?n:`bg-muted`,o=e.map(e=>({item:e,normalizedPath:A(e.href)})),s=o.filter(({normalizedPath:e})=>i===e||i.startsWith(`${e}/`)).sort((e,t)=>t.normalizedPath.length-e.normalizedPath.length)[0]?.normalizedPath??null;return(0,O.jsx)(`nav`,{className:C(`aside-navigation-menu--component`,`flex flex-col space-y-1 space-x-0`),children:o.map(({item:e,normalizedPath:t})=>(0,O.jsx)(u,{variant:`secondary`,buttonStyle:`ghost`,size:`default`,fullWidth:!0,className:C(`justify-start`,r,t===s?a:null),nativeButton:!1,render:t=>(0,O.jsx)(`a`,{...t,href:e.href}),children:e.title},e.href))})}j.displayName=`AsideNavigationMenu`;function M({items:e,currentPath:t,className:n,ariaLabel:r=`Tab navigation`}){let i=t??(typeof window<`u`?window.location.pathname:``),a=(0,D.useMemo)(()=>e.map(e=>{let t=i===e.href,n=null;if(typeof e.icon==`string`)n=(0,O.jsx)(`span`,{className:`text-inherit`,children:e.icon});else if(e.icon){let t=e.icon;n=(0,O.jsx)(t,{className:`size-icon-sm`})}return{key:e.href,item:e,isActive:t,iconNode:n,ariaCurrent:t?`page`:void 0}}),[i,e]);return(0,O.jsx)(`div`,{className:C(`tab-navigation-menu--component`,`w-full`,n),children:(0,O.jsx)(`nav`,{className:`inline-flex bg-muted rounded-full items-center gap-1 p-1`,"aria-label":r,children:a.map(({key:e,item:t,isActive:n,iconNode:r,ariaCurrent:i})=>(0,O.jsxs)(`a`,{href:t.href,className:C(`flex h-control whitespace-nowrap items-center gap-space-sm`,`rounded-full px-control`,`text-sm font-medium`,`transition-all duration-200`,`focus-visible:outline-none focus-visible:ring-2`,`focus-visible:ring-ring focus-visible:ring-offset-2`,{"bg-background text-foreground shadow-sm":n,"text-muted-foreground hover:text-foreground hover:bg-background/50":!n}),"aria-current":i,children:[!!r&&(0,O.jsx)(`span`,{className:`text-inherit`,children:r}),t.title,!!t.badge&&(0,O.jsx)(`span`,{className:C(`ml-space-sm rounded-full px-space-md py-space-2xs text-xxs font-medium`,n?`bg-primary/10 text-primary`:`bg-muted-foreground/10 text-muted-foreground`),children:t.badge})]},e))})})}M.displayName=`TabNavigationMenu`;var N={tabsAria:`Tabs`};function P({items:e,currentUrl:t,strings:n}){let r=se(N,n),i=t??(typeof window<`u`?window.location.pathname:`/`),a=e=>{try{return new URL(e,window.location.origin).pathname.replace(/\/+$/,``)}catch{return e.replace(/\/+$/,``).split(`?`)[0]}},o=a(i);return(0,O.jsx)(`div`,{className:C(`navigation-tabs--component`,`navigation-tabs-container w-full`),children:(0,O.jsx)(`nav`,{className:`inline-flex items-center gap-1 rounded-lg bg-muted/60 p-1`,"aria-label":r.tabsAria,children:e.map(e=>{let t=o===a(e.url);return(0,O.jsx)(`a`,{href:e.url,className:C(`flex h-control whitespace-nowrap items-center gap-space-sm rounded-md border border-transparent bg-background px-control text-sm leading-tight text-foreground transition-all duration-150 hover:bg-primary hover:text-background`,{"!bg-primary !text-background font-semibold":t}),children:e.label},e.url)})})})}P.displayName=`NavigationTabs`;function F({eyebrow:e,title:t,description:n,badge:i,breadcrumbs:s,actions:c,children:l,className:u,withSeparator:d=!0}){return(0,O.jsxs)(`header`,{className:C(`page-header--component`,`w-full`,u),children:[!!s&&(0,O.jsx)(`div`,{className:`mb-3`,children:s}),(0,O.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[!!e&&(0,O.jsx)(o,{size:`xxs`,type:`secondary`,weight:`semibold`,className:`mb-1 uppercase tracking-wider`,children:e}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(r,{tag:`h2`,className:`text-2xl border-0 pb-0`,children:t}),!!i&&(0,O.jsx)(a,{variant:i.variant??`secondary`,children:i.label})]}),!!n&&(0,O.jsx)(o,{type:`secondary`,className:`mt-1 max-w-2xl`,children:n})]}),!!c&&(0,O.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:c})]}),!!l&&(0,O.jsx)(`div`,{className:`mt-4`,children:l}),!!d&&(0,O.jsx)(le,{className:`mt-4`})]})}F.displayName=`PageHeader`;function I({items:e,rootMargin:t=`-40% 0px -50% 0px`,className:n,onSelect:r}){let[i,a]=(0,D.useState)(e[0]?.id??null);return(0,D.useEffect)(()=>{let n=new IntersectionObserver(e=>{let t=e.find(e=>e.isIntersecting);t?.target.id&&a(t.target.id)},{rootMargin:t,threshold:0});return e.forEach(e=>{let t=document.getElementById(e.id);t&&n.observe(t)}),()=>n.disconnect()},[e,t]),(0,O.jsx)(`nav`,{className:C(`section-nav--component`,`flex flex-col gap-0.5`,n),"aria-label":`Section navigation`,children:e.map(e=>{let t=e.icon,n=i===e.id;return(0,O.jsxs)(`a`,{href:`#${e.id}`,onClick:t=>{t.preventDefault(),document.getElementById(e.id)?.scrollIntoView({behavior:`smooth`,block:`start`}),a(e.id),r?.(e.id)},className:C(`flex items-center gap-2 rounded-md px-2 py-1.5 transition-colors`,n?`bg-primary/10 text-primary`:`text-muted-foreground hover:bg-muted/50 hover:text-foreground`),children:[!!t&&(0,O.jsx)(t,{className:`size-3.5 shrink-0`}),(0,O.jsx)(o,{tag:`span`,weight:n?`semibold`:`medium`,children:e.label})]},e.id)})})}I.displayName=`SectionNav`;function L(e){if(e.length===0)return`/`;try{let t=typeof window<`u`?window.location.origin:`http://localhost`,n=new URL(e,t).pathname.replace(/\/+$/,``);return n.length>0?n:`/`}catch{let t=(e.split(`?`)[0]??e).replace(/\/+$/,``);return t.length>0?t:`/`}}function R({groups:e,currentPath:t,className:n,itemClassName:r,activeItemClassName:i,ariaLabel:s=`Side navigation`}){let c=L(t??(typeof window<`u`?window.location.pathname:``)),l=(0,D.useMemo)(()=>e.flatMap(e=>e.items.map(t=>({groupId:e.id,normalizedPath:L(t.href)}))),[e]).filter(({normalizedPath:e})=>c===e||c.startsWith(`${e}/`)).sort((e,t)=>t.normalizedPath.length-e.normalizedPath.length)[0]?.normalizedPath??null,[u,d]=(0,D.useState)(()=>Object.fromEntries(e.map(e=>[e.id,!!e.defaultCollapsed]))),f=e=>d(t=>({...t,[e]:!t[e]})),m=i&&i.length>0?i:`bg-primary/5 text-primary`;return(0,O.jsx)(`nav`,{className:C(`side-nav--component`,`flex flex-col gap-4`,n),"aria-label":s,children:e.map(e=>{let t=e.collapsible!==!1&&u[e.id],n=!!e.label,i=!t;return(0,O.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[!!n&&(e.collapsible===!1?(0,O.jsx)(o,{tag:`div`,size:`xs`,type:`secondary`,weight:`medium`,className:`px-3 py-1.5 uppercase tracking-wider`,children:e.label}):(0,O.jsxs)(`button`,{type:`button`,onClick:()=>f(e.id),className:C(`flex w-full items-center justify-between px-3 py-1.5 rounded-md`,`text-xs font-medium uppercase tracking-wider text-muted-foreground`,`hover:text-foreground transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40`),"aria-expanded":!t,children:[(0,O.jsx)(`span`,{children:e.label}),(0,O.jsx)(p,{className:C(`size-3.5 transition-transform`,t&&`-rotate-90`),"aria-hidden":`true`})]})),!!i&&(0,O.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:e.items.map(e=>{let t=e.icon,n=L(e.href)===l;return(0,O.jsxs)(`a`,{href:e.disabled?void 0:e.href,"aria-current":n?`page`:void 0,"aria-disabled":e.disabled||void 0,className:C(`group flex items-center gap-2.5 rounded-md px-3 py-1.5`,`text-sm transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,`hover:bg-muted/60`,e.disabled&&`pointer-events-none opacity-50`,n&&m,r),children:[!!t&&(0,O.jsx)(t,{className:C(`size-4 shrink-0`,n?`text-primary`:`text-muted-foreground`)}),(0,O.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),!!e.badge&&(0,O.jsx)(a,{variant:n?`primary`:`secondary`,className:`shrink-0`,children:e.badge})]},e.href)})})]},e.id)})})}R.displayName=`SideNav`;var z=e({ActionMenuExample:()=>U,AsideNavigationMenuExample:()=>K,BreadcrumbsSizes:()=>H,LanguageSwitcherButtons:()=>W,LanguageSwitcherInline:()=>G,NavigationTabsRound:()=>J,OverflowTabBarResponsiveWithMoreMenu:()=>X,PageHeaderExample:()=>B,SectionNavSticky:()=>V,SideNavCollapsibleGroups:()=>Y,TabNavigationMenuExample:()=>q});function B(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(F,{eyebrow:`Settings`,title:`Team & Permissions`,description:`Invite teammates, set roles, and audit recent activity.`,badge:{label:`Beta`,variant:`info`},actions:(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(d,{icon:ie,children:`Invite`})})})})}function V(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsxs)(`div`,{className:`grid gap-6 md:grid-cols-[200px_1fr]`,children:[(0,O.jsx)(`aside`,{className:`md:sticky md:top-24 md:self-start`,children:(0,O.jsx)(I,{items:[{id:`nav-overview`,label:`Overview`,icon:_},{id:`nav-orders`,label:`Orders`,icon:h},{id:`nav-team`,label:`Team`,icon:S},{id:`nav-preferences`,label:`Preferences`,icon:y}]})}),(0,O.jsxs)(`div`,{className:`space-y-6`,children:[(0,O.jsxs)(`section`,{id:`nav-overview`,className:`min-h-35 rounded-md border border-border p-4`,children:[(0,O.jsx)(`strong`,{children:`Overview`}),` — section anchor target.`]}),(0,O.jsxs)(`section`,{id:`nav-orders`,className:`min-h-35 rounded-md border border-border p-4`,children:[(0,O.jsx)(`strong`,{children:`Orders`}),` — section anchor target.`]}),(0,O.jsxs)(`section`,{id:`nav-team`,className:`min-h-35 rounded-md border border-border p-4`,children:[(0,O.jsx)(`strong`,{children:`Team`}),` — section anchor target.`]}),(0,O.jsxs)(`section`,{id:`nav-preferences`,className:`min-h-35 rounded-md border border-border p-4`,children:[(0,O.jsx)(`strong`,{children:`Preferences`}),` — section anchor target.`]})]})]})})}function H(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(`div`,{className:`space-y-2`,children:[`default`,`small`].map(e=>(0,O.jsx)(ue,{size:e,breadcrumbs:[{label:`Dashboard`,href:`#/`},{label:`Orders`,href:`#/orders`},{label:`INV-2026-0392`}]},e))})})}function U(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsxs)(de,{align:`end`,children:[(0,O.jsx)(T,{icon:x,label:`Edit`,onClick:()=>{}}),(0,O.jsx)(T,{icon:te,label:`Duplicate`,onClick:()=>{}}),(0,O.jsx)(T,{icon:oe,label:`Delete`,variant:`error`,onClick:()=>{}})]})})}function W(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(k,{locales:[{value:`en`,label:`English`,nativeLabel:`English`,active:!0},{value:`bg`,label:`USAn`,nativeLabel:`Български`,active:!1}],onSelect:()=>{}})})}function G(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(k,{variant:`inline`,locales:[{value:`en`,label:`English`,nativeLabel:`EN`,active:!0},{value:`bg`,label:`USAn`,nativeLabel:`БГ`,active:!1},{value:`de`,label:`German`,nativeLabel:`DE`,active:!1}],onSelect:()=>{}})})}function K(){let[e]=(0,D.useState)(`/dashboard/orders`);return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(`div`,{className:`max-w-xs rounded-md border border-border bg-card p-2`,children:(0,O.jsx)(j,{currentPath:e,items:[{title:`Home`,href:`#/`,icon:_},{title:`Orders`,href:`#/dashboard/orders`,icon:h},{title:`Customers`,href:`#/customers`,icon:S},{title:`Settings`,href:`#/settings`,icon:y}]})})})}function q(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(M,{currentPath:`#/orders`,items:[{title:`Overview`,href:`#/overview`},{title:`Orders`,href:`#/orders`,badge:`12`},{title:`Invoices`,href:`#/invoices`}]})})}function J(){return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(P,{currentUrl:`#/orders`,items:[{url:`#/overview`,label:`Overview`,active:!1},{url:`#/orders`,label:`Orders`,active:!0},{url:`#/invoices`,label:`Invoices`,active:!1}]})})}function Y(){let[e]=(0,D.useState)(`/dashboard/orders`);return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(`div`,{className:`max-w-xs rounded-md border border-border bg-card p-3`,children:(0,O.jsx)(R,{currentPath:e,groups:[{id:`main`,label:`Main`,items:[{label:`Inbox`,href:`#/inbox`,icon:re,badge:`12`},{label:`Orders`,href:`#/dashboard/orders`,icon:h,badge:`3`},{label:`Customers`,href:`#/customers`,icon:S},{label:`Reviews`,href:`#/reviews`,icon:ae}]},{id:`admin`,label:`Admin`,items:[{label:`Permissions`,href:`#/admin/permissions`,icon:b},{label:`Reports`,href:`#/admin/reports`,icon:l},{label:`Settings`,href:`#/admin/settings`,icon:y,disabled:!0}]}]})})})}function X(){let[e,t]=(0,D.useState)(`overview`);return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(E,{value:e,onChange:t,items:[{id:`overview`,label:`Overview`,icon:_},{id:`orders`,label:`Orders`,icon:h,badge:`12`},{id:`invoices`,label:`Invoices`,icon:ne},{id:`customers`,label:`Customers`,icon:S},{id:`messages`,label:`Messages`,icon:v,badge:`4`},{id:`alerts`,label:`Alerts`,icon:c},{id:`billing`,label:`Billing`,icon:m},{id:`data`,label:`Data`,icon:ee}]})})}var Z=`import { useState } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Home, FolderOpen, Settings, Users, Edit, Trash2, MoreHorizontal, Plus,
|
|
4
4
|
Inbox, Star, Shield, BarChart3, MessageSquare, Bell, CreditCard, Database, FileText,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{n as r,o as i,p as a,t as o}from"./section-D-N8Ze16.js";import{r as s,t as c}from"./example-PsbgbESI.js";import{t as l}from"./heart-BwvHCA-d.js";import{t as u}from"./plus-BkhJjfUv.js";import{t as d}from"./sparkles-8yQFcmte.js";import{t as f}from"./star-t53uwwyp.js";import{t as p}from"./zap-a90eC6iO.js";import{N as m,d as h,n as g}from"./index-QESvAJrb.js";import{t as _}from"./props-table-CCcohuyT.js";import{t as v}from"./smart-card-C6-idFYI.js";import{c as y,i as b,l as x,o as S,r as C,t as w,u as T}from"./item-BMSdEK3V.js";var E=h(),D={neutral:`secondary`,primary:`primary`,info:`info`,success:`success`,warning:`warning`,destructive:`error`},O={neutral:`bg-muted-foreground`,primary:`bg-primary`,info:`bg-info`,success:`bg-success`,warning:`bg-warning`,destructive:`bg-destructive`};function k({columns:e,className:t}){return(0,E.jsx)(v,{title:`Pipeline Overview`,titleSuffix:(0,E.jsxs)(i,{variant:`secondary`,children:[e.reduce((e,t)=>e+t.items.length,0),` items`]}),className:g(`kanban-board--component`,t),children:(0,E.jsx)(`div`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-4`,children:e.map(e=>{let t=e.tone??`neutral`;return(0,E.jsxs)(`div`,{className:`rounded-md border border-border/60 bg-muted/30 p-2`,children:[(0,E.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,E.jsx)(a,{size:`xs`,weight:`semibold`,className:`truncate`,children:e.title}),(0,E.jsx)(i,{variant:D[t],children:e.items.length})]}),(0,E.jsx)(`div`,{className:`space-y-1.5`,children:e.items.map((n,r)=>(0,E.jsxs)(`div`,{className:`flex min-h-8 items-center gap-2 rounded-md border border-border/50 bg-card px-2 py-1.5 shadow-sm`,children:[(0,E.jsx)(`div`,{className:g(`h-1.5 w-1.5 flex-shrink-0 rounded-full`,O[n.tone??t])}),(0,E.jsx)(a,{size:`xs`,className:`truncate`,children:n.title})]},`${e.title}-${r}`))})]},e.title)})})})}k.displayName=`KanbanMicroBoard`;var A=t(n(),1);function j({title:e,tabs:t,defaultTab:n,className:r}){let i=Object.keys(t),[o,c]=(0,A.useState)(n??i[0]??``);return(0,E.jsxs)(v,{title:e,className:g(`tab-switcher--component`,`bg-gradient-to-b from-muted/30 to-card`,r),children:[(0,E.jsx)(`div`,{className:`mt-4 flex gap-1 rounded-full bg-muted/50 p-1`,children:i.map(e=>(0,E.jsx)(s,{variant:o===e?`light`:`secondary`,buttonStyle:o===e?`solid`:`ghost`,onClick:()=>c(e),className:g(`flex-1 rounded-full capitalize`,o===e?`shadow-sm`:``),children:e},e))}),(0,E.jsx)(`div`,{className:`mt-4 space-y-2`,children:t[o]?.map(e=>(0,E.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl px-2 py-2 transition-colors hover:bg-muted/20`,children:[!!e.icon&&(0,E.jsx)(`div`,{className:`flex size-8 items-center justify-center rounded-full bg-primary/10`,children:(0,E.jsx)(e.icon,{className:`size-4 text-primary`})}),(0,E.jsx)(a,{className:`flex-1`,children:e.name}),(0,E.jsx)(a,{weight:`bold`,children:e.value})]},e.name))})]})}j.displayName=`TabSwitcherCard`;var M={legendNone:`None`,legendLow:`Low`,legendMedium:`Medium`,legendHigh:`High`,legendNow:`Now`,formatHourTitle:(e,t)=>`${e}:00 - ${t} bookings`};function N({hours:e,currentHour:t,className:n,strings:r}){let i=m(M,r),o=Math.max(...e,1),s=e.indexOf(Math.max(...e));function c(e){if(e===0)return`bg-muted`;let t=e/o;return t<.33?`bg-primary/25`:t<.66?`bg-primary/55`:`bg-primary`}return(0,E.jsxs)(`div`,{className:g(`time-ruler--component`,`space-y-1.5`,n),children:[(0,E.jsx)(`div`,{className:`relative flex h-8 gap-px overflow-hidden rounded-md`,children:e.map((e,t)=>(0,E.jsx)(`div`,{className:g(`relative flex-1 transition-colors duration-200`,c(e),t===s&&`ring-1 ring-primary ring-inset`),title:i.formatHourTitle(String(t).padStart(2,`0`),e)},t))}),(0,E.jsx)(`div`,{className:`relative flex`,children:e.map((e,t)=>(0,E.jsx)(`div`,{className:`flex-1 text-center`,children:t%4==0&&(0,E.jsx)(a,{size:`xxs`,type:`secondary`,className:`tabular-nums`,children:String(t).padStart(2,`0`)})},t))}),t!==void 0&&t>=0&&t<24&&(0,E.jsx)(`div`,{className:`relative h-0`,children:(0,E.jsx)(`div`,{className:`absolute -top-[42px] flex flex-col items-center`,style:{left:`${t/24*100}%`,transform:`translateX(-50%)`},children:(0,E.jsx)(`div`,{className:`h-0 w-0 border-x-[4px] border-b-[5px] border-x-transparent border-b-destructive`})})}),(0,E.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,E.jsx)(`div`,{className:`h-2 w-3 rounded-sm bg-muted`}),(0,E.jsx)(a,{size:`xxs`,type:`secondary`,children:i.legendNone})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,E.jsx)(`div`,{className:`h-2 w-3 rounded-sm bg-primary/25`}),(0,E.jsx)(a,{size:`xxs`,type:`secondary`,children:i.legendLow})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,E.jsx)(`div`,{className:`h-2 w-3 rounded-sm bg-primary/55`}),(0,E.jsx)(a,{size:`xxs`,type:`secondary`,children:i.legendMedium})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,E.jsx)(`div`,{className:`h-2 w-3 rounded-sm bg-primary`}),(0,E.jsx)(a,{size:`xxs`,type:`secondary`,children:i.legendHigh})]}),t!==void 0&&(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,E.jsx)(`div`,{className:`h-0 w-0 border-x-[3px] border-b-[4px] border-x-transparent border-b-destructive`}),(0,E.jsx)(a,{size:`xxs`,type:`secondary`,children:i.legendNow})]})]})]})}N.displayName=`TimeDistributionRuler`;function P({rating:e,maxRating:t=5}){return(0,E.jsx)(`div`,{className:g(`vendor-performance--component`,`flex items-center gap-0.5`),children:Array.from({length:t},(t,n)=>(0,E.jsx)(`svg`,{className:g(`h-3.5 w-3.5`,n<e?`text-warning`:`text-muted`),viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`,children:(0,E.jsx)(`path`,{d:`M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z`})},`star-${String(n)}`))})}function F(e){return e>=80?`bg-success`:e>=50?`bg-warning`:`bg-destructive`}function I({vendorName:e,rating:t,maxRating:n=5,metrics:r,performanceScore:i,lastActive:o,joinedDate:s,className:c}){return(0,E.jsx)(v,{title:e,className:c,footerText:(0,E.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,E.jsxs)(a,{size:`xxs`,type:`secondary`,children:[`Last active: `,o]}),(0,E.jsxs)(a,{size:`xxs`,type:`secondary`,children:[`Joined: `,s]})]}),children:(0,E.jsxs)(`div`,{className:`space-y-4`,children:[(0,E.jsx)(P,{rating:t,maxRating:n}),(0,E.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:[{label:`Bookings`,value:String(r.bookings)},{label:`Revenue`,value:r.revenue},{label:`Avg Rating`,value:String(r.avgRating)},{label:`Response`,value:r.responseTime}].map(e=>(0,E.jsxs)(`div`,{className:`rounded-lg bg-muted/50 p-3 text-center`,children:[(0,E.jsx)(a,{size:`lg`,weight:`bold`,className:`tabular-nums`,children:e.value}),(0,E.jsx)(a,{size:`xxs`,type:`secondary`,children:e.label})]},e.label))}),(0,E.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,E.jsx)(a,{children:`Performance`}),(0,E.jsxs)(a,{weight:`semibold`,className:`tabular-nums`,children:[i,`%`]})]}),(0,E.jsx)(`div`,{className:`h-2 w-full overflow-hidden rounded-full bg-muted`,children:(0,E.jsx)(`div`,{className:g(`h-full rounded-full transition-all duration-500`,F(i)),style:{width:`${String(i)}%`}})})]})]})})}I.displayName=`VendorPerformanceCard`;var L={description:`Experiences completed this week`,addActionLabel:`Add activity`};function R({completed:e,total:t,activities:n,onAdd:r,strings:i,className:o}){let c=m(L,i);return(0,E.jsx)(v,{title:`${e} out of ${t}`,description:c.description,headerEnd:!!r&&(0,E.jsx)(s,{variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,"aria-label":c.addActionLabel,onClick:r,children:(0,E.jsx)(u,{className:`size-4`})}),className:g(`experience-activity--component`,o),children:(0,E.jsx)(S,{children:n.map((e,t)=>(0,E.jsxs)(`div`,{children:[t>0&&(0,E.jsx)(x,{}),(0,E.jsxs)(w,{size:`small`,className:`items-start`,children:[(0,E.jsx)(y,{children:(0,E.jsx)(`div`,{className:`flex size-8 items-center justify-center rounded-md bg-primary/10 text-primary`,children:(0,E.jsx)(e.icon,{className:`size-4`})})}),(0,E.jsxs)(C,{children:[(0,E.jsx)(T,{children:e.title}),(0,E.jsx)(b,{clamp:1,children:e.time}),(0,E.jsx)(`div`,{className:`mt-2 grid grid-cols-2 gap-1.5`,children:e.metrics.map(e=>(0,E.jsxs)(`div`,{className:`rounded-md border border-border/50 bg-muted/25 px-2.5 py-1.5`,children:[(0,E.jsx)(a,{size:`xs`,type:`secondary`,children:e.label}),(0,E.jsx)(a,{size:`xs`,weight:`semibold`,children:e.value})]},e.label))})]})]})]},e.title))})})}R.displayName=`ExperienceActivityCard`;var z=e({ExperienceActivity:()=>W,KanbanMicroBoardExample:()=>B,TabSwitcherCardExample:()=>V,TimeDistributionRulerExample:()=>H,VendorPerformance:()=>U});function B(){return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(`div`,{className:`w-full max-w-4xl`,children:(0,E.jsx)(k,{columns:[{title:`Draft`,tone:`neutral`,items:[{title:`Spa Package v2`},{title:`Wine Tour`}]},{title:`Active`,tone:`info`,items:[{title:`Cooking Class`},{title:`Paragliding`}]},{title:`Review`,tone:`warning`,items:[{title:`Horse Riding`}]},{title:`Done`,tone:`success`,items:[{title:`Balloon Ride`},{title:`Photo Tour`}]}]})})})}function V(){return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(j,{title:`Gift Cards`,tabs:{recent:[{name:`Luxury Spa Voucher`,value:`150 USD`,icon:l},{name:`Adventure Day Pass`,value:`85 USD`,icon:p}],popular:[{name:`Wine Tasting for Two`,value:`95 USD`,icon:f},{name:`Hot Air Balloon`,value:`280 USD`,icon:d}]}})})}function H(){return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(v,{title:`Booking Density Today`,children:(0,E.jsx)(N,{hours:[0,0,0,0,0,0,1,3,8,12,15,10,14,11,16,18,12,8,5,3,2,1,0,0],currentHour:14})})})}function U(){return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(I,{vendorName:`Spa Retreat New York`,rating:5,metrics:{bookings:342,revenue:`89,200 USD`,avgRating:4.8,responseTime:`1.2 hrs`},performanceScore:94,lastActive:`2 hours ago`,joinedDate:`Jan 2023`})})}function W(){return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(`div`,{className:`w-full max-w-2xl`,children:(0,E.jsx)(R,{completed:2,total:5,activities:[{icon:l,title:`Couples Spa Day`,time:`Mar 25, 14:00`,metrics:[{label:`Duration`,value:`3h`},{label:`Value`,value:`180 USD`},{label:`Bookings`,value:`12`},{label:`Score`,value:`9.4`}]},{icon:f,title:`Wine & Dine Tour`,time:`Mar 24, 18:30`,metrics:[{label:`Duration`,value:`4h`},{label:`Value`,value:`220 USD`}]}],onAdd:()=>{}})})})}var G=`import { Heart, Star, Sparkles, Zap } from 'lucide-react';
|
|
1
|
+
import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{n as r,o as i,p as a,t as o}from"./section-Dd6X6IKg.js";import{r as s,t as c}from"./example-Rrx9vj75.js";import{t as l}from"./heart-gHsYuS4V.js";import{t as u}from"./plus-4gOvUk-5.js";import{t as d}from"./sparkles-Bc0I4qTf.js";import{t as f}from"./star-lUSxI166.js";import{t as p}from"./zap-CzjU6LH0.js";import{N as m,d as h,n as g}from"./index-o71HAmc3.js";import{t as _}from"./props-table-C6gPyO49.js";import{t as v}from"./smart-card-BwSFemlj.js";import{c as y,i as b,l as x,o as S,r as C,t as w,u as T}from"./item-Oe2aHuvr.js";var E=h(),D={neutral:`secondary`,primary:`primary`,info:`info`,success:`success`,warning:`warning`,destructive:`error`},O={neutral:`bg-muted-foreground`,primary:`bg-primary`,info:`bg-info`,success:`bg-success`,warning:`bg-warning`,destructive:`bg-destructive`};function k({columns:e,className:t}){return(0,E.jsx)(v,{title:`Pipeline Overview`,titleSuffix:(0,E.jsxs)(i,{variant:`secondary`,children:[e.reduce((e,t)=>e+t.items.length,0),` items`]}),className:g(`kanban-board--component`,t),children:(0,E.jsx)(`div`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-4`,children:e.map(e=>{let t=e.tone??`neutral`;return(0,E.jsxs)(`div`,{className:`rounded-md border border-border/60 bg-muted/30 p-2`,children:[(0,E.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,E.jsx)(a,{size:`xs`,weight:`semibold`,className:`truncate`,children:e.title}),(0,E.jsx)(i,{variant:D[t],children:e.items.length})]}),(0,E.jsx)(`div`,{className:`space-y-1.5`,children:e.items.map((n,r)=>(0,E.jsxs)(`div`,{className:`flex min-h-8 items-center gap-2 rounded-md border border-border/50 bg-card px-2 py-1.5 shadow-sm`,children:[(0,E.jsx)(`div`,{className:g(`h-1.5 w-1.5 flex-shrink-0 rounded-full`,O[n.tone??t])}),(0,E.jsx)(a,{size:`xs`,className:`truncate`,children:n.title})]},`${e.title}-${r}`))})]},e.title)})})})}k.displayName=`KanbanMicroBoard`;var A=t(n(),1);function j({title:e,tabs:t,defaultTab:n,className:r}){let i=Object.keys(t),[o,c]=(0,A.useState)(n??i[0]??``);return(0,E.jsxs)(v,{title:e,className:g(`tab-switcher--component`,`bg-gradient-to-b from-muted/30 to-card`,r),children:[(0,E.jsx)(`div`,{className:`mt-4 flex gap-1 rounded-full bg-muted/50 p-1`,children:i.map(e=>(0,E.jsx)(s,{variant:o===e?`light`:`secondary`,buttonStyle:o===e?`solid`:`ghost`,onClick:()=>c(e),className:g(`flex-1 rounded-full capitalize`,o===e?`shadow-sm`:``),children:e},e))}),(0,E.jsx)(`div`,{className:`mt-4 space-y-2`,children:t[o]?.map(e=>(0,E.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl px-2 py-2 transition-colors hover:bg-muted/20`,children:[!!e.icon&&(0,E.jsx)(`div`,{className:`flex size-8 items-center justify-center rounded-full bg-primary/10`,children:(0,E.jsx)(e.icon,{className:`size-4 text-primary`})}),(0,E.jsx)(a,{className:`flex-1`,children:e.name}),(0,E.jsx)(a,{weight:`bold`,children:e.value})]},e.name))})]})}j.displayName=`TabSwitcherCard`;var M={legendNone:`None`,legendLow:`Low`,legendMedium:`Medium`,legendHigh:`High`,legendNow:`Now`,formatHourTitle:(e,t)=>`${e}:00 - ${t} bookings`};function N({hours:e,currentHour:t,className:n,strings:r}){let i=m(M,r),o=Math.max(...e,1),s=e.indexOf(Math.max(...e));function c(e){if(e===0)return`bg-muted`;let t=e/o;return t<.33?`bg-primary/25`:t<.66?`bg-primary/55`:`bg-primary`}return(0,E.jsxs)(`div`,{className:g(`time-ruler--component`,`space-y-1.5`,n),children:[(0,E.jsx)(`div`,{className:`relative flex h-8 gap-px overflow-hidden rounded-md`,children:e.map((e,t)=>(0,E.jsx)(`div`,{className:g(`relative flex-1 transition-colors duration-200`,c(e),t===s&&`ring-1 ring-primary ring-inset`),title:i.formatHourTitle(String(t).padStart(2,`0`),e)},t))}),(0,E.jsx)(`div`,{className:`relative flex`,children:e.map((e,t)=>(0,E.jsx)(`div`,{className:`flex-1 text-center`,children:t%4==0&&(0,E.jsx)(a,{size:`xxs`,type:`secondary`,className:`tabular-nums`,children:String(t).padStart(2,`0`)})},t))}),t!==void 0&&t>=0&&t<24&&(0,E.jsx)(`div`,{className:`relative h-0`,children:(0,E.jsx)(`div`,{className:`absolute -top-[42px] flex flex-col items-center`,style:{left:`${t/24*100}%`,transform:`translateX(-50%)`},children:(0,E.jsx)(`div`,{className:`h-0 w-0 border-x-[4px] border-b-[5px] border-x-transparent border-b-destructive`})})}),(0,E.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,E.jsx)(`div`,{className:`h-2 w-3 rounded-sm bg-muted`}),(0,E.jsx)(a,{size:`xxs`,type:`secondary`,children:i.legendNone})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,E.jsx)(`div`,{className:`h-2 w-3 rounded-sm bg-primary/25`}),(0,E.jsx)(a,{size:`xxs`,type:`secondary`,children:i.legendLow})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,E.jsx)(`div`,{className:`h-2 w-3 rounded-sm bg-primary/55`}),(0,E.jsx)(a,{size:`xxs`,type:`secondary`,children:i.legendMedium})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,E.jsx)(`div`,{className:`h-2 w-3 rounded-sm bg-primary`}),(0,E.jsx)(a,{size:`xxs`,type:`secondary`,children:i.legendHigh})]}),t!==void 0&&(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,E.jsx)(`div`,{className:`h-0 w-0 border-x-[3px] border-b-[4px] border-x-transparent border-b-destructive`}),(0,E.jsx)(a,{size:`xxs`,type:`secondary`,children:i.legendNow})]})]})]})}N.displayName=`TimeDistributionRuler`;function P({rating:e,maxRating:t=5}){return(0,E.jsx)(`div`,{className:g(`vendor-performance--component`,`flex items-center gap-0.5`),children:Array.from({length:t},(t,n)=>(0,E.jsx)(`svg`,{className:g(`h-3.5 w-3.5`,n<e?`text-warning`:`text-muted`),viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`,children:(0,E.jsx)(`path`,{d:`M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z`})},`star-${String(n)}`))})}function F(e){return e>=80?`bg-success`:e>=50?`bg-warning`:`bg-destructive`}function I({vendorName:e,rating:t,maxRating:n=5,metrics:r,performanceScore:i,lastActive:o,joinedDate:s,className:c}){return(0,E.jsx)(v,{title:e,className:c,footerText:(0,E.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,E.jsxs)(a,{size:`xxs`,type:`secondary`,children:[`Last active: `,o]}),(0,E.jsxs)(a,{size:`xxs`,type:`secondary`,children:[`Joined: `,s]})]}),children:(0,E.jsxs)(`div`,{className:`space-y-4`,children:[(0,E.jsx)(P,{rating:t,maxRating:n}),(0,E.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:[{label:`Bookings`,value:String(r.bookings)},{label:`Revenue`,value:r.revenue},{label:`Avg Rating`,value:String(r.avgRating)},{label:`Response`,value:r.responseTime}].map(e=>(0,E.jsxs)(`div`,{className:`rounded-lg bg-muted/50 p-3 text-center`,children:[(0,E.jsx)(a,{size:`lg`,weight:`bold`,className:`tabular-nums`,children:e.value}),(0,E.jsx)(a,{size:`xxs`,type:`secondary`,children:e.label})]},e.label))}),(0,E.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,E.jsx)(a,{children:`Performance`}),(0,E.jsxs)(a,{weight:`semibold`,className:`tabular-nums`,children:[i,`%`]})]}),(0,E.jsx)(`div`,{className:`h-2 w-full overflow-hidden rounded-full bg-muted`,children:(0,E.jsx)(`div`,{className:g(`h-full rounded-full transition-all duration-500`,F(i)),style:{width:`${String(i)}%`}})})]})]})})}I.displayName=`VendorPerformanceCard`;var L={description:`Experiences completed this week`,addActionLabel:`Add activity`};function R({completed:e,total:t,activities:n,onAdd:r,strings:i,className:o}){let c=m(L,i);return(0,E.jsx)(v,{title:`${e} out of ${t}`,description:c.description,headerEnd:!!r&&(0,E.jsx)(s,{variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,"aria-label":c.addActionLabel,onClick:r,children:(0,E.jsx)(u,{className:`size-4`})}),className:g(`experience-activity--component`,o),children:(0,E.jsx)(S,{children:n.map((e,t)=>(0,E.jsxs)(`div`,{children:[t>0&&(0,E.jsx)(x,{}),(0,E.jsxs)(w,{size:`small`,className:`items-start`,children:[(0,E.jsx)(y,{children:(0,E.jsx)(`div`,{className:`flex size-8 items-center justify-center rounded-md bg-primary/10 text-primary`,children:(0,E.jsx)(e.icon,{className:`size-4`})})}),(0,E.jsxs)(C,{children:[(0,E.jsx)(T,{children:e.title}),(0,E.jsx)(b,{clamp:1,children:e.time}),(0,E.jsx)(`div`,{className:`mt-2 grid grid-cols-2 gap-1.5`,children:e.metrics.map(e=>(0,E.jsxs)(`div`,{className:`rounded-md border border-border/50 bg-muted/25 px-2.5 py-1.5`,children:[(0,E.jsx)(a,{size:`xs`,type:`secondary`,children:e.label}),(0,E.jsx)(a,{size:`xs`,weight:`semibold`,children:e.value})]},e.label))})]})]})]},e.title))})})}R.displayName=`ExperienceActivityCard`;var z=e({ExperienceActivity:()=>W,KanbanMicroBoardExample:()=>B,TabSwitcherCardExample:()=>V,TimeDistributionRulerExample:()=>H,VendorPerformance:()=>U});function B(){return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(`div`,{className:`w-full max-w-4xl`,children:(0,E.jsx)(k,{columns:[{title:`Draft`,tone:`neutral`,items:[{title:`Spa Package v2`},{title:`Wine Tour`}]},{title:`Active`,tone:`info`,items:[{title:`Cooking Class`},{title:`Paragliding`}]},{title:`Review`,tone:`warning`,items:[{title:`Horse Riding`}]},{title:`Done`,tone:`success`,items:[{title:`Balloon Ride`},{title:`Photo Tour`}]}]})})})}function V(){return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(j,{title:`Gift Cards`,tabs:{recent:[{name:`Luxury Spa Voucher`,value:`150 USD`,icon:l},{name:`Adventure Day Pass`,value:`85 USD`,icon:p}],popular:[{name:`Wine Tasting for Two`,value:`95 USD`,icon:f},{name:`Hot Air Balloon`,value:`280 USD`,icon:d}]}})})}function H(){return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(v,{title:`Booking Density Today`,children:(0,E.jsx)(N,{hours:[0,0,0,0,0,0,1,3,8,12,15,10,14,11,16,18,12,8,5,3,2,1,0,0],currentHour:14})})})}function U(){return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(I,{vendorName:`Spa Retreat New York`,rating:5,metrics:{bookings:342,revenue:`89,200 USD`,avgRating:4.8,responseTime:`1.2 hrs`},performanceScore:94,lastActive:`2 hours ago`,joinedDate:`Jan 2023`})})}function W(){return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(`div`,{className:`w-full max-w-2xl`,children:(0,E.jsx)(R,{completed:2,total:5,activities:[{icon:l,title:`Couples Spa Day`,time:`Mar 25, 14:00`,metrics:[{label:`Duration`,value:`3h`},{label:`Value`,value:`180 USD`},{label:`Bookings`,value:`12`},{label:`Score`,value:`9.4`}]},{icon:f,title:`Wine & Dine Tour`,time:`Mar 24, 18:30`,metrics:[{label:`Duration`,value:`4h`},{label:`Value`,value:`220 USD`}]}],onAdd:()=>{}})})})}var G=`import { Heart, Star, Sparkles, Zap } from 'lucide-react';
|
|
2
2
|
import {
|
|
3
3
|
KanbanMicroBoard,
|
|
4
4
|
TabSwitcherCard,
|
package/dist/showcase/assets/{navigation-extras-CxLc-Mqx.js → navigation-extras-DmUhDPMz.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{n as r,o as i,p as a,t as o}from"./section-
|
|
1
|
+
import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{n as r,o as i,p as a,t as o}from"./section-Dd6X6IKg.js";import{Or as s,r as c,t as l}from"./example-Rrx9vj75.js";import{t as u}from"./heart-gHsYuS4V.js";import{t as d}from"./inbox-hJEV8TEx.js";import{t as f}from"./shopping-bag-DGXTQNOf.js";import{t as p}from"./sparkles-Bc0I4qTf.js";import{t as m}from"./users-DDgUGkgw.js";import{N as h,c as g,d as _,n as v}from"./index-o71HAmc3.js";import{t as y}from"./props-table-C6gPyO49.js";import{t as b}from"./smart-card-BwSFemlj.js";import{c as x,i as S,n as C,o as w,r as T,t as E,u as D}from"./item-Oe2aHuvr.js";var O={stepLabel:`Step`,ofLabel:`of`},k=_();function A({steps:e,currentIndex:t,onStepClick:n,className:r,strings:i}){let o=h(O,i);return(0,k.jsxs)(`div`,{className:v(`breadcrumb-progress--component`,`w-full`,r),children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,k.jsxs)(a,{size:`xs`,type:`secondary`,weight:`medium`,className:`uppercase tracking-wider`,children:[o.stepLabel,` `,t+1,` `,o.ofLabel,` `,e.length]}),(0,k.jsxs)(a,{tag:`span`,size:`xs`,weight:`semibold`,className:`tabular-nums`,children:[Math.round((t+1)/e.length*100),`%`]})]}),(0,k.jsx)(`ol`,{className:`flex items-center gap-2`,children:e.map((r,i)=>{let o=i<t,l=i===t,u=n&&(o||l);return(0,k.jsxs)(`li`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,k.jsxs)(c,{type:`button`,onClick:()=>u&&n?.(r.id,i),disabled:!u,variant:`secondary`,buttonStyle:`ghost`,size:`default`,className:v(`h-auto min-w-0 justify-start gap-2 rounded-md px-2 py-1 text-left transition-colors`,u&&`hover:bg-muted/40`,!u&&`cursor-default`),children:[(0,k.jsx)(`span`,{className:v(`flex size-6 shrink-0 items-center justify-center rounded-full text-xs font-semibold tabular-nums`,o&&`bg-success text-success-foreground`,l&&`bg-primary text-primary-foreground ring-4 ring-primary/15`,!o&&!l&&`bg-muted text-muted-foreground`),children:o?(0,k.jsx)(s,{className:`size-3.5`}):i+1}),(0,k.jsxs)(`div`,{className:`hidden min-w-0 lg:block`,children:[(0,k.jsx)(a,{size:`xs`,weight:`semibold`,className:v(!l&&!o&&`text-muted-foreground`),children:r.label}),!!r.hint&&(0,k.jsx)(a,{size:`xxs`,type:`discrete`,className:`truncate`,children:r.hint})]})]}),i<e.length-1&&(0,k.jsx)(`div`,{className:v(`h-px flex-1`,o?`bg-success`:`bg-border`)})]},r.id)})})]})}A.displayName=`BreadcrumbProgress`;function j({title:e,items:t,activeId:n,onSelect:r,className:a}){return(0,k.jsx)(b,{title:e,padding:`default`,className:v(`category-nav--component`,a),children:(0,k.jsx)(w,{children:t.map(e=>{let t=e.icon,a=e.id===n;return(0,k.jsxs)(E,{size:`small`,onClick:()=>r?.(e.id),"data-state":a?`active`:`inactive`,className:v(`cursor-pointer transition-colors`,a?`bg-primary/10 text-primary`:`hover:bg-muted/50`),children:[!!t&&(0,k.jsx)(x,{variant:`icon`,className:v(a?`text-primary`:`text-muted-foreground`),children:(0,k.jsx)(t,{})}),(0,k.jsxs)(T,{children:[(0,k.jsx)(D,{bold:a,children:e.label}),!!e.hint&&(0,k.jsx)(S,{clamp:1,children:e.hint})]}),(0,k.jsxs)(C,{children:[typeof e.count==`number`&&(0,k.jsx)(i,{variant:a?`primary`:`secondary`,className:`tabular-nums`,children:e.count}),(0,k.jsx)(g,{className:v(`size-4 shrink-0 text-muted-foreground/60`,a&&`text-primary`)})]})]},e.id)})})})}j.displayName=`CategoryNavCard`;var M=e({BreadcrumbProgressExample:()=>P,CategoryNavCardExample:()=>F}),N=t(n(),1);function P(){let[e,t]=(0,N.useState)(2);return(0,k.jsx)(k.Fragment,{children:(0,k.jsx)(A,{steps:[{id:`cart`,label:`Cart`,hint:`Review items`},{id:`shipping`,label:`Shipping`,hint:`Address`},{id:`payment`,label:`Payment`,hint:`Card / wallet`},{id:`review`,label:`Review`,hint:`Confirm order`},{id:`done`,label:`Done`,hint:`Receipt`}],currentIndex:e,onStepClick:(e,n)=>t(n)})})}function F(){let[e,t]=(0,N.useState)(`orders`);return(0,k.jsx)(k.Fragment,{children:(0,k.jsx)(j,{title:`Inbox`,activeId:e,onSelect:t,items:[{id:`all`,label:`All`,icon:d,count:142},{id:`orders`,label:`Orders`,icon:f,count:24,hint:`Pending review`},{id:`reviews`,label:`Reviews`,icon:u,count:8},{id:`team`,label:`Team`,icon:m,count:3},{id:`ai`,label:`AI suggestions`,icon:p,hint:`Auto-generated`}]})})}var I=`import { useState } from 'react';
|
|
2
2
|
import { Inbox, Heart, ShoppingBag, Sparkles, Users } from 'lucide-react';
|
|
3
3
|
import { BreadcrumbProgress, CategoryNavCard } from '@/components/composed/navigation';
|
|
4
4
|
|
package/dist/showcase/assets/{onboarding-checklist-C15gqmFc.js → onboarding-checklist-C3JhV5Gb.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{f as r,n as i,o as a,p as o,t as s}from"./section-
|
|
1
|
+
import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{f as r,n as i,o as a,p as o,t as s}from"./section-Dd6X6IKg.js";import{r as c,t as l}from"./example-Rrx9vj75.js";import{t as u}from"./circle-check-BPhdxh7K.js";import{N as d,d as f,l as p,n as m}from"./index-o71HAmc3.js";import{t as h}from"./props-table-C6gPyO49.js";import{a as g,c as _,i as v,n as y,o as b,r as x,s as S,t as C}from"./accordion-variants-De2q5GIH.js";import{t as w}from"./smart-card-BwSFemlj.js";import{t as T}from"./input-CYTQ9nWN.js";import{t as E}from"./spinner-HyNCtTyd.js";import{t as D}from"./PreviewLayout-CBTybzKu.js";var O=p(`qr-code`,[[`rect`,{width:`5`,height:`5`,x:`3`,y:`3`,rx:`1`,key:`1tu5fj`}],[`rect`,{width:`5`,height:`5`,x:`16`,y:`3`,rx:`1`,key:`1v8r4q`}],[`rect`,{width:`5`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`1x03jg`}],[`path`,{d:`M21 16h-3a2 2 0 0 0-2 2v3`,key:`177gqh`}],[`path`,{d:`M21 21v.01`,key:`ents32`}],[`path`,{d:`M12 7v3a2 2 0 0 1-2 2H7`,key:`8crl2c`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M12 3h.01`,key:`n36tog`}],[`path`,{d:`M12 16v.01`,key:`133mhm`}],[`path`,{d:`M16 12h1`,key:`1slzba`}],[`path`,{d:`M21 12v.01`,key:`1lwtk9`}],[`path`,{d:`M12 21v-1`,key:`1880an`}]]),k={regionAriaLabel:void 0,statusCompletedAria:`Completed`,statusInProgressAria:`In progress`,statusPendingAria:`Pending`},A=f();function j({status:e,ariaLabel:t,className:n}){return e===`completed`?(0,A.jsx)(`span`,{role:`img`,"aria-label":t,className:m(`flex size-8 items-center justify-center rounded-full bg-success/15 text-success ring-1 ring-success/20`,n),children:(0,A.jsx)(u,{className:`size-4`})}):e===`in-progress`?(0,A.jsx)(`span`,{role:`img`,"aria-label":t,className:m(`flex size-8 items-center justify-center rounded-full bg-warning/15 ring-1 ring-warning/30`,n),children:(0,A.jsx)(`span`,{className:`size-2 rounded-full bg-warning`})}):(0,A.jsx)(`span`,{role:`img`,"aria-label":t,className:m(`flex size-8 items-center justify-center rounded-full bg-muted text-muted-foreground/70 ring-1 ring-border/70`,n),children:(0,A.jsx)(E,{className:`size-4 opacity-60`})})}j.displayName=`StepStatusIndicator`;var M=t(n(),1),N={completed:`text-foreground`,"in-progress":`text-foreground`,pending:`text-muted-foreground`};function P(e,t){return e===`completed`?t.statusCompletedAria:e===`in-progress`?t.statusInProgressAria:t.statusPendingAria}function F(e){let t=e.find(e=>e.status!==`completed`&&!e.disabled);return t?[t.id]:[]}var I=(0,M.forwardRef)(function({steps:e,defaultExpanded:t,multiple:n=!1,value:r,onValueChange:i,onStepOpen:a,variant:s=`bordered`,className:c,stepClassName:l,strings:u},f){let p=d(k,u),h=r!==void 0,w=(0,M.useMemo)(()=>t??F(e),[]),[T,E]=(0,M.useState)(w),D=(0,M.useRef)(!1),O=h?r:T,I=(0,M.useRef)(new Set(w));(0,M.useEffect)(()=>{if(h||D.current||t!==void 0||e.length===0||T.length>0)return;let n=F(e);n.length>0&&E(n)},[e,h,t,T.length]);let L=(0,M.useCallback)(e=>{let t=e??[];D.current=!0,h||E(t),i?.(t)},[h,i]);return(0,M.useEffect)(()=>{if(!a){I.current=new Set(O);return}let e=I.current;for(let t of O)e.has(t)||a(t);I.current=new Set(O)},[O,a]),(0,A.jsx)(g,{ref:f,multiple:n,value:O,onValueChange:L,"aria-label":p.regionAriaLabel,className:m(`checklist--component`,x[s],c),children:e.map(e=>(0,A.jsxs)(S,{value:e.id,className:m(y[s],l),children:[(0,A.jsx)(_,{disabled:e.disabled,className:m(v,`min-h-16 items-center`),children:(0,A.jsxs)(`div`,{className:`flex w-full min-w-0 items-center gap-3 pr-2`,children:[(0,A.jsx)(j,{status:e.status,ariaLabel:P(e.status,p)}),(0,A.jsx)(o,{tag:`span`,weight:`semibold`,className:m(N[e.status]),children:e.title}),!!e.badge&&(0,A.jsx)(`span`,{className:`ml-auto inline-flex shrink-0`,children:e.badge})]})}),!!e.content&&(0,A.jsx)(b,{className:C.withMedallion,children:(0,A.jsx)(o,{type:`secondary`,className:`leading-relaxed`,tag:`div`,children:e.content})})]},e.id))})});I.displayName=`OnboardingChecklist`;var L=e({BorderedDefaultPointOfSaleOnboarding:()=>V,CardVariantWorkspaceSetupControlled:()=>H,FlatVariantMinimal:()=>U});function R(){return(0,A.jsxs)(`div`,{className:`flex flex-col gap-5 md:flex-row md:items-start md:justify-between`,children:[(0,A.jsxs)(`div`,{className:`flex-1 space-y-4`,children:[(0,A.jsx)(o,{size:`sm`,type:`secondary`,className:`leading-relaxed`,children:`Scan the QR code or send yourself the link to get the app. The mobile app is where you’ll manage orders, track inventory, and view analytics on the go.`}),(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(T,{placeholder:`you@example.com`,className:`flex-1`}),(0,A.jsx)(c,{variant:`secondary`,children:`Send link`})]})]}),(0,A.jsx)(`div`,{className:`flex shrink-0 items-center justify-center rounded-md border border-border bg-muted/30 p-3`,children:(0,A.jsx)(O,{className:`size-20 text-foreground`,strokeWidth:1.5})})]})}var z=[{id:`add-products`,status:`completed`,title:`Add products`,badge:(0,A.jsx)(a,{variant:`success`,children:`Ready`}),content:(0,A.jsx)(o,{size:`sm`,type:`secondary`,children:`Your products have been successfully added and are ready for sale.`})},{id:`pos-app`,status:`in-progress`,title:`Get the point-of-sale application`,content:(0,A.jsx)(R,{})},{id:`price-stock`,status:`pending`,title:`Product price & stock`,content:(0,A.jsx)(o,{size:`sm`,type:`secondary`,children:`Configure your product pricing and manage stock levels across all locations.`})}],B=[{id:`workspace`,status:`completed`,title:`Create your workspace`,content:(0,A.jsx)(o,{size:`sm`,type:`secondary`,children:`Workspace created.`})},{id:`invite`,status:`completed`,title:`Invite teammates`,content:(0,A.jsx)(o,{size:`sm`,type:`secondary`,children:`3 members joined.`})},{id:`integrations`,status:`in-progress`,title:`Connect integrations`,badge:(0,A.jsx)(a,{variant:`warning`,children:`Recommended`}),content:(0,A.jsx)(o,{size:`sm`,type:`secondary`,children:`Connect Slack, GitHub, and Linear.`})},{id:`billing`,status:`pending`,title:`Add payment method`,content:(0,A.jsx)(o,{size:`sm`,type:`secondary`,children:`Required before launch.`}),disabled:!1}];function V(){return(0,A.jsx)(A.Fragment,{children:(0,A.jsx)(D,{className:`max-w-2xl`,children:(0,A.jsx)(I,{steps:z})})})}function H(){let[e,t]=(0,M.useState)([`integrations`]);return(0,A.jsx)(A.Fragment,{children:(0,A.jsx)(D,{className:`max-w-2xl`,children:(0,A.jsx)(w,{padding:`default`,children:(0,A.jsxs)(D,{className:`gap-3`,children:[(0,A.jsx)(r,{tag:`h3`,className:`border-0 pb-0 text-base`,children:`Set up your workspace`}),(0,A.jsx)(I,{steps:B,variant:`card`,value:e,onValueChange:t})]})})})})}function U(){return(0,A.jsx)(A.Fragment,{children:(0,A.jsx)(D,{className:`max-w-2xl`,children:(0,A.jsx)(I,{steps:z,variant:`flat`,defaultExpanded:[]})})})}var W=`import { useState } from 'react';
|
|
2
2
|
import { QrCode } from 'lucide-react';
|
|
3
3
|
import { Badge } from '@/components/base/badge';
|
|
4
4
|
import { Button } from '@/components/base/buttons';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./chunk-QTnfLwEv.js";import{t}from"./react-sKtkuLrH.js";import{t as n}from"./ellipsis-
|
|
1
|
+
import{r as e}from"./chunk-QTnfLwEv.js";import{t}from"./react-sKtkuLrH.js";import{t as n}from"./ellipsis-CP0hyAeS.js";import{d as r,n as i}from"./index-o71HAmc3.js";import{a,l as o,r as s,t as c}from"./dropdown-menu-CXYQqRJA.js";var l=e(t(),1),u=r(),d=`inline-flex h-control shrink-0 items-center gap-space-sm rounded-md px-control text-sm font-medium whitespace-nowrap transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40`;function f({items:e,value:t,onChange:r,className:f,tabClassName:p,activeTabClassName:m,moreLabel:h=`More`,ariaLabel:g=`Tab navigation`}){let _=(0,l.useRef)(null),v=(0,l.useRef)(null),[y,b]=(0,l.useState)(e.length);(0,l.useLayoutEffect)(()=>{if(!_.current||!v.current)return;let t=_.current,n=v.current,r=()=>{let r=t.clientWidth;if(r===0){b(e.length);return}let i=Array.from(n.querySelectorAll(`[data-tab-id]`)),a=0,o=0;for(let e of i){let t=e.offsetWidth+4;if(a+t+72<=r)a+=t,o+=1;else break}b(o===i.length?o:Math.max(1,o))};if(r(),typeof ResizeObserver>`u`)return;let i=new ResizeObserver(r);return i.observe(t),()=>i.disconnect()},[e]);let x=(0,l.useMemo)(()=>{if(!t)return e;let n=e.findIndex(e=>e.id===t);if(n<0||n<y)return e;let r=[...e],i=Math.max(0,y-1);return[r[n],r[i]]=[r[i],r[n]],r},[e,t,y]),S=x.slice(0,y),C=x.slice(y),w=e=>{r?.(e.id),e.onClick?.()},T=(e,n,r)=>{let a=e.icon,o=i(d,n?i(`bg-card text-foreground shadow-sm`,m):`text-muted-foreground hover:bg-muted/60`,p),s=(0,u.jsxs)(u.Fragment,{children:[!!a&&(0,u.jsx)(a,{className:`size-icon-sm`}),(0,u.jsx)(`span`,{children:e.label}),!!e.badge&&(0,u.jsx)(`span`,{className:i(`ml-1 inline-flex items-center rounded-full px-1.5 py-0.5 text-xxs font-semibold`,n?`bg-primary/10 text-primary`:`bg-muted-foreground/10 text-muted-foreground`),children:e.badge})]});return r?.measure?(0,u.jsx)(`span`,{"data-tab-id":e.id,className:i(`overflow-tab-bar--measure`,o),children:s},e.id):e.href?(0,u.jsx)(`a`,{href:e.href,"data-tab-id":e.id,role:`tab`,"aria-selected":n,tabIndex:n||!t?0:-1,onClick:()=>w(e),className:i(`overflow-tab-bar--component`,o),children:s},e.id):(0,u.jsx)(`button`,{type:`button`,"data-tab-id":e.id,role:`tab`,"aria-selected":n,tabIndex:n||!t?0:-1,onClick:()=>w(e),className:o,children:s},e.id)};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`div`,{ref:v,"aria-hidden":`true`,className:`pointer-events-none fixed left-0 top-0 z-[-1] flex h-0 w-0 items-center gap-1 overflow-hidden opacity-0`,children:e.map(e=>T(e,!1,{measure:!0}))}),(0,u.jsxs)(`div`,{ref:_,className:i(`relative flex w-full min-w-0 max-w-full items-center gap-1 overflow-hidden rounded-lg bg-muted/40 p-1`,f),children:[(0,u.jsx)(`div`,{role:`tablist`,"aria-label":g,"aria-orientation":`horizontal`,className:`flex min-w-0 flex-1 items-center gap-1 overflow-hidden`,children:S.map(e=>T(e,e.id===t))}),C.length>0&&(0,u.jsxs)(c,{children:[(0,u.jsxs)(o,{type:`button`,"aria-label":h,className:i(d,`text-muted-foreground hover:bg-muted/60`),children:[(0,u.jsx)(n,{className:`size-icon-sm`}),(0,u.jsx)(`span`,{children:h})]}),(0,u.jsx)(s,{align:`end`,className:`min-w-40`,children:C.map(e=>{let n=e.icon;return(0,u.jsxs)(a,{onClick:()=>w(e),className:i(`text-xs gap-1.5 px-2 py-1.5`,e.id===t&&`bg-primary/5 text-primary`),children:[!!n&&(0,u.jsx)(n,{className:`size-3.5`}),(0,u.jsx)(`span`,{children:e.label})]},e.id)})})]})]})]})}f.displayName=`OverflowTabBar`;export{f as t};
|