@devalok/shilp-sutra 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composed/avatar-group.d.ts +17 -0
- package/dist/composed/avatar-group.d.ts.map +1 -0
- package/dist/composed/avatar-group.js +103 -0
- package/dist/composed/command-palette.d.ts +29 -0
- package/dist/composed/command-palette.d.ts.map +1 -0
- package/dist/composed/command-palette.js +215 -0
- package/dist/composed/content-card.d.ts +15 -0
- package/dist/composed/content-card.d.ts.map +1 -0
- package/dist/composed/content-card.js +108 -0
- package/dist/composed/date-picker/calendar-grid.d.ts +21 -0
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -0
- package/dist/composed/date-picker/calendar-grid.js +173 -0
- package/dist/composed/date-picker/date-picker.d.ts +14 -0
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -0
- package/dist/composed/date-picker/date-picker.js +123 -0
- package/dist/composed/date-picker/date-range-picker.d.ts +23 -0
- package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -0
- package/dist/composed/date-picker/date-range-picker.js +166 -0
- package/dist/composed/date-picker/date-time-picker.d.ts +24 -0
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -0
- package/dist/composed/date-picker/date-time-picker.js +192 -0
- package/dist/composed/date-picker/index.d.ts +18 -0
- package/dist/composed/date-picker/index.d.ts.map +1 -0
- package/dist/composed/date-picker/month-picker.d.ts +10 -0
- package/dist/composed/date-picker/month-picker.d.ts.map +1 -0
- package/dist/composed/date-picker/month-picker.js +52 -0
- package/dist/composed/date-picker/presets.d.ts +9 -0
- package/dist/composed/date-picker/presets.d.ts.map +1 -0
- package/dist/composed/date-picker/presets.js +83 -0
- package/dist/composed/date-picker/time-picker.d.ts +24 -0
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -0
- package/dist/composed/date-picker/time-picker.js +180 -0
- package/dist/composed/date-picker/use-calendar.d.ts +9 -0
- package/dist/composed/date-picker/use-calendar.d.ts.map +1 -0
- package/dist/composed/date-picker/use-calendar.js +16 -0
- package/dist/composed/date-picker/year-picker.d.ts +10 -0
- package/dist/composed/date-picker/year-picker.d.ts.map +1 -0
- package/dist/composed/date-picker/year-picker.js +44 -0
- package/dist/composed/empty-state.d.ts +12 -0
- package/dist/composed/empty-state.d.ts.map +1 -0
- package/dist/composed/empty-state.js +74 -0
- package/dist/composed/error-boundary.d.ts +8 -0
- package/dist/composed/error-boundary.d.ts.map +1 -0
- package/dist/composed/error-boundary.js +114 -0
- package/dist/composed/global-loading.d.ts +7 -0
- package/dist/composed/global-loading.d.ts.map +1 -0
- package/dist/composed/global-loading.js +43 -0
- package/dist/composed/index.d.ts +28 -0
- package/dist/composed/index.d.ts.map +1 -0
- package/dist/composed/index.js +54 -0
- package/dist/composed/lib/string-utils.d.ts +6 -0
- package/dist/composed/lib/string-utils.d.ts.map +1 -0
- package/dist/composed/lib/string-utils.js +7 -0
- package/dist/composed/loading-skeleton.d.ts +22 -0
- package/dist/composed/loading-skeleton.d.ts.map +1 -0
- package/dist/composed/loading-skeleton.js +164 -0
- package/dist/composed/member-picker.d.ts +17 -0
- package/dist/composed/member-picker.d.ts.map +1 -0
- package/dist/composed/member-picker.js +81 -0
- package/dist/composed/page-header.d.ts +15 -0
- package/dist/composed/page-header.d.ts.map +1 -0
- package/dist/composed/page-header.js +65 -0
- package/dist/composed/page-skeletons.d.ts +6 -0
- package/dist/composed/page-skeletons.d.ts.map +1 -0
- package/dist/composed/page-skeletons.js +128 -0
- package/dist/composed/priority-indicator.d.ts +12 -0
- package/dist/composed/priority-indicator.d.ts.map +1 -0
- package/dist/composed/priority-indicator.js +86 -0
- package/dist/composed/rich-text-editor.d.ts +16 -0
- package/dist/composed/rich-text-editor.d.ts.map +1 -0
- package/dist/composed/rich-text-editor.js +222 -0
- package/dist/composed/status-badge.d.ts +13 -0
- package/dist/composed/status-badge.d.ts.map +1 -0
- package/dist/composed/status-badge.js +69 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/use-color-mode.d.ts +7 -0
- package/dist/hooks/use-color-mode.d.ts.map +1 -0
- package/dist/hooks/use-color-mode.js +23 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +14 -0
- package/dist/hooks/use-toast.d.ts +46 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +97 -0
- package/dist/primitives/_internal/number.d.ts +7 -0
- package/dist/primitives/_internal/number.d.ts.map +1 -0
- package/dist/primitives/_internal/number.js +6 -0
- package/dist/primitives/_internal/primitive.d.ts +17 -0
- package/dist/primitives/_internal/primitive.d.ts.map +1 -0
- package/dist/primitives/_internal/primitive.js +9 -0
- package/dist/primitives/_internal/react-arrow.d.ts +14 -0
- package/dist/primitives/_internal/react-arrow.d.ts.map +1 -0
- package/dist/primitives/_internal/react-arrow.js +24 -0
- package/dist/primitives/_internal/react-collection.d.ts +22 -0
- package/dist/primitives/_internal/react-collection.d.ts.map +1 -0
- package/dist/primitives/_internal/react-collection.js +48 -0
- package/dist/primitives/_internal/react-compose-refs.d.ts +10 -0
- package/dist/primitives/_internal/react-compose-refs.d.ts.map +1 -0
- package/dist/primitives/_internal/react-compose-refs.js +29 -0
- package/dist/primitives/_internal/react-context.d.ts +25 -0
- package/dist/primitives/_internal/react-context.d.ts.map +1 -0
- package/dist/primitives/_internal/react-context.js +74 -0
- package/dist/primitives/_internal/react-direction.d.ts +16 -0
- package/dist/primitives/_internal/react-direction.d.ts.map +1 -0
- package/dist/primitives/_internal/react-direction.js +10 -0
- package/dist/primitives/_internal/react-dismissable-layer.d.ts +30 -0
- package/dist/primitives/_internal/react-dismissable-layer.d.ts.map +1 -0
- package/dist/primitives/_internal/react-dismissable-layer.js +131 -0
- package/dist/primitives/_internal/react-focus-guards.d.ts +12 -0
- package/dist/primitives/_internal/react-focus-guards.d.ts.map +1 -0
- package/dist/primitives/_internal/react-focus-guards.js +17 -0
- package/dist/primitives/_internal/react-focus-scope.d.ts +18 -0
- package/dist/primitives/_internal/react-focus-scope.d.ts.map +1 -0
- package/dist/primitives/_internal/react-focus-scope.js +137 -0
- package/dist/primitives/_internal/react-id.d.ts +7 -0
- package/dist/primitives/_internal/react-id.d.ts.map +1 -0
- package/dist/primitives/_internal/react-id.js +14 -0
- package/dist/primitives/_internal/react-popper.d.ts +50 -0
- package/dist/primitives/_internal/react-popper.d.ts.map +1 -0
- package/dist/primitives/_internal/react-popper.js +199 -0
- package/dist/primitives/_internal/react-portal.d.ts +15 -0
- package/dist/primitives/_internal/react-portal.d.ts.map +1 -0
- package/dist/primitives/_internal/react-portal.js +16 -0
- package/dist/primitives/_internal/react-presence.d.ts +16 -0
- package/dist/primitives/_internal/react-presence.d.ts.map +1 -0
- package/dist/primitives/_internal/react-presence.js +71 -0
- package/dist/primitives/_internal/react-primitive.d.ts +20 -0
- package/dist/primitives/_internal/react-primitive.d.ts.map +1 -0
- package/dist/primitives/_internal/react-primitive.js +36 -0
- package/dist/primitives/_internal/react-use-callback-ref.d.ts +7 -0
- package/dist/primitives/_internal/react-use-callback-ref.d.ts.map +1 -0
- package/dist/primitives/_internal/react-use-callback-ref.js +13 -0
- package/dist/primitives/_internal/react-use-controllable-state.d.ts +16 -0
- package/dist/primitives/_internal/react-use-controllable-state.d.ts.map +1 -0
- package/dist/primitives/_internal/react-use-controllable-state.js +44 -0
- package/dist/primitives/_internal/react-use-effect-event.d.ts +8 -0
- package/dist/primitives/_internal/react-use-effect-event.d.ts.map +1 -0
- package/dist/primitives/_internal/react-use-escape-keydown.d.ts +7 -0
- package/dist/primitives/_internal/react-use-escape-keydown.d.ts.map +1 -0
- package/dist/primitives/_internal/react-use-escape-keydown.js +14 -0
- package/dist/primitives/_internal/react-use-is-hydrated.d.ts +7 -0
- package/dist/primitives/_internal/react-use-is-hydrated.d.ts.map +1 -0
- package/dist/primitives/_internal/react-use-is-hydrated.js +15 -0
- package/dist/primitives/_internal/react-use-layout-effect.d.ts +8 -0
- package/dist/primitives/_internal/react-use-layout-effect.d.ts.map +1 -0
- package/dist/primitives/_internal/react-use-layout-effect.js +6 -0
- package/dist/primitives/_internal/react-use-previous.d.ts +7 -0
- package/dist/primitives/_internal/react-use-previous.d.ts.map +1 -0
- package/dist/primitives/_internal/react-use-previous.js +8 -0
- package/dist/primitives/_internal/react-use-rect.d.ts +4 -0
- package/dist/primitives/_internal/react-use-rect.d.ts.map +1 -0
- package/dist/primitives/_internal/react-use-size.d.ts +10 -0
- package/dist/primitives/_internal/react-use-size.d.ts.map +1 -0
- package/dist/primitives/_internal/react-use-size.js +27 -0
- package/dist/primitives/_internal/rect.d.ts +12 -0
- package/dist/primitives/_internal/rect.d.ts.map +1 -0
- package/dist/primitives/react-accordion.js +239 -0
- package/dist/primitives/react-alert-dialog.js +127 -0
- package/dist/primitives/react-aspect-ratio.js +43 -0
- package/dist/primitives/react-avatar.js +75 -0
- package/dist/primitives/react-checkbox.js +251 -0
- package/dist/primitives/react-collapsible.js +120 -0
- package/dist/primitives/react-context-menu.js +240 -0
- package/dist/primitives/react-dialog.js +262 -0
- package/dist/primitives/react-dropdown-menu.js +227 -0
- package/dist/primitives/react-hover-card.js +187 -0
- package/dist/primitives/react-label.js +20 -0
- package/dist/primitives/react-menu.js +652 -0
- package/dist/primitives/react-menubar.js +355 -0
- package/dist/primitives/react-navigation-menu.js +607 -0
- package/dist/primitives/react-popover.js +243 -0
- package/dist/primitives/react-progress.js +84 -0
- package/dist/primitives/react-radio-group.js +238 -0
- package/dist/primitives/react-roving-focus.js +183 -0
- package/dist/primitives/react-select.js +862 -0
- package/dist/primitives/react-separator.js +24 -0
- package/dist/primitives/react-slider.js +437 -0
- package/dist/primitives/react-slot.d.ts +27 -0
- package/dist/primitives/react-slot.d.ts.map +1 -0
- package/dist/primitives/react-slot.js +70 -0
- package/dist/primitives/react-switch.js +132 -0
- package/dist/primitives/react-tabs.js +163 -0
- package/dist/primitives/react-toast.js +446 -0
- package/dist/primitives/react-toggle-group.js +137 -0
- package/dist/primitives/react-toggle.js +33 -0
- package/dist/primitives/react-tooltip.js +338 -0
- package/dist/primitives/react-visually-hidden.js +32 -0
- package/dist/shell/app-command-palette.d.ts +35 -0
- package/dist/shell/app-command-palette.d.ts.map +1 -0
- package/dist/shell/app-command-palette.js +196 -0
- package/dist/shell/bottom-navbar.d.ts +35 -0
- package/dist/shell/bottom-navbar.d.ts.map +1 -0
- package/dist/shell/bottom-navbar.js +160 -0
- package/dist/shell/index.d.ts +7 -0
- package/dist/shell/index.d.ts.map +1 -0
- package/dist/shell/index.js +14 -0
- package/dist/shell/notification-center.d.ts +50 -0
- package/dist/shell/notification-center.d.ts.map +1 -0
- package/dist/shell/notification-center.js +221 -0
- package/dist/shell/notification-preferences.d.ts +41 -0
- package/dist/shell/notification-preferences.d.ts.map +1 -0
- package/dist/shell/notification-preferences.js +183 -0
- package/dist/shell/sidebar.d.ts +51 -0
- package/dist/shell/sidebar.d.ts.map +1 -0
- package/dist/shell/sidebar.js +101 -0
- package/dist/shell/top-bar.d.ts +33 -0
- package/dist/shell/top-bar.d.ts.map +1 -0
- package/dist/shell/top-bar.js +140 -0
- package/dist/tailwind/index.d.ts +2 -0
- package/dist/tailwind/index.d.ts.map +1 -0
- package/dist/tailwind/index.js +4 -0
- package/dist/tailwind/preset.d.ts +4 -0
- package/dist/tailwind/preset.d.ts.map +1 -0
- package/dist/tailwind/preset.js +310 -0
- package/dist/tokens/index.css +3 -0
- package/dist/tokens/primitives.css +189 -0
- package/dist/tokens/semantic.css +426 -0
- package/dist/tokens/typography-semantic.css +100 -0
- package/dist/tokens/typography.css +393 -0
- package/dist/ui/accordion.d.ts +53 -0
- package/dist/ui/accordion.d.ts.map +1 -0
- package/dist/ui/accordion.js +46 -0
- package/dist/ui/alert-dialog.d.ts +21 -0
- package/dist/ui/alert-dialog.d.ts.map +1 -0
- package/dist/ui/alert-dialog.js +117 -0
- package/dist/ui/alert.d.ts +47 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/alert.js +52 -0
- package/dist/ui/aspect-ratio.d.ts +4 -0
- package/dist/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/ui/aspect-ratio.js +6 -0
- package/dist/ui/autocomplete.d.ts +49 -0
- package/dist/ui/autocomplete.d.ts.map +1 -0
- package/dist/ui/autocomplete.js +124 -0
- package/dist/ui/avatar.d.ts +51 -0
- package/dist/ui/avatar.d.ts.map +1 -0
- package/dist/ui/avatar.js +91 -0
- package/dist/ui/badge.d.ts +43 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.js +64 -0
- package/dist/ui/banner.d.ts +43 -0
- package/dist/ui/banner.d.ts.map +1 -0
- package/dist/ui/banner.js +50 -0
- package/dist/ui/breadcrumb.d.ts +20 -0
- package/dist/ui/breadcrumb.d.ts.map +1 -0
- package/dist/ui/breadcrumb.js +83 -0
- package/dist/ui/button-group.d.ts +51 -0
- package/dist/ui/button-group.d.ts.map +1 -0
- package/dist/ui/button-group.js +41 -0
- package/dist/ui/button.d.ts +63 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +105 -0
- package/dist/ui/card.d.ts +64 -0
- package/dist/ui/card.d.ts.map +1 -0
- package/dist/ui/card.js +79 -0
- package/dist/ui/charts/_internal/animation.d.ts +5 -0
- package/dist/ui/charts/_internal/animation.d.ts.map +1 -0
- package/dist/ui/charts/_internal/animation.js +17 -0
- package/dist/ui/charts/_internal/axes.d.ts +17 -0
- package/dist/ui/charts/_internal/axes.d.ts.map +1 -0
- package/dist/ui/charts/_internal/axes.js +41 -0
- package/dist/ui/charts/_internal/colors.d.ts +8 -0
- package/dist/ui/charts/_internal/colors.d.ts.map +1 -0
- package/dist/ui/charts/_internal/colors.js +20 -0
- package/dist/ui/charts/_internal/grid-lines.d.ts +16 -0
- package/dist/ui/charts/_internal/grid-lines.d.ts.map +1 -0
- package/dist/ui/charts/_internal/grid-lines.js +42 -0
- package/dist/ui/charts/_internal/legend.d.ts +15 -0
- package/dist/ui/charts/_internal/legend.d.ts.map +1 -0
- package/dist/ui/charts/_internal/legend.js +28 -0
- package/dist/ui/charts/_internal/scales.d.ts +5 -0
- package/dist/ui/charts/_internal/scales.d.ts.map +1 -0
- package/dist/ui/charts/_internal/tooltip.d.ts +23 -0
- package/dist/ui/charts/_internal/tooltip.d.ts.map +1 -0
- package/dist/ui/charts/_internal/tooltip.js +38 -0
- package/dist/ui/charts/_internal/types.d.ts +17 -0
- package/dist/ui/charts/_internal/types.d.ts.map +1 -0
- package/dist/ui/charts/_internal/types.js +9 -0
- package/dist/ui/charts/area-chart.d.ts +39 -0
- package/dist/ui/charts/area-chart.d.ts.map +1 -0
- package/dist/ui/charts/area-chart.js +244 -0
- package/dist/ui/charts/bar-chart.d.ts +41 -0
- package/dist/ui/charts/bar-chart.d.ts.map +1 -0
- package/dist/ui/charts/bar-chart.js +152 -0
- package/dist/ui/charts/chart-container.d.ts +20 -0
- package/dist/ui/charts/chart-container.d.ts.map +1 -0
- package/dist/ui/charts/chart-container.js +26 -0
- package/dist/ui/charts/gauge-chart.d.ts +32 -0
- package/dist/ui/charts/gauge-chart.d.ts.map +1 -0
- package/dist/ui/charts/gauge-chart.js +71 -0
- package/dist/ui/charts/index.d.ts +10 -0
- package/dist/ui/charts/index.d.ts.map +1 -0
- package/dist/ui/charts/line-chart.d.ts +37 -0
- package/dist/ui/charts/line-chart.d.ts.map +1 -0
- package/dist/ui/charts/line-chart.js +162 -0
- package/dist/ui/charts/pie-chart.d.ts +37 -0
- package/dist/ui/charts/pie-chart.d.ts.map +1 -0
- package/dist/ui/charts/pie-chart.js +131 -0
- package/dist/ui/charts/radar-chart.d.ts +34 -0
- package/dist/ui/charts/radar-chart.d.ts.map +1 -0
- package/dist/ui/charts/radar-chart.js +222 -0
- package/dist/ui/charts/sparkline.d.ts +22 -0
- package/dist/ui/charts/sparkline.d.ts.map +1 -0
- package/dist/ui/charts/sparkline.js +123 -0
- package/dist/ui/checkbox.d.ts +36 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +33 -0
- package/dist/ui/chip.d.ts +66 -0
- package/dist/ui/chip.d.ts.map +1 -0
- package/dist/ui/chip.js +105 -0
- package/dist/ui/code.d.ts +30 -0
- package/dist/ui/code.d.ts.map +1 -0
- package/dist/ui/code.js +32 -0
- package/dist/ui/collapsible.d.ts +7 -0
- package/dist/ui/collapsible.d.ts.map +1 -0
- package/dist/ui/collapsible.js +21 -0
- package/dist/ui/combobox.d.ts +76 -0
- package/dist/ui/combobox.d.ts.map +1 -0
- package/dist/ui/combobox.js +286 -0
- package/dist/ui/container.d.ts +10 -0
- package/dist/ui/container.d.ts.map +1 -0
- package/dist/ui/container.js +24 -0
- package/dist/ui/context-menu.d.ts +28 -0
- package/dist/ui/context-menu.d.ts.map +1 -0
- package/dist/ui/context-menu.js +145 -0
- package/dist/ui/data-table-toolbar.d.ts +16 -0
- package/dist/ui/data-table-toolbar.d.ts.map +1 -0
- package/dist/ui/data-table-toolbar.js +136 -0
- package/dist/ui/data-table.d.ts +111 -0
- package/dist/ui/data-table.d.ts.map +1 -0
- package/dist/ui/data-table.js +491 -0
- package/dist/ui/dialog.d.ts +74 -0
- package/dist/ui/dialog.d.ts.map +1 -0
- package/dist/ui/dialog.js +110 -0
- package/dist/ui/dropdown-menu.d.ts +88 -0
- package/dist/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/dropdown-menu.js +144 -0
- package/dist/ui/file-upload.d.ts +67 -0
- package/dist/ui/file-upload.d.ts.map +1 -0
- package/dist/ui/file-upload.js +226 -0
- package/dist/ui/form.d.ts +56 -0
- package/dist/ui/form.d.ts.map +1 -0
- package/dist/ui/form.js +46 -0
- package/dist/ui/hover-card.d.ts +7 -0
- package/dist/ui/hover-card.d.ts.map +1 -0
- package/dist/ui/hover-card.js +23 -0
- package/dist/ui/icon-button.d.ts +46 -0
- package/dist/ui/icon-button.d.ts.map +1 -0
- package/dist/ui/icon-button.js +26 -0
- package/dist/ui/index.d.ts +68 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +344 -0
- package/dist/ui/input-otp.d.ts +35 -0
- package/dist/ui/input-otp.d.ts.map +1 -0
- package/dist/ui/input-otp.js +48 -0
- package/dist/ui/input.d.ts +44 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +58 -0
- package/dist/ui/label.d.ts +8 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +23 -0
- package/dist/ui/lib/motion.d.ts +10 -0
- package/dist/ui/lib/motion.d.ts.map +1 -0
- package/dist/ui/lib/motion.js +32 -0
- package/dist/ui/lib/slot.d.ts +8 -0
- package/dist/ui/lib/slot.d.ts.map +1 -0
- package/dist/ui/lib/use-reduced-motion.d.ts +3 -0
- package/dist/ui/lib/use-reduced-motion.d.ts.map +1 -0
- package/dist/ui/lib/use-reduced-motion.js +14 -0
- package/dist/ui/lib/use-ripple.d.ts +13 -0
- package/dist/ui/lib/use-ripple.d.ts.map +1 -0
- package/dist/ui/lib/use-ripple.js +13 -0
- package/dist/ui/lib/utils.d.ts +3 -0
- package/dist/ui/lib/utils.d.ts.map +1 -0
- package/dist/ui/lib/utils.js +15 -0
- package/dist/ui/link.d.ts +8 -0
- package/dist/ui/link.d.ts.map +1 -0
- package/dist/ui/link.js +24 -0
- package/dist/ui/menubar.d.ts +29 -0
- package/dist/ui/menubar.d.ts.map +1 -0
- package/dist/ui/menubar.js +176 -0
- package/dist/ui/navigation-menu.d.ts +12 -0
- package/dist/ui/navigation-menu.d.ts.map +1 -0
- package/dist/ui/navigation-menu.js +103 -0
- package/dist/ui/number-input.d.ts +40 -0
- package/dist/ui/number-input.d.ts.map +1 -0
- package/dist/ui/number-input.js +80 -0
- package/dist/ui/pagination.d.ts +74 -0
- package/dist/ui/pagination.d.ts.map +1 -0
- package/dist/ui/pagination.js +159 -0
- package/dist/ui/popover.d.ts +8 -0
- package/dist/ui/popover.d.ts.map +1 -0
- package/dist/ui/popover.js +24 -0
- package/dist/ui/progress.d.ts +49 -0
- package/dist/ui/progress.d.ts.map +1 -0
- package/dist/ui/progress.js +75 -0
- package/dist/ui/radio.d.ts +6 -0
- package/dist/ui/radio.d.ts.map +1 -0
- package/dist/ui/radio.js +29 -0
- package/dist/ui/search-input.d.ts +44 -0
- package/dist/ui/search-input.d.ts.map +1 -0
- package/dist/ui/search-input.js +63 -0
- package/dist/ui/segmented-control.d.ts +122 -0
- package/dist/ui/segmented-control.d.ts.map +1 -0
- package/dist/ui/segmented-control.js +270 -0
- package/dist/ui/select.d.ts +49 -0
- package/dist/ui/select.d.ts.map +1 -0
- package/dist/ui/select.js +132 -0
- package/dist/ui/separator.d.ts +5 -0
- package/dist/ui/separator.d.ts.map +1 -0
- package/dist/ui/separator.js +24 -0
- package/dist/ui/sheet.d.ts +108 -0
- package/dist/ui/sheet.d.ts.map +1 -0
- package/dist/ui/sheet.js +110 -0
- package/dist/ui/sidebar.d.ts +67 -0
- package/dist/ui/sidebar.d.ts.map +1 -0
- package/dist/ui/sidebar.js +562 -0
- package/dist/ui/skeleton.d.ts +40 -0
- package/dist/ui/skeleton.d.ts.map +1 -0
- package/dist/ui/skeleton.js +36 -0
- package/dist/ui/slider.d.ts +5 -0
- package/dist/ui/slider.d.ts.map +1 -0
- package/dist/ui/slider.js +29 -0
- package/dist/ui/spinner.d.ts +38 -0
- package/dist/ui/spinner.d.ts.map +1 -0
- package/dist/ui/spinner.js +47 -0
- package/dist/ui/stack.d.ts +15 -0
- package/dist/ui/stack.d.ts.map +1 -0
- package/dist/ui/stack.js +41 -0
- package/dist/ui/stat-card.d.ts +54 -0
- package/dist/ui/stat-card.d.ts.map +1 -0
- package/dist/ui/stat-card.js +52 -0
- package/dist/ui/stepper.d.ts +57 -0
- package/dist/ui/stepper.d.ts.map +1 -0
- package/dist/ui/stepper.js +90 -0
- package/dist/ui/switch.d.ts +5 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/ui/switch.js +27 -0
- package/dist/ui/table.d.ts +11 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +91 -0
- package/dist/ui/tabs.d.ts +81 -0
- package/dist/ui/tabs.d.ts.map +1 -0
- package/dist/ui/tabs.js +74 -0
- package/dist/ui/text.d.ts +47 -0
- package/dist/ui/text.d.ts.map +1 -0
- package/dist/ui/text.js +59 -0
- package/dist/ui/textarea.d.ts +40 -0
- package/dist/ui/textarea.d.ts.map +1 -0
- package/dist/ui/textarea.js +47 -0
- package/dist/ui/toast.d.ts +32 -0
- package/dist/ui/toast.d.ts.map +1 -0
- package/dist/ui/toast.js +98 -0
- package/dist/ui/toaster.d.ts +42 -0
- package/dist/ui/toaster.d.ts.map +1 -0
- package/dist/ui/toaster.js +23 -0
- package/dist/ui/toggle-group.d.ts +13 -0
- package/dist/ui/toggle-group.d.ts.map +1 -0
- package/dist/ui/toggle-group.js +40 -0
- package/dist/ui/toggle.d.ts +13 -0
- package/dist/ui/toggle.d.ts.map +1 -0
- package/dist/ui/toggle.js +37 -0
- package/dist/ui/tooltip.d.ts +8 -0
- package/dist/ui/tooltip.d.ts.map +1 -0
- package/dist/ui/tooltip.js +23 -0
- package/dist/ui/transitions.d.ts +16 -0
- package/dist/ui/transitions.d.ts.map +1 -0
- package/dist/ui/transitions.js +100 -0
- package/dist/ui/tree-view/index.d.ts +4 -0
- package/dist/ui/tree-view/index.d.ts.map +1 -0
- package/dist/ui/tree-view/tree-item.d.ts +22 -0
- package/dist/ui/tree-view/tree-item.d.ts.map +1 -0
- package/dist/ui/tree-view/tree-item.js +136 -0
- package/dist/ui/tree-view/tree-view.d.ts +29 -0
- package/dist/ui/tree-view/tree-view.d.ts.map +1 -0
- package/dist/ui/tree-view/tree-view.js +139 -0
- package/dist/ui/tree-view/use-tree.d.ts +26 -0
- package/dist/ui/tree-view/use-tree.d.ts.map +1 -0
- package/dist/ui/tree-view/use-tree.js +37 -0
- package/dist/ui/visually-hidden.d.ts +6 -0
- package/dist/ui/visually-hidden.d.ts.map +1 -0
- package/dist/ui/visually-hidden.js +10 -0
- package/fonts/GoogleSans-Italic-Variable.ttf +0 -0
- package/fonts/GoogleSans-Variable.ttf +0 -0
- package/fonts/Ranade-Variable.ttf +0 -0
- package/fonts/Ranade-VariableItalic.ttf +0 -0
- package/package.json +83 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { jsxs as w, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import { startOfMonth as v, endOfMonth as S, startOfWeek as V, endOfWeek as X, addDays as f, subMonths as Z, format as m, addMonths as _, isSameMonth as D, isSameDay as y, lastDayOfMonth as H, isBefore as k, startOfDay as W, isAfter as M, isWithinInterval as T } from "date-fns";
|
|
4
|
+
import { IconChevronLeft as ee, IconChevronRight as te } from "@tabler/icons-react";
|
|
5
|
+
import { cn as G } from "../../ui/lib/utils.js";
|
|
6
|
+
const se = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], re = g.forwardRef(
|
|
7
|
+
function({
|
|
8
|
+
currentMonth: a,
|
|
9
|
+
selected: N,
|
|
10
|
+
rangeStart: n,
|
|
11
|
+
rangeEnd: d,
|
|
12
|
+
hoverDate: l,
|
|
13
|
+
onSelect: R,
|
|
14
|
+
onHover: c,
|
|
15
|
+
onMonthChange: x,
|
|
16
|
+
onHeaderClick: j,
|
|
17
|
+
disabledDates: b,
|
|
18
|
+
minDate: A,
|
|
19
|
+
maxDate: C,
|
|
20
|
+
hidePrevNav: K,
|
|
21
|
+
hideNextNav: L
|
|
22
|
+
}, q) {
|
|
23
|
+
const h = g.useRef(null), B = v(a), F = S(a), P = V(B), U = X(F), E = [];
|
|
24
|
+
let p = P;
|
|
25
|
+
for (; p <= U; )
|
|
26
|
+
E.push(p), p = f(p, 1);
|
|
27
|
+
const I = (e) => !!(b != null && b(e) || A && k(e, W(A)) || C && M(e, W(C))), Y = (e) => {
|
|
28
|
+
if (n && d) {
|
|
29
|
+
const o = k(n, d) ? n : d, t = M(d, n) ? d : n;
|
|
30
|
+
return T(e, { start: o, end: t });
|
|
31
|
+
}
|
|
32
|
+
if (n && l) {
|
|
33
|
+
const o = k(n, l) ? n : l, t = M(l, n) ? l : n;
|
|
34
|
+
return T(e, { start: o, end: t });
|
|
35
|
+
}
|
|
36
|
+
return !1;
|
|
37
|
+
}, $ = (e) => !!(n && y(e, n) || d && y(e, d)), z = (e) => {
|
|
38
|
+
if (!h.current) return;
|
|
39
|
+
const o = m(e, "yyyy-MM-dd"), t = h.current.querySelector(
|
|
40
|
+
`[data-date="${o}"]`
|
|
41
|
+
);
|
|
42
|
+
t ? t.focus() : x(v(e));
|
|
43
|
+
}, J = (e) => {
|
|
44
|
+
const t = e.target.getAttribute("data-date");
|
|
45
|
+
if (!t) return;
|
|
46
|
+
const s = /* @__PURE__ */ new Date(t + "T00:00:00");
|
|
47
|
+
let r = null;
|
|
48
|
+
switch (e.key) {
|
|
49
|
+
case "ArrowLeft":
|
|
50
|
+
r = f(s, -1);
|
|
51
|
+
break;
|
|
52
|
+
case "ArrowRight":
|
|
53
|
+
r = f(s, 1);
|
|
54
|
+
break;
|
|
55
|
+
case "ArrowUp":
|
|
56
|
+
r = f(s, -7);
|
|
57
|
+
break;
|
|
58
|
+
case "ArrowDown":
|
|
59
|
+
r = f(s, 7);
|
|
60
|
+
break;
|
|
61
|
+
case "Home":
|
|
62
|
+
r = v(s);
|
|
63
|
+
break;
|
|
64
|
+
case "End":
|
|
65
|
+
r = H(s);
|
|
66
|
+
break;
|
|
67
|
+
case "Enter":
|
|
68
|
+
case " ": {
|
|
69
|
+
e.preventDefault(), !I(s) && D(s, a) && R(s);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
default:
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
r && (e.preventDefault(), z(r));
|
|
76
|
+
};
|
|
77
|
+
return /* @__PURE__ */ w("div", { ref: q, className: "w-[252px]", children: [
|
|
78
|
+
/* @__PURE__ */ w("div", { className: "flex items-center justify-between px-ds-02 pb-ds-04", children: [
|
|
79
|
+
K ? /* @__PURE__ */ i("span", { className: "h-ds-xs-plus w-ds-xs-plus" }) : /* @__PURE__ */ i(
|
|
80
|
+
"button",
|
|
81
|
+
{
|
|
82
|
+
type: "button",
|
|
83
|
+
onClick: () => x(Z(a, 1)),
|
|
84
|
+
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md text-text-placeholder transition-colors duration-fast-01 ease-productive-standard hover:bg-field hover:text-text-secondary",
|
|
85
|
+
"aria-label": "Previous month",
|
|
86
|
+
children: /* @__PURE__ */ i(ee, { className: "h-ico-sm w-ico-sm", stroke: 1.5 })
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ i(
|
|
90
|
+
"button",
|
|
91
|
+
{
|
|
92
|
+
type: "button",
|
|
93
|
+
onClick: j,
|
|
94
|
+
className: G(
|
|
95
|
+
"text-ds-md font-semibold text-text-primary",
|
|
96
|
+
j && "cursor-pointer rounded-ds-md px-ds-02 transition-colors duration-fast-01 ease-productive-standard hover:bg-field"
|
|
97
|
+
),
|
|
98
|
+
"aria-label": "Switch to month/year view",
|
|
99
|
+
children: m(a, "MMMM yyyy")
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
L ? /* @__PURE__ */ i("span", { className: "h-ds-xs-plus w-ds-xs-plus" }) : /* @__PURE__ */ i(
|
|
103
|
+
"button",
|
|
104
|
+
{
|
|
105
|
+
type: "button",
|
|
106
|
+
onClick: () => x(_(a, 1)),
|
|
107
|
+
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md text-text-placeholder transition-colors duration-fast-01 ease-productive-standard hover:bg-field hover:text-text-secondary",
|
|
108
|
+
"aria-label": "Next month",
|
|
109
|
+
children: /* @__PURE__ */ i(te, { className: "h-ico-sm w-ico-sm", stroke: 1.5 })
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ w(
|
|
114
|
+
"div",
|
|
115
|
+
{
|
|
116
|
+
ref: h,
|
|
117
|
+
className: "grid grid-cols-7 gap-0",
|
|
118
|
+
role: "grid",
|
|
119
|
+
tabIndex: 0,
|
|
120
|
+
"aria-label": "Calendar",
|
|
121
|
+
onKeyDown: J,
|
|
122
|
+
children: [
|
|
123
|
+
se.map((e) => /* @__PURE__ */ i(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
role: "columnheader",
|
|
127
|
+
className: "flex h-ds-sm items-center justify-center text-ds-xs font-semibold uppercase tracking-wider text-text-placeholder",
|
|
128
|
+
children: e
|
|
129
|
+
},
|
|
130
|
+
e
|
|
131
|
+
)),
|
|
132
|
+
E.map((e, o) => {
|
|
133
|
+
const t = D(e, a), s = I(e), r = N && y(e, N), O = Y(e), u = $(e), Q = y(e, /* @__PURE__ */ new Date());
|
|
134
|
+
return /* @__PURE__ */ i(
|
|
135
|
+
"button",
|
|
136
|
+
{
|
|
137
|
+
type: "button",
|
|
138
|
+
role: "gridcell",
|
|
139
|
+
"data-date": m(e, "yyyy-MM-dd"),
|
|
140
|
+
tabIndex: t && !s ? 0 : -1,
|
|
141
|
+
disabled: !t || s,
|
|
142
|
+
onClick: () => {
|
|
143
|
+
t && !s && R(e);
|
|
144
|
+
},
|
|
145
|
+
onMouseEnter: () => c == null ? void 0 : c(e),
|
|
146
|
+
onMouseLeave: () => c == null ? void 0 : c(null),
|
|
147
|
+
"aria-label": m(e, "EEEE, MMMM d, yyyy"),
|
|
148
|
+
"aria-selected": r || u || void 0,
|
|
149
|
+
"aria-disabled": !t || s || void 0,
|
|
150
|
+
className: G(
|
|
151
|
+
"flex h-ds-sm w-ds-sm-plus items-center justify-center rounded-ds-md text-ds-md font-body transition-colors duration-fast-01 ease-productive-standard",
|
|
152
|
+
!t && "pointer-events-none opacity-0",
|
|
153
|
+
t && s && "opacity-[0.38] pointer-events-none cursor-not-allowed",
|
|
154
|
+
t && !s && !r && !u && !O && "text-text-primary hover:bg-field",
|
|
155
|
+
O && !u && "rounded-ds-none bg-field text-text-primary",
|
|
156
|
+
(r || u) && "bg-interactive text-text-on-color hover:bg-interactive-hover",
|
|
157
|
+
Q && !r && !u && !s && "font-semibold text-interactive"
|
|
158
|
+
),
|
|
159
|
+
children: m(e, "d")
|
|
160
|
+
},
|
|
161
|
+
o
|
|
162
|
+
);
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
] });
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
re.displayName = "CalendarGrid";
|
|
171
|
+
export {
|
|
172
|
+
re as CalendarGrid
|
|
173
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface DatePickerProps {
|
|
3
|
+
value?: Date | null;
|
|
4
|
+
onChange?: (date: Date | null) => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
formatStr?: string;
|
|
8
|
+
minDate?: Date;
|
|
9
|
+
maxDate?: Date;
|
|
10
|
+
disabledDates?: (date: Date) => boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
export { DatePicker };
|
|
14
|
+
//# sourceMappingURL=date-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../src/composed/date-picker/date-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAe9B,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAA;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAA;CACxC;AAED,QAAA,MAAM,UAAU,2FAyHf,CAAA;AAID,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { format as C, setMonth as N, setYear as F } from "date-fns";
|
|
4
|
+
import { IconCalendarEvent as O } from "@tabler/icons-react";
|
|
5
|
+
import { cn as h } from "../../ui/lib/utils.js";
|
|
6
|
+
import { Popover as j, PopoverTrigger as E, PopoverContent as H } from "../../ui/popover.js";
|
|
7
|
+
import { CalendarGrid as R } from "./calendar-grid.js";
|
|
8
|
+
import { YearPicker as V } from "./year-picker.js";
|
|
9
|
+
import { MonthPicker as G } from "./month-picker.js";
|
|
10
|
+
const I = o.forwardRef(
|
|
11
|
+
function({
|
|
12
|
+
value: e,
|
|
13
|
+
onChange: n,
|
|
14
|
+
placeholder: u = "Pick a date",
|
|
15
|
+
className: b,
|
|
16
|
+
formatStr: y = "MMM d, yyyy",
|
|
17
|
+
minDate: c,
|
|
18
|
+
maxDate: i,
|
|
19
|
+
disabledDates: g
|
|
20
|
+
}, M) {
|
|
21
|
+
const [d, m] = o.useState(!1), [a, l] = o.useState(
|
|
22
|
+
e ?? /* @__PURE__ */ new Date()
|
|
23
|
+
), [x, s] = o.useState("days");
|
|
24
|
+
o.useEffect(() => {
|
|
25
|
+
d || s("days");
|
|
26
|
+
}, [d]);
|
|
27
|
+
const Y = (t) => {
|
|
28
|
+
n == null || n(t), m(!1);
|
|
29
|
+
}, k = () => {
|
|
30
|
+
s((t) => t === "days" ? "months" : "years");
|
|
31
|
+
}, P = (t) => {
|
|
32
|
+
l((f) => N(f, t)), s("days");
|
|
33
|
+
}, S = (t) => {
|
|
34
|
+
l((f) => F(f, t)), s("months");
|
|
35
|
+
}, w = () => {
|
|
36
|
+
switch (x) {
|
|
37
|
+
case "years":
|
|
38
|
+
return /* @__PURE__ */ r(
|
|
39
|
+
V,
|
|
40
|
+
{
|
|
41
|
+
currentYear: a.getFullYear(),
|
|
42
|
+
selectedYear: e == null ? void 0 : e.getFullYear(),
|
|
43
|
+
onYearSelect: S,
|
|
44
|
+
minDate: c,
|
|
45
|
+
maxDate: i
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
case "months":
|
|
49
|
+
return /* @__PURE__ */ r(
|
|
50
|
+
G,
|
|
51
|
+
{
|
|
52
|
+
currentYear: a.getFullYear(),
|
|
53
|
+
selectedMonth: e == null ? void 0 : e.getMonth(),
|
|
54
|
+
onMonthSelect: P,
|
|
55
|
+
minDate: c,
|
|
56
|
+
maxDate: i
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
default:
|
|
60
|
+
return /* @__PURE__ */ r(
|
|
61
|
+
R,
|
|
62
|
+
{
|
|
63
|
+
currentMonth: a,
|
|
64
|
+
selected: e,
|
|
65
|
+
onSelect: Y,
|
|
66
|
+
onMonthChange: l,
|
|
67
|
+
onHeaderClick: k,
|
|
68
|
+
disabledDates: g,
|
|
69
|
+
minDate: c,
|
|
70
|
+
maxDate: i
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
return /* @__PURE__ */ p(j, { open: d, onOpenChange: m, children: [
|
|
76
|
+
/* @__PURE__ */ r(E, { asChild: !0, children: /* @__PURE__ */ p(
|
|
77
|
+
"button",
|
|
78
|
+
{
|
|
79
|
+
ref: M,
|
|
80
|
+
type: "button",
|
|
81
|
+
className: h(
|
|
82
|
+
"inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-border bg-layer-01 px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard",
|
|
83
|
+
"hover:border-border-strong",
|
|
84
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2",
|
|
85
|
+
b
|
|
86
|
+
),
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ r(
|
|
89
|
+
O,
|
|
90
|
+
{
|
|
91
|
+
className: "h-ico-sm w-ico-sm text-text-placeholder",
|
|
92
|
+
stroke: 1.5
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ r(
|
|
96
|
+
"span",
|
|
97
|
+
{
|
|
98
|
+
className: h(
|
|
99
|
+
"text-ds-md",
|
|
100
|
+
e ? "text-text-primary" : "text-text-placeholder"
|
|
101
|
+
),
|
|
102
|
+
children: e ? C(e, y) : u
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
) }),
|
|
108
|
+
/* @__PURE__ */ r(
|
|
109
|
+
H,
|
|
110
|
+
{
|
|
111
|
+
className: "w-auto border-border bg-layer-01 p-ds-04",
|
|
112
|
+
align: "start",
|
|
113
|
+
sideOffset: 4,
|
|
114
|
+
children: w()
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
] });
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
I.displayName = "DatePicker";
|
|
121
|
+
export {
|
|
122
|
+
I as DatePicker
|
|
123
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PresetKey } from './presets';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface DateRangePickerProps {
|
|
4
|
+
startDate?: Date | null;
|
|
5
|
+
endDate?: Date | null;
|
|
6
|
+
onChange?: (range: {
|
|
7
|
+
start: Date | null;
|
|
8
|
+
end: Date | null;
|
|
9
|
+
}) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
formatStr?: string;
|
|
13
|
+
minDate?: Date;
|
|
14
|
+
maxDate?: Date;
|
|
15
|
+
disabledDates?: (date: Date) => boolean;
|
|
16
|
+
/** Show a presets sidebar with quick date range selections */
|
|
17
|
+
presets?: PresetKey[];
|
|
18
|
+
/** Number of calendar months to display side by side (default: 1) */
|
|
19
|
+
numberOfMonths?: number;
|
|
20
|
+
}
|
|
21
|
+
declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
22
|
+
export { DateRangePicker };
|
|
23
|
+
//# sourceMappingURL=date-range-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-range-picker.d.ts","sourceRoot":"","sources":["../../../src/composed/date-picker/date-range-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAa9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAI1C,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACvB,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;QAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,KAAK,IAAI,CAAA;IACpE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAA;IACvC,8DAA8D;IAC9D,OAAO,CAAC,EAAE,SAAS,EAAE,CAAA;IACrB,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,QAAA,MAAM,eAAe,gGA+MpB,CAAA;AAID,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { jsxs as y, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { format as H, setMonth as z, setYear as J, addMonths as E, isBefore as K, isAfter as L } from "date-fns";
|
|
4
|
+
import { IconCalendarEvent as Q } from "@tabler/icons-react";
|
|
5
|
+
import { cn as C } from "../../ui/lib/utils.js";
|
|
6
|
+
import { Popover as U, PopoverTrigger as W, PopoverContent as X } from "../../ui/popover.js";
|
|
7
|
+
import { CalendarGrid as F } from "./calendar-grid.js";
|
|
8
|
+
import { YearPicker as Z } from "./year-picker.js";
|
|
9
|
+
import { MonthPicker as D } from "./month-picker.js";
|
|
10
|
+
import { Presets as ee } from "./presets.js";
|
|
11
|
+
const re = s.forwardRef(
|
|
12
|
+
function({
|
|
13
|
+
startDate: c,
|
|
14
|
+
endDate: v,
|
|
15
|
+
onChange: n,
|
|
16
|
+
placeholder: O = "Pick a date range",
|
|
17
|
+
className: j,
|
|
18
|
+
formatStr: P = "MMM d",
|
|
19
|
+
minDate: a,
|
|
20
|
+
maxDate: d,
|
|
21
|
+
disabledDates: S,
|
|
22
|
+
presets: x,
|
|
23
|
+
numberOfMonths: A = 1
|
|
24
|
+
}, G) {
|
|
25
|
+
const [b, g] = s.useState(!1), [i, u] = s.useState(
|
|
26
|
+
c ?? /* @__PURE__ */ new Date()
|
|
27
|
+
), [e, f] = s.useState(
|
|
28
|
+
c ?? null
|
|
29
|
+
), [l, h] = s.useState(
|
|
30
|
+
v ?? null
|
|
31
|
+
), [w, N] = s.useState(null), [T, m] = s.useState("days"), M = Math.max(1, A);
|
|
32
|
+
s.useEffect(() => {
|
|
33
|
+
f(c ?? null), h(v ?? null);
|
|
34
|
+
}, [c, v]), s.useEffect(() => {
|
|
35
|
+
b || m("days");
|
|
36
|
+
}, [b]);
|
|
37
|
+
const k = (r) => {
|
|
38
|
+
if (!e || e && l)
|
|
39
|
+
f(r), h(null);
|
|
40
|
+
else {
|
|
41
|
+
const t = K(r, e) ? r : e, p = L(r, e) ? r : e;
|
|
42
|
+
f(t), h(p), n == null || n({ start: t, end: p }), g(!1);
|
|
43
|
+
}
|
|
44
|
+
}, V = (r, t) => {
|
|
45
|
+
f(r), h(t), n == null || n({ start: r, end: t }), g(!1);
|
|
46
|
+
}, Y = () => {
|
|
47
|
+
m((r) => r === "days" ? "months" : "years");
|
|
48
|
+
}, $ = (r) => {
|
|
49
|
+
u((t) => z(t, r)), m("days");
|
|
50
|
+
}, B = (r) => {
|
|
51
|
+
u((t) => J(t, r)), m("months");
|
|
52
|
+
}, I = () => e && l ? `${H(e, P)} - ${H(l, P)}` : O, _ = () => M === 1 ? /* @__PURE__ */ o(
|
|
53
|
+
F,
|
|
54
|
+
{
|
|
55
|
+
currentMonth: i,
|
|
56
|
+
rangeStart: e,
|
|
57
|
+
rangeEnd: l,
|
|
58
|
+
hoverDate: w,
|
|
59
|
+
onSelect: k,
|
|
60
|
+
onHover: N,
|
|
61
|
+
onMonthChange: u,
|
|
62
|
+
onHeaderClick: Y,
|
|
63
|
+
disabledDates: S,
|
|
64
|
+
minDate: a,
|
|
65
|
+
maxDate: d
|
|
66
|
+
}
|
|
67
|
+
) : /* @__PURE__ */ o("div", { className: "flex flex-row gap-ds-04", children: Array.from({ length: M }, (r, t) => /* @__PURE__ */ o(
|
|
68
|
+
F,
|
|
69
|
+
{
|
|
70
|
+
currentMonth: E(i, t),
|
|
71
|
+
rangeStart: e,
|
|
72
|
+
rangeEnd: l,
|
|
73
|
+
hoverDate: w,
|
|
74
|
+
onSelect: k,
|
|
75
|
+
onHover: N,
|
|
76
|
+
onMonthChange: (p) => {
|
|
77
|
+
u(E(p, -t));
|
|
78
|
+
},
|
|
79
|
+
onHeaderClick: Y,
|
|
80
|
+
disabledDates: S,
|
|
81
|
+
minDate: a,
|
|
82
|
+
maxDate: d,
|
|
83
|
+
hidePrevNav: t > 0,
|
|
84
|
+
hideNextNav: t < M - 1
|
|
85
|
+
},
|
|
86
|
+
t
|
|
87
|
+
)) }), R = () => {
|
|
88
|
+
switch (T) {
|
|
89
|
+
case "years":
|
|
90
|
+
return /* @__PURE__ */ o(
|
|
91
|
+
Z,
|
|
92
|
+
{
|
|
93
|
+
currentYear: i.getFullYear(),
|
|
94
|
+
selectedYear: e == null ? void 0 : e.getFullYear(),
|
|
95
|
+
onYearSelect: B,
|
|
96
|
+
minDate: a,
|
|
97
|
+
maxDate: d
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
case "months":
|
|
101
|
+
return /* @__PURE__ */ o(
|
|
102
|
+
D,
|
|
103
|
+
{
|
|
104
|
+
currentYear: i.getFullYear(),
|
|
105
|
+
selectedMonth: e == null ? void 0 : e.getMonth(),
|
|
106
|
+
onMonthSelect: $,
|
|
107
|
+
minDate: a,
|
|
108
|
+
maxDate: d
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
default:
|
|
112
|
+
return _();
|
|
113
|
+
}
|
|
114
|
+
}, q = x && x.length > 0;
|
|
115
|
+
return /* @__PURE__ */ y(U, { open: b, onOpenChange: g, children: [
|
|
116
|
+
/* @__PURE__ */ o(W, { asChild: !0, children: /* @__PURE__ */ y(
|
|
117
|
+
"button",
|
|
118
|
+
{
|
|
119
|
+
ref: G,
|
|
120
|
+
type: "button",
|
|
121
|
+
className: C(
|
|
122
|
+
"inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-border bg-layer-01 px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard",
|
|
123
|
+
"hover:border-border-strong",
|
|
124
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2",
|
|
125
|
+
j
|
|
126
|
+
),
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ o(
|
|
129
|
+
Q,
|
|
130
|
+
{
|
|
131
|
+
className: "h-ico-sm w-ico-sm text-text-placeholder",
|
|
132
|
+
stroke: 1.5
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
/* @__PURE__ */ o(
|
|
136
|
+
"span",
|
|
137
|
+
{
|
|
138
|
+
className: C(
|
|
139
|
+
"text-ds-md",
|
|
140
|
+
e && l ? "text-text-primary" : "text-text-placeholder"
|
|
141
|
+
),
|
|
142
|
+
children: I()
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
) }),
|
|
148
|
+
/* @__PURE__ */ o(
|
|
149
|
+
X,
|
|
150
|
+
{
|
|
151
|
+
className: "w-auto border-border bg-layer-01 p-ds-04",
|
|
152
|
+
align: "start",
|
|
153
|
+
sideOffset: 4,
|
|
154
|
+
children: q ? /* @__PURE__ */ y("div", { className: "flex flex-row gap-ds-04", children: [
|
|
155
|
+
/* @__PURE__ */ o("div", { className: "min-w-[140px] border-r border-border pr-ds-04", children: /* @__PURE__ */ o(ee, { presets: x, onSelect: V }) }),
|
|
156
|
+
/* @__PURE__ */ o("div", { children: R() })
|
|
157
|
+
] }) : R()
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
] });
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
re.displayName = "DateRangePicker";
|
|
164
|
+
export {
|
|
165
|
+
re as DateRangePicker
|
|
166
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface DateTimePickerProps {
|
|
3
|
+
/** The currently selected date and time. */
|
|
4
|
+
value?: Date | null;
|
|
5
|
+
/** Callback fired when the date/time changes. */
|
|
6
|
+
onChange?: (date: Date | null) => void;
|
|
7
|
+
/** Earliest selectable date. */
|
|
8
|
+
minDate?: Date;
|
|
9
|
+
/** Latest selectable date. */
|
|
10
|
+
maxDate?: Date;
|
|
11
|
+
/** Function to disable specific dates. */
|
|
12
|
+
disabledDates?: (date: Date) => boolean;
|
|
13
|
+
/** Display format for the time portion: 12-hour with AM/PM or 24-hour. */
|
|
14
|
+
timeFormat?: '12h' | '24h';
|
|
15
|
+
/** Step interval for the minute selector. */
|
|
16
|
+
minuteStep?: number;
|
|
17
|
+
/** Placeholder text when no value is set. */
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
/** Additional class names for the trigger button. */
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const DateTimePicker: React.ForwardRefExoticComponent<DateTimePickerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
export { DateTimePicker };
|
|
24
|
+
//# sourceMappingURL=date-time-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-time-picker.d.ts","sourceRoot":"","sources":["../../../src/composed/date-picker/date-time-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAqB9B,MAAM,WAAW,mBAAmB;IAClC,4CAA4C;IAC5C,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACnB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAA;IACtC,gCAAgC;IAChC,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,8BAA8B;IAC9B,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,0CAA0C;IAC1C,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAA;IACvC,0EAA0E;IAC1E,UAAU,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IAC1B,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAcD,QAAA,MAAM,cAAc,+FA6PnB,CAAA;AAID,OAAO,EAAE,cAAc,EAAE,CAAA"}
|