@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,163 @@
|
|
|
1
|
+
import * as v from "react";
|
|
2
|
+
import { composeEventHandlers as g } from "./_internal/primitive.js";
|
|
3
|
+
import { createContextScope as x } from "./_internal/react-context.js";
|
|
4
|
+
import { Root as E, Item as F, createRovingFocusGroupScope as C } from "./react-roving-focus.js";
|
|
5
|
+
import { Presence as w } from "./_internal/react-presence.js";
|
|
6
|
+
import { Primitive as b } from "./_internal/react-primitive.js";
|
|
7
|
+
import { useDirection as D } from "./_internal/react-direction.js";
|
|
8
|
+
import { useControllableState as V } from "./_internal/react-use-controllable-state.js";
|
|
9
|
+
import { useId as G } from "./_internal/react-id.js";
|
|
10
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
11
|
+
var p = "Tabs", [L] = x(p, [
|
|
12
|
+
C
|
|
13
|
+
]), h = C(), [$, T] = L(p), I = v.forwardRef(
|
|
14
|
+
(e, r) => {
|
|
15
|
+
const {
|
|
16
|
+
__scopeTabs: s,
|
|
17
|
+
value: t,
|
|
18
|
+
onValueChange: n,
|
|
19
|
+
defaultValue: c,
|
|
20
|
+
orientation: o = "horizontal",
|
|
21
|
+
dir: d,
|
|
22
|
+
activationMode: f = "automatic",
|
|
23
|
+
...m
|
|
24
|
+
} = e, i = D(d), [a, u] = V({
|
|
25
|
+
prop: t,
|
|
26
|
+
onChange: n,
|
|
27
|
+
defaultProp: c ?? "",
|
|
28
|
+
caller: p
|
|
29
|
+
});
|
|
30
|
+
return /* @__PURE__ */ l(
|
|
31
|
+
$,
|
|
32
|
+
{
|
|
33
|
+
scope: s,
|
|
34
|
+
baseId: G(),
|
|
35
|
+
value: a,
|
|
36
|
+
onValueChange: u,
|
|
37
|
+
orientation: o,
|
|
38
|
+
dir: i,
|
|
39
|
+
activationMode: f,
|
|
40
|
+
children: /* @__PURE__ */ l(
|
|
41
|
+
b.div,
|
|
42
|
+
{
|
|
43
|
+
dir: i,
|
|
44
|
+
"data-orientation": o,
|
|
45
|
+
...m,
|
|
46
|
+
ref: r
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
I.displayName = p;
|
|
54
|
+
var R = "TabsList", _ = v.forwardRef(
|
|
55
|
+
(e, r) => {
|
|
56
|
+
const { __scopeTabs: s, loop: t = !0, ...n } = e, c = T(R, s), o = h(s);
|
|
57
|
+
return /* @__PURE__ */ l(
|
|
58
|
+
E,
|
|
59
|
+
{
|
|
60
|
+
asChild: !0,
|
|
61
|
+
...o,
|
|
62
|
+
orientation: c.orientation,
|
|
63
|
+
dir: c.dir,
|
|
64
|
+
loop: t,
|
|
65
|
+
children: /* @__PURE__ */ l(
|
|
66
|
+
b.div,
|
|
67
|
+
{
|
|
68
|
+
role: "tablist",
|
|
69
|
+
"aria-orientation": c.orientation,
|
|
70
|
+
...n,
|
|
71
|
+
ref: r
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
_.displayName = R;
|
|
79
|
+
var y = "TabsTrigger", A = v.forwardRef(
|
|
80
|
+
(e, r) => {
|
|
81
|
+
const { __scopeTabs: s, value: t, disabled: n = !1, ...c } = e, o = T(y, s), d = h(s), f = P(o.baseId, t), m = S(o.baseId, t), i = t === o.value;
|
|
82
|
+
return /* @__PURE__ */ l(
|
|
83
|
+
F,
|
|
84
|
+
{
|
|
85
|
+
asChild: !0,
|
|
86
|
+
...d,
|
|
87
|
+
focusable: !n,
|
|
88
|
+
active: i,
|
|
89
|
+
children: /* @__PURE__ */ l(
|
|
90
|
+
b.button,
|
|
91
|
+
{
|
|
92
|
+
type: "button",
|
|
93
|
+
role: "tab",
|
|
94
|
+
"aria-selected": i,
|
|
95
|
+
"aria-controls": m,
|
|
96
|
+
"data-state": i ? "active" : "inactive",
|
|
97
|
+
"data-disabled": n ? "" : void 0,
|
|
98
|
+
disabled: n,
|
|
99
|
+
id: f,
|
|
100
|
+
...c,
|
|
101
|
+
ref: r,
|
|
102
|
+
onMouseDown: g(e.onMouseDown, (a) => {
|
|
103
|
+
!n && a.button === 0 && a.ctrlKey === !1 ? o.onValueChange(t) : a.preventDefault();
|
|
104
|
+
}),
|
|
105
|
+
onKeyDown: g(e.onKeyDown, (a) => {
|
|
106
|
+
[" ", "Enter"].includes(a.key) && o.onValueChange(t);
|
|
107
|
+
}),
|
|
108
|
+
onFocus: g(e.onFocus, () => {
|
|
109
|
+
const a = o.activationMode !== "manual";
|
|
110
|
+
!i && !n && a && o.onValueChange(t);
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
A.displayName = y;
|
|
119
|
+
var M = "TabsContent", N = v.forwardRef(
|
|
120
|
+
(e, r) => {
|
|
121
|
+
const { __scopeTabs: s, value: t, forceMount: n, children: c, ...o } = e, d = T(M, s), f = P(d.baseId, t), m = S(d.baseId, t), i = t === d.value, a = v.useRef(i);
|
|
122
|
+
return v.useEffect(() => {
|
|
123
|
+
const u = requestAnimationFrame(() => a.current = !1);
|
|
124
|
+
return () => cancelAnimationFrame(u);
|
|
125
|
+
}, []), /* @__PURE__ */ l(w, { present: n || i, children: ({ present: u }) => /* @__PURE__ */ l(
|
|
126
|
+
b.div,
|
|
127
|
+
{
|
|
128
|
+
"data-state": i ? "active" : "inactive",
|
|
129
|
+
"data-orientation": d.orientation,
|
|
130
|
+
role: "tabpanel",
|
|
131
|
+
"aria-labelledby": f,
|
|
132
|
+
hidden: !u,
|
|
133
|
+
id: m,
|
|
134
|
+
tabIndex: 0,
|
|
135
|
+
...o,
|
|
136
|
+
ref: r,
|
|
137
|
+
style: {
|
|
138
|
+
...e.style,
|
|
139
|
+
animationDuration: a.current ? "0s" : void 0
|
|
140
|
+
},
|
|
141
|
+
children: u && c
|
|
142
|
+
}
|
|
143
|
+
) });
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
N.displayName = M;
|
|
147
|
+
function P(e, r) {
|
|
148
|
+
return `${e}-trigger-${r}`;
|
|
149
|
+
}
|
|
150
|
+
function S(e, r) {
|
|
151
|
+
return `${e}-content-${r}`;
|
|
152
|
+
}
|
|
153
|
+
var Q = I, U = _, W = A, X = N;
|
|
154
|
+
export {
|
|
155
|
+
X as Content,
|
|
156
|
+
U as List,
|
|
157
|
+
Q as Root,
|
|
158
|
+
I as Tabs,
|
|
159
|
+
N as TabsContent,
|
|
160
|
+
_ as TabsList,
|
|
161
|
+
A as TabsTrigger,
|
|
162
|
+
W as Trigger
|
|
163
|
+
};
|
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
import * as Pe from "react-dom";
|
|
3
|
+
import { composeEventHandlers as R } from "./_internal/primitive.js";
|
|
4
|
+
import { useComposedRefs as oe } from "./_internal/react-compose-refs.js";
|
|
5
|
+
import { createCollection as Ce } from "./_internal/react-collection.js";
|
|
6
|
+
import { createContextScope as xe } from "./_internal/react-context.js";
|
|
7
|
+
import { Branch as he, Root as Re } from "./_internal/react-dismissable-layer.js";
|
|
8
|
+
import { Portal as be } from "./_internal/react-portal.js";
|
|
9
|
+
import { Presence as ge } from "./_internal/react-presence.js";
|
|
10
|
+
import { Primitive as D, dispatchDiscreteCustomEvent as Se } from "./_internal/react-primitive.js";
|
|
11
|
+
import { useCallbackRef as U } from "./_internal/react-use-callback-ref.js";
|
|
12
|
+
import { useControllableState as Ie } from "./_internal/react-use-controllable-state.js";
|
|
13
|
+
import { useLayoutEffect as Ae } from "./_internal/react-use-layout-effect.js";
|
|
14
|
+
import { VisuallyHidden as re } from "./react-visually-hidden.js";
|
|
15
|
+
import { jsx as l, jsxs as G, Fragment as ne } from "react/jsx-runtime";
|
|
16
|
+
var J = "ToastProvider", [Q, Fe, _e] = Ce("Toast"), [se] = xe("Toast", [_e]), [De, X] = se(J), ae = (e) => {
|
|
17
|
+
const {
|
|
18
|
+
__scopeToast: o,
|
|
19
|
+
label: r = "Notification",
|
|
20
|
+
duration: t = 5e3,
|
|
21
|
+
swipeDirection: c = "right",
|
|
22
|
+
swipeThreshold: d = 50,
|
|
23
|
+
children: p
|
|
24
|
+
} = e, [v, T] = n.useState(null), [s, h] = n.useState(0), y = n.useRef(!1), N = n.useRef(!1);
|
|
25
|
+
return r.trim() || console.error(
|
|
26
|
+
`Invalid prop \`label\` supplied to \`${J}\`. Expected non-empty \`string\`.`
|
|
27
|
+
), /* @__PURE__ */ l(Q.Provider, { scope: o, children: /* @__PURE__ */ l(
|
|
28
|
+
De,
|
|
29
|
+
{
|
|
30
|
+
scope: o,
|
|
31
|
+
label: r,
|
|
32
|
+
duration: t,
|
|
33
|
+
swipeDirection: c,
|
|
34
|
+
swipeThreshold: d,
|
|
35
|
+
toastCount: s,
|
|
36
|
+
viewport: v,
|
|
37
|
+
onViewportChange: T,
|
|
38
|
+
onToastAdd: n.useCallback(() => h((g) => g + 1), []),
|
|
39
|
+
onToastRemove: n.useCallback(() => h((g) => g - 1), []),
|
|
40
|
+
isFocusedToastEscapeKeyDownRef: y,
|
|
41
|
+
isClosePausedRef: N,
|
|
42
|
+
children: p
|
|
43
|
+
}
|
|
44
|
+
) });
|
|
45
|
+
};
|
|
46
|
+
ae.displayName = J;
|
|
47
|
+
var ie = "ToastViewport", Ne = ["F8"], j = "toast.viewportPause", q = "toast.viewportResume", ce = n.forwardRef(
|
|
48
|
+
(e, o) => {
|
|
49
|
+
const {
|
|
50
|
+
__scopeToast: r,
|
|
51
|
+
hotkey: t = Ne,
|
|
52
|
+
label: c = "Notifications ({hotkey})",
|
|
53
|
+
...d
|
|
54
|
+
} = e, p = X(ie, r), v = Fe(r), T = n.useRef(null), s = n.useRef(null), h = n.useRef(null), y = n.useRef(null), N = oe(o, y, p.onViewportChange), g = t.join("+").replace(/Key/g, "").replace(/Digit/g, ""), S = p.toastCount > 0;
|
|
55
|
+
n.useEffect(() => {
|
|
56
|
+
const i = (P) => {
|
|
57
|
+
var m;
|
|
58
|
+
t.length !== 0 && t.every((w) => P[w] || P.code === w) && ((m = y.current) == null || m.focus());
|
|
59
|
+
};
|
|
60
|
+
return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
|
|
61
|
+
}, [t]), n.useEffect(() => {
|
|
62
|
+
const i = T.current, P = y.current;
|
|
63
|
+
if (S && i && P) {
|
|
64
|
+
const f = () => {
|
|
65
|
+
if (!p.isClosePausedRef.current) {
|
|
66
|
+
const C = new CustomEvent(j);
|
|
67
|
+
P.dispatchEvent(C), p.isClosePausedRef.current = !0;
|
|
68
|
+
}
|
|
69
|
+
}, m = () => {
|
|
70
|
+
if (p.isClosePausedRef.current) {
|
|
71
|
+
const C = new CustomEvent(q);
|
|
72
|
+
P.dispatchEvent(C), p.isClosePausedRef.current = !1;
|
|
73
|
+
}
|
|
74
|
+
}, w = (C) => {
|
|
75
|
+
!i.contains(C.relatedTarget) && m();
|
|
76
|
+
}, E = () => {
|
|
77
|
+
i.contains(document.activeElement) || m();
|
|
78
|
+
};
|
|
79
|
+
return i.addEventListener("focusin", f), i.addEventListener("focusout", w), i.addEventListener("pointermove", f), i.addEventListener("pointerleave", E), window.addEventListener("blur", f), window.addEventListener("focus", m), () => {
|
|
80
|
+
i.removeEventListener("focusin", f), i.removeEventListener("focusout", w), i.removeEventListener("pointermove", f), i.removeEventListener("pointerleave", E), window.removeEventListener("blur", f), window.removeEventListener("focus", m);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}, [S, p.isClosePausedRef]);
|
|
84
|
+
const u = n.useCallback(
|
|
85
|
+
({ tabbingDirection: i }) => {
|
|
86
|
+
const f = v().map((m) => {
|
|
87
|
+
const w = m.ref.current, E = [w, ...Be(w)];
|
|
88
|
+
return i === "forwards" ? E : E.reverse();
|
|
89
|
+
});
|
|
90
|
+
return (i === "forwards" ? f.reverse() : f).flat();
|
|
91
|
+
},
|
|
92
|
+
[v]
|
|
93
|
+
);
|
|
94
|
+
return n.useEffect(() => {
|
|
95
|
+
const i = y.current;
|
|
96
|
+
if (i) {
|
|
97
|
+
const P = (f) => {
|
|
98
|
+
var E, C, I;
|
|
99
|
+
const m = f.altKey || f.ctrlKey || f.metaKey;
|
|
100
|
+
if (f.key === "Tab" && !m) {
|
|
101
|
+
const L = document.activeElement, F = f.shiftKey;
|
|
102
|
+
if (f.target === i && F) {
|
|
103
|
+
(E = s.current) == null || E.focus();
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const A = u({ tabbingDirection: F ? "backwards" : "forwards" }), V = A.findIndex((a) => a === L);
|
|
107
|
+
B(A.slice(V + 1)) ? f.preventDefault() : F ? (C = s.current) == null || C.focus() : (I = h.current) == null || I.focus();
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
return i.addEventListener("keydown", P), () => i.removeEventListener("keydown", P);
|
|
111
|
+
}
|
|
112
|
+
}, [v, u]), /* @__PURE__ */ G(
|
|
113
|
+
he,
|
|
114
|
+
{
|
|
115
|
+
ref: T,
|
|
116
|
+
role: "region",
|
|
117
|
+
"aria-label": c.replace("{hotkey}", g),
|
|
118
|
+
tabIndex: -1,
|
|
119
|
+
style: { pointerEvents: S ? void 0 : "none" },
|
|
120
|
+
children: [
|
|
121
|
+
S && /* @__PURE__ */ l(
|
|
122
|
+
z,
|
|
123
|
+
{
|
|
124
|
+
ref: s,
|
|
125
|
+
onFocusFromOutsideViewport: () => {
|
|
126
|
+
const i = u({
|
|
127
|
+
tabbingDirection: "forwards"
|
|
128
|
+
});
|
|
129
|
+
B(i);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
/* @__PURE__ */ l(Q.Slot, { scope: r, children: /* @__PURE__ */ l(D.ol, { tabIndex: -1, ...d, ref: N }) }),
|
|
134
|
+
S && /* @__PURE__ */ l(
|
|
135
|
+
z,
|
|
136
|
+
{
|
|
137
|
+
ref: h,
|
|
138
|
+
onFocusFromOutsideViewport: () => {
|
|
139
|
+
const i = u({
|
|
140
|
+
tabbingDirection: "backwards"
|
|
141
|
+
});
|
|
142
|
+
B(i);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
ce.displayName = ie;
|
|
152
|
+
var ue = "ToastFocusProxy", z = n.forwardRef(
|
|
153
|
+
(e, o) => {
|
|
154
|
+
const { __scopeToast: r, onFocusFromOutsideViewport: t, ...c } = e, d = X(ue, r);
|
|
155
|
+
return /* @__PURE__ */ l(
|
|
156
|
+
re,
|
|
157
|
+
{
|
|
158
|
+
tabIndex: 0,
|
|
159
|
+
...c,
|
|
160
|
+
ref: o,
|
|
161
|
+
style: { position: "fixed" },
|
|
162
|
+
onFocus: (p) => {
|
|
163
|
+
var s;
|
|
164
|
+
const v = p.relatedTarget;
|
|
165
|
+
!((s = d.viewport) != null && s.contains(v)) && t();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
z.displayName = ue;
|
|
172
|
+
var k = "Toast", Le = "toast.swipeStart", Me = "toast.swipeMove", Oe = "toast.swipeCancel", ke = "toast.swipeEnd", le = n.forwardRef(
|
|
173
|
+
(e, o) => {
|
|
174
|
+
const { forceMount: r, open: t, defaultOpen: c, onOpenChange: d, ...p } = e, [v, T] = Ie({
|
|
175
|
+
prop: t,
|
|
176
|
+
defaultProp: c ?? !0,
|
|
177
|
+
onChange: d,
|
|
178
|
+
caller: k
|
|
179
|
+
});
|
|
180
|
+
return /* @__PURE__ */ l(ge, { present: r || v, children: /* @__PURE__ */ l(
|
|
181
|
+
He,
|
|
182
|
+
{
|
|
183
|
+
open: v,
|
|
184
|
+
...p,
|
|
185
|
+
ref: o,
|
|
186
|
+
onClose: () => T(!1),
|
|
187
|
+
onPause: U(e.onPause),
|
|
188
|
+
onResume: U(e.onResume),
|
|
189
|
+
onSwipeStart: R(e.onSwipeStart, (s) => {
|
|
190
|
+
s.currentTarget.setAttribute("data-swipe", "start");
|
|
191
|
+
}),
|
|
192
|
+
onSwipeMove: R(e.onSwipeMove, (s) => {
|
|
193
|
+
const { x: h, y } = s.detail.delta;
|
|
194
|
+
s.currentTarget.setAttribute("data-swipe", "move"), s.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${h}px`), s.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${y}px`);
|
|
195
|
+
}),
|
|
196
|
+
onSwipeCancel: R(e.onSwipeCancel, (s) => {
|
|
197
|
+
s.currentTarget.setAttribute("data-swipe", "cancel"), s.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), s.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), s.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), s.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
|
|
198
|
+
}),
|
|
199
|
+
onSwipeEnd: R(e.onSwipeEnd, (s) => {
|
|
200
|
+
const { x: h, y } = s.detail.delta;
|
|
201
|
+
s.currentTarget.setAttribute("data-swipe", "end"), s.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), s.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), s.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${h}px`), s.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${y}px`), T(!1);
|
|
202
|
+
})
|
|
203
|
+
}
|
|
204
|
+
) });
|
|
205
|
+
}
|
|
206
|
+
);
|
|
207
|
+
le.displayName = k;
|
|
208
|
+
var [Ve, Ke] = se(k, {
|
|
209
|
+
onClose() {
|
|
210
|
+
}
|
|
211
|
+
}), He = n.forwardRef(
|
|
212
|
+
(e, o) => {
|
|
213
|
+
const {
|
|
214
|
+
__scopeToast: r,
|
|
215
|
+
type: t = "foreground",
|
|
216
|
+
duration: c,
|
|
217
|
+
open: d,
|
|
218
|
+
onClose: p,
|
|
219
|
+
onEscapeKeyDown: v,
|
|
220
|
+
onPause: T,
|
|
221
|
+
onResume: s,
|
|
222
|
+
onSwipeStart: h,
|
|
223
|
+
onSwipeMove: y,
|
|
224
|
+
onSwipeCancel: N,
|
|
225
|
+
onSwipeEnd: g,
|
|
226
|
+
...S
|
|
227
|
+
} = e, u = X(k, r), [i, P] = n.useState(null), f = oe(o, (a) => P(a)), m = n.useRef(null), w = n.useRef(null), E = c || u.duration, C = n.useRef(0), I = n.useRef(E), L = n.useRef(0), { onToastAdd: F, onToastRemove: Y } = u, _ = U(() => {
|
|
228
|
+
var x;
|
|
229
|
+
(i == null ? void 0 : i.contains(document.activeElement)) && ((x = u.viewport) == null || x.focus()), p();
|
|
230
|
+
}), A = n.useCallback(
|
|
231
|
+
(a) => {
|
|
232
|
+
!a || a === 1 / 0 || (window.clearTimeout(L.current), C.current = (/* @__PURE__ */ new Date()).getTime(), L.current = window.setTimeout(_, a));
|
|
233
|
+
},
|
|
234
|
+
[_]
|
|
235
|
+
);
|
|
236
|
+
n.useEffect(() => {
|
|
237
|
+
const a = u.viewport;
|
|
238
|
+
if (a) {
|
|
239
|
+
const x = () => {
|
|
240
|
+
A(I.current), s == null || s();
|
|
241
|
+
}, b = () => {
|
|
242
|
+
const M = (/* @__PURE__ */ new Date()).getTime() - C.current;
|
|
243
|
+
I.current = I.current - M, window.clearTimeout(L.current), T == null || T();
|
|
244
|
+
};
|
|
245
|
+
return a.addEventListener(j, b), a.addEventListener(q, x), () => {
|
|
246
|
+
a.removeEventListener(j, b), a.removeEventListener(q, x);
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
}, [u.viewport, E, T, s, A]), n.useEffect(() => {
|
|
250
|
+
d && !u.isClosePausedRef.current && A(E);
|
|
251
|
+
}, [d, E, u.isClosePausedRef, A]), n.useEffect(() => (F(), () => Y()), [F, Y]);
|
|
252
|
+
const V = n.useMemo(() => i ? we(i) : null, [i]);
|
|
253
|
+
return u.viewport ? /* @__PURE__ */ G(ne, { children: [
|
|
254
|
+
V && /* @__PURE__ */ l(
|
|
255
|
+
We,
|
|
256
|
+
{
|
|
257
|
+
__scopeToast: r,
|
|
258
|
+
role: "status",
|
|
259
|
+
"aria-live": t === "foreground" ? "assertive" : "polite",
|
|
260
|
+
children: V
|
|
261
|
+
}
|
|
262
|
+
),
|
|
263
|
+
/* @__PURE__ */ l(Ve, { scope: r, onClose: _, children: Pe.createPortal(
|
|
264
|
+
/* @__PURE__ */ l(Q.ItemSlot, { scope: r, children: /* @__PURE__ */ l(
|
|
265
|
+
Re,
|
|
266
|
+
{
|
|
267
|
+
asChild: !0,
|
|
268
|
+
onEscapeKeyDown: R(v, () => {
|
|
269
|
+
u.isFocusedToastEscapeKeyDownRef.current || _(), u.isFocusedToastEscapeKeyDownRef.current = !1;
|
|
270
|
+
}),
|
|
271
|
+
children: /* @__PURE__ */ l(
|
|
272
|
+
D.li,
|
|
273
|
+
{
|
|
274
|
+
tabIndex: 0,
|
|
275
|
+
"data-state": d ? "open" : "closed",
|
|
276
|
+
"data-swipe-direction": u.swipeDirection,
|
|
277
|
+
...S,
|
|
278
|
+
ref: f,
|
|
279
|
+
style: { userSelect: "none", touchAction: "none", ...e.style },
|
|
280
|
+
onKeyDown: R(e.onKeyDown, (a) => {
|
|
281
|
+
a.key === "Escape" && (v == null || v(a.nativeEvent), a.nativeEvent.defaultPrevented || (u.isFocusedToastEscapeKeyDownRef.current = !0, _()));
|
|
282
|
+
}),
|
|
283
|
+
onPointerDown: R(e.onPointerDown, (a) => {
|
|
284
|
+
a.button === 0 && (m.current = { x: a.clientX, y: a.clientY });
|
|
285
|
+
}),
|
|
286
|
+
onPointerMove: R(e.onPointerMove, (a) => {
|
|
287
|
+
if (!m.current) return;
|
|
288
|
+
const x = a.clientX - m.current.x, b = a.clientY - m.current.y, M = !!w.current, O = ["left", "right"].includes(u.swipeDirection), K = ["left", "up"].includes(u.swipeDirection) ? Math.min : Math.max, Ee = O ? K(0, x) : 0, ye = O ? 0 : K(0, b), $ = a.pointerType === "touch" ? 10 : 2, H = { x: Ee, y: ye }, ee = { originalEvent: a, delta: H };
|
|
289
|
+
M ? (w.current = H, W(Me, y, ee, {
|
|
290
|
+
discrete: !1
|
|
291
|
+
})) : te(H, u.swipeDirection, $) ? (w.current = H, W(Le, h, ee, {
|
|
292
|
+
discrete: !1
|
|
293
|
+
}), a.target.setPointerCapture(a.pointerId)) : (Math.abs(x) > $ || Math.abs(b) > $) && (m.current = null);
|
|
294
|
+
}),
|
|
295
|
+
onPointerUp: R(e.onPointerUp, (a) => {
|
|
296
|
+
const x = w.current, b = a.target;
|
|
297
|
+
if (b.hasPointerCapture(a.pointerId) && b.releasePointerCapture(a.pointerId), w.current = null, m.current = null, x) {
|
|
298
|
+
const M = a.currentTarget, O = { originalEvent: a, delta: x };
|
|
299
|
+
te(x, u.swipeDirection, u.swipeThreshold) ? W(ke, g, O, {
|
|
300
|
+
discrete: !0
|
|
301
|
+
}) : W(
|
|
302
|
+
Oe,
|
|
303
|
+
N,
|
|
304
|
+
O,
|
|
305
|
+
{
|
|
306
|
+
discrete: !0
|
|
307
|
+
}
|
|
308
|
+
), M.addEventListener("click", (K) => K.preventDefault(), {
|
|
309
|
+
once: !0
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
})
|
|
313
|
+
}
|
|
314
|
+
)
|
|
315
|
+
}
|
|
316
|
+
) }),
|
|
317
|
+
u.viewport
|
|
318
|
+
) })
|
|
319
|
+
] }) : null;
|
|
320
|
+
}
|
|
321
|
+
), We = (e) => {
|
|
322
|
+
const { __scopeToast: o, children: r, ...t } = e, c = X(k, o), [d, p] = n.useState(!1), [v, T] = n.useState(!1);
|
|
323
|
+
return Ye(() => p(!0)), n.useEffect(() => {
|
|
324
|
+
const s = window.setTimeout(() => T(!0), 1e3);
|
|
325
|
+
return () => window.clearTimeout(s);
|
|
326
|
+
}, []), v ? null : /* @__PURE__ */ l(be, { asChild: !0, children: /* @__PURE__ */ l(re, { ...t, children: d && /* @__PURE__ */ G(ne, { children: [
|
|
327
|
+
c.label,
|
|
328
|
+
" ",
|
|
329
|
+
r
|
|
330
|
+
] }) }) });
|
|
331
|
+
}, Ue = "ToastTitle", de = n.forwardRef(
|
|
332
|
+
(e, o) => {
|
|
333
|
+
const { __scopeToast: r, ...t } = e;
|
|
334
|
+
return /* @__PURE__ */ l(D.div, { ...t, ref: o });
|
|
335
|
+
}
|
|
336
|
+
);
|
|
337
|
+
de.displayName = Ue;
|
|
338
|
+
var Xe = "ToastDescription", pe = n.forwardRef(
|
|
339
|
+
(e, o) => {
|
|
340
|
+
const { __scopeToast: r, ...t } = e;
|
|
341
|
+
return /* @__PURE__ */ l(D.div, { ...t, ref: o });
|
|
342
|
+
}
|
|
343
|
+
);
|
|
344
|
+
pe.displayName = Xe;
|
|
345
|
+
var fe = "ToastAction", me = n.forwardRef(
|
|
346
|
+
(e, o) => {
|
|
347
|
+
const { altText: r, ...t } = e;
|
|
348
|
+
return r.trim() ? /* @__PURE__ */ l(Te, { altText: r, asChild: !0, children: /* @__PURE__ */ l(Z, { ...t, ref: o }) }) : (console.error(
|
|
349
|
+
`Invalid prop \`altText\` supplied to \`${fe}\`. Expected non-empty \`string\`.`
|
|
350
|
+
), null);
|
|
351
|
+
}
|
|
352
|
+
);
|
|
353
|
+
me.displayName = fe;
|
|
354
|
+
var ve = "ToastClose", Z = n.forwardRef(
|
|
355
|
+
(e, o) => {
|
|
356
|
+
const { __scopeToast: r, ...t } = e, c = Ke(ve, r);
|
|
357
|
+
return /* @__PURE__ */ l(Te, { asChild: !0, children: /* @__PURE__ */ l(
|
|
358
|
+
D.button,
|
|
359
|
+
{
|
|
360
|
+
type: "button",
|
|
361
|
+
...t,
|
|
362
|
+
ref: o,
|
|
363
|
+
onClick: R(e.onClick, c.onClose)
|
|
364
|
+
}
|
|
365
|
+
) });
|
|
366
|
+
}
|
|
367
|
+
);
|
|
368
|
+
Z.displayName = ve;
|
|
369
|
+
var Te = n.forwardRef((e, o) => {
|
|
370
|
+
const { __scopeToast: r, altText: t, ...c } = e;
|
|
371
|
+
return /* @__PURE__ */ l(
|
|
372
|
+
D.div,
|
|
373
|
+
{
|
|
374
|
+
"data-radix-toast-announce-exclude": "",
|
|
375
|
+
"data-radix-toast-announce-alt": t || void 0,
|
|
376
|
+
...c,
|
|
377
|
+
ref: o
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
});
|
|
381
|
+
function we(e) {
|
|
382
|
+
const o = [];
|
|
383
|
+
return Array.from(e.childNodes).forEach((t) => {
|
|
384
|
+
if (t.nodeType === t.TEXT_NODE && t.textContent && o.push(t.textContent), $e(t)) {
|
|
385
|
+
const c = t.ariaHidden || t.hidden || t.style.display === "none", d = t.dataset.radixToastAnnounceExclude === "";
|
|
386
|
+
if (!c)
|
|
387
|
+
if (d) {
|
|
388
|
+
const p = t.dataset.radixToastAnnounceAlt;
|
|
389
|
+
p && o.push(p);
|
|
390
|
+
} else
|
|
391
|
+
o.push(...we(t));
|
|
392
|
+
}
|
|
393
|
+
}), o;
|
|
394
|
+
}
|
|
395
|
+
function W(e, o, r, { discrete: t }) {
|
|
396
|
+
const c = r.originalEvent.currentTarget, d = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: r });
|
|
397
|
+
o && c.addEventListener(e, o, { once: !0 }), t ? Se(c, d) : c.dispatchEvent(d);
|
|
398
|
+
}
|
|
399
|
+
var te = (e, o, r = 0) => {
|
|
400
|
+
const t = Math.abs(e.x), c = Math.abs(e.y), d = t > c;
|
|
401
|
+
return o === "left" || o === "right" ? d && t > r : !d && c > r;
|
|
402
|
+
};
|
|
403
|
+
function Ye(e = () => {
|
|
404
|
+
}) {
|
|
405
|
+
const o = U(e);
|
|
406
|
+
Ae(() => {
|
|
407
|
+
let r = 0, t = 0;
|
|
408
|
+
return r = window.requestAnimationFrame(() => t = window.requestAnimationFrame(o)), () => {
|
|
409
|
+
window.cancelAnimationFrame(r), window.cancelAnimationFrame(t);
|
|
410
|
+
};
|
|
411
|
+
}, [o]);
|
|
412
|
+
}
|
|
413
|
+
function $e(e) {
|
|
414
|
+
return e.nodeType === e.ELEMENT_NODE;
|
|
415
|
+
}
|
|
416
|
+
function Be(e) {
|
|
417
|
+
const o = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
418
|
+
acceptNode: (t) => {
|
|
419
|
+
const c = t.tagName === "INPUT" && t.type === "hidden";
|
|
420
|
+
return t.disabled || t.hidden || c ? NodeFilter.FILTER_SKIP : t.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
for (; r.nextNode(); ) o.push(r.currentNode);
|
|
424
|
+
return o;
|
|
425
|
+
}
|
|
426
|
+
function B(e) {
|
|
427
|
+
const o = document.activeElement;
|
|
428
|
+
return e.some((r) => r === o ? !0 : (r.focus(), document.activeElement !== o));
|
|
429
|
+
}
|
|
430
|
+
var at = ae, it = ce, ct = le, ut = de, lt = pe, dt = me, pt = Z;
|
|
431
|
+
export {
|
|
432
|
+
dt as Action,
|
|
433
|
+
pt as Close,
|
|
434
|
+
lt as Description,
|
|
435
|
+
at as Provider,
|
|
436
|
+
ct as Root,
|
|
437
|
+
ut as Title,
|
|
438
|
+
le as Toast,
|
|
439
|
+
me as ToastAction,
|
|
440
|
+
Z as ToastClose,
|
|
441
|
+
pe as ToastDescription,
|
|
442
|
+
ae as ToastProvider,
|
|
443
|
+
de as ToastTitle,
|
|
444
|
+
ce as ToastViewport,
|
|
445
|
+
it as Viewport
|
|
446
|
+
};
|