@ctrl-ui/react 0.8.1 → 0.8.4
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 +32 -23
- package/dist/action-bar.d.ts +11 -12
- package/dist/activity.d.ts +24 -25
- package/dist/audio-recorder.d.ts +16 -16
- package/dist/audio-visualizer.d.ts +3 -4
- package/dist/blocks/chat.d.ts +3 -4
- package/dist/blocks/chat.js +6 -3
- package/dist/blocks/coding-agent.d.ts +11 -12
- package/dist/blocks/coding-agent.js +10 -9
- package/dist/blocks/file-explorer-data.d.ts +11 -12
- package/dist/blocks/file-explorer.d.ts +3 -3
- package/dist/blocks/settings-data.d.ts +8 -9
- package/dist/blocks/settings.d.ts +4 -4
- package/dist/blocks/theme-toggle.d.ts +11 -12
- package/dist/blocks/theme-toggle.js +14 -4
- package/dist/chat-composer-attachment.d.ts +20 -21
- package/dist/chat-composer-attachment.js +24 -20
- package/dist/chat-composer-editor/extensions/mention.d.ts +5 -6
- package/dist/chat-composer-editor/ghost.d.ts +3 -4
- package/dist/chat-composer-editor/schema.d.ts +2 -3
- package/dist/chat-composer-editor/serialize.d.ts +3 -4
- package/dist/chat-composer-editor/types.d.ts +5 -6
- package/dist/chat-composer-editor.d.ts +2 -3
- package/dist/chat-composer-editor.js +18 -4
- package/dist/chat-composer.d.ts +17 -18
- package/dist/chat-composer.js +14 -8
- package/dist/chat-layout.d.ts +12 -21
- package/dist/chat-layout.js +28 -83
- package/dist/chat-message.d.ts +14 -15
- package/dist/context-model.d.ts +7 -8
- package/dist/context.d.ts +21 -22
- package/dist/control-props.d.ts +10 -11
- package/dist/control-variants.d.ts +6 -7
- package/dist/dynamic-notification-glass.d.ts +3 -4
- package/dist/dynamic-notification-liquid.d.ts +3 -4
- package/dist/dynamic-notification-siri-wave.d.ts +2 -3
- package/dist/dynamic-notification.d.ts +28 -29
- package/dist/email/email.d.ts +6 -7
- package/dist/email/email.js +12 -3
- package/dist/email/length.d.ts +3 -0
- package/dist/email/length.js +34 -0
- package/dist/email/templates.d.ts +7 -8
- package/dist/email/templates.js +5 -5
- package/dist/email/theme.d.ts +16 -5
- package/dist/email/theme.js +21 -6
- package/dist/environment-variables.d.ts +35 -36
- package/dist/extensions/create-track-highlight.d.ts +3 -4
- package/dist/extensions/supports-anchor-transitions.d.ts +2 -3
- package/dist/extensions/track-highlight.d.ts +3 -4
- package/dist/hooks/use-audio-recorder.d.ts +14 -15
- package/dist/hooks/use-chat-composer.d.ts +5 -6
- package/dist/hooks/use-chat-message.d.ts +7 -8
- package/dist/hooks/use-color-area.d.ts +5 -6
- package/dist/hooks/use-copy-to-clipboard.d.ts +7 -8
- package/dist/hooks/use-dropzone.d.ts +11 -12
- package/dist/hooks/use-dynamic-notification.d.ts +6 -7
- package/dist/hooks/use-environment-variables.d.ts +9 -10
- package/dist/hooks/use-keyboard-navigation.d.ts +3 -0
- package/dist/hooks/use-keyboard-navigation.js +22 -0
- package/dist/hooks/use-mobile.d.ts +2 -3
- package/dist/hooks/use-textarea-trigger-menu.d.ts +2 -3
- package/dist/hooks/use-trigger-menu.d.ts +7 -8
- package/dist/hooks/use-user-ask.d.ts +6 -7
- package/dist/inline-attachment.d.ts +16 -17
- package/dist/inline-citation.d.ts +22 -23
- package/dist/knob-contracts/accordion-knobs.d.ts +3 -4
- package/dist/knob-contracts/accordion-knobs.js +1 -0
- package/dist/knob-contracts/action-bar-knobs.d.ts +3 -4
- package/dist/knob-contracts/activity-knobs.d.ts +3 -4
- package/dist/knob-contracts/alert-knobs.d.ts +3 -4
- package/dist/knob-contracts/alert-knobs.js +12 -1
- package/dist/knob-contracts/audio-recorder-knobs.d.ts +3 -4
- package/dist/knob-contracts/audio-visualizer-knobs.d.ts +3 -4
- package/dist/knob-contracts/avatar-knobs.d.ts +3 -4
- package/dist/knob-contracts/avatar-knobs.js +2 -1
- package/dist/knob-contracts/badge-knobs.d.ts +3 -4
- package/dist/knob-contracts/button-group-knobs.d.ts +3 -4
- package/dist/knob-contracts/button-knobs.d.ts +3 -4
- package/dist/knob-contracts/button-knobs.js +1 -0
- package/dist/knob-contracts/calendar-knobs.d.ts +3 -4
- package/dist/knob-contracts/card-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-attachment-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-attachment-knobs.js +3 -1
- package/dist/knob-contracts/chat-composer-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-knobs.js +1 -0
- package/dist/knob-contracts/chat-layout-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-layout-knobs.js +2 -3
- package/dist/knob-contracts/chat-message-knobs.d.ts +3 -4
- package/dist/knob-contracts/choice-knobs.d.ts +3 -4
- package/dist/knob-contracts/choice-knobs.js +2 -1
- package/dist/knob-contracts/code-diff-knobs.d.ts +3 -4
- package/dist/knob-contracts/code-diff-knobs.js +1 -0
- package/dist/knob-contracts/code-knobs.d.ts +3 -4
- package/dist/knob-contracts/code-knobs.js +3 -1
- package/dist/knob-contracts/collapsible-knobs.d.ts +3 -4
- package/dist/knob-contracts/color-picker-knobs.d.ts +3 -4
- package/dist/knob-contracts/context-knobs.d.ts +3 -4
- package/dist/knob-contracts/dockable-panel-knobs.d.ts +3 -4
- package/dist/knob-contracts/dockable-panel-knobs.js +1 -0
- package/dist/knob-contracts/dropzone-knobs.d.ts +3 -4
- package/dist/knob-contracts/dropzone-knobs.js +1 -0
- package/dist/knob-contracts/dynamic-notification-knobs.d.ts +3 -4
- package/dist/knob-contracts/empty-knobs.d.ts +3 -4
- package/dist/knob-contracts/empty-knobs.js +14 -1
- package/dist/knob-contracts/environment-variables-knobs.d.ts +3 -4
- package/dist/knob-contracts/environment-variables-knobs.js +2 -1
- package/dist/knob-contracts/field-knobs.d.ts +3 -4
- package/dist/knob-contracts/gradient-editor-knobs.d.ts +3 -4
- package/dist/knob-contracts/gradient-editor-knobs.js +3 -1
- package/dist/knob-contracts/infinite-canvas-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-attachment-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-attachment-knobs.js +2 -1
- package/dist/knob-contracts/inline-citation-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-citation-knobs.js +1 -0
- package/dist/knob-contracts/item-knobs.d.ts +3 -4
- package/dist/knob-contracts/kbd-knobs.d.ts +3 -4
- package/dist/knob-contracts/markdown-block-knobs.d.ts +3 -4
- package/dist/knob-contracts/markdown-block-knobs.js +2 -0
- package/dist/knob-contracts/markdown-knobs.d.ts +3 -4
- package/dist/knob-contracts/markdown-knobs.js +1 -0
- package/dist/knob-contracts/morphing-panel-knobs.d.ts +3 -4
- package/dist/knob-contracts/pagination-knobs.d.ts +3 -4
- package/dist/knob-contracts/phone-input-knobs.d.ts +3 -4
- package/dist/knob-contracts/phone-input-knobs.js +1 -0
- package/dist/knob-contracts/popup-knobs.d.ts +3 -4
- package/dist/knob-contracts/progressive-blur-knobs.d.ts +3 -4
- package/dist/knob-contracts/progressive-blur-knobs.js +1 -0
- package/dist/knob-contracts/range-knobs.d.ts +3 -4
- package/dist/knob-contracts/resizable-knobs.d.ts +3 -4
- package/dist/knob-contracts/resizable-knobs.js +1 -0
- package/dist/knob-contracts/rich-tooltip-knobs.d.ts +3 -4
- package/dist/knob-contracts/scroll-area-knobs.d.ts +3 -4
- package/dist/knob-contracts/separator-knobs.d.ts +3 -4
- package/dist/knob-contracts/sidebar-knobs.d.ts +3 -4
- package/dist/knob-contracts/sidebar-knobs.js +1 -0
- package/dist/knob-contracts/skeleton-knobs.d.ts +3 -4
- package/dist/knob-contracts/skeleton-knobs.js +9 -1
- package/dist/knob-contracts/source-badge-knobs.d.ts +3 -4
- package/dist/knob-contracts/spinner-knobs.d.ts +3 -4
- package/dist/knob-contracts/stepper-knobs.d.ts +3 -4
- package/dist/knob-contracts/stepper-knobs.js +1 -0
- package/dist/knob-contracts/switch-knobs.d.ts +3 -4
- package/dist/knob-contracts/switch-knobs.js +7 -1
- package/dist/knob-contracts/table-knobs.d.ts +3 -4
- package/dist/knob-contracts/table-of-contents-knobs.d.ts +3 -4
- package/dist/knob-contracts/table-of-contents-knobs.js +25 -0
- package/dist/knob-contracts/tabs-knobs.d.ts +3 -4
- package/dist/knob-contracts/tabs-knobs.js +2 -1
- package/dist/knob-contracts/task-list-knobs.d.ts +3 -4
- package/dist/knob-contracts/task-list-knobs.js +1 -0
- package/dist/knob-contracts/thread-rail-knobs.d.ts +3 -4
- package/dist/knob-contracts/timeline-knobs.d.ts +3 -4
- package/dist/knob-contracts/toolbar-knobs.d.ts +3 -4
- package/dist/knob-contracts/toolbar-knobs.js +1 -0
- package/dist/knob-contracts/track-highlight-knobs.d.ts +3 -4
- package/dist/knob-contracts/transcript-divider-knobs.d.ts +3 -4
- package/dist/knob-contracts/tree-knobs.d.ts +3 -4
- package/dist/knob-contracts/user-ask-knobs.d.ts +3 -4
- package/dist/knob-contracts/user-ask-knobs.js +1 -0
- package/dist/lib/cn.d.ts +2 -3
- package/dist/lib/code-tokens.d.ts +12 -13
- package/dist/lib/color.d.ts +26 -27
- package/dist/lib/contrast.d.ts +12 -13
- package/dist/lib/diff.d.ts +14 -15
- package/dist/lib/dropzone-validation.d.ts +25 -26
- package/dist/lib/env-file.d.ts +12 -13
- package/dist/lib/format-audio-recorder-duration.d.ts +2 -3
- package/dist/lib/liquid-glass-optics.d.ts +2 -3
- package/dist/lib/phone-input-format.d.ts +3 -4
- package/dist/lib/phone-input-format.js +1 -1
- package/dist/lib/phone-number.d.ts +8 -9
- package/dist/lib/trigger-detect.d.ts +4 -5
- package/dist/markdown-block.d.ts +11 -12
- package/dist/scripts/contrast-eval.d.ts +16 -17
- package/dist/scripts/contrast-eval.js +13 -7
- package/dist/skin-provider.d.ts +14 -0
- package/dist/skin-provider.js +21 -0
- package/dist/skin.d.ts +14 -33
- package/dist/skin.js +3 -46
- package/dist/source-badge.d.ts +7 -8
- package/dist/styles/index.css +2 -4
- package/dist/styles/recipes/accordion.css +8 -2
- package/dist/styles/recipes/action-bar.css +5 -2
- package/dist/styles/recipes/alert.css +95 -16
- package/dist/styles/recipes/avatar.css +17 -1
- package/dist/styles/recipes/badge.css +0 -1
- package/dist/styles/recipes/button.css +34 -8
- package/dist/styles/recipes/calendar.css +0 -6
- package/dist/styles/recipes/chat-composer-attachment.css +51 -53
- package/dist/styles/recipes/chat-composer.css +26 -21
- package/dist/styles/recipes/chat-layout.css +21 -62
- package/dist/styles/recipes/chat-message.css +11 -5
- package/dist/styles/recipes/choice.css +9 -2
- package/dist/styles/recipes/code-diff.css +8 -1
- package/dist/styles/recipes/code.css +39 -17
- package/dist/styles/recipes/collapsible.css +0 -3
- package/dist/styles/recipes/color-picker-details.css +1 -2
- package/dist/styles/recipes/color-picker-values.css +0 -4
- package/dist/styles/recipes/dockable-panel.css +8 -1
- package/dist/styles/recipes/dropzone.css +9 -2
- package/dist/styles/recipes/empty.css +118 -17
- package/dist/styles/recipes/environment-variables.css +8 -1
- package/dist/styles/recipes/field-parts.css +1 -6
- package/dist/styles/recipes/field.css +9 -5
- package/dist/styles/recipes/gradient-editor.css +16 -5
- package/dist/styles/recipes/inline-attachment.css +13 -8
- package/dist/styles/recipes/inline-citation.css +8 -4
- package/dist/styles/recipes/item.css +1 -1
- package/dist/styles/recipes/kbd.css +8 -0
- package/dist/styles/recipes/markdown-block.css +16 -2
- package/dist/styles/recipes/markdown.css +12 -0
- package/dist/styles/recipes/morphing-panel.css +1 -1
- package/dist/styles/recipes/pagination.css +0 -4
- package/dist/styles/recipes/phone-input.css +8 -4
- package/dist/styles/recipes/popup-lists.css +11 -0
- package/dist/styles/recipes/popup-toast.css +1 -29
- package/dist/styles/recipes/popup.css +2 -2
- package/dist/styles/recipes/progressive-blur.css +28 -7
- package/dist/styles/recipes/range.css +50 -1
- package/dist/styles/recipes/resizable.css +8 -10
- package/dist/styles/recipes/rich-tooltip.css +0 -4
- package/dist/styles/recipes/scroll-area.css +8 -2
- package/dist/styles/recipes/sidebar-menu.css +150 -0
- package/dist/styles/recipes/sidebar.css +56 -110
- package/dist/styles/recipes/skeleton.css +85 -3
- package/dist/styles/recipes/source-badge.css +0 -3
- package/dist/styles/recipes/stepper.css +8 -1
- package/dist/styles/recipes/switch.css +89 -17
- package/dist/styles/recipes/table-of-contents.css +211 -45
- package/dist/styles/recipes/table.css +0 -1
- package/dist/styles/recipes/tabs.css +19 -2
- package/dist/styles/recipes/task-list.css +8 -2
- package/dist/styles/recipes/thread-rail.css +0 -4
- package/dist/styles/recipes/toolbar.css +18 -4
- package/dist/styles/recipes/track-highlight.css +63 -5
- package/dist/styles/recipes/tree.css +2 -0
- package/dist/styles/recipes/user-ask.css +8 -4
- package/dist/styles/theme.css +130 -138
- package/dist/surface-variants.d.ts +4 -5
- package/dist/task-list.d.ts +16 -17
- package/dist/thread-rail.d.ts +21 -22
- package/dist/transcript-divider.d.ts +6 -7
- package/dist/ui/accordion.d.ts +10 -11
- package/dist/ui/alert-dialog.d.ts +11 -12
- package/dist/ui/alert-dialog.js +8 -6
- package/dist/ui/alert.d.ts +9 -10
- package/dist/ui/alert.js +3 -3
- package/dist/ui/aspect-ratio.d.ts +3 -4
- package/dist/ui/autocomplete.d.ts +19 -20
- package/dist/ui/autocomplete.js +5 -3
- package/dist/ui/avatar.d.ts +9 -10
- package/dist/ui/badge.d.ts +9 -10
- package/dist/ui/button-group.d.ts +7 -8
- package/dist/ui/button-group.js +3 -2
- package/dist/ui/button.d.ts +17 -18
- package/dist/ui/button.js +20 -5
- package/dist/ui/calendar.d.ts +3 -4
- package/dist/ui/card.d.ts +16 -17
- package/dist/ui/checkbox-group.d.ts +4 -5
- package/dist/ui/checkbox-group.js +3 -2
- package/dist/ui/checkbox.d.ts +3 -4
- package/dist/ui/code-diff.d.ts +8 -9
- package/dist/ui/code.d.ts +32 -23
- package/dist/ui/code.js +41 -20
- package/dist/ui/collapsible.d.ts +7 -8
- package/dist/ui/color-picker.d.ts +40 -41
- package/dist/ui/color-picker.js +5 -3
- package/dist/ui/combobox-disabled-selection.d.ts +3 -4
- package/dist/ui/combobox.d.ts +21 -20
- package/dist/ui/combobox.js +5 -3
- package/dist/ui/command.d.ts +19 -18
- package/dist/ui/command.js +38 -12
- package/dist/ui/context-menu.d.ts +30 -31
- package/dist/ui/context-menu.js +8 -5
- package/dist/ui/dialog.d.ts +13 -13
- package/dist/ui/dialog.js +10 -8
- package/dist/ui/dockable-panel-geometry.d.ts +7 -8
- package/dist/ui/dockable-panel.d.ts +21 -22
- package/dist/ui/drawer.d.ts +17 -18
- package/dist/ui/drawer.js +7 -6
- package/dist/ui/dropdown-menu.d.ts +36 -29
- package/dist/ui/dropdown-menu.js +116 -9
- package/dist/ui/dropzone.d.ts +24 -24
- package/dist/ui/empty.d.ts +14 -14
- package/dist/ui/empty.js +3 -3
- package/dist/ui/field.d.ts +26 -27
- package/dist/ui/form.d.ts +4 -5
- package/dist/ui/gradient-editor.d.ts +16 -17
- package/dist/ui/hover-card.d.ts +6 -7
- package/dist/ui/hover-card.js +5 -3
- package/dist/ui/infinite-canvas.d.ts +11 -12
- package/dist/ui/input-group.d.ts +6 -7
- package/dist/ui/input-otp.d.ts +7 -8
- package/dist/ui/input.d.ts +3 -4
- package/dist/ui/item.d.ts +20 -21
- package/dist/ui/kbd.d.ts +7 -5
- package/dist/ui/kbd.js +4 -2
- package/dist/ui/markdown-elements.d.ts +20 -21
- package/dist/ui/markdown.d.ts +5 -6
- package/dist/ui/menubar.d.ts +25 -26
- package/dist/ui/menubar.js +8 -5
- package/dist/ui/meter.d.ts +11 -12
- package/dist/ui/morphing-panel.d.ts +8 -9
- package/dist/ui/native-select.d.ts +3 -4
- package/dist/ui/native-select.js +1 -1
- package/dist/ui/navigation-menu.d.ts +17 -18
- package/dist/ui/navigation-menu.js +5 -3
- package/dist/ui/number-field.d.ts +15 -16
- package/dist/ui/pagination.d.ts +10 -11
- package/dist/ui/phone-input.d.ts +5 -6
- package/dist/ui/phone-input.js +40 -37
- package/dist/ui/popover.d.ts +11 -12
- package/dist/ui/popover.js +5 -3
- package/dist/ui/progress.d.ts +11 -12
- package/dist/ui/progressive-blur.d.ts +4 -5
- package/dist/ui/radio-group.d.ts +5 -6
- package/dist/ui/resizable.d.ts +12 -13
- package/dist/ui/responsive-dialog.d.ts +11 -12
- package/dist/ui/rich-tooltip-tour.d.ts +5 -6
- package/dist/ui/rich-tooltip.d.ts +21 -23
- package/dist/ui/rich-tooltip.js +5 -5
- package/dist/ui/scroll-area.d.ts +7 -8
- package/dist/ui/scroll-area.js +9 -6
- package/dist/ui/select.d.ts +21 -14
- package/dist/ui/select.js +7 -4
- package/dist/ui/separator.d.ts +2 -3
- package/dist/ui/sheet.d.ts +8 -9
- package/dist/ui/sheet.js +7 -5
- package/dist/ui/sidebar-menu.d.ts +24 -15
- package/dist/ui/sidebar-menu.js +30 -4
- package/dist/ui/sidebar-provider.d.ts +32 -7
- package/dist/ui/sidebar-provider.js +82 -22
- package/dist/ui/sidebar-resize-rail.d.ts +8 -0
- package/dist/ui/sidebar-resize-rail.js +192 -0
- package/dist/ui/sidebar.d.ts +20 -14
- package/dist/ui/sidebar.js +122 -57
- package/dist/ui/skeleton.d.ts +7 -4
- package/dist/ui/skeleton.js +9 -2
- package/dist/ui/slider.d.ts +6 -5
- package/dist/ui/slider.js +16 -13
- package/dist/ui/spinner.d.ts +3 -4
- package/dist/ui/stepper.d.ts +22 -23
- package/dist/ui/switch.d.ts +3 -4
- package/dist/ui/switch.js +12 -1
- package/dist/ui/table-of-contents.d.ts +7 -8
- package/dist/ui/table-of-contents.js +4 -2
- package/dist/ui/table.d.ts +17 -18
- package/dist/ui/tabs.d.ts +14 -11
- package/dist/ui/textarea.d.ts +3 -4
- package/dist/ui/timeline.d.ts +18 -19
- package/dist/ui/toast.d.ts +9 -9
- package/dist/ui/toast.js +21 -14
- package/dist/ui/toggle.d.ts +5 -6
- package/dist/ui/toggle.js +3 -2
- package/dist/ui/toolbar.d.ts +15 -16
- package/dist/ui/toolbar.js +15 -4
- package/dist/ui/tooltip.d.ts +6 -13
- package/dist/ui/tooltip.js +7 -8
- package/dist/ui/tree.d.ts +18 -19
- package/dist/ui/tree.js +3 -2
- package/dist/ui/trigger-menu.d.ts +15 -16
- package/dist/ui/trigger-menu.js +5 -3
- package/dist/ui/use-switch-drag.d.ts +7 -0
- package/dist/ui/use-switch-drag.js +104 -0
- package/dist/user-ask.d.ts +24 -25
- package/package.json +15 -15
- package/dist/code-block-editor.d.ts +0 -59
- package/dist/code-block-editor.js +0 -250
- package/dist/knob-contracts/code-block-editor-knobs.d.ts +0 -5
- package/dist/knob-contracts/code-block-editor-knobs.js +0 -11
- package/dist/lib/code-block-shiki.d.ts +0 -9
- package/dist/lib/code-block-shiki.js +0 -6
- package/dist/skin.config.d.ts +0 -5
- package/dist/skin.config.js +0 -12
- package/dist/styles/recipes/code-block-editor.css +0 -136
- package/dist/styles/skin-theme.css +0 -137
- package/dist/styles/skin.css +0 -143
package/dist/ui/drawer.d.ts
CHANGED
|
@@ -2,41 +2,40 @@ import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
|
|
|
2
2
|
import { CSSProperties, ComponentProps } from "react";
|
|
3
3
|
import { Drawer as Drawer$1 } from "@base-ui/react/drawer";
|
|
4
4
|
//#region src/ui/drawer.d.ts
|
|
5
|
-
declare const drawerSides: readonly ["bottom", "top", "right", "left"];
|
|
6
|
-
type DrawerSide = (typeof drawerSides)[number];
|
|
7
|
-
declare const drawerContentPaddings: readonly ["default", "none"];
|
|
8
|
-
type DrawerContentPadding = (typeof drawerContentPaddings)[number];
|
|
9
|
-
declare const drawerContentSurfaces: readonly ["background", "card"];
|
|
10
|
-
type DrawerContentSurface = (typeof drawerContentSurfaces)[number];
|
|
11
|
-
declare const drawerContentVariants: readonly ["edge", "floating"];
|
|
12
|
-
type DrawerContentVariant = (typeof drawerContentVariants)[number];
|
|
13
|
-
declare function Drawer(props: ComponentProps<typeof Drawer$1.Root> & {
|
|
5
|
+
export declare const drawerSides: readonly ["bottom", "top", "right", "left"];
|
|
6
|
+
export type DrawerSide = (typeof drawerSides)[number];
|
|
7
|
+
export declare const drawerContentPaddings: readonly ["default", "none"];
|
|
8
|
+
export type DrawerContentPadding = (typeof drawerContentPaddings)[number];
|
|
9
|
+
export declare const drawerContentSurfaces: readonly ["background", "card"];
|
|
10
|
+
export type DrawerContentSurface = (typeof drawerContentSurfaces)[number];
|
|
11
|
+
export declare const drawerContentVariants: readonly ["edge", "floating"];
|
|
12
|
+
export type DrawerContentVariant = (typeof drawerContentVariants)[number];
|
|
13
|
+
export declare function Drawer(props: ComponentProps<typeof Drawer$1.Root> & {
|
|
14
14
|
side?: DrawerSide;
|
|
15
15
|
}): import("react").JSX.Element;
|
|
16
|
-
declare function DrawerTrigger({ className, ...props }: ComponentProps<typeof Drawer$1.Trigger> & {
|
|
16
|
+
export declare function DrawerTrigger({ className, ...props }: ComponentProps<typeof Drawer$1.Trigger> & {
|
|
17
17
|
style?: CSSProperties & PopupKnobStyle;
|
|
18
18
|
}): import("react").JSX.Element;
|
|
19
|
-
declare function DrawerClose({ className, ...props }: ComponentProps<typeof Drawer$1.Close> & {
|
|
19
|
+
export declare function DrawerClose({ className, ...props }: ComponentProps<typeof Drawer$1.Close> & {
|
|
20
20
|
style?: CSSProperties & PopupKnobStyle;
|
|
21
21
|
}): import("react").JSX.Element;
|
|
22
|
-
declare function DrawerContent({ className, children, side, padding, surface, variant, style, ...props }: Omit<ComponentProps<typeof Drawer$1.Popup>, "style"> & {
|
|
22
|
+
export declare function DrawerContent({ className, children, side, padding, surface, variant, style, ...props }: Omit<ComponentProps<typeof Drawer$1.Popup>, "style"> & {
|
|
23
23
|
side?: DrawerSide;
|
|
24
24
|
padding?: DrawerContentPadding;
|
|
25
25
|
surface?: DrawerContentSurface;
|
|
26
26
|
variant?: DrawerContentVariant;
|
|
27
27
|
style?: CSSProperties & PopupKnobStyle;
|
|
28
28
|
}): import("react").JSX.Element;
|
|
29
|
-
declare function DrawerHeader({ className, ...props }: ComponentProps<"div"> & {
|
|
29
|
+
export declare function DrawerHeader({ className, ...props }: ComponentProps<"div"> & {
|
|
30
30
|
style?: CSSProperties & PopupKnobStyle;
|
|
31
31
|
}): import("react").JSX.Element;
|
|
32
|
-
declare function DrawerFooter({ className, ...props }: ComponentProps<"div"> & {
|
|
32
|
+
export declare function DrawerFooter({ className, ...props }: ComponentProps<"div"> & {
|
|
33
33
|
style?: CSSProperties & PopupKnobStyle;
|
|
34
34
|
}): import("react").JSX.Element;
|
|
35
|
-
declare function DrawerTitle({ className, ...props }: Omit<ComponentProps<typeof Drawer$1.Title>, "style"> & {
|
|
35
|
+
export declare function DrawerTitle({ className, ...props }: Omit<ComponentProps<typeof Drawer$1.Title>, "style"> & {
|
|
36
36
|
style?: CSSProperties & PopupKnobStyle;
|
|
37
37
|
}): import("react").JSX.Element;
|
|
38
|
-
declare function DrawerDescription({ className, ...props }: Omit<ComponentProps<typeof Drawer$1.Description>, "style"> & {
|
|
38
|
+
export declare function DrawerDescription({ className, ...props }: Omit<ComponentProps<typeof Drawer$1.Description>, "style"> & {
|
|
39
39
|
style?: CSSProperties & PopupKnobStyle;
|
|
40
40
|
}): import("react").JSX.Element;
|
|
41
|
-
//#endregion
|
|
42
|
-
export { Drawer, DrawerClose, DrawerContent, DrawerContentPadding, DrawerContentSurface, DrawerContentVariant, DrawerDescription, DrawerFooter, DrawerHeader, DrawerSide, DrawerTitle, DrawerTrigger, drawerContentPaddings, drawerContentSurfaces, drawerContentVariants, drawerSides };
|
|
41
|
+
//#endregion
|
package/dist/ui/drawer.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
-
import {
|
|
3
|
+
import { controlEffectsAttribute } from "../skin.js";
|
|
4
|
+
import { useSkin } from "../skin-provider.js";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { Drawer as Drawer$1 } from "@base-ui/react/drawer";
|
|
6
7
|
//#region src/ui/drawer.tsx
|
|
@@ -76,7 +77,6 @@ function DrawerTrigger({ className, ...props }) {
|
|
|
76
77
|
function DrawerClose({ className, ...props }) {
|
|
77
78
|
return /* @__PURE__ */ jsx(Drawer$1.Close, {
|
|
78
79
|
"data-control-ui": "drawer",
|
|
79
|
-
"data-control-family": "popup",
|
|
80
80
|
"data-popup-kind": "drawer",
|
|
81
81
|
"data-slot": "close",
|
|
82
82
|
className,
|
|
@@ -84,6 +84,7 @@ function DrawerClose({ className, ...props }) {
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
function DrawerContent({ className, children, side = "bottom", padding = "default", surface = "background", variant = "edge", style, ...props }) {
|
|
87
|
+
const skin = useSkin();
|
|
87
88
|
const place = placement[variant][side];
|
|
88
89
|
const grabbable = side === "bottom" || side === "top";
|
|
89
90
|
const backdropStyle = style ? { "--cui-popup-backdrop-background": style["--cui-popup-backdrop-background"] } : void 0;
|
|
@@ -93,8 +94,8 @@ function DrawerContent({ className, children, side = "bottom", padding = "defaul
|
|
|
93
94
|
"data-popup-kind": "drawer",
|
|
94
95
|
"data-popup-part": "backdrop",
|
|
95
96
|
"data-slot": "backdrop",
|
|
96
|
-
"data-skin":
|
|
97
|
-
"data-effects":
|
|
97
|
+
"data-skin": skin.id,
|
|
98
|
+
"data-effects": controlEffectsAttribute(skin.effects),
|
|
98
99
|
className: "fixed inset-0 z-[70]",
|
|
99
100
|
style: backdropStyle
|
|
100
101
|
}), /* @__PURE__ */ jsx(Drawer$1.Viewport, {
|
|
@@ -104,8 +105,8 @@ function DrawerContent({ className, children, side = "bottom", padding = "defaul
|
|
|
104
105
|
"data-slot": "viewport",
|
|
105
106
|
"data-side": side,
|
|
106
107
|
"data-variant": variant,
|
|
107
|
-
"data-skin":
|
|
108
|
-
"data-effects":
|
|
108
|
+
"data-skin": skin.id,
|
|
109
|
+
"data-effects": controlEffectsAttribute(skin.effects),
|
|
109
110
|
className: cn("fixed inset-0 z-[71] flex", place.viewport),
|
|
110
111
|
children: /* @__PURE__ */ jsxs(Drawer$1.Popup, {
|
|
111
112
|
"data-control-ui": "drawer",
|
|
@@ -1,45 +1,52 @@
|
|
|
1
|
-
import { OpenChangeEventDetails } from "../control-props.js";
|
|
2
1
|
import { ControlSize } from "../control-variants.js";
|
|
3
2
|
import { ButtonKnobStyle } from "../knob-contracts/button-knobs.js";
|
|
4
3
|
import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
|
|
5
|
-
import { CSSProperties, ComponentProps
|
|
4
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
6
5
|
import { Menu } from "@base-ui/react/menu";
|
|
7
6
|
//#region src/ui/dropdown-menu.d.ts
|
|
8
|
-
type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
defaultOpen?: boolean;
|
|
12
|
-
onOpenChange?: (open: boolean, eventDetails: OpenChangeEventDetails) => void;
|
|
7
|
+
type DropdownMenuStyledProps<PrimitiveProps> = Omit<PrimitiveProps, "className" | "style"> & {
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
13
10
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
type
|
|
11
|
+
export type DropdownMenuProps = Menu.Root.Props;
|
|
12
|
+
export declare const dropdownMenuTriggerVariants: readonly ["surface", "ghost"];
|
|
13
|
+
export type DropdownMenuTriggerVariant = (typeof dropdownMenuTriggerVariants)[number];
|
|
14
|
+
export type DropdownMenuTriggerProps = Omit<ComponentProps<"button">, "style"> & Pick<ComponentProps<typeof Menu.Trigger>, "nativeButton" | "render"> & {
|
|
17
15
|
style?: CSSProperties & ButtonKnobStyle;
|
|
18
16
|
} & {
|
|
19
17
|
size?: ControlSize;
|
|
20
18
|
iconOnly?: boolean;
|
|
21
19
|
variant?: DropdownMenuTriggerVariant;
|
|
22
20
|
};
|
|
23
|
-
type DropdownMenuContentProps =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
type
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
type
|
|
21
|
+
export type DropdownMenuContentProps = DropdownMenuStyledProps<Menu.Popup.Props> & Pick<Menu.Positioner.Props, "side" | "sideOffset" | "align" | "alignOffset" | "collisionBoundary" | "collisionPadding" | "collisionAvoidance">;
|
|
22
|
+
export type DropdownMenuItemProps = DropdownMenuStyledProps<Menu.Item.Props>;
|
|
23
|
+
export type DropdownMenuGroupProps = DropdownMenuStyledProps<Menu.Group.Props>;
|
|
24
|
+
export type DropdownMenuCheckboxItemProps = DropdownMenuStyledProps<Menu.CheckboxItem.Props>;
|
|
25
|
+
export type DropdownMenuRadioGroupProps = DropdownMenuStyledProps<Menu.RadioGroup.Props>;
|
|
26
|
+
export type DropdownMenuRadioItemProps = DropdownMenuStyledProps<Menu.RadioItem.Props>;
|
|
27
|
+
export type DropdownMenuSubProps = Menu.SubmenuRoot.Props;
|
|
28
|
+
export type DropdownMenuSubTriggerProps = DropdownMenuStyledProps<Menu.SubmenuTrigger.Props>;
|
|
29
|
+
export type DropdownMenuSubContentProps = DropdownMenuContentProps;
|
|
30
|
+
export type DropdownMenuShortcutProps = DropdownMenuStyledProps<ComponentProps<"span">>;
|
|
31
|
+
export type DropdownMenuSeparatorProps = Omit<ComponentProps<"div">, "style"> & {
|
|
33
32
|
style?: CSSProperties & PopupKnobStyle;
|
|
34
33
|
};
|
|
35
|
-
type DropdownMenuLabelProps = Omit<ComponentProps<"div">, "style"> & {
|
|
34
|
+
export type DropdownMenuLabelProps = Omit<ComponentProps<"div">, "style"> & {
|
|
36
35
|
style?: CSSProperties & PopupKnobStyle;
|
|
37
36
|
};
|
|
38
|
-
declare function DropdownMenu({ children, ...props }: DropdownMenuProps): import("react").JSX.Element;
|
|
39
|
-
declare function DropdownMenuTrigger({ size, iconOnly, variant, className, children, disabled, ...props }: DropdownMenuTriggerProps): import("react").JSX.Element;
|
|
40
|
-
declare function DropdownMenuContent({ className, children, ...props }: DropdownMenuContentProps): import("react").JSX.Element;
|
|
41
|
-
declare function DropdownMenuItem({ className, ...props }: DropdownMenuItemProps): import("react").JSX.Element;
|
|
42
|
-
declare function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps): import("react").JSX.Element;
|
|
43
|
-
declare function DropdownMenuLabel({ className, ...props }: DropdownMenuLabelProps): import("react").JSX.Element;
|
|
44
|
-
|
|
45
|
-
export
|
|
37
|
+
export declare function DropdownMenu({ children, ...props }: DropdownMenuProps): import("react").JSX.Element;
|
|
38
|
+
export declare function DropdownMenuTrigger({ size, iconOnly, variant, className, children, disabled, ...props }: DropdownMenuTriggerProps): import("react").JSX.Element;
|
|
39
|
+
export declare function DropdownMenuContent({ className, children, side, sideOffset, align, alignOffset, collisionBoundary, collisionPadding, collisionAvoidance, ...props }: DropdownMenuContentProps): import("react").JSX.Element;
|
|
40
|
+
export declare function DropdownMenuItem({ className, ...props }: DropdownMenuItemProps): import("react").JSX.Element;
|
|
41
|
+
export declare function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps): import("react").JSX.Element;
|
|
42
|
+
export declare function DropdownMenuLabel({ className, ...props }: DropdownMenuLabelProps): import("react").JSX.Element;
|
|
43
|
+
export declare function DropdownMenuPortal(props: Menu.Portal.Props): import("react").JSX.Element;
|
|
44
|
+
export declare function DropdownMenuGroup(props: DropdownMenuGroupProps): import("react").JSX.Element;
|
|
45
|
+
export declare function DropdownMenuCheckboxItem({ className, children, ...props }: DropdownMenuCheckboxItemProps): import("react").JSX.Element;
|
|
46
|
+
export declare function DropdownMenuRadioGroup(props: DropdownMenuRadioGroupProps): import("react").JSX.Element;
|
|
47
|
+
export declare function DropdownMenuRadioItem({ className, children, ...props }: DropdownMenuRadioItemProps): import("react").JSX.Element;
|
|
48
|
+
export declare function DropdownMenuSub(props: DropdownMenuSubProps): import("react").JSX.Element;
|
|
49
|
+
export declare function DropdownMenuSubTrigger({ className, children, ...props }: DropdownMenuSubTriggerProps): import("react").JSX.Element;
|
|
50
|
+
export declare function DropdownMenuSubContent(props: DropdownMenuSubContentProps): import("react").JSX.Element;
|
|
51
|
+
export declare function DropdownMenuShortcut(props: DropdownMenuShortcutProps): import("react").JSX.Element;
|
|
52
|
+
//#endregion
|
package/dist/ui/dropdown-menu.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
-
import {
|
|
3
|
+
import { controlEffectsAttribute } from "../skin.js";
|
|
4
|
+
import { useSkin } from "../skin-provider.js";
|
|
4
5
|
import { popupItemStructureClasses } from "../surface-variants.js";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { Menu } from "@base-ui/react/menu";
|
|
7
8
|
//#region src/ui/dropdown-menu.tsx
|
|
8
9
|
const dropdownMenuTriggerVariants = ["surface", "ghost"];
|
|
@@ -29,13 +30,18 @@ function DropdownMenuTrigger({ size = "sm", iconOnly = false, variant = "surface
|
|
|
29
30
|
children
|
|
30
31
|
});
|
|
31
32
|
}
|
|
32
|
-
function DropdownMenuContent({ className, children, ...props }) {
|
|
33
|
+
function DropdownMenuContent({ className, children, side = "bottom", sideOffset = 6, align = "start", alignOffset, collisionBoundary, collisionPadding, collisionAvoidance, ...props }) {
|
|
34
|
+
const skin = useSkin();
|
|
33
35
|
return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
34
|
-
"data-skin":
|
|
35
|
-
"data-effects":
|
|
36
|
-
side
|
|
37
|
-
align
|
|
38
|
-
sideOffset
|
|
36
|
+
"data-skin": skin.id,
|
|
37
|
+
"data-effects": controlEffectsAttribute(skin.effects),
|
|
38
|
+
side,
|
|
39
|
+
align,
|
|
40
|
+
sideOffset,
|
|
41
|
+
alignOffset,
|
|
42
|
+
collisionBoundary,
|
|
43
|
+
collisionPadding,
|
|
44
|
+
collisionAvoidance,
|
|
39
45
|
className: "z-[80]",
|
|
40
46
|
children: /* @__PURE__ */ jsx(Menu.Popup, {
|
|
41
47
|
"data-control-ui": "dropdown-menu",
|
|
@@ -79,5 +85,106 @@ function DropdownMenuLabel({ className, ...props }) {
|
|
|
79
85
|
...props
|
|
80
86
|
});
|
|
81
87
|
}
|
|
88
|
+
function DropdownMenuPortal(props) {
|
|
89
|
+
return /* @__PURE__ */ jsx(Menu.Portal, { ...props });
|
|
90
|
+
}
|
|
91
|
+
function DropdownMenuGroup(props) {
|
|
92
|
+
return /* @__PURE__ */ jsx(Menu.Group, {
|
|
93
|
+
"data-control-ui": "dropdown-menu",
|
|
94
|
+
"data-control-family": "popup",
|
|
95
|
+
"data-slot": "group",
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function DropdownMenuCheckboxItem({ className, children, ...props }) {
|
|
100
|
+
return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
|
|
101
|
+
"data-control-ui": "dropdown-menu",
|
|
102
|
+
"data-control-family": "popup",
|
|
103
|
+
"data-popup-part": "item",
|
|
104
|
+
"data-slot": "checkbox-item",
|
|
105
|
+
className: cn("relative", popupItemStructureClasses, className),
|
|
106
|
+
...props,
|
|
107
|
+
children: [/* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, {
|
|
108
|
+
className: "pointer-events-none absolute start-2 flex size-4 items-center justify-center",
|
|
109
|
+
children: /* @__PURE__ */ jsx(DropdownMenuCheck, {})
|
|
110
|
+
}), children]
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function DropdownMenuRadioGroup(props) {
|
|
114
|
+
return /* @__PURE__ */ jsx(Menu.RadioGroup, {
|
|
115
|
+
"data-control-ui": "dropdown-menu",
|
|
116
|
+
"data-control-family": "popup",
|
|
117
|
+
"data-slot": "radio-group",
|
|
118
|
+
...props
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
122
|
+
return /* @__PURE__ */ jsxs(Menu.RadioItem, {
|
|
123
|
+
"data-control-ui": "dropdown-menu",
|
|
124
|
+
"data-control-family": "popup",
|
|
125
|
+
"data-popup-part": "item",
|
|
126
|
+
"data-slot": "radio-item",
|
|
127
|
+
className: cn("relative", popupItemStructureClasses, className),
|
|
128
|
+
...props,
|
|
129
|
+
children: [/* @__PURE__ */ jsx(Menu.RadioItemIndicator, {
|
|
130
|
+
className: "pointer-events-none absolute start-2 flex size-4 items-center justify-center",
|
|
131
|
+
children: /* @__PURE__ */ jsx(DropdownMenuCheck, {})
|
|
132
|
+
}), children]
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
function DropdownMenuCheck() {
|
|
136
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
137
|
+
viewBox: "0 0 12 12",
|
|
138
|
+
className: "size-3",
|
|
139
|
+
"aria-hidden": "true",
|
|
140
|
+
fill: "none",
|
|
141
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
142
|
+
d: "M2.5 6.5 5 9l4.5-5",
|
|
143
|
+
stroke: "currentColor",
|
|
144
|
+
strokeWidth: "1.6",
|
|
145
|
+
strokeLinecap: "round",
|
|
146
|
+
strokeLinejoin: "round"
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function DropdownMenuSub(props) {
|
|
151
|
+
return /* @__PURE__ */ jsx(Menu.SubmenuRoot, { ...props });
|
|
152
|
+
}
|
|
153
|
+
function DropdownMenuSubTrigger({ className, children, ...props }) {
|
|
154
|
+
return /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
|
|
155
|
+
"data-control-ui": "dropdown-menu",
|
|
156
|
+
"data-control-family": "popup",
|
|
157
|
+
"data-popup-part": "item",
|
|
158
|
+
"data-slot": "sub-trigger",
|
|
159
|
+
className: cn(popupItemStructureClasses, className),
|
|
160
|
+
...props,
|
|
161
|
+
children: [children, /* @__PURE__ */ jsx("span", {
|
|
162
|
+
"data-control-ui": "dropdown-menu",
|
|
163
|
+
"data-control-family": "popup",
|
|
164
|
+
"data-slot": "sub-trigger-indicator",
|
|
165
|
+
"aria-hidden": "true",
|
|
166
|
+
children: "›"
|
|
167
|
+
})]
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function DropdownMenuSubContent(props) {
|
|
171
|
+
return /* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
172
|
+
"data-control-ui": "dropdown-menu",
|
|
173
|
+
"data-slot": "sub-content",
|
|
174
|
+
side: "right",
|
|
175
|
+
sideOffset: 0,
|
|
176
|
+
alignOffset: -3,
|
|
177
|
+
...props
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
function DropdownMenuShortcut(props) {
|
|
181
|
+
return /* @__PURE__ */ jsx("span", {
|
|
182
|
+
"data-control-ui": "dropdown-menu",
|
|
183
|
+
"data-control-family": "popup",
|
|
184
|
+
"data-popup-part": "shortcut",
|
|
185
|
+
"data-slot": "shortcut",
|
|
186
|
+
...props
|
|
187
|
+
});
|
|
188
|
+
}
|
|
82
189
|
//#endregion
|
|
83
|
-
export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, dropdownMenuTriggerVariants };
|
|
190
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, dropdownMenuTriggerVariants };
|
package/dist/ui/dropzone.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { DropzoneDropDetails, DropzoneEvent, DropzoneGetFilesFromEvent, Dropzone
|
|
|
4
4
|
import { DropzoneKnobStyle } from "../knob-contracts/dropzone-knobs.js";
|
|
5
5
|
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
6
6
|
//#region src/ui/dropzone.d.ts
|
|
7
|
-
type DropzoneOverlayScope = "local" | "global";
|
|
8
|
-
type DropzoneProps = Omit<ComponentProps<"div">, "defaultValue" | "onChange" | "onDrop" | "onError"> & {
|
|
7
|
+
export type DropzoneOverlayScope = "local" | "global";
|
|
8
|
+
export type DropzoneProps = Omit<ComponentProps<"div">, "defaultValue" | "onChange" | "onDrop" | "onError"> & {
|
|
9
9
|
value?: readonly File[];
|
|
10
10
|
defaultValue?: readonly File[];
|
|
11
11
|
onValueChange?: (value: readonly File[], details: DropzoneValueChangeDetails) => void;
|
|
@@ -17,50 +17,50 @@ type DropzoneProps = Omit<ComponentProps<"div">, "defaultValue" | "onChange" | "
|
|
|
17
17
|
} & {
|
|
18
18
|
style?: CSSProperties & DropzoneKnobStyle;
|
|
19
19
|
};
|
|
20
|
-
type DropzoneAreaProps = ComponentProps<"div"> & {
|
|
20
|
+
export type DropzoneAreaProps = ComponentProps<"div"> & {
|
|
21
21
|
style?: CSSProperties & DropzoneKnobStyle;
|
|
22
22
|
};
|
|
23
|
-
type DropzoneInputProps = Omit<ComponentProps<"input">, "accept" | "disabled" | "multiple" | "onChange" | "onClick" | "type"> & {
|
|
23
|
+
export type DropzoneInputProps = Omit<ComponentProps<"input">, "accept" | "disabled" | "multiple" | "onChange" | "onClick" | "type"> & {
|
|
24
24
|
style?: CSSProperties & DropzoneKnobStyle;
|
|
25
25
|
};
|
|
26
|
-
type DropzoneTriggerProps = Omit<ComponentProps<"button">, "style"> & {
|
|
26
|
+
export type DropzoneTriggerProps = Omit<ComponentProps<"button">, "style"> & {
|
|
27
27
|
style?: CSSProperties & DropzoneKnobStyle;
|
|
28
28
|
};
|
|
29
|
-
type DropzoneOverlayProps = Omit<ComponentProps<"div">, "style"> & {
|
|
29
|
+
export type DropzoneOverlayProps = Omit<ComponentProps<"div">, "style"> & {
|
|
30
30
|
scope?: DropzoneOverlayScope;
|
|
31
31
|
style?: CSSProperties & DropzoneKnobStyle;
|
|
32
32
|
};
|
|
33
|
-
type DropzoneFileListProps = Omit<ComponentProps<"ul">, "children"> & {
|
|
33
|
+
export type DropzoneFileListProps = Omit<ComponentProps<"ul">, "children"> & {
|
|
34
34
|
children?: (file: File, index: number) => ReactNode;
|
|
35
35
|
} & {
|
|
36
36
|
style?: CSSProperties & DropzoneKnobStyle;
|
|
37
37
|
};
|
|
38
|
-
type DropzoneRejectionListProps = Omit<ComponentProps<"ul">, "children"> & {
|
|
38
|
+
export type DropzoneRejectionListProps = Omit<ComponentProps<"ul">, "children"> & {
|
|
39
39
|
children?: (rejection: DropzoneFileRejection, index: number) => ReactNode;
|
|
40
40
|
} & {
|
|
41
41
|
style?: CSSProperties & DropzoneKnobStyle;
|
|
42
42
|
};
|
|
43
|
-
type DropzoneContextValue = UseDropzoneReturn & {
|
|
43
|
+
export type DropzoneContextValue = UseDropzoneReturn & {
|
|
44
44
|
registerGlobalOverlay: () => () => void;
|
|
45
45
|
};
|
|
46
|
-
type DropzoneStatusProps = Omit<ComponentProps<"div">, "children" | "style"> & {
|
|
46
|
+
export type DropzoneStatusProps = Omit<ComponentProps<"div">, "children" | "style"> & {
|
|
47
47
|
children?: (state: DropzoneContextValue) => ReactNode;
|
|
48
48
|
style?: CSSProperties & DropzoneKnobStyle;
|
|
49
49
|
};
|
|
50
|
-
type DropzoneRemoveProps = ComponentProps<typeof Button> & {
|
|
50
|
+
export type DropzoneRemoveProps = ComponentProps<typeof Button> & {
|
|
51
51
|
file: File;
|
|
52
52
|
};
|
|
53
|
-
type DropzoneClearProps = ComponentProps<typeof Button>;
|
|
54
|
-
declare function useDropzoneContext(): DropzoneContextValue;
|
|
55
|
-
declare function Dropzone({ value, defaultValue, onValueChange, policy, disabled, getFilesFromEvent, onDrop, onError, className, children, ...props }: DropzoneProps): import("react").JSX.Element;
|
|
56
|
-
declare function DropzoneArea({ className, ...props }: DropzoneAreaProps): import("react").JSX.Element;
|
|
57
|
-
declare function DropzoneInput({ className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: DropzoneInputProps): import("react").JSX.Element;
|
|
58
|
-
declare function DropzoneTrigger({ className, children, onClick, disabled, ...props }: DropzoneTriggerProps): import("react").JSX.Element;
|
|
59
|
-
declare function DropzoneOverlay({ scope, className, children, ...props }: DropzoneOverlayProps): import("react").JSX.Element;
|
|
60
|
-
declare function DropzoneFileList({ className, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: DropzoneFileListProps): import("react").JSX.Element;
|
|
61
|
-
declare function DropzoneRejectionList({ className, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: DropzoneRejectionListProps): import("react").JSX.Element;
|
|
62
|
-
declare function DropzoneStatus({ className, children, role, "aria-live": ariaLive, ...props }: DropzoneStatusProps): import("react").JSX.Element;
|
|
63
|
-
declare function DropzoneRemove({ file, children, onClick, disabled, ...props }: DropzoneRemoveProps): import("react").JSX.Element;
|
|
64
|
-
declare function DropzoneClear({ children, onClick, disabled, ...props }: DropzoneClearProps): import("react").JSX.Element;
|
|
53
|
+
export type DropzoneClearProps = ComponentProps<typeof Button>;
|
|
54
|
+
export declare function useDropzoneContext(): DropzoneContextValue;
|
|
55
|
+
export declare function Dropzone({ value, defaultValue, onValueChange, policy, disabled, getFilesFromEvent, onDrop, onError, className, children, ...props }: DropzoneProps): import("react").JSX.Element;
|
|
56
|
+
export declare function DropzoneArea({ className, ...props }: DropzoneAreaProps): import("react").JSX.Element;
|
|
57
|
+
export declare function DropzoneInput({ className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: DropzoneInputProps): import("react").JSX.Element;
|
|
58
|
+
export declare function DropzoneTrigger({ className, children, onClick, disabled, ...props }: DropzoneTriggerProps): import("react").JSX.Element;
|
|
59
|
+
export declare function DropzoneOverlay({ scope, className, children, ...props }: DropzoneOverlayProps): import("react").JSX.Element;
|
|
60
|
+
export declare function DropzoneFileList({ className, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: DropzoneFileListProps): import("react").JSX.Element;
|
|
61
|
+
export declare function DropzoneRejectionList({ className, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: DropzoneRejectionListProps): import("react").JSX.Element;
|
|
62
|
+
export declare function DropzoneStatus({ className, children, role, "aria-live": ariaLive, ...props }: DropzoneStatusProps): import("react").JSX.Element;
|
|
63
|
+
export declare function DropzoneRemove({ file, children, onClick, disabled, ...props }: DropzoneRemoveProps): import("react").JSX.Element;
|
|
64
|
+
export declare function DropzoneClear({ children, onClick, disabled, ...props }: DropzoneClearProps): import("react").JSX.Element;
|
|
65
65
|
//#endregion
|
|
66
|
-
export {
|
|
66
|
+
export { type DropzoneAccept, type DropzoneDropDetails, DropzoneErrorCode, type DropzoneErrorCodeValue, type DropzoneEvent, type DropzoneFileError, type DropzoneFileRejection, type DropzoneGetFilesFromEvent, type DropzonePolicy, type DropzoneSelectionMode, type DropzoneValidator, type DropzoneValidatorResult, type DropzoneValueChangeDetails, type DropzoneValueChangeReason, type DropzoneVisualState, type UseDropzoneOptions, type UseDropzoneReturn, formatDropzoneFileSize, useDropzone };
|
package/dist/ui/empty.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { EmptyKnobStyle } from "../knob-contracts/empty-knobs.js";
|
|
2
2
|
import { CSSProperties, ComponentProps } from "react";
|
|
3
3
|
//#region src/ui/empty.d.ts
|
|
4
|
-
type EmptyProps = Omit<ComponentProps<"div">, "style"> & {
|
|
4
|
+
export type EmptyProps = Omit<ComponentProps<"div">, "style"> & {
|
|
5
5
|
style?: CSSProperties & EmptyKnobStyle;
|
|
6
6
|
};
|
|
7
|
-
type
|
|
7
|
+
export type EmptyHeaderProps = Omit<ComponentProps<"div">, "style"> & {
|
|
8
8
|
style?: CSSProperties & EmptyKnobStyle;
|
|
9
9
|
};
|
|
10
|
-
type
|
|
10
|
+
export type EmptyMediaProps = Omit<ComponentProps<"div">, "style"> & {
|
|
11
11
|
style?: CSSProperties & EmptyKnobStyle;
|
|
12
12
|
};
|
|
13
|
-
type
|
|
13
|
+
export type EmptyContentProps = Omit<ComponentProps<"div">, "style"> & {
|
|
14
14
|
style?: CSSProperties & EmptyKnobStyle;
|
|
15
15
|
};
|
|
16
|
-
type
|
|
16
|
+
export type EmptyDescriptionProps = Omit<ComponentProps<"p">, "style"> & {
|
|
17
17
|
style?: CSSProperties & EmptyKnobStyle;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
declare function EmptyHeader({ className, ...props }: ComponentProps<"div"> & {
|
|
19
|
+
export type EmptyTitleProps = Omit<ComponentProps<"div">, "style"> & {
|
|
21
20
|
style?: CSSProperties & EmptyKnobStyle;
|
|
22
|
-
}
|
|
23
|
-
declare function
|
|
24
|
-
declare function
|
|
25
|
-
declare function
|
|
26
|
-
declare function
|
|
27
|
-
|
|
28
|
-
export
|
|
21
|
+
};
|
|
22
|
+
export declare function Empty({ className, ...props }: EmptyProps): import("react").JSX.Element;
|
|
23
|
+
export declare function EmptyHeader({ className, ...props }: EmptyHeaderProps): import("react").JSX.Element;
|
|
24
|
+
export declare function EmptyMedia({ className, ...props }: EmptyMediaProps): import("react").JSX.Element;
|
|
25
|
+
export declare function EmptyTitle({ className, ...props }: EmptyTitleProps): import("react").JSX.Element;
|
|
26
|
+
export declare function EmptyDescription({ className, ...props }: EmptyDescriptionProps): import("react").JSX.Element;
|
|
27
|
+
export declare function EmptyContent({ className, ...props }: EmptyContentProps): import("react").JSX.Element;
|
|
28
|
+
//#endregion
|
package/dist/ui/empty.js
CHANGED
|
@@ -15,7 +15,7 @@ function EmptyHeader({ className, ...props }) {
|
|
|
15
15
|
"data-control-ui": "empty",
|
|
16
16
|
"data-control-family": "empty",
|
|
17
17
|
"data-slot": "header",
|
|
18
|
-
className: cn("flex
|
|
18
|
+
className: cn("flex min-w-0 flex-col items-center", className),
|
|
19
19
|
...props
|
|
20
20
|
});
|
|
21
21
|
}
|
|
@@ -24,7 +24,7 @@ function EmptyMedia({ className, ...props }) {
|
|
|
24
24
|
"data-control-ui": "empty",
|
|
25
25
|
"data-control-family": "empty",
|
|
26
26
|
"data-slot": "media",
|
|
27
|
-
className: cn("flex shrink-0 items-center justify-center [&>svg]:
|
|
27
|
+
className: cn("flex shrink-0 items-center justify-center [&>svg]:shrink-0", className),
|
|
28
28
|
...props
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -51,7 +51,7 @@ function EmptyContent({ className, ...props }) {
|
|
|
51
51
|
"data-control-ui": "empty",
|
|
52
52
|
"data-control-family": "empty",
|
|
53
53
|
"data-slot": "content",
|
|
54
|
-
className: cn("flex w-full
|
|
54
|
+
className: cn("flex w-full min-w-0 flex-col items-center justify-center", className),
|
|
55
55
|
...props
|
|
56
56
|
});
|
|
57
57
|
}
|
package/dist/ui/field.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { FieldKnobStyle } from "../knob-contracts/field-knobs.js";
|
|
|
2
2
|
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
3
3
|
import { Field as Field$1 } from "@base-ui/react/field";
|
|
4
4
|
//#region src/ui/field.d.ts
|
|
5
|
-
type FieldProps = ComponentProps<"div"> & {
|
|
5
|
+
export type FieldProps = ComponentProps<"div"> & {
|
|
6
6
|
orientation?: "vertical" | "horizontal" | "responsive";
|
|
7
7
|
name?: string;
|
|
8
8
|
disabled?: boolean;
|
|
@@ -11,54 +11,53 @@ type FieldProps = ComponentProps<"div"> & {
|
|
|
11
11
|
} & {
|
|
12
12
|
style?: CSSProperties & FieldKnobStyle;
|
|
13
13
|
};
|
|
14
|
-
type FieldLabelProps = Omit<ComponentProps<"label">, "style"> & {
|
|
14
|
+
export type FieldLabelProps = Omit<ComponentProps<"label">, "style"> & {
|
|
15
15
|
style?: CSSProperties & FieldKnobStyle;
|
|
16
16
|
};
|
|
17
|
-
type FieldContentProps = ComponentProps<"div"> & {
|
|
17
|
+
export type FieldContentProps = ComponentProps<"div"> & {
|
|
18
18
|
style?: CSSProperties & FieldKnobStyle;
|
|
19
19
|
};
|
|
20
|
-
type FieldTitleProps = Omit<ComponentProps<"div">, "style"> & {
|
|
20
|
+
export type FieldTitleProps = Omit<ComponentProps<"div">, "style"> & {
|
|
21
21
|
style?: CSSProperties & FieldKnobStyle;
|
|
22
22
|
};
|
|
23
|
-
type FieldControlProps = Omit<ComponentProps<"input">, "style"> & {
|
|
23
|
+
export type FieldControlProps = Omit<ComponentProps<"input">, "style"> & {
|
|
24
24
|
style?: CSSProperties & FieldKnobStyle;
|
|
25
25
|
};
|
|
26
|
-
type FieldDescriptionProps = Omit<ComponentProps<"p">, "style"> & {
|
|
26
|
+
export type FieldDescriptionProps = Omit<ComponentProps<"p">, "style"> & {
|
|
27
27
|
style?: CSSProperties & FieldKnobStyle;
|
|
28
28
|
};
|
|
29
|
-
type FieldErrorMatch = boolean | keyof ValidityState;
|
|
30
|
-
type FieldErrorProps = Omit<ComponentProps<"div">, "style"> & {
|
|
29
|
+
export type FieldErrorMatch = boolean | keyof ValidityState;
|
|
30
|
+
export type FieldErrorProps = Omit<ComponentProps<"div">, "style"> & {
|
|
31
31
|
match?: FieldErrorMatch;
|
|
32
32
|
style?: CSSProperties & FieldKnobStyle;
|
|
33
33
|
};
|
|
34
|
-
type FieldGroupProps = ComponentProps<"div"> & {
|
|
34
|
+
export type FieldGroupProps = ComponentProps<"div"> & {
|
|
35
35
|
style?: CSSProperties & FieldKnobStyle;
|
|
36
36
|
};
|
|
37
|
-
type FieldSeparatorProps = Omit<ComponentProps<"div">, "style"> & {
|
|
37
|
+
export type FieldSeparatorProps = Omit<ComponentProps<"div">, "style"> & {
|
|
38
38
|
children?: ReactNode;
|
|
39
39
|
style?: CSSProperties & FieldKnobStyle;
|
|
40
40
|
};
|
|
41
|
-
type FieldItemProps = ComponentProps<"div"> & {
|
|
41
|
+
export type FieldItemProps = ComponentProps<"div"> & {
|
|
42
42
|
style?: CSSProperties & FieldKnobStyle;
|
|
43
43
|
};
|
|
44
|
-
type FieldSetProps = Omit<ComponentProps<"fieldset">, "style"> & {
|
|
44
|
+
export type FieldSetProps = Omit<ComponentProps<"fieldset">, "style"> & {
|
|
45
45
|
style?: CSSProperties & FieldKnobStyle;
|
|
46
46
|
};
|
|
47
|
-
type FieldLegendProps = Omit<ComponentProps<"div">, "style"> & {
|
|
47
|
+
export type FieldLegendProps = Omit<ComponentProps<"div">, "style"> & {
|
|
48
48
|
style?: CSSProperties & FieldKnobStyle;
|
|
49
49
|
};
|
|
50
|
-
declare function Field({ className, orientation, ...props }: FieldProps): import("react").JSX.Element;
|
|
51
|
-
declare function FieldContent({ className, ...props }: FieldContentProps): import("react").JSX.Element;
|
|
52
|
-
declare function FieldTitle({ className, ...props }: FieldTitleProps): import("react").JSX.Element;
|
|
53
|
-
declare function FieldLabel({ className, ...props }: FieldLabelProps): import("react").JSX.Element;
|
|
50
|
+
export declare function Field({ className, orientation, ...props }: FieldProps): import("react").JSX.Element;
|
|
51
|
+
export declare function FieldContent({ className, ...props }: FieldContentProps): import("react").JSX.Element;
|
|
52
|
+
export declare function FieldTitle({ className, ...props }: FieldTitleProps): import("react").JSX.Element;
|
|
53
|
+
export declare function FieldLabel({ className, ...props }: FieldLabelProps): import("react").JSX.Element;
|
|
54
54
|
type RefinedFieldControlProps = FieldControlProps & Pick<ComponentProps<typeof Field$1.Control>, "render">;
|
|
55
|
-
declare function FieldControl({ className, render, ...props }: RefinedFieldControlProps): import("react").JSX.Element;
|
|
56
|
-
declare function FieldDescription({ className, ...props }: FieldDescriptionProps): import("react").JSX.Element;
|
|
57
|
-
declare function FieldError({ className, ...props }: FieldErrorProps): import("react").JSX.Element;
|
|
58
|
-
declare function FieldGroup({ className, ...props }: FieldGroupProps): import("react").JSX.Element;
|
|
59
|
-
declare function FieldSeparator({ children, className, ...props }: FieldSeparatorProps): import("react").JSX.Element;
|
|
60
|
-
declare function FieldItem({ className, ...props }: FieldItemProps): import("react").JSX.Element;
|
|
61
|
-
declare function FieldSet({ className, ...props }: FieldSetProps): import("react").JSX.Element;
|
|
62
|
-
declare function FieldLegend({ className, ...props }: FieldLegendProps): import("react").JSX.Element;
|
|
63
|
-
//#endregion
|
|
64
|
-
export { Field, FieldContent, FieldContentProps, FieldControl, FieldControlProps, FieldDescription, FieldDescriptionProps, FieldError, FieldErrorMatch, FieldErrorProps, FieldGroup, FieldGroupProps, FieldItem, FieldItemProps, FieldLabel, FieldLabelProps, FieldLegend, FieldLegendProps, FieldProps, FieldSeparator, FieldSeparatorProps, FieldSet, FieldSetProps, FieldTitle, FieldTitleProps };
|
|
55
|
+
export declare function FieldControl({ className, render, ...props }: RefinedFieldControlProps): import("react").JSX.Element;
|
|
56
|
+
export declare function FieldDescription({ className, ...props }: FieldDescriptionProps): import("react").JSX.Element;
|
|
57
|
+
export declare function FieldError({ className, ...props }: FieldErrorProps): import("react").JSX.Element;
|
|
58
|
+
export declare function FieldGroup({ className, ...props }: FieldGroupProps): import("react").JSX.Element;
|
|
59
|
+
export declare function FieldSeparator({ children, className, ...props }: FieldSeparatorProps): import("react").JSX.Element;
|
|
60
|
+
export declare function FieldItem({ className, ...props }: FieldItemProps): import("react").JSX.Element;
|
|
61
|
+
export declare function FieldSet({ className, ...props }: FieldSetProps): import("react").JSX.Element;
|
|
62
|
+
export declare function FieldLegend({ className, ...props }: FieldLegendProps): import("react").JSX.Element;
|
|
63
|
+
//#endregion
|
package/dist/ui/form.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
//#region src/ui/form.d.ts
|
|
3
|
-
type FormErrors = Record<string, string | string[]>;
|
|
4
|
-
type FormProps = ComponentProps<"form"> & {
|
|
3
|
+
export type FormErrors = Record<string, string | string[]>;
|
|
4
|
+
export type FormProps = ComponentProps<"form"> & {
|
|
5
5
|
errors?: FormErrors;
|
|
6
6
|
validationMode?: "onSubmit" | "onBlur" | "onChange";
|
|
7
7
|
};
|
|
8
|
-
declare function Form({ className, ...props }: FormProps): import("react").JSX.Element;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { Form, FormErrors, FormProps };
|
|
8
|
+
export declare function Form({ className, ...props }: FormProps): import("react").JSX.Element;
|
|
9
|
+
//#endregion
|