@exegia/corpora-ui 2.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/dist-lib/EVILCHARTS-LICENSE.txt +21 -0
- package/dist-lib/button-CIRkQXA6.js +152 -0
- package/dist-lib/button.js +3 -0
- package/dist-lib/card.js +150 -0
- package/dist-lib/components/atoms/text/default.d.ts +2 -1143
- package/dist-lib/components/blocks/shell/index.d.ts +1 -0
- package/dist-lib/components/composed/chat/chart/chart-atom.d.ts +30 -0
- package/dist-lib/components/composed/chat/chart/chart-context.d.ts +2 -0
- package/dist-lib/components/composed/chat/chart/chart-legend.d.ts +4 -0
- package/dist-lib/components/composed/chat/chart/chart-plot.d.ts +3 -0
- package/dist-lib/components/composed/chat/chart/chart-root.d.ts +3 -0
- package/dist-lib/components/composed/chat/chart/chart-tooltip.d.ts +4 -0
- package/dist-lib/components/composed/chat/chart/constants.d.ts +3 -0
- package/dist-lib/components/composed/chat/chart/evilcharts/echarts-area-chart.d.ts +93 -0
- package/dist-lib/components/composed/chat/chart/evilcharts/echarts-bar-chart.d.ts +86 -0
- package/dist-lib/components/composed/chat/chart/evilcharts/echarts-brush.d.ts +65 -0
- package/dist-lib/components/composed/chat/chart/evilcharts/echarts-chart.d.ts +44 -0
- package/dist-lib/components/composed/chat/chart/evilcharts/echarts-dot.d.ts +16 -0
- package/dist-lib/components/composed/chat/chart/evilcharts/echarts-legend.d.ts +24 -0
- package/dist-lib/components/composed/chat/chart/evilcharts/echarts-line-chart.d.ts +90 -0
- package/dist-lib/components/composed/chat/chart/evilcharts/echarts-pie-chart.d.ts +73 -0
- package/dist-lib/components/composed/chat/chart/evilcharts/echarts-tooltip.d.ts +29 -0
- package/dist-lib/components/composed/chat/chart/index.d.ts +6 -0
- package/dist-lib/components/composed/chat/chart/type.d.ts +80 -0
- package/dist-lib/components/composed/chat/chart/use-chart-state.d.ts +3 -0
- package/dist-lib/components/composed/chat/chart/use-chart.d.ts +6 -0
- package/dist-lib/components/composed/chat/chart/utils.d.ts +5 -0
- package/dist-lib/components/composed/chat/chart.d.ts +1 -44
- package/dist-lib/components/composed/chat/index.d.ts +1 -1
- package/dist-lib/components/ui/badge.d.ts +2 -2
- package/dist-lib/components/ui/button.d.ts +2 -2
- package/dist-lib/components/ui/glasscn/lazy-glass-surface.d.ts +6 -0
- package/dist-lib/components/ui/modal.d.ts +10 -0
- package/dist-lib/components/ui/overlays.d.ts +4 -0
- package/dist-lib/components/ui/select.d.ts +1 -1
- package/dist-lib/components/ui/toast.d.ts +2 -0
- package/dist-lib/ease-C9At8rnB.js +120 -0
- package/dist-lib/exegia-provider-DNTuLljX.js +124 -0
- package/dist-lib/index.css +3 -0
- package/dist-lib/index.d.ts +3 -0
- package/dist-lib/index.js +10283 -8224
- package/dist-lib/input.js +28 -0
- package/dist-lib/label.js +19 -0
- package/dist-lib/lib/segmented-control.d.ts +1 -1
- package/dist-lib/lib/state/exegia-provider.d.ts +17 -8
- package/dist-lib/lib/state/index.d.ts +2 -0
- package/dist-lib/lib/state/portal-context.d.ts +5 -0
- package/dist-lib/lib/state/sound-loading.d.ts +4 -0
- package/dist-lib/liquid-glass-BihU6nMl.js +50 -0
- package/dist-lib/modal-DLaOK-s1.js +82 -0
- package/dist-lib/overlays.js +3 -0
- package/dist-lib/rolldown-runtime-Dy4uBu1J.js +11 -0
- package/dist-lib/scaffold-Qv4hs5Pf.js +925 -0
- package/dist-lib/scaffold.js +2 -0
- package/dist-lib/shell-BQ9cjIEu.js +722 -0
- package/dist-lib/shell.js +2 -0
- package/dist-lib/sound-knGH4lj-.js +19 -0
- package/dist-lib/state.js +2 -0
- package/dist-lib/toast-CataVXHN.js +193 -0
- package/dist-lib/utils-BO0qfoA6.js +61 -0
- package/package.json +65 -23
- package/dist-lib/components/atoms/_layout.d.ts +0 -4
- package/dist-lib/components/atoms/bubble/__tests__/bubble.test.d.ts +0 -1
- package/dist-lib/components/atoms/bubble/__tests__/reference.test.d.ts +0 -1
- package/dist-lib/components/atoms/text/__tests__/text.test.d.ts +0 -1
- package/dist-lib/components/atoms/text-selection/__tests__/click-popover.test.d.ts +0 -1
- package/dist-lib/components/atoms/text-selection/__tests__/text-selection.test.d.ts +0 -1
- package/dist-lib/components/blocks/auth/__tests__/auth-flow-block.test.d.ts +0 -1
- package/dist-lib/components/blocks/auth/__tests__/auth-state-atom.test.d.ts +0 -1
- package/dist-lib/components/blocks/auth/__tests__/linked-accounts-block.test.d.ts +0 -1
- package/dist-lib/components/blocks/auth/__tests__/onboarding-block.test.d.ts +0 -1
- package/dist-lib/components/blocks/auth/__tests__/passkey-manager-block.test.d.ts +0 -1
- package/dist-lib/components/blocks/auth/__tests__/passkey-sign-in-block.test.d.ts +0 -1
- package/dist-lib/components/blocks/auth/__tests__/signup-block.test.d.ts +0 -1
- package/dist-lib/components/blocks/auth/__tests__/update-password-block.test.d.ts +0 -1
- package/dist-lib/components/blocks/chat/__tests__/ai-panel.test.d.ts +0 -1
- package/dist-lib/components/blocks/profile/__tests__/profile-card-block.test.d.ts +0 -1
- package/dist-lib/components/blocks/scaffold/__tests__/scaffold-atom.test.d.ts +0 -1
- package/dist-lib/components/blocks/scaffold/__tests__/scaffold.test.d.ts +0 -1
- package/dist-lib/components/blocks/shell/__tests__/shell-fit-atom.test.d.ts +0 -1
- package/dist-lib/components/blocks/shell/__tests__/shell-layout.test.d.ts +0 -1
- package/dist-lib/components/blocks/shell/__tests__/shell-metrics.test.d.ts +0 -1
- package/dist-lib/components/blocks/sidebar/__tests__/ai-sidebar-atom.test.d.ts +0 -1
- package/dist-lib/components/blocks/sidebar/__tests__/ai-sidebar.test.d.ts +0 -1
- package/dist-lib/components/blocks/sidebar/__tests__/use-ai-sidebar.test.d.ts +0 -1
- package/dist-lib/components/composed/__tests__/logo.test.d.ts +0 -1
- package/dist-lib/components/composed/action-bar/__tests__/action-bar.test.d.ts +0 -1
- package/dist-lib/components/composed/ai/__tests__/ai.test.d.ts +0 -1
- package/dist-lib/components/composed/chat/__tests__/attachment.test.d.ts +0 -1
- package/dist-lib/components/composed/chat/__tests__/beautiful-ui.test.d.ts +0 -1
- package/dist-lib/components/composed/chat/__tests__/chart.test.d.ts +0 -1
- package/dist-lib/components/composed/chat/__tests__/code-block.test.d.ts +0 -1
- package/dist-lib/components/composed/chat/__tests__/composer-attachments.test.d.ts +0 -1
- package/dist-lib/components/composed/chat/__tests__/composer.test.d.ts +0 -1
- package/dist-lib/components/composed/chat/__tests__/flowchart.test.d.ts +0 -1
- package/dist-lib/components/composed/chat/__tests__/glass-material.test.d.ts +0 -1
- package/dist-lib/components/composed/chat/__tests__/markdown.test.d.ts +0 -1
- package/dist-lib/components/composed/chat/__tests__/menu-command.test.d.ts +0 -1
- package/dist-lib/components/composed/chat/__tests__/recommendation.test.d.ts +0 -1
- package/dist-lib/components/composed/tree/__tests__/tree-atom.test.d.ts +0 -1
- package/dist-lib/components/composed/tree/__tests__/tree.test.d.ts +0 -1
- package/dist-lib/components/composed/tree/__tests__/use-tree.test.d.ts +0 -1
- package/dist-lib/components/composed/user/__tests__/message.test.d.ts +0 -1
- package/dist-lib/components/composed/verse/__tests__/verse.test.d.ts +0 -1
- package/dist-lib/components/docs/atoms-gallery.d.ts +0 -12
- package/dist-lib/components/docs/block-demo-stage.d.ts +0 -7
- package/dist-lib/components/docs/blocks-gallery.d.ts +0 -2
- package/dist-lib/components/docs/browser.d.ts +0 -10
- package/dist-lib/components/docs/code-block.d.ts +0 -4
- package/dist-lib/components/docs/components-gallery.d.ts +0 -2
- package/dist-lib/components/docs/demo-controls.d.ts +0 -21
- package/dist-lib/components/docs/hero.d.ts +0 -5
- package/dist-lib/components/docs/mermaid.d.ts +0 -3
- package/dist-lib/components/icons/__tests__/icons.test.d.ts +0 -1
- package/dist-lib/components/stories/attachment.story.d.ts +0 -11
- package/dist-lib/components/stories/auth-flow-block.story.d.ts +0 -2
- package/dist-lib/components/stories/avatar.story.d.ts +0 -6
- package/dist-lib/components/stories/base.story.d.ts +0 -6
- package/dist-lib/components/stories/bubble.story.d.ts +0 -6
- package/dist-lib/components/stories/button.story.d.ts +0 -9
- package/dist-lib/components/stories/card.story.d.ts +0 -8
- package/dist-lib/components/stories/chart.story.d.ts +0 -34
- package/dist-lib/components/stories/checkbox.story.d.ts +0 -6
- package/dist-lib/components/stories/code-auth-block.story.d.ts +0 -2
- package/dist-lib/components/stories/code-block.story.d.ts +0 -12
- package/dist-lib/components/stories/composed-password-input.story.d.ts +0 -6
- package/dist-lib/components/stories/context-cards.story.d.ts +0 -3
- package/dist-lib/components/stories/emoji-action-bar.story.d.ts +0 -3
- package/dist-lib/components/stories/field.story.d.ts +0 -6
- package/dist-lib/components/stories/file-icons.story.d.ts +0 -5
- package/dist-lib/components/stories/filter-table.story.d.ts +0 -21
- package/dist-lib/components/stories/flowchart.story.d.ts +0 -3
- package/dist-lib/components/stories/forgot-password-block.story.d.ts +0 -2
- package/dist-lib/components/stories/frame.story.d.ts +0 -8
- package/dist-lib/components/stories/index.d.ts +0 -54
- package/dist-lib/components/stories/input-group.story.d.ts +0 -6
- package/dist-lib/components/stories/input.story.d.ts +0 -8
- package/dist-lib/components/stories/insight-cards.story.d.ts +0 -45
- package/dist-lib/components/stories/label.story.d.ts +0 -8
- package/dist-lib/components/stories/linked-accounts-block.story.d.ts +0 -2
- package/dist-lib/components/stories/login-block.story.d.ts +0 -2
- package/dist-lib/components/stories/logo.story.d.ts +0 -3
- package/dist-lib/components/stories/markdown.story.d.ts +0 -7
- package/dist-lib/components/stories/menu-command.story.d.ts +0 -13
- package/dist-lib/components/stories/onboarding-block.story.d.ts +0 -2
- package/dist-lib/components/stories/otp-field.story.d.ts +0 -8
- package/dist-lib/components/stories/passkey-manager-block.story.d.ts +0 -2
- package/dist-lib/components/stories/passkey-sign-in-block.story.d.ts +0 -2
- package/dist-lib/components/stories/password-input.story.d.ts +0 -9
- package/dist-lib/components/stories/profile-card-block.story.d.ts +0 -6
- package/dist-lib/components/stories/recommendation-card.story.d.ts +0 -3
- package/dist-lib/components/stories/records-table.story.d.ts +0 -23
- package/dist-lib/components/stories/reference.story.d.ts +0 -9
- package/dist-lib/components/stories/research-answer.story.d.ts +0 -10
- package/dist-lib/components/stories/scaffold-root.story.d.ts +0 -6
- package/dist-lib/components/stories/separator.story.d.ts +0 -6
- package/dist-lib/components/stories/shell-layout.story.d.ts +0 -2
- package/dist-lib/components/stories/signup-block.story.d.ts +0 -2
- package/dist-lib/components/stories/social-providers.story.d.ts +0 -3
- package/dist-lib/components/stories/streaming-text.story.d.ts +0 -3
- package/dist-lib/components/stories/text.story.d.ts +0 -8
- package/dist-lib/components/stories/textarea.story.d.ts +0 -6
- package/dist-lib/components/stories/tree.story.d.ts +0 -4
- package/dist-lib/components/stories/update-password-block.story.d.ts +0 -2
- package/dist-lib/components/stories/user.story.d.ts +0 -8
- package/dist-lib/components/stories/verse.story.d.ts +0 -6
- package/dist-lib/components/ui/chat/__tests__/segmented-toggle.test.d.ts +0 -1
- package/dist-lib/index.js.map +0 -1
- package/dist-lib/lib/state/__tests__/sound.test.d.ts +0 -1
- package/dist-lib/lib/utils.test.d.ts +0 -1
- package/src/assets/css/base.css +0 -62
- package/src/assets/css/chat.css +0 -229
- package/src/assets/css/shadows.css +0 -157
- package/src/assets/css/theme.css +0 -321
- package/src/components/AGENTS.md +0 -0
- package/src/components/atoms/_layout.tsx +0 -9
- package/src/components/atoms/avatar/base.tsx +0 -70
- package/src/components/atoms/avatar/index.ts +0 -10
- package/src/components/atoms/avatar/types.ts +0 -24
- package/src/components/atoms/avatar/utils.ts +0 -54
- package/src/components/atoms/avatar/verified.tsx +0 -16
- package/src/components/atoms/background/index.ts +0 -8
- package/src/components/atoms/background/texture.tsx +0 -29
- package/src/components/atoms/background/type.ts +0 -10
- package/src/components/atoms/background/utils.ts +0 -13
- package/src/components/atoms/bubble/__tests__/bubble.test.tsx +0 -193
- package/src/components/atoms/bubble/__tests__/reference.test.tsx +0 -25
- package/src/components/atoms/bubble/actions.tsx +0 -28
- package/src/components/atoms/bubble/context.ts +0 -11
- package/src/components/atoms/bubble/default.tsx +0 -46
- package/src/components/atoms/bubble/header.tsx +0 -36
- package/src/components/atoms/bubble/index.ts +0 -37
- package/src/components/atoms/bubble/message.tsx +0 -32
- package/src/components/atoms/bubble/reactions.tsx +0 -191
- package/src/components/atoms/bubble/types.ts +0 -82
- package/src/components/atoms/bubble/utils.ts +0 -46
- package/src/components/atoms/chip.tsx +0 -61
- package/src/components/atoms/field.tsx +0 -43
- package/src/components/atoms/index.ts +0 -26
- package/src/components/atoms/loader.tsx +0 -33
- package/src/components/atoms/reference.tsx +0 -41
- package/src/components/atoms/text/__tests__/text.test.tsx +0 -47
- package/src/components/atoms/text/default.tsx +0 -59
- package/src/components/atoms/text/heading.tsx +0 -58
- package/src/components/atoms/text/index.ts +0 -28
- package/src/components/atoms/text/label.tsx +0 -16
- package/src/components/atoms/text/paragraph.tsx +0 -55
- package/src/components/atoms/text/span.tsx +0 -14
- package/src/components/atoms/text/types.ts +0 -41
- package/src/components/atoms/text/utils.ts +0 -16
- package/src/components/atoms/text-selection/__tests__/click-popover.test.tsx +0 -61
- package/src/components/atoms/text-selection/__tests__/text-selection.test.tsx +0 -90
- package/src/components/atoms/text-selection/click-popover.tsx +0 -62
- package/src/components/atoms/text-selection/index.ts +0 -30
- package/src/components/atoms/text-selection/popover.tsx +0 -103
- package/src/components/atoms/text-selection/selection-atom.ts +0 -51
- package/src/components/atoms/text-selection/selection.tsx +0 -56
- package/src/components/atoms/text-selection/types.ts +0 -125
- package/src/components/atoms/text-selection/use-selection.ts +0 -84
- package/src/components/atoms/types.ts +0 -46
- package/src/components/blocks/.gitkeep +0 -0
- package/src/components/blocks/auth/__tests__/auth-flow-block.test.tsx +0 -183
- package/src/components/blocks/auth/__tests__/auth-state-atom.test.tsx +0 -247
- package/src/components/blocks/auth/__tests__/linked-accounts-block.test.tsx +0 -128
- package/src/components/blocks/auth/__tests__/onboarding-block.test.tsx +0 -183
- package/src/components/blocks/auth/__tests__/passkey-manager-block.test.tsx +0 -131
- package/src/components/blocks/auth/__tests__/passkey-sign-in-block.test.tsx +0 -59
- package/src/components/blocks/auth/__tests__/signup-block.test.tsx +0 -176
- package/src/components/blocks/auth/__tests__/update-password-block.test.tsx +0 -95
- package/src/components/blocks/auth/auth-flow-atom.ts +0 -238
- package/src/components/blocks/auth/auth-flow-block.tsx +0 -211
- package/src/components/blocks/auth/auth-session-atom.ts +0 -82
- package/src/components/blocks/auth/auth-shell.tsx +0 -265
- package/src/components/blocks/auth/auth-state.ts +0 -40
- package/src/components/blocks/auth/code-auth-block.tsx +0 -176
- package/src/components/blocks/auth/forgot-password-block.tsx +0 -112
- package/src/components/blocks/auth/linked-accounts-block.tsx +0 -203
- package/src/components/blocks/auth/login-block.tsx +0 -217
- package/src/components/blocks/auth/onboarding/profile-step.tsx +0 -216
- package/src/components/blocks/auth/onboarding-block.tsx +0 -183
- package/src/components/blocks/auth/passkey-manager-block.tsx +0 -316
- package/src/components/blocks/auth/passkey-sign-in-block.tsx +0 -67
- package/src/components/blocks/auth/signup-block.tsx +0 -256
- package/src/components/blocks/auth/type.ts +0 -436
- package/src/components/blocks/auth/update-password-block.tsx +0 -139
- package/src/components/blocks/auth/use-auth-state.ts +0 -127
- package/src/components/blocks/chat/__tests__/ai-panel.test.tsx +0 -65
- package/src/components/blocks/chat/banners.tsx +0 -61
- package/src/components/blocks/chat/base.tsx +0 -84
- package/src/components/blocks/chat/header.tsx +0 -60
- package/src/components/blocks/chat/index.ts +0 -37
- package/src/components/blocks/chat/recommendation-stack.tsx +0 -41
- package/src/components/blocks/chat/shared.tsx +0 -27
- package/src/components/blocks/chat/suggested-prompts.tsx +0 -45
- package/src/components/blocks/chat/type.ts +0 -96
- package/src/components/blocks/chat/version-history-record.tsx +0 -37
- package/src/components/blocks/layout.ts +0 -35
- package/src/components/blocks/profile/__tests__/profile-card-block.test.tsx +0 -362
- package/src/components/blocks/profile/index.ts +0 -28
- package/src/components/blocks/profile/profile-card-atom.ts +0 -247
- package/src/components/blocks/profile/profile-card-block.tsx +0 -369
- package/src/components/blocks/profile/type.ts +0 -93
- package/src/components/blocks/profile/use-profile-card-state.ts +0 -67
- package/src/components/blocks/profile/use-profile-card.ts +0 -132
- package/src/components/blocks/scaffold/__tests__/scaffold-atom.test.tsx +0 -236
- package/src/components/blocks/scaffold/__tests__/scaffold.test.tsx +0 -524
- package/src/components/blocks/scaffold/constants.ts +0 -39
- package/src/components/blocks/scaffold/index.ts +0 -60
- package/src/components/blocks/scaffold/panel-close-button.tsx +0 -36
- package/src/components/blocks/scaffold/panel-menu-button.tsx +0 -221
- package/src/components/blocks/scaffold/scaffold-actions.tsx +0 -92
- package/src/components/blocks/scaffold/scaffold-atom.ts +0 -427
- package/src/components/blocks/scaffold/scaffold-canvas.tsx +0 -162
- package/src/components/blocks/scaffold/scaffold-context.ts +0 -20
- package/src/components/blocks/scaffold/scaffold-inspector.tsx +0 -137
- package/src/components/blocks/scaffold/scaffold-main.tsx +0 -28
- package/src/components/blocks/scaffold/scaffold-panel.tsx +0 -186
- package/src/components/blocks/scaffold/scaffold-root.tsx +0 -120
- package/src/components/blocks/scaffold/scaffold-sidebar.tsx +0 -31
- package/src/components/blocks/scaffold/scaffold-sub-panel.tsx +0 -122
- package/src/components/blocks/scaffold/scaffold-tab.tsx +0 -108
- package/src/components/blocks/scaffold/type.ts +0 -264
- package/src/components/blocks/scaffold/use-scaffold-state.ts +0 -85
- package/src/components/blocks/scaffold/use-scaffold.ts +0 -59
- package/src/components/blocks/scaffold/utils.ts +0 -112
- package/src/components/blocks/shell/__tests__/shell-fit-atom.test.tsx +0 -362
- package/src/components/blocks/shell/__tests__/shell-layout.test.tsx +0 -596
- package/src/components/blocks/shell/__tests__/shell-metrics.test.ts +0 -154
- package/src/components/blocks/shell/animated-panel-inset.tsx +0 -27
- package/src/components/blocks/shell/animated-panel-provider.tsx +0 -269
- package/src/components/blocks/shell/animated-panel-trigger.tsx +0 -51
- package/src/components/blocks/shell/animated-panel.tsx +0 -180
- package/src/components/blocks/shell/index.ts +0 -30
- package/src/components/blocks/shell/shell-fit-atom.ts +0 -246
- package/src/components/blocks/shell/shell-layout.tsx +0 -139
- package/src/components/blocks/shell/shell-metrics.ts +0 -133
- package/src/components/blocks/shell/shell-panel-atom.ts +0 -74
- package/src/components/blocks/shell/type.ts +0 -361
- package/src/components/blocks/shell/use-shell-fit-state.ts +0 -49
- package/src/components/blocks/shell/use-shell-fit.ts +0 -153
- package/src/components/blocks/shell/use-shell-panels.ts +0 -126
- package/src/components/blocks/shell/utils.ts +0 -187
- package/src/components/blocks/sidebar/__tests__/ai-sidebar-atom.test.tsx +0 -325
- package/src/components/blocks/sidebar/__tests__/ai-sidebar.test.tsx +0 -93
- package/src/components/blocks/sidebar/__tests__/use-ai-sidebar.test.tsx +0 -310
- package/src/components/blocks/sidebar/ai-sidebar-atom.ts +0 -698
- package/src/components/blocks/sidebar/ai-sidebar.tsx +0 -150
- package/src/components/blocks/sidebar/index.ts +0 -67
- package/src/components/blocks/sidebar/marquee-label.tsx +0 -59
- package/src/components/blocks/sidebar/sidebar-context.ts +0 -15
- package/src/components/blocks/sidebar/sidebar-icon.tsx +0 -14
- package/src/components/blocks/sidebar/sidebar-row.tsx +0 -378
- package/src/components/blocks/sidebar/type.ts +0 -294
- package/src/components/blocks/sidebar/use-ai-sidebar-state.ts +0 -123
- package/src/components/blocks/sidebar/use-ai-sidebar.ts +0 -619
- package/src/components/blocks/sidebar/utils.ts +0 -170
- package/src/components/blocks/types.ts +0 -6
- package/src/components/composed/.gitkeep +0 -0
- package/src/components/composed/__tests__/logo.test.tsx +0 -60
- package/src/components/composed/action-bar/__tests__/action-bar.test.tsx +0 -125
- package/src/components/composed/action-bar/action.tsx +0 -77
- package/src/components/composed/action-bar/emojis.tsx +0 -97
- package/src/components/composed/action-bar/index.ts +0 -24
- package/src/components/composed/action-bar/toolbar.tsx +0 -66
- package/src/components/composed/action-bar/types.ts +0 -58
- package/src/components/composed/action-bar/utils.ts +0 -140
- package/src/components/composed/ai/__tests__/ai.test.tsx +0 -66
- package/src/components/composed/ai/avatar.tsx +0 -19
- package/src/components/composed/ai/index.ts +0 -36
- package/src/components/composed/ai/message.tsx +0 -49
- package/src/components/composed/ai/research-answer.tsx +0 -157
- package/src/components/composed/ai/shared.tsx +0 -94
- package/src/components/composed/ai/streaming-text.tsx +0 -94
- package/src/components/composed/ai/suggested-prompt.tsx +0 -183
- package/src/components/composed/ai/types.ts +0 -81
- package/src/components/composed/chat/__tests__/attachment.test.tsx +0 -218
- package/src/components/composed/chat/__tests__/beautiful-ui.test.tsx +0 -57
- package/src/components/composed/chat/__tests__/chart.test.tsx +0 -62
- package/src/components/composed/chat/__tests__/code-block.test.tsx +0 -12
- package/src/components/composed/chat/__tests__/composer-attachments.test.tsx +0 -101
- package/src/components/composed/chat/__tests__/composer.test.tsx +0 -248
- package/src/components/composed/chat/__tests__/flowchart.test.tsx +0 -145
- package/src/components/composed/chat/__tests__/glass-material.test.tsx +0 -54
- package/src/components/composed/chat/__tests__/markdown.test.tsx +0 -25
- package/src/components/composed/chat/__tests__/menu-command.test.tsx +0 -35
- package/src/components/composed/chat/__tests__/recommendation.test.tsx +0 -43
- package/src/components/composed/chat/actions.tsx +0 -81
- package/src/components/composed/chat/attachment-file.ts +0 -82
- package/src/components/composed/chat/attachment.tsx +0 -498
- package/src/components/composed/chat/chart.tsx +0 -401
- package/src/components/composed/chat/code-block.tsx +0 -123
- package/src/components/composed/chat/composer/add-button.tsx +0 -29
- package/src/components/composed/chat/composer/base.tsx +0 -573
- package/src/components/composed/chat/composer/command-menu.tsx +0 -47
- package/src/components/composed/chat/composer/hooks.ts +0 -29
- package/src/components/composed/chat/composer/index.ts +0 -19
- package/src/components/composed/chat/composer/send-button.tsx +0 -36
- package/src/components/composed/chat/composer/suggestions.tsx +0 -115
- package/src/components/composed/chat/composer/use-dictation.ts +0 -123
- package/src/components/composed/chat/composer/utils.ts +0 -74
- package/src/components/composed/chat/context-cards.tsx +0 -63
- package/src/components/composed/chat/filter-table.tsx +0 -119
- package/src/components/composed/chat/flowchart/chart-node.tsx +0 -162
- package/src/components/composed/chat/flowchart/connector.tsx +0 -32
- package/src/components/composed/chat/flowchart/constant.ts +0 -26
- package/src/components/composed/chat/flowchart/default.tsx +0 -230
- package/src/components/composed/chat/flowchart/edge-toolbar.tsx +0 -73
- package/src/components/composed/chat/flowchart/hooks.tsx +0 -347
- package/src/components/composed/chat/flowchart/index.ts +0 -14
- package/src/components/composed/chat/flowchart/step-body.tsx +0 -82
- package/src/components/composed/chat/flowchart/types.ts +0 -89
- package/src/components/composed/chat/flowchart/utils.ts +0 -78
- package/src/components/composed/chat/hint.tsx +0 -59
- package/src/components/composed/chat/index.ts +0 -98
- package/src/components/composed/chat/insight-cards.tsx +0 -199
- package/src/components/composed/chat/markdown-atom.ts +0 -15
- package/src/components/composed/chat/markdown.tsx +0 -213
- package/src/components/composed/chat/recommendation/checkbox.tsx +0 -122
- package/src/components/composed/chat/recommendation/constant.ts +0 -54
- package/src/components/composed/chat/recommendation/default.tsx +0 -25
- package/src/components/composed/chat/recommendation/group.tsx +0 -36
- package/src/components/composed/chat/recommendation/index.ts +0 -17
- package/src/components/composed/chat/recommendation/item.tsx +0 -215
- package/src/components/composed/chat/recommendation/types.ts +0 -76
- package/src/components/composed/chat/records-table.tsx +0 -130
- package/src/components/composed/chat/type.ts +0 -157
- package/src/components/composed/logo.tsx +0 -171
- package/src/components/composed/password-input.tsx +0 -179
- package/src/components/composed/reader/applied-mark.tsx +0 -32
- package/src/components/composed/reader/apply-toast.tsx +0 -49
- package/src/components/composed/reader/index.ts +0 -10
- package/src/components/composed/reader/selection-highlight.tsx +0 -26
- package/src/components/composed/reader/selection-popover.tsx +0 -149
- package/src/components/composed/reader/type.ts +0 -48
- package/src/components/composed/social-providers.tsx +0 -154
- package/src/components/composed/tree/CLAUDE.md +0 -145
- package/src/components/composed/tree/__tests__/tree-atom.test.tsx +0 -217
- package/src/components/composed/tree/__tests__/tree.test.tsx +0 -522
- package/src/components/composed/tree/__tests__/use-tree.test.tsx +0 -333
- package/src/components/composed/tree/constants.ts +0 -55
- package/src/components/composed/tree/index.ts +0 -51
- package/src/components/composed/tree/tree-atom.ts +0 -590
- package/src/components/composed/tree/tree-context.ts +0 -13
- package/src/components/composed/tree/tree-node.tsx +0 -496
- package/src/components/composed/tree/tree.tsx +0 -233
- package/src/components/composed/tree/type.ts +0 -322
- package/src/components/composed/tree/use-tree-dnd.ts +0 -179
- package/src/components/composed/tree/use-tree-state.ts +0 -105
- package/src/components/composed/tree/use-tree.ts +0 -311
- package/src/components/composed/tree/utils.ts +0 -172
- package/src/components/composed/types.ts +0 -9
- package/src/components/composed/user/__tests__/message.test.tsx +0 -79
- package/src/components/composed/user/index.ts +0 -14
- package/src/components/composed/user/info.tsx +0 -56
- package/src/components/composed/user/message.tsx +0 -36
- package/src/components/composed/user/pill.tsx +0 -20
- package/src/components/composed/user/types.ts +0 -47
- package/src/components/composed/user/utils.ts +0 -0
- package/src/components/composed/verse/__tests__/verse.test.tsx +0 -57
- package/src/components/composed/verse/index.ts +0 -2
- package/src/components/composed/verse/types.ts +0 -24
- package/src/components/composed/verse/verse.tsx +0 -100
- package/src/components/docs/atoms-gallery.tsx +0 -286
- package/src/components/docs/block-demo-stage.tsx +0 -38
- package/src/components/docs/blocks-gallery.tsx +0 -224
- package/src/components/docs/browser.tsx +0 -87
- package/src/components/docs/code-block.tsx +0 -10
- package/src/components/docs/components-gallery.tsx +0 -182
- package/src/components/docs/demo-controls.tsx +0 -142
- package/src/components/docs/hero.tsx +0 -197
- package/src/components/docs/mermaid.tsx +0 -55
- package/src/components/icons/README.md +0 -91
- package/src/components/icons/__tests__/icons.test.tsx +0 -58
- package/src/components/icons/file-badge-cfm.tsx +0 -615
- package/src/components/icons/file-badge-corpus.tsx +0 -604
- package/src/components/icons/file-badge-pdf.tsx +0 -570
- package/src/components/icons/file-badge-tei.tsx +0 -524
- package/src/components/icons/file-badge-tf.tsx +0 -620
- package/src/components/icons/file-badge-txt.tsx +0 -607
- package/src/components/icons/file-badge-xml.tsx +0 -576
- package/src/components/icons/file-wordmark-cfm.tsx +0 -424
- package/src/components/icons/file-wordmark-corpus.tsx +0 -454
- package/src/components/icons/file-wordmark-pdf.tsx +0 -470
- package/src/components/icons/file-wordmark-tei.tsx +0 -424
- package/src/components/icons/file-wordmark-tf.tsx +0 -406
- package/src/components/icons/file-wordmark-txt.tsx +0 -421
- package/src/components/icons/file-wordmark-xml.tsx +0 -424
- package/src/components/icons/index.ts +0 -16
- package/src/components/icons/types.ts +0 -8
- package/src/components/motion/index.ts +0 -0
- package/src/components/motion/overflow-actions.tsx +0 -376
- package/src/components/motion/popover-morph.tsx +0 -292
- package/src/components/motion/popover-position.ts +0 -86
- package/src/components/motion/shared-layout-bg.tsx +0 -151
- package/src/components/stories/attachment.story.tsx +0 -40
- package/src/components/stories/auth-flow-block.story.tsx +0 -17
- package/src/components/stories/avatar.story.tsx +0 -33
- package/src/components/stories/base.story.tsx +0 -70
- package/src/components/stories/bubble.story.tsx +0 -61
- package/src/components/stories/button.story.tsx +0 -32
- package/src/components/stories/card.story.tsx +0 -36
- package/src/components/stories/chart.story.tsx +0 -54
- package/src/components/stories/checkbox.story.tsx +0 -30
- package/src/components/stories/code-auth-block.story.tsx +0 -20
- package/src/components/stories/code-block.story.tsx +0 -35
- package/src/components/stories/composed-password-input.story.tsx +0 -41
- package/src/components/stories/context-cards.story.tsx +0 -30
- package/src/components/stories/emoji-action-bar.story.tsx +0 -20
- package/src/components/stories/field.story.tsx +0 -32
- package/src/components/stories/file-icons.story.tsx +0 -20
- package/src/components/stories/filter-table.story.tsx +0 -63
- package/src/components/stories/flowchart.story.tsx +0 -25
- package/src/components/stories/forgot-password-block.story.tsx +0 -14
- package/src/components/stories/frame.story.tsx +0 -32
- package/src/components/stories/index.ts +0 -57
- package/src/components/stories/input-group.story.tsx +0 -27
- package/src/components/stories/input.story.tsx +0 -42
- package/src/components/stories/insight-cards.story.tsx +0 -67
- package/src/components/stories/label.story.tsx +0 -32
- package/src/components/stories/linked-accounts-block.story.tsx +0 -23
- package/src/components/stories/login-block.story.tsx +0 -18
- package/src/components/stories/logo.story.tsx +0 -21
- package/src/components/stories/markdown.story.tsx +0 -31
- package/src/components/stories/menu-command.story.tsx +0 -43
- package/src/components/stories/onboarding-block.story.tsx +0 -14
- package/src/components/stories/otp-field.story.tsx +0 -35
- package/src/components/stories/passkey-manager-block.story.tsx +0 -18
- package/src/components/stories/passkey-sign-in-block.story.tsx +0 -15
- package/src/components/stories/password-input.story.tsx +0 -35
- package/src/components/stories/profile-card-block.story.tsx +0 -29
- package/src/components/stories/recommendation-card.story.tsx +0 -37
- package/src/components/stories/records-table.story.tsx +0 -52
- package/src/components/stories/reference.story.tsx +0 -33
- package/src/components/stories/research-answer.story.tsx +0 -32
- package/src/components/stories/scaffold-root.story.tsx +0 -47
- package/src/components/stories/separator.story.tsx +0 -37
- package/src/components/stories/shell-layout.story.tsx +0 -19
- package/src/components/stories/signup-block.story.tsx +0 -18
- package/src/components/stories/social-providers.story.tsx +0 -26
- package/src/components/stories/streaming-text.story.tsx +0 -25
- package/src/components/stories/text.story.tsx +0 -31
- package/src/components/stories/textarea.story.tsx +0 -34
- package/src/components/stories/tree.story.tsx +0 -31
- package/src/components/stories/update-password-block.story.tsx +0 -14
- package/src/components/stories/user.story.tsx +0 -32
- package/src/components/stories/verse.story.tsx +0 -42
- package/src/components/theme-provider.tsx +0 -230
- package/src/components/types.ts +0 -106
- package/src/components/ui/accordion.tsx +0 -68
- package/src/components/ui/alert-dialog.tsx +0 -167
- package/src/components/ui/alert.tsx +0 -84
- package/src/components/ui/autocomplete.tsx +0 -303
- package/src/components/ui/avatar.tsx +0 -109
- package/src/components/ui/badge.tsx +0 -101
- package/src/components/ui/button-group.tsx +0 -88
- package/src/components/ui/button.tsx +0 -192
- package/src/components/ui/card.tsx +0 -253
- package/src/components/ui/chat/__tests__/segmented-toggle.test.tsx +0 -27
- package/src/components/ui/chat/avatar-handle.tsx +0 -30
- package/src/components/ui/chat/badges.tsx +0 -85
- package/src/components/ui/chat/buttons.tsx +0 -94
- package/src/components/ui/chat/chips.tsx +0 -106
- package/src/components/ui/chat/dot.tsx +0 -81
- package/src/components/ui/chat/icon-button.tsx +0 -43
- package/src/components/ui/chat/icon-tile.tsx +0 -33
- package/src/components/ui/chat/index.ts +0 -12
- package/src/components/ui/chat/inline-source.tsx +0 -94
- package/src/components/ui/chat/segmented-toggle.tsx +0 -99
- package/src/components/ui/chat/tag.tsx +0 -61
- package/src/components/ui/chat/thumbnail.tsx +0 -31
- package/src/components/ui/chat/waveform.tsx +0 -30
- package/src/components/ui/checkbox.tsx +0 -83
- package/src/components/ui/collapsible.tsx +0 -42
- package/src/components/ui/command.tsx +0 -263
- package/src/components/ui/context-menu.tsx +0 -342
- package/src/components/ui/emoji-picker.tsx +0 -161
- package/src/components/ui/field.tsx +0 -89
- package/src/components/ui/frame.tsx +0 -87
- package/src/components/ui/glasscn/glass-button-group.tsx +0 -34
- package/src/components/ui/glasscn/glass-button.tsx +0 -25
- package/src/components/ui/glasscn/glass-container.tsx +0 -94
- package/src/components/ui/glasscn/glass-separator.tsx +0 -39
- package/src/components/ui/glasscn/liquid-glass.tsx +0 -59
- package/src/components/ui/group.tsx +0 -92
- package/src/components/ui/input-group.tsx +0 -105
- package/src/components/ui/input.tsx +0 -70
- package/src/components/ui/kbd.tsx +0 -32
- package/src/components/ui/label.tsx +0 -36
- package/src/components/ui/menu-command.tsx +0 -156
- package/src/components/ui/menu.tsx +0 -352
- package/src/components/ui/otp-field.tsx +0 -88
- package/src/components/ui/popover-glass.tsx +0 -158
- package/src/components/ui/popover.tsx +0 -120
- package/src/components/ui/preview-card.tsx +0 -61
- package/src/components/ui/scroll-area.tsx +0 -80
- package/src/components/ui/select.tsx +0 -257
- package/src/components/ui/separator.tsx +0 -23
- package/src/components/ui/sheet.tsx +0 -135
- package/src/components/ui/skeleton.tsx +0 -18
- package/src/components/ui/spinner.tsx +0 -17
- package/src/components/ui/switch.tsx +0 -30
- package/src/components/ui/tabs.tsx +0 -120
- package/src/components/ui/textarea.tsx +0 -58
- package/src/components/ui/toast.tsx +0 -325
- package/src/components/ui/toolbar.tsx +0 -92
- package/src/components/ui/tooltip.tsx +0 -67
- package/src/index.css +0 -10
- package/src/index.ts +0 -102
- package/src/lib/attachment-content.ts +0 -28
- package/src/lib/auth-accent.ts +0 -49
- package/src/lib/ease.ts +0 -90
- package/src/lib/glass-variants.ts +0 -22
- package/src/lib/hooks/use-hover-capable.ts +0 -23
- package/src/lib/hooks/use-mobile.ts +0 -21
- package/src/lib/keyed-atom.ts +0 -60
- package/src/lib/segmented-control.ts +0 -42
- package/src/lib/sound.ts +0 -39
- package/src/lib/specular.ts +0 -10
- package/src/lib/state/__tests__/sound.test.tsx +0 -53
- package/src/lib/state/exegia-provider.tsx +0 -83
- package/src/lib/state/index.ts +0 -4
- package/src/lib/state/store.ts +0 -19
- package/src/lib/use-motion-panel.ts +0 -78
- package/src/lib/utils.test.ts +0 -22
- package/src/lib/utils.ts +0 -100
- package/src/specular.js +0 -4
- /package/{src/components/composed/chat/composer → dist-lib}/BEAUTIFUL-UI-LICENSE.txt +0 -0
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
6
|
-
import type * as React from "react";
|
|
7
|
-
import { cn } from "@/lib/utils";
|
|
8
|
-
import { Spinner } from "@/components/ui/spinner";
|
|
9
|
-
import { GlassSurface } from "@/components/ui/glasscn/liquid-glass";
|
|
10
|
-
import {
|
|
11
|
-
type TFrostGlassVariant,
|
|
12
|
-
liquidRefractStyles,
|
|
13
|
-
} from "@/lib/glass-variants";
|
|
14
|
-
|
|
15
|
-
export const buttonVariants = cva(
|
|
16
|
-
"relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md border font-medium text-base outline-none transition-[scale,box-shadow,width,height,background-color,border-color] [transition-duration:150ms,150ms,300ms,300ms,150ms,150ms] ease-smooth-out active:scale-99 data-pressed:scale-99 motion-reduce:transition-none motion-reduce:active:scale-100 motion-reduce:data-pressed:scale-100 [&_svg]:transition-transform [&_svg]:duration-150 [&_svg]:ease-smooth-out motion-reduce:[&_svg]:transition-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 data-loading:select-none sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0",
|
|
17
|
-
{
|
|
18
|
-
compoundVariants: [
|
|
19
|
-
{
|
|
20
|
-
// `link` is inline text, not a control surface: drop the button box so
|
|
21
|
-
// it sits with the surrounding copy instead of riding high in a 32/36px
|
|
22
|
-
// flex box. Both the bare and `sm:` heights have to be reset —
|
|
23
|
-
// tailwind-merge keeps modifier-prefixed classes in a separate group,
|
|
24
|
-
// so a call-site `h-auto` alone still loses to `sm:h-8`. border-0 makes
|
|
25
|
-
// the inline box exactly one line-height so it doesn't grow the line.
|
|
26
|
-
//
|
|
27
|
-
// align-middle is the alignment that holds: an inline-flex box exposes
|
|
28
|
-
// the baseline of its *first* flex item, which here is the always-
|
|
29
|
-
// mounted loading indicator rather than the label, so plain baseline
|
|
30
|
-
// alignment leaves the text ~3px high. `items-baseline` fixes that but
|
|
31
|
-
// then hangs icons 3px above the label. Centering the box lands within
|
|
32
|
-
// ~1px in every state without touching the loading-morph machinery.
|
|
33
|
-
//
|
|
34
|
-
// Icon sizes are excluded; they keep their square hit area.
|
|
35
|
-
class: "h-auto border-0 px-0 align-middle sm:h-auto",
|
|
36
|
-
size: ["xs", "sm", "default", "lg", "xl"],
|
|
37
|
-
variant: "link",
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
defaultVariants: {
|
|
41
|
-
size: "default",
|
|
42
|
-
variant: "default",
|
|
43
|
-
},
|
|
44
|
-
variants: {
|
|
45
|
-
size: {
|
|
46
|
-
default: "h-9 px-[calc(--spacing(3)-1px)] sm:h-8",
|
|
47
|
-
icon: "size-9 sm:size-8",
|
|
48
|
-
"icon-lg": "size-8 sm:size-8",
|
|
49
|
-
"icon-sm": "size-7 sm:size-6",
|
|
50
|
-
"icon-xl":
|
|
51
|
-
"size-10 sm:size-9 [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5",
|
|
52
|
-
"icon-xs":
|
|
53
|
-
"size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-3.5",
|
|
54
|
-
lg: "h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9",
|
|
55
|
-
sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:h-7",
|
|
56
|
-
xl: "h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5",
|
|
57
|
-
xs: "h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5",
|
|
58
|
-
},
|
|
59
|
-
variant: {
|
|
60
|
-
default:
|
|
61
|
-
"inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 data-pressed:bg-primary/90 *:data-[slot=button-loading-indicator]:text-primary-foreground [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none disabled:opacity-50!",
|
|
62
|
-
destructive:
|
|
63
|
-
"inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 data-pressed:bg-destructive/90 *:data-[slot=button-loading-indicator]:text-white [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none",
|
|
64
|
-
"destructive-outline":
|
|
65
|
-
"border-input bg-popover not-dark:bg-clip-padding text-destructive-foreground shadow-xs/5 not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] hover:border-destructive/32 hover:bg-destructive/4 data-pressed:border-destructive/32 data-pressed:bg-destructive/4 *:data-[slot=button-loading-indicator]:text-foreground dark:bg-input/32 dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/2%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [:disabled,:active,[data-pressed]]:shadow-none",
|
|
66
|
-
ghost:
|
|
67
|
-
"border-transparent text-foreground hover:bg-accent data-pressed:bg-accent *:data-[slot=button-loading-indicator]:text-foreground",
|
|
68
|
-
// Base for the glass treatment. The finish itself (blur, tint, bevel)
|
|
69
|
-
// comes from glassVariantStyles keyed by the `glassVariant` prop,
|
|
70
|
-
// which is only accepted when variant is "glass".
|
|
71
|
-
glass:
|
|
72
|
-
"border-transparent text-foreground *:data-[slot=button-loading-indicator]:text-foreground",
|
|
73
|
-
link: "border-transparent text-foreground underline-offset-4 hover:underline data-pressed:underline *:data-[slot=button-loading-indicator]:text-foreground",
|
|
74
|
-
outline:
|
|
75
|
-
"border-input bg-popover not-dark:bg-clip-padding text-foreground shadow-xs/5 not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] hover:bg-accent/50 data-pressed:bg-accent/50 *:data-[slot=button-loading-indicator]:text-foreground dark:bg-input/32 dark:data-pressed:bg-input/64 dark:hover:bg-input/64 dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/2%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [:disabled,:active,[data-pressed]]:shadow-none",
|
|
76
|
-
secondary:
|
|
77
|
-
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 data-pressed:bg-secondary/90 *:data-[slot=button-loading-indicator]:text-secondary-foreground [:active,[data-pressed]]:bg-secondary/80",
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
);
|
|
82
|
-
|
|
83
|
-
type TButtonVariant = VariantProps<typeof buttonVariants>["variant"];
|
|
84
|
-
|
|
85
|
-
interface IButtonBaseProps extends useRender.ComponentProps<"button"> {
|
|
86
|
-
size?: VariantProps<typeof buttonVariants>["size"];
|
|
87
|
-
loading?: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Emit cuelume press/release attributes. Inert unless the app opts into
|
|
90
|
-
* interaction sound by calling `bindSounds()` once.
|
|
91
|
-
*/
|
|
92
|
-
sound?: boolean;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export type TButtonProps = IButtonBaseProps &
|
|
96
|
-
(
|
|
97
|
-
| {
|
|
98
|
-
variant: "glass";
|
|
99
|
-
/** Glass finish. Only available when `variant` is "glass". */
|
|
100
|
-
glassVariant?: TFrostGlassVariant;
|
|
101
|
-
}
|
|
102
|
-
| {
|
|
103
|
-
variant?: Exclude<TButtonVariant, "glass">;
|
|
104
|
-
glassVariant?: never;
|
|
105
|
-
}
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
export function Button({
|
|
109
|
-
className,
|
|
110
|
-
variant,
|
|
111
|
-
size,
|
|
112
|
-
render,
|
|
113
|
-
children,
|
|
114
|
-
loading = false,
|
|
115
|
-
disabled: disabledProp,
|
|
116
|
-
glassVariant,
|
|
117
|
-
sound = true,
|
|
118
|
-
...props
|
|
119
|
-
}: TButtonProps): React.ReactElement {
|
|
120
|
-
const isDisabled: boolean = Boolean(loading || disabledProp);
|
|
121
|
-
const typeValue: React.ButtonHTMLAttributes<HTMLButtonElement>["type"] =
|
|
122
|
-
render ? undefined : "button";
|
|
123
|
-
|
|
124
|
-
const resolvedGlassVariant: TFrostGlassVariant | undefined =
|
|
125
|
-
variant === "glass" ? (glassVariant ?? "liquid-refract") : undefined;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
// Icon-only sizes overlay the spinner on top of the (hidden) icon; text
|
|
129
|
-
// sizes keep the label visible and show the spinner inline before it.
|
|
130
|
-
const isIconSize = (size ?? "default").startsWith("icon");
|
|
131
|
-
|
|
132
|
-
const defaultProps = {
|
|
133
|
-
children: (
|
|
134
|
-
<>
|
|
135
|
-
{resolvedGlassVariant && <GlassSurface glassVariant={resolvedGlassVariant} />}
|
|
136
|
-
{!isIconSize && (
|
|
137
|
-
// Always mounted so the button width morphs as the slot collapses
|
|
138
|
-
// and expands; the closed state cancels the flex gap (which varies
|
|
139
|
-
// per size) with a matching negative margin.
|
|
140
|
-
<span
|
|
141
|
-
aria-hidden={loading ? undefined : true}
|
|
142
|
-
data-slot="button-loading-indicator"
|
|
143
|
-
className={cn(
|
|
144
|
-
"pointer-events-none inline-flex shrink-0 items-center overflow-hidden transition-[max-width,margin-inline-start,opacity,filter] duration-300 ease-smooth-out motion-reduce:transition-none",
|
|
145
|
-
loading
|
|
146
|
-
? "max-w-6"
|
|
147
|
-
: cn(
|
|
148
|
-
"max-w-0 opacity-0 blur-small",
|
|
149
|
-
size === "xs" ? "-ms-1" : size === "sm" ? "-ms-1.5" : "-ms-2",
|
|
150
|
-
),
|
|
151
|
-
)}
|
|
152
|
-
>
|
|
153
|
-
<Spinner className={loading ? undefined : "animate-none"} />
|
|
154
|
-
</span>
|
|
155
|
-
)}
|
|
156
|
-
{children}
|
|
157
|
-
{loading && isIconSize && (
|
|
158
|
-
<Spinner
|
|
159
|
-
className="pointer-events-none absolute"
|
|
160
|
-
data-slot="button-loading-indicator"
|
|
161
|
-
/>
|
|
162
|
-
)}
|
|
163
|
-
</>
|
|
164
|
-
),
|
|
165
|
-
className: cn(
|
|
166
|
-
buttonVariants({ size, variant }),
|
|
167
|
-
// Label + icon buttons: icons do a gentle scale bump on hover. The
|
|
168
|
-
// class-based :not() skips the spinner (animate-spin / animate-none).
|
|
169
|
-
!isIconSize &&
|
|
170
|
-
"hover:[&_svg:not([class*='animate-'])]:scale-101 motion-reduce:hover:[&_svg]:scale-100",
|
|
171
|
-
loading && isIconSize && "data-loading:text-transparent",
|
|
172
|
-
resolvedGlassVariant && cn("isolate", liquidRefractStyles),
|
|
173
|
-
className,
|
|
174
|
-
),
|
|
175
|
-
"aria-disabled": loading || undefined,
|
|
176
|
-
"data-cuelume-press": sound ? "" : undefined,
|
|
177
|
-
"data-cuelume-release": sound ? "" : undefined,
|
|
178
|
-
"data-loading": loading ? "" : undefined,
|
|
179
|
-
"data-glass-variant": resolvedGlassVariant,
|
|
180
|
-
"data-slot": "button",
|
|
181
|
-
disabled: isDisabled,
|
|
182
|
-
type: typeValue,
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
const element = useRender({
|
|
186
|
-
defaultTagName: "button",
|
|
187
|
-
props: mergeProps<"button">(defaultProps, props),
|
|
188
|
-
render,
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
return element;
|
|
192
|
-
}
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
-
import type React from "react";
|
|
6
|
-
import { cn } from "@/lib/utils";
|
|
7
|
-
|
|
8
|
-
export function Card({
|
|
9
|
-
className,
|
|
10
|
-
render,
|
|
11
|
-
...props
|
|
12
|
-
}: useRender.ComponentProps<"div">): React.ReactElement {
|
|
13
|
-
const defaultProps = {
|
|
14
|
-
className: cn(
|
|
15
|
-
"relative flex flex-col rounded-md border bg-card not-dark:bg-clip-padding text-card-foreground shadow-xs/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",
|
|
16
|
-
className,
|
|
17
|
-
),
|
|
18
|
-
"data-slot": "card",
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
return useRender({
|
|
22
|
-
defaultTagName: "div",
|
|
23
|
-
props: mergeProps<"div">(defaultProps, props),
|
|
24
|
-
render,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function CardFrame({
|
|
29
|
-
className,
|
|
30
|
-
render,
|
|
31
|
-
...props
|
|
32
|
-
}: useRender.ComponentProps<"div">): React.ReactElement {
|
|
33
|
-
const defaultProps = {
|
|
34
|
-
className: cn(
|
|
35
|
-
"relative flex flex-col rounded-(--frame-radius) border bg-card not-dark:bg-clip-padding text-card-foreground shadow-xs/5 [--clip-bottom:-1rem] [--clip-top:-1rem] [--frame-radius:var(--radius-md)] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--frame-radius)-1px)] before:bg-muted/72 before:shadow-[0_1px_--theme(--color-black/4%)] has-data-[slot=table-container]:overflow-hidden *:data-[slot=card]:-m-px *:data-[slot=card]:rounded-(--frame-radius) *:data-[slot=table-container]:-m-px *:data-[slot=table-container]:w-[calc(100%+2px)] *:not-first:data-[slot=card]:rounded-t-[calc(var(--frame-radius)-1px)] *:not-last:data-[slot=card]:rounded-b-[calc(var(--frame-radius)-1px)] *:data-[slot=card]:bg-clip-padding *:data-[slot=card]:shadow-none *:data-[slot=card]:before:hidden *:not-first:data-[slot=card]:before:rounded-t-[calc(var(--frame-radius)-2px)] *:not-last:data-[slot=card]:before:rounded-b-[calc(var(--frame-radius)-2px)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)] *:data-[slot=card]:[clip-path:inset(var(--clip-top)_1px_var(--clip-bottom)_1px_round_calc(var(--frame-radius)-1px))] *:data-[slot=card]:last:[--clip-bottom:1px] *:data-[slot=card]:first:[--clip-top:1px]",
|
|
36
|
-
className,
|
|
37
|
-
),
|
|
38
|
-
"data-slot": "card-frame",
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return useRender({
|
|
42
|
-
defaultTagName: "div",
|
|
43
|
-
props: mergeProps<"div">(defaultProps, props),
|
|
44
|
-
render,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function CardFrameHeader({
|
|
49
|
-
className,
|
|
50
|
-
render,
|
|
51
|
-
...props
|
|
52
|
-
}: useRender.ComponentProps<"div">): React.ReactElement {
|
|
53
|
-
const defaultProps = {
|
|
54
|
-
className: cn(
|
|
55
|
-
"relative flex grid auto-rows-min grid-rows-[auto_auto] flex-col items-start gap-x-4 px-6 py-4 has-data-[slot=card-frame-action]:grid-cols-[1fr_auto]",
|
|
56
|
-
className,
|
|
57
|
-
),
|
|
58
|
-
"data-slot": "card-frame-header",
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
return useRender({
|
|
62
|
-
defaultTagName: "div",
|
|
63
|
-
props: mergeProps<"div">(defaultProps, props),
|
|
64
|
-
render,
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export function CardFrameTitle({
|
|
69
|
-
className,
|
|
70
|
-
render,
|
|
71
|
-
...props
|
|
72
|
-
}: useRender.ComponentProps<"div">): React.ReactElement {
|
|
73
|
-
const defaultProps = {
|
|
74
|
-
className: cn("self-center font-semibold text-sm", className),
|
|
75
|
-
"data-slot": "card-frame-title",
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
return useRender({
|
|
79
|
-
defaultTagName: "div",
|
|
80
|
-
props: mergeProps<"div">(defaultProps, props),
|
|
81
|
-
render,
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export function CardFrameDescription({
|
|
86
|
-
className,
|
|
87
|
-
render,
|
|
88
|
-
...props
|
|
89
|
-
}: useRender.ComponentProps<"div">): React.ReactElement {
|
|
90
|
-
const defaultProps = {
|
|
91
|
-
className: cn("self-center text-muted-foreground text-sm", className),
|
|
92
|
-
"data-slot": "card-frame-description",
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
return useRender({
|
|
96
|
-
defaultTagName: "div",
|
|
97
|
-
props: mergeProps<"div">(defaultProps, props),
|
|
98
|
-
render,
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export function CardFrameAction({
|
|
103
|
-
className,
|
|
104
|
-
render,
|
|
105
|
-
...props
|
|
106
|
-
}: useRender.ComponentProps<"div">): React.ReactElement {
|
|
107
|
-
const defaultProps = {
|
|
108
|
-
className: cn(
|
|
109
|
-
"col-start-2 nth-3:row-span-2 nth-3:row-start-1 inline-flex self-center justify-self-end",
|
|
110
|
-
className,
|
|
111
|
-
),
|
|
112
|
-
"data-slot": "card-frame-action",
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
return useRender({
|
|
116
|
-
defaultTagName: "div",
|
|
117
|
-
props: mergeProps<"div">(defaultProps, props),
|
|
118
|
-
render,
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export function CardFrameFooter({
|
|
123
|
-
className,
|
|
124
|
-
render,
|
|
125
|
-
...props
|
|
126
|
-
}: useRender.ComponentProps<"div">): React.ReactElement {
|
|
127
|
-
const defaultProps = {
|
|
128
|
-
className: cn("px-6 py-4", className),
|
|
129
|
-
"data-slot": "card-frame-footer",
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
return useRender({
|
|
133
|
-
defaultTagName: "div",
|
|
134
|
-
props: mergeProps<"div">(defaultProps, props),
|
|
135
|
-
render,
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export function CardHeader({
|
|
140
|
-
className,
|
|
141
|
-
render,
|
|
142
|
-
...props
|
|
143
|
-
}: useRender.ComponentProps<"div">): React.ReactElement {
|
|
144
|
-
const defaultProps = {
|
|
145
|
-
className: cn(
|
|
146
|
-
"grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 p-6 in-[[data-slot=card]:has(>[data-slot=card-panel])]:pb-4 has-data-[slot=card-action]:grid-cols-[1fr_auto]",
|
|
147
|
-
className,
|
|
148
|
-
),
|
|
149
|
-
"data-slot": "card-header",
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
return useRender({
|
|
153
|
-
defaultTagName: "div",
|
|
154
|
-
props: mergeProps<"div">(defaultProps, props),
|
|
155
|
-
render,
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export function CardTitle({
|
|
160
|
-
className,
|
|
161
|
-
render,
|
|
162
|
-
...props
|
|
163
|
-
}: useRender.ComponentProps<"div">): React.ReactElement {
|
|
164
|
-
const defaultProps = {
|
|
165
|
-
className: cn("font-heading font-semibold text-lg leading-none", className),
|
|
166
|
-
"data-slot": "card-title",
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
return useRender({
|
|
170
|
-
defaultTagName: "div",
|
|
171
|
-
props: mergeProps<"div">(defaultProps, props),
|
|
172
|
-
render,
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export function CardDescription({
|
|
177
|
-
className,
|
|
178
|
-
render,
|
|
179
|
-
...props
|
|
180
|
-
}: useRender.ComponentProps<"div">): React.ReactElement {
|
|
181
|
-
const defaultProps = {
|
|
182
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
183
|
-
"data-slot": "card-description",
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
return useRender({
|
|
187
|
-
defaultTagName: "div",
|
|
188
|
-
props: mergeProps<"div">(defaultProps, props),
|
|
189
|
-
render,
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export function CardAction({
|
|
194
|
-
className,
|
|
195
|
-
render,
|
|
196
|
-
...props
|
|
197
|
-
}: useRender.ComponentProps<"div">): React.ReactElement {
|
|
198
|
-
const defaultProps = {
|
|
199
|
-
className: cn(
|
|
200
|
-
"col-start-2 row-span-2 row-start-1 inline-flex self-start justify-self-end",
|
|
201
|
-
className,
|
|
202
|
-
),
|
|
203
|
-
"data-slot": "card-action",
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
return useRender({
|
|
207
|
-
defaultTagName: "div",
|
|
208
|
-
props: mergeProps<"div">(defaultProps, props),
|
|
209
|
-
render,
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export function CardPanel({
|
|
214
|
-
className,
|
|
215
|
-
render,
|
|
216
|
-
...props
|
|
217
|
-
}: useRender.ComponentProps<"div">): React.ReactElement {
|
|
218
|
-
const defaultProps = {
|
|
219
|
-
className: cn(
|
|
220
|
-
"flex-1 p-6 in-[[data-slot=card]:has(>[data-slot=card-header]:not(.border-b))]:pt-0 in-[[data-slot=card]:has(>[data-slot=card-footer]:not(.border-t))]:pb-0",
|
|
221
|
-
className,
|
|
222
|
-
),
|
|
223
|
-
"data-slot": "card-panel",
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
return useRender({
|
|
227
|
-
defaultTagName: "div",
|
|
228
|
-
props: mergeProps<"div">(defaultProps, props),
|
|
229
|
-
render,
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
export function CardFooter({
|
|
234
|
-
className,
|
|
235
|
-
render,
|
|
236
|
-
...props
|
|
237
|
-
}: useRender.ComponentProps<"div">): React.ReactElement {
|
|
238
|
-
const defaultProps = {
|
|
239
|
-
className: cn(
|
|
240
|
-
"flex items-center p-6 in-[[data-slot=card]:has(>[data-slot=card-panel])]:pt-4",
|
|
241
|
-
className,
|
|
242
|
-
),
|
|
243
|
-
"data-slot": "card-footer",
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
return useRender({
|
|
247
|
-
defaultTagName: "div",
|
|
248
|
-
props: mergeProps<"div">(defaultProps, props),
|
|
249
|
-
render,
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
export { CardPanel as CardContent };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { describe, expect, mock, test } from "bun:test"
|
|
2
|
-
import { fireEvent, render, screen } from "@testing-library/react"
|
|
3
|
-
|
|
4
|
-
import { SegmentedToggle } from "../segmented-toggle"
|
|
5
|
-
|
|
6
|
-
const OPTIONS = [{ value: "preview", label: "Preview" }, { value: "markup", label: "Markup" }] as const
|
|
7
|
-
|
|
8
|
-
describe("SegmentedToggle", () => {
|
|
9
|
-
test("uncontrolled: click and arrow keys move the selection", () => {
|
|
10
|
-
const onValueChange = mock(() => {})
|
|
11
|
-
render(<SegmentedToggle label="View" options={OPTIONS} onValueChange={onValueChange} />)
|
|
12
|
-
const [preview, markup] = screen.getAllByRole("radio")
|
|
13
|
-
expect(preview.getAttribute("aria-checked")).toBe("true")
|
|
14
|
-
fireEvent.click(markup)
|
|
15
|
-
expect(markup.getAttribute("aria-checked")).toBe("true")
|
|
16
|
-
expect(onValueChange).toHaveBeenLastCalledWith("markup")
|
|
17
|
-
fireEvent.keyDown(markup, { key: "ArrowRight" })
|
|
18
|
-
expect(preview.getAttribute("aria-checked")).toBe("true")
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
test("controlled: value wins over clicks", () => {
|
|
22
|
-
render(<SegmentedToggle label="View" options={OPTIONS} value="markup" />)
|
|
23
|
-
const [preview, markup] = screen.getAllByRole("radio")
|
|
24
|
-
fireEvent.click(preview)
|
|
25
|
-
expect(markup.getAttribute("aria-checked")).toBe("true")
|
|
26
|
-
})
|
|
27
|
-
})
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type * as React from "react"
|
|
2
|
-
import { cn } from "@/lib/utils"
|
|
3
|
-
|
|
4
|
-
export interface IAvatarHandleProps extends React.ComponentPropsWithoutRef<"span"> {
|
|
5
|
-
src?: string
|
|
6
|
-
/** Initials shown when no image loads; two characters at most. */
|
|
7
|
-
initials?: string
|
|
8
|
-
size?: 16 | 20
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* 20px avatar for @-handle chips and reply headers.
|
|
13
|
-
*
|
|
14
|
-
* @sketch "Atom / Avatar / Handle 20"
|
|
15
|
-
*/
|
|
16
|
-
export function AvatarHandle({ src, initials, size = 20, className, ...props }: IAvatarHandleProps): React.ReactElement {
|
|
17
|
-
return (
|
|
18
|
-
<span
|
|
19
|
-
data-slot="avatar-handle"
|
|
20
|
-
className={cn(
|
|
21
|
-
"inline-flex shrink-0 select-none items-center justify-center overflow-hidden rounded-full bg-accent-subtle font-semibold text-accent-text",
|
|
22
|
-
size === 20 ? "size-5 text-[8px]" : "size-4 text-[7px]",
|
|
23
|
-
className
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
>
|
|
27
|
-
{src ? <img alt="" className="size-full object-cover" src={src} /> : initials?.slice(0, 2).toUpperCase()}
|
|
28
|
-
</span>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { Globe } from "lucide-react"
|
|
2
|
-
import type * as React from "react"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 28×14 uppercase file-format badge ("PDF", "CSV").
|
|
7
|
-
*
|
|
8
|
-
* @sketch "Atom / Badge / File Type"
|
|
9
|
-
*/
|
|
10
|
-
export function FileTypeBadge({ className, children, ...props }: React.ComponentPropsWithoutRef<"span">): React.ReactElement {
|
|
11
|
-
return (
|
|
12
|
-
<span
|
|
13
|
-
data-slot="file-type-badge"
|
|
14
|
-
className={cn(
|
|
15
|
-
"inline-flex h-3.5 min-w-7 shrink-0 items-center justify-center rounded-[4px] bg-surface-subtle px-1 text-[8px] font-bold uppercase leading-none tracking-wide text-text-secondary",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
>
|
|
20
|
-
{children}
|
|
21
|
-
</span>
|
|
22
|
-
)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface IFaviconProps extends React.ComponentPropsWithoutRef<"span"> {
|
|
26
|
-
src?: string
|
|
27
|
-
size?: 14 | 16
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* 16px site icon tile with a globe fallback.
|
|
32
|
-
*
|
|
33
|
-
* @sketch "Atom / Favicon"
|
|
34
|
-
*/
|
|
35
|
-
export function Favicon({ src, size = 16, className, ...props }: IFaviconProps): React.ReactElement {
|
|
36
|
-
return (
|
|
37
|
-
<span
|
|
38
|
-
data-slot="favicon"
|
|
39
|
-
className={cn(
|
|
40
|
-
"inline-flex shrink-0 items-center justify-center overflow-hidden rounded-[4px] bg-surface-subtle text-icon",
|
|
41
|
-
size === 16 ? "size-4 [&_svg]:size-2.5" : "size-3.5 [&_svg]:size-2",
|
|
42
|
-
className
|
|
43
|
-
)}
|
|
44
|
-
{...props}
|
|
45
|
-
>
|
|
46
|
-
{src ? <img alt="" className="size-full object-cover" src={src} /> : <Globe />}
|
|
47
|
-
</span>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Scrim pill with a mono duration ("0:42"), bottom-right of media previews.
|
|
53
|
-
*
|
|
54
|
-
* @sketch "Atom / Duration Pill"
|
|
55
|
-
*/
|
|
56
|
-
export function DurationPill({ className, children, ...props }: React.ComponentPropsWithoutRef<"span">): React.ReactElement {
|
|
57
|
-
return (
|
|
58
|
-
<span
|
|
59
|
-
data-slot="duration-pill"
|
|
60
|
-
className={cn(
|
|
61
|
-
"inline-flex h-4 shrink-0 items-center rounded-[4px] bg-overlay-scrim px-1.5 font-mono text-[10px] font-medium leading-none text-overlay-on-media",
|
|
62
|
-
className
|
|
63
|
-
)}
|
|
64
|
-
{...props}
|
|
65
|
-
>
|
|
66
|
-
{children}
|
|
67
|
-
</span>
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* 3px accent bar that rails a quote or reply.
|
|
73
|
-
*
|
|
74
|
-
* @sketch "Atom / Quote Rail"
|
|
75
|
-
*/
|
|
76
|
-
export function QuoteRail({ className, ...props }: React.ComponentPropsWithoutRef<"span">): React.ReactElement {
|
|
77
|
-
return (
|
|
78
|
-
<span
|
|
79
|
-
aria-hidden="true"
|
|
80
|
-
data-slot="quote-rail"
|
|
81
|
-
className={cn("block w-[3px] shrink-0 self-stretch rounded-full bg-accent-default", className)}
|
|
82
|
-
{...props}
|
|
83
|
-
/>
|
|
84
|
-
)
|
|
85
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import { Play, Plus, X } from "lucide-react"
|
|
4
|
-
import type * as React from "react"
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
import { Button, type TButtonProps } from "@/components/ui/button"
|
|
7
|
-
|
|
8
|
-
type TIconButtonProps = Omit<TButtonProps, "variant" | "size" | "glassVariant" | "children">
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 18px filled circle with an inverse ✕, used on composer chips.
|
|
12
|
-
*
|
|
13
|
-
* @sketch "Atom / Button / Remove"
|
|
14
|
-
*/
|
|
15
|
-
export function RemoveButton({ className, ...props }: TIconButtonProps): React.ReactElement {
|
|
16
|
-
return (
|
|
17
|
-
<Button
|
|
18
|
-
aria-label="Remove"
|
|
19
|
-
variant="ghost"
|
|
20
|
-
size="icon-xs"
|
|
21
|
-
className={cn(
|
|
22
|
-
"size-[18px] rounded-full border-0 bg-text-primary text-text-inverse hover:bg-text-primary/85 sm:size-[18px] [&_svg]:size-2.5! [&_svg]:opacity-100",
|
|
23
|
-
className
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
>
|
|
27
|
-
<X strokeWidth={3} />
|
|
28
|
-
</Button>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* 36px scrim circle with a white play glyph, centred on media previews.
|
|
34
|
-
*
|
|
35
|
-
* @sketch "Atom / Button / Play"
|
|
36
|
-
*/
|
|
37
|
-
export function PlayButton({ className, ...props }: TIconButtonProps): React.ReactElement {
|
|
38
|
-
return (
|
|
39
|
-
<Button
|
|
40
|
-
aria-label="Play"
|
|
41
|
-
variant="ghost"
|
|
42
|
-
size="icon"
|
|
43
|
-
className={cn(
|
|
44
|
-
"size-9 rounded-full border-0 bg-overlay-scrim text-overlay-on-media hover:bg-overlay-scrim/80 sm:size-9 [&_svg]:size-3.5! [&_svg]:translate-x-px [&_svg]:fill-current [&_svg]:opacity-100",
|
|
45
|
-
className
|
|
46
|
-
)}
|
|
47
|
-
{...props}
|
|
48
|
-
>
|
|
49
|
-
<Play />
|
|
50
|
-
</Button>
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* 26px ghost "+" for the composer's attach action.
|
|
56
|
-
*
|
|
57
|
-
* @sketch "Atom / Button / Add"
|
|
58
|
-
*/
|
|
59
|
-
export function AddButton({ className, ...props }: TIconButtonProps): React.ReactElement {
|
|
60
|
-
return (
|
|
61
|
-
<Button
|
|
62
|
-
aria-label="Add attachment"
|
|
63
|
-
variant="ghost"
|
|
64
|
-
size="icon-xs"
|
|
65
|
-
className={cn("size-[26px] rounded-md text-icon sm:size-[26px] [&_svg]:size-4!", className)}
|
|
66
|
-
{...props}
|
|
67
|
-
>
|
|
68
|
-
<Plus />
|
|
69
|
-
</Button>
|
|
70
|
-
)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export type TSendButtonProps = Omit<TButtonProps, "variant" | "glassVariant">
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Brand-yellow 61×31 pill, radius 8, dark label.
|
|
77
|
-
*
|
|
78
|
-
* @sketch "Atom / Button / Send"
|
|
79
|
-
*/
|
|
80
|
-
export function SendButton({ className, children = "Send", ...props }: TSendButtonProps): React.ReactElement {
|
|
81
|
-
return (
|
|
82
|
-
<Button
|
|
83
|
-
variant="ghost"
|
|
84
|
-
size="sm"
|
|
85
|
-
className={cn(
|
|
86
|
-
"h-[31px] rounded-md border-0 bg-brand px-4 text-[13px] font-semibold text-[#1a1a1a] shadow-none hover:bg-brand/90 data-pressed:bg-brand/90 sm:h-[31px] *:data-[slot=button-loading-indicator]:text-[#1a1a1a]",
|
|
87
|
-
className
|
|
88
|
-
)}
|
|
89
|
-
{...props}
|
|
90
|
-
>
|
|
91
|
-
{children}
|
|
92
|
-
</Button>
|
|
93
|
-
)
|
|
94
|
-
}
|