@ctrl-ui/react 0.8.6 → 0.8.8
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 +54 -57
- package/dist/blocks/design-canvas-data.d.ts +32 -0
- package/dist/blocks/design-canvas-data.js +100 -0
- package/dist/blocks/design-canvas-inspector.d.ts +8 -0
- package/dist/blocks/design-canvas-inspector.js +238 -0
- package/dist/blocks/design-canvas.d.ts +21 -0
- package/dist/blocks/design-canvas.js +452 -0
- 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 +12 -3
- package/dist/chat-composer-attachment.js +61 -19
- package/dist/chat-composer-editor/extensions/mention.d.ts +5 -1
- package/dist/chat-composer-editor/extensions/mention.js +58 -27
- 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 +71 -28
- package/dist/chat-composer.d.ts +13 -32
- package/dist/chat-composer.js +54 -13
- package/dist/chat-layout.d.ts +19 -0
- package/dist/chat-layout.js +96 -32
- 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/context.d.ts +32 -0
- package/dist/filter-bar/context.js +11 -0
- package/dist/filter-bar/editor.d.ts +14 -0
- package/dist/filter-bar/editor.js +216 -0
- package/dist/filter-bar/model.d.ts +10 -0
- package/dist/filter-bar/model.js +57 -0
- package/dist/filter-bar/motion.d.ts +10 -0
- package/dist/filter-bar/motion.js +84 -0
- package/dist/filter-bar/parts.d.ts +19 -0
- package/dist/filter-bar/parts.js +244 -0
- package/dist/filter-bar/types.d.ts +54 -0
- package/dist/filter-bar/types.js +0 -0
- package/dist/filter-bar.d.ts +27 -0
- package/dist/filter-bar.js +310 -0
- package/dist/hooks/use-audio-recorder.js +12 -6
- package/dist/hooks/use-chat-composer.d.ts +21 -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-dropzone.d.ts +7 -4
- package/dist/hooks/use-dropzone.js +34 -3
- 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 +44 -29
- 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-layout-knobs.d.ts +1 -1
- package/dist/knob-contracts/chat-layout-knobs.js +2 -1
- 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/choice-knobs.d.ts +1 -1
- package/dist/knob-contracts/choice-knobs.js +1 -0
- 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/collapsible-knobs.d.ts +1 -1
- package/dist/knob-contracts/collapsible-knobs.js +1 -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 +4 -0
- package/dist/knob-contracts/filter-bar-knobs.js +15 -0
- package/dist/knob-contracts/infinite-canvas-knobs.d.ts +1 -1
- package/dist/knob-contracts/infinite-canvas-knobs.js +3 -0
- 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 +4 -1
- package/dist/knob-contracts/popup-knobs.d.ts +1 -1
- package/dist/knob-contracts/popup-knobs.js +28 -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 +4 -5
- 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 +13 -8
- package/dist/popup-parts.d.ts +8 -0
- package/dist/popup-parts.js +43 -0
- package/dist/scripts/contrast-eval.js +5 -4
- 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 +14 -8
- 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 +6 -8
- package/dist/styles/recipes/button-states.css +66 -0
- package/dist/styles/recipes/button.css +26 -85
- 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 +21 -16
- package/dist/styles/recipes/chat-layout.css +64 -2
- 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 +25 -21
- package/dist/styles/recipes/code-diff.css +51 -26
- package/dist/styles/recipes/code.css +44 -18
- package/dist/styles/recipes/collapsible.css +43 -1
- 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 +23 -4
- package/dist/styles/recipes/context.css +3 -3
- package/dist/styles/recipes/dockable-panel.css +18 -7
- 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 +89 -21
- package/dist/styles/recipes/field.css +83 -26
- package/dist/styles/recipes/filter-bar.css +161 -0
- package/dist/styles/recipes/gradient-editor.css +18 -7
- package/dist/styles/recipes/infinite-canvas.css +51 -4
- package/dist/styles/recipes/inline-attachment.css +9 -4
- 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 +36 -10
- package/dist/styles/recipes/pagination.css +5 -6
- package/dist/styles/recipes/phone-input.css +12 -8
- package/dist/styles/recipes/popup-controls.css +175 -26
- package/dist/styles/recipes/popup-drawer.css +35 -44
- package/dist/styles/recipes/popup-lists.css +139 -29
- package/dist/styles/recipes/popup-motion.css +4 -45
- package/dist/styles/recipes/popup-toast.css +55 -26
- package/dist/styles/recipes/popup.css +149 -153
- package/dist/styles/recipes/range.css +55 -19
- package/dist/styles/recipes/resizable.css +36 -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 +149 -34
- package/dist/styles/recipes/sidebar-parts.css +154 -0
- package/dist/styles/recipes/sidebar.css +187 -128
- package/dist/styles/recipes/source-badge.css +1 -1
- package/dist/styles/recipes/spinner.css +12 -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 +49 -41
- package/dist/styles/recipes/table.css +14 -10
- package/dist/styles/recipes/tabs.css +38 -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 +12 -8
- package/dist/styles/recipes/transcript-divider.css +2 -2
- 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 +287 -107
- 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 +7 -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-group.js +1 -1
- 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 +27 -28
- 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 -8
- package/dist/ui/combobox.d.ts +5 -23
- package/dist/ui/combobox.js +36 -16
- package/dist/ui/command.d.ts +8 -2
- package/dist/ui/command.js +39 -15
- 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 +81 -33
- package/dist/ui/drawer.d.ts +7 -4
- package/dist/ui/drawer.js +35 -22
- package/dist/ui/dropdown-menu.js +4 -3
- package/dist/ui/dropzone.d.ts +5 -3
- package/dist/ui/dropzone.js +78 -17
- 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/field.js +1 -1
- package/dist/ui/gradient-editor.d.ts +1 -1
- package/dist/ui/gradient-editor.js +37 -21
- package/dist/ui/infinite-canvas.d.ts +13 -1
- package/dist/ui/infinite-canvas.js +139 -20
- package/dist/ui/input-group.d.ts +2 -4
- package/dist/ui/input-group.js +13 -14
- package/dist/ui/input-otp.d.ts +1 -1
- package/dist/ui/input-otp.js +32 -15
- package/dist/ui/input.js +11 -2
- 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 +42 -9
- 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/number-field.d.ts +1 -1
- package/dist/ui/number-field.js +13 -2
- 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 +3 -0
- package/dist/ui/radio-group.js +11 -1
- package/dist/ui/resizable.d.ts +20 -2
- package/dist/ui/resizable.js +130 -8
- package/dist/ui/responsive-dialog.d.ts +1 -1
- package/dist/ui/responsive-dialog.js +9 -23
- package/dist/ui/rich-tooltip.d.ts +10 -4
- package/dist/ui/rich-tooltip.js +81 -33
- package/dist/ui/scroll-area.d.ts +4 -1
- package/dist/ui/scroll-area.js +44 -28
- package/dist/ui/select.d.ts +2 -1
- package/dist/ui/select.js +57 -32
- package/dist/ui/sidebar-menu.d.ts +5 -1
- package/dist/ui/sidebar-menu.js +31 -33
- 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 +46 -23
- 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 +5 -4
- package/dist/ui/table-of-contents.js +143 -52
- package/dist/ui/table.js +15 -9
- 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/toggle.d.ts +1 -1
- package/dist/ui/toggle.js +2 -1
- package/dist/ui/toolbar.d.ts +3 -2
- package/dist/ui/toolbar.js +4 -2
- package/dist/ui/tooltip.js +3 -20
- package/dist/ui/tree.js +120 -80
- package/dist/ui/trigger-menu.js +7 -2
- 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/ui/native-select.js
CHANGED
|
@@ -1,19 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn } from "../lib/cn.js";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Input } from "@base-ui/react/input";
|
|
3
5
|
//#region src/ui/native-select.tsx
|
|
4
|
-
function NativeSelect({ size = "md", className, children, ...props }) {
|
|
6
|
+
function NativeSelect({ ref, id, name, value, defaultValue, disabled, autoFocus, size = "md", className, children, ...props }) {
|
|
5
7
|
return /* @__PURE__ */ jsxs("div", {
|
|
8
|
+
"data-control-family": "field",
|
|
9
|
+
"data-field-kind": "native-select",
|
|
6
10
|
className: "relative inline-flex w-full items-center",
|
|
7
|
-
children: [/* @__PURE__ */ jsx(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
children: [/* @__PURE__ */ jsx(Input, {
|
|
12
|
+
ref,
|
|
13
|
+
id,
|
|
14
|
+
name,
|
|
15
|
+
value,
|
|
16
|
+
defaultValue,
|
|
17
|
+
disabled,
|
|
18
|
+
autoFocus,
|
|
19
|
+
render: /* @__PURE__ */ jsx("select", {
|
|
20
|
+
...props,
|
|
21
|
+
"data-control-ui": "native-select",
|
|
22
|
+
"data-field-kind": "native-select",
|
|
23
|
+
"data-slot": "root",
|
|
24
|
+
"data-size": size,
|
|
25
|
+
"data-control-family": "field",
|
|
26
|
+
"data-control": "true",
|
|
27
|
+
className: cn("w-full min-w-0 cursor-pointer", className),
|
|
28
|
+
children
|
|
29
|
+
})
|
|
17
30
|
}), /* @__PURE__ */ jsx("span", {
|
|
18
31
|
"aria-hidden": "true",
|
|
19
32
|
"data-control-ui": "native-select",
|
|
@@ -62,7 +62,7 @@ export type NumberFieldScrubAreaProps = ComponentProps<"span"> & {
|
|
|
62
62
|
} & {
|
|
63
63
|
style?: CSSProperties & FieldKnobStyle;
|
|
64
64
|
};
|
|
65
|
-
export declare function NumberField({ size, value, defaultValue, children, ...props }: NumberFieldProps): import("react").JSX.Element;
|
|
65
|
+
export declare function NumberField({ size, value, defaultValue, className, children, ...props }: NumberFieldProps): import("react").JSX.Element;
|
|
66
66
|
export declare function NumberFieldGroup({ className, children, ...props }: NumberFieldGroupProps): import("react").JSX.Element;
|
|
67
67
|
export declare function NumberFieldInput({ className, ...props }: NumberFieldInputProps): import("react").JSX.Element;
|
|
68
68
|
export declare function NumberFieldDecrement({ className, children, ...props }: NumberFieldDecrementProps): import("react").JSX.Element;
|
package/dist/ui/number-field.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { useIsInsideInputGroup } from "./input-group.js";
|
|
3
4
|
import { createContext, useContext } from "react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { NumberField as NumberField$1 } from "@base-ui/react/number-field";
|
|
6
7
|
//#region src/ui/number-field.tsx
|
|
7
8
|
const NumberFieldSizeContext = createContext("md");
|
|
8
|
-
function NumberField({ size = "md", value, defaultValue, children, ...props }) {
|
|
9
|
+
function NumberField({ size = "md", value, defaultValue, className, children, ...props }) {
|
|
9
10
|
return /* @__PURE__ */ jsx(NumberFieldSizeContext.Provider, {
|
|
10
11
|
value: size,
|
|
11
12
|
children: /* @__PURE__ */ jsx(NumberField$1.Root, {
|
|
12
13
|
value,
|
|
13
14
|
defaultValue,
|
|
15
|
+
className: cn("flex flex-col items-start gap-1.5", className),
|
|
14
16
|
...props,
|
|
15
17
|
children
|
|
16
18
|
})
|
|
@@ -18,6 +20,15 @@ function NumberField({ size = "md", value, defaultValue, children, ...props }) {
|
|
|
18
20
|
}
|
|
19
21
|
function NumberFieldGroup({ className, children, ...props }) {
|
|
20
22
|
const size = useContext(NumberFieldSizeContext);
|
|
23
|
+
if (useIsInsideInputGroup()) return /* @__PURE__ */ jsx(NumberField$1.Group, {
|
|
24
|
+
"data-control-ui": "number-field",
|
|
25
|
+
"data-field-kind": "number-field",
|
|
26
|
+
"data-slot": "group",
|
|
27
|
+
"data-control-family": "field",
|
|
28
|
+
className: cn("inline-flex items-stretch overflow-hidden", className),
|
|
29
|
+
...props,
|
|
30
|
+
children
|
|
31
|
+
});
|
|
21
32
|
return /* @__PURE__ */ jsx(NumberField$1.Group, {
|
|
22
33
|
"data-control-ui": "number-field",
|
|
23
34
|
"data-field-kind": "number-field",
|
|
@@ -70,7 +81,7 @@ function NumberFieldScrubArea({ className, children, ...props }) {
|
|
|
70
81
|
"data-control-family": "field",
|
|
71
82
|
"data-field-kind": "number-field",
|
|
72
83
|
"data-slot": "scrub-area",
|
|
73
|
-
className: cn("cursor-ew-resize touch-pan-y select-none", className),
|
|
84
|
+
className: cn("inline-flex shrink-0 cursor-ew-resize touch-pan-y select-none items-center [&>svg]:size-3.5 [&>svg]:shrink-0", className),
|
|
74
85
|
...props,
|
|
75
86
|
children: [children, /* @__PURE__ */ jsx(NumberField$1.ScrubAreaCursor, {
|
|
76
87
|
"data-control-ui": "number-field",
|
package/dist/ui/page-layout.d.ts
CHANGED
|
@@ -26,11 +26,11 @@ export declare function PageHeader({ variant, className, ...props }: PageHeaderP
|
|
|
26
26
|
export type PageTitleProps = Omit<ComponentProps<"h1">, "style"> & {
|
|
27
27
|
style?: PageStyle;
|
|
28
28
|
};
|
|
29
|
-
export declare function PageTitle(
|
|
29
|
+
export declare function PageTitle(props: PageTitleProps): import("react").JSX.Element;
|
|
30
30
|
export type PageDescriptionProps = Omit<ComponentProps<"p">, "style"> & {
|
|
31
31
|
style?: PageStyle;
|
|
32
32
|
};
|
|
33
|
-
export declare function PageDescription(
|
|
33
|
+
export declare function PageDescription(props: PageDescriptionProps): import("react").JSX.Element;
|
|
34
34
|
export type PageActionsProps = Omit<ComponentProps<"div">, "style"> & {
|
|
35
35
|
style?: PageStyle;
|
|
36
36
|
};
|
package/dist/ui/page-layout.js
CHANGED
|
@@ -55,21 +55,19 @@ function PageHeader({ variant = "flow", className, ...props }) {
|
|
|
55
55
|
...props
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
function PageTitle(
|
|
58
|
+
function PageTitle(props) {
|
|
59
59
|
return /* @__PURE__ */ jsx("h1", {
|
|
60
60
|
"data-control-ui": "page-layout",
|
|
61
61
|
"data-control-family": "page-layout",
|
|
62
62
|
"data-slot": "title",
|
|
63
|
-
className: cn("text-balance", className),
|
|
64
63
|
...props
|
|
65
64
|
});
|
|
66
65
|
}
|
|
67
|
-
function PageDescription(
|
|
66
|
+
function PageDescription(props) {
|
|
68
67
|
return /* @__PURE__ */ jsx("p", {
|
|
69
68
|
"data-control-ui": "page-layout",
|
|
70
69
|
"data-control-family": "page-layout",
|
|
71
70
|
"data-slot": "description",
|
|
72
|
-
className: cn("text-pretty", className),
|
|
73
71
|
...props
|
|
74
72
|
});
|
|
75
73
|
}
|
package/dist/ui/pagination.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { PaginationKnobStyle } from "../knob-contracts/pagination-knobs.js";
|
|
2
2
|
import { CSSProperties, ComponentProps } from "react";
|
|
3
3
|
//#region src/ui/pagination.d.ts
|
|
4
|
-
export type PaginationEllipsisProps = Omit<ComponentProps<"span">, "style"> & {
|
|
4
|
+
export type PaginationEllipsisProps = Omit<ComponentProps<"span">, "style" | "children"> & {
|
|
5
|
+
label?: string;
|
|
5
6
|
style?: CSSProperties & PaginationKnobStyle;
|
|
6
7
|
};
|
|
7
8
|
export type PaginationLinkProps = Omit<ComponentProps<"a"> & {
|
|
8
9
|
isActive?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
9
11
|
}, "style"> & {
|
|
10
12
|
style?: CSSProperties & PaginationKnobStyle;
|
|
11
13
|
};
|
|
@@ -18,8 +20,8 @@ export declare function PaginationContent({ className, ...props }: ComponentProp
|
|
|
18
20
|
export declare function PaginationItem({ className, ...props }: ComponentProps<"li"> & {
|
|
19
21
|
style?: CSSProperties & PaginationKnobStyle;
|
|
20
22
|
}): import("react").JSX.Element;
|
|
21
|
-
export declare function PaginationLink({ isActive, className, ...props }: PaginationLinkProps): import("react").JSX.Element;
|
|
22
|
-
export declare function PaginationPrevious({ className, ...props }:
|
|
23
|
-
export declare function PaginationNext({ className, ...props }:
|
|
24
|
-
export declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): import("react").JSX.Element;
|
|
23
|
+
export declare function PaginationLink({ isActive, disabled, href, className, ...props }: PaginationLinkProps): import("react").JSX.Element;
|
|
24
|
+
export declare function PaginationPrevious({ className, children, ...props }: PaginationLinkProps): import("react").JSX.Element;
|
|
25
|
+
export declare function PaginationNext({ className, children, ...props }: PaginationLinkProps): import("react").JSX.Element;
|
|
26
|
+
export declare function PaginationEllipsis({ label, className, ...props }: PaginationEllipsisProps): import("react").JSX.Element;
|
|
25
27
|
//#endregion
|
package/dist/ui/pagination.js
CHANGED
|
@@ -4,7 +4,7 @@ import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
|
|
|
4
4
|
//#region src/ui/pagination.tsx
|
|
5
5
|
function Pagination({ className, ...props }) {
|
|
6
6
|
return /* @__PURE__ */ jsx("nav", {
|
|
7
|
-
"aria-label": "
|
|
7
|
+
"aria-label": "Pagination",
|
|
8
8
|
"data-control-ui": "pagination",
|
|
9
9
|
"data-control-family": "pagination",
|
|
10
10
|
"data-slot": "root",
|
|
@@ -31,7 +31,7 @@ function PaginationItem({ className, ...props }) {
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
const paginationLinkChrome = "inline-flex h-[var(--control-h-sm)] min-w-[var(--control-h-sm)] cursor-pointer select-none items-center justify-center whitespace-nowrap aria-disabled:pointer-events-none [&>svg]:size-4 [&>svg]:shrink-0";
|
|
34
|
-
function PaginationLink({ isActive = false, className, ...props }) {
|
|
34
|
+
function PaginationLink({ isActive = false, disabled = false, href, className, ...props }) {
|
|
35
35
|
return /* @__PURE__ */ jsx("a", {
|
|
36
36
|
"aria-current": isActive ? "page" : void 0,
|
|
37
37
|
"data-control-ui": "pagination",
|
|
@@ -39,37 +39,43 @@ function PaginationLink({ isActive = false, className, ...props }) {
|
|
|
39
39
|
"data-slot": "link",
|
|
40
40
|
"data-control": "true",
|
|
41
41
|
"data-active": isActive ? "true" : void 0,
|
|
42
|
+
role: disabled ? "link" : void 0,
|
|
43
|
+
"aria-disabled": disabled || void 0,
|
|
42
44
|
className: cn(paginationLinkChrome, className),
|
|
43
|
-
...props
|
|
45
|
+
...props,
|
|
46
|
+
href: disabled ? void 0 : href
|
|
44
47
|
});
|
|
45
48
|
}
|
|
46
|
-
function PaginationPrevious({ className, ...props }) {
|
|
49
|
+
function PaginationPrevious({ className, children = "Previous", ...props }) {
|
|
47
50
|
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
48
|
-
"aria-label": "Go to previous page",
|
|
49
51
|
className,
|
|
50
52
|
...props,
|
|
51
|
-
children: [/* @__PURE__ */ jsx(ChevronLeft, {
|
|
53
|
+
children: [/* @__PURE__ */ jsx(ChevronLeft, {
|
|
54
|
+
"aria-hidden": "true",
|
|
55
|
+
"data-icon-dir": "inline"
|
|
56
|
+
}), /* @__PURE__ */ jsx("span", { children })]
|
|
52
57
|
});
|
|
53
58
|
}
|
|
54
|
-
function PaginationNext({ className, ...props }) {
|
|
59
|
+
function PaginationNext({ className, children = "Next", ...props }) {
|
|
55
60
|
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
56
|
-
"aria-label": "Go to next page",
|
|
57
61
|
className,
|
|
58
62
|
...props,
|
|
59
|
-
children: [/* @__PURE__ */ jsx("span", { children
|
|
63
|
+
children: [/* @__PURE__ */ jsx("span", { children }), /* @__PURE__ */ jsx(ChevronRight, {
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
"data-icon-dir": "inline"
|
|
66
|
+
})]
|
|
60
67
|
});
|
|
61
68
|
}
|
|
62
|
-
function PaginationEllipsis({ className, ...props }) {
|
|
69
|
+
function PaginationEllipsis({ label = "More pages", className, ...props }) {
|
|
63
70
|
return /* @__PURE__ */ jsxs("span", {
|
|
64
|
-
"aria-hidden": "true",
|
|
65
71
|
"data-control-ui": "pagination",
|
|
66
72
|
"data-control-family": "pagination",
|
|
67
73
|
"data-slot": "ellipsis",
|
|
68
74
|
className: cn("flex h-[var(--control-h-sm)] min-w-[var(--control-h-sm)] items-center justify-center [&>svg]:size-4", className),
|
|
69
75
|
...props,
|
|
70
|
-
children: [/* @__PURE__ */ jsx(MoreHorizontal, {}), /* @__PURE__ */ jsx("span", {
|
|
76
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontal, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", {
|
|
71
77
|
className: "sr-only",
|
|
72
|
-
children:
|
|
78
|
+
children: label
|
|
73
79
|
})]
|
|
74
80
|
});
|
|
75
81
|
}
|
package/dist/ui/phone-input.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export type PhoneInputProps = Omit<ComponentProps<"input">, "defaultValue" | "si
|
|
|
21
21
|
countryCallingCodeEditable?: boolean;
|
|
22
22
|
addInternationalOption?: boolean;
|
|
23
23
|
countrySearchPlaceholder?: string;
|
|
24
|
+
countrySearchLabel?: string;
|
|
24
25
|
countryEmptyMessage?: string;
|
|
25
26
|
"data-invalid"?: boolean | string;
|
|
26
27
|
style?: CSSProperties & PhoneInputKnobStyle;
|
package/dist/ui/phone-input.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
3
|
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
4
|
-
import { InputGroup, InputGroupAddon
|
|
4
|
+
import { InputGroup, InputGroupAddon } from "./input-group.js";
|
|
5
|
+
import { Input } from "./input.js";
|
|
5
6
|
import { normalizePhoneInputText, normalizePhoneInputValue } from "../lib/phone-input-format.js";
|
|
6
7
|
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "./command.js";
|
|
7
8
|
import { useState } from "react";
|
|
@@ -11,6 +12,10 @@ import flags from "react-phone-number-input/flags";
|
|
|
11
12
|
//#region src/ui/phone-input.tsx
|
|
12
13
|
const FLAG_COMPONENTS = flags;
|
|
13
14
|
const PhoneNumberInputWithRef = PhoneNumberInput;
|
|
15
|
+
function phoneInputKnobs(style) {
|
|
16
|
+
if (!style) return void 0;
|
|
17
|
+
return Object.fromEntries(Object.entries(style).filter(([property]) => property.startsWith("--cui-phone-input-")));
|
|
18
|
+
}
|
|
14
19
|
function PhoneInputContainer({ className, ...props }) {
|
|
15
20
|
return /* @__PURE__ */ jsx(InputGroup, {
|
|
16
21
|
"data-field-kind": "phone-input",
|
|
@@ -19,12 +24,8 @@ function PhoneInputContainer({ className, ...props }) {
|
|
|
19
24
|
});
|
|
20
25
|
}
|
|
21
26
|
function PhoneInputControl({ className, normalizationCountry, onChange, onNativeChange, ...props }) {
|
|
22
|
-
return /* @__PURE__ */ jsx(
|
|
27
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
23
28
|
...props,
|
|
24
|
-
"data-control-ui": "field",
|
|
25
|
-
"data-control-family": "field",
|
|
26
|
-
"data-field-kind": "phone-input",
|
|
27
|
-
"data-slot": "input",
|
|
28
29
|
dir: "ltr",
|
|
29
30
|
className,
|
|
30
31
|
onChange: (event) => {
|
|
@@ -35,11 +36,7 @@ function PhoneInputControl({ className, normalizationCountry, onChange, onNative
|
|
|
35
36
|
}
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
|
-
function PhoneCountrySelect({ value, options, onChange, onFocus, onBlur, disabled, readOnly, "aria-label": ariaLabel = "Country", searchPlaceholder = "Search country…", emptyMessage, knobStyle }) {
|
|
39
|
-
const countryStyle = knobStyle;
|
|
40
|
-
const triggerStyle = knobStyle;
|
|
41
|
-
const metadataStyle = knobStyle;
|
|
42
|
-
const chevronStyle = knobStyle;
|
|
39
|
+
function PhoneCountrySelect({ value, options, onChange, onFocus, onBlur, disabled, readOnly, "aria-label": ariaLabel = "Country", searchPlaceholder = "Search country…", searchLabel = "Search countries", emptyMessage, knobStyle }) {
|
|
43
40
|
const [open, setOpen] = useState(false);
|
|
44
41
|
const selectedOption = options.find((option) => option.value === value);
|
|
45
42
|
const selectedCallingCode = value ? `+${getCountryCallingCode(value)}` : void 0;
|
|
@@ -47,7 +44,6 @@ function PhoneCountrySelect({ value, options, onChange, onFocus, onBlur, disable
|
|
|
47
44
|
return /* @__PURE__ */ jsx(InputGroupAddon, {
|
|
48
45
|
"data-phone-input-country": "",
|
|
49
46
|
className: "h-full self-stretch p-0",
|
|
50
|
-
style: countryStyle,
|
|
51
47
|
children: /* @__PURE__ */ jsxs(Popover, {
|
|
52
48
|
open,
|
|
53
49
|
onOpenChange: setOpen,
|
|
@@ -61,52 +57,54 @@ function PhoneCountrySelect({ value, options, onChange, onFocus, onBlur, disable
|
|
|
61
57
|
onFocus,
|
|
62
58
|
onBlur,
|
|
63
59
|
className: "inline-flex h-full items-center justify-center disabled:cursor-not-allowed",
|
|
64
|
-
|
|
65
|
-
children: [/* @__PURE__ */ jsx(CountryFlag, { country: value }), /* @__PURE__ */ jsx(ChevronIcon, {
|
|
66
|
-
open,
|
|
67
|
-
style: chevronStyle
|
|
68
|
-
})]
|
|
60
|
+
children: [/* @__PURE__ */ jsx(CountryFlag, { country: value }), /* @__PURE__ */ jsx(ChevronIcon, { open })]
|
|
69
61
|
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
70
62
|
align: "start",
|
|
71
63
|
padding: "none",
|
|
72
64
|
className: "w-[min(20rem,calc(100vw-2rem))]",
|
|
73
|
-
children: /* @__PURE__ */
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
65
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
66
|
+
"data-control-ui": "phone-input",
|
|
67
|
+
"data-control-family": "phone-input",
|
|
68
|
+
"data-slot": "root",
|
|
69
|
+
className: "contents",
|
|
70
|
+
style: knobStyle,
|
|
71
|
+
children: /* @__PURE__ */ jsxs(Command, {
|
|
72
|
+
chrome: "embedded",
|
|
73
|
+
children: [/* @__PURE__ */ jsx(CommandInput, {
|
|
74
|
+
"aria-label": searchLabel,
|
|
75
|
+
placeholder: searchPlaceholder
|
|
76
|
+
}), /* @__PURE__ */ jsxs(CommandList, { children: [/* @__PURE__ */ jsx(CommandEmpty, { title: emptyMessage }), /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => {
|
|
77
|
+
const callingCode = option.value ? `+${getCountryCallingCode(option.value)}` : "";
|
|
78
|
+
const selected = option.value === value;
|
|
79
|
+
return /* @__PURE__ */ jsxs(CommandItem, {
|
|
80
|
+
value: `${option.label} ${option.value ?? "international"} ${callingCode}`,
|
|
81
|
+
"data-current": selected ? "" : void 0,
|
|
82
|
+
onSelect: () => {
|
|
83
|
+
onChange(option.value);
|
|
84
|
+
setOpen(false);
|
|
85
|
+
},
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ jsx(CountryFlag, { country: option.value }),
|
|
88
|
+
/* @__PURE__ */ jsx("span", {
|
|
89
|
+
className: "min-w-0 flex-1 truncate",
|
|
90
|
+
children: option.label
|
|
91
|
+
}),
|
|
92
|
+
callingCode ? /* @__PURE__ */ jsx("span", {
|
|
93
|
+
"data-control-ui": "phone-input",
|
|
94
|
+
"data-control-family": "phone-input",
|
|
95
|
+
"data-slot": "metadata",
|
|
96
|
+
className: "min-w-0",
|
|
97
|
+
children: callingCode
|
|
98
|
+
}) : null,
|
|
99
|
+
selected ? /* @__PURE__ */ jsx("span", {
|
|
100
|
+
className: "sr-only",
|
|
101
|
+
children: "Selected"
|
|
102
|
+
}) : null,
|
|
103
|
+
/* @__PURE__ */ jsx(CheckIcon, { visible: selected })
|
|
104
|
+
]
|
|
105
|
+
}, option.value ?? "international");
|
|
106
|
+
}) })] })]
|
|
107
|
+
})
|
|
110
108
|
})
|
|
111
109
|
})]
|
|
112
110
|
})
|
|
@@ -134,8 +132,8 @@ function PhoneFlag({ country }) {
|
|
|
134
132
|
}
|
|
135
133
|
function PhoneInput(props) {
|
|
136
134
|
const controlled = Object.hasOwn(props, "value");
|
|
137
|
-
const { ref, size = "md", value, defaultValue, onValueChange, onChange: onNativeChange, name, disabled, readOnly, className, style, defaultCountry, countries, labels, locales, countryOptionsOrder, onCountryChange, countryCallingCodeEditable = true, addInternationalOption = true, countrySearchPlaceholder, countryEmptyMessage, "aria-invalid": ariaInvalid, "data-invalid": dataInvalid, ...inputProps } = props;
|
|
138
|
-
const knobStyle = style;
|
|
135
|
+
const { ref, size = "md", value, defaultValue, onValueChange, onChange: onNativeChange, name, disabled, readOnly, className, style, defaultCountry, countries, labels, locales, countryOptionsOrder, onCountryChange, countryCallingCodeEditable = true, addInternationalOption = true, countrySearchPlaceholder, countrySearchLabel, countryEmptyMessage, "aria-invalid": ariaInvalid, "data-invalid": dataInvalid, ...inputProps } = props;
|
|
136
|
+
const knobStyle = phoneInputKnobs(style);
|
|
139
137
|
const [internalValue, setInternalValue] = useState(defaultValue);
|
|
140
138
|
const [selectedCountry, setSelectedCountry] = useState(defaultCountry);
|
|
141
139
|
const currentValue = controlled ? value : internalValue;
|
|
@@ -186,6 +184,7 @@ function PhoneInput(props) {
|
|
|
186
184
|
countrySelectComponent: PhoneCountrySelect,
|
|
187
185
|
countrySelectProps: {
|
|
188
186
|
searchPlaceholder: countrySearchPlaceholder,
|
|
187
|
+
searchLabel: countrySearchLabel,
|
|
189
188
|
emptyMessage: countryEmptyMessage,
|
|
190
189
|
knobStyle
|
|
191
190
|
},
|
|
@@ -197,7 +196,7 @@ function PhoneInput(props) {
|
|
|
197
196
|
disabled
|
|
198
197
|
}) : null] });
|
|
199
198
|
}
|
|
200
|
-
function ChevronIcon({ open
|
|
199
|
+
function ChevronIcon({ open }) {
|
|
201
200
|
return /* @__PURE__ */ jsx("svg", {
|
|
202
201
|
"data-control-ui": "phone-input",
|
|
203
202
|
"data-control-family": "phone-input",
|
|
@@ -205,7 +204,6 @@ function ChevronIcon({ open, style }) {
|
|
|
205
204
|
viewBox: "0 0 12 12",
|
|
206
205
|
"data-open": open ? "true" : void 0,
|
|
207
206
|
className: "size-3",
|
|
208
|
-
style,
|
|
209
207
|
"aria-hidden": "true",
|
|
210
208
|
fill: "none",
|
|
211
209
|
children: /* @__PURE__ */ jsx("path", {
|
package/dist/ui/radio-group.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export type RadioProps = Omit<{
|
|
|
20
20
|
className?: string;
|
|
21
21
|
"aria-label"?: string;
|
|
22
22
|
"aria-labelledby"?: string;
|
|
23
|
+
"aria-describedby"?: string;
|
|
24
|
+
"aria-invalid"?: boolean | "true" | "false";
|
|
23
25
|
}, "style"> & {
|
|
24
26
|
style?: CSSProperties & ChoiceKnobStyle;
|
|
25
27
|
};
|
|
26
28
|
export declare function RadioGroup<TValue extends string = string>({ className, orientation, ...props }: RadioGroupProps<TValue>): import("react").JSX.Element;
|
|
27
29
|
export declare function Radio({ className, disabled, ...props }: RadioProps): import("react").JSX.Element;
|
|
30
|
+
export declare function RadioGroupItem({ className, htmlFor, children, ...props }: ComponentProps<"label">): import("react").JSX.Element;
|
|
28
31
|
//#endregion
|
package/dist/ui/radio-group.js
CHANGED
|
@@ -33,5 +33,15 @@ function Radio({ className, disabled, ...props }) {
|
|
|
33
33
|
})
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
+
function RadioGroupItem({ className, htmlFor, children, ...props }) {
|
|
37
|
+
return /* @__PURE__ */ jsx("label", {
|
|
38
|
+
htmlFor,
|
|
39
|
+
"data-control-ui": "radio-group",
|
|
40
|
+
"data-slot": "label",
|
|
41
|
+
className: cn("flex cursor-pointer items-start gap-2.5 rounded-(--radius-control) p-2 text-body has-[[data-disabled]]:cursor-not-allowed [&>[data-control-family=choice]]:mt-[calc((1lh_-_var(--spacing)*4)/2)]", className),
|
|
42
|
+
...props,
|
|
43
|
+
children
|
|
44
|
+
});
|
|
45
|
+
}
|
|
36
46
|
//#endregion
|
|
37
|
-
export { Radio, RadioGroup };
|
|
47
|
+
export { Radio, RadioGroup, RadioGroupItem };
|
package/dist/ui/resizable.d.ts
CHANGED
|
@@ -49,7 +49,25 @@ export type ResizableHandleProps = Omit<ComponentProps<"div">, "role" | "tabInde
|
|
|
49
49
|
disableDoubleClick?: boolean;
|
|
50
50
|
style?: CSSProperties & ResizableKnobStyle;
|
|
51
51
|
};
|
|
52
|
-
export
|
|
52
|
+
export type ResizableFloatingPanelSide = "left" | "right";
|
|
53
|
+
export type ResizableSeparatorState = "inactive" | "hover" | "focus" | "active";
|
|
54
|
+
type ResizableFloatingPanelStyle = CSSProperties & ResizableKnobStyle & {
|
|
55
|
+
"--resizable-floating-width"?: string;
|
|
56
|
+
};
|
|
57
|
+
export type ResizableFloatingPanelProps = Omit<ComponentProps<"div">, "style"> & {
|
|
58
|
+
side?: ResizableFloatingPanelSide;
|
|
59
|
+
size?: number;
|
|
60
|
+
defaultSize?: number;
|
|
61
|
+
onSizeChange?: (size: number) => void;
|
|
62
|
+
minSize?: number;
|
|
63
|
+
maxSize?: number;
|
|
64
|
+
handleVariant?: ResizableHandleVariant;
|
|
65
|
+
handleLabel?: string;
|
|
66
|
+
getAriaValueText?: (size: number) => string;
|
|
67
|
+
style?: ResizableFloatingPanelStyle;
|
|
68
|
+
};
|
|
69
|
+
export declare function ResizablePanelGroup({ className, orientation, variant, disableCursor, children, ...props }: ResizablePanelGroupProps): import("react").JSX.Element;
|
|
53
70
|
export declare function ResizablePanel({ className, ...props }: ResizablePanelProps): import("react").JSX.Element;
|
|
54
|
-
export declare function ResizableHandle({ className, variant, withHandle, children, ...props }: ResizableHandleProps): import("react").JSX.Element;
|
|
71
|
+
export declare function ResizableHandle({ className, variant, withHandle, children, "aria-label": ariaLabel, ...props }: ResizableHandleProps): import("react").JSX.Element;
|
|
72
|
+
export declare function ResizableFloatingPanel({ side, size: controlledSize, defaultSize, onSizeChange, minSize, maxSize, handleVariant, handleLabel, getAriaValueText, className, style, children, ...props }: ResizableFloatingPanelProps): import("react").JSX.Element;
|
|
55
73
|
//#endregion
|