@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,152 @@
|
|
|
1
|
+
import { jsxs as v, jsx as r, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import { scaleBand as I, scaleLinear as H } from "d3-scale";
|
|
3
|
+
import { cn as k } from "../lib/utils.js";
|
|
4
|
+
import { ChartContainer as L } from "./chart-container.js";
|
|
5
|
+
import { Axis as x } from "./_internal/axes.js";
|
|
6
|
+
import { GridLines as tt } from "./_internal/grid-lines.js";
|
|
7
|
+
import { Legend as at } from "./_internal/legend.js";
|
|
8
|
+
import { useChartTooltip as rt, ChartTooltip as ot } from "./_internal/tooltip.js";
|
|
9
|
+
import { resolveColor as X } from "./_internal/colors.js";
|
|
10
|
+
import { useReducedMotion as nt } from "./_internal/animation.js";
|
|
11
|
+
function it({
|
|
12
|
+
data: g,
|
|
13
|
+
xKey: V,
|
|
14
|
+
yKey: C,
|
|
15
|
+
orientation: Y = "vertical",
|
|
16
|
+
stacked: s = !1,
|
|
17
|
+
grouped: N = !1,
|
|
18
|
+
color: n,
|
|
19
|
+
height: _ = 300,
|
|
20
|
+
showGrid: q = !0,
|
|
21
|
+
showTooltip: z = !0,
|
|
22
|
+
showLegend: D = !1,
|
|
23
|
+
animate: et = !0,
|
|
24
|
+
barRadius: E = 4,
|
|
25
|
+
xLabel: F,
|
|
26
|
+
yLabel: G,
|
|
27
|
+
seriesLabels: f,
|
|
28
|
+
className: J
|
|
29
|
+
}) {
|
|
30
|
+
const { tooltip: P, show: Q, hide: U } = rt();
|
|
31
|
+
nt();
|
|
32
|
+
const i = Y === "vertical", c = Array.isArray(C) ? C : [C], h = c.length > 1, S = h ? c.map(
|
|
33
|
+
(p, a) => X(
|
|
34
|
+
Array.isArray(n) ? n[a] : typeof n == "string" ? n : void 0,
|
|
35
|
+
a
|
|
36
|
+
)
|
|
37
|
+
) : [
|
|
38
|
+
X(
|
|
39
|
+
typeof n == "string" ? n : Array.isArray(n) ? n[0] : void 0,
|
|
40
|
+
0
|
|
41
|
+
)
|
|
42
|
+
];
|
|
43
|
+
return /* @__PURE__ */ v("div", { className: k("relative", J), children: [
|
|
44
|
+
/* @__PURE__ */ r(L, { height: _, children: ({ width: p, height: a, margin: lt }) => {
|
|
45
|
+
const Z = g.map((e) => String(e[V]));
|
|
46
|
+
let A;
|
|
47
|
+
s ? A = Math.max(
|
|
48
|
+
...g.map(
|
|
49
|
+
(e) => c.reduce((l, o) => l + (Number(e[o]) || 0), 0)
|
|
50
|
+
)
|
|
51
|
+
) : A = Math.max(
|
|
52
|
+
...g.flatMap((e) => c.map((l) => Number(e[l]) || 0))
|
|
53
|
+
);
|
|
54
|
+
const u = I().domain(Z).range(i ? [0, p] : [0, a]).padding(0.2), t = H().domain([0, A * 1.1]).range(i ? [a, 0] : [0, p]).nice(), O = u.bandwidth(), y = h && N ? O / c.length : O;
|
|
55
|
+
return /* @__PURE__ */ v(T, { children: [
|
|
56
|
+
q && /* @__PURE__ */ r(
|
|
57
|
+
tt,
|
|
58
|
+
{
|
|
59
|
+
width: p,
|
|
60
|
+
height: a,
|
|
61
|
+
yScale: i ? t : void 0,
|
|
62
|
+
xScale: i ? void 0 : t,
|
|
63
|
+
horizontal: i,
|
|
64
|
+
vertical: !i
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
g.map((e) => {
|
|
68
|
+
const l = String(e[V]);
|
|
69
|
+
let o = 0;
|
|
70
|
+
return c.map((B, M) => {
|
|
71
|
+
const m = Number(e[B]) || 0, K = S[M] || S[0];
|
|
72
|
+
let $, b, j, w;
|
|
73
|
+
return i ? ($ = (u(l) ?? 0) + (N && h ? M * y : 0), b = t(s ? o + m : m), j = y, w = s ? t(o) - t(o + m) : a - t(m)) : ($ = s ? t(o) : 0, b = (u(l) ?? 0) + (N && h ? M * y : 0), j = s ? t(o + m) - t(o) : t(m), w = y), s && (o += m), /* @__PURE__ */ r(
|
|
74
|
+
"rect",
|
|
75
|
+
{
|
|
76
|
+
x: $,
|
|
77
|
+
y: b,
|
|
78
|
+
width: Math.max(0, j),
|
|
79
|
+
height: Math.max(0, w),
|
|
80
|
+
rx: E,
|
|
81
|
+
fill: K,
|
|
82
|
+
className: "transition-opacity hover:opacity-80",
|
|
83
|
+
onMouseMove: (R) => {
|
|
84
|
+
var W;
|
|
85
|
+
if (z) {
|
|
86
|
+
const d = (W = R.currentTarget.closest("div")) == null ? void 0 : W.getBoundingClientRect();
|
|
87
|
+
Q(
|
|
88
|
+
R.clientX - ((d == null ? void 0 : d.left) ?? 0),
|
|
89
|
+
R.clientY - ((d == null ? void 0 : d.top) ?? 0),
|
|
90
|
+
/* @__PURE__ */ v("div", { children: [
|
|
91
|
+
/* @__PURE__ */ r("div", { className: "font-medium", children: l }),
|
|
92
|
+
h && /* @__PURE__ */ r("div", { className: "text-text-secondary", children: (f == null ? void 0 : f[M]) ?? B }),
|
|
93
|
+
/* @__PURE__ */ r("div", { children: m.toLocaleString() })
|
|
94
|
+
] })
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
onMouseLeave: U
|
|
99
|
+
},
|
|
100
|
+
`${l}-${B}`
|
|
101
|
+
);
|
|
102
|
+
});
|
|
103
|
+
}),
|
|
104
|
+
i ? /* @__PURE__ */ v(T, { children: [
|
|
105
|
+
/* @__PURE__ */ r(
|
|
106
|
+
x,
|
|
107
|
+
{
|
|
108
|
+
scale: u,
|
|
109
|
+
orientation: "bottom",
|
|
110
|
+
transform: `translate(0,${a})`,
|
|
111
|
+
label: F
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ r(x, { scale: t, orientation: "left", label: G })
|
|
115
|
+
] }) : /* @__PURE__ */ v(T, { children: [
|
|
116
|
+
/* @__PURE__ */ r(
|
|
117
|
+
x,
|
|
118
|
+
{
|
|
119
|
+
scale: t,
|
|
120
|
+
orientation: "bottom",
|
|
121
|
+
transform: `translate(0,${a})`,
|
|
122
|
+
label: F
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
/* @__PURE__ */ r(
|
|
126
|
+
x,
|
|
127
|
+
{
|
|
128
|
+
scale: u,
|
|
129
|
+
orientation: "left",
|
|
130
|
+
label: G
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
] })
|
|
134
|
+
] });
|
|
135
|
+
} }),
|
|
136
|
+
z && /* @__PURE__ */ r(ot, { state: P }),
|
|
137
|
+
D && h && /* @__PURE__ */ r(
|
|
138
|
+
at,
|
|
139
|
+
{
|
|
140
|
+
items: c.map((p, a) => ({
|
|
141
|
+
label: (f == null ? void 0 : f[a]) ?? p,
|
|
142
|
+
color: S[a]
|
|
143
|
+
})),
|
|
144
|
+
className: "mt-ds-04"
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
] });
|
|
148
|
+
}
|
|
149
|
+
it.displayName = "BarChart";
|
|
150
|
+
export {
|
|
151
|
+
it as BarChart
|
|
152
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ChartMargin } from './_internal/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface ChartContainerProps {
|
|
4
|
+
/** Fixed height in pixels */
|
|
5
|
+
height?: number;
|
|
6
|
+
/** Chart margins */
|
|
7
|
+
margin?: Partial<ChartMargin>;
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Render function receiving inner dimensions (width/height minus margins) */
|
|
10
|
+
children: (dimensions: {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
margin: ChartMargin;
|
|
14
|
+
}) => React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare function ChartContainer({ height, margin: marginOverride, className, children, }: ChartContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare namespace ChartContainer {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=chart-container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-container.d.ts","sourceRoot":"","sources":["../../../src/ui/charts/chart-container.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAGpD,MAAM,WAAW,mBAAmB;IAClC,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oBAAoB;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,QAAQ,EAAE,CAAC,UAAU,EAAE;QACrB,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,MAAM,CAAA;QACd,MAAM,EAAE,WAAW,CAAA;KACpB,KAAK,KAAK,CAAC,SAAS,CAAA;CACtB;AAED,wBAAgB,cAAc,CAAC,EAC7B,MAAY,EACZ,MAAM,EAAE,cAAc,EACtB,SAAS,EACT,QAAQ,GACT,EAAE,mBAAmB,2CA8BrB;yBAnCe,cAAc"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as u, useState as p, useEffect as g } from "react";
|
|
3
|
+
import { cn as v } from "../lib/utils.js";
|
|
4
|
+
import { DEFAULT_MARGIN as w } from "./_internal/types.js";
|
|
5
|
+
function R({
|
|
6
|
+
height: i = 300,
|
|
7
|
+
margin: c,
|
|
8
|
+
className: a,
|
|
9
|
+
children: m
|
|
10
|
+
}) {
|
|
11
|
+
const e = u(null), [r, f] = p(0), t = { ...w, ...c };
|
|
12
|
+
g(() => {
|
|
13
|
+
if (!e.current) return;
|
|
14
|
+
const o = new ResizeObserver((d) => {
|
|
15
|
+
const s = d[0];
|
|
16
|
+
s && f(s.contentRect.width);
|
|
17
|
+
});
|
|
18
|
+
return o.observe(e.current), () => o.disconnect();
|
|
19
|
+
}, []);
|
|
20
|
+
const h = Math.max(0, r - t.left - t.right), l = Math.max(0, i - t.top - t.bottom);
|
|
21
|
+
return /* @__PURE__ */ n("div", { ref: e, className: v("relative w-full", a), children: r > 0 && /* @__PURE__ */ n("svg", { width: r, height: i, role: "img", children: /* @__PURE__ */ n("g", { transform: `translate(${t.left},${t.top})`, children: m({ width: h, height: l, margin: t }) }) }) });
|
|
22
|
+
}
|
|
23
|
+
R.displayName = "ChartContainer";
|
|
24
|
+
export {
|
|
25
|
+
R as ChartContainer
|
|
26
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface GaugeChartProps {
|
|
2
|
+
/** Current value */
|
|
3
|
+
value: number;
|
|
4
|
+
/** Maximum value (default: 100) */
|
|
5
|
+
max?: number;
|
|
6
|
+
/** Minimum value (default: 0) */
|
|
7
|
+
min?: number;
|
|
8
|
+
/** Label below the value */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Custom value display */
|
|
11
|
+
valueLabel?: string | ((value: number) => string);
|
|
12
|
+
/** Arc color */
|
|
13
|
+
color?: string;
|
|
14
|
+
/** Track (background) color */
|
|
15
|
+
trackColor?: string;
|
|
16
|
+
/** Chart height/width (default: 200) */
|
|
17
|
+
height?: number;
|
|
18
|
+
/** Start angle in degrees (default: -120) */
|
|
19
|
+
startAngle?: number;
|
|
20
|
+
/** End angle in degrees (default: 120) */
|
|
21
|
+
endAngle?: number;
|
|
22
|
+
/** Arc thickness in pixels (default: 16) */
|
|
23
|
+
thickness?: number;
|
|
24
|
+
/** Animate the value arc */
|
|
25
|
+
animate?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function GaugeChart({ value, max, min, label, valueLabel, color, trackColor, height, startAngle, endAngle, thickness, animate, className, }: GaugeChartProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare namespace GaugeChart {
|
|
30
|
+
var displayName: string;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=gauge-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gauge-chart.d.ts","sourceRoot":"","sources":["../../../src/ui/charts/gauge-chart.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,mCAAmC;IACnC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,CAAA;IACjD,gBAAgB;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+BAA+B;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAID,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,GAAS,EACT,GAAO,EACP,KAAK,EACL,UAAU,EACV,KAAK,EACL,UAAyC,EACzC,MAAY,EACZ,UAAiB,EACjB,QAAc,EACd,SAAc,EACd,OAAc,EACd,SAAS,GACV,EAAE,eAAe,2CA4FjB;yBA1Ge,UAAU"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as e, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import { arc as f } from "d3-shape";
|
|
3
|
+
import { cn as B } from "../lib/utils.js";
|
|
4
|
+
import { resolveColor as V } from "./_internal/colors.js";
|
|
5
|
+
import { useReducedMotion as z, getTransitionDuration as D } from "./_internal/animation.js";
|
|
6
|
+
const d = (c) => c * Math.PI / 180;
|
|
7
|
+
function E({
|
|
8
|
+
value: c,
|
|
9
|
+
max: o = 100,
|
|
10
|
+
min: r = 0,
|
|
11
|
+
label: a,
|
|
12
|
+
valueLabel: n,
|
|
13
|
+
color: x,
|
|
14
|
+
trackColor: p = "var(--color-border-subtle)",
|
|
15
|
+
height: g = 200,
|
|
16
|
+
startAngle: i = -120,
|
|
17
|
+
endAngle: m = 120,
|
|
18
|
+
thickness: s = 16,
|
|
19
|
+
animate: v = !0,
|
|
20
|
+
className: y
|
|
21
|
+
}) {
|
|
22
|
+
const R = z(), h = D(R, v ? 600 : 0), G = V(x, 0), u = g, t = u / 2, l = Math.min(Math.max(c, r), o), M = o === r ? 0 : (l - r) / (o - r), C = i + (m - i) * M, N = typeof n == "function" ? n(l) : typeof n == "string" ? n : String(l), A = f().innerRadius(t - s).outerRadius(t).startAngle(d(i)).endAngle(d(m)).cornerRadius(s / 2), P = f().innerRadius(t - s).outerRadius(t).startAngle(d(i)).endAngle(d(C)).cornerRadius(s / 2), $ = A(null) ?? "", j = P(null) ?? "";
|
|
23
|
+
return /* @__PURE__ */ e(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: B("inline-flex flex-col items-center", y),
|
|
27
|
+
role: "meter",
|
|
28
|
+
"aria-valuenow": l,
|
|
29
|
+
"aria-valuemin": r,
|
|
30
|
+
"aria-valuemax": o,
|
|
31
|
+
"aria-label": a ?? "Gauge chart",
|
|
32
|
+
children: /* @__PURE__ */ e("svg", { width: u, height: u, role: "img", "aria-hidden": "true", children: /* @__PURE__ */ w("g", { transform: `translate(${t},${t})`, children: [
|
|
33
|
+
/* @__PURE__ */ e("path", { d: $, fill: p }),
|
|
34
|
+
/* @__PURE__ */ e(
|
|
35
|
+
"path",
|
|
36
|
+
{
|
|
37
|
+
d: j,
|
|
38
|
+
fill: G,
|
|
39
|
+
style: h > 0 ? { transition: `d ${h}ms ease-out` } : void 0
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ e(
|
|
43
|
+
"text",
|
|
44
|
+
{
|
|
45
|
+
x: 0,
|
|
46
|
+
y: a ? -4 : 0,
|
|
47
|
+
textAnchor: "middle",
|
|
48
|
+
dominantBaseline: "central",
|
|
49
|
+
className: "fill-text-primary text-ds-2xl font-semibold",
|
|
50
|
+
children: N
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
a && /* @__PURE__ */ e(
|
|
54
|
+
"text",
|
|
55
|
+
{
|
|
56
|
+
x: 0,
|
|
57
|
+
y: 20,
|
|
58
|
+
textAnchor: "middle",
|
|
59
|
+
dominantBaseline: "central",
|
|
60
|
+
className: "fill-text-secondary text-ds-xs",
|
|
61
|
+
children: a
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
] }) })
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
E.displayName = "GaugeChart";
|
|
69
|
+
export {
|
|
70
|
+
E as GaugeChart
|
|
71
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { ChartContainer, type ChartContainerProps } from './chart-container';
|
|
2
|
+
export { BarChart, type BarChartProps } from './bar-chart';
|
|
3
|
+
export { LineChart, type LineChartProps } from './line-chart';
|
|
4
|
+
export { AreaChart, type AreaChartProps } from './area-chart';
|
|
5
|
+
export { PieChart, type PieChartProps } from './pie-chart';
|
|
6
|
+
export { Sparkline, type SparklineProps } from './sparkline';
|
|
7
|
+
export { GaugeChart, type GaugeChartProps } from './gauge-chart';
|
|
8
|
+
export { RadarChart, type RadarChartProps } from './radar-chart';
|
|
9
|
+
export { Legend, type LegendItem, type LegendProps } from './_internal/legend';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/charts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5E,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,MAAM,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DataPoint, Series } from './_internal/types';
|
|
2
|
+
export interface LineChartProps {
|
|
3
|
+
/** Data array */
|
|
4
|
+
data: DataPoint[];
|
|
5
|
+
/** Key for x-axis */
|
|
6
|
+
xKey: string;
|
|
7
|
+
/** Series definitions — each becomes a line */
|
|
8
|
+
series: Series[];
|
|
9
|
+
/** Use curved (monotone) interpolation */
|
|
10
|
+
curved?: boolean;
|
|
11
|
+
/** Show dots at data points */
|
|
12
|
+
showDots?: boolean;
|
|
13
|
+
/** Dot radius */
|
|
14
|
+
dotSize?: number;
|
|
15
|
+
/** Line stroke width */
|
|
16
|
+
strokeWidth?: number;
|
|
17
|
+
/** Chart height */
|
|
18
|
+
height?: number;
|
|
19
|
+
/** Show grid lines */
|
|
20
|
+
showGrid?: boolean;
|
|
21
|
+
/** Show tooltip on hover */
|
|
22
|
+
showTooltip?: boolean;
|
|
23
|
+
/** Show legend */
|
|
24
|
+
showLegend?: boolean;
|
|
25
|
+
/** Animate on mount */
|
|
26
|
+
animate?: boolean;
|
|
27
|
+
/** X-axis label */
|
|
28
|
+
xLabel?: string;
|
|
29
|
+
/** Y-axis label */
|
|
30
|
+
yLabel?: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function LineChart({ data, xKey, series, curved, showDots, dotSize, strokeWidth, height, showGrid, showTooltip, showLegend, animate, xLabel, yLabel, className, }: LineChartProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare namespace LineChart {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=line-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-chart.d.ts","sourceRoot":"","sources":["../../../src/ui/charts/line-chart.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE1D,MAAM,WAAW,cAAc;IAC7B,iBAAiB;IACjB,IAAI,EAAE,SAAS,EAAE,CAAA;IACjB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,+CAA+C;IAC/C,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kBAAkB;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,uBAAuB;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,MAAc,EACd,QAAgB,EAChB,OAAW,EACX,WAAe,EACf,MAAY,EACZ,QAAe,EACf,WAAkB,EAClB,UAAkB,EAClB,OAAc,EACd,MAAM,EACN,MAAM,EACN,SAAS,GACV,EAAE,cAAc,2CA2LhB;yBA3Me,SAAS"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { jsxs as p, jsx as n, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import { line as E, curveMonotoneX as J, curveLinear as O } from "d3-shape";
|
|
3
|
+
import { scaleLinear as N, scalePoint as Q } from "d3-scale";
|
|
4
|
+
import { cn as U } from "../lib/utils.js";
|
|
5
|
+
import { ChartContainer as Z } from "./chart-container.js";
|
|
6
|
+
import { Axis as M } from "./_internal/axes.js";
|
|
7
|
+
import { GridLines as _ } from "./_internal/grid-lines.js";
|
|
8
|
+
import { Legend as w } from "./_internal/legend.js";
|
|
9
|
+
import { useChartTooltip as I, ChartTooltip as H } from "./_internal/tooltip.js";
|
|
10
|
+
import { resolveColor as K } from "./_internal/colors.js";
|
|
11
|
+
import { useReducedMotion as ee } from "./_internal/animation.js";
|
|
12
|
+
function te({
|
|
13
|
+
data: c,
|
|
14
|
+
xKey: d,
|
|
15
|
+
series: s,
|
|
16
|
+
curved: k = !1,
|
|
17
|
+
showDots: L = !1,
|
|
18
|
+
dotSize: C = 4,
|
|
19
|
+
strokeWidth: S = 2,
|
|
20
|
+
height: X = 300,
|
|
21
|
+
showGrid: G = !0,
|
|
22
|
+
showTooltip: b = !0,
|
|
23
|
+
showLegend: $ = !1,
|
|
24
|
+
animate: oe = !0,
|
|
25
|
+
xLabel: j,
|
|
26
|
+
yLabel: T,
|
|
27
|
+
className: V
|
|
28
|
+
}) {
|
|
29
|
+
const { tooltip: A, show: R, hide: z } = I();
|
|
30
|
+
ee();
|
|
31
|
+
const f = s.map((r, a) => K(r.color, a));
|
|
32
|
+
return /* @__PURE__ */ p("div", { className: U("relative", V), children: [
|
|
33
|
+
/* @__PURE__ */ n(Z, { height: X, children: ({ width: r, height: a, margin: ne }) => {
|
|
34
|
+
const x = c.map((e) => e[d]), B = x.every((e) => typeof e == "number");
|
|
35
|
+
let y, u;
|
|
36
|
+
if (B) {
|
|
37
|
+
const e = x, o = Math.min(...e), m = Math.max(...e), i = N().domain([o, m]).range([0, r]);
|
|
38
|
+
y = i, u = (t) => i(Number(t[d]));
|
|
39
|
+
} else {
|
|
40
|
+
const e = x.map(String), o = Q().domain(e).range([0, r]).padding(0.5);
|
|
41
|
+
y = o, u = (m) => o(String(m[d])) ?? 0;
|
|
42
|
+
}
|
|
43
|
+
const D = c.flatMap(
|
|
44
|
+
(e) => s.map((o) => Number(e[o.key]) || 0)
|
|
45
|
+
), F = Math.max(...D), g = N().domain([0, F * 1.1]).range([a, 0]).nice(), P = k ? J : O, W = E().curve(P).defined((e) => e != null);
|
|
46
|
+
return /* @__PURE__ */ p(q, { children: [
|
|
47
|
+
G && /* @__PURE__ */ n(
|
|
48
|
+
_,
|
|
49
|
+
{
|
|
50
|
+
width: r,
|
|
51
|
+
height: a,
|
|
52
|
+
yScale: g,
|
|
53
|
+
horizontal: !0
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
s.map((e, o) => {
|
|
57
|
+
const i = W.x((t) => u(t)).y((t) => g(Number(t[e.key]) || 0))(c) ?? "";
|
|
58
|
+
return /* @__PURE__ */ p("g", { children: [
|
|
59
|
+
/* @__PURE__ */ n(
|
|
60
|
+
"path",
|
|
61
|
+
{
|
|
62
|
+
d: i,
|
|
63
|
+
fill: "none",
|
|
64
|
+
stroke: f[o],
|
|
65
|
+
strokeWidth: S,
|
|
66
|
+
strokeLinejoin: "round",
|
|
67
|
+
strokeLinecap: "round"
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
L && c.map((t, l) => {
|
|
71
|
+
const v = u(t), h = g(Number(t[e.key]) || 0);
|
|
72
|
+
return /* @__PURE__ */ n(
|
|
73
|
+
"circle",
|
|
74
|
+
{
|
|
75
|
+
cx: v,
|
|
76
|
+
cy: h,
|
|
77
|
+
r: C,
|
|
78
|
+
fill: f[o],
|
|
79
|
+
className: "transition-opacity hover:opacity-80"
|
|
80
|
+
},
|
|
81
|
+
`${e.key}-dot-${l}`
|
|
82
|
+
);
|
|
83
|
+
})
|
|
84
|
+
] }, e.key);
|
|
85
|
+
}),
|
|
86
|
+
b && c.map((e, o) => {
|
|
87
|
+
const m = u(e), i = r / Math.max(c.length - 1, 1);
|
|
88
|
+
return /* @__PURE__ */ n(
|
|
89
|
+
"rect",
|
|
90
|
+
{
|
|
91
|
+
x: m - i / 2,
|
|
92
|
+
y: 0,
|
|
93
|
+
width: i,
|
|
94
|
+
height: a,
|
|
95
|
+
fill: "transparent",
|
|
96
|
+
onMouseMove: (t) => {
|
|
97
|
+
var v;
|
|
98
|
+
const l = (v = t.currentTarget.closest("div")) == null ? void 0 : v.getBoundingClientRect();
|
|
99
|
+
R(
|
|
100
|
+
t.clientX - ((l == null ? void 0 : l.left) ?? 0),
|
|
101
|
+
t.clientY - ((l == null ? void 0 : l.top) ?? 0),
|
|
102
|
+
/* @__PURE__ */ p("div", { children: [
|
|
103
|
+
/* @__PURE__ */ n("div", { className: "font-medium", children: String(e[d]) }),
|
|
104
|
+
s.map((h, Y) => /* @__PURE__ */ p(
|
|
105
|
+
"div",
|
|
106
|
+
{
|
|
107
|
+
className: "flex items-center gap-ds-02",
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ n(
|
|
110
|
+
"span",
|
|
111
|
+
{
|
|
112
|
+
className: "inline-block h-2 w-2 rounded-ds-full",
|
|
113
|
+
style: { backgroundColor: f[Y] }
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
/* @__PURE__ */ p("span", { className: "text-text-secondary", children: [
|
|
117
|
+
h.label,
|
|
118
|
+
":"
|
|
119
|
+
] }),
|
|
120
|
+
" ",
|
|
121
|
+
Number(e[h.key]).toLocaleString()
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
h.key
|
|
125
|
+
))
|
|
126
|
+
] })
|
|
127
|
+
);
|
|
128
|
+
},
|
|
129
|
+
onMouseLeave: z
|
|
130
|
+
},
|
|
131
|
+
`hover-${o}`
|
|
132
|
+
);
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ n(
|
|
135
|
+
M,
|
|
136
|
+
{
|
|
137
|
+
scale: y,
|
|
138
|
+
orientation: "bottom",
|
|
139
|
+
transform: `translate(0,${a})`,
|
|
140
|
+
label: j
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
/* @__PURE__ */ n(M, { scale: g, orientation: "left", label: T })
|
|
144
|
+
] });
|
|
145
|
+
} }),
|
|
146
|
+
b && /* @__PURE__ */ n(H, { state: A }),
|
|
147
|
+
$ && s.length > 1 && /* @__PURE__ */ n(
|
|
148
|
+
w,
|
|
149
|
+
{
|
|
150
|
+
items: s.map((r, a) => ({
|
|
151
|
+
label: r.label,
|
|
152
|
+
color: f[a]
|
|
153
|
+
})),
|
|
154
|
+
className: "mt-ds-04"
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
] });
|
|
158
|
+
}
|
|
159
|
+
te.displayName = "LineChart";
|
|
160
|
+
export {
|
|
161
|
+
te as LineChart
|
|
162
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface PieSlice {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PieChartProps {
|
|
8
|
+
/** Data with label and value */
|
|
9
|
+
data: PieSlice[];
|
|
10
|
+
/** Pie or donut variant */
|
|
11
|
+
variant?: 'pie' | 'donut';
|
|
12
|
+
/** Inner radius ratio for donut (0-1, default 0.6) */
|
|
13
|
+
innerRadius?: number;
|
|
14
|
+
/** Gap angle between slices in radians */
|
|
15
|
+
padAngle?: number;
|
|
16
|
+
/** Corner radius for slice edges */
|
|
17
|
+
cornerRadius?: number;
|
|
18
|
+
/** Chart height (and width, since pie is square) */
|
|
19
|
+
height?: number;
|
|
20
|
+
/** Show tooltip on hover */
|
|
21
|
+
showTooltip?: boolean;
|
|
22
|
+
/** Show legend */
|
|
23
|
+
showLegend?: boolean;
|
|
24
|
+
/** Show percentage labels on/near slices */
|
|
25
|
+
showLabels?: boolean;
|
|
26
|
+
/** Animate slices */
|
|
27
|
+
animate?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
/** Content to show in center of donut */
|
|
30
|
+
centerLabel?: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare function PieChart({ data, variant, innerRadius: innerRadiusRatio, padAngle, cornerRadius, height, showTooltip, showLegend, showLabels, animate, className, centerLabel, }: PieChartProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare namespace PieChart {
|
|
34
|
+
var displayName: string;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=pie-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pie-chart.d.ts","sourceRoot":"","sources":["../../../src/ui/charts/pie-chart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAU9B,UAAU,QAAQ;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,gCAAgC;IAChC,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,2BAA2B;IAC3B,OAAO,CAAC,EAAE,KAAK,GAAG,OAAO,CAAA;IACzB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,4BAA4B;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kBAAkB;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,qBAAqB;IACrB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yCAAyC;IACzC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC9B;AAED,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,OAAe,EACf,WAAW,EAAE,gBAAsB,EACnC,QAAY,EACZ,YAAgB,EAChB,MAAY,EACZ,WAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,OAAc,EACd,SAAS,EACT,WAAW,GACZ,EAAE,aAAa,2CA8Kf;yBA3Le,QAAQ"}
|