@kuzenbo/core 0.0.1-alpha.3 → 0.0.1-alpha.5
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/README.md +77 -27
- package/dist/accordion-trigger-P3yAXC9X.d.ts +35 -0
- package/dist/accordion-trigger-P3yAXC9X.d.ts.map +1 -0
- package/dist/accordion.d.ts +19 -11
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.js +25 -13
- package/dist/accordion.js.map +1 -1
- package/dist/affix.js +1 -1
- package/dist/alert-dialog-trigger-Bh4pSvCf.js +142 -0
- package/dist/alert-dialog-trigger-Bh4pSvCf.js.map +1 -0
- package/dist/alert-dialog-viewport-CIjRyI-y.d.ts +120 -0
- package/dist/alert-dialog-viewport-CIjRyI-y.d.ts.map +1 -0
- package/dist/alert-dialog.d.ts +30 -75
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.js +6 -2
- package/dist/alert-dialog.js.map +1 -1
- package/dist/{alert-title-sXI11YPI.js → alert-title-B1q_D7US.js} +3 -3
- package/dist/alert-title-B1q_D7US.js.map +1 -0
- package/dist/alert-title-BzrwvCBs.d.ts +26 -0
- package/dist/alert-title-BzrwvCBs.d.ts.map +1 -0
- package/dist/alert.d.ts +71 -21
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +198 -38
- package/dist/alert.js.map +1 -1
- package/dist/{announcement-title-ByuSJud1.js → announcement-title-CZ-xxuBs.js} +1 -1
- package/dist/{announcement-title-ByuSJud1.js.map → announcement-title-CZ-xxuBs.js.map} +1 -1
- package/dist/{announcement-title-3cikJ44S.d.ts → announcement-title-DQAqY8lM.d.ts} +1 -1
- package/dist/{announcement-title-3cikJ44S.d.ts.map → announcement-title-DQAqY8lM.d.ts.map} +1 -1
- package/dist/announcement.d.ts +1 -1
- package/dist/announcement.js +1 -1
- package/dist/aspect-ratio.d.ts +5 -4
- package/dist/aspect-ratio.d.ts.map +1 -1
- package/dist/aspect-ratio.js.map +1 -1
- package/dist/autocomplete-value-CE4htlBI.js +296 -0
- package/dist/autocomplete-value-CE4htlBI.js.map +1 -0
- package/dist/autocomplete-value-DZvfXD_j.d.ts +320 -0
- package/dist/autocomplete-value-DZvfXD_j.d.ts.map +1 -0
- package/dist/autocomplete.d.ts +26 -5
- package/dist/autocomplete.d.ts.map +1 -1
- package/dist/autocomplete.js +18 -7
- package/dist/autocomplete.js.map +1 -1
- package/dist/avatar-image-BpYCNLxP.d.ts +41 -0
- package/dist/avatar-image-BpYCNLxP.d.ts.map +1 -0
- package/dist/{avatar-image-BAVOtujm.js → avatar-image-QGDvWzq_.js} +6 -5
- package/dist/avatar-image-QGDvWzq_.js.map +1 -0
- package/dist/avatar.d.ts +13 -12
- package/dist/avatar.d.ts.map +1 -1
- package/dist/avatar.js +12 -8
- package/dist/avatar.js.map +1 -1
- package/dist/badge.d.ts +26 -9
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +43 -21
- package/dist/badge.js.map +1 -1
- package/dist/breadcrumb-separator-BxPVg1Je.js +172 -0
- package/dist/breadcrumb-separator-BxPVg1Je.js.map +1 -0
- package/dist/breadcrumb-separator-Cn5BAhvD.d.ts +228 -0
- package/dist/breadcrumb-separator-Cn5BAhvD.d.ts.map +1 -0
- package/dist/breadcrumb.d.ts +20 -10
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.js +15 -7
- package/dist/breadcrumb.js.map +1 -1
- package/dist/button-group-size-context-BAqIdusJ.js +8 -0
- package/dist/button-group-size-context-BAqIdusJ.js.map +1 -0
- package/dist/button-group-text-B2_MmlIc.d.ts +85 -0
- package/dist/button-group-text-B2_MmlIc.d.ts.map +1 -0
- package/dist/button-group-text-JA0xMSnb.js +62 -0
- package/dist/button-group-text-JA0xMSnb.js.map +1 -0
- package/dist/button-group.d.ts +35 -55
- package/dist/button-group.d.ts.map +1 -1
- package/dist/button-group.js +38 -13
- package/dist/button-group.js.map +1 -1
- package/dist/button.d.ts +15 -29
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +74 -29
- package/dist/button.js.map +1 -1
- package/dist/card-title-BaHIF8-E.d.ts +47 -0
- package/dist/card-title-BaHIF8-E.d.ts.map +1 -0
- package/dist/card.d.ts +13 -15
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +12 -7
- package/dist/card.js.map +1 -1
- package/dist/{carousel-previous-BE0u96g1.js → carousel-previous-OcdvvI1k.js} +1 -1
- package/dist/carousel-previous-OcdvvI1k.js.map +1 -0
- package/dist/carousel.d.ts +6 -65
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +1 -1
- package/dist/carousel.js.map +1 -1
- package/dist/checkbox-group.d.ts.map +1 -1
- package/dist/checkbox-group.js +2 -2
- package/dist/checkbox-group.js.map +1 -1
- package/dist/checkbox-indicator-D9X12aCq.d.ts +44 -0
- package/dist/checkbox-indicator-D9X12aCq.d.ts.map +1 -0
- package/dist/checkbox-indicator-DMjot9eq.js +31 -0
- package/dist/checkbox-indicator-DMjot9eq.js.map +1 -0
- package/dist/checkbox.d.ts +48 -7
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/checkbox.js +36 -18
- package/dist/checkbox.js.map +1 -1
- package/dist/code.d.ts +15 -0
- package/dist/code.d.ts.map +1 -0
- package/dist/code.js +22 -0
- package/dist/code.js.map +1 -0
- package/dist/collapsible-trigger-CvIq1bXq.d.ts +19 -0
- package/dist/collapsible-trigger-CvIq1bXq.d.ts.map +1 -0
- package/dist/{collapsible-trigger-COktdQ2E.js → collapsible-trigger-DCw3swj8.js} +4 -4
- package/dist/collapsible-trigger-DCw3swj8.js.map +1 -0
- package/dist/collapsible.d.ts +10 -5
- package/dist/collapsible.d.ts.map +1 -1
- package/dist/collapsible.js +4 -3
- package/dist/collapsible.js.map +1 -1
- package/dist/combobox.d.ts +79 -26
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +25 -7
- package/dist/combobox.js.map +1 -1
- package/dist/command-shortcut-B42eSLXJ.d.ts +268 -0
- package/dist/command-shortcut-B42eSLXJ.d.ts.map +1 -0
- package/dist/command-shortcut-fALFGGNB.js +226 -0
- package/dist/command-shortcut-fALFGGNB.js.map +1 -0
- package/dist/command.d.ts +24 -103
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +14 -6
- package/dist/command.js.map +1 -1
- package/dist/container.js +1 -1
- package/dist/container.js.map +1 -1
- package/dist/context-menu-trigger-D1yfnhtH.d.ts +632 -0
- package/dist/context-menu-trigger-D1yfnhtH.d.ts.map +1 -0
- package/dist/context-menu-trigger-Db8Hnkac.js +471 -0
- package/dist/context-menu-trigger-Db8Hnkac.js.map +1 -0
- package/dist/context-menu.d.ts +81 -25
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +19 -6
- package/dist/context-menu.js.map +1 -1
- package/dist/{dialog-trigger-ptlomR_n.js → dialog-trigger-Qa2UBwDK.js} +33 -9
- package/dist/dialog-trigger-Qa2UBwDK.js.map +1 -0
- package/dist/{dialog-trigger-B5HeOikl.d.ts → dialog-viewport-_iN9a_OF.d.ts} +25 -4
- package/dist/dialog-viewport-_iN9a_OF.d.ts.map +1 -0
- package/dist/dialog.d.ts +14 -2
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +5 -2
- package/dist/dialog.js.map +1 -1
- package/dist/drawer-size-context-TrNk8sne.d.ts +377 -0
- package/dist/drawer-size-context-TrNk8sne.d.ts.map +1 -0
- package/dist/drawer-viewport-CXCkzSjL.js +261 -0
- package/dist/drawer-viewport-CXCkzSjL.js.map +1 -0
- package/dist/drawer.d.ts +26 -3
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +9 -2
- package/dist/drawer.js.map +1 -1
- package/dist/dropdown-menu-trigger-BzJ8E29P.d.ts +646 -0
- package/dist/dropdown-menu-trigger-BzJ8E29P.d.ts.map +1 -0
- package/dist/dropdown-menu-trigger-PvBaqoOj.js +488 -0
- package/dist/dropdown-menu-trigger-PvBaqoOj.js.map +1 -0
- package/dist/dropdown-menu.d.ts +80 -25
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +19 -6
- package/dist/dropdown-menu.js.map +1 -1
- package/dist/{dropzone-context-DNiJThhB.d.ts → dropzone-context-PCTXy62j.d.ts} +1 -1
- package/dist/{dropzone-context-DNiJThhB.d.ts.map → dropzone-context-PCTXy62j.d.ts.map} +1 -1
- package/dist/{dropzone-status-B9Axvf9M.js → dropzone-status-BziqO77U.js} +1 -1
- package/dist/{dropzone-status-B9Axvf9M.js.map → dropzone-status-BziqO77U.js.map} +1 -1
- package/dist/dropzone.d.ts +1 -1
- package/dist/dropzone.js +5 -5
- package/dist/dropzone.js.map +1 -1
- package/dist/emoji-picker-size-context-gu6mLjuf.d.ts +315 -0
- package/dist/emoji-picker-size-context-gu6mLjuf.d.ts.map +1 -0
- package/dist/emoji-picker-skin-tone-selector-DAJcO_Ue.js +308 -0
- package/dist/emoji-picker-skin-tone-selector-DAJcO_Ue.js.map +1 -0
- package/dist/emoji-picker.d.ts +49 -4
- package/dist/emoji-picker.d.ts.map +1 -1
- package/dist/emoji-picker.js +25 -6
- package/dist/emoji-picker.js.map +1 -1
- package/dist/empty-title-C9hHuBz8.d.ts +211 -0
- package/dist/empty-title-C9hHuBz8.d.ts.map +1 -0
- package/dist/empty-title-DjJj4k34.js +178 -0
- package/dist/empty-title-DjJj4k34.js.map +1 -0
- package/dist/empty.d.ts +49 -23
- package/dist/empty.d.ts.map +1 -1
- package/dist/empty.js +27 -7
- package/dist/empty.js.map +1 -1
- package/dist/fieldset-BvbNkZWm.d.ts +151 -0
- package/dist/fieldset-BvbNkZWm.d.ts.map +1 -0
- package/dist/fieldset-fXftcr4b.js +109 -0
- package/dist/fieldset-fXftcr4b.js.map +1 -0
- package/dist/form-field.d.ts +94 -71
- package/dist/form-field.d.ts.map +1 -1
- package/dist/form-field.js +110 -8
- package/dist/form-field.js.map +1 -1
- package/dist/index.d.ts +1217 -82
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1433 -58
- package/dist/index.js.map +1 -0
- package/dist/input-group-textarea-C6-pPujg.d.ts +121 -0
- package/dist/input-group-textarea-C6-pPujg.d.ts.map +1 -0
- package/dist/input-group-textarea-C6ixncHC.js +120 -0
- package/dist/input-group-textarea-C6ixncHC.js.map +1 -0
- package/dist/input-group.d.ts +16 -109
- package/dist/input-group.d.ts.map +1 -1
- package/dist/input-group.js +16 -7
- package/dist/input-group.js.map +1 -1
- package/dist/input-otp-slot-BA8DE3oz.js +116 -0
- package/dist/input-otp-slot-BA8DE3oz.js.map +1 -0
- package/dist/input-otp-slot-BxEhjqR5.d.ts +173 -0
- package/dist/input-otp-slot-BxEhjqR5.d.ts.map +1 -0
- package/dist/input-otp.d.ts +18 -10
- package/dist/input-otp.d.ts.map +1 -1
- package/dist/input-otp.js +16 -8
- package/dist/input-otp.js.map +1 -1
- package/dist/input.d.ts +40 -7
- package/dist/input.d.ts.map +1 -1
- package/dist/input.js +28 -6
- package/dist/input.js.map +1 -1
- package/dist/item-title-BEt0xgK_.d.ts +91 -0
- package/dist/item-title-BEt0xgK_.d.ts.map +1 -0
- package/dist/{item-title-BQFoYDpd.js → item-title-DL4BlZUJ.js} +3 -3
- package/dist/item-title-DL4BlZUJ.js.map +1 -0
- package/dist/item.d.ts +26 -84
- package/dist/item.d.ts.map +1 -1
- package/dist/item.js +23 -17
- package/dist/item.js.map +1 -1
- package/dist/kbd-group-3GbsGHQf.d.ts +19 -0
- package/dist/kbd-group-3GbsGHQf.d.ts.map +1 -0
- package/dist/kbd-group-BmHYZhQr.js +30 -0
- package/dist/kbd-group-BmHYZhQr.js.map +1 -0
- package/dist/kbd.d.ts +8 -4
- package/dist/kbd.d.ts.map +1 -1
- package/dist/kbd.js +21 -6
- package/dist/kbd.js.map +1 -1
- package/dist/{marquee-item-B_yei6_k.js → marquee-item-B0TLvHgC.js} +1 -1
- package/dist/{marquee-item-B_yei6_k.js.map → marquee-item-B0TLvHgC.js.map} +1 -1
- package/dist/{marquee-item-BCswidMf.d.ts → marquee-item-CF7L5m2C.d.ts} +1 -1
- package/dist/{marquee-item-BCswidMf.d.ts.map → marquee-item-CF7L5m2C.d.ts.map} +1 -1
- package/dist/marquee.d.ts +1 -1
- package/dist/marquee.js +1 -1
- package/dist/menubar-trigger-BSEAK4Hv.js +427 -0
- package/dist/menubar-trigger-BSEAK4Hv.js.map +1 -0
- package/dist/menubar-trigger-Cg8h_R-F.d.ts +633 -0
- package/dist/menubar-trigger-Cg8h_R-F.d.ts.map +1 -0
- package/dist/menubar.d.ts +79 -163
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +31 -7
- package/dist/menubar.js.map +1 -1
- package/dist/merge-base-ui-class-name-u6eS5MaQ.js +11 -0
- package/dist/merge-base-ui-class-name-u6eS5MaQ.js.map +1 -0
- package/dist/{meter-value-FRDEI8VE.d.ts → meter-value-BBRupvEw.d.ts} +5 -2
- package/dist/meter-value-BBRupvEw.d.ts.map +1 -0
- package/dist/{meter-value-CJjAfKID.js → meter-value-DTvav35V.js} +7 -7
- package/dist/meter-value-DTvav35V.js.map +1 -0
- package/dist/meter.d.ts +5 -2
- package/dist/meter.d.ts.map +1 -1
- package/dist/meter.js +3 -3
- package/dist/meter.js.map +1 -1
- package/dist/navigation-menu-viewport-B1zGz9H_.d.ts +401 -0
- package/dist/navigation-menu-viewport-B1zGz9H_.d.ts.map +1 -0
- package/dist/navigation-menu-viewport-MCTpmOhX.js +284 -0
- package/dist/navigation-menu-viewport-MCTpmOhX.js.map +1 -0
- package/dist/navigation-menu.d.ts +73 -7
- package/dist/navigation-menu.d.ts.map +1 -1
- package/dist/navigation-menu.js +34 -8
- package/dist/navigation-menu.js.map +1 -1
- package/dist/number-field-scrub-area-cursor-DJPffFNk.d.ts +137 -0
- package/dist/number-field-scrub-area-cursor-DJPffFNk.d.ts.map +1 -0
- package/dist/number-field-scrub-area-cursor-h-iB-JHz.js +136 -0
- package/dist/number-field-scrub-area-cursor-h-iB-JHz.js.map +1 -0
- package/dist/number-field.d.ts +10 -2
- package/dist/number-field.d.ts.map +1 -1
- package/dist/number-field.js +16 -8
- package/dist/number-field.js.map +1 -1
- package/dist/{optional-portal-BAOgHNvi.js → optional-portal-BnKabTYx.js} +1 -1
- package/dist/optional-portal-BnKabTYx.js.map +1 -0
- package/dist/pagination-previous-B-zSBsti.d.ts +226 -0
- package/dist/pagination-previous-B-zSBsti.d.ts.map +1 -0
- package/dist/pagination-previous-g-wCDo--.js +194 -0
- package/dist/pagination-previous-g-wCDo--.js.map +1 -0
- package/dist/pagination.d.ts +18 -8
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +15 -7
- package/dist/pagination.js.map +1 -1
- package/dist/{pill-status-BS75xd9Z.d.ts → pill-status-B0H8oDjy.d.ts} +2 -2
- package/dist/{pill-status-BS75xd9Z.d.ts.map → pill-status-B0H8oDjy.d.ts.map} +1 -1
- package/dist/pill-status-CZugGAo0.js +75 -0
- package/dist/pill-status-CZugGAo0.js.map +1 -0
- package/dist/pill.d.ts +2 -2
- package/dist/pill.js +2 -2
- package/dist/pill.js.map +1 -1
- package/dist/popover-trigger-YoOfFIQY.js +131 -0
- package/dist/popover-trigger-YoOfFIQY.js.map +1 -0
- package/dist/popover-viewport-D0OLhge2.d.ts +130 -0
- package/dist/popover-viewport-D0OLhge2.d.ts.map +1 -0
- package/dist/popover.d.ts +41 -9
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.js +21 -6
- package/dist/popover.js.map +1 -1
- package/dist/portal.d.ts +2 -2
- package/dist/portal.d.ts.map +1 -1
- package/dist/portal.js.map +1 -1
- package/dist/preview-card-trigger-CbF-WF9d.js +75 -0
- package/dist/preview-card-trigger-CbF-WF9d.js.map +1 -0
- package/dist/preview-card-viewport-DyigXVot.d.ts +67 -0
- package/dist/preview-card-viewport-DyigXVot.d.ts.map +1 -0
- package/dist/preview-card.d.ts +52 -0
- package/dist/preview-card.d.ts.map +1 -0
- package/dist/preview-card.js +25 -0
- package/dist/preview-card.js.map +1 -0
- package/dist/{progress-value-gJOcGICf.js → progress-value-C2beGR4l.js} +6 -6
- package/dist/progress-value-C2beGR4l.js.map +1 -0
- package/dist/progress-value-DdW3JCEx.d.ts +33 -0
- package/dist/progress-value-DdW3JCEx.d.ts.map +1 -0
- package/dist/progress.d.ts +8 -7
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +3 -3
- package/dist/progress.js.map +1 -1
- package/dist/radio-group-item-By6KUGFQ.js +65 -0
- package/dist/radio-group-item-By6KUGFQ.js.map +1 -0
- package/dist/radio-group-item-DvfY629D.d.ts +81 -0
- package/dist/radio-group-item-DvfY629D.d.ts.map +1 -0
- package/dist/radio-group.d.ts +12 -5
- package/dist/radio-group.d.ts.map +1 -1
- package/dist/radio-group.js +5 -4
- package/dist/radio-group.js.map +1 -1
- package/dist/{rating-star-CxVJUZmc.d.ts → rating-star-Bg5AgFfI.d.ts} +7 -1
- package/dist/rating-star-Bg5AgFfI.d.ts.map +1 -0
- package/dist/{rating-star-BZCtD00E.js → rating-star-CT7E88Vb.js} +10 -6
- package/dist/rating-star-CT7E88Vb.js.map +1 -0
- package/dist/rating.d.ts +14 -2
- package/dist/rating.d.ts.map +1 -1
- package/dist/rating.js +7 -3
- package/dist/rating.js.map +1 -1
- package/dist/{resizable-panel-D4Brid-G.d.ts → resizable-panel-BSRzFmQT.d.ts} +8 -6
- package/dist/resizable-panel-BSRzFmQT.d.ts.map +1 -0
- package/dist/{resizable-panel-DbWIMjJZ.js → resizable-panel-Qs_va758.js} +1 -1
- package/dist/resizable-panel-Qs_va758.js.map +1 -0
- package/dist/resizable.d.ts +6 -8
- package/dist/resizable.d.ts.map +1 -1
- package/dist/resizable.js +1 -1
- package/dist/resizable.js.map +1 -1
- package/dist/scroll-area.d.ts +28 -4
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/scroll-area.js +20 -14
- package/dist/scroll-area.js.map +1 -1
- package/dist/scroll-bar-Ms5-vqAH.js +26 -0
- package/dist/scroll-bar-Ms5-vqAH.js.map +1 -0
- package/dist/scroll-viewport-02SiMbYg.d.ts +42 -0
- package/dist/scroll-viewport-02SiMbYg.d.ts.map +1 -0
- package/dist/scroll-viewport-Bv90eZWC.js +30 -0
- package/dist/scroll-viewport-Bv90eZWC.js.map +1 -0
- package/dist/select-value-DCLmCbND.d.ts +413 -0
- package/dist/select-value-DCLmCbND.d.ts.map +1 -0
- package/dist/select.d.ts +90 -16
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +30 -6
- package/dist/select.js.map +1 -1
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.js +2 -2
- package/dist/separator.js.map +1 -1
- package/dist/{sheet-trigger-CkQbW5Y7.js → sheet-trigger-CBnNmAyv.js} +35 -10
- package/dist/sheet-trigger-CBnNmAyv.js.map +1 -0
- package/dist/sheet-viewport-PgLs2Dbp.d.ts +99 -0
- package/dist/sheet-viewport-PgLs2Dbp.d.ts.map +1 -0
- package/dist/sheet.d.ts +26 -16
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +5 -2
- package/dist/sheet.js.map +1 -1
- package/dist/{sidebar-trigger-C_fOu1p2.js → sidebar-trigger-DpUDeyoo.js} +157 -61
- package/dist/sidebar-trigger-DpUDeyoo.js.map +1 -0
- package/dist/sidebar.d.ts +38 -144
- package/dist/sidebar.d.ts.map +1 -1
- package/dist/sidebar.js +2 -2
- package/dist/sidebar.js.map +1 -1
- package/dist/size-context-CPoCTRTV.d.ts +16 -0
- package/dist/size-context-CPoCTRTV.d.ts.map +1 -0
- package/dist/size-context-rJNE33WZ.js +25 -0
- package/dist/size-context-rJNE33WZ.js.map +1 -0
- package/dist/size-provider-D2Fy00Ky.js +128 -0
- package/dist/size-provider-D2Fy00Ky.js.map +1 -0
- package/dist/size-system-BNfPN2hb.js +47 -0
- package/dist/size-system-BNfPN2hb.js.map +1 -0
- package/dist/size-system-CMU68sQY.d.ts +6 -0
- package/dist/size-system-CMU68sQY.d.ts.map +1 -0
- package/dist/slider-CqapJ6Pa.js +544 -0
- package/dist/slider-CqapJ6Pa.js.map +1 -0
- package/dist/slider-types-BejlapyA.d.ts +192 -0
- package/dist/slider-types-BejlapyA.d.ts.map +1 -0
- package/dist/slider.d.ts +2 -16
- package/dist/slider.js +2 -47
- package/dist/spinner.d.ts +5 -1
- package/dist/spinner.d.ts.map +1 -1
- package/dist/spinner.js +13 -8
- package/dist/spinner.js.map +1 -1
- package/dist/switch-thumb-B1oq_Il-.d.ts +12 -0
- package/dist/switch-thumb-B1oq_Il-.d.ts.map +1 -0
- package/dist/switch-thumb-BcrfgKM7.js +14 -0
- package/dist/switch-thumb-BcrfgKM7.js.map +1 -0
- package/dist/switch.d.ts +45 -8
- package/dist/switch.d.ts.map +1 -1
- package/dist/switch.js +26 -11
- package/dist/switch.js.map +1 -1
- package/dist/table-row-oLfiQvkD.js +161 -0
- package/dist/table-row-oLfiQvkD.js.map +1 -0
- package/dist/table-size-context-CIwmKalf.d.ts +206 -0
- package/dist/table-size-context-CIwmKalf.d.ts.map +1 -0
- package/dist/table.d.ts +50 -10
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +39 -19
- package/dist/table.js.map +1 -1
- package/dist/tabs-trigger-CzOTnpSV.js +155 -0
- package/dist/tabs-trigger-CzOTnpSV.js.map +1 -0
- package/dist/tabs-trigger-DIAd8cRQ.d.ts +91 -0
- package/dist/tabs-trigger-DIAd8cRQ.d.ts.map +1 -0
- package/dist/tabs.d.ts +18 -23
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +5 -3
- package/dist/tabs.js.map +1 -1
- package/dist/textarea.d.ts +29 -6
- package/dist/textarea.d.ts.map +1 -1
- package/dist/textarea.js +27 -6
- package/dist/textarea.js.map +1 -1
- package/dist/theme-icon.d.ts +6 -3
- package/dist/theme-icon.d.ts.map +1 -1
- package/dist/theme-icon.js +7 -5
- package/dist/theme-icon.js.map +1 -1
- package/dist/{timeline-title-BvyeNanK.js → timeline-title-DPQkU32C.js} +1 -1
- package/dist/{timeline-title-BvyeNanK.js.map → timeline-title-DPQkU32C.js.map} +1 -1
- package/dist/timeline.d.ts +2 -2
- package/dist/timeline.js +1 -1
- package/dist/timeline.js.map +1 -1
- package/dist/toggle-group-item-BNfDa9G7.js +46 -0
- package/dist/toggle-group-item-BNfDa9G7.js.map +1 -0
- package/dist/toggle-group-item-GtR1C20m.d.ts +111 -0
- package/dist/toggle-group-item-GtR1C20m.d.ts.map +1 -0
- package/dist/toggle-group.d.ts +11 -11
- package/dist/toggle-group.d.ts.map +1 -1
- package/dist/toggle-group.js +25 -20
- package/dist/toggle-group.js.map +1 -1
- package/dist/toggle.d.ts +12 -6
- package/dist/toggle.d.ts.map +1 -1
- package/dist/toggle.js +19 -13
- package/dist/toggle.js.map +1 -1
- package/dist/toolbar-separator-B2h6uLOE.d.ts +169 -0
- package/dist/toolbar-separator-B2h6uLOE.d.ts.map +1 -0
- package/dist/toolbar-separator-DenKrCUv.js +124 -0
- package/dist/toolbar-separator-DenKrCUv.js.map +1 -0
- package/dist/toolbar.d.ts +43 -4
- package/dist/toolbar.d.ts.map +1 -1
- package/dist/toolbar.js +26 -6
- package/dist/toolbar.js.map +1 -1
- package/dist/tooltip-trigger-Bh-4uwB1.js +101 -0
- package/dist/tooltip-trigger-Bh-4uwB1.js.map +1 -0
- package/dist/tooltip-viewport-bfS0ERim.d.ts +103 -0
- package/dist/tooltip-viewport-bfS0ERim.d.ts.map +1 -0
- package/dist/tooltip.d.ts +31 -6
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.js +19 -6
- package/dist/tooltip.js.map +1 -1
- package/dist/{typography-ul-D1HgC8fT.js → typography-ul-CQPMwh0l.js} +2 -11
- package/dist/typography-ul-CQPMwh0l.js.map +1 -0
- package/dist/{typography-ul-Dy8wQB_p.d.ts → typography-ul-DdbLy4uP.d.ts} +118 -110
- package/dist/typography-ul-DdbLy4uP.d.ts.map +1 -0
- package/dist/typography.d.ts +19 -23
- package/dist/typography.d.ts.map +1 -1
- package/dist/typography.js +2 -3
- package/dist/typography.js.map +1 -1
- package/dist/use-accordion-default-props-C4qiSPdy.js +276 -0
- package/dist/use-accordion-default-props-C4qiSPdy.js.map +1 -0
- package/dist/use-badge-default-props-aiDsN2ec.js +8 -0
- package/dist/use-badge-default-props-aiDsN2ec.js.map +1 -0
- package/dist/use-card-default-props-D7h5DKMA.js +58 -0
- package/dist/use-card-default-props-D7h5DKMA.js.map +1 -0
- package/dist/use-carousel-BP1JcA8B.d.ts +60 -0
- package/dist/use-carousel-BP1JcA8B.d.ts.map +1 -0
- package/dist/use-combobox-anchor-CR11U_ns.js +524 -0
- package/dist/use-combobox-anchor-CR11U_ns.js.map +1 -0
- package/dist/use-combobox-anchor-_uR3C1ZZ.d.ts +541 -0
- package/dist/use-combobox-anchor-_uR3C1ZZ.d.ts.map +1 -0
- package/dist/use-input-default-props-DSeo88je.js +8 -0
- package/dist/use-input-default-props-DSeo88je.js.map +1 -0
- package/dist/use-select-default-props-xp2KqlMr.js +384 -0
- package/dist/use-select-default-props-xp2KqlMr.js.map +1 -0
- package/dist/use-sidebar-C9Nj2_Hm.d.ts +389 -0
- package/dist/use-sidebar-C9Nj2_Hm.d.ts.map +1 -0
- package/dist/use-textarea-default-props-DEDcVuHi.js +8 -0
- package/dist/use-textarea-default-props-DEDcVuHi.js.map +1 -0
- package/dist/{use-timeline-Dcj9DR0I.d.ts → use-timeline-C1sQqHU_.d.ts} +1 -1
- package/dist/{use-timeline-Dcj9DR0I.d.ts.map → use-timeline-C1sQqHU_.d.ts.map} +1 -1
- package/package.json +433 -56
- package/dist/accordion-trigger-B51W3Rdg.d.ts +0 -25
- package/dist/accordion-trigger-B51W3Rdg.d.ts.map +0 -1
- package/dist/accordion-trigger-DxGzqkOC.js +0 -72
- package/dist/accordion-trigger-DxGzqkOC.js.map +0 -1
- package/dist/alert-dialog-trigger-CIUFlkzO.js +0 -99
- package/dist/alert-dialog-trigger-CIUFlkzO.js.map +0 -1
- package/dist/alert-title-W1oau4D6.d.ts +0 -23
- package/dist/alert-title-W1oau4D6.d.ts.map +0 -1
- package/dist/alert-title-sXI11YPI.js.map +0 -1
- package/dist/autocomplete-value-DUN1Jprs.d.ts +0 -112
- package/dist/autocomplete-value-DUN1Jprs.d.ts.map +0 -1
- package/dist/autocomplete-value-DZnj2U0-.js +0 -142
- package/dist/autocomplete-value-DZnj2U0-.js.map +0 -1
- package/dist/avatar-image-BAVOtujm.js.map +0 -1
- package/dist/avatar-image-DPunh5Hd.d.ts +0 -36
- package/dist/avatar-image-DPunh5Hd.d.ts.map +0 -1
- package/dist/breadcrumb-separator-Bp5VXfQ8.js +0 -75
- package/dist/breadcrumb-separator-Bp5VXfQ8.js.map +0 -1
- package/dist/breadcrumb-separator-C6zfQJ5p.d.ts +0 -45
- package/dist/breadcrumb-separator-C6zfQJ5p.d.ts.map +0 -1
- package/dist/button-group-text-bzlQC1Fa.js +0 -26
- package/dist/button-group-text-bzlQC1Fa.js.map +0 -1
- package/dist/card-title-BBu0T37s.js +0 -53
- package/dist/card-title-BBu0T37s.js.map +0 -1
- package/dist/card-title-Dk0akcFR.d.ts +0 -41
- package/dist/card-title-Dk0akcFR.d.ts.map +0 -1
- package/dist/carousel-previous-BE0u96g1.js.map +0 -1
- package/dist/collapsible-trigger-COktdQ2E.js.map +0 -1
- package/dist/collapsible-trigger-DjL8pGgf.d.ts +0 -17
- package/dist/collapsible-trigger-DjL8pGgf.d.ts.map +0 -1
- package/dist/command-shortcut-Dpx3liOF.js +0 -98
- package/dist/command-shortcut-Dpx3liOF.js.map +0 -1
- package/dist/context-menu-trigger-C5Li6wJg.js +0 -148
- package/dist/context-menu-trigger-C5Li6wJg.js.map +0 -1
- package/dist/context-menu-trigger-DHPhlnvV.d.ts +0 -104
- package/dist/context-menu-trigger-DHPhlnvV.d.ts.map +0 -1
- package/dist/dialog-trigger-B5HeOikl.d.ts.map +0 -1
- package/dist/dialog-trigger-ptlomR_n.js.map +0 -1
- package/dist/drawer-viewport-DYTvcTF3.js +0 -122
- package/dist/drawer-viewport-DYTvcTF3.js.map +0 -1
- package/dist/drawer-viewport-DejmWgmc.d.ts +0 -109
- package/dist/drawer-viewport-DejmWgmc.d.ts.map +0 -1
- package/dist/dropdown-menu-trigger-Buq3CW_D.js +0 -153
- package/dist/dropdown-menu-trigger-Buq3CW_D.js.map +0 -1
- package/dist/dropdown-menu-trigger-DEdnOFwc.d.ts +0 -109
- package/dist/dropdown-menu-trigger-DEdnOFwc.d.ts.map +0 -1
- package/dist/emoji-picker-skin-tone-selector-amzh0Wk6.d.ts +0 -68
- package/dist/emoji-picker-skin-tone-selector-amzh0Wk6.d.ts.map +0 -1
- package/dist/emoji-picker-skin-tone-selector-ioOHy5cv.js +0 -118
- package/dist/emoji-picker-skin-tone-selector-ioOHy5cv.js.map +0 -1
- package/dist/empty-title-CGGk8sMF.js +0 -54
- package/dist/empty-title-CGGk8sMF.js.map +0 -1
- package/dist/empty-title-CcQlXOlP.d.ts +0 -54
- package/dist/empty-title-CcQlXOlP.d.ts.map +0 -1
- package/dist/form-field-title-KqTd5is7.js +0 -102
- package/dist/form-field-title-KqTd5is7.js.map +0 -1
- package/dist/hover-card-trigger-BJyHUOUc.js +0 -32
- package/dist/hover-card-trigger-BJyHUOUc.js.map +0 -1
- package/dist/hover-card-trigger-CRzFaoL4.d.ts +0 -21
- package/dist/hover-card-trigger-CRzFaoL4.d.ts.map +0 -1
- package/dist/hover-card.d.ts +0 -25
- package/dist/hover-card.d.ts.map +0 -1
- package/dist/hover-card.js +0 -17
- package/dist/hover-card.js.map +0 -1
- package/dist/input-group-textarea-ntvRL1EK.js +0 -80
- package/dist/input-group-textarea-ntvRL1EK.js.map +0 -1
- package/dist/input-otp-slot-B19cyjk_.d.ts +0 -25
- package/dist/input-otp-slot-B19cyjk_.d.ts.map +0 -1
- package/dist/input-otp-slot-BPkvsGjg.js +0 -46
- package/dist/input-otp-slot-BPkvsGjg.js.map +0 -1
- package/dist/item-title-BQFoYDpd.js.map +0 -1
- package/dist/kbd-group-BcPiHwLr.js +0 -13
- package/dist/kbd-group-BcPiHwLr.js.map +0 -1
- package/dist/kbd-group-PUw0yaIv.d.ts +0 -11
- package/dist/kbd-group-PUw0yaIv.d.ts.map +0 -1
- package/dist/menubar-trigger-BCZfHmqs.js +0 -147
- package/dist/menubar-trigger-BCZfHmqs.js.map +0 -1
- package/dist/menubar-trigger-Gx-lmpr9.d.ts +0 -105
- package/dist/menubar-trigger-Gx-lmpr9.d.ts.map +0 -1
- package/dist/meter-value-CJjAfKID.js.map +0 -1
- package/dist/meter-value-FRDEI8VE.d.ts.map +0 -1
- package/dist/navigation-menu-trigger-DG0JCv-9.js +0 -83
- package/dist/navigation-menu-trigger-DG0JCv-9.js.map +0 -1
- package/dist/navigation-menu-trigger-ryYftbUl.d.ts +0 -54
- package/dist/navigation-menu-trigger-ryYftbUl.d.ts.map +0 -1
- package/dist/number-field-scrub-area-cursor-6AFnR-wB.js +0 -69
- package/dist/number-field-scrub-area-cursor-6AFnR-wB.js.map +0 -1
- package/dist/number-field-scrub-area-cursor-BIS4ObSL.d.ts +0 -52
- package/dist/number-field-scrub-area-cursor-BIS4ObSL.d.ts.map +0 -1
- package/dist/optional-portal-BAOgHNvi.js.map +0 -1
- package/dist/pagination-previous-DPVkNRn0.js +0 -89
- package/dist/pagination-previous-DPVkNRn0.js.map +0 -1
- package/dist/pagination-previous-NpFopV3e.d.ts +0 -46
- package/dist/pagination-previous-NpFopV3e.d.ts.map +0 -1
- package/dist/pill-status-BIPaa4o3.js +0 -75
- package/dist/pill-status-BIPaa4o3.js.map +0 -1
- package/dist/popover-trigger-C8pR26Xp.d.ts +0 -40
- package/dist/popover-trigger-C8pR26Xp.d.ts.map +0 -1
- package/dist/popover-trigger-ChgU6NfZ.js +0 -53
- package/dist/popover-trigger-ChgU6NfZ.js.map +0 -1
- package/dist/progress-value-BGhNh_xb.d.ts +0 -29
- package/dist/progress-value-BGhNh_xb.d.ts.map +0 -1
- package/dist/progress-value-gJOcGICf.js.map +0 -1
- package/dist/radio-group-item-DCXseC2o.d.ts +0 -11
- package/dist/radio-group-item-DCXseC2o.d.ts.map +0 -1
- package/dist/radio-group-item-kWYh-tp8.js +0 -25
- package/dist/radio-group-item-kWYh-tp8.js.map +0 -1
- package/dist/rating-star-BZCtD00E.js.map +0 -1
- package/dist/rating-star-CxVJUZmc.d.ts.map +0 -1
- package/dist/resizable-panel-D4Brid-G.d.ts.map +0 -1
- package/dist/resizable-panel-DbWIMjJZ.js.map +0 -1
- package/dist/scroll-bar-KWm27Sfb.js +0 -20
- package/dist/scroll-bar-KWm27Sfb.js.map +0 -1
- package/dist/scroll-bar-L-sXig2v.d.ts +0 -12
- package/dist/scroll-bar-L-sXig2v.d.ts.map +0 -1
- package/dist/select-value-D8pFrPKG.d.ts +0 -71
- package/dist/select-value-D8pFrPKG.d.ts.map +0 -1
- package/dist/select-value-Dudr8w5H.js +0 -118
- package/dist/select-value-Dudr8w5H.js.map +0 -1
- package/dist/sheet-trigger-B_N_tXmj.d.ts +0 -65
- package/dist/sheet-trigger-B_N_tXmj.d.ts.map +0 -1
- package/dist/sheet-trigger-CkQbW5Y7.js.map +0 -1
- package/dist/sidebar-trigger-C_fOu1p2.js.map +0 -1
- package/dist/slider.d.ts.map +0 -1
- package/dist/slider.js.map +0 -1
- package/dist/table-row-BRPt8Kcx.js +0 -61
- package/dist/table-row-BRPt8Kcx.js.map +0 -1
- package/dist/table-row-BSEIkZEJ.d.ts +0 -47
- package/dist/table-row-BSEIkZEJ.d.ts.map +0 -1
- package/dist/tabs-trigger-ChutNdGI.d.ts +0 -48
- package/dist/tabs-trigger-ChutNdGI.d.ts.map +0 -1
- package/dist/tabs-trigger-eCZA0-cA.js +0 -58
- package/dist/tabs-trigger-eCZA0-cA.js.map +0 -1
- package/dist/toggle-group-item-CrPxpOF5.d.ts +0 -54
- package/dist/toggle-group-item-CrPxpOF5.d.ts.map +0 -1
- package/dist/toggle-group-item-D2z6INUa.js +0 -35
- package/dist/toggle-group-item-D2z6INUa.js.map +0 -1
- package/dist/toolbar-separator-D5v-xesm.js +0 -42
- package/dist/toolbar-separator-D5v-xesm.js.map +0 -1
- package/dist/toolbar-separator-DbkRIfIA.d.ts +0 -41
- package/dist/toolbar-separator-DbkRIfIA.d.ts.map +0 -1
- package/dist/tooltip-trigger-B43yfWhK.d.ts +0 -28
- package/dist/tooltip-trigger-B43yfWhK.d.ts.map +0 -1
- package/dist/tooltip-trigger-iOUSgHR_.js +0 -38
- package/dist/tooltip-trigger-iOUSgHR_.js.map +0 -1
- package/dist/typography-ul-D1HgC8fT.js.map +0 -1
- package/dist/typography-ul-Dy8wQB_p.d.ts.map +0 -1
- package/dist/use-combobox-anchor-DEMIerKX.js +0 -199
- package/dist/use-combobox-anchor-DEMIerKX.js.map +0 -1
- package/dist/use-combobox-anchor-DKwvfnFx.d.ts +0 -121
- package/dist/use-combobox-anchor-DKwvfnFx.d.ts.map +0 -1
- package/dist/use-sidebar-CYBPR0ue.d.ts +0 -639
- package/dist/use-sidebar-CYBPR0ue.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,120 +1,1495 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as mergeBaseUIClassName } from "./merge-base-ui-class-name-u6eS5MaQ.js";
|
|
2
|
+
import { a as useComponentSize, c as useKuzenboContext, d as useOptionalKuzenboContext, f as DEFAULT_UI_SIZE, i as useComponentDefaultProps, l as useKuzenboEnv, n as KuzenboProvider, o as useGlobalUISize, p as resolveSize, r as filterUndefinedProps, s as useKuzenboComponentDefaults, t as KUZENBO_PROVIDER_MISSING_ERROR, u as useKuzenboReducedMotion } from "./size-provider-D2Fy00Ky.js";
|
|
3
|
+
import { a as AccordionContent, i as AccordionHeader, n as AccordionTrigger, r as AccordionItem } from "./use-accordion-default-props-C4qiSPdy.js";
|
|
2
4
|
import { Accordion, accordionVariants } from "./accordion.js";
|
|
3
5
|
import { Portal } from "./portal.js";
|
|
4
6
|
import { Affix, affixVariants } from "./affix.js";
|
|
5
|
-
import { n as AlertDescription, r as AlertAction, t as AlertTitle } from "./alert-title-
|
|
7
|
+
import { n as AlertDescription, r as AlertAction, t as AlertTitle } from "./alert-title-B1q_D7US.js";
|
|
6
8
|
import { Alert, alertVariants } from "./alert.js";
|
|
9
|
+
import { o as UI_SIZE_ORDER } from "./size-system-BNfPN2hb.js";
|
|
7
10
|
import { Spinner } from "./spinner.js";
|
|
8
11
|
import { Button, buttonVariants } from "./button.js";
|
|
9
|
-
import { a as
|
|
12
|
+
import { a as AlertDialogHeader, c as AlertDialogContent, d as AlertDialogPopup, f as AlertDialogClose, h as AlertDialogAction, i as AlertDialogMedia, l as AlertDialogViewport, m as AlertDialogBackdrop, n as AlertDialogTitle, o as AlertDialogFooter, p as AlertDialogCancel, r as AlertDialogOverlay, s as AlertDialogDescription, t as AlertDialogTrigger, u as AlertDialogPortal } from "./alert-dialog-trigger-Bh4pSvCf.js";
|
|
10
13
|
import { AlertDialog } from "./alert-dialog.js";
|
|
11
14
|
import { Badge, badgeVariants } from "./badge.js";
|
|
12
|
-
import { n as AnnouncementTag, t as AnnouncementTitle } from "./announcement-title-
|
|
15
|
+
import { n as AnnouncementTag, t as AnnouncementTitle } from "./announcement-title-CZ-xxuBs.js";
|
|
13
16
|
import { Announcement } from "./announcement.js";
|
|
14
17
|
import { AspectRatio } from "./aspect-ratio.js";
|
|
15
|
-
import {
|
|
16
|
-
import { Autocomplete, useFilter } from "./autocomplete.js";
|
|
17
|
-
import { a as AvatarBadge, i as AvatarFallback, n as AvatarGroupCount, r as AvatarGroup, t as AvatarImage } from "./avatar-image-
|
|
18
|
+
import { a as AutocompleteRow, b as AutocompleteBackdrop, c as AutocompleteInput, d as AutocompleteGroup, f as AutocompleteEmpty, h as AutocompletePortal, i as AutocompleteSeparator, l as AutocompleteIcon, m as AutocompletePositioner, n as AutocompleteTrigger, o as AutocompleteList, p as AutocompleteContent, r as AutocompleteStatus, s as AutocompleteItem, t as AutocompleteValue, u as AutocompleteGroupLabel, v as AutocompleteCollection, x as AutocompleteArrow, y as AutocompleteClear } from "./autocomplete-value-CE4htlBI.js";
|
|
19
|
+
import { Autocomplete, useFilter as useFilter$1, useFilteredItems as useFilteredItems$1 } from "./autocomplete.js";
|
|
20
|
+
import { a as AvatarBadge, i as AvatarFallback, n as AvatarGroupCount, r as AvatarGroup, t as AvatarImage } from "./avatar-image-QGDvWzq_.js";
|
|
18
21
|
import { Avatar } from "./avatar.js";
|
|
19
|
-
import {
|
|
22
|
+
import { t as createSizeContext } from "./size-context-rJNE33WZ.js";
|
|
23
|
+
import { a as BreadcrumbItem, i as BreadcrumbLink, n as BreadcrumbPage, o as BreadcrumbEllipsis, r as BreadcrumbList, t as BreadcrumbSeparator } from "./breadcrumb-separator-BxPVg1Je.js";
|
|
20
24
|
import { Breadcrumb } from "./breadcrumb.js";
|
|
21
25
|
import { Separator } from "./separator.js";
|
|
22
|
-
import { n as ButtonGroupSeparator, t as ButtonGroupText } from "./button-group-text-
|
|
26
|
+
import { n as ButtonGroupSeparator, t as ButtonGroupText } from "./button-group-text-JA0xMSnb.js";
|
|
23
27
|
import { ButtonGroup, buttonGroupVariants } from "./button-group.js";
|
|
24
|
-
import { a as
|
|
28
|
+
import { a as CardDescription, i as CardFooter, n as CardTitle, o as CardContent, r as CardHeader, s as CardAction } from "./use-card-default-props-D7h5DKMA.js";
|
|
25
29
|
import { Card } from "./card.js";
|
|
26
|
-
import { i as CarouselContent, n as CarouselNext, o as useCarousel, r as CarouselItem, t as CarouselPrevious } from "./carousel-previous-
|
|
30
|
+
import { i as CarouselContent, n as CarouselNext, o as useCarousel, r as CarouselItem, t as CarouselPrevious } from "./carousel-previous-OcdvvI1k.js";
|
|
27
31
|
import { Carousel } from "./carousel.js";
|
|
32
|
+
import { t as CheckboxIndicator } from "./checkbox-indicator-DMjot9eq.js";
|
|
28
33
|
import { Checkbox } from "./checkbox.js";
|
|
29
34
|
import { CheckboxGroup } from "./checkbox-group.js";
|
|
30
|
-
import { n as CollapsibleContent, t as CollapsibleTrigger } from "./collapsible-trigger-
|
|
35
|
+
import { n as CollapsibleContent, t as CollapsibleTrigger } from "./collapsible-trigger-DCw3swj8.js";
|
|
31
36
|
import { Collapsible } from "./collapsible.js";
|
|
32
|
-
import {
|
|
33
|
-
import { a as InputGroupAddon, i as InputGroupButton, n as InputGroupText, r as InputGroupInput, t as InputGroupTextarea } from "./input-group-textarea-
|
|
37
|
+
import { C as ComboboxChips, D as ComboboxBackdrop, O as ComboboxArrow, S as ComboboxChipsInput, T as ComboboxChipRemove, _ as ComboboxPositioner, a as ComboboxRow, b as ComboboxCollection, c as ComboboxItem, d as ComboboxTrigger, f as ComboboxIcon, g as ComboboxContent, h as ComboboxEmpty, i as ComboboxSeparator, l as ComboboxItemIndicator, m as ComboboxGroup, n as ComboboxValue, o as ComboboxList, p as ComboboxGroupLabel, r as ComboboxStatus, s as ComboboxLabel, t as useComboboxAnchor, u as ComboboxInput, v as ComboboxPortal, w as ComboboxChip, x as ComboboxClear, y as ComboboxPopup } from "./use-combobox-anchor-CR11U_ns.js";
|
|
38
|
+
import { a as InputGroupAddon, i as InputGroupButton, n as InputGroupText, r as InputGroupInput, t as InputGroupTextarea } from "./input-group-textarea-C6ixncHC.js";
|
|
34
39
|
import { Input } from "./input.js";
|
|
35
40
|
import { Textarea } from "./textarea.js";
|
|
36
41
|
import { InputGroup } from "./input-group.js";
|
|
37
|
-
import { Combobox } from "./combobox.js";
|
|
42
|
+
import { Combobox, useFilter, useFilteredItems } from "./combobox.js";
|
|
43
|
+
import { Code } from "./code.js";
|
|
38
44
|
import { Container } from "./container.js";
|
|
39
|
-
import { a as
|
|
45
|
+
import { a as CommandInput, c as CommandDialog, i as CommandItem, n as CommandSeparator, o as CommandGroup, r as CommandList, s as CommandEmpty, t as CommandShortcut } from "./command-shortcut-fALFGGNB.js";
|
|
46
|
+
import { a as DialogFooter, c as DialogViewport, d as DialogClose, f as DialogBackdrop, i as DialogHeader, l as DialogPortal, n as DialogTitle, o as DialogDescription, r as DialogOverlay, s as DialogContent, t as DialogTrigger, u as DialogPopup } from "./dialog-trigger-Qa2UBwDK.js";
|
|
40
47
|
import { Dialog } from "./dialog.js";
|
|
41
|
-
import { a as CommandInput, c as CommandDialog, i as CommandItem, n as CommandSeparator, o as CommandGroup, r as CommandList, s as CommandEmpty, t as CommandShortcut } from "./command-shortcut-Dpx3liOF.js";
|
|
42
48
|
import { Command } from "./command.js";
|
|
43
|
-
import { a as ContextMenuShortcut, c as ContextMenuRadioGroup, d as ContextMenuItem, f as ContextMenuGroup, i as ContextMenuSub, l as
|
|
49
|
+
import { _ as ContextMenuCheckboxItem, a as ContextMenuShortcut, b as ContextMenuArrow, c as ContextMenuRadioGroup, d as ContextMenuItem, f as ContextMenuGroup, g as ContextMenuPopup, h as ContextMenuPortal, i as ContextMenuSub, l as ContextMenuLinkItem, m as ContextMenuPositioner, n as ContextMenuSubTrigger, o as ContextMenuSeparator, p as ContextMenuContent, r as ContextMenuSubContent, s as ContextMenuRadioItem, t as ContextMenuTrigger, u as ContextMenuLabel, y as ContextMenuBackdrop } from "./context-menu-trigger-Db8Hnkac.js";
|
|
44
50
|
import { ContextMenu } from "./context-menu.js";
|
|
45
|
-
import { a as DrawerPortal, c as DrawerIndent, d as DrawerDescription, f as DrawerContent, h as DrawerActions, i as DrawerProvider, l as DrawerHeader, m as DrawerBackdrop, n as DrawerTrigger, o as DrawerPopup, p as DrawerClose, r as DrawerTitle, s as DrawerIndentBackground, t as DrawerViewport, u as DrawerHandle } from "./drawer-viewport-
|
|
51
|
+
import { a as DrawerPortal, c as DrawerIndent, d as DrawerDescription, f as DrawerContent, h as DrawerActions, i as DrawerProvider, l as DrawerHeader, m as DrawerBackdrop, n as DrawerTrigger, o as DrawerPopup, p as DrawerClose, r as DrawerTitle, s as DrawerIndentBackground, t as DrawerViewport, u as DrawerHandle } from "./drawer-viewport-CXCkzSjL.js";
|
|
46
52
|
import { Drawer, DrawerRoot, createDrawerHandle } from "./drawer.js";
|
|
47
|
-
import { a as DropdownMenuShortcut, c as DropdownMenuRadioGroup, d as
|
|
53
|
+
import { S as DropdownMenuArrow, _ as DropdownMenuPortal, a as DropdownMenuShortcut, c as DropdownMenuRadioGroup, d as DropdownMenuLabel, f as DropdownMenuItem, g as DropdownMenuPositioner, h as DropdownMenuContent, i as DropdownMenuSub, l as DropdownMenuLinkItem, m as DropdownMenuGroup, n as DropdownMenuSubTrigger, o as DropdownMenuSeparator, r as DropdownMenuSubContent, s as DropdownMenuRadioItem, t as DropdownMenuTrigger, v as DropdownMenuPopup, x as DropdownMenuBackdrop, y as DropdownMenuCheckboxItem } from "./dropdown-menu-trigger-PvBaqoOj.js";
|
|
48
54
|
import { DropdownMenu } from "./dropdown-menu.js";
|
|
49
|
-
import { a as useDropzoneContext, i as DropzoneContext, n as DropzoneIdle, r as DropzoneReject, t as DropzoneAccept } from "./dropzone-status-
|
|
55
|
+
import { a as useDropzoneContext, i as DropzoneContext, n as DropzoneIdle, r as DropzoneReject, t as DropzoneAccept } from "./dropzone-status-BziqO77U.js";
|
|
50
56
|
import { Dropzone, dropzoneVariants } from "./dropzone.js";
|
|
51
|
-
import { a as EmojiPickerList, c as EmojiPickerActiveEmojiPreview, i as EmojiPickerLoading,
|
|
57
|
+
import { a as EmojiPickerList, c as EmojiPickerActiveEmojiPreview, i as EmojiPickerLoading, n as EmojiPickerSkinTone, o as EmojiPickerEmpty, r as EmojiPickerSearch, s as EmojiPickerContent, t as EmojiPickerSkinToneSelector, u as EmojiPickerActiveEmoji } from "./emoji-picker-skin-tone-selector-DAJcO_Ue.js";
|
|
52
58
|
import { EmojiPicker } from "./emoji-picker.js";
|
|
53
|
-
import { a as EmptyContent, i as EmptyDescription, n as EmptyMedia, r as EmptyHeader, t as EmptyTitle } from "./empty-title-
|
|
59
|
+
import { a as EmptyContent, i as EmptyDescription, n as EmptyMedia, o as EmptyButton, r as EmptyHeader, t as EmptyTitle } from "./empty-title-DjJj4k34.js";
|
|
54
60
|
import { Empty } from "./empty.js";
|
|
55
|
-
import { a as
|
|
56
|
-
import {
|
|
57
|
-
import { FormField, fieldVariants } from "./form-field.js";
|
|
58
|
-
import { n as HoverCardContent, t as HoverCardTrigger } from "./hover-card-trigger-BJyHUOUc.js";
|
|
59
|
-
import { HoverCard } from "./hover-card.js";
|
|
60
|
-
import { n as InputOTPSeparator, r as InputOTPGroup, t as InputOTPSlot } from "./input-otp-slot-BPkvsGjg.js";
|
|
61
|
+
import { a as FieldValidity, c as FieldItem, d as FieldControl, i as Field, l as FieldError, n as FieldsetRoot, o as FieldRoot, r as FieldsetLegend, s as FieldLabel, t as Fieldset, u as FieldDescription } from "./fieldset-fXftcr4b.js";
|
|
62
|
+
import { n as InputOTPSeparator, r as InputOTPGroup, t as InputOTPSlot } from "./input-otp-slot-BA8DE3oz.js";
|
|
61
63
|
import { InputOTP } from "./input-otp.js";
|
|
62
|
-
import { a as ItemGroup, c as ItemContent, i as ItemHeader, l as ItemActions, n as ItemSeparator, o as ItemFooter, r as ItemMedia, s as ItemDescription, t as ItemTitle } from "./item-title-
|
|
64
|
+
import { a as ItemGroup, c as ItemContent, i as ItemHeader, l as ItemActions, n as ItemSeparator, o as ItemFooter, r as ItemMedia, s as ItemDescription, t as ItemTitle } from "./item-title-DL4BlZUJ.js";
|
|
63
65
|
import { Item, itemVariants } from "./item.js";
|
|
64
|
-
import { t as KbdGroup } from "./kbd-group-
|
|
66
|
+
import { t as KbdGroup } from "./kbd-group-BmHYZhQr.js";
|
|
65
67
|
import { Kbd } from "./kbd.js";
|
|
66
|
-
import {
|
|
68
|
+
import { Label } from "./label.js";
|
|
69
|
+
import { n as MarqueeFade, r as MarqueeContent, t as MarqueeItem } from "./marquee-item-B0TLvHgC.js";
|
|
67
70
|
import { Marquee } from "./marquee.js";
|
|
68
|
-
import { a as MenubarShortcut, c as MenubarRadioGroup, d as MenubarLabel, f as MenubarItem, h as
|
|
71
|
+
import { _ as MenubarPopup, a as MenubarShortcut, b as MenubarBackdrop, c as MenubarRadioGroup, d as MenubarLabel, f as MenubarItem, g as MenubarPortal, h as MenubarPositioner, i as MenubarSub, l as MenubarMenu, m as MenubarContent, n as MenubarSubTrigger, o as MenubarSeparator, p as MenubarGroup, r as MenubarSubContent, s as MenubarRadioItem, t as MenubarTrigger, u as MenubarLinkItem, v as MenubarCheckboxItem, x as MenubarArrow } from "./menubar-trigger-BSEAK4Hv.js";
|
|
69
72
|
import { Menubar } from "./menubar.js";
|
|
70
|
-
import { i as MeterIndicator, n as MeterTrack, r as MeterLabel, t as MeterValue } from "./meter-value-
|
|
73
|
+
import { i as MeterIndicator, n as MeterTrack, r as MeterLabel, t as MeterValue } from "./meter-value-DTvav35V.js";
|
|
71
74
|
import { Meter } from "./meter.js";
|
|
72
|
-
import { a as
|
|
75
|
+
import { a as NavigationMenuPopup, c as NavigationMenuItem, i as NavigationMenuPortal, l as NavigationMenuIndicator, m as NavigationMenuArrow, n as NavigationMenuTrigger, o as NavigationMenuList, p as NavigationMenuBackdrop, r as NavigationMenuPositioner, s as NavigationMenuLink, t as NavigationMenuViewport, u as NavigationMenuContent } from "./navigation-menu-viewport-MCTpmOhX.js";
|
|
73
76
|
import { NavigationMenu } from "./navigation-menu.js";
|
|
74
|
-
import {
|
|
77
|
+
import { Skeleton } from "./skeleton.js";
|
|
78
|
+
import { a as NumberFieldGroup, i as NumberFieldIncrement, n as NumberFieldScrubArea, o as NumberFieldDecrement, r as NumberFieldInput, t as NumberFieldScrubAreaCursor } from "./number-field-scrub-area-cursor-h-iB-JHz.js";
|
|
75
79
|
import { NumberField } from "./number-field.js";
|
|
76
|
-
import { a as PaginationEllipsis, i as PaginationItem, n as PaginationNext, o as PaginationContent, r as PaginationLink, t as PaginationPrevious } from "./pagination-previous-
|
|
80
|
+
import { a as PaginationEllipsis, i as PaginationItem, n as PaginationNext, o as PaginationContent, r as PaginationLink, t as PaginationPrevious } from "./pagination-previous-g-wCDo--.js";
|
|
77
81
|
import { Pagination } from "./pagination.js";
|
|
78
|
-
import { a as PillButton, i as PillDelta, n as PillIndicator, o as PillAvatarGroup, r as PillIcon, s as PillAvatar, t as PillStatus } from "./pill-status-
|
|
82
|
+
import { a as PillButton, i as PillDelta, n as PillIndicator, o as PillAvatarGroup, r as PillIcon, s as PillAvatar, t as PillStatus } from "./pill-status-CZugGAo0.js";
|
|
79
83
|
import { Pill } from "./pill.js";
|
|
80
|
-
import { a as PopoverContent, i as PopoverDescription, n as PopoverTitle, r as PopoverHeader, t as PopoverTrigger } from "./popover-trigger-
|
|
84
|
+
import { a as PopoverContent, c as PopoverPortal, d as PopoverClose, f as PopoverBackdrop, i as PopoverDescription, l as PopoverPopup, n as PopoverTitle, o as PopoverViewport, p as PopoverArrow, r as PopoverHeader, s as PopoverPositioner, t as PopoverTrigger } from "./popover-trigger-YoOfFIQY.js";
|
|
81
85
|
import { Popover } from "./popover.js";
|
|
82
|
-
import { i as ProgressIndicator, n as ProgressTrack, r as ProgressLabel, t as ProgressValue } from "./progress-value-
|
|
86
|
+
import { i as ProgressIndicator, n as ProgressTrack, r as ProgressLabel, t as ProgressValue } from "./progress-value-C2beGR4l.js";
|
|
83
87
|
import { Progress } from "./progress.js";
|
|
84
88
|
import { QRCode } from "./qr-code.js";
|
|
85
|
-
import { t as RadioGroupItem } from "./radio-group-item-
|
|
89
|
+
import { n as RadioGroupIndicator, t as RadioGroupItem } from "./radio-group-item-By6KUGFQ.js";
|
|
86
90
|
import { RadioGroup } from "./radio-group.js";
|
|
87
|
-
import { t as RatingStar } from "./rating-star-
|
|
91
|
+
import { t as RatingStar } from "./rating-star-CT7E88Vb.js";
|
|
88
92
|
import { Rating, ratingValueVariants, ratingVariants } from "./rating.js";
|
|
89
|
-
import { n as ResizableHandle, t as ResizablePanel } from "./resizable-panel-
|
|
93
|
+
import { n as ResizableHandle, t as ResizablePanel } from "./resizable-panel-Qs_va758.js";
|
|
90
94
|
import { ResizablePanelGroup } from "./resizable.js";
|
|
91
|
-
import { t as ScrollBar } from "./scroll-bar-
|
|
95
|
+
import { n as ScrollAreaThumb, t as ScrollBar } from "./scroll-bar-Ms5-vqAH.js";
|
|
96
|
+
import { n as ScrollAreaCorner, r as ScrollAreaContent, t as ScrollAreaViewport } from "./scroll-viewport-Bv90eZWC.js";
|
|
92
97
|
import { ScrollArea } from "./scroll-area.js";
|
|
93
|
-
import { a as
|
|
94
|
-
import { Select } from "./select.js";
|
|
95
|
-
import { a as
|
|
98
|
+
import { _ as SelectList, a as SelectLabel, b as SelectArrow, c as SelectItemIndicator, d as SelectContent, f as SelectScrollUpButton, g as SelectPopup, h as SelectPortal, i as SelectSeparator, l as SelectIcon, m as SelectPositioner, n as SelectValue, o as SelectItem, p as SelectScrollDownButton, r as SelectTrigger, s as SelectItemText, u as SelectGroup, y as SelectBackdrop } from "./use-select-default-props-xp2KqlMr.js";
|
|
99
|
+
import { Select, SelectGroupLabel, SelectScrollDownArrow, SelectScrollUpArrow } from "./select.js";
|
|
100
|
+
import { a as SheetFooter, c as SheetViewport, d as SheetClose, f as SheetBackdrop, i as SheetHeader, l as SheetPortal, n as SheetTitle, o as SheetDescription, r as SheetOverlay, s as SheetContent, t as SheetTrigger, u as SheetPopup } from "./sheet-trigger-CBnNmAyv.js";
|
|
96
101
|
import { Sheet } from "./sheet.js";
|
|
97
|
-
import { C as SidebarContent, S as SidebarFooter, _ as SidebarHeader, a as SidebarMenuSubItem, b as SidebarGroupAction, c as SidebarMenuSkeleton, d as useSidebar, f as SidebarMenuBadge, g as SidebarInput, h as SidebarInset, i as SidebarProvider, l as SidebarMenuItem, m as SidebarMenu, n as SidebarSeparator, o as SidebarMenuSubButton, p as SidebarMenuAction, r as SidebarRail, s as SidebarMenuSub, t as SidebarTrigger, u as SidebarMenuButton, v as SidebarGroupLabel, x as SidebarGroup, y as SidebarGroupContent } from "./sidebar-trigger-
|
|
98
|
-
import { n as TooltipProvider, r as TooltipContent, t as TooltipTrigger } from "./tooltip-trigger-
|
|
102
|
+
import { C as SidebarContent, S as SidebarFooter, _ as SidebarHeader, a as SidebarMenuSubItem, b as SidebarGroupAction, c as SidebarMenuSkeleton, d as useSidebar, f as SidebarMenuBadge, g as SidebarInput, h as SidebarInset, i as SidebarProvider, l as SidebarMenuItem, m as SidebarMenu, n as SidebarSeparator, o as SidebarMenuSubButton, p as SidebarMenuAction, r as SidebarRail, s as SidebarMenuSub, t as SidebarTrigger, u as SidebarMenuButton, v as SidebarGroupLabel, x as SidebarGroup, y as SidebarGroupContent } from "./sidebar-trigger-DpUDeyoo.js";
|
|
103
|
+
import { a as TooltipPositioner, i as TooltipViewport, l as TooltipArrow, n as TooltipProvider, o as TooltipPortal, r as TooltipContent, s as TooltipPopup, t as TooltipTrigger } from "./tooltip-trigger-Bh-4uwB1.js";
|
|
99
104
|
import { Tooltip } from "./tooltip.js";
|
|
100
|
-
import { Skeleton } from "./skeleton.js";
|
|
101
105
|
import { Sidebar } from "./sidebar.js";
|
|
102
|
-
import { Slider } from "./slider.js";
|
|
106
|
+
import { S as toFloatingValue, _ as getNearestMarkValue, a as resolveSliderBounds, b as getSortedSelectableMarks, c as SliderThumbLabel, d as SliderMark, f as SliderIndicator, g as getLastMarkValue, h as getFirstMarkValue, i as resolveSliderLabel, l as SliderThumb, m as clampNumber, n as mergeSliderRootStyle, o as SliderValue, p as SliderControl, r as resolveSliderRootClassName, s as SliderTrack, t as Slider, u as SliderMarks, v as getNextMarkValue, x as isKeyboardLikeReason, y as getPreviousMarkValue } from "./slider-CqapJ6Pa.js";
|
|
103
107
|
import { Spacer } from "./spacer.js";
|
|
108
|
+
import { t as SwitchThumb } from "./switch-thumb-BcrfgKM7.js";
|
|
104
109
|
import { Switch } from "./switch.js";
|
|
105
|
-
import { a as TableCell, i as TableFooter, n as TableHeader, o as TableCaption, r as TableHead, s as TableBody, t as TableRow } from "./table-row-
|
|
110
|
+
import { a as TableCell, i as TableFooter, n as TableHeader, o as TableCaption, r as TableHead, s as TableBody, t as TableRow } from "./table-row-oLfiQvkD.js";
|
|
106
111
|
import { Table } from "./table.js";
|
|
107
|
-
import { i as TabsContent, n as TabsList, r as TabsIndicator, t as TabsTrigger } from "./tabs-trigger-
|
|
112
|
+
import { i as TabsContent, n as TabsList, r as TabsIndicator, t as TabsTrigger } from "./tabs-trigger-CzOTnpSV.js";
|
|
108
113
|
import { Tabs } from "./tabs.js";
|
|
109
114
|
import { ThemeIcon, themeIconVariants } from "./theme-icon.js";
|
|
110
|
-
import { a as TimelineDot, c as TimelineConnector, i as TimelineHeader, n as TimelineTime, o as TimelineDescription, r as TimelineItem, s as TimelineContent, t as TimelineTitle } from "./timeline-title-
|
|
115
|
+
import { a as TimelineDot, c as TimelineConnector, i as TimelineHeader, n as TimelineTime, o as TimelineDescription, r as TimelineItem, s as TimelineContent, t as TimelineTitle } from "./timeline-title-DPQkU32C.js";
|
|
111
116
|
import { Timeline, timelineVariants } from "./timeline.js";
|
|
112
117
|
import { Toggle, toggleVariants } from "./toggle.js";
|
|
113
|
-
import { n as ToggleGroupContext, t as ToggleGroupItem } from "./toggle-group-item-
|
|
118
|
+
import { n as ToggleGroupContext, t as ToggleGroupItem } from "./toggle-group-item-BNfDa9G7.js";
|
|
114
119
|
import { ToggleGroup } from "./toggle-group.js";
|
|
115
|
-
import { a as ToolbarButton, i as ToolbarGroup, n as ToolbarLink, r as ToolbarInput, t as ToolbarSeparator } from "./toolbar-separator-
|
|
120
|
+
import { a as ToolbarButton, i as ToolbarGroup, n as ToolbarLink, r as ToolbarInput, t as ToolbarSeparator } from "./toolbar-separator-DenKrCUv.js";
|
|
116
121
|
import { Toolbar } from "./toolbar.js";
|
|
117
|
-
import {
|
|
122
|
+
import { a as PreviewCardPortal, c as PreviewCardArrow, i as PreviewCardPositioner, n as PreviewCardContent, o as PreviewCardPopup, r as PreviewCardViewport, s as PreviewCardBackdrop, t as PreviewCardTrigger } from "./preview-card-trigger-CbF-WF9d.js";
|
|
123
|
+
import { PreviewCard, createPreviewCardHandle } from "./preview-card.js";
|
|
124
|
+
import { C as typographyHeadingVariants, S as TypographyText, T as TypographyBlockquote, _ as TypographyEyebrow, a as TypographyOverline, b as TypographyCaption, c as TypographyLink, d as TypographyH6, f as TypographyH5, g as TypographyH1, h as TypographyH2, i as TypographyP, l as TypographyLi, m as TypographyH3, n as TypographySubheading, o as TypographyOl, p as TypographyH4, r as TypographySmall, s as TypographyMuted, t as TypographyUl, u as TypographyLead, v as TypographyDisplay, w as typographyTextVariants, x as TypographyBody, y as TypographyHeading } from "./typography-ul-CQPMwh0l.js";
|
|
118
125
|
import { Typography } from "./typography.js";
|
|
126
|
+
import { cn, tv } from "tailwind-variants";
|
|
127
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
128
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
129
|
+
import { Alert01Icon, ArrowRight01Icon, Copy01Icon, Loading03Icon, Tick02Icon } from "@hugeicons/core-free-icons";
|
|
130
|
+
import { HugeiconsIcon } from "@hugeicons/react";
|
|
131
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
132
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
133
|
+
import { useClipboard } from "@kuzenbo/hooks";
|
|
134
|
+
import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
|
|
135
|
+
import { Form as Form$1 } from "@base-ui/react/form";
|
|
136
|
+
import { Slider as Slider$1 } from "@base-ui/react/slider";
|
|
137
|
+
|
|
138
|
+
//#region src/ui/copy-button/copy-button.tsx
|
|
139
|
+
const DEFAULT_TIMEOUT = 1200;
|
|
140
|
+
const STATUS_ORDER = [
|
|
141
|
+
"idle",
|
|
142
|
+
"copying",
|
|
143
|
+
"copied",
|
|
144
|
+
"failed"
|
|
145
|
+
];
|
|
146
|
+
const STATUS_LABELS = {
|
|
147
|
+
idle: "Copy",
|
|
148
|
+
copying: "Copying",
|
|
149
|
+
copied: "Copied",
|
|
150
|
+
failed: "Copy failed"
|
|
151
|
+
};
|
|
152
|
+
const STATUS_LIVE_MESSAGES = {
|
|
153
|
+
idle: "Ready to copy to clipboard",
|
|
154
|
+
copying: "Copying to clipboard",
|
|
155
|
+
copied: "Copied to clipboard",
|
|
156
|
+
failed: "Failed to copy to clipboard"
|
|
157
|
+
};
|
|
158
|
+
const STATUS_ICON_BY_STATUS = {
|
|
159
|
+
idle: Copy01Icon,
|
|
160
|
+
copying: Loading03Icon,
|
|
161
|
+
copied: Tick02Icon,
|
|
162
|
+
failed: Alert01Icon
|
|
163
|
+
};
|
|
164
|
+
const resolveContent = (content, status) => {
|
|
165
|
+
if (typeof content === "function") return content(status);
|
|
166
|
+
return content;
|
|
167
|
+
};
|
|
168
|
+
const CopyButton = ({ className, value, timeout = DEFAULT_TIMEOUT, useLegacyFallback = true, status, defaultStatus = "idle", onStatusChange, statusLabels, liveRegionMessages, children, disabled, onClick, type = "button", "aria-label": ariaLabel, ...props }) => {
|
|
169
|
+
const clipboard = useClipboard({
|
|
170
|
+
copiedDurationMs: timeout,
|
|
171
|
+
failedDurationMs: timeout,
|
|
172
|
+
useLegacyFallback
|
|
173
|
+
});
|
|
174
|
+
const [internalStatus, setInternalStatus] = useState(defaultStatus);
|
|
175
|
+
const isControlled = status !== void 0;
|
|
176
|
+
const currentStatus = status ?? internalStatus;
|
|
177
|
+
const currentStatusRef = useRef(currentStatus);
|
|
178
|
+
const hasMountedRef = useRef(false);
|
|
179
|
+
const mergedStatusLabels = useMemo(() => ({
|
|
180
|
+
...STATUS_LABELS,
|
|
181
|
+
...statusLabels
|
|
182
|
+
}), [statusLabels]);
|
|
183
|
+
const mergedLiveMessages = useMemo(() => ({
|
|
184
|
+
...STATUS_LIVE_MESSAGES,
|
|
185
|
+
...liveRegionMessages
|
|
186
|
+
}), [liveRegionMessages]);
|
|
187
|
+
const setStatus = useCallback((nextStatus) => {
|
|
188
|
+
if (currentStatusRef.current === nextStatus) return;
|
|
189
|
+
currentStatusRef.current = nextStatus;
|
|
190
|
+
if (!isControlled) setInternalStatus(nextStatus);
|
|
191
|
+
onStatusChange?.(nextStatus);
|
|
192
|
+
}, [isControlled, onStatusChange]);
|
|
193
|
+
const handleClick = useCallback((event) => {
|
|
194
|
+
onClick?.(event);
|
|
195
|
+
if (event.defaultPrevented || disabled) return;
|
|
196
|
+
clipboard.reset();
|
|
197
|
+
setStatus("copying");
|
|
198
|
+
clipboard.copy(value);
|
|
199
|
+
}, [
|
|
200
|
+
clipboard,
|
|
201
|
+
disabled,
|
|
202
|
+
onClick,
|
|
203
|
+
setStatus,
|
|
204
|
+
value
|
|
205
|
+
]);
|
|
206
|
+
useEffect(() => {
|
|
207
|
+
currentStatusRef.current = currentStatus;
|
|
208
|
+
}, [currentStatus]);
|
|
209
|
+
useEffect(() => {
|
|
210
|
+
if (!hasMountedRef.current) {
|
|
211
|
+
hasMountedRef.current = true;
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
setStatus(clipboard.status);
|
|
215
|
+
}, [clipboard.status, setStatus]);
|
|
216
|
+
const visibleLabel = resolveContent(children, currentStatus) ?? mergedStatusLabels[currentStatus];
|
|
217
|
+
const hookAnnouncement = clipboard.announcement.trim().length > 0 ? clipboard.announcement : void 0;
|
|
218
|
+
const liveRegionText = liveRegionMessages?.[currentStatus] ?? hookAnnouncement ?? mergedLiveMessages[currentStatus];
|
|
219
|
+
const resolvedAriaLabel = ariaLabel ?? (visibleLabel ? void 0 : mergedStatusLabels[currentStatus]);
|
|
220
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
|
|
221
|
+
"aria-label": resolvedAriaLabel,
|
|
222
|
+
className: cn("gap-2", className),
|
|
223
|
+
"data-slot": "copy-button",
|
|
224
|
+
"data-status": currentStatus,
|
|
225
|
+
disabled: disabled || currentStatus === "copying",
|
|
226
|
+
onClick: handleClick,
|
|
227
|
+
type,
|
|
228
|
+
...props,
|
|
229
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
230
|
+
className: "inline-flex items-center gap-2",
|
|
231
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
232
|
+
"aria-hidden": "true",
|
|
233
|
+
className: "relative inline-flex size-4 items-center justify-center",
|
|
234
|
+
children: STATUS_ORDER.map((iconStatus) => /* @__PURE__ */ jsx(HugeiconsIcon, {
|
|
235
|
+
className: cn("absolute inset-0 size-4 transition-opacity duration-150 ease-out motion-reduce:transition-none", iconStatus === currentStatus ? "opacity-100" : "opacity-0", iconStatus === "copying" && "data-[active=true]:animate-spin motion-reduce:data-[active=true]:animate-none", iconStatus === "copied" && "text-success", iconStatus === "failed" && "text-danger", iconStatus === "idle" && "text-muted-foreground"),
|
|
236
|
+
"data-active": iconStatus === currentStatus,
|
|
237
|
+
"data-status-icon": iconStatus,
|
|
238
|
+
icon: STATUS_ICON_BY_STATUS[iconStatus],
|
|
239
|
+
strokeWidth: 2
|
|
240
|
+
}, iconStatus))
|
|
241
|
+
}), visibleLabel ? /* @__PURE__ */ jsx("span", {
|
|
242
|
+
className: "transition-opacity duration-150 ease-out motion-reduce:transition-none",
|
|
243
|
+
children: visibleLabel
|
|
244
|
+
}) : null]
|
|
245
|
+
})
|
|
246
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
247
|
+
"aria-atomic": "true",
|
|
248
|
+
"aria-live": currentStatus === "failed" ? "assertive" : "polite",
|
|
249
|
+
className: "sr-only",
|
|
250
|
+
role: "status",
|
|
251
|
+
children: liveRegionText
|
|
252
|
+
})] });
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
//#endregion
|
|
256
|
+
//#region src/ui/form/form.tsx
|
|
257
|
+
const FormRoot = ({ className, ...props }) => /* @__PURE__ */ jsx(Form$1, {
|
|
258
|
+
className: mergeBaseUIClassName("flex w-full flex-col gap-6", className),
|
|
259
|
+
"data-slot": "form",
|
|
260
|
+
...props
|
|
261
|
+
});
|
|
262
|
+
const Form = Object.assign(FormRoot, { Root: FormRoot });
|
|
263
|
+
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region src/ui/navigation-list/navigation-list-context.tsx
|
|
266
|
+
const NavigationListContext = createContext({
|
|
267
|
+
size: "md",
|
|
268
|
+
tone: "surface",
|
|
269
|
+
variant: "light"
|
|
270
|
+
});
|
|
271
|
+
const resolveCandidate = (fallback, contextValue, candidates) => {
|
|
272
|
+
for (const candidate of candidates) if (candidate !== void 0 && candidate !== null) return candidate;
|
|
273
|
+
return contextValue ?? fallback;
|
|
274
|
+
};
|
|
275
|
+
const useResolvedNavigationListTone = (...candidates) => {
|
|
276
|
+
const { tone } = useContext(NavigationListContext);
|
|
277
|
+
return resolveCandidate("surface", tone, candidates);
|
|
278
|
+
};
|
|
279
|
+
const useResolvedNavigationListVariant = (...candidates) => {
|
|
280
|
+
const { variant } = useContext(NavigationListContext);
|
|
281
|
+
return resolveCandidate("light", variant, candidates);
|
|
282
|
+
};
|
|
283
|
+
const useResolvedNavigationListSize = (...candidates) => {
|
|
284
|
+
const { size } = useContext(NavigationListContext);
|
|
285
|
+
return resolveCandidate("md", size, candidates);
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
//#endregion
|
|
289
|
+
//#region src/ui/navigation-list/navigation-list-item-context.tsx
|
|
290
|
+
const NavigationListItemContext = createContext({
|
|
291
|
+
collapsible: false,
|
|
292
|
+
disabled: false,
|
|
293
|
+
open: false,
|
|
294
|
+
size: void 0,
|
|
295
|
+
tone: void 0,
|
|
296
|
+
variant: void 0
|
|
297
|
+
});
|
|
298
|
+
const useNavigationListItemContext = () => useContext(NavigationListItemContext);
|
|
299
|
+
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region src/ui/navigation-list/navigation-list-action.tsx
|
|
302
|
+
const navigationListActionVariants = tv({
|
|
303
|
+
base: "absolute right-1 flex aspect-square cursor-pointer items-center justify-center rounded-md p-0 outline-hidden transition-transform group-data-[collapsible=true]/navigation-list-item:right-10 group-has-data-[slot=navigation-list-badge]/navigation-list-item:right-14 [&>svg]:shrink-0",
|
|
304
|
+
variants: {
|
|
305
|
+
size: {
|
|
306
|
+
xs: "top-0.5 w-4 [&>svg:not([class*='size-'])]:size-3",
|
|
307
|
+
sm: "top-1 w-5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
308
|
+
md: "top-1.5 w-5 [&>svg:not([class*='size-'])]:size-4",
|
|
309
|
+
lg: "top-2 w-6 [&>svg:not([class*='size-'])]:size-4",
|
|
310
|
+
xl: "top-2.5 w-7 [&>svg:not([class*='size-'])]:size-5"
|
|
311
|
+
},
|
|
312
|
+
tone: {
|
|
313
|
+
surface: "text-muted-foreground ring-ring hover:bg-muted hover:text-foreground focus-visible:ring-2 peer-hover/navigation-list-link:text-foreground peer-data-active/navigation-list-link:text-foreground",
|
|
314
|
+
sidebar: "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/navigation-list-link:text-sidebar-accent-foreground peer-data-active/navigation-list-link:text-sidebar-accent-foreground"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
defaultVariants: {
|
|
318
|
+
size: "md",
|
|
319
|
+
tone: "surface"
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
const NavigationListAction = ({ className, render, showOnHover = false, size, tone, ...props }) => {
|
|
323
|
+
const itemContext = useNavigationListItemContext();
|
|
324
|
+
const resolvedSize = useResolvedNavigationListSize(size, itemContext.size);
|
|
325
|
+
const resolvedTone = useResolvedNavigationListTone(tone, itemContext.tone);
|
|
326
|
+
return useRender({
|
|
327
|
+
defaultTagName: "button",
|
|
328
|
+
props: mergeProps({
|
|
329
|
+
className: cn(navigationListActionVariants({
|
|
330
|
+
size: resolvedSize,
|
|
331
|
+
tone: resolvedTone
|
|
332
|
+
}), itemContext.variant === "filled" && resolvedTone === "surface" && "peer-data-active/navigation-list-link:text-primary-foreground", itemContext.variant === "filled" && resolvedTone === "sidebar" && "peer-data-active/navigation-list-link:text-sidebar-primary-foreground", "peer-data-[size=xs]/navigation-list-link:top-0.5 peer-data-[size=sm]/navigation-list-link:top-1 peer-data-[size=md]/navigation-list-link:top-1.5 peer-data-[size=lg]/navigation-list-link:top-2 peer-data-[size=xl]/navigation-list-link:top-2.5", showOnHover && "group-focus-within/navigation-list-item:opacity-100 group-hover/navigation-list-item:opacity-100 peer-data-active/navigation-list-link:opacity-100 md:opacity-0", className),
|
|
333
|
+
type: render ? void 0 : "button"
|
|
334
|
+
}, props),
|
|
335
|
+
render,
|
|
336
|
+
state: {
|
|
337
|
+
size: resolvedSize,
|
|
338
|
+
slot: "navigation-list-action",
|
|
339
|
+
tone: resolvedTone
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region src/ui/navigation-list/navigation-list-badge.tsx
|
|
346
|
+
const navigationListBadgeVariants = tv({
|
|
347
|
+
base: "pointer-events-none absolute right-1 flex items-center justify-center rounded-md px-1 font-medium tabular-nums select-none group-data-[collapsible=true]/navigation-list-item:right-8",
|
|
348
|
+
variants: {
|
|
349
|
+
size: {
|
|
350
|
+
xs: "top-0.5 h-4 min-w-4 text-[10px]",
|
|
351
|
+
sm: "top-1 h-5 min-w-5 text-[11px]",
|
|
352
|
+
md: "top-1.5 h-5 min-w-5 text-xs",
|
|
353
|
+
lg: "top-2 h-6 min-w-6 text-xs",
|
|
354
|
+
xl: "top-2.5 h-7 min-w-7 text-sm"
|
|
355
|
+
},
|
|
356
|
+
tone: {
|
|
357
|
+
surface: "text-muted-foreground peer-hover/navigation-list-link:text-foreground peer-data-active/navigation-list-link:text-foreground",
|
|
358
|
+
sidebar: "text-sidebar-foreground peer-hover/navigation-list-link:text-sidebar-accent-foreground peer-data-active/navigation-list-link:text-sidebar-accent-foreground"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
defaultVariants: {
|
|
362
|
+
size: "md",
|
|
363
|
+
tone: "surface"
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
const NavigationListBadge = ({ className, size, tone, ...props }) => {
|
|
367
|
+
const itemContext = useNavigationListItemContext();
|
|
368
|
+
const resolvedSize = useResolvedNavigationListSize(size, itemContext.size);
|
|
369
|
+
const resolvedTone = useResolvedNavigationListTone(tone, itemContext.tone);
|
|
370
|
+
return /* @__PURE__ */ jsx("div", {
|
|
371
|
+
className: cn(navigationListBadgeVariants({
|
|
372
|
+
size: resolvedSize,
|
|
373
|
+
tone: resolvedTone
|
|
374
|
+
}), itemContext.variant === "filled" && resolvedTone === "surface" && "peer-data-active/navigation-list-link:text-primary-foreground", itemContext.variant === "filled" && resolvedTone === "sidebar" && "peer-data-active/navigation-list-link:text-sidebar-primary-foreground", className),
|
|
375
|
+
"data-size": resolvedSize,
|
|
376
|
+
"data-slot": "navigation-list-badge",
|
|
377
|
+
"data-tone": resolvedTone,
|
|
378
|
+
...props
|
|
379
|
+
});
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region src/ui/navigation-list/navigation-list-content.tsx
|
|
384
|
+
const navigationListContentVariants = tv({
|
|
385
|
+
base: "flex min-w-0 list-none flex-col rounded-lg border",
|
|
386
|
+
variants: {
|
|
387
|
+
size: {
|
|
388
|
+
xs: "gap-0.5 p-1",
|
|
389
|
+
sm: "gap-1 p-1.5",
|
|
390
|
+
md: "gap-1 p-2",
|
|
391
|
+
lg: "gap-1.5 p-2.5",
|
|
392
|
+
xl: "gap-2 p-3"
|
|
393
|
+
},
|
|
394
|
+
tone: {
|
|
395
|
+
surface: "border-border bg-background text-foreground",
|
|
396
|
+
sidebar: "border-sidebar-border bg-sidebar text-sidebar-foreground"
|
|
397
|
+
},
|
|
398
|
+
variant: {
|
|
399
|
+
subtle: "",
|
|
400
|
+
light: "",
|
|
401
|
+
filled: ""
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
defaultVariants: {
|
|
405
|
+
size: "md",
|
|
406
|
+
tone: "surface",
|
|
407
|
+
variant: "light"
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
const NavigationListContent = ({ className, size, tone, variant, ...props }) => {
|
|
411
|
+
const resolvedSize = useResolvedNavigationListSize(size);
|
|
412
|
+
const resolvedTone = useResolvedNavigationListTone(tone);
|
|
413
|
+
const resolvedVariant = useResolvedNavigationListVariant(variant);
|
|
414
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
415
|
+
className: cn(navigationListContentVariants({
|
|
416
|
+
size: resolvedSize,
|
|
417
|
+
tone: resolvedTone,
|
|
418
|
+
variant: resolvedVariant
|
|
419
|
+
}), className),
|
|
420
|
+
"data-navigation-list": "content",
|
|
421
|
+
"data-size": resolvedSize,
|
|
422
|
+
"data-slot": "navigation-list-content",
|
|
423
|
+
"data-tone": resolvedTone,
|
|
424
|
+
"data-variant": resolvedVariant,
|
|
425
|
+
...props
|
|
426
|
+
});
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
//#endregion
|
|
430
|
+
//#region src/ui/navigation-list/navigation-list-group.tsx
|
|
431
|
+
const navigationListGroupVariants = tv({
|
|
432
|
+
base: "list-none space-y-1",
|
|
433
|
+
variants: {
|
|
434
|
+
size: {
|
|
435
|
+
xs: "",
|
|
436
|
+
sm: "",
|
|
437
|
+
md: "",
|
|
438
|
+
lg: "",
|
|
439
|
+
xl: ""
|
|
440
|
+
},
|
|
441
|
+
tone: {
|
|
442
|
+
surface: "",
|
|
443
|
+
sidebar: ""
|
|
444
|
+
},
|
|
445
|
+
variant: {
|
|
446
|
+
subtle: "",
|
|
447
|
+
light: "",
|
|
448
|
+
filled: ""
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
defaultVariants: {
|
|
452
|
+
size: "md",
|
|
453
|
+
tone: "surface",
|
|
454
|
+
variant: "light"
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
const NavigationListGroup = ({ className, size, tone, variant, ...props }) => {
|
|
458
|
+
const resolvedSize = useResolvedNavigationListSize(size);
|
|
459
|
+
const resolvedTone = useResolvedNavigationListTone(tone);
|
|
460
|
+
const resolvedVariant = useResolvedNavigationListVariant(variant);
|
|
461
|
+
return /* @__PURE__ */ jsx("li", {
|
|
462
|
+
className: cn(navigationListGroupVariants({
|
|
463
|
+
size: resolvedSize,
|
|
464
|
+
tone: resolvedTone,
|
|
465
|
+
variant: resolvedVariant
|
|
466
|
+
}), className),
|
|
467
|
+
"data-size": resolvedSize,
|
|
468
|
+
"data-slot": "navigation-list-group",
|
|
469
|
+
"data-tone": resolvedTone,
|
|
470
|
+
"data-variant": resolvedVariant,
|
|
471
|
+
...props
|
|
472
|
+
});
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
//#endregion
|
|
476
|
+
//#region src/ui/navigation-list/navigation-list-group-content.tsx
|
|
477
|
+
const navigationListGroupContentVariants = tv({
|
|
478
|
+
base: "flex list-none flex-col",
|
|
479
|
+
variants: {
|
|
480
|
+
size: {
|
|
481
|
+
xs: "gap-0.5",
|
|
482
|
+
sm: "gap-0.5",
|
|
483
|
+
md: "gap-1",
|
|
484
|
+
lg: "gap-1",
|
|
485
|
+
xl: "gap-1.5"
|
|
486
|
+
},
|
|
487
|
+
tone: {
|
|
488
|
+
surface: "",
|
|
489
|
+
sidebar: ""
|
|
490
|
+
},
|
|
491
|
+
variant: {
|
|
492
|
+
subtle: "",
|
|
493
|
+
light: "",
|
|
494
|
+
filled: ""
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
defaultVariants: {
|
|
498
|
+
size: "md",
|
|
499
|
+
tone: "surface",
|
|
500
|
+
variant: "light"
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
const NavigationListGroupContent = ({ className, size, tone, variant, ...props }) => {
|
|
504
|
+
const resolvedSize = useResolvedNavigationListSize(size);
|
|
505
|
+
const resolvedTone = useResolvedNavigationListTone(tone);
|
|
506
|
+
const resolvedVariant = useResolvedNavigationListVariant(variant);
|
|
507
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
508
|
+
className: cn(navigationListGroupContentVariants({
|
|
509
|
+
size: resolvedSize,
|
|
510
|
+
tone: resolvedTone,
|
|
511
|
+
variant: resolvedVariant
|
|
512
|
+
}), className),
|
|
513
|
+
"data-size": resolvedSize,
|
|
514
|
+
"data-slot": "navigation-list-group-content",
|
|
515
|
+
"data-tone": resolvedTone,
|
|
516
|
+
"data-variant": resolvedVariant,
|
|
517
|
+
...props
|
|
518
|
+
});
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
//#endregion
|
|
522
|
+
//#region src/ui/navigation-list/navigation-list-group-label.tsx
|
|
523
|
+
const navigationListGroupLabelVariants = tv({
|
|
524
|
+
base: "flex items-center rounded-md px-2 font-medium uppercase tracking-wide",
|
|
525
|
+
variants: {
|
|
526
|
+
size: {
|
|
527
|
+
xs: "h-6 text-[10px]",
|
|
528
|
+
sm: "h-7 text-[10px]",
|
|
529
|
+
md: "h-8 text-[11px]",
|
|
530
|
+
lg: "h-9 text-xs",
|
|
531
|
+
xl: "h-10 text-xs"
|
|
532
|
+
},
|
|
533
|
+
tone: {
|
|
534
|
+
surface: "text-muted-foreground",
|
|
535
|
+
sidebar: "text-sidebar-foreground/70"
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
defaultVariants: {
|
|
539
|
+
size: "md",
|
|
540
|
+
tone: "surface"
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
const NavigationListGroupLabel = ({ className, render, size, tone, ...props }) => {
|
|
544
|
+
const resolvedSize = useResolvedNavigationListSize(size);
|
|
545
|
+
const resolvedTone = useResolvedNavigationListTone(tone);
|
|
546
|
+
return useRender({
|
|
547
|
+
defaultTagName: "div",
|
|
548
|
+
props: mergeProps({ className: cn(navigationListGroupLabelVariants({
|
|
549
|
+
size: resolvedSize,
|
|
550
|
+
tone: resolvedTone
|
|
551
|
+
}), className) }, props),
|
|
552
|
+
render,
|
|
553
|
+
state: {
|
|
554
|
+
slot: "navigation-list-group-label",
|
|
555
|
+
size: resolvedSize,
|
|
556
|
+
tone: resolvedTone
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
//#endregion
|
|
562
|
+
//#region src/ui/navigation-list/navigation-list-item.tsx
|
|
563
|
+
const navigationListItemVariants = tv({
|
|
564
|
+
base: "group/navigation-list-item relative list-none",
|
|
565
|
+
variants: {
|
|
566
|
+
size: {
|
|
567
|
+
xs: "",
|
|
568
|
+
sm: "",
|
|
569
|
+
md: "",
|
|
570
|
+
lg: "",
|
|
571
|
+
xl: ""
|
|
572
|
+
},
|
|
573
|
+
tone: {
|
|
574
|
+
surface: "",
|
|
575
|
+
sidebar: ""
|
|
576
|
+
},
|
|
577
|
+
variant: {
|
|
578
|
+
subtle: "",
|
|
579
|
+
light: "",
|
|
580
|
+
filled: ""
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
defaultVariants: {
|
|
584
|
+
size: "md",
|
|
585
|
+
tone: "surface",
|
|
586
|
+
variant: "light"
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
const NavigationListItem = ({ className, collapsible = false, opened, defaultOpened = false, onOpenedChange, disabled = false, size, tone, variant, children, ...props }) => {
|
|
590
|
+
const [internalOpen, setInternalOpen] = useState(defaultOpened);
|
|
591
|
+
const isControlled = opened !== void 0;
|
|
592
|
+
const resolvedOpen = collapsible ? isControlled ? opened ?? false : internalOpen : false;
|
|
593
|
+
const handleOpenChange = useCallback((nextOpen) => {
|
|
594
|
+
if (!collapsible) return;
|
|
595
|
+
if (!isControlled) setInternalOpen(nextOpen);
|
|
596
|
+
onOpenedChange?.(nextOpen);
|
|
597
|
+
}, [
|
|
598
|
+
collapsible,
|
|
599
|
+
isControlled,
|
|
600
|
+
onOpenedChange
|
|
601
|
+
]);
|
|
602
|
+
const resolvedSize = useResolvedNavigationListSize(size);
|
|
603
|
+
const resolvedTone = useResolvedNavigationListTone(tone);
|
|
604
|
+
const resolvedVariant = useResolvedNavigationListVariant(variant);
|
|
605
|
+
const contextValue = useMemo(() => ({
|
|
606
|
+
collapsible,
|
|
607
|
+
disabled,
|
|
608
|
+
open: resolvedOpen,
|
|
609
|
+
size: resolvedSize,
|
|
610
|
+
tone: resolvedTone,
|
|
611
|
+
variant: resolvedVariant
|
|
612
|
+
}), [
|
|
613
|
+
collapsible,
|
|
614
|
+
disabled,
|
|
615
|
+
resolvedOpen,
|
|
616
|
+
resolvedSize,
|
|
617
|
+
resolvedTone,
|
|
618
|
+
resolvedVariant
|
|
619
|
+
]);
|
|
620
|
+
const itemProps = {
|
|
621
|
+
className: cn(navigationListItemVariants({
|
|
622
|
+
size: resolvedSize,
|
|
623
|
+
tone: resolvedTone,
|
|
624
|
+
variant: resolvedVariant
|
|
625
|
+
}), className),
|
|
626
|
+
"data-collapsible": collapsible ? "true" : "false",
|
|
627
|
+
"data-disabled": disabled ? "true" : void 0,
|
|
628
|
+
"data-open": resolvedOpen ? "true" : "false",
|
|
629
|
+
"data-size": resolvedSize,
|
|
630
|
+
"data-slot": "navigation-list-item",
|
|
631
|
+
"data-tone": resolvedTone,
|
|
632
|
+
"data-variant": resolvedVariant,
|
|
633
|
+
...props
|
|
634
|
+
};
|
|
635
|
+
return /* @__PURE__ */ jsx(NavigationListItemContext.Provider, {
|
|
636
|
+
value: contextValue,
|
|
637
|
+
children: /* @__PURE__ */ jsx("li", {
|
|
638
|
+
...itemProps,
|
|
639
|
+
children: collapsible ? /* @__PURE__ */ jsx(Collapsible$1.Root, {
|
|
640
|
+
disabled,
|
|
641
|
+
onOpenChange: handleOpenChange,
|
|
642
|
+
open: resolvedOpen,
|
|
643
|
+
children
|
|
644
|
+
}) : children
|
|
645
|
+
})
|
|
646
|
+
});
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
//#endregion
|
|
650
|
+
//#region src/ui/navigation-list/navigation-list-link.tsx
|
|
651
|
+
const navigationListLinkVariants = tv({
|
|
652
|
+
base: "peer/navigation-list-link flex w-full cursor-pointer gap-2 overflow-hidden rounded-md text-left ring-offset-background outline-hidden transition-colors group-has-data-[slot=navigation-list-action]/navigation-list-item:pr-20 group-has-data-[slot=navigation-list-badge]/navigation-list-item:pr-20 focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50",
|
|
653
|
+
variants: {
|
|
654
|
+
size: {
|
|
655
|
+
xs: "min-h-6 px-1.5 text-xs [&_svg:not([class*='size-'])]:size-3",
|
|
656
|
+
sm: "min-h-7 px-2 text-xs [&_svg:not([class*='size-'])]:size-3.5",
|
|
657
|
+
md: "min-h-8 px-2 text-sm [&_svg:not([class*='size-'])]:size-4",
|
|
658
|
+
lg: "min-h-9 px-2.5 text-sm [&_svg:not([class*='size-'])]:size-4",
|
|
659
|
+
xl: "min-h-10 px-3 text-base [&_svg:not([class*='size-'])]:size-5"
|
|
660
|
+
},
|
|
661
|
+
tone: {
|
|
662
|
+
surface: "ring-ring",
|
|
663
|
+
sidebar: "ring-sidebar-ring"
|
|
664
|
+
},
|
|
665
|
+
variant: {
|
|
666
|
+
subtle: "",
|
|
667
|
+
light: "",
|
|
668
|
+
filled: ""
|
|
669
|
+
},
|
|
670
|
+
noWrap: {
|
|
671
|
+
true: "",
|
|
672
|
+
false: ""
|
|
673
|
+
},
|
|
674
|
+
hasDescription: {
|
|
675
|
+
true: "items-start py-1.5",
|
|
676
|
+
false: "items-center"
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
defaultVariants: {
|
|
680
|
+
size: "md",
|
|
681
|
+
tone: "surface",
|
|
682
|
+
variant: "light",
|
|
683
|
+
noWrap: false,
|
|
684
|
+
hasDescription: false
|
|
685
|
+
},
|
|
686
|
+
compoundVariants: [
|
|
687
|
+
{
|
|
688
|
+
tone: "surface",
|
|
689
|
+
variant: "subtle",
|
|
690
|
+
className: "hover:bg-muted/70 hover:text-foreground data-active:bg-muted/50 data-active:text-foreground data-active:font-medium"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
tone: "surface",
|
|
694
|
+
variant: "light",
|
|
695
|
+
className: "hover:bg-muted hover:text-foreground data-active:bg-muted data-active:text-foreground data-active:font-medium"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
tone: "surface",
|
|
699
|
+
variant: "filled",
|
|
700
|
+
className: "hover:bg-muted hover:text-foreground data-active:bg-primary data-active:text-primary-foreground data-active:font-medium"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
tone: "sidebar",
|
|
704
|
+
variant: "subtle",
|
|
705
|
+
className: "hover:bg-sidebar-accent/70 hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent/60 data-active:text-sidebar-accent-foreground data-active:font-medium"
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
tone: "sidebar",
|
|
709
|
+
variant: "light",
|
|
710
|
+
className: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-active:font-medium"
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
tone: "sidebar",
|
|
714
|
+
variant: "filled",
|
|
715
|
+
className: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground data-active:bg-sidebar-primary data-active:text-sidebar-primary-foreground data-active:font-medium"
|
|
716
|
+
}
|
|
717
|
+
]
|
|
718
|
+
});
|
|
719
|
+
const navigationListLinkBodyVariants = tv({
|
|
720
|
+
base: "min-w-0 flex-1",
|
|
721
|
+
variants: { noWrap: {
|
|
722
|
+
true: "truncate",
|
|
723
|
+
false: ""
|
|
724
|
+
} },
|
|
725
|
+
defaultVariants: { noWrap: false }
|
|
726
|
+
});
|
|
727
|
+
const navigationListLinkLabelVariants = tv({
|
|
728
|
+
base: "block",
|
|
729
|
+
variants: { noWrap: {
|
|
730
|
+
true: "truncate",
|
|
731
|
+
false: ""
|
|
732
|
+
} },
|
|
733
|
+
defaultVariants: { noWrap: false }
|
|
734
|
+
});
|
|
735
|
+
const navigationListLinkDescriptionVariants = tv({
|
|
736
|
+
base: "mt-0.5 block text-xs",
|
|
737
|
+
variants: {
|
|
738
|
+
noWrap: {
|
|
739
|
+
true: "truncate",
|
|
740
|
+
false: ""
|
|
741
|
+
},
|
|
742
|
+
tone: {
|
|
743
|
+
surface: "text-muted-foreground",
|
|
744
|
+
sidebar: "text-sidebar-foreground/70"
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
defaultVariants: {
|
|
748
|
+
noWrap: false,
|
|
749
|
+
tone: "surface"
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
const navigationListDefaultChevron = /* @__PURE__ */ jsx(HugeiconsIcon, {
|
|
753
|
+
"aria-hidden": "true",
|
|
754
|
+
icon: ArrowRight01Icon,
|
|
755
|
+
strokeWidth: 2
|
|
756
|
+
});
|
|
757
|
+
const NavigationListLink = ({ className, render, href, active, label, description, leftSection, rightSection, noWrap = false, disableRightSectionRotation = false, size, tone, variant, disabled, onClick, onKeyDown, children, ...props }) => {
|
|
758
|
+
const itemContext = useNavigationListItemContext();
|
|
759
|
+
const resolvedSize = useResolvedNavigationListSize(size, itemContext.size);
|
|
760
|
+
const resolvedTone = useResolvedNavigationListTone(tone, itemContext.tone);
|
|
761
|
+
const resolvedVariant = useResolvedNavigationListVariant(variant, itemContext.variant);
|
|
762
|
+
const hasToggleBehavior = itemContext.collapsible;
|
|
763
|
+
const isLinkLike = !hasToggleBehavior && (href !== void 0 || render !== void 0);
|
|
764
|
+
const resolvedActive = Boolean(active || props["aria-current"] === "page");
|
|
765
|
+
const resolvedAriaCurrent = props["aria-current"] ?? (resolvedActive && isLinkLike ? "page" : void 0);
|
|
766
|
+
const resolvedDisabled = disabled ?? itemContext.disabled;
|
|
767
|
+
useEffect(() => {
|
|
768
|
+
if (process.env.NODE_ENV === "production" || !hasToggleBehavior) return;
|
|
769
|
+
if (href !== void 0) console.warn("[NavigationList.Link] `href` is ignored when used inside `NavigationList.Item collapsible`. Parent rows are disclosure buttons.");
|
|
770
|
+
if (render !== void 0) console.warn("[NavigationList.Link] `render` is ignored when used inside `NavigationList.Item collapsible`. Parent rows are disclosure buttons.");
|
|
771
|
+
}, [
|
|
772
|
+
hasToggleBehavior,
|
|
773
|
+
href,
|
|
774
|
+
render
|
|
775
|
+
]);
|
|
776
|
+
const usesDefaultChevron = rightSection === void 0 && hasToggleBehavior;
|
|
777
|
+
const renderedRightSection = usesDefaultChevron ? navigationListDefaultChevron : rightSection;
|
|
778
|
+
const hasRenderedRightSection = renderedRightSection !== null;
|
|
779
|
+
const handleClick = useCallback((event) => {
|
|
780
|
+
onClick?.(event);
|
|
781
|
+
if (event.defaultPrevented) return;
|
|
782
|
+
if (resolvedDisabled) event.preventDefault();
|
|
783
|
+
}, [onClick, resolvedDisabled]);
|
|
784
|
+
const composedContent = children ?? (label || description || leftSection || hasRenderedRightSection ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
785
|
+
leftSection ? /* @__PURE__ */ jsx("span", {
|
|
786
|
+
className: "shrink-0",
|
|
787
|
+
"data-slot": "navigation-list-link-left-section",
|
|
788
|
+
children: leftSection
|
|
789
|
+
}) : null,
|
|
790
|
+
/* @__PURE__ */ jsxs("span", {
|
|
791
|
+
className: navigationListLinkBodyVariants({ noWrap }),
|
|
792
|
+
children: [label ? /* @__PURE__ */ jsx("span", {
|
|
793
|
+
className: navigationListLinkLabelVariants({ noWrap }),
|
|
794
|
+
"data-slot": "navigation-list-link-label",
|
|
795
|
+
children: label
|
|
796
|
+
}) : null, description ? /* @__PURE__ */ jsx("span", {
|
|
797
|
+
className: navigationListLinkDescriptionVariants({
|
|
798
|
+
noWrap,
|
|
799
|
+
tone: resolvedTone
|
|
800
|
+
}),
|
|
801
|
+
"data-slot": "navigation-list-link-description",
|
|
802
|
+
children: description
|
|
803
|
+
}) : null]
|
|
804
|
+
}),
|
|
805
|
+
hasRenderedRightSection ? /* @__PURE__ */ jsx("span", {
|
|
806
|
+
"aria-hidden": usesDefaultChevron ? "true" : void 0,
|
|
807
|
+
className: cn("ml-auto flex shrink-0 items-center justify-center", hasToggleBehavior && !disableRightSectionRotation && "data-[open=true]:rotate-90"),
|
|
808
|
+
"data-open": itemContext.open ? "true" : "false",
|
|
809
|
+
"data-slot": "navigation-list-link-right-section",
|
|
810
|
+
children: renderedRightSection
|
|
811
|
+
}) : null
|
|
812
|
+
] }) : null);
|
|
813
|
+
const state = {
|
|
814
|
+
active: resolvedActive,
|
|
815
|
+
collapsible: hasToggleBehavior,
|
|
816
|
+
disabled: resolvedDisabled,
|
|
817
|
+
open: itemContext.open,
|
|
818
|
+
size: resolvedSize,
|
|
819
|
+
slot: "navigation-list-link",
|
|
820
|
+
tone: resolvedTone,
|
|
821
|
+
variant: resolvedVariant
|
|
822
|
+
};
|
|
823
|
+
const resolvedClassName = typeof className === "function" ? className(state) : className;
|
|
824
|
+
const mergedClassName = cn(navigationListLinkVariants({
|
|
825
|
+
hasDescription: Boolean(description),
|
|
826
|
+
noWrap,
|
|
827
|
+
size: resolvedSize,
|
|
828
|
+
tone: resolvedTone,
|
|
829
|
+
variant: resolvedVariant
|
|
830
|
+
}), resolvedClassName);
|
|
831
|
+
const resolvedRender = render ?? (href ? (renderProps) => {
|
|
832
|
+
const { children: renderChildren, ...anchorProps } = renderProps;
|
|
833
|
+
return /* @__PURE__ */ jsx("a", {
|
|
834
|
+
...anchorProps,
|
|
835
|
+
href,
|
|
836
|
+
children: renderChildren
|
|
837
|
+
});
|
|
838
|
+
} : void 0);
|
|
839
|
+
const renderedLinkElement = useRender({
|
|
840
|
+
defaultTagName: "button",
|
|
841
|
+
props: mergeProps({
|
|
842
|
+
className: mergedClassName,
|
|
843
|
+
"aria-current": resolvedAriaCurrent,
|
|
844
|
+
"aria-disabled": resolvedDisabled ? "true" : void 0,
|
|
845
|
+
disabled: isLinkLike ? void 0 : resolvedDisabled,
|
|
846
|
+
onClick: handleClick,
|
|
847
|
+
onKeyDown,
|
|
848
|
+
type: isLinkLike ? void 0 : "button",
|
|
849
|
+
children: composedContent
|
|
850
|
+
}, props),
|
|
851
|
+
render: resolvedRender,
|
|
852
|
+
state
|
|
853
|
+
});
|
|
854
|
+
if (hasToggleBehavior) return /* @__PURE__ */ jsx(Collapsible$1.Trigger, {
|
|
855
|
+
"aria-disabled": resolvedDisabled ? "true" : void 0,
|
|
856
|
+
className: mergedClassName,
|
|
857
|
+
"data-active": resolvedActive ? "true" : void 0,
|
|
858
|
+
"data-size": resolvedSize,
|
|
859
|
+
"data-slot": "navigation-list-link",
|
|
860
|
+
"data-tone": resolvedTone,
|
|
861
|
+
"data-variant": resolvedVariant,
|
|
862
|
+
disabled: resolvedDisabled,
|
|
863
|
+
onClick,
|
|
864
|
+
onKeyDown,
|
|
865
|
+
type: "button",
|
|
866
|
+
children: composedContent
|
|
867
|
+
});
|
|
868
|
+
return renderedLinkElement;
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
//#endregion
|
|
872
|
+
//#region src/ui/navigation-list/navigation-list-separator.tsx
|
|
873
|
+
const NavigationListSeparator = ({ className, tone, ...props }) => {
|
|
874
|
+
const resolvedTone = useResolvedNavigationListTone(tone);
|
|
875
|
+
return /* @__PURE__ */ jsx(Separator, {
|
|
876
|
+
className: cn(resolvedTone === "sidebar" ? "bg-sidebar-border" : "bg-border", className),
|
|
877
|
+
"data-slot": "navigation-list-separator",
|
|
878
|
+
"data-tone": resolvedTone,
|
|
879
|
+
...props
|
|
880
|
+
});
|
|
881
|
+
};
|
|
882
|
+
|
|
883
|
+
//#endregion
|
|
884
|
+
//#region src/ui/navigation-list/navigation-list-skeleton.tsx
|
|
885
|
+
const navigationListSkeletonVariants = tv({
|
|
886
|
+
base: "flex items-center gap-2 rounded-md px-2",
|
|
887
|
+
variants: {
|
|
888
|
+
size: {
|
|
889
|
+
xs: "h-6",
|
|
890
|
+
sm: "h-7",
|
|
891
|
+
md: "h-8",
|
|
892
|
+
lg: "h-9",
|
|
893
|
+
xl: "h-10"
|
|
894
|
+
},
|
|
895
|
+
tone: {
|
|
896
|
+
surface: "",
|
|
897
|
+
sidebar: ""
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
defaultVariants: {
|
|
901
|
+
size: "md",
|
|
902
|
+
tone: "surface"
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
const NavigationListSkeleton = ({ className, showIcon = false, size, tone, ...props }) => {
|
|
906
|
+
const itemContext = useNavigationListItemContext();
|
|
907
|
+
const resolvedSize = useResolvedNavigationListSize(size, itemContext.size);
|
|
908
|
+
const resolvedTone = useResolvedNavigationListTone(tone, itemContext.tone);
|
|
909
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
910
|
+
className: cn(navigationListSkeletonVariants({
|
|
911
|
+
size: resolvedSize,
|
|
912
|
+
tone: resolvedTone
|
|
913
|
+
}), className),
|
|
914
|
+
"data-size": resolvedSize,
|
|
915
|
+
"data-slot": "navigation-list-skeleton",
|
|
916
|
+
"data-tone": resolvedTone,
|
|
917
|
+
...props,
|
|
918
|
+
children: [showIcon ? /* @__PURE__ */ jsx(Skeleton, {
|
|
919
|
+
className: "size-4 rounded-md",
|
|
920
|
+
"data-slot": "navigation-list-skeleton-icon"
|
|
921
|
+
}) : null, /* @__PURE__ */ jsx(Skeleton, {
|
|
922
|
+
className: "h-4 max-w-(--navigation-list-skeleton-width) flex-1",
|
|
923
|
+
"data-slot": "navigation-list-skeleton-text",
|
|
924
|
+
style: { "--navigation-list-skeleton-width": "100%" }
|
|
925
|
+
})]
|
|
926
|
+
});
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
//#endregion
|
|
930
|
+
//#region src/ui/navigation-list/navigation-list-sub.tsx
|
|
931
|
+
const navigationListSubVariants = tv({
|
|
932
|
+
base: "mx-2 mt-1 flex min-w-0 list-none flex-col border-l overflow-hidden [&[hidden]:not([hidden='until-found'])]:hidden data-[open=false]:pointer-events-none data-[open=false]:mt-0 data-[open=false]:max-h-0 data-[open=false]:opacity-0 data-[open=false]:py-0 data-[open=false]:border-transparent data-[open=true]:max-h-[48rem] data-[open=true]:opacity-100",
|
|
933
|
+
variants: {
|
|
934
|
+
size: {
|
|
935
|
+
xs: "gap-0.5 px-1 py-0.5",
|
|
936
|
+
sm: "gap-0.5 px-1.5 py-0.5",
|
|
937
|
+
md: "gap-1 px-2 py-0.5",
|
|
938
|
+
lg: "gap-1 px-2.5 py-1",
|
|
939
|
+
xl: "gap-1.5 px-3 py-1"
|
|
940
|
+
},
|
|
941
|
+
tone: {
|
|
942
|
+
surface: "border-border",
|
|
943
|
+
sidebar: "border-sidebar-border"
|
|
944
|
+
},
|
|
945
|
+
variant: {
|
|
946
|
+
subtle: "",
|
|
947
|
+
light: "",
|
|
948
|
+
filled: ""
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
defaultVariants: {
|
|
952
|
+
size: "md",
|
|
953
|
+
tone: "surface",
|
|
954
|
+
variant: "light"
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
const NavigationListSub = ({ className, keepMounted = true, size, tone, variant, ...props }) => {
|
|
958
|
+
const itemContext = useNavigationListItemContext();
|
|
959
|
+
const resolvedSize = useResolvedNavigationListSize(size, itemContext.size);
|
|
960
|
+
const resolvedTone = useResolvedNavigationListTone(tone, itemContext.tone);
|
|
961
|
+
const resolvedVariant = useResolvedNavigationListVariant(variant, itemContext.variant);
|
|
962
|
+
const resolvedClassName = cn(navigationListSubVariants({
|
|
963
|
+
size: resolvedSize,
|
|
964
|
+
tone: resolvedTone,
|
|
965
|
+
variant: resolvedVariant
|
|
966
|
+
}), className);
|
|
967
|
+
if (!itemContext.collapsible) return /* @__PURE__ */ jsx("ul", {
|
|
968
|
+
className: resolvedClassName,
|
|
969
|
+
"data-open": "true",
|
|
970
|
+
"data-size": resolvedSize,
|
|
971
|
+
"data-slot": "navigation-list-sub",
|
|
972
|
+
"data-tone": resolvedTone,
|
|
973
|
+
"data-variant": resolvedVariant,
|
|
974
|
+
...props
|
|
975
|
+
});
|
|
976
|
+
return /* @__PURE__ */ jsx(Collapsible$1.Panel, {
|
|
977
|
+
keepMounted,
|
|
978
|
+
children: /* @__PURE__ */ jsx("ul", {
|
|
979
|
+
className: resolvedClassName,
|
|
980
|
+
"data-open": itemContext.open ? "true" : "false",
|
|
981
|
+
"data-size": resolvedSize,
|
|
982
|
+
"data-slot": "navigation-list-sub",
|
|
983
|
+
"data-tone": resolvedTone,
|
|
984
|
+
"data-variant": resolvedVariant,
|
|
985
|
+
hidden: keepMounted && !itemContext.open,
|
|
986
|
+
...props
|
|
987
|
+
})
|
|
988
|
+
});
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
//#endregion
|
|
992
|
+
//#region src/ui/navigation-list/navigation-list-sub-item.tsx
|
|
993
|
+
const NavigationListSubItem = ({ className, ...props }) => /* @__PURE__ */ jsx("li", {
|
|
994
|
+
className: cn("group/navigation-list-sub-item relative list-none", className),
|
|
995
|
+
"data-slot": "navigation-list-sub-item",
|
|
996
|
+
...props
|
|
997
|
+
});
|
|
998
|
+
|
|
999
|
+
//#endregion
|
|
1000
|
+
//#region src/ui/navigation-list/navigation-list-sub-link.tsx
|
|
1001
|
+
const navigationListSubLinkVariants = tv({
|
|
1002
|
+
base: "flex min-w-0 items-center gap-2 overflow-hidden rounded-md text-left outline-hidden transition-colors focus-visible:ring-2 [&>span:last-child]:truncate",
|
|
1003
|
+
variants: {
|
|
1004
|
+
size: {
|
|
1005
|
+
xs: "h-6 px-1.5 text-xs [&_svg:not([class*='size-'])]:size-3",
|
|
1006
|
+
sm: "h-7 px-2 text-xs [&_svg:not([class*='size-'])]:size-3.5",
|
|
1007
|
+
md: "h-8 px-2 text-sm [&_svg:not([class*='size-'])]:size-4",
|
|
1008
|
+
lg: "h-9 px-2.5 text-sm [&_svg:not([class*='size-'])]:size-4",
|
|
1009
|
+
xl: "h-10 px-3 text-base [&_svg:not([class*='size-'])]:size-5"
|
|
1010
|
+
},
|
|
1011
|
+
tone: {
|
|
1012
|
+
surface: "ring-ring",
|
|
1013
|
+
sidebar: "ring-sidebar-ring"
|
|
1014
|
+
},
|
|
1015
|
+
variant: {
|
|
1016
|
+
subtle: "",
|
|
1017
|
+
light: "",
|
|
1018
|
+
filled: ""
|
|
1019
|
+
},
|
|
1020
|
+
active: {
|
|
1021
|
+
true: "font-medium",
|
|
1022
|
+
false: ""
|
|
1023
|
+
}
|
|
1024
|
+
},
|
|
1025
|
+
defaultVariants: {
|
|
1026
|
+
size: "md",
|
|
1027
|
+
tone: "surface",
|
|
1028
|
+
variant: "light",
|
|
1029
|
+
active: false
|
|
1030
|
+
},
|
|
1031
|
+
compoundVariants: [
|
|
1032
|
+
{
|
|
1033
|
+
tone: "surface",
|
|
1034
|
+
variant: "subtle",
|
|
1035
|
+
className: "hover:bg-muted/70 hover:text-foreground data-active:bg-muted/50"
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
tone: "surface",
|
|
1039
|
+
variant: "light",
|
|
1040
|
+
className: "hover:bg-muted hover:text-foreground data-active:bg-muted"
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
tone: "surface",
|
|
1044
|
+
variant: "filled",
|
|
1045
|
+
className: "hover:bg-muted hover:text-foreground data-active:bg-primary data-active:text-primary-foreground"
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
tone: "sidebar",
|
|
1049
|
+
variant: "subtle",
|
|
1050
|
+
className: "hover:bg-sidebar-accent/70 hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent/60 data-active:text-sidebar-accent-foreground"
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
tone: "sidebar",
|
|
1054
|
+
variant: "light",
|
|
1055
|
+
className: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground"
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
tone: "sidebar",
|
|
1059
|
+
variant: "filled",
|
|
1060
|
+
className: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground data-active:bg-sidebar-primary data-active:text-sidebar-primary-foreground"
|
|
1061
|
+
}
|
|
1062
|
+
]
|
|
1063
|
+
});
|
|
1064
|
+
const NavigationListSubLink = ({ className, render, active, size, tone, variant, ...props }) => {
|
|
1065
|
+
const itemContext = useNavigationListItemContext();
|
|
1066
|
+
const resolvedSize = useResolvedNavigationListSize(size, itemContext.size);
|
|
1067
|
+
const resolvedTone = useResolvedNavigationListTone(tone, itemContext.tone);
|
|
1068
|
+
const resolvedVariant = useResolvedNavigationListVariant(variant, itemContext.variant);
|
|
1069
|
+
const resolvedActive = active ?? props["aria-current"] === "page";
|
|
1070
|
+
const resolvedAriaCurrent = props["aria-current"] ?? (resolvedActive ? "page" : void 0);
|
|
1071
|
+
return useRender({
|
|
1072
|
+
defaultTagName: "a",
|
|
1073
|
+
props: mergeProps({
|
|
1074
|
+
"aria-current": resolvedAriaCurrent,
|
|
1075
|
+
className: cn(navigationListSubLinkVariants({
|
|
1076
|
+
active: resolvedActive,
|
|
1077
|
+
size: resolvedSize,
|
|
1078
|
+
tone: resolvedTone,
|
|
1079
|
+
variant: resolvedVariant
|
|
1080
|
+
}), className)
|
|
1081
|
+
}, props),
|
|
1082
|
+
render,
|
|
1083
|
+
state: {
|
|
1084
|
+
active: resolvedActive,
|
|
1085
|
+
size: resolvedSize,
|
|
1086
|
+
slot: "navigation-list-sub-link",
|
|
1087
|
+
tone: resolvedTone,
|
|
1088
|
+
variant: resolvedVariant
|
|
1089
|
+
}
|
|
1090
|
+
});
|
|
1091
|
+
};
|
|
1092
|
+
|
|
1093
|
+
//#endregion
|
|
1094
|
+
//#region src/ui/navigation-list/navigation-list.tsx
|
|
1095
|
+
const navigationListVariants = tv({
|
|
1096
|
+
base: "flex min-w-0 flex-col",
|
|
1097
|
+
variants: {
|
|
1098
|
+
size: {
|
|
1099
|
+
xs: "gap-1",
|
|
1100
|
+
sm: "gap-1",
|
|
1101
|
+
md: "gap-1.5",
|
|
1102
|
+
lg: "gap-2",
|
|
1103
|
+
xl: "gap-2.5"
|
|
1104
|
+
},
|
|
1105
|
+
tone: {
|
|
1106
|
+
surface: "",
|
|
1107
|
+
sidebar: ""
|
|
1108
|
+
},
|
|
1109
|
+
variant: {
|
|
1110
|
+
subtle: "",
|
|
1111
|
+
light: "",
|
|
1112
|
+
filled: ""
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
defaultVariants: {
|
|
1116
|
+
size: "md",
|
|
1117
|
+
tone: "surface",
|
|
1118
|
+
variant: "light"
|
|
1119
|
+
}
|
|
1120
|
+
});
|
|
1121
|
+
const NavigationList = ({ className, size: providedSize, tone = "surface", variant = "light", children, ...props }) => {
|
|
1122
|
+
const size = useComponentSize(providedSize);
|
|
1123
|
+
const resolvedClassName = typeof className === "function" ? className({
|
|
1124
|
+
size,
|
|
1125
|
+
slot: "navigation-list",
|
|
1126
|
+
tone,
|
|
1127
|
+
variant
|
|
1128
|
+
}) : className;
|
|
1129
|
+
return /* @__PURE__ */ jsx(NavigationListContext.Provider, {
|
|
1130
|
+
value: {
|
|
1131
|
+
size,
|
|
1132
|
+
tone,
|
|
1133
|
+
variant
|
|
1134
|
+
},
|
|
1135
|
+
children: /* @__PURE__ */ jsx("nav", {
|
|
1136
|
+
className: cn(navigationListVariants({
|
|
1137
|
+
size,
|
|
1138
|
+
tone,
|
|
1139
|
+
variant
|
|
1140
|
+
}), resolvedClassName),
|
|
1141
|
+
"data-size": size,
|
|
1142
|
+
"data-slot": "navigation-list",
|
|
1143
|
+
"data-tone": tone,
|
|
1144
|
+
"data-variant": variant,
|
|
1145
|
+
...props,
|
|
1146
|
+
children
|
|
1147
|
+
})
|
|
1148
|
+
});
|
|
1149
|
+
};
|
|
1150
|
+
NavigationList.Action = NavigationListAction;
|
|
1151
|
+
NavigationList.Badge = NavigationListBadge;
|
|
1152
|
+
NavigationList.Content = NavigationListContent;
|
|
1153
|
+
NavigationList.Group = NavigationListGroup;
|
|
1154
|
+
NavigationList.GroupContent = NavigationListGroupContent;
|
|
1155
|
+
NavigationList.GroupLabel = NavigationListGroupLabel;
|
|
1156
|
+
NavigationList.Item = NavigationListItem;
|
|
1157
|
+
NavigationList.Link = NavigationListLink;
|
|
1158
|
+
NavigationList.Separator = NavigationListSeparator;
|
|
1159
|
+
NavigationList.Skeleton = NavigationListSkeleton;
|
|
1160
|
+
NavigationList.Sub = NavigationListSub;
|
|
1161
|
+
NavigationList.SubItem = NavigationListSubItem;
|
|
1162
|
+
NavigationList.SubLink = NavigationListSubLink;
|
|
1163
|
+
|
|
1164
|
+
//#endregion
|
|
1165
|
+
//#region src/ui/range-slider/range-slider-helpers.ts
|
|
1166
|
+
const MIN_STEP_TOLERANCE_MULTIPLIER = 10;
|
|
1167
|
+
const getMinStepsBetweenValues = ({ minRange, restrictToMarks, step }) => {
|
|
1168
|
+
if (restrictToMarks || step <= 0 || !Number.isFinite(minRange)) return;
|
|
1169
|
+
const steps = minRange / step;
|
|
1170
|
+
if (!Number.isFinite(steps) || steps < 0) return;
|
|
1171
|
+
const roundedSteps = Math.round(steps);
|
|
1172
|
+
return Math.abs(steps - roundedSteps) < Number.EPSILON * MIN_STEP_TOLERANCE_MULTIPLIER ? roundedSteps : void 0;
|
|
1173
|
+
};
|
|
1174
|
+
const getThumbChildrenByIndex = (thumbChildren, index) => {
|
|
1175
|
+
if (!Array.isArray(thumbChildren)) return thumbChildren;
|
|
1176
|
+
return thumbChildren[index];
|
|
1177
|
+
};
|
|
1178
|
+
|
|
1179
|
+
//#endregion
|
|
1180
|
+
//#region src/ui/range-slider/math/normalize-range-slider-value.ts
|
|
1181
|
+
const getResolvedActiveThumbIndex = (current, raw, activeThumbIndex) => {
|
|
1182
|
+
if (activeThumbIndex === 0 || activeThumbIndex === 1) return activeThumbIndex;
|
|
1183
|
+
const currentFrom = current[0] ?? 0;
|
|
1184
|
+
const currentTo = current[1] ?? 0;
|
|
1185
|
+
const rawFrom = raw[0] ?? currentFrom;
|
|
1186
|
+
const rawTo = raw[1] ?? currentTo;
|
|
1187
|
+
return Math.abs(rawFrom - currentFrom) >= Math.abs(rawTo - currentTo) ? 0 : 1;
|
|
1188
|
+
};
|
|
1189
|
+
const normalizeRangeSliderValue = ({ activeThumbIndex, current, domainMax, domainMin, marks, max, maxRange, min, minRange, precision, pushOnOverlap, raw, reason, restrictToMarks }) => {
|
|
1190
|
+
const currentFrom = clampNumber(current[0] ?? min, min, max);
|
|
1191
|
+
const currentTo = clampNumber(current[1] ?? max, min, max);
|
|
1192
|
+
const currentValues = [currentFrom, currentTo];
|
|
1193
|
+
const clampedRawFrom = clampNumber(raw[0] ?? currentFrom, domainMin, domainMax);
|
|
1194
|
+
const clampedRawTo = clampNumber(raw[1] ?? currentTo, domainMin, domainMax);
|
|
1195
|
+
const resolvedActiveIndex = getResolvedActiveThumbIndex([currentFrom, currentTo], [clampedRawFrom, clampedRawTo], activeThumbIndex);
|
|
1196
|
+
const clone = [clampNumber(clampedRawFrom, min, max), clampNumber(clampedRawTo, min, max)];
|
|
1197
|
+
if (restrictToMarks) {
|
|
1198
|
+
const selectableMarks = getSortedSelectableMarks(marks, min, max);
|
|
1199
|
+
if (selectableMarks.length) {
|
|
1200
|
+
const firstMarkValue = getFirstMarkValue(selectableMarks, min);
|
|
1201
|
+
const lastMarkValue = getLastMarkValue(selectableMarks, max);
|
|
1202
|
+
const index = resolvedActiveIndex;
|
|
1203
|
+
const otherIndex = index === 0 ? 1 : 0;
|
|
1204
|
+
const currentAtIndex = currentValues[index];
|
|
1205
|
+
const rawAtIndex = index === 0 ? clampedRawFrom : clampedRawTo;
|
|
1206
|
+
if (isKeyboardLikeReason(reason)) if (rawAtIndex <= min) clone[index] = firstMarkValue;
|
|
1207
|
+
else if (rawAtIndex >= max) clone[index] = lastMarkValue;
|
|
1208
|
+
else if (rawAtIndex > currentAtIndex) clone[index] = getNextMarkValue(currentAtIndex, selectableMarks);
|
|
1209
|
+
else if (rawAtIndex < currentAtIndex) clone[index] = getPreviousMarkValue(currentAtIndex, selectableMarks);
|
|
1210
|
+
else clone[index] = getNearestMarkValue(rawAtIndex, selectableMarks);
|
|
1211
|
+
else clone[index] = getNearestMarkValue(rawAtIndex, selectableMarks);
|
|
1212
|
+
if (clone[index] === lastMarkValue && clone[otherIndex] === lastMarkValue) clone[index] = currentAtIndex;
|
|
1213
|
+
else if (clone[index] === firstMarkValue && clone[otherIndex] === firstMarkValue) clone[index] = currentAtIndex;
|
|
1214
|
+
else if (clone[index] === clone[otherIndex]) if (currentAtIndex > clone[otherIndex]) clone[otherIndex] = getPreviousMarkValue(clone[index], selectableMarks);
|
|
1215
|
+
else clone[otherIndex] = getNextMarkValue(clone[index], selectableMarks);
|
|
1216
|
+
}
|
|
1217
|
+
} else {
|
|
1218
|
+
const safeMinRange = Number.isFinite(minRange) ? Math.max(minRange, 0) : 0;
|
|
1219
|
+
const safeMaxRange = Number.isFinite(maxRange) ? Math.max(maxRange, safeMinRange) : Number.POSITIVE_INFINITY;
|
|
1220
|
+
if (resolvedActiveIndex === 0) {
|
|
1221
|
+
const [clamped] = clone;
|
|
1222
|
+
if (clamped > clone[1] - (safeMinRange - 1e-9)) if (pushOnOverlap) clone[1] = Math.min(clamped + safeMinRange, max);
|
|
1223
|
+
else clone[0] = currentFrom;
|
|
1224
|
+
if (clamped > clone[1] - (safeMinRange - 1e-9)) if (pushOnOverlap) clone[0] = clone[1] - safeMinRange;
|
|
1225
|
+
else clone[0] = currentFrom;
|
|
1226
|
+
if (clone[1] - clamped > safeMaxRange) if (pushOnOverlap) clone[1] = clamped + safeMaxRange;
|
|
1227
|
+
else clone[0] = currentFrom;
|
|
1228
|
+
}
|
|
1229
|
+
if (resolvedActiveIndex === 1) {
|
|
1230
|
+
const [, clamped] = clone;
|
|
1231
|
+
if (clamped < clone[0] + safeMinRange) if (pushOnOverlap) clone[0] = Math.max(clamped - safeMinRange, min);
|
|
1232
|
+
else clone[1] = currentTo;
|
|
1233
|
+
if (clamped < clone[0] + safeMinRange) if (pushOnOverlap) clone[1] = clone[0] + safeMinRange;
|
|
1234
|
+
else clone[1] = currentTo;
|
|
1235
|
+
if (clamped - clone[0] > safeMaxRange) if (pushOnOverlap) clone[0] = clamped - safeMaxRange;
|
|
1236
|
+
else clone[1] = currentTo;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
const rounded = [toFloatingValue(clampNumber(clone[0], min, max), precision), toFloatingValue(clampNumber(clone[1], min, max), precision)];
|
|
1240
|
+
if (rounded[0] > rounded[1]) return [rounded[1], rounded[0]];
|
|
1241
|
+
return rounded;
|
|
1242
|
+
};
|
|
1243
|
+
|
|
1244
|
+
//#endregion
|
|
1245
|
+
//#region src/ui/range-slider/use-range-slider-state.ts
|
|
1246
|
+
const useRangeSliderState = ({ defaultValue, domainMax, domainMin, marks, max, maxRange, min, minRange, onChange, onChangeEnd, precision, pushOnOverlap, restrictToMarks, value }) => {
|
|
1247
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(useMemo(() => normalizeRangeSliderValue({
|
|
1248
|
+
current: [min, max],
|
|
1249
|
+
domainMax,
|
|
1250
|
+
domainMin,
|
|
1251
|
+
marks,
|
|
1252
|
+
max,
|
|
1253
|
+
maxRange,
|
|
1254
|
+
min,
|
|
1255
|
+
minRange,
|
|
1256
|
+
precision,
|
|
1257
|
+
pushOnOverlap,
|
|
1258
|
+
raw: defaultValue ?? [min, max],
|
|
1259
|
+
restrictToMarks
|
|
1260
|
+
}), [
|
|
1261
|
+
defaultValue,
|
|
1262
|
+
domainMax,
|
|
1263
|
+
domainMin,
|
|
1264
|
+
marks,
|
|
1265
|
+
max,
|
|
1266
|
+
maxRange,
|
|
1267
|
+
min,
|
|
1268
|
+
minRange,
|
|
1269
|
+
precision,
|
|
1270
|
+
pushOnOverlap,
|
|
1271
|
+
restrictToMarks
|
|
1272
|
+
]));
|
|
1273
|
+
const rangeValue = useMemo(() => {
|
|
1274
|
+
if (value === void 0) return;
|
|
1275
|
+
return normalizeRangeSliderValue({
|
|
1276
|
+
current: uncontrolledValue,
|
|
1277
|
+
domainMax,
|
|
1278
|
+
domainMin,
|
|
1279
|
+
marks,
|
|
1280
|
+
max,
|
|
1281
|
+
maxRange,
|
|
1282
|
+
min,
|
|
1283
|
+
minRange,
|
|
1284
|
+
precision,
|
|
1285
|
+
pushOnOverlap,
|
|
1286
|
+
raw: value,
|
|
1287
|
+
restrictToMarks
|
|
1288
|
+
});
|
|
1289
|
+
}, [
|
|
1290
|
+
domainMax,
|
|
1291
|
+
domainMin,
|
|
1292
|
+
marks,
|
|
1293
|
+
max,
|
|
1294
|
+
maxRange,
|
|
1295
|
+
min,
|
|
1296
|
+
minRange,
|
|
1297
|
+
precision,
|
|
1298
|
+
pushOnOverlap,
|
|
1299
|
+
restrictToMarks,
|
|
1300
|
+
uncontrolledValue,
|
|
1301
|
+
value
|
|
1302
|
+
]) ?? uncontrolledValue;
|
|
1303
|
+
const valueRef = useRef(rangeValue);
|
|
1304
|
+
useEffect(() => {
|
|
1305
|
+
valueRef.current = rangeValue;
|
|
1306
|
+
}, [rangeValue]);
|
|
1307
|
+
useEffect(() => {
|
|
1308
|
+
if (value !== void 0) return;
|
|
1309
|
+
setUncontrolledValue((previous) => normalizeRangeSliderValue({
|
|
1310
|
+
current: previous,
|
|
1311
|
+
domainMax,
|
|
1312
|
+
domainMin,
|
|
1313
|
+
marks,
|
|
1314
|
+
max,
|
|
1315
|
+
maxRange,
|
|
1316
|
+
min,
|
|
1317
|
+
minRange,
|
|
1318
|
+
precision,
|
|
1319
|
+
pushOnOverlap,
|
|
1320
|
+
raw: previous,
|
|
1321
|
+
restrictToMarks
|
|
1322
|
+
}));
|
|
1323
|
+
}, [
|
|
1324
|
+
domainMax,
|
|
1325
|
+
domainMin,
|
|
1326
|
+
marks,
|
|
1327
|
+
max,
|
|
1328
|
+
maxRange,
|
|
1329
|
+
min,
|
|
1330
|
+
minRange,
|
|
1331
|
+
precision,
|
|
1332
|
+
pushOnOverlap,
|
|
1333
|
+
restrictToMarks,
|
|
1334
|
+
value
|
|
1335
|
+
]);
|
|
1336
|
+
return {
|
|
1337
|
+
handleValueChange: useCallback((nextValue, eventDetails) => {
|
|
1338
|
+
const rawValues = Array.isArray(nextValue) ? [nextValue[0] ?? valueRef.current[0], nextValue[1] ?? valueRef.current[1]] : [nextValue, valueRef.current[1]];
|
|
1339
|
+
const normalizedValue = normalizeRangeSliderValue({
|
|
1340
|
+
activeThumbIndex: eventDetails.activeThumbIndex,
|
|
1341
|
+
current: valueRef.current,
|
|
1342
|
+
domainMax,
|
|
1343
|
+
domainMin,
|
|
1344
|
+
marks,
|
|
1345
|
+
max,
|
|
1346
|
+
maxRange,
|
|
1347
|
+
min,
|
|
1348
|
+
minRange,
|
|
1349
|
+
precision,
|
|
1350
|
+
pushOnOverlap,
|
|
1351
|
+
raw: rawValues,
|
|
1352
|
+
reason: eventDetails.reason,
|
|
1353
|
+
restrictToMarks
|
|
1354
|
+
});
|
|
1355
|
+
valueRef.current = normalizedValue;
|
|
1356
|
+
if (value === void 0) setUncontrolledValue(normalizedValue);
|
|
1357
|
+
onChange?.(normalizedValue);
|
|
1358
|
+
}, [
|
|
1359
|
+
domainMax,
|
|
1360
|
+
domainMin,
|
|
1361
|
+
marks,
|
|
1362
|
+
max,
|
|
1363
|
+
maxRange,
|
|
1364
|
+
min,
|
|
1365
|
+
minRange,
|
|
1366
|
+
onChange,
|
|
1367
|
+
precision,
|
|
1368
|
+
pushOnOverlap,
|
|
1369
|
+
restrictToMarks,
|
|
1370
|
+
value
|
|
1371
|
+
]),
|
|
1372
|
+
handleValueCommitted: useCallback(() => {
|
|
1373
|
+
onChangeEnd?.(valueRef.current);
|
|
1374
|
+
}, [onChangeEnd]),
|
|
1375
|
+
rangeValue
|
|
1376
|
+
};
|
|
1377
|
+
};
|
|
1378
|
+
|
|
1379
|
+
//#endregion
|
|
1380
|
+
//#region src/ui/range-slider/range-slider.tsx
|
|
1381
|
+
const RangeSlider = (({ className, children, color, defaultValue, domain, hiddenInputProps, inverted = false, label = (value) => value, labelAlwaysOn = false, labelTransitionProps, marks, max = 100, maxRange = Number.POSITIVE_INFINITY, min = 0, minRange = 10, name, onChange, onChangeEnd, precision: precisionProp, pushOnOverlap = true, radius, restrictToMarks = false, scale = (value) => value, size, showLabelOnHover = true, step = 1, style, thumbChildren, thumbFromLabel, thumbLabelOffset, thumbLabelOffsetVertical, thumbProps, thumbSize, thumbToLabel, trackSize, markSize, value, ...props }) => {
|
|
1382
|
+
const { domainMax, domainMin, max: normalizedMax, min: normalizedMin, precision } = resolveSliderBounds({
|
|
1383
|
+
domain,
|
|
1384
|
+
max,
|
|
1385
|
+
min,
|
|
1386
|
+
precision: precisionProp,
|
|
1387
|
+
step
|
|
1388
|
+
});
|
|
1389
|
+
const { handleValueChange, handleValueCommitted, rangeValue } = useRangeSliderState({
|
|
1390
|
+
defaultValue,
|
|
1391
|
+
domainMax,
|
|
1392
|
+
domainMin,
|
|
1393
|
+
marks,
|
|
1394
|
+
max: normalizedMax,
|
|
1395
|
+
maxRange,
|
|
1396
|
+
min: normalizedMin,
|
|
1397
|
+
minRange,
|
|
1398
|
+
onChange,
|
|
1399
|
+
onChangeEnd,
|
|
1400
|
+
precision,
|
|
1401
|
+
pushOnOverlap,
|
|
1402
|
+
restrictToMarks,
|
|
1403
|
+
value
|
|
1404
|
+
});
|
|
1405
|
+
const firstThumbProps = thumbProps?.(0) ?? {};
|
|
1406
|
+
const secondThumbProps = thumbProps?.(1) ?? {};
|
|
1407
|
+
const minStepsBetweenValues = getMinStepsBetweenValues({
|
|
1408
|
+
minRange,
|
|
1409
|
+
restrictToMarks,
|
|
1410
|
+
step
|
|
1411
|
+
});
|
|
1412
|
+
const displayedFromValue = toFloatingValue(scale(rangeValue[0]), precision);
|
|
1413
|
+
const displayedToValue = toFloatingValue(scale(rangeValue[1]), precision);
|
|
1414
|
+
return /* @__PURE__ */ jsxs(Slider$1.Root, {
|
|
1415
|
+
...props,
|
|
1416
|
+
className: resolveSliderRootClassName(className, inverted),
|
|
1417
|
+
"data-slot": "slider",
|
|
1418
|
+
max: domainMax,
|
|
1419
|
+
min: domainMin,
|
|
1420
|
+
minStepsBetweenValues,
|
|
1421
|
+
onValueChange: handleValueChange,
|
|
1422
|
+
onValueCommitted: handleValueCommitted,
|
|
1423
|
+
step,
|
|
1424
|
+
style: mergeSliderRootStyle({
|
|
1425
|
+
color,
|
|
1426
|
+
markSize,
|
|
1427
|
+
radius,
|
|
1428
|
+
size,
|
|
1429
|
+
thumbLabelOffset,
|
|
1430
|
+
thumbLabelOffsetVertical,
|
|
1431
|
+
thumbSize,
|
|
1432
|
+
trackSize
|
|
1433
|
+
}, style),
|
|
1434
|
+
thumbAlignment: "center",
|
|
1435
|
+
thumbCollisionBehavior: pushOnOverlap ? "push" : "none",
|
|
1436
|
+
value: rangeValue,
|
|
1437
|
+
children: [children ?? /* @__PURE__ */ jsxs(SliderControl, { children: [
|
|
1438
|
+
/* @__PURE__ */ jsxs(SliderTrack, { children: [/* @__PURE__ */ jsx(SliderIndicator, {}), /* @__PURE__ */ jsx(SliderMarks, {
|
|
1439
|
+
disabled: props.disabled,
|
|
1440
|
+
inverted,
|
|
1441
|
+
marks,
|
|
1442
|
+
max: domainMax,
|
|
1443
|
+
min: domainMin,
|
|
1444
|
+
orientation: props.orientation,
|
|
1445
|
+
values: rangeValue
|
|
1446
|
+
})] }),
|
|
1447
|
+
/* @__PURE__ */ jsxs(SliderThumb, {
|
|
1448
|
+
...firstThumbProps,
|
|
1449
|
+
"aria-label": thumbFromLabel,
|
|
1450
|
+
index: 0,
|
|
1451
|
+
children: [getThumbChildrenByIndex(thumbChildren, 0), /* @__PURE__ */ jsx(SliderThumbLabel, {
|
|
1452
|
+
label: resolveSliderLabel(label, displayedFromValue),
|
|
1453
|
+
labelAlwaysOn,
|
|
1454
|
+
orientation: props.orientation,
|
|
1455
|
+
showLabelOnHover,
|
|
1456
|
+
transitionProps: labelTransitionProps
|
|
1457
|
+
})]
|
|
1458
|
+
}),
|
|
1459
|
+
/* @__PURE__ */ jsxs(SliderThumb, {
|
|
1460
|
+
...secondThumbProps,
|
|
1461
|
+
"aria-label": thumbToLabel,
|
|
1462
|
+
index: 1,
|
|
1463
|
+
children: [getThumbChildrenByIndex(thumbChildren, 1), /* @__PURE__ */ jsx(SliderThumbLabel, {
|
|
1464
|
+
label: resolveSliderLabel(label, displayedToValue),
|
|
1465
|
+
labelAlwaysOn,
|
|
1466
|
+
orientation: props.orientation,
|
|
1467
|
+
showLabelOnHover,
|
|
1468
|
+
transitionProps: labelTransitionProps
|
|
1469
|
+
})]
|
|
1470
|
+
})
|
|
1471
|
+
] }), name ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("input", {
|
|
1472
|
+
...hiddenInputProps,
|
|
1473
|
+
name: `${name}_from`,
|
|
1474
|
+
type: "hidden",
|
|
1475
|
+
value: String(displayedFromValue)
|
|
1476
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
1477
|
+
...hiddenInputProps,
|
|
1478
|
+
name: `${name}_to`,
|
|
1479
|
+
type: "hidden",
|
|
1480
|
+
value: String(displayedToValue)
|
|
1481
|
+
})] }) : null]
|
|
1482
|
+
});
|
|
1483
|
+
});
|
|
1484
|
+
RangeSlider.Control = SliderControl;
|
|
1485
|
+
RangeSlider.Indicator = SliderIndicator;
|
|
1486
|
+
RangeSlider.Mark = SliderMark;
|
|
1487
|
+
RangeSlider.Marks = SliderMarks;
|
|
1488
|
+
RangeSlider.Thumb = SliderThumb;
|
|
1489
|
+
RangeSlider.ThumbLabel = SliderThumbLabel;
|
|
1490
|
+
RangeSlider.Track = SliderTrack;
|
|
1491
|
+
RangeSlider.Value = SliderValue;
|
|
119
1492
|
|
|
120
|
-
|
|
1493
|
+
//#endregion
|
|
1494
|
+
export { Accordion, AccordionContent, AccordionContent as AccordionPanel, AccordionHeader, AccordionItem, AccordionTrigger, Affix, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogBackdrop, AlertDialogCancel, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPopup, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertDialogViewport, AlertTitle, Announcement, AnnouncementTag, AnnouncementTitle, AspectRatio, Autocomplete, AutocompleteArrow, AutocompleteBackdrop, AutocompleteClear, AutocompleteCollection, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteIcon, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePortal, AutocompletePositioner, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, CheckboxGroup, CheckboxIndicator, Code, Collapsible, CollapsibleContent, CollapsibleContent as CollapsiblePanel, CollapsibleTrigger, Combobox, ComboboxArrow, ComboboxBackdrop, ComboboxChip, ComboboxChipRemove, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxIcon, ComboboxInput, ComboboxItem, ComboboxItemIndicator, ComboboxLabel, ComboboxList, ComboboxPopup, ComboboxPortal, ComboboxPositioner, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Container, ContextMenu, ContextMenuArrow, ContextMenuBackdrop, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuLinkItem, ContextMenuPopup, ContextMenuPortal, ContextMenuPositioner, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DEFAULT_UI_SIZE, Dialog, DialogBackdrop, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, DialogViewport, Drawer, DrawerActions, DrawerBackdrop, DrawerClose, DrawerContent, DrawerDescription, DrawerHandle, DrawerHeader, DrawerIndent, DrawerIndentBackground, DrawerPopup, DrawerPortal, DrawerProvider, DrawerRoot, DrawerTitle, DrawerTrigger, DrawerViewport, Dropzone, DropzoneAccept, DropzoneContext, DropzoneIdle, DropzoneReject, EmojiPicker, EmojiPickerActiveEmoji, EmojiPickerActiveEmojiPreview, EmojiPickerContent, EmojiPickerEmpty, EmojiPickerList, EmojiPickerLoading, EmojiPickerSearch, EmojiPickerSkinTone, EmojiPickerSkinToneSelector, Empty, EmptyButton, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldRoot, FieldValidity, Fieldset, FieldsetLegend, FieldsetRoot, Form, FormRoot, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, KUZENBO_PROVIDER_MISSING_ERROR, Kbd, KbdGroup, KuzenboProvider, Label, Marquee, MarqueeContent, MarqueeFade, MarqueeItem, DropdownMenu as Menu, DropdownMenuArrow as MenuArrow, DropdownMenuBackdrop as MenuBackdrop, DropdownMenuCheckboxItem as MenuCheckboxItem, DropdownMenuContent as MenuContent, DropdownMenuGroup as MenuGroup, DropdownMenuLabel as MenuGroupLabel, DropdownMenuItem as MenuItem, DropdownMenuLinkItem as MenuLinkItem, DropdownMenuPopup as MenuPopup, DropdownMenuPortal as MenuPortal, DropdownMenuPositioner as MenuPositioner, DropdownMenuRadioGroup as MenuRadioGroup, DropdownMenuRadioItem as MenuRadioItem, DropdownMenuSeparator as MenuSeparator, DropdownMenuShortcut as MenuShortcut, DropdownMenuSubContent as MenuSubmenuContent, DropdownMenuSub as MenuSubmenuRoot, DropdownMenuSubTrigger as MenuSubmenuTrigger, DropdownMenuTrigger as MenuTrigger, Menubar, MenubarArrow, MenubarBackdrop, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarLinkItem, MenubarMenu, MenubarPopup, MenubarPortal, MenubarPositioner, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Meter, MeterIndicator, MeterLabel, MeterTrack, MeterValue, NavigationList, NavigationListAction, NavigationListBadge, NavigationListContent, NavigationListGroup, NavigationListGroupContent, NavigationListGroupLabel, NavigationListItem, NavigationListLink, NavigationListSeparator, NavigationListSkeleton, NavigationListSub, NavigationListSubItem, NavigationListSubLink, NavigationMenu, NavigationMenuArrow, NavigationMenuBackdrop, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPopup, NavigationMenuPortal, NavigationMenuPositioner, NavigationMenuTrigger, NavigationMenuViewport, NumberField, NumberFieldDecrement, NumberFieldGroup, NumberFieldIncrement, NumberFieldInput, NumberFieldScrubArea, NumberFieldScrubAreaCursor, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Pill, PillAvatar, PillAvatarGroup, PillButton, PillDelta, PillIcon, PillIndicator, PillStatus, Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverTitle, PopoverTrigger, PopoverViewport, Portal, PreviewCard, PreviewCardArrow, PreviewCardBackdrop, PreviewCardContent, PreviewCardPopup, PreviewCardPortal, PreviewCardPositioner, PreviewCardTrigger, PreviewCardViewport, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, QRCode, RadioGroup, RadioGroupIndicator, RadioGroupItem, RangeSlider, Rating, RatingStar, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaThumb, ScrollAreaViewport, ScrollBar, Select, SelectArrow, SelectBackdrop, SelectContent, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel, SelectList, SelectPopup, SelectPortal, SelectPositioner, SelectScrollDownArrow, SelectScrollDownButton, SelectScrollUpArrow, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetBackdrop, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPopup, SheetPortal, SheetTitle, SheetTrigger, SheetViewport, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, SliderControl, SliderIndicator, SliderMark, SliderMarks, SliderThumb, SliderThumbLabel, SliderTrack, SliderValue, Spacer, Spinner, Switch, SwitchThumb, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsContent as TabsPanel, TabsIndicator, TabsList, TabsTrigger as TabsTab, TabsTrigger, Textarea, ThemeIcon, Timeline, TimelineConnector, TimelineContent, TimelineDescription, TimelineDot, TimelineHeader, TimelineItem, TimelineTime, TimelineTitle, Toggle, ToggleGroup, ToggleGroupContext, ToggleGroupItem, Toolbar, ToolbarButton, ToolbarGroup, ToolbarInput, ToolbarLink, ToolbarSeparator, Tooltip, TooltipArrow, TooltipContent, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipProvider, TooltipTrigger, TooltipViewport, Typography, TypographyBlockquote, TypographyBody, TypographyCaption, TypographyDisplay, TypographyEyebrow, TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyH5, TypographyH6, TypographyHeading, TypographyLead, TypographyLi, TypographyLink, TypographyMuted, TypographyOl, TypographyOverline, TypographyP, TypographySmall, TypographySubheading, TypographyText, TypographyUl, UI_SIZE_ORDER, accordionVariants, affixVariants, alertVariants, badgeVariants, buttonGroupVariants, buttonVariants, createDrawerHandle, createPreviewCardHandle, createSizeContext, dropzoneVariants, filterUndefinedProps, itemVariants, ratingValueVariants, ratingVariants, resolveSize, themeIconVariants, timelineVariants, toggleVariants, typographyHeadingVariants, typographyTextVariants, useCarousel, useComboboxAnchor, useFilter as useComboboxFilter, useFilteredItems as useComboboxFilteredItems, useComponentDefaultProps, useComponentSize, useDropzoneContext, useFilter$1 as useFilter, useFilteredItems$1 as useFilteredItems, useGlobalUISize, useKuzenboComponentDefaults, useKuzenboContext, useKuzenboEnv, useKuzenboReducedMotion, useOptionalKuzenboContext, useSidebar };
|
|
1495
|
+
//# sourceMappingURL=index.js.map
|