@devalok/shilp-sutra 0.53.0 → 0.55.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/AGENTS.md +7 -1
- package/BREAKING.json +29 -0
- package/MIGRATION.md +83 -0
- package/dist/_chunks/badge-group.js +1 -1
- package/dist/_chunks/popover.js +38 -37
- package/dist/_chunks/popover.js.map +1 -1
- package/dist/_chunks/primitives/react-accordion.js +270 -0
- package/dist/_chunks/primitives/react-accordion.js.map +1 -0
- package/dist/_chunks/primitives/react-alert-dialog.js +857 -0
- package/dist/_chunks/primitives/react-alert-dialog.js.map +1 -0
- package/dist/_chunks/primitives/react-aspect-ratio.js +32 -0
- package/dist/_chunks/primitives/react-aspect-ratio.js.map +1 -0
- package/dist/_chunks/primitives/react-avatar.js +69 -0
- package/dist/_chunks/primitives/react-avatar.js.map +1 -0
- package/dist/_chunks/primitives/react-checkbox.js +151 -0
- package/dist/_chunks/primitives/react-checkbox.js.map +1 -0
- package/dist/_chunks/primitives/react-context-menu.js +905 -0
- package/dist/_chunks/primitives/react-context-menu.js.map +1 -0
- package/dist/_chunks/primitives/react-dropdown-menu.js +220 -0
- package/dist/_chunks/primitives/react-dropdown-menu.js.map +1 -0
- package/dist/_chunks/primitives/react-hover-card.js +153 -0
- package/dist/_chunks/primitives/react-hover-card.js.map +1 -0
- package/dist/_chunks/primitives/react-label.js +16 -0
- package/dist/_chunks/primitives/react-label.js.map +1 -0
- package/dist/_chunks/primitives/react-menubar.js +304 -0
- package/dist/_chunks/primitives/react-menubar.js.map +1 -0
- package/dist/_chunks/primitives/react-navigation-menu.js +560 -0
- package/dist/_chunks/primitives/react-navigation-menu.js.map +1 -0
- package/dist/_chunks/primitives/react-popover.js +186 -0
- package/dist/_chunks/primitives/react-popover.js.map +1 -0
- package/dist/_chunks/primitives/react-progress.js +70 -0
- package/dist/_chunks/primitives/react-progress.js.map +1 -0
- package/dist/_chunks/primitives/react-radio-group.js +170 -0
- package/dist/_chunks/primitives/react-radio-group.js.map +1 -0
- package/dist/_chunks/primitives/react-select.js +671 -0
- package/dist/_chunks/primitives/react-select.js.map +1 -0
- package/dist/_chunks/primitives/react-separator.js +24 -0
- package/dist/_chunks/primitives/react-separator.js.map +1 -0
- package/dist/_chunks/primitives/react-slider.js +349 -0
- package/dist/_chunks/primitives/react-slider.js.map +1 -0
- package/dist/_chunks/primitives/react-switch.js +92 -0
- package/dist/_chunks/primitives/react-switch.js.map +1 -0
- package/dist/_chunks/primitives/react-tabs.js +114 -0
- package/dist/_chunks/primitives/react-tabs.js.map +1 -0
- package/dist/_chunks/primitives/react-toggle-group.js +122 -0
- package/dist/_chunks/primitives/react-toggle-group.js.map +1 -0
- package/dist/_chunks/primitives/react-toggle.js +28 -0
- package/dist/_chunks/primitives/react-toggle.js.map +1 -0
- package/dist/_chunks/primitives/react-tooltip.js +341 -0
- package/dist/_chunks/primitives/react-tooltip.js.map +1 -0
- package/dist/_chunks/primitives-internal.js +2071 -0
- package/dist/_chunks/primitives-internal.js.map +1 -0
- package/dist/_chunks/shared.js +32 -32
- package/dist/_chunks/tiptap.js +1 -1
- package/dist/ai/ai-command-provider.d.ts +2 -3
- package/dist/ai/block-renderer.d.ts +1 -2
- package/dist/ai/blocks/block-shell.d.ts +0 -1
- package/dist/ai/blocks/block-table.d.ts +1 -2
- package/dist/ai/blocks/confirm.d.ts +1 -2
- package/dist/ai/blocks/divider.d.ts +1 -2
- package/dist/ai/blocks/error.d.ts +1 -2
- package/dist/ai/blocks/index.d.ts +7 -8
- package/dist/ai/blocks/info.d.ts +1 -2
- package/dist/ai/blocks/loading.d.ts +1 -2
- package/dist/ai/blocks/stat-row.d.ts +1 -2
- package/dist/ai/blocks/success.d.ts +1 -2
- package/dist/ai/blocks/text.d.ts +1 -2
- package/dist/ai/command-bar.d.ts +1 -2
- package/dist/ai/conversation.d.ts +2 -3
- package/dist/ai/devadoot-icon.d.ts +0 -1
- package/dist/ai/index.d.ts +16 -17
- package/dist/ai/types.js +1 -0
- package/dist/composed/activity-feed.d.ts +1 -2
- package/dist/composed/avatar-group.d.ts +11 -10
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +108 -140
- package/dist/composed/avatar-group.js.map +1 -1
- package/dist/composed/bulk-action-bar.d.ts +20 -13
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +81 -110
- package/dist/composed/bulk-action-bar.js.map +1 -1
- package/dist/composed/command-palette.d.ts +1 -2
- package/dist/composed/confirm-dialog.d.ts +0 -1
- package/dist/composed/date-picker/calendar-grid.d.ts +0 -1
- package/dist/composed/date-picker/date-picker.d.ts +0 -1
- package/dist/composed/date-picker/date-range-picker.d.ts +1 -2
- package/dist/composed/date-picker/date-time-picker.d.ts +0 -1
- package/dist/composed/date-picker/index.d.ts +17 -18
- package/dist/composed/date-picker/month-picker.d.ts +0 -1
- package/dist/composed/date-picker/presets.d.ts +0 -1
- package/dist/composed/date-picker/time-picker.d.ts +0 -1
- package/dist/composed/date-picker/use-calendar.d.ts +0 -1
- package/dist/composed/date-picker/year-picker.d.ts +0 -1
- package/dist/composed/deadline-indicator.d.ts +0 -1
- package/dist/composed/diff.d.ts +0 -1
- package/dist/composed/emoji-picker.d.ts +0 -1
- package/dist/composed/empty-state.d.ts +1 -2
- package/dist/composed/error-boundary.d.ts +15 -4
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +43 -26
- package/dist/composed/error-boundary.js.map +1 -1
- package/dist/composed/extensions/emoji-data.d.ts +0 -1
- package/dist/composed/extensions/emoji-node.d.ts +0 -1
- package/dist/composed/extensions/emoji-suggestion.d.ts +1 -2
- package/dist/composed/extensions/file-attachment.d.ts +0 -1
- package/dist/composed/extensions/mention-suggestion.d.ts +1 -2
- package/dist/composed/extensions/slash-command.d.ts +0 -1
- package/dist/composed/file-preview/audio-preview.d.ts +0 -1
- package/dist/composed/file-preview/document-preview.d.ts +0 -1
- package/dist/composed/file-preview/embed-preview.d.ts +0 -1
- package/dist/composed/file-preview/image-preview.d.ts +0 -1
- package/dist/composed/file-preview/shared.d.ts +0 -1
- package/dist/composed/file-preview/video-preview.d.ts +0 -1
- package/dist/composed/file-preview.d.ts +0 -1
- package/dist/composed/filter-bar.d.ts +0 -1
- package/dist/composed/form-section.d.ts +0 -1
- package/dist/composed/global-loading.d.ts +0 -1
- package/dist/composed/index.d.ts +49 -50
- package/dist/composed/inline-edit.d.ts +0 -1
- package/dist/composed/loading-skeleton.d.ts +2 -0
- package/dist/composed/loading-skeleton.d.ts.map +1 -1
- package/dist/composed/loading-skeleton.js +79 -56
- package/dist/composed/loading-skeleton.js.map +1 -1
- package/dist/composed/markdown-viewer.d.ts +0 -1
- package/dist/composed/master-detail.d.ts +21 -9
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +91 -77
- package/dist/composed/master-detail.js.map +1 -1
- package/dist/composed/member-picker.d.ts +0 -1
- package/dist/composed/multi-select-popover.d.ts +0 -1
- package/dist/composed/page-skeletons.d.ts +6 -0
- package/dist/composed/page-skeletons.d.ts.map +1 -1
- package/dist/composed/page-skeletons.js +93 -71
- package/dist/composed/page-skeletons.js.map +1 -1
- package/dist/composed/priority-indicator.d.ts +0 -1
- package/dist/composed/responsive-modal.d.ts +1 -2
- package/dist/composed/responsive-modal.js +47 -47
- package/dist/composed/rich-chat-input/attachment-strip.d.ts +0 -1
- package/dist/composed/rich-chat-input/audio-player.d.ts +0 -1
- package/dist/composed/rich-chat-input/audio-waveform.d.ts +0 -1
- package/dist/composed/rich-chat-input/chat-toolbar.d.ts +0 -1
- package/dist/composed/rich-chat-input/recording-overlay.d.ts +0 -1
- package/dist/composed/rich-chat-input/reply-banner.d.ts +0 -1
- package/dist/composed/rich-chat-input/schedule-send.d.ts +0 -1
- package/dist/composed/rich-chat-input/use-voice-recorder.d.ts +0 -1
- package/dist/composed/rich-chat-input.d.ts +9 -10
- package/dist/composed/rich-chat-input.js +1 -1
- package/dist/composed/rich-text-editor.d.ts +1 -2
- package/dist/composed/schedule-view.d.ts +0 -1
- package/dist/composed/simple-tooltip.d.ts +0 -1
- package/dist/composed/status-badge.d.ts +1 -2
- package/dist/hooks/index.d.ts +6 -7
- package/dist/hooks/use-color-mode.d.ts +0 -1
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-touch-device.d.ts +0 -1
- package/dist/hooks/use-viewport-height.d.ts +0 -1
- package/dist/motion/check-motion-provider.d.ts +0 -1
- package/dist/motion/index.d.ts +2 -3
- package/dist/motion/motion-provider.d.ts +1 -2
- package/dist/motion/primitives-index.d.ts +1 -2
- package/dist/motion/primitives.d.ts +1 -2
- package/dist/primitives/_internal/react-arrow.d.ts +1 -1
- package/dist/primitives/_internal/react-collection.d.ts +2 -2
- package/dist/primitives/_internal/react-dismissable-layer.d.ts +1 -1
- package/dist/primitives/_internal/react-focus-scope.d.ts +1 -1
- package/dist/primitives/_internal/react-popper.d.ts +4 -4
- package/dist/primitives/_internal/react-portal.d.ts +1 -1
- package/dist/primitives/_internal/react-use-rect.d.ts +1 -1
- package/dist/primitives/react-accordion.d.ts +3 -3
- package/dist/primitives/react-alert-dialog.d.ts +2 -2
- package/dist/primitives/react-aspect-ratio.d.ts +1 -1
- package/dist/primitives/react-avatar.d.ts +2 -2
- package/dist/primitives/react-checkbox.d.ts +3 -3
- package/dist/primitives/react-collapsible.d.ts +2 -2
- package/dist/primitives/react-context-menu.d.ts +3 -3
- package/dist/primitives/react-dialog.d.ts +5 -5
- package/dist/primitives/react-dropdown-menu.d.ts +3 -3
- package/dist/primitives/react-hover-card.d.ts +5 -5
- package/dist/primitives/react-label.d.ts +1 -1
- package/dist/primitives/react-menu.d.ts +7 -7
- package/dist/primitives/react-menubar.d.ts +5 -5
- package/dist/primitives/react-navigation-menu.d.ts +5 -5
- package/dist/primitives/react-popover.d.ts +6 -6
- package/dist/primitives/react-progress.d.ts +2 -2
- package/dist/primitives/react-radio-group.d.ts +3 -3
- package/dist/primitives/react-roving-focus.d.ts +2 -2
- package/dist/primitives/react-select.d.ts +6 -6
- package/dist/primitives/react-separator.d.ts +1 -1
- package/dist/primitives/react-slider.d.ts +2 -2
- package/dist/primitives/react-switch.d.ts +2 -2
- package/dist/primitives/react-tabs.d.ts +3 -3
- package/dist/primitives/react-toast.d.ts +3 -3
- package/dist/primitives/react-toggle-group.d.ts +4 -4
- package/dist/primitives/react-toggle.d.ts +1 -1
- package/dist/primitives/react-tooltip.d.ts +5 -5
- package/dist/primitives/react-visually-hidden.d.ts +1 -1
- package/dist/shell/app-command-palette.d.ts +2 -3
- package/dist/shell/bottom-navbar.d.ts +1 -2
- package/dist/shell/command-registry.d.ts +1 -2
- package/dist/shell/index.d.ts +12 -11
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +2 -3
- package/dist/shell/link-context.d.ts +2 -3
- package/dist/shell/notification-center.d.ts +0 -1
- package/dist/shell/notification-preferences.d.ts +0 -1
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +2 -0
- package/dist/shell/notification-preferences.js.map +1 -1
- package/dist/shell/top-bar.d.ts +1 -2
- package/dist/test-utils/conformance.d.ts +0 -1
- package/dist/ui/accordion.d.ts +1 -2
- package/dist/ui/accordion.js +1 -1
- package/dist/ui/alert-dialog.d.ts +1 -2
- package/dist/ui/alert-dialog.js +52 -52
- package/dist/ui/alert.d.ts +0 -1
- package/dist/ui/aspect-ratio.d.ts +1 -2
- package/dist/ui/aspect-ratio.js +4 -4
- package/dist/ui/autocomplete.d.ts +1 -2
- package/dist/ui/autocomplete.js +1 -1
- package/dist/ui/avatar.d.ts +1 -2
- package/dist/ui/avatar.js +33 -33
- package/dist/ui/badge-group.d.ts +1 -2
- package/dist/ui/badge-indicator.d.ts +0 -1
- package/dist/ui/badge.d.ts +3 -4
- package/dist/ui/banner.d.ts +0 -1
- package/dist/ui/breadcrumb.js +1 -1
- package/dist/ui/button-group.d.ts +1 -2
- package/dist/ui/button-processing.d.ts +0 -1
- package/dist/ui/button.d.ts +1 -2
- package/dist/ui/button.js +1 -1
- package/dist/ui/card.d.ts +0 -1
- package/dist/ui/charts/_internal/animation.d.ts +0 -1
- package/dist/ui/charts/_internal/axes.d.ts +0 -1
- package/dist/ui/charts/_internal/colors.d.ts +1 -2
- package/dist/ui/charts/_internal/grid-lines.d.ts +0 -1
- package/dist/ui/charts/_internal/legend.d.ts +0 -1
- package/dist/ui/charts/_internal/scales.d.ts +0 -1
- package/dist/ui/charts/_internal/tooltip.d.ts +0 -1
- package/dist/ui/charts/_internal/types.d.ts +0 -1
- package/dist/ui/charts/area-chart.d.ts +1 -2
- package/dist/ui/charts/bar-chart.d.ts +1 -2
- package/dist/ui/charts/chart-container.d.ts +1 -2
- package/dist/ui/charts/gauge-chart.d.ts +0 -1
- package/dist/ui/charts/index.d.ts +9 -10
- package/dist/ui/charts/line-chart.d.ts +1 -2
- package/dist/ui/charts/pie-chart.d.ts +0 -1
- package/dist/ui/charts/radar-chart.d.ts +0 -1
- package/dist/ui/charts/sparkline.d.ts +0 -1
- package/dist/ui/chat/date-separator.d.ts +0 -1
- package/dist/ui/chat/index.d.ts +7 -8
- package/dist/ui/chat/message-input.d.ts +0 -1
- package/dist/ui/chat/message-list.d.ts +0 -1
- package/dist/ui/chat/message.d.ts +1 -2
- package/dist/ui/chat/system-message.d.ts +1 -2
- package/dist/ui/chat/typing-indicator.d.ts +0 -1
- package/dist/ui/chat/unread-separator.d.ts +0 -1
- package/dist/ui/checkbox.d.ts +2 -3
- package/dist/ui/checkbox.js +13 -13
- package/dist/ui/collapsible.d.ts +1 -2
- package/dist/ui/collapsible.js +1 -1
- package/dist/ui/color-input.d.ts +0 -1
- package/dist/ui/color-swatch.d.ts +0 -1
- package/dist/ui/combobox.d.ts +3 -4
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +146 -141
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/context-menu.d.ts +1 -2
- package/dist/ui/context-menu.js +58 -58
- package/dist/ui/data-table-body.d.ts +0 -1
- package/dist/ui/data-table-bulk-actions.d.ts +0 -1
- package/dist/ui/data-table-card.d.ts +0 -1
- package/dist/ui/data-table-context.d.ts +0 -1
- package/dist/ui/data-table-header.d.ts +0 -1
- package/dist/ui/data-table-pagination.d.ts +0 -1
- package/dist/ui/data-table-toolbar.d.ts +0 -1
- package/dist/ui/data-table.d.ts +3 -4
- package/dist/ui/devalok-grain.d.ts +0 -1
- package/dist/ui/dialog.d.ts +1 -2
- package/dist/ui/dialog.js +43 -43
- package/dist/ui/dot.d.ts +0 -1
- package/dist/ui/dropdown-menu.d.ts +1 -2
- package/dist/ui/dropdown-menu.js +69 -69
- package/dist/ui/file-upload.d.ts +0 -1
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +124 -138
- package/dist/ui/file-upload.js.map +1 -1
- package/dist/ui/form.d.ts +7 -1
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +4 -2
- package/dist/ui/form.js.map +1 -1
- package/dist/ui/hover-card.d.ts +1 -2
- package/dist/ui/hover-card.js +16 -16
- package/dist/ui/icon-button.d.ts +4 -4
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-button.js +1 -1
- package/dist/ui/icon-button.js.map +1 -1
- package/dist/ui/icon-context.d.ts +0 -1
- package/dist/ui/icon-group.d.ts +1 -2
- package/dist/ui/icon.d.ts +1 -2
- package/dist/ui/index.d.ts +78 -79
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/input-otp.d.ts +0 -1
- package/dist/ui/input.d.ts +1 -2
- package/dist/ui/label.d.ts +1 -2
- package/dist/ui/label.d.ts.map +1 -1
- package/dist/ui/label.js +13 -12
- package/dist/ui/label.js.map +1 -1
- package/dist/ui/lib/bottom-sheet.d.ts +0 -1
- package/dist/ui/lib/check-tokens.d.ts +0 -1
- package/dist/ui/lib/field-state.d.ts +0 -1
- package/dist/ui/lib/icon-input.d.ts +0 -1
- package/dist/ui/lib/index.d.ts +6 -7
- package/dist/ui/lib/keybinding.d.ts +0 -1
- package/dist/ui/lib/link-context.d.ts +0 -1
- package/dist/ui/lib/mention.d.ts +0 -1
- package/dist/ui/lib/normalize-icon.d.ts +2 -2
- package/dist/ui/lib/slot.d.ts +2 -3
- package/dist/ui/lib/use-controllable-open.d.ts +0 -1
- package/dist/ui/link.d.ts +0 -1
- package/dist/ui/link.js +1 -1
- package/dist/ui/menubar.d.ts +1 -2
- package/dist/ui/menubar.js +64 -64
- package/dist/ui/navigation-menu.d.ts +1 -2
- package/dist/ui/navigation-menu.js +67 -67
- package/dist/ui/number-input.d.ts +1 -2
- package/dist/ui/oauth-button/index.d.ts +1 -2
- package/dist/ui/oauth-button/oauth-button.d.ts +2 -3
- package/dist/ui/pagination.d.ts +0 -1
- package/dist/ui/pagination.js +1 -1
- package/dist/ui/popover.d.ts +1 -2
- package/dist/ui/progress-ring.d.ts +0 -1
- package/dist/ui/progress.d.ts +1 -2
- package/dist/ui/progress.js +30 -30
- package/dist/ui/radio.d.ts +2 -3
- package/dist/ui/radio.js +18 -18
- package/dist/ui/search-input.d.ts +0 -1
- package/dist/ui/segmented-control.d.ts +1 -2
- package/dist/ui/select.d.ts +1 -2
- package/dist/ui/select.js +55 -55
- package/dist/ui/separator.d.ts +1 -2
- package/dist/ui/separator.js +5 -5
- package/dist/ui/sheet.d.ts +1 -2
- package/dist/ui/sheet.js +45 -45
- package/dist/ui/sidebar.d.ts +4 -5
- package/dist/ui/sidebar.js +1 -1
- package/dist/ui/slider.d.ts +1 -2
- package/dist/ui/slider.js +14 -14
- package/dist/ui/spinner.d.ts +0 -1
- package/dist/ui/spinner.d.ts.map +1 -1
- package/dist/ui/spinner.js +50 -44
- package/dist/ui/spinner.js.map +1 -1
- package/dist/ui/split-button.d.ts +14 -4
- package/dist/ui/split-button.d.ts.map +1 -1
- package/dist/ui/split-button.js.map +1 -1
- package/dist/ui/stat-card.d.ts +3 -4
- package/dist/ui/stat-flash.d.ts +1 -2
- package/dist/ui/stepper.d.ts +1 -2
- package/dist/ui/surface.js +1 -1
- package/dist/ui/switch.d.ts +2 -3
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +31 -31
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/table-row-link.d.ts +0 -1
- package/dist/ui/table.js +1 -1
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/tabs.d.ts +1 -2
- package/dist/ui/tabs.js +35 -35
- package/dist/ui/textarea.d.ts +1 -2
- package/dist/ui/toast-registry.d.ts +0 -1
- package/dist/ui/toast-types.js +1 -0
- package/dist/ui/toast.d.ts +2 -3
- package/dist/ui/toaster.d.ts +0 -1
- package/dist/ui/toggle-group.d.ts +2 -3
- package/dist/ui/toggle-group.js +14 -14
- package/dist/ui/toggle.d.ts +1 -2
- package/dist/ui/toggle.js +12 -12
- package/dist/ui/tooltip.d.ts +1 -2
- package/dist/ui/tooltip.js +21 -21
- package/dist/ui/tree-view/index.d.ts +3 -4
- package/dist/ui/tree-view/tree-item.d.ts +1 -2
- package/dist/ui/tree-view/tree-view.d.ts +1 -2
- package/dist/ui/tree-view/use-tree.d.ts +1 -2
- package/dist/ui/truncated-text.d.ts +0 -1
- package/docs/components/composed/bulk-action-bar.md +9 -3
- package/docs/components/composed/error-boundary.md +18 -2
- package/docs/components/composed/master-detail.md +12 -2
- package/docs/components/composed/page-skeletons.md +2 -2
- package/docs/components/composed/rich-chat-input.md +18 -6
- package/docs/components/composed/simple-tooltip.md +1 -1
- package/docs/components/shell/app-command-palette.md +2 -1
- package/docs/components/shell/bottom-navbar.md +4 -4
- package/docs/components/shell/command-registry.md +2 -2
- package/docs/components/shell/link-context.md +2 -2
- package/docs/components/shell/top-bar.md +1 -1
- package/docs/components/ui/search-input.md +2 -2
- package/docs/components/ui/slider.md +2 -2
- package/docs/components/ui/split-button.md +3 -3
- package/docs/recipes/install-astro.md +2 -0
- package/docs/recipes/install-next-app-router.md +2 -0
- package/docs/recipes/install-remix.md +2 -0
- package/docs/recipes/install-tanstack-start.md +2 -0
- package/docs/recipes/install-vite.md +2 -0
- package/docs/recipes/troubleshoot.md +80 -0
- package/llms.txt +2 -2
- package/make-kit/Guidelines.md +1 -1
- package/make-kit/components/overview.md +2 -2
- package/make-kit/foundations/surfaces.md +1 -1
- package/mcp-manifest.json +411 -147
- package/package.json +30 -10
- package/skill/SKILL.md +1 -1
- package/skill/chat-skill/README.md +18 -0
- package/skill/chat-skill/SKILL.md +78 -0
- package/skill/chat-skill/chatgpt-instructions.md +26 -0
- package/skill/chat-skill/gemini-instructions.md +25 -0
- package/skill/references/components.md +2 -2
- package/skill/references/setup-astro.md +2 -0
- package/skill/references/setup-next-app-router.md +2 -0
- package/skill/references/setup-remix.md +2 -0
- package/skill/references/setup-tanstack-start.md +2 -0
- package/skill/references/setup-vite.md +2 -0
- package/skill/references/troubleshoot.md +80 -0
- package/dist/_chunks/primitives.js +0 -7596
- package/dist/_chunks/primitives.js.map +0 -1
- package/dist/shell/sidebar.d.ts +0 -113
- package/dist/shell/sidebar.d.ts.map +0 -1
- package/dist/shell/sidebar.js +0 -293
- package/dist/shell/sidebar.js.map +0 -1
- package/docs/components/shell/sidebar.md +0 -103
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload.js","names":[],"sources":["../../src/ui/file-upload.tsx"],"sourcesContent":["'use client'\n\nimport { IconCheck,IconPaperclip, IconUpload } from '@tabler/icons-react'\nimport { AnimatePresence,motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { Icon } from './icon'\nimport { durations,springs, tweens } from './lib/motion'\nimport { cn } from './lib/utils'\nimport { Spinner } from './spinner'\n\n/**\n * Props for FileUpload — a drag-and-drop file picker with client-side validation (type + size),\n * an upload progress bar, and a compact inline mode.\n *\n * **Two modes:**\n * - Default: large drop zone with an upload icon, label, and sublabel — good for primary upload areas.\n * - `compact={true}`: a small inline button with an attachment icon — good for secondary/inline uploads.\n *\n * **Validation:** Pass `accept` (MIME or extension) and `maxSize` (bytes). Errors are shown inline.\n * The `onFiles` callback only fires with valid files — invalid files are rejected with an error message.\n *\n * **`onFiles` required:** This is the only required prop. Integrating with a real uploader means\n * calling your upload API from this callback and driving `uploading` + `progress` externally.\n *\n * @example\n * // Avatar upload with image-only restriction:\n * <FileUpload\n * accept=\"image/*\"\n * maxSize={2 * 1024 * 1024}\n * onFiles={(files) => uploadAvatar(files[0])}\n * label=\"Upload profile photo\"\n * sublabel=\"PNG, JPG up to 2MB\"\n * />\n *\n * @example\n * // Document multi-upload with progress:\n * <FileUpload\n * multiple\n * accept=\".pdf,.doc,.docx\"\n * uploading={isUploading}\n * progress={uploadPercent}\n * onFiles={handleFiles}\n * />\n *\n * @example\n * // Compact inline attachment button in a comment form:\n * <FileUpload compact onFiles={(files) => attachFiles(files)} label=\"Attach files\" />\n * // These are just a few ways — feel free to combine props creatively!\n */\nexport interface FileUploadProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onError'> {\n /** Accepted file types (e.g., \"image/*\", \".pdf,.doc\") */\n accept?: string\n /** Max file size in bytes (default: 10MB) */\n maxSize?: number\n /** Allow multiple files */\n multiple?: boolean\n /** Currently uploading */\n uploading?: boolean\n /** Upload progress (0-100) */\n progress?: number\n /** Callback when files are selected/dropped */\n onFiles: (files: File[]) => void\n /** Error message to display */\n error?: string\n /** Compact mode (inline button instead of drop zone) */\n compact?: boolean\n /** Disabled */\n disabled?: boolean\n /** Custom label */\n label?: string\n /** Custom sublabel */\n sublabel?: string\n}\n\nconst DEFAULT_MAX_SIZE = 10 * 1024 * 1024 // 10MB\n\nfunction fileMatchesAccept(file: File, accept: string): boolean {\n return accept\n .split(',')\n .map((t) => t.trim())\n .some((type) => {\n if (type.startsWith('.'))\n return file.name.toLowerCase().endsWith(type.toLowerCase())\n if (type.endsWith('/*'))\n return file.type.startsWith(type.slice(0, type.indexOf('/') + 1))\n return file.type === type\n })\n}\n\nfunction formatBytes(bytes: number): string {\n if (bytes < 1024) return `${bytes} B`\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`\n}\n\nconst FileUpload = React.forwardRef<HTMLDivElement, FileUploadProps>(\n (\n {\n accept,\n maxSize = DEFAULT_MAX_SIZE,\n multiple = false,\n uploading = false,\n progress = 0,\n onFiles,\n error,\n compact = false,\n disabled = false,\n className,\n label,\n sublabel,\n ...props\n },\n ref,\n ) => {\n const inputRef = React.useRef<HTMLInputElement>(null)\n const [isDragActive, setIsDragActive] = React.useState(false)\n const [validationError, setValidationError] = React.useState<string | null>(\n null,\n )\n // Track whether a file dialog was opened, so we can detect when the\n // browser (or testing library) filters out all files via the accept attribute\n const dialogOpenRef = React.useRef(false)\n const filesAcceptedRef = React.useRef(false)\n\n const displayError = error || validationError\n\n const openPicker = React.useCallback(() => {\n if (disabled || uploading) return\n inputRef.current?.click()\n }, [disabled, uploading])\n\n const validateAndEmit = React.useCallback(\n (files: File[]) => {\n setValidationError(null)\n\n for (const file of files) {\n if (file.size > maxSize) {\n setValidationError(\n `File \"${file.name}\" exceeds the maximum size of ${formatBytes(maxSize)}`,\n )\n return\n }\n if (accept && !fileMatchesAccept(file, accept)) {\n setValidationError(\n `File \"${file.name}\" is not an accepted file type`,\n )\n return\n }\n }\n\n onFiles(files)\n },\n [maxSize, accept, onFiles],\n )\n\n const handleInputChange = React.useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n filesAcceptedRef.current = true\n const fileList = e.target.files\n if (!fileList || fileList.length === 0) return\n validateAndEmit(Array.from(fileList))\n // Reset input value so the same file can be selected again\n e.target.value = ''\n },\n [validateAndEmit],\n )\n\n // When the file input is clicked, the browser opens a dialog and blurs the input.\n // We track this to detect when the dialog closes without selecting valid files.\n const handleInputClick = React.useCallback(() => {\n dialogOpenRef.current = true\n filesAcceptedRef.current = false\n }, [])\n\n // After the file dialog closes, the browser re-focuses the input.\n // If no files were accepted (e.g., the browser/test library filtered by accept),\n // and the accept prop is set, show a validation error.\n const handleInputFocus = React.useCallback(() => {\n if (dialogOpenRef.current && !filesAcceptedRef.current && accept) {\n setValidationError('File type is not accepted')\n }\n dialogOpenRef.current = false\n }, [accept])\n\n const handleDragEnter = React.useCallback(\n (e: React.DragEvent<HTMLDivElement>) => {\n e.preventDefault()\n e.stopPropagation()\n if (!disabled && !uploading) {\n setIsDragActive(true)\n }\n },\n [disabled, uploading],\n )\n\n const handleDragOver = React.useCallback(\n (e: React.DragEvent<HTMLDivElement>) => {\n e.preventDefault()\n e.stopPropagation()\n if (!disabled && !uploading) {\n setIsDragActive(true)\n }\n },\n [disabled, uploading],\n )\n\n const handleDragLeave = React.useCallback(\n (e: React.DragEvent<HTMLDivElement>) => {\n e.preventDefault()\n e.stopPropagation()\n setIsDragActive(false)\n },\n [],\n )\n\n const handleDrop = React.useCallback(\n (e: React.DragEvent<HTMLDivElement>) => {\n e.preventDefault()\n e.stopPropagation()\n setIsDragActive(false)\n\n if (disabled || uploading) return\n\n const fileList = e.dataTransfer.files\n if (!fileList || fileList.length === 0) return\n validateAndEmit(Array.from(fileList))\n },\n [disabled, uploading, validateAndEmit],\n )\n\n const defaultLabel = label ?? 'Drop files here or click to browse'\n const defaultSublabel = sublabel ?? `Max file size: ${formatBytes(maxSize)}`\n const inputId = React.useId()\n\n if (compact) {\n return (\n <div ref={ref} className={cn('inline-flex flex-col', className)} {...props}>\n <button\n type=\"button\"\n onClick={openPicker}\n disabled={disabled}\n className={cn(\n 'inline-flex items-center gap-ds-02 rounded-control px-ds-03 py-ds-02',\n 'text-body-sm font-medium',\n 'border border-surface-border-strong',\n 'bg-surface-raised-hover text-surface-fg-muted',\n 'hover:bg-accent-2',\n 'disabled:opacity-action-disabled disabled:cursor-not-allowed',\n 'transition-colors',\n )}\n >\n {uploading ? (\n <Spinner size=\"sm\" />\n ) : (\n <Icon icon={IconPaperclip} size=\"sm\" />\n )}\n {label ?? 'Attach files'}\n </button>\n <input\n ref={inputRef}\n id={inputId}\n type=\"file\"\n className=\"sr-only\"\n style={{ visibility: 'hidden' }}\n aria-hidden=\"true\"\n aria-label={label ?? 'Attach files'}\n accept={accept}\n multiple={multiple}\n disabled={disabled}\n onChange={handleInputChange}\n onClick={handleInputClick}\n onFocus={handleInputFocus}\n tabIndex={-1}\n />\n {displayError && (\n <p\n role=\"alert\"\n aria-live=\"polite\"\n className=\"mt-ds-02 text-body-xs text-error-11\"\n >\n {displayError}\n </p>\n )}\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n {...props}\n role=\"presentation\"\n className={cn('flex flex-col', className)}\n data-drag-active={isDragActive ? 'true' : undefined}\n onDragEnter={handleDragEnter}\n onDragOver={handleDragOver}\n onDragLeave={handleDragLeave}\n onDrop={handleDrop}\n >\n <motion.div\n role=\"button\"\n tabIndex={0}\n aria-disabled={disabled || undefined}\n onClick={disabled ? undefined : openPicker}\n onKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {\n if (!disabled && (e.key === 'Enter' || e.key === ' ')) {\n e.preventDefault()\n openPicker()\n }\n }}\n className={cn(\n 'flex flex-col items-center justify-center gap-ds-03 rounded-surface',\n 'border-2 border-dashed p-ds-08',\n 'cursor-pointer',\n 'border-surface-border-strong bg-surface-raised-hover',\n isDragActive &&\n 'border-accent-7 bg-accent-2',\n disabled && 'opacity-action-disabled cursor-not-allowed',\n )}\n animate={{\n scale: isDragActive ? 1.02 : 1,\n }}\n transition={springs.snappy}\n >\n {/* Icon — animates between upload ↔ spinner ↔ checkmark */}\n <AnimatePresence mode=\"wait\">\n {uploading ? (\n <motion.div\n key=\"spinner\"\n initial={{ opacity: 0, scale: 0.5 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.5 }}\n transition={tweens.fade}\n >\n <Spinner size=\"md\" />\n </motion.div>\n ) : progress === 100 && !error ? (\n <motion.div\n key=\"complete\"\n initial={{ opacity: 0, scale: 0.5 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.5 }}\n transition={springs.bouncy}\n >\n <Icon icon={IconCheck} size=\"2xl\" className=\"text-success-11\" />\n </motion.div>\n ) : (\n <motion.div\n key=\"upload\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={tweens.fade}\n >\n <Icon icon={IconUpload} size=\"2xl\" className=\"text-surface-fg-subtle\" />\n </motion.div>\n )}\n </AnimatePresence>\n <span id={inputId + '-label'} className=\"text-body-sm text-surface-fg-muted\">\n {defaultLabel}\n </span>\n {uploading ? (\n <div className=\"w-full max-w-xs\">\n <div\n role=\"progressbar\"\n aria-valuenow={progress}\n aria-valuemin={0}\n aria-valuemax={100}\n className=\"h-2 w-full overflow-hidden rounded-pill bg-surface-raised-hover\"\n >\n <motion.div\n className=\"h-full rounded-pill bg-accent-9\"\n animate={{ width: `${progress}%` }}\n transition={springs.smooth}\n />\n </div>\n </div>\n ) : (\n <span className=\"text-caption text-surface-fg-subtle\">\n {defaultSublabel}\n </span>\n )}\n </motion.div>\n <input\n ref={inputRef}\n id={inputId}\n type=\"file\"\n className=\"sr-only\"\n style={{ visibility: 'hidden' }}\n aria-hidden=\"true\"\n aria-label={defaultLabel}\n accept={accept}\n multiple={multiple}\n disabled={disabled}\n onChange={handleInputChange}\n onClick={handleInputClick}\n onFocus={handleInputFocus}\n tabIndex={-1}\n />\n {/* Error message with shake animation */}\n <AnimatePresence>\n {displayError && (\n <motion.p\n role=\"alert\"\n className=\"mt-ds-02 text-body-xs text-error-11\"\n initial={{ opacity: 0, x: 0 }}\n animate={{ opacity: 1, x: [0, -4, 4, -4, 4, 0] }}\n exit={{ opacity: 0 }}\n transition={{ opacity: tweens.fade, x: { type: 'tween', duration: durations.slow01, ease: 'easeOut' } }}\n >\n {displayError}\n </motion.p>\n )}\n </AnimatePresence>\n </div>\n )\n },\n)\nFileUpload.displayName = 'FileUpload'\n\nexport { FileUpload }\n"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ACV,OAAO,EAAE,YAAY,SAAS;IAC9B,eAAY;IACZ,cAAY;IACJ;IACE;IACA;IACV,UAAU;IACV,SAAS;IACT,SAAS;IACT,UAAU;GACX,CAAA;GAED,kBAAC,GAAD,EAAA,UACG,KACC,kBAAC,EAAO,GAAR;IACE,MAAK;IACL,WAAU;IACV,SAAS;KAAE,SAAS;KAAG,GAAG;IAAE;IAC5B,SAAS;KAAE,SAAS;KAAG,GAAG;MAAC;MAAG;MAAI;MAAG;MAAI;MAAG;KAAC;IAAE;IAC/C,MAAM,EAAE,SAAS,EAAE;IACnB,YAAY;KAAE,SAAS,EAAO;KAAM,GAAG;MAAE,MAAM;MAAS,UAAU,EAAU;MAAQ,MAAM;KAAU;IAAE;cAErG;GACO,CAAA,EAEG,CAAA;EACd;;AAET,CACF;AACA,EAAW,cAAc"}
|
|
1
|
+
{"version":3,"file":"file-upload.js","names":[],"sources":["../../src/ui/file-upload.tsx"],"sourcesContent":["'use client'\n\nimport { IconCheck,IconPaperclip, IconUpload } from '@tabler/icons-react'\nimport { AnimatePresence,motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { Icon } from './icon'\nimport { springs, tweens } from './lib/motion'\nimport { cn } from './lib/utils'\nimport { Spinner } from './spinner'\n\n/**\n * Props for FileUpload — a drag-and-drop file picker with client-side validation (type + size),\n * an upload progress bar, and a compact inline mode.\n *\n * **Two modes:**\n * - Default: large drop zone with an upload icon, label, and sublabel — good for primary upload areas.\n * - `compact={true}`: a small inline button with an attachment icon — good for secondary/inline uploads.\n *\n * **Validation:** Pass `accept` (MIME or extension) and `maxSize` (bytes). Errors are shown inline.\n * The `onFiles` callback only fires with valid files — invalid files are rejected with an error message.\n *\n * **`onFiles` required:** This is the only required prop. Integrating with a real uploader means\n * calling your upload API from this callback and driving `uploading` + `progress` externally.\n *\n * @example\n * // Avatar upload with image-only restriction:\n * <FileUpload\n * accept=\"image/*\"\n * maxSize={2 * 1024 * 1024}\n * onFiles={(files) => uploadAvatar(files[0])}\n * label=\"Upload profile photo\"\n * sublabel=\"PNG, JPG up to 2MB\"\n * />\n *\n * @example\n * // Document multi-upload with progress:\n * <FileUpload\n * multiple\n * accept=\".pdf,.doc,.docx\"\n * uploading={isUploading}\n * progress={uploadPercent}\n * onFiles={handleFiles}\n * />\n *\n * @example\n * // Compact inline attachment button in a comment form:\n * <FileUpload compact onFiles={(files) => attachFiles(files)} label=\"Attach files\" />\n * // These are just a few ways — feel free to combine props creatively!\n */\nexport interface FileUploadProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onError'> {\n /** Accepted file types (e.g., \"image/*\", \".pdf,.doc\") */\n accept?: string\n /** Max file size in bytes (default: 10MB) */\n maxSize?: number\n /** Allow multiple files */\n multiple?: boolean\n /** Currently uploading */\n uploading?: boolean\n /** Upload progress (0-100) */\n progress?: number\n /** Callback when files are selected/dropped */\n onFiles: (files: File[]) => void\n /** Error message to display */\n error?: string\n /** Compact mode (inline button instead of drop zone) */\n compact?: boolean\n /** Disabled */\n disabled?: boolean\n /** Custom label */\n label?: string\n /** Custom sublabel */\n sublabel?: string\n}\n\nconst DEFAULT_MAX_SIZE = 10 * 1024 * 1024 // 10MB\n\nfunction fileMatchesAccept(file: File, accept: string): boolean {\n return accept\n .split(',')\n .map((t) => t.trim())\n .some((type) => {\n if (type.startsWith('.'))\n return file.name.toLowerCase().endsWith(type.toLowerCase())\n if (type.endsWith('/*'))\n return file.type.startsWith(type.slice(0, type.indexOf('/') + 1))\n return file.type === type\n })\n}\n\nfunction formatBytes(bytes: number): string {\n if (bytes < 1024) return `${bytes} B`\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`\n}\n\nconst FileUpload = React.forwardRef<HTMLDivElement, FileUploadProps>(\n (\n {\n accept,\n maxSize = DEFAULT_MAX_SIZE,\n multiple = false,\n uploading = false,\n progress = 0,\n onFiles,\n error,\n compact = false,\n disabled = false,\n className,\n label,\n sublabel,\n ...props\n },\n ref,\n ) => {\n const inputRef = React.useRef<HTMLInputElement>(null)\n const [isDragActive, setIsDragActive] = React.useState(false)\n const [validationError, setValidationError] = React.useState<string | null>(\n null,\n )\n // Track whether a file dialog was opened, so we can detect when the\n // browser (or testing library) filters out all files via the accept attribute\n const dialogOpenRef = React.useRef(false)\n const filesAcceptedRef = React.useRef(false)\n\n const displayError = error || validationError\n\n const openPicker = React.useCallback(() => {\n if (disabled || uploading) return\n inputRef.current?.click()\n }, [disabled, uploading])\n\n const validateAndEmit = React.useCallback(\n (files: File[]) => {\n setValidationError(null)\n\n for (const file of files) {\n if (file.size > maxSize) {\n setValidationError(\n `File \"${file.name}\" exceeds the maximum size of ${formatBytes(maxSize)}`,\n )\n return\n }\n if (accept && !fileMatchesAccept(file, accept)) {\n setValidationError(\n `File \"${file.name}\" is not an accepted file type`,\n )\n return\n }\n }\n\n onFiles(files)\n },\n [maxSize, accept, onFiles],\n )\n\n const handleInputChange = React.useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n filesAcceptedRef.current = true\n const fileList = e.target.files\n if (!fileList || fileList.length === 0) return\n validateAndEmit(Array.from(fileList))\n // Reset input value so the same file can be selected again\n e.target.value = ''\n },\n [validateAndEmit],\n )\n\n // When the file input is clicked, the browser opens a dialog and blurs the input.\n // We track this to detect when the dialog closes without selecting valid files.\n const handleInputClick = React.useCallback(() => {\n dialogOpenRef.current = true\n filesAcceptedRef.current = false\n }, [])\n\n // After the file dialog closes, the browser re-focuses the input.\n // If no files were accepted (e.g., the browser/test library filtered by accept),\n // and the accept prop is set, show a validation error.\n const handleInputFocus = React.useCallback(() => {\n if (dialogOpenRef.current && !filesAcceptedRef.current && accept) {\n setValidationError('File type is not accepted')\n }\n dialogOpenRef.current = false\n }, [accept])\n\n const handleDragEnter = React.useCallback(\n (e: React.DragEvent<HTMLDivElement>) => {\n e.preventDefault()\n e.stopPropagation()\n if (!disabled && !uploading) {\n setIsDragActive(true)\n }\n },\n [disabled, uploading],\n )\n\n const handleDragOver = React.useCallback(\n (e: React.DragEvent<HTMLDivElement>) => {\n e.preventDefault()\n e.stopPropagation()\n if (!disabled && !uploading) {\n setIsDragActive(true)\n }\n },\n [disabled, uploading],\n )\n\n const handleDragLeave = React.useCallback(\n (e: React.DragEvent<HTMLDivElement>) => {\n e.preventDefault()\n e.stopPropagation()\n setIsDragActive(false)\n },\n [],\n )\n\n const handleDrop = React.useCallback(\n (e: React.DragEvent<HTMLDivElement>) => {\n e.preventDefault()\n e.stopPropagation()\n setIsDragActive(false)\n\n if (disabled || uploading) return\n\n const fileList = e.dataTransfer.files\n if (!fileList || fileList.length === 0) return\n validateAndEmit(Array.from(fileList))\n },\n [disabled, uploading, validateAndEmit],\n )\n\n const defaultLabel = label ?? 'Drop files here or click to browse'\n const defaultSublabel = sublabel ?? `Max file size: ${formatBytes(maxSize)}`\n const inputId = React.useId()\n\n if (compact) {\n return (\n <div ref={ref} className={cn('inline-flex flex-col', className)} {...props}>\n <button\n type=\"button\"\n onClick={openPicker}\n disabled={disabled}\n className={cn(\n 'inline-flex items-center gap-ds-02 rounded-control px-ds-03 py-ds-02',\n 'text-body-sm font-medium',\n 'border border-surface-border-strong',\n 'bg-surface-raised-hover text-surface-fg-muted',\n 'hover:bg-accent-2',\n 'disabled:opacity-action-disabled disabled:cursor-not-allowed',\n 'transition-colors',\n )}\n >\n {uploading ? (\n <Spinner size=\"sm\" />\n ) : (\n <Icon icon={IconPaperclip} size=\"sm\" />\n )}\n {label ?? 'Attach files'}\n </button>\n <input\n ref={inputRef}\n id={inputId}\n type=\"file\"\n className=\"sr-only\"\n style={{ visibility: 'hidden' }}\n aria-hidden=\"true\"\n aria-label={label ?? 'Attach files'}\n accept={accept}\n multiple={multiple}\n disabled={disabled}\n onChange={handleInputChange}\n onClick={handleInputClick}\n onFocus={handleInputFocus}\n tabIndex={-1}\n />\n {displayError && (\n <p\n role=\"alert\"\n aria-live=\"polite\"\n className=\"mt-ds-02 text-body-xs text-error-11\"\n >\n {displayError}\n </p>\n )}\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n {...props}\n role=\"presentation\"\n className={cn('flex flex-col', className)}\n data-drag-active={isDragActive ? 'true' : undefined}\n onDragEnter={handleDragEnter}\n onDragOver={handleDragOver}\n onDragLeave={handleDragLeave}\n onDrop={handleDrop}\n >\n <motion.div\n role=\"button\"\n tabIndex={disabled ? -1 : 0}\n aria-disabled={disabled || undefined}\n onClick={disabled ? undefined : openPicker}\n onKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {\n if (!disabled && (e.key === 'Enter' || e.key === ' ')) {\n e.preventDefault()\n openPicker()\n }\n }}\n className={cn(\n 'flex flex-col items-center justify-center gap-ds-03 rounded-surface',\n 'border-2 border-dashed p-ds-08',\n 'focus-ring transition-colors duration-fast-02 ease-productive-standard',\n // Rest on the canvas fill; reserve the hover token for actual hover.\n 'border-surface-border-strong bg-surface-base',\n disabled ? 'cursor-not-allowed opacity-action-disabled' : 'cursor-pointer hover:bg-surface-raised-hover',\n isDragActive && 'border-accent-7 bg-accent-2',\n )}\n animate={{\n scale: isDragActive ? 1.02 : 1,\n }}\n transition={springs.snappy}\n >\n {/* Icon — animates between upload ↔ spinner ↔ checkmark */}\n <AnimatePresence mode=\"wait\">\n {uploading ? (\n <motion.div\n key=\"spinner\"\n initial={{ opacity: 0, scale: 0.5 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.5 }}\n transition={tweens.fade}\n >\n <Spinner size=\"md\" />\n </motion.div>\n ) : progress === 100 && !error ? (\n <motion.div\n key=\"complete\"\n initial={{ opacity: 0, scale: 0.5 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.5 }}\n transition={springs.bouncy}\n >\n <Icon icon={IconCheck} size=\"2xl\" className=\"text-success-11\" />\n </motion.div>\n ) : (\n <motion.div\n key=\"upload\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={tweens.fade}\n >\n <Icon icon={IconUpload} size=\"2xl\" className=\"text-surface-fg-subtle\" />\n </motion.div>\n )}\n </AnimatePresence>\n <span id={inputId + '-label'} className=\"text-body-sm text-surface-fg-muted\">\n {defaultLabel}\n </span>\n {uploading ? (\n <div className=\"w-full max-w-xs\">\n <div\n role=\"progressbar\"\n aria-valuenow={progress}\n aria-valuemin={0}\n aria-valuemax={100}\n className=\"h-2 w-full overflow-hidden rounded-pill bg-surface-raised-hover\"\n >\n <motion.div\n // scaleX (compositor-only) not width (layout) → smooth + honored by reduced-motion.\n className=\"h-full w-full origin-left rounded-pill bg-accent-9\"\n animate={{ scaleX: Math.max(0, Math.min(100, progress)) / 100 }}\n transition={springs.smooth}\n />\n </div>\n </div>\n ) : (\n <span className=\"text-caption text-surface-fg-subtle\">\n {defaultSublabel}\n </span>\n )}\n </motion.div>\n <input\n ref={inputRef}\n id={inputId}\n type=\"file\"\n className=\"sr-only\"\n style={{ visibility: 'hidden' }}\n aria-hidden=\"true\"\n aria-label={defaultLabel}\n accept={accept}\n multiple={multiple}\n disabled={disabled}\n onChange={handleInputChange}\n onClick={handleInputClick}\n onFocus={handleInputFocus}\n tabIndex={-1}\n />\n {/* Error message — a calm fade/slide in (no decorative shake). */}\n <AnimatePresence>\n {displayError && (\n <motion.p\n role=\"alert\"\n className=\"mt-ds-02 text-body-xs text-error-11\"\n initial={{ opacity: 0, y: -2 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0 }}\n transition={tweens.fade}\n >\n {displayError}\n </motion.p>\n )}\n </AnimatePresence>\n </div>\n )\n },\n)\nFileUpload.displayName = 'FileUpload'\n\nexport { FileUpload }\n"],"mappings":";;;;;;;;;;AA4EA,IAAM,IAAmB,KAAK,OAAO;AAErC,SAAS,EAAkB,GAAY,GAAyB;CAC9D,OAAO,EACJ,MAAM,GAAG,CAAC,CACV,KAAK,MAAM,EAAE,KAAK,CAAC,CAAC,CACpB,MAAM,MACD,EAAK,WAAW,GAAG,IAC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GAED,kBAAC,GAAD,EAAA,UACG,KACC,kBAAC,EAAO,GAAR;IACE,MAAK;IACL,WAAU;IACV,SAAS;KAAE,SAAS;KAAG,GAAG;IAAG;IAC7B,SAAS;KAAE,SAAS;KAAG,GAAG;IAAE;IAC5B,MAAM,EAAE,SAAS,EAAE;IACnB,YAAY,EAAO;cAElB;GACO,CAAA,EAEG,CAAA;EACd;;AAET,CACF;AACA,EAAW,cAAc"}
|
package/dist/ui/form.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
export type FormHelperState = 'helper' | 'error' | 'warning' | 'success';
|
|
4
3
|
interface FormFieldContextValue {
|
|
@@ -6,6 +5,13 @@ interface FormFieldContextValue {
|
|
|
6
5
|
helperTextId?: string;
|
|
7
6
|
/** Auto-generated id shared between Label (htmlFor) and the field input (id). */
|
|
8
7
|
inputId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Auto-generated id of the Label itself. Non-labellable controls (e.g. the
|
|
10
|
+
* Combobox trigger, a `div[role=combobox]`, which `<label htmlFor>` can't target)
|
|
11
|
+
* reference this via `aria-labelledby` to still adopt the visible label as their
|
|
12
|
+
* accessible name.
|
|
13
|
+
*/
|
|
14
|
+
labelId?: string;
|
|
9
15
|
required?: boolean;
|
|
10
16
|
}
|
|
11
17
|
declare const FormFieldContext: React.Context<FormFieldContextValue>;
|
package/dist/ui/form.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/ui/form.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAExE,UAAU,qBAAqB;IAC7B,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,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A;CACnB;AAED,QAAA,MAAM,SAAS,uFAuBd,CAAA;AAMD,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;IACrF,KAAK,CAAC,EAAE,eAAe,CAAA;CACxB;AASD,QAAA,MAAM,cAAc,kGAoBnB,CAAA;AAGD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,IAAI,qBAAqB,CAEpD;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAA"}
|
package/dist/ui/form.js
CHANGED
|
@@ -6,19 +6,21 @@ import { jsx as i } from "react/jsx-runtime";
|
|
|
6
6
|
import { motion as a } from "framer-motion";
|
|
7
7
|
//#region src/ui/form.tsx
|
|
8
8
|
var o = r.createContext({}), s = r.forwardRef(({ className: e, helperTextId: t, inputId: a, state: s = "helper", required: c, children: l, ...u }, d) => {
|
|
9
|
-
let f = r.useId(), p = t || `${f}-helper`, m = a || `${f}-input`, h = r.useMemo(() => ({
|
|
9
|
+
let f = r.useId(), p = t || `${f}-helper`, m = a || `${f}-input`, h = `${m}-label`, g = r.useMemo(() => ({
|
|
10
10
|
state: s,
|
|
11
11
|
helperTextId: p,
|
|
12
12
|
inputId: m,
|
|
13
|
+
labelId: h,
|
|
13
14
|
required: c
|
|
14
15
|
}), [
|
|
15
16
|
s,
|
|
16
17
|
p,
|
|
17
18
|
m,
|
|
19
|
+
h,
|
|
18
20
|
c
|
|
19
21
|
]);
|
|
20
22
|
return /* @__PURE__ */ i(o.Provider, {
|
|
21
|
-
value:
|
|
23
|
+
value: g,
|
|
22
24
|
children: /* @__PURE__ */ i("div", {
|
|
23
25
|
ref: d,
|
|
24
26
|
className: n("flex flex-col gap-ds-02", e),
|
package/dist/ui/form.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","names":[],"sources":["../../src/ui/form.tsx"],"sourcesContent":["'use client'\n\nimport { motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { motionProps, tweens } from './lib/motion'\nimport { cn } from './lib/utils'\n\nexport type FormHelperState = 'helper' | 'error' | 'warning' | 'success'\n\ninterface FormFieldContextValue {\n state?: FormHelperState\n helperTextId?: string\n /** Auto-generated id shared between Label (htmlFor) and the field input (id). */\n inputId?: string\n required?: boolean\n}\nconst FormFieldContext = React.createContext<FormFieldContextValue>({})\n\n/**\n * FormField — vertical flex container that provides validation state and\n * aria-describedby wiring to children via React context.\n *\n * **Automatic a11y wiring:** FormField generates a stable ID (or uses a provided `helperTextId`)\n * and passes it to `FormHelperText` via context. Use the `useFormField()` hook in custom inputs\n * to read `{ state, helperTextId, required }` and spread onto your input element.\n *\n * @example\n * <FormField state=\"error\">\n * <Label htmlFor=\"email\">Email</Label>\n * <Input id=\"email\" state=\"error\" />\n * <FormHelperText>Please enter a valid email address.</FormHelperText>\n * </FormField>\n */\nexport interface FormFieldProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Custom ID for the helper text element. If omitted, an auto-generated ID is used.\n * Pass this to `useFormField()` consumers that need to set `aria-describedby`.\n */\n helperTextId?: string\n /**\n * Custom ID for the field input element. If omitted, an auto-generated ID is used.\n * Label (when inside FormField) reads this via `htmlFor`; Input reads it via `id`.\n * Explicit `htmlFor` / `id` props on children always win.\n */\n inputId?: string\n /** Current validation state — propagated to child `FormHelperText` via context */\n state?: FormHelperState\n /** Whether the field is required — available to children via `useFormField()` */\n required?: boolean\n}\n\nconst FormField = React.forwardRef<HTMLDivElement, FormFieldProps>(\n ({ className, helperTextId, inputId, state = 'helper', required, children, ...props }, ref) => {\n const autoId = React.useId()\n const resolvedHelperId = helperTextId || `${autoId}-helper`\n const resolvedInputId = inputId || `${autoId}-input`\n const contextValue = React.useMemo(\n () => ({ state, helperTextId: resolvedHelperId, inputId: resolvedInputId, required }),\n [state, resolvedHelperId, resolvedInputId, required],\n )\n\n return (\n <FormFieldContext.Provider value={contextValue}>\n <div\n ref={ref}\n className={cn('flex flex-col gap-ds-02', className)}\n {...props}\n >\n {children}\n </div>\n </FormFieldContext.Provider>\n )\n },\n)\nFormField.displayName = 'FormField'\n\n// FormHelperText — small helper/error/warning/success message under a field\n//\n// When used for errors, set an `id` matching the input's `aria-describedby`.\nexport interface FormHelperTextProps extends React.HTMLAttributes<HTMLParagraphElement> {\n state?: FormHelperState\n}\n\nconst helperStateClasses: Record<FormHelperState, string> = {\n helper: 'text-surface-fg-subtle',\n error: 'text-error-11',\n warning: 'text-warning-11',\n success: 'text-success-11',\n}\n\nconst FormHelperText = React.forwardRef<HTMLParagraphElement, FormHelperTextProps>(\n ({ className, id: idProp, state: stateProp, ...props }, ref) => {\n const context = React.useContext(FormFieldContext)\n const state = stateProp ?? context.state ?? 'helper'\n const id = idProp ?? context.helperTextId\n\n return (\n <motion.p\n ref={ref}\n id={id}\n role={state === 'error' ? 'alert' : undefined}\n className={cn('text-body-sm', helperStateClasses[state], className)}\n initial={{ opacity: 0, y: -4 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: -4 }}\n transition={tweens.fade}\n {...motionProps(props)}\n />\n )\n },\n)\nFormHelperText.displayName = 'FormHelperText'\n\n/**\n * Hook to read FormField context — returns `{ state, helperTextId, required }`.\n * Use in custom input components to auto-wire `aria-describedby` and `aria-invalid`.\n *\n * @example\n * function MyCustomInput(props) {\n * const { state, helperTextId, required } = useFormField()\n * return (\n * <input\n * aria-describedby={helperTextId}\n * aria-invalid={state === 'error' || undefined}\n * aria-required={required}\n * {...props}\n * />\n * )\n * }\n */\nexport function useFormField(): FormFieldContextValue {\n return React.useContext(FormFieldContext)\n}\n\nexport { FormField, FormFieldContext, FormHelperText }\n"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"form.js","names":[],"sources":["../../src/ui/form.tsx"],"sourcesContent":["'use client'\n\nimport { motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { motionProps, tweens } from './lib/motion'\nimport { cn } from './lib/utils'\n\nexport type FormHelperState = 'helper' | 'error' | 'warning' | 'success'\n\ninterface FormFieldContextValue {\n state?: FormHelperState\n helperTextId?: string\n /** Auto-generated id shared between Label (htmlFor) and the field input (id). */\n inputId?: string\n /**\n * Auto-generated id of the Label itself. Non-labellable controls (e.g. the\n * Combobox trigger, a `div[role=combobox]`, which `<label htmlFor>` can't target)\n * reference this via `aria-labelledby` to still adopt the visible label as their\n * accessible name.\n */\n labelId?: string\n required?: boolean\n}\nconst FormFieldContext = React.createContext<FormFieldContextValue>({})\n\n/**\n * FormField — vertical flex container that provides validation state and\n * aria-describedby wiring to children via React context.\n *\n * **Automatic a11y wiring:** FormField generates a stable ID (or uses a provided `helperTextId`)\n * and passes it to `FormHelperText` via context. Use the `useFormField()` hook in custom inputs\n * to read `{ state, helperTextId, required }` and spread onto your input element.\n *\n * @example\n * <FormField state=\"error\">\n * <Label htmlFor=\"email\">Email</Label>\n * <Input id=\"email\" state=\"error\" />\n * <FormHelperText>Please enter a valid email address.</FormHelperText>\n * </FormField>\n */\nexport interface FormFieldProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Custom ID for the helper text element. If omitted, an auto-generated ID is used.\n * Pass this to `useFormField()` consumers that need to set `aria-describedby`.\n */\n helperTextId?: string\n /**\n * Custom ID for the field input element. If omitted, an auto-generated ID is used.\n * Label (when inside FormField) reads this via `htmlFor`; Input reads it via `id`.\n * Explicit `htmlFor` / `id` props on children always win.\n */\n inputId?: string\n /** Current validation state — propagated to child `FormHelperText` via context */\n state?: FormHelperState\n /** Whether the field is required — available to children via `useFormField()` */\n required?: boolean\n}\n\nconst FormField = React.forwardRef<HTMLDivElement, FormFieldProps>(\n ({ className, helperTextId, inputId, state = 'helper', required, children, ...props }, ref) => {\n const autoId = React.useId()\n const resolvedHelperId = helperTextId || `${autoId}-helper`\n const resolvedInputId = inputId || `${autoId}-input`\n const resolvedLabelId = `${resolvedInputId}-label`\n const contextValue = React.useMemo(\n () => ({ state, helperTextId: resolvedHelperId, inputId: resolvedInputId, labelId: resolvedLabelId, required }),\n [state, resolvedHelperId, resolvedInputId, resolvedLabelId, required],\n )\n\n return (\n <FormFieldContext.Provider value={contextValue}>\n <div\n ref={ref}\n className={cn('flex flex-col gap-ds-02', className)}\n {...props}\n >\n {children}\n </div>\n </FormFieldContext.Provider>\n )\n },\n)\nFormField.displayName = 'FormField'\n\n// FormHelperText — small helper/error/warning/success message under a field\n//\n// When used for errors, set an `id` matching the input's `aria-describedby`.\nexport interface FormHelperTextProps extends React.HTMLAttributes<HTMLParagraphElement> {\n state?: FormHelperState\n}\n\nconst helperStateClasses: Record<FormHelperState, string> = {\n helper: 'text-surface-fg-subtle',\n error: 'text-error-11',\n warning: 'text-warning-11',\n success: 'text-success-11',\n}\n\nconst FormHelperText = React.forwardRef<HTMLParagraphElement, FormHelperTextProps>(\n ({ className, id: idProp, state: stateProp, ...props }, ref) => {\n const context = React.useContext(FormFieldContext)\n const state = stateProp ?? context.state ?? 'helper'\n const id = idProp ?? context.helperTextId\n\n return (\n <motion.p\n ref={ref}\n id={id}\n role={state === 'error' ? 'alert' : undefined}\n className={cn('text-body-sm', helperStateClasses[state], className)}\n initial={{ opacity: 0, y: -4 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: -4 }}\n transition={tweens.fade}\n {...motionProps(props)}\n />\n )\n },\n)\nFormHelperText.displayName = 'FormHelperText'\n\n/**\n * Hook to read FormField context — returns `{ state, helperTextId, required }`.\n * Use in custom input components to auto-wire `aria-describedby` and `aria-invalid`.\n *\n * @example\n * function MyCustomInput(props) {\n * const { state, helperTextId, required } = useFormField()\n * return (\n * <input\n * aria-describedby={helperTextId}\n * aria-invalid={state === 'error' || undefined}\n * aria-required={required}\n * {...props}\n * />\n * )\n * }\n */\nexport function useFormField(): FormFieldContextValue {\n return React.useContext(FormFieldContext)\n}\n\nexport { FormField, FormFieldContext, FormHelperText }\n"],"mappings":";;;;;;;AAwBA,IAAM,IAAmB,EAAM,cAAqC,CAAC,CAAC,GAmChE,IAAY,EAA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@@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { springs as e, tweens as t } from "./lib/motion.js";
|
|
3
|
+
import { cn as n } from "./lib/utils.js";
|
|
4
|
+
import { Content2 as r, Portal as i, Root2 as a, Trigger as o } from "../_chunks/primitives/react-hover-card.js";
|
|
5
5
|
import * as s from "react";
|
|
6
6
|
import { jsx as c } from "react/jsx-runtime";
|
|
7
7
|
import { AnimatePresence as l, motion as u } from "framer-motion";
|
|
8
8
|
//#region src/ui/hover-card.tsx
|
|
9
|
-
var d = s.createContext(!1), f = ({ open: e, defaultOpen: t = !1, onOpenChange:
|
|
10
|
-
let [
|
|
11
|
-
l || o(e),
|
|
12
|
-
}, [l,
|
|
9
|
+
var d = s.createContext(!1), f = ({ open: e, defaultOpen: t = !1, onOpenChange: n, ...r }) => {
|
|
10
|
+
let [i, o] = s.useState(t), l = e !== void 0, u = l ? e : i, f = s.useCallback((e) => {
|
|
11
|
+
l || o(e), n?.(e);
|
|
12
|
+
}, [l, n]);
|
|
13
13
|
return /* @__PURE__ */ c(d.Provider, {
|
|
14
14
|
value: u,
|
|
15
|
-
children: /* @__PURE__ */ c(
|
|
15
|
+
children: /* @__PURE__ */ c(a, {
|
|
16
16
|
open: u,
|
|
17
17
|
onOpenChange: f,
|
|
18
|
-
...
|
|
18
|
+
...r
|
|
19
19
|
})
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
f.displayName = "HoverCard";
|
|
23
|
-
var p =
|
|
23
|
+
var p = o, m = s.forwardRef(({ className: a, align: o = "center", sideOffset: f = 4, children: p, ...m }, h) => /* @__PURE__ */ c(l, { children: s.useContext(d) && /* @__PURE__ */ c(i, {
|
|
24
24
|
forceMount: !0,
|
|
25
|
-
children: /* @__PURE__ */ c(
|
|
25
|
+
children: /* @__PURE__ */ c(r, {
|
|
26
26
|
ref: h,
|
|
27
|
-
align:
|
|
27
|
+
align: o,
|
|
28
28
|
sideOffset: f,
|
|
29
29
|
forceMount: !0,
|
|
30
30
|
asChild: !0,
|
|
@@ -43,14 +43,14 @@ var p = r, m = s.forwardRef(({ className: n, align: r = "center", sideOffset: f
|
|
|
43
43
|
scale: .95
|
|
44
44
|
},
|
|
45
45
|
transition: {
|
|
46
|
-
...
|
|
47
|
-
opacity:
|
|
46
|
+
...e.snappy,
|
|
47
|
+
opacity: t.fade
|
|
48
48
|
},
|
|
49
|
-
className:
|
|
49
|
+
className: n("z-popover w-64 rounded-overlay bg-surface-overlay p-ds-05 shadow-floating outline-hidden", a),
|
|
50
50
|
children: p
|
|
51
51
|
})
|
|
52
52
|
})
|
|
53
53
|
}) }));
|
|
54
|
-
m.displayName =
|
|
54
|
+
m.displayName = r.displayName;
|
|
55
55
|
//#endregion
|
|
56
56
|
export { f as HoverCard, m as HoverCardContent, p as HoverCardTrigger };
|
package/dist/ui/icon-button.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { IconInput } from './lib/icon-input';
|
|
1
|
+
import { ButtonProps } from './button.js';
|
|
2
|
+
import { IconInput } from './lib/icon-input.js';
|
|
4
3
|
import * as React from 'react';
|
|
5
4
|
type IconButtonSize = 'sm' | 'md' | 'lg';
|
|
6
5
|
/**
|
|
@@ -14,7 +13,8 @@ type IconButtonSize = 'sm' | 'md' | 'lg';
|
|
|
14
13
|
*
|
|
15
14
|
* **Size:** `'sm'` | `'md'` (default) | `'lg'` — maps to `icon-sm/md/lg` sizes internally.
|
|
16
15
|
*
|
|
17
|
-
* **All `Button`
|
|
16
|
+
* **All `Button` axes** flow through: variants `solid` | `soft` | `outline` | `ghost` | `link`,
|
|
17
|
+
* colors `accent` | `error` | `success` | `warning` | `info` | `neutral` (see `Button`).
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
20
|
* // Ghost toolbar icon button:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../src/ui/icon-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAWjD,KAAK,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAExC
|
|
1
|
+
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../src/ui/icon-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAWjD,KAAK,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,iBAAiB,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;IACpH;;;;;;OAMG;IACH,IAAI,EAAE,SAAS,CAAA;IACf,kEAAkE;IAClE,YAAY,EAAE,MAAM,CAAA;IACpB,sCAAsC;IACtC,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC3B,iCAAiC;IACjC,IAAI,CAAC,EAAE,cAAc,CAAA;CACtB;AAED,QAAA,MAAM,UAAU,2FAqBf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
package/dist/ui/icon-button.js
CHANGED
|
@@ -12,7 +12,7 @@ var a = {
|
|
|
12
12
|
}, o = r.forwardRef(({ icon: r, shape: o = "square", size: s = "md", className: c, loading: l, ...u }, d) => /* @__PURE__ */ i(n, {
|
|
13
13
|
ref: d,
|
|
14
14
|
size: a[s],
|
|
15
|
-
className: e(o === "circle" && "rounded-pill", c),
|
|
15
|
+
className: e(o === "circle" && "rounded-pill", (s === "sm" || s === "md") && "touch-target", c),
|
|
16
16
|
loading: l,
|
|
17
17
|
loadingPosition: "center",
|
|
18
18
|
...u,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.js","names":[],"sources":["../../src/ui/icon-button.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\n\nimport { Button, type ButtonProps } from './button'\nimport type { IconInput } from './lib/icon-input'\nimport { normalizeIcon } from './lib/normalize-icon'\nimport { cn } from './lib/utils'\n\n/** Map friendly sizes to icon-* sizes for the underlying Button */\nconst sizeMap = {\n sm: 'icon-sm',\n md: 'icon-md',\n lg: 'icon-lg',\n} as const\n\ntype IconButtonSize = 'sm' | 'md' | 'lg'\n\n/**\n * Props for IconButton — a square or circular icon-only button built on top of `<Button>`,\n * with `aria-label` required for WCAG AA compliance.\n *\n * **`aria-label` is required** — icon-only buttons have no visible text, so a descriptive label\n * is mandatory for screen readers. TypeScript enforces this.\n *\n * **Shape:** `'square'` (default, rounded corners) | `'circle'` (fully round, great for avatar-adjacent actions)\n *\n * **Size:** `'sm'` | `'md'` (default) | `'lg'` — maps to `icon-sm/md/lg` sizes internally.\n *\n * **All `Button`
|
|
1
|
+
{"version":3,"file":"icon-button.js","names":[],"sources":["../../src/ui/icon-button.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\n\nimport { Button, type ButtonProps } from './button'\nimport type { IconInput } from './lib/icon-input'\nimport { normalizeIcon } from './lib/normalize-icon'\nimport { cn } from './lib/utils'\n\n/** Map friendly sizes to icon-* sizes for the underlying Button */\nconst sizeMap = {\n sm: 'icon-sm',\n md: 'icon-md',\n lg: 'icon-lg',\n} as const\n\ntype IconButtonSize = 'sm' | 'md' | 'lg'\n\n/**\n * Props for IconButton — a square or circular icon-only button built on top of `<Button>`,\n * with `aria-label` required for WCAG AA compliance.\n *\n * **`aria-label` is required** — icon-only buttons have no visible text, so a descriptive label\n * is mandatory for screen readers. TypeScript enforces this.\n *\n * **Shape:** `'square'` (default, rounded corners) | `'circle'` (fully round, great for avatar-adjacent actions)\n *\n * **Size:** `'sm'` | `'md'` (default) | `'lg'` — maps to `icon-sm/md/lg` sizes internally.\n *\n * **All `Button` axes** flow through: variants `solid` | `soft` | `outline` | `ghost` | `link`,\n * colors `accent` | `error` | `success` | `warning` | `info` | `neutral` (see `Button`).\n *\n * @example\n * // Ghost toolbar icon button:\n * <IconButton icon={<Icon icon={IconEdit} />} variant=\"ghost\" aria-label=\"Edit item\" />\n *\n * @example\n * // Circular close button (e.g. in a modal header):\n * <IconButton icon={<Icon icon={IconX} />} shape=\"circle\" variant=\"ghost\" size=\"sm\" aria-label=\"Close dialog\" />\n *\n * @example\n * // Solid floating action button:\n * <IconButton icon={<Icon icon={IconPlus} />} variant=\"solid\" size=\"lg\" aria-label=\"Create new project\" />\n *\n * @example\n * // Error icon button with loading state (e.g. confirm delete):\n * <IconButton icon={<Icon icon={IconTrash} />} variant=\"solid\" color=\"error\" loading={isDeleting} aria-label=\"Delete\" />\n * // These are just a few ways — feel free to combine props creatively!\n */\nexport interface IconButtonProps\n extends Omit<ButtonProps, 'startIcon' | 'endIcon' | 'fullWidth' | 'loadingPosition' | 'children' | 'size' | 'shape'> {\n /**\n * The icon to render. Accepts any `IconInput`:\n * - `<Icon icon={IconPlus} />` (canonical — size flows from context)\n * - `<IconPlus />` (raw Tabler element — passes through)\n * - `IconPlus` (Tabler component ref — auto-wrapped in `<Icon>`)\n * - Custom `<span>$</span>` or any ReactElement.\n */\n icon: IconInput\n /** Accessible label — required for icon-only buttons (WCAG AA) */\n 'aria-label': string\n /** Button shape. Default: 'square' */\n shape?: 'square' | 'circle'\n /** Button size. Default: 'md' */\n size?: IconButtonSize\n}\n\nconst IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ icon, shape = 'square', size = 'md', className, loading, ...props }, ref) => {\n return (\n <Button\n ref={ref}\n size={sizeMap[size]}\n // sm (32px) / md (40px) are below the 44px touch target — expand the press\n // region with an invisible ::before (visual size unchanged). lg is 48px.\n className={cn(\n shape === 'circle' && 'rounded-pill',\n (size === 'sm' || size === 'md') && 'touch-target',\n className,\n )}\n loading={loading}\n loadingPosition=\"center\"\n {...props}\n >\n {normalizeIcon(icon)}\n </Button>\n )\n },\n)\nIconButton.displayName = 'IconButton'\n\nexport { IconButton }\n"],"mappings":";;;;;;;AAUA,IAAM,IAAU;CACd,IAAI;CACJ,IAAI;CACJ,IAAI;AACN,GAqDM,IAAa,EAAM,YACtB,EAAE,SAAM,WAAQ,UAAU,UAAO,MAAM,cAAW,YAAS,GAAG,KAAS,MAEpE,kBAAC,GAAD;CACO;CACL,MAAM,EAAQ;CAGd,WAAW,EACT,MAAU,YAAY,iBACrB,MAAS,QAAQ,MAAS,SAAS,gBACpC,CACF;CACS;CACT,iBAAgB;CAChB,GAAI;WAEH,EAAc,CAAI;AACb,CAAA,CAGd;AACA,EAAW,cAAc"}
|
package/dist/ui/icon-group.d.ts
CHANGED
package/dist/ui/icon.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { IconSize, IconStroke } from './icon-context';
|
|
1
|
+
import { IconSize, IconStroke } from './icon-context.js';
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
/** Props accepted by Tabler icon components (and most SVG icon libraries) */
|
|
5
4
|
type IconComponentProps = Partial<Omit<React.ComponentPropsWithoutRef<'svg'>, 'stroke'>> & {
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
/**
|
|
3
2
|
* @module @devalok/shilp-sutra/ui
|
|
4
3
|
*
|
|
@@ -16,82 +15,82 @@
|
|
|
16
15
|
* // Client Component — barrel import:
|
|
17
16
|
* import { Button, Dialog } from '@devalok/shilp-sutra/ui'
|
|
18
17
|
*/
|
|
19
|
-
export { Button, type ButtonProps, buttonVariants } from './button';
|
|
20
|
-
export { ButtonGroup, type ButtonGroupProps, useButtonGroup } from './button-group';
|
|
21
|
-
export { ColorInput, type ColorInputProps } from './color-input';
|
|
22
|
-
export { Icon, type IconProps } from './icon';
|
|
23
|
-
export { IconButton, type IconButtonProps } from './icon-button';
|
|
24
|
-
export { IconContext, type IconContextValue, IconProvider, type IconSize, type IconStroke, useIconContext } from './icon-context';
|
|
25
|
-
export { IconGroup, type IconGroupProps } from './icon-group';
|
|
26
|
-
export { Input, type InputProps, type InputState, inputWrapperVariants } from './input';
|
|
27
|
-
export { Label, type LabelProps } from './label';
|
|
28
|
-
export { type FieldState } from './lib/field-state';
|
|
29
|
-
export { Separator, type SeparatorProps } from './separator';
|
|
30
|
-
export { SplitButton, type SplitButtonProps } from './split-button';
|
|
31
|
-
export { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden';
|
|
32
|
-
export { Autocomplete, type AutocompleteOption, type AutocompleteProps } from './autocomplete';
|
|
33
|
-
export { Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize, comboboxTriggerVariants } from './combobox';
|
|
34
|
-
export { FileUpload, type FileUploadProps } from './file-upload';
|
|
35
|
-
export { Checkbox, type CheckboxProps } from './checkbox';
|
|
36
|
-
export { FormField, type FormFieldProps, type FormHelperState, FormHelperText, type FormHelperTextProps, useFormField } from './form';
|
|
37
|
-
export { NumberInput, type NumberInputProps, type NumberInputSize, type NumberInputState, numberInputWrapperVariants } from './number-input';
|
|
38
|
-
export { RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps } from './radio';
|
|
39
|
-
export { SearchInput, type SearchInputProps } from './search-input';
|
|
40
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, selectTriggerVariants, SelectValue, } from './select';
|
|
41
|
-
export { Slider, type SliderColor, type SliderProps, type SliderSize, sliderThumbVariants, sliderTrackVariants } from './slider';
|
|
42
|
-
export { Switch, type SwitchProps } from './switch';
|
|
43
|
-
export { Textarea, type TextareaProps, textareaVariants } from './textarea';
|
|
44
|
-
export { Toggle, type ToggleProps, toggleVariants } from './toggle';
|
|
45
|
-
export { ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps } from './toggle-group';
|
|
46
|
-
export { TruncatedText, type TruncatedTextProps } from './truncated-text';
|
|
47
|
-
export { AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, } from './alert-dialog';
|
|
48
|
-
export { Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger } from './collapsible';
|
|
49
|
-
export { Dialog, DialogClose, DialogContent, type DialogContentProps, DialogContentRaw, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, type DialogTitleProps, DialogTrigger, } from './dialog';
|
|
50
|
-
export { HoverCard, HoverCardContent, type HoverCardContentProps, HoverCardTrigger } from './hover-card';
|
|
51
|
-
export { Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger } from './popover';
|
|
52
|
-
export { Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, } from './sheet';
|
|
53
|
-
export { Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger } from './tooltip';
|
|
54
|
-
export { Alert, type AlertProps, alertVariants } from './alert';
|
|
55
|
-
export { Banner, type BannerProps, bannerVariants } from './banner';
|
|
56
|
-
export { Spinner, type SpinnerProps } from './spinner';
|
|
57
|
-
export { AspectRatio } from './aspect-ratio';
|
|
58
|
-
export { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarProps, type AvatarRing, type AvatarStatus, avatarVariants } from './avatar';
|
|
59
|
-
export { Badge, type BadgeProps, badgeVariants } from './badge';
|
|
60
|
-
export { BadgeGroup, type BadgeGroupProps } from './badge-group';
|
|
61
|
-
export { BadgeIndicator, type BadgeIndicatorProps } from './badge-indicator';
|
|
62
|
-
export { Card, CardAction, type CardActionPlacement, type CardActionProps, CardBleed, type CardBleedProps, type CardBleedSide, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardSection, CardTitle, cardVariants } from './card';
|
|
63
|
-
export { Code, type CodeProps } from './code';
|
|
64
|
-
export { ColorSwatch, type ColorSwatchProps } from './color-swatch';
|
|
65
|
-
export { Dot, type DotColor, type DotProps, type DotSize, type DotVariant, dotVariants } from './dot';
|
|
66
|
-
export { Progress, type ProgressColor, ProgressIndicator, type ProgressIndicatorProps, progressIndicatorVariants, ProgressLabel, type ProgressLabelProps, type ProgressProps, ProgressRoot, type ProgressRootProps, ProgressSegment, type ProgressSegmentProps, type ProgressSize, ProgressTrack, type ProgressTrackProps, progressTrackVariants, ProgressValue, type ProgressValueProps, } from './progress';
|
|
67
|
-
export { MultiProgressRing, type MultiProgressRingProps, ProgressRing, type ProgressRingProps } from './progress-ring';
|
|
68
|
-
export { Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonButton, type SkeletonButtonProps, SkeletonChart, type SkeletonChartProps, SkeletonGroup, type SkeletonGroupProps, SkeletonImage, type SkeletonImageProps, SkeletonInput, type SkeletonInputProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, skeletonVariants, } from './skeleton';
|
|
69
|
-
export { StatCard, type StatCardProps } from './stat-card';
|
|
70
|
-
export { type FlashPreset, type FlashSpec, type FlashSpeed, type FlashTone, StatFlash, type StatFlashProps, } from './stat-flash';
|
|
71
|
-
export { Surface, type SurfaceProps, surfaceVariants } from './surface';
|
|
72
|
-
export { Table, TableBody, TableCaption, TableCell, type TableCellBaseProps, type TableCellProps, type TableDensity, TableFooter, TableHead, TableHeader, type TableProps, TableRow, TableRowActions, type TableRowActionsProps, type TableRowProps } from './table';
|
|
73
|
-
export { TableRowLink, type TableRowLinkProps } from './table-row-link';
|
|
74
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps } from './accordion';
|
|
75
|
-
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, BreadcrumbPage, type BreadcrumbProps, BreadcrumbSeparator, } from './breadcrumb';
|
|
76
|
-
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, type ContextMenuItemProps, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, } from './context-menu';
|
|
77
|
-
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from './dropdown-menu';
|
|
78
|
-
export { Menubar, MenubarCheckboxItem, MenubarContent, type MenubarContentProps, MenubarGroup, MenubarItem, type MenubarItemProps, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, } from './menubar';
|
|
79
|
-
export { NavigationMenu, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, type NavigationMenuProps, NavigationMenuTrigger, NavigationMenuViewport, } from './navigation-menu';
|
|
80
|
-
export { generatePagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNav, type PaginationNavProps, PaginationNext, PaginationPrevious, PaginationRoot, } from './pagination';
|
|
81
|
-
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, type SidebarProps, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, } from './sidebar';
|
|
82
|
-
export { Tabs, type TabsColor, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsOrientation, type TabsProps, type TabsSize, TabsTrigger, type TabsTriggerProps } from './tabs';
|
|
83
|
-
export { Step, Stepper, type StepperProps, type StepProps } from './stepper';
|
|
84
|
-
export { Text, type TextProps, type TextVariant, textVariants } from './text';
|
|
85
|
-
export { Container, type ContainerProps } from './container';
|
|
86
|
-
export { type SpacingToken, Stack, type StackProps } from './stack';
|
|
87
|
-
export { TreeItem, type TreeItemProps, type TreeNode, TreeView, type TreeViewProps, useTree } from './tree-view';
|
|
88
|
-
export { SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, type SegmentedControlSize, type SegmentedControlVariant, } from './segmented-control';
|
|
89
|
-
export { DevalokGrain, type DevalokGrainProps, type GrainIntensity } from './devalok-grain';
|
|
90
|
-
export { DateSeparator, type DateSeparatorProps, Message, type MessageActionProps, type MessageActionsProps, type MessageAuthorProps, type MessageAvatarProps, type MessageBodyProps, type MessageContentProps, type MessageContextValue, type MessageEditableBodyProps, MessageInput, type MessageInputProps, MessageList, type MessageListProps, type MessageProps, type MessageReactionsProps, SystemMessage, type SystemMessageProps, TypingIndicator, type TypingIndicatorProps, UnreadSeparator, type UnreadSeparatorProps, useMessageContext, } from './chat';
|
|
91
|
-
export { Link, type LinkProps } from './link';
|
|
92
|
-
export { getOAuthLabel, getOAuthName, OAuth, type OAuthAppearance, OAuthButton, type OAuthButtonProps, OAuthConnectionRow, type OAuthConnectionRowProps, OAuthDivider, type OAuthDividerProps, OAuthGlyph, type OAuthGlyphProps, OAuthGroup, type OAuthGroupProps, type OAuthIntent, type OAuthProvider, type OAuthVariant, } from './oauth-button';
|
|
93
|
-
export { formatRelativeTime } from './lib/date-utils';
|
|
94
|
-
export type { SpringPreset, TweenPreset } from './lib/motion';
|
|
95
|
-
export { springs, stagger, tweens, withReducedMotion } from './lib/motion';
|
|
96
|
-
export { cn } from './lib/utils';
|
|
18
|
+
export { Button, type ButtonProps, buttonVariants } from './button.js';
|
|
19
|
+
export { ButtonGroup, type ButtonGroupProps, useButtonGroup } from './button-group.js';
|
|
20
|
+
export { ColorInput, type ColorInputProps } from './color-input.js';
|
|
21
|
+
export { Icon, type IconProps } from './icon.js';
|
|
22
|
+
export { IconButton, type IconButtonProps } from './icon-button.js';
|
|
23
|
+
export { IconContext, type IconContextValue, IconProvider, type IconSize, type IconStroke, useIconContext } from './icon-context.js';
|
|
24
|
+
export { IconGroup, type IconGroupProps } from './icon-group.js';
|
|
25
|
+
export { Input, type InputProps, type InputState, inputWrapperVariants } from './input.js';
|
|
26
|
+
export { Label, type LabelProps } from './label.js';
|
|
27
|
+
export { type FieldState } from './lib/field-state.js';
|
|
28
|
+
export { Separator, type SeparatorProps } from './separator.js';
|
|
29
|
+
export { SplitButton, type SplitButtonPlacement, type SplitButtonProps } from './split-button.js';
|
|
30
|
+
export { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';
|
|
31
|
+
export { Autocomplete, type AutocompleteOption, type AutocompleteProps } from './autocomplete.js';
|
|
32
|
+
export { Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize, comboboxTriggerVariants } from './combobox.js';
|
|
33
|
+
export { FileUpload, type FileUploadProps } from './file-upload.js';
|
|
34
|
+
export { Checkbox, type CheckboxProps } from './checkbox.js';
|
|
35
|
+
export { FormField, type FormFieldProps, type FormHelperState, FormHelperText, type FormHelperTextProps, useFormField } from './form.js';
|
|
36
|
+
export { NumberInput, type NumberInputProps, type NumberInputSize, type NumberInputState, numberInputWrapperVariants } from './number-input.js';
|
|
37
|
+
export { RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps } from './radio.js';
|
|
38
|
+
export { SearchInput, type SearchInputProps } from './search-input.js';
|
|
39
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, selectTriggerVariants, SelectValue, } from './select.js';
|
|
40
|
+
export { Slider, type SliderColor, type SliderProps, type SliderSize, sliderThumbVariants, sliderTrackVariants } from './slider.js';
|
|
41
|
+
export { Switch, type SwitchProps } from './switch.js';
|
|
42
|
+
export { Textarea, type TextareaProps, textareaVariants } from './textarea.js';
|
|
43
|
+
export { Toggle, type ToggleProps, toggleVariants } from './toggle.js';
|
|
44
|
+
export { ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps } from './toggle-group.js';
|
|
45
|
+
export { TruncatedText, type TruncatedTextProps } from './truncated-text.js';
|
|
46
|
+
export { AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, } from './alert-dialog.js';
|
|
47
|
+
export { Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger } from './collapsible.js';
|
|
48
|
+
export { Dialog, DialogClose, DialogContent, type DialogContentProps, DialogContentRaw, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, type DialogTitleProps, DialogTrigger, } from './dialog.js';
|
|
49
|
+
export { HoverCard, HoverCardContent, type HoverCardContentProps, HoverCardTrigger } from './hover-card.js';
|
|
50
|
+
export { Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger } from './popover.js';
|
|
51
|
+
export { Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, } from './sheet.js';
|
|
52
|
+
export { Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger } from './tooltip.js';
|
|
53
|
+
export { Alert, type AlertProps, alertVariants } from './alert.js';
|
|
54
|
+
export { Banner, type BannerProps, bannerVariants } from './banner.js';
|
|
55
|
+
export { Spinner, type SpinnerProps } from './spinner.js';
|
|
56
|
+
export { AspectRatio } from './aspect-ratio.js';
|
|
57
|
+
export { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarProps, type AvatarRing, type AvatarStatus, avatarVariants } from './avatar.js';
|
|
58
|
+
export { Badge, type BadgeProps, badgeVariants } from './badge.js';
|
|
59
|
+
export { BadgeGroup, type BadgeGroupProps } from './badge-group.js';
|
|
60
|
+
export { BadgeIndicator, type BadgeIndicatorProps } from './badge-indicator.js';
|
|
61
|
+
export { Card, CardAction, type CardActionPlacement, type CardActionProps, CardBleed, type CardBleedProps, type CardBleedSide, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardSection, CardTitle, cardVariants } from './card.js';
|
|
62
|
+
export { Code, type CodeProps } from './code.js';
|
|
63
|
+
export { ColorSwatch, type ColorSwatchProps } from './color-swatch.js';
|
|
64
|
+
export { Dot, type DotColor, type DotProps, type DotSize, type DotVariant, dotVariants } from './dot.js';
|
|
65
|
+
export { Progress, type ProgressColor, ProgressIndicator, type ProgressIndicatorProps, progressIndicatorVariants, ProgressLabel, type ProgressLabelProps, type ProgressProps, ProgressRoot, type ProgressRootProps, ProgressSegment, type ProgressSegmentProps, type ProgressSize, ProgressTrack, type ProgressTrackProps, progressTrackVariants, ProgressValue, type ProgressValueProps, } from './progress.js';
|
|
66
|
+
export { MultiProgressRing, type MultiProgressRingProps, ProgressRing, type ProgressRingProps } from './progress-ring.js';
|
|
67
|
+
export { Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonButton, type SkeletonButtonProps, SkeletonChart, type SkeletonChartProps, SkeletonGroup, type SkeletonGroupProps, SkeletonImage, type SkeletonImageProps, SkeletonInput, type SkeletonInputProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, skeletonVariants, } from './skeleton.js';
|
|
68
|
+
export { StatCard, type StatCardProps } from './stat-card.js';
|
|
69
|
+
export { type FlashPreset, type FlashSpec, type FlashSpeed, type FlashTone, StatFlash, type StatFlashProps, } from './stat-flash.js';
|
|
70
|
+
export { Surface, type SurfaceProps, surfaceVariants } from './surface.js';
|
|
71
|
+
export { Table, TableBody, TableCaption, TableCell, type TableCellBaseProps, type TableCellProps, type TableDensity, TableFooter, TableHead, TableHeader, type TableProps, TableRow, TableRowActions, type TableRowActionsProps, type TableRowProps } from './table.js';
|
|
72
|
+
export { TableRowLink, type TableRowLinkProps } from './table-row-link.js';
|
|
73
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps } from './accordion.js';
|
|
74
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, BreadcrumbPage, type BreadcrumbProps, BreadcrumbSeparator, } from './breadcrumb.js';
|
|
75
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, type ContextMenuItemProps, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, } from './context-menu.js';
|
|
76
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from './dropdown-menu.js';
|
|
77
|
+
export { Menubar, MenubarCheckboxItem, MenubarContent, type MenubarContentProps, MenubarGroup, MenubarItem, type MenubarItemProps, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, } from './menubar.js';
|
|
78
|
+
export { NavigationMenu, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, type NavigationMenuProps, NavigationMenuTrigger, NavigationMenuViewport, } from './navigation-menu.js';
|
|
79
|
+
export { generatePagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNav, type PaginationNavProps, PaginationNext, PaginationPrevious, PaginationRoot, } from './pagination.js';
|
|
80
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, type SidebarProps, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, } from './sidebar.js';
|
|
81
|
+
export { Tabs, type TabsColor, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsOrientation, type TabsProps, type TabsSize, TabsTrigger, type TabsTriggerProps } from './tabs.js';
|
|
82
|
+
export { Step, Stepper, type StepperProps, type StepProps } from './stepper.js';
|
|
83
|
+
export { Text, type TextProps, type TextVariant, textVariants } from './text.js';
|
|
84
|
+
export { Container, type ContainerProps } from './container.js';
|
|
85
|
+
export { type SpacingToken, Stack, type StackProps } from './stack.js';
|
|
86
|
+
export { TreeItem, type TreeItemProps, type TreeNode, TreeView, type TreeViewProps, useTree } from './tree-view/index.js';
|
|
87
|
+
export { SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, type SegmentedControlSize, type SegmentedControlVariant, } from './segmented-control.js';
|
|
88
|
+
export { DevalokGrain, type DevalokGrainProps, type GrainIntensity } from './devalok-grain.js';
|
|
89
|
+
export { DateSeparator, type DateSeparatorProps, Message, type MessageActionProps, type MessageActionsProps, type MessageAuthorProps, type MessageAvatarProps, type MessageBodyProps, type MessageContentProps, type MessageContextValue, type MessageEditableBodyProps, MessageInput, type MessageInputProps, MessageList, type MessageListProps, type MessageProps, type MessageReactionsProps, SystemMessage, type SystemMessageProps, TypingIndicator, type TypingIndicatorProps, UnreadSeparator, type UnreadSeparatorProps, useMessageContext, } from './chat/index.js';
|
|
90
|
+
export { Link, type LinkProps } from './link.js';
|
|
91
|
+
export { getOAuthLabel, getOAuthName, OAuth, type OAuthAppearance, OAuthButton, type OAuthButtonProps, OAuthConnectionRow, type OAuthConnectionRowProps, OAuthDivider, type OAuthDividerProps, OAuthGlyph, type OAuthGlyphProps, OAuthGroup, type OAuthGroupProps, type OAuthIntent, type OAuthProvider, type OAuthVariant, } from './oauth-button/index.js';
|
|
92
|
+
export { formatRelativeTime } from './lib/date-utils.js';
|
|
93
|
+
export type { SpringPreset, TweenPreset } from './lib/motion.js';
|
|
94
|
+
export { springs, stagger, tweens, withReducedMotion } from './lib/motion.js';
|
|
95
|
+
export { cn } from './lib/utils.js';
|
|
97
96
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAC,cAAc,EAAE,MAAM,UA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