@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,30 @@
|
|
|
1
|
+
import { Primitive } from './react-primitive';
|
|
2
|
+
/**
|
|
3
|
+
* Vendored from @radix-ui/react-dismissable-layer
|
|
4
|
+
* @see ../LICENSE
|
|
5
|
+
*/
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
8
|
+
interface DismissableLayerProps extends PrimitiveDivProps {
|
|
9
|
+
disableOutsidePointerEvents?: boolean;
|
|
10
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
11
|
+
onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;
|
|
12
|
+
onFocusOutside?: (event: FocusOutsideEvent) => void;
|
|
13
|
+
onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;
|
|
14
|
+
onDismiss?: () => void;
|
|
15
|
+
}
|
|
16
|
+
declare const DismissableLayer: React.ForwardRefExoticComponent<DismissableLayerProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
interface DismissableLayerBranchProps extends PrimitiveDivProps {
|
|
18
|
+
}
|
|
19
|
+
declare const DismissableLayerBranch: React.ForwardRefExoticComponent<DismissableLayerBranchProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
type PointerDownOutsideEvent = CustomEvent<{
|
|
21
|
+
originalEvent: PointerEvent;
|
|
22
|
+
}>;
|
|
23
|
+
type FocusOutsideEvent = CustomEvent<{
|
|
24
|
+
originalEvent: FocusEvent;
|
|
25
|
+
}>;
|
|
26
|
+
declare const Root: React.ForwardRefExoticComponent<DismissableLayerProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
declare const Branch: React.ForwardRefExoticComponent<DismissableLayerBranchProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export { DismissableLayer, DismissableLayerBranch, Root, Branch, };
|
|
29
|
+
export type { DismissableLayerProps };
|
|
30
|
+
//# sourceMappingURL=react-dismissable-layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-dismissable-layer.d.ts","sourceRoot":"","sources":["../../../src/primitives/_internal/react-dismissable-layer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAA+B,MAAM,mBAAmB,CAAC;AAmB3E,KAAK,iBAAiB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;AAC9E,UAAU,qBAAsB,SAAQ,iBAAiB;IACvD,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACjD,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAChE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACpD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,GAAG,iBAAiB,KAAK,IAAI,CAAC;IACjF,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,QAAA,MAAM,gBAAgB,8FAuGrB,CAAC;AAWF,UAAU,2BAA4B,SAAQ,iBAAiB;CAAG;AAElE,QAAA,MAAM,sBAAsB,oGAiB1B,CAAC;AAMH,KAAK,uBAAuB,GAAG,WAAW,CAAC;IAAE,aAAa,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC;AAC5E,KAAK,iBAAiB,GAAG,WAAW,CAAC;IAAE,aAAa,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC;AAmGpE,QAAA,MAAM,IAAI,8FAAmB,CAAC;AAC9B,QAAA,MAAM,MAAM,oGAAyB,CAAC;AAEtC,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,IAAI,EACJ,MAAM,GACP,CAAC;AACF,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { jsx as R } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { composeEventHandlers as m } from "./primitive.js";
|
|
4
|
+
import { Primitive as g, dispatchDiscreteCustomEvent as z } from "./react-primitive.js";
|
|
5
|
+
import { useComposedRefs as w } from "./react-compose-refs.js";
|
|
6
|
+
import { useCallbackRef as B } from "./react-use-callback-ref.js";
|
|
7
|
+
import { useEscapeKeydown as H } from "./react-use-escape-keydown.js";
|
|
8
|
+
const M = "DismissableLayer", y = "dismissableLayer.update", j = "dismissableLayer.pointerDownOutside", X = "dismissableLayer.focusOutside";
|
|
9
|
+
let L;
|
|
10
|
+
const T = n.createContext({
|
|
11
|
+
layers: /* @__PURE__ */ new Set(),
|
|
12
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
13
|
+
branches: /* @__PURE__ */ new Set()
|
|
14
|
+
}), x = n.forwardRef(
|
|
15
|
+
(r, e) => {
|
|
16
|
+
const {
|
|
17
|
+
disableOutsidePointerEvents: i = !1,
|
|
18
|
+
onEscapeKeyDown: o,
|
|
19
|
+
onPointerDownOutside: t,
|
|
20
|
+
onFocusOutside: a,
|
|
21
|
+
onInteractOutside: l,
|
|
22
|
+
onDismiss: d,
|
|
23
|
+
...E
|
|
24
|
+
} = r, c = n.useContext(T), [u, W] = n.useState(null), f = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, A] = n.useState({}), N = w(e, (s) => W(s)), p = Array.from(c.layers), [I] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), _ = p.indexOf(I), b = u ? p.indexOf(u) : -1, k = c.layersWithOutsidePointerEventsDisabled.size > 0, P = b >= _, U = q((s) => {
|
|
25
|
+
const v = s.target, C = [...c.branches].some((h) => h.contains(v));
|
|
26
|
+
!P || C || (t == null || t(s), l == null || l(s), s.defaultPrevented || d == null || d());
|
|
27
|
+
}, f), D = G((s) => {
|
|
28
|
+
const v = s.target;
|
|
29
|
+
[...c.branches].some((h) => h.contains(v)) || (a == null || a(s), l == null || l(s), s.defaultPrevented || d == null || d());
|
|
30
|
+
}, f);
|
|
31
|
+
return H((s) => {
|
|
32
|
+
b === c.layers.size - 1 && (o == null || o(s), !s.defaultPrevented && d && (s.preventDefault(), d()));
|
|
33
|
+
}, f), n.useEffect(() => {
|
|
34
|
+
if (u)
|
|
35
|
+
return i && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (L = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), O(), () => {
|
|
36
|
+
i && c.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = L);
|
|
37
|
+
};
|
|
38
|
+
}, [u, f, i, c]), n.useEffect(() => () => {
|
|
39
|
+
u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), O());
|
|
40
|
+
}, [u, c]), n.useEffect(() => {
|
|
41
|
+
const s = () => A({});
|
|
42
|
+
return document.addEventListener(y, s), () => document.removeEventListener(y, s);
|
|
43
|
+
}, []), /* @__PURE__ */ R(
|
|
44
|
+
g.div,
|
|
45
|
+
{
|
|
46
|
+
...E,
|
|
47
|
+
ref: N,
|
|
48
|
+
style: {
|
|
49
|
+
pointerEvents: k ? P ? "auto" : "none" : void 0,
|
|
50
|
+
...r.style
|
|
51
|
+
},
|
|
52
|
+
onFocusCapture: m(r.onFocusCapture, D.onFocusCapture),
|
|
53
|
+
onBlurCapture: m(r.onBlurCapture, D.onBlurCapture),
|
|
54
|
+
onPointerDownCapture: m(
|
|
55
|
+
r.onPointerDownCapture,
|
|
56
|
+
U.onPointerDownCapture
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
x.displayName = M;
|
|
63
|
+
const Y = "DismissableLayerBranch", S = n.forwardRef((r, e) => {
|
|
64
|
+
const i = n.useContext(T), o = n.useRef(null), t = w(e, o);
|
|
65
|
+
return n.useEffect(() => {
|
|
66
|
+
const a = o.current;
|
|
67
|
+
if (a)
|
|
68
|
+
return i.branches.add(a), () => {
|
|
69
|
+
i.branches.delete(a);
|
|
70
|
+
};
|
|
71
|
+
}, [i.branches]), /* @__PURE__ */ R(g.div, { ...r, ref: t });
|
|
72
|
+
});
|
|
73
|
+
S.displayName = Y;
|
|
74
|
+
function q(r, e = globalThis == null ? void 0 : globalThis.document) {
|
|
75
|
+
const i = B(r), o = n.useRef(!1), t = n.useRef(() => {
|
|
76
|
+
});
|
|
77
|
+
return n.useEffect(() => {
|
|
78
|
+
const a = (d) => {
|
|
79
|
+
if (d.target && !o.current) {
|
|
80
|
+
let E = function() {
|
|
81
|
+
F(
|
|
82
|
+
j,
|
|
83
|
+
i,
|
|
84
|
+
c,
|
|
85
|
+
{ discrete: !0 }
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
const c = { originalEvent: d };
|
|
89
|
+
d.pointerType === "touch" ? (e.removeEventListener("click", t.current), t.current = E, e.addEventListener("click", t.current, { once: !0 })) : E();
|
|
90
|
+
} else
|
|
91
|
+
e.removeEventListener("click", t.current);
|
|
92
|
+
o.current = !1;
|
|
93
|
+
}, l = window.setTimeout(() => {
|
|
94
|
+
e.addEventListener("pointerdown", a);
|
|
95
|
+
}, 0);
|
|
96
|
+
return () => {
|
|
97
|
+
window.clearTimeout(l), e.removeEventListener("pointerdown", a), e.removeEventListener("click", t.current);
|
|
98
|
+
};
|
|
99
|
+
}, [e, i]), {
|
|
100
|
+
onPointerDownCapture: () => o.current = !0
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function G(r, e = globalThis == null ? void 0 : globalThis.document) {
|
|
104
|
+
const i = B(r), o = n.useRef(!1);
|
|
105
|
+
return n.useEffect(() => {
|
|
106
|
+
const t = (a) => {
|
|
107
|
+
a.target && !o.current && F(X, i, { originalEvent: a }, {
|
|
108
|
+
discrete: !1
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
return e.addEventListener("focusin", t), () => e.removeEventListener("focusin", t);
|
|
112
|
+
}, [e, i]), {
|
|
113
|
+
onFocusCapture: () => o.current = !0,
|
|
114
|
+
onBlurCapture: () => o.current = !1
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function O() {
|
|
118
|
+
const r = new CustomEvent(y);
|
|
119
|
+
document.dispatchEvent(r);
|
|
120
|
+
}
|
|
121
|
+
function F(r, e, i, { discrete: o }) {
|
|
122
|
+
const t = i.originalEvent.target, a = new CustomEvent(r, { bubbles: !1, cancelable: !0, detail: i });
|
|
123
|
+
e && t.addEventListener(r, e, { once: !0 }), o ? z(t, a) : t.dispatchEvent(a);
|
|
124
|
+
}
|
|
125
|
+
const ee = x, te = S;
|
|
126
|
+
export {
|
|
127
|
+
te as Branch,
|
|
128
|
+
x as DismissableLayer,
|
|
129
|
+
S as DismissableLayerBranch,
|
|
130
|
+
ee as Root
|
|
131
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vendored from @radix-ui/react-focus-guards
|
|
3
|
+
* @see ../LICENSE
|
|
4
|
+
*/
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
interface FocusGuardsProps {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function FocusGuards(props: FocusGuardsProps): React.ReactNode;
|
|
10
|
+
declare function useFocusGuards(): void;
|
|
11
|
+
export { FocusGuards, FocusGuards as Root, useFocusGuards, };
|
|
12
|
+
//# sourceMappingURL=react-focus-guards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-focus-guards.d.ts","sourceRoot":"","sources":["../../../src/primitives/_internal/react-focus-guards.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,mBAG3C;AAED,iBAAS,cAAc,SActB;AAaD,OAAO,EACL,WAAW,EACX,WAAW,IAAI,IAAI,EACnB,cAAc,GACf,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
let t = 0;
|
|
3
|
+
function u() {
|
|
4
|
+
r.useEffect(() => {
|
|
5
|
+
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
6
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? n()), document.body.insertAdjacentElement("beforeend", e[1] ?? n()), t++, () => {
|
|
7
|
+
t === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((o) => o.remove()), t--;
|
|
8
|
+
};
|
|
9
|
+
}, []);
|
|
10
|
+
}
|
|
11
|
+
function n() {
|
|
12
|
+
const e = document.createElement("span");
|
|
13
|
+
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
u as useFocusGuards
|
|
17
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Primitive } from './react-primitive';
|
|
2
|
+
/**
|
|
3
|
+
* Vendored from @radix-ui/react-focus-scope
|
|
4
|
+
* @see ../LICENSE
|
|
5
|
+
*/
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
8
|
+
interface FocusScopeProps extends PrimitiveDivProps {
|
|
9
|
+
loop?: boolean;
|
|
10
|
+
trapped?: boolean;
|
|
11
|
+
onMountAutoFocus?: (event: Event) => void;
|
|
12
|
+
onUnmountAutoFocus?: (event: Event) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const FocusScope: React.ForwardRefExoticComponent<FocusScopeProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const Root: React.ForwardRefExoticComponent<FocusScopeProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export { FocusScope, Root, };
|
|
17
|
+
export type { FocusScopeProps };
|
|
18
|
+
//# sourceMappingURL=react-focus-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-focus-scope.d.ts","sourceRoot":"","sources":["../../../src/primitives/_internal/react-focus-scope.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAY9C,KAAK,iBAAiB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;AAC9E,UAAU,eAAgB,SAAQ,iBAAiB;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC1C,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAC7C;AAED,QAAA,MAAM,UAAU,wFAgId,CAAC;AAmGH,QAAA,MAAM,IAAI,wFAAa,CAAC;AAExB,OAAO,EACL,UAAU,EACV,IAAI,GACL,CAAC;AACF,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { jsx as R } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { useComposedRefs as M } from "./react-compose-refs.js";
|
|
4
|
+
import { Primitive as _ } from "./react-primitive.js";
|
|
5
|
+
import { useCallbackRef as y } from "./react-use-callback-ref.js";
|
|
6
|
+
const F = "focusScope.autoFocusOnMount", T = "focusScope.autoFocusOnUnmount", N = { bubbles: !1, cancelable: !0 }, K = "FocusScope", k = d.forwardRef((e, n) => {
|
|
7
|
+
const {
|
|
8
|
+
loop: t = !1,
|
|
9
|
+
trapped: u = !1,
|
|
10
|
+
onMountAutoFocus: p,
|
|
11
|
+
onUnmountAutoFocus: L,
|
|
12
|
+
...g
|
|
13
|
+
} = e, [o, U] = d.useState(null), E = y(p), v = y(L), b = d.useRef(null), A = M(n, (s) => U(s)), a = d.useRef({
|
|
14
|
+
paused: !1,
|
|
15
|
+
pause() {
|
|
16
|
+
this.paused = !0;
|
|
17
|
+
},
|
|
18
|
+
resume() {
|
|
19
|
+
this.paused = !1;
|
|
20
|
+
}
|
|
21
|
+
}).current;
|
|
22
|
+
d.useEffect(() => {
|
|
23
|
+
if (u) {
|
|
24
|
+
let s = function(i) {
|
|
25
|
+
if (a.paused || !o) return;
|
|
26
|
+
const c = i.target;
|
|
27
|
+
o.contains(c) ? b.current = c : f(b.current, { select: !0 });
|
|
28
|
+
}, l = function(i) {
|
|
29
|
+
if (a.paused || !o) return;
|
|
30
|
+
const c = i.relatedTarget;
|
|
31
|
+
c !== null && (o.contains(c) || f(b.current, { select: !0 }));
|
|
32
|
+
}, r = function(i) {
|
|
33
|
+
if (document.activeElement === document.body)
|
|
34
|
+
for (const h of i)
|
|
35
|
+
h.removedNodes.length > 0 && f(o);
|
|
36
|
+
};
|
|
37
|
+
document.addEventListener("focusin", s), document.addEventListener("focusout", l);
|
|
38
|
+
const m = new MutationObserver(r);
|
|
39
|
+
return o && m.observe(o, { childList: !0, subtree: !0 }), () => {
|
|
40
|
+
document.removeEventListener("focusin", s), document.removeEventListener("focusout", l), m.disconnect();
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}, [u, o, a.paused]), d.useEffect(() => {
|
|
44
|
+
if (o) {
|
|
45
|
+
S.add(a);
|
|
46
|
+
const s = document.activeElement;
|
|
47
|
+
if (!o.contains(s)) {
|
|
48
|
+
const r = new CustomEvent(F, N);
|
|
49
|
+
o.addEventListener(F, E), o.dispatchEvent(r), r.defaultPrevented || (w(W(I(o)), { select: !0 }), document.activeElement === s && f(o));
|
|
50
|
+
}
|
|
51
|
+
return () => {
|
|
52
|
+
o.removeEventListener(F, E), setTimeout(() => {
|
|
53
|
+
const r = new CustomEvent(T, N);
|
|
54
|
+
o.addEventListener(T, v), o.dispatchEvent(r), r.defaultPrevented || f(s ?? document.body, { select: !0 }), o.removeEventListener(T, v), S.remove(a);
|
|
55
|
+
}, 0);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}, [o, E, v, a]);
|
|
59
|
+
const P = d.useCallback(
|
|
60
|
+
(s) => {
|
|
61
|
+
if (!t && !u || a.paused) return;
|
|
62
|
+
const l = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, r = document.activeElement;
|
|
63
|
+
if (l && r) {
|
|
64
|
+
const m = s.currentTarget, [i, c] = x(m);
|
|
65
|
+
i && c ? !s.shiftKey && r === c ? (s.preventDefault(), t && f(i, { select: !0 })) : s.shiftKey && r === i && (s.preventDefault(), t && f(c, { select: !0 })) : r === m && s.preventDefault();
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
[t, u, a.paused]
|
|
69
|
+
);
|
|
70
|
+
return /* @__PURE__ */ R(_.div, { tabIndex: -1, ...g, ref: A, onKeyDown: P });
|
|
71
|
+
});
|
|
72
|
+
k.displayName = K;
|
|
73
|
+
function w(e, { select: n = !1 } = {}) {
|
|
74
|
+
const t = document.activeElement;
|
|
75
|
+
for (const u of e)
|
|
76
|
+
if (f(u, { select: n }), document.activeElement !== t) return;
|
|
77
|
+
}
|
|
78
|
+
function x(e) {
|
|
79
|
+
const n = I(e), t = O(n, e), u = O(n.reverse(), e);
|
|
80
|
+
return [t, u];
|
|
81
|
+
}
|
|
82
|
+
function I(e) {
|
|
83
|
+
const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
84
|
+
acceptNode: (u) => {
|
|
85
|
+
const p = u.tagName === "INPUT" && u.type === "hidden";
|
|
86
|
+
return u.disabled || u.hidden || p ? NodeFilter.FILTER_SKIP : u.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
for (; t.nextNode(); ) n.push(t.currentNode);
|
|
90
|
+
return n;
|
|
91
|
+
}
|
|
92
|
+
function O(e, n) {
|
|
93
|
+
for (const t of e)
|
|
94
|
+
if (!D(t, { upTo: n })) return t;
|
|
95
|
+
}
|
|
96
|
+
function D(e, { upTo: n }) {
|
|
97
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
98
|
+
for (; e; ) {
|
|
99
|
+
if (n !== void 0 && e === n) return !1;
|
|
100
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
101
|
+
e = e.parentElement;
|
|
102
|
+
}
|
|
103
|
+
return !1;
|
|
104
|
+
}
|
|
105
|
+
function H(e) {
|
|
106
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
107
|
+
}
|
|
108
|
+
function f(e, { select: n = !1 } = {}) {
|
|
109
|
+
if (e && e.focus) {
|
|
110
|
+
const t = document.activeElement;
|
|
111
|
+
e.focus({ preventScroll: !0 }), e !== t && H(e) && n && e.select();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
const S = V();
|
|
115
|
+
function V() {
|
|
116
|
+
let e = [];
|
|
117
|
+
return {
|
|
118
|
+
add(n) {
|
|
119
|
+
const t = e[0];
|
|
120
|
+
n !== t && (t == null || t.pause()), e = C(e, n), e.unshift(n);
|
|
121
|
+
},
|
|
122
|
+
remove(n) {
|
|
123
|
+
var t;
|
|
124
|
+
e = C(e, n), (t = e[0]) == null || t.resume();
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function C(e, n) {
|
|
129
|
+
const t = [...e], u = t.indexOf(n);
|
|
130
|
+
return u !== -1 && t.splice(u, 1), t;
|
|
131
|
+
}
|
|
132
|
+
function W(e) {
|
|
133
|
+
return e.filter((n) => n.tagName !== "A");
|
|
134
|
+
}
|
|
135
|
+
export {
|
|
136
|
+
k as FocusScope
|
|
137
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-id.d.ts","sourceRoot":"","sources":["../../../src/primitives/_internal/react-id.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,iBAAS,KAAK,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAM/C;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { useLayoutEffect as s } from "./react-use-layout-effect.js";
|
|
3
|
+
const n = e[" useId ".trim().toString()] || (() => {
|
|
4
|
+
});
|
|
5
|
+
let a = 0;
|
|
6
|
+
function i(t) {
|
|
7
|
+
const [o, r] = e.useState(n());
|
|
8
|
+
return s(() => {
|
|
9
|
+
r((u) => u ?? String(a++));
|
|
10
|
+
}, [t]), t || (o ? `radix-${o}` : "");
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
i as useId
|
|
14
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Primitive } from './react-primitive';
|
|
2
|
+
import { Measurable } from './rect';
|
|
3
|
+
/**
|
|
4
|
+
* Vendored from @radix-ui/react-popper
|
|
5
|
+
* @floating-ui/react-dom is kept as external dependency
|
|
6
|
+
* @see ../LICENSE
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import * as ArrowPrimitive from './react-arrow';
|
|
10
|
+
declare const SIDE_OPTIONS: readonly ["top", "right", "bottom", "left"];
|
|
11
|
+
declare const ALIGN_OPTIONS: readonly ["start", "center", "end"];
|
|
12
|
+
type Side = (typeof SIDE_OPTIONS)[number];
|
|
13
|
+
type Align = (typeof ALIGN_OPTIONS)[number];
|
|
14
|
+
declare const createPopperScope: import('./react-context').CreateScope;
|
|
15
|
+
interface PopperProps {
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const Popper: React.FC<PopperProps>;
|
|
19
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
20
|
+
interface PopperAnchorProps extends PrimitiveDivProps {
|
|
21
|
+
virtualRef?: React.RefObject<Measurable>;
|
|
22
|
+
}
|
|
23
|
+
declare const PopperAnchor: React.ForwardRefExoticComponent<PopperAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
type Boundary = Element | null;
|
|
25
|
+
interface PopperContentProps extends PrimitiveDivProps {
|
|
26
|
+
side?: Side;
|
|
27
|
+
sideOffset?: number;
|
|
28
|
+
align?: Align;
|
|
29
|
+
alignOffset?: number;
|
|
30
|
+
arrowPadding?: number;
|
|
31
|
+
avoidCollisions?: boolean;
|
|
32
|
+
collisionBoundary?: Boundary | Boundary[];
|
|
33
|
+
collisionPadding?: number | Partial<Record<Side, number>>;
|
|
34
|
+
sticky?: 'partial' | 'always';
|
|
35
|
+
hideWhenDetached?: boolean;
|
|
36
|
+
updatePositionStrategy?: 'optimized' | 'always';
|
|
37
|
+
onPlaced?: () => void;
|
|
38
|
+
}
|
|
39
|
+
declare const PopperContent: React.ForwardRefExoticComponent<PopperContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
type ArrowProps = React.ComponentPropsWithoutRef<typeof ArrowPrimitive.Root>;
|
|
41
|
+
interface PopperArrowProps extends ArrowProps {
|
|
42
|
+
}
|
|
43
|
+
declare const PopperArrow: React.ForwardRefExoticComponent<PopperArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
44
|
+
declare const Root: React.FC<PopperProps>;
|
|
45
|
+
declare const Anchor: React.ForwardRefExoticComponent<PopperAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
declare const Content: React.ForwardRefExoticComponent<PopperContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
declare const Arrow: React.ForwardRefExoticComponent<PopperArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
48
|
+
export { createPopperScope, Popper, PopperAnchor, PopperContent, PopperArrow, Root, Anchor, Content, Arrow, SIDE_OPTIONS, ALIGN_OPTIONS, };
|
|
49
|
+
export type { PopperProps, PopperAnchorProps, PopperContentProps, PopperArrowProps };
|
|
50
|
+
//# sourceMappingURL=react-popper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-popper.d.ts","sourceRoot":"","sources":["../../../src/primitives/_internal/react-popper.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,cAAc,MAAM,eAAe,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAO9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC,QAAA,MAAM,YAAY,6CAA8C,CAAC;AACjE,QAAA,MAAM,aAAa,qCAAsC,CAAC;AAE1D,KAAK,IAAI,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAC1C,KAAK,KAAK,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAQ5C,QAAA,MAA4B,iBAAiB,uCAAmC,CAAC;AAQjF,UAAU,WAAW;IAAG,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAAE;AACrD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAQjC,CAAC;AASF,KAAK,iBAAiB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;AAC9E,UAAU,iBAAkB,SAAQ,iBAAiB;IACnD,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;CAC1C;AAED,QAAA,MAAM,YAAY,0FAkBjB,CAAC;AAmBF,KAAK,QAAQ,GAAG,OAAO,GAAG,IAAI,CAAC;AAE/B,UAAU,kBAAmB,SAAQ,iBAAiB;IACpD,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAAC;IAC1C,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1D,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sBAAsB,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;IAChD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,aAAa,2FAmIlB,CAAC;AAaF,KAAK,UAAU,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAC7E,UAAU,gBAAiB,SAAQ,UAAU;CAAG;AAEhD,QAAA,MAAM,WAAW,wFAmCf,CAAC;AAkCH,QAAA,MAAM,IAAI,uBAAS,CAAC;AACpB,QAAA,MAAM,MAAM,0FAAe,CAAC;AAC5B,QAAA,MAAM,OAAO,2FAAgB,CAAC;AAC9B,QAAA,MAAM,KAAK,wFAAc,CAAC;AAE1B,OAAO,EACL,iBAAiB,EACjB,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAChD,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAC5B,YAAY,EAAE,aAAa,GAC5B,CAAC;AACF,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import { useFloating as xt, offset as Pt, shift as yt, limitShift as At, flip as Ct, size as bt, arrow as St, hide as Ot, autoUpdate as Rt } from "@floating-ui/react-dom";
|
|
4
|
+
import { Root as vt } from "./react-arrow.js";
|
|
5
|
+
import { useComposedRefs as j } from "./react-compose-refs.js";
|
|
6
|
+
import { createContextScope as Et } from "./react-context.js";
|
|
7
|
+
import { Primitive as z } from "./react-primitive.js";
|
|
8
|
+
import { useCallbackRef as Nt } from "./react-use-callback-ref.js";
|
|
9
|
+
import { useLayoutEffect as T } from "./react-use-layout-effect.js";
|
|
10
|
+
import { useSize as _t } from "./react-use-size.js";
|
|
11
|
+
const N = "Popper", [Z, Lt] = Et(N), [$t, L] = Z(N), U = (t) => {
|
|
12
|
+
const { __scopePopper: a, children: i } = t, [e, s] = p.useState(null);
|
|
13
|
+
return /* @__PURE__ */ f($t, { scope: a, anchor: e, onAnchorChange: s, children: i });
|
|
14
|
+
};
|
|
15
|
+
U.displayName = N;
|
|
16
|
+
const q = "PopperAnchor", G = p.forwardRef(
|
|
17
|
+
(t, a) => {
|
|
18
|
+
const { __scopePopper: i, virtualRef: e, ...s } = t, o = L(q, i), r = p.useRef(null), w = j(a, r), n = p.useRef(null);
|
|
19
|
+
return p.useEffect(() => {
|
|
20
|
+
const c = n.current;
|
|
21
|
+
n.current = (e == null ? void 0 : e.current) || r.current, c !== n.current && o.onAnchorChange(n.current);
|
|
22
|
+
}), e ? null : /* @__PURE__ */ f(z.div, { ...s, ref: w });
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
G.displayName = q;
|
|
26
|
+
const _ = "PopperContent", [Ht, Wt] = Z(_), J = p.forwardRef(
|
|
27
|
+
(t, a) => {
|
|
28
|
+
var Y, M, X, D, F, k;
|
|
29
|
+
const {
|
|
30
|
+
__scopePopper: i,
|
|
31
|
+
side: e = "bottom",
|
|
32
|
+
sideOffset: s = 0,
|
|
33
|
+
align: o = "center",
|
|
34
|
+
alignOffset: r = 0,
|
|
35
|
+
arrowPadding: w = 0,
|
|
36
|
+
avoidCollisions: n = !0,
|
|
37
|
+
collisionBoundary: c = [],
|
|
38
|
+
collisionPadding: x = 0,
|
|
39
|
+
sticky: m = "partial",
|
|
40
|
+
hideWhenDetached: y = !1,
|
|
41
|
+
updatePositionStrategy: A = "optimized",
|
|
42
|
+
onPlaced: l,
|
|
43
|
+
...d
|
|
44
|
+
} = t, C = L(_, i), [h, b] = p.useState(null), tt = j(a, (P) => b(P)), [E, et] = p.useState(null), u = _t(E), ot = (u == null ? void 0 : u.width) ?? 0, $ = (u == null ? void 0 : u.height) ?? 0, rt = e + (o !== "center" ? "-" + o : ""), nt = typeof x == "number" ? x : { top: 0, right: 0, bottom: 0, left: 0, ...x }, H = Array.isArray(c) ? c : [c], it = H.length > 0, S = {
|
|
45
|
+
padding: nt,
|
|
46
|
+
boundary: H.filter(Yt),
|
|
47
|
+
altBoundary: it
|
|
48
|
+
}, { refs: st, floatingStyles: W, placement: at, isPositioned: O, middlewareData: g } = xt({
|
|
49
|
+
strategy: "fixed",
|
|
50
|
+
placement: rt,
|
|
51
|
+
whileElementsMounted: (...P) => Rt(...P, { animationFrame: A === "always" }),
|
|
52
|
+
elements: { reference: C.anchor },
|
|
53
|
+
middleware: [
|
|
54
|
+
Pt({ mainAxis: s + $, alignmentAxis: r }),
|
|
55
|
+
n && yt({
|
|
56
|
+
mainAxis: !0,
|
|
57
|
+
crossAxis: !1,
|
|
58
|
+
limiter: m === "partial" ? At() : void 0,
|
|
59
|
+
...S
|
|
60
|
+
}),
|
|
61
|
+
n && Ct({ ...S }),
|
|
62
|
+
bt({
|
|
63
|
+
...S,
|
|
64
|
+
apply: ({ elements: P, rects: B, availableWidth: ht, availableHeight: ut }) => {
|
|
65
|
+
const { width: gt, height: wt } = B.reference, v = P.floating.style;
|
|
66
|
+
v.setProperty("--radix-popper-available-width", `${ht}px`), v.setProperty("--radix-popper-available-height", `${ut}px`), v.setProperty("--radix-popper-anchor-width", `${gt}px`), v.setProperty("--radix-popper-anchor-height", `${wt}px`);
|
|
67
|
+
}
|
|
68
|
+
}),
|
|
69
|
+
E && St({ element: E, padding: w }),
|
|
70
|
+
Mt({ arrowWidth: ot, arrowHeight: $ }),
|
|
71
|
+
y && Ot({ strategy: "referenceHidden", ...S })
|
|
72
|
+
]
|
|
73
|
+
}), [I, ct] = V(at), R = Nt(l);
|
|
74
|
+
T(() => {
|
|
75
|
+
O && (R == null || R());
|
|
76
|
+
}, [O, R]);
|
|
77
|
+
const pt = (Y = g.arrow) == null ? void 0 : Y.x, dt = (M = g.arrow) == null ? void 0 : M.y, lt = ((X = g.arrow) == null ? void 0 : X.centerOffset) !== 0, [ft, mt] = p.useState();
|
|
78
|
+
return T(() => {
|
|
79
|
+
h && mt(window.getComputedStyle(h).zIndex);
|
|
80
|
+
}, [h]), /* @__PURE__ */ f(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
ref: st.setFloating,
|
|
84
|
+
"data-radix-popper-content-wrapper": "",
|
|
85
|
+
style: {
|
|
86
|
+
...W,
|
|
87
|
+
transform: O ? W.transform : "translate(0, -200%)",
|
|
88
|
+
minWidth: "max-content",
|
|
89
|
+
zIndex: ft,
|
|
90
|
+
"--radix-popper-transform-origin": [
|
|
91
|
+
(D = g.transformOrigin) == null ? void 0 : D.x,
|
|
92
|
+
(F = g.transformOrigin) == null ? void 0 : F.y
|
|
93
|
+
].join(" "),
|
|
94
|
+
...((k = g.hide) == null ? void 0 : k.referenceHidden) && {
|
|
95
|
+
visibility: "hidden",
|
|
96
|
+
pointerEvents: "none"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
dir: t.dir,
|
|
100
|
+
children: /* @__PURE__ */ f(
|
|
101
|
+
Ht,
|
|
102
|
+
{
|
|
103
|
+
scope: i,
|
|
104
|
+
placedSide: I,
|
|
105
|
+
onArrowChange: et,
|
|
106
|
+
arrowX: pt,
|
|
107
|
+
arrowY: dt,
|
|
108
|
+
shouldHideArrow: lt,
|
|
109
|
+
children: /* @__PURE__ */ f(
|
|
110
|
+
z.div,
|
|
111
|
+
{
|
|
112
|
+
"data-side": I,
|
|
113
|
+
"data-align": ct,
|
|
114
|
+
...d,
|
|
115
|
+
ref: tt,
|
|
116
|
+
style: {
|
|
117
|
+
...d.style,
|
|
118
|
+
animation: O ? void 0 : "none"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
J.displayName = _;
|
|
129
|
+
const K = "PopperArrow", It = {
|
|
130
|
+
top: "bottom",
|
|
131
|
+
right: "left",
|
|
132
|
+
bottom: "top",
|
|
133
|
+
left: "right"
|
|
134
|
+
}, Q = p.forwardRef(function(a, i) {
|
|
135
|
+
const { __scopePopper: e, ...s } = a, o = Wt(K, e), r = It[o.placedSide];
|
|
136
|
+
return /* @__PURE__ */ f(
|
|
137
|
+
"span",
|
|
138
|
+
{
|
|
139
|
+
ref: o.onArrowChange,
|
|
140
|
+
style: {
|
|
141
|
+
position: "absolute",
|
|
142
|
+
left: o.arrowX,
|
|
143
|
+
top: o.arrowY,
|
|
144
|
+
[r]: 0,
|
|
145
|
+
transformOrigin: {
|
|
146
|
+
top: "",
|
|
147
|
+
right: "0 0",
|
|
148
|
+
bottom: "center 0",
|
|
149
|
+
left: "100% 0"
|
|
150
|
+
}[o.placedSide],
|
|
151
|
+
transform: {
|
|
152
|
+
top: "translateY(100%)",
|
|
153
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
154
|
+
bottom: "rotate(180deg)",
|
|
155
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
156
|
+
}[o.placedSide],
|
|
157
|
+
visibility: o.shouldHideArrow ? "hidden" : void 0
|
|
158
|
+
},
|
|
159
|
+
children: /* @__PURE__ */ f(
|
|
160
|
+
vt,
|
|
161
|
+
{
|
|
162
|
+
...s,
|
|
163
|
+
ref: i,
|
|
164
|
+
style: { ...s.style, display: "block" }
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
});
|
|
170
|
+
Q.displayName = K;
|
|
171
|
+
function Yt(t) {
|
|
172
|
+
return t !== null;
|
|
173
|
+
}
|
|
174
|
+
const Mt = (t) => ({
|
|
175
|
+
name: "transformOrigin",
|
|
176
|
+
options: t,
|
|
177
|
+
fn(a) {
|
|
178
|
+
var C, h, b;
|
|
179
|
+
const { placement: i, rects: e, middlewareData: s } = a, r = ((C = s.arrow) == null ? void 0 : C.centerOffset) !== 0, w = r ? 0 : t.arrowWidth, n = r ? 0 : t.arrowHeight, [c, x] = V(i), m = { start: "0%", center: "50%", end: "100%" }[x], y = (((h = s.arrow) == null ? void 0 : h.x) ?? 0) + w / 2, A = (((b = s.arrow) == null ? void 0 : b.y) ?? 0) + n / 2;
|
|
180
|
+
let l = "", d = "";
|
|
181
|
+
return c === "bottom" ? (l = r ? m : `${y}px`, d = `${-n}px`) : c === "top" ? (l = r ? m : `${y}px`, d = `${e.floating.height + n}px`) : c === "right" ? (l = `${-n}px`, d = r ? m : `${A}px`) : c === "left" && (l = `${e.floating.width + n}px`, d = r ? m : `${A}px`), { data: { x: l, y: d } };
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
function V(t) {
|
|
185
|
+
const [a, i = "center"] = t.split("-");
|
|
186
|
+
return [a, i];
|
|
187
|
+
}
|
|
188
|
+
const Ut = U, qt = G, Gt = J, Jt = Q;
|
|
189
|
+
export {
|
|
190
|
+
qt as Anchor,
|
|
191
|
+
Jt as Arrow,
|
|
192
|
+
Gt as Content,
|
|
193
|
+
U as Popper,
|
|
194
|
+
G as PopperAnchor,
|
|
195
|
+
Q as PopperArrow,
|
|
196
|
+
J as PopperContent,
|
|
197
|
+
Ut as Root,
|
|
198
|
+
Lt as createPopperScope
|
|
199
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Primitive } from './react-primitive';
|
|
2
|
+
/**
|
|
3
|
+
* Vendored from @radix-ui/react-portal
|
|
4
|
+
* @see ../LICENSE
|
|
5
|
+
*/
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
8
|
+
interface PortalProps extends PrimitiveDivProps {
|
|
9
|
+
container?: Element | DocumentFragment | null;
|
|
10
|
+
}
|
|
11
|
+
declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const Root: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Portal, Root, };
|
|
14
|
+
export type { PortalProps };
|
|
15
|
+
//# sourceMappingURL=react-portal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-portal.d.ts","sourceRoot":"","sources":["../../../src/primitives/_internal/react-portal.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAM9C,KAAK,iBAAiB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;AAC9E,UAAU,WAAY,SAAQ,iBAAiB;IAC7C,SAAS,CAAC,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAAC;CAC/C;AAED,QAAA,MAAM,MAAM,oFAQV,CAAC;AAIH,QAAA,MAAM,IAAI,oFAAS,CAAC;AAEpB,OAAO,EACL,MAAM,EACN,IAAI,GACL,CAAC;AACF,YAAY,EAAE,WAAW,EAAE,CAAC"}
|