@devalok/shilp-sutra 0.34.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/dist/_chunks/badge-group.js +306 -246
- package/dist/_chunks/badge-group.js.map +1 -0
- package/dist/_chunks/chat.js +518 -0
- package/dist/_chunks/chat.js.map +1 -0
- package/dist/_chunks/date-picker.js +748 -0
- package/dist/_chunks/date-picker.js.map +1 -0
- package/dist/_chunks/document-preview.js +109 -90
- package/dist/_chunks/document-preview.js.map +1 -0
- package/dist/_chunks/file-preview.js +492 -504
- package/dist/_chunks/file-preview.js.map +1 -0
- package/dist/_chunks/framer.js +5564 -5613
- package/dist/_chunks/framer.js.map +1 -0
- package/dist/_chunks/image-preview.js +127 -88
- package/dist/_chunks/image-preview.js.map +1 -0
- package/dist/_chunks/keybinding.js +12 -14
- package/dist/_chunks/keybinding.js.map +1 -0
- package/dist/_chunks/link-context.js +19 -16
- package/dist/_chunks/link-context.js.map +1 -0
- package/dist/_chunks/mention-suggestion.js +353 -350
- package/dist/_chunks/mention-suggestion.js.map +1 -0
- package/dist/_chunks/motion-provider.js +26 -20
- package/dist/_chunks/motion-provider.js.map +1 -0
- package/dist/_chunks/popover.js +123 -0
- package/dist/_chunks/popover.js.map +1 -0
- package/dist/_chunks/primitives.js +7585 -6426
- package/dist/_chunks/primitives.js.map +1 -0
- package/dist/_chunks/rich-chat-input.js +2071 -0
- package/dist/_chunks/rich-chat-input.js.map +1 -0
- package/dist/_chunks/rolldown-runtime.js +21 -0
- package/dist/_chunks/shared.js +126 -0
- package/dist/_chunks/shared.js.map +1 -0
- package/dist/_chunks/sonner.js +605 -734
- package/dist/_chunks/sonner.js.map +1 -0
- package/dist/_chunks/stat-row.js +418 -440
- package/dist/_chunks/stat-row.js.map +1 -0
- package/dist/_chunks/tiptap.js +15850 -19964
- package/dist/_chunks/tiptap.js.map +1 -0
- package/dist/_chunks/tree-view.js +231 -290
- package/dist/_chunks/tree-view.js.map +1 -0
- package/dist/_chunks/use-calendar.js +161 -208
- package/dist/_chunks/use-calendar.js.map +1 -0
- package/dist/_chunks/vendor-client.js +314 -2199
- package/dist/_chunks/vendor-client.js.map +1 -0
- package/dist/_chunks/vendor-utils.js +1721 -2978
- package/dist/_chunks/vendor-utils.js.map +1 -0
- package/dist/ai/ai-command-provider.js +23 -17
- package/dist/ai/ai-command-provider.js.map +1 -0
- package/dist/ai/block-renderer.js +68 -51
- package/dist/ai/block-renderer.js.map +1 -0
- package/dist/ai/blocks/index.js +2 -12
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/command-bar.js +470 -519
- package/dist/ai/command-bar.js.map +1 -0
- package/dist/ai/conversation.js +241 -227
- package/dist/ai/conversation.js.map +1 -0
- package/dist/ai/devadoot-icon.d.ts.map +1 -1
- package/dist/ai/index.js +181 -167
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/types.js +0 -1
- package/dist/composed/activity-feed.js +232 -202
- package/dist/composed/activity-feed.js.map +1 -0
- package/dist/composed/avatar-group.js +164 -222
- package/dist/composed/avatar-group.js.map +1 -0
- package/dist/composed/bulk-action-bar.js +166 -165
- package/dist/composed/bulk-action-bar.js.map +1 -0
- package/dist/composed/command-palette.js +290 -308
- package/dist/composed/command-palette.js.map +1 -0
- package/dist/composed/confirm-dialog.js +28 -48
- package/dist/composed/confirm-dialog.js.map +1 -0
- package/dist/composed/content-card.js +69 -108
- package/dist/composed/content-card.js.map +1 -0
- package/dist/composed/date-picker/index.js +3 -13
- package/dist/composed/deadline-indicator.js +68 -74
- package/dist/composed/deadline-indicator.js.map +1 -0
- package/dist/composed/emoji-picker.js +83 -110
- package/dist/composed/emoji-picker.js.map +1 -0
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/empty-state.js +64 -103
- package/dist/composed/empty-state.js.map +1 -0
- package/dist/composed/error-boundary.js +129 -127
- package/dist/composed/error-boundary.js.map +1 -0
- package/dist/composed/file-preview.js +2 -12
- package/dist/composed/filter-bar.js +98 -130
- package/dist/composed/filter-bar.js.map +1 -0
- package/dist/composed/form-section.js +61 -45
- package/dist/composed/form-section.js.map +1 -0
- package/dist/composed/global-loading.js +34 -47
- package/dist/composed/global-loading.js.map +1 -0
- package/dist/composed/index.js +34 -92
- package/dist/composed/inline-edit.js +92 -107
- package/dist/composed/inline-edit.js.map +1 -0
- package/dist/composed/lib/string-utils.js +8 -8
- package/dist/composed/lib/string-utils.js.map +1 -0
- package/dist/composed/loading-skeleton.js +103 -171
- package/dist/composed/loading-skeleton.js.map +1 -0
- package/dist/composed/markdown-viewer.js +187 -139
- package/dist/composed/markdown-viewer.js.map +1 -0
- package/dist/composed/master-detail.js +147 -156
- package/dist/composed/master-detail.js.map +1 -0
- package/dist/composed/member-picker.js +46 -49
- package/dist/composed/member-picker.js.map +1 -0
- package/dist/composed/multi-select-popover.d.ts.map +1 -1
- package/dist/composed/multi-select-popover.js +185 -179
- package/dist/composed/multi-select-popover.js.map +1 -0
- package/dist/composed/page-header.js +54 -76
- package/dist/composed/page-header.js.map +1 -0
- package/dist/composed/page-skeletons.js +143 -127
- package/dist/composed/page-skeletons.js.map +1 -0
- package/dist/composed/priority-indicator.js +105 -111
- package/dist/composed/priority-indicator.js.map +1 -0
- package/dist/composed/responsive-overlay.js +36 -41
- package/dist/composed/responsive-overlay.js.map +1 -0
- package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/reply-banner.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -1
- package/dist/composed/rich-chat-input.d.ts.map +1 -1
- package/dist/composed/rich-chat-input.js +2 -1860
- package/dist/composed/rich-text-editor.js +561 -424
- package/dist/composed/rich-text-editor.js.map +1 -0
- package/dist/composed/schedule-view.js +134 -185
- package/dist/composed/schedule-view.js.map +1 -0
- package/dist/composed/simple-tooltip.js +21 -21
- package/dist/composed/simple-tooltip.js.map +1 -0
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +133 -137
- package/dist/composed/status-badge.js.map +1 -0
- package/dist/hooks/index.js +7 -12
- package/dist/hooks/use-color-mode.js +28 -25
- package/dist/hooks/use-color-mode.js.map +1 -0
- package/dist/hooks/use-mobile.js +13 -13
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-toast.js +2 -4
- package/dist/hooks/use-touch-device.js +9 -11
- package/dist/hooks/use-touch-device.js.map +1 -0
- package/dist/hooks/use-viewport-height.js +14 -14
- package/dist/hooks/use-viewport-height.js.map +1 -0
- package/dist/motion/check-motion-provider.d.ts +3 -0
- package/dist/motion/check-motion-provider.d.ts.map +1 -0
- package/dist/motion/index.js +17 -11
- package/dist/motion/index.js.map +1 -0
- package/dist/motion/primitives-index.js +226 -186
- package/dist/motion/primitives-index.js.map +1 -0
- package/dist/primitives/react-accordion.d.ts +114 -114
- package/dist/primitives/react-alert-dialog.d.ts +51 -51
- package/dist/primitives/react-aspect-ratio.d.ts +11 -11
- package/dist/primitives/react-avatar.d.ts +24 -24
- package/dist/primitives/react-checkbox.d.ts +50 -50
- package/dist/primitives/react-collapsible.d.ts +33 -33
- package/dist/primitives/react-context-menu.d.ts +96 -96
- package/dist/primitives/react-dialog.d.ts +103 -103
- package/dist/primitives/react-dropdown-menu.d.ts +97 -97
- package/dist/primitives/react-hover-card.d.ts +79 -79
- package/dist/primitives/react-label.d.ts +10 -10
- package/dist/primitives/react-menu.d.ts +169 -169
- package/dist/primitives/react-menubar.d.ts +115 -115
- package/dist/primitives/react-navigation-menu.d.ts +126 -126
- package/dist/primitives/react-popover.d.ts +85 -85
- package/dist/primitives/react-progress.d.ts +19 -19
- package/dist/primitives/react-radio-group.d.ts +58 -58
- package/dist/primitives/react-roving-focus.d.ts +49 -49
- package/dist/primitives/react-select.d.ts +137 -137
- package/dist/primitives/react-separator.d.ts +21 -21
- package/dist/primitives/react-slider.d.ts +75 -75
- package/dist/primitives/react-switch.d.ts +21 -21
- package/dist/primitives/react-tabs.d.ts +56 -56
- package/dist/primitives/react-toast.d.ts +120 -120
- package/dist/primitives/react-toggle-group.d.ts +75 -75
- package/dist/primitives/react-toggle.d.ts +24 -24
- package/dist/primitives/react-tooltip.d.ts +101 -101
- package/dist/primitives/react-visually-hidden.d.ts +22 -22
- package/dist/shell/app-command-palette.d.ts +2 -0
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +94 -238
- package/dist/shell/app-command-palette.js.map +1 -0
- package/dist/shell/bottom-navbar.js +150 -190
- package/dist/shell/bottom-navbar.js.map +1 -0
- package/dist/shell/command-registry.js +13 -14
- package/dist/shell/command-registry.js.map +1 -0
- package/dist/shell/index.js +10 -20
- package/dist/shell/link-context.js +2 -5
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +263 -259
- package/dist/shell/notification-center.js.map +1 -0
- package/dist/shell/notification-preferences.js +241 -184
- package/dist/shell/notification-preferences.js.map +1 -0
- package/dist/shell/sidebar.js +251 -281
- package/dist/shell/sidebar.js.map +1 -0
- package/dist/shell/top-bar.js +203 -237
- package/dist/shell/top-bar.js.map +1 -0
- package/dist/tailwind/index.cjs +473 -442
- package/dist/tailwind/index.js +2 -4
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +490 -459
- package/dist/tailwind/preset.js.map +1 -0
- package/dist/tokens/index.css +4 -4
- package/dist/tokens/primitives.css +442 -442
- package/dist/tokens/semantic.css +742 -547
- package/dist/tokens/typography-semantic.css +123 -100
- package/dist/tokens/typography.css +422 -422
- package/dist/ui/accordion.js +52 -60
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert-dialog.d.ts +6 -2
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +112 -156
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.d.ts +3 -2
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +203 -99
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/aspect-ratio.js +13 -16
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +137 -148
- package/dist/ui/autocomplete.js.map +1 -0
- package/dist/ui/avatar.js +196 -169
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge-group.js +2 -7
- package/dist/ui/badge-indicator.js +42 -51
- package/dist/ui/badge-indicator.js.map +1 -0
- package/dist/ui/badge.js +2 -15
- package/dist/ui/banner.js +76 -68
- package/dist/ui/banner.js.map +1 -0
- package/dist/ui/breadcrumb.js +65 -84
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button-group.js +109 -102
- package/dist/ui/button-group.js.map +1 -0
- package/dist/ui/button-processing.d.ts.map +1 -1
- package/dist/ui/button-processing.js +89 -72
- package/dist/ui/button-processing.js.map +1 -0
- package/dist/ui/button.js +393 -279
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/card.js +151 -157
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/chart-container.d.ts +2 -0
- package/dist/ui/charts/chart-container.d.ts.map +1 -1
- package/dist/ui/charts/index.js +1025 -1319
- package/dist/ui/charts/index.js.map +1 -0
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/chat/index.js +2 -11
- package/dist/ui/chat/message-input.d.ts.map +1 -1
- package/dist/ui/chat/message-list.d.ts +1 -1
- package/dist/ui/chat/message-list.d.ts.map +1 -1
- package/dist/ui/chat/message.d.ts.map +1 -1
- package/dist/ui/chat/system-message.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +82 -100
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/code.js +18 -32
- package/dist/ui/code.js.map +1 -0
- package/dist/ui/collapsible.js +21 -29
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +455 -372
- package/dist/ui/color-input.js.map +1 -0
- package/dist/ui/color-swatch.js +60 -90
- package/dist/ui/color-swatch.js.map +1 -0
- package/dist/ui/combobox.d.ts +7 -0
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +278 -293
- package/dist/ui/combobox.js.map +1 -0
- package/dist/ui/container.js +18 -24
- package/dist/ui/container.js.map +1 -0
- package/dist/ui/context-menu.js +154 -203
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/data-table-body.js +116 -213
- package/dist/ui/data-table-body.js.map +1 -0
- package/dist/ui/data-table-bulk-actions.js +43 -59
- package/dist/ui/data-table-bulk-actions.js.map +1 -0
- package/dist/ui/data-table-card.js +84 -71
- package/dist/ui/data-table-card.js.map +1 -0
- package/dist/ui/data-table-context.js +39 -42
- package/dist/ui/data-table-context.js.map +1 -0
- package/dist/ui/data-table-header.js +98 -139
- package/dist/ui/data-table-header.js.map +1 -0
- package/dist/ui/data-table-pagination.js +69 -82
- package/dist/ui/data-table-pagination.js.map +1 -0
- package/dist/ui/data-table-toolbar.js +104 -130
- package/dist/ui/data-table-toolbar.js.map +1 -0
- package/dist/ui/data-table.js +281 -354
- package/dist/ui/data-table.js.map +1 -0
- package/dist/ui/devalok-grain.js +77 -66
- package/dist/ui/devalok-grain.js.map +1 -0
- package/dist/ui/dialog.js +118 -151
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/dropdown-menu.js +152 -203
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/file-upload.js +242 -266
- package/dist/ui/file-upload.js.map +1 -0
- package/dist/ui/form.d.ts +8 -0
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +62 -56
- package/dist/ui/form.js.map +1 -0
- package/dist/ui/hover-card.js +54 -54
- package/dist/ui/hover-card.js.map +1 -0
- package/dist/ui/icon-button.js +21 -26
- package/dist/ui/icon-button.js.map +1 -0
- package/dist/ui/icon-context.js +17 -17
- package/dist/ui/icon-context.js.map +1 -0
- package/dist/ui/icon-group.js +22 -29
- package/dist/ui/icon-group.js.map +1 -0
- package/dist/ui/icon.js +201 -121
- package/dist/ui/icon.js.map +1 -0
- package/dist/ui/index.d.ts +4 -4
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +90 -350
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input-otp.d.ts +12 -3
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +58 -48
- package/dist/ui/input-otp.js.map +1 -0
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +93 -169
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.d.ts.map +1 -1
- package/dist/ui/label.js +23 -23
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/lib/check-tokens.d.ts +3 -0
- package/dist/ui/lib/check-tokens.d.ts.map +1 -0
- package/dist/ui/lib/date-utils.js +14 -11
- package/dist/ui/lib/date-utils.js.map +1 -0
- package/dist/ui/lib/motion.d.ts +15 -4
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/motion.js +83 -33
- package/dist/ui/lib/motion.js.map +1 -0
- package/dist/ui/lib/utils.js +39 -16
- package/dist/ui/lib/utils.js.map +1 -0
- package/dist/ui/link.js +13 -24
- package/dist/ui/link.js.map +1 -0
- package/dist/ui/menubar.js +132 -210
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/navigation-menu.js +163 -193
- package/dist/ui/navigation-menu.js.map +1 -0
- package/dist/ui/number-input.d.ts +16 -1
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +102 -95
- package/dist/ui/number-input.js.map +1 -0
- package/dist/ui/pagination.js +122 -159
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/popover.js +2 -131
- package/dist/ui/progress-ring.d.ts.map +1 -1
- package/dist/ui/progress-ring.js +133 -143
- package/dist/ui/progress-ring.js.map +1 -0
- package/dist/ui/progress.js +51 -95
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/radio.d.ts.map +1 -1
- package/dist/ui/radio.js +47 -49
- package/dist/ui/radio.js.map +1 -0
- package/dist/ui/search-input.js +51 -53
- package/dist/ui/search-input.js.map +1 -0
- package/dist/ui/segmented-control.d.ts +1 -1
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +95 -114
- package/dist/ui/segmented-control.js.map +1 -0
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +137 -157
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.d.ts.map +1 -1
- package/dist/ui/separator.js +18 -25
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/sheet.js +135 -163
- package/dist/ui/sheet.js.map +1 -0
- package/dist/ui/sidebar.js +357 -600
- package/dist/ui/sidebar.js.map +1 -0
- package/dist/ui/skeleton.js +179 -231
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/slider.d.ts +22 -3
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/slider.js +62 -34
- package/dist/ui/slider.js.map +1 -0
- package/dist/ui/spinner.js +226 -205
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/split-button.d.ts.map +1 -1
- package/dist/ui/split-button.js +228 -276
- package/dist/ui/split-button.js.map +1 -0
- package/dist/ui/stack.js +56 -70
- package/dist/ui/stack.js.map +1 -0
- package/dist/ui/stat-card.js +259 -251
- package/dist/ui/stat-card.js.map +1 -0
- package/dist/ui/status-dot.js +67 -63
- package/dist/ui/status-dot.js.map +1 -0
- package/dist/ui/stepper.d.ts +10 -0
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +124 -168
- package/dist/ui/stepper.js.map +1 -0
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +56 -55
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.js +57 -90
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.d.ts +3 -1
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +159 -156
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/text.d.ts +1 -1
- package/dist/ui/text.d.ts.map +1 -1
- package/dist/ui/text.js +60 -59
- package/dist/ui/text.js.map +1 -0
- package/dist/ui/textarea.js +40 -57
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/toast-registry.d.ts +8 -0
- package/dist/ui/toast-registry.d.ts.map +1 -0
- package/dist/ui/toast-registry.js +13 -0
- package/dist/ui/toast-registry.js.map +1 -0
- package/dist/ui/toast-types.js +0 -1
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +559 -536
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/toaster.d.ts.map +1 -1
- package/dist/ui/toaster.js +24 -33
- package/dist/ui/toaster.js.map +1 -0
- package/dist/ui/toggle-group.d.ts +2 -0
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js +44 -41
- package/dist/ui/toggle-group.js.map +1 -0
- package/dist/ui/toggle.d.ts +2 -0
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +44 -40
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.js +80 -65
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/ui/tree-view/index.js +2 -6
- package/dist/ui/visually-hidden.js +12 -10
- package/dist/ui/visually-hidden.js.map +1 -0
- package/docs/components/_header.md +85 -85
- package/docs/components/composed/activity-feed.md +62 -62
- package/docs/components/composed/avatar-group.md +65 -65
- package/docs/components/composed/bulk-action-bar.md +40 -40
- package/docs/components/composed/command-palette.md +40 -40
- package/docs/components/composed/confirm-dialog.md +46 -46
- package/docs/components/composed/content-card.md +36 -36
- package/docs/components/composed/date-picker.md +130 -130
- package/docs/components/composed/deadline-indicator.md +27 -27
- package/docs/components/composed/emoji-picker.md +52 -52
- package/docs/components/composed/empty-state.md +53 -53
- package/docs/components/composed/error-boundary.md +29 -29
- package/docs/components/composed/file-preview.md +40 -40
- package/docs/components/composed/filter-bar.md +57 -57
- package/docs/components/composed/form-section.md +31 -31
- package/docs/components/composed/global-loading.md +27 -27
- package/docs/components/composed/inline-edit.md +35 -35
- package/docs/components/composed/loading-skeleton.md +51 -51
- package/docs/components/composed/markdown-viewer.md +27 -27
- package/docs/components/composed/master-detail.md +48 -48
- package/docs/components/composed/member-picker.md +35 -35
- package/docs/components/composed/multi-select-popover.md +62 -62
- package/docs/components/composed/page-header.md +41 -41
- package/docs/components/composed/page-skeletons.md +32 -32
- package/docs/components/composed/priority-indicator.md +32 -32
- package/docs/components/composed/responsive-overlay.md +34 -34
- package/docs/components/composed/rich-text-editor.md +82 -82
- package/docs/components/composed/schedule-view.md +39 -39
- package/docs/components/composed/simple-tooltip.md +33 -33
- package/docs/components/composed/status-badge.md +55 -55
- package/docs/components/shell/app-command-palette.md +44 -44
- package/docs/components/shell/bottom-navbar.md +52 -52
- package/docs/components/shell/command-registry.md +48 -48
- package/docs/components/shell/link-context.md +41 -41
- package/docs/components/shell/notification-center.md +63 -63
- package/docs/components/shell/notification-preferences.md +42 -42
- package/docs/components/shell/sidebar.md +92 -92
- package/docs/components/shell/top-bar.md +143 -143
- package/docs/components/ui/accordion.md +51 -51
- package/docs/components/ui/alert-dialog.md +61 -61
- package/docs/components/ui/alert.md +46 -46
- package/docs/components/ui/aspect-ratio.md +25 -25
- package/docs/components/ui/autocomplete.md +48 -48
- package/docs/components/ui/avatar.md +56 -56
- package/docs/components/ui/badge.md +83 -82
- package/docs/components/ui/banner.md +42 -42
- package/docs/components/ui/breadcrumb.md +37 -37
- package/docs/components/ui/button-group.md +41 -41
- package/docs/components/ui/button.md +94 -93
- package/docs/components/ui/card.md +52 -52
- package/docs/components/ui/charts.md +43 -43
- package/docs/components/ui/checkbox.md +36 -36
- package/docs/components/ui/chip.md +47 -47
- package/docs/components/ui/code.md +28 -28
- package/docs/components/ui/collapsible.md +40 -40
- package/docs/components/ui/color-input.md +91 -91
- package/docs/components/ui/color-swatch.md +25 -25
- package/docs/components/ui/combobox.md +54 -54
- package/docs/components/ui/container.md +26 -26
- package/docs/components/ui/context-menu.md +43 -43
- package/docs/components/ui/data-table-body.md +1 -1
- package/docs/components/ui/data-table-bulk-actions.md +1 -1
- package/docs/components/ui/data-table-card.md +1 -1
- package/docs/components/ui/data-table-context.md +1 -1
- package/docs/components/ui/data-table-header.md +1 -1
- package/docs/components/ui/data-table-pagination.md +1 -1
- package/docs/components/ui/data-table-toolbar.md +44 -44
- package/docs/components/ui/data-table.md +94 -94
- package/docs/components/ui/dialog.md +54 -54
- package/docs/components/ui/dropdown-menu.md +48 -48
- package/docs/components/ui/file-upload.md +41 -41
- package/docs/components/ui/form.md +51 -51
- package/docs/components/ui/hover-card.md +32 -32
- package/docs/components/ui/icon-button.md +40 -40
- package/docs/components/ui/input-otp.md +44 -44
- package/docs/components/ui/input.md +74 -74
- package/docs/components/ui/label.md +25 -25
- package/docs/components/ui/link.md +29 -29
- package/docs/components/ui/menubar.md +44 -44
- package/docs/components/ui/navigation-menu.md +46 -46
- package/docs/components/ui/number-input.md +44 -44
- package/docs/components/ui/pagination.md +48 -48
- package/docs/components/ui/popover.md +30 -30
- package/docs/components/ui/progress-ring.md +41 -41
- package/docs/components/ui/progress.md +34 -34
- package/docs/components/ui/radio.md +34 -34
- package/docs/components/ui/search-input.md +43 -43
- package/docs/components/ui/segmented-control.md +50 -50
- package/docs/components/ui/select.md +53 -53
- package/docs/components/ui/separator.md +32 -32
- package/docs/components/ui/sheet.md +47 -47
- package/docs/components/ui/sidebar.md +72 -72
- package/docs/components/ui/skeleton.md +77 -77
- package/docs/components/ui/slider.md +29 -29
- package/docs/components/ui/spinner.md +54 -54
- package/docs/components/ui/stack.md +39 -39
- package/docs/components/ui/stat-card.md +61 -61
- package/docs/components/ui/status-dot.md +26 -26
- package/docs/components/ui/stepper.md +49 -49
- package/docs/components/ui/switch.md +47 -47
- package/docs/components/ui/table.md +47 -47
- package/docs/components/ui/tabs.md +60 -60
- package/docs/components/ui/text.md +37 -37
- package/docs/components/ui/textarea.md +39 -39
- package/docs/components/ui/toast.md +65 -65
- package/docs/components/ui/toaster.md +47 -47
- package/docs/components/ui/toggle-group.md +43 -43
- package/docs/components/ui/toggle.md +37 -37
- package/docs/components/ui/tooltip.md +38 -38
- package/docs/components/ui/tree-view.md +65 -65
- package/docs/components/ui/visually-hidden.md +21 -21
- package/llms-full.txt +5266 -5264
- package/llms.txt +624 -580
- package/package.json +7 -8
- package/dist/_chunks/date-time-picker.js +0 -851
- package/dist/_chunks/typing-indicator.js +0 -565
package/dist/ui/lib/motion.js
CHANGED
|
@@ -1,40 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
//#region src/ui/lib/motion.ts
|
|
2
|
+
var e = {
|
|
3
|
+
instant: 0,
|
|
4
|
+
fast01: .07,
|
|
5
|
+
fast02: .11,
|
|
6
|
+
moderate01: .15,
|
|
7
|
+
moderate01b: .2,
|
|
8
|
+
moderate02: .24,
|
|
9
|
+
slow01: .4,
|
|
10
|
+
slow02: .7
|
|
11
|
+
}, t = {
|
|
12
|
+
snappy: {
|
|
13
|
+
type: "spring",
|
|
14
|
+
stiffness: 500,
|
|
15
|
+
damping: 30,
|
|
16
|
+
mass: .5
|
|
17
|
+
},
|
|
18
|
+
smooth: {
|
|
19
|
+
type: "spring",
|
|
20
|
+
stiffness: 300,
|
|
21
|
+
damping: 30,
|
|
22
|
+
mass: .8
|
|
23
|
+
},
|
|
24
|
+
bouncy: {
|
|
25
|
+
type: "spring",
|
|
26
|
+
stiffness: 400,
|
|
27
|
+
damping: 15,
|
|
28
|
+
mass: .5
|
|
29
|
+
},
|
|
30
|
+
gentle: {
|
|
31
|
+
type: "spring",
|
|
32
|
+
stiffness: 200,
|
|
33
|
+
damping: 25,
|
|
34
|
+
mass: .8
|
|
35
|
+
},
|
|
36
|
+
responsive: {
|
|
37
|
+
type: "spring",
|
|
38
|
+
stiffness: 350,
|
|
39
|
+
damping: 28,
|
|
40
|
+
mass: .6
|
|
41
|
+
}
|
|
12
42
|
}, n = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
43
|
+
fade: {
|
|
44
|
+
type: "tween",
|
|
45
|
+
duration: e.fast02,
|
|
46
|
+
ease: "easeOut"
|
|
47
|
+
},
|
|
48
|
+
colorShift: {
|
|
49
|
+
type: "tween",
|
|
50
|
+
duration: e.fast01,
|
|
51
|
+
ease: "easeOut"
|
|
52
|
+
},
|
|
53
|
+
elegant: {
|
|
54
|
+
type: "tween",
|
|
55
|
+
duration: e.slow01,
|
|
56
|
+
ease: [
|
|
57
|
+
.25,
|
|
58
|
+
.1,
|
|
59
|
+
.25,
|
|
60
|
+
1
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
layout: {
|
|
64
|
+
type: "tween",
|
|
65
|
+
duration: e.moderate01b,
|
|
66
|
+
ease: [
|
|
67
|
+
.25,
|
|
68
|
+
.1,
|
|
69
|
+
.25,
|
|
70
|
+
1
|
|
71
|
+
]
|
|
72
|
+
}
|
|
21
73
|
};
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
74
|
+
function r(e = .04) {
|
|
75
|
+
return {
|
|
76
|
+
visible: { transition: { staggerChildren: e } },
|
|
77
|
+
hidden: { transition: { staggerChildren: e } }
|
|
78
|
+
};
|
|
27
79
|
}
|
|
28
80
|
function i(e) {
|
|
29
|
-
|
|
81
|
+
return {
|
|
82
|
+
...e,
|
|
83
|
+
duration: 0
|
|
84
|
+
};
|
|
30
85
|
}
|
|
31
86
|
function a(e) {
|
|
32
|
-
|
|
87
|
+
return e;
|
|
33
88
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
s as springs,
|
|
37
|
-
t as stagger,
|
|
38
|
-
n as tweens,
|
|
39
|
-
i as withReducedMotion
|
|
40
|
-
};
|
|
89
|
+
//#endregion
|
|
90
|
+
export { e as durations, a as motionProps, t as springs, r as stagger, n as tweens, i as withReducedMotion };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.js","names":[],"sources":["../../../src/ui/lib/motion.ts"],"sourcesContent":["// @server-safe\nimport type { Transition } from 'framer-motion'\n\n// ── Duration constants (mirrors CSS --duration-* tokens, in seconds for Framer Motion) ──\n\nexport const durations = {\n instant: 0,\n fast01: 0.07,\n fast02: 0.11,\n moderate01: 0.15,\n moderate01b: 0.2,\n moderate02: 0.24,\n slow01: 0.4,\n slow02: 0.7,\n} as const\n\nexport type DurationPreset = keyof typeof durations\n\n// ── Spring configs (spatial: position, scale, size, rotation) ──\n\nexport const springs = {\n /** Micro-interactions: buttons, hover, form inputs */\n snappy: { type: 'spring', stiffness: 500, damping: 30, mass: 0.5 } as Transition,\n /** Dialogs, sheets, panels, navigation */\n smooth: { type: 'spring', stiffness: 300, damping: 30, mass: 0.8 } as Transition,\n /** Toasts, pop-ins, celebration feedback */\n bouncy: { type: 'spring', stiffness: 400, damping: 15, mass: 0.5 } as Transition,\n /** Collapse/expand, accordion, height changes */\n gentle: { type: 'spring', stiffness: 200, damping: 25, mass: 0.8 } as Transition,\n /** AI response blocks — snappier than smooth, feels \"intelligent\" */\n responsive: { type: 'spring', stiffness: 350, damping: 28, mass: 0.6 } as Transition,\n} as const\n\n// ── Tween configs (non-spatial: opacity, color, background) ──\n\nexport const tweens = {\n /** Opacity enter/exit — matches --duration-fast-02 (110ms) */\n fade: { type: 'tween', duration: durations.fast02, ease: 'easeOut' } as Transition,\n /** Hover color, bg, border transitions — matches --duration-fast-01 (70ms) */\n colorShift: { type: 'tween', duration: durations.fast01, ease: 'easeOut' } as Transition,\n /** Greeting fade, hint crossfade — matches --duration-slow-01 (400ms) */\n elegant: { type: 'tween', duration: durations.slow01, ease: [0.25, 0.1, 0.25, 1] } as Transition,\n /** Button/element layout transitions — matches --duration-moderate-01b (200ms) */\n layout: { type: 'tween', duration: durations.moderate01b, ease: [0.25, 0.1, 0.25, 1] } as Transition,\n} as const\n\n// ── Stagger helper ──\n\nexport function stagger(delay = 0.04) {\n return {\n visible: { transition: { staggerChildren: delay } },\n hidden: { transition: { staggerChildren: delay } },\n }\n}\n\n// ── Reduced motion helper ──\n\nexport function withReducedMotion(transition: Transition): Transition {\n return { ...transition, duration: 0 }\n}\n\n// ── Preset types ──\n\nexport type SpringPreset = keyof typeof springs\nexport type TweenPreset = keyof typeof tweens\n\n// ── React ↔ Framer Motion event-handler compatibility ──\n// Framer Motion redefines several React event handlers (onDrag*, onAnimationStart,\n// etc.) with different signatures. When spreading React HTML props onto a motion.*\n// element, a type-level cast is needed to bridge the mismatch. At runtime the\n// handlers are identical DOM events — only the TS types conflict.\n\n/**\n * Cast React HTML props so they can be safely spread onto a Framer Motion\n * `motion.*` element without type conflicts on shared event-handler names.\n *\n * Returns `Record<string, unknown>` rather than `any` to keep the spread safe\n * while avoiding a full `any` leak. A truly generic passthrough (`T`) would\n * re-surface the exact type conflicts this function exists to erase, because\n * the React event-handler types on `T` still clash with Framer Motion's\n * overloaded signatures. `Record<string, unknown>` is the narrowest type that\n * satisfies both sides.\n */\nexport function motionProps<T extends Record<string, unknown>>(props: T): Record<string, unknown> {\n return props\n}\n"],"mappings":";AAKA,IAAa,IAAY;CACvB,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,YAAY;CACZ,aAAa;CACb,YAAY;CACZ,QAAQ;CACR,QAAQ;CACT,EAMY,IAAU;CAErB,QAAQ;EAAE,MAAM;EAAU,WAAW;EAAK,SAAS;EAAI,MAAM;EAAK;CAElE,QAAQ;EAAE,MAAM;EAAU,WAAW;EAAK,SAAS;EAAI,MAAM;EAAK;CAElE,QAAQ;EAAE,MAAM;EAAU,WAAW;EAAK,SAAS;EAAI,MAAM;EAAK;CAElE,QAAQ;EAAE,MAAM;EAAU,WAAW;EAAK,SAAS;EAAI,MAAM;EAAK;CAElE,YAAY;EAAE,MAAM;EAAU,WAAW;EAAK,SAAS;EAAI,MAAM;EAAK;CACvE,EAIY,IAAS;CAEpB,MAAM;EAAE,MAAM;EAAS,UAAU,EAAU;EAAQ,MAAM;EAAW;CAEpE,YAAY;EAAE,MAAM;EAAS,UAAU,EAAU;EAAQ,MAAM;EAAW;CAE1E,SAAS;EAAE,MAAM;EAAS,UAAU,EAAU;EAAQ,MAAM;GAAC;GAAM;GAAK;GAAM;GAAE;EAAE;CAElF,QAAQ;EAAE,MAAM;EAAS,UAAU,EAAU;EAAa,MAAM;GAAC;GAAM;GAAK;GAAM;GAAE;EAAE;CACvF;AAID,SAAgB,EAAQ,IAAQ,KAAM;AACpC,QAAO;EACL,SAAS,EAAE,YAAY,EAAE,iBAAiB,GAAO,EAAE;EACnD,QAAQ,EAAE,YAAY,EAAE,iBAAiB,GAAO,EAAE;EACnD;;AAKH,SAAgB,EAAkB,GAAoC;AACpE,QAAO;EAAE,GAAG;EAAY,UAAU;EAAG;;AAyBvC,SAAgB,EAA+C,GAAmC;AAChG,QAAO"}
|
package/dist/ui/lib/utils.js
CHANGED
|
@@ -1,17 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { n as e, r as t } from "../../_chunks/vendor-utils.js";
|
|
2
|
+
//#region src/ui/lib/utils.ts
|
|
3
|
+
var n = e({ extend: {
|
|
4
|
+
theme: { spacing: [
|
|
5
|
+
"ds-01",
|
|
6
|
+
"ds-02",
|
|
7
|
+
"ds-02b",
|
|
8
|
+
"ds-03",
|
|
9
|
+
"ds-04",
|
|
10
|
+
"ds-05",
|
|
11
|
+
"ds-05b",
|
|
12
|
+
"ds-06",
|
|
13
|
+
"ds-06b",
|
|
14
|
+
"ds-07",
|
|
15
|
+
"ds-08",
|
|
16
|
+
"ds-09",
|
|
17
|
+
"ds-10",
|
|
18
|
+
"ds-11",
|
|
19
|
+
"ds-12",
|
|
20
|
+
"ds-13"
|
|
21
|
+
] },
|
|
22
|
+
classGroups: { "font-size": [{ "text-ds": [
|
|
23
|
+
"xs",
|
|
24
|
+
"sm",
|
|
25
|
+
"md",
|
|
26
|
+
"base",
|
|
27
|
+
"lg",
|
|
28
|
+
"xl",
|
|
29
|
+
"2xl",
|
|
30
|
+
"3xl",
|
|
31
|
+
"4xl",
|
|
32
|
+
"5xl",
|
|
33
|
+
"6xl"
|
|
34
|
+
] }] }
|
|
35
|
+
} });
|
|
36
|
+
function r(...e) {
|
|
37
|
+
return n(t(e));
|
|
14
38
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { r as cn };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../src/ui/lib/utils.ts"],"sourcesContent":["// @server-safe\nimport { clsx, type ClassValue } from 'clsx'\nimport { extendTailwindMerge } from 'tailwind-merge'\n\nconst twMerge = extendTailwindMerge({\n extend: {\n theme: {\n spacing: ['ds-01', 'ds-02', 'ds-02b', 'ds-03', 'ds-04', 'ds-05', 'ds-05b', 'ds-06', 'ds-06b', 'ds-07', 'ds-08', 'ds-09', 'ds-10', 'ds-11', 'ds-12', 'ds-13'],\n },\n classGroups: {\n 'font-size': [{ 'text-ds': ['xs', 'sm', 'md', 'base', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl'] }],\n },\n },\n})\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;AAIA,IAAM,IAAU,EAAoB,EAClC,QAAQ;CACN,OAAO,EACL,SAAS;EAAC;EAAS;EAAS;EAAU;EAAS;EAAS;EAAS;EAAU;EAAS;EAAU;EAAS;EAAS;EAAS;EAAS;EAAS;EAAS;EAAQ,EAC7J;CACD,aAAa,EACX,aAAa,CAAC,EAAE,WAAW;EAAC;EAAM;EAAM;EAAM;EAAQ;EAAM;EAAM;EAAO;EAAO;EAAO;EAAO;EAAM,EAAE,CAAC,EACxG;CACF,EACF,CAAC;AAEF,SAAgB,EAAG,GAAG,GAAsB;AAC1C,QAAO,EAAQ,EAAK,EAAO,CAAC"}
|
package/dist/ui/link.js
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
e ? "inline" : "block",
|
|
16
|
-
o
|
|
17
|
-
),
|
|
18
|
-
...r
|
|
19
|
-
}
|
|
20
|
-
)
|
|
21
|
-
);
|
|
22
|
-
d.displayName = "Link";
|
|
23
|
-
export {
|
|
24
|
-
d as Link
|
|
25
|
-
};
|
|
2
|
+
import { Hn as e } from "../_chunks/primitives.js";
|
|
3
|
+
import { cn as t } from "./lib/utils.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
//#region src/ui/link.tsx
|
|
7
|
+
var i = n.forwardRef(({ className: n, inline: i = !0, asChild: a = !1, ...o }, s) => /* @__PURE__ */ r(a ? e : "a", {
|
|
8
|
+
ref: s,
|
|
9
|
+
className: t("text-accent-11 underline decoration-transparent hover:decoration-current underline-offset-2", "hover:text-accent-12 active:opacity-80 transition-[color,text-decoration-color,opacity] duration-fast-01 ease-productive-standard", "focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 rounded-ds-sm", i ? "inline" : "block", n),
|
|
10
|
+
...o
|
|
11
|
+
}));
|
|
12
|
+
i.displayName = "Link";
|
|
13
|
+
//#endregion
|
|
14
|
+
export { i as Link };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.js","names":[],"sources":["../../src/ui/link.tsx"],"sourcesContent":["'use client'\n\nimport { Slot } from '@primitives/react-slot'\nimport * as React from 'react'\nimport { cn } from './lib/utils'\n\nexport interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n inline?: boolean\n asChild?: boolean\n}\n\nconst Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n ({ className, inline = true, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'a'\n\n return (\n <Comp\n ref={ref}\n className={cn(\n 'text-accent-11 underline decoration-transparent hover:decoration-current underline-offset-2',\n 'hover:text-accent-12 active:opacity-80 transition-[color,text-decoration-color,opacity] duration-fast-01 ease-productive-standard',\n 'focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 rounded-ds-sm',\n inline ? 'inline' : 'block',\n className,\n )}\n {...props}\n />\n )\n },\n)\nLink.displayName = 'Link'\n\nexport { Link }\n"],"mappings":";;;;;;AAWA,IAAM,IAAO,EAAM,YAChB,EAAE,cAAW,YAAS,IAAM,aAAU,IAAO,GAAG,KAAS,MAItD,kBAHW,IAAU,IAAO,KAG5B;CACO;CACL,WAAW,EACT,+FACA,qIACA,2HACA,IAAS,WAAW,SACpB,EACD;CACD,GAAI;CACJ,CAAA,CAGP;AACD,EAAK,cAAc"}
|
package/dist/ui/menubar.js
CHANGED
|
@@ -1,213 +1,135 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
2
|
+
import { C as e, S as t, _ as n, b as r, d as i, f as a, g as o, h as s, l as c, m as l, p as u, u as d, v as f, w as p, x as m, y as h } from "../_chunks/primitives.js";
|
|
3
|
+
import { a as g, c as _ } from "../_chunks/framer.js";
|
|
4
|
+
import { springs as v, tweens as y } from "./lib/motion.js";
|
|
5
|
+
import { cn as b } from "./lib/utils.js";
|
|
6
|
+
import { Icon as x } from "./icon.js";
|
|
7
|
+
import * as S from "react";
|
|
8
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
9
|
+
import { IconCheck as T, IconChevronRight as E, IconCircle as D } from "@tabler/icons-react";
|
|
10
|
+
//#region src/ui/menubar.tsx
|
|
11
|
+
var O = S.createContext(!1), k = (e) => /* @__PURE__ */ C(s, { ...e });
|
|
12
|
+
k.displayName = "MenubarMenu";
|
|
13
|
+
var A = i, j = o, M = ({ open: e, defaultOpen: t = !1, onOpenChange: n, ...r }) => {
|
|
14
|
+
let [i, a] = S.useState(t), o = e !== void 0, s = o ? e : i, c = S.useCallback((e) => {
|
|
15
|
+
o || a(e), n?.(e);
|
|
16
|
+
}, [o, n]);
|
|
17
|
+
return /* @__PURE__ */ C(O.Provider, {
|
|
18
|
+
value: s,
|
|
19
|
+
children: /* @__PURE__ */ C(m, {
|
|
20
|
+
open: s,
|
|
21
|
+
onOpenChange: c,
|
|
22
|
+
...r
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
25
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
));
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
26
|
+
M.displayName = "MenubarSub";
|
|
27
|
+
var N = n, P = S.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ C(h, {
|
|
28
|
+
ref: n,
|
|
29
|
+
className: b("flex h-ds-sm-plus items-center space-x-ds-02 rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-02 shadow-raised", e),
|
|
30
|
+
...t
|
|
31
|
+
}));
|
|
32
|
+
P.displayName = h.displayName;
|
|
33
|
+
var F = S.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ C(p, {
|
|
34
|
+
ref: n,
|
|
35
|
+
className: b("flex cursor-default select-none items-center rounded-ds-sm px-ds-04 py-ds-02 text-ds-md font-medium outline-hidden transition-colors hover:bg-surface-raised-hover focus-visible:bg-surface-raised-hover data-[state=open]:bg-surface-raised-hover", e),
|
|
36
|
+
...t
|
|
37
|
+
}));
|
|
38
|
+
F.displayName = p.displayName;
|
|
39
|
+
var I = S.forwardRef(({ className: t, inset: n, children: r, ...i }, a) => /* @__PURE__ */ w(e, {
|
|
40
|
+
ref: a,
|
|
41
|
+
className: b("flex cursor-default select-none items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-md outline-hidden focus:bg-surface-raised data-[state=open]:bg-surface-raised [&_svg]:pointer-events-none [&_svg]:h-ico-sm [&_svg]:w-ico-sm [&_svg]:shrink-0", n && "pl-ds-07", t),
|
|
42
|
+
...i,
|
|
43
|
+
children: [r, /* @__PURE__ */ C(x, {
|
|
44
|
+
icon: E,
|
|
45
|
+
size: "sm",
|
|
46
|
+
className: "ml-auto"
|
|
47
|
+
})]
|
|
48
|
+
}));
|
|
49
|
+
I.displayName = e.displayName;
|
|
50
|
+
var L = S.forwardRef(({ className: e, children: n, ...r }, i) => /* @__PURE__ */ C(_, { children: S.useContext(O) && /* @__PURE__ */ C(t, {
|
|
51
|
+
ref: i,
|
|
52
|
+
forceMount: !0,
|
|
53
|
+
asChild: !0,
|
|
54
|
+
...r,
|
|
55
|
+
children: /* @__PURE__ */ C(g.div, {
|
|
56
|
+
initial: {
|
|
57
|
+
opacity: 0,
|
|
58
|
+
scale: .95
|
|
59
|
+
},
|
|
60
|
+
animate: {
|
|
61
|
+
opacity: 1,
|
|
62
|
+
scale: 1
|
|
63
|
+
},
|
|
64
|
+
exit: {
|
|
65
|
+
opacity: 0,
|
|
66
|
+
scale: .95
|
|
67
|
+
},
|
|
68
|
+
transition: {
|
|
69
|
+
...v.snappy,
|
|
70
|
+
opacity: y.fade
|
|
71
|
+
},
|
|
72
|
+
className: b("z-popover min-w-[8rem] overflow-hidden rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-02 text-surface-fg shadow-floating", e),
|
|
73
|
+
children: n
|
|
74
|
+
})
|
|
75
|
+
}) }));
|
|
76
|
+
L.displayName = t.displayName;
|
|
77
|
+
var R = S.forwardRef(({ className: e, align: t = "start", alignOffset: n = -4, sideOffset: r = 8, children: i, ...a }, s) => /* @__PURE__ */ C(o, { children: /* @__PURE__ */ C(d, {
|
|
78
|
+
ref: s,
|
|
79
|
+
align: t,
|
|
80
|
+
alignOffset: n,
|
|
81
|
+
sideOffset: r,
|
|
82
|
+
className: b("z-popover min-w-[12rem] rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-02 text-surface-fg shadow-floating", "data-[state=open]:animate-popover-in data-[state=closed]:animate-popover-out", e),
|
|
83
|
+
...a,
|
|
84
|
+
children: i
|
|
85
|
+
}) }));
|
|
86
|
+
R.displayName = d.displayName;
|
|
87
|
+
var z = S.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ C(a, {
|
|
88
|
+
ref: r,
|
|
89
|
+
className: b("relative flex cursor-default select-none items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0", t && "pl-ds-07", e),
|
|
90
|
+
...n
|
|
91
|
+
}));
|
|
92
|
+
z.displayName = a.displayName;
|
|
93
|
+
var B = S.forwardRef(({ className: e, children: t, checked: n, ...r }, i) => /* @__PURE__ */ w(c, {
|
|
94
|
+
ref: i,
|
|
95
|
+
className: b("relative flex cursor-default select-none items-center rounded-ds-md py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled", e),
|
|
96
|
+
checked: n,
|
|
97
|
+
...r,
|
|
98
|
+
children: [/* @__PURE__ */ C("span", {
|
|
99
|
+
className: "absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center",
|
|
100
|
+
children: /* @__PURE__ */ C(u, { children: /* @__PURE__ */ C(x, {
|
|
101
|
+
icon: T,
|
|
102
|
+
size: "sm"
|
|
103
|
+
}) })
|
|
104
|
+
}), t]
|
|
105
|
+
}));
|
|
106
|
+
B.displayName = c.displayName;
|
|
107
|
+
var V = S.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ w(f, {
|
|
108
|
+
ref: r,
|
|
109
|
+
className: b("relative flex cursor-default select-none items-center rounded-ds-md py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled", e),
|
|
110
|
+
...n,
|
|
111
|
+
children: [/* @__PURE__ */ C("span", {
|
|
112
|
+
className: "absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center",
|
|
113
|
+
children: /* @__PURE__ */ C(u, { children: /* @__PURE__ */ C(D, { className: "h-2 w-2 fill-current" }) })
|
|
114
|
+
}), t]
|
|
115
|
+
}));
|
|
116
|
+
V.displayName = f.displayName;
|
|
117
|
+
var H = S.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ C(l, {
|
|
118
|
+
ref: r,
|
|
119
|
+
className: b("px-ds-03 py-ds-02b text-ds-md font-semibold", t && "pl-ds-07", e),
|
|
120
|
+
...n
|
|
121
|
+
}));
|
|
122
|
+
H.displayName = l.displayName;
|
|
123
|
+
var U = S.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ C(r, {
|
|
124
|
+
ref: n,
|
|
125
|
+
className: b("-mx-ds-01 my-ds-02 h-px bg-surface-border", e),
|
|
126
|
+
...t
|
|
127
|
+
}));
|
|
128
|
+
U.displayName = r.displayName;
|
|
129
|
+
var W = ({ className: e, ...t }) => /* @__PURE__ */ C("span", {
|
|
130
|
+
className: b("ml-auto text-ds-sm text-surface-fg-subtle", e),
|
|
131
|
+
...t
|
|
93
132
|
});
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
y,
|
|
98
|
-
{
|
|
99
|
-
ref: i,
|
|
100
|
-
align: s,
|
|
101
|
-
alignOffset: a,
|
|
102
|
-
sideOffset: t,
|
|
103
|
-
className: d(
|
|
104
|
-
"z-popover min-w-[12rem] rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-02 text-surface-fg shadow-floating",
|
|
105
|
-
"data-[state=open]:animate-popover-in data-[state=closed]:animate-popover-out",
|
|
106
|
-
e
|
|
107
|
-
),
|
|
108
|
-
...c,
|
|
109
|
-
children: n
|
|
110
|
-
}
|
|
111
|
-
) })
|
|
112
|
-
);
|
|
113
|
-
q.displayName = y.displayName;
|
|
114
|
-
const B = o.forwardRef(({ className: e, inset: s, ...a }, t) => /* @__PURE__ */ r(
|
|
115
|
-
N,
|
|
116
|
-
{
|
|
117
|
-
ref: t,
|
|
118
|
-
className: d(
|
|
119
|
-
"relative flex cursor-default select-none items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0",
|
|
120
|
-
s && "pl-ds-07",
|
|
121
|
-
e
|
|
122
|
-
),
|
|
123
|
-
...a
|
|
124
|
-
}
|
|
125
|
-
));
|
|
126
|
-
B.displayName = N.displayName;
|
|
127
|
-
const D = o.forwardRef(({ className: e, children: s, checked: a, ...t }, n) => /* @__PURE__ */ l(
|
|
128
|
-
x,
|
|
129
|
-
{
|
|
130
|
-
ref: n,
|
|
131
|
-
className: d(
|
|
132
|
-
"relative flex cursor-default select-none items-center rounded-ds-md py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled",
|
|
133
|
-
e
|
|
134
|
-
),
|
|
135
|
-
checked: a,
|
|
136
|
-
...t,
|
|
137
|
-
children: [
|
|
138
|
-
/* @__PURE__ */ r("span", { className: "absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center", children: /* @__PURE__ */ r(v, { children: /* @__PURE__ */ r(C, { icon: P, size: "sm" }) }) }),
|
|
139
|
-
s
|
|
140
|
-
]
|
|
141
|
-
}
|
|
142
|
-
));
|
|
143
|
-
D.displayName = x.displayName;
|
|
144
|
-
const E = o.forwardRef(({ className: e, children: s, ...a }, t) => /* @__PURE__ */ l(
|
|
145
|
-
M,
|
|
146
|
-
{
|
|
147
|
-
ref: t,
|
|
148
|
-
className: d(
|
|
149
|
-
"relative flex cursor-default select-none items-center rounded-ds-md py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled",
|
|
150
|
-
e
|
|
151
|
-
),
|
|
152
|
-
...a,
|
|
153
|
-
children: [
|
|
154
|
-
/* @__PURE__ */ r("span", { className: "absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center", children: /* @__PURE__ */ r(v, { children: /* @__PURE__ */ r(T, { className: "h-2 w-2 fill-current" }) }) }),
|
|
155
|
-
s
|
|
156
|
-
]
|
|
157
|
-
}
|
|
158
|
-
));
|
|
159
|
-
E.displayName = M.displayName;
|
|
160
|
-
const F = o.forwardRef(({ className: e, inset: s, ...a }, t) => /* @__PURE__ */ r(
|
|
161
|
-
w,
|
|
162
|
-
{
|
|
163
|
-
ref: t,
|
|
164
|
-
className: d(
|
|
165
|
-
"px-ds-03 py-ds-02b text-ds-md font-semibold",
|
|
166
|
-
s && "pl-ds-07",
|
|
167
|
-
e
|
|
168
|
-
),
|
|
169
|
-
...a
|
|
170
|
-
}
|
|
171
|
-
));
|
|
172
|
-
F.displayName = w.displayName;
|
|
173
|
-
const H = o.forwardRef(({ className: e, ...s }, a) => /* @__PURE__ */ r(
|
|
174
|
-
R,
|
|
175
|
-
{
|
|
176
|
-
ref: a,
|
|
177
|
-
className: d("-mx-ds-01 my-ds-02 h-px bg-surface-border", e),
|
|
178
|
-
...s
|
|
179
|
-
}
|
|
180
|
-
));
|
|
181
|
-
H.displayName = R.displayName;
|
|
182
|
-
const J = ({
|
|
183
|
-
className: e,
|
|
184
|
-
...s
|
|
185
|
-
}) => /* @__PURE__ */ r(
|
|
186
|
-
"span",
|
|
187
|
-
{
|
|
188
|
-
className: d(
|
|
189
|
-
"ml-auto text-ds-sm text-surface-fg-subtle",
|
|
190
|
-
e
|
|
191
|
-
),
|
|
192
|
-
...s
|
|
193
|
-
}
|
|
194
|
-
);
|
|
195
|
-
J.displayName = "MenubarShortcut";
|
|
196
|
-
export {
|
|
197
|
-
X as Menubar,
|
|
198
|
-
D as MenubarCheckboxItem,
|
|
199
|
-
q as MenubarContent,
|
|
200
|
-
oe as MenubarGroup,
|
|
201
|
-
B as MenubarItem,
|
|
202
|
-
F as MenubarLabel,
|
|
203
|
-
V as MenubarMenu,
|
|
204
|
-
de as MenubarPortal,
|
|
205
|
-
ne as MenubarRadioGroup,
|
|
206
|
-
E as MenubarRadioItem,
|
|
207
|
-
H as MenubarSeparator,
|
|
208
|
-
J as MenubarShortcut,
|
|
209
|
-
W as MenubarSub,
|
|
210
|
-
$ as MenubarSubContent,
|
|
211
|
-
Z as MenubarSubTrigger,
|
|
212
|
-
Y as MenubarTrigger
|
|
213
|
-
};
|
|
133
|
+
W.displayName = "MenubarShortcut";
|
|
134
|
+
//#endregion
|
|
135
|
+
export { P as Menubar, B as MenubarCheckboxItem, R as MenubarContent, A as MenubarGroup, z as MenubarItem, H as MenubarLabel, k as MenubarMenu, j as MenubarPortal, N as MenubarRadioGroup, V as MenubarRadioItem, U as MenubarSeparator, W as MenubarShortcut, M as MenubarSub, L as MenubarSubContent, I as MenubarSubTrigger, F as MenubarTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menubar.js","names":[],"sources":["../../src/ui/menubar.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as MenubarPrimitive from '@primitives/react-menubar'\nimport { IconCheck, IconChevronRight, IconCircle } from '@tabler/icons-react'\nimport { motion, AnimatePresence } from 'framer-motion'\n\nimport { cn } from './lib/utils'\nimport { springs, tweens } from './lib/motion'\nimport { Icon } from './icon'\n\n// ── Internal contexts to thread open state ──\n\nconst MenubarSubOpenContext = React.createContext(false)\n\nconst MenubarMenu: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Menu>> = (props) => {\n // MenubarPrimitive.Menu doesn't expose open/onOpenChange directly.\n // We derive open from data-state on the trigger via a callback ref approach,\n // but the cleanest way is to use the Menubar root's value prop.\n // Since MenubarMenu doesn't have open/onOpenChange, we track via a wrapper\n // that observes the trigger's data-state.\n //\n // Alternative: MenubarPrimitive.Menu has a `value` that the root uses.\n // We'll use a simpler approach: track open via content mount state.\n return <MenubarPrimitive.Menu {...props} />\n}\nMenubarMenu.displayName = 'MenubarMenu'\n\n// For Menubar, the Menu doesn't expose open/onOpenChange. Instead, we'll use a\n// different approach: wrap Content to use a local presence state based on data-state.\n// We create a wrapper component that tracks whether content should be shown.\n\nconst MenubarGroup: typeof MenubarPrimitive.Group = MenubarPrimitive.Group\n\nconst MenubarPortal: typeof MenubarPrimitive.Portal = MenubarPrimitive.Portal\n\nconst MenubarSub: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Sub>> = ({\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n ...props\n}) => {\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : uncontrolledOpen\n\n const handleOpenChange = React.useCallback(\n (value: boolean) => {\n if (!isControlled) setUncontrolledOpen(value)\n onOpenChange?.(value)\n },\n [isControlled, onOpenChange],\n )\n\n return (\n <MenubarSubOpenContext.Provider value={open}>\n <MenubarPrimitive.Sub open={open} onOpenChange={handleOpenChange} {...props} />\n </MenubarSubOpenContext.Provider>\n )\n}\nMenubarSub.displayName = 'MenubarSub'\n\nconst MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup =\n MenubarPrimitive.RadioGroup\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n 'flex h-ds-sm-plus items-center space-x-ds-02 rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-02 shadow-raised',\n className,\n )}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-ds-sm px-ds-04 py-ds-02 text-ds-md font-medium outline-hidden transition-colors hover:bg-surface-raised-hover focus-visible:bg-surface-raised-hover data-[state=open]:bg-surface-raised-hover',\n className,\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-md outline-hidden focus:bg-surface-raised data-[state=open]:bg-surface-raised [&_svg]:pointer-events-none [&_svg]:h-ico-sm [&_svg]:w-ico-sm [&_svg]:shrink-0',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n >\n {children}\n <Icon icon={IconChevronRight} size=\"sm\" className=\"ml-auto\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, children, ...props }, ref) => {\n const open = React.useContext(MenubarSubOpenContext)\n\n return (\n <AnimatePresence>\n {open && (\n <MenubarPrimitive.SubContent\n ref={ref}\n forceMount\n asChild\n {...props}\n >\n <motion.div\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.95 }}\n transition={{ ...springs.snappy, opacity: tweens.fade }}\n className={cn(\n 'z-popover min-w-[8rem] overflow-hidden rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-02 text-surface-fg shadow-floating',\n className,\n )}\n >\n {children}\n </motion.div>\n </MenubarPrimitive.SubContent>\n )}\n </AnimatePresence>\n )\n})\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\n// For MenubarContent, since MenubarMenu doesn't expose open/onOpenChange,\n// we use a wrapper that reads presence from a callback approach.\n// The cleanest solution: use a local state tracker via onCloseAutoFocus/onOpenAutoFocus\n// or simply keep CSS-free and let Radix handle mount/unmount naturally.\n//\n// Since Menubar menus are opened by the Menubar root (which tracks which menu value is open),\n// and MenubarPrimitive.Content already handles mount/unmount, we can use a ref-based approach\n// to detect the data-state attribute. However, the simplest reliable approach is to use\n// a wrapper that detects mount via useEffect.\n\n// MenubarContent uses CSS data-state animations instead of framer-motion because\n// MenubarPrimitive.Menu doesn't expose open/onOpenChange, making AnimatePresence\n// impossible to wire up for exit animations. The popover-in/popover-out keyframes\n// are defined in the tailwind preset and triggered by Radix's data-state attribute.\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = 'start', alignOffset = -4, sideOffset = 8, children, ...props },\n ref,\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n 'z-popover min-w-[12rem] rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-02 text-surface-fg shadow-floating',\n 'data-[state=open]:animate-popover-in data-[state=closed]:animate-popover-out',\n className,\n )}\n {...props}\n >\n {children}\n </MenubarPrimitive.Content>\n </MenubarPrimitive.Portal>\n ),\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-ds-md py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Icon icon={IconCheck} size=\"sm\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-ds-md py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <IconCircle className=\"h-2 w-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n 'px-ds-03 py-ds-02b text-ds-md font-semibold',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn('-mx-ds-01 my-ds-02 h-px bg-surface-border', className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n 'ml-auto text-ds-sm text-surface-fg-subtle',\n className,\n )}\n {...props}\n />\n )\n}\nMenubarShortcut.displayName = 'MenubarShortcut'\n\nexport type MenubarContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\nexport type MenubarItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item>\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarGroup,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarShortcut,\n}\n"],"mappings":"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"}
|