@agent-native/toolkit 0.9.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent-native.eject.json +71 -0
- package/dist/chat-history/ChatHistoryRail.d.ts +15 -1
- package/dist/chat-history/ChatHistoryRail.d.ts.map +1 -1
- package/dist/chat-history/ChatHistoryRail.js +26 -13
- package/dist/chat-history/ChatHistoryRail.js.map +1 -1
- package/dist/chat-history/ChatHistoryRail.spec.js +77 -1
- package/dist/chat-history/ChatHistoryRail.spec.js.map +1 -1
- package/dist/chat-history/index.d.ts +2 -1
- package/dist/chat-history/index.d.ts.map +1 -1
- package/dist/chat-history/index.js +2 -1
- package/dist/chat-history/index.js.map +1 -1
- package/dist/chat-history/useChatHistoryRailController.d.ts +26 -0
- package/dist/chat-history/useChatHistoryRailController.d.ts.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.js +36 -0
- package/dist/chat-history/useChatHistoryRailController.js.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.spec.d.ts +2 -0
- package/dist/chat-history/useChatHistoryRailController.spec.d.ts.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.spec.js +101 -0
- package/dist/chat-history/useChatHistoryRailController.spec.js.map +1 -0
- package/dist/chat-history.css +2 -0
- package/dist/composer/ComposerPlusMenu.js +1 -1
- package/dist/composer/ComposerPlusMenu.js.map +1 -1
- package/dist/composer/PromptComposer.d.ts.map +1 -1
- package/dist/composer/PromptComposer.js +22 -4
- package/dist/composer/PromptComposer.js.map +1 -1
- package/dist/composer/useRealtimeVoiceMode.d.ts +7 -0
- package/dist/composer/useRealtimeVoiceMode.d.ts.map +1 -1
- package/dist/composer/useRealtimeVoiceMode.js +91 -19
- package/dist/composer/useRealtimeVoiceMode.js.map +1 -1
- package/dist/composer/useRealtimeVoiceMode.spec.js +58 -9
- package/dist/composer/useRealtimeVoiceMode.spec.js.map +1 -1
- package/dist/conformance/__fixtures__/css-in-js-adapter.d.ts +7 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.d.ts.map +1 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.js +84 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.js.map +1 -0
- package/dist/conformance/conformance.spec.d.ts +2 -0
- package/dist/conformance/conformance.spec.d.ts.map +1 -0
- package/dist/conformance/conformance.spec.js +58 -0
- package/dist/conformance/conformance.spec.js.map +1 -0
- package/dist/conformance/index.d.ts +4 -0
- package/dist/conformance/index.d.ts.map +1 -0
- package/dist/conformance/index.js +4 -0
- package/dist/conformance/index.js.map +1 -0
- package/dist/conformance/runner.d.ts +12 -0
- package/dist/conformance/runner.d.ts.map +1 -0
- package/dist/conformance/runner.js +441 -0
- package/dist/conformance/runner.js.map +1 -0
- package/dist/conformance/types.d.ts +26 -0
- package/dist/conformance/types.d.ts.map +1 -0
- package/dist/conformance/types.js +13 -0
- package/dist/conformance/types.js.map +1 -0
- package/dist/conformance/version.d.ts +6 -0
- package/dist/conformance/version.d.ts.map +1 -0
- package/dist/conformance/version.js +14 -0
- package/dist/conformance/version.js.map +1 -0
- package/dist/design-system/components.d.ts +64 -0
- package/dist/design-system/components.d.ts.map +1 -0
- package/dist/design-system/components.js +50 -0
- package/dist/design-system/components.js.map +1 -0
- package/dist/design-system/context.d.ts +11 -0
- package/dist/design-system/context.d.ts.map +1 -0
- package/dist/design-system/context.js +17 -0
- package/dist/design-system/context.js.map +1 -0
- package/dist/design-system/default-adapter.d.ts +3 -0
- package/dist/design-system/default-adapter.d.ts.map +1 -0
- package/dist/design-system/default-adapter.js +166 -0
- package/dist/design-system/default-adapter.js.map +1 -0
- package/dist/design-system/default-adapter.spec.d.ts +2 -0
- package/dist/design-system/default-adapter.spec.d.ts.map +1 -0
- package/dist/design-system/default-adapter.spec.js +96 -0
- package/dist/design-system/default-adapter.spec.js.map +1 -0
- package/dist/design-system/definition.d.ts +9 -0
- package/dist/design-system/definition.d.ts.map +1 -0
- package/dist/design-system/definition.js +4 -0
- package/dist/design-system/definition.js.map +1 -0
- package/dist/design-system/design-system.spec.d.ts +2 -0
- package/dist/design-system/design-system.spec.d.ts.map +1 -0
- package/dist/design-system/design-system.spec.js +121 -0
- package/dist/design-system/design-system.spec.js.map +1 -0
- package/dist/design-system/error-boundary.d.ts +18 -0
- package/dist/design-system/error-boundary.d.ts.map +1 -0
- package/dist/design-system/error-boundary.js +16 -0
- package/dist/design-system/error-boundary.js.map +1 -0
- package/dist/design-system/index.d.ts +8 -0
- package/dist/design-system/index.d.ts.map +1 -0
- package/dist/design-system/index.js +8 -0
- package/dist/design-system/index.js.map +1 -0
- package/dist/design-system/theme.d.ts +30 -0
- package/dist/design-system/theme.d.ts.map +1 -0
- package/dist/design-system/theme.js +95 -0
- package/dist/design-system/theme.js.map +1 -0
- package/dist/design-system/theme.spec.d.ts +2 -0
- package/dist/design-system/theme.spec.d.ts.map +1 -0
- package/dist/design-system/theme.spec.js +43 -0
- package/dist/design-system/theme.spec.js.map +1 -0
- package/dist/design-system/types.d.ts +288 -0
- package/dist/design-system/types.d.ts.map +1 -0
- package/dist/design-system/types.js +2 -0
- package/dist/design-system/types.js.map +1 -0
- package/dist/provider.d.ts +4 -3
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +46 -4
- package/dist/provider.js.map +1 -1
- package/dist/ui/button.d.ts +5 -0
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +25 -4
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/dialog.d.ts +4 -0
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +2 -2
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/popover.d.ts +1 -0
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +2 -2
- package/dist/ui/popover.js.map +1 -1
- package/dist/ui/select.d.ts +3 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +1 -1
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/sidebar.d.ts +6 -2
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +12 -15
- package/dist/ui/sidebar.js.map +1 -1
- package/dist/ui/tooltip.d.ts +3 -1
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +2 -2
- package/dist/ui/tooltip.js.map +1 -1
- package/package.json +31 -1
- package/src/chat-history/ChatHistoryRail.spec.tsx +174 -0
- package/src/chat-history/ChatHistoryRail.tsx +100 -39
- package/src/chat-history/index.ts +9 -0
- package/src/chat-history/useChatHistoryRailController.spec.tsx +131 -0
- package/src/chat-history/useChatHistoryRailController.ts +76 -0
- package/src/chat-history.css +2 -0
- package/src/composer/ComposerPlusMenu.tsx +11 -8
- package/src/composer/PromptComposer.tsx +27 -6
- package/src/composer/useRealtimeVoiceMode.spec.ts +82 -8
- package/src/composer/useRealtimeVoiceMode.tsx +107 -22
- package/src/conformance/__fixtures__/css-in-js-adapter.tsx +401 -0
- package/src/conformance/conformance.spec.tsx +83 -0
- package/src/conformance/index.ts +3 -0
- package/src/conformance/runner.tsx +710 -0
- package/src/conformance/types.ts +45 -0
- package/src/conformance/version.ts +22 -0
- package/src/design-system/components.tsx +146 -0
- package/src/design-system/context.tsx +31 -0
- package/src/design-system/default-adapter.spec.tsx +143 -0
- package/src/design-system/default-adapter.tsx +915 -0
- package/src/design-system/definition.ts +14 -0
- package/src/design-system/design-system.spec.tsx +183 -0
- package/src/design-system/error-boundary.tsx +37 -0
- package/src/design-system/index.ts +7 -0
- package/src/design-system/theme.spec.ts +61 -0
- package/src/design-system/theme.ts +145 -0
- package/src/design-system/types.ts +363 -0
- package/src/provider.tsx +98 -5
- package/src/ui/button.tsx +95 -6
- package/src/ui/dialog.tsx +48 -23
- package/src/ui/popover.tsx +16 -2
- package/src/ui/select.tsx +7 -3
- package/src/ui/sidebar.tsx +47 -48
- package/src/ui/tooltip.tsx +7 -3
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import type { ComponentType, CSSProperties, KeyboardEvent as ReactKeyboardEvent, MouseEvent as ReactMouseEvent, ReactElement, ReactNode, Ref, RefObject } from "react";
|
|
2
|
+
export declare const DESIGN_SYSTEM_CONTRACT_VERSION: 1;
|
|
3
|
+
export type DesignSystemIntent = "primary" | "neutral" | "danger";
|
|
4
|
+
export type DesignSystemEmphasis = "solid" | "outline" | "ghost";
|
|
5
|
+
export type DesignSystemSize = "compact" | "default" | "large";
|
|
6
|
+
export type DesignSystemTone = "neutral" | "info" | "success" | "warning" | "danger";
|
|
7
|
+
export type DesignSystemPlacement = "top" | "right" | "bottom" | "left";
|
|
8
|
+
export type DesignSystemAlign = "start" | "center" | "end";
|
|
9
|
+
export type DesignSystemKey = string | number;
|
|
10
|
+
export type DesignSystemPressEvent = ReactMouseEvent<HTMLElement> | ReactKeyboardEvent<HTMLElement>;
|
|
11
|
+
/**
|
|
12
|
+
* Styling hooks are optional interoperability affordances. Adapters must not
|
|
13
|
+
* rely on either hook being present, and Toolkit views must not pass
|
|
14
|
+
* framework-specific utility classes through this contract.
|
|
15
|
+
*/
|
|
16
|
+
export interface DesignSystemStyleProps {
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
export interface DesignSystemAccessibleProps {
|
|
21
|
+
id?: string;
|
|
22
|
+
title?: string;
|
|
23
|
+
"aria-label"?: string;
|
|
24
|
+
"aria-labelledby"?: string;
|
|
25
|
+
"aria-describedby"?: string;
|
|
26
|
+
"aria-controls"?: string;
|
|
27
|
+
"aria-expanded"?: boolean;
|
|
28
|
+
"aria-haspopup"?: boolean | "dialog" | "grid" | "listbox" | "menu" | "tree";
|
|
29
|
+
"aria-pressed"?: boolean | "mixed";
|
|
30
|
+
}
|
|
31
|
+
export interface DesignSystemOverlayProps extends DesignSystemStyleProps {
|
|
32
|
+
portalContainer?: Element | null;
|
|
33
|
+
placement?: DesignSystemPlacement;
|
|
34
|
+
align?: DesignSystemAlign;
|
|
35
|
+
collisionPadding?: number;
|
|
36
|
+
}
|
|
37
|
+
export interface ActionButtonProps extends DesignSystemStyleProps, DesignSystemAccessibleProps {
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
intent?: DesignSystemIntent;
|
|
40
|
+
emphasis?: DesignSystemEmphasis;
|
|
41
|
+
size?: DesignSystemSize;
|
|
42
|
+
pending?: boolean;
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
type?: "button" | "submit" | "reset";
|
|
45
|
+
leadingIcon?: ReactNode;
|
|
46
|
+
trailingIcon?: ReactNode;
|
|
47
|
+
onPress?: (event?: DesignSystemPressEvent) => void;
|
|
48
|
+
elementRef?: Ref<HTMLButtonElement>;
|
|
49
|
+
}
|
|
50
|
+
export interface IconButtonProps extends DesignSystemStyleProps, DesignSystemAccessibleProps {
|
|
51
|
+
label: string;
|
|
52
|
+
icon: ReactNode;
|
|
53
|
+
intent?: DesignSystemIntent;
|
|
54
|
+
emphasis?: DesignSystemEmphasis;
|
|
55
|
+
size?: DesignSystemSize;
|
|
56
|
+
pending?: boolean;
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
type?: "button" | "submit" | "reset";
|
|
59
|
+
onPress?: (event?: DesignSystemPressEvent) => void;
|
|
60
|
+
elementRef?: Ref<HTMLButtonElement>;
|
|
61
|
+
}
|
|
62
|
+
export type DesignSystemTextInputType = "text" | "email" | "password" | "search" | "tel" | "url";
|
|
63
|
+
export interface TextFieldProps extends DesignSystemStyleProps, DesignSystemAccessibleProps {
|
|
64
|
+
value: string;
|
|
65
|
+
onChange: (value: string) => void;
|
|
66
|
+
label?: ReactNode;
|
|
67
|
+
description?: ReactNode;
|
|
68
|
+
errorMessage?: ReactNode;
|
|
69
|
+
placeholder?: string;
|
|
70
|
+
/** Optional native datalist id for editable fields with suggestions. */
|
|
71
|
+
list?: string;
|
|
72
|
+
name?: string;
|
|
73
|
+
type?: DesignSystemTextInputType;
|
|
74
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
|
|
75
|
+
autoComplete?: string;
|
|
76
|
+
autoFocus?: boolean;
|
|
77
|
+
required?: boolean;
|
|
78
|
+
readOnly?: boolean;
|
|
79
|
+
disabled?: boolean;
|
|
80
|
+
invalid?: boolean;
|
|
81
|
+
leadingContent?: ReactNode;
|
|
82
|
+
trailingContent?: ReactNode;
|
|
83
|
+
onBlur?: () => void;
|
|
84
|
+
onFocus?: () => void;
|
|
85
|
+
onKeyDown?: (event: ReactKeyboardEvent<HTMLElement>) => void;
|
|
86
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
87
|
+
}
|
|
88
|
+
export interface TextAreaProps extends DesignSystemStyleProps, DesignSystemAccessibleProps {
|
|
89
|
+
value: string;
|
|
90
|
+
onChange: (value: string) => void;
|
|
91
|
+
label?: ReactNode;
|
|
92
|
+
description?: ReactNode;
|
|
93
|
+
errorMessage?: ReactNode;
|
|
94
|
+
placeholder?: string;
|
|
95
|
+
name?: string;
|
|
96
|
+
rows?: number;
|
|
97
|
+
maxLength?: number;
|
|
98
|
+
autoFocus?: boolean;
|
|
99
|
+
required?: boolean;
|
|
100
|
+
readOnly?: boolean;
|
|
101
|
+
disabled?: boolean;
|
|
102
|
+
invalid?: boolean;
|
|
103
|
+
onBlur?: () => void;
|
|
104
|
+
onFocus?: () => void;
|
|
105
|
+
onKeyDown?: (event: ReactKeyboardEvent<HTMLElement>) => void;
|
|
106
|
+
textAreaRef?: Ref<HTMLTextAreaElement>;
|
|
107
|
+
}
|
|
108
|
+
export interface SpinnerProps extends DesignSystemStyleProps, DesignSystemAccessibleProps {
|
|
109
|
+
label?: string;
|
|
110
|
+
size?: DesignSystemSize;
|
|
111
|
+
}
|
|
112
|
+
export interface SkeletonProps extends DesignSystemStyleProps, DesignSystemAccessibleProps {
|
|
113
|
+
width?: string | number;
|
|
114
|
+
height?: string | number;
|
|
115
|
+
shape?: "line" | "rectangle" | "circle";
|
|
116
|
+
}
|
|
117
|
+
export interface StatusProps extends DesignSystemStyleProps, DesignSystemAccessibleProps {
|
|
118
|
+
children: ReactNode;
|
|
119
|
+
tone?: DesignSystemTone;
|
|
120
|
+
icon?: ReactNode;
|
|
121
|
+
size?: DesignSystemSize;
|
|
122
|
+
}
|
|
123
|
+
export interface SurfaceProps extends DesignSystemStyleProps, DesignSystemAccessibleProps {
|
|
124
|
+
children: ReactNode;
|
|
125
|
+
as?: "div" | "section" | "article" | "aside";
|
|
126
|
+
elevation?: "none" | "low" | "medium";
|
|
127
|
+
padding?: "none" | "compact" | "default" | "spacious";
|
|
128
|
+
interactive?: boolean;
|
|
129
|
+
onPress?: (event?: DesignSystemPressEvent) => void;
|
|
130
|
+
}
|
|
131
|
+
export interface AvatarProps extends DesignSystemStyleProps, DesignSystemAccessibleProps {
|
|
132
|
+
name: string;
|
|
133
|
+
src?: string | null;
|
|
134
|
+
fallback?: ReactNode;
|
|
135
|
+
size?: DesignSystemSize;
|
|
136
|
+
status?: "online" | "offline" | "busy" | "away";
|
|
137
|
+
imageRef?: Ref<HTMLImageElement>;
|
|
138
|
+
}
|
|
139
|
+
export interface TooltipProps extends DesignSystemOverlayProps {
|
|
140
|
+
trigger: ReactElement;
|
|
141
|
+
content: ReactNode;
|
|
142
|
+
open?: boolean;
|
|
143
|
+
defaultOpen?: boolean;
|
|
144
|
+
onOpenChange?: (open: boolean) => void;
|
|
145
|
+
delayMs?: number;
|
|
146
|
+
disabled?: boolean;
|
|
147
|
+
}
|
|
148
|
+
export interface MenuItem {
|
|
149
|
+
id: DesignSystemKey;
|
|
150
|
+
label: ReactNode;
|
|
151
|
+
description?: ReactNode;
|
|
152
|
+
icon?: ReactNode;
|
|
153
|
+
shortcut?: ReactNode;
|
|
154
|
+
disabled?: boolean;
|
|
155
|
+
intent?: Extract<DesignSystemIntent, "neutral" | "danger">;
|
|
156
|
+
selected?: boolean;
|
|
157
|
+
children?: readonly MenuItem[];
|
|
158
|
+
}
|
|
159
|
+
export interface MenuSection {
|
|
160
|
+
id: DesignSystemKey;
|
|
161
|
+
label?: ReactNode;
|
|
162
|
+
items: readonly MenuItem[];
|
|
163
|
+
}
|
|
164
|
+
export interface MenuProps extends DesignSystemOverlayProps {
|
|
165
|
+
trigger: ReactElement;
|
|
166
|
+
items?: readonly MenuItem[];
|
|
167
|
+
sections?: readonly MenuSection[];
|
|
168
|
+
open?: boolean;
|
|
169
|
+
defaultOpen?: boolean;
|
|
170
|
+
onOpenChange?: (open: boolean) => void;
|
|
171
|
+
onAction: (id: DesignSystemKey) => void;
|
|
172
|
+
closeOnAction?: boolean;
|
|
173
|
+
}
|
|
174
|
+
export interface PopoverProps extends DesignSystemOverlayProps {
|
|
175
|
+
trigger: ReactElement;
|
|
176
|
+
children: ReactNode;
|
|
177
|
+
open?: boolean;
|
|
178
|
+
defaultOpen?: boolean;
|
|
179
|
+
onOpenChange?: (open: boolean) => void;
|
|
180
|
+
modal?: boolean;
|
|
181
|
+
dismissible?: boolean;
|
|
182
|
+
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
183
|
+
restoreFocusRef?: RefObject<HTMLElement | null>;
|
|
184
|
+
}
|
|
185
|
+
export interface DialogProps extends DesignSystemOverlayProps {
|
|
186
|
+
open: boolean;
|
|
187
|
+
onOpenChange: (open: boolean) => void;
|
|
188
|
+
title: ReactNode;
|
|
189
|
+
children: ReactNode;
|
|
190
|
+
description?: ReactNode;
|
|
191
|
+
footer?: ReactNode;
|
|
192
|
+
trigger?: ReactElement;
|
|
193
|
+
size?: "small" | "medium" | "large" | "fullscreen";
|
|
194
|
+
dismissible?: boolean;
|
|
195
|
+
closeLabel?: string;
|
|
196
|
+
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
197
|
+
restoreFocusRef?: RefObject<HTMLElement | null>;
|
|
198
|
+
}
|
|
199
|
+
export interface PickerOption<Value extends DesignSystemKey = string> {
|
|
200
|
+
value: Value;
|
|
201
|
+
label: ReactNode;
|
|
202
|
+
textValue?: string;
|
|
203
|
+
description?: ReactNode;
|
|
204
|
+
icon?: ReactNode;
|
|
205
|
+
disabled?: boolean;
|
|
206
|
+
keywords?: readonly string[];
|
|
207
|
+
}
|
|
208
|
+
export interface PickerProps<Value extends DesignSystemKey = string> extends DesignSystemOverlayProps, DesignSystemAccessibleProps {
|
|
209
|
+
mode: "select" | "combobox";
|
|
210
|
+
options: readonly PickerOption<Value>[];
|
|
211
|
+
value: Value | null;
|
|
212
|
+
onChange: (value: Value | null) => void;
|
|
213
|
+
label?: ReactNode;
|
|
214
|
+
description?: ReactNode;
|
|
215
|
+
errorMessage?: ReactNode;
|
|
216
|
+
placeholder?: string;
|
|
217
|
+
searchValue?: string;
|
|
218
|
+
onSearchChange?: (value: string) => void;
|
|
219
|
+
open?: boolean;
|
|
220
|
+
onOpenChange?: (open: boolean) => void;
|
|
221
|
+
emptyContent?: ReactNode;
|
|
222
|
+
loadingContent?: ReactNode;
|
|
223
|
+
loading?: boolean;
|
|
224
|
+
required?: boolean;
|
|
225
|
+
disabled?: boolean;
|
|
226
|
+
invalid?: boolean;
|
|
227
|
+
pickerRef?: Ref<HTMLElement>;
|
|
228
|
+
}
|
|
229
|
+
export interface CheckboxProps extends DesignSystemStyleProps, DesignSystemAccessibleProps {
|
|
230
|
+
checked: boolean;
|
|
231
|
+
onChange: (checked: boolean) => void;
|
|
232
|
+
label?: ReactNode;
|
|
233
|
+
description?: ReactNode;
|
|
234
|
+
indeterminate?: boolean;
|
|
235
|
+
required?: boolean;
|
|
236
|
+
disabled?: boolean;
|
|
237
|
+
invalid?: boolean;
|
|
238
|
+
inputRef?: Ref<HTMLButtonElement>;
|
|
239
|
+
}
|
|
240
|
+
export interface SwitchProps extends DesignSystemStyleProps, DesignSystemAccessibleProps {
|
|
241
|
+
checked: boolean;
|
|
242
|
+
onChange: (checked: boolean) => void;
|
|
243
|
+
label?: ReactNode;
|
|
244
|
+
description?: ReactNode;
|
|
245
|
+
disabled?: boolean;
|
|
246
|
+
inputRef?: Ref<HTMLButtonElement>;
|
|
247
|
+
}
|
|
248
|
+
export interface TabItem<Value extends DesignSystemKey = string> {
|
|
249
|
+
value: Value;
|
|
250
|
+
label: ReactNode;
|
|
251
|
+
content: ReactNode;
|
|
252
|
+
disabled?: boolean;
|
|
253
|
+
icon?: ReactNode;
|
|
254
|
+
}
|
|
255
|
+
export interface TabsProps<Value extends DesignSystemKey = string> extends DesignSystemStyleProps, DesignSystemAccessibleProps {
|
|
256
|
+
items: readonly TabItem<Value>[];
|
|
257
|
+
value: Value;
|
|
258
|
+
onChange: (value: Value) => void;
|
|
259
|
+
orientation?: "horizontal" | "vertical";
|
|
260
|
+
activationMode?: "automatic" | "manual";
|
|
261
|
+
}
|
|
262
|
+
export interface PickerComponent {
|
|
263
|
+
<Value extends DesignSystemKey = string>(props: PickerProps<Value>): ReactNode;
|
|
264
|
+
}
|
|
265
|
+
export interface TabsComponent {
|
|
266
|
+
<Value extends DesignSystemKey = string>(props: TabsProps<Value>): ReactNode;
|
|
267
|
+
}
|
|
268
|
+
export interface DesignSystemComponents {
|
|
269
|
+
ActionButton: ComponentType<ActionButtonProps>;
|
|
270
|
+
IconButton: ComponentType<IconButtonProps>;
|
|
271
|
+
TextField: ComponentType<TextFieldProps>;
|
|
272
|
+
TextArea: ComponentType<TextAreaProps>;
|
|
273
|
+
Spinner: ComponentType<SpinnerProps>;
|
|
274
|
+
Skeleton: ComponentType<SkeletonProps>;
|
|
275
|
+
Status: ComponentType<StatusProps>;
|
|
276
|
+
Surface: ComponentType<SurfaceProps>;
|
|
277
|
+
Avatar: ComponentType<AvatarProps>;
|
|
278
|
+
Tooltip: ComponentType<TooltipProps>;
|
|
279
|
+
Menu: ComponentType<MenuProps>;
|
|
280
|
+
Popover: ComponentType<PopoverProps>;
|
|
281
|
+
Dialog: ComponentType<DialogProps>;
|
|
282
|
+
Picker: PickerComponent;
|
|
283
|
+
Checkbox: ComponentType<CheckboxProps>;
|
|
284
|
+
Switch: ComponentType<SwitchProps>;
|
|
285
|
+
Tabs: TabsComponent;
|
|
286
|
+
}
|
|
287
|
+
export type DesignSystemComponentName = keyof DesignSystemComponents;
|
|
288
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/design-system/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,aAAa,IAAI,kBAAkB,EACnC,UAAU,IAAI,eAAe,EAC7B,YAAY,EACZ,SAAS,EACT,GAAG,EACH,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,eAAO,MAAM,8BAA8B,EAAG,CAAU,CAAC;AAEzD,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAClE,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AACjE,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAC/D,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,MAAM,GACN,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;AACb,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AACxE,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAC3D,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,CAAC;AAC9C,MAAM,MAAM,sBAAsB,GAC9B,eAAe,CAAC,WAAW,CAAC,GAC5B,kBAAkB,CAAC,WAAW,CAAC,CAAC;AAEpC;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,MAAM,WAAW,2BAA2B;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBA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ACd;AAED,MAAM,WAAW,aAAa;IAC5B,CAAC,KAAK,SAAS,eAAe,GAAG,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;CAC9E;AAED,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC/C,UAAU,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC3C,SAAS,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACzC,QAAQ,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IACvC,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACrC,QAAQ,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IACvC,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACnC,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACrC,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACnC,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACrC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAC/B,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACrC,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACnC,MAAM,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IACvC,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACnC,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,MAAM,yBAAyB,GAAG,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/design-system/types.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAU,CAAC"}
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { type ReactNode, type ComponentType } from "react";
|
|
2
|
+
import type { DesignSystemDefinition } from "./design-system/definition.js";
|
|
2
3
|
import type { ButtonProps } from "./ui/button.js";
|
|
3
4
|
export interface ToolkitComponents {
|
|
4
5
|
Button?: ComponentType<ButtonProps>;
|
|
5
6
|
}
|
|
6
|
-
interface ToolkitProviderProps {
|
|
7
|
+
export interface ToolkitProviderProps {
|
|
7
8
|
children: ReactNode;
|
|
8
9
|
components?: ToolkitComponents;
|
|
10
|
+
designSystem?: DesignSystemDefinition;
|
|
9
11
|
}
|
|
10
|
-
export declare function ToolkitProvider({ children, components, }: ToolkitProviderProps): import("react").JSX.Element;
|
|
12
|
+
export declare function ToolkitProvider({ children, components, designSystem, }: ToolkitProviderProps): import("react").JSX.Element;
|
|
11
13
|
export declare function useToolkitComponents(): ToolkitComponents;
|
|
12
14
|
export declare function useToolkitComponent<Name extends keyof ToolkitComponents>(name: Name): ToolkitComponents[Name];
|
|
13
|
-
export {};
|
|
14
15
|
//# sourceMappingURL=provider.d.ts.map
|
package/dist/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACd,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAK5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,YAAY,CAAC,EAAE,sBAAsB,CAAC;CACvC;AAID,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,UAAU,EACV,YAAY,GACb,EAAE,oBAAoB,+BA2FtB;AAED,wBAAgB,oBAAoB,IAAI,iBAAiB,CAExD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,SAAS,MAAM,iBAAiB,EACtE,IAAI,EAAE,IAAI,GACT,iBAAiB,CAAC,IAAI,CAAC,CAEzB"}
|
package/dist/provider.js
CHANGED
|
@@ -1,10 +1,52 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useContext, useMemo, } from "react";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext, useEffect, useMemo, } from "react";
|
|
3
|
+
import { DesignSystemContext, LegacyButtonRenderContext, } from "./design-system/context.js";
|
|
3
4
|
const ToolkitComponentsContext = createContext({});
|
|
4
|
-
export function ToolkitProvider({ children, components, }) {
|
|
5
|
+
export function ToolkitProvider({ children, components, designSystem, }) {
|
|
5
6
|
const parent = useContext(ToolkitComponentsContext);
|
|
7
|
+
const parentDesignSystem = useContext(DesignSystemContext);
|
|
6
8
|
const value = useMemo(() => ({ ...parent, ...components }), [parent, components]);
|
|
7
|
-
|
|
9
|
+
const mergedDefinition = useMemo(() => {
|
|
10
|
+
if (!designSystem)
|
|
11
|
+
return parentDesignSystem.definition;
|
|
12
|
+
return {
|
|
13
|
+
...parentDesignSystem.definition,
|
|
14
|
+
...designSystem,
|
|
15
|
+
components: {
|
|
16
|
+
...parentDesignSystem.definition?.components,
|
|
17
|
+
...designSystem.components,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}, [designSystem, parentDesignSystem.definition]);
|
|
21
|
+
const legacyActionButton = useMemo(() => {
|
|
22
|
+
if (!value.Button)
|
|
23
|
+
return parentDesignSystem.legacyActionButton;
|
|
24
|
+
const LegacyButton = value.Button;
|
|
25
|
+
return function LegacyActionButton({ children, intent, emphasis, size, pending, leadingIcon, trailingIcon, onPress, elementRef, ...props }) {
|
|
26
|
+
const variant = emphasis === "ghost"
|
|
27
|
+
? "ghost"
|
|
28
|
+
: emphasis === "outline"
|
|
29
|
+
? "outline"
|
|
30
|
+
: intent === "danger"
|
|
31
|
+
? "destructive"
|
|
32
|
+
: intent === "primary"
|
|
33
|
+
? "default"
|
|
34
|
+
: "secondary";
|
|
35
|
+
const legacySize = size === "compact" ? "sm" : size === "large" ? "lg" : "default";
|
|
36
|
+
return (_jsx(LegacyButtonRenderContext.Provider, { value: true, children: _jsxs(LegacyButton, { ...props, ref: elementRef, variant: variant, size: legacySize, disabled: props.disabled || pending, "aria-busy": pending || undefined, onClick: (event) => onPress?.(event), children: [leadingIcon, children, trailingIcon] }) }));
|
|
37
|
+
};
|
|
38
|
+
}, [parentDesignSystem.legacyActionButton, value.Button]);
|
|
39
|
+
const designSystemValue = useMemo(() => ({ definition: mergedDefinition, legacyActionButton }), [legacyActionButton, mergedDefinition]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (!mergedDefinition?.components?.ActionButton || !value.Button)
|
|
42
|
+
return;
|
|
43
|
+
const isDevelopment = import.meta.env?.DEV ??
|
|
44
|
+
true;
|
|
45
|
+
if (!isDevelopment)
|
|
46
|
+
return;
|
|
47
|
+
console.warn("[agent-native] ToolkitProvider received both designSystem.components.ActionButton and legacy components.Button. ActionButton takes precedence.");
|
|
48
|
+
}, [mergedDefinition?.components?.ActionButton, value.Button]);
|
|
49
|
+
return (_jsx(DesignSystemContext.Provider, { value: designSystemValue, children: _jsx(ToolkitComponentsContext.Provider, { value: value, children: children }) }));
|
|
8
50
|
}
|
|
9
51
|
export function useToolkitComponents() {
|
|
10
52
|
return useContext(ToolkitComponentsContext);
|
package/dist/provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":";AAAA,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SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,gBAAgB,EAAE,UAAU,EAAE,YAAY,IAAI,CAAC,KAAK,CAAC,MAAM;YAAE,OAAO;QACzE,MAAM,aAAa,GAChB,OAAO,IAAiD,CAAC,GAAG,EAAE,GAAG;YAClE,IAAI,CAAC;QACP,IAAI,CAAC,aAAa;YAAE,OAAO;QAC3B,OAAO,CAAC,IAAI,CACV,gJAAgJ,CACjJ,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAE/D,OAAO,CACL,KAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,iBAAiB,YACpD,KAAC,wBAAwB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAC5C,QAAQ,GACyB,GACP,CAChC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,OAAO,UAAU,CAAC,wBAAwB,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,IAAU;IAEV,OAAO,oBAAoB,EAAE,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC"}
|
package/dist/ui/button.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
import type { DesignSystemEmphasis, DesignSystemIntent } from "../design-system/types.js";
|
|
3
4
|
declare const buttonVariants: (props?: ({
|
|
4
5
|
variant?: "default" | "destructive" | "ghost" | "link" | "outline" | "secondary" | null | undefined;
|
|
5
6
|
size?: "default" | "icon" | "lg" | "sm" | null | undefined;
|
|
6
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
8
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
9
|
asChild?: boolean;
|
|
10
|
+
/** Semantic meaning forwarded to a registered design-system ActionButton. */
|
|
11
|
+
intent?: DesignSystemIntent;
|
|
12
|
+
/** Semantic prominence forwarded independently of the default visual variant. */
|
|
13
|
+
emphasis?: DesignSystemEmphasis;
|
|
9
14
|
}
|
|
10
15
|
declare const ButtonBase: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
16
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
package/dist/ui/button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AAInC,QAAA,MAAM,cAAc;;;8EA2BnB,CAAC;AAEF,MAAM,WAAW,WACf,SACE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,iFAAiF;IACjF,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAED,QAAA,MAAM,UAAU,uFAsBf,CAAC;AAKF,QAAA,MAAM,MAAM,uFAgFX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/ui/button.js
CHANGED
|
@@ -2,6 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import * as React from "react";
|
|
5
|
+
import { LegacyButtonRenderContext, useDesignSystemComponent, } from "../design-system/context.js";
|
|
6
|
+
import { DesignSystemErrorBoundary } from "../design-system/error-boundary.js";
|
|
5
7
|
import { useToolkitComponent } from "../provider.js";
|
|
6
8
|
import { cn } from "../utils.js";
|
|
7
9
|
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-[color,background-color,border-color,box-shadow,transform,scale] duration-150 active:scale-[0.98] motion-reduce:active:scale-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
@@ -26,20 +28,39 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
|
|
|
26
28
|
size: "default",
|
|
27
29
|
},
|
|
28
30
|
});
|
|
29
|
-
const ButtonBase = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
31
|
+
const ButtonBase = React.forwardRef(({ className, variant, size, asChild = false, intent: _intent, emphasis: _emphasis, ...props }, ref) => {
|
|
30
32
|
const Comp = asChild ? Slot : "button";
|
|
31
33
|
return (_jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props }));
|
|
32
34
|
});
|
|
33
35
|
ButtonBase.displayName = "ButtonBase";
|
|
34
36
|
const ButtonOverrideRenderContext = React.createContext(false);
|
|
35
|
-
const Button = React.forwardRef((props, ref) => {
|
|
37
|
+
const Button = React.forwardRef(({ variant, size, asChild = false, intent, emphasis, ...props }, ref) => {
|
|
38
|
+
const DesignSystemActionButton = useDesignSystemComponent("ActionButton");
|
|
36
39
|
const Override = useToolkitComponent("Button");
|
|
37
40
|
const isRenderingOverride = React.useContext(ButtonOverrideRenderContext);
|
|
41
|
+
const isRenderingLegacyButton = React.useContext(LegacyButtonRenderContext);
|
|
42
|
+
const fallback = (_jsx(ButtonBase, { ref: ref, variant: variant, size: size, asChild: asChild, ...props }));
|
|
43
|
+
if (DesignSystemActionButton && !asChild && !isRenderingLegacyButton) {
|
|
44
|
+
const semanticIntent = intent ??
|
|
45
|
+
(variant === "destructive"
|
|
46
|
+
? "danger"
|
|
47
|
+
: variant === "default"
|
|
48
|
+
? "primary"
|
|
49
|
+
: "neutral");
|
|
50
|
+
const semanticEmphasis = emphasis ??
|
|
51
|
+
(variant === "outline"
|
|
52
|
+
? "outline"
|
|
53
|
+
: variant === "ghost" || variant === "link"
|
|
54
|
+
? "ghost"
|
|
55
|
+
: "solid");
|
|
56
|
+
const semanticSize = size === "sm" ? "compact" : size === "lg" ? "large" : "default";
|
|
57
|
+
return (_jsx(DesignSystemErrorBoundary, { component: "ActionButton", fallback: fallback, children: _jsx(DesignSystemActionButton, { className: props.className, style: props.style, id: props.id, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"], "aria-describedby": props["aria-describedby"], "aria-controls": props["aria-controls"], elementRef: ref, type: props.type, disabled: props.disabled, intent: semanticIntent, emphasis: semanticEmphasis, size: semanticSize, onPress: (event) => props.onClick?.(event), children: props.children }) }));
|
|
58
|
+
}
|
|
38
59
|
if (Override && Override !== Button && !isRenderingOverride) {
|
|
39
60
|
const OverrideButton = Override;
|
|
40
|
-
return (_jsx(ButtonOverrideRenderContext.Provider, { value: true, children: _jsx(OverrideButton, { ref: ref, ...props }) }));
|
|
61
|
+
return (_jsx(DesignSystemErrorBoundary, { component: "ActionButton", fallback: fallback, children: _jsx(ButtonOverrideRenderContext.Provider, { value: true, children: _jsx(OverrideButton, { ref: ref, variant: variant, size: size, asChild: asChild, intent: intent, emphasis: emphasis, ...props }) }) }));
|
|
41
62
|
}
|
|
42
|
-
return
|
|
63
|
+
return fallback;
|
|
43
64
|
});
|
|
44
65
|
Button.displayName = "Button";
|
|
45
66
|
export { Button, ButtonBase, buttonVariants };
|
package/dist/ui/button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,MAAM,cAAc,GAAG,GAAG,CACxB,odAAod,EACpd;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,wDAAwD;YACjE,WAAW,EACT,oEAAoE;YACtE,OAAO,EACL,gFAAgF;YAClF,SAAS,EACP,8DAA8D;YAChE,KAAK,EAAE,8CAA8C;YACrD,IAAI,EAAE,iDAAiD;SACxD;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,gBAAgB;YACzB,EAAE,EAAE,qBAAqB;YACzB,EAAE,EAAE,sBAAsB;YAC1B,IAAI,EAAE,WAAW;SAClB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC;
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CA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HANGED
|
@@ -12,6 +12,10 @@ declare const DialogOverlay: React.ForwardRefExoticComponent<DialogOverlayProps
|
|
|
12
12
|
interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
13
13
|
hideClose?: boolean;
|
|
14
14
|
motion?: DialogMotion;
|
|
15
|
+
container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>["container"];
|
|
16
|
+
closeLabel?: string;
|
|
17
|
+
overlayClassName?: string;
|
|
18
|
+
overlayStyle?: React.CSSProperties;
|
|
15
19
|
}
|
|
16
20
|
declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
21
|
declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
package/dist/ui/dialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/ui/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,aAAa,8GAA0B,CAAC;AAE9C,QAAA,MAAM,YAAY,6CAAyB,CAAC;AAE5C,QAAA,MAAM,WAAW,4GAAwB,CAAC;AAE1C,KAAK,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1C,UAAU,kBAAmB,SAAQ,KAAK,CAAC,wBAAwB,CACjE,OAAO,eAAe,CAAC,OAAO,CAC/B;IACC,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,QAAA,MAAM,aAAa,2FAgBjB,CAAC;AAGH,UAAU,kBAAmB,SAAQ,KAAK,CAAC,wBAAwB,CACjE,OAAO,eAAe,CAAC,OAAO,CAC/B;IAGC,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,MAAM,CAAC,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AiB,8KASrB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
|
package/dist/ui/dialog.js
CHANGED
|
@@ -11,8 +11,8 @@ const DialogOverlay = React.forwardRef(({ className, motion = "default", ...prop
|
|
|
11
11
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", motion === "instant" &&
|
|
12
12
|
"transition-[backdrop-filter] duration-[1000ms] ease-[var(--ease-out-strong)] starting:[backdrop-filter:blur(0px)] motion-reduce:transition-none", className), ...props })));
|
|
13
13
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
14
|
-
const DialogContent = React.forwardRef(({ className, children, hideClose, motion = "default", ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, { motion: motion }), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn("fixed left-1/2 top-1/2 z-[280] grid max-h-[min(760px,calc(100vh-32px))] w-[calc(100vw-24px)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 overflow-hidden rounded-lg border border-border bg-background p-6 text-foreground shadow-lg outline-none", motion === "default" &&
|
|
15
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-150 data-[state=open]:duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", className), ...props, children: [children, !hideClose && (_jsxs(DialogPrimitive.Close, { className: "absolute end-3 top-3 flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", children: [_jsx(IconX, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children:
|
|
14
|
+
const DialogContent = React.forwardRef(({ className, children, hideClose, motion = "default", container, closeLabel = "Close", overlayClassName, overlayStyle, ...props }, ref) => (_jsxs(DialogPortal, { container: container, children: [_jsx(DialogOverlay, { motion: motion, className: overlayClassName, style: overlayStyle }), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn("fixed left-1/2 top-1/2 z-[280] grid max-h-[min(760px,calc(100vh-32px))] w-[calc(100vw-24px)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 overflow-hidden rounded-lg border border-border bg-background p-6 text-foreground shadow-lg outline-none", motion === "default" &&
|
|
15
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-150 data-[state=open]:duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", className), ...props, children: [children, !hideClose && (_jsxs(DialogPrimitive.Close, { className: "absolute end-3 top-3 flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", children: [_jsx(IconX, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: closeLabel })] }))] })] })));
|
|
16
16
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
17
17
|
const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-start", className), ...props }));
|
|
18
18
|
DialogHeader.displayName = "DialogHeader";
|
package/dist/ui/dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/ui/dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC;AAEpC,MAA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AAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAE1C,MAAM,YAAY,GAAG,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EAC6B,EAAE,EAAE,CAAC,CAC1C,cACE,SAAS,EAAE,EAAE,CACX,+DAA+D,EAC/D,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAE1C,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAGlC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,eAAe,CAAC,KAAK,IACpB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,mEAAmE,EACnE,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC;AAE5D,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAGxC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,eAAe,CAAC,WAAW,IAC1B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACT,CACH,CAAC,CAAC;AACH,iBAAiB,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC,WAAW,CAAC;AAExE,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
|
package/dist/ui/popover.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.P
|
|
|
5
5
|
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
7
7
|
portalled?: boolean;
|
|
8
|
+
container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>["container"];
|
|
8
9
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
10
|
export { Popover, PopoverTrigger, PopoverAnchor, PopoverContent };
|
|
10
11
|
//# sourceMappingURL=popover.d.ts.map
|
package/dist/ui/popover.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/ui/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,OAAO,yCAAwB,CAAC;AAEtC,QAAA,MAAM,cAAc,gHAA2B,CAAC;AAEhD,QAAA,MAAM,aAAa,4GAA0B,CAAC;AAE9C,QAAA,MAAM,cAAc;gBAKJ,OAAO;
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/ui/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,OAAO,yCAAwB,CAAC;AAEtC,QAAA,MAAM,cAAc,gHAA2B,CAAC;AAEhD,QAAA,MAAM,aAAa,4GAA0B,CAAC;AAE9C,QAAA,MAAM,cAAc;gBAKJ,OAAO;gBACP,KAAK,CAAC,wBAAwB,CACxC,OAAO,gBAAgB,CAAC,MAAM,CAC/B,CAAC,WAAW,CAAC;wCAmCjB,CAAC;AAGF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/ui/popover.js
CHANGED
|
@@ -5,11 +5,11 @@ import { cn } from "../utils.js";
|
|
|
5
5
|
const Popover = PopoverPrimitive.Root;
|
|
6
6
|
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
7
7
|
const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
8
|
-
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, portalled = true, ...props }, ref) => {
|
|
8
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, portalled = true, container, ...props }, ref) => {
|
|
9
9
|
const content = (_jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-[290] w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none origin-[var(--radix-popover-content-transform-origin)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:data-[state=open]:zoom-in-100 motion-reduce:data-[state=closed]:zoom-out-100 motion-reduce:data-[side=bottom]:slide-in-from-top-0 motion-reduce:data-[side=left]:slide-in-from-right-0 motion-reduce:data-[side=right]:slide-in-from-left-0 motion-reduce:data-[side=top]:slide-in-from-bottom-0", className), ...props }));
|
|
10
10
|
if (!portalled)
|
|
11
11
|
return content;
|
|
12
|
-
return _jsx(PopoverPrimitive.Portal, { children: content });
|
|
12
|
+
return (_jsx(PopoverPrimitive.Portal, { container: container, children: content }));
|
|
13
13
|
});
|
|
14
14
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
15
15
|
export { Popover, PopoverTrigger, PopoverAnchor, PopoverContent };
|
package/dist/ui/popover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../src/ui/popover.tsx"],"names":[],"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AS,YAC1C,OAAO,GACgB,CAC3B,CAAC;AACJ,CAAC,CACF,CAAC;AACF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/ui/select.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.Selec
|
|
|
6
6
|
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
7
|
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> &
|
|
9
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
container?: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Portal>["container"];
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
10
12
|
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
13
|
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
14
|
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/dist/ui/select.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/ui/select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,WAAW,yGAAwB,CAAC;AAE1C,QAAA,MAAM,WAAW,0GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,oKAiBjB,CAAC;AAGH,QAAA,MAAM,oBAAoB,qKAcxB,CAAC;AAGH,QAAA,MAAM,sBAAsB,uKAc1B,CAAC;AAIH,QAAA,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/ui/select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,WAAW,yGAAwB,CAAC;AAE1C,QAAA,MAAM,WAAW,0GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,oKAiBjB,CAAC;AAGH,QAAA,MAAM,oBAAoB,qKAcxB,CAAC;AAGH,QAAA,MAAM,sBAAsB,uKAc1B,CAAC;AAIH,QAAA,MAAM,aAAa;gBAGH,KAAK,CAAC,wBAAwB,CACxC,OAAO,eAAe,CAAC,MAAM,CAC9B,CAAC,WAAW,CAAC;wCA4BhB,CAAC;AAGH,QAAA,MAAM,WAAW,4JASf,CAAC;AAGH,QAAA,MAAM,UAAU,2JAoBd,CAAC;AAGH,QAAA,MAAM,eAAe,gKASnB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAC"}
|