@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,44 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type SearchInputSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
/**
|
|
4
|
+
* Props for SearchInput — a search field with a built-in leading magnifier icon, optional loading
|
|
5
|
+
* spinner, and an auto-shown clear button when `value` is non-empty and `onClear` is provided.
|
|
6
|
+
*
|
|
7
|
+
* **Important:** Use `inputSize` (not `size`) to control height — `size` is reserved for the HTML
|
|
8
|
+
* attribute. Options: `'sm'` | `'md'` (default) | `'lg'`.
|
|
9
|
+
*
|
|
10
|
+
* **Clear button:** Appears automatically when `value !== ''` and `onClear` is provided.
|
|
11
|
+
* When `loading` is true, a spinning loader replaces the clear button.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // Controlled search with clear:
|
|
15
|
+
* <SearchInput
|
|
16
|
+
* value={query}
|
|
17
|
+
* onChange={(e) => setQuery(e.target.value)}
|
|
18
|
+
* onClear={() => setQuery('')}
|
|
19
|
+
* placeholder="Search tasks..."
|
|
20
|
+
* />
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // Async search with loading state while fetching results:
|
|
24
|
+
* <SearchInput
|
|
25
|
+
* value={query}
|
|
26
|
+
* onChange={handleSearch}
|
|
27
|
+
* loading={isSearching}
|
|
28
|
+
* placeholder="Search clients..."
|
|
29
|
+
* />
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* // Compact search bar in a toolbar:
|
|
33
|
+
* <SearchInput inputSize="sm" value={q} onChange={(e) => setQ(e.target.value)} onClear={() => setQ('')} />
|
|
34
|
+
* // These are just a few ways — feel free to combine props creatively!
|
|
35
|
+
*/
|
|
36
|
+
export interface SearchInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
37
|
+
onClear?: () => void;
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
/** @default 'md' */
|
|
40
|
+
inputSize?: SearchInputSize;
|
|
41
|
+
}
|
|
42
|
+
declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
43
|
+
export { SearchInput };
|
|
44
|
+
//# sourceMappingURL=search-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-input.d.ts","sourceRoot":"","sources":["../../src/ui/search-input.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,KAAK,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAQzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IACnF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,oBAAoB;IACpB,SAAS,CAAC,EAAE,eAAe,CAAA;CAC5B;AAED,QAAA,MAAM,WAAW,2FA8ChB,CAAA;AAGD,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { IconSearch as c, IconLoader2 as m, IconX as u } from "@tabler/icons-react";
|
|
3
|
+
import * as h from "react";
|
|
4
|
+
import { cn as p } from "./lib/utils.js";
|
|
5
|
+
const f = {
|
|
6
|
+
sm: "h-ds-sm text-ds-sm pl-ds-08 pr-ds-07",
|
|
7
|
+
md: "h-ds-md text-ds-md pl-10 pr-9",
|
|
8
|
+
lg: "h-ds-lg text-ds-lg pl-12 pr-10"
|
|
9
|
+
}, b = h.forwardRef(
|
|
10
|
+
({ className: o, value: t, onClear: r, loading: s, inputSize: i = "md", ...a }, d) => {
|
|
11
|
+
const l = t !== void 0 && t !== "";
|
|
12
|
+
return /* @__PURE__ */ n("div", { className: "relative flex items-center", children: [
|
|
13
|
+
/* @__PURE__ */ e(
|
|
14
|
+
c,
|
|
15
|
+
{
|
|
16
|
+
className: "absolute left-3 h-ico-md w-ico-md text-text-secondary pointer-events-none",
|
|
17
|
+
"aria-hidden": "true"
|
|
18
|
+
}
|
|
19
|
+
),
|
|
20
|
+
/* @__PURE__ */ e(
|
|
21
|
+
"input",
|
|
22
|
+
{
|
|
23
|
+
ref: d,
|
|
24
|
+
value: t,
|
|
25
|
+
"aria-busy": s,
|
|
26
|
+
className: p(
|
|
27
|
+
"flex w-full font-sans",
|
|
28
|
+
f[i],
|
|
29
|
+
"bg-field text-text-primary",
|
|
30
|
+
"border border-border rounded-ds-md",
|
|
31
|
+
"placeholder:text-text-placeholder",
|
|
32
|
+
"hover:bg-field-hover",
|
|
33
|
+
"transition-colors duration-fast-01",
|
|
34
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:border-border-interactive",
|
|
35
|
+
"disabled:cursor-not-allowed disabled:opacity-[0.38]",
|
|
36
|
+
o
|
|
37
|
+
),
|
|
38
|
+
...a
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
s ? /* @__PURE__ */ e(
|
|
42
|
+
m,
|
|
43
|
+
{
|
|
44
|
+
className: "absolute right-3 h-ico-md w-ico-md text-text-secondary animate-spin pointer-events-none",
|
|
45
|
+
"aria-hidden": "true"
|
|
46
|
+
}
|
|
47
|
+
) : l && r ? /* @__PURE__ */ e(
|
|
48
|
+
"button",
|
|
49
|
+
{
|
|
50
|
+
type: "button",
|
|
51
|
+
onClick: r,
|
|
52
|
+
className: "absolute right-3 rounded-ds-full h-ico-md w-ico-md flex items-center justify-center text-text-secondary hover:text-text-primary hover:bg-layer-02 transition-colors",
|
|
53
|
+
"aria-label": "Clear search",
|
|
54
|
+
children: /* @__PURE__ */ e(u, { className: "h-ico-sm w-ico-sm" })
|
|
55
|
+
}
|
|
56
|
+
) : null
|
|
57
|
+
] });
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
b.displayName = "SearchInput";
|
|
61
|
+
export {
|
|
62
|
+
b as SearchInput
|
|
63
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
declare const segmentedControlItemVariants: (props?: ({
|
|
3
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
4
|
+
color?: "filled" | "tonal" | null | undefined;
|
|
5
|
+
selected?: boolean | null | undefined;
|
|
6
|
+
isHovered?: boolean | null | undefined;
|
|
7
|
+
isDisabled?: boolean | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export type SegmentedControlSize = 'sm' | 'md' | 'lg' | 'small' | 'medium' | 'big';
|
|
10
|
+
export type SegmentedControlColor = 'filled' | 'tonal';
|
|
11
|
+
/**
|
|
12
|
+
* A single option in a `<SegmentedControl>`. The `id` must be unique across all options in
|
|
13
|
+
* the same control — it is used as the selection key for `selectedId` and `onSelect`.
|
|
14
|
+
*/
|
|
15
|
+
export interface SegmentedControlOption {
|
|
16
|
+
id: string;
|
|
17
|
+
text: string;
|
|
18
|
+
/** Optional icon component rendered before the text label. */
|
|
19
|
+
icon?: React.ComponentType<{
|
|
20
|
+
className?: string;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Props for SegmentedControl — a pill-shaped tab-row for mutually exclusive option selection,
|
|
25
|
+
* similar to a radio group but styled as a single connected control.
|
|
26
|
+
*
|
|
27
|
+
* **`size`:** `'sm'` | `'md'` (default) | `'lg'`. Legacy aliases `'small'` | `'medium'` | `'big'` are
|
|
28
|
+
* also accepted for backward compatibility but prefer the canonical form.
|
|
29
|
+
*
|
|
30
|
+
* **`color`:** `'tonal'` (default, subdued) | `'filled'` (vibrant brand color when selected).
|
|
31
|
+
*
|
|
32
|
+
* **Options:** Each option needs a unique `id`, a display `text`, and an optional `icon` component.
|
|
33
|
+
*
|
|
34
|
+
* **Controlled only:** `selectedId` + `onSelect` are required. There is no uncontrolled mode.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* // View mode switcher (list vs grid vs board):
|
|
38
|
+
* <SegmentedControl
|
|
39
|
+
* size="md"
|
|
40
|
+
* color="tonal"
|
|
41
|
+
* options={[
|
|
42
|
+
* { id: 'list', text: 'List' },
|
|
43
|
+
* { id: 'grid', text: 'Grid' },
|
|
44
|
+
* { id: 'board', text: 'Board' },
|
|
45
|
+
* ]}
|
|
46
|
+
* selectedId={viewMode}
|
|
47
|
+
* onSelect={setViewMode}
|
|
48
|
+
* />
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* // Time range selector with filled color (more prominent):
|
|
52
|
+
* <SegmentedControl
|
|
53
|
+
* size="sm"
|
|
54
|
+
* color="filled"
|
|
55
|
+
* options={[
|
|
56
|
+
* { id: '7d', text: '7D' },
|
|
57
|
+
* { id: '30d', text: '30D' },
|
|
58
|
+
* { id: '90d', text: '90D' },
|
|
59
|
+
* ]}
|
|
60
|
+
* selectedId={range}
|
|
61
|
+
* onSelect={setRange}
|
|
62
|
+
* />
|
|
63
|
+
* // These are just a few ways — feel free to combine props creatively!
|
|
64
|
+
*/
|
|
65
|
+
export interface SegmentedControlProps {
|
|
66
|
+
size: SegmentedControlSize;
|
|
67
|
+
color: SegmentedControlColor;
|
|
68
|
+
options: SegmentedControlOption[];
|
|
69
|
+
selectedId: string;
|
|
70
|
+
onSelect: (id: string) => void;
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
className?: string;
|
|
73
|
+
}
|
|
74
|
+
declare const SegmentedControl: React.ForwardRefExoticComponent<SegmentedControlProps & React.RefAttributes<HTMLDivElement>>;
|
|
75
|
+
/**
|
|
76
|
+
* Props for SegmentedControlItem — the individual button segment within a `<SegmentedControl>`.
|
|
77
|
+
* Normally you don't use this directly; compose via `<SegmentedControl options={...} />` instead.
|
|
78
|
+
* Use `SegmentedControlItem` directly only when building a fully custom segmented tab row.
|
|
79
|
+
*
|
|
80
|
+
* **Note:** `isFocused`, `onFocus`, and `onBlur` are managed by the parent `SegmentedControl`.
|
|
81
|
+
* You must wire them yourself when using the item standalone.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* // Standalone custom segmented row (without parent SegmentedControl):
|
|
85
|
+
* const [view, setView] = useState<'list' | 'grid'>('list')
|
|
86
|
+
* const [focused, setFocused] = useState<string | null>(null)
|
|
87
|
+
*
|
|
88
|
+
* <div role="tablist" className="inline-flex rounded-full border border-border bg-layer-02">
|
|
89
|
+
* <SegmentedControlItem
|
|
90
|
+
* size="md" color="tonal" text="List"
|
|
91
|
+
* isSelected={view === 'list'} isFocused={focused === 'list'}
|
|
92
|
+
* onClick={() => setView('list')}
|
|
93
|
+
* onFocus={() => setFocused('list')} onBlur={() => setFocused(null)}
|
|
94
|
+
* />
|
|
95
|
+
* <SegmentedControlItem
|
|
96
|
+
* size="md" color="tonal" text="Grid" icon={IconLayoutGrid}
|
|
97
|
+
* isSelected={view === 'grid'} isFocused={focused === 'grid'}
|
|
98
|
+
* onClick={() => setView('grid')}
|
|
99
|
+
* onFocus={() => setFocused('grid')} onBlur={() => setFocused(null)}
|
|
100
|
+
* />
|
|
101
|
+
* </div>
|
|
102
|
+
*
|
|
103
|
+
* // These are just a few ways — feel free to combine props creatively!
|
|
104
|
+
*/
|
|
105
|
+
export interface SegmentedControlItemProps {
|
|
106
|
+
size: 'sm' | 'md' | 'lg';
|
|
107
|
+
color: SegmentedControlColor;
|
|
108
|
+
text: string;
|
|
109
|
+
/** Optional icon component rendered before the text label. */
|
|
110
|
+
icon?: React.ComponentType<{
|
|
111
|
+
className?: string;
|
|
112
|
+
}>;
|
|
113
|
+
isSelected: boolean;
|
|
114
|
+
onClick: () => void;
|
|
115
|
+
disabled?: boolean;
|
|
116
|
+
isFocused: boolean;
|
|
117
|
+
onFocus: () => void;
|
|
118
|
+
onBlur: () => void;
|
|
119
|
+
}
|
|
120
|
+
declare const SegmentedControlItem: React.ForwardRefExoticComponent<SegmentedControlItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
121
|
+
export { SegmentedControl, SegmentedControlItem, segmentedControlItemVariants };
|
|
122
|
+
//# sourceMappingURL=segmented-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-control.d.ts","sourceRoot":"","sources":["../../src/ui/segmented-control.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2B,MAAM,OAAO,CAAA;AAM/C,QAAA,MAAM,4BAA4B;;;;;;8EAuGjC,CAAA;AAqBD,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;AAClF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEtD;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,8DAA8D;IAC9D,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACnD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,oBAAoB,CAAA;IAC1B,KAAK,EAAE,qBAAqB,CAAA;IAC5B,OAAO,EAAE,sBAAsB,EAAE,CAAA;IACjC,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAGD,QAAA,MAAM,gBAAgB,8FAoFrB,CAAA;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACxB,KAAK,EAAE,qBAAqB,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,8DAA8D;IAC9D,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAClD,UAAU,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED,QAAA,MAAM,oBAAoB,qGA0FzB,CAAA;AAGD,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,CAAA"}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { jsx as u, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import w, { useState as D, useRef as M } from "react";
|
|
3
|
+
import { cva as S } from "class-variance-authority";
|
|
4
|
+
import { cn as N } from "./lib/utils.js";
|
|
5
|
+
import { useRipple as I } from "./lib/use-ripple.js";
|
|
6
|
+
const z = S(
|
|
7
|
+
[
|
|
8
|
+
"inline-flex items-center gap-ds-03 rounded-ds-full border-none outline-none cursor-pointer",
|
|
9
|
+
"transition-[color,background-color,border-color,box-shadow] duration-moderate-02 ease-productive-standard",
|
|
10
|
+
"relative overflow-hidden",
|
|
11
|
+
"font-accent font-semibold leading-none text-center",
|
|
12
|
+
"bg-layer-01",
|
|
13
|
+
"text-text-tertiary",
|
|
14
|
+
"first:rounded-tr-none first:rounded-br-none",
|
|
15
|
+
"last:rounded-tl-none last:rounded-bl-none"
|
|
16
|
+
],
|
|
17
|
+
{
|
|
18
|
+
variants: {
|
|
19
|
+
size: {
|
|
20
|
+
sm: "h-ds-sm-plus px-ds-05 py-ds-03 text-ds-sm",
|
|
21
|
+
md: "px-ds-02b py-ds-03 pl-ds-04 text-ds-md",
|
|
22
|
+
lg: "h-14 px-ds-06 py-ds-05 text-ds-md"
|
|
23
|
+
},
|
|
24
|
+
color: {
|
|
25
|
+
filled: "text-text-on-color [text-shadow:0px_1px_1px_var(--color-text-shadow)]",
|
|
26
|
+
tonal: "text-text-tertiary"
|
|
27
|
+
},
|
|
28
|
+
selected: {
|
|
29
|
+
true: "",
|
|
30
|
+
false: ""
|
|
31
|
+
},
|
|
32
|
+
isHovered: {
|
|
33
|
+
true: "",
|
|
34
|
+
false: ""
|
|
35
|
+
},
|
|
36
|
+
isDisabled: {
|
|
37
|
+
true: "cursor-not-allowed pointer-events-none border-none shadow-none [text-shadow:none]",
|
|
38
|
+
false: ""
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
compoundVariants: [
|
|
42
|
+
// Selected + filled
|
|
43
|
+
{
|
|
44
|
+
selected: !0,
|
|
45
|
+
color: "filled",
|
|
46
|
+
className: [
|
|
47
|
+
"bg-interactive",
|
|
48
|
+
"shadow-[0px_1px_3px_0.05px_var(--color-interactive-hover),inset_0px_8px_16px_0px_var(--color-inset-glow-strong),inset_0px_2px_0px_0px_var(--color-inset-glow-subtle)]"
|
|
49
|
+
].join(" ")
|
|
50
|
+
},
|
|
51
|
+
// Selected + tonal
|
|
52
|
+
{
|
|
53
|
+
selected: !0,
|
|
54
|
+
color: "tonal",
|
|
55
|
+
className: "bg-field !text-text-primary"
|
|
56
|
+
},
|
|
57
|
+
// Hover + filled
|
|
58
|
+
{
|
|
59
|
+
isHovered: !0,
|
|
60
|
+
color: "filled",
|
|
61
|
+
className: [
|
|
62
|
+
"bg-interactive",
|
|
63
|
+
"shadow-[0px_4px_8px_0px_var(--color-interactive-hover),0px_1px_3px_0.05px_var(--color-layer-02),inset_0px_8px_16px_0px_var(--color-inset-glow-strong),inset_0px_2px_0px_0px_var(--color-inset-glow-subtle)]"
|
|
64
|
+
].join(" ")
|
|
65
|
+
},
|
|
66
|
+
// Hover + tonal
|
|
67
|
+
{
|
|
68
|
+
isHovered: !0,
|
|
69
|
+
color: "tonal",
|
|
70
|
+
className: "text-text-primary"
|
|
71
|
+
},
|
|
72
|
+
// Disabled + filled
|
|
73
|
+
{
|
|
74
|
+
isDisabled: !0,
|
|
75
|
+
color: "filled",
|
|
76
|
+
className: "text-text-placeholder"
|
|
77
|
+
},
|
|
78
|
+
// Disabled + tonal
|
|
79
|
+
{
|
|
80
|
+
isDisabled: !0,
|
|
81
|
+
color: "tonal",
|
|
82
|
+
className: "text-text-placeholder"
|
|
83
|
+
},
|
|
84
|
+
// Filled + SVG icon fill
|
|
85
|
+
{
|
|
86
|
+
color: "filled",
|
|
87
|
+
className: "[&_svg_path]:fill-icon-on-color"
|
|
88
|
+
},
|
|
89
|
+
// Filled + disabled SVG icon fill
|
|
90
|
+
{
|
|
91
|
+
color: "filled",
|
|
92
|
+
isDisabled: !0,
|
|
93
|
+
className: "[&_svg_path]:fill-icon-disabled"
|
|
94
|
+
},
|
|
95
|
+
// Medium size last-child padding flip
|
|
96
|
+
{
|
|
97
|
+
size: "md",
|
|
98
|
+
className: "last:pl-ds-02b last:pr-ds-04"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
defaultVariants: {
|
|
102
|
+
size: "md",
|
|
103
|
+
color: "tonal",
|
|
104
|
+
selected: !1,
|
|
105
|
+
isHovered: !1,
|
|
106
|
+
isDisabled: !1
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
), H = {
|
|
110
|
+
filled: "bg-surface-overlay-light",
|
|
111
|
+
tonal: "bg-surface-overlay-dark"
|
|
112
|
+
}, R = {
|
|
113
|
+
small: "sm",
|
|
114
|
+
medium: "md",
|
|
115
|
+
big: "lg"
|
|
116
|
+
};
|
|
117
|
+
function j(p) {
|
|
118
|
+
return R[p] ?? p;
|
|
119
|
+
}
|
|
120
|
+
const E = w.forwardRef(
|
|
121
|
+
function({
|
|
122
|
+
size: h,
|
|
123
|
+
color: x,
|
|
124
|
+
options: o,
|
|
125
|
+
selectedId: m,
|
|
126
|
+
onSelect: d,
|
|
127
|
+
disabled: f = !1,
|
|
128
|
+
className: t = ""
|
|
129
|
+
}, s) {
|
|
130
|
+
const b = j(h), [_, i] = D(null), v = M(null), a = w.useCallback((e) => {
|
|
131
|
+
v.current = e, typeof s == "function" ? s(e) : s && (s.current = e);
|
|
132
|
+
}, [s]), y = (e) => {
|
|
133
|
+
if (f) return;
|
|
134
|
+
const r = o.findIndex((g) => g.id === _);
|
|
135
|
+
let l = r;
|
|
136
|
+
switch (e.key) {
|
|
137
|
+
case "ArrowLeft":
|
|
138
|
+
e.preventDefault(), l = r > 0 ? r - 1 : o.length - 1;
|
|
139
|
+
break;
|
|
140
|
+
case "ArrowRight":
|
|
141
|
+
e.preventDefault(), l = r < o.length - 1 ? r + 1 : 0;
|
|
142
|
+
break;
|
|
143
|
+
case "Home":
|
|
144
|
+
e.preventDefault(), l = 0;
|
|
145
|
+
break;
|
|
146
|
+
case "End":
|
|
147
|
+
e.preventDefault(), l = o.length - 1;
|
|
148
|
+
break;
|
|
149
|
+
default:
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const c = o[l];
|
|
153
|
+
i(c.id), d(c.id);
|
|
154
|
+
};
|
|
155
|
+
return /* @__PURE__ */ u(
|
|
156
|
+
"div",
|
|
157
|
+
{
|
|
158
|
+
ref: a,
|
|
159
|
+
className: N(
|
|
160
|
+
"inline-flex gap-0 p-0 rounded-ds-full",
|
|
161
|
+
"bg-layer-02",
|
|
162
|
+
"border border-solid border-border",
|
|
163
|
+
t
|
|
164
|
+
),
|
|
165
|
+
role: "tablist",
|
|
166
|
+
onKeyDown: y,
|
|
167
|
+
tabIndex: 0,
|
|
168
|
+
"aria-label": "Segmented control options",
|
|
169
|
+
children: o.map((e) => /* @__PURE__ */ u(
|
|
170
|
+
k,
|
|
171
|
+
{
|
|
172
|
+
size: b,
|
|
173
|
+
color: x,
|
|
174
|
+
text: e.text,
|
|
175
|
+
icon: e.icon,
|
|
176
|
+
isSelected: e.id === m,
|
|
177
|
+
onClick: () => d(e.id),
|
|
178
|
+
disabled: f,
|
|
179
|
+
isFocused: e.id === _,
|
|
180
|
+
onFocus: () => i(e.id),
|
|
181
|
+
onBlur: () => i(null)
|
|
182
|
+
},
|
|
183
|
+
e.id
|
|
184
|
+
))
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
E.displayName = "SegmentedControl";
|
|
190
|
+
const k = w.forwardRef(
|
|
191
|
+
function({
|
|
192
|
+
size: h,
|
|
193
|
+
color: x,
|
|
194
|
+
text: o,
|
|
195
|
+
icon: m,
|
|
196
|
+
isSelected: d,
|
|
197
|
+
onClick: f,
|
|
198
|
+
disabled: t = !1,
|
|
199
|
+
isFocused: s,
|
|
200
|
+
onFocus: b,
|
|
201
|
+
onBlur: _
|
|
202
|
+
}, i) {
|
|
203
|
+
const [v, a] = D("default"), { ripples: y, createRipple: e } = I(), r = () => {
|
|
204
|
+
!t && !s && a("hover");
|
|
205
|
+
}, l = () => {
|
|
206
|
+
t || a("default");
|
|
207
|
+
}, c = () => {
|
|
208
|
+
t || a("pressed");
|
|
209
|
+
}, g = () => {
|
|
210
|
+
t || a("hover");
|
|
211
|
+
};
|
|
212
|
+
return /* @__PURE__ */ C(
|
|
213
|
+
"button",
|
|
214
|
+
{
|
|
215
|
+
ref: i,
|
|
216
|
+
className: N(
|
|
217
|
+
z({
|
|
218
|
+
size: h,
|
|
219
|
+
color: x,
|
|
220
|
+
selected: d,
|
|
221
|
+
isHovered: v === "hover",
|
|
222
|
+
isDisabled: t
|
|
223
|
+
})
|
|
224
|
+
),
|
|
225
|
+
onClick: (n) => {
|
|
226
|
+
e(n), f();
|
|
227
|
+
},
|
|
228
|
+
disabled: t,
|
|
229
|
+
type: "button",
|
|
230
|
+
role: "tab",
|
|
231
|
+
"aria-selected": d,
|
|
232
|
+
"aria-disabled": t,
|
|
233
|
+
onMouseEnter: r,
|
|
234
|
+
onMouseLeave: l,
|
|
235
|
+
onMouseDown: c,
|
|
236
|
+
onMouseUp: g,
|
|
237
|
+
onTouchStart: c,
|
|
238
|
+
onTouchEnd: g,
|
|
239
|
+
onFocus: b,
|
|
240
|
+
onBlur: _,
|
|
241
|
+
children: [
|
|
242
|
+
y.map((n) => /* @__PURE__ */ u(
|
|
243
|
+
"span",
|
|
244
|
+
{
|
|
245
|
+
className: N(
|
|
246
|
+
"absolute rounded-ds-full -translate-x-1/2 -translate-y-1/2 scale-0 animate-ripple pointer-events-none",
|
|
247
|
+
H[x]
|
|
248
|
+
),
|
|
249
|
+
style: {
|
|
250
|
+
left: n.x,
|
|
251
|
+
top: n.y,
|
|
252
|
+
width: n.size,
|
|
253
|
+
height: n.size
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
n.id
|
|
257
|
+
)),
|
|
258
|
+
m && /* @__PURE__ */ u(m, { className: "h-ico-sm w-ico-sm shrink-0" }),
|
|
259
|
+
/* @__PURE__ */ u("span", { className: "font-accent leading-none", children: o })
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
);
|
|
265
|
+
k.displayName = "SegmentedControlItem";
|
|
266
|
+
export {
|
|
267
|
+
E as SegmentedControl,
|
|
268
|
+
k as SegmentedControlItem,
|
|
269
|
+
z as segmentedControlItemVariants
|
|
270
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as SelectPrimitive from '@primitives/react-select';
|
|
4
|
+
/**
|
|
5
|
+
* Select root — manages open/close state and selected value.
|
|
6
|
+
*
|
|
7
|
+
* **Important:** `size` is NOT a prop on `Select`. Set it on `SelectTrigger` instead.
|
|
8
|
+
* Passing `size` directly to `Select` produces no TypeScript error but has no effect.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // CORRECT — size goes on SelectTrigger:
|
|
12
|
+
* <Select onValueChange={setValue}>
|
|
13
|
+
* <SelectTrigger size="lg">
|
|
14
|
+
* <SelectValue placeholder="Choose..." />
|
|
15
|
+
* </SelectTrigger>
|
|
16
|
+
* <SelectContent>
|
|
17
|
+
* <SelectItem value="a">Option A</SelectItem>
|
|
18
|
+
* <SelectItem value="b">Option B</SelectItem>
|
|
19
|
+
* </SelectContent>
|
|
20
|
+
* </Select>
|
|
21
|
+
*
|
|
22
|
+
* // WRONG — size on Select root is silently ignored (no TypeScript error):
|
|
23
|
+
* // <Select size="lg">...</Select>
|
|
24
|
+
*/
|
|
25
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
26
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
28
|
+
export declare const selectTriggerVariants: (props?: ({
|
|
29
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
30
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
31
|
+
/**
|
|
32
|
+
* Props for SelectTrigger. Use `size` here (not on the `Select` root).
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* <SelectTrigger size="lg" className="w-[200px]">
|
|
36
|
+
* <SelectValue placeholder="Select an option" />
|
|
37
|
+
* </SelectTrigger>
|
|
38
|
+
*/
|
|
39
|
+
export interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, VariantProps<typeof selectTriggerVariants> {
|
|
40
|
+
}
|
|
41
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
42
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
44
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
48
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
49
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/ui/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAA;AAE3D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,MAAM,uCAAuB,CAAA;AAEnC,QAAA,MAAM,WAAW,yGAAwB,CAAA;AAEzC,QAAA,MAAM,WAAW,0GAAwB,CAAA;AAEzC,eAAO,MAAM,qBAAqB;;8EAYjC,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,EACpE,YAAY,CAAC,OAAO,qBAAqB,CAAC;CAAG;AAEjD,QAAA,MAAM,aAAa,8FAcjB,CAAA;AAGF,QAAA,MAAM,oBAAoB,qKAcxB,CAAA;AAGF,QAAA,MAAM,sBAAsB,uKAc1B,CAAA;AAIF,QAAA,MAAM,aAAa,8JA6BjB,CAAA;AAGF,QAAA,MAAM,WAAW,4JASf,CAAA;AAGF,QAAA,MAAM,UAAU,2JAmBd,CAAA;AAGF,QAAA,MAAM,eAAe,gKASnB,CAAA;AAGF,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAA"}
|