@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,145 @@
|
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { Root as N, Group as C, Portal as l, RadioGroup as g, Sub as w, Trigger as R, CheckboxItem as m, ItemIndicator as c, Content as p, Item as u, Label as f, RadioItem as x, Separator as b, SubContent as y, SubTrigger as h } from "../primitives/react-context-menu.js";
|
|
4
|
+
import { IconCheck as I, IconCircle as M, IconChevronRight as S } from "@tabler/icons-react";
|
|
5
|
+
import { cn as d } from "./lib/utils.js";
|
|
6
|
+
const F = N, H = R, J = C, K = l, O = w, Q = g, v = n.forwardRef(({ className: e, inset: t, children: a, ...s }, r) => /* @__PURE__ */ i(
|
|
7
|
+
h,
|
|
8
|
+
{
|
|
9
|
+
ref: r,
|
|
10
|
+
className: d(
|
|
11
|
+
"flex cursor-default select-none items-center rounded-ds-md px-ds-03 py-ds-02b text-ds-md outline-none focus:bg-layer-02 focus:text-text-primary data-[state=open]:bg-layer-02 data-[state=open]:text-text-primary",
|
|
12
|
+
t && "pl-ds-07",
|
|
13
|
+
e
|
|
14
|
+
),
|
|
15
|
+
...s,
|
|
16
|
+
children: [
|
|
17
|
+
a,
|
|
18
|
+
/* @__PURE__ */ o(S, { className: "ml-auto h-ico-sm w-ico-sm" })
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
));
|
|
22
|
+
v.displayName = h.displayName;
|
|
23
|
+
const z = n.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ o(
|
|
24
|
+
y,
|
|
25
|
+
{
|
|
26
|
+
ref: a,
|
|
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
|
+
z.displayName = y.displayName;
|
|
35
|
+
const G = n.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ o(l, { children: /* @__PURE__ */ o(
|
|
36
|
+
p,
|
|
37
|
+
{
|
|
38
|
+
ref: a,
|
|
39
|
+
className: d(
|
|
40
|
+
"z-dropdown 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",
|
|
41
|
+
e
|
|
42
|
+
),
|
|
43
|
+
...t
|
|
44
|
+
}
|
|
45
|
+
) }));
|
|
46
|
+
G.displayName = p.displayName;
|
|
47
|
+
const T = n.forwardRef(({ className: e, inset: t, ...a }, s) => /* @__PURE__ */ o(
|
|
48
|
+
u,
|
|
49
|
+
{
|
|
50
|
+
ref: s,
|
|
51
|
+
className: d(
|
|
52
|
+
"relative flex cursor-default select-none items-center rounded-ds-md px-ds-03 py-ds-02b text-ds-md outline-none focus:bg-layer-02 focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-[0.38]",
|
|
53
|
+
t && "pl-ds-07",
|
|
54
|
+
e
|
|
55
|
+
),
|
|
56
|
+
...a
|
|
57
|
+
}
|
|
58
|
+
));
|
|
59
|
+
T.displayName = u.displayName;
|
|
60
|
+
const j = n.forwardRef(({ className: e, children: t, checked: a, ...s }, r) => /* @__PURE__ */ i(
|
|
61
|
+
m,
|
|
62
|
+
{
|
|
63
|
+
ref: r,
|
|
64
|
+
className: d(
|
|
65
|
+
"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 focus:bg-layer-02 focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-[0.38]",
|
|
66
|
+
e
|
|
67
|
+
),
|
|
68
|
+
checked: a,
|
|
69
|
+
...s,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ o("span", { className: "absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center", children: /* @__PURE__ */ o(c, { children: /* @__PURE__ */ o(I, { className: "h-ico-sm w-ico-sm" }) }) }),
|
|
72
|
+
t
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
));
|
|
76
|
+
j.displayName = m.displayName;
|
|
77
|
+
const k = n.forwardRef(({ className: e, children: t, ...a }, s) => /* @__PURE__ */ i(
|
|
78
|
+
x,
|
|
79
|
+
{
|
|
80
|
+
ref: s,
|
|
81
|
+
className: d(
|
|
82
|
+
"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 focus:bg-layer-02 focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-[0.38]",
|
|
83
|
+
e
|
|
84
|
+
),
|
|
85
|
+
...a,
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ o("span", { className: "absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center", children: /* @__PURE__ */ o(c, { children: /* @__PURE__ */ o(M, { className: "h-ico-sm w-ico-sm fill-current" }) }) }),
|
|
88
|
+
t
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
));
|
|
92
|
+
k.displayName = x.displayName;
|
|
93
|
+
const L = n.forwardRef(({ className: e, inset: t, ...a }, s) => /* @__PURE__ */ o(
|
|
94
|
+
f,
|
|
95
|
+
{
|
|
96
|
+
ref: s,
|
|
97
|
+
className: d(
|
|
98
|
+
"px-ds-03 py-ds-02b text-ds-md font-semibold text-text-primary",
|
|
99
|
+
t && "pl-ds-07",
|
|
100
|
+
e
|
|
101
|
+
),
|
|
102
|
+
...a
|
|
103
|
+
}
|
|
104
|
+
));
|
|
105
|
+
L.displayName = f.displayName;
|
|
106
|
+
const P = n.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ o(
|
|
107
|
+
b,
|
|
108
|
+
{
|
|
109
|
+
ref: a,
|
|
110
|
+
className: d("-mx-1 my-ds-02 h-px bg-border-subtle", e),
|
|
111
|
+
...t
|
|
112
|
+
}
|
|
113
|
+
));
|
|
114
|
+
P.displayName = b.displayName;
|
|
115
|
+
const q = ({
|
|
116
|
+
className: e,
|
|
117
|
+
...t
|
|
118
|
+
}) => /* @__PURE__ */ o(
|
|
119
|
+
"span",
|
|
120
|
+
{
|
|
121
|
+
className: d(
|
|
122
|
+
"ml-auto text-ds-sm text-text-placeholder",
|
|
123
|
+
e
|
|
124
|
+
),
|
|
125
|
+
...t
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
q.displayName = "ContextMenuShortcut";
|
|
129
|
+
export {
|
|
130
|
+
F as ContextMenu,
|
|
131
|
+
j as ContextMenuCheckboxItem,
|
|
132
|
+
G as ContextMenuContent,
|
|
133
|
+
J as ContextMenuGroup,
|
|
134
|
+
T as ContextMenuItem,
|
|
135
|
+
L as ContextMenuLabel,
|
|
136
|
+
K as ContextMenuPortal,
|
|
137
|
+
Q as ContextMenuRadioGroup,
|
|
138
|
+
k as ContextMenuRadioItem,
|
|
139
|
+
P as ContextMenuSeparator,
|
|
140
|
+
q as ContextMenuShortcut,
|
|
141
|
+
O as ContextMenuSub,
|
|
142
|
+
z as ContextMenuSubContent,
|
|
143
|
+
v as ContextMenuSubTrigger,
|
|
144
|
+
H as ContextMenuTrigger
|
|
145
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Table } from '@tanstack/react-table';
|
|
2
|
+
export type Density = 'compact' | 'standard' | 'comfortable';
|
|
3
|
+
export interface DataTableToolbarProps<TData> {
|
|
4
|
+
table: Table<TData>;
|
|
5
|
+
globalFilter?: boolean;
|
|
6
|
+
globalFilterValue: string;
|
|
7
|
+
onGlobalFilterChange: (value: string) => void;
|
|
8
|
+
density: Density;
|
|
9
|
+
onDensityChange: (density: Density) => void;
|
|
10
|
+
enableExport?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function DataTableToolbar<TData>({ table, globalFilter, globalFilterValue, onGlobalFilterChange, density, onDensityChange, enableExport, }: DataTableToolbarProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare namespace DataTableToolbar {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=data-table-toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table-toolbar.d.ts","sourceRoot":"","sources":["../../src/ui/data-table-toolbar.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAiBlD,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,aAAa,CAAA;AAc5D,MAAM,WAAW,qBAAqB,CAAC,KAAK;IAC1C,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;IACnB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iBAAiB,EAAE,MAAM,CAAA;IACzB,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,OAAO,EAAE,OAAO,CAAA;IAChB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IAC3C,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAgDD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,EACtC,KAAK,EACL,YAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,OAAO,EACP,eAAe,EACf,YAAmB,GACpB,EAAE,qBAAqB,CAAC,KAAK,CAAC,2CA+F9B;yBAvGe,gBAAgB"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { IconSearch as x, IconColumns3 as C, IconTextResize as y, IconDownload as v } from "@tabler/icons-react";
|
|
3
|
+
import { DropdownMenu as w, DropdownMenuTrigger as D, DropdownMenuContent as N, DropdownMenuLabel as T, DropdownMenuSeparator as k, DropdownMenuCheckboxItem as I } from "./dropdown-menu.js";
|
|
4
|
+
import { cn as g } from "./lib/utils.js";
|
|
5
|
+
const b = {
|
|
6
|
+
compact: "Compact",
|
|
7
|
+
standard: "Standard",
|
|
8
|
+
comfortable: "Comfortable"
|
|
9
|
+
}, L = {
|
|
10
|
+
compact: "standard",
|
|
11
|
+
standard: "comfortable",
|
|
12
|
+
comfortable: "compact"
|
|
13
|
+
}, h = g(
|
|
14
|
+
"h-ds-sm px-ds-03 rounded-ds-md",
|
|
15
|
+
"border border-border",
|
|
16
|
+
"hover:bg-layer-02",
|
|
17
|
+
"text-ds-sm flex items-center gap-ds-02 transition-colors"
|
|
18
|
+
), d = "text-icon-secondary";
|
|
19
|
+
function j(l) {
|
|
20
|
+
const m = l.getAllLeafColumns().filter((t) => t.getIsVisible() && t.id !== "_select").map((t) => {
|
|
21
|
+
const e = t.columnDef.header;
|
|
22
|
+
return typeof e == "string" ? e : t.id;
|
|
23
|
+
}), p = l.getFilteredRowModel().rows.map(
|
|
24
|
+
(t) => l.getAllLeafColumns().filter((e) => e.getIsVisible() && e.id !== "_select").map((e) => {
|
|
25
|
+
const i = t.getValue(e.id), n = String(i ?? "");
|
|
26
|
+
return n.includes(",") || n.includes('"') || n.includes(`
|
|
27
|
+
`) ? `"${n.replace(/"/g, '""')}"` : n;
|
|
28
|
+
})
|
|
29
|
+
), u = [m.join(","), ...p.map((t) => t.join(","))].join(
|
|
30
|
+
`
|
|
31
|
+
`
|
|
32
|
+
), s = new Blob([u], { type: "text/csv;charset=utf-8;" }), c = URL.createObjectURL(s), r = document.createElement("a");
|
|
33
|
+
r.href = c, r.download = "table-export.csv", r.click(), URL.revokeObjectURL(c);
|
|
34
|
+
}
|
|
35
|
+
function M({
|
|
36
|
+
table: l,
|
|
37
|
+
globalFilter: m = !1,
|
|
38
|
+
globalFilterValue: p,
|
|
39
|
+
onGlobalFilterChange: u,
|
|
40
|
+
density: s,
|
|
41
|
+
onDensityChange: c,
|
|
42
|
+
enableExport: r = !0
|
|
43
|
+
}) {
|
|
44
|
+
const t = l.getAllColumns().filter((e) => e.getCanHide() && e.id !== "_select");
|
|
45
|
+
return /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-03 pb-ds-04", children: [
|
|
46
|
+
m && /* @__PURE__ */ a("div", { className: "flex flex-1 items-center gap-ds-02", children: [
|
|
47
|
+
/* @__PURE__ */ o(
|
|
48
|
+
x,
|
|
49
|
+
{
|
|
50
|
+
size: 16,
|
|
51
|
+
className: d,
|
|
52
|
+
"aria-hidden": "true"
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ o(
|
|
56
|
+
"input",
|
|
57
|
+
{
|
|
58
|
+
type: "text",
|
|
59
|
+
value: p,
|
|
60
|
+
onChange: (e) => u(e.target.value),
|
|
61
|
+
placeholder: "Search all columns...",
|
|
62
|
+
"aria-label": "Search all columns",
|
|
63
|
+
className: g(
|
|
64
|
+
"flex-1 bg-transparent text-ds-md",
|
|
65
|
+
"text-text-primary placeholder:text-text-placeholder",
|
|
66
|
+
"outline-none",
|
|
67
|
+
"h-ds-sm"
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] }),
|
|
72
|
+
/* @__PURE__ */ a("div", { className: "ml-auto flex items-center gap-ds-03", children: [
|
|
73
|
+
t.length > 0 && /* @__PURE__ */ a(w, { children: [
|
|
74
|
+
/* @__PURE__ */ o(D, { asChild: !0, children: /* @__PURE__ */ a(
|
|
75
|
+
"button",
|
|
76
|
+
{
|
|
77
|
+
type: "button",
|
|
78
|
+
className: h,
|
|
79
|
+
"aria-label": "Toggle column visibility",
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ o(C, { size: 16, className: d }),
|
|
82
|
+
"Columns"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
) }),
|
|
86
|
+
/* @__PURE__ */ a(N, { align: "end", className: "w-40", children: [
|
|
87
|
+
/* @__PURE__ */ o(T, { children: "Toggle columns" }),
|
|
88
|
+
/* @__PURE__ */ o(k, {}),
|
|
89
|
+
t.map((e) => {
|
|
90
|
+
const i = e.columnDef.header, n = typeof i == "string" ? i : e.id;
|
|
91
|
+
return /* @__PURE__ */ o(
|
|
92
|
+
I,
|
|
93
|
+
{
|
|
94
|
+
checked: e.getIsVisible(),
|
|
95
|
+
onCheckedChange: (f) => e.toggleVisibility(!!f),
|
|
96
|
+
children: n
|
|
97
|
+
},
|
|
98
|
+
e.id
|
|
99
|
+
);
|
|
100
|
+
})
|
|
101
|
+
] })
|
|
102
|
+
] }),
|
|
103
|
+
/* @__PURE__ */ a(
|
|
104
|
+
"button",
|
|
105
|
+
{
|
|
106
|
+
type: "button",
|
|
107
|
+
className: h,
|
|
108
|
+
onClick: () => c(L[s]),
|
|
109
|
+
"aria-label": `Table density: ${b[s]}. Click to change.`,
|
|
110
|
+
title: `Density: ${b[s]}`,
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ o(y, { size: 16, className: d }),
|
|
113
|
+
b[s]
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
r && /* @__PURE__ */ a(
|
|
118
|
+
"button",
|
|
119
|
+
{
|
|
120
|
+
type: "button",
|
|
121
|
+
className: h,
|
|
122
|
+
onClick: () => j(l),
|
|
123
|
+
"aria-label": "Export table as CSV",
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ o(v, { size: 16, className: d }),
|
|
126
|
+
"Export"
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
] })
|
|
131
|
+
] });
|
|
132
|
+
}
|
|
133
|
+
M.displayName = "DataTableToolbar";
|
|
134
|
+
export {
|
|
135
|
+
M as DataTableToolbar
|
|
136
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
3
|
+
import { Density } from './data-table-toolbar';
|
|
4
|
+
/**
|
|
5
|
+
* Props for DataTable — a feature-rich TanStack Table wrapper supporting sorting, filtering,
|
|
6
|
+
* pagination, row selection, inline editing, row expansion, column pinning, and virtualization.
|
|
7
|
+
*
|
|
8
|
+
* All features are opt-in via boolean flags. The component manages its own internal state for
|
|
9
|
+
* sorting, filtering, pagination, and selection — just pass `columns` and `data`.
|
|
10
|
+
*
|
|
11
|
+
* **Feature flags:** `sortable` | `filterable` | `globalFilter` | `paginated` | `selectable` |
|
|
12
|
+
* `toolbar` | `editable` | `expandable` | `virtualRows`
|
|
13
|
+
*
|
|
14
|
+
* **Columns:** Use TanStack Table's `ColumnDef<TData, TValue>` type. Set
|
|
15
|
+
* `meta: { enableEditing: false }` on a column to disable cell editing for that column.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // Minimal read-only table:
|
|
19
|
+
* const columns: ColumnDef<User, string>[] = [
|
|
20
|
+
* { accessorKey: 'name', header: 'Name' },
|
|
21
|
+
* { accessorKey: 'email', header: 'Email' },
|
|
22
|
+
* ]
|
|
23
|
+
* <DataTable columns={columns} data={users} />
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // Full-featured admin table with sorting, pagination, and selection:
|
|
27
|
+
* <DataTable
|
|
28
|
+
* columns={projectColumns}
|
|
29
|
+
* data={projects}
|
|
30
|
+
* sortable
|
|
31
|
+
* paginated
|
|
32
|
+
* pageSize={20}
|
|
33
|
+
* selectable
|
|
34
|
+
* onSelectionChange={(rows) => setSelectedProjects(rows)}
|
|
35
|
+
* toolbar
|
|
36
|
+
* />
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* // Virtualized table for large datasets (10k+ rows):
|
|
40
|
+
* <DataTable
|
|
41
|
+
* columns={logColumns}
|
|
42
|
+
* data={allLogs}
|
|
43
|
+
* virtualRows
|
|
44
|
+
* virtualRowHeight={40}
|
|
45
|
+
* maxHeight={500}
|
|
46
|
+
* />
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* // Table with expandable rows for nested detail:
|
|
50
|
+
* <DataTable
|
|
51
|
+
* columns={orderColumns}
|
|
52
|
+
* data={orders}
|
|
53
|
+
* expandable
|
|
54
|
+
* renderExpanded={(order) => <OrderLineItems items={order.lineItems} />}
|
|
55
|
+
* />
|
|
56
|
+
* // These are just a few ways — feel free to combine props creatively!
|
|
57
|
+
*/
|
|
58
|
+
export interface DataTableProps<TData, TValue> {
|
|
59
|
+
/** Column definitions passed to TanStack Table */
|
|
60
|
+
columns: ColumnDef<TData, TValue>[];
|
|
61
|
+
/** Row data */
|
|
62
|
+
data: TData[];
|
|
63
|
+
/** Additional class name for the wrapper div */
|
|
64
|
+
className?: string;
|
|
65
|
+
/** Text shown when the table has no rows */
|
|
66
|
+
noResultsText?: string;
|
|
67
|
+
/** Enable column sorting (click headers to sort) */
|
|
68
|
+
sortable?: boolean;
|
|
69
|
+
/** Enable per-column filter inputs below headers */
|
|
70
|
+
filterable?: boolean;
|
|
71
|
+
/** Enable a global search input above the table */
|
|
72
|
+
globalFilter?: boolean;
|
|
73
|
+
/** Enable pagination controls below the table */
|
|
74
|
+
paginated?: boolean;
|
|
75
|
+
/** Number of rows per page when paginated (default 10) */
|
|
76
|
+
pageSize?: number;
|
|
77
|
+
/** Options for the page size selector dropdown (default [10, 20, 50, 100]) */
|
|
78
|
+
pageSizeOptions?: number[];
|
|
79
|
+
/** Enable row selection with checkboxes */
|
|
80
|
+
selectable?: boolean;
|
|
81
|
+
/** Callback when row selection changes */
|
|
82
|
+
onSelectionChange?: (selectedRows: TData[]) => void;
|
|
83
|
+
/** Show toolbar above the table with column visibility, density, and export controls */
|
|
84
|
+
toolbar?: boolean;
|
|
85
|
+
/** Row density — controls cell vertical padding */
|
|
86
|
+
density?: Density;
|
|
87
|
+
/** Initial column pinning configuration */
|
|
88
|
+
columnPinning?: {
|
|
89
|
+
left?: string[];
|
|
90
|
+
right?: string[];
|
|
91
|
+
};
|
|
92
|
+
/** Enable inline cell editing (double-click to edit) */
|
|
93
|
+
editable?: boolean;
|
|
94
|
+
/** Callback when a cell value is edited */
|
|
95
|
+
onCellEdit?: (rowIndex: number, columnId: string, value: unknown) => void;
|
|
96
|
+
/** Enable expandable rows with detail panels */
|
|
97
|
+
expandable?: boolean;
|
|
98
|
+
/** Render function for expanded row content */
|
|
99
|
+
renderExpanded?: (row: TData) => React.ReactNode;
|
|
100
|
+
/** Enable row virtualization for large datasets */
|
|
101
|
+
virtualRows?: boolean;
|
|
102
|
+
/** Height of each virtual row in pixels (default 48) */
|
|
103
|
+
virtualRowHeight?: number;
|
|
104
|
+
/** Maximum height of the scrollable container in pixels (default 600) */
|
|
105
|
+
maxHeight?: number;
|
|
106
|
+
}
|
|
107
|
+
export declare function DataTable<TData, TValue>({ columns, data, className, noResultsText, sortable, filterable, globalFilter, paginated, pageSize: initialPageSize, pageSizeOptions, selectable, onSelectionChange, toolbar, density: initialDensity, columnPinning: initialColumnPinning, editable, onCellEdit, expandable, renderExpanded, virtualRows, virtualRowHeight, maxHeight, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
108
|
+
export declare namespace DataTable {
|
|
109
|
+
var displayName: string;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=data-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../src/ui/data-table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAA;AACvE,OAAO,EACL,KAAK,SAAS,EAiBf,MAAM,uBAAuB,CAAA;AAqB9B,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAWrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,WAAW,cAAc,CAAC,KAAK,EAAE,MAAM;IAC3C,kDAAkD;IAClD,OAAO,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAA;IACnC,eAAe;IACf,IAAI,EAAE,KAAK,EAAE,CAAA;IACb,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,oDAAoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8EAA8E;IAC9E,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,2CAA2C;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,0CAA0C;IAC1C,iBAAiB,CAAC,EAAE,CAAC,YAAY,EAAE,KAAK,EAAE,KAAK,IAAI,CAAA;IACnD,wFAAwF;IACxF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2CAA2C;IAC3C,aAAa,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;IAGrD,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAGzE,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,KAAK,CAAC,SAAS,CAAA;IAGhD,mDAAmD;IACnD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,wDAAwD;IACxD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAuDD,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,EACvC,OAAO,EACP,IAAI,EACJ,SAAS,EACT,aAAa,EACb,QAAgB,EAChB,UAAkB,EAClB,YAAoB,EACpB,SAAiB,EACjB,QAAQ,EAAE,eAAe,EACzB,eAAe,EACf,UAAkB,EAClB,iBAAiB,EACjB,OAAe,EACf,OAAO,EAAE,cAA2B,EACpC,aAAa,EAAE,oBAAoB,EACnC,QAAgB,EAChB,UAAU,EACV,UAAkB,EAClB,cAAc,EACd,WAAmB,EACnB,gBAAqB,EACrB,SAAe,GAChB,EAAE,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,2CAshB/B;yBA7iBe,SAAS"}
|