@uselets/ui 1.18.5 → 1.18.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chart-CVe5-EWS.d.ts → chart-B_6nC_ih.d.ts} +2 -2
- package/dist/cli/uselets.mjs.map +1 -1
- package/dist/components/accordion.d.ts +15 -2
- package/dist/components/accordion.js +2 -1
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert-dialog.d.ts +34 -2
- package/dist/components/alert-dialog.js +2 -1
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.d.ts +18 -2
- package/dist/components/alert.js +2 -1
- package/dist/components/alert.js.map +1 -0
- package/dist/components/anchor.d.ts +15 -2
- package/dist/components/anchor.js +2 -1
- package/dist/components/anchor.js.map +1 -0
- package/dist/components/area-chart.d.ts +40 -2
- package/dist/components/area-chart.js +2 -1
- package/dist/components/area-chart.js.map +1 -0
- package/dist/components/avatar.d.ts +21 -2
- package/dist/components/avatar.js +2 -1
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +16 -2
- package/dist/components/badge.js +2 -1
- package/dist/components/badge.js.map +1 -0
- package/dist/components/bar-chart.d.ts +42 -2
- package/dist/components/bar-chart.js +2 -1
- package/dist/components/bar-chart.js.map +1 -0
- package/dist/components/breadcrumb.d.ts +22 -2
- package/dist/components/breadcrumb.js +2 -1
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/button-group.d.ts +18 -2
- package/dist/components/button-group.js +2 -1
- package/dist/components/button-group.js.map +1 -0
- package/dist/components/button.d.ts +17 -2
- package/dist/components/button.js +2 -1
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.d.ts +17 -2
- package/dist/components/calendar.js +2 -1
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/card.d.ts +22 -2
- package/dist/components/card.js +2 -1
- package/dist/components/card.js.map +1 -0
- package/dist/components/carousel.d.ts +43 -2
- package/dist/components/carousel.js +2 -1
- package/dist/components/carousel.js.map +1 -0
- package/dist/components/center.d.ts +13 -2
- package/dist/components/center.js +2 -1
- package/dist/components/center.js.map +1 -0
- package/dist/components/chart.d.ts +1 -1
- package/dist/components/chart.js +8 -1
- package/dist/components/chart.js.map +1 -0
- package/dist/components/checkbox.d.ts +21 -2
- package/dist/components/checkbox.js +2 -1
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/code.d.ts +8 -2
- package/dist/components/code.js +2 -1
- package/dist/components/code.js.map +1 -0
- package/dist/components/collapsible.d.ts +12 -2
- package/dist/components/collapsible.js +2 -1
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/combobox.d.ts +51 -2
- package/dist/components/combobox.js +2 -1
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/command.d.ts +31 -2
- package/dist/components/command.js +2 -1
- package/dist/components/command.js.map +1 -0
- package/dist/components/container.d.ts +12 -2
- package/dist/components/container.js +2 -1
- package/dist/components/container.js.map +1 -0
- package/dist/components/data-table.d.ts +1 -1
- package/dist/components/data-table.js +2 -1
- package/dist/components/data-table.js.map +1 -0
- package/dist/components/date-range-picker.d.ts +55 -3
- package/dist/components/date-range-picker.js +2 -1
- package/dist/components/date-range-picker.js.map +1 -0
- package/dist/components/dialog.d.ts +42 -2
- package/dist/components/dialog.js +2 -1
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/donut-chart.d.ts +13 -2
- package/dist/components/donut-chart.js +2 -1
- package/dist/components/donut-chart.js.map +1 -0
- package/dist/components/drawer.d.ts +43 -2
- package/dist/components/drawer.js +2 -1
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +48 -2
- package/dist/components/dropdown-menu.js +2 -1
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/dropzone.d.ts +102 -2
- package/dist/components/dropzone.js +2 -1
- package/dist/components/dropzone.js.map +1 -0
- package/dist/components/empty.d.ts +21 -2
- package/dist/components/empty.js +2 -1
- package/dist/components/empty.js.map +1 -0
- package/dist/components/field.d.ts +39 -2
- package/dist/components/field.js +2 -1
- package/dist/components/field.js.map +1 -0
- package/dist/components/flex.d.ts +16 -2
- package/dist/components/flex.js +2 -1
- package/dist/components/flex.js.map +1 -0
- package/dist/components/grid.d.ts +20 -2
- package/dist/components/grid.js +2 -1
- package/dist/components/grid.js.map +1 -0
- package/dist/components/group.d.ts +15 -2
- package/dist/components/group.js +2 -1
- package/dist/components/group.js.map +1 -0
- package/dist/components/heading.d.ts +14 -2
- package/dist/components/heading.js +2 -1
- package/dist/components/heading.js.map +1 -0
- package/dist/components/hover-card.d.ts +13 -2
- package/dist/components/hover-card.js +2 -1
- package/dist/components/hover-card.js.map +1 -0
- package/dist/components/input-group.d.ts +26 -2
- package/dist/components/input-group.js +2 -1
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input-otp.d.ts +19 -2
- package/dist/components/input-otp.js +2 -1
- package/dist/components/input-otp.js.map +1 -0
- package/dist/components/input.d.ts +8 -2
- package/dist/components/input.js +2 -1
- package/dist/components/input.js.map +1 -0
- package/dist/components/kbd.d.ts +10 -2
- package/dist/components/kbd.js +2 -1
- package/dist/components/kbd.js.map +1 -0
- package/dist/components/label.d.ts +9 -2
- package/dist/components/label.js +2 -1
- package/dist/components/label.js.map +1 -0
- package/dist/components/list.d.ts +25 -2
- package/dist/components/list.js +2 -1
- package/dist/components/list.js.map +1 -0
- package/dist/components/logo.d.ts +69 -2
- package/dist/components/logo.js +1 -1
- package/dist/components/marker.d.ts +18 -2
- package/dist/components/marker.js +2 -1
- package/dist/components/marker.js.map +1 -0
- package/dist/components/mask-input.d.ts +16 -2
- package/dist/components/mask-input.js +2 -1
- package/dist/components/mask-input.js.map +1 -0
- package/dist/components/native-select.d.ts +14 -2
- package/dist/components/native-select.js +2 -1
- package/dist/components/native-select.js.map +1 -0
- package/dist/components/navigation-menu.d.ts +26 -2
- package/dist/components/navigation-menu.js +2 -1
- package/dist/components/navigation-menu.js.map +1 -0
- package/dist/components/number-field.d.ts +35 -2
- package/dist/components/number-field.js +2 -1
- package/dist/components/number-field.js.map +1 -0
- package/dist/components/pagination.d.ts +27 -2
- package/dist/components/pagination.js +2 -1
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/phone-input.d.ts +13 -2
- package/dist/components/phone-input.js +2 -1
- package/dist/components/phone-input.js.map +1 -0
- package/dist/components/pie-chart.d.ts +42 -2
- package/dist/components/pie-chart.js +2 -1
- package/dist/components/pie-chart.js.map +1 -0
- package/dist/components/popover.d.ts +21 -2
- package/dist/components/popover.js +2 -1
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +14 -2
- package/dist/components/progress.js +2 -1
- package/dist/components/progress.js.map +1 -0
- package/dist/components/radio-group.d.ts +25 -2
- package/dist/components/radio-group.js +2 -1
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/resizable.d.ts +14 -2
- package/dist/components/resizable.js +2 -1
- package/dist/components/resizable.js.map +1 -0
- package/dist/components/ring-progress.d.ts +17 -2
- package/dist/components/ring-progress.js +2 -1
- package/dist/components/ring-progress.js.map +1 -0
- package/dist/components/scroll-area.d.ts +11 -2
- package/dist/components/scroll-area.js +2 -1
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +29 -2
- package/dist/components/select.js +2 -1
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +9 -2
- package/dist/components/separator.js +2 -1
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sidebar.d.ts +96 -2
- package/dist/components/sidebar.js +2 -1
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/simple-grid.d.ts +14 -2
- package/dist/components/simple-grid.js +2 -1
- package/dist/components/simple-grid.js.map +1 -0
- package/dist/components/skeleton.d.ts +10 -2
- package/dist/components/skeleton.js +2 -1
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +9 -2
- package/dist/components/slider.js +2 -1
- package/dist/components/slider.js.map +1 -0
- package/dist/components/sonner.d.ts +8 -2
- package/dist/components/sonner.js +2 -1
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/spinner.d.ts +12 -2
- package/dist/components/spinner.js +2 -1
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/stack.d.ts +14 -2
- package/dist/components/stack.js +2 -1
- package/dist/components/stack.js.map +1 -0
- package/dist/components/stepper.d.ts +71 -2
- package/dist/components/stepper.js +2 -1
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/switch.d.ts +17 -2
- package/dist/components/switch.js +2 -1
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +33 -2
- package/dist/components/table.js +2 -1
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +21 -2
- package/dist/components/tabs.js +2 -1
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/text.d.ts +14 -2
- package/dist/components/text.js +2 -1
- package/dist/components/text.js.map +1 -0
- package/dist/components/textarea.d.ts +8 -2
- package/dist/components/textarea.js +2 -1
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/theme.d.ts +22 -2
- package/dist/components/theme.js +2 -1
- package/dist/components/theme.js.map +1 -0
- package/dist/components/timeline.d.ts +61 -2
- package/dist/components/timeline.js +2 -1
- package/dist/components/timeline.js.map +1 -0
- package/dist/components/toggle-group.d.ts +16 -2
- package/dist/components/toggle-group.js +2 -1
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle.d.ts +15 -2
- package/dist/components/toggle.js +2 -1
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/tooltip.d.ts +21 -2
- package/dist/components/tooltip.js +2 -1
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/unstyled-button.d.ts +10 -2
- package/dist/components/unstyled-button.js +2 -1
- package/dist/components/unstyled-button.js.map +1 -0
- package/dist/components/visibility.d.ts +17 -2
- package/dist/components/visibility.js +2 -1
- package/dist/components/visibility.js.map +1 -0
- package/dist/{data-table-DXNWHN9R.d.ts → data-table-DWWVGWbU.d.ts} +4 -4
- package/dist/hooks/use-breakpoint-value.d.ts +8 -2
- package/dist/hooks/use-breakpoint-value.js +2 -1
- package/dist/hooks/use-breakpoint-value.js.map +1 -0
- package/dist/hooks/use-breakpoint.d.ts +8 -2
- package/dist/hooks/use-breakpoint.js +2 -1
- package/dist/hooks/use-breakpoint.js.map +1 -0
- package/dist/hooks/use-disclosure.d.ts +22 -2
- package/dist/hooks/use-disclosure.js +2 -1
- package/dist/hooks/use-disclosure.js.map +1 -0
- package/dist/hooks/use-document-visibility.d.ts +6 -2
- package/dist/hooks/use-document-visibility.js +2 -1
- package/dist/hooks/use-document-visibility.js.map +1 -0
- package/dist/hooks/use-hotkeys.d.ts +1 -1
- package/dist/hooks/use-hotkeys.js +1 -1
- package/dist/hooks/use-idle.d.ts +13 -2
- package/dist/hooks/use-idle.js +2 -1
- package/dist/hooks/use-idle.js.map +1 -0
- package/dist/hooks/use-interval.d.ts +24 -2
- package/dist/hooks/use-interval.js +2 -1
- package/dist/hooks/use-interval.js.map +1 -0
- package/dist/hooks/use-local-storage.d.ts +16 -2
- package/dist/hooks/use-local-storage.js +2 -1
- package/dist/hooks/use-local-storage.js.map +1 -0
- package/dist/hooks/use-mask.d.ts +8 -2
- package/dist/hooks/use-mask.js +2 -1
- package/dist/hooks/use-mask.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +6 -2
- package/dist/hooks/use-mobile.js +2 -1
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/index.d.ts +95 -95
- package/dist/index.js +1 -1
- package/dist/lib/badge.d.ts +19 -2
- package/dist/lib/badge.js +2 -1
- package/dist/lib/badge.js.map +1 -0
- package/dist/lib/button.d.ts +19 -2
- package/dist/lib/button.js +2 -1
- package/dist/lib/button.js.map +1 -0
- package/dist/lib/color.d.ts +19 -2
- package/dist/lib/color.js +2 -1
- package/dist/lib/color.js.map +1 -0
- package/dist/lib/compose-refs.d.ts +8 -2
- package/dist/lib/compose-refs.js +2 -1
- package/dist/lib/compose-refs.js.map +1 -0
- package/dist/lib/progress.d.ts +19 -2
- package/dist/lib/progress.js +2 -1
- package/dist/lib/progress.js.map +1 -0
- package/dist/lib/utils.d.ts +7 -2
- package/dist/lib/utils.js +2 -1
- package/dist/lib/utils.js.map +1 -0
- package/dist/logo-B0thHtTS.js +2 -0
- package/dist/{logo-BkwNxZNw.js.map → logo-B0thHtTS.js.map} +1 -1
- package/dist/rolldown-runtime-BhWHdk3m.js +1 -0
- package/dist/styles/base.css +1 -19
- package/dist/styles/globals.css +1 -2
- package/dist/themes/gomax.css +1 -2
- package/dist/themes/max.css +1 -2
- package/dist/{use-hotkeys-DloZH-B4.d.ts → use-hotkeys-DOjcX9Tt.d.ts} +2 -2
- package/dist/{use-hotkeys-C0d5t4yo.js → use-hotkeys-YDJmGWX6.js} +2 -2
- package/dist/{use-hotkeys-C0d5t4yo.js.map → use-hotkeys-YDJmGWX6.js.map} +1 -1
- package/package.json +6 -7
- package/dist/accordion-BCo2odjy.js +0 -2
- package/dist/accordion-BCo2odjy.js.map +0 -1
- package/dist/accordion-DtSr3uiA.d.ts +0 -15
- package/dist/alert-CJRgRQVF.js +0 -2
- package/dist/alert-CJRgRQVF.js.map +0 -1
- package/dist/alert-dialog-B_nAiD4Y.js +0 -2
- package/dist/alert-dialog-B_nAiD4Y.js.map +0 -1
- package/dist/alert-dialog-Bf41-OnT.d.ts +0 -34
- package/dist/alert-eivgSC_S.d.ts +0 -18
- package/dist/anchor-DCOyn0Xa.d.ts +0 -15
- package/dist/anchor-srhmShjN.js +0 -2
- package/dist/anchor-srhmShjN.js.map +0 -1
- package/dist/area-chart-DdDy8Vm3.js +0 -2
- package/dist/area-chart-DdDy8Vm3.js.map +0 -1
- package/dist/area-chart-F_4ZL20j.d.ts +0 -40
- package/dist/avatar-2ZS3Tx76.d.ts +0 -21
- package/dist/avatar-CFUwrOwG.js +0 -2
- package/dist/avatar-CFUwrOwG.js.map +0 -1
- package/dist/badge-BqpQcDFd.d.ts +0 -16
- package/dist/badge-Cuq_DqRS.js +0 -2
- package/dist/badge-Cuq_DqRS.js.map +0 -1
- package/dist/badge-DEgLmZYC.js +0 -2
- package/dist/badge-DEgLmZYC.js.map +0 -1
- package/dist/badge-gkezuSZY.d.ts +0 -19
- package/dist/bar-chart-DIgSnh_j.js +0 -2
- package/dist/bar-chart-DIgSnh_j.js.map +0 -1
- package/dist/bar-chart-DRrrfMQR.d.ts +0 -42
- package/dist/breadcrumb-CqNDAI8V.js +0 -2
- package/dist/breadcrumb-CqNDAI8V.js.map +0 -1
- package/dist/breadcrumb-DZFS9htN.d.ts +0 -22
- package/dist/button-BNGy28pv.d.ts +0 -17
- package/dist/button-CQbH5Glc.d.ts +0 -19
- package/dist/button-DGewx2nE.js +0 -2
- package/dist/button-DGewx2nE.js.map +0 -1
- package/dist/button-group-DRgqsyjS.d.ts +0 -18
- package/dist/button-group-WJ5LeouK.js +0 -2
- package/dist/button-group-WJ5LeouK.js.map +0 -1
- package/dist/button-oI3hbOgp.js +0 -2
- package/dist/button-oI3hbOgp.js.map +0 -1
- package/dist/calendar-C1GgjzIA.d.ts +0 -17
- package/dist/calendar-CW1kGXom.js +0 -2
- package/dist/calendar-CW1kGXom.js.map +0 -1
- package/dist/card-Bx6iiocl.js +0 -2
- package/dist/card-Bx6iiocl.js.map +0 -1
- package/dist/card-pWjtkTKw.d.ts +0 -22
- package/dist/carousel-C6e4eRJD.d.ts +0 -43
- package/dist/carousel-D0OTImO7.js +0 -2
- package/dist/carousel-D0OTImO7.js.map +0 -1
- package/dist/center-CFQDr205.d.ts +0 -13
- package/dist/center-Dl1rnq7S.js +0 -2
- package/dist/center-Dl1rnq7S.js.map +0 -1
- package/dist/chart-Ci4V8B8v.js +0 -8
- package/dist/chart-Ci4V8B8v.js.map +0 -1
- package/dist/checkbox-DPvW_m7k.js +0 -2
- package/dist/checkbox-DPvW_m7k.js.map +0 -1
- package/dist/checkbox-y0XBdH4a.d.ts +0 -21
- package/dist/code-A6JERAsm.js +0 -2
- package/dist/code-A6JERAsm.js.map +0 -1
- package/dist/code-Cqoacc61.d.ts +0 -8
- package/dist/collapsible-BH8BqfTd.js +0 -2
- package/dist/collapsible-BH8BqfTd.js.map +0 -1
- package/dist/collapsible-CLSCZ630.d.ts +0 -12
- package/dist/color-DJvQFSl5.d.ts +0 -19
- package/dist/color-Don4qaht.js +0 -2
- package/dist/color-Don4qaht.js.map +0 -1
- package/dist/combobox-DkCRXUxd.d.ts +0 -51
- package/dist/combobox-ITDBYTtM.js +0 -2
- package/dist/combobox-ITDBYTtM.js.map +0 -1
- package/dist/command-BxkAy8PP.js +0 -2
- package/dist/command-BxkAy8PP.js.map +0 -1
- package/dist/command-D4pNOx0J.d.ts +0 -31
- package/dist/components/accordion.spec.d.ts +0 -1
- package/dist/components/accordion.spec.js +0 -2
- package/dist/components/accordion.spec.js.map +0 -1
- package/dist/components/alert-dialog.spec.d.ts +0 -1
- package/dist/components/alert-dialog.spec.js +0 -2
- package/dist/components/alert-dialog.spec.js.map +0 -1
- package/dist/components/alert.spec.d.ts +0 -1
- package/dist/components/alert.spec.js +0 -2
- package/dist/components/alert.spec.js.map +0 -1
- package/dist/components/anchor.spec.d.ts +0 -1
- package/dist/components/anchor.spec.js +0 -2
- package/dist/components/anchor.spec.js.map +0 -1
- package/dist/components/area-chart.spec.d.ts +0 -1
- package/dist/components/area-chart.spec.js +0 -2
- package/dist/components/area-chart.spec.js.map +0 -1
- package/dist/components/avatar.spec.d.ts +0 -1
- package/dist/components/avatar.spec.js +0 -2
- package/dist/components/avatar.spec.js.map +0 -1
- package/dist/components/badge.spec.d.ts +0 -1
- package/dist/components/badge.spec.js +0 -2
- package/dist/components/badge.spec.js.map +0 -1
- package/dist/components/bar-chart.spec.d.ts +0 -1
- package/dist/components/bar-chart.spec.js +0 -2
- package/dist/components/bar-chart.spec.js.map +0 -1
- package/dist/components/breadcrumb.spec.d.ts +0 -1
- package/dist/components/breadcrumb.spec.js +0 -2
- package/dist/components/breadcrumb.spec.js.map +0 -1
- package/dist/components/button-group.spec.d.ts +0 -1
- package/dist/components/button-group.spec.js +0 -2
- package/dist/components/button-group.spec.js.map +0 -1
- package/dist/components/button.spec.d.ts +0 -1
- package/dist/components/button.spec.js +0 -2
- package/dist/components/button.spec.js.map +0 -1
- package/dist/components/calendar.spec.d.ts +0 -1
- package/dist/components/calendar.spec.js +0 -2
- package/dist/components/calendar.spec.js.map +0 -1
- package/dist/components/card.spec.d.ts +0 -1
- package/dist/components/card.spec.js +0 -2
- package/dist/components/card.spec.js.map +0 -1
- package/dist/components/carousel.spec.d.ts +0 -1
- package/dist/components/carousel.spec.js +0 -2
- package/dist/components/carousel.spec.js.map +0 -1
- package/dist/components/center.spec.d.ts +0 -1
- package/dist/components/center.spec.js +0 -2
- package/dist/components/center.spec.js.map +0 -1
- package/dist/components/chart.spec.d.ts +0 -1
- package/dist/components/chart.spec.js +0 -2
- package/dist/components/chart.spec.js.map +0 -1
- package/dist/components/checkbox.spec.d.ts +0 -1
- package/dist/components/checkbox.spec.js +0 -2
- package/dist/components/checkbox.spec.js.map +0 -1
- package/dist/components/code.spec.d.ts +0 -1
- package/dist/components/code.spec.js +0 -2
- package/dist/components/code.spec.js.map +0 -1
- package/dist/components/collapsible.spec.d.ts +0 -1
- package/dist/components/collapsible.spec.js +0 -2
- package/dist/components/collapsible.spec.js.map +0 -1
- package/dist/components/combobox.spec.d.ts +0 -1
- package/dist/components/combobox.spec.js +0 -2
- package/dist/components/combobox.spec.js.map +0 -1
- package/dist/components/command.spec.d.ts +0 -1
- package/dist/components/command.spec.js +0 -2
- package/dist/components/command.spec.js.map +0 -1
- package/dist/components/container.spec.d.ts +0 -1
- package/dist/components/container.spec.js +0 -2
- package/dist/components/container.spec.js.map +0 -1
- package/dist/components/data-table.spec.d.ts +0 -1
- package/dist/components/data-table.spec.js +0 -2
- package/dist/components/data-table.spec.js.map +0 -1
- package/dist/components/date-range-picker.spec.d.ts +0 -1
- package/dist/components/date-range-picker.spec.js +0 -2
- package/dist/components/date-range-picker.spec.js.map +0 -1
- package/dist/components/dialog.spec.d.ts +0 -1
- package/dist/components/dialog.spec.js +0 -2
- package/dist/components/dialog.spec.js.map +0 -1
- package/dist/components/donut-chart.spec.d.ts +0 -1
- package/dist/components/donut-chart.spec.js +0 -2
- package/dist/components/donut-chart.spec.js.map +0 -1
- package/dist/components/drawer.spec.d.ts +0 -1
- package/dist/components/drawer.spec.js +0 -2
- package/dist/components/drawer.spec.js.map +0 -1
- package/dist/components/dropdown-menu.spec.d.ts +0 -1
- package/dist/components/dropdown-menu.spec.js +0 -2
- package/dist/components/dropdown-menu.spec.js.map +0 -1
- package/dist/components/dropzone.spec.d.ts +0 -1
- package/dist/components/dropzone.spec.js +0 -2
- package/dist/components/dropzone.spec.js.map +0 -1
- package/dist/components/empty.spec.d.ts +0 -1
- package/dist/components/empty.spec.js +0 -2
- package/dist/components/empty.spec.js.map +0 -1
- package/dist/components/field.spec.d.ts +0 -1
- package/dist/components/field.spec.js +0 -2
- package/dist/components/field.spec.js.map +0 -1
- package/dist/components/flex.spec.d.ts +0 -1
- package/dist/components/flex.spec.js +0 -2
- package/dist/components/flex.spec.js.map +0 -1
- package/dist/components/grid.spec.d.ts +0 -1
- package/dist/components/grid.spec.js +0 -2
- package/dist/components/grid.spec.js.map +0 -1
- package/dist/components/group.spec.d.ts +0 -1
- package/dist/components/group.spec.js +0 -2
- package/dist/components/group.spec.js.map +0 -1
- package/dist/components/heading.spec.d.ts +0 -1
- package/dist/components/heading.spec.js +0 -2
- package/dist/components/heading.spec.js.map +0 -1
- package/dist/components/hover-card.spec.d.ts +0 -1
- package/dist/components/hover-card.spec.js +0 -2
- package/dist/components/hover-card.spec.js.map +0 -1
- package/dist/components/input-group.spec.d.ts +0 -1
- package/dist/components/input-group.spec.js +0 -2
- package/dist/components/input-group.spec.js.map +0 -1
- package/dist/components/input-otp.spec.d.ts +0 -1
- package/dist/components/input-otp.spec.js +0 -2
- package/dist/components/input-otp.spec.js.map +0 -1
- package/dist/components/input.spec.d.ts +0 -1
- package/dist/components/input.spec.js +0 -2
- package/dist/components/input.spec.js.map +0 -1
- package/dist/components/kbd.spec.d.ts +0 -1
- package/dist/components/kbd.spec.js +0 -2
- package/dist/components/kbd.spec.js.map +0 -1
- package/dist/components/label.spec.d.ts +0 -1
- package/dist/components/label.spec.js +0 -2
- package/dist/components/label.spec.js.map +0 -1
- package/dist/components/list.spec.d.ts +0 -1
- package/dist/components/list.spec.js +0 -2
- package/dist/components/list.spec.js.map +0 -1
- package/dist/components/logo.spec.d.ts +0 -1
- package/dist/components/logo.spec.js +0 -2
- package/dist/components/logo.spec.js.map +0 -1
- package/dist/components/marker.spec.d.ts +0 -1
- package/dist/components/marker.spec.js +0 -2
- package/dist/components/marker.spec.js.map +0 -1
- package/dist/components/mask-input.spec.d.ts +0 -1
- package/dist/components/mask-input.spec.js +0 -2
- package/dist/components/mask-input.spec.js.map +0 -1
- package/dist/components/native-select.spec.d.ts +0 -1
- package/dist/components/native-select.spec.js +0 -2
- package/dist/components/native-select.spec.js.map +0 -1
- package/dist/components/navigation-menu.spec.d.ts +0 -1
- package/dist/components/navigation-menu.spec.js +0 -2
- package/dist/components/navigation-menu.spec.js.map +0 -1
- package/dist/components/number-field.spec.d.ts +0 -1
- package/dist/components/number-field.spec.js +0 -2
- package/dist/components/number-field.spec.js.map +0 -1
- package/dist/components/pagination.spec.d.ts +0 -1
- package/dist/components/pagination.spec.js +0 -2
- package/dist/components/pagination.spec.js.map +0 -1
- package/dist/components/phone-input.spec.d.ts +0 -1
- package/dist/components/phone-input.spec.js +0 -2
- package/dist/components/phone-input.spec.js.map +0 -1
- package/dist/components/pie-chart.spec.d.ts +0 -1
- package/dist/components/pie-chart.spec.js +0 -2
- package/dist/components/pie-chart.spec.js.map +0 -1
- package/dist/components/popover.spec.d.ts +0 -1
- package/dist/components/popover.spec.js +0 -2
- package/dist/components/popover.spec.js.map +0 -1
- package/dist/components/progress.spec.d.ts +0 -1
- package/dist/components/progress.spec.js +0 -2
- package/dist/components/progress.spec.js.map +0 -1
- package/dist/components/radio-group.spec.d.ts +0 -1
- package/dist/components/radio-group.spec.js +0 -2
- package/dist/components/radio-group.spec.js.map +0 -1
- package/dist/components/resizable.spec.d.ts +0 -1
- package/dist/components/resizable.spec.js +0 -2
- package/dist/components/resizable.spec.js.map +0 -1
- package/dist/components/ring-progress.spec.d.ts +0 -1
- package/dist/components/ring-progress.spec.js +0 -2
- package/dist/components/ring-progress.spec.js.map +0 -1
- package/dist/components/scroll-area.spec.d.ts +0 -1
- package/dist/components/scroll-area.spec.js +0 -2
- package/dist/components/scroll-area.spec.js.map +0 -1
- package/dist/components/select.spec.d.ts +0 -1
- package/dist/components/select.spec.js +0 -2
- package/dist/components/select.spec.js.map +0 -1
- package/dist/components/separator.spec.d.ts +0 -1
- package/dist/components/separator.spec.js +0 -2
- package/dist/components/separator.spec.js.map +0 -1
- package/dist/components/sidebar.spec.d.ts +0 -1
- package/dist/components/sidebar.spec.js +0 -2
- package/dist/components/sidebar.spec.js.map +0 -1
- package/dist/components/simple-grid.spec.d.ts +0 -1
- package/dist/components/simple-grid.spec.js +0 -2
- package/dist/components/simple-grid.spec.js.map +0 -1
- package/dist/components/skeleton.spec.d.ts +0 -1
- package/dist/components/skeleton.spec.js +0 -2
- package/dist/components/skeleton.spec.js.map +0 -1
- package/dist/components/slider.spec.d.ts +0 -1
- package/dist/components/slider.spec.js +0 -2
- package/dist/components/slider.spec.js.map +0 -1
- package/dist/components/sonner.spec.d.ts +0 -1
- package/dist/components/sonner.spec.js +0 -2
- package/dist/components/sonner.spec.js.map +0 -1
- package/dist/components/spinner.spec.d.ts +0 -1
- package/dist/components/spinner.spec.js +0 -2
- package/dist/components/spinner.spec.js.map +0 -1
- package/dist/components/stack.spec.d.ts +0 -1
- package/dist/components/stack.spec.js +0 -2
- package/dist/components/stack.spec.js.map +0 -1
- package/dist/components/stepper.spec.d.ts +0 -1
- package/dist/components/stepper.spec.js +0 -2
- package/dist/components/stepper.spec.js.map +0 -1
- package/dist/components/switch.spec.d.ts +0 -1
- package/dist/components/switch.spec.js +0 -2
- package/dist/components/switch.spec.js.map +0 -1
- package/dist/components/table.spec.d.ts +0 -1
- package/dist/components/table.spec.js +0 -2
- package/dist/components/table.spec.js.map +0 -1
- package/dist/components/tabs.spec.d.ts +0 -1
- package/dist/components/tabs.spec.js +0 -2
- package/dist/components/tabs.spec.js.map +0 -1
- package/dist/components/text.spec.d.ts +0 -1
- package/dist/components/text.spec.js +0 -2
- package/dist/components/text.spec.js.map +0 -1
- package/dist/components/textarea.spec.d.ts +0 -1
- package/dist/components/textarea.spec.js +0 -2
- package/dist/components/textarea.spec.js.map +0 -1
- package/dist/components/theme.spec.d.ts +0 -1
- package/dist/components/theme.spec.js +0 -2
- package/dist/components/theme.spec.js.map +0 -1
- package/dist/components/timeline.spec.d.ts +0 -1
- package/dist/components/timeline.spec.js +0 -2
- package/dist/components/timeline.spec.js.map +0 -1
- package/dist/components/toggle-group.spec.d.ts +0 -1
- package/dist/components/toggle-group.spec.js +0 -2
- package/dist/components/toggle-group.spec.js.map +0 -1
- package/dist/components/toggle.spec.d.ts +0 -1
- package/dist/components/toggle.spec.js +0 -2
- package/dist/components/toggle.spec.js.map +0 -1
- package/dist/components/tooltip.spec.d.ts +0 -1
- package/dist/components/tooltip.spec.js +0 -2
- package/dist/components/tooltip.spec.js.map +0 -1
- package/dist/components/unstyled-button.spec.d.ts +0 -1
- package/dist/components/unstyled-button.spec.js +0 -2
- package/dist/components/unstyled-button.spec.js.map +0 -1
- package/dist/components/visibility.spec.d.ts +0 -1
- package/dist/components/visibility.spec.js +0 -2
- package/dist/components/visibility.spec.js.map +0 -1
- package/dist/compose-refs-DUtp7lGn.js +0 -2
- package/dist/compose-refs-DUtp7lGn.js.map +0 -1
- package/dist/compose-refs-GP3zdokU.d.ts +0 -8
- package/dist/container-B8-lt-oX.d.ts +0 -12
- package/dist/container-CikeKdez.js +0 -2
- package/dist/container-CikeKdez.js.map +0 -1
- package/dist/data-table-BGfSiHDT.js +0 -2
- package/dist/data-table-BGfSiHDT.js.map +0 -1
- package/dist/date-range-picker-BjkVzFWQ.js +0 -2
- package/dist/date-range-picker-BjkVzFWQ.js.map +0 -1
- package/dist/date-range-picker-BngvCWcR.d.ts +0 -55
- package/dist/dialog-B7I4Ky1i.js +0 -2
- package/dist/dialog-B7I4Ky1i.js.map +0 -1
- package/dist/dialog-Ej7pnact.d.ts +0 -42
- package/dist/donut-chart-BDJR8TXh.d.ts +0 -13
- package/dist/donut-chart-BHU4kDE6.js +0 -2
- package/dist/donut-chart-BHU4kDE6.js.map +0 -1
- package/dist/drawer-BO4mP6y1.js +0 -2
- package/dist/drawer-BO4mP6y1.js.map +0 -1
- package/dist/drawer-DUfJzrKE.d.ts +0 -43
- package/dist/dropdown-menu-CVDIf0Rd.d.ts +0 -48
- package/dist/dropdown-menu-zRuQQS5S.js +0 -2
- package/dist/dropdown-menu-zRuQQS5S.js.map +0 -1
- package/dist/dropzone-43h3L9Ko.d.ts +0 -102
- package/dist/dropzone-BLZkZThJ.js +0 -2
- package/dist/dropzone-BLZkZThJ.js.map +0 -1
- package/dist/empty-BhKsDYZ5.js +0 -2
- package/dist/empty-BhKsDYZ5.js.map +0 -1
- package/dist/empty-D8ZiTCVK.d.ts +0 -21
- package/dist/field-C209yHO9.d.ts +0 -39
- package/dist/field-DzR-XrO7.js +0 -2
- package/dist/field-DzR-XrO7.js.map +0 -1
- package/dist/flex-BC4Diiy4.js +0 -2
- package/dist/flex-BC4Diiy4.js.map +0 -1
- package/dist/flex-aJXipTAz.d.ts +0 -16
- package/dist/grid-B3He1bGe.js +0 -2
- package/dist/grid-B3He1bGe.js.map +0 -1
- package/dist/grid-D_aEANA7.d.ts +0 -20
- package/dist/group-B6n_lMc4.js +0 -2
- package/dist/group-B6n_lMc4.js.map +0 -1
- package/dist/group-DBtx8eSe.d.ts +0 -15
- package/dist/heading-BTXl4JfI.d.ts +0 -14
- package/dist/heading-DaxKLVRm.js +0 -2
- package/dist/heading-DaxKLVRm.js.map +0 -1
- package/dist/hooks/use-breakpoint-value.spec.d.ts +0 -1
- package/dist/hooks/use-breakpoint-value.spec.js +0 -35
- package/dist/hooks/use-breakpoint-value.spec.js.map +0 -1
- package/dist/hooks/use-breakpoint.spec.d.ts +0 -1
- package/dist/hooks/use-breakpoint.spec.js +0 -2
- package/dist/hooks/use-breakpoint.spec.js.map +0 -1
- package/dist/hooks/use-disclosure.spec.d.ts +0 -1
- package/dist/hooks/use-disclosure.spec.js +0 -2
- package/dist/hooks/use-disclosure.spec.js.map +0 -1
- package/dist/hooks/use-document-visibility.spec.d.ts +0 -1
- package/dist/hooks/use-document-visibility.spec.js +0 -2
- package/dist/hooks/use-document-visibility.spec.js.map +0 -1
- package/dist/hooks/use-hotkeys.spec.d.ts +0 -1
- package/dist/hooks/use-hotkeys.spec.js +0 -2
- package/dist/hooks/use-hotkeys.spec.js.map +0 -1
- package/dist/hooks/use-idle.spec.d.ts +0 -1
- package/dist/hooks/use-idle.spec.js +0 -2
- package/dist/hooks/use-idle.spec.js.map +0 -1
- package/dist/hooks/use-interval.spec.d.ts +0 -1
- package/dist/hooks/use-interval.spec.js +0 -2
- package/dist/hooks/use-interval.spec.js.map +0 -1
- package/dist/hooks/use-local-storage.spec.d.ts +0 -1
- package/dist/hooks/use-local-storage.spec.js +0 -2
- package/dist/hooks/use-local-storage.spec.js.map +0 -1
- package/dist/hooks/use-mask.spec.d.ts +0 -1
- package/dist/hooks/use-mask.spec.js +0 -2
- package/dist/hooks/use-mask.spec.js.map +0 -1
- package/dist/hooks/use-mobile.spec.d.ts +0 -1
- package/dist/hooks/use-mobile.spec.js +0 -2
- package/dist/hooks/use-mobile.spec.js.map +0 -1
- package/dist/hover-card-C3yz2zQi.d.ts +0 -13
- package/dist/hover-card-Dc8yLsm-.js +0 -2
- package/dist/hover-card-Dc8yLsm-.js.map +0 -1
- package/dist/input-CI3RPXz0.d.ts +0 -8
- package/dist/input-CJLsPlXh.js +0 -2
- package/dist/input-CJLsPlXh.js.map +0 -1
- package/dist/input-group-CBn36aMg.d.ts +0 -26
- package/dist/input-group-mcar-tED.js +0 -2
- package/dist/input-group-mcar-tED.js.map +0 -1
- package/dist/input-otp-CzfRHf2V.js +0 -2
- package/dist/input-otp-CzfRHf2V.js.map +0 -1
- package/dist/input-otp-gIEkdiIC.d.ts +0 -19
- package/dist/kbd-BTl3AgkY.js +0 -2
- package/dist/kbd-BTl3AgkY.js.map +0 -1
- package/dist/kbd-DELCQBD0.d.ts +0 -10
- package/dist/label-BQDEej_c.js +0 -2
- package/dist/label-BQDEej_c.js.map +0 -1
- package/dist/label-KZl6I5Ey.d.ts +0 -9
- package/dist/lib/badge.spec.d.ts +0 -1
- package/dist/lib/badge.spec.js +0 -2
- package/dist/lib/badge.spec.js.map +0 -1
- package/dist/lib/button.spec.d.ts +0 -1
- package/dist/lib/button.spec.js +0 -2
- package/dist/lib/button.spec.js.map +0 -1
- package/dist/lib/color.spec.d.ts +0 -1
- package/dist/lib/color.spec.js +0 -2
- package/dist/lib/color.spec.js.map +0 -1
- package/dist/lib/compose-refs.spec.d.ts +0 -1
- package/dist/lib/compose-refs.spec.js +0 -2
- package/dist/lib/compose-refs.spec.js.map +0 -1
- package/dist/lib/progress.spec.d.ts +0 -1
- package/dist/lib/progress.spec.js +0 -2
- package/dist/lib/progress.spec.js.map +0 -1
- package/dist/lib/utils.spec.d.ts +0 -1
- package/dist/lib/utils.spec.js +0 -2
- package/dist/lib/utils.spec.js.map +0 -1
- package/dist/list-BbCg-ndB.js +0 -2
- package/dist/list-BbCg-ndB.js.map +0 -1
- package/dist/list-DMa2j1rk.d.ts +0 -25
- package/dist/logo-BkwNxZNw.js +0 -2
- package/dist/logo-Buo7sqqn.d.ts +0 -69
- package/dist/marker-4_EnMIHk.js +0 -2
- package/dist/marker-4_EnMIHk.js.map +0 -1
- package/dist/marker-C4wLa1c0.d.ts +0 -18
- package/dist/mask-input-B4R5K1h6.d.ts +0 -16
- package/dist/mask-input-cCmVKrHj.js +0 -2
- package/dist/mask-input-cCmVKrHj.js.map +0 -1
- package/dist/native-select-BVmdMkHY.d.ts +0 -14
- package/dist/native-select-Iq25QUH-.js +0 -2
- package/dist/native-select-Iq25QUH-.js.map +0 -1
- package/dist/navigation-menu-B6drNL1-.js +0 -2
- package/dist/navigation-menu-B6drNL1-.js.map +0 -1
- package/dist/navigation-menu-siQVRMUF.d.ts +0 -26
- package/dist/number-field-IdgO_BUa.d.ts +0 -35
- package/dist/number-field-rEMfZa6A.js +0 -2
- package/dist/number-field-rEMfZa6A.js.map +0 -1
- package/dist/pagination-BZ3xMXsy.d.ts +0 -27
- package/dist/pagination-gnUKddCN.js +0 -2
- package/dist/pagination-gnUKddCN.js.map +0 -1
- package/dist/phone-input-By5lNF03.d.ts +0 -13
- package/dist/phone-input-DqgYa1un.js +0 -2
- package/dist/phone-input-DqgYa1un.js.map +0 -1
- package/dist/pie-chart-CvG27kFN.d.ts +0 -42
- package/dist/pie-chart-S4nMKbsW.js +0 -2
- package/dist/pie-chart-S4nMKbsW.js.map +0 -1
- package/dist/popover-BtX3tX8M.js +0 -2
- package/dist/popover-BtX3tX8M.js.map +0 -1
- package/dist/popover-DchAqyKn.d.ts +0 -21
- package/dist/progress-DeXRCHUw.d.ts +0 -19
- package/dist/progress-QvpY7tiy.js +0 -2
- package/dist/progress-QvpY7tiy.js.map +0 -1
- package/dist/progress-icFwrvnE.js +0 -2
- package/dist/progress-icFwrvnE.js.map +0 -1
- package/dist/progress-mEAw9ZhK.d.ts +0 -14
- package/dist/radio-group-BNbepK_U.d.ts +0 -25
- package/dist/radio-group-DM8n0XPS.js +0 -2
- package/dist/radio-group-DM8n0XPS.js.map +0 -1
- package/dist/react.esm-dE9nuHcL.js +0 -68
- package/dist/react.esm-dE9nuHcL.js.map +0 -1
- package/dist/resizable-DMQG3xF_.d.ts +0 -14
- package/dist/resizable-Dbg7r7nF.js +0 -2
- package/dist/resizable-Dbg7r7nF.js.map +0 -1
- package/dist/ring-progress-65ccdTQQ.d.ts +0 -17
- package/dist/ring-progress-Bfqq_HHA.js +0 -2
- package/dist/ring-progress-Bfqq_HHA.js.map +0 -1
- package/dist/rolldown-runtime-Bdj-bS2b.js +0 -1
- package/dist/scroll-area-DFcj5q66.d.ts +0 -11
- package/dist/scroll-area-DKS4QPHg.js +0 -2
- package/dist/scroll-area-DKS4QPHg.js.map +0 -1
- package/dist/select-BoYp-Xyc.d.ts +0 -29
- package/dist/select-CVwVLyWt.js +0 -2
- package/dist/select-CVwVLyWt.js.map +0 -1
- package/dist/separator-BsRLiqWE.d.ts +0 -9
- package/dist/separator-CCMmbXL0.js +0 -2
- package/dist/separator-CCMmbXL0.js.map +0 -1
- package/dist/sidebar-CJriMotD.js +0 -2
- package/dist/sidebar-CJriMotD.js.map +0 -1
- package/dist/sidebar-D7HQlj5O.d.ts +0 -96
- package/dist/simple-grid-9EryoUWI.js +0 -2
- package/dist/simple-grid-9EryoUWI.js.map +0 -1
- package/dist/simple-grid-B2zjpwZ3.d.ts +0 -14
- package/dist/skeleton-Cn3zBJRe.js +0 -2
- package/dist/skeleton-Cn3zBJRe.js.map +0 -1
- package/dist/skeleton-Co8pevj-.d.ts +0 -10
- package/dist/slider-CC-gQawq.js +0 -2
- package/dist/slider-CC-gQawq.js.map +0 -1
- package/dist/slider-DmZ1YfLg.d.ts +0 -9
- package/dist/sonner-Binx8JJ2.d.ts +0 -8
- package/dist/sonner-DrKqhTDI.js +0 -2
- package/dist/sonner-DrKqhTDI.js.map +0 -1
- package/dist/spinner-Dz63Ltq-.d.ts +0 -12
- package/dist/spinner-ntLrcDLN.js +0 -2
- package/dist/spinner-ntLrcDLN.js.map +0 -1
- package/dist/stack-BbLllsqk.js +0 -2
- package/dist/stack-BbLllsqk.js.map +0 -1
- package/dist/stack-WiND8Dxq.d.ts +0 -14
- package/dist/stepper-BQ-59_UO.js +0 -2
- package/dist/stepper-BQ-59_UO.js.map +0 -1
- package/dist/stepper-DK5_o7RG.d.ts +0 -71
- package/dist/styles/gomax.css +0 -224
- package/dist/styles/max.css +0 -225
- package/dist/styles/theme.css +0 -214
- package/dist/switch-DjdOGECT.js +0 -2
- package/dist/switch-DjdOGECT.js.map +0 -1
- package/dist/switch-OtBakZHc.d.ts +0 -17
- package/dist/table-CuE0Aenj.js +0 -2
- package/dist/table-CuE0Aenj.js.map +0 -1
- package/dist/table-qIAtG7Y5.d.ts +0 -33
- package/dist/tabs-BgWxTTah.d.ts +0 -21
- package/dist/tabs-DK9-RHkP.js +0 -2
- package/dist/tabs-DK9-RHkP.js.map +0 -1
- package/dist/text-CKFZ9Xsj.d.ts +0 -14
- package/dist/text-Kg1xuinT.js +0 -2
- package/dist/text-Kg1xuinT.js.map +0 -1
- package/dist/textarea-Cr9_P-bV.d.ts +0 -8
- package/dist/textarea-eJQTMC_d.js +0 -2
- package/dist/textarea-eJQTMC_d.js.map +0 -1
- package/dist/theme-BwEhfTyl.d.ts +0 -22
- package/dist/theme-DZJ_cJYp.js +0 -2
- package/dist/theme-DZJ_cJYp.js.map +0 -1
- package/dist/timeline-BDY3YzeJ.d.ts +0 -61
- package/dist/timeline-pBm0t1tb.js +0 -2
- package/dist/timeline-pBm0t1tb.js.map +0 -1
- package/dist/toggle-DJJkcqDy.js +0 -2
- package/dist/toggle-DJJkcqDy.js.map +0 -1
- package/dist/toggle-group-C3iNDYqI.d.ts +0 -16
- package/dist/toggle-group-D0OIpZN-.js +0 -2
- package/dist/toggle-group-D0OIpZN-.js.map +0 -1
- package/dist/toggle-jc8s_Z3T.d.ts +0 -15
- package/dist/tooltip-BZjnEqw5.d.ts +0 -21
- package/dist/tooltip-CNUNWZvs.js +0 -2
- package/dist/tooltip-CNUNWZvs.js.map +0 -1
- package/dist/unstyled-button-C-Zs4Qv2.d.ts +0 -10
- package/dist/unstyled-button-lGbDJA55.js +0 -2
- package/dist/unstyled-button-lGbDJA55.js.map +0 -1
- package/dist/use-breakpoint-D6YACz8C.js +0 -2
- package/dist/use-breakpoint-D6YACz8C.js.map +0 -1
- package/dist/use-breakpoint-DDuQFekj.d.ts +0 -8
- package/dist/use-breakpoint-value-BDjKflDX.js +0 -2
- package/dist/use-breakpoint-value-BDjKflDX.js.map +0 -1
- package/dist/use-breakpoint-value-CRbHqGAu.d.ts +0 -8
- package/dist/use-disclosure-CNaFpYFQ.d.ts +0 -22
- package/dist/use-disclosure-Cr405eRD.js +0 -2
- package/dist/use-disclosure-Cr405eRD.js.map +0 -1
- package/dist/use-document-visibility-CoWjCswu.js +0 -2
- package/dist/use-document-visibility-CoWjCswu.js.map +0 -1
- package/dist/use-document-visibility-DIzUN4tB.d.ts +0 -6
- package/dist/use-idle-Bsi10VE9.d.ts +0 -13
- package/dist/use-idle-DgheJlxd.js +0 -2
- package/dist/use-idle-DgheJlxd.js.map +0 -1
- package/dist/use-interval-B1aNo3tA.js +0 -2
- package/dist/use-interval-B1aNo3tA.js.map +0 -1
- package/dist/use-interval-CJVmE_lC.d.ts +0 -24
- package/dist/use-local-storage-CJBqB1GC.js +0 -2
- package/dist/use-local-storage-CJBqB1GC.js.map +0 -1
- package/dist/use-local-storage-Cmq4PWJc.d.ts +0 -16
- package/dist/use-mask-DBvFShXA.js +0 -2
- package/dist/use-mask-DBvFShXA.js.map +0 -1
- package/dist/use-mask-DRJVVcdh.d.ts +0 -8
- package/dist/use-mobile-BYwiljVq.d.ts +0 -6
- package/dist/use-mobile-OMmp56u2.js +0 -2
- package/dist/use-mobile-OMmp56u2.js.map +0 -1
- package/dist/utils-DGsdoA5l.d.ts +0 -8
- package/dist/utils-DP9KtG7I.js +0 -2
- package/dist/utils-DP9KtG7I.js.map +0 -1
- package/dist/visibility-_3zV3l-A.d.ts +0 -17
- package/dist/visibility-twHwe9Xp.js +0 -2
- package/dist/visibility-twHwe9Xp.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-Bdj-bS2b.js";import{t as e}from"./utils-DP9KtG7I.js";import{t}from"./button-oI3hbOgp.js";import{t as n}from"./calendar-CW1kGXom.js";import{t as r}from"./input-CJLsPlXh.js";import{r as i,s as a,t as o}from"./popover-BtX3tX8M.js";import{IconArrowRight as s,IconCalendar as c,IconChevronDown as l}from"@tabler/icons-react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import*as p from"react";const m=p.createContext(null),h=[{label:`Hoje`,getRange:()=>{let e=startOfDay(new Date);return{from:e,to:e}}},{label:`Ontem`,getRange:()=>{let e=addDays(startOfDay(new Date),-1);return{from:e,to:e}}},{label:`Últimos 7 dias`,getRange:()=>{let e=startOfDay(new Date);return{from:addDays(e,-7),to:e}}},{label:`Últimos 15 dias`,getRange:()=>{let e=startOfDay(new Date);return{from:addDays(e,-15),to:e}}},{label:`Últimos 30 dias`,getRange:()=>{let e=startOfDay(new Date);return{from:addDays(e,-30),to:e}}},{label:`Últimos 60 dias`,getRange:()=>{let e=startOfDay(new Date);return{from:addDays(e,-60),to:e}}},{label:`Últimos 90 dias`,getRange:()=>{let e=startOfDay(new Date);return{from:addDays(e,-90),to:e}}},{label:`Semana passada`,getRange:()=>{let e=addDays(startOfWeek(new Date),-7);return{from:e,to:addDays(e,6)}}},{label:`Este mês`,getRange:()=>{let e=startOfDay(new Date);return{from:startOfMonth(e),to:e}}},{label:`Mês passado`,getRange:()=>{let e=new Date(new Date().getFullYear(),new Date().getMonth()-1,1);return{from:startOfMonth(e),to:endOfMonth(e)}}}];function DateRangePicker({value:e,defaultValue:t=null,onValueChange:n,onApply:r,onReset:i,open:a,defaultOpen:s=!1,onOpenChange:c,locale:l,placeholder:h=`Selecione um período`,children:g,..._}){let[v,y]=p.useState(t),[b,x]=p.useState(s),S=e!==void 0,C=a!==void 0,w=S?e??null:v,T=C?a:b,[E,D]=p.useState(()=>toDraft(w)),[O,k]=p.useState(()=>getRangeMonth(toDraft(w))),A=p.useCallback(e=>{let t=normalizeDraft(e);D(t);let n=getRangeMonth(t);n&&k(n)},[]),j=p.useCallback(e=>{S||y(e),n?.(e)},[S,n]),M=p.useCallback(e=>{if(e){let e=toDraft(w);D(e),k(getRangeMonth(e))}C||x(e),c?.(e)},[C,c,w]),N=p.useCallback(()=>{let e=toValue(E);j(e),r?.(e),M(!1)},[j,E,r,M]),P=p.useCallback(()=>{D(void 0),j(null),i?.(),M(!1)},[j,i,M]),F=p.useMemo(()=>({value:w,draft:E,month:O,locale:l,placeholder:h,setDraft:A,setMonth:k,apply:N,reset:P}),[N,E,l,O,h,P,A,w]);return d(m.Provider,{value:F,children:d(o,{open:T,onOpenChange:M,..._,children:g??f(u,{children:[d(DateRangePickerTrigger,{}),f(DateRangePickerContent,{children:[d(DateRangePickerPresets,{}),d(DateRangePickerDateFields,{}),d(DateRangePickerCalendar,{}),d(DateRangePickerActions,{})]})]})})})}function DateRangePickerTrigger({className:n,children:r,asChild:i=!1,variant:o=`outline`,color:s=`zinc`,type:p=`button`,...m}){return i?d(a,{asChild:!0,children:r}):d(a,{asChild:!0,children:d(t,{type:p,variant:o,color:s,className:e(`min-w-64 justify-between font-normal`,n),...m,children:r??f(u,{children:[d(c,{"data-icon":`inline-start`,className:`size-4 text-muted-foreground`}),d(DateRangePickerValue,{className:`flex-1 text-left`}),d(l,{"data-icon":`inline-end`,className:`size-4 text-muted-foreground`})]})})})}function DateRangePickerValue({className:t,placeholder:n,...r}){let{value:i,locale:a,placeholder:o}=useDateRangePicker();return d(`span`,{"data-slot":`date-range-picker-value`,className:e(`truncate`,t),...r,children:formatRange(i,a,n??o)})}function DateRangePickerContent({className:t,align:n=`start`,sideOffset:r=8,children:a,...o}){let s=p.Children.toArray(a),c=s.filter(isDateRangePickerPresetsElement),l=s.filter(e=>!isDateRangePickerPresetsElement(e));return d(i,{align:n,sideOffset:r,className:e(`w-[calc(100vw-(--spacing(4)))] max-w-2xl p-2`,t),...o,children:f(`div`,{"data-slot":`date-range-picker-content`,className:`grid gap-3 md:grid-cols-[10rem_minmax(0,1fr)]`,children:[c,d(`div`,{className:`flex min-w-0 flex-col gap-3`,children:l})]})})}function DateRangePickerPresets({className:t,presets:n=h,...r}){let{draft:i,setDraft:a}=useDateRangePicker(),o=getRelativeDaysValue(i,`today`),s=getRelativeDaysValue(i,`yesterday`);return f(`div`,{"data-slot":`date-range-picker-presets`,className:e(`hidden flex-col border-border pr-3 md:flex md:border-r`,t),...r,children:[n.map(e=>{let t=e.getRange();return d(DateRangePickerPreset,{type:`button`,selected:isSameRange(i,t),onClick:()=>a(t),children:e.label},e.label)}),f(`div`,{className:`my-3 flex flex-col gap-2`,children:[d(DateRangePickerRelativeField,{label:`Dias até hoje`,value:o,onValueChange:e=>a(getRelativeDaysRange(e,`today`))}),d(DateRangePickerRelativeField,{label:`Dias até ontem`,value:s,onValueChange:e=>a(getRelativeDaysRange(e,`yesterday`))})]})]})}function DateRangePickerPreset({className:t,selected:n=!1,...r}){return d(`button`,{"data-slot":`date-range-picker-preset`,"data-selected":n,className:e(`flex h-8.5 w-full items-center border-l-3 border-border bg-transparent px-2 text-left text-sm text-foreground transition-colors outline-none`,`hover:border-primary hover:bg-primary-50 hover:text-primary-700 dark:hover:bg-primary-950 dark:hover:text-primary-300`,`focus-visible:border-primary focus-visible:ring-3 focus-visible:ring-ring/50`,`data-[selected=true]:border-primary data-[selected=true]:bg-primary-50 data-[selected=true]:text-primary-700 dark:data-[selected=true]:bg-primary-950 dark:data-[selected=true]:text-primary-300`,t),"aria-pressed":n,...r})}function DateRangePickerRelativeField({label:e,value:t,onValueChange:n}){let i=p.useId(),[a,o]=p.useState(()=>formatRelativeInputValue(t));return p.useEffect(()=>{o(formatRelativeInputValue(t))},[t]),f(`div`,{className:`flex items-center gap-2 text-sm text-foreground`,children:[d(r,{id:i,type:`number`,name:e,min:1,step:1,value:a,className:`h-7 w-9 rounded-md px-1 text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none`,"aria-label":e,onChange:e=>{let t=e.target.value;if(o(t),t===``)return;let r=parsePositiveInteger(t);r&&n(r)}}),d(`label`,{htmlFor:i,children:e})]})}function DateRangePickerCalendar({className:t,showOutsideDays:r=!1,onMonthChange:i,...a}){let{draft:o,locale:s,month:c,setDraft:l,setMonth:u}=useDateRangePicker();return d(n,{mode:`range`,numberOfMonths:2,showOutsideDays:r,month:c,onMonthChange:e=>{u(e),i?.(e)},selected:o,onSelect:l,locale:s,className:e(`mx-auto bg-transparent p-0`,t),...a})}function DateRangePickerDateFields({className:t,...n}){let{draft:i,setDraft:a}=useDateRangePicker();return f(`div`,{"data-slot":`date-range-picker-date-fields`,className:e(`pb-2 border-b flex justify-between gap-2 flex-wrap flex-col sm:flex-row sm:items-center`,t),...n,children:[d(r,{type:`date`,value:formatInputDate(i?.from),className:`sm:w-max`,onChange:e=>{if(e.target.value===``){a(void 0);return}let t=parseInputDate(e.target.value);t&&a(normalizeDraft({from:t,to:i?.to}))}}),d(s,{className:`size-4 text-primary hidden sm:block`}),d(r,{type:`date`,value:formatInputDate(i?.to),className:`sm:w-max`,onChange:e=>{if(e.target.value===``){a(void 0);return}let t=parseInputDate(e.target.value);t&&a(normalizeDraft({from:i?.from,to:t}))}})]})}function DateRangePickerActions({className:t,children:n,...r}){return d(`div`,{"data-slot":`date-range-picker-actions`,className:e(`flex items-center gap-2 mt-auto`,t),...r,children:n??f(u,{children:[d(DateRangePickerReset,{}),d(DateRangePickerApply,{})]})})}function DateRangePickerApply({children:n=`Aplicar`,onClick:r,className:i,...a}){let{apply:o}=useDateRangePicker();return d(t,{size:`sm`,className:e(`flex-1`,i),onClick:e=>{r?.(e),e.defaultPrevented||o()},...a,children:n})}function DateRangePickerReset({children:n=`Resetar`,onClick:r,variant:i=`outline`,color:a=`zinc`,className:o,...s}){let{reset:c}=useDateRangePicker();return d(t,{size:`sm`,className:e(`flex-1`,o),variant:i,color:a,onClick:e=>{r?.(e),e.defaultPrevented||c()},...s,children:n})}function useDateRangePicker(){let e=p.useContext(m);if(!e)throw Error(`DateRangePicker components must be used within DateRangePicker.`);return e}function isDateRangePickerPresetsElement(e){return p.isValidElement(e)&&e.type===DateRangePickerPresets}function toDraft(e){return normalizeDraft(e??void 0)}function toValue(e){return normalizeDraft(e)??null}function getRangeMonth(e){return startOfDay(e?.from??e?.to??new Date)}function normalizeDraft(e){if(!(!e?.from&&!e?.to))return e.from&&e.to&&e.from>e.to?{from:startOfDay(e.to),to:startOfDay(e.from)}:{from:e.from?startOfDay(e.from):void 0,to:e.to?startOfDay(e.to):void 0}}function formatRange(e,t,n){return!e?.from&&!e?.to?n:e.from&&e.to?`${formatDisplayDate(e.from,t)} - ${formatDisplayDate(e.to,t)}`:formatDisplayDate(e.from??e.to,t)}function formatDisplayDate(e,t){return e?new Intl.DateTimeFormat(t?.code??`pt-BR`,{day:`2-digit`,month:`2-digit`,year:`numeric`}).format(e):``}function formatInputDate(e){return e?`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`:``}function parseInputDate(e){if(!e)return;let t=/^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/.exec(e);if(!t?.groups)return;let n=Number(t.groups.year),r=Number(t.groups.month),i=Number(t.groups.day),a=new Date(n,r-1,i);if(a.getFullYear()===n&&a.getMonth()===r-1&&a.getDate()===i)return a}function parsePositiveInteger(e){if(!e)return;let t=Number(e);if(!(!Number.isInteger(t)||t<1))return t}function formatRelativeInputValue(e){return e?String(e):``}function getRelativeDaysRange(e,t){let n=startOfDay(new Date),r=t===`today`?addDays(n,-1):addDays(n,-2);return{from:addDays(r,-e+1),to:r}}function getRelativeDaysValue(e,t){if(!e?.from||!e.to)return;let n=startOfDay(new Date),r=t===`today`?addDays(n,-1):addDays(n,-2);if(!isSameDay(e.to,r))return;let i=differenceInCalendarDays(r,startOfDay(e.from))+1;return i>0?i:void 0}function isSameRange(e,t){return isSameDay(e?.from,t?.from)&&isSameDay(e?.to,t?.to)}function isSameDay(e,t){return!e||!t?e===t:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function startOfDay(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function startOfWeek(e){let t=startOfDay(e);return addDays(t,-t.getDay())}function startOfMonth(e){return new Date(e.getFullYear(),e.getMonth(),1)}function endOfMonth(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function differenceInCalendarDays(e,t){return Math.round((startOfDay(e).getTime()-startOfDay(t).getTime())/(1440*60*1e3))}function addDays(e,t){let n=startOfDay(e);return n.setDate(n.getDate()+t),n}export{DateRangePickerContent as a,DateRangePickerPresets as c,DateRangePickerValue as d,DateRangePickerCalendar as i,DateRangePickerReset as l,DateRangePickerActions as n,DateRangePickerDateFields as o,DateRangePickerApply as r,DateRangePickerPreset as s,DateRangePicker as t,DateRangePickerTrigger as u};
|
|
2
|
-
//# sourceMappingURL=date-range-picker-BjkVzFWQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date-range-picker-BjkVzFWQ.js","names":[],"sources":["../src/components/date-range-picker.tsx"],"sourcesContent":["import * as React from 'react'\nimport type { Locale } from 'react-day-picker'\n\nimport { IconArrowRight, IconCalendar, IconChevronDown } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\nimport { Calendar, type DateRange } from './calendar'\nimport { Input } from './input'\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\n\ntype DateRangePickerContextValue = {\n value: DateRange | null\n draft: DateRange | undefined\n month: Date\n locale?: Partial<Locale>\n placeholder: string\n setDraft: (range: DateRange | undefined) => void\n setMonth: (month: Date) => void\n apply: () => void\n reset: () => void\n}\n\nconst DateRangePickerContext = React.createContext<DateRangePickerContextValue | null>(null)\n\nconst defaultPlaceholder = 'Selecione um período'\n\nconst defaultPresetDefinitions = [\n {\n label: 'Hoje',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: today, to: today }\n }\n },\n {\n label: 'Ontem',\n getRange: () => {\n const yesterday = addDays(startOfDay(new Date()), -1)\n return { from: yesterday, to: yesterday }\n }\n },\n {\n label: 'Últimos 7 dias',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: addDays(today, -7), to: today }\n }\n },\n {\n label: 'Últimos 15 dias',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: addDays(today, -15), to: today }\n }\n },\n {\n label: 'Últimos 30 dias',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: addDays(today, -30), to: today }\n }\n },\n {\n label: 'Últimos 60 dias',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: addDays(today, -60), to: today }\n }\n },\n {\n label: 'Últimos 90 dias',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: addDays(today, -90), to: today }\n }\n },\n {\n label: 'Semana passada',\n getRange: () => {\n const previousWeekStart = addDays(startOfWeek(new Date()), -7)\n return { from: previousWeekStart, to: addDays(previousWeekStart, 6) }\n }\n },\n {\n label: 'Este mês',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: startOfMonth(today), to: today }\n }\n },\n {\n label: 'Mês passado',\n getRange: () => {\n const previousMonth = new Date(new Date().getFullYear(), new Date().getMonth() - 1, 1)\n return { from: startOfMonth(previousMonth), to: endOfMonth(previousMonth) }\n }\n }\n] satisfies DateRangePickerPresetOption[]\n\nexport type DateRangePickerPresetOption = {\n label: string\n getRange: () => DateRange\n}\n\nexport type DateRangePickerProps = Omit<\n React.ComponentProps<typeof Popover>,\n 'open' | 'defaultOpen' | 'onOpenChange'\n> & {\n value?: DateRange | null\n defaultValue?: DateRange | null\n onValueChange?: (range: DateRange | null) => void\n onApply?: (range: DateRange | null) => void\n onReset?: () => void\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?: (open: boolean) => void\n locale?: Partial<Locale>\n placeholder?: string\n}\n\nexport type DateRangePickerTriggerProps = React.ComponentProps<typeof Button> & {\n asChild?: boolean\n}\n\nexport type DateRangePickerValueProps = React.ComponentProps<'span'> & {\n placeholder?: string\n}\n\nexport type DateRangePickerContentProps = React.ComponentProps<typeof PopoverContent>\n\nexport type DateRangePickerPresetsProps = React.ComponentProps<'div'> & {\n presets?: DateRangePickerPresetOption[]\n}\n\nexport type DateRangePickerPresetProps = React.ComponentProps<'button'> & {\n selected?: boolean\n}\n\nexport type DateRangePickerCalendarProps = Omit<\n React.ComponentProps<typeof Calendar>,\n 'mode' | 'numberOfMonths' | 'selected' | 'onSelect' | 'month' | 'defaultMonth'\n>\n\nexport type DateRangePickerDateFieldsProps = React.ComponentProps<'div'>\n\nexport type DateRangePickerActionsProps = React.ComponentProps<'div'>\n\nexport type DateRangePickerApplyProps = React.ComponentProps<typeof Button>\n\nexport type DateRangePickerResetProps = React.ComponentProps<typeof Button>\n\nfunction DateRangePicker({\n value: valueProp,\n defaultValue = null,\n onValueChange,\n onApply,\n onReset,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n locale,\n placeholder = defaultPlaceholder,\n children,\n ...props\n}: DateRangePickerProps) {\n const [uncontrolledValue, setUncontrolledValue] = React.useState<DateRange | null>(defaultValue)\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n\n const isValueControlled = valueProp !== undefined\n const isOpenControlled = openProp !== undefined\n const value = isValueControlled ? (valueProp ?? null) : uncontrolledValue\n const open = isOpenControlled ? openProp : uncontrolledOpen\n\n const [draft, setDraft] = React.useState<DateRange | undefined>(() => toDraft(value))\n const [month, setMonth] = React.useState<Date>(() => getRangeMonth(toDraft(value)))\n\n const updateDraft = React.useCallback((nextDraft: DateRange | undefined) => {\n const normalizedDraft = normalizeDraft(nextDraft)\n setDraft(normalizedDraft)\n\n const nextMonth = getRangeMonth(normalizedDraft)\n if (nextMonth) {\n setMonth(nextMonth)\n }\n }, [])\n\n const commitValue = React.useCallback(\n (nextValue: DateRange | null) => {\n if (!isValueControlled) {\n setUncontrolledValue(nextValue)\n }\n\n onValueChange?.(nextValue)\n },\n [isValueControlled, onValueChange]\n )\n\n const setOpen = React.useCallback(\n (nextOpen: boolean) => {\n if (nextOpen) {\n const nextDraft = toDraft(value)\n setDraft(nextDraft)\n setMonth(getRangeMonth(nextDraft))\n }\n\n if (!isOpenControlled) {\n setUncontrolledOpen(nextOpen)\n }\n\n onOpenChange?.(nextOpen)\n },\n [isOpenControlled, onOpenChange, value]\n )\n\n const apply = React.useCallback(() => {\n const nextValue = toValue(draft)\n commitValue(nextValue)\n onApply?.(nextValue)\n setOpen(false)\n }, [commitValue, draft, onApply, setOpen])\n\n const reset = React.useCallback(() => {\n setDraft(undefined)\n commitValue(null)\n onReset?.()\n setOpen(false)\n }, [commitValue, onReset, setOpen])\n\n const context = React.useMemo<DateRangePickerContextValue>(\n () => ({\n value,\n draft,\n month,\n locale,\n placeholder,\n setDraft: updateDraft,\n setMonth,\n apply,\n reset\n }),\n [apply, draft, locale, month, placeholder, reset, updateDraft, value]\n )\n\n return (\n <DateRangePickerContext.Provider value={context}>\n <Popover open={open} onOpenChange={setOpen} {...props}>\n {children ?? (\n <>\n <DateRangePickerTrigger />\n <DateRangePickerContent>\n <DateRangePickerPresets />\n <DateRangePickerDateFields />\n <DateRangePickerCalendar />\n <DateRangePickerActions />\n </DateRangePickerContent>\n </>\n )}\n </Popover>\n </DateRangePickerContext.Provider>\n )\n}\n\nfunction DateRangePickerTrigger({\n className,\n children,\n asChild = false,\n variant = 'outline',\n color = 'zinc',\n type = 'button',\n ...props\n}: DateRangePickerTriggerProps) {\n if (asChild) {\n return <PopoverTrigger asChild>{children}</PopoverTrigger>\n }\n\n return (\n <PopoverTrigger asChild>\n <Button\n type={type}\n variant={variant}\n color={color}\n className={cn('min-w-64 justify-between font-normal', className)}\n {...props}\n >\n {children ?? (\n <>\n <IconCalendar data-icon=\"inline-start\" className=\"size-4 text-muted-foreground\" />\n <DateRangePickerValue className=\"flex-1 text-left\" />\n <IconChevronDown data-icon=\"inline-end\" className=\"size-4 text-muted-foreground\" />\n </>\n )}\n </Button>\n </PopoverTrigger>\n )\n}\n\nfunction DateRangePickerValue({ className, placeholder, ...props }: DateRangePickerValueProps) {\n const { value, locale, placeholder: contextPlaceholder } = useDateRangePicker()\n\n return (\n <span data-slot=\"date-range-picker-value\" className={cn('truncate', className)} {...props}>\n {formatRange(value, locale, placeholder ?? contextPlaceholder)}\n </span>\n )\n}\n\nfunction DateRangePickerContent({\n className,\n align = 'start',\n sideOffset = 8,\n children,\n ...props\n}: DateRangePickerContentProps) {\n const childArray = React.Children.toArray(children)\n const presets = childArray.filter(isDateRangePickerPresetsElement)\n const content = childArray.filter((child) => !isDateRangePickerPresetsElement(child))\n\n return (\n <PopoverContent\n align={align}\n sideOffset={sideOffset}\n className={cn('w-[calc(100vw-(--spacing(4)))] max-w-2xl p-2', className)}\n {...props}\n >\n <div data-slot=\"date-range-picker-content\" className=\"grid gap-3 md:grid-cols-[10rem_minmax(0,1fr)]\">\n {presets}\n <div className=\"flex min-w-0 flex-col gap-3\">{content}</div>\n </div>\n </PopoverContent>\n )\n}\n\nfunction DateRangePickerPresets({\n className,\n presets = defaultPresetDefinitions,\n ...props\n}: DateRangePickerPresetsProps) {\n const { draft, setDraft } = useDateRangePicker()\n const todayRelativeValue = getRelativeDaysValue(draft, 'today')\n const yesterdayRelativeValue = getRelativeDaysValue(draft, 'yesterday')\n\n return (\n <div\n data-slot=\"date-range-picker-presets\"\n className={cn('hidden flex-col border-border pr-3 md:flex md:border-r', className)}\n {...props}\n >\n {presets.map((preset) => {\n const range = preset.getRange()\n const selected = isSameRange(draft, range)\n\n return (\n <DateRangePickerPreset key={preset.label} type=\"button\" selected={selected} onClick={() => setDraft(range)}>\n {preset.label}\n </DateRangePickerPreset>\n )\n })}\n\n <div className=\"my-3 flex flex-col gap-2\">\n <DateRangePickerRelativeField\n label=\"Dias até hoje\"\n value={todayRelativeValue}\n onValueChange={(days) => setDraft(getRelativeDaysRange(days, 'today'))}\n />\n <DateRangePickerRelativeField\n label=\"Dias até ontem\"\n value={yesterdayRelativeValue}\n onValueChange={(days) => setDraft(getRelativeDaysRange(days, 'yesterday'))}\n />\n </div>\n </div>\n )\n}\n\nfunction DateRangePickerPreset({ className, selected = false, ...props }: DateRangePickerPresetProps) {\n return (\n <button\n data-slot=\"date-range-picker-preset\"\n data-selected={selected}\n className={cn(\n 'flex h-8.5 w-full items-center border-l-3 border-border bg-transparent px-2 text-left text-sm text-foreground transition-colors outline-none',\n 'hover:border-primary hover:bg-primary-50 hover:text-primary-700 dark:hover:bg-primary-950 dark:hover:text-primary-300',\n 'focus-visible:border-primary focus-visible:ring-3 focus-visible:ring-ring/50',\n 'data-[selected=true]:border-primary data-[selected=true]:bg-primary-50 data-[selected=true]:text-primary-700 dark:data-[selected=true]:bg-primary-950 dark:data-[selected=true]:text-primary-300',\n className\n )}\n aria-pressed={selected}\n {...props}\n />\n )\n}\n\nfunction DateRangePickerRelativeField({\n label,\n value,\n onValueChange\n}: {\n label: string\n value: number | undefined\n onValueChange: (days: number) => void\n}) {\n const id = React.useId()\n const [inputValue, setInputValue] = React.useState(() => formatRelativeInputValue(value))\n\n React.useEffect(() => {\n setInputValue(formatRelativeInputValue(value))\n }, [value])\n\n return (\n <div className=\"flex items-center gap-2 text-sm text-foreground\">\n <Input\n id={id}\n type=\"number\"\n name={label}\n min={1}\n step={1}\n value={inputValue}\n className=\"h-7 w-9 rounded-md px-1 text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none\"\n aria-label={label}\n onChange={(event) => {\n const nextValue = event.target.value\n setInputValue(nextValue)\n\n if (nextValue === '') return\n\n const days = parsePositiveInteger(nextValue)\n if (!days) return\n onValueChange(days)\n }}\n />\n <label htmlFor={id}>{label}</label>\n </div>\n )\n}\n\nfunction DateRangePickerCalendar({\n className,\n showOutsideDays = false,\n onMonthChange,\n ...props\n}: DateRangePickerCalendarProps) {\n const { draft, locale, month, setDraft, setMonth } = useDateRangePicker()\n\n return (\n <Calendar\n mode=\"range\"\n numberOfMonths={2}\n showOutsideDays={showOutsideDays}\n month={month}\n onMonthChange={(nextMonth) => {\n setMonth(nextMonth)\n onMonthChange?.(nextMonth)\n }}\n selected={draft}\n onSelect={setDraft}\n locale={locale}\n className={cn('mx-auto bg-transparent p-0', className)}\n {...props}\n />\n )\n}\n\nfunction DateRangePickerDateFields({ className, ...props }: DateRangePickerDateFieldsProps) {\n const { draft, setDraft } = useDateRangePicker()\n\n return (\n <div\n data-slot=\"date-range-picker-date-fields\"\n className={cn(\n 'pb-2 border-b flex justify-between gap-2 flex-wrap flex-col sm:flex-row sm:items-center',\n className\n )}\n {...props}\n >\n <Input\n type=\"date\"\n value={formatInputDate(draft?.from)}\n className=\"sm:w-max\"\n onChange={(event) => {\n if (event.target.value === '') {\n setDraft(undefined)\n return\n }\n\n const date = parseInputDate(event.target.value)\n if (!date) return\n setDraft(normalizeDraft({ from: date, to: draft?.to }))\n }}\n />\n <IconArrowRight className=\"size-4 text-primary hidden sm:block\" />\n <Input\n type=\"date\"\n value={formatInputDate(draft?.to)}\n className=\"sm:w-max\"\n onChange={(event) => {\n if (event.target.value === '') {\n setDraft(undefined)\n return\n }\n\n const date = parseInputDate(event.target.value)\n if (!date) return\n setDraft(normalizeDraft({ from: draft?.from, to: date }))\n }}\n />\n </div>\n )\n}\n\nfunction DateRangePickerActions({ className, children, ...props }: DateRangePickerActionsProps) {\n return (\n <div data-slot=\"date-range-picker-actions\" className={cn('flex items-center gap-2 mt-auto', className)} {...props}>\n {children ?? (\n <>\n <DateRangePickerReset />\n <DateRangePickerApply />\n </>\n )}\n </div>\n )\n}\n\nfunction DateRangePickerApply({ children = 'Aplicar', onClick, className, ...props }: DateRangePickerApplyProps) {\n const { apply } = useDateRangePicker()\n\n return (\n <Button\n size=\"sm\"\n className={cn('flex-1', className)}\n onClick={(event) => {\n onClick?.(event)\n if (!event.defaultPrevented) {\n apply()\n }\n }}\n {...props}\n >\n {children}\n </Button>\n )\n}\n\nfunction DateRangePickerReset({\n children = 'Resetar',\n onClick,\n variant = 'outline',\n color = 'zinc',\n className,\n ...props\n}: DateRangePickerResetProps) {\n const { reset } = useDateRangePicker()\n\n return (\n <Button\n size=\"sm\"\n className={cn('flex-1', className)}\n variant={variant}\n color={color}\n onClick={(event) => {\n onClick?.(event)\n if (!event.defaultPrevented) {\n reset()\n }\n }}\n {...props}\n >\n {children}\n </Button>\n )\n}\n\nfunction useDateRangePicker() {\n const context = React.useContext(DateRangePickerContext)\n\n if (!context) {\n throw new Error('DateRangePicker components must be used within DateRangePicker.')\n }\n\n return context\n}\n\nfunction isDateRangePickerPresetsElement(child: React.ReactNode) {\n return React.isValidElement(child) && child.type === DateRangePickerPresets\n}\n\nfunction toDraft(range: DateRange | null | undefined) {\n return normalizeDraft(range ?? undefined)\n}\n\nfunction toValue(range: DateRange | undefined): DateRange | null {\n return normalizeDraft(range) ?? null\n}\n\nfunction getRangeMonth(range: DateRange | undefined) {\n return startOfDay(range?.from ?? range?.to ?? new Date())\n}\n\nfunction normalizeDraft(range: DateRange | undefined): DateRange | undefined {\n if (!range?.from && !range?.to) return undefined\n\n if (range.from && range.to && range.from > range.to) {\n return { from: startOfDay(range.to), to: startOfDay(range.from) }\n }\n\n return {\n from: range.from ? startOfDay(range.from) : undefined,\n to: range.to ? startOfDay(range.to) : undefined\n }\n}\n\nfunction formatRange(range: DateRange | null | undefined, locale: Partial<Locale> | undefined, placeholder: string) {\n if (!range?.from && !range?.to) return placeholder\n\n if (range.from && range.to) {\n return `${formatDisplayDate(range.from, locale)} - ${formatDisplayDate(range.to, locale)}`\n }\n\n return formatDisplayDate(range.from ?? range.to, locale)\n}\n\nfunction formatDisplayDate(date: Date | undefined, locale: Partial<Locale> | undefined) {\n if (!date) return ''\n\n return new Intl.DateTimeFormat(locale?.code ?? 'pt-BR', {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric'\n }).format(date)\n}\n\nfunction formatInputDate(date: Date | undefined) {\n if (!date) return ''\n\n const year = date.getFullYear()\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n\n return `${year}-${month}-${day}`\n}\n\nfunction parseInputDate(value: string) {\n if (!value) return undefined\n\n const match = /^(?<year>\\d{4})-(?<month>\\d{2})-(?<day>\\d{2})$/.exec(value)\n if (!match?.groups) return undefined\n\n const year = Number(match.groups.year)\n const month = Number(match.groups.month)\n const day = Number(match.groups.day)\n const date = new Date(year, month - 1, day)\n\n if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {\n return undefined\n }\n\n return date\n}\n\nfunction parsePositiveInteger(value: string) {\n if (!value) return undefined\n\n const days = Number(value)\n if (!Number.isInteger(days) || days < 1) return undefined\n\n return days\n}\n\nfunction formatRelativeInputValue(value: number | undefined) {\n return value ? String(value) : ''\n}\n\nfunction getRelativeDaysRange(days: number, target: 'today' | 'yesterday'): DateRange {\n const today = startOfDay(new Date())\n const targetDate = target === 'today' ? addDays(today, -1) : addDays(today, -2)\n\n return {\n from: addDays(targetDate, -days + 1),\n to: targetDate\n }\n}\n\nfunction getRelativeDaysValue(range: DateRange | undefined, target: 'today' | 'yesterday') {\n if (!range?.from || !range.to) return undefined\n\n const today = startOfDay(new Date())\n const targetDate = target === 'today' ? addDays(today, -1) : addDays(today, -2)\n if (!isSameDay(range.to, targetDate)) return undefined\n\n const days = differenceInCalendarDays(targetDate, startOfDay(range.from)) + 1\n return days > 0 ? days : undefined\n}\n\nfunction isSameRange(left: DateRange | undefined, right: DateRange | undefined) {\n return isSameDay(left?.from, right?.from) && isSameDay(left?.to, right?.to)\n}\n\nfunction isSameDay(left: Date | undefined, right: Date | undefined) {\n if (!left || !right) return left === right\n\n return (\n left.getFullYear() === right.getFullYear() &&\n left.getMonth() === right.getMonth() &&\n left.getDate() === right.getDate()\n )\n}\n\nfunction startOfDay(date: Date) {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate())\n}\n\nfunction startOfWeek(date: Date) {\n const day = startOfDay(date)\n return addDays(day, -day.getDay())\n}\n\nfunction startOfMonth(date: Date) {\n return new Date(date.getFullYear(), date.getMonth(), 1)\n}\n\nfunction endOfMonth(date: Date) {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0)\n}\n\nfunction differenceInCalendarDays(left: Date, right: Date) {\n const millisecondsPerDay = 24 * 60 * 60 * 1000\n return Math.round((startOfDay(left).getTime() - startOfDay(right).getTime()) / millisecondsPerDay)\n}\n\nfunction addDays(date: Date, amount: number) {\n const nextDate = startOfDay(date)\n nextDate.setDate(nextDate.getDate() + amount)\n return nextDate\n}\n\nexport {\n type DateRange,\n DateRangePicker,\n DateRangePickerActions,\n DateRangePickerApply,\n DateRangePickerCalendar,\n DateRangePickerContent,\n DateRangePickerDateFields,\n DateRangePickerPreset,\n DateRangePickerPresets,\n DateRangePickerReset,\n DateRangePickerTrigger,\n DateRangePickerValue\n}\n"],"mappings":"kbAuBA,MAAM,EAAyB,EAAM,cAAkD,IAAI,EAIrF,EAA2B,CAC/B,CACE,MAAO,OACP,aAAgB,CACd,IAAM,EAAQ,WAAW,IAAI,IAAM,EACnC,MAAO,CAAE,KAAM,EAAO,GAAI,CAAM,CAClC,CACF,EACA,CACE,MAAO,QACP,aAAgB,CACd,IAAM,EAAY,QAAQ,WAAW,IAAI,IAAM,EAAG,EAAE,EACpD,MAAO,CAAE,KAAM,EAAW,GAAI,CAAU,CAC1C,CACF,EACA,CACE,MAAO,iBACP,aAAgB,CACd,IAAM,EAAQ,WAAW,IAAI,IAAM,EACnC,MAAO,CAAE,KAAM,QAAQ,EAAO,EAAE,EAAG,GAAI,CAAM,CAC/C,CACF,EACA,CACE,MAAO,kBACP,aAAgB,CACd,IAAM,EAAQ,WAAW,IAAI,IAAM,EACnC,MAAO,CAAE,KAAM,QAAQ,EAAO,GAAG,EAAG,GAAI,CAAM,CAChD,CACF,EACA,CACE,MAAO,kBACP,aAAgB,CACd,IAAM,EAAQ,WAAW,IAAI,IAAM,EACnC,MAAO,CAAE,KAAM,QAAQ,EAAO,GAAG,EAAG,GAAI,CAAM,CAChD,CACF,EACA,CACE,MAAO,kBACP,aAAgB,CACd,IAAM,EAAQ,WAAW,IAAI,IAAM,EACnC,MAAO,CAAE,KAAM,QAAQ,EAAO,GAAG,EAAG,GA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AU,EAAwB,EAAyB,CAGlE,MAFI,CAAC,GAAQ,CAAC,EAAc,IAAS,EAGnC,EAAK,YAAY,IAAM,EAAM,YAAY,GACzC,EAAK,SAAS,IAAM,EAAM,SAAS,GACnC,EAAK,QAAQ,IAAM,EAAM,QAAQ,CAErC,CAEA,SAAS,WAAW,EAAY,CAC9B,OAAO,IAAI,KAAK,EAAK,YAAY,EAAG,EAAK,SAAS,EAAG,EAAK,QAAQ,CAAC,CACrE,CAEA,SAAS,YAAY,EAAY,CAC/B,IAAM,EAAM,WAAW,CAAI,EAC3B,OAAO,QAAQ,EAAK,CAAC,EAAI,OAAO,CAAC,CACnC,CAEA,SAAS,aAAa,EAAY,CAChC,OAAO,IAAI,KAAK,EAAK,YAAY,EAAG,EAAK,SAAS,EAAG,CAAC,CACxD,CAEA,SAAS,WAAW,EAAY,CAC9B,OAAO,IAAI,KAAK,EAAK,YAAY,EAAG,EAAK,SAAS,EAAI,EAAG,CAAC,CAC5D,CAEA,SAAS,yBAAyB,EAAY,EAAa,CAEzD,OAAO,KAAK,OAAO,WAAW,CAAI,CAAC,CAAC,QAAQ,EAAI,WAAW,CAAK,CAAC,CAAC,QAAQ,IAD/C,KAAU,GAAK,IACuD,CACnG,CAEA,SAAS,QAAQ,EAAY,EAAgB,CAC3C,IAAM,EAAW,WAAW,CAAI,EAEhC,OADA,EAAS,QAAQ,EAAS,QAAQ,EAAI,CAAM,EACrC,CACT"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { n as __name } from "./rolldown-runtime-Bdj-bS2b.js";
|
|
2
|
-
import { t as Button } from "./button-BNGy28pv.js";
|
|
3
|
-
import { a as DateRange, t as Calendar } from "./calendar-C1GgjzIA.js";
|
|
4
|
-
import { i as PopoverContent, t as Popover } from "./popover-DchAqyKn.js";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
import { Locale } from "react-day-picker";
|
|
7
|
-
//#region src/components/date-range-picker.d.ts
|
|
8
|
-
type DateRangePickerPresetOption = {
|
|
9
|
-
label: string;
|
|
10
|
-
getRange: () => DateRange;
|
|
11
|
-
};
|
|
12
|
-
type DateRangePickerProps = Omit<React.ComponentProps<typeof Popover>, 'open' | 'defaultOpen' | 'onOpenChange'> & {
|
|
13
|
-
value?: DateRange | null;
|
|
14
|
-
defaultValue?: DateRange | null;
|
|
15
|
-
onValueChange?: (range: DateRange | null) => void;
|
|
16
|
-
onApply?: (range: DateRange | null) => void;
|
|
17
|
-
onReset?: () => void;
|
|
18
|
-
open?: boolean;
|
|
19
|
-
defaultOpen?: boolean;
|
|
20
|
-
onOpenChange?: (open: boolean) => void;
|
|
21
|
-
locale?: Partial<Locale>;
|
|
22
|
-
placeholder?: string;
|
|
23
|
-
};
|
|
24
|
-
type DateRangePickerTriggerProps = React.ComponentProps<typeof Button> & {
|
|
25
|
-
asChild?: boolean;
|
|
26
|
-
};
|
|
27
|
-
type DateRangePickerValueProps = React.ComponentProps<'span'> & {
|
|
28
|
-
placeholder?: string;
|
|
29
|
-
};
|
|
30
|
-
type DateRangePickerContentProps = React.ComponentProps<typeof PopoverContent>;
|
|
31
|
-
type DateRangePickerPresetsProps = React.ComponentProps<'div'> & {
|
|
32
|
-
presets?: DateRangePickerPresetOption[];
|
|
33
|
-
};
|
|
34
|
-
type DateRangePickerPresetProps = React.ComponentProps<'button'> & {
|
|
35
|
-
selected?: boolean;
|
|
36
|
-
};
|
|
37
|
-
type DateRangePickerCalendarProps = Omit<React.ComponentProps<typeof Calendar>, 'mode' | 'numberOfMonths' | 'selected' | 'onSelect' | 'month' | 'defaultMonth'>;
|
|
38
|
-
type DateRangePickerDateFieldsProps = React.ComponentProps<'div'>;
|
|
39
|
-
type DateRangePickerActionsProps = React.ComponentProps<'div'>;
|
|
40
|
-
type DateRangePickerApplyProps = React.ComponentProps<typeof Button>;
|
|
41
|
-
type DateRangePickerResetProps = React.ComponentProps<typeof Button>;
|
|
42
|
-
declare function DateRangePicker({ value: valueProp, defaultValue, onValueChange, onApply, onReset, open: openProp, defaultOpen, onOpenChange, locale, placeholder, children, ...props }: DateRangePickerProps): React.JSX.Element;
|
|
43
|
-
declare function DateRangePickerTrigger({ className, children, asChild, variant, color, type, ...props }: DateRangePickerTriggerProps): React.JSX.Element;
|
|
44
|
-
declare function DateRangePickerValue({ className, placeholder, ...props }: DateRangePickerValueProps): React.JSX.Element;
|
|
45
|
-
declare function DateRangePickerContent({ className, align, sideOffset, children, ...props }: DateRangePickerContentProps): React.JSX.Element;
|
|
46
|
-
declare function DateRangePickerPresets({ className, presets, ...props }: DateRangePickerPresetsProps): React.JSX.Element;
|
|
47
|
-
declare function DateRangePickerPreset({ className, selected, ...props }: DateRangePickerPresetProps): React.JSX.Element;
|
|
48
|
-
declare function DateRangePickerCalendar({ className, showOutsideDays, onMonthChange, ...props }: DateRangePickerCalendarProps): React.JSX.Element;
|
|
49
|
-
declare function DateRangePickerDateFields({ className, ...props }: DateRangePickerDateFieldsProps): React.JSX.Element;
|
|
50
|
-
declare function DateRangePickerActions({ className, children, ...props }: DateRangePickerActionsProps): React.JSX.Element;
|
|
51
|
-
declare function DateRangePickerApply({ children, onClick, className, ...props }: DateRangePickerApplyProps): React.JSX.Element;
|
|
52
|
-
declare function DateRangePickerReset({ children, onClick, variant, color, className, ...props }: DateRangePickerResetProps): React.JSX.Element;
|
|
53
|
-
//#endregion
|
|
54
|
-
export { DateRangePickerValueProps as C, DateRangePickerValue as S, DateRangePickerProps as _, DateRangePickerApplyProps as a, DateRangePickerTrigger as b, DateRangePickerContent as c, DateRangePickerDateFieldsProps as d, DateRangePickerPreset as f, DateRangePickerPresetsProps as g, DateRangePickerPresets as h, DateRangePickerApply as i, DateRangePickerContentProps as l, DateRangePickerPresetProps as m, DateRangePickerActions as n, DateRangePickerCalendar as o, DateRangePickerPresetOption as p, DateRangePickerActionsProps as r, DateRangePickerCalendarProps as s, DateRangePicker as t, DateRangePickerDateFields as u, DateRangePickerReset as v, DateRangePickerTriggerProps as x, DateRangePickerResetProps as y };
|
|
55
|
-
//# sourceMappingURL=date-range-picker-BngvCWcR.d.ts.map
|
package/dist/dialog-B7I4Ky1i.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-Bdj-bS2b.js";import{t}from"./utils-DP9KtG7I.js";import{t as n}from"./button-oI3hbOgp.js";import{IconX as r}from"@tabler/icons-react";import{Dialog as i}from"radix-ui";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";import*as c from"react";const l=s([`bg-background ring-foreground/10 fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none`,`flex flex-col gap-4 rounded-xl p-4 text-sm ring-1 duration-100`,`max-w-[calc(100%-2rem)] max-h-[calc(100dvh-2rem)] overflow-hidden`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95`],{variants:{size:{sm:`sm:max-w-sm`,md:`sm:max-w-md`,lg:`sm:max-w-lg`,xl:`sm:max-w-xl`,"2xl":`sm:max-w-2xl`,"3xl":`sm:max-w-3xl`,full:`w-screen h-screen max-w-none max-h-screen rounded-none sm:max-w-none`}},defaultVariants:{size:`md`}}),u=c.createContext({size:`sm`,dismissible:!0});function Dialog$1({size:e=`sm`,dismissible:t=!0,...n}){let r=c.useMemo(()=>({size:e,dismissible:t}),[e,t]);return a(u.Provider,{value:r,children:a(i.Root,{"data-slot":`dialog`,...n})})}e(Dialog$1,`Dialog`);function DialogTrigger({...e}){return a(i.Trigger,{"data-slot":`dialog-trigger`,...e})}function DialogPortal({...e}){return a(i.Portal,{"data-slot":`dialog-portal`,...e})}function DialogClose({...e}){return a(i.Close,{"data-slot":`dialog-close`,...e})}function DialogOverlay({className:e,...n}){return a(i.Overlay,{"data-slot":`dialog-overlay`,className:t(`bg-black/10 fixed inset-0 isolate z-50`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0`,`duration-100 supports-backdrop-filter:backdrop-blur-xs`,e),...n})}function DialogContent({className:e,children:s,showCloseButton:d=!0,overlayRef:f,...p}){let{size:m,dismissible:h}=c.useContext(u);return o(DialogPortal,{children:[a(DialogOverlay,{ref:f}),o(i.Content,{"data-slot":`dialog-content`,className:t(l({size:m}),e),...p,onEscapeKeyDown:e=>{h||e.preventDefault(),p.onEscapeKeyDown?.(e)},onInteractOutside:e=>{h||e.preventDefault(),p.onInteractOutside?.(e)},children:[s,d&&a(i.Close,{"data-slot":`dialog-close`,asChild:!0,children:o(n,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`,children:[a(r,{}),a(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function DialogHeader({className:e,...n}){return a(`div`,{"data-slot":`dialog-header`,className:t(`gap-2 flex flex-col shrink-0`,e),...n})}function DialogBody({className:e,...n}){return a(`div`,{"data-slot":`dialog-body`,className:t(`-mx-4 px-4 flex-1 overflow-y-auto`,e),...n})}function DialogFooter({className:e,showCloseButton:r=!1,children:s,...c}){return o(`div`,{"data-slot":`dialog-footer`,className:t(`bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 shrink-0`,`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...c,children:[s,r&&a(i.Close,{asChild:!0,children:a(n,{variant:`outline`,children:`Close`})})]})}function DialogTitle({className:e,...n}){return a(i.Title,{"data-slot":`dialog-title`,className:t(`text-base leading-none font-medium`,e),...n})}function DialogDescription({className:e,...n}){return a(i.Description,{"data-slot":`dialog-description`,className:t(`text-muted-foreground text-sm`,`*:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...n})}export{DialogDescription as a,DialogOverlay as c,DialogTrigger as d,DialogContent as i,DialogPortal as l,DialogBody as n,DialogFooter as o,DialogClose as r,DialogHeader as s,Dialog$1 as t,DialogTitle as u};
|
|
2
|
-
//# sourceMappingURL=dialog-B7I4Ky1i.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-B7I4Ky1i.js","names":["Dialog","DialogPrimitive"],"sources":["../src/components/dialog.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { IconX } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Dialog as DialogPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\nconst dialogContentVariants = cva(\n [\n 'bg-background ring-foreground/10 fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none',\n 'flex flex-col gap-4 rounded-xl p-4 text-sm ring-1 duration-100',\n 'max-w-[calc(100%-2rem)] max-h-[calc(100dvh-2rem)] overflow-hidden',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95'\n ],\n {\n variants: {\n size: {\n sm: 'sm:max-w-sm',\n md: 'sm:max-w-md',\n lg: 'sm:max-w-lg',\n xl: 'sm:max-w-xl',\n '2xl': 'sm:max-w-2xl',\n '3xl': 'sm:max-w-3xl',\n full: 'w-screen h-screen max-w-none max-h-screen rounded-none sm:max-w-none'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n }\n)\n\ntype DialogSize = NonNullable<VariantProps<typeof dialogContentVariants>['size']>\ntype DialogContextValue = { size: DialogSize; dismissible: boolean }\nconst DialogContext = React.createContext<DialogContextValue>({ size: 'sm', dismissible: true })\n\nexport type DialogProps = React.ComponentProps<typeof DialogPrimitive.Root> & {\n size?: DialogSize\n dismissible?: boolean\n}\nexport type DialogTriggerProps = React.ComponentProps<typeof DialogPrimitive.Trigger>\nexport type DialogPortalProps = React.ComponentProps<typeof DialogPrimitive.Portal>\nexport type DialogCloseProps = React.ComponentProps<typeof DialogPrimitive.Close>\nexport type DialogOverlayProps = React.ComponentProps<typeof DialogPrimitive.Overlay>\nexport type DialogContentProps = React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n overlayRef?: React.Ref<HTMLDivElement>\n}\nexport type DialogHeaderProps = React.ComponentProps<'div'>\nexport type DialogBodyProps = React.ComponentProps<'div'>\nexport type DialogFooterProps = React.ComponentProps<'div'> & { showCloseButton?: boolean }\nexport type DialogTitleProps = React.ComponentProps<typeof DialogPrimitive.Title>\nexport type DialogDescriptionProps = React.ComponentProps<typeof DialogPrimitive.Description>\n\nfunction Dialog({ size = 'sm', dismissible = true, ...props }: DialogProps) {\n const contextValue = React.useMemo<DialogContextValue>(() => ({ size, dismissible }), [size, dismissible])\n\n return (\n <DialogContext.Provider value={contextValue}>\n <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n </DialogContext.Provider>\n )\n}\n\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({ ...props }: DialogPortalProps) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({ className, ...props }: DialogOverlayProps) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'bg-black/10 fixed inset-0 isolate z-50',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0',\n 'duration-100 supports-backdrop-filter:backdrop-blur-xs',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({ className, children, showCloseButton = true, overlayRef, ...props }: DialogContentProps) {\n const { size, dismissible } = React.useContext(DialogContext)\n\n return (\n <DialogPortal>\n <DialogOverlay ref={overlayRef} />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(dialogContentVariants({ size }), className)}\n {...props}\n onEscapeKeyDown={(event) => {\n if (!dismissible) event.preventDefault()\n props.onEscapeKeyDown?.(event)\n }}\n onInteractOutside={(event) => {\n if (!dismissible) event.preventDefault()\n props.onInteractOutside?.(event)\n }}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" asChild>\n <Button variant=\"ghost\" className=\"absolute top-2 right-2\" size=\"icon-sm\">\n <IconX />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: DialogHeaderProps) {\n return <div data-slot=\"dialog-header\" className={cn('gap-2 flex flex-col shrink-0', className)} {...props} />\n}\n\nfunction DialogBody({ className, ...props }: DialogBodyProps) {\n return <div data-slot=\"dialog-body\" className={cn('-mx-4 px-4 flex-1 overflow-y-auto', className)} {...props} />\n}\n\nfunction DialogFooter({ className, showCloseButton = false, children, ...props }: DialogFooterProps) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 shrink-0',\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({ className, ...props }: DialogTitleProps) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-base leading-none font-medium', className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({ className, ...props }: DialogDescriptionProps) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n 'text-muted-foreground text-sm',\n '*:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger\n}\n"],"mappings":"sUASA,MAAM,EAAwB,E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,EAAG,qCAAsC,CAAS,EAC7D,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,kBAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,OACE,EAACA,EAAgB,YAAjB,CACE,YAAU,qBACV,UAAW,EACT,gCACA,uEACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { n as __name } from "./rolldown-runtime-Bdj-bS2b.js";
|
|
2
|
-
import { Dialog } from "radix-ui";
|
|
3
|
-
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
//#region src/components/dialog.d.ts
|
|
6
|
-
declare const dialogContentVariants: (props?: ({
|
|
7
|
-
size?: "2xl" | "3xl" | "full" | "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
8
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
-
type DialogSize = NonNullable<VariantProps<typeof dialogContentVariants>['size']>;
|
|
10
|
-
type DialogProps = React.ComponentProps<typeof Dialog.Root> & {
|
|
11
|
-
size?: DialogSize;
|
|
12
|
-
dismissible?: boolean;
|
|
13
|
-
};
|
|
14
|
-
type DialogTriggerProps = React.ComponentProps<typeof Dialog.Trigger>;
|
|
15
|
-
type DialogPortalProps = React.ComponentProps<typeof Dialog.Portal>;
|
|
16
|
-
type DialogCloseProps = React.ComponentProps<typeof Dialog.Close>;
|
|
17
|
-
type DialogOverlayProps = React.ComponentProps<typeof Dialog.Overlay>;
|
|
18
|
-
type DialogContentProps = React.ComponentProps<typeof Dialog.Content> & {
|
|
19
|
-
showCloseButton?: boolean;
|
|
20
|
-
overlayRef?: React.Ref<HTMLDivElement>;
|
|
21
|
-
};
|
|
22
|
-
type DialogHeaderProps = React.ComponentProps<'div'>;
|
|
23
|
-
type DialogBodyProps = React.ComponentProps<'div'>;
|
|
24
|
-
type DialogFooterProps = React.ComponentProps<'div'> & {
|
|
25
|
-
showCloseButton?: boolean;
|
|
26
|
-
};
|
|
27
|
-
type DialogTitleProps = React.ComponentProps<typeof Dialog.Title>;
|
|
28
|
-
type DialogDescriptionProps = React.ComponentProps<typeof Dialog.Description>;
|
|
29
|
-
declare function Dialog$1({ size, dismissible, ...props }: DialogProps): React.JSX.Element;
|
|
30
|
-
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof Dialog.Trigger>): React.JSX.Element;
|
|
31
|
-
declare function DialogPortal({ ...props }: DialogPortalProps): React.JSX.Element;
|
|
32
|
-
declare function DialogClose({ ...props }: React.ComponentProps<typeof Dialog.Close>): React.JSX.Element;
|
|
33
|
-
declare function DialogOverlay({ className, ...props }: DialogOverlayProps): React.JSX.Element;
|
|
34
|
-
declare function DialogContent({ className, children, showCloseButton, overlayRef, ...props }: DialogContentProps): React.JSX.Element;
|
|
35
|
-
declare function DialogHeader({ className, ...props }: DialogHeaderProps): React.JSX.Element;
|
|
36
|
-
declare function DialogBody({ className, ...props }: DialogBodyProps): React.JSX.Element;
|
|
37
|
-
declare function DialogFooter({ className, showCloseButton, children, ...props }: DialogFooterProps): React.JSX.Element;
|
|
38
|
-
declare function DialogTitle({ className, ...props }: DialogTitleProps): React.JSX.Element;
|
|
39
|
-
declare function DialogDescription({ className, ...props }: DialogDescriptionProps): React.JSX.Element;
|
|
40
|
-
//#endregion
|
|
41
|
-
export { DialogTriggerProps as S, DialogPortalProps as _, DialogCloseProps as a, DialogTitleProps as b, DialogDescription as c, DialogFooterProps as d, DialogHeader as f, DialogPortal as g, DialogOverlayProps as h, DialogClose as i, DialogDescriptionProps as l, DialogOverlay as m, DialogBody as n, DialogContent as o, DialogHeaderProps as p, DialogBodyProps as r, DialogContentProps as s, Dialog$1 as t, DialogFooter as u, DialogProps as v, DialogTrigger as x, DialogTitle as y };
|
|
42
|
-
//# sourceMappingURL=dialog-Ej7pnact.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { n as __name } from "./rolldown-runtime-Bdj-bS2b.js";
|
|
2
|
-
import { a as PieChartProps } from "./pie-chart-CvG27kFN.js";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
//#region src/components/donut-chart.d.ts
|
|
5
|
-
type DonutChartProps = PieChartProps & {
|
|
6
|
-
thickness?: number;
|
|
7
|
-
withTotal?: boolean;
|
|
8
|
-
totalLabel?: React.ReactNode;
|
|
9
|
-
};
|
|
10
|
-
declare function DonutChart({ className, thickness, outerRadius, withTotal, totalLabel, data, ...props }: DonutChartProps): React.JSX.Element;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { DonutChartProps as n, DonutChart as t };
|
|
13
|
-
//# sourceMappingURL=donut-chart-BDJR8TXh.d.ts.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-Bdj-bS2b.js";import{t as e}from"./utils-DP9KtG7I.js";import{n as t}from"./pie-chart-S4nMKbsW.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import*as i from"react";import{Label as a}from"recharts";function DonutChart({className:o,thickness:s=.35,outerRadius:c=`80%`,withTotal:l=!1,totalLabel:u=`Total`,data:d,...f}){let p=i.useMemo(()=>{let e=Math.min(Math.max(1-s,0),1);if(typeof c==`number`)return c*e;let t=/^(\d+(?:\.\d+)?)%$/.exec(c);return t?`${Number(t[1])*e}%`:c},[c,s]),m=i.useMemo(()=>d.reduce((e,t)=>e+t.value,0),[d]);return n(t,{dataSlot:`donut-chart`,className:e(o),data:d,outerRadius:c,innerRadius:p,centerSlot:l?n(a,{position:`center`,content:({viewBox:e})=>!e||!(`cx`in e)||!(`cy`in e)?null:r(`text`,{x:e.cx,y:e.cy,textAnchor:`middle`,dominantBaseline:`middle`,children:[n(`tspan`,{x:e.cx,y:e.cy,className:`fill-foreground font-medium text-2xl tabular-nums`,children:m.toLocaleString()}),n(`tspan`,{x:e.cx,y:(e.cy??0)+20,className:`fill-muted-foreground text-xs`,children:u})]})}):null,...f})}export{DonutChart as t};
|
|
2
|
-
//# sourceMappingURL=donut-chart-BHU4kDE6.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"donut-chart-BHU4kDE6.js","names":[],"sources":["../src/components/donut-chart.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Label } from 'recharts'\n\nimport { cn } from '../lib/utils'\nimport { PieChartBase, type PieChartProps } from './pie-chart'\n\nexport type DonutChartProps = PieChartProps & {\n thickness?: number\n withTotal?: boolean\n totalLabel?: React.ReactNode\n}\n\nfunction DonutChart({\n className,\n thickness = 0.35,\n outerRadius = '80%',\n withTotal = false,\n totalLabel = 'Total',\n data,\n ...props\n}: DonutChartProps) {\n const innerRadius = React.useMemo(() => {\n const ratio = Math.min(Math.max(1 - thickness, 0), 1)\n if (typeof outerRadius === 'number') {\n return outerRadius * ratio\n }\n const match = /^(\\d+(?:\\.\\d+)?)%$/.exec(outerRadius)\n if (match) {\n return `${Number(match[1]) * ratio}%`\n }\n return outerRadius\n }, [outerRadius, thickness])\n\n const total = React.useMemo(() => data.reduce((sum, item) => sum + item.value, 0), [data])\n\n return (\n <PieChartBase\n dataSlot=\"donut-chart\"\n className={cn(className)}\n data={data}\n outerRadius={outerRadius}\n innerRadius={innerRadius}\n centerSlot={\n withTotal ? (\n <Label\n position=\"center\"\n content={({ viewBox }) => {\n if (!viewBox || !('cx' in viewBox) || !('cy' in viewBox)) {\n return null\n }\n return (\n <text x={viewBox.cx} y={viewBox.cy} textAnchor=\"middle\" dominantBaseline=\"middle\">\n <tspan x={viewBox.cx} y={viewBox.cy} className=\"fill-foreground font-medium text-2xl tabular-nums\">\n {total.toLocaleString()}\n </tspan>\n <tspan x={viewBox.cx} y={(viewBox.cy ?? 0) + 20} className=\"fill-muted-foreground text-xs\">\n {totalLabel}\n </tspan>\n </text>\n )\n }}\n />\n ) : null\n }\n {...props}\n />\n )\n}\n\nexport { DonutChart }\n"],"mappings":"sOAaA,SAAS,WAAW,CAClB,YACA,YAAY,IACZ,cAAc,MACd,YAAY,GACZ,aAAa,QACb,OACA,GAAG,GACe,CAClB,IAAM,EAAc,EAAM,YAAc,CACtC,IAAM,EAAQ,KAAK,IAAI,KAAK,IAAI,EAAI,EAAW,CAAC,EAAG,CAAC,EACpD,GAAI,OAAO,GAAgB,SACzB,OAAO,EAAc,EAEvB,IAAM,EAAQ,qBAAqB,KAAK,CAAW,EAInD,OAHI,EACK,GAAG,OAAO,EAAM,EAAE,EAAI,EAAM,GAE9B,CACT,EAAG,CAAC,EAAa,CAAS,CAAC,EAErB,EAAQ,EAAM,YAAc,EAAK,QAAQ,EAAK,IAAS,EAAM,EAAK,MAAO,CAAC,EAAG,CAAC,CAAI,CAAC,EAEzF,OACE,EAAC,EAAD,CACE,SAAS,cACT,UAAW,EAAG,CAAS,EACjB,OACO,cACA,cACb,WACE,EACE,EAAC,EAAD,CACE,SAAS,SACT,SAAU,CAAE,aACN,CAAC,GAAW,EAAE,OAAQ,IAAY,EAAE,OAAQ,GACvC,KAGP,EAAC,OAAD,CAAM,EAAG,EAAQ,GAAI,EAAG,EAAQ,GAAI,WAAW,SAAS,iBAAiB,SAAzE,SAAA,CACE,EAAC,QAAD,CAAO,EAAG,EAAQ,GAAI,EAAG,EAAQ,GAAI,UAAU,oDAC5C,SAAA,EAAM,eAAe,CACjB,CAAA,EACP,EAAC,QAAD,CAAO,EAAG,EAAQ,GAAI,GAAI,EAAQ,IAAM,GAAK,GAAI,UAAU,gCACxD,SAAA,CACI,CAAA,CACH,GAGX,CAAA,EACC,KAEN,GAAI,CACL,CAAA,CAEL"}
|
package/dist/drawer-BO4mP6y1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-Bdj-bS2b.js";import{t as e}from"./utils-DP9KtG7I.js";import{t}from"./button-oI3hbOgp.js";import{IconX as n}from"@tabler/icons-react";import{Dialog as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{cva as o}from"class-variance-authority";import*as s from"react";const c=o([`bg-background flex h-auto flex-col text-sm fixed z-50 outline-none duration-200`,`data-open:animate-in data-closed:animate-out`],{variants:{direction:{top:`inset-x-0 top-0 rounded-b-xl border-b data-closed:slide-out-to-top data-open:slide-in-from-top-10`,right:`inset-y-0 right-0 rounded-l-xl border-l data-closed:slide-out-to-right data-open:slide-in-from-right-10`,bottom:`inset-x-0 bottom-0 rounded-t-xl border-t data-closed:slide-out-to-bottom data-open:slide-in-from-bottom-10`,left:`inset-y-0 left-0 rounded-r-xl border-r data-closed:slide-out-to-left data-open:slide-in-from-left-10`},size:{sm:``,md:``,lg:``,xl:``,"2xl":``,"3xl":``,full:``}},compoundVariants:[{direction:[`left`,`right`],size:`sm`,className:`w-3/4 sm:max-w-sm`},{direction:[`left`,`right`],size:`md`,className:`w-4/5 sm:max-w-md`},{direction:[`left`,`right`],size:`lg`,className:`w-[90%] sm:max-w-lg`},{direction:[`left`,`right`],size:`xl`,className:`w-[90%] sm:max-w-195`},{direction:[`left`,`right`],size:`2xl`,className:`w-[90%] sm:max-w-240`},{direction:[`left`,`right`],size:`3xl`,className:`w-[90%] sm:max-w-300`},{direction:[`left`,`right`],size:`full`,className:`w-full`},{direction:`top`,size:`sm`,className:`mb-24 h-full max-h-96`},{direction:`top`,size:`md`,className:`mb-20 h-full max-h-112`},{direction:`top`,size:`lg`,className:`mb-12 h-full max-h-128`},{direction:`top`,size:`xl`,className:`mb-12 h-full max-h-195`},{direction:`top`,size:`2xl`,className:`mb-12 h-full max-h-240`},{direction:`top`,size:`3xl`,className:`mb-12 h-full max-h-300`},{direction:`top`,size:`full`,className:`mb-0 h-full`},{direction:`bottom`,size:`sm`,className:`mt-24 h-full max-h-96`},{direction:`bottom`,size:`md`,className:`mt-20 h-full max-h-112`},{direction:`bottom`,size:`lg`,className:`mt-12 h-full max-h-128`},{direction:`bottom`,size:`xl`,className:`mt-12 h-full max-h-195`},{direction:`bottom`,size:`2xl`,className:`mt-12 h-full max-h-240`},{direction:`bottom`,size:`3xl`,className:`mt-12 h-full max-h-300`},{direction:`bottom`,size:`full`,className:`mt-0 h-full`}],defaultVariants:{direction:`right`,size:`md`}}),l=s.createContext({size:`md`,direction:`right`,dismissible:!0});function Drawer({size:e=`md`,direction:t=`right`,dismissible:n=!0,...a}){let o=s.useMemo(()=>({size:e,direction:t,dismissible:n}),[e,t,n]);return i(l.Provider,{value:o,children:i(r.Root,{"data-slot":`drawer`,...a})})}function DrawerTrigger({...e}){return i(r.Trigger,{"data-slot":`drawer-trigger`,...e})}function DrawerPortal({...e}){return i(r.Portal,{"data-slot":`drawer-portal`,...e})}function DrawerClose({...e}){return i(r.Close,{"data-slot":`drawer-close`,...e})}function DrawerOverlay({className:t,...n}){return i(r.Overlay,{"data-slot":`drawer-overlay`,className:e(`bg-black/10 fixed inset-0 z-50`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0`,`supports-backdrop-filter:backdrop-blur-xs`,t),...n})}function DrawerContent({className:o,children:u,showCloseButton:d=!0,overlayProps:f,...p}){let{size:m,direction:h,dismissible:g}=s.useContext(l);return a(DrawerPortal,{children:[i(DrawerOverlay,{...f}),a(r.Content,{"data-slot":`drawer-content`,className:e(c({size:m,direction:h}),o),...p,onEscapeKeyDown:e=>{g||e.preventDefault(),p.onEscapeKeyDown?.(e)},onInteractOutside:e=>{g||e.preventDefault(),p.onInteractOutside?.(e)},children:[u,d&&i(DrawerClose,{asChild:!0,children:a(t,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[i(n,{}),i(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function DrawerHeader({className:t,...n}){let{direction:r}=s.useContext(l);return i(`div`,{"data-slot":`drawer-header`,className:e(`p-4 flex flex-col gap-0.5 md:gap-0.5`,(r===`top`||r===`bottom`)&&`text-center md:text-left`,t),...n})}function DrawerBody({className:t,...n}){return i(`div`,{"data-slot":`drawer-body`,className:e(`px-4 pb-4 flex-1 min-h-0 overflow-y-auto`,t),...n})}function DrawerFooter({className:t,...n}){return i(`div`,{"data-slot":`drawer-footer`,className:e(`gap-2 p-4 mt-auto flex flex-col sm:flex-row sm:justify-end`,t),...n})}function DrawerTitle({className:t,...n}){return i(r.Title,{"data-slot":`drawer-title`,className:e(`text-foreground text-base font-medium`,t),...n})}function DrawerDescription({className:t,...n}){return i(r.Description,{"data-slot":`drawer-description`,className:e(`text-muted-foreground text-sm`,t),...n})}export{DrawerDescription as a,DrawerOverlay as c,DrawerTrigger as d,DrawerContent as i,DrawerPortal as l,DrawerBody as n,DrawerFooter as o,DrawerClose as r,DrawerHeader as s,Drawer as t,DrawerTitle as u};
|
|
2
|
-
//# sourceMappingURL=drawer-BO4mP6y1.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-BO4mP6y1.js","names":["DrawerPrimitive"],"sources":["../src/components/drawer.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { IconX } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Dialog as DrawerPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\nconst drawerContentVariants = cva(\n [\n 'bg-background flex h-auto flex-col text-sm fixed z-50 outline-none duration-200',\n 'data-open:animate-in data-closed:animate-out'\n ],\n {\n variants: {\n direction: {\n top: 'inset-x-0 top-0 rounded-b-xl border-b data-closed:slide-out-to-top data-open:slide-in-from-top-10',\n right:\n 'inset-y-0 right-0 rounded-l-xl border-l data-closed:slide-out-to-right data-open:slide-in-from-right-10',\n bottom:\n 'inset-x-0 bottom-0 rounded-t-xl border-t data-closed:slide-out-to-bottom data-open:slide-in-from-bottom-10',\n left: 'inset-y-0 left-0 rounded-r-xl border-r data-closed:slide-out-to-left data-open:slide-in-from-left-10'\n },\n size: {\n sm: '',\n md: '',\n lg: '',\n xl: '',\n '2xl': '',\n '3xl': '',\n full: ''\n }\n },\n compoundVariants: [\n { direction: ['left', 'right'], size: 'sm', className: 'w-3/4 sm:max-w-sm' },\n { direction: ['left', 'right'], size: 'md', className: 'w-4/5 sm:max-w-md' },\n { direction: ['left', 'right'], size: 'lg', className: 'w-[90%] sm:max-w-lg' },\n { direction: ['left', 'right'], size: 'xl', className: 'w-[90%] sm:max-w-195' },\n { direction: ['left', 'right'], size: '2xl', className: 'w-[90%] sm:max-w-240' },\n { direction: ['left', 'right'], size: '3xl', className: 'w-[90%] sm:max-w-300' },\n { direction: ['left', 'right'], size: 'full', className: 'w-full' },\n { direction: 'top', size: 'sm', className: 'mb-24 h-full max-h-96' },\n { direction: 'top', size: 'md', className: 'mb-20 h-full max-h-112' },\n { direction: 'top', size: 'lg', className: 'mb-12 h-full max-h-128' },\n { direction: 'top', size: 'xl', className: 'mb-12 h-full max-h-195' },\n { direction: 'top', size: '2xl', className: 'mb-12 h-full max-h-240' },\n { direction: 'top', size: '3xl', className: 'mb-12 h-full max-h-300' },\n { direction: 'top', size: 'full', className: 'mb-0 h-full' },\n { direction: 'bottom', size: 'sm', className: 'mt-24 h-full max-h-96' },\n { direction: 'bottom', size: 'md', className: 'mt-20 h-full max-h-112' },\n { direction: 'bottom', size: 'lg', className: 'mt-12 h-full max-h-128' },\n { direction: 'bottom', size: 'xl', className: 'mt-12 h-full max-h-195' },\n { direction: 'bottom', size: '2xl', className: 'mt-12 h-full max-h-240' },\n { direction: 'bottom', size: '3xl', className: 'mt-12 h-full max-h-300' },\n { direction: 'bottom', size: 'full', className: 'mt-0 h-full' }\n ],\n defaultVariants: {\n direction: 'right',\n size: 'md'\n }\n }\n)\n\ntype DrawerDirection = NonNullable<VariantProps<typeof drawerContentVariants>['direction']>\ntype DrawerSize = NonNullable<VariantProps<typeof drawerContentVariants>['size']>\ntype DrawerContextValue = { size: DrawerSize; direction: DrawerDirection; dismissible: boolean }\nconst DrawerContext = React.createContext<DrawerContextValue>({ size: 'md', direction: 'right', dismissible: true })\n\nexport type DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root> & {\n size?: DrawerSize\n direction?: DrawerDirection\n dismissible?: boolean\n}\nexport type DrawerTriggerProps = React.ComponentProps<typeof DrawerPrimitive.Trigger>\nexport type DrawerPortalProps = React.ComponentProps<typeof DrawerPrimitive.Portal>\nexport type DrawerCloseProps = React.ComponentProps<typeof DrawerPrimitive.Close>\nexport type DrawerOverlayProps = React.ComponentProps<typeof DrawerPrimitive.Overlay>\nexport type DrawerContentProps = React.ComponentProps<typeof DrawerPrimitive.Content> & {\n showCloseButton?: boolean\n overlayProps?: DrawerOverlayProps\n}\nexport type DrawerHeaderProps = React.ComponentProps<'div'>\nexport type DrawerBodyProps = React.ComponentProps<'div'>\nexport type DrawerFooterProps = React.ComponentProps<'div'>\nexport type DrawerTitleProps = React.ComponentProps<typeof DrawerPrimitive.Title>\nexport type DrawerDescriptionProps = React.ComponentProps<typeof DrawerPrimitive.Description>\n\nfunction Drawer({ size = 'md', direction = 'right', dismissible = true, ...props }: DrawerProps) {\n const contextValue = React.useMemo<DrawerContextValue>(\n () => ({ size, direction, dismissible }),\n [size, direction, dismissible]\n )\n\n return (\n <DrawerContext.Provider value={contextValue}>\n <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />\n </DrawerContext.Provider>\n )\n}\n\nfunction DrawerTrigger({ ...props }: DrawerTriggerProps) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({ ...props }: DrawerPortalProps) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />\n}\n\nfunction DrawerClose({ ...props }: DrawerCloseProps) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({ className, ...props }: DrawerOverlayProps) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'bg-black/10 fixed inset-0 z-50',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0',\n 'supports-backdrop-filter:backdrop-blur-xs',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerContent({ className, children, showCloseButton = true, overlayProps, ...props }: DrawerContentProps) {\n const { size, direction, dismissible } = React.useContext(DrawerContext)\n\n return (\n <DrawerPortal>\n <DrawerOverlay {...overlayProps} />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(drawerContentVariants({ size, direction }), className)}\n {...props}\n onEscapeKeyDown={(event) => {\n if (!dismissible) event.preventDefault()\n props.onEscapeKeyDown?.(event)\n }}\n onInteractOutside={(event) => {\n if (!dismissible) event.preventDefault()\n props.onInteractOutside?.(event)\n }}\n >\n {children}\n {showCloseButton && (\n <DrawerClose asChild>\n <Button variant=\"ghost\" className=\"absolute top-3 right-3\" size=\"icon-sm\">\n <IconX />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DrawerClose>\n )}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps) {\n const { direction } = React.useContext(DrawerContext)\n const isVertical = direction === 'top' || direction === 'bottom'\n\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn('p-4 flex flex-col gap-0.5 md:gap-0.5', isVertical && 'text-center md:text-left', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerBody({ className, ...props }: DrawerBodyProps) {\n return (\n <div data-slot=\"drawer-body\" className={cn('px-4 pb-4 flex-1 min-h-0 overflow-y-auto', className)} {...props} />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('gap-2 p-4 mt-auto flex flex-col sm:flex-row sm:justify-end', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerTitle({ className, ...props }: DrawerTitleProps) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('text-foreground text-base font-medium', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerDescription({ className, ...props }: DrawerDescriptionProps) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nexport {\n Drawer,\n DrawerBody,\n D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EACrF,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OACE,EAACA,EAAgB,MAAjB,CACE,YAAU,eACV,UAAW,EAAG,wCAAyC,CAAS,EAChE,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,kBAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,OACE,EAACA,EAAgB,YAAjB,CACE,YAAU,qBACV,UAAW,EAAG,gCAAiC,CAAS,EACxD,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { n as __name } from "./rolldown-runtime-Bdj-bS2b.js";
|
|
2
|
-
import { Dialog } from "radix-ui";
|
|
3
|
-
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
//#region src/components/drawer.d.ts
|
|
6
|
-
declare const drawerContentVariants: (props?: ({
|
|
7
|
-
direction?: "bottom" | "left" | "right" | "top" | null | undefined;
|
|
8
|
-
size?: "2xl" | "3xl" | "full" | "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
9
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
-
type DrawerDirection = NonNullable<VariantProps<typeof drawerContentVariants>['direction']>;
|
|
11
|
-
type DrawerSize = NonNullable<VariantProps<typeof drawerContentVariants>['size']>;
|
|
12
|
-
type DrawerProps = React.ComponentProps<typeof Dialog.Root> & {
|
|
13
|
-
size?: DrawerSize;
|
|
14
|
-
direction?: DrawerDirection;
|
|
15
|
-
dismissible?: boolean;
|
|
16
|
-
};
|
|
17
|
-
type DrawerTriggerProps = React.ComponentProps<typeof Dialog.Trigger>;
|
|
18
|
-
type DrawerPortalProps = React.ComponentProps<typeof Dialog.Portal>;
|
|
19
|
-
type DrawerCloseProps = React.ComponentProps<typeof Dialog.Close>;
|
|
20
|
-
type DrawerOverlayProps = React.ComponentProps<typeof Dialog.Overlay>;
|
|
21
|
-
type DrawerContentProps = React.ComponentProps<typeof Dialog.Content> & {
|
|
22
|
-
showCloseButton?: boolean;
|
|
23
|
-
overlayProps?: DrawerOverlayProps;
|
|
24
|
-
};
|
|
25
|
-
type DrawerHeaderProps = React.ComponentProps<'div'>;
|
|
26
|
-
type DrawerBodyProps = React.ComponentProps<'div'>;
|
|
27
|
-
type DrawerFooterProps = React.ComponentProps<'div'>;
|
|
28
|
-
type DrawerTitleProps = React.ComponentProps<typeof Dialog.Title>;
|
|
29
|
-
type DrawerDescriptionProps = React.ComponentProps<typeof Dialog.Description>;
|
|
30
|
-
declare function Drawer({ size, direction, dismissible, ...props }: DrawerProps): React.JSX.Element;
|
|
31
|
-
declare function DrawerTrigger({ ...props }: DrawerTriggerProps): React.JSX.Element;
|
|
32
|
-
declare function DrawerPortal({ ...props }: DrawerPortalProps): React.JSX.Element;
|
|
33
|
-
declare function DrawerClose({ ...props }: DrawerCloseProps): React.JSX.Element;
|
|
34
|
-
declare function DrawerOverlay({ className, ...props }: DrawerOverlayProps): React.JSX.Element;
|
|
35
|
-
declare function DrawerContent({ className, children, showCloseButton, overlayProps, ...props }: DrawerContentProps): React.JSX.Element;
|
|
36
|
-
declare function DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element;
|
|
37
|
-
declare function DrawerBody({ className, ...props }: DrawerBodyProps): React.JSX.Element;
|
|
38
|
-
declare function DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element;
|
|
39
|
-
declare function DrawerTitle({ className, ...props }: DrawerTitleProps): React.JSX.Element;
|
|
40
|
-
declare function DrawerDescription({ className, ...props }: DrawerDescriptionProps): React.JSX.Element;
|
|
41
|
-
//#endregion
|
|
42
|
-
export { DrawerTriggerProps as S, DrawerPortalProps as _, DrawerCloseProps as a, DrawerTitleProps as b, DrawerDescription as c, DrawerFooterProps as d, DrawerHeader as f, DrawerPortal as g, DrawerOverlayProps as h, DrawerClose as i, DrawerDescriptionProps as l, DrawerOverlay as m, DrawerBody as n, DrawerContent as o, DrawerHeaderProps as p, DrawerBodyProps as r, DrawerContentProps as s, Drawer as t, DrawerFooter as u, DrawerProps as v, DrawerTrigger as x, DrawerTitle as y };
|
|
43
|
-
//# sourceMappingURL=drawer-DUfJzrKE.d.ts.map
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { n as __name } from "./rolldown-runtime-Bdj-bS2b.js";
|
|
2
|
-
import { DropdownMenu } from "radix-ui";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
//#region src/components/dropdown-menu.d.ts
|
|
5
|
-
type DropdownMenuProps = React.ComponentProps<typeof DropdownMenu.Root>;
|
|
6
|
-
type DropdownMenuPortalProps = React.ComponentProps<typeof DropdownMenu.Portal>;
|
|
7
|
-
type DropdownMenuTriggerProps = React.ComponentProps<typeof DropdownMenu.Trigger>;
|
|
8
|
-
type DropdownMenuContentProps = React.ComponentProps<typeof DropdownMenu.Content>;
|
|
9
|
-
type DropdownMenuGroupProps = React.ComponentProps<typeof DropdownMenu.Group>;
|
|
10
|
-
type DropdownMenuItemProps = React.ComponentProps<typeof DropdownMenu.Item> & {
|
|
11
|
-
inset?: boolean;
|
|
12
|
-
variant?: 'default' | 'destructive';
|
|
13
|
-
};
|
|
14
|
-
type DropdownMenuCheckboxItemProps = React.ComponentProps<typeof DropdownMenu.CheckboxItem> & {
|
|
15
|
-
inset?: boolean;
|
|
16
|
-
};
|
|
17
|
-
type DropdownMenuRadioGroupProps = React.ComponentProps<typeof DropdownMenu.RadioGroup>;
|
|
18
|
-
type DropdownMenuRadioItemProps = React.ComponentProps<typeof DropdownMenu.RadioItem> & {
|
|
19
|
-
inset?: boolean;
|
|
20
|
-
};
|
|
21
|
-
type DropdownMenuLabelProps = React.ComponentProps<typeof DropdownMenu.Label> & {
|
|
22
|
-
inset?: boolean;
|
|
23
|
-
};
|
|
24
|
-
type DropdownMenuSeparatorProps = React.ComponentProps<typeof DropdownMenu.Separator>;
|
|
25
|
-
type DropdownMenuShortcutProps = React.ComponentProps<'span'>;
|
|
26
|
-
type DropdownMenuSubProps = React.ComponentProps<typeof DropdownMenu.Sub>;
|
|
27
|
-
type DropdownMenuSubTriggerProps = React.ComponentProps<typeof DropdownMenu.SubTrigger> & {
|
|
28
|
-
inset?: boolean;
|
|
29
|
-
};
|
|
30
|
-
type DropdownMenuSubContentProps = React.ComponentProps<typeof DropdownMenu.SubContent>;
|
|
31
|
-
declare function DropdownMenu$1({ ...props }: DropdownMenuProps): React.JSX.Element;
|
|
32
|
-
declare function DropdownMenuPortal({ ...props }: DropdownMenuPortalProps): React.JSX.Element;
|
|
33
|
-
declare function DropdownMenuTrigger({ ...props }: DropdownMenuTriggerProps): React.JSX.Element;
|
|
34
|
-
declare function DropdownMenuContent({ className, align, sideOffset, ...props }: DropdownMenuContentProps): React.JSX.Element;
|
|
35
|
-
declare function DropdownMenuGroup({ ...props }: DropdownMenuGroupProps): React.JSX.Element;
|
|
36
|
-
declare function DropdownMenuItem({ className, inset, variant, ...props }: DropdownMenuItemProps): React.JSX.Element;
|
|
37
|
-
declare function DropdownMenuCheckboxItem({ className, children, inset, ...props }: DropdownMenuCheckboxItemProps): React.JSX.Element;
|
|
38
|
-
declare function DropdownMenuRadioGroup({ ...props }: DropdownMenuRadioGroupProps): React.JSX.Element;
|
|
39
|
-
declare function DropdownMenuRadioItem({ className, children, inset, ...props }: DropdownMenuRadioItemProps): React.JSX.Element;
|
|
40
|
-
declare function DropdownMenuLabel({ className, inset, ...props }: DropdownMenuLabelProps): React.JSX.Element;
|
|
41
|
-
declare function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps): React.JSX.Element;
|
|
42
|
-
declare function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps): React.JSX.Element;
|
|
43
|
-
declare function DropdownMenuSub({ ...props }: DropdownMenuSubProps): React.JSX.Element;
|
|
44
|
-
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: DropdownMenuSubTriggerProps): React.JSX.Element;
|
|
45
|
-
declare function DropdownMenuSubContent({ className, ...props }: DropdownMenuSubContentProps): React.JSX.Element;
|
|
46
|
-
//#endregion
|
|
47
|
-
export { DropdownMenuTriggerProps as A, DropdownMenuSub as C, DropdownMenuSubTrigger as D, DropdownMenuSubProps as E, DropdownMenuSubTriggerProps as O, DropdownMenuShortcutProps as S, DropdownMenuSubContentProps as T, DropdownMenuRadioItem as _, DropdownMenuContentProps as a, DropdownMenuSeparatorProps as b, DropdownMenuItem as c, DropdownMenuLabelProps as d, DropdownMenuPortal as f, DropdownMenuRadioGroupProps as g, DropdownMenuRadioGroup as h, DropdownMenuContent as i, DropdownMenuTrigger as k, DropdownMenuItemProps as l, DropdownMenuProps as m, DropdownMenuCheckboxItem as n, DropdownMenuGroup as o, DropdownMenuPortalProps as p, DropdownMenuCheckboxItemProps as r, DropdownMenuGroupProps as s, DropdownMenu$1 as t, DropdownMenuLabel as u, DropdownMenuRadioItemProps as v, DropdownMenuSubContent as w, DropdownMenuShortcut as x, DropdownMenuSeparator as y };
|
|
48
|
-
//# sourceMappingURL=dropdown-menu-CVDIf0Rd.d.ts.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-Bdj-bS2b.js";import{t}from"./utils-DP9KtG7I.js";import{IconCheck as n,IconChevronRight as r}from"@tabler/icons-react";import{DropdownMenu as i}from"radix-ui";import{jsx as a,jsxs as o}from"react/jsx-runtime";function DropdownMenu$1({...e}){return a(i.Root,{"data-slot":`dropdown-menu`,...e})}e(DropdownMenu$1,`DropdownMenu`);function DropdownMenuPortal({...e}){return a(i.Portal,{"data-slot":`dropdown-menu-portal`,...e})}function DropdownMenuTrigger({...e}){return a(i.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function DropdownMenuContent({className:e,align:n=`start`,sideOffset:r=4,...o}){return a(DropdownMenuPortal,{children:a(i.Content,{"data-slot":`dropdown-menu-content`,align:n,sideOffset:r,className:t(`relative z-50 w-(--radix-dropdown-menu-trigger-width) min-w-32 max-h-(--radix-dropdown-menu-content-available-height)`,`origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1`,`bg-popover/70 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100`,`data-[state=closed]:overflow-hidden`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,`before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit]`,`before:backdrop-blur-2xl before:backdrop-saturate-150`,`**:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10`,`**:data-[slot$=-separator]:bg-foreground/5`,`**:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!`,`**:data-[variant=destructive]:focus:bg-destructive/10! dark:**:data-[variant=destructive]:focus:bg-destructive/20!`,`**:data-[variant=destructive]:text-destructive! **:data-[variant=destructive]:**:text-destructive!`,`animate-none!`,e),...o})})}function DropdownMenuGroup({...e}){return a(i.Group,{"data-slot":`dropdown-menu-group`,...e})}function DropdownMenuItem({className:e,inset:n,variant:r=`default`,...o}){return a(i.Item,{"data-slot":`dropdown-menu-item`,"data-inset":n,"data-variant":r,className:t(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm`,`select-none outline-hidden`,`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground`,`data-inset:pl-7`,`data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive`,`dark:data-[variant=destructive]:focus:bg-destructive/20`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`data-[variant=destructive]:*:[svg]:text-destructive`,e),...o})}function DropdownMenuCheckboxItem({className:e,children:r,inset:s,...c}){return o(i.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":s,className:t(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm`,`select-none outline-hidden`,`focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground`,`data-inset:pl-7`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...c,children:[a(`span`,{"data-slot":`dropdown-menu-checkbox-item-indicator`,className:`pointer-events-none absolute right-2 flex items-center justify-center`,children:a(i.ItemIndicator,{children:a(n,{})})}),r]})}function DropdownMenuRadioGroup({...e}){return a(i.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function DropdownMenuRadioItem({className:e,children:r,inset:s,...c}){return o(i.RadioItem,{"data-slot":`dropdown-menu-radio-item`,"data-inset":s,className:t(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm`,`select-none outline-hidden`,`focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground`,`data-inset:pl-7`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...c,children:[a(`span`,{"data-slot":`dropdown-menu-radio-item-indicator`,className:`pointer-events-none absolute right-2 flex items-center justify-center`,children:a(i.ItemIndicator,{children:a(n,{})})}),r]})}function DropdownMenuLabel({className:e,inset:n,...r}){return a(i.Label,{"data-slot":`dropdown-menu-label`,"data-inset":n,className:t(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,e),...r})}function DropdownMenuSeparator({className:e,...n}){return a(i.Separator,{"data-slot":`dropdown-menu-separator`,className:t(`bg-border -mx-1 my-1 h-px`,e),...n})}function DropdownMenuShortcut({className:e,...n}){return a(`span`,{"data-slot":`dropdown-menu-shortcut`,className:t(`ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground`,e),...n})}function DropdownMenuSub({...e}){return a(i.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function DropdownMenuSubTrigger({className:e,inset:n,children:s,...c}){return o(i.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":n,className:t(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm`,`select-none outline-hidden`,`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground`,`data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...c,children:[s,a(r,{className:`ml-auto`})]})}function DropdownMenuSubContent({className:e,...n}){return a(i.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:t(`relative z-50 min-w-24 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg p-1`,`bg-popover/70 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,`before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit]`,`before:backdrop-blur-2xl before:backdrop-saturate-150`,`**:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10`,`**:data-[slot$=-separator]:bg-foreground/5`,`**:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!`,`**:data-[variant=destructive]:focus:bg-destructive/10! dark:**:data-[variant=destructive]:focus:bg-destructive/20!`,`**:data-[variant=destructive]:text-destructive! **:data-[variant=destructive]:**:text-destructive!`,`animate-none!`,e),...n})}export{DropdownMenuItem as a,DropdownMenuRadioGroup as c,DropdownMenuShortcut as d,DropdownMenuSub as f,DropdownMenuTrigger as h,DropdownMenuGroup as i,DropdownMenuRadioItem as l,DropdownMenuSubTrigger as m,DropdownMenuCheckboxItem as n,DropdownMenuLabel as o,DropdownMenuSubContent as p,DropdownMenuContent as r,DropdownMenuPortal as s,DropdownMenu$1 as t,DropdownMenuSeparator as u};
|
|
2
|
-
//# sourceMappingURL=dropdown-menu-zRuQQS5S.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu-zRuQQS5S.js","names":["DropdownMenu","DropdownMenuPrimitive"],"sources":["../src/components/dropdown-menu.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconCheck, IconChevronRight } from '@tabler/icons-react'\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type DropdownMenuProps = React.ComponentProps<typeof DropdownMenuPrimitive.Root>\n\nexport type DropdownMenuPortalProps = React.ComponentProps<typeof DropdownMenuPrimitive.Portal>\n\nexport type DropdownMenuTriggerProps = React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>\n\nexport type DropdownMenuContentProps = React.ComponentProps<typeof DropdownMenuPrimitive.Content>\n\nexport type DropdownMenuGroupProps = React.ComponentProps<typeof DropdownMenuPrimitive.Group>\n\nexport type DropdownMenuItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: 'default' | 'destructive'\n}\n\nexport type DropdownMenuCheckboxItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {\n inset?: boolean\n}\n\nexport type DropdownMenuRadioGroupProps = React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>\n\nexport type DropdownMenuRadioItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {\n inset?: boolean\n}\n\nexport type DropdownMenuLabelProps = React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}\n\nexport type DropdownMenuSeparatorProps = React.ComponentProps<typeof DropdownMenuPrimitive.Separator>\n\nexport type DropdownMenuShortcutProps = React.ComponentProps<'span'>\n\nexport type DropdownMenuSubProps = React.ComponentProps<typeof DropdownMenuPrimitive.Sub>\n\nexport type DropdownMenuSubTriggerProps = React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}\n\nexport type DropdownMenuSubContentProps = React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>\n\nfunction DropdownMenu({ ...props }: DropdownMenuProps) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({ ...props }: DropdownMenuPortalProps) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n}\n\nfunction DropdownMenuTrigger({ ...props }: DropdownMenuTriggerProps) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />\n}\n\nfunction DropdownMenuContent({ className, align = 'start', sideOffset = 4, ...props }: DropdownMenuContentProps) {\n return (\n <DropdownMenuPortal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'relative z-50 w-(--radix-dropdown-menu-trigger-width) min-w-32 max-h-(--radix-dropdown-menu-content-available-height)',\n 'origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1',\n 'bg-popover/70 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100',\n 'data-[state=closed]:overflow-hidden',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95',\n 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n 'before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit]',\n 'before:backdrop-blur-2xl before:backdrop-saturate-150',\n '**:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10',\n '**:data-[slot$=-separator]:bg-foreground/5',\n '**:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!',\n '**:data-[variant=destructive]:focus:bg-destructive/10! dark:**:data-[variant=destructive]:focus:bg-destructive/20!',\n '**:data-[variant=destructive]:text-destructive! **:data-[variant=destructive]:**:text-destructive!',\n 'animate-none!',\n className\n )}\n {...props}\n />\n </DropdownMenuPortal>\n )\n}\n\nfunction DropdownMenuGroup({ ...props }: DropdownMenuGroupProps) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n}\n\nfunction DropdownMenuItem({ className, inset, variant = 'default', ...props }: DropdownMenuItemProps) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm',\n 'select-none outline-hidden',\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'data-inset:pl-7',\n 'data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive',\n 'dark:data-[variant=destructive]:focus:bg-destructive/20',\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n 'data-[variant=destructive]:*:[svg]:text-destructive',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({ className, children, inset, ...props }: DropdownMenuCheckboxItemProps) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n 'relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm',\n 'select-none outline-hidden',\n 'focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground',\n 'data-inset:pl-7',\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span\n data-slot=\"dropdown-menu-checkbox-item-indicator\"\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n >\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCheck />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: DropdownMenuRadioGroupProps) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />\n}\n\nfunction DropdownMenuRadioItem({ className, children, inset, ...props }: DropdownMenuRadioItemProps) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n data-inset={inset}\n className={cn(\n 'relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm',\n 'select-none outline-hidden',\n 'focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground',\n 'data-inset:pl-7',\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span\n data-slot=\"dropdown-menu-radio-item-indicator\"\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n >\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCheck />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({ className, inset, ...props }: DropdownMenuLabelProps) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7', className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n 'ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSub({ ...props }: DropdownMenuSubProps) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({ className, inset, children, ...props }: DropdownMenuSubTriggerProps) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm',\n 'select-none outline-hidden',\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <IconChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({ className, ...props }: DropdownMenuSubContentProps) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'relative z-50 min-w-24 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg p-1',\n 'bg-popover/70 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95',\n 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n 'before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit]',\n 'before:backdrop-blur-2xl before:backdrop-saturate-150',\n '**:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10',\n '**:data-[slot$=-separator]:bg-foreground/5',\n '**:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!',\n '**:data-[variant=destructive]:focus:bg-destructive/10! dark:**:data-[variant=destructive]:focus:bg-destructive/20!',\n '**:data-[variant=destructive]:text-destructive! **:data-[variant=destructive]:**:text-destructive!',\n 'animate-none!',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger\n}\n"],"mappings":"sPAgDA,SAASA,eAAa,CAAE,GAAG,GAA4B,CACrD,OAAO,EAACC,EAAsB,KAAvB,CAA4B,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CAC3E,kCAEA,SAAS,mBAAmB,CAAE,GAAG,GAAkC,CACjE,OAAO,EAACA,EAAsB,OAAvB,CAA8B,YAAU,uBAAuB,GAAI,CAAQ,CAAA,CACpF,CAEA,SAAS,oBAAoB,CAAE,GAAG,GAAmC,CACnE,OAAO,EAACA,EAAsB,QAAvB,CAA+B,YAAU,wBAAwB,GAAI,CAAQ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CACF,EACA,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { n as __name } from "./rolldown-runtime-Bdj-bS2b.js";
|
|
2
|
-
import { n as ButtonProps } from "./button-BNGy28pv.js";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { Accept, ErrorCode, FileError, useDropzone } from "react-dropzone";
|
|
5
|
-
//#region src/components/dropzone.d.ts
|
|
6
|
-
type DropzoneUploadResult<TUploadResult, TUploadError> = {
|
|
7
|
-
status: 'error';
|
|
8
|
-
error: TUploadError;
|
|
9
|
-
} | {
|
|
10
|
-
status: 'success';
|
|
11
|
-
result: TUploadResult;
|
|
12
|
-
};
|
|
13
|
-
type DropzoneFileStatus<TUploadResult, TUploadError> = {
|
|
14
|
-
id: string;
|
|
15
|
-
fileName: string;
|
|
16
|
-
file: File;
|
|
17
|
-
tries: number;
|
|
18
|
-
} & ({
|
|
19
|
-
status: 'pending';
|
|
20
|
-
error?: undefined;
|
|
21
|
-
message?: undefined;
|
|
22
|
-
result?: undefined;
|
|
23
|
-
} | {
|
|
24
|
-
status: 'error';
|
|
25
|
-
error: TUploadError;
|
|
26
|
-
message?: string;
|
|
27
|
-
result?: undefined;
|
|
28
|
-
} | {
|
|
29
|
-
status: 'success';
|
|
30
|
-
result: TUploadResult;
|
|
31
|
-
error?: undefined;
|
|
32
|
-
message?: undefined;
|
|
33
|
-
});
|
|
34
|
-
type FileStatus<TUploadResult, TUploadError> = DropzoneFileStatus<TUploadResult, TUploadError>;
|
|
35
|
-
type DropzoneValidation = {
|
|
36
|
-
accept?: Accept;
|
|
37
|
-
minSize?: number;
|
|
38
|
-
maxSize?: number;
|
|
39
|
-
maxFiles?: number;
|
|
40
|
-
};
|
|
41
|
-
type UseDropzoneProps<TUploadResult, TUploadError = string> = {
|
|
42
|
-
onDropFile: (file: File) => Promise<DropzoneUploadResult<TUploadResult, TUploadError>>;
|
|
43
|
-
onRemoveFile?: (id: string) => void | Promise<void>;
|
|
44
|
-
onFileUploaded?: (result: TUploadResult) => void;
|
|
45
|
-
onFileUploadError?: (error: TUploadError) => void;
|
|
46
|
-
onAllUploaded?: () => void;
|
|
47
|
-
onRootError?: (error: string | undefined) => void;
|
|
48
|
-
shapeUploadError?: (error: TUploadError) => string | undefined;
|
|
49
|
-
maxRetryCount?: number;
|
|
50
|
-
autoRetry?: boolean;
|
|
51
|
-
validation?: DropzoneValidation;
|
|
52
|
-
shiftOnMaxFiles?: boolean;
|
|
53
|
-
};
|
|
54
|
-
interface UseDropzoneReturn<TUploadResult, TUploadError> {
|
|
55
|
-
getRootProps: ReturnType<typeof useDropzone>['getRootProps'];
|
|
56
|
-
getInputProps: ReturnType<typeof useDropzone>['getInputProps'];
|
|
57
|
-
open: () => void;
|
|
58
|
-
onRemoveFile: (id: string) => Promise<void>;
|
|
59
|
-
onRetry: (id: string) => Promise<void>;
|
|
60
|
-
canRetry: (id: string) => boolean;
|
|
61
|
-
fileStatuses: DropzoneFileStatus<TUploadResult, TUploadError>[];
|
|
62
|
-
isInvalid: boolean;
|
|
63
|
-
isDragActive: boolean;
|
|
64
|
-
rootError: string | undefined;
|
|
65
|
-
inputId: string;
|
|
66
|
-
rootMessageId: string;
|
|
67
|
-
rootDescriptionId: string;
|
|
68
|
-
getFileMessageId: (id: string) => string;
|
|
69
|
-
}
|
|
70
|
-
type DropzoneProps<TUploadResult, TUploadError> = React.PropsWithChildren<UseDropzoneReturn<TUploadResult, TUploadError>>;
|
|
71
|
-
type DropzoneAreaProps = React.ComponentProps<'div'>;
|
|
72
|
-
type DropzoneDescriptionProps = React.ComponentProps<'p'>;
|
|
73
|
-
type DropzoneFileListProps = React.ComponentProps<'ol'>;
|
|
74
|
-
type DropzoneFileListItemProps<TUploadResult, TUploadError> = React.ComponentProps<'li'> & {
|
|
75
|
-
file: DropzoneFileStatus<TUploadResult, TUploadError>;
|
|
76
|
-
};
|
|
77
|
-
type DropzoneFileMessageProps = React.ComponentProps<'p'>;
|
|
78
|
-
type DropzoneMessageProps = React.ComponentProps<'p'>;
|
|
79
|
-
type DropzoneRemoveFileProps = ButtonProps;
|
|
80
|
-
type DropzoneRetryFileProps = ButtonProps;
|
|
81
|
-
type DropzoneTriggerProps = ButtonProps;
|
|
82
|
-
type InfiniteProgressProps = React.ComponentProps<'div'> & {
|
|
83
|
-
status: 'pending' | 'success' | 'error';
|
|
84
|
-
};
|
|
85
|
-
declare function useDropzone$1<TUploadResult, TUploadError = string>(props: UseDropzoneProps<TUploadResult, TUploadError>): UseDropzoneReturn<TUploadResult, TUploadError>;
|
|
86
|
-
declare function Dropzone<TUploadResult, TUploadError>({ children, ...dropzone }: DropzoneProps<TUploadResult, TUploadError>): React.JSX.Element;
|
|
87
|
-
declare namespace Dropzone {
|
|
88
|
-
var displayName: string;
|
|
89
|
-
}
|
|
90
|
-
declare const DropzoneArea: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
91
|
-
declare const DropzoneDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
92
|
-
declare const DropzoneFileList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
93
|
-
declare const DropzoneFileListItem: React.ForwardRefExoticComponent<Omit<DropzoneFileListItemProps<unknown, unknown>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
94
|
-
declare const DropzoneFileMessage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
95
|
-
declare const DropzoneMessage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
96
|
-
declare const DropzoneRemoveFile: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
97
|
-
declare const DropzoneRetryFile: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
98
|
-
declare const DropzoneTrigger: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
99
|
-
declare const InfiniteProgress: React.ForwardRefExoticComponent<Omit<InfiniteProgressProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
100
|
-
//#endregion
|
|
101
|
-
export { UseDropzoneReturn as A, DropzoneValidation as C, InfiniteProgress as D, FileStatus as E, InfiniteProgressProps as O, DropzoneUploadResult as S, FileError as T, DropzoneRemoveFileProps as _, DropzoneDescriptionProps as a, DropzoneTrigger as b, DropzoneFileListItemProps as c, DropzoneFileMessageProps as d, DropzoneFileStatus as f, DropzoneRemoveFile as g, DropzoneProps as h, DropzoneDescription as i, useDropzone$1 as j, UseDropzoneProps as k, DropzoneFileListProps as l, DropzoneMessageProps as m, DropzoneArea as n, DropzoneFileList as o, DropzoneMessage as p, DropzoneAreaProps as r, DropzoneFileListItem as s, Dropzone as t, DropzoneFileMessage as u, DropzoneRetryFile as v, ErrorCode as w, DropzoneTriggerProps as x, DropzoneRetryFileProps as y };
|
|
102
|
-
//# sourceMappingURL=dropzone-43h3L9Ko.d.ts.map
|