@ctrl-ui/react 0.8.7 → 0.8.9
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/dist/action-bar.d.ts +15 -7
- package/dist/action-bar.js +39 -19
- package/dist/activity.js +7 -15
- package/dist/audio-recorder.d.ts +14 -4
- package/dist/audio-recorder.js +82 -29
- package/dist/audio-visualizer.js +1 -1
- package/dist/blocks/coding-agent.js +39 -39
- package/dist/blocks/design-canvas.d.ts +5 -1
- package/dist/blocks/design-canvas.js +198 -92
- package/dist/blocks/discussion.d.ts +28 -0
- package/dist/blocks/discussion.js +67 -0
- package/dist/blocks/file-explorer-data.d.ts +1 -0
- package/dist/blocks/file-explorer-data.js +4 -1
- package/dist/blocks/file-explorer.d.ts +9 -1
- package/dist/blocks/file-explorer.js +461 -192
- package/dist/blocks/settings.d.ts +2 -1
- package/dist/blocks/settings.js +101 -79
- package/dist/blocks/team-chat.d.ts +12 -0
- package/dist/blocks/team-chat.js +26 -0
- package/dist/blocks/theme-toggle.js +23 -31
- package/dist/chat-composer-attachment.d.ts +4 -1
- package/dist/chat-composer-attachment.js +35 -10
- package/dist/chat-composer-editor/extensions/mention.d.ts +5 -1
- package/dist/chat-composer-editor/extensions/mention.js +59 -28
- package/dist/chat-composer-editor/ghost.js +2 -4
- package/dist/chat-composer-editor/types.d.ts +5 -0
- package/dist/chat-composer-editor.d.ts +1 -1
- package/dist/chat-composer-editor.js +57 -30
- package/dist/chat-composer.d.ts +13 -32
- package/dist/chat-composer.js +52 -12
- package/dist/chat-layout.d.ts +19 -0
- package/dist/chat-layout.js +91 -40
- package/dist/chat-message/social.d.ts +26 -0
- package/dist/chat-message/social.js +122 -0
- package/dist/chat-message.d.ts +28 -29
- package/dist/chat-message.js +106 -25
- package/dist/context.d.ts +2 -2
- package/dist/context.js +38 -23
- package/dist/dynamic-notification-canvas-loop.d.ts +24 -0
- package/dist/dynamic-notification-canvas-loop.js +113 -0
- package/dist/dynamic-notification-glass.js +23 -114
- package/dist/dynamic-notification-liquid.js +14 -118
- package/dist/dynamic-notification.d.ts +16 -8
- package/dist/dynamic-notification.js +85 -22
- package/dist/email/email-brand.d.ts +7 -4
- package/dist/email/email-brand.js +9 -6
- package/dist/email/email-code.d.ts +3 -2
- package/dist/email/email-code.js +11 -9
- package/dist/email/email-footer.d.ts +5 -3
- package/dist/email/email-footer.js +11 -5
- package/dist/email/email.d.ts +31 -9
- package/dist/email/email.js +50 -26
- package/dist/email/templates.d.ts +10 -9
- package/dist/email/templates.js +102 -38
- package/dist/email/theme.js +1 -1
- package/dist/environment-variables.d.ts +4 -2
- package/dist/environment-variables.js +52 -32
- package/dist/filter-bar/editor.js +20 -8
- package/dist/filter-bar/model.d.ts +1 -0
- package/dist/filter-bar/model.js +10 -1
- package/dist/filter-bar/motion.js +4 -4
- package/dist/filter-bar/parts.js +19 -8
- package/dist/filter-bar/types.d.ts +1 -0
- package/dist/filter-bar.js +19 -13
- package/dist/hooks/use-audio-recorder.js +12 -6
- package/dist/hooks/use-chat-composer.d.ts +19 -7
- package/dist/hooks/use-chat-composer.js +32 -5
- package/dist/hooks/use-chat-message.d.ts +28 -2
- package/dist/hooks/use-chat-message.js +41 -10
- package/dist/hooks/use-chat-thread-scroll.js +43 -7
- package/dist/hooks/use-color-area.d.ts +3 -3
- package/dist/hooks/use-color-area.js +13 -12
- package/dist/hooks/use-copy-to-clipboard.d.ts +2 -1
- package/dist/hooks/use-copy-to-clipboard.js +20 -20
- package/dist/hooks/use-dynamic-notification.d.ts +6 -2
- package/dist/hooks/use-dynamic-notification.js +26 -10
- package/dist/hooks/use-mobile.d.ts +3 -2
- package/dist/hooks/use-mobile.js +8 -4
- package/dist/hooks/use-textarea-trigger-menu.js +2 -1
- package/dist/hooks/use-trigger-menu.d.ts +54 -0
- package/dist/hooks/use-trigger-menu.js +102 -47
- package/dist/hooks/use-user-ask.d.ts +2 -0
- package/dist/hooks/use-user-ask.js +35 -41
- package/dist/inline-attachment.d.ts +6 -2
- package/dist/inline-attachment.js +36 -15
- package/dist/inline-citation.d.ts +12 -5
- package/dist/inline-citation.js +25 -16
- package/dist/knob-contracts/audio-recorder-knobs.d.ts +1 -1
- package/dist/knob-contracts/audio-recorder-knobs.js +2 -1
- package/dist/knob-contracts/audio-visualizer-knobs.d.ts +1 -1
- package/dist/knob-contracts/audio-visualizer-knobs.js +2 -1
- package/dist/knob-contracts/avatar-knobs.d.ts +1 -1
- package/dist/knob-contracts/avatar-knobs.js +6 -1
- package/dist/knob-contracts/badge-knobs.d.ts +1 -1
- package/dist/knob-contracts/badge-knobs.js +2 -1
- package/dist/knob-contracts/breadcrumb-knobs.d.ts +4 -0
- package/dist/knob-contracts/breadcrumb-knobs.js +8 -0
- package/dist/knob-contracts/button-knobs.d.ts +1 -1
- package/dist/knob-contracts/button-knobs.js +1 -0
- package/dist/knob-contracts/chat-message-knobs.d.ts +1 -1
- package/dist/knob-contracts/chat-message-knobs.js +8 -1
- package/dist/knob-contracts/code-diff-knobs.d.ts +1 -1
- package/dist/knob-contracts/code-diff-knobs.js +2 -0
- package/dist/knob-contracts/code-knobs.d.ts +1 -1
- package/dist/knob-contracts/code-knobs.js +2 -1
- package/dist/knob-contracts/dynamic-notification-knobs.d.ts +1 -1
- package/dist/knob-contracts/dynamic-notification-knobs.js +2 -0
- package/dist/knob-contracts/emoji-picker-knobs.d.ts +4 -0
- package/dist/knob-contracts/emoji-picker-knobs.js +10 -0
- package/dist/knob-contracts/field-knobs.d.ts +1 -1
- package/dist/knob-contracts/field-knobs.js +5 -1
- package/dist/knob-contracts/filter-bar-knobs.d.ts +1 -1
- package/dist/knob-contracts/filter-bar-knobs.js +1 -2
- package/dist/knob-contracts/markdown-knobs.d.ts +1 -1
- package/dist/knob-contracts/markdown-knobs.js +3 -1
- package/dist/knob-contracts/page-layout-knobs.d.ts +1 -1
- package/dist/knob-contracts/page-layout-knobs.js +2 -1
- package/dist/knob-contracts/popup-knobs.d.ts +1 -1
- package/dist/knob-contracts/popup-knobs.js +27 -0
- package/dist/knob-contracts/range-knobs.d.ts +1 -1
- package/dist/knob-contracts/range-knobs.js +1 -0
- package/dist/knob-contracts/rich-tooltip-knobs.d.ts +1 -1
- package/dist/knob-contracts/rich-tooltip-knobs.js +2 -1
- package/dist/knob-contracts/sidebar-knobs.d.ts +1 -1
- package/dist/knob-contracts/sidebar-knobs.js +27 -2
- package/dist/knob-contracts/spinner-knobs.d.ts +1 -1
- package/dist/knob-contracts/spinner-knobs.js +1 -1
- package/dist/knob-contracts/stepper-knobs.d.ts +1 -1
- package/dist/knob-contracts/stepper-knobs.js +4 -1
- package/dist/knob-contracts/switch-knobs.d.ts +1 -1
- package/dist/knob-contracts/switch-knobs.js +5 -0
- package/dist/knob-contracts/table-of-contents-knobs.d.ts +1 -1
- package/dist/knob-contracts/table-of-contents-knobs.js +2 -1
- package/dist/knob-contracts/tabs-knobs.d.ts +1 -1
- package/dist/knob-contracts/tabs-knobs.js +1 -0
- package/dist/knob-contracts/tree-knobs.d.ts +1 -1
- package/dist/knob-contracts/tree-knobs.js +2 -1
- package/dist/lib/cn.js +0 -4
- package/dist/lib/contrast.d.ts +1 -0
- package/dist/lib/contrast.js +17 -5
- package/dist/lib/dropzone-validation.js +41 -28
- package/dist/lib/env-file.d.ts +1 -1
- package/dist/lib/env-file.js +5 -5
- package/dist/lib/motion.d.ts +4 -0
- package/dist/lib/motion.js +15 -0
- package/dist/lib/trigger-detect.js +6 -8
- package/dist/markdown-block.js +2 -1
- package/dist/popup-parts.d.ts +8 -0
- package/dist/popup-parts.js +43 -0
- package/dist/source-badge.js +3 -1
- package/dist/styles/code.css +0 -2
- package/dist/styles/effects.css +6 -32
- package/dist/styles/index.css +10 -5
- package/dist/styles/recipes/accordion.css +9 -6
- package/dist/styles/recipes/action-bar.css +0 -15
- package/dist/styles/recipes/activity.css +5 -11
- package/dist/styles/recipes/alert.css +4 -4
- package/dist/styles/recipes/audio-recorder.css +15 -3
- package/dist/styles/recipes/audio-visualizer.css +13 -2
- package/dist/styles/recipes/avatar.css +78 -1
- package/dist/styles/recipes/badge.css +14 -4
- package/dist/styles/recipes/breadcrumb.css +77 -0
- package/dist/styles/recipes/button-group.css +5 -7
- package/dist/styles/recipes/button-states.css +66 -0
- package/dist/styles/recipes/button.css +24 -83
- package/dist/styles/recipes/calendar.css +17 -23
- package/dist/styles/recipes/card.css +2 -2
- package/dist/styles/recipes/chat-composer-attachment.css +9 -3
- package/dist/styles/recipes/chat-composer.css +7 -10
- package/dist/styles/recipes/chat-layout.css +35 -0
- package/dist/styles/recipes/chat-message-social.css +123 -0
- package/dist/styles/recipes/chat-message.css +157 -37
- package/dist/styles/recipes/choice.css +18 -21
- package/dist/styles/recipes/code-diff.css +46 -33
- package/dist/styles/recipes/code.css +36 -16
- package/dist/styles/recipes/collapsible.css +7 -2
- package/dist/styles/recipes/color-picker-details.css +3 -4
- package/dist/styles/recipes/color-picker-values.css +9 -8
- package/dist/styles/recipes/color-picker.css +11 -2
- package/dist/styles/recipes/context.css +3 -3
- package/dist/styles/recipes/dockable-panel.css +7 -4
- package/dist/styles/recipes/dropzone.css +7 -8
- package/dist/styles/recipes/dynamic-notification-input.css +8 -5
- package/dist/styles/recipes/dynamic-notification-motion.css +12 -21
- package/dist/styles/recipes/dynamic-notification.css +40 -26
- package/dist/styles/recipes/emoji-picker.css +132 -0
- package/dist/styles/recipes/empty.css +5 -4
- package/dist/styles/recipes/environment-variables.css +4 -15
- package/dist/styles/recipes/field-parts.css +30 -24
- package/dist/styles/recipes/field.css +61 -26
- package/dist/styles/recipes/filter-bar.css +18 -31
- package/dist/styles/recipes/gradient-editor.css +18 -7
- package/dist/styles/recipes/infinite-canvas.css +0 -1
- package/dist/styles/recipes/inline-attachment.css +3 -3
- package/dist/styles/recipes/inline-citation.css +10 -4
- package/dist/styles/recipes/item.css +23 -9
- package/dist/styles/recipes/markdown-block.css +5 -4
- package/dist/styles/recipes/markdown.css +68 -26
- package/dist/styles/recipes/morphing-panel.css +8 -8
- package/dist/styles/recipes/page-layout.css +20 -12
- package/dist/styles/recipes/pagination.css +4 -5
- package/dist/styles/recipes/phone-input.css +12 -8
- package/dist/styles/recipes/popup-controls.css +166 -33
- package/dist/styles/recipes/popup-drawer.css +3 -14
- package/dist/styles/recipes/popup-lists.css +128 -27
- package/dist/styles/recipes/popup-motion.css +4 -45
- package/dist/styles/recipes/popup-toast.css +55 -26
- package/dist/styles/recipes/popup.css +139 -141
- package/dist/styles/recipes/range.css +54 -18
- package/dist/styles/recipes/resizable.css +2 -7
- package/dist/styles/recipes/rich-tooltip.css +24 -34
- package/dist/styles/recipes/scroll-area.css +8 -1
- package/dist/styles/recipes/sidebar-menu.css +166 -34
- package/dist/styles/recipes/sidebar-parts.css +192 -0
- package/dist/styles/recipes/sidebar.css +188 -128
- package/dist/styles/recipes/source-badge.css +1 -1
- package/dist/styles/recipes/spinner.css +8 -1
- package/dist/styles/recipes/stepper.css +31 -13
- package/dist/styles/recipes/switch.css +68 -23
- package/dist/styles/recipes/table-of-contents.css +9 -1
- package/dist/styles/recipes/table.css +14 -10
- package/dist/styles/recipes/tabs.css +17 -12
- package/dist/styles/recipes/task-list.css +7 -14
- package/dist/styles/recipes/thread-rail.css +42 -19
- package/dist/styles/recipes/timeline.css +2 -0
- package/dist/styles/recipes/toolbar.css +27 -25
- package/dist/styles/recipes/track-highlight.css +10 -7
- package/dist/styles/recipes/tree.css +31 -4
- package/dist/styles/recipes/user-ask-details.css +0 -1
- package/dist/styles/recipes/user-ask.css +4 -4
- package/dist/styles/theme.css +37 -16
- package/dist/task-list.d.ts +4 -1
- package/dist/task-list.js +24 -8
- package/dist/thread-rail.d.ts +1 -1
- package/dist/thread-rail.js +61 -19
- package/dist/transcript-divider.js +2 -1
- package/dist/ui/alert.d.ts +3 -1
- package/dist/ui/alert.js +14 -8
- package/dist/ui/autocomplete.js +3 -1
- package/dist/ui/avatar.d.ts +8 -0
- package/dist/ui/avatar.js +23 -3
- package/dist/ui/badge.js +1 -1
- package/dist/ui/breadcrumb.d.ts +27 -0
- package/dist/ui/breadcrumb.js +88 -0
- package/dist/ui/button.d.ts +2 -1
- package/dist/ui/button.js +1 -1
- package/dist/ui/calendar.js +2 -2
- package/dist/ui/card.d.ts +3 -1
- package/dist/ui/card.js +12 -7
- package/dist/ui/checkbox.d.ts +2 -0
- package/dist/ui/code-diff.d.ts +1 -1
- package/dist/ui/code-diff.js +71 -27
- package/dist/ui/code.d.ts +5 -3
- package/dist/ui/code.js +26 -27
- package/dist/ui/color-picker.d.ts +5 -2
- package/dist/ui/color-picker.js +84 -36
- package/dist/ui/combobox-disabled-selection.d.ts +1 -2
- package/dist/ui/combobox-disabled-selection.js +7 -9
- package/dist/ui/combobox.js +13 -5
- package/dist/ui/command.d.ts +8 -2
- package/dist/ui/command.js +30 -14
- package/dist/ui/context-menu.js +3 -0
- package/dist/ui/dialog.d.ts +2 -1
- package/dist/ui/dialog.js +3 -22
- package/dist/ui/dockable-panel-geometry.d.ts +1 -0
- package/dist/ui/dockable-panel-geometry.js +7 -1
- package/dist/ui/dockable-panel.d.ts +9 -6
- package/dist/ui/dockable-panel.js +63 -23
- package/dist/ui/dropdown-menu.js +4 -3
- package/dist/ui/dropzone.d.ts +2 -2
- package/dist/ui/dropzone.js +75 -16
- package/dist/ui/emoji-picker.d.ts +18 -0
- package/dist/ui/emoji-picker.js +136 -0
- package/dist/ui/empty.d.ts +3 -1
- package/dist/ui/empty.js +12 -7
- package/dist/ui/gradient-editor.d.ts +1 -1
- package/dist/ui/gradient-editor.js +37 -21
- package/dist/ui/infinite-canvas.d.ts +3 -2
- package/dist/ui/infinite-canvas.js +63 -19
- package/dist/ui/input-group.d.ts +0 -3
- package/dist/ui/input-group.js +3 -13
- package/dist/ui/input-otp.d.ts +1 -1
- package/dist/ui/input-otp.js +32 -15
- package/dist/ui/input.js +4 -4
- package/dist/ui/item.d.ts +2 -1
- package/dist/ui/item.js +11 -7
- package/dist/ui/live-status.d.ts +7 -0
- package/dist/ui/live-status.js +17 -0
- package/dist/ui/markdown-elements.d.ts +6 -0
- package/dist/ui/markdown-elements.js +31 -1
- package/dist/ui/menubar.js +2 -2
- package/dist/ui/morphing-panel.js +2 -1
- package/dist/ui/native-select.d.ts +1 -1
- package/dist/ui/native-select.js +24 -11
- package/dist/ui/page-layout.d.ts +2 -2
- package/dist/ui/page-layout.js +2 -4
- package/dist/ui/pagination.d.ts +7 -5
- package/dist/ui/pagination.js +19 -13
- package/dist/ui/phone-input.d.ts +1 -0
- package/dist/ui/phone-input.js +56 -58
- package/dist/ui/radio-group.d.ts +2 -0
- package/dist/ui/resizable.d.ts +3 -2
- package/dist/ui/resizable.js +5 -3
- package/dist/ui/responsive-dialog.d.ts +1 -1
- package/dist/ui/responsive-dialog.js +4 -21
- package/dist/ui/rich-tooltip.d.ts +10 -4
- package/dist/ui/rich-tooltip.js +81 -33
- package/dist/ui/scroll-area.d.ts +1 -1
- package/dist/ui/scroll-area.js +43 -28
- package/dist/ui/sidebar-menu.d.ts +5 -1
- package/dist/ui/sidebar-menu.js +34 -34
- package/dist/ui/sidebar-provider.d.ts +10 -1
- package/dist/ui/sidebar-provider.js +38 -13
- package/dist/ui/sidebar-resize-rail.js +7 -3
- package/dist/ui/sidebar.d.ts +11 -6
- package/dist/ui/sidebar.js +48 -24
- package/dist/ui/slider.js +31 -22
- package/dist/ui/spinner.d.ts +3 -2
- package/dist/ui/spinner.js +3 -2
- package/dist/ui/stepper.d.ts +8 -1
- package/dist/ui/stepper.js +74 -25
- package/dist/ui/switch.d.ts +1 -0
- package/dist/ui/table-of-contents.d.ts +2 -2
- package/dist/ui/table-of-contents.js +20 -8
- package/dist/ui/table.js +4 -2
- package/dist/ui/textarea.d.ts +1 -1
- package/dist/ui/textarea.js +20 -9
- package/dist/ui/timeline.d.ts +3 -1
- package/dist/ui/timeline.js +17 -9
- package/dist/ui/toast.d.ts +11 -5
- package/dist/ui/toast.js +100 -54
- package/dist/ui/toolbar.d.ts +2 -1
- package/dist/ui/toolbar.js +3 -1
- package/dist/ui/tooltip.js +3 -20
- package/dist/ui/tree.js +120 -80
- package/dist/ui/trigger-menu.js +1 -0
- package/dist/user-ask.d.ts +10 -5
- package/dist/user-ask.js +31 -11
- package/package.json +5 -1
- package/dist/hooks/use-keyboard-navigation.d.ts +0 -3
- package/dist/hooks/use-keyboard-navigation.js +0 -22
package/dist/styles/theme.css
CHANGED
|
@@ -201,6 +201,7 @@
|
|
|
201
201
|
--duration-fast: 150ms;
|
|
202
202
|
--duration-base: 200ms;
|
|
203
203
|
--duration-slow: 300ms;
|
|
204
|
+
--duration-loop: 1000ms;
|
|
204
205
|
--ease-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
205
206
|
--ease-emphasized: cubic-bezier(0.16, 1, 0.3, 1);
|
|
206
207
|
--z-overlay: 70;
|
|
@@ -218,16 +219,21 @@
|
|
|
218
219
|
--warning-text: var(--scale-yellow-11);
|
|
219
220
|
--info-text: var(--scale-blue-11);
|
|
220
221
|
--ring-opacity: 1;
|
|
221
|
-
--focus-ring: var(--ring);
|
|
222
|
+
--focus-ring: oklch(from var(--ring) l c h / calc(alpha * 0.7));
|
|
222
223
|
--focus-ring-width: 2px;
|
|
223
224
|
--focus-ring-style: solid;
|
|
224
225
|
--focus-ring-offset: 2px;
|
|
225
226
|
|
|
226
227
|
--control-rim: var(--border);
|
|
227
228
|
--control-rim-width: 1px;
|
|
229
|
+
--control-boundary: oklch(from var(--foreground) l c h / 0.6);
|
|
228
230
|
--control-fill: oklch(from var(--card) l c h / 0.72);
|
|
229
231
|
--hover-fill: oklch(from var(--foreground) l c h / 0.06);
|
|
230
232
|
--active-fill: oklch(from var(--foreground) l c h / 0.08);
|
|
233
|
+
--image-outline: oklch(0 0 0 / 0.1);
|
|
234
|
+
--disabled-opacity: 0.45;
|
|
235
|
+
--touch-target: 44px;
|
|
236
|
+
--target-min: 24px;
|
|
231
237
|
|
|
232
238
|
--text-micro: 0.625rem;
|
|
233
239
|
--text-caption: 0.6875rem;
|
|
@@ -250,6 +256,7 @@
|
|
|
250
256
|
--text-display--line-height: 1.1;
|
|
251
257
|
--text-display--font-weight: 600;
|
|
252
258
|
--text-display--letter-spacing: -0.026em;
|
|
259
|
+
--text-input-min: 16px;
|
|
253
260
|
|
|
254
261
|
--corner-shape: round;
|
|
255
262
|
--corner-radius-fit: 0.5;
|
|
@@ -320,7 +327,7 @@
|
|
|
320
327
|
--sidebar-accent: var(--hover-fill);
|
|
321
328
|
--sidebar-accent-foreground: var(--foreground);
|
|
322
329
|
--sidebar-border: var(--border);
|
|
323
|
-
--sidebar-ring: var(--ring);
|
|
330
|
+
--sidebar-ring: var(--focus-ring);
|
|
324
331
|
}
|
|
325
332
|
|
|
326
333
|
:where(.dark:root, .dark[data-skin], .dark [data-skin]) {
|
|
@@ -355,7 +362,6 @@
|
|
|
355
362
|
--destructive: oklch(0.551 0.1799 32);
|
|
356
363
|
--destructive-foreground: oklch(0.9645 0.008 84);
|
|
357
364
|
--ring: oklch(0.66 0 0);
|
|
358
|
-
--focus-ring: oklch(0.66 0 0);
|
|
359
365
|
--shadow-color: oklch(0 0 0);
|
|
360
366
|
--destructive-text: oklch(from var(--destructive) 0.78 c h);
|
|
361
367
|
--shadow-highlight: oklch(1 0 0 / 0.055);
|
|
@@ -365,6 +371,7 @@
|
|
|
365
371
|
--badge-fill-alpha: 0.2;
|
|
366
372
|
--badge-border-alpha: 0.24;
|
|
367
373
|
--badge-hover-alpha: 0.28;
|
|
374
|
+
--image-outline: oklch(1 0 0 / 0.1);
|
|
368
375
|
}
|
|
369
376
|
|
|
370
377
|
@custom-variant dark (&:is(.dark *));
|
|
@@ -379,7 +386,9 @@
|
|
|
379
386
|
--duration-slow: 0ms !important;
|
|
380
387
|
}
|
|
381
388
|
|
|
382
|
-
:where(:root, :root *, [data-skin], [data-skin]
|
|
389
|
+
:where(:root, :root *, [data-skin], [data-skin] *):where(:not([data-motion-essential], [data-motion-essential] *)),
|
|
390
|
+
:where(:root, :root *, [data-skin], [data-skin] *):where(:not([data-motion-essential], [data-motion-essential] *))::before,
|
|
391
|
+
:where(:root, :root *, [data-skin], [data-skin] *):where(:not([data-motion-essential], [data-motion-essential] *))::after {
|
|
383
392
|
scroll-behavior: auto !important;
|
|
384
393
|
transition-delay: 0ms !important;
|
|
385
394
|
transition-duration: 0ms !important;
|
|
@@ -397,14 +406,9 @@
|
|
|
397
406
|
--duration-slow: 0ms !important;
|
|
398
407
|
}
|
|
399
408
|
|
|
400
|
-
:where(
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
[data-motion="reduced"]::before,
|
|
404
|
-
[data-motion="reduced"]::after,
|
|
405
|
-
[data-motion="reduced"] *::before,
|
|
406
|
-
[data-motion="reduced"] *::after
|
|
407
|
-
) {
|
|
409
|
+
:where([data-motion="reduced"], [data-motion="reduced"] *):where(:not([data-motion-essential], [data-motion-essential] *)),
|
|
410
|
+
:where([data-motion="reduced"], [data-motion="reduced"] *):where(:not([data-motion-essential], [data-motion-essential] *))::before,
|
|
411
|
+
:where([data-motion="reduced"], [data-motion="reduced"] *):where(:not([data-motion-essential], [data-motion-essential] *))::after {
|
|
408
412
|
scroll-behavior: auto !important;
|
|
409
413
|
transition-delay: 0ms !important;
|
|
410
414
|
transition-duration: 0ms !important;
|
|
@@ -414,6 +418,10 @@
|
|
|
414
418
|
}
|
|
415
419
|
/* biome-ignore-end lint/complexity/noImportantStyles: Reduced motion must override skin and inline motion. */
|
|
416
420
|
|
|
421
|
+
@theme static {
|
|
422
|
+
--breakpoint-lg: 64rem;
|
|
423
|
+
}
|
|
424
|
+
|
|
417
425
|
@theme inline {
|
|
418
426
|
--color-background: var(--background);
|
|
419
427
|
--color-canvas: var(--canvas);
|
|
@@ -656,22 +664,35 @@
|
|
|
656
664
|
|
|
657
665
|
@layer components {
|
|
658
666
|
:where([data-control-family]):focus-visible,
|
|
659
|
-
:where([data-control-family][data-control="true"]):has(:focus-visible)
|
|
667
|
+
:where([data-control-family][data-control="true"]):has(:focus-visible),
|
|
668
|
+
:where([data-control-family][data-focus-ring="within"]):has(:focus-visible) {
|
|
660
669
|
outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring);
|
|
661
670
|
outline-offset: var(--focus-ring-offset);
|
|
662
671
|
}
|
|
663
672
|
|
|
664
|
-
:where(
|
|
673
|
+
:where(
|
|
674
|
+
[data-control-family][data-control="true"] [data-control-family],
|
|
675
|
+
[data-control-family][data-focus-ring="within"] [data-control-family]
|
|
676
|
+
):focus-visible {
|
|
665
677
|
outline-width: 0;
|
|
666
678
|
}
|
|
667
679
|
|
|
680
|
+
:where([data-control-family][data-highlighted]):focus-visible {
|
|
681
|
+
outline-offset: calc(var(--focus-ring-width) * -1);
|
|
682
|
+
}
|
|
683
|
+
|
|
668
684
|
@media (forced-colors: active) {
|
|
669
685
|
:where([data-control-family]):focus-visible,
|
|
670
|
-
:where([data-control-family][data-control="true"]):has(:focus-visible)
|
|
671
|
-
|
|
686
|
+
:where([data-control-family][data-control="true"]):has(:focus-visible),
|
|
687
|
+
:where([data-control-family][data-focus-ring="within"]):has(:focus-visible) {
|
|
688
|
+
outline-color: Highlight;
|
|
672
689
|
}
|
|
673
690
|
}
|
|
674
691
|
|
|
692
|
+
:where([data-icon-dir="inline"]:dir(rtl)) {
|
|
693
|
+
scale: -1 1;
|
|
694
|
+
}
|
|
695
|
+
|
|
675
696
|
:where([data-control-ui="chat-message"][data-slot="root"], [data-control-ui="chat-composer"][data-slot="root"]) {
|
|
676
697
|
opacity: 1;
|
|
677
698
|
filter: none;
|
package/dist/task-list.d.ts
CHANGED
|
@@ -3,13 +3,16 @@ import { TaskListKnobStyle } from "./knob-contracts/task-list-knobs.js";
|
|
|
3
3
|
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
4
4
|
//#region src/task-list.d.ts
|
|
5
5
|
export type TaskStatus = "pending" | "active" | "completed";
|
|
6
|
+
export type TaskStatusLabels = Record<TaskStatus, string>;
|
|
7
|
+
export declare const taskStatusLabels: TaskStatusLabels;
|
|
6
8
|
export type TaskListProps = Omit<CollapsibleProps, "style"> & {
|
|
9
|
+
statusLabels?: Partial<TaskStatusLabels>;
|
|
7
10
|
style?: CSSProperties & TaskListKnobStyle;
|
|
8
11
|
};
|
|
9
12
|
type TaskListStyleProps<Props, Style> = Omit<Props, "style"> & {
|
|
10
13
|
style?: CSSProperties & Style;
|
|
11
14
|
};
|
|
12
|
-
export declare function TaskList({ className, children, ...props }: TaskListProps): import("react").JSX.Element;
|
|
15
|
+
export declare function TaskList({ statusLabels, className, children, ...props }: TaskListProps): import("react").JSX.Element;
|
|
13
16
|
export type TaskListTriggerProps = TaskListStyleProps<ComponentProps<"button">, TaskListKnobStyle>;
|
|
14
17
|
export declare function TaskListTrigger({ className, children, ...props }: TaskListTriggerProps): import("react").JSX.Element;
|
|
15
18
|
export type TaskListProgressProps = TaskListStyleProps<ComponentProps<"span">, TaskListKnobStyle>;
|
package/dist/task-list.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { LiveStatus } from "./ui/live-status.js";
|
|
3
4
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./ui/collapsible.js";
|
|
4
5
|
import { createContext, useContext, useEffect, useId, useState } from "react";
|
|
5
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { ChevronRight, CircleCheck, CircleDashed, Loader2 } from "lucide-react";
|
|
7
8
|
//#region src/task-list.tsx
|
|
9
|
+
const taskStatusLabels = {
|
|
10
|
+
pending: "Pending",
|
|
11
|
+
active: "In progress",
|
|
12
|
+
completed: "Done"
|
|
13
|
+
};
|
|
8
14
|
const TaskListContext = createContext(null);
|
|
9
15
|
const TaskListRegistrationContext = createContext(null);
|
|
10
16
|
function useTaskListContext() {
|
|
@@ -31,7 +37,7 @@ function currentTaskIndex(tasks) {
|
|
|
31
37
|
if (pending !== -1) return pending;
|
|
32
38
|
return tasks.length - 1;
|
|
33
39
|
}
|
|
34
|
-
function TaskList({ className, children, ...props }) {
|
|
40
|
+
function TaskList({ statusLabels, className, children, ...props }) {
|
|
35
41
|
const [tasks, setTasks] = useState([]);
|
|
36
42
|
const [registration] = useState(() => ({
|
|
37
43
|
registerTask(entry) {
|
|
@@ -45,6 +51,11 @@ function TaskList({ className, children, ...props }) {
|
|
|
45
51
|
const currentIndex = currentTaskIndex(tasks);
|
|
46
52
|
const current = tasks[currentIndex];
|
|
47
53
|
const allCompleted = total > 0 && tasks.every((task) => task.status === "completed");
|
|
54
|
+
const labels = {
|
|
55
|
+
...taskStatusLabels,
|
|
56
|
+
...statusLabels
|
|
57
|
+
};
|
|
58
|
+
const progressStatus = current?.status === "active" ? `${current.label}: ${labels.active}` : "";
|
|
48
59
|
return /* @__PURE__ */ jsx(TaskListRegistrationContext.Provider, {
|
|
49
60
|
value: registration,
|
|
50
61
|
children: /* @__PURE__ */ jsx(TaskListContext.Provider, {
|
|
@@ -52,16 +63,17 @@ function TaskList({ className, children, ...props }) {
|
|
|
52
63
|
total,
|
|
53
64
|
current,
|
|
54
65
|
currentNumber: total === 0 ? 0 : currentIndex + 1,
|
|
55
|
-
allCompleted
|
|
66
|
+
allCompleted,
|
|
67
|
+
statusLabels: labels
|
|
56
68
|
},
|
|
57
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ jsxs(Collapsible, {
|
|
58
70
|
"data-control-ui": "task-list",
|
|
59
71
|
"data-control-family": "task-list",
|
|
60
72
|
"data-slot": "root",
|
|
61
73
|
"data-surface": "panel",
|
|
62
74
|
className: cn("w-full overflow-hidden", className),
|
|
63
75
|
...props,
|
|
64
|
-
children
|
|
76
|
+
children: [children, /* @__PURE__ */ jsx(LiveStatus, { message: progressStatus })]
|
|
65
77
|
})
|
|
66
78
|
})
|
|
67
79
|
});
|
|
@@ -101,13 +113,15 @@ function TaskListProgress({ className, children, ...props }) {
|
|
|
101
113
|
}
|
|
102
114
|
function TaskListLabel({ className, children, ...props }) {
|
|
103
115
|
const { current } = useTaskListContext();
|
|
116
|
+
const text = children ?? current?.label;
|
|
104
117
|
return /* @__PURE__ */ jsx("span", {
|
|
105
118
|
"data-control-ui": "task-list",
|
|
106
119
|
"data-control-family": "task-list",
|
|
107
120
|
"data-slot": "label",
|
|
121
|
+
title: typeof text === "string" ? text : void 0,
|
|
108
122
|
className: cn("min-w-0 flex-1 truncate", className),
|
|
109
123
|
...props,
|
|
110
|
-
children:
|
|
124
|
+
children: text
|
|
111
125
|
});
|
|
112
126
|
}
|
|
113
127
|
function TaskListContent({ className, children, ...props }) {
|
|
@@ -145,7 +159,7 @@ function TaskListItem({ label, status = "pending", className, children, ...props
|
|
|
145
159
|
className: cn("flex items-center", className),
|
|
146
160
|
...props,
|
|
147
161
|
children: [/* @__PURE__ */ jsx(TaskListIndicator, { status }), /* @__PURE__ */ jsx("span", {
|
|
148
|
-
className: "min-w-0 flex-1
|
|
162
|
+
className: "min-w-0 flex-1 text-pretty",
|
|
149
163
|
children: children ?? label
|
|
150
164
|
})]
|
|
151
165
|
});
|
|
@@ -157,6 +171,7 @@ const indicatorIcons = {
|
|
|
157
171
|
};
|
|
158
172
|
function TaskListIndicator({ status = "pending", className, ...props }) {
|
|
159
173
|
const Icon = indicatorIcons[status];
|
|
174
|
+
const statusLabels = useContext(TaskListContext)?.statusLabels ?? taskStatusLabels;
|
|
160
175
|
return /* @__PURE__ */ jsxs("span", {
|
|
161
176
|
"data-control-ui": "task-list",
|
|
162
177
|
"data-control-family": "task-list",
|
|
@@ -166,12 +181,13 @@ function TaskListIndicator({ status = "pending", className, ...props }) {
|
|
|
166
181
|
...props,
|
|
167
182
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
168
183
|
"aria-hidden": "true",
|
|
184
|
+
"data-motion-essential": status === "active" ? "" : void 0,
|
|
169
185
|
className: "size-3.5"
|
|
170
186
|
}), /* @__PURE__ */ jsx("span", {
|
|
171
187
|
className: "sr-only",
|
|
172
|
-
children: status
|
|
188
|
+
children: statusLabels[status]
|
|
173
189
|
})]
|
|
174
190
|
});
|
|
175
191
|
}
|
|
176
192
|
//#endregion
|
|
177
|
-
export { TaskList, TaskListContent, TaskListIndicator, TaskListItem, TaskListLabel, TaskListProgress, TaskListTrigger };
|
|
193
|
+
export { TaskList, TaskListContent, TaskListIndicator, TaskListItem, TaskListLabel, TaskListProgress, TaskListTrigger, taskStatusLabels };
|
package/dist/thread-rail.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare function ThreadRailItem({ from, inView, active, index, className,
|
|
|
18
18
|
export type ThreadRailLineProps = Omit<ComponentProps<"button">, "style"> & {
|
|
19
19
|
style?: CSSProperties & ThreadRailKnobStyle;
|
|
20
20
|
};
|
|
21
|
-
export declare function ThreadRailLine({ className, ...props }: ThreadRailLineProps): import("react").JSX.Element;
|
|
21
|
+
export declare function ThreadRailLine({ className, onKeyDown, "aria-label": ariaLabel, ...props }: ThreadRailLineProps): import("react").JSX.Element;
|
|
22
22
|
export type ThreadRailPopoverProps = Omit<ComponentProps<"div">, "style"> & {
|
|
23
23
|
children?: ReactNode;
|
|
24
24
|
style?: CSSProperties & ThreadRailKnobStyle;
|
package/dist/thread-rail.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "./lib/cn.js";
|
|
3
|
-
import { Children, cloneElement, createContext, isValidElement, useContext, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
3
|
+
import { Children, cloneElement, createContext, isValidElement, useContext, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/thread-rail.tsx
|
|
6
6
|
const useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
|
|
@@ -16,11 +16,14 @@ function useItem() {
|
|
|
16
16
|
if (!context) throw new Error("ThreadRail compound parts must be rendered inside <ThreadRailItem>.");
|
|
17
17
|
return context;
|
|
18
18
|
}
|
|
19
|
+
const LayerContext = createContext(null);
|
|
19
20
|
function ThreadRail({ className, children, style, ...props }) {
|
|
20
21
|
const [hovered, setHovered] = useState(0);
|
|
21
22
|
const cardRef = useRef(null);
|
|
22
23
|
const activeLayerRef = useRef(null);
|
|
23
24
|
const [cardHeight, setCardHeight] = useState();
|
|
25
|
+
const baseId = useId();
|
|
26
|
+
const lines = useRef([]);
|
|
24
27
|
const items = Children.toArray(children).filter((child) => isValidElement(child));
|
|
25
28
|
const popovers = items.map((item) => {
|
|
26
29
|
const popover = Children.toArray(item.props.children).find((child) => isValidElement(child) && child.type === ThreadRailPopover);
|
|
@@ -40,7 +43,10 @@ function ThreadRail({ className, children, style, ...props }) {
|
|
|
40
43
|
return /* @__PURE__ */ jsx(RailContext.Provider, {
|
|
41
44
|
value: {
|
|
42
45
|
current: hovered,
|
|
43
|
-
|
|
46
|
+
count: items.length,
|
|
47
|
+
activate: setHovered,
|
|
48
|
+
layerId: (index, part) => `${baseId}-${index}-${part}`,
|
|
49
|
+
lines
|
|
44
50
|
},
|
|
45
51
|
children: /* @__PURE__ */ jsxs("nav", {
|
|
46
52
|
"data-control-ui": "thread-rail",
|
|
@@ -52,6 +58,7 @@ function ThreadRail({ className, children, style, ...props }) {
|
|
|
52
58
|
...props,
|
|
53
59
|
children: [items.map((item, index) => cloneElement(item, { index })), /* @__PURE__ */ jsx("div", {
|
|
54
60
|
ref: cardRef,
|
|
61
|
+
"aria-hidden": "true",
|
|
55
62
|
"data-control-ui": "thread-rail",
|
|
56
63
|
"data-control-family": "thread-rail",
|
|
57
64
|
"data-slot": "popover",
|
|
@@ -61,14 +68,16 @@ function ThreadRail({ className, children, style, ...props }) {
|
|
|
61
68
|
height: cardHeight
|
|
62
69
|
},
|
|
63
70
|
className: cn("pointer-events-none z-20 w-72 overflow-hidden", activePopover?.className),
|
|
64
|
-
children: items.map((item, index) => /* @__PURE__ */ jsx(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx(LayerContext.Provider, {
|
|
72
|
+
value: index,
|
|
73
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
74
|
+
"data-control-ui": "thread-rail",
|
|
75
|
+
"data-control-family": "thread-rail",
|
|
76
|
+
"data-slot": "popover-layer",
|
|
77
|
+
ref: index === hovered ? activeLayerRef : void 0,
|
|
78
|
+
"data-active": index === hovered ? "true" : void 0,
|
|
79
|
+
children: popovers[index]?.children ?? null
|
|
80
|
+
})
|
|
72
81
|
}, item.key ?? index))
|
|
73
82
|
})]
|
|
74
83
|
})
|
|
@@ -81,7 +90,7 @@ function ThreadRailItem({ from = "user", inView = false, active = false, index =
|
|
|
81
90
|
value: {
|
|
82
91
|
index,
|
|
83
92
|
inView: isInView,
|
|
84
|
-
|
|
93
|
+
active
|
|
85
94
|
},
|
|
86
95
|
children: /* @__PURE__ */ jsx("div", {
|
|
87
96
|
"data-control-ui": "thread-rail",
|
|
@@ -97,38 +106,71 @@ function ThreadRailItem({ from = "user", inView = false, active = false, index =
|
|
|
97
106
|
})
|
|
98
107
|
});
|
|
99
108
|
}
|
|
100
|
-
function
|
|
101
|
-
const
|
|
109
|
+
function rovingTarget(key, index, count) {
|
|
110
|
+
const last = count - 1;
|
|
111
|
+
return {
|
|
112
|
+
ArrowDown: Math.min(index + 1, last),
|
|
113
|
+
ArrowUp: Math.max(index - 1, 0),
|
|
114
|
+
Home: 0,
|
|
115
|
+
End: last
|
|
116
|
+
}[key];
|
|
117
|
+
}
|
|
118
|
+
function ThreadRailLine({ className, onKeyDown, "aria-label": ariaLabel, ...props }) {
|
|
119
|
+
const { index, active } = useItem();
|
|
120
|
+
const rail = useRail();
|
|
102
121
|
return /* @__PURE__ */ jsx("button", {
|
|
122
|
+
ref: (node) => {
|
|
123
|
+
rail.lines.current[index] = node;
|
|
124
|
+
},
|
|
103
125
|
"data-control-ui": "thread-rail",
|
|
104
126
|
"data-control-family": "thread-rail",
|
|
105
127
|
"data-slot": "line",
|
|
106
128
|
type: "button",
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
129
|
+
tabIndex: index === rail.current ? 0 : -1,
|
|
130
|
+
"aria-current": active ? "location" : void 0,
|
|
131
|
+
"aria-label": ariaLabel,
|
|
132
|
+
"aria-labelledby": ariaLabel === void 0 ? rail.layerId(index, "title") : void 0,
|
|
133
|
+
"aria-describedby": rail.layerId(index, "summary"),
|
|
134
|
+
onMouseEnter: () => rail.activate(index),
|
|
135
|
+
onFocus: () => rail.activate(index),
|
|
136
|
+
onKeyDown: (event) => {
|
|
137
|
+
onKeyDown?.(event);
|
|
138
|
+
const target = event.defaultPrevented ? void 0 : rovingTarget(event.key, index, rail.count);
|
|
139
|
+
if (target === void 0) return;
|
|
140
|
+
event.preventDefault();
|
|
141
|
+
rail.lines.current[target]?.focus();
|
|
142
|
+
},
|
|
143
|
+
className: cn("relative block cursor-pointer", className),
|
|
111
144
|
...props
|
|
112
145
|
});
|
|
113
146
|
}
|
|
114
147
|
function ThreadRailPopover(_props) {
|
|
115
148
|
return null;
|
|
116
149
|
}
|
|
150
|
+
function useLayerId(part) {
|
|
151
|
+
const rail = useRail();
|
|
152
|
+
const layer = useContext(LayerContext);
|
|
153
|
+
return layer === null ? void 0 : rail.layerId(layer, part);
|
|
154
|
+
}
|
|
117
155
|
function ThreadRailTitle({ className, ...props }) {
|
|
156
|
+
const id = useLayerId("title");
|
|
118
157
|
return /* @__PURE__ */ jsx("div", {
|
|
158
|
+
id,
|
|
119
159
|
"data-control-ui": "thread-rail",
|
|
120
160
|
"data-control-family": "thread-rail",
|
|
121
161
|
"data-slot": "title",
|
|
122
|
-
className: cn("
|
|
162
|
+
className: cn("line-clamp-2 text-pretty", className),
|
|
123
163
|
...props
|
|
124
164
|
});
|
|
125
165
|
}
|
|
126
166
|
function ThreadRailSummary({ className, ...props }) {
|
|
167
|
+
const id = useLayerId("summary");
|
|
127
168
|
return /* @__PURE__ */ jsx("p", {
|
|
169
|
+
id,
|
|
128
170
|
"data-control-ui": "thread-rail",
|
|
129
171
|
"data-control-family": "thread-rail",
|
|
130
172
|
"data-slot": "summary",
|
|
131
|
-
className: cn("line-clamp-3", className),
|
|
173
|
+
className: cn("line-clamp-3 text-pretty", className),
|
|
132
174
|
...props
|
|
133
175
|
});
|
|
134
176
|
}
|
|
@@ -3,6 +3,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
//#region src/transcript-divider.tsx
|
|
4
4
|
function TranscriptDivider({ tone = "neutral", className, children, ...props }) {
|
|
5
5
|
return /* @__PURE__ */ jsx("div", {
|
|
6
|
+
role: children == null ? "separator" : void 0,
|
|
6
7
|
"data-control-ui": "transcript-divider",
|
|
7
8
|
"data-control-family": "transcript-divider",
|
|
8
9
|
"data-slot": "root",
|
|
@@ -17,7 +18,7 @@ function TranscriptDividerLabel({ className, ...props }) {
|
|
|
17
18
|
"data-control-ui": "transcript-divider",
|
|
18
19
|
"data-control-family": "transcript-divider",
|
|
19
20
|
"data-slot": "label",
|
|
20
|
-
className: cn("min-w-0
|
|
21
|
+
className: cn("min-w-0 text-center text-pretty", className),
|
|
21
22
|
...props
|
|
22
23
|
});
|
|
23
24
|
}
|
package/dist/ui/alert.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RenderProp } from "../control-props.js";
|
|
1
2
|
import { AlertKnobStyle } from "../knob-contracts/alert-knobs.js";
|
|
2
3
|
import { CSSProperties, ComponentProps } from "react";
|
|
3
4
|
//#region src/ui/alert.d.ts
|
|
@@ -9,12 +10,13 @@ export type AlertProps = Omit<ComponentProps<"div">, "style"> & {
|
|
|
9
10
|
variant?: AlertVariant;
|
|
10
11
|
};
|
|
11
12
|
export type AlertTitleProps = Omit<ComponentProps<"div">, "style"> & {
|
|
13
|
+
render?: RenderProp<ComponentProps<"div">>;
|
|
12
14
|
style?: CSSProperties & AlertKnobStyle;
|
|
13
15
|
};
|
|
14
16
|
export type AlertDescriptionProps = Omit<ComponentProps<"div">, "style"> & {
|
|
15
17
|
style?: CSSProperties & AlertKnobStyle;
|
|
16
18
|
};
|
|
17
19
|
export declare function Alert({ variant, className, ...props }: AlertProps): import("react").JSX.Element;
|
|
18
|
-
export declare function AlertTitle({ className, ...props }: AlertTitleProps): import("react").
|
|
20
|
+
export declare function AlertTitle({ render, className, ...props }: AlertTitleProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
19
21
|
export declare function AlertDescription({ className, ...props }: AlertDescriptionProps): import("react").JSX.Element;
|
|
20
22
|
//#endregion
|
package/dist/ui/alert.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn } from "../lib/cn.js";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
5
|
//#region src/ui/alert.tsx
|
|
4
6
|
const alertVariants = ["default", "destructive"];
|
|
5
7
|
function Alert({ variant = "default", className, ...props }) {
|
|
6
8
|
return /* @__PURE__ */ jsx("div", {
|
|
7
|
-
role: "alert",
|
|
9
|
+
role: variant === "destructive" ? "alert" : "status",
|
|
8
10
|
"data-control-ui": "alert",
|
|
9
11
|
"data-control-family": "alert",
|
|
10
12
|
"data-slot": "root",
|
|
@@ -14,13 +16,17 @@ function Alert({ variant = "default", className, ...props }) {
|
|
|
14
16
|
...props
|
|
15
17
|
});
|
|
16
18
|
}
|
|
17
|
-
function AlertTitle({ className, ...props }) {
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
function AlertTitle({ render, className, ...props }) {
|
|
20
|
+
return useRender({
|
|
21
|
+
defaultTagName: "div",
|
|
22
|
+
render,
|
|
23
|
+
props: {
|
|
24
|
+
...props,
|
|
25
|
+
"data-control-ui": "alert",
|
|
26
|
+
"data-control-family": "alert",
|
|
27
|
+
"data-slot": "title",
|
|
28
|
+
className: cn("col-start-2 min-w-0", className)
|
|
29
|
+
}
|
|
24
30
|
});
|
|
25
31
|
}
|
|
26
32
|
function AlertDescription({ className, ...props }) {
|
package/dist/ui/autocomplete.js
CHANGED
|
@@ -53,7 +53,7 @@ function AutocompleteInput({ size = "md", className, ...props }) {
|
|
|
53
53
|
"data-size": size,
|
|
54
54
|
className: cn("w-full min-w-0 disabled:cursor-not-allowed", className),
|
|
55
55
|
...props
|
|
56
|
-
}), /* @__PURE__ */ jsx(AutocompleteClear, { className: "absolute
|
|
56
|
+
}), /* @__PURE__ */ jsx(AutocompleteClear, { className: "absolute end-1.5 top-1/2 -translate-y-1/2" })]
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
function AutocompleteContent({ className, children, sideOffset = 6, ...props }) {
|
|
@@ -85,7 +85,9 @@ function AutocompleteContent({ className, children, sideOffset = 6, ...props })
|
|
|
85
85
|
function AutocompleteList({ className, children, ...props }) {
|
|
86
86
|
return /* @__PURE__ */ jsx(ScrollArea, {
|
|
87
87
|
className: "w-full",
|
|
88
|
+
viewportClassName: "overscroll-contain",
|
|
88
89
|
maxHeight: "min(18rem, var(--available-height))",
|
|
90
|
+
lockAxis: "x",
|
|
89
91
|
children: /* @__PURE__ */ jsx(Autocomplete$1.List, {
|
|
90
92
|
"data-control-ui": "autocomplete",
|
|
91
93
|
"data-popup-kind": "autocomplete",
|
package/dist/ui/avatar.d.ts
CHANGED
|
@@ -16,8 +16,16 @@ export type AvatarFallbackProps = Omit<ComponentProps<"span">, "style"> & {
|
|
|
16
16
|
delay?: number;
|
|
17
17
|
style?: CSSProperties & AvatarKnobStyle;
|
|
18
18
|
};
|
|
19
|
+
export declare const avatarBadgeStatuses: readonly ["online", "away", "busy", "offline"];
|
|
20
|
+
export type AvatarBadgeStatus = (typeof avatarBadgeStatuses)[number];
|
|
21
|
+
export type AvatarBadgeProps = Omit<ComponentProps<"span">, "style"> & {
|
|
22
|
+
status?: AvatarBadgeStatus;
|
|
23
|
+
label?: string;
|
|
24
|
+
style?: CSSProperties & AvatarKnobStyle;
|
|
25
|
+
};
|
|
19
26
|
export declare function Avatar({ className, ...props }: AvatarProps): import("react").JSX.Element;
|
|
20
27
|
export declare function AvatarGroup({ className, ...props }: AvatarGroupProps): import("react").JSX.Element;
|
|
21
28
|
export declare function AvatarImage({ className, ...props }: AvatarImageProps): import("react").JSX.Element;
|
|
22
29
|
export declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): import("react").JSX.Element;
|
|
30
|
+
export declare function AvatarBadge({ className, status, label, children, ...props }: AvatarBadgeProps): import("react").JSX.Element;
|
|
23
31
|
//#endregion
|
package/dist/ui/avatar.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
5
5
|
//#region src/ui/avatar.tsx
|
|
6
|
+
const avatarBadgeStatuses = [
|
|
7
|
+
"online",
|
|
8
|
+
"away",
|
|
9
|
+
"busy",
|
|
10
|
+
"offline"
|
|
11
|
+
];
|
|
6
12
|
function Avatar({ className, ...props }) {
|
|
7
13
|
return /* @__PURE__ */ jsx(Avatar$1.Root, {
|
|
8
14
|
"data-control-ui": "avatar",
|
|
9
15
|
"data-control-family": "avatar",
|
|
10
16
|
"data-slot": "root",
|
|
11
|
-
className: cn("relative inline-flex shrink-0 select-none items-center justify-center
|
|
17
|
+
className: cn("relative inline-flex shrink-0 select-none items-center justify-center align-middle", className),
|
|
12
18
|
...props
|
|
13
19
|
});
|
|
14
20
|
}
|
|
@@ -40,5 +46,19 @@ function AvatarFallback({ className, ...props }) {
|
|
|
40
46
|
...props
|
|
41
47
|
});
|
|
42
48
|
}
|
|
49
|
+
function AvatarBadge({ className, status, label, children, ...props }) {
|
|
50
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
51
|
+
"data-control-ui": "avatar",
|
|
52
|
+
"data-control-family": "avatar",
|
|
53
|
+
"data-slot": "badge",
|
|
54
|
+
"data-status": status,
|
|
55
|
+
className: cn("absolute inline-flex items-center justify-center", className),
|
|
56
|
+
...props,
|
|
57
|
+
children: [children, label ? /* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: "sr-only",
|
|
59
|
+
children: label
|
|
60
|
+
}) : null]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
43
63
|
//#endregion
|
|
44
|
-
export { Avatar, AvatarFallback, AvatarGroup, AvatarImage };
|
|
64
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarImage, avatarBadgeStatuses };
|
package/dist/ui/badge.js
CHANGED
|
@@ -27,7 +27,7 @@ function Badge({ variant = "default", size = "md", color, render, className, chi
|
|
|
27
27
|
"data-variant": variant,
|
|
28
28
|
"data-size": size,
|
|
29
29
|
"data-color": resolvedColor,
|
|
30
|
-
className: cn("inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap border font-medium [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
30
|
+
className: cn("inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap border font-medium [&>svg]:pointer-events-none [&>svg]:size-3", className),
|
|
31
31
|
children
|
|
32
32
|
}
|
|
33
33
|
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { RenderProp } from "../control-props.js";
|
|
2
|
+
import { BreadcrumbKnobStyle } from "../knob-contracts/breadcrumb-knobs.js";
|
|
3
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
4
|
+
//#region src/ui/breadcrumb.d.ts
|
|
5
|
+
export declare function Breadcrumb({ className, ...props }: ComponentProps<"nav"> & {
|
|
6
|
+
style?: CSSProperties & BreadcrumbKnobStyle;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
export declare function BreadcrumbList({ className, ...props }: Omit<ComponentProps<"ol">, "style"> & {
|
|
9
|
+
style?: CSSProperties & BreadcrumbKnobStyle;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
export declare function BreadcrumbItem({ className, ...props }: ComponentProps<"li"> & {
|
|
12
|
+
style?: CSSProperties & BreadcrumbKnobStyle;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export declare function BreadcrumbLink({ render, className, children, ...props }: ComponentProps<"a"> & {
|
|
15
|
+
render?: RenderProp<ComponentProps<"a">>;
|
|
16
|
+
}): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
17
|
+
export declare function BreadcrumbPage({ className, ...props }: Omit<ComponentProps<"span">, "style"> & {
|
|
18
|
+
style?: CSSProperties & BreadcrumbKnobStyle;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
export declare function BreadcrumbSeparator({ children, className, ...props }: ComponentProps<"li"> & {
|
|
21
|
+
style?: CSSProperties & BreadcrumbKnobStyle;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
23
|
+
export declare function BreadcrumbEllipsis({ label, className, ...props }: Omit<ComponentProps<"span">, "children"> & {
|
|
24
|
+
label?: string;
|
|
25
|
+
style?: CSSProperties & BreadcrumbKnobStyle;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
//#endregion
|