@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,88 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as DropdownMenuPrimitive from '@primitives/react-dropdown-menu';
|
|
3
|
+
/**
|
|
4
|
+
* DropdownMenu compound component — accessible floating menu triggered by a button, with full
|
|
5
|
+
* keyboard navigation and focus management.
|
|
6
|
+
*
|
|
7
|
+
* **Parts (in composition order):**
|
|
8
|
+
* - `DropdownMenu` — manages open/closed state (this root)
|
|
9
|
+
* - `DropdownMenuTrigger` — element that opens the menu (use `asChild` to render your own button)
|
|
10
|
+
* - `DropdownMenuContent` — the floating menu panel (renders in a portal automatically)
|
|
11
|
+
* - `DropdownMenuItem` — clickable menu item (use `onSelect` for actions)
|
|
12
|
+
* - `DropdownMenuCheckboxItem` — item with a checkbox indicator
|
|
13
|
+
* - `DropdownMenuRadioGroup` — wraps radio items for exclusive selection
|
|
14
|
+
* - `DropdownMenuRadioItem` — item with a radio indicator (must be inside `DropdownMenuRadioGroup`)
|
|
15
|
+
* - `DropdownMenuSub` — root for a nested submenu
|
|
16
|
+
* - `DropdownMenuSubTrigger` — item that reveals a submenu on hover/focus
|
|
17
|
+
* - `DropdownMenuSubContent` — the nested submenu panel
|
|
18
|
+
* - `DropdownMenuLabel` — non-interactive group label (not selectable)
|
|
19
|
+
* - `DropdownMenuSeparator` — horizontal divider between sections
|
|
20
|
+
* - `DropdownMenuShortcut` — right-aligned keyboard shortcut hint text (display only)
|
|
21
|
+
* - `DropdownMenuGroup` — semantic grouping wrapper (no visual output)
|
|
22
|
+
* - `DropdownMenuPortal` — low-level portal wrapper (exported for custom positioning; used internally by DropdownMenuContent)
|
|
23
|
+
*
|
|
24
|
+
* @compound
|
|
25
|
+
* @example
|
|
26
|
+
* // Standard action menu:
|
|
27
|
+
* <DropdownMenu>
|
|
28
|
+
* <DropdownMenuTrigger asChild>
|
|
29
|
+
* <Button variant="ghost" size="icon"><IconDotsVertical /></Button>
|
|
30
|
+
* </DropdownMenuTrigger>
|
|
31
|
+
* <DropdownMenuContent align="end">
|
|
32
|
+
* <DropdownMenuLabel>My account</DropdownMenuLabel>
|
|
33
|
+
* <DropdownMenuSeparator />
|
|
34
|
+
* <DropdownMenuItem>
|
|
35
|
+
* <IconUser className="mr-ds-03" />Profile
|
|
36
|
+
* <DropdownMenuShortcut>⌘P</DropdownMenuShortcut>
|
|
37
|
+
* </DropdownMenuItem>
|
|
38
|
+
* <DropdownMenuItem>Settings</DropdownMenuItem>
|
|
39
|
+
* <DropdownMenuSeparator />
|
|
40
|
+
* <DropdownMenuItem className="text-error">Sign out</DropdownMenuItem>
|
|
41
|
+
* </DropdownMenuContent>
|
|
42
|
+
* </DropdownMenu>
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* // Menu with checkbox items and a nested submenu:
|
|
46
|
+
* <DropdownMenu>
|
|
47
|
+
* <DropdownMenuTrigger asChild><Button>View options</Button></DropdownMenuTrigger>
|
|
48
|
+
* <DropdownMenuContent>
|
|
49
|
+
* <DropdownMenuCheckboxItem checked={showPanel} onCheckedChange={setShowPanel}>
|
|
50
|
+
* Show side panel
|
|
51
|
+
* </DropdownMenuCheckboxItem>
|
|
52
|
+
* <DropdownMenuSeparator />
|
|
53
|
+
* <DropdownMenuSub>
|
|
54
|
+
* <DropdownMenuSubTrigger>More tools</DropdownMenuSubTrigger>
|
|
55
|
+
* <DropdownMenuSubContent>
|
|
56
|
+
* <DropdownMenuItem>Export CSV</DropdownMenuItem>
|
|
57
|
+
* <DropdownMenuItem>Export PDF</DropdownMenuItem>
|
|
58
|
+
* </DropdownMenuSubContent>
|
|
59
|
+
* </DropdownMenuSub>
|
|
60
|
+
* </DropdownMenuContent>
|
|
61
|
+
* </DropdownMenu>
|
|
62
|
+
*/
|
|
63
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
64
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
65
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
66
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
67
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
68
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
69
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
70
|
+
inset?: boolean;
|
|
71
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
72
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
74
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
75
|
+
inset?: boolean;
|
|
76
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
77
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
78
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
79
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
80
|
+
inset?: boolean;
|
|
81
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
82
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
83
|
+
declare const DropdownMenuShortcut: {
|
|
84
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
displayName: string;
|
|
86
|
+
};
|
|
87
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
88
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/ui/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,qBAAqB,MAAM,iCAAiC,CAAA;AAKxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,QAAA,MAAM,YAAY,mDAA6B,CAAA;AAE/C,QAAA,MAAM,mBAAmB,0HAAgC,CAAA;AAEzD,QAAA,MAAM,iBAAiB,qHAA8B,CAAA;AAErD,QAAA,MAAM,kBAAkB,yDAA+B,CAAA;AAEvD,QAAA,MAAM,eAAe,sDAA4B,CAAA;AAEjD,QAAA,MAAM,sBAAsB,0HAAmC,CAAA;AAE/D,QAAA,MAAM,sBAAsB;YAGhB,OAAO;wCAejB,CAAA;AAIF,QAAA,MAAM,sBAAsB,6KAY1B,CAAA;AAIF,QAAA,MAAM,mBAAmB,0KAgBvB,CAAA;AAGF,QAAA,MAAM,gBAAgB;YAGV,OAAO;wCAYjB,CAAA;AAGF,QAAA,MAAM,wBAAwB,+KAoB5B,CAAA;AAIF,QAAA,MAAM,qBAAqB,4KAmBzB,CAAA;AAGF,QAAA,MAAM,iBAAiB;YAGX,OAAO;wCAYjB,CAAA;AAGF,QAAA,MAAM,qBAAqB,4KASzB,CAAA;AAGF,QAAA,MAAM,oBAAoB;8BAGvB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAOvC,CAAA;AAGD,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAA"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { jsxs as i, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { Root as g, Group as h, Portal as l, RadioGroup as N, Sub as R, Trigger as D, CheckboxItem as m, ItemIndicator as p, Content as c, Item as u, Label as f, RadioItem as b, Separator as y, SubContent as w, SubTrigger as x } from "../primitives/react-dropdown-menu.js";
|
|
4
|
+
import { IconCheck as I, IconCircle as M, IconChevronRight as v } from "@tabler/icons-react";
|
|
5
|
+
import { cn as d } from "./lib/utils.js";
|
|
6
|
+
const E = g, F = D, H = h, J = l, K = R, O = N, S = r.forwardRef(({ className: e, inset: t, children: o, ...s }, n) => /* @__PURE__ */ i(
|
|
7
|
+
x,
|
|
8
|
+
{
|
|
9
|
+
ref: n,
|
|
10
|
+
className: d(
|
|
11
|
+
"flex cursor-default select-none items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-md outline-none focus:bg-layer-02 data-[state=open]:bg-layer-02 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
12
|
+
t && "pl-ds-07",
|
|
13
|
+
e
|
|
14
|
+
),
|
|
15
|
+
...s,
|
|
16
|
+
children: [
|
|
17
|
+
o,
|
|
18
|
+
/* @__PURE__ */ a(v, { className: "ml-auto" })
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
));
|
|
22
|
+
S.displayName = x.displayName;
|
|
23
|
+
const C = r.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a(
|
|
24
|
+
w,
|
|
25
|
+
{
|
|
26
|
+
ref: o,
|
|
27
|
+
className: d(
|
|
28
|
+
"z-dropdown min-w-[8rem] overflow-hidden rounded-ds-lg border border-border bg-layer-01 p-ds-02 text-text-primary shadow-03 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
29
|
+
e
|
|
30
|
+
),
|
|
31
|
+
...t
|
|
32
|
+
}
|
|
33
|
+
));
|
|
34
|
+
C.displayName = w.displayName;
|
|
35
|
+
const z = r.forwardRef(({ className: e, sideOffset: t = 4, ...o }, s) => /* @__PURE__ */ a(l, { children: /* @__PURE__ */ a(
|
|
36
|
+
c,
|
|
37
|
+
{
|
|
38
|
+
ref: s,
|
|
39
|
+
sideOffset: t,
|
|
40
|
+
className: d(
|
|
41
|
+
"z-dropdown min-w-[8rem] overflow-hidden rounded-ds-lg border border-border bg-layer-01 p-ds-02 text-text-primary shadow-03",
|
|
42
|
+
"duration-moderate-01 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
43
|
+
e
|
|
44
|
+
),
|
|
45
|
+
...o
|
|
46
|
+
}
|
|
47
|
+
) }));
|
|
48
|
+
z.displayName = c.displayName;
|
|
49
|
+
const k = r.forwardRef(({ className: e, inset: t, ...o }, s) => /* @__PURE__ */ a(
|
|
50
|
+
u,
|
|
51
|
+
{
|
|
52
|
+
ref: s,
|
|
53
|
+
className: d(
|
|
54
|
+
"relative flex cursor-default select-none items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-md outline-none transition-colors focus:bg-layer-02 focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-[0.38] [&>svg]:size-4 [&>svg]:shrink-0",
|
|
55
|
+
t && "pl-ds-07",
|
|
56
|
+
e
|
|
57
|
+
),
|
|
58
|
+
...o
|
|
59
|
+
}
|
|
60
|
+
));
|
|
61
|
+
k.displayName = u.displayName;
|
|
62
|
+
const G = r.forwardRef(({ className: e, children: t, checked: o, ...s }, n) => /* @__PURE__ */ i(
|
|
63
|
+
m,
|
|
64
|
+
{
|
|
65
|
+
ref: n,
|
|
66
|
+
className: d(
|
|
67
|
+
"relative flex cursor-default select-none items-center rounded-ds-md py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-none transition-colors focus:bg-layer-02 focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-[0.38]",
|
|
68
|
+
e
|
|
69
|
+
),
|
|
70
|
+
checked: o,
|
|
71
|
+
...s,
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ a("span", { className: "absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center", children: /* @__PURE__ */ a(p, { children: /* @__PURE__ */ a(I, { className: "h-ico-sm w-ico-sm" }) }) }),
|
|
74
|
+
t
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
));
|
|
78
|
+
G.displayName = m.displayName;
|
|
79
|
+
const T = r.forwardRef(({ className: e, children: t, ...o }, s) => /* @__PURE__ */ i(
|
|
80
|
+
b,
|
|
81
|
+
{
|
|
82
|
+
ref: s,
|
|
83
|
+
className: d(
|
|
84
|
+
"relative flex cursor-default select-none items-center rounded-ds-md py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-none transition-colors focus:bg-layer-02 focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-[0.38]",
|
|
85
|
+
e
|
|
86
|
+
),
|
|
87
|
+
...o,
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ a("span", { className: "absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center", children: /* @__PURE__ */ a(p, { children: /* @__PURE__ */ a(M, { className: "h-2 w-2 fill-current" }) }) }),
|
|
90
|
+
t
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
));
|
|
94
|
+
T.displayName = b.displayName;
|
|
95
|
+
const j = r.forwardRef(({ className: e, inset: t, ...o }, s) => /* @__PURE__ */ a(
|
|
96
|
+
f,
|
|
97
|
+
{
|
|
98
|
+
ref: s,
|
|
99
|
+
className: d(
|
|
100
|
+
"px-ds-03 py-ds-02b text-ds-md font-semibold",
|
|
101
|
+
t && "pl-ds-07",
|
|
102
|
+
e
|
|
103
|
+
),
|
|
104
|
+
...o
|
|
105
|
+
}
|
|
106
|
+
));
|
|
107
|
+
j.displayName = f.displayName;
|
|
108
|
+
const L = r.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a(
|
|
109
|
+
y,
|
|
110
|
+
{
|
|
111
|
+
ref: o,
|
|
112
|
+
className: d("-mx-1 my-ds-02 h-px bg-border-subtle", e),
|
|
113
|
+
...t
|
|
114
|
+
}
|
|
115
|
+
));
|
|
116
|
+
L.displayName = y.displayName;
|
|
117
|
+
const P = ({
|
|
118
|
+
className: e,
|
|
119
|
+
...t
|
|
120
|
+
}) => /* @__PURE__ */ a(
|
|
121
|
+
"span",
|
|
122
|
+
{
|
|
123
|
+
className: d("ml-auto text-ds-sm text-text-placeholder", e),
|
|
124
|
+
...t
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
P.displayName = "DropdownMenuShortcut";
|
|
128
|
+
export {
|
|
129
|
+
E as DropdownMenu,
|
|
130
|
+
G as DropdownMenuCheckboxItem,
|
|
131
|
+
z as DropdownMenuContent,
|
|
132
|
+
H as DropdownMenuGroup,
|
|
133
|
+
k as DropdownMenuItem,
|
|
134
|
+
j as DropdownMenuLabel,
|
|
135
|
+
J as DropdownMenuPortal,
|
|
136
|
+
O as DropdownMenuRadioGroup,
|
|
137
|
+
T as DropdownMenuRadioItem,
|
|
138
|
+
L as DropdownMenuSeparator,
|
|
139
|
+
P as DropdownMenuShortcut,
|
|
140
|
+
K as DropdownMenuSub,
|
|
141
|
+
C as DropdownMenuSubContent,
|
|
142
|
+
S as DropdownMenuSubTrigger,
|
|
143
|
+
F as DropdownMenuTrigger
|
|
144
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for FileUpload — a drag-and-drop file picker with client-side validation (type + size),
|
|
4
|
+
* an upload progress bar, and a compact inline mode.
|
|
5
|
+
*
|
|
6
|
+
* **Two modes:**
|
|
7
|
+
* - Default: large drop zone with an upload icon, label, and sublabel — good for primary upload areas.
|
|
8
|
+
* - `compact={true}`: a small inline button with an attachment icon — good for secondary/inline uploads.
|
|
9
|
+
*
|
|
10
|
+
* **Validation:** Pass `accept` (MIME or extension) and `maxSize` (bytes). Errors are shown inline.
|
|
11
|
+
* The `onFiles` callback only fires with valid files — invalid files are rejected with an error message.
|
|
12
|
+
*
|
|
13
|
+
* **`onFiles` required:** This is the only required prop. Integrating with a real uploader means
|
|
14
|
+
* calling your upload API from this callback and driving `uploading` + `progress` externally.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Avatar upload with image-only restriction:
|
|
18
|
+
* <FileUpload
|
|
19
|
+
* accept="image/*"
|
|
20
|
+
* maxSize={2 * 1024 * 1024}
|
|
21
|
+
* onFiles={(files) => uploadAvatar(files[0])}
|
|
22
|
+
* label="Upload profile photo"
|
|
23
|
+
* sublabel="PNG, JPG up to 2MB"
|
|
24
|
+
* />
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // Document multi-upload with progress:
|
|
28
|
+
* <FileUpload
|
|
29
|
+
* multiple
|
|
30
|
+
* accept=".pdf,.doc,.docx"
|
|
31
|
+
* uploading={isUploading}
|
|
32
|
+
* progress={uploadPercent}
|
|
33
|
+
* onFiles={handleFiles}
|
|
34
|
+
* />
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* // Compact inline attachment button in a comment form:
|
|
38
|
+
* <FileUpload compact onFiles={(files) => attachFiles(files)} label="Attach files" />
|
|
39
|
+
* // These are just a few ways — feel free to combine props creatively!
|
|
40
|
+
*/
|
|
41
|
+
export interface FileUploadProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onError'> {
|
|
42
|
+
/** Accepted file types (e.g., "image/*", ".pdf,.doc") */
|
|
43
|
+
accept?: string;
|
|
44
|
+
/** Max file size in bytes (default: 10MB) */
|
|
45
|
+
maxSize?: number;
|
|
46
|
+
/** Allow multiple files */
|
|
47
|
+
multiple?: boolean;
|
|
48
|
+
/** Currently uploading */
|
|
49
|
+
uploading?: boolean;
|
|
50
|
+
/** Upload progress (0-100) */
|
|
51
|
+
progress?: number;
|
|
52
|
+
/** Callback when files are selected/dropped */
|
|
53
|
+
onFiles: (files: File[]) => void;
|
|
54
|
+
/** Error message to display */
|
|
55
|
+
error?: string;
|
|
56
|
+
/** Compact mode (inline button instead of drop zone) */
|
|
57
|
+
compact?: boolean;
|
|
58
|
+
/** Disabled */
|
|
59
|
+
disabled?: boolean;
|
|
60
|
+
/** Custom label */
|
|
61
|
+
label?: string;
|
|
62
|
+
/** Custom sublabel */
|
|
63
|
+
sublabel?: string;
|
|
64
|
+
}
|
|
65
|
+
declare const FileUpload: React.ForwardRefExoticComponent<FileUploadProps & React.RefAttributes<HTMLDivElement>>;
|
|
66
|
+
export { FileUpload };
|
|
67
|
+
//# sourceMappingURL=file-upload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-upload.d.ts","sourceRoot":"","sources":["../../src/ui/file-upload.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC;IAC7D,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,+CAA+C;IAC/C,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAA;IAChC,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wDAAwD;IACxD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAuBD,QAAA,MAAM,UAAU,wFAyRf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { IconLoader2 as R, IconPaperclip as T, IconUpload as _ } from "@tabler/icons-react";
|
|
4
|
+
import { cn as h } from "./lib/utils.js";
|
|
5
|
+
const S = 10 * 1024 * 1024;
|
|
6
|
+
function V(t, i) {
|
|
7
|
+
return i.split(",").map((o) => o.trim()).some((o) => o.startsWith(".") ? t.name.toLowerCase().endsWith(o.toLowerCase()) : o.endsWith("/*") ? t.type.startsWith(o.slice(0, o.indexOf("/") + 1)) : t.type === o);
|
|
8
|
+
}
|
|
9
|
+
function $(t) {
|
|
10
|
+
return t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`;
|
|
11
|
+
}
|
|
12
|
+
const X = r.forwardRef(
|
|
13
|
+
({
|
|
14
|
+
accept: t,
|
|
15
|
+
maxSize: i = S,
|
|
16
|
+
multiple: o = !1,
|
|
17
|
+
uploading: l = !1,
|
|
18
|
+
progress: k = 0,
|
|
19
|
+
onFiles: C,
|
|
20
|
+
error: P,
|
|
21
|
+
compact: z = !1,
|
|
22
|
+
disabled: a = !1,
|
|
23
|
+
className: D,
|
|
24
|
+
label: p,
|
|
25
|
+
sublabel: B,
|
|
26
|
+
...w
|
|
27
|
+
}, N) => {
|
|
28
|
+
const v = r.useRef(null), [I, c] = r.useState(!1), [M, f] = r.useState(
|
|
29
|
+
null
|
|
30
|
+
), x = r.useRef(!1), b = r.useRef(!1), d = P || M, g = r.useCallback(() => {
|
|
31
|
+
var e;
|
|
32
|
+
a || l || (e = v.current) == null || e.click();
|
|
33
|
+
}, [a, l]), u = r.useCallback(
|
|
34
|
+
(e) => {
|
|
35
|
+
f(null);
|
|
36
|
+
for (const s of e) {
|
|
37
|
+
if (s.size > i) {
|
|
38
|
+
f(
|
|
39
|
+
`File "${s.name}" exceeds the maximum size of ${$(i)}`
|
|
40
|
+
);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (t && !V(s, t)) {
|
|
44
|
+
f(
|
|
45
|
+
`File "${s.name}" is not an accepted file type`
|
|
46
|
+
);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
C(e);
|
|
51
|
+
},
|
|
52
|
+
[i, t, C]
|
|
53
|
+
), A = r.useCallback(
|
|
54
|
+
(e) => {
|
|
55
|
+
b.current = !0;
|
|
56
|
+
const s = e.target.files;
|
|
57
|
+
!s || s.length === 0 || (u(Array.from(s)), e.target.value = "");
|
|
58
|
+
},
|
|
59
|
+
[u]
|
|
60
|
+
), F = r.useCallback(() => {
|
|
61
|
+
x.current = !0, b.current = !1;
|
|
62
|
+
}, []), E = r.useCallback(() => {
|
|
63
|
+
x.current && !b.current && t && f("File type is not accepted"), x.current = !1;
|
|
64
|
+
}, [t]), O = r.useCallback(
|
|
65
|
+
(e) => {
|
|
66
|
+
e.preventDefault(), e.stopPropagation(), !a && !l && c(!0);
|
|
67
|
+
},
|
|
68
|
+
[a, l]
|
|
69
|
+
), U = r.useCallback(
|
|
70
|
+
(e) => {
|
|
71
|
+
e.preventDefault(), e.stopPropagation(), !a && !l && c(!0);
|
|
72
|
+
},
|
|
73
|
+
[a, l]
|
|
74
|
+
), W = r.useCallback(
|
|
75
|
+
(e) => {
|
|
76
|
+
e.preventDefault(), e.stopPropagation(), c(!1);
|
|
77
|
+
},
|
|
78
|
+
[]
|
|
79
|
+
), j = r.useCallback(
|
|
80
|
+
(e) => {
|
|
81
|
+
if (e.preventDefault(), e.stopPropagation(), c(!1), a || l) return;
|
|
82
|
+
const s = e.dataTransfer.files;
|
|
83
|
+
!s || s.length === 0 || u(Array.from(s));
|
|
84
|
+
},
|
|
85
|
+
[a, l, u]
|
|
86
|
+
), L = p ?? "Drop files here or click to browse", K = B ?? `Max file size: ${$(i)}`, y = r.useId();
|
|
87
|
+
return z ? /* @__PURE__ */ m("div", { ref: N, className: h("inline-flex flex-col", D), ...w, children: [
|
|
88
|
+
/* @__PURE__ */ m(
|
|
89
|
+
"button",
|
|
90
|
+
{
|
|
91
|
+
type: "button",
|
|
92
|
+
onClick: g,
|
|
93
|
+
disabled: a,
|
|
94
|
+
className: h(
|
|
95
|
+
"inline-flex items-center gap-ds-02 rounded-ds-md px-ds-03 py-ds-02",
|
|
96
|
+
"text-[length:var(--font-size-sm)] font-medium",
|
|
97
|
+
"border border-border",
|
|
98
|
+
"bg-field text-text-secondary",
|
|
99
|
+
"hover:bg-interactive-subtle",
|
|
100
|
+
"disabled:opacity-[0.38] disabled:cursor-not-allowed",
|
|
101
|
+
"transition-colors"
|
|
102
|
+
),
|
|
103
|
+
children: [
|
|
104
|
+
l ? /* @__PURE__ */ n(R, { className: "h-ico-sm w-ico-sm animate-spin" }) : /* @__PURE__ */ n(T, { className: "h-ico-sm w-ico-sm" }),
|
|
105
|
+
p ?? "Attach files"
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ n(
|
|
110
|
+
"input",
|
|
111
|
+
{
|
|
112
|
+
ref: v,
|
|
113
|
+
id: y,
|
|
114
|
+
type: "file",
|
|
115
|
+
className: "sr-only",
|
|
116
|
+
style: { visibility: "hidden" },
|
|
117
|
+
"aria-hidden": "true",
|
|
118
|
+
"aria-label": p ?? "Attach files",
|
|
119
|
+
accept: t,
|
|
120
|
+
multiple: o,
|
|
121
|
+
disabled: a,
|
|
122
|
+
onChange: A,
|
|
123
|
+
onClick: F,
|
|
124
|
+
onFocus: E,
|
|
125
|
+
tabIndex: -1
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
d && /* @__PURE__ */ n(
|
|
129
|
+
"p",
|
|
130
|
+
{
|
|
131
|
+
role: "alert",
|
|
132
|
+
"aria-live": "polite",
|
|
133
|
+
className: "mt-ds-02 text-[length:var(--font-size-xs)] text-error",
|
|
134
|
+
children: d
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
] }) : /* @__PURE__ */ m(
|
|
138
|
+
"div",
|
|
139
|
+
{
|
|
140
|
+
ref: N,
|
|
141
|
+
...w,
|
|
142
|
+
role: "presentation",
|
|
143
|
+
className: h("flex flex-col", D),
|
|
144
|
+
"data-drag-active": I ? "true" : void 0,
|
|
145
|
+
onDragEnter: O,
|
|
146
|
+
onDragOver: U,
|
|
147
|
+
onDragLeave: W,
|
|
148
|
+
onDrop: j,
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ m(
|
|
151
|
+
"div",
|
|
152
|
+
{
|
|
153
|
+
role: "button",
|
|
154
|
+
tabIndex: 0,
|
|
155
|
+
"aria-disabled": a || void 0,
|
|
156
|
+
onClick: a ? void 0 : g,
|
|
157
|
+
onKeyDown: (e) => {
|
|
158
|
+
!a && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), g());
|
|
159
|
+
},
|
|
160
|
+
className: h(
|
|
161
|
+
"flex flex-col items-center justify-center gap-ds-03 rounded-ds-lg",
|
|
162
|
+
"border-2 border-dashed p-ds-08",
|
|
163
|
+
"transition-colors cursor-pointer",
|
|
164
|
+
"border-border bg-field",
|
|
165
|
+
I && "border-interactive bg-interactive-subtle",
|
|
166
|
+
a && "opacity-[0.38] cursor-not-allowed"
|
|
167
|
+
),
|
|
168
|
+
children: [
|
|
169
|
+
l ? /* @__PURE__ */ n(R, { className: "h-ds-sm w-ds-sm animate-spin text-icon-secondary" }) : /* @__PURE__ */ n(_, { className: "h-ds-sm w-ds-sm text-icon-secondary" }),
|
|
170
|
+
/* @__PURE__ */ n("span", { id: y + "-label", className: "text-ds-sm text-text-secondary", children: L }),
|
|
171
|
+
l ? /* @__PURE__ */ n("div", { className: "w-full max-w-xs", children: /* @__PURE__ */ n(
|
|
172
|
+
"div",
|
|
173
|
+
{
|
|
174
|
+
role: "progressbar",
|
|
175
|
+
"aria-valuenow": k,
|
|
176
|
+
"aria-valuemin": 0,
|
|
177
|
+
"aria-valuemax": 100,
|
|
178
|
+
className: "h-2 w-full overflow-hidden rounded-ds-full bg-field",
|
|
179
|
+
children: /* @__PURE__ */ n(
|
|
180
|
+
"div",
|
|
181
|
+
{
|
|
182
|
+
className: "h-full rounded-ds-full bg-interactive transition-all",
|
|
183
|
+
style: { width: `${k}%` }
|
|
184
|
+
}
|
|
185
|
+
)
|
|
186
|
+
}
|
|
187
|
+
) }) : /* @__PURE__ */ n("span", { className: "text-[length:var(--font-size-xs)] text-text-tertiary", children: K })
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
),
|
|
191
|
+
/* @__PURE__ */ n(
|
|
192
|
+
"input",
|
|
193
|
+
{
|
|
194
|
+
ref: v,
|
|
195
|
+
id: y,
|
|
196
|
+
type: "file",
|
|
197
|
+
className: "sr-only",
|
|
198
|
+
style: { visibility: "hidden" },
|
|
199
|
+
"aria-hidden": "true",
|
|
200
|
+
"aria-label": L,
|
|
201
|
+
accept: t,
|
|
202
|
+
multiple: o,
|
|
203
|
+
disabled: a,
|
|
204
|
+
onChange: A,
|
|
205
|
+
onClick: F,
|
|
206
|
+
onFocus: E,
|
|
207
|
+
tabIndex: -1
|
|
208
|
+
}
|
|
209
|
+
),
|
|
210
|
+
d && /* @__PURE__ */ n(
|
|
211
|
+
"p",
|
|
212
|
+
{
|
|
213
|
+
role: "alert",
|
|
214
|
+
className: "mt-ds-02 text-[length:var(--font-size-xs)] text-error",
|
|
215
|
+
children: d
|
|
216
|
+
}
|
|
217
|
+
)
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
X.displayName = "FileUpload";
|
|
224
|
+
export {
|
|
225
|
+
X as FileUpload
|
|
226
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type FormHelperState = 'helper' | 'error' | 'warning' | 'success';
|
|
3
|
+
type FormFieldContextValue = {
|
|
4
|
+
state: FormHelperState;
|
|
5
|
+
};
|
|
6
|
+
declare const FormFieldContext: React.Context<FormFieldContextValue>;
|
|
7
|
+
/**
|
|
8
|
+
* FormField — vertical flex container that provides validation state to children via React context.
|
|
9
|
+
*
|
|
10
|
+
* **Accessibility wiring:** The `helperTextId` prop is informational only — it is NOT automatically
|
|
11
|
+
* propagated to inputs. Use `getFormFieldA11y(id, state)` to wire `aria-describedby` manually.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* const helperTextId = 'email-error'
|
|
15
|
+
*
|
|
16
|
+
* <FormField state="error">
|
|
17
|
+
* <Label htmlFor="email">Email</Label>
|
|
18
|
+
* <Input
|
|
19
|
+
* id="email"
|
|
20
|
+
* state="error"
|
|
21
|
+
* {...getFormFieldA11y(helperTextId, 'error')}
|
|
22
|
+
* />
|
|
23
|
+
* <FormHelperText id={helperTextId} state="error">
|
|
24
|
+
* Please enter a valid email address.
|
|
25
|
+
* </FormHelperText>
|
|
26
|
+
* </FormField>
|
|
27
|
+
*/
|
|
28
|
+
export interface FormFieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
29
|
+
/**
|
|
30
|
+
* ID that will be placed on the `FormHelperText` element.
|
|
31
|
+
* Informational only — does NOT auto-wire `aria-describedby`.
|
|
32
|
+
* Use `getFormFieldA11y(helperTextId, state)` spread onto the Input instead.
|
|
33
|
+
*/
|
|
34
|
+
helperTextId?: string;
|
|
35
|
+
/** Current validation state — propagated to child `FormHelperText` via context */
|
|
36
|
+
state?: FormHelperState;
|
|
37
|
+
}
|
|
38
|
+
declare const FormField: React.ForwardRefExoticComponent<FormFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
export interface FormHelperTextProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
40
|
+
state?: FormHelperState;
|
|
41
|
+
}
|
|
42
|
+
declare const FormHelperText: React.ForwardRefExoticComponent<FormHelperTextProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
43
|
+
/**
|
|
44
|
+
* Helper to compute a11y attributes for form inputs.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* const a11y = getFormFieldA11y('email-error', 'error')
|
|
48
|
+
* <Input {...a11y} />
|
|
49
|
+
* // => { "aria-describedby": "email-error", "aria-invalid": true }
|
|
50
|
+
*/
|
|
51
|
+
declare function getFormFieldA11y(helperTextId?: string, state?: FormHelperState): {
|
|
52
|
+
'aria-describedby'?: string;
|
|
53
|
+
'aria-invalid'?: boolean;
|
|
54
|
+
};
|
|
55
|
+
export { FormField, FormFieldContext, FormHelperText, getFormFieldA11y };
|
|
56
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/ui/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAExE,KAAK,qBAAqB,GAAG;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,CAAA;AACvD,QAAA,MAAM,gBAAgB,sCAAkE,CAAA;AAExF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kFAAkF;IAClF,KAAK,CAAC,EAAE,eAAe,CAAA;CACxB;AAED,QAAA,MAAM,SAAS,uFAUd,CAAA;AAMD,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;IACrF,KAAK,CAAC,EAAE,eAAe,CAAA;CACxB;AASD,QAAA,MAAM,cAAc,kGAcnB,CAAA;AAGD;;;;;;;GAOG;AACH,iBAAS,gBAAgB,CACvB,YAAY,CAAC,EAAE,MAAM,EACrB,KAAK,CAAC,EAAE,eAAe,GACtB;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,OAAO,CAAA;CAAE,CAK3D;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAA"}
|
package/dist/ui/form.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { cn as n } from "./lib/utils.js";
|
|
4
|
+
const c = r.createContext({ state: "helper" }), x = r.forwardRef(
|
|
5
|
+
({ className: e, helperTextId: t, state: o = "helper", ...s }, a) => /* @__PURE__ */ l(c.Provider, { value: { state: o }, children: /* @__PURE__ */ l(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
ref: a,
|
|
9
|
+
className: n("flex flex-col gap-ds-02", e),
|
|
10
|
+
...s
|
|
11
|
+
}
|
|
12
|
+
) })
|
|
13
|
+
);
|
|
14
|
+
x.displayName = "FormField";
|
|
15
|
+
const d = {
|
|
16
|
+
helper: "text-text-helper",
|
|
17
|
+
error: "text-text-error",
|
|
18
|
+
warning: "text-text-warning",
|
|
19
|
+
success: "text-text-success"
|
|
20
|
+
}, m = r.forwardRef(
|
|
21
|
+
({ className: e, state: t, ...o }, s) => {
|
|
22
|
+
const a = r.useContext(c), i = t ?? a.state;
|
|
23
|
+
return /* @__PURE__ */ l(
|
|
24
|
+
"p",
|
|
25
|
+
{
|
|
26
|
+
ref: s,
|
|
27
|
+
role: i === "error" ? "alert" : void 0,
|
|
28
|
+
className: n("text-ds-sm", d[i], e),
|
|
29
|
+
...o
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
m.displayName = "FormHelperText";
|
|
35
|
+
function F(e, t) {
|
|
36
|
+
return {
|
|
37
|
+
...e ? { "aria-describedby": e } : {},
|
|
38
|
+
...t === "error" ? { "aria-invalid": !0 } : {}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
x as FormField,
|
|
43
|
+
c as FormFieldContext,
|
|
44
|
+
m as FormHelperText,
|
|
45
|
+
F as getFormFieldA11y
|
|
46
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as HoverCardPrimitive from '@primitives/react-hover-card';
|
|
3
|
+
declare const HoverCard: React.FC<HoverCardPrimitive.HoverCardProps>;
|
|
4
|
+
declare const HoverCardTrigger: React.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
5
|
+
declare const HoverCardContent: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
7
|
+
//# sourceMappingURL=hover-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../src/ui/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,kBAAkB,MAAM,8BAA8B,CAAA;AAIlE,QAAA,MAAM,SAAS,6CAA0B,CAAA;AAEzC,QAAA,MAAM,gBAAgB,oHAA6B,CAAA;AAEnD,QAAA,MAAM,gBAAgB,oKAgBpB,CAAA;AAGF,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
|