@devalok/shilp-sutra 0.34.1 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/dist/_chunks/badge-group.js +95 -95
- package/dist/_chunks/badge-group.js.map +1 -0
- package/dist/_chunks/chat.js +7 -2
- package/dist/_chunks/chat.js.map +1 -0
- package/dist/_chunks/date-picker.js.map +1 -0
- package/dist/_chunks/document-preview.js.map +1 -0
- package/dist/_chunks/file-preview.js.map +1 -0
- package/dist/_chunks/framer.js +62 -62
- package/dist/_chunks/framer.js.map +1 -0
- package/dist/_chunks/image-preview.js +1 -1
- package/dist/_chunks/image-preview.js.map +1 -0
- package/dist/_chunks/keybinding.js.map +1 -0
- package/dist/_chunks/link-context.js.map +1 -0
- package/dist/_chunks/mention-suggestion.js.map +1 -0
- package/dist/_chunks/motion-provider.js.map +1 -0
- package/dist/_chunks/popover.js +32 -36
- package/dist/_chunks/popover.js.map +1 -0
- package/dist/_chunks/primitives.js +686 -686
- package/dist/_chunks/primitives.js.map +1 -0
- package/dist/_chunks/rich-chat-input.js +650 -649
- package/dist/_chunks/rich-chat-input.js.map +1 -0
- package/dist/_chunks/shared.js.map +1 -0
- package/dist/_chunks/sonner.js.map +1 -0
- package/dist/_chunks/stat-row.js +158 -158
- package/dist/_chunks/stat-row.js.map +1 -0
- package/dist/_chunks/tiptap.js +11 -11
- package/dist/_chunks/tiptap.js.map +1 -0
- package/dist/_chunks/tree-view.js +1 -1
- package/dist/_chunks/tree-view.js.map +1 -0
- package/dist/_chunks/use-calendar.js.map +1 -0
- package/dist/_chunks/vendor-client.js +1 -1
- package/dist/_chunks/vendor-client.js.map +1 -0
- package/dist/_chunks/vendor-utils.js.map +1 -0
- package/dist/ai/ai-command-provider.js.map +1 -0
- package/dist/ai/block-renderer.js.map +1 -0
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/command-bar.js.map +1 -0
- package/dist/ai/conversation.js +76 -76
- package/dist/ai/conversation.js.map +1 -0
- package/dist/ai/devadoot-icon.d.ts.map +1 -1
- package/dist/ai/index.js.map +1 -0
- package/dist/composed/activity-feed.js.map +1 -0
- package/dist/composed/avatar-group.js +1 -1
- package/dist/composed/avatar-group.js.map +1 -0
- package/dist/composed/bulk-action-bar.js +13 -21
- package/dist/composed/bulk-action-bar.js.map +1 -0
- package/dist/composed/command-palette.js.map +1 -0
- package/dist/composed/confirm-dialog.js.map +1 -0
- package/dist/composed/content-card.js.map +1 -0
- package/dist/composed/deadline-indicator.js.map +1 -0
- package/dist/composed/emoji-picker.js.map +1 -0
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/empty-state.js +30 -30
- package/dist/composed/empty-state.js.map +1 -0
- package/dist/composed/error-boundary.js.map +1 -0
- package/dist/composed/filter-bar.js.map +1 -0
- package/dist/composed/form-section.js.map +1 -0
- package/dist/composed/global-loading.js.map +1 -0
- package/dist/composed/inline-edit.js.map +1 -0
- package/dist/composed/lib/string-utils.js.map +1 -0
- package/dist/composed/loading-skeleton.js.map +1 -0
- package/dist/composed/markdown-viewer.js.map +1 -0
- package/dist/composed/master-detail.js.map +1 -0
- package/dist/composed/member-picker.js.map +1 -0
- package/dist/composed/multi-select-popover.d.ts.map +1 -1
- package/dist/composed/multi-select-popover.js +4 -0
- package/dist/composed/multi-select-popover.js.map +1 -0
- package/dist/composed/page-header.js.map +1 -0
- package/dist/composed/page-skeletons.js.map +1 -0
- package/dist/composed/priority-indicator.js.map +1 -0
- package/dist/composed/responsive-overlay.js.map +1 -0
- package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/reply-banner.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -1
- package/dist/composed/rich-chat-input.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js.map +1 -0
- package/dist/composed/schedule-view.js.map +1 -0
- package/dist/composed/simple-tooltip.js.map +1 -0
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js.map +1 -0
- package/dist/hooks/use-color-mode.js.map +1 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-touch-device.js.map +1 -0
- package/dist/hooks/use-viewport-height.js.map +1 -0
- package/dist/motion/check-motion-provider.d.ts +3 -0
- package/dist/motion/check-motion-provider.d.ts.map +1 -0
- package/dist/motion/index.js +14 -0
- package/dist/motion/index.js.map +1 -0
- package/dist/motion/primitives-index.js.map +1 -0
- package/dist/primitives/react-accordion.d.ts +114 -114
- package/dist/primitives/react-alert-dialog.d.ts +51 -51
- package/dist/primitives/react-aspect-ratio.d.ts +11 -11
- package/dist/primitives/react-avatar.d.ts +24 -24
- package/dist/primitives/react-checkbox.d.ts +50 -50
- package/dist/primitives/react-collapsible.d.ts +33 -33
- package/dist/primitives/react-context-menu.d.ts +96 -96
- package/dist/primitives/react-dialog.d.ts +103 -103
- package/dist/primitives/react-dropdown-menu.d.ts +97 -97
- package/dist/primitives/react-hover-card.d.ts +79 -79
- package/dist/primitives/react-label.d.ts +10 -10
- package/dist/primitives/react-menu.d.ts +169 -169
- package/dist/primitives/react-menubar.d.ts +115 -115
- package/dist/primitives/react-navigation-menu.d.ts +126 -126
- package/dist/primitives/react-popover.d.ts +85 -85
- package/dist/primitives/react-progress.d.ts +19 -19
- package/dist/primitives/react-radio-group.d.ts +58 -58
- package/dist/primitives/react-roving-focus.d.ts +49 -49
- package/dist/primitives/react-select.d.ts +137 -137
- package/dist/primitives/react-separator.d.ts +21 -21
- package/dist/primitives/react-slider.d.ts +75 -75
- package/dist/primitives/react-switch.d.ts +21 -21
- package/dist/primitives/react-tabs.d.ts +56 -56
- package/dist/primitives/react-toast.d.ts +120 -120
- package/dist/primitives/react-toggle-group.d.ts +75 -75
- package/dist/primitives/react-toggle.d.ts +24 -24
- package/dist/primitives/react-tooltip.d.ts +101 -101
- package/dist/primitives/react-visually-hidden.d.ts +22 -22
- package/dist/shell/app-command-palette.d.ts +2 -0
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +42 -155
- package/dist/shell/app-command-palette.js.map +1 -0
- package/dist/shell/bottom-navbar.js +1 -1
- package/dist/shell/bottom-navbar.js.map +1 -0
- package/dist/shell/command-registry.js.map +1 -0
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +194 -169
- package/dist/shell/notification-center.js.map +1 -0
- package/dist/shell/notification-preferences.js.map +1 -0
- package/dist/shell/sidebar.js.map +1 -0
- package/dist/shell/top-bar.js +1 -1
- package/dist/shell/top-bar.js.map +1 -0
- package/dist/tailwind/index.cjs +48 -1
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +48 -1
- package/dist/tailwind/preset.js.map +1 -0
- package/dist/tokens/index.css +4 -4
- package/dist/tokens/primitives.css +442 -442
- package/dist/tokens/semantic.css +742 -547
- package/dist/tokens/typography-semantic.css +123 -100
- package/dist/tokens/typography.css +422 -422
- package/dist/ui/accordion.js +13 -13
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert-dialog.d.ts +6 -2
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +43 -42
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.d.ts +3 -2
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +31 -5
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/aspect-ratio.js +1 -1
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +92 -67
- package/dist/ui/autocomplete.js.map +1 -0
- package/dist/ui/avatar.js +9 -9
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge-indicator.js.map +1 -0
- package/dist/ui/banner.js.map +1 -0
- package/dist/ui/breadcrumb.js +1 -1
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button-group.js.map +1 -0
- package/dist/ui/button-processing.d.ts.map +1 -1
- package/dist/ui/button-processing.js +61 -40
- package/dist/ui/button-processing.js.map +1 -0
- package/dist/ui/button.js +8 -8
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/chart-container.d.ts +2 -0
- package/dist/ui/charts/chart-container.d.ts.map +1 -1
- package/dist/ui/charts/index.js +88 -65
- package/dist/ui/charts/index.js.map +1 -0
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/chat/message-input.d.ts.map +1 -1
- package/dist/ui/chat/message-list.d.ts +1 -1
- package/dist/ui/chat/message-list.d.ts.map +1 -1
- package/dist/ui/chat/message.d.ts.map +1 -1
- package/dist/ui/chat/system-message.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +33 -28
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/code.js.map +1 -0
- package/dist/ui/collapsible.js +1 -1
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +165 -163
- package/dist/ui/color-input.js.map +1 -0
- package/dist/ui/color-swatch.js.map +1 -0
- package/dist/ui/combobox.d.ts +7 -0
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +147 -113
- package/dist/ui/combobox.js.map +1 -0
- package/dist/ui/container.js +1 -1
- package/dist/ui/container.js.map +1 -0
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/data-table-body.js.map +1 -0
- package/dist/ui/data-table-bulk-actions.js +1 -1
- package/dist/ui/data-table-bulk-actions.js.map +1 -0
- package/dist/ui/data-table-card.js.map +1 -0
- package/dist/ui/data-table-context.js.map +1 -0
- package/dist/ui/data-table-header.js.map +1 -0
- package/dist/ui/data-table-pagination.js.map +1 -0
- package/dist/ui/data-table-toolbar.js.map +1 -0
- package/dist/ui/data-table.js +34 -31
- package/dist/ui/data-table.js.map +1 -0
- package/dist/ui/devalok-grain.js.map +1 -0
- package/dist/ui/dialog.js +31 -35
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/file-upload.js +120 -120
- package/dist/ui/file-upload.js.map +1 -0
- package/dist/ui/form.d.ts +8 -0
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +14 -12
- package/dist/ui/form.js.map +1 -0
- package/dist/ui/hover-card.js.map +1 -0
- package/dist/ui/icon-button.js.map +1 -0
- package/dist/ui/icon-context.js.map +1 -0
- package/dist/ui/icon-group.js.map +1 -0
- package/dist/ui/icon.js.map +1 -0
- package/dist/ui/index.d.ts +4 -4
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +82 -66
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input-otp.d.ts +12 -3
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +41 -27
- package/dist/ui/input-otp.js.map +1 -0
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +16 -15
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.d.ts.map +1 -1
- package/dist/ui/label.js +19 -14
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/lib/check-tokens.d.ts +3 -0
- package/dist/ui/lib/check-tokens.d.ts.map +1 -0
- package/dist/ui/lib/date-utils.js.map +1 -0
- package/dist/ui/lib/motion.d.ts +15 -4
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/motion.js +18 -9
- package/dist/ui/lib/motion.js.map +1 -0
- package/dist/ui/lib/utils.js.map +1 -0
- package/dist/ui/link.js +2 -2
- package/dist/ui/link.js.map +1 -0
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/navigation-menu.js.map +1 -0
- package/dist/ui/number-input.d.ts +16 -1
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +79 -49
- package/dist/ui/number-input.js.map +1 -0
- package/dist/ui/pagination.js +1 -1
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/progress-ring.d.ts.map +1 -1
- package/dist/ui/progress-ring.js.map +1 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/radio.d.ts.map +1 -1
- package/dist/ui/radio.js +27 -20
- package/dist/ui/radio.js.map +1 -0
- package/dist/ui/search-input.js.map +1 -0
- package/dist/ui/segmented-control.d.ts +1 -1
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +2 -0
- package/dist/ui/segmented-control.js.map +1 -0
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +54 -48
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.d.ts.map +1 -1
- package/dist/ui/separator.js +10 -7
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/sheet.js +29 -29
- package/dist/ui/sheet.js.map +1 -0
- package/dist/ui/sidebar.js +7 -7
- package/dist/ui/sidebar.js.map +1 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/slider.d.ts +22 -3
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/slider.js +57 -19
- package/dist/ui/slider.js.map +1 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/split-button.d.ts.map +1 -1
- package/dist/ui/split-button.js +77 -76
- package/dist/ui/split-button.js.map +1 -0
- package/dist/ui/stack.js.map +1 -0
- package/dist/ui/stat-card.js.map +1 -0
- package/dist/ui/status-dot.js.map +1 -0
- package/dist/ui/stepper.d.ts +10 -0
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +80 -75
- package/dist/ui/stepper.js.map +1 -0
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +26 -22
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.d.ts +3 -1
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +68 -48
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/text.d.ts +1 -1
- package/dist/ui/text.d.ts.map +1 -1
- package/dist/ui/text.js +10 -2
- package/dist/ui/text.js.map +1 -0
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/toast-registry.d.ts +8 -0
- package/dist/ui/toast-registry.d.ts.map +1 -0
- package/dist/ui/toast-registry.js +13 -0
- package/dist/ui/toast-registry.js.map +1 -0
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +141 -136
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/toaster.d.ts.map +1 -1
- package/dist/ui/toaster.js +15 -14
- package/dist/ui/toaster.js.map +1 -0
- package/dist/ui/toggle-group.d.ts +2 -0
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js +23 -16
- package/dist/ui/toggle-group.js.map +1 -0
- package/dist/ui/toggle.d.ts +2 -0
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +14 -6
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/ui/visually-hidden.js.map +1 -0
- package/docs/components/_header.md +85 -85
- package/docs/components/composed/activity-feed.md +62 -62
- package/docs/components/composed/avatar-group.md +65 -65
- package/docs/components/composed/bulk-action-bar.md +40 -40
- package/docs/components/composed/command-palette.md +40 -40
- package/docs/components/composed/confirm-dialog.md +46 -46
- package/docs/components/composed/content-card.md +36 -36
- package/docs/components/composed/date-picker.md +130 -130
- package/docs/components/composed/deadline-indicator.md +27 -27
- package/docs/components/composed/emoji-picker.md +52 -52
- package/docs/components/composed/empty-state.md +53 -53
- package/docs/components/composed/error-boundary.md +29 -29
- package/docs/components/composed/file-preview.md +40 -40
- package/docs/components/composed/filter-bar.md +57 -57
- package/docs/components/composed/form-section.md +31 -31
- package/docs/components/composed/global-loading.md +27 -27
- package/docs/components/composed/inline-edit.md +35 -35
- package/docs/components/composed/loading-skeleton.md +51 -51
- package/docs/components/composed/markdown-viewer.md +27 -27
- package/docs/components/composed/master-detail.md +48 -48
- package/docs/components/composed/member-picker.md +35 -35
- package/docs/components/composed/multi-select-popover.md +62 -62
- package/docs/components/composed/page-header.md +41 -41
- package/docs/components/composed/page-skeletons.md +32 -32
- package/docs/components/composed/priority-indicator.md +32 -32
- package/docs/components/composed/responsive-overlay.md +34 -34
- package/docs/components/composed/rich-text-editor.md +82 -82
- package/docs/components/composed/schedule-view.md +39 -39
- package/docs/components/composed/simple-tooltip.md +33 -33
- package/docs/components/composed/status-badge.md +55 -55
- package/docs/components/shell/app-command-palette.md +44 -44
- package/docs/components/shell/bottom-navbar.md +52 -52
- package/docs/components/shell/command-registry.md +48 -48
- package/docs/components/shell/link-context.md +41 -41
- package/docs/components/shell/notification-center.md +63 -63
- package/docs/components/shell/notification-preferences.md +42 -42
- package/docs/components/shell/sidebar.md +92 -92
- package/docs/components/shell/top-bar.md +143 -143
- package/docs/components/ui/accordion.md +51 -51
- package/docs/components/ui/alert-dialog.md +61 -61
- package/docs/components/ui/alert.md +46 -46
- package/docs/components/ui/aspect-ratio.md +25 -25
- package/docs/components/ui/autocomplete.md +48 -48
- package/docs/components/ui/avatar.md +56 -56
- package/docs/components/ui/badge.md +83 -82
- package/docs/components/ui/banner.md +42 -42
- package/docs/components/ui/breadcrumb.md +37 -37
- package/docs/components/ui/button-group.md +41 -41
- package/docs/components/ui/button.md +94 -93
- package/docs/components/ui/card.md +52 -52
- package/docs/components/ui/charts.md +43 -43
- package/docs/components/ui/checkbox.md +36 -36
- package/docs/components/ui/chip.md +47 -47
- package/docs/components/ui/code.md +28 -28
- package/docs/components/ui/collapsible.md +40 -40
- package/docs/components/ui/color-input.md +91 -91
- package/docs/components/ui/color-swatch.md +25 -25
- package/docs/components/ui/combobox.md +54 -54
- package/docs/components/ui/container.md +26 -26
- package/docs/components/ui/context-menu.md +43 -43
- package/docs/components/ui/data-table-body.md +1 -1
- package/docs/components/ui/data-table-bulk-actions.md +1 -1
- package/docs/components/ui/data-table-card.md +1 -1
- package/docs/components/ui/data-table-context.md +1 -1
- package/docs/components/ui/data-table-header.md +1 -1
- package/docs/components/ui/data-table-pagination.md +1 -1
- package/docs/components/ui/data-table-toolbar.md +44 -44
- package/docs/components/ui/data-table.md +94 -94
- package/docs/components/ui/dialog.md +54 -54
- package/docs/components/ui/dropdown-menu.md +48 -48
- package/docs/components/ui/file-upload.md +41 -41
- package/docs/components/ui/form.md +51 -51
- package/docs/components/ui/hover-card.md +32 -32
- package/docs/components/ui/icon-button.md +40 -40
- package/docs/components/ui/input-otp.md +44 -44
- package/docs/components/ui/input.md +74 -74
- package/docs/components/ui/label.md +25 -25
- package/docs/components/ui/link.md +29 -29
- package/docs/components/ui/menubar.md +44 -44
- package/docs/components/ui/navigation-menu.md +46 -46
- package/docs/components/ui/number-input.md +44 -44
- package/docs/components/ui/pagination.md +48 -48
- package/docs/components/ui/popover.md +30 -30
- package/docs/components/ui/progress-ring.md +41 -41
- package/docs/components/ui/progress.md +34 -34
- package/docs/components/ui/radio.md +34 -34
- package/docs/components/ui/search-input.md +43 -43
- package/docs/components/ui/segmented-control.md +50 -50
- package/docs/components/ui/select.md +53 -53
- package/docs/components/ui/separator.md +32 -32
- package/docs/components/ui/sheet.md +47 -47
- package/docs/components/ui/sidebar.md +72 -72
- package/docs/components/ui/skeleton.md +77 -77
- package/docs/components/ui/slider.md +29 -29
- package/docs/components/ui/spinner.md +54 -54
- package/docs/components/ui/stack.md +39 -39
- package/docs/components/ui/stat-card.md +61 -61
- package/docs/components/ui/status-dot.md +26 -26
- package/docs/components/ui/stepper.md +49 -49
- package/docs/components/ui/switch.md +47 -47
- package/docs/components/ui/table.md +47 -47
- package/docs/components/ui/tabs.md +60 -60
- package/docs/components/ui/text.md +37 -37
- package/docs/components/ui/textarea.md +39 -39
- package/docs/components/ui/toast.md +65 -65
- package/docs/components/ui/toaster.md +47 -47
- package/docs/components/ui/toggle-group.md +43 -43
- package/docs/components/ui/toggle.md +37 -37
- package/docs/components/ui/tooltip.md +38 -38
- package/docs/components/ui/tree-view.md +65 -65
- package/docs/components/ui/visually-hidden.md +21 -21
- package/llms-full.txt +5266 -5264
- package/llms.txt +624 -580
- package/package.json +7 -8
package/dist/ui/toast.js
CHANGED
|
@@ -6,11 +6,12 @@ import { Spinner as a } from "./spinner.js";
|
|
|
6
6
|
import { Icon as o } from "./icon.js";
|
|
7
7
|
import { n as s } from "../_chunks/sonner.js";
|
|
8
8
|
import { Progress as c } from "./progress.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
9
|
+
import { assertToasterMounted as l } from "./toast-registry.js";
|
|
10
|
+
import * as u from "react";
|
|
11
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
+
import { IconAlertCircle as p, IconAlertTriangle as m, IconCheck as h, IconCircleCheck as g, IconCircleX as _, IconFile as v, IconInfoCircle as y, IconPhoto as b, IconRefresh as x, IconUpload as S, IconX as C } from "@tabler/icons-react";
|
|
12
13
|
//#region src/ui/toast.tsx
|
|
13
|
-
var
|
|
14
|
+
var w = 5e3, T = 8e3, E = 3e3, D = {
|
|
14
15
|
message: {
|
|
15
16
|
accentClass: "",
|
|
16
17
|
iconClass: "",
|
|
@@ -20,25 +21,25 @@ var C = 5e3, w = 8e3, T = 3e3, E = {
|
|
|
20
21
|
success: {
|
|
21
22
|
accentClass: "bg-success-9",
|
|
22
23
|
iconClass: "text-success-11",
|
|
23
|
-
icon:
|
|
24
|
+
icon: g,
|
|
24
25
|
timerBarClass: "bg-success-9"
|
|
25
26
|
},
|
|
26
27
|
error: {
|
|
27
28
|
accentClass: "bg-error-9",
|
|
28
29
|
iconClass: "text-error-11",
|
|
29
|
-
icon:
|
|
30
|
+
icon: _,
|
|
30
31
|
timerBarClass: "bg-error-9"
|
|
31
32
|
},
|
|
32
33
|
warning: {
|
|
33
34
|
accentClass: "bg-warning-9",
|
|
34
35
|
iconClass: "text-warning-11",
|
|
35
|
-
icon:
|
|
36
|
+
icon: m,
|
|
36
37
|
timerBarClass: "bg-warning-9"
|
|
37
38
|
},
|
|
38
39
|
info: {
|
|
39
40
|
accentClass: "bg-info-9",
|
|
40
41
|
iconClass: "text-info-11",
|
|
41
|
-
icon:
|
|
42
|
+
icon: y,
|
|
42
43
|
timerBarClass: "bg-info-9"
|
|
43
44
|
},
|
|
44
45
|
loading: {
|
|
@@ -48,11 +49,11 @@ var C = 5e3, w = 8e3, T = 3e3, E = {
|
|
|
48
49
|
timerBarClass: "bg-accent-9"
|
|
49
50
|
}
|
|
50
51
|
};
|
|
51
|
-
function
|
|
52
|
-
let r =
|
|
53
|
-
return /* @__PURE__ */
|
|
52
|
+
function O({ duration: e, type: t, paused: n }) {
|
|
53
|
+
let r = D[t];
|
|
54
|
+
return /* @__PURE__ */ d("div", {
|
|
54
55
|
className: "absolute bottom-0 left-0 right-0 h-[2px] overflow-hidden",
|
|
55
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ d("div", {
|
|
56
57
|
className: i("h-full w-full origin-left opacity-30", r.timerBarClass, "motion-safe:animate-timer-bar"),
|
|
57
58
|
style: {
|
|
58
59
|
animationDuration: `${e}ms`,
|
|
@@ -61,11 +62,11 @@ function D({ duration: e, type: t, paused: n }) {
|
|
|
61
62
|
})
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
-
let [y, b] =
|
|
66
|
-
|
|
65
|
+
function k({ type: c, title: l, description: p, action: m, cancel: h, duration: g = w, showTimerBar: _ = !0, selfDismissId: v }) {
|
|
66
|
+
let [y, b] = u.useState(!1), [x, S] = u.useState(!1), C = y || x, T = D[c], E = T.icon, k = u.useRef(g), A = u.useRef(0);
|
|
67
|
+
u.useEffect(() => {
|
|
67
68
|
if (v == null || g === Infinity) return;
|
|
68
|
-
if (
|
|
69
|
+
if (C) {
|
|
69
70
|
let e = Date.now() - A.current;
|
|
70
71
|
k.current = Math.max(0, k.current - e);
|
|
71
72
|
return;
|
|
@@ -78,11 +79,14 @@ function O({ type: c, title: f, description: p, action: m, cancel: h, duration:
|
|
|
78
79
|
}, [
|
|
79
80
|
v,
|
|
80
81
|
g,
|
|
81
|
-
|
|
82
|
-
])
|
|
82
|
+
C
|
|
83
|
+
]);
|
|
84
|
+
let j = c === "error";
|
|
85
|
+
return /* @__PURE__ */ f(e.div, {
|
|
83
86
|
layout: "position",
|
|
84
|
-
role: "status",
|
|
85
|
-
"aria-live": "polite",
|
|
87
|
+
role: j ? "alert" : "status",
|
|
88
|
+
"aria-live": j ? "assertive" : "polite",
|
|
89
|
+
"aria-atomic": "true",
|
|
86
90
|
className: "group relative flex w-full overflow-hidden rounded-ds-md border border-surface-border-strong bg-surface-overlay shadow-floating",
|
|
87
91
|
onMouseEnter: () => b(!0),
|
|
88
92
|
onMouseLeave: () => b(!1),
|
|
@@ -90,12 +94,12 @@ function O({ type: c, title: f, description: p, action: m, cancel: h, duration:
|
|
|
90
94
|
onBlurCapture: () => S(!1),
|
|
91
95
|
transition: n.smooth,
|
|
92
96
|
children: [
|
|
93
|
-
T.accentClass && /* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
97
|
+
T.accentClass && /* @__PURE__ */ d("div", { className: i("w-1 shrink-0 rounded-l-ds-md", T.accentClass) }),
|
|
98
|
+
/* @__PURE__ */ f("div", {
|
|
95
99
|
className: "flex min-w-0 flex-1 items-start gap-ds-03 p-ds-04",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
100
|
+
children: [/* @__PURE__ */ d(t, {
|
|
97
101
|
mode: "wait",
|
|
98
|
-
children: c === "loading" ? /* @__PURE__ */
|
|
102
|
+
children: c === "loading" ? /* @__PURE__ */ d(e.div, {
|
|
99
103
|
initial: {
|
|
100
104
|
opacity: 0,
|
|
101
105
|
scale: .5
|
|
@@ -110,11 +114,11 @@ function O({ type: c, title: f, description: p, action: m, cancel: h, duration:
|
|
|
110
114
|
},
|
|
111
115
|
transition: r.fade,
|
|
112
116
|
className: "mt-0.5 shrink-0",
|
|
113
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ d(a, {
|
|
114
118
|
size: "sm",
|
|
115
119
|
className: "h-4 w-4"
|
|
116
120
|
})
|
|
117
|
-
}, "loading") :
|
|
121
|
+
}, "loading") : E ? /* @__PURE__ */ d(e.div, {
|
|
118
122
|
initial: {
|
|
119
123
|
opacity: 0,
|
|
120
124
|
scale: .5
|
|
@@ -129,31 +133,31 @@ function O({ type: c, title: f, description: p, action: m, cancel: h, duration:
|
|
|
129
133
|
},
|
|
130
134
|
transition: n.bouncy,
|
|
131
135
|
className: "mt-0.5 shrink-0",
|
|
132
|
-
children: /* @__PURE__ */
|
|
133
|
-
icon:
|
|
136
|
+
children: /* @__PURE__ */ d(o, {
|
|
137
|
+
icon: E,
|
|
134
138
|
size: "sm",
|
|
135
139
|
className: T.iconClass
|
|
136
140
|
})
|
|
137
141
|
}, c) : null
|
|
138
|
-
}), /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ f("div", {
|
|
139
143
|
className: "min-w-0 flex-1",
|
|
140
144
|
children: [
|
|
141
|
-
|
|
145
|
+
l && /* @__PURE__ */ d("p", {
|
|
142
146
|
className: "text-ds-md font-semibold text-surface-fg",
|
|
143
|
-
children:
|
|
147
|
+
children: l
|
|
144
148
|
}),
|
|
145
|
-
p && /* @__PURE__ */
|
|
146
|
-
className: i("text-ds-sm text-surface-fg-muted",
|
|
149
|
+
p && /* @__PURE__ */ d("p", {
|
|
150
|
+
className: i("text-ds-sm text-surface-fg-muted", l && "mt-0.5"),
|
|
147
151
|
children: p
|
|
148
152
|
}),
|
|
149
|
-
(m || h) && /* @__PURE__ */
|
|
153
|
+
(m || h) && /* @__PURE__ */ f("div", {
|
|
150
154
|
className: "mt-ds-03 flex items-center gap-ds-03",
|
|
151
|
-
children: [m && /* @__PURE__ */
|
|
155
|
+
children: [m && /* @__PURE__ */ d("button", {
|
|
152
156
|
type: "button",
|
|
153
157
|
onClick: m.onClick,
|
|
154
158
|
className: "text-ds-sm font-medium text-accent-11 underline-offset-2 hover:underline hover:bg-surface-raised-hover rounded-ds-sm px-ds-02 py-ds-01 transition-[color,background-color] duration-fast-01 ease-productive-standard focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:rounded-ds-sm",
|
|
155
159
|
children: m.label
|
|
156
|
-
}), h && /* @__PURE__ */
|
|
160
|
+
}), h && /* @__PURE__ */ d("button", {
|
|
157
161
|
type: "button",
|
|
158
162
|
onClick: h.onClick,
|
|
159
163
|
className: "text-ds-sm text-surface-fg-muted hover:text-surface-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:rounded-ds-sm",
|
|
@@ -163,15 +167,15 @@ function O({ type: c, title: f, description: p, action: m, cancel: h, duration:
|
|
|
163
167
|
]
|
|
164
168
|
})]
|
|
165
169
|
}),
|
|
166
|
-
_ && c !== "loading" && /* @__PURE__ */
|
|
170
|
+
_ && c !== "loading" && /* @__PURE__ */ d(O, {
|
|
167
171
|
duration: g,
|
|
168
172
|
type: c,
|
|
169
|
-
paused:
|
|
173
|
+
paused: C
|
|
170
174
|
})
|
|
171
175
|
]
|
|
172
176
|
});
|
|
173
177
|
}
|
|
174
|
-
var
|
|
178
|
+
var A = new Set([
|
|
175
179
|
"jpg",
|
|
176
180
|
"jpeg",
|
|
177
181
|
"png",
|
|
@@ -182,19 +186,19 @@ var k = new Set([
|
|
|
182
186
|
"ico",
|
|
183
187
|
"avif"
|
|
184
188
|
]);
|
|
185
|
-
function
|
|
189
|
+
function j(e) {
|
|
186
190
|
if (e.previewUrl) return !0;
|
|
187
191
|
let t = e.name.split(".").pop()?.toLowerCase() ?? "";
|
|
188
|
-
return
|
|
192
|
+
return A.has(t);
|
|
189
193
|
}
|
|
190
|
-
function
|
|
194
|
+
function M(e) {
|
|
191
195
|
switch (e) {
|
|
192
196
|
case "complete": return "success";
|
|
193
197
|
case "error": return "error";
|
|
194
198
|
default: return "default";
|
|
195
199
|
}
|
|
196
200
|
}
|
|
197
|
-
function
|
|
201
|
+
function N(e) {
|
|
198
202
|
switch (e.status) {
|
|
199
203
|
case "pending": return 0;
|
|
200
204
|
case "uploading": return e.progress ?? 0;
|
|
@@ -203,12 +207,12 @@ function M(e) {
|
|
|
203
207
|
case "error": return e.progress ?? 0;
|
|
204
208
|
}
|
|
205
209
|
}
|
|
206
|
-
function
|
|
210
|
+
function P(e) {
|
|
207
211
|
return !e || e < 0 || !Number.isFinite(e) ? "0 B" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(1)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
208
212
|
}
|
|
209
|
-
function
|
|
210
|
-
let
|
|
211
|
-
return /* @__PURE__ */
|
|
213
|
+
function F({ file: i, onRetry: s, onRemove: l }) {
|
|
214
|
+
let u = i.status === "complete" || i.status === "error", m = i.status === "uploading" || i.status === "processing";
|
|
215
|
+
return /* @__PURE__ */ f(e.div, {
|
|
212
216
|
layout: !0,
|
|
213
217
|
className: "flex items-center gap-ds-02 py-1",
|
|
214
218
|
initial: !1,
|
|
@@ -223,11 +227,11 @@ function P({ file: i, onRetry: s, onRemove: l }) {
|
|
|
223
227
|
},
|
|
224
228
|
transition: n.snappy,
|
|
225
229
|
children: [
|
|
226
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ d("div", {
|
|
227
231
|
className: "flex h-5 w-5 shrink-0 items-center justify-center",
|
|
228
|
-
children: /* @__PURE__ */
|
|
232
|
+
children: /* @__PURE__ */ d(t, {
|
|
229
233
|
mode: "wait",
|
|
230
|
-
children: i.status === "complete" ? /* @__PURE__ */
|
|
234
|
+
children: i.status === "complete" ? /* @__PURE__ */ d(e.div, {
|
|
231
235
|
initial: {
|
|
232
236
|
opacity: 0,
|
|
233
237
|
scale: .5
|
|
@@ -241,12 +245,12 @@ function P({ file: i, onRetry: s, onRemove: l }) {
|
|
|
241
245
|
scale: .5
|
|
242
246
|
},
|
|
243
247
|
transition: n.bouncy,
|
|
244
|
-
children: /* @__PURE__ */
|
|
245
|
-
icon:
|
|
248
|
+
children: /* @__PURE__ */ d(o, {
|
|
249
|
+
icon: h,
|
|
246
250
|
size: "xs",
|
|
247
251
|
className: "text-success-11"
|
|
248
252
|
})
|
|
249
|
-
}, "complete") : i.status === "error" ? /* @__PURE__ */
|
|
253
|
+
}, "complete") : i.status === "error" ? /* @__PURE__ */ d(e.div, {
|
|
250
254
|
initial: {
|
|
251
255
|
opacity: 0,
|
|
252
256
|
scale: .5
|
|
@@ -260,111 +264,111 @@ function P({ file: i, onRetry: s, onRemove: l }) {
|
|
|
260
264
|
scale: .5
|
|
261
265
|
},
|
|
262
266
|
transition: r.fade,
|
|
263
|
-
children: /* @__PURE__ */
|
|
264
|
-
icon:
|
|
267
|
+
children: /* @__PURE__ */ d(o, {
|
|
268
|
+
icon: p,
|
|
265
269
|
size: "xs",
|
|
266
270
|
className: "text-error-11"
|
|
267
271
|
})
|
|
268
|
-
}, "error") : i.status === "processing" ? /* @__PURE__ */
|
|
272
|
+
}, "error") : i.status === "processing" ? /* @__PURE__ */ d(e.div, {
|
|
269
273
|
initial: { opacity: 0 },
|
|
270
274
|
animate: { opacity: 1 },
|
|
271
275
|
exit: { opacity: 0 },
|
|
272
276
|
transition: r.fade,
|
|
273
|
-
children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ d(a, {
|
|
274
278
|
size: "sm",
|
|
275
279
|
className: "h-3.5 w-3.5"
|
|
276
280
|
})
|
|
277
|
-
}, "processing") :
|
|
281
|
+
}, "processing") : j(i) ? /* @__PURE__ */ d(e.div, {
|
|
278
282
|
initial: { opacity: 0 },
|
|
279
283
|
animate: { opacity: 1 },
|
|
280
284
|
exit: { opacity: 0 },
|
|
281
285
|
transition: r.fade,
|
|
282
|
-
children: /* @__PURE__ */
|
|
283
|
-
icon:
|
|
286
|
+
children: /* @__PURE__ */ d(o, {
|
|
287
|
+
icon: b,
|
|
284
288
|
size: "xs",
|
|
285
289
|
className: "text-surface-fg-muted"
|
|
286
290
|
})
|
|
287
|
-
}, "image") : /* @__PURE__ */
|
|
291
|
+
}, "image") : /* @__PURE__ */ d(e.div, {
|
|
288
292
|
initial: { opacity: 0 },
|
|
289
293
|
animate: { opacity: 1 },
|
|
290
294
|
exit: { opacity: 0 },
|
|
291
295
|
transition: r.fade,
|
|
292
|
-
children: /* @__PURE__ */
|
|
293
|
-
icon:
|
|
296
|
+
children: /* @__PURE__ */ d(o, {
|
|
297
|
+
icon: v,
|
|
294
298
|
size: "xs",
|
|
295
299
|
className: "text-surface-fg-muted"
|
|
296
300
|
})
|
|
297
301
|
}, "file")
|
|
298
302
|
})
|
|
299
303
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ d("span", {
|
|
301
305
|
className: "min-w-0 flex-1 truncate text-ds-xs text-surface-fg",
|
|
302
306
|
children: i.name
|
|
303
307
|
}),
|
|
304
|
-
|
|
308
|
+
m ? /* @__PURE__ */ f("div", {
|
|
305
309
|
className: "flex w-16 items-center gap-1",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
310
|
+
children: [/* @__PURE__ */ d(c, {
|
|
307
311
|
size: "sm",
|
|
308
|
-
color:
|
|
309
|
-
value:
|
|
312
|
+
color: M(i.status),
|
|
313
|
+
value: N(i),
|
|
310
314
|
className: "flex-1"
|
|
311
|
-
}), i.progress !== void 0 && /* @__PURE__ */
|
|
315
|
+
}), i.progress !== void 0 && /* @__PURE__ */ f("span", {
|
|
312
316
|
className: "shrink-0 text-ds-xs tabular-nums text-surface-fg-muted",
|
|
313
317
|
children: [i.progress, "%"]
|
|
314
318
|
})]
|
|
315
|
-
}) : i.status === "complete" ? /* @__PURE__ */
|
|
319
|
+
}) : i.status === "complete" ? /* @__PURE__ */ d("span", {
|
|
316
320
|
className: "text-ds-xs text-success-11",
|
|
317
321
|
children: "Done"
|
|
318
|
-
}) : i.status === "error" ? /* @__PURE__ */
|
|
322
|
+
}) : i.status === "error" ? /* @__PURE__ */ d("span", {
|
|
319
323
|
className: "max-w-[60px] truncate text-ds-xs text-error-11",
|
|
320
324
|
children: i.error || "Failed"
|
|
321
|
-
}) : /* @__PURE__ */
|
|
325
|
+
}) : /* @__PURE__ */ d("span", {
|
|
322
326
|
className: "text-ds-xs text-surface-fg-muted",
|
|
323
|
-
children:
|
|
327
|
+
children: P(i.size)
|
|
324
328
|
}),
|
|
325
|
-
i.status === "error" && s && /* @__PURE__ */
|
|
329
|
+
i.status === "error" && s && /* @__PURE__ */ d("button", {
|
|
326
330
|
type: "button",
|
|
327
331
|
onClick: () => s(i.id),
|
|
328
332
|
className: "touch-target flex min-h-6 min-w-6 items-center justify-center rounded-ds-sm text-surface-fg-muted hover:text-surface-fg",
|
|
329
333
|
"aria-label": `Retry ${i.name}`,
|
|
330
334
|
title: "Retry",
|
|
331
|
-
children: /* @__PURE__ */
|
|
335
|
+
children: /* @__PURE__ */ d(x, { className: "h-3.5 w-3.5" })
|
|
332
336
|
}),
|
|
333
|
-
!
|
|
337
|
+
!u && l && /* @__PURE__ */ d("button", {
|
|
334
338
|
type: "button",
|
|
335
339
|
onClick: () => l(i.id),
|
|
336
340
|
className: "touch-target flex min-h-6 min-w-6 items-center justify-center rounded-ds-sm text-surface-fg-muted hover:text-surface-fg",
|
|
337
341
|
"aria-label": `Cancel ${i.name}`,
|
|
338
342
|
title: "Remove",
|
|
339
|
-
children: /* @__PURE__ */
|
|
343
|
+
children: /* @__PURE__ */ d(C, { className: "h-3.5 w-3.5" })
|
|
340
344
|
})
|
|
341
345
|
]
|
|
342
346
|
});
|
|
343
347
|
}
|
|
344
|
-
function
|
|
345
|
-
let [g, _] =
|
|
346
|
-
|
|
347
|
-
if (
|
|
348
|
+
function I({ files: a, onRetry: c, onRemove: l, selfDismissId: m }) {
|
|
349
|
+
let [g, _] = u.useState(!1), [v, y] = u.useState(!1), b = g || v, x = a.filter((e) => e.status === "complete").length, C = a.filter((e) => e.status === "error").length, w = a.every((e) => e.status === "complete" || e.status === "error"), T = u.useRef(E), D = u.useRef(0);
|
|
350
|
+
u.useEffect(() => {
|
|
351
|
+
if (m == null || !w) return;
|
|
348
352
|
if (b) {
|
|
349
|
-
let e = Date.now() -
|
|
350
|
-
|
|
353
|
+
let e = Date.now() - D.current;
|
|
354
|
+
T.current = Math.max(0, T.current - e);
|
|
351
355
|
return;
|
|
352
356
|
}
|
|
353
|
-
|
|
357
|
+
D.current = Date.now();
|
|
354
358
|
let e = setTimeout(() => {
|
|
355
|
-
s.dismiss(
|
|
356
|
-
},
|
|
359
|
+
s.dismiss(m);
|
|
360
|
+
}, T.current);
|
|
357
361
|
return () => clearTimeout(e);
|
|
358
362
|
}, [
|
|
359
|
-
|
|
363
|
+
m,
|
|
360
364
|
w,
|
|
361
365
|
b
|
|
362
366
|
]);
|
|
363
|
-
let k = w ? C > 0 ? "bg-error-7" : "bg-success-7" : "bg-accent-9", A = w ? C > 0 ? "error" : "success" : "loading";
|
|
364
|
-
return /* @__PURE__ */
|
|
367
|
+
let k = w ? C > 0 ? "bg-error-7" : "bg-success-7" : "bg-accent-9", A = w ? C > 0 ? "error" : "success" : "loading", j = w && C > 0;
|
|
368
|
+
return /* @__PURE__ */ f(e.div, {
|
|
365
369
|
layout: !0,
|
|
366
|
-
role: "status",
|
|
367
|
-
"aria-live": "polite",
|
|
370
|
+
role: j ? "alert" : "status",
|
|
371
|
+
"aria-live": j ? "assertive" : "polite",
|
|
368
372
|
"aria-label": "File uploads",
|
|
369
373
|
className: "group relative flex w-full overflow-hidden rounded-ds-md border border-surface-border-strong bg-surface-overlay shadow-floating",
|
|
370
374
|
onMouseEnter: () => _(!0),
|
|
@@ -373,15 +377,15 @@ function F({ files: a, onRetry: c, onRemove: p, selfDismissId: h }) {
|
|
|
373
377
|
onBlurCapture: () => y(!1),
|
|
374
378
|
transition: n.smooth,
|
|
375
379
|
children: [
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ d("div", { className: i("w-1 shrink-0 rounded-l-ds-md", k) }),
|
|
381
|
+
/* @__PURE__ */ f("div", {
|
|
378
382
|
className: "min-w-0 flex-1 p-ds-04",
|
|
379
383
|
children: [
|
|
380
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ f("div", {
|
|
381
385
|
className: "flex items-center gap-ds-02",
|
|
382
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ d(t, {
|
|
383
387
|
mode: "wait",
|
|
384
|
-
children: w ? C > 0 ? /* @__PURE__ */
|
|
388
|
+
children: w ? C > 0 ? /* @__PURE__ */ d(e.div, {
|
|
385
389
|
initial: {
|
|
386
390
|
opacity: 0,
|
|
387
391
|
scale: .5
|
|
@@ -395,12 +399,12 @@ function F({ files: a, onRetry: c, onRemove: p, selfDismissId: h }) {
|
|
|
395
399
|
scale: .5
|
|
396
400
|
},
|
|
397
401
|
transition: n.bouncy,
|
|
398
|
-
children: /* @__PURE__ */
|
|
399
|
-
icon:
|
|
402
|
+
children: /* @__PURE__ */ d(o, {
|
|
403
|
+
icon: p,
|
|
400
404
|
size: "sm",
|
|
401
405
|
className: "shrink-0 text-error-11"
|
|
402
406
|
})
|
|
403
|
-
}, "error-icon") : /* @__PURE__ */
|
|
407
|
+
}, "error-icon") : /* @__PURE__ */ d(e.div, {
|
|
404
408
|
initial: {
|
|
405
409
|
opacity: 0,
|
|
406
410
|
scale: .5
|
|
@@ -414,50 +418,50 @@ function F({ files: a, onRetry: c, onRemove: p, selfDismissId: h }) {
|
|
|
414
418
|
scale: .5
|
|
415
419
|
},
|
|
416
420
|
transition: n.bouncy,
|
|
417
|
-
children: /* @__PURE__ */
|
|
418
|
-
icon:
|
|
421
|
+
children: /* @__PURE__ */ d(o, {
|
|
422
|
+
icon: h,
|
|
419
423
|
size: "sm",
|
|
420
424
|
className: "shrink-0 text-success-11"
|
|
421
425
|
})
|
|
422
|
-
}, "success-icon") : /* @__PURE__ */
|
|
426
|
+
}, "success-icon") : /* @__PURE__ */ d(e.div, {
|
|
423
427
|
initial: { opacity: 0 },
|
|
424
428
|
animate: { opacity: 1 },
|
|
425
429
|
exit: { opacity: 0 },
|
|
426
430
|
transition: r.fade,
|
|
427
|
-
children: /* @__PURE__ */
|
|
428
|
-
icon:
|
|
431
|
+
children: /* @__PURE__ */ d(o, {
|
|
432
|
+
icon: S,
|
|
429
433
|
size: "sm",
|
|
430
434
|
className: "shrink-0 text-surface-fg-muted"
|
|
431
435
|
})
|
|
432
436
|
}, "upload-icon")
|
|
433
|
-
}), /* @__PURE__ */
|
|
437
|
+
}), /* @__PURE__ */ d("p", {
|
|
434
438
|
className: "text-ds-md font-semibold text-surface-fg",
|
|
435
|
-
children: w ? C > 0 ? `${
|
|
439
|
+
children: w ? C > 0 ? `${x} of ${a.length} uploaded` : `${a.length} file${a.length > 1 ? "s" : ""} uploaded` : `Uploading ${a.length} file${a.length > 1 ? "s" : ""}`
|
|
436
440
|
})]
|
|
437
441
|
}),
|
|
438
|
-
!w && /* @__PURE__ */
|
|
442
|
+
!w && /* @__PURE__ */ f("p", {
|
|
439
443
|
className: "mt-0.5 text-ds-xs text-surface-fg-muted",
|
|
440
444
|
children: [
|
|
441
|
-
|
|
445
|
+
x,
|
|
442
446
|
" of ",
|
|
443
447
|
a.length,
|
|
444
448
|
" complete",
|
|
445
449
|
C > 0 && ` · ${C} failed`
|
|
446
450
|
]
|
|
447
451
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ d("div", {
|
|
449
453
|
className: "mt-ds-02 max-h-[140px] overflow-y-auto",
|
|
450
|
-
children: /* @__PURE__ */
|
|
454
|
+
children: /* @__PURE__ */ d(t, { children: a.map((e) => /* @__PURE__ */ d(F, {
|
|
451
455
|
file: e,
|
|
452
456
|
onRetry: c,
|
|
453
|
-
onRemove:
|
|
457
|
+
onRemove: l
|
|
454
458
|
}, e.id)) })
|
|
455
459
|
}),
|
|
456
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ f("div", {
|
|
457
461
|
className: "sr-only",
|
|
458
462
|
"aria-live": "polite",
|
|
459
463
|
children: [
|
|
460
|
-
|
|
464
|
+
x,
|
|
461
465
|
" of ",
|
|
462
466
|
a.length,
|
|
463
467
|
" files uploaded",
|
|
@@ -466,41 +470,42 @@ function F({ files: a, onRetry: c, onRemove: p, selfDismissId: h }) {
|
|
|
466
470
|
})
|
|
467
471
|
]
|
|
468
472
|
}),
|
|
469
|
-
w && /* @__PURE__ */
|
|
470
|
-
duration:
|
|
473
|
+
w && /* @__PURE__ */ d(O, {
|
|
474
|
+
duration: E,
|
|
471
475
|
type: A,
|
|
472
476
|
paused: !1
|
|
473
477
|
})
|
|
474
478
|
]
|
|
475
479
|
});
|
|
476
480
|
}
|
|
477
|
-
function
|
|
481
|
+
function L(e, t) {
|
|
478
482
|
return {
|
|
479
483
|
id: e?.id,
|
|
480
|
-
duration: e?.duration ?? t ??
|
|
484
|
+
duration: e?.duration ?? t ?? w,
|
|
481
485
|
unstyled: !0,
|
|
482
486
|
classNames: { toast: "w-full" }
|
|
483
487
|
};
|
|
484
488
|
}
|
|
485
|
-
function
|
|
486
|
-
|
|
487
|
-
|
|
489
|
+
function R(e, t, n) {
|
|
490
|
+
l();
|
|
491
|
+
let r = n?.duration ?? w;
|
|
492
|
+
return s.custom(() => /* @__PURE__ */ d(k, {
|
|
488
493
|
type: e,
|
|
489
494
|
title: t,
|
|
490
495
|
description: n?.description,
|
|
491
496
|
action: n?.action,
|
|
492
497
|
cancel: n?.cancel,
|
|
493
498
|
duration: r
|
|
494
|
-
}),
|
|
499
|
+
}), L(n, r));
|
|
495
500
|
}
|
|
496
|
-
function
|
|
497
|
-
return
|
|
501
|
+
function z(e, t) {
|
|
502
|
+
return R("message", e, t);
|
|
498
503
|
}
|
|
499
|
-
|
|
504
|
+
z.message = (e, t) => R("message", e, t), z.success = (e, t) => R("success", e, t), z.error = (e, t) => R("error", e, t), z.warning = (e, t) => R("warning", e, t), z.info = (e, t) => R("info", e, t), z.loading = (e, t) => R("loading", e, {
|
|
500
505
|
...t,
|
|
501
506
|
duration: t?.duration ?? Infinity
|
|
502
|
-
}),
|
|
503
|
-
let n = s.custom(() => /* @__PURE__ */
|
|
507
|
+
}), z.promise = (e, t) => {
|
|
508
|
+
let n = s.custom(() => /* @__PURE__ */ d(k, {
|
|
504
509
|
type: "loading",
|
|
505
510
|
title: t.loading,
|
|
506
511
|
showTimerBar: !1
|
|
@@ -509,10 +514,10 @@ R.message = (e, t) => L("message", e, t), R.success = (e, t) => L("success", e,
|
|
|
509
514
|
unstyled: !0,
|
|
510
515
|
classNames: { toast: "w-full" }
|
|
511
516
|
}), r = (e, t) => {
|
|
512
|
-
s.custom(() => /* @__PURE__ */
|
|
517
|
+
s.custom(() => /* @__PURE__ */ d(k, {
|
|
513
518
|
type: e,
|
|
514
519
|
title: t,
|
|
515
|
-
duration:
|
|
520
|
+
duration: w,
|
|
516
521
|
selfDismissId: n
|
|
517
522
|
}), {
|
|
518
523
|
id: n,
|
|
@@ -526,9 +531,9 @@ R.message = (e, t) => L("message", e, t), R.success = (e, t) => L("success", e,
|
|
|
526
531
|
}).catch((e) => {
|
|
527
532
|
r("error", typeof t.error == "function" ? t.error(e) : t.error);
|
|
528
533
|
}), n;
|
|
529
|
-
},
|
|
530
|
-
let n = t.duration ??
|
|
531
|
-
return s.custom(() => /* @__PURE__ */
|
|
534
|
+
}, z.undo = (e, t) => {
|
|
535
|
+
let n = t.duration ?? T;
|
|
536
|
+
return s.custom(() => /* @__PURE__ */ d(k, {
|
|
532
537
|
type: "message",
|
|
533
538
|
title: e,
|
|
534
539
|
description: t.description,
|
|
@@ -542,9 +547,9 @@ R.message = (e, t) => L("message", e, t), R.success = (e, t) => L("success", e,
|
|
|
542
547
|
unstyled: !0,
|
|
543
548
|
classNames: { toast: "w-full" }
|
|
544
549
|
});
|
|
545
|
-
},
|
|
550
|
+
}, z.upload = (e) => {
|
|
546
551
|
let t = e.id ?? String(Date.now());
|
|
547
|
-
return s.custom(() => /* @__PURE__ */
|
|
552
|
+
return s.custom(() => /* @__PURE__ */ d(I, {
|
|
548
553
|
files: e.files,
|
|
549
554
|
onRetry: e.onRetry,
|
|
550
555
|
onRemove: e.onRemove,
|
|
@@ -555,15 +560,15 @@ R.message = (e, t) => L("message", e, t), R.success = (e, t) => L("success", e,
|
|
|
555
560
|
unstyled: !0,
|
|
556
561
|
classNames: { toast: "w-full" }
|
|
557
562
|
}), t;
|
|
558
|
-
},
|
|
563
|
+
}, z.custom = (e, t) => s.custom(e, {
|
|
559
564
|
...t,
|
|
560
565
|
unstyled: !0,
|
|
561
566
|
classNames: {
|
|
562
567
|
toast: "w-full",
|
|
563
568
|
...t?.classNames
|
|
564
569
|
}
|
|
565
|
-
}),
|
|
570
|
+
}), z.dismiss = (e) => {
|
|
566
571
|
e === void 0 ? s.dismiss() : s.dismiss(e);
|
|
567
572
|
};
|
|
568
573
|
//#endregion
|
|
569
|
-
export {
|
|
574
|
+
export { O as TimerBar, k as ToastContent, F as UploadFileRow, I as UploadToastContent, P as formatFileSize, z as toast };
|