@tryghost/shade 0.0.0-stage → 0.1.0-alpha.1
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/LICENSE +22 -0
- package/README.md +142 -2
- package/es/app.js +4 -0
- package/es/assets/images/index.js +2 -0
- package/es/components/layout/error-page.js +40 -0
- package/es/components/layout/error-page.js.map +1 -0
- package/es/components/layout/heading.js +80 -0
- package/es/components/layout/heading.js.map +1 -0
- package/es/components/page-templates/detail-page.js +73 -0
- package/es/components/page-templates/detail-page.js.map +1 -0
- package/es/components/page-templates/large-page-title.js +89 -0
- package/es/components/page-templates/large-page-title.js.map +1 -0
- package/es/components/page-templates/list-page.js +174 -0
- package/es/components/page-templates/list-page.js.map +1 -0
- package/es/components/page-templates/modal-page.js +32 -0
- package/es/components/page-templates/modal-page.js.map +1 -0
- package/es/components/patterns/color-picker.js +328 -0
- package/es/components/patterns/color-picker.js.map +1 -0
- package/es/components/patterns/dirty-confirm-dialog.js +44 -0
- package/es/components/patterns/dirty-confirm-dialog.js.map +1 -0
- package/es/components/patterns/filter-bar-context.js +8 -0
- package/es/components/patterns/filter-bar-context.js.map +1 -0
- package/es/components/patterns/filter-bar.js +67 -0
- package/es/components/patterns/filter-bar.js.map +1 -0
- package/es/components/patterns/filters-helpers.js +415 -0
- package/es/components/patterns/filters-helpers.js.map +1 -0
- package/es/components/patterns/filters.js +1816 -0
- package/es/components/patterns/filters.js.map +1 -0
- package/es/components/patterns/gh-chart.js +152 -0
- package/es/components/patterns/gh-chart.js.map +1 -0
- package/es/components/patterns/image-upload-variants.js +13 -0
- package/es/components/patterns/image-upload-variants.js.map +1 -0
- package/es/components/patterns/image-upload.js +63 -0
- package/es/components/patterns/image-upload.js.map +1 -0
- package/es/components/patterns/kpi-card.js +46 -0
- package/es/components/patterns/kpi-card.js.map +1 -0
- package/es/components/patterns/kpi-tabs.js +61 -0
- package/es/components/patterns/kpi-tabs.js.map +1 -0
- package/es/components/patterns/page-header-large-title.js +13 -0
- package/es/components/patterns/page-header-large-title.js.map +1 -0
- package/es/components/patterns/page-header.js +375 -0
- package/es/components/patterns/page-header.js.map +1 -0
- package/es/components/patterns/setting-group-variants.js +22 -0
- package/es/components/patterns/setting-group-variants.js.map +1 -0
- package/es/components/patterns/setting-group.js +103 -0
- package/es/components/patterns/setting-group.js.map +1 -0
- package/es/components/patterns/settings-modal-variants.js +37 -0
- package/es/components/patterns/settings-modal-variants.js.map +1 -0
- package/es/components/patterns/settings-modal.js +192 -0
- package/es/components/patterns/settings-modal.js.map +1 -0
- package/es/components/patterns/share-modal.js +264 -0
- package/es/components/patterns/share-modal.js.map +1 -0
- package/es/components/patterns/use-dirty-confirmation.js +35 -0
- package/es/components/patterns/use-dirty-confirmation.js.map +1 -0
- package/es/components/patterns/view-bar.js +40 -0
- package/es/components/patterns/view-bar.js.map +1 -0
- package/es/components/primitives/box.js +25 -0
- package/es/components/primitives/box.js.map +1 -0
- package/es/components/primitives/container.js +35 -0
- package/es/components/primitives/container.js.map +1 -0
- package/es/components/primitives/grid.js +26 -0
- package/es/components/primitives/grid.js.map +1 -0
- package/es/components/primitives/index.js +7 -0
- package/es/components/primitives/inline.js +17 -0
- package/es/components/primitives/inline.js.map +1 -0
- package/es/components/primitives/stack.js +17 -0
- package/es/components/primitives/stack.js.map +1 -0
- package/es/components/primitives/text.js +48 -0
- package/es/components/primitives/text.js.map +1 -0
- package/es/components/primitives/types.js +56 -0
- package/es/components/primitives/types.js.map +1 -0
- package/es/components/ui/accordion.js +37 -0
- package/es/components/ui/accordion.js.map +1 -0
- package/es/components/ui/action-list.js +56 -0
- package/es/components/ui/action-list.js.map +1 -0
- package/es/components/ui/alert-dialog.js +80 -0
- package/es/components/ui/alert-dialog.js.map +1 -0
- package/es/components/ui/animated-number.js +14 -0
- package/es/components/ui/animated-number.js.map +1 -0
- package/es/components/ui/avatar.js +52 -0
- package/es/components/ui/avatar.js.map +1 -0
- package/es/components/ui/badge-variants.js +32 -0
- package/es/components/ui/badge-variants.js.map +1 -0
- package/es/components/ui/badge.js +22 -0
- package/es/components/ui/badge.js.map +1 -0
- package/es/components/ui/banner-variants.js +34 -0
- package/es/components/ui/banner-variants.js.map +1 -0
- package/es/components/ui/banner.js +37 -0
- package/es/components/ui/banner.js.map +1 -0
- package/es/components/ui/breadcrumb.js +64 -0
- package/es/components/ui/breadcrumb.js.map +1 -0
- package/es/components/ui/button-variants.js +137 -0
- package/es/components/ui/button-variants.js.map +1 -0
- package/es/components/ui/button.js +35 -0
- package/es/components/ui/button.js.map +1 -0
- package/es/components/ui/calendar.js +119 -0
- package/es/components/ui/calendar.js.map +1 -0
- package/es/components/ui/card-variants.js +13 -0
- package/es/components/ui/card-variants.js.map +1 -0
- package/es/components/ui/card.js +98 -0
- package/es/components/ui/card.js.map +1 -0
- package/es/components/ui/chart.js +188 -0
- package/es/components/ui/chart.js.map +1 -0
- package/es/components/ui/checkbox.js +21 -0
- package/es/components/ui/checkbox.js.map +1 -0
- package/es/components/ui/code-editor-view.js +150 -0
- package/es/components/ui/code-editor-view.js.map +1 -0
- package/es/components/ui/code-editor.js +18 -0
- package/es/components/ui/code-editor.js.map +1 -0
- package/es/components/ui/combobox.js +37 -0
- package/es/components/ui/combobox.js.map +1 -0
- package/es/components/ui/command.js +91 -0
- package/es/components/ui/command.js.map +1 -0
- package/es/components/ui/context-menu.js +82 -0
- package/es/components/ui/context-menu.js.map +1 -0
- package/es/components/ui/copy-field.js +142 -0
- package/es/components/ui/copy-field.js.map +1 -0
- package/es/components/ui/data-list.js +103 -0
- package/es/components/ui/data-list.js.map +1 -0
- package/es/components/ui/dialog.js +49 -0
- package/es/components/ui/dialog.js.map +1 -0
- package/es/components/ui/dropdown-menu.js +86 -0
- package/es/components/ui/dropdown-menu.js.map +1 -0
- package/es/components/ui/dropzone-variants.js +30 -0
- package/es/components/ui/dropzone-variants.js.map +1 -0
- package/es/components/ui/dropzone.js +55 -0
- package/es/components/ui/dropzone.js.map +1 -0
- package/es/components/ui/empty-indicator.js +42 -0
- package/es/components/ui/empty-indicator.js.map +1 -0
- package/es/components/ui/field.js +118 -0
- package/es/components/ui/field.js.map +1 -0
- package/es/components/ui/flag.js +30 -0
- package/es/components/ui/flag.js.map +1 -0
- package/es/components/ui/floating-sidebar-metrics.js +56 -0
- package/es/components/ui/floating-sidebar-metrics.js.map +1 -0
- package/es/components/ui/floating-sidebar.js +522 -0
- package/es/components/ui/floating-sidebar.js.map +1 -0
- package/es/components/ui/form-context.js +25 -0
- package/es/components/ui/form-context.js.map +1 -0
- package/es/components/ui/form.js +75 -0
- package/es/components/ui/form.js.map +1 -0
- package/es/components/ui/hover-card.js +20 -0
- package/es/components/ui/hover-card.js.map +1 -0
- package/es/components/ui/icon.js +2 -0
- package/es/components/ui/image-overlay-button.js +14 -0
- package/es/components/ui/image-overlay-button.js.map +1 -0
- package/es/components/ui/indicator-variants.js +63 -0
- package/es/components/ui/indicator-variants.js.map +1 -0
- package/es/components/ui/indicator.js +26 -0
- package/es/components/ui/indicator.js.map +1 -0
- package/es/components/ui/input-group-variants.js +25 -0
- package/es/components/ui/input-group-variants.js.map +1 -0
- package/es/components/ui/input-group.js +90 -0
- package/es/components/ui/input-group.js.map +1 -0
- package/es/components/ui/input-surface.js +51 -0
- package/es/components/ui/input-surface.js.map +1 -0
- package/es/components/ui/input.js +18 -0
- package/es/components/ui/input.js.map +1 -0
- package/es/components/ui/kbd.js +29 -0
- package/es/components/ui/kbd.js.map +1 -0
- package/es/components/ui/label.js +17 -0
- package/es/components/ui/label.js.map +1 -0
- package/es/components/ui/link.js +30 -0
- package/es/components/ui/link.js.map +1 -0
- package/es/components/ui/loading-indicator.js +50 -0
- package/es/components/ui/loading-indicator.js.map +1 -0
- package/es/components/ui/metric-value.js +39 -0
- package/es/components/ui/metric-value.js.map +1 -0
- package/es/components/ui/multi-select-combobox.js +205 -0
- package/es/components/ui/multi-select-combobox.js.map +1 -0
- package/es/components/ui/navbar.js +41 -0
- package/es/components/ui/navbar.js.map +1 -0
- package/es/components/ui/no-value-label.js +19 -0
- package/es/components/ui/no-value-label.js.map +1 -0
- package/es/components/ui/pagemenu.js +138 -0
- package/es/components/ui/pagemenu.js.map +1 -0
- package/es/components/ui/popover.js +24 -0
- package/es/components/ui/popover.js.map +1 -0
- package/es/components/ui/preview-chrome-variants.js +13 -0
- package/es/components/ui/preview-chrome-variants.js.map +1 -0
- package/es/components/ui/preview-chrome.js +27 -0
- package/es/components/ui/preview-chrome.js.map +1 -0
- package/es/components/ui/radio-group-variants.js +14 -0
- package/es/components/ui/radio-group-variants.js.map +1 -0
- package/es/components/ui/radio-group.js +33 -0
- package/es/components/ui/radio-group.js.map +1 -0
- package/es/components/ui/select-variants.js +45 -0
- package/es/components/ui/select-variants.js.map +1 -0
- package/es/components/ui/select.js +90 -0
- package/es/components/ui/select.js.map +1 -0
- package/es/components/ui/separator.js +17 -0
- package/es/components/ui/separator.js.map +1 -0
- package/es/components/ui/sheet.js +67 -0
- package/es/components/ui/sheet.js.map +1 -0
- package/es/components/ui/sidebar-context.js +12 -0
- package/es/components/ui/sidebar-context.js.map +1 -0
- package/es/components/ui/sidebar.js +384 -0
- package/es/components/ui/sidebar.js.map +1 -0
- package/es/components/ui/simple-pagination.js +68 -0
- package/es/components/ui/simple-pagination.js.map +1 -0
- package/es/components/ui/skeleton.js +77 -0
- package/es/components/ui/skeleton.js.map +1 -0
- package/es/components/ui/sonner.js +29 -0
- package/es/components/ui/sonner.js.map +1 -0
- package/es/components/ui/sortable-list.js +107 -0
- package/es/components/ui/sortable-list.js.map +1 -0
- package/es/components/ui/sticky-footer.js +29 -0
- package/es/components/ui/sticky-footer.js.map +1 -0
- package/es/components/ui/switch.js +34 -0
- package/es/components/ui/switch.js.map +1 -0
- package/es/components/ui/table.js +81 -0
- package/es/components/ui/table.js.map +1 -0
- package/es/components/ui/tabs-variants.js +19 -0
- package/es/components/ui/tabs-variants.js.map +1 -0
- package/es/components/ui/tabs.js +157 -0
- package/es/components/ui/tabs.js.map +1 -0
- package/es/components/ui/textarea.js +17 -0
- package/es/components/ui/textarea.js.map +1 -0
- package/es/components/ui/time-picker.js +28 -0
- package/es/components/ui/time-picker.js.map +1 -0
- package/es/components/ui/toggle-group.js +52 -0
- package/es/components/ui/toggle-group.js.map +1 -0
- package/es/components/ui/toggle-variants.js +34 -0
- package/es/components/ui/toggle-variants.js.map +1 -0
- package/es/components/ui/toggle.js +29 -0
- package/es/components/ui/toggle.js.map +1 -0
- package/es/components/ui/token-field.js +14 -0
- package/es/components/ui/token-field.js.map +1 -0
- package/es/components/ui/tooltip.js +116 -0
- package/es/components/ui/tooltip.js.map +1 -0
- package/es/components/ui/trend-badge.js +77 -0
- package/es/components/ui/trend-badge.js.map +1 -0
- package/es/components.js +79 -0
- package/es/hooks/use-global-dirty-state.js +21 -0
- package/es/hooks/use-global-dirty-state.js.map +1 -0
- package/es/hooks/use-mobile.js +23 -0
- package/es/hooks/use-mobile.js.map +1 -0
- package/es/hooks/use-simple-pagination.js +45 -0
- package/es/hooks/use-simple-pagination.js.map +1 -0
- package/es/icon-BJcGsQ4b.js +185 -0
- package/es/icon-BJcGsQ4b.js.map +1 -0
- package/es/images-CUcakpOD.js +124 -0
- package/es/images-CUcakpOD.js.map +1 -0
- package/es/index.js +113 -0
- package/es/lib/ds-utils.js +214 -0
- package/es/lib/ds-utils.js.map +1 -0
- package/es/lib/overlay-escape.js +13 -0
- package/es/lib/overlay-escape.js.map +1 -0
- package/es/lib/utils.js +2 -0
- package/es/page-templates.js +5 -0
- package/es/patterns.js +19 -0
- package/es/primitives.js +9 -0
- package/es/providers/global-dirty-state-provider.js +25 -0
- package/es/providers/global-dirty-state-provider.js.map +1 -0
- package/es/providers/header-tooltip-provider.js +24 -0
- package/es/providers/header-tooltip-provider.js.map +1 -0
- package/es/providers/shade-context.js +19 -0
- package/es/providers/shade-context.js.map +1 -0
- package/es/providers/shade-provider.js +64 -0
- package/es/providers/shade-provider.js.map +1 -0
- package/es/shade-app.js +28 -0
- package/es/shade-app.js.map +1 -0
- package/es/shade-scope.js +20 -0
- package/es/shade-scope.js.map +1 -0
- package/es/tokens.js +370 -0
- package/es/tokens.js.map +1 -0
- package/es/utils.js +7 -0
- package/package.json +150 -3
- package/preflight.css +422 -0
- package/styles-published.css +2 -0
- package/styles.css +299 -0
- package/tailwind.theme.css +472 -0
- package/theme-variables.css +287 -0
- package/tokens.css +3 -0
- package/types/app.d.ts +6 -0
- package/types/app.d.ts.map +1 -0
- package/types/assets/images/index.d.ts +10 -0
- package/types/assets/images/index.d.ts.map +1 -0
- package/types/components/layout/error-page.d.ts +10 -0
- package/types/components/layout/error-page.d.ts.map +1 -0
- package/types/components/layout/heading.d.ts +29 -0
- package/types/components/layout/heading.d.ts.map +1 -0
- package/types/components/page-templates/detail-page.d.ts +32 -0
- package/types/components/page-templates/detail-page.d.ts.map +1 -0
- package/types/components/page-templates/large-page-title.d.ts +43 -0
- package/types/components/page-templates/large-page-title.d.ts.map +1 -0
- package/types/components/page-templates/list-page.d.ts +44 -0
- package/types/components/page-templates/list-page.d.ts.map +1 -0
- package/types/components/page-templates/modal-page.d.ts +13 -0
- package/types/components/page-templates/modal-page.d.ts.map +1 -0
- package/types/components/patterns/color-picker.d.ts +48 -0
- package/types/components/patterns/color-picker.d.ts.map +1 -0
- package/types/components/patterns/dirty-confirm-dialog.d.ts +16 -0
- package/types/components/patterns/dirty-confirm-dialog.d.ts.map +1 -0
- package/types/components/patterns/filter-bar-context.d.ts +4 -0
- package/types/components/patterns/filter-bar-context.d.ts.map +1 -0
- package/types/components/patterns/filter-bar.d.ts +27 -0
- package/types/components/patterns/filter-bar.d.ts.map +1 -0
- package/types/components/patterns/filters-helpers.d.ts +7 -0
- package/types/components/patterns/filters-helpers.d.ts.map +1 -0
- package/types/components/patterns/filters.d.ts +262 -0
- package/types/components/patterns/filters.d.ts.map +1 -0
- package/types/components/patterns/gh-chart.d.ts +44 -0
- package/types/components/patterns/gh-chart.d.ts.map +1 -0
- package/types/components/patterns/image-upload-variants.d.ts +5 -0
- package/types/components/patterns/image-upload-variants.d.ts.map +1 -0
- package/types/components/patterns/image-upload.d.ts +15 -0
- package/types/components/patterns/image-upload.d.ts.map +1 -0
- package/types/components/patterns/kpi-card.d.ts +12 -0
- package/types/components/patterns/kpi-card.d.ts.map +1 -0
- package/types/components/patterns/kpi-tabs.d.ts +26 -0
- package/types/components/patterns/kpi-tabs.d.ts.map +1 -0
- package/types/components/patterns/page-header-large-title.d.ts +14 -0
- package/types/components/patterns/page-header-large-title.d.ts.map +1 -0
- package/types/components/patterns/page-header.d.ts +99 -0
- package/types/components/patterns/page-header.d.ts.map +1 -0
- package/types/components/patterns/setting-group-variants.d.ts +6 -0
- package/types/components/patterns/setting-group-variants.d.ts.map +1 -0
- package/types/components/patterns/setting-group.d.ts +22 -0
- package/types/components/patterns/setting-group.d.ts.map +1 -0
- package/types/components/patterns/settings-modal-variants.d.ts +8 -0
- package/types/components/patterns/settings-modal-variants.d.ts.map +1 -0
- package/types/components/patterns/settings-modal.d.ts +50 -0
- package/types/components/patterns/settings-modal.d.ts.map +1 -0
- package/types/components/patterns/share-modal.d.ts +56 -0
- package/types/components/patterns/share-modal.d.ts.map +1 -0
- package/types/components/patterns/use-dirty-confirmation.d.ts +3 -0
- package/types/components/patterns/use-dirty-confirmation.d.ts.map +1 -0
- package/types/components/patterns/view-bar.d.ts +13 -0
- package/types/components/patterns/view-bar.d.ts.map +1 -0
- package/types/components/primitives/box.d.ts +12 -0
- package/types/components/primitives/box.d.ts.map +1 -0
- package/types/components/primitives/container.d.ts +11 -0
- package/types/components/primitives/container.d.ts.map +1 -0
- package/types/components/primitives/grid.d.ts +12 -0
- package/types/components/primitives/grid.d.ts.map +1 -0
- package/types/components/primitives/index.d.ts +10 -0
- package/types/components/primitives/index.d.ts.map +1 -0
- package/types/components/primitives/inline.d.ts +13 -0
- package/types/components/primitives/inline.d.ts.map +1 -0
- package/types/components/primitives/stack.d.ts +10 -0
- package/types/components/primitives/stack.d.ts.map +1 -0
- package/types/components/primitives/text.d.ts +18 -0
- package/types/components/primitives/text.d.ts.map +1 -0
- package/types/components/primitives/types.d.ts +10 -0
- package/types/components/primitives/types.d.ts.map +1 -0
- package/types/components/ui/accordion.d.ts +8 -0
- package/types/components/ui/accordion.d.ts.map +1 -0
- package/types/components/ui/action-list.d.ts +21 -0
- package/types/components/ui/action-list.d.ts.map +1 -0
- package/types/components/ui/alert-dialog.d.ts +24 -0
- package/types/components/ui/alert-dialog.d.ts.map +1 -0
- package/types/components/ui/animated-number.d.ts +6 -0
- package/types/components/ui/animated-number.d.ts.map +1 -0
- package/types/components/ui/avatar.d.ts +17 -0
- package/types/components/ui/avatar.d.ts.map +1 -0
- package/types/components/ui/badge-variants.d.ts +7 -0
- package/types/components/ui/badge-variants.d.ts.map +1 -0
- package/types/components/ui/badge.d.ts +9 -0
- package/types/components/ui/badge.d.ts.map +1 -0
- package/types/components/ui/banner-variants.d.ts +6 -0
- package/types/components/ui/banner-variants.d.ts.map +1 -0
- package/types/components/ui/banner.d.ts +24 -0
- package/types/components/ui/banner.d.ts.map +1 -0
- package/types/components/ui/breadcrumb.d.ts +20 -0
- package/types/components/ui/breadcrumb.d.ts.map +1 -0
- package/types/components/ui/button-variants.d.ts +8 -0
- package/types/components/ui/button-variants.d.ts.map +1 -0
- package/types/components/ui/button.d.ts +9 -0
- package/types/components/ui/button.d.ts.map +1 -0
- package/types/components/ui/calendar.d.ts +15 -0
- package/types/components/ui/calendar.d.ts.map +1 -0
- package/types/components/ui/card-variants.d.ts +5 -0
- package/types/components/ui/card-variants.d.ts.map +1 -0
- package/types/components/ui/card.d.ts +16 -0
- package/types/components/ui/card.d.ts.map +1 -0
- package/types/components/ui/chart.d.ts +90 -0
- package/types/components/ui/chart.d.ts.map +1 -0
- package/types/components/ui/checkbox.d.ts +5 -0
- package/types/components/ui/checkbox.d.ts.map +1 -0
- package/types/components/ui/code-editor-view.d.ts +17 -0
- package/types/components/ui/code-editor-view.d.ts.map +1 -0
- package/types/components/ui/code-editor.d.ts +7 -0
- package/types/components/ui/code-editor.d.ts.map +1 -0
- package/types/components/ui/combobox.d.ts +10 -0
- package/types/components/ui/combobox.d.ts.map +1 -0
- package/types/components/ui/command.d.ts +22 -0
- package/types/components/ui/command.d.ts.map +1 -0
- package/types/components/ui/context-menu.d.ts +29 -0
- package/types/components/ui/context-menu.d.ts.map +1 -0
- package/types/components/ui/copy-field.d.ts +19 -0
- package/types/components/ui/copy-field.d.ts.map +1 -0
- package/types/components/ui/data-list.d.ts +53 -0
- package/types/components/ui/data-list.d.ts.map +1 -0
- package/types/components/ui/dialog.d.ts +20 -0
- package/types/components/ui/dialog.d.ts.map +1 -0
- package/types/components/ui/dropdown-menu.d.ts +28 -0
- package/types/components/ui/dropdown-menu.d.ts.map +1 -0
- package/types/components/ui/dropzone-variants.d.ts +7 -0
- package/types/components/ui/dropzone-variants.d.ts.map +1 -0
- package/types/components/ui/dropzone.d.ts +28 -0
- package/types/components/ui/dropzone.d.ts.map +1 -0
- package/types/components/ui/empty-indicator.d.ts +16 -0
- package/types/components/ui/empty-indicator.d.ts.map +1 -0
- package/types/components/ui/field.d.ts +25 -0
- package/types/components/ui/field.d.ts.map +1 -0
- package/types/components/ui/flag.d.ts +11 -0
- package/types/components/ui/flag.d.ts.map +1 -0
- package/types/components/ui/floating-sidebar-metrics.d.ts +54 -0
- package/types/components/ui/floating-sidebar-metrics.d.ts.map +1 -0
- package/types/components/ui/floating-sidebar.d.ts +72 -0
- package/types/components/ui/floating-sidebar.d.ts.map +1 -0
- package/types/components/ui/form-context.d.ts +24 -0
- package/types/components/ui/form-context.d.ts.map +1 -0
- package/types/components/ui/form.d.ts +14 -0
- package/types/components/ui/form.d.ts.map +1 -0
- package/types/components/ui/hover-card.d.ts +7 -0
- package/types/components/ui/hover-card.d.ts.map +1 -0
- package/types/components/ui/icon.d.ts +13 -0
- package/types/components/ui/icon.d.ts.map +1 -0
- package/types/components/ui/image-overlay-button.d.ts +7 -0
- package/types/components/ui/image-overlay-button.d.ts.map +1 -0
- package/types/components/ui/indicator-variants.d.ts +11 -0
- package/types/components/ui/indicator-variants.d.ts.map +1 -0
- package/types/components/ui/indicator.d.ts +9 -0
- package/types/components/ui/indicator.d.ts.map +1 -0
- package/types/components/ui/input-group-variants.d.ts +6 -0
- package/types/components/ui/input-group-variants.d.ts.map +1 -0
- package/types/components/ui/input-group.d.ts +18 -0
- package/types/components/ui/input-group.d.ts.map +1 -0
- package/types/components/ui/input-surface.d.ts +43 -0
- package/types/components/ui/input-surface.d.ts.map +1 -0
- package/types/components/ui/input.d.ts +4 -0
- package/types/components/ui/input.d.ts.map +1 -0
- package/types/components/ui/kbd.d.ts +10 -0
- package/types/components/ui/kbd.d.ts.map +1 -0
- package/types/components/ui/label.d.ts +6 -0
- package/types/components/ui/label.d.ts.map +1 -0
- package/types/components/ui/link.d.ts +15 -0
- package/types/components/ui/link.d.ts.map +1 -0
- package/types/components/ui/loading-indicator.d.ts +12 -0
- package/types/components/ui/loading-indicator.d.ts.map +1 -0
- package/types/components/ui/metric-value.d.ts +16 -0
- package/types/components/ui/metric-value.d.ts.map +1 -0
- package/types/components/ui/multi-select-combobox.d.ts +80 -0
- package/types/components/ui/multi-select-combobox.d.ts.map +1 -0
- package/types/components/ui/navbar.d.ts +18 -0
- package/types/components/ui/navbar.d.ts.map +1 -0
- package/types/components/ui/no-value-label.d.ts +14 -0
- package/types/components/ui/no-value-label.d.ts.map +1 -0
- package/types/components/ui/pagemenu.d.ts +18 -0
- package/types/components/ui/pagemenu.d.ts.map +1 -0
- package/types/components/ui/popover.d.ts +9 -0
- package/types/components/ui/popover.d.ts.map +1 -0
- package/types/components/ui/preview-chrome-variants.d.ts +5 -0
- package/types/components/ui/preview-chrome-variants.d.ts.map +1 -0
- package/types/components/ui/preview-chrome.d.ts +8 -0
- package/types/components/ui/preview-chrome.d.ts.map +1 -0
- package/types/components/ui/radio-group-variants.d.ts +5 -0
- package/types/components/ui/radio-group-variants.d.ts.map +1 -0
- package/types/components/ui/radio-group.d.ts +9 -0
- package/types/components/ui/radio-group.d.ts.map +1 -0
- package/types/components/ui/select-variants.d.ts +7 -0
- package/types/components/ui/select-variants.d.ts.map +1 -0
- package/types/components/ui/select.d.ts +20 -0
- package/types/components/ui/select.d.ts.map +1 -0
- package/types/components/ui/separator.d.ts +5 -0
- package/types/components/ui/separator.d.ts.map +1 -0
- package/types/components/ui/sheet.d.ts +26 -0
- package/types/components/ui/sheet.d.ts.map +1 -0
- package/types/components/ui/sidebar-context.d.ts +15 -0
- package/types/components/ui/sidebar-context.d.ts.map +1 -0
- package/types/components/ui/sidebar.d.ts +56 -0
- package/types/components/ui/sidebar.d.ts.map +1 -0
- package/types/components/ui/simple-pagination.d.ts +16 -0
- package/types/components/ui/simple-pagination.d.ts.map +1 -0
- package/types/components/ui/skeleton.d.ts +15 -0
- package/types/components/ui/skeleton.d.ts.map +1 -0
- package/types/components/ui/sonner.d.ts +5 -0
- package/types/components/ui/sonner.d.ts.map +1 -0
- package/types/components/ui/sortable-list.d.ts +39 -0
- package/types/components/ui/sortable-list.d.ts.map +1 -0
- package/types/components/ui/sticky-footer.d.ts +10 -0
- package/types/components/ui/sticky-footer.d.ts.map +1 -0
- package/types/components/ui/switch.d.ts +11 -0
- package/types/components/ui/switch.d.ts.map +1 -0
- package/types/components/ui/table.d.ts +21 -0
- package/types/components/ui/table.d.ts.map +1 -0
- package/types/components/ui/tabs-variants.d.ts +5 -0
- package/types/components/ui/tabs-variants.d.ts.map +1 -0
- package/types/components/ui/tabs.d.ts +21 -0
- package/types/components/ui/tabs.d.ts.map +1 -0
- package/types/components/ui/textarea.d.ts +4 -0
- package/types/components/ui/textarea.d.ts.map +1 -0
- package/types/components/ui/time-picker.d.ts +11 -0
- package/types/components/ui/time-picker.d.ts.map +1 -0
- package/types/components/ui/toggle-group.d.ts +17 -0
- package/types/components/ui/toggle-group.d.ts.map +1 -0
- package/types/components/ui/toggle-variants.d.ts +8 -0
- package/types/components/ui/toggle-variants.d.ts.map +1 -0
- package/types/components/ui/toggle.d.ts +11 -0
- package/types/components/ui/toggle.d.ts.map +1 -0
- package/types/components/ui/token-field.d.ts +8 -0
- package/types/components/ui/token-field.d.ts.map +1 -0
- package/types/components/ui/tooltip.d.ts +19 -0
- package/types/components/ui/tooltip.d.ts.map +1 -0
- package/types/components/ui/trend-badge.d.ts +13 -0
- package/types/components/ui/trend-badge.d.ts.map +1 -0
- package/types/components.d.ts +81 -0
- package/types/components.d.ts.map +1 -0
- package/types/hooks/use-global-dirty-state.d.ts +12 -0
- package/types/hooks/use-global-dirty-state.d.ts.map +1 -0
- package/types/hooks/use-mobile.d.ts +2 -0
- package/types/hooks/use-mobile.d.ts.map +1 -0
- package/types/hooks/use-simple-pagination.d.ts +45 -0
- package/types/hooks/use-simple-pagination.d.ts.map +1 -0
- package/types/index.d.ts +6 -0
- package/types/index.d.ts.map +1 -0
- package/types/lib/ds-utils.d.ts +36 -0
- package/types/lib/ds-utils.d.ts.map +1 -0
- package/types/lib/overlay-escape.d.ts +8 -0
- package/types/lib/overlay-escape.d.ts.map +1 -0
- package/types/lib/utils.d.ts +2 -0
- package/types/lib/utils.d.ts.map +1 -0
- package/types/page-templates.d.ts +6 -0
- package/types/page-templates.d.ts.map +1 -0
- package/types/patterns.d.ts +23 -0
- package/types/patterns.d.ts.map +1 -0
- package/types/primitives.d.ts +4 -0
- package/types/primitives.d.ts.map +1 -0
- package/types/providers/global-dirty-state-provider.d.ts +5 -0
- package/types/providers/global-dirty-state-provider.d.ts.map +1 -0
- package/types/providers/header-tooltip-provider.d.ts +4 -0
- package/types/providers/header-tooltip-provider.d.ts.map +1 -0
- package/types/providers/shade-context.d.ts +13 -0
- package/types/providers/shade-context.d.ts.map +1 -0
- package/types/providers/shade-provider.d.ts +11 -0
- package/types/providers/shade-provider.d.ts.map +1 -0
- package/types/shade-app.d.ts +17 -0
- package/types/shade-app.d.ts.map +1 -0
- package/types/shade-scope.d.ts +4 -0
- package/types/shade-scope.d.ts.map +1 -0
- package/types/tokens.d.ts +4 -0
- package/types/tokens.d.ts.map +1 -0
- package/types/utils.d.ts +7 -0
- package/types/utils.d.ts.map +1 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { cn } from "../../lib/ds-utils.js";
|
|
2
|
+
import { useShade } from "../../providers/shade-context.js";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ui/data-list.tsx
|
|
6
|
+
var DataList = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
7
|
+
return /* @__PURE__ */ jsx("div", {
|
|
8
|
+
ref,
|
|
9
|
+
className: cn("flex flex-col items-stretch", className),
|
|
10
|
+
...props,
|
|
11
|
+
children
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
DataList.displayName = "DataList";
|
|
15
|
+
var DataListHeader = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
16
|
+
return /* @__PURE__ */ jsx("div", {
|
|
17
|
+
ref,
|
|
18
|
+
className: cn("flex items-center justify-between gap-2 border-b p-2 text-xs font-medium tracking-wide text-muted-foreground uppercase", className),
|
|
19
|
+
...props,
|
|
20
|
+
children
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
DataListHeader.displayName = "DataListHeader";
|
|
24
|
+
var DataListHead = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
25
|
+
return /* @__PURE__ */ jsx("div", {
|
|
26
|
+
ref,
|
|
27
|
+
className: cn("", className),
|
|
28
|
+
...props,
|
|
29
|
+
children
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
DataListHead.displayName = "DataListHead";
|
|
33
|
+
var DataListBody = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
34
|
+
return /* @__PURE__ */ jsx("div", {
|
|
35
|
+
ref,
|
|
36
|
+
className: cn("flex flex-col items-stretch pt-1.5", className),
|
|
37
|
+
...props,
|
|
38
|
+
children
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
DataListBody.displayName = "DataListBody";
|
|
42
|
+
var DataListRow = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
43
|
+
const { isAdmin7 } = useShade();
|
|
44
|
+
return /* @__PURE__ */ jsx("div", {
|
|
45
|
+
ref,
|
|
46
|
+
className: cn("group/row relative flex items-center justify-between gap-3 py-0.5 before:absolute before:-inset-x-0.5 before:inset-y-0.5 before:z-0 before:bg-muted/60 before:opacity-0 hover:before:opacity-100", isAdmin7 ? "before:rounded-control" : "before:rounded-[6px]", className),
|
|
47
|
+
...props,
|
|
48
|
+
children
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
DataListRow.displayName = "DataListRow";
|
|
52
|
+
var DataListBar = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
53
|
+
return /* @__PURE__ */ jsx("div", {
|
|
54
|
+
ref,
|
|
55
|
+
className: cn("absolute inset-x-0 inset-y-1 z-0 origin-left rounded-[4px] bg-state-info/10 transition-all group-hover/row:bg-state-info/25 dark:bg-state-info/20 dark:group-hover/row:bg-state-info/35", className),
|
|
56
|
+
...props,
|
|
57
|
+
children
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
DataListBar.displayName = "DataListBar";
|
|
61
|
+
var DataListItemContent = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
62
|
+
return /* @__PURE__ */ jsx("div", {
|
|
63
|
+
ref,
|
|
64
|
+
className: cn("relative z-10 flex max-w-[calc(100%-32px)] min-w-0 items-center p-2 text-sm font-medium transition-[max-width] duration-300 ease-in-out group-hover/datalist:max-w-[calc(100%-100px)]", className),
|
|
65
|
+
...props,
|
|
66
|
+
children
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
DataListItemContent.displayName = "DataListItemContent";
|
|
70
|
+
var DataListItemValue = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
71
|
+
const hasMultipleChildren = React.Children.toArray(children).length > 1;
|
|
72
|
+
return /* @__PURE__ */ jsx("div", {
|
|
73
|
+
ref,
|
|
74
|
+
className: cn("z-10 flex items-center", hasMultipleChildren && "[&>[data-type=\"value-abs\"]]:transition-transform [&>[data-type=\"value-abs\"]]:duration-300 [&>[data-type=\"value-abs\"]]:group-hover/datalist:-translate-x-14", hasMultipleChildren && "[&>[data-type=\"value-perc\"]]:invisible [&>[data-type=\"value-perc\"]]:absolute [&>[data-type=\"value-perc\"]]:right-0 [&>[data-type=\"value-perc\"]]:translate-x-14 [&>[data-type=\"value-perc\"]]:opacity-0 [&>[data-type=\"value-perc\"]]:transition-all [&>[data-type=\"value-perc\"]]:duration-300 [&>[data-type=\"value-perc\"]]:group-hover/datalist:visible [&>[data-type=\"value-perc\"]]:group-hover/datalist:translate-x-0 [&>[data-type=\"value-perc\"]]:group-hover/datalist:opacity-100", className),
|
|
75
|
+
...props,
|
|
76
|
+
children
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
DataListItemValue.displayName = "DataListItemValue";
|
|
80
|
+
var DataListItemValueAbs = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
81
|
+
return /* @__PURE__ */ jsx("div", {
|
|
82
|
+
ref,
|
|
83
|
+
className: cn("z-10 px-2 font-mono text-sm", className),
|
|
84
|
+
"data-type": "value-abs",
|
|
85
|
+
...props,
|
|
86
|
+
children
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
DataListItemValueAbs.displayName = "DataListItemValueAbs";
|
|
90
|
+
var DataListItemValuePerc = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
91
|
+
return /* @__PURE__ */ jsx("div", {
|
|
92
|
+
ref,
|
|
93
|
+
className: cn("px-3 font-mono text-sm text-muted-foreground", className),
|
|
94
|
+
"data-type": "value-perc",
|
|
95
|
+
...props,
|
|
96
|
+
children
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
DataListItemValuePerc.displayName = "DataListItemValuePerc";
|
|
100
|
+
//#endregion
|
|
101
|
+
export { DataList, DataListBar, DataListBody, DataListHead, DataListHeader, DataListItemContent, DataListItemValue, DataListItemValueAbs, DataListItemValuePerc, DataListRow };
|
|
102
|
+
|
|
103
|
+
//# sourceMappingURL=data-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-list.js","names":[],"sources":["../../../src/components/ui/data-list.tsx"],"sourcesContent":["import { useShade } from '@/providers/shade-context';\nimport { cn } from '@/lib/utils';\nimport React from 'react';\n\n/* Data List main component\n/* -------------------------------------------------------------------------- */\ninterface DataListProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nconst DataList = React.forwardRef<HTMLDivElement, DataListProps>(\n ({ children, className, ...props }, ref) => {\n return (\n <div ref={ref} className={cn('flex flex-col items-stretch', className)} {...props}>\n {children}\n </div>\n );\n },\n);\n\nDataList.displayName = 'DataList';\n\n/* Header\n/* -------------------------------------------------------------------------- */\ninterface DataListHeaderProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nconst DataListHeader = React.forwardRef<HTMLDivElement, DataListHeaderProps>(\n ({ children, className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n 'flex items-center justify-between gap-2 border-b p-2 text-xs font-medium tracking-wide text-muted-foreground uppercase',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nDataListHeader.displayName = 'DataListHeader';\n\n/* Head\n/* -------------------------------------------------------------------------- */\ninterface DataListHeadProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nconst DataListHead = React.forwardRef<HTMLDivElement, DataListHeadProps>(\n ({ children, className, ...props }, ref) => {\n return (\n <div ref={ref} className={cn('', className)} {...props}>\n {children}\n </div>\n );\n },\n);\n\nDataListHead.displayName = 'DataListHead';\n\n/* Body\n/* -------------------------------------------------------------------------- */\ninterface DataListBodyProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nconst DataListBody = React.forwardRef<HTMLDivElement, DataListBodyProps>(\n ({ children, className, ...props }, ref) => {\n return (\n <div ref={ref} className={cn('flex flex-col items-stretch pt-1.5', className)} {...props}>\n {children}\n </div>\n );\n },\n);\n\nDataListBody.displayName = 'DataListBody';\n\n/* Data row\n/* -------------------------------------------------------------------------- */\ninterface DataListRowProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nconst DataListRow = React.forwardRef<HTMLDivElement, DataListRowProps>(\n ({ children, className, ...props }, ref) => {\n const { isAdmin7 } = useShade();\n return (\n <div\n ref={ref}\n className={cn(\n 'group/row relative flex items-center justify-between gap-3 py-0.5 before:absolute before:-inset-x-0.5 before:inset-y-0.5 before:z-0 before:bg-muted/60 before:opacity-0 hover:before:opacity-100',\n isAdmin7 ? 'before:rounded-control' : 'before:rounded-[6px]',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nDataListRow.displayName = 'DataListRow';\n\n/* Bar\n/* -------------------------------------------------------------------------- */\ninterface DataListBarProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nconst DataListBar = React.forwardRef<HTMLDivElement, DataListBarProps>(\n ({ children, className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n 'absolute inset-x-0 inset-y-1 z-0 origin-left rounded-[4px] bg-state-info/10 transition-all group-hover/row:bg-state-info/25 dark:bg-state-info/20 dark:group-hover/row:bg-state-info/35',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nDataListBar.displayName = 'DataListBar';\n\n/* List item content\n/* -------------------------------------------------------------------------- */\ninterface DataListItemContentProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nconst DataListItemContent = React.forwardRef<HTMLDivElement, DataListItemContentProps>(\n ({ children, className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n 'relative z-10 flex max-w-[calc(100%-32px)] min-w-0 items-center p-2 text-sm font-medium transition-[max-width] duration-300 ease-in-out group-hover/datalist:max-w-[calc(100%-100px)]',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nDataListItemContent.displayName = 'DataListItemContent';\n\n/* Value\n/* -------------------------------------------------------------------------- */\ninterface DataListItemValueProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nconst DataListItemValue = React.forwardRef<HTMLDivElement, DataListItemValueProps>(\n ({ children, className, ...props }, ref) => {\n // Apply animation styles when there are multiple children\n const childrenArray = React.Children.toArray(children);\n const hasMultipleChildren = childrenArray.length > 1;\n\n return (\n <div\n ref={ref}\n className={cn(\n 'z-10 flex items-center',\n // Apply animation styles when there are multiple children\n hasMultipleChildren &&\n '[&>[data-type=\"value-abs\"]]:transition-transform [&>[data-type=\"value-abs\"]]:duration-300 [&>[data-type=\"value-abs\"]]:group-hover/datalist:-translate-x-14',\n hasMultipleChildren &&\n '[&>[data-type=\"value-perc\"]]:invisible [&>[data-type=\"value-perc\"]]:absolute [&>[data-type=\"value-perc\"]]:right-0 [&>[data-type=\"value-perc\"]]:translate-x-14 [&>[data-type=\"value-perc\"]]:opacity-0 [&>[data-type=\"value-perc\"]]:transition-all [&>[data-type=\"value-perc\"]]:duration-300 [&>[data-type=\"value-perc\"]]:group-hover/datalist:visible [&>[data-type=\"value-perc\"]]:group-hover/datalist:translate-x-0 [&>[data-type=\"value-perc\"]]:group-hover/datalist:opacity-100',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nDataListItemValue.displayName = 'DataListItemValue';\n\n/* Value absolute value, e.g. 996.178.341\n/* -------------------------------------------------------------------------- */\ninterface DataListItemValueAbsProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nconst DataListItemValueAbs = React.forwardRef<HTMLDivElement, DataListItemValueAbsProps>(\n ({ children, className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn('z-10 px-2 font-mono text-sm', className)}\n data-type=\"value-abs\"\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nDataListItemValueAbs.displayName = 'DataListItemValueAbs';\n\n/* Value percentage value, e.g. 85%\n/* -------------------------------------------------------------------------- */\ninterface DataListItemValuePercProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nconst DataListItemValuePerc = React.forwardRef<HTMLDivElement, DataListItemValuePercProps>(\n ({ children, className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn('px-3 font-mono text-sm text-muted-foreground', className)}\n data-type=\"value-perc\"\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nDataListItemValuePerc.displayName = 'DataListItemValuePerc';\n\n/* End of components\n/* -------------------------------------------------------------------------- */\nexport {\n DataList,\n DataListHeader,\n DataListHead,\n DataListBody,\n DataListRow,\n DataListBar,\n DataListItemContent,\n DataListItemValue,\n DataListItemValueAbs,\n DataListItemValuePerc,\n};\n"],"mappings":";;;;;AAWA,IAAM,WAAW,MAAM,YACpB,EAAE,UAAU,WAAW,GAAG,SAAS,QAAQ;CAC1C,OACE,oBAAC,OAAD;EAAU;EAAK,WAAW,GAAG,+BAA+B,SAAS;EAAG,GAAI;EACzE;CACE,CAAA;AAET,CACF;AAEA,SAAS,cAAc;AASvB,IAAM,iBAAiB,MAAM,YAC1B,EAAE,UAAU,WAAW,GAAG,SAAS,QAAQ;CAC1C,OACE,oBAAC,OAAD;EACO;EACL,WAAW,GACT,0HACA,SACF;EACA,GAAI;EAEH;CACE,CAAA;AAET,CACF;AAEA,eAAe,cAAc;AAS7B,IAAM,eAAe,MAAM,YACxB,EAAE,UAAU,WAAW,GAAG,SAAS,QAAQ;CAC1C,OACE,oBAAC,OAAD;EAAU;EAAK,WAAW,GAAG,IAAI,SAAS;EAAG,GAAI;EAC9C;CACE,CAAA;AAET,CACF;AAEA,aAAa,cAAc;AAS3B,IAAM,eAAe,MAAM,YACxB,EAAE,UAAU,WAAW,GAAG,SAAS,QAAQ;CAC1C,OACE,oBAAC,OAAD;EAAU;EAAK,WAAW,GAAG,sCAAsC,SAAS;EAAG,GAAI;EAChF;CACE,CAAA;AAET,CACF;AAEA,aAAa,cAAc;AAS3B,IAAM,cAAc,MAAM,YACvB,EAAE,UAAU,WAAW,GAAG,SAAS,QAAQ;CAC1C,MAAM,EAAE,aAAa,SAAS;CAC9B,OACE,oBAAC,OAAD;EACO;EACL,WAAW,GACT,oMACA,WAAW,2BAA2B,wBACtC,SACF;EACA,GAAI;EAEH;CACE,CAAA;AAET,CACF;AAEA,YAAY,cAAc;AAS1B,IAAM,cAAc,MAAM,YACvB,EAAE,UAAU,WAAW,GAAG,SAAS,QAAQ;CAC1C,OACE,oBAAC,OAAD;EACO;EACL,WAAW,GACT,2LACA,SACF;EACA,GAAI;EAEH;CACE,CAAA;AAET,CACF;AAEA,YAAY,cAAc;AAS1B,IAAM,sBAAsB,MAAM,YAC/B,EAAE,UAAU,WAAW,GAAG,SAAS,QAAQ;CAC1C,OACE,oBAAC,OAAD;EACO;EACL,WAAW,GACT,yLACA,SACF;EACA,GAAI;EAEH;CACE,CAAA;AAET,CACF;AAEA,oBAAoB,cAAc;AASlC,IAAM,oBAAoB,MAAM,YAC7B,EAAE,UAAU,WAAW,GAAG,SAAS,QAAQ;CAG1C,MAAM,sBADgB,MAAM,SAAS,QAAQ,QACjB,CAAA,CAAc,SAAS;CAEnD,OACE,oBAAC,OAAD;EACO;EACL,WAAW,GACT,0BAEA,uBACE,oKACF,uBACE,0eACF,SACF;EACA,GAAI;EAEH;CACE,CAAA;AAET,CACF;AAEA,kBAAkB,cAAc;AAShC,IAAM,uBAAuB,MAAM,YAChC,EAAE,UAAU,WAAW,GAAG,SAAS,QAAQ;CAC1C,OACE,oBAAC,OAAD;EACO;EACL,WAAW,GAAG,+BAA+B,SAAS;EACtD,aAAU;EACV,GAAI;EAEH;CACE,CAAA;AAET,CACF;AAEA,qBAAqB,cAAc;AASnC,IAAM,wBAAwB,MAAM,YACjC,EAAE,UAAU,WAAW,GAAG,SAAS,QAAQ;CAC1C,OACE,oBAAC,OAAD;EACO;EACL,WAAW,GAAG,gDAAgD,SAAS;EACvE,aAAU;EACV,GAAI;EAEH;CACE,CAAA;AAET,CACF;AAEA,sBAAsB,cAAc"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cn } from "../../lib/ds-utils.js";
|
|
2
|
+
import { ShadeScope } from "../../shade-scope.js";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
6
|
+
//#region src/components/ui/dialog.tsx
|
|
7
|
+
var Dialog = DialogPrimitive.Root;
|
|
8
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
9
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
10
|
+
var DialogClose = DialogPrimitive.Close;
|
|
11
|
+
var DialogOverlay = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
|
|
12
|
+
ref,
|
|
13
|
+
className: cn("fixed inset-0 z-50 transform-gpu bg-black/30 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 dark:bg-black/60", className),
|
|
14
|
+
...props
|
|
15
|
+
}));
|
|
16
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
17
|
+
var DialogContent = React$1.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(DialogPortal, { children: /* @__PURE__ */ jsxs(ShadeScope, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsx(DialogPrimitive.Content, {
|
|
18
|
+
ref,
|
|
19
|
+
className: cn("fixed top-[8vmin] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] transform-gpu gap-6 bg-surface-elevated-2 p-6 shadow-lg outline-hidden duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:rounded-lg", className),
|
|
20
|
+
...props,
|
|
21
|
+
children
|
|
22
|
+
})] }) }));
|
|
23
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
24
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
25
|
+
className: cn("flex flex-col gap-y-1.5 text-center sm:text-left", className),
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
DialogHeader.displayName = "DialogHeader";
|
|
29
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
30
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:items-end sm:justify-end sm:gap-2 [&_button]:min-w-20", className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
DialogFooter.displayName = "DialogFooter";
|
|
34
|
+
var DialogTitle = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, {
|
|
35
|
+
ref,
|
|
36
|
+
className: cn("text-xl leading-none font-semibold tracking-tight", className),
|
|
37
|
+
...props
|
|
38
|
+
}));
|
|
39
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
40
|
+
var DialogDescription = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Description, {
|
|
41
|
+
ref,
|
|
42
|
+
className: cn("text-muted-foreground", className),
|
|
43
|
+
...props
|
|
44
|
+
}));
|
|
45
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.js","names":[],"sources":["../../../src/components/ui/dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\n\nimport { cn } from '@/lib/utils';\nimport { ShadeScope } from '@/shade-scope';\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 transform-gpu bg-black/30 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 dark:bg-black/60',\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <ShadeScope>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed top-[8vmin] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] transform-gpu gap-6 bg-surface-elevated-2 p-6 shadow-lg outline-hidden duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:rounded-lg',\n className,\n )}\n {...props}\n >\n {children}\n </DialogPrimitive.Content>\n </ShadeScope>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-y-1.5 text-center sm:text-left', className)} {...props} />\n);\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n 'flex flex-col-reverse sm:flex-row sm:items-end sm:justify-end sm:gap-2 [&_button]:min-w-20',\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-xl leading-none font-semibold tracking-tight', className)}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-muted-foreground', className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"mappings":";;;;;;AAMA,IAAM,SAAS,gBAAgB;AAE/B,IAAM,gBAAgB,gBAAgB;AAEtC,IAAM,eAAe,gBAAgB;AAErC,IAAM,cAAc,gBAAgB;AAEpC,IAAM,gBAAgB,QAAM,YAGzB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,SAAjB;CACO;CACL,WAAW,GACT,yLACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,IAAM,gBAAgB,QAAM,YAGzB,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAAC,cAAD,EAAA,UACE,qBAAC,YAAD,EAAA,UAAA,CACE,oBAAC,eAAD,CAAgB,CAAA,GAChB,oBAAC,gBAAgB,SAAjB;CACO;CACL,WAAW,GACT,oWACA,SACF;CACA,GAAI;CAEH;AACsB,CAAA,CACf,EAAA,CAAA,EACA,CAAA,CACf;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,IAAM,gBAAgB,EAAE,WAAW,GAAG,YACpC,oBAAC,OAAD;CAAK,WAAW,GAAG,oDAAoD,SAAS;CAAG,GAAI;AAAQ,CAAA;AAEjG,aAAa,cAAc;AAE3B,IAAM,gBAAgB,EAAE,WAAW,GAAG,YACpC,oBAAC,OAAD;CACE,WAAW,GACT,8FACA,SACF;CACA,GAAI;AACL,CAAA;AAEH,aAAa,cAAc;AAE3B,IAAM,cAAc,QAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,OAAjB;CACO;CACL,WAAW,GAAG,qDAAqD,SAAS;CAC5E,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc,gBAAgB,MAAM;AAEhD,IAAM,oBAAoB,QAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,aAAjB;CACO;CACL,WAAW,GAAG,yBAAyB,SAAS;CAChD,GAAI;AACL,CAAA,CACF;AACD,kBAAkB,cAAc,gBAAgB,YAAY"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { cn } from "../../lib/ds-utils.js";
|
|
2
|
+
import { ShadeScope } from "../../shade-scope.js";
|
|
3
|
+
import { consumeOverlayEscape } from "../../lib/overlay-escape.js";
|
|
4
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
8
|
+
//#region src/components/ui/dropdown-menu.tsx
|
|
9
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
10
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
11
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
12
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
13
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
14
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
15
|
+
var DropdownMenuSubTrigger = React$1.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
|
|
16
|
+
ref,
|
|
17
|
+
className: cn("flex cursor-default items-center gap-2 rounded-menu-item px-2 py-1.5 text-control outline-hidden select-none hover:bg-interactive-hover focus:bg-interactive-hover data-[state=open]:bg-interactive-hover [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className),
|
|
18
|
+
...props,
|
|
19
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto" })]
|
|
20
|
+
}));
|
|
21
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
22
|
+
var DropdownMenuSubContent = React$1.forwardRef(({ className, onEscapeKeyDown, ...props }, ref) => /* @__PURE__ */ jsx(ShadeScope, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
|
|
23
|
+
ref,
|
|
24
|
+
className: cn("z-50 min-w-[8rem] overflow-hidden rounded-menu border border-border/60 bg-surface-elevated-2 p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/30", className),
|
|
25
|
+
onEscapeKeyDown: (event) => consumeOverlayEscape(event, onEscapeKeyDown),
|
|
26
|
+
...props
|
|
27
|
+
}) }));
|
|
28
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
29
|
+
var DropdownMenuContent = React$1.forwardRef(({ className, onEscapeKeyDown, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(ShadeScope, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
|
|
30
|
+
ref,
|
|
31
|
+
className: cn("z-50 min-w-[8rem] overflow-hidden rounded-menu border border-border/60 bg-surface-elevated-2 p-1 text-popover-foreground shadow-md dark:border-border/30", "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className),
|
|
32
|
+
sideOffset,
|
|
33
|
+
onEscapeKeyDown: (event) => consumeOverlayEscape(event, onEscapeKeyDown),
|
|
34
|
+
...props
|
|
35
|
+
}) }) }));
|
|
36
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
37
|
+
var DropdownMenuItem = React$1.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
|
|
38
|
+
ref,
|
|
39
|
+
className: cn("relative flex cursor-pointer items-center gap-2 rounded-menu-item px-2 py-1.5 text-control outline-hidden transition-colors select-none focus:bg-interactive-hover focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", inset && "pl-8", className),
|
|
40
|
+
...props
|
|
41
|
+
}));
|
|
42
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
43
|
+
var DropdownMenuCheckboxItem = React$1.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, {
|
|
44
|
+
ref,
|
|
45
|
+
checked,
|
|
46
|
+
className: cn("relative flex cursor-default items-center rounded-menu-item py-1.5 pr-2 pl-8 text-control outline-hidden transition-colors select-none focus:bg-interactive-hover focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
|
|
47
|
+
...props,
|
|
48
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
49
|
+
className: "absolute left-2 flex size-3.5 items-center justify-center",
|
|
50
|
+
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "size-4" }) })
|
|
51
|
+
}), children]
|
|
52
|
+
}));
|
|
53
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
54
|
+
var DropdownMenuRadioItem = React$1.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, {
|
|
55
|
+
ref,
|
|
56
|
+
className: cn("relative flex cursor-default items-center rounded-menu-item py-1.5 pr-2 pl-8 text-control outline-hidden transition-colors select-none focus:bg-interactive-hover focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
|
|
57
|
+
...props,
|
|
58
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
59
|
+
className: "absolute left-2 flex size-3.5 items-center justify-center",
|
|
60
|
+
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "size-2 fill-current" }) })
|
|
61
|
+
}), children]
|
|
62
|
+
}));
|
|
63
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
64
|
+
var DropdownMenuLabel = React$1.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, {
|
|
65
|
+
ref,
|
|
66
|
+
className: cn("px-2 py-1.5 text-control font-semibold", inset && "pl-8", className),
|
|
67
|
+
...props
|
|
68
|
+
}));
|
|
69
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
70
|
+
var DropdownMenuSeparator = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, {
|
|
71
|
+
ref,
|
|
72
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
73
|
+
...props
|
|
74
|
+
}));
|
|
75
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
76
|
+
var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
77
|
+
return /* @__PURE__ */ jsx("span", {
|
|
78
|
+
className: cn("ml-auto text-xs tracking-wider opacity-60", className),
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
83
|
+
//#endregion
|
|
84
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","names":[],"sources":["../../../src/components/ui/dropdown-menu.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { consumeOverlayEscape } from '@/lib/overlay-escape';\nimport { ShadeScope } from '@/shade-scope';\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default items-center gap-2 rounded-menu-item px-2 py-1.5 text-control outline-hidden select-none hover:bg-interactive-hover focus:bg-interactive-hover data-[state=open]:bg-interactive-hover [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, onEscapeKeyDown, ...props }, ref) => (\n <ShadeScope>\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-menu border border-border/60 bg-surface-elevated-2 p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/30',\n className,\n )}\n onEscapeKeyDown={(event) => consumeOverlayEscape(event, onEscapeKeyDown)}\n {...props}\n />\n </ShadeScope>\n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, onEscapeKeyDown, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <ShadeScope>\n <DropdownMenuPrimitive.Content\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-menu border border-border/60 bg-surface-elevated-2 p-1 text-popover-foreground shadow-md dark:border-border/30',\n 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',\n className,\n )}\n sideOffset={sideOffset}\n onEscapeKeyDown={(event) => consumeOverlayEscape(event, onEscapeKeyDown)}\n {...props}\n />\n </ShadeScope>\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-pointer items-center gap-2 rounded-menu-item px-2 py-1.5 text-control outline-hidden transition-colors select-none focus:bg-interactive-hover focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n checked={checked}\n className={cn(\n 'relative flex cursor-default items-center rounded-menu-item py-1.5 pr-2 pl-8 text-control outline-hidden transition-colors select-none focus:bg-interactive-hover focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default items-center rounded-menu-item py-1.5 pr-2 pl-8 text-control outline-hidden transition-colors select-none focus:bg-interactive-hover focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-control font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={cn('ml-auto text-xs tracking-wider opacity-60', className)} {...props} />;\n};\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"],"mappings":";;;;;;;;AAOA,IAAM,eAAe,sBAAsB;AAE3C,IAAM,sBAAsB,sBAAsB;AAElD,IAAM,oBAAoB,sBAAsB;AAEhD,IAAM,qBAAqB,sBAAsB;AAEjD,IAAM,kBAAkB,sBAAsB;AAE9C,IAAM,yBAAyB,sBAAsB;AAErD,IAAM,yBAAyB,QAAM,YAKlC,EAAE,WAAW,OAAO,UAAU,GAAG,SAAS,QAC3C,qBAAC,sBAAsB,YAAvB;CACO;CACL,WAAW,GACT,yQACA,SAAS,QACT,SACF;CACA,GAAI;WAPN,CASG,UACD,oBAAC,cAAD,EAAc,WAAU,UAAW,CAAA,CACH;EACnC;AACD,uBAAuB,cAAc,sBAAsB,WAAW;AAEtE,IAAM,yBAAyB,QAAM,YAGlC,EAAE,WAAW,iBAAiB,GAAG,SAAS,QAC3C,oBAAC,YAAD,EAAA,UACE,oBAAC,sBAAsB,YAAvB;CACO;CACL,WAAW,GACT,6eACA,SACF;CACA,kBAAkB,UAAU,qBAAqB,OAAO,eAAe;CACvE,GAAI;AACL,CAAA,EACS,CAAA,CACb;AACD,uBAAuB,cAAc,sBAAsB,WAAW;AAEtE,IAAM,sBAAsB,QAAM,YAG/B,EAAE,WAAW,iBAAiB,aAAa,GAAG,GAAG,SAAS,QAC3D,oBAAC,sBAAsB,QAAvB,EAAA,UACE,oBAAC,YAAD,EAAA,UACE,oBAAC,sBAAsB,SAAvB;CACO;CACL,WAAW,GACT,4JACA,oVACA,SACF;CACY;CACZ,kBAAkB,UAAU,qBAAqB,OAAO,eAAe;CACvE,GAAI;AACL,CAAA,EACS,CAAA,EACgB,CAAA,CAC/B;AACD,oBAAoB,cAAc,sBAAsB,QAAQ;AAEhE,IAAM,mBAAmB,QAAM,YAK5B,EAAE,WAAW,OAAO,GAAG,SAAS,QACjC,oBAAC,sBAAsB,MAAvB;CACO;CACL,WAAW,GACT,kSACA,SAAS,QACT,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,iBAAiB,cAAc,sBAAsB,KAAK;AAE1D,IAAM,2BAA2B,QAAM,YAGpC,EAAE,WAAW,UAAU,SAAS,GAAG,SAAS,QAC7C,qBAAC,sBAAsB,cAAvB;CACO;CACI;CACT,WAAW,GACT,iQACA,SACF;CACA,GAAI;WAPN,CASE,oBAAC,QAAD;EAAM,WAAU;YACd,oBAAC,sBAAsB,eAAvB,EAAA,UACE,oBAAC,OAAD,EAAO,WAAU,SAAU,CAAA,EACQ,CAAA;CACjC,CAAA,GACL,QACiC;EACrC;AACD,yBAAyB,cAAc,sBAAsB,aAAa;AAE1E,IAAM,wBAAwB,QAAM,YAGjC,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,sBAAsB,WAAvB;CACO;CACL,WAAW,GACT,iQACA,SACF;CACA,GAAI;WANN,CAQE,oBAAC,QAAD;EAAM,WAAU;YACd,oBAAC,sBAAsB,eAAvB,EAAA,UACE,oBAAC,QAAD,EAAQ,WAAU,sBAAuB,CAAA,EACN,CAAA;CACjC,CAAA,GACL,QAC8B;EAClC;AACD,sBAAsB,cAAc,sBAAsB,UAAU;AAEpE,IAAM,oBAAoB,QAAM,YAK7B,EAAE,WAAW,OAAO,GAAG,SAAS,QACjC,oBAAC,sBAAsB,OAAvB;CACO;CACL,WAAW,GAAG,0CAA0C,SAAS,QAAQ,SAAS;CAClF,GAAI;AACL,CAAA,CACF;AACD,kBAAkB,cAAc,sBAAsB,MAAM;AAE5D,IAAM,wBAAwB,QAAM,YAGjC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,sBAAsB,WAAvB;CACO;CACL,WAAW,GAAG,4BAA4B,SAAS;CACnD,GAAI;AACL,CAAA,CACF;AACD,sBAAsB,cAAc,sBAAsB,UAAU;AAEpE,IAAM,wBAAwB,EAAE,WAAW,GAAG,YAAmD;CAC/F,OAAO,oBAAC,QAAD;EAAM,WAAW,GAAG,6CAA6C,SAAS;EAAG,GAAI;CAAQ,CAAA;AAClG;AACA,qBAAqB,cAAc"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { cn } from "../../lib/ds-utils.js";
|
|
2
|
+
import { buttonVariants } from "./button-variants.js";
|
|
3
|
+
import { inputSurface } from "./input-surface.js";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
//#region src/components/ui/dropzone-variants.ts
|
|
6
|
+
var dropzoneBaseVariants = cva("flex cursor-pointer flex-col items-center justify-center outline-hidden", {
|
|
7
|
+
variants: { variant: {
|
|
8
|
+
default: cn(inputSurface("self"), "border-2 border-dashed bg-transparent p-10 hover:border-border-strong"),
|
|
9
|
+
filled: cn(inputSurface("self"), "border-transparent bg-muted p-3 hover:bg-interactive-hover"),
|
|
10
|
+
button: "flex-row",
|
|
11
|
+
buttonSecondary: "flex-row"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: { variant: "default" }
|
|
14
|
+
});
|
|
15
|
+
function dropzoneVariants(props = {}, isAdmin7 = true, shape = isAdmin7 ? "pill" : "rounded") {
|
|
16
|
+
return cn(dropzoneBaseVariants(props), props.variant === "button" && buttonVariants({
|
|
17
|
+
isAdmin7,
|
|
18
|
+
shape,
|
|
19
|
+
variant: "outline"
|
|
20
|
+
}), props.variant === "buttonSecondary" && buttonVariants({
|
|
21
|
+
isAdmin7,
|
|
22
|
+
shape,
|
|
23
|
+
size: "sm",
|
|
24
|
+
variant: "secondary"
|
|
25
|
+
}), props.className);
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { dropzoneVariants };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=dropzone-variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropzone-variants.js","names":[],"sources":["../../../src/components/ui/dropzone-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport { buttonVariants } from '@/components/ui/button-variants';\nimport { inputSurface } from '@/components/ui/input-surface';\nimport { cn } from '@/lib/utils';\nimport type { ControlShape } from '@/providers/shade-context';\n\nconst dropzoneBaseVariants = cva(\n 'flex cursor-pointer flex-col items-center justify-center outline-hidden',\n {\n variants: {\n variant: {\n default: cn(\n inputSurface('self'),\n 'border-2 border-dashed bg-transparent p-10 hover:border-border-strong',\n ),\n filled: cn(\n inputSurface('self'),\n 'border-transparent bg-muted p-3 hover:bg-interactive-hover',\n ),\n button: 'flex-row',\n buttonSecondary: 'flex-row',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\n// Keep the exported variants function useful outside the component, with current defaults.\nfunction dropzoneVariants(\n props: Parameters<typeof dropzoneBaseVariants>[0] = {},\n isAdmin7 = true,\n shape: ControlShape = isAdmin7 ? 'pill' : 'rounded',\n) {\n return cn(\n dropzoneBaseVariants(props),\n props.variant === 'button' && buttonVariants({ isAdmin7, shape, variant: 'outline' }),\n props.variant === 'buttonSecondary' &&\n buttonVariants({ isAdmin7, shape, size: 'sm', variant: 'secondary' }),\n props.className,\n );\n}\n\nexport { dropzoneVariants };\n"],"mappings":";;;;;AAMA,IAAM,uBAAuB,IAC3B,2EACA;CACE,UAAU,EACR,SAAS;EACP,SAAS,GACP,aAAa,MAAM,GACnB,uEACF;EACA,QAAQ,GACN,aAAa,MAAM,GACnB,4DACF;EACA,QAAQ;EACR,iBAAiB;CACnB,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CACF;AAGA,SAAS,iBACP,QAAoD,CAAC,GACrD,WAAW,MACX,QAAsB,WAAW,SAAS,WAC1C;CACA,OAAO,GACL,qBAAqB,KAAK,GAC1B,MAAM,YAAY,YAAY,eAAe;EAAE;EAAU;EAAO,SAAS;CAAU,CAAC,GACpF,MAAM,YAAY,qBAChB,eAAe;EAAE;EAAU;EAAO,MAAM;EAAM,SAAS;CAAY,CAAC,GACtE,MAAM,SACR;AACF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { cn } from "../../lib/ds-utils.js";
|
|
2
|
+
import { useShade } from "../../providers/shade-context.js";
|
|
3
|
+
import { dropzoneVariants } from "./dropzone-variants.js";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useDropzone } from "react-dropzone";
|
|
7
|
+
//#region src/components/ui/dropzone.tsx
|
|
8
|
+
var Dropzone = React$1.forwardRef(({ accept, multiple = false, maxFiles = multiple ? 0 : 1, disabled = false, noDragEventsBubbling = false, inputId, inputAriaLabel, inputTestId, onDropAccepted, onDropRejected, variant, className, children, ...props }, ref) => {
|
|
9
|
+
const { controlShape, isAdmin7 } = useShade();
|
|
10
|
+
const { getRootProps, getInputProps, rootRef, isDragActive, isDragAccept, isDragReject, isFocused, isFileDialogActive, open } = useDropzone({
|
|
11
|
+
accept,
|
|
12
|
+
multiple,
|
|
13
|
+
maxFiles,
|
|
14
|
+
disabled,
|
|
15
|
+
noDragEventsBubbling,
|
|
16
|
+
onDropAccepted,
|
|
17
|
+
onDropRejected
|
|
18
|
+
});
|
|
19
|
+
const content = typeof children === "function" ? children({
|
|
20
|
+
isDragActive,
|
|
21
|
+
isDragAccept,
|
|
22
|
+
isDragReject,
|
|
23
|
+
isFocused,
|
|
24
|
+
isFileDialogActive,
|
|
25
|
+
open
|
|
26
|
+
}) : children;
|
|
27
|
+
const setRootRefs = (element) => {
|
|
28
|
+
rootRef.current = element;
|
|
29
|
+
if (typeof ref === "function") ref(element);
|
|
30
|
+
else if (ref) ref.current = element;
|
|
31
|
+
};
|
|
32
|
+
const { ref: _, ...rootProps } = getRootProps({
|
|
33
|
+
...props,
|
|
34
|
+
role: "button",
|
|
35
|
+
tabIndex: disabled ? -1 : 0,
|
|
36
|
+
"aria-disabled": disabled,
|
|
37
|
+
"aria-invalid": isDragReject || void 0,
|
|
38
|
+
className: cn(dropzoneVariants({ variant }, isAdmin7, controlShape), disabled && "pointer-events-none cursor-not-allowed opacity-60", isDragReject && "border-state-danger bg-state-danger/10", isDragActive && !isDragReject && !disabled && "border-state-success bg-state-success/10", className)
|
|
39
|
+
});
|
|
40
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
41
|
+
ref: setRootRefs,
|
|
42
|
+
...rootProps,
|
|
43
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
44
|
+
...getInputProps(),
|
|
45
|
+
"aria-label": inputAriaLabel,
|
|
46
|
+
"data-testid": inputTestId,
|
|
47
|
+
id: inputId
|
|
48
|
+
}), content]
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
Dropzone.displayName = "Dropzone";
|
|
52
|
+
//#endregion
|
|
53
|
+
export { Dropzone };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=dropzone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropzone.js","names":[],"sources":["../../../src/components/ui/dropzone.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Accept, DropEvent, FileRejection, useDropzone } from 'react-dropzone';\nimport { type VariantProps } from 'class-variance-authority';\nimport { dropzoneVariants } from '@/components/ui/dropzone-variants';\nimport { useShade } from '@/providers/shade-context';\nimport { cn } from '@/lib/utils';\n\ntype DropzoneRenderProps = {\n isDragActive: boolean;\n isDragAccept: boolean;\n isDragReject: boolean;\n isFocused: boolean;\n isFileDialogActive: boolean;\n open: () => void;\n};\n\nexport interface DropzoneProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>,\n VariantProps<typeof dropzoneVariants> {\n accept?: Accept;\n multiple?: boolean;\n maxFiles?: number;\n disabled?: boolean;\n noDragEventsBubbling?: boolean;\n inputId?: string;\n inputAriaLabel?: string;\n inputTestId?: string;\n onDropAccepted?: (files: File[], event: DropEvent) => void;\n onDropRejected?: (fileRejections: FileRejection[], event: DropEvent) => void;\n children?: React.ReactNode | ((props: DropzoneRenderProps) => React.ReactNode);\n}\n\nexport const Dropzone = React.forwardRef<HTMLDivElement, DropzoneProps>(\n (\n {\n accept,\n multiple = false,\n maxFiles = multiple ? 0 : 1,\n disabled = false,\n noDragEventsBubbling = false,\n inputId,\n inputAriaLabel,\n inputTestId,\n onDropAccepted,\n onDropRejected,\n variant,\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const { controlShape, isAdmin7 } = useShade();\n const {\n getRootProps,\n getInputProps,\n rootRef,\n isDragActive,\n isDragAccept,\n isDragReject,\n isFocused,\n isFileDialogActive,\n open,\n } = useDropzone({\n accept,\n multiple,\n maxFiles,\n disabled,\n noDragEventsBubbling,\n onDropAccepted,\n onDropRejected,\n });\n\n const content =\n typeof children === 'function'\n ? children({\n isDragActive,\n isDragAccept,\n isDragReject,\n isFocused,\n isFileDialogActive,\n open,\n })\n : children;\n\n const setRootRefs = (element: HTMLDivElement | null) => {\n (rootRef as React.MutableRefObject<HTMLDivElement | null>).current = element;\n\n if (typeof ref === 'function') {\n ref(element);\n } else if (ref) {\n ref.current = element;\n }\n };\n\n const dropzoneRootProps = getRootProps({\n ...props,\n role: 'button',\n tabIndex: disabled ? -1 : 0,\n 'aria-disabled': disabled,\n 'aria-invalid': isDragReject || undefined,\n className: cn(\n dropzoneVariants({ variant }, isAdmin7, controlShape),\n disabled && 'pointer-events-none cursor-not-allowed opacity-60',\n isDragReject && 'border-state-danger bg-state-danger/10',\n isDragActive && !isDragReject && !disabled && 'border-state-success bg-state-success/10',\n className,\n ),\n }) as React.HTMLAttributes<HTMLDivElement> & { ref?: React.Ref<HTMLDivElement> };\n\n // Destructure out the ref from getRootProps — we use setRootRefs instead\n const { ref: _, ...rootProps } = dropzoneRootProps; // eslint-disable-line @typescript-eslint/no-unused-vars\n\n return (\n <div ref={setRootRefs} {...rootProps}>\n <input\n {...getInputProps()}\n aria-label={inputAriaLabel}\n data-testid={inputTestId}\n id={inputId}\n />\n {content}\n </div>\n );\n },\n);\n\nDropzone.displayName = 'Dropzone';\n"],"mappings":";;;;;;;AAiCA,IAAa,WAAW,QAAM,YAE1B,EACE,QACA,WAAW,OACX,WAAW,WAAW,IAAI,GAC1B,WAAW,OACX,uBAAuB,OACvB,SACA,gBACA,aACA,gBACA,gBACA,SACA,WACA,UACA,GAAG,SAEL,QACG;CACH,MAAM,EAAE,cAAc,aAAa,SAAS;CAC5C,MAAM,EACJ,cACA,eACA,SACA,cACA,cACA,cACA,WACA,oBACA,SACE,YAAY;EACd;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,MAAM,UACJ,OAAO,aAAa,aAChB,SAAS;EACP;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,IACD;CAEN,MAAM,eAAe,YAAmC;EACtD,QAA2D,UAAU;EAErE,IAAI,OAAO,QAAQ,YACjB,IAAI,OAAO;OACN,IAAI,KACT,IAAI,UAAU;CAElB;CAkBA,MAAM,EAAE,KAAK,GAAG,GAAG,cAhBO,aAAa;EACrC,GAAG;EACH,MAAM;EACN,UAAU,WAAW,KAAK;EAC1B,iBAAiB;EACjB,gBAAgB,gBAAgB,KAAA;EAChC,WAAW,GACT,iBAAiB,EAAE,QAAQ,GAAG,UAAU,YAAY,GACpD,YAAY,qDACZ,gBAAgB,0CAChB,gBAAgB,CAAC,gBAAgB,CAAC,YAAY,4CAC9C,SACF;CACF,CAGiC;CAEjC,OACE,qBAAC,OAAD;EAAK,KAAK;EAAa,GAAI;YAA3B,CACE,oBAAC,SAAD;GACE,GAAI,cAAc;GAClB,cAAY;GACZ,eAAa;GACb,IAAI;EACL,CAAA,GACA,OACE;;AAET,CACF;AAEA,SAAS,cAAc"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { cn } from "../../lib/ds-utils.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ui/empty-indicator.tsx
|
|
5
|
+
var EmptyBadge = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
ref,
|
|
8
|
+
className: cn("flex size-12 max-h-12 max-w-12 items-center justify-center rounded-full bg-muted [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground", className),
|
|
9
|
+
...props,
|
|
10
|
+
children
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
EmptyBadge.displayName = "EmptyBadge";
|
|
14
|
+
var EmptyIndicator = React.forwardRef(({ children, className, title, description, actions, ...props }, ref) => {
|
|
15
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
ref,
|
|
17
|
+
className: cn("flex flex-col items-center justify-center gap-3 text-center", className),
|
|
18
|
+
...props,
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx(EmptyBadge, { children }),
|
|
21
|
+
/* @__PURE__ */ jsxs("div", {
|
|
22
|
+
className: "flex max-w-[320px] flex-col gap-1.5",
|
|
23
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
24
|
+
className: "text-md font-medium tracking-normal text-pretty text-foreground",
|
|
25
|
+
children: title
|
|
26
|
+
}), description && /* @__PURE__ */ jsx("p", {
|
|
27
|
+
className: "text-sm leading-tight text-pretty text-muted-foreground",
|
|
28
|
+
children: description
|
|
29
|
+
})]
|
|
30
|
+
}),
|
|
31
|
+
actions && /* @__PURE__ */ jsx("div", {
|
|
32
|
+
className: "flex items-center gap-2",
|
|
33
|
+
children: actions
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
EmptyIndicator.displayName = "EmptyIndicator";
|
|
39
|
+
//#endregion
|
|
40
|
+
export { EmptyBadge, EmptyIndicator };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=empty-indicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-indicator.js","names":[],"sources":["../../../src/components/ui/empty-indicator.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\nimport React from 'react';\n\ninterface EmptyBadgeProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nconst EmptyBadge = React.forwardRef<HTMLDivElement, EmptyBadgeProps>(\n ({ children, className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n 'flex size-12 max-h-12 max-w-12 items-center justify-center rounded-full bg-muted [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nEmptyBadge.displayName = 'EmptyBadge';\n\n/* Empty indicator\n/* -------------------------------------------------------------------------- */\ninterface EmptyIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n title?: string;\n description?: React.ReactNode;\n actions?: React.ReactNode;\n}\n\nconst EmptyIndicator = React.forwardRef<HTMLDivElement, EmptyIndicatorProps>(\n ({ children, className, title, description, actions, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn('flex flex-col items-center justify-center gap-3 text-center', className)}\n {...props}\n >\n <EmptyBadge>{children}</EmptyBadge>\n <div className=\"flex max-w-[320px] flex-col gap-1.5\">\n <h3 className=\"text-md font-medium tracking-normal text-pretty text-foreground\">\n {title}\n </h3>\n {description && (\n <p className=\"text-sm leading-tight text-pretty text-muted-foreground\">{description}</p>\n )}\n </div>\n {actions && <div className=\"flex items-center gap-2\">{actions}</div>}\n </div>\n );\n },\n);\n\nEmptyIndicator.displayName = 'EmptyIndicator';\n\nexport { EmptyBadge, EmptyIndicator };\n"],"mappings":";;;;AAQA,IAAM,aAAa,MAAM,YACtB,EAAE,UAAU,WAAW,GAAG,SAAS,QAAQ;CAC1C,OACE,oBAAC,OAAD;EACO;EACL,WAAW,GACT,kJACA,SACF;EACA,GAAI;EAEH;CACE,CAAA;AAET,CACF;AAEA,WAAW,cAAc;AAYzB,IAAM,iBAAiB,MAAM,YAC1B,EAAE,UAAU,WAAW,OAAO,aAAa,SAAS,GAAG,SAAS,QAAQ;CACvE,OACE,qBAAC,OAAD;EACO;EACL,WAAW,GAAG,+DAA+D,SAAS;EACtF,GAAI;YAHN;GAKE,oBAAC,YAAD,EAAa,SAAqB,CAAA;GAClC,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,MAAD;KAAI,WAAU;eACX;IACC,CAAA,GACH,eACC,oBAAC,KAAD;KAAG,WAAU;eAA2D;IAAe,CAAA,CAEtF;;GACJ,WAAW,oBAAC,OAAD;IAAK,WAAU;cAA2B;GAAa,CAAA;EAChE;;AAET,CACF;AAEA,eAAe,cAAc"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { cn } from "../../lib/ds-utils.js";
|
|
2
|
+
import { Label } from "./label.js";
|
|
3
|
+
import { Separator } from "./separator.js";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
//#region src/components/ui/field.tsx
|
|
8
|
+
function FieldSet({ className, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx("fieldset", {
|
|
10
|
+
className: cn("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
|
|
11
|
+
"data-slot": "field-set",
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function FieldLegend({ className, variant = "legend", ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx("legend", {
|
|
17
|
+
className: cn("m-0 mb-2 w-fit border-0 p-0 leading-snug font-medium text-foreground", "data-[variant=legend]:text-base", "data-[variant=label]:text-control", className),
|
|
18
|
+
"data-slot": "field-legend",
|
|
19
|
+
"data-variant": variant,
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function FieldGroup({ className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25
|
+
className: cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4", className),
|
|
26
|
+
"data-slot": "field-group",
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
var fieldVariants = cva("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
|
|
31
|
+
variants: { orientation: {
|
|
32
|
+
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
33
|
+
horizontal: [
|
|
34
|
+
"flex-row items-center",
|
|
35
|
+
"[&>[data-slot=field-label]]:flex-auto",
|
|
36
|
+
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
37
|
+
],
|
|
38
|
+
responsive: [
|
|
39
|
+
"flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
|
|
40
|
+
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
41
|
+
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
42
|
+
]
|
|
43
|
+
} },
|
|
44
|
+
defaultVariants: { orientation: "vertical" }
|
|
45
|
+
});
|
|
46
|
+
function Field({ className, orientation = "vertical", ...props }) {
|
|
47
|
+
return /* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
49
|
+
"data-orientation": orientation,
|
|
50
|
+
"data-slot": "field",
|
|
51
|
+
role: "group",
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function FieldContent({ className, ...props }) {
|
|
56
|
+
return /* @__PURE__ */ jsx("div", {
|
|
57
|
+
className: cn("group/field-content flex flex-1 flex-col gap-0.5 leading-snug", className),
|
|
58
|
+
"data-slot": "field-content",
|
|
59
|
+
...props
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function FieldLabel({ className, ...props }) {
|
|
63
|
+
return /* @__PURE__ */ jsx(Label, {
|
|
64
|
+
className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4", "has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10", className),
|
|
65
|
+
"data-slot": "field-label",
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function FieldTitle({ className, ...props }) {
|
|
70
|
+
return /* @__PURE__ */ jsx("div", {
|
|
71
|
+
className: cn("flex w-fit items-center gap-2 text-control leading-snug font-medium group-data-[disabled=true]/field:opacity-50", className),
|
|
72
|
+
"data-slot": "field-label",
|
|
73
|
+
...props
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function FieldDescription({ className, ...props }) {
|
|
77
|
+
return /* @__PURE__ */ jsx("p", {
|
|
78
|
+
className: cn("text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance", "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
79
|
+
"data-slot": "field-description",
|
|
80
|
+
...props
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function FieldSeparator({ children, className, ...props }) {
|
|
84
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
85
|
+
className: cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
|
|
86
|
+
"data-content": !!children,
|
|
87
|
+
"data-slot": "field-separator",
|
|
88
|
+
...props,
|
|
89
|
+
children: [/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && /* @__PURE__ */ jsx("span", {
|
|
90
|
+
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
91
|
+
"data-slot": "field-separator-content",
|
|
92
|
+
children
|
|
93
|
+
})]
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function FieldError({ className, children, errors, ...props }) {
|
|
97
|
+
const content = useMemo(() => {
|
|
98
|
+
if (children) return children;
|
|
99
|
+
if (!errors) return null;
|
|
100
|
+
if (errors?.length === 1 && errors[0]?.message) return errors[0].message;
|
|
101
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
102
|
+
className: "ml-4 flex list-disc flex-col gap-1",
|
|
103
|
+
children: errors.map((error) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, error.message))
|
|
104
|
+
});
|
|
105
|
+
}, [children, errors]);
|
|
106
|
+
if (!content) return null;
|
|
107
|
+
return /* @__PURE__ */ jsx("div", {
|
|
108
|
+
className: cn("text-control font-normal text-destructive", className),
|
|
109
|
+
"data-slot": "field-error",
|
|
110
|
+
role: "alert",
|
|
111
|
+
...props,
|
|
112
|
+
children: content
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
117
|
+
|
|
118
|
+
//# sourceMappingURL=field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.js","names":[],"sources":["../../../src/components/ui/field.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\nimport { Label } from '@/components/ui/label';\nimport { Separator } from '@/components/ui/separator';\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>) {\n return (\n <fieldset\n className={cn(\n 'flex flex-col gap-6',\n 'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',\n className,\n )}\n data-slot=\"field-set\"\n {...props}\n />\n );\n}\n\nfunction FieldLegend({\n className,\n variant = 'legend',\n ...props\n}: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) {\n return (\n <legend\n className={cn(\n 'm-0 mb-2 w-fit border-0 p-0 leading-snug font-medium text-foreground',\n 'data-[variant=legend]:text-base',\n 'data-[variant=label]:text-control',\n className,\n )}\n data-slot=\"field-legend\"\n data-variant={variant}\n {...props}\n />\n );\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4',\n className,\n )}\n data-slot=\"field-group\"\n {...props}\n />\n );\n}\n\nconst fieldVariants = cva('group/field flex w-full gap-2 data-[invalid=true]:text-destructive', {\n variants: {\n orientation: {\n vertical: ['flex-col [&>*]:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center',\n '[&>[data-slot=field-label]]:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto',\n '@md/field-group:[&>[data-slot=field-label]]:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\nfunction Field({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) {\n return (\n <div\n className={cn(fieldVariants({ orientation }), className)}\n data-orientation={orientation}\n data-slot=\"field\"\n role=\"group\"\n {...props}\n />\n );\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n className={cn('group/field-content flex flex-1 flex-col gap-0.5 leading-snug', className)}\n data-slot=\"field-content\"\n {...props}\n />\n );\n}\n\nfunction FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>) {\n return (\n <Label\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50',\n 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4',\n 'has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10',\n className,\n )}\n data-slot=\"field-label\"\n {...props}\n />\n );\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n className={cn(\n 'flex w-fit items-center gap-2 text-control leading-snug font-medium group-data-[disabled=true]/field:opacity-50',\n className,\n )}\n data-slot=\"field-label\"\n {...props}\n />\n );\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<'p'>) {\n return (\n <p\n className={cn(\n 'text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',\n '[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary',\n className,\n )}\n data-slot=\"field-description\"\n {...props}\n />\n );\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n children?: React.ReactNode;\n}) {\n return (\n <div\n className={cn(\n 'relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2',\n className,\n )}\n data-content={!!children}\n data-slot=\"field-separator\"\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n className=\"relative mx-auto block w-fit bg-background px-2 text-muted-foreground\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </span>\n )}\n </div>\n );\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<'div'> & {\n errors?: Array<{ message?: string } | undefined>;\n}) {\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors) {\n return null;\n }\n\n if (errors?.length === 1 && errors[0]?.message) {\n return errors[0].message;\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map((error) => error?.message && <li key={error.message}>{error.message}</li>)}\n </ul>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div\n className={cn('text-control font-normal text-destructive', className)}\n data-slot=\"field-error\"\n role=\"alert\"\n {...props}\n >\n {content}\n </div>\n );\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n};\n"],"mappings":";;;;;;;AAOA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA2C;CAC3E,OACE,oBAAC,YAAD;EACE,WAAW,GACT,uBACA,gFACA,SACF;EACA,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EACnB,WACA,UAAU,UACV,GAAG,SACiE;CACpE,OACE,oBAAC,UAAD;EACE,WAAW,GACT,wEACA,mCACA,qCACA,SACF;EACA,aAAU;EACV,gBAAc;EACd,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,WAAW,GACT,0IACA,SACF;EACA,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,IAAM,gBAAgB,IAAI,sEAAsE;CAC9F,UAAU,EACR,aAAa;EACX,UAAU,CAAC,2CAA2C;EACtD,YAAY;GACV;GACA;GACA;EACF;EACA,YAAY;GACV;GACA;GACA;EACF;CACF,EACF;CACA,iBAAiB,EACf,aAAa,WACf;AACF,CAAC;AAED,SAAS,MAAM,EACb,WACA,cAAc,YACd,GAAG,SACgE;CACnE,OACE,oBAAC,OAAD;EACE,WAAW,GAAG,cAAc,EAAE,YAAY,CAAC,GAAG,SAAS;EACvD,oBAAkB;EAClB,aAAU;EACV,MAAK;EACL,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;CAC1E,OACE,oBAAC,OAAD;EACE,WAAW,GAAG,iEAAiE,SAAS;EACxF,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA6C;CAC/E,OACE,oBAAC,OAAD;EACE,WAAW,GACT,gHACA,mKACA,6HACA,SACF;EACA,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,WAAW,GACT,mHACA,SACF;EACA,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAoC;CAC5E,OACE,oBAAC,KAAD;EACE,WAAW,GACT,yHACA,gEACA,qEACA,SACF;EACA,aAAU;EACV,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,eAAe,EACtB,UACA,WACA,GAAG,SAGF;CACD,OACE,qBAAC,OAAD;EACE,WAAW,GACT,6EACA,SACF;EACA,gBAAc,CAAC,CAAC;EAChB,aAAU;EACV,GAAI;YAPN,CASE,oBAAC,WAAD,EAAW,WAAU,2BAA4B,CAAA,GAChD,YACC,oBAAC,QAAD;GACE,WAAU;GACV,aAAU;GAET;EACG,CAAA,CAEL;;AAET;AAEA,SAAS,WAAW,EAClB,WACA,UACA,QACA,GAAG,SAGF;CACD,MAAM,UAAU,cAAc;EAC5B,IAAI,UACF,OAAO;EAGT,IAAI,CAAC,QACH,OAAO;EAGT,IAAI,QAAQ,WAAW,KAAK,OAAO,EAAE,EAAE,SACrC,OAAO,OAAO,EAAE,CAAC;EAGnB,OACE,oBAAC,MAAD;GAAI,WAAU;aACX,OAAO,KAAK,UAAU,OAAO,WAAW,oBAAC,MAAD,EAAA,UAAyB,MAAM,QAAY,GAAlC,MAAM,OAA4B,CAAC;EACnF,CAAA;CAER,GAAG,CAAC,UAAU,MAAM,CAAC;CAErB,IAAI,CAAC,SACH,OAAO;CAGT,OACE,oBAAC,OAAD;EACE,WAAW,GAAG,6CAA6C,SAAS;EACpE,aAAU;EACV,MAAK;EACL,GAAI;YAEH;CACE,CAAA;AAET"}
|