@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,491 @@
|
|
|
1
|
+
import { jsxs as r, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import we, { useState as d, useRef as J, useEffect as Q, useCallback as ve } from "react";
|
|
3
|
+
import { useReactTable as De, getExpandedRowModel as Ie, getPaginationRowModel as Re, getFilteredRowModel as Fe, getSortedRowModel as ze, getCoreRowModel as Pe, flexRender as E } from "@tanstack/react-table";
|
|
4
|
+
import { useVirtualizer as ke } from "@tanstack/react-virtual";
|
|
5
|
+
import { IconArrowUp as Ee, IconArrowDown as Me, IconArrowsSort as Te, IconSearch as Ve, IconChevronLeft as $e, IconChevronRight as L } from "@tabler/icons-react";
|
|
6
|
+
import { Table as He, TableHeader as je, TableRow as y, TableHead as U, TableBody as M, TableCell as T } from "./table.js";
|
|
7
|
+
import { Checkbox as q } from "./checkbox.js";
|
|
8
|
+
import { cn as i } from "./lib/utils.js";
|
|
9
|
+
import { DataTableToolbar as _e } from "./data-table-toolbar.js";
|
|
10
|
+
const Ae = {
|
|
11
|
+
compact: "py-ds-02",
|
|
12
|
+
standard: "py-ds-05",
|
|
13
|
+
comfortable: "py-ds-07"
|
|
14
|
+
};
|
|
15
|
+
function Be({
|
|
16
|
+
initialValue: v,
|
|
17
|
+
onSave: S,
|
|
18
|
+
onCancel: D
|
|
19
|
+
}) {
|
|
20
|
+
const [x, h] = d(v), c = J(null);
|
|
21
|
+
Q(() => {
|
|
22
|
+
var s, C;
|
|
23
|
+
(s = c.current) == null || s.focus(), (C = c.current) == null || C.select();
|
|
24
|
+
}, []);
|
|
25
|
+
const u = ve(() => {
|
|
26
|
+
S(x);
|
|
27
|
+
}, [S, x]);
|
|
28
|
+
return /* @__PURE__ */ l(
|
|
29
|
+
"input",
|
|
30
|
+
{
|
|
31
|
+
ref: c,
|
|
32
|
+
type: "text",
|
|
33
|
+
value: x,
|
|
34
|
+
onChange: (s) => h(s.target.value),
|
|
35
|
+
onBlur: u,
|
|
36
|
+
onKeyDown: (s) => {
|
|
37
|
+
s.key === "Enter" ? (s.preventDefault(), u()) : s.key === "Escape" && (s.preventDefault(), D());
|
|
38
|
+
},
|
|
39
|
+
className: i(
|
|
40
|
+
"h-ds-xs-plus w-full rounded-ds-md",
|
|
41
|
+
"border border-border-interactive bg-field",
|
|
42
|
+
"px-ds-02 text-ds-sm",
|
|
43
|
+
"text-text-primary placeholder:text-text-placeholder",
|
|
44
|
+
"outline-none focus:border-[var(--color-border-focus)]"
|
|
45
|
+
),
|
|
46
|
+
"aria-label": "Edit cell value"
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function Ge({
|
|
51
|
+
columns: v,
|
|
52
|
+
data: S,
|
|
53
|
+
className: D,
|
|
54
|
+
noResultsText: x,
|
|
55
|
+
sortable: h = !1,
|
|
56
|
+
filterable: c = !1,
|
|
57
|
+
globalFilter: u = !1,
|
|
58
|
+
paginated: s = !1,
|
|
59
|
+
pageSize: C,
|
|
60
|
+
pageSizeOptions: W,
|
|
61
|
+
selectable: I = !1,
|
|
62
|
+
onSelectionChange: V,
|
|
63
|
+
toolbar: $ = !1,
|
|
64
|
+
density: X = "standard",
|
|
65
|
+
columnPinning: p,
|
|
66
|
+
editable: Z = !1,
|
|
67
|
+
onCellEdit: R,
|
|
68
|
+
expandable: N = !1,
|
|
69
|
+
renderExpanded: H,
|
|
70
|
+
virtualRows: m = !1,
|
|
71
|
+
virtualRowHeight: ee = 48,
|
|
72
|
+
maxHeight: te = 600
|
|
73
|
+
}) {
|
|
74
|
+
const [le, ne] = d([]), [oe, ae] = d([]), [F, z] = d(""), [se, re] = d({
|
|
75
|
+
pageIndex: 0,
|
|
76
|
+
pageSize: C ?? 10
|
|
77
|
+
}), [j, de] = d({}), [ie, ce] = d({}), [_, ue] = d({
|
|
78
|
+
left: (p == null ? void 0 : p.left) ?? [],
|
|
79
|
+
right: (p == null ? void 0 : p.right) ?? []
|
|
80
|
+
}), [A, me] = d(X), [b, P] = d(null), [ge, fe] = d({}), B = J(null), pe = {
|
|
81
|
+
id: "_select",
|
|
82
|
+
header: ({ table: e }) => /* @__PURE__ */ l(
|
|
83
|
+
q,
|
|
84
|
+
{
|
|
85
|
+
checked: e.getIsAllPageRowsSelected(),
|
|
86
|
+
indeterminate: e.getIsSomePageRowsSelected(),
|
|
87
|
+
onCheckedChange: (t) => e.toggleAllPageRowsSelected(!!t),
|
|
88
|
+
"aria-label": "Select all rows"
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
cell: ({ row: e }) => /* @__PURE__ */ l(
|
|
92
|
+
q,
|
|
93
|
+
{
|
|
94
|
+
checked: e.getIsSelected(),
|
|
95
|
+
onCheckedChange: (t) => e.toggleSelected(!!t),
|
|
96
|
+
"aria-label": "Select row"
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
enableSorting: !1,
|
|
100
|
+
enableColumnFilter: !1,
|
|
101
|
+
enableHiding: !1
|
|
102
|
+
}, be = {
|
|
103
|
+
id: "_expand",
|
|
104
|
+
header: () => null,
|
|
105
|
+
cell: ({ row: e }) => /* @__PURE__ */ l(
|
|
106
|
+
"button",
|
|
107
|
+
{
|
|
108
|
+
type: "button",
|
|
109
|
+
onClick: () => e.toggleExpanded(),
|
|
110
|
+
"aria-label": e.getIsExpanded() ? "Collapse row" : "Expand row",
|
|
111
|
+
className: "flex items-center justify-center p-ds-01 rounded hover:bg-layer-02 transition-colors",
|
|
112
|
+
children: /* @__PURE__ */ l(
|
|
113
|
+
L,
|
|
114
|
+
{
|
|
115
|
+
size: 16,
|
|
116
|
+
className: i(
|
|
117
|
+
"transition-transform duration-200",
|
|
118
|
+
e.getIsExpanded() && "rotate-90"
|
|
119
|
+
),
|
|
120
|
+
"aria-hidden": "true"
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
enableSorting: !1,
|
|
126
|
+
enableColumnFilter: !1,
|
|
127
|
+
enableHiding: !1
|
|
128
|
+
}, k = [
|
|
129
|
+
...I ? [pe] : [],
|
|
130
|
+
...N ? [be] : [],
|
|
131
|
+
...v
|
|
132
|
+
], g = {
|
|
133
|
+
columnVisibility: ie,
|
|
134
|
+
columnPinning: _
|
|
135
|
+
};
|
|
136
|
+
h && (g.sorting = le), (c || u) && (g.columnFilters = oe, g.globalFilter = F), s && (g.pagination = se), I && (g.rowSelection = j), N && (g.expanded = ge);
|
|
137
|
+
const o = De({
|
|
138
|
+
data: S,
|
|
139
|
+
columns: k,
|
|
140
|
+
state: g,
|
|
141
|
+
onColumnVisibilityChange: ce,
|
|
142
|
+
onColumnPinningChange: ue,
|
|
143
|
+
getCoreRowModel: Pe(),
|
|
144
|
+
...h && {
|
|
145
|
+
onSortingChange: ne,
|
|
146
|
+
getSortedRowModel: ze()
|
|
147
|
+
},
|
|
148
|
+
...(c || u) && {
|
|
149
|
+
onColumnFiltersChange: ae,
|
|
150
|
+
onGlobalFilterChange: z,
|
|
151
|
+
getFilteredRowModel: Fe()
|
|
152
|
+
},
|
|
153
|
+
...s && {
|
|
154
|
+
onPaginationChange: re,
|
|
155
|
+
getPaginationRowModel: Re()
|
|
156
|
+
},
|
|
157
|
+
...I && {
|
|
158
|
+
onRowSelectionChange: de,
|
|
159
|
+
enableRowSelection: !0
|
|
160
|
+
},
|
|
161
|
+
...N && {
|
|
162
|
+
onExpandedChange: fe,
|
|
163
|
+
getExpandedRowModel: Ie()
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
Q(() => {
|
|
167
|
+
if (V) {
|
|
168
|
+
const e = o.getFilteredSelectedRowModel().rows.map((t) => t.original);
|
|
169
|
+
V(e);
|
|
170
|
+
}
|
|
171
|
+
}, [j]);
|
|
172
|
+
function G(e) {
|
|
173
|
+
const { left: t = [], right: a = [] } = _, n = t.indexOf(e), f = a.indexOf(e);
|
|
174
|
+
return n !== -1 ? {
|
|
175
|
+
className: "sticky bg-layer-01 z-raised",
|
|
176
|
+
style: { left: 0 }
|
|
177
|
+
} : f !== -1 ? {
|
|
178
|
+
className: "sticky bg-layer-01 z-raised",
|
|
179
|
+
style: { right: 0 }
|
|
180
|
+
} : { className: "", style: {} };
|
|
181
|
+
}
|
|
182
|
+
function xe(e) {
|
|
183
|
+
if (!Z || e === "_select" || e === "_expand") return !1;
|
|
184
|
+
const t = o.getColumn(e);
|
|
185
|
+
if (!t) return !1;
|
|
186
|
+
const a = t.columnDef.meta;
|
|
187
|
+
return (a == null ? void 0 : a.enableEditing) !== !1;
|
|
188
|
+
}
|
|
189
|
+
const he = Ae[A], w = o.getRowModel().rows, O = ke({
|
|
190
|
+
count: m ? w.length : 0,
|
|
191
|
+
getScrollElement: () => B.current,
|
|
192
|
+
estimateSize: () => ee,
|
|
193
|
+
overscan: 10
|
|
194
|
+
});
|
|
195
|
+
function Y(e, t) {
|
|
196
|
+
const a = e.getVisibleCells();
|
|
197
|
+
return /* @__PURE__ */ l(
|
|
198
|
+
y,
|
|
199
|
+
{
|
|
200
|
+
"data-state": e.getIsSelected() && "selected",
|
|
201
|
+
style: t,
|
|
202
|
+
className: m ? "absolute w-full flex" : void 0,
|
|
203
|
+
children: a.map((n) => {
|
|
204
|
+
const f = G(n.column.id), Ce = (b == null ? void 0 : b.rowIndex) === e.index && (b == null ? void 0 : b.columnId) === n.column.id;
|
|
205
|
+
return /* @__PURE__ */ l(
|
|
206
|
+
T,
|
|
207
|
+
{
|
|
208
|
+
className: i(
|
|
209
|
+
he,
|
|
210
|
+
f.className,
|
|
211
|
+
m && "flex-1"
|
|
212
|
+
),
|
|
213
|
+
style: f.style,
|
|
214
|
+
onDoubleClick: () => {
|
|
215
|
+
xe(n.column.id) && P({
|
|
216
|
+
rowIndex: e.index,
|
|
217
|
+
columnId: n.column.id
|
|
218
|
+
});
|
|
219
|
+
},
|
|
220
|
+
children: Ce ? /* @__PURE__ */ l(
|
|
221
|
+
Be,
|
|
222
|
+
{
|
|
223
|
+
initialValue: String(n.getValue() ?? ""),
|
|
224
|
+
onSave: (Ne) => {
|
|
225
|
+
R == null || R(e.index, n.column.id, Ne), P(null);
|
|
226
|
+
},
|
|
227
|
+
onCancel: () => P(null)
|
|
228
|
+
}
|
|
229
|
+
) : E(n.column.columnDef.cell, n.getContext())
|
|
230
|
+
},
|
|
231
|
+
n.id
|
|
232
|
+
);
|
|
233
|
+
})
|
|
234
|
+
},
|
|
235
|
+
e.id
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
function ye(e, t) {
|
|
239
|
+
return !N || !e.getIsExpanded() || !H ? null : /* @__PURE__ */ l(
|
|
240
|
+
y,
|
|
241
|
+
{
|
|
242
|
+
style: t,
|
|
243
|
+
className: m ? "absolute w-full flex" : void 0,
|
|
244
|
+
children: /* @__PURE__ */ l(
|
|
245
|
+
T,
|
|
246
|
+
{
|
|
247
|
+
colSpan: k.length,
|
|
248
|
+
className: i(
|
|
249
|
+
"bg-layer-02 p-ds-05",
|
|
250
|
+
m && "flex-1"
|
|
251
|
+
),
|
|
252
|
+
children: H(e.original)
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
},
|
|
256
|
+
`${e.id}-expanded`
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
function Se() {
|
|
260
|
+
if (!w.length)
|
|
261
|
+
return /* @__PURE__ */ l(M, { children: /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
|
|
262
|
+
T,
|
|
263
|
+
{
|
|
264
|
+
colSpan: k.length,
|
|
265
|
+
className: "h-24 text-center text-text-tertiary",
|
|
266
|
+
children: x || "No results."
|
|
267
|
+
}
|
|
268
|
+
) }) });
|
|
269
|
+
if (m) {
|
|
270
|
+
const e = O.getVirtualItems(), t = O.getTotalSize();
|
|
271
|
+
return /* @__PURE__ */ l(
|
|
272
|
+
M,
|
|
273
|
+
{
|
|
274
|
+
style: {
|
|
275
|
+
height: `${t}px`,
|
|
276
|
+
position: "relative"
|
|
277
|
+
},
|
|
278
|
+
children: e.map((a) => {
|
|
279
|
+
const n = w[a.index];
|
|
280
|
+
return Y(n, {
|
|
281
|
+
position: "absolute",
|
|
282
|
+
top: 0,
|
|
283
|
+
left: 0,
|
|
284
|
+
width: "100%",
|
|
285
|
+
height: `${a.size}px`,
|
|
286
|
+
transform: `translateY(${a.start}px)`
|
|
287
|
+
});
|
|
288
|
+
})
|
|
289
|
+
}
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
return /* @__PURE__ */ l(M, { children: w.map((e) => /* @__PURE__ */ r(we.Fragment, { children: [
|
|
293
|
+
Y(e),
|
|
294
|
+
ye(e)
|
|
295
|
+
] }, e.id)) });
|
|
296
|
+
}
|
|
297
|
+
const K = /* @__PURE__ */ r(He, { children: [
|
|
298
|
+
/* @__PURE__ */ r(je, { children: [
|
|
299
|
+
o.getHeaderGroups().map((e) => /* @__PURE__ */ l(y, { children: e.headers.map((t) => {
|
|
300
|
+
const a = h && t.column.getCanSort(), n = t.column.getIsSorted(), f = G(t.column.id);
|
|
301
|
+
return /* @__PURE__ */ l(
|
|
302
|
+
U,
|
|
303
|
+
{
|
|
304
|
+
className: f.className,
|
|
305
|
+
style: f.style,
|
|
306
|
+
children: t.isPlaceholder ? null : a ? /* @__PURE__ */ r(
|
|
307
|
+
"button",
|
|
308
|
+
{
|
|
309
|
+
type: "button",
|
|
310
|
+
className: i(
|
|
311
|
+
"flex items-center gap-ds-01 font-medium",
|
|
312
|
+
"cursor-pointer select-none",
|
|
313
|
+
"-ml-ds-01 rounded px-ds-01 py-ds-01",
|
|
314
|
+
"hover:bg-layer-02 transition-colors"
|
|
315
|
+
),
|
|
316
|
+
onClick: t.column.getToggleSortingHandler(),
|
|
317
|
+
"aria-label": `Sort by ${typeof t.column.columnDef.header == "string" ? t.column.columnDef.header : t.column.id}`,
|
|
318
|
+
children: [
|
|
319
|
+
E(
|
|
320
|
+
t.column.columnDef.header,
|
|
321
|
+
t.getContext()
|
|
322
|
+
),
|
|
323
|
+
n === "asc" ? /* @__PURE__ */ l(
|
|
324
|
+
Ee,
|
|
325
|
+
{
|
|
326
|
+
className: "size-4 text-text-secondary",
|
|
327
|
+
"aria-hidden": "true"
|
|
328
|
+
}
|
|
329
|
+
) : n === "desc" ? /* @__PURE__ */ l(
|
|
330
|
+
Me,
|
|
331
|
+
{
|
|
332
|
+
className: "size-4 text-text-secondary",
|
|
333
|
+
"aria-hidden": "true"
|
|
334
|
+
}
|
|
335
|
+
) : /* @__PURE__ */ l(
|
|
336
|
+
Te,
|
|
337
|
+
{
|
|
338
|
+
className: "size-4 text-text-tertiary",
|
|
339
|
+
"aria-hidden": "true"
|
|
340
|
+
}
|
|
341
|
+
)
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
) : E(
|
|
345
|
+
t.column.columnDef.header,
|
|
346
|
+
t.getContext()
|
|
347
|
+
)
|
|
348
|
+
},
|
|
349
|
+
t.id
|
|
350
|
+
);
|
|
351
|
+
}) }, e.id)),
|
|
352
|
+
c && o.getHeaderGroups().map((e) => /* @__PURE__ */ l(y, { children: e.headers.map((t) => /* @__PURE__ */ l(U, { className: "py-ds-01", children: t.isPlaceholder || t.column.columnDef.enableColumnFilter === !1 ? null : /* @__PURE__ */ l(
|
|
353
|
+
"input",
|
|
354
|
+
{
|
|
355
|
+
type: "text",
|
|
356
|
+
value: t.column.getFilterValue() ?? "",
|
|
357
|
+
onChange: (a) => t.column.setFilterValue(a.target.value),
|
|
358
|
+
placeholder: `Filter ${typeof t.column.columnDef.header == "string" ? t.column.columnDef.header : ""}...`,
|
|
359
|
+
"aria-label": `Filter ${typeof t.column.columnDef.header == "string" ? t.column.columnDef.header : t.column.id}`,
|
|
360
|
+
className: i(
|
|
361
|
+
"h-ds-xs-plus w-full rounded-ds-md",
|
|
362
|
+
"border border-border bg-field",
|
|
363
|
+
"px-ds-02 text-ds-sm",
|
|
364
|
+
"text-text-primary placeholder:text-text-placeholder",
|
|
365
|
+
"outline-none focus:border-[var(--color-border-focus)]"
|
|
366
|
+
)
|
|
367
|
+
}
|
|
368
|
+
) }, `${t.id}-filter`)) }, `${e.id}-filters`))
|
|
369
|
+
] }),
|
|
370
|
+
Se()
|
|
371
|
+
] });
|
|
372
|
+
return /* @__PURE__ */ r("div", { className: i(D), children: [
|
|
373
|
+
$ && /* @__PURE__ */ l(
|
|
374
|
+
_e,
|
|
375
|
+
{
|
|
376
|
+
table: o,
|
|
377
|
+
globalFilter: u,
|
|
378
|
+
globalFilterValue: F,
|
|
379
|
+
onGlobalFilterChange: z,
|
|
380
|
+
density: A,
|
|
381
|
+
onDensityChange: me
|
|
382
|
+
}
|
|
383
|
+
),
|
|
384
|
+
u && !$ && /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-03 pb-ds-04 border-b border-border-subtle mb-ds-04", children: [
|
|
385
|
+
/* @__PURE__ */ l(
|
|
386
|
+
Ve,
|
|
387
|
+
{
|
|
388
|
+
size: 16,
|
|
389
|
+
className: "text-icon-secondary",
|
|
390
|
+
"aria-hidden": "true"
|
|
391
|
+
}
|
|
392
|
+
),
|
|
393
|
+
/* @__PURE__ */ l(
|
|
394
|
+
"input",
|
|
395
|
+
{
|
|
396
|
+
type: "text",
|
|
397
|
+
value: F,
|
|
398
|
+
onChange: (e) => z(e.target.value),
|
|
399
|
+
placeholder: "Search all columns...",
|
|
400
|
+
"aria-label": "Search all columns",
|
|
401
|
+
className: i(
|
|
402
|
+
"flex-1 bg-transparent text-ds-md",
|
|
403
|
+
"text-text-primary placeholder:text-text-placeholder",
|
|
404
|
+
"outline-none"
|
|
405
|
+
)
|
|
406
|
+
}
|
|
407
|
+
)
|
|
408
|
+
] }),
|
|
409
|
+
m ? /* @__PURE__ */ l(
|
|
410
|
+
"div",
|
|
411
|
+
{
|
|
412
|
+
ref: B,
|
|
413
|
+
style: { maxHeight: `${te}px`, overflowY: "auto" },
|
|
414
|
+
children: K
|
|
415
|
+
}
|
|
416
|
+
) : K,
|
|
417
|
+
s && /* @__PURE__ */ r("div", { className: "flex items-center justify-between px-ds-03 py-ds-04 border-t border-border-subtle", children: [
|
|
418
|
+
/* @__PURE__ */ r("span", { className: "text-ds-sm text-text-secondary", children: [
|
|
419
|
+
o.getFilteredRowModel().rows.length,
|
|
420
|
+
" total rows"
|
|
421
|
+
] }),
|
|
422
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-ds-03", children: [
|
|
423
|
+
/* @__PURE__ */ l(
|
|
424
|
+
"select",
|
|
425
|
+
{
|
|
426
|
+
value: o.getState().pagination.pageSize,
|
|
427
|
+
onChange: (e) => {
|
|
428
|
+
o.setPageSize(Number(e.target.value));
|
|
429
|
+
},
|
|
430
|
+
"aria-label": "Rows per page",
|
|
431
|
+
className: i(
|
|
432
|
+
"h-ds-sm rounded-ds-md",
|
|
433
|
+
"border border-border bg-field",
|
|
434
|
+
"px-ds-03 text-ds-sm",
|
|
435
|
+
"text-text-primary"
|
|
436
|
+
),
|
|
437
|
+
children: (W ?? [10, 20, 50, 100]).map((e) => /* @__PURE__ */ r("option", { value: e, children: [
|
|
438
|
+
e,
|
|
439
|
+
" rows"
|
|
440
|
+
] }, e))
|
|
441
|
+
}
|
|
442
|
+
),
|
|
443
|
+
/* @__PURE__ */ l(
|
|
444
|
+
"button",
|
|
445
|
+
{
|
|
446
|
+
type: "button",
|
|
447
|
+
disabled: !o.getCanPreviousPage(),
|
|
448
|
+
onClick: () => o.previousPage(),
|
|
449
|
+
"aria-label": "Previous page",
|
|
450
|
+
className: i(
|
|
451
|
+
"h-ds-sm w-ds-sm flex items-center justify-center",
|
|
452
|
+
"rounded-ds-md border border-border",
|
|
453
|
+
"enabled:hover:bg-layer-02",
|
|
454
|
+
"disabled:opacity-[0.38] disabled:cursor-not-allowed",
|
|
455
|
+
"transition-colors"
|
|
456
|
+
),
|
|
457
|
+
children: /* @__PURE__ */ l($e, { size: 16, "aria-hidden": "true" })
|
|
458
|
+
}
|
|
459
|
+
),
|
|
460
|
+
/* @__PURE__ */ r("span", { className: "text-ds-sm text-text-secondary", children: [
|
|
461
|
+
"Page ",
|
|
462
|
+
o.getState().pagination.pageIndex + 1,
|
|
463
|
+
" of",
|
|
464
|
+
" ",
|
|
465
|
+
o.getPageCount()
|
|
466
|
+
] }),
|
|
467
|
+
/* @__PURE__ */ l(
|
|
468
|
+
"button",
|
|
469
|
+
{
|
|
470
|
+
type: "button",
|
|
471
|
+
disabled: !o.getCanNextPage(),
|
|
472
|
+
onClick: () => o.nextPage(),
|
|
473
|
+
"aria-label": "Next page",
|
|
474
|
+
className: i(
|
|
475
|
+
"h-ds-sm w-ds-sm flex items-center justify-center",
|
|
476
|
+
"rounded-ds-md border border-border",
|
|
477
|
+
"enabled:hover:bg-layer-02",
|
|
478
|
+
"disabled:opacity-[0.38] disabled:cursor-not-allowed",
|
|
479
|
+
"transition-colors"
|
|
480
|
+
),
|
|
481
|
+
children: /* @__PURE__ */ l(L, { size: 16, "aria-hidden": "true" })
|
|
482
|
+
}
|
|
483
|
+
)
|
|
484
|
+
] })
|
|
485
|
+
] })
|
|
486
|
+
] });
|
|
487
|
+
}
|
|
488
|
+
Ge.displayName = "DataTable";
|
|
489
|
+
export {
|
|
490
|
+
Ge as DataTable
|
|
491
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as DialogPrimitive from '@primitives/react-dialog';
|
|
3
|
+
/**
|
|
4
|
+
* Dialog compound component — accessible modal overlay with focus trap and Escape dismissal.
|
|
5
|
+
*
|
|
6
|
+
* **Parts (in composition order):**
|
|
7
|
+
* - `Dialog` — manages open/closed state (this root)
|
|
8
|
+
* - `DialogTrigger` — element that opens the dialog (use `asChild` to render your own button)
|
|
9
|
+
* - `DialogContent` — the modal panel (auto-includes portal, overlay, and close button)
|
|
10
|
+
* - `DialogHeader` — optional layout wrapper for title + description
|
|
11
|
+
* - `DialogTitle` — required for accessibility (sets the dialog's ARIA label)
|
|
12
|
+
* - `DialogDescription` — optional subtitle text
|
|
13
|
+
* - `DialogFooter` — optional layout wrapper for action buttons
|
|
14
|
+
* - `DialogClose` — manual close trigger (a close button is already built into DialogContent)
|
|
15
|
+
* - `DialogContentRaw` — use instead of DialogContent when you need full portal/overlay control
|
|
16
|
+
* - `DialogPortal` — low-level portal wrapper (exported for custom layout; used internally by DialogContent)
|
|
17
|
+
* - `DialogOverlay` — the backdrop element (exported for custom overlay styling or positioning)
|
|
18
|
+
*
|
|
19
|
+
* @compound
|
|
20
|
+
* @example
|
|
21
|
+
* // Confirmation dialog:
|
|
22
|
+
* <Dialog>
|
|
23
|
+
* <DialogTrigger asChild>
|
|
24
|
+
* <Button variant="error">Delete project</Button>
|
|
25
|
+
* </DialogTrigger>
|
|
26
|
+
* <DialogContent>
|
|
27
|
+
* <DialogHeader>
|
|
28
|
+
* <DialogTitle>Are you absolutely sure?</DialogTitle>
|
|
29
|
+
* <DialogDescription>
|
|
30
|
+
* This action cannot be undone. This will permanently delete your project.
|
|
31
|
+
* </DialogDescription>
|
|
32
|
+
* </DialogHeader>
|
|
33
|
+
* <DialogFooter>
|
|
34
|
+
* <DialogClose asChild><Button variant="secondary">Cancel</Button></DialogClose>
|
|
35
|
+
* <Button variant="error" onClick={handleDelete}>Delete</Button>
|
|
36
|
+
* </DialogFooter>
|
|
37
|
+
* </DialogContent>
|
|
38
|
+
* </Dialog>
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // Controlled open state (no trigger in markup):
|
|
42
|
+
* const [open, setOpen] = useState(false)
|
|
43
|
+
* <Dialog open={open} onOpenChange={setOpen}>
|
|
44
|
+
* <DialogContent>
|
|
45
|
+
* <DialogTitle>Edit profile</DialogTitle>
|
|
46
|
+
* // form fields
|
|
47
|
+
* </DialogContent>
|
|
48
|
+
* </Dialog>
|
|
49
|
+
*/
|
|
50
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
51
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
52
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
53
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
54
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
+
/**
|
|
57
|
+
* DialogContentRaw -- a minimal forwardRef wrapper around the primitive Content.
|
|
58
|
+
* Unlike DialogContent, it does NOT include Portal, Overlay, or CloseButton.
|
|
59
|
+
* Use this when you need full control over portal/overlay/close behaviour
|
|
60
|
+
* (e.g. CommandPalette in shared/).
|
|
61
|
+
*/
|
|
62
|
+
declare const DialogContentRaw: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
declare const DialogHeader: {
|
|
64
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
displayName: string;
|
|
66
|
+
};
|
|
67
|
+
declare const DialogFooter: {
|
|
68
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
displayName: string;
|
|
70
|
+
};
|
|
71
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
72
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
73
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogContentRaw, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
74
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/ui/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAA;AAK3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,QAAA,MAAM,MAAM,uCAAuB,CAAA;AAEnC,QAAA,MAAM,aAAa,8GAA0B,CAAA;AAE7C,QAAA,MAAM,YAAY,6CAAyB,CAAA;AAE3C,QAAA,MAAM,WAAW,4GAAwB,CAAA;AAEzC,QAAA,MAAM,aAAa,8JAYjB,CAAA;AAGF,QAAA,MAAM,aAAa,8JAqBjB,CAAA;AAGF;;;;;GAKG;AACH,QAAA,MAAM,gBAAgB,8JASpB,CAAA;AAGF,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAA;AAGD,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAA;AAGD,QAAA,MAAM,WAAW,oKAYf,CAAA;AAGF,QAAA,MAAM,iBAAiB,8KASrB,CAAA;AAGF,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAA"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { Root as g, Close as r, Portal as y, Trigger as x, Content as i, Description as n, Overlay as c, Title as m } from "../primitives/react-dialog.js";
|
|
4
|
+
import { IconX as N } from "@tabler/icons-react";
|
|
5
|
+
import { cn as s } from "./lib/utils.js";
|
|
6
|
+
const F = g, H = x, u = y, O = r, f = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
7
|
+
c,
|
|
8
|
+
{
|
|
9
|
+
ref: t,
|
|
10
|
+
className: s(
|
|
11
|
+
"fixed inset-0 z-overlay bg-overlay duration-moderate-02 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
12
|
+
e
|
|
13
|
+
),
|
|
14
|
+
...a
|
|
15
|
+
}
|
|
16
|
+
));
|
|
17
|
+
f.displayName = c.displayName;
|
|
18
|
+
const D = l.forwardRef(({ className: e, children: a, ...t }, p) => /* @__PURE__ */ d(u, { children: [
|
|
19
|
+
/* @__PURE__ */ o(f, {}),
|
|
20
|
+
/* @__PURE__ */ d(
|
|
21
|
+
i,
|
|
22
|
+
{
|
|
23
|
+
ref: p,
|
|
24
|
+
className: s(
|
|
25
|
+
"fixed left-[50%] top-[50%] z-modal grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-ds-05 border border-border bg-layer-01 p-ds-06 shadow-04 rounded-ds-xl duration-moderate-02 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
|
|
26
|
+
e
|
|
27
|
+
),
|
|
28
|
+
...t,
|
|
29
|
+
children: [
|
|
30
|
+
a,
|
|
31
|
+
/* @__PURE__ */ d(r, { className: "absolute right-ds-05 top-ds-05 rounded-ds-sm text-icon-secondary transition-colors hover:text-icon-primary hover:bg-field focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus disabled:pointer-events-none", children: [
|
|
32
|
+
/* @__PURE__ */ o(N, { className: "h-ico-lg w-ico-lg" }),
|
|
33
|
+
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
|
34
|
+
] })
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
] }));
|
|
39
|
+
D.displayName = i.displayName;
|
|
40
|
+
const b = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
41
|
+
i,
|
|
42
|
+
{
|
|
43
|
+
ref: t,
|
|
44
|
+
className: s(e),
|
|
45
|
+
...a
|
|
46
|
+
}
|
|
47
|
+
));
|
|
48
|
+
b.displayName = "DialogContentRaw";
|
|
49
|
+
const v = ({
|
|
50
|
+
className: e,
|
|
51
|
+
...a
|
|
52
|
+
}) => /* @__PURE__ */ o(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
className: s(
|
|
56
|
+
"flex flex-col space-y-ds-02b text-center sm:text-left",
|
|
57
|
+
e
|
|
58
|
+
),
|
|
59
|
+
...a
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
v.displayName = "DialogHeader";
|
|
63
|
+
const w = ({
|
|
64
|
+
className: e,
|
|
65
|
+
...a
|
|
66
|
+
}) => /* @__PURE__ */ o(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: s(
|
|
70
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-ds-03",
|
|
71
|
+
e
|
|
72
|
+
),
|
|
73
|
+
...a
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
w.displayName = "DialogFooter";
|
|
77
|
+
const h = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
78
|
+
m,
|
|
79
|
+
{
|
|
80
|
+
ref: t,
|
|
81
|
+
className: s(
|
|
82
|
+
"text-ds-lg font-semibold",
|
|
83
|
+
e
|
|
84
|
+
),
|
|
85
|
+
...a
|
|
86
|
+
}
|
|
87
|
+
));
|
|
88
|
+
h.displayName = m.displayName;
|
|
89
|
+
const R = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
90
|
+
n,
|
|
91
|
+
{
|
|
92
|
+
ref: t,
|
|
93
|
+
className: s("text-ds-md text-text-secondary", e),
|
|
94
|
+
...a
|
|
95
|
+
}
|
|
96
|
+
));
|
|
97
|
+
R.displayName = n.displayName;
|
|
98
|
+
export {
|
|
99
|
+
F as Dialog,
|
|
100
|
+
O as DialogClose,
|
|
101
|
+
D as DialogContent,
|
|
102
|
+
b as DialogContentRaw,
|
|
103
|
+
R as DialogDescription,
|
|
104
|
+
w as DialogFooter,
|
|
105
|
+
v as DialogHeader,
|
|
106
|
+
f as DialogOverlay,
|
|
107
|
+
u as DialogPortal,
|
|
108
|
+
h as DialogTitle,
|
|
109
|
+
H as DialogTrigger
|
|
110
|
+
};
|