@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,131 @@
|
|
|
1
|
+
import { jsxs as i, Fragment as k, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as q, useState as w, useEffect as D } from "react";
|
|
3
|
+
import { pie as J, arc as j } from "d3-shape";
|
|
4
|
+
import { cn as K } from "../lib/utils.js";
|
|
5
|
+
import { Legend as Q } from "./_internal/legend.js";
|
|
6
|
+
import { useChartTooltip as U, ChartTooltip as V } from "./_internal/tooltip.js";
|
|
7
|
+
import { resolveColor as Z } from "./_internal/colors.js";
|
|
8
|
+
import { useReducedMotion as _ } from "./_internal/animation.js";
|
|
9
|
+
function ee({
|
|
10
|
+
data: c,
|
|
11
|
+
variant: v = "pie",
|
|
12
|
+
innerRadius: L = 0.6,
|
|
13
|
+
padAngle: z = 0,
|
|
14
|
+
cornerRadius: A = 0,
|
|
15
|
+
height: u = 300,
|
|
16
|
+
showTooltip: x = !0,
|
|
17
|
+
showLegend: F = !1,
|
|
18
|
+
showLabels: P = !1,
|
|
19
|
+
animate: te = !0,
|
|
20
|
+
className: B,
|
|
21
|
+
centerLabel: R
|
|
22
|
+
}) {
|
|
23
|
+
const d = q(null), [l, E] = w(0), [H, b] = w(null), { tooltip: I, show: O, hide: S } = U();
|
|
24
|
+
_(), D(() => {
|
|
25
|
+
if (!d.current) return;
|
|
26
|
+
const e = new ResizeObserver((t) => {
|
|
27
|
+
const o = t[0];
|
|
28
|
+
o && E(o.contentRect.width);
|
|
29
|
+
});
|
|
30
|
+
return e.observe(d.current), () => e.disconnect();
|
|
31
|
+
}, []);
|
|
32
|
+
const m = (l > 0 ? Math.min(l, u) : u) / 2, n = v === "donut" ? m * L : 0, y = c.map((e, t) => Z(e.color, t)), s = c.reduce((e, t) => e + t.value, 0), g = J().value((e) => e.value).padAngle(z).sort(null)(c), M = j().innerRadius(n).outerRadius(m - 2).cornerRadius(A), $ = n + (m - 2 - n) * 0.7, T = j().innerRadius($).outerRadius($);
|
|
33
|
+
return /* @__PURE__ */ i("div", { ref: d, className: K("relative w-full", B), children: [
|
|
34
|
+
l > 0 && /* @__PURE__ */ i(k, { children: [
|
|
35
|
+
/* @__PURE__ */ r(
|
|
36
|
+
"svg",
|
|
37
|
+
{
|
|
38
|
+
width: l,
|
|
39
|
+
height: u,
|
|
40
|
+
role: "img",
|
|
41
|
+
"aria-label": "Pie chart",
|
|
42
|
+
children: /* @__PURE__ */ i("g", { transform: `translate(${l / 2},${u / 2})`, children: [
|
|
43
|
+
g.map((e, t) => {
|
|
44
|
+
const o = M(e);
|
|
45
|
+
if (!o) return null;
|
|
46
|
+
const [f, p] = M.centroid(e), C = Math.atan2(p, f), W = Math.cos(C) * 4, X = Math.sin(C) * 4, Y = H === t;
|
|
47
|
+
return /* @__PURE__ */ r(
|
|
48
|
+
"path",
|
|
49
|
+
{
|
|
50
|
+
d: o,
|
|
51
|
+
fill: y[t],
|
|
52
|
+
className: "cursor-pointer transition-transform",
|
|
53
|
+
style: {
|
|
54
|
+
transform: Y ? `translate(${W}px, ${X}px)` : void 0
|
|
55
|
+
},
|
|
56
|
+
onMouseEnter: () => b(t),
|
|
57
|
+
onMouseMove: (h) => {
|
|
58
|
+
var N;
|
|
59
|
+
if (x) {
|
|
60
|
+
const a = (N = h.currentTarget.closest("div")) == null ? void 0 : N.getBoundingClientRect(), G = s > 0 ? (e.data.value / s * 100).toFixed(1) : "0";
|
|
61
|
+
O(
|
|
62
|
+
h.clientX - ((a == null ? void 0 : a.left) ?? 0),
|
|
63
|
+
h.clientY - ((a == null ? void 0 : a.top) ?? 0),
|
|
64
|
+
/* @__PURE__ */ i("div", { children: [
|
|
65
|
+
/* @__PURE__ */ r("div", { className: "font-medium", children: e.data.label }),
|
|
66
|
+
/* @__PURE__ */ i("div", { children: [
|
|
67
|
+
e.data.value.toLocaleString(),
|
|
68
|
+
" (",
|
|
69
|
+
G,
|
|
70
|
+
"%)"
|
|
71
|
+
] })
|
|
72
|
+
] })
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
onMouseLeave: () => {
|
|
77
|
+
b(null), S();
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
`slice-${e.data.label}-${t}`
|
|
81
|
+
);
|
|
82
|
+
}),
|
|
83
|
+
P && g.map((e, t) => {
|
|
84
|
+
const [o, f] = T.centroid(e), p = s > 0 ? (e.data.value / s * 100).toFixed(0) : "0";
|
|
85
|
+
return s > 0 && e.data.value / s < 0.03 ? null : /* @__PURE__ */ i(
|
|
86
|
+
"text",
|
|
87
|
+
{
|
|
88
|
+
x: o,
|
|
89
|
+
y: f,
|
|
90
|
+
textAnchor: "middle",
|
|
91
|
+
dominantBaseline: "central",
|
|
92
|
+
className: "pointer-events-none fill-text-on-color text-ds-xs font-medium",
|
|
93
|
+
children: [
|
|
94
|
+
p,
|
|
95
|
+
"%"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
`label-${e.data.label}-${t}`
|
|
99
|
+
);
|
|
100
|
+
}),
|
|
101
|
+
v === "donut" && R && n > 0 && /* @__PURE__ */ r(
|
|
102
|
+
"foreignObject",
|
|
103
|
+
{
|
|
104
|
+
x: -n * 0.7,
|
|
105
|
+
y: -n * 0.7,
|
|
106
|
+
width: n * 1.4,
|
|
107
|
+
height: n * 1.4,
|
|
108
|
+
children: /* @__PURE__ */ r("div", { className: "flex h-full w-full items-center justify-center text-center text-text-primary", children: R })
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
] })
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
x && /* @__PURE__ */ r(V, { state: I })
|
|
115
|
+
] }),
|
|
116
|
+
F && /* @__PURE__ */ r(
|
|
117
|
+
Q,
|
|
118
|
+
{
|
|
119
|
+
items: c.map((e, t) => ({
|
|
120
|
+
label: e.label,
|
|
121
|
+
color: y[t]
|
|
122
|
+
})),
|
|
123
|
+
className: "mt-ds-04"
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
] });
|
|
127
|
+
}
|
|
128
|
+
ee.displayName = "PieChart";
|
|
129
|
+
export {
|
|
130
|
+
ee as PieChart
|
|
131
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface RadarChartProps {
|
|
2
|
+
/** Data array (one entry per data point / axis) */
|
|
3
|
+
data: Record<string, string | number>[];
|
|
4
|
+
/** Axis labels (3-8 axes) */
|
|
5
|
+
axes: string[];
|
|
6
|
+
/** Series to plot */
|
|
7
|
+
series: {
|
|
8
|
+
key: string;
|
|
9
|
+
label: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
}[];
|
|
12
|
+
/** Max value (auto-detect if not set) */
|
|
13
|
+
maxValue?: number;
|
|
14
|
+
/** Number of concentric grid rings (default: 5) */
|
|
15
|
+
levels?: number;
|
|
16
|
+
/** Fill opacity for the data polygon (default: 0.25) */
|
|
17
|
+
fillOpacity?: number;
|
|
18
|
+
/** Show dots at vertices */
|
|
19
|
+
showDots?: boolean;
|
|
20
|
+
/** Chart height (default: 300) */
|
|
21
|
+
height?: number;
|
|
22
|
+
/** Show tooltip on hover */
|
|
23
|
+
showTooltip?: boolean;
|
|
24
|
+
/** Show legend */
|
|
25
|
+
showLegend?: boolean;
|
|
26
|
+
/** Animate on mount */
|
|
27
|
+
animate?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function RadarChart({ data, axes, series, maxValue: maxValueProp, levels, fillOpacity, showDots, height, showTooltip, showLegend, animate, className, }: RadarChartProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare namespace RadarChart {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=radar-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radar-chart.d.ts","sourceRoot":"","sources":["../../../src/ui/charts/radar-chart.tsx"],"names":[],"mappings":"AAWA,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;IACvC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,qBAAqB;IACrB,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACxD,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,4BAA4B;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kBAAkB;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,uBAAuB;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,QAAQ,EAAE,YAAY,EACtB,MAAU,EACV,WAAkB,EAClB,QAAgB,EAChB,MAAY,EACZ,WAAkB,EAClB,UAAkB,EAClB,OAAc,EACd,SAAS,GACV,EAAE,eAAe,2CAyQjB;yBAtRe,UAAU"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { jsxs as i, Fragment as B, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as T, useState as X, useEffect as Y } from "react";
|
|
3
|
+
import { lineRadial as D, curveLinearClosed as E } from "d3-shape";
|
|
4
|
+
import { cn as F } from "../lib/utils.js";
|
|
5
|
+
import { Legend as O } from "./_internal/legend.js";
|
|
6
|
+
import { useChartTooltip as q, ChartTooltip as G } from "./_internal/tooltip.js";
|
|
7
|
+
import { resolveColor as H } from "./_internal/colors.js";
|
|
8
|
+
import { useReducedMotion as J } from "./_internal/animation.js";
|
|
9
|
+
function K({
|
|
10
|
+
data: g,
|
|
11
|
+
axes: d,
|
|
12
|
+
series: u,
|
|
13
|
+
maxValue: R,
|
|
14
|
+
levels: h = 5,
|
|
15
|
+
fillOpacity: $ = 0.25,
|
|
16
|
+
showDots: C = !1,
|
|
17
|
+
height: M = 300,
|
|
18
|
+
showTooltip: k = !0,
|
|
19
|
+
showLegend: P = !1,
|
|
20
|
+
animate: Q = !0,
|
|
21
|
+
className: L
|
|
22
|
+
}) {
|
|
23
|
+
const v = T(null), [p, S] = X(0), { tooltip: W, show: _, hide: w } = q();
|
|
24
|
+
J(), Y(() => {
|
|
25
|
+
if (!v.current) return;
|
|
26
|
+
const e = new ResizeObserver((t) => {
|
|
27
|
+
const r = t[0];
|
|
28
|
+
r && S(r.contentRect.width);
|
|
29
|
+
});
|
|
30
|
+
return e.observe(v.current), () => e.disconnect();
|
|
31
|
+
}, []);
|
|
32
|
+
const c = (p > 0 ? Math.min(p, M) : M) / 2 - 40, f = u.map((e, t) => H(e.color, t)), x = R ?? Math.max(
|
|
33
|
+
...g.flatMap((e) => u.map((t) => Number(e[t.key]) || 0)),
|
|
34
|
+
1
|
|
35
|
+
), m = 2 * Math.PI / d.length, I = D().radius((e) => c * e / x).angle((e, t) => t * m).curve(E), j = (e) => d.map((t, r) => {
|
|
36
|
+
var n;
|
|
37
|
+
return Number((n = g[r]) == null ? void 0 : n[e]) || 0;
|
|
38
|
+
}), A = (e, t) => {
|
|
39
|
+
const r = m * e - Math.PI / 2, n = c * t / x;
|
|
40
|
+
return {
|
|
41
|
+
x: n * Math.cos(r),
|
|
42
|
+
y: n * Math.sin(r)
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ i("div", { ref: v, className: F("relative w-full", L), children: [
|
|
46
|
+
p > 0 && /* @__PURE__ */ i(B, { children: [
|
|
47
|
+
/* @__PURE__ */ s(
|
|
48
|
+
"svg",
|
|
49
|
+
{
|
|
50
|
+
width: p,
|
|
51
|
+
height: M,
|
|
52
|
+
role: "img",
|
|
53
|
+
"aria-label": "Radar chart",
|
|
54
|
+
children: /* @__PURE__ */ i("g", { transform: `translate(${p / 2},${M / 2})`, children: [
|
|
55
|
+
Array.from({ length: h }, (e, t) => {
|
|
56
|
+
const r = c / h * (t + 1), n = d.map((l, a) => {
|
|
57
|
+
const o = m * a - Math.PI / 2;
|
|
58
|
+
return `${r * Math.cos(o)},${r * Math.sin(o)}`;
|
|
59
|
+
}).join(" ");
|
|
60
|
+
return /* @__PURE__ */ s(
|
|
61
|
+
"polygon",
|
|
62
|
+
{
|
|
63
|
+
points: n,
|
|
64
|
+
fill: "none",
|
|
65
|
+
stroke: "var(--color-border-subtle)",
|
|
66
|
+
strokeDasharray: "3,3",
|
|
67
|
+
strokeWidth: 1
|
|
68
|
+
},
|
|
69
|
+
`grid-${t}`
|
|
70
|
+
);
|
|
71
|
+
}),
|
|
72
|
+
d.map((e, t) => {
|
|
73
|
+
const r = m * t - Math.PI / 2, n = c * Math.cos(r), l = c * Math.sin(r);
|
|
74
|
+
return /* @__PURE__ */ s(
|
|
75
|
+
"line",
|
|
76
|
+
{
|
|
77
|
+
x1: 0,
|
|
78
|
+
y1: 0,
|
|
79
|
+
x2: n,
|
|
80
|
+
y2: l,
|
|
81
|
+
stroke: "var(--color-border-subtle)",
|
|
82
|
+
strokeWidth: 1
|
|
83
|
+
},
|
|
84
|
+
`axis-${t}`
|
|
85
|
+
);
|
|
86
|
+
}),
|
|
87
|
+
d.map((e, t) => {
|
|
88
|
+
const r = m * t - Math.PI / 2, n = c + 18, l = n * Math.cos(r), a = n * Math.sin(r);
|
|
89
|
+
let o = "middle";
|
|
90
|
+
return Math.abs(Math.cos(r)) > 0.1 && (o = Math.cos(r) > 0 ? "start" : "end"), /* @__PURE__ */ s(
|
|
91
|
+
"text",
|
|
92
|
+
{
|
|
93
|
+
x: l,
|
|
94
|
+
y: a,
|
|
95
|
+
textAnchor: o,
|
|
96
|
+
dominantBaseline: "central",
|
|
97
|
+
className: "fill-text-secondary text-ds-xs",
|
|
98
|
+
children: e
|
|
99
|
+
},
|
|
100
|
+
`label-${t}`
|
|
101
|
+
);
|
|
102
|
+
}),
|
|
103
|
+
Array.from({ length: h }, (e, t) => {
|
|
104
|
+
const r = Math.round(x / h * (t + 1)), n = c / h * (t + 1), l = -Math.PI / 2, a = n * Math.cos(l) + 4, o = n * Math.sin(l);
|
|
105
|
+
return /* @__PURE__ */ s(
|
|
106
|
+
"text",
|
|
107
|
+
{
|
|
108
|
+
x: a,
|
|
109
|
+
y: o,
|
|
110
|
+
textAnchor: "start",
|
|
111
|
+
dominantBaseline: "auto",
|
|
112
|
+
className: "fill-[var(--color-text-muted)] text-ds-xs",
|
|
113
|
+
children: r
|
|
114
|
+
},
|
|
115
|
+
`level-label-${t}`
|
|
116
|
+
);
|
|
117
|
+
}),
|
|
118
|
+
u.map((e, t) => {
|
|
119
|
+
const r = j(e.key), n = I(r);
|
|
120
|
+
return n ? /* @__PURE__ */ i("g", { children: [
|
|
121
|
+
/* @__PURE__ */ s(
|
|
122
|
+
"path",
|
|
123
|
+
{
|
|
124
|
+
d: n,
|
|
125
|
+
fill: f[t],
|
|
126
|
+
fillOpacity: $,
|
|
127
|
+
stroke: f[t],
|
|
128
|
+
strokeWidth: 2,
|
|
129
|
+
strokeLinejoin: "round"
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
C && r.map((l, a) => {
|
|
133
|
+
const { x: o, y } = A(a, l);
|
|
134
|
+
return /* @__PURE__ */ s(
|
|
135
|
+
"circle",
|
|
136
|
+
{
|
|
137
|
+
cx: o,
|
|
138
|
+
cy: y,
|
|
139
|
+
r: 4,
|
|
140
|
+
fill: f[t],
|
|
141
|
+
stroke: "var(--color-layer-01)",
|
|
142
|
+
strokeWidth: 2,
|
|
143
|
+
className: "transition-opacity"
|
|
144
|
+
},
|
|
145
|
+
`dot-${e.key}-${a}`
|
|
146
|
+
);
|
|
147
|
+
})
|
|
148
|
+
] }, e.key) : null;
|
|
149
|
+
}),
|
|
150
|
+
k && d.map((e, t) => {
|
|
151
|
+
const r = m * t - Math.PI / 2, n = c * Math.cos(r), l = c * Math.sin(r);
|
|
152
|
+
return /* @__PURE__ */ s(
|
|
153
|
+
"circle",
|
|
154
|
+
{
|
|
155
|
+
cx: n,
|
|
156
|
+
cy: l,
|
|
157
|
+
r: 16,
|
|
158
|
+
fill: "transparent",
|
|
159
|
+
className: "cursor-pointer",
|
|
160
|
+
onMouseMove: (a) => {
|
|
161
|
+
var y;
|
|
162
|
+
const o = (y = a.currentTarget.closest("div")) == null ? void 0 : y.getBoundingClientRect();
|
|
163
|
+
_(
|
|
164
|
+
a.clientX - ((o == null ? void 0 : o.left) ?? 0),
|
|
165
|
+
a.clientY - ((o == null ? void 0 : o.top) ?? 0),
|
|
166
|
+
/* @__PURE__ */ i("div", { children: [
|
|
167
|
+
/* @__PURE__ */ s("div", { className: "font-medium", children: e }),
|
|
168
|
+
u.map((b, V) => {
|
|
169
|
+
var N;
|
|
170
|
+
const z = Number((N = g[t]) == null ? void 0 : N[b.key]) || 0;
|
|
171
|
+
return /* @__PURE__ */ i(
|
|
172
|
+
"div",
|
|
173
|
+
{
|
|
174
|
+
className: "flex items-center gap-ds-02",
|
|
175
|
+
children: [
|
|
176
|
+
/* @__PURE__ */ s(
|
|
177
|
+
"span",
|
|
178
|
+
{
|
|
179
|
+
className: "inline-block h-2 w-2 rounded-ds-full",
|
|
180
|
+
style: { backgroundColor: f[V] }
|
|
181
|
+
}
|
|
182
|
+
),
|
|
183
|
+
/* @__PURE__ */ i("span", { className: "text-text-secondary", children: [
|
|
184
|
+
b.label,
|
|
185
|
+
":"
|
|
186
|
+
] }),
|
|
187
|
+
" ",
|
|
188
|
+
z.toLocaleString()
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
b.key
|
|
192
|
+
);
|
|
193
|
+
})
|
|
194
|
+
] })
|
|
195
|
+
);
|
|
196
|
+
},
|
|
197
|
+
onMouseLeave: w
|
|
198
|
+
},
|
|
199
|
+
`hover-${t}`
|
|
200
|
+
);
|
|
201
|
+
})
|
|
202
|
+
] })
|
|
203
|
+
}
|
|
204
|
+
),
|
|
205
|
+
k && /* @__PURE__ */ s(G, { state: W })
|
|
206
|
+
] }),
|
|
207
|
+
P && /* @__PURE__ */ s(
|
|
208
|
+
O,
|
|
209
|
+
{
|
|
210
|
+
items: u.map((e, t) => ({
|
|
211
|
+
label: e.label,
|
|
212
|
+
color: f[t]
|
|
213
|
+
})),
|
|
214
|
+
className: "mt-ds-04"
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
] });
|
|
218
|
+
}
|
|
219
|
+
K.displayName = "RadarChart";
|
|
220
|
+
export {
|
|
221
|
+
K as RadarChart
|
|
222
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface SparklineProps {
|
|
2
|
+
/** Numeric data points */
|
|
3
|
+
data: number[];
|
|
4
|
+
/** Visual variant */
|
|
5
|
+
variant?: 'line' | 'bar' | 'area';
|
|
6
|
+
/** Width (default: 120) */
|
|
7
|
+
width?: number;
|
|
8
|
+
/** Height (default: 32) */
|
|
9
|
+
height?: number;
|
|
10
|
+
/** Color token or CSS color */
|
|
11
|
+
color?: string;
|
|
12
|
+
/** Show a dot on the last data point (line/area only) */
|
|
13
|
+
showLastDot?: boolean;
|
|
14
|
+
/** Line stroke width (line/area only, default: 1.5) */
|
|
15
|
+
strokeWidth?: number;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function Sparkline({ data, variant, width, height, color, showLastDot, strokeWidth, className, }: SparklineProps): import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
+
export declare namespace Sparkline {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=sparkline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sparkline.d.ts","sourceRoot":"","sources":["../../../src/ui/charts/sparkline.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,cAAc;IAC7B,0BAA0B;IAC1B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;IACjC,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2BAA2B;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yDAAyD;IACzD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,OAAgB,EAChB,KAAW,EACX,MAAW,EACX,KAAK,EACL,WAAmB,EACnB,WAAiB,EACjB,SAAS,GACV,EAAE,cAAc,kDA8IhB;yBAvJe,SAAS"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { area as q, curveMonotoneX as G, line as D } from "d3-shape";
|
|
3
|
+
import { scaleLinear as X } from "d3-scale";
|
|
4
|
+
import { cn as S } from "../lib/utils.js";
|
|
5
|
+
import { resolveColor as z } from "./_internal/colors.js";
|
|
6
|
+
function A({
|
|
7
|
+
data: n,
|
|
8
|
+
variant: f = "line",
|
|
9
|
+
width: p = 120,
|
|
10
|
+
height: g = 32,
|
|
11
|
+
color: Y,
|
|
12
|
+
showLastDot: j = !1,
|
|
13
|
+
strokeWidth: a = 1.5,
|
|
14
|
+
className: x
|
|
15
|
+
}) {
|
|
16
|
+
const i = z(Y, 0);
|
|
17
|
+
if (!n.length) return null;
|
|
18
|
+
const e = f === "bar" ? 1 : a, L = p - e * 2, b = g - e * 2, t = X().domain([0, Math.max(n.length - 1, 1)]).range([e, e + L]), u = Math.min(...n), y = Math.max(...n), _ = u === y ? [u - 1, y + 1] : [u, y], c = X().domain(_).range([e + b, e]);
|
|
19
|
+
if (f === "bar") {
|
|
20
|
+
const r = Math.max(
|
|
21
|
+
1,
|
|
22
|
+
(L - 1 * (n.length - 1)) / n.length
|
|
23
|
+
), k = e + b;
|
|
24
|
+
return /* @__PURE__ */ o(
|
|
25
|
+
"svg",
|
|
26
|
+
{
|
|
27
|
+
width: p,
|
|
28
|
+
height: g,
|
|
29
|
+
role: "img",
|
|
30
|
+
"aria-label": "Sparkline bar chart",
|
|
31
|
+
className: S("inline-block align-middle", x),
|
|
32
|
+
children: n.map((M, h) => {
|
|
33
|
+
const v = e + h * (r + 1), l = c(M), m = Math.max(1, k - l);
|
|
34
|
+
return /* @__PURE__ */ o(
|
|
35
|
+
"rect",
|
|
36
|
+
{
|
|
37
|
+
x: v,
|
|
38
|
+
y: l,
|
|
39
|
+
width: r,
|
|
40
|
+
height: m,
|
|
41
|
+
rx: Math.min(1, r / 2),
|
|
42
|
+
fill: i
|
|
43
|
+
},
|
|
44
|
+
h
|
|
45
|
+
);
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
if (f === "area") {
|
|
51
|
+
const s = q().curve(G).x((l, m) => t(m)).y0(e + b).y1((l) => c(l)), r = D().curve(G).x((l, m) => t(m)).y((l) => c(l)), k = s(n) ?? "", M = r(n) ?? "", h = t(n.length - 1), v = c(n[n.length - 1]);
|
|
52
|
+
return /* @__PURE__ */ d(
|
|
53
|
+
"svg",
|
|
54
|
+
{
|
|
55
|
+
width: p,
|
|
56
|
+
height: g,
|
|
57
|
+
role: "img",
|
|
58
|
+
"aria-label": "Sparkline area chart",
|
|
59
|
+
className: S("inline-block align-middle", x),
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ o("path", { d: k, fill: i, opacity: 0.2 }),
|
|
62
|
+
/* @__PURE__ */ o(
|
|
63
|
+
"path",
|
|
64
|
+
{
|
|
65
|
+
d: M,
|
|
66
|
+
fill: "none",
|
|
67
|
+
stroke: i,
|
|
68
|
+
strokeWidth: a,
|
|
69
|
+
strokeLinejoin: "round",
|
|
70
|
+
strokeLinecap: "round"
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
j && /* @__PURE__ */ o(
|
|
74
|
+
"circle",
|
|
75
|
+
{
|
|
76
|
+
cx: h,
|
|
77
|
+
cy: v,
|
|
78
|
+
r: a + 1,
|
|
79
|
+
fill: i
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
const C = D().curve(G).x((s, r) => t(r)).y((s) => c(s))(n) ?? "", H = t(n.length - 1), N = c(n[n.length - 1]);
|
|
87
|
+
return /* @__PURE__ */ d(
|
|
88
|
+
"svg",
|
|
89
|
+
{
|
|
90
|
+
width: p,
|
|
91
|
+
height: g,
|
|
92
|
+
role: "img",
|
|
93
|
+
"aria-label": "Sparkline chart",
|
|
94
|
+
className: S("inline-block align-middle", x),
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ o(
|
|
97
|
+
"path",
|
|
98
|
+
{
|
|
99
|
+
d: C,
|
|
100
|
+
fill: "none",
|
|
101
|
+
stroke: i,
|
|
102
|
+
strokeWidth: a,
|
|
103
|
+
strokeLinejoin: "round",
|
|
104
|
+
strokeLinecap: "round"
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
j && /* @__PURE__ */ o(
|
|
108
|
+
"circle",
|
|
109
|
+
{
|
|
110
|
+
cx: H,
|
|
111
|
+
cy: N,
|
|
112
|
+
r: a + 1,
|
|
113
|
+
fill: i
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
A.displayName = "Sparkline";
|
|
121
|
+
export {
|
|
122
|
+
A as Sparkline
|
|
123
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from '@primitives/react-checkbox';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Props for Checkbox — a Radix-powered accessible checkbox with error state styling and
|
|
5
|
+
* an indeterminate state for "select all" row controls.
|
|
6
|
+
*
|
|
7
|
+
* **Indeterminate:** Pass `indeterminate={true}` to show the "−" dash (overrides `checked`).
|
|
8
|
+
* This is correct for "select all" headers when only some rows are selected.
|
|
9
|
+
*
|
|
10
|
+
* **Controlled:** Use `checked` + `onCheckedChange` for controlled usage.
|
|
11
|
+
* `onCheckedChange` receives `true | false | 'indeterminate'` from Radix.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // Basic controlled checkbox:
|
|
15
|
+
* <Checkbox checked={agreed} onCheckedChange={(v) => setAgreed(v === true)} />
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // Error state when required checkbox is not checked:
|
|
19
|
+
* <Checkbox error={!termsAccepted} checked={termsAccepted} onCheckedChange={(v) => setTerms(v === true)} />
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // "Select all" checkbox with indeterminate state:
|
|
23
|
+
* <Checkbox
|
|
24
|
+
* indeterminate={someSelected && !allSelected}
|
|
25
|
+
* checked={allSelected}
|
|
26
|
+
* onCheckedChange={(v) => toggleAll(v === true)}
|
|
27
|
+
* />
|
|
28
|
+
* // These are just a few ways — feel free to combine props creatively!
|
|
29
|
+
*/
|
|
30
|
+
export interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
|
|
31
|
+
error?: boolean;
|
|
32
|
+
indeterminate?: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
35
|
+
export { Checkbox };
|
|
36
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/ui/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,iBAAiB,MAAM,4BAA4B,CAAA;AAE/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC;IAClG,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,QAAA,MAAM,QAAQ,yFAiCZ,CAAA;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Checkbox as r, CheckboxIndicator as n } from "../primitives/react-checkbox.js";
|
|
3
|
+
import { IconMinus as m, IconCheck as l } from "@tabler/icons-react";
|
|
4
|
+
import * as b from "react";
|
|
5
|
+
import { cn as f } from "./lib/utils.js";
|
|
6
|
+
const h = b.forwardRef(({ className: o, error: i, indeterminate: a, checked: c, ...s }, d) => {
|
|
7
|
+
const t = a ? "indeterminate" : c;
|
|
8
|
+
return /* @__PURE__ */ e(
|
|
9
|
+
r,
|
|
10
|
+
{
|
|
11
|
+
ref: d,
|
|
12
|
+
checked: t,
|
|
13
|
+
className: f(
|
|
14
|
+
"peer h-ico-md w-ico-md shrink-0 rounded-ds-sm",
|
|
15
|
+
"border border-border-strong",
|
|
16
|
+
"bg-field",
|
|
17
|
+
"transition-colors duration-fast-01",
|
|
18
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2",
|
|
19
|
+
"disabled:cursor-not-allowed disabled:opacity-[0.38]",
|
|
20
|
+
"data-[state=checked]:bg-interactive data-[state=checked]:border-interactive data-[state=checked]:text-text-on-color",
|
|
21
|
+
"data-[state=indeterminate]:bg-interactive data-[state=indeterminate]:border-interactive data-[state=indeterminate]:text-text-on-color",
|
|
22
|
+
i && "border-border-error",
|
|
23
|
+
o
|
|
24
|
+
),
|
|
25
|
+
...s,
|
|
26
|
+
children: /* @__PURE__ */ e(n, { className: "flex items-center justify-center text-current", children: t === "indeterminate" ? /* @__PURE__ */ e(m, { className: "h-ico-sm w-ico-sm" }) : /* @__PURE__ */ e(l, { className: "h-ico-sm w-ico-sm" }) })
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
h.displayName = r.displayName;
|
|
31
|
+
export {
|
|
32
|
+
h as Checkbox
|
|
33
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const chipVariants: (props?: ({
|
|
4
|
+
variant?: "filled" | "outlined" | null | undefined;
|
|
5
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
+
color?: "primary" | "error" | "default" | "warning" | "success" | "cyan" | "indigo" | "orange" | "teal" | "info" | "amber" | "slate" | "emerald" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
type ChipColor = 'default' | 'primary' | 'success' | 'error' | 'warning' | 'info' | 'teal' | 'amber' | 'slate' | 'indigo' | 'cyan' | 'orange' | 'emerald';
|
|
9
|
+
/**
|
|
10
|
+
* Props for Chip — a compact label-tag component with a two-axis variant system.
|
|
11
|
+
*
|
|
12
|
+
* **Two axes:**
|
|
13
|
+
* - `variant` controls **shape**: `"filled"` (solid background, default) | `"outlined"` (border only)
|
|
14
|
+
* - `color` controls **intent/category**: `"default"` | `"primary"` | `"success"` | `"error"` |
|
|
15
|
+
* `"warning"` | `"info"` | `"teal"` | `"amber"` | `"slate"` | `"indigo"` | `"cyan"` | `"orange"` | `"emerald"`
|
|
16
|
+
*
|
|
17
|
+
* **Comparison with Badge:** Badge uses `variant=` for intent (e.g. `variant="success"`).
|
|
18
|
+
* Chip uses `color=` for intent. They are different — don't mix them up.
|
|
19
|
+
*
|
|
20
|
+
* **Important:** Use the `label` prop, NOT `children`. Chip does not render children.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // Basic label chip:
|
|
24
|
+
* <Chip label="In Progress" />
|
|
25
|
+
*
|
|
26
|
+
* // With intent color (use color=, not variant=):
|
|
27
|
+
* <Chip label="High Priority" color="warning" />
|
|
28
|
+
* <Chip label="Done" color="success" variant="outlined" />
|
|
29
|
+
*
|
|
30
|
+
* // Dismissible chip (e.g. in a filter bar):
|
|
31
|
+
* <Chip label="React" color="info" onDelete={() => removeFilter('react')} />
|
|
32
|
+
*
|
|
33
|
+
* // Clickable chip (renders as <button>):
|
|
34
|
+
* <Chip label="View details" color="primary" onClick={() => openPanel(id)} />
|
|
35
|
+
*
|
|
36
|
+
* // WRONG — children are not rendered (TypeScript error in strict mode):
|
|
37
|
+
* // <Chip>High Priority</Chip>
|
|
38
|
+
*
|
|
39
|
+
* // Badge comparison:
|
|
40
|
+
* // <Badge variant="success">Done</Badge> ← Badge uses variant= for intent
|
|
41
|
+
* // <Chip label="Done" color="success" /> ← Chip uses color= for intent
|
|
42
|
+
*/
|
|
43
|
+
type ChipProps = Omit<VariantProps<typeof chipVariants>, 'color'> & {
|
|
44
|
+
label: string;
|
|
45
|
+
color?: ChipColor;
|
|
46
|
+
icon?: React.ReactNode;
|
|
47
|
+
onClick?: React.MouseEventHandler;
|
|
48
|
+
onDelete?: () => void;
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
className?: string;
|
|
51
|
+
};
|
|
52
|
+
declare const Chip: React.ForwardRefExoticComponent<Omit<VariantProps<(props?: ({
|
|
53
|
+
variant?: "filled" | "outlined" | null | undefined;
|
|
54
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
55
|
+
color?: "primary" | "error" | "default" | "warning" | "success" | "cyan" | "indigo" | "orange" | "teal" | "info" | "amber" | "slate" | "emerald" | null | undefined;
|
|
56
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "color"> & {
|
|
57
|
+
label: string;
|
|
58
|
+
color?: ChipColor;
|
|
59
|
+
icon?: React.ReactNode;
|
|
60
|
+
onClick?: React.MouseEventHandler;
|
|
61
|
+
onDelete?: () => void;
|
|
62
|
+
disabled?: boolean;
|
|
63
|
+
className?: string;
|
|
64
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
65
|
+
export { Chip, chipVariants, type ChipProps };
|
|
66
|
+
//# sourceMappingURL=chip.d.ts.map
|