cekat-ui 1.2.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -2
- package/dist/index.d.mts +864 -0
- package/dist/index.d.ts +864 -23
- package/dist/index.mjs +14209 -0
- package/dist/index.umd.js +8 -3
- package/dist/style.css +813 -684
- package/package.json +35 -6
- package/tailwind.preset.cjs +452 -453
- package/dist/components/Alert/Alert.d.ts +0 -6
- package/dist/components/Alert/alert.styles.d.ts +0 -47
- package/dist/components/Alert/alert.types.d.ts +0 -46
- package/dist/components/Alert/index.d.ts +0 -3
- package/dist/components/Avatar/Avatar.d.ts +0 -6
- package/dist/components/Avatar/AvatarIcons.d.ts +0 -8
- package/dist/components/Avatar/avatar.styles.d.ts +0 -12
- package/dist/components/Avatar/avatar.types.d.ts +0 -16
- package/dist/components/Avatar/index.d.ts +0 -3
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +0 -6
- package/dist/components/AvatarGroup/avatargroup.styles.d.ts +0 -17
- package/dist/components/AvatarGroup/avatargroup.types.d.ts +0 -18
- package/dist/components/AvatarGroup/index.d.ts +0 -3
- package/dist/components/AvatarLabelGroup/AvatarLabelGroup.d.ts +0 -6
- package/dist/components/AvatarLabelGroup/avatarlabelgroup.styles.d.ts +0 -5
- package/dist/components/AvatarLabelGroup/avatarlabelgroup.types.d.ts +0 -14
- package/dist/components/AvatarLabelGroup/index.d.ts +0 -3
- package/dist/components/AvatarProfilePhoto/AvatarProfilePhoto.d.ts +0 -6
- package/dist/components/AvatarProfilePhoto/avatarprofilephoto.styles.d.ts +0 -10
- package/dist/components/AvatarProfilePhoto/avatarprofilephoto.types.d.ts +0 -12
- package/dist/components/AvatarProfilePhoto/index.d.ts +0 -3
- package/dist/components/Badge/Badge.d.ts +0 -6
- package/dist/components/Badge/badge.styles.d.ts +0 -20
- package/dist/components/Badge/badge.types.d.ts +0 -23
- package/dist/components/Badge/index.d.ts +0 -3
- package/dist/components/BadgeGroup/BadgeGroup.d.ts +0 -6
- package/dist/components/BadgeGroup/badgegroup.styles.d.ts +0 -28
- package/dist/components/BadgeGroup/badgegroup.types.d.ts +0 -19
- package/dist/components/BadgeGroup/index.d.ts +0 -3
- package/dist/components/Button/Button.d.ts +0 -9
- package/dist/components/Button/ButtonIcon.d.ts +0 -2
- package/dist/components/Button/ButtonText.d.ts +0 -2
- package/dist/components/Button/button.styles.d.ts +0 -6
- package/dist/components/Button/button.types.d.ts +0 -18
- package/dist/components/Button/index.d.ts +0 -3
- package/dist/components/Checkbox/Checkbox.d.ts +0 -4
- package/dist/components/Checkbox/checkbox.styles.d.ts +0 -5
- package/dist/components/Checkbox/checkbox.types.d.ts +0 -12
- package/dist/components/Checkbox/index.d.ts +0 -3
- package/dist/components/Dropdown/Dropdown.d.ts +0 -2
- package/dist/components/Dropdown/dropdown.styles.d.ts +0 -19
- package/dist/components/Dropdown/dropdown.types.d.ts +0 -44
- package/dist/components/Dropdown/index.d.ts +0 -3
- package/dist/components/Input/CardNumberInput.d.ts +0 -19
- package/dist/components/Input/Input.d.ts +0 -8
- package/dist/components/Input/InputCounter.d.ts +0 -18
- package/dist/components/Input/InputPrefix.d.ts +0 -4
- package/dist/components/Input/InputSuffix.d.ts +0 -4
- package/dist/components/Input/PhoneInput.d.ts +0 -18
- package/dist/components/Input/SaleAmountInput.d.ts +0 -20
- package/dist/components/Input/index.d.ts +0 -13
- package/dist/components/Input/input.styles.d.ts +0 -36
- package/dist/components/Input/input.types.d.ts +0 -39
- package/dist/components/InputDropdown/InputDropdown.d.ts +0 -2
- package/dist/components/InputDropdown/index.d.ts +0 -3
- package/dist/components/InputDropdown/inputDropdown.styles.d.ts +0 -15
- package/dist/components/InputDropdown/inputDropdown.types.d.ts +0 -45
- package/dist/components/Loading/Loading.d.ts +0 -6
- package/dist/components/Loading/LoadingSpinner.d.ts +0 -9
- package/dist/components/Loading/index.d.ts +0 -3
- package/dist/components/Loading/loading.styles.d.ts +0 -6
- package/dist/components/Loading/loading.types.d.ts +0 -10
- package/dist/components/MultiSelectInput/MultiSelectInput.d.ts +0 -24
- package/dist/components/MultiSelectInput/index.d.ts +0 -1
- package/dist/components/MultiSelectInput/multiSelectInput.styles.d.ts +0 -17
- package/dist/components/Radio/RadioGroup.d.ts +0 -6
- package/dist/components/Radio/RadioGroupItem.d.ts +0 -3
- package/dist/components/Radio/index.d.ts +0 -3
- package/dist/components/Radio/radio.styles.d.ts +0 -9
- package/dist/components/Radio/radio.types.d.ts +0 -17
- package/dist/components/Tab/Tab.d.ts +0 -13
- package/dist/components/Tab/TabList.d.ts +0 -14
- package/dist/components/Tab/index.d.ts +0 -4
- package/dist/components/Tab/tab.styles.d.ts +0 -15
- package/dist/components/Tab/tab.types.d.ts +0 -46
- package/dist/components/TabBrowser/TabBrowser.d.ts +0 -4
- package/dist/components/TabBrowser/TabBrowserBar.d.ts +0 -17
- package/dist/components/TabBrowser/index.d.ts +0 -4
- package/dist/components/TabBrowser/tabbrowser.styles.d.ts +0 -53
- package/dist/components/TabBrowser/tabbrowser.types.d.ts +0 -44
- package/dist/components/Tag/Tag.d.ts +0 -6
- package/dist/components/Tag/index.d.ts +0 -3
- package/dist/components/Tag/tag.styles.d.ts +0 -19
- package/dist/components/Tag/tag.types.d.ts +0 -21
- package/dist/components/Textarea/Textarea.d.ts +0 -4
- package/dist/components/Textarea/index.d.ts +0 -3
- package/dist/components/Textarea/textarea.styles.d.ts +0 -14
- package/dist/components/Textarea/textarea.types.d.ts +0 -17
- package/dist/components/Toggle/Toggle.d.ts +0 -4
- package/dist/components/Toggle/index.d.ts +0 -3
- package/dist/components/Toggle/toggle.styles.d.ts +0 -10
- package/dist/components/Toggle/toggle.types.d.ts +0 -11
- package/dist/components/Tooltip/Tooltip.d.ts +0 -6
- package/dist/components/Tooltip/index.d.ts +0 -2
- package/dist/components/Tooltip/tooltip.styles.d.ts +0 -8
- package/dist/components/Tooltip/tooltip.types.d.ts +0 -13
- package/dist/components/WebsiteCopyInput/WebsiteCopyInput.d.ts +0 -19
- package/dist/components/WebsiteCopyInput/index.d.ts +0 -1
- package/dist/components/WebsiteCopyInput/websiteCopyInput.styles.d.ts +0 -25
- package/dist/components/WebsiteInput/WebsiteInput.d.ts +0 -18
- package/dist/components/WebsiteInput/index.d.ts +0 -1
- package/dist/components/WebsiteInput/websiteInput.styles.d.ts +0 -24
- package/dist/index.es.js +0 -10994
- package/dist/utils/cn.d.ts +0 -2
- package/dist/utils/color.d.ts +0 -4
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,864 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import { default as default_2 } from 'react';
|
|
3
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
4
|
+
import { Key } from 'react-aria-components';
|
|
5
|
+
import * as React_2 from 'react';
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
|
+
|
|
8
|
+
export declare const Alert: {
|
|
9
|
+
({ title, description, color, layout, background, icon, iconVariant, showIcon, primaryAction, secondaryAction, actionVariant, actions, onClose, closeLabel, className, ...props }: AlertProps): JSX_2.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export declare interface AlertAction {
|
|
14
|
+
label: React_2.ReactNode;
|
|
15
|
+
onClick?: React_2.MouseEventHandler<HTMLButtonElement>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare type AlertActionVariant = 'link' | 'button';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Card surface. `white` is the Figma default; `light` tints the card with the
|
|
22
|
+
* light shade of the current `color`.
|
|
23
|
+
*/
|
|
24
|
+
export declare type AlertBackground = 'white' | 'light';
|
|
25
|
+
|
|
26
|
+
export declare type AlertColor = 'default' | 'brand' | 'gray' | 'error' | 'warning' | 'success';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* `featured` wraps the icon in the Figma "Featured icon" badge (fixed size, tinted
|
|
30
|
+
* fill, rounded shape). `plain` drops the badge so a custom illustration can be
|
|
31
|
+
* dropped straight in at its own size.
|
|
32
|
+
*/
|
|
33
|
+
export declare type AlertIconVariant = 'featured' | 'plain';
|
|
34
|
+
|
|
35
|
+
/** Figma "Size" variant: a rounded floating card, or an edge-to-edge page banner. */
|
|
36
|
+
export declare type AlertLayout = 'floating' | 'full-width';
|
|
37
|
+
|
|
38
|
+
export declare interface AlertProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'title' | 'color'> {
|
|
39
|
+
title: React_2.ReactNode;
|
|
40
|
+
/** Supporting text rendered under (floating) or beside (full-width) the title. */
|
|
41
|
+
description?: React_2.ReactNode;
|
|
42
|
+
color?: AlertColor;
|
|
43
|
+
layout?: AlertLayout;
|
|
44
|
+
/** Set to `light` to fill the card with the light shade of `color`. Defaults to `white`. */
|
|
45
|
+
background?: AlertBackground;
|
|
46
|
+
/** Overrides the default featured icon for the current `color`. */
|
|
47
|
+
icon?: React_2.ReactNode;
|
|
48
|
+
/** Set to `plain` to render `icon` without the featured-icon badge. Defaults to `featured`. */
|
|
49
|
+
iconVariant?: AlertIconVariant;
|
|
50
|
+
showIcon?: boolean;
|
|
51
|
+
/** Emphasised action, e.g. "View changes". */
|
|
52
|
+
primaryAction?: AlertAction;
|
|
53
|
+
/** Low-emphasis action, e.g. "Dismiss". */
|
|
54
|
+
secondaryAction?: AlertAction;
|
|
55
|
+
/** Defaults to `link` for `floating` and `button` for `full-width`. */
|
|
56
|
+
actionVariant?: AlertActionVariant;
|
|
57
|
+
/** Replaces the rendered actions entirely, ignoring `primaryAction`/`secondaryAction`. */
|
|
58
|
+
actions?: React_2.ReactNode;
|
|
59
|
+
/** Renders the close (X) button when provided. */
|
|
60
|
+
onClose?: () => void;
|
|
61
|
+
closeLabel?: string;
|
|
62
|
+
className?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export declare const Avatar: {
|
|
66
|
+
({ src, alt, initials, size, status, statusIcon, contrastBorder, className, }: AvatarProps): JSX_2.Element;
|
|
67
|
+
displayName: string;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export declare const AvatarGroup: {
|
|
71
|
+
({ avatars, max, size, onAdd, className }: AvatarGroupProps): JSX_2.Element;
|
|
72
|
+
displayName: string;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export declare interface AvatarGroupItem {
|
|
76
|
+
src?: string;
|
|
77
|
+
alt?: string;
|
|
78
|
+
initials?: React_2.ReactNode;
|
|
79
|
+
/** Tooltip content shown on hover. */
|
|
80
|
+
label?: React_2.ReactNode;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export declare interface AvatarGroupProps {
|
|
84
|
+
avatars: AvatarGroupItem[];
|
|
85
|
+
/** Max avatars to show before collapsing the rest into a "+N" badge. */
|
|
86
|
+
max?: number;
|
|
87
|
+
size?: AvatarGroupSize;
|
|
88
|
+
/** Shows a dashed "add" button after the avatars when provided. */
|
|
89
|
+
onAdd?: () => void;
|
|
90
|
+
className?: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export declare type AvatarGroupSize = 'xs' | 'sm' | 'md';
|
|
94
|
+
|
|
95
|
+
export declare const AvatarLabelGroup: {
|
|
96
|
+
({ name, subtitle, src, initials, size, status, statusIcon, className, }: AvatarLabelGroupProps): JSX_2.Element;
|
|
97
|
+
displayName: string;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export declare interface AvatarLabelGroupProps {
|
|
101
|
+
name: React_2.ReactNode;
|
|
102
|
+
subtitle?: React_2.ReactNode;
|
|
103
|
+
src?: string;
|
|
104
|
+
initials?: React_2.ReactNode;
|
|
105
|
+
size?: AvatarLabelGroupSize;
|
|
106
|
+
status?: AvatarStatus;
|
|
107
|
+
/** Custom content for the "company" status badge (e.g. a logo image). */
|
|
108
|
+
statusIcon?: React_2.ReactNode;
|
|
109
|
+
className?: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export declare type AvatarLabelGroupSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
113
|
+
|
|
114
|
+
export declare const AvatarProfilePhoto: {
|
|
115
|
+
({ src, alt, initials, size, verified, contrastBorder, className, }: AvatarProfilePhotoProps): JSX_2.Element;
|
|
116
|
+
displayName: string;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export declare interface AvatarProfilePhotoProps {
|
|
120
|
+
src?: string;
|
|
121
|
+
alt?: string;
|
|
122
|
+
/** Renders centered initials instead of a photo/placeholder icon. */
|
|
123
|
+
initials?: React_2.ReactNode;
|
|
124
|
+
size?: AvatarProfilePhotoSize;
|
|
125
|
+
verified?: boolean;
|
|
126
|
+
contrastBorder?: boolean;
|
|
127
|
+
className?: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export declare type AvatarProfilePhotoSize = 'sm' | 'md' | 'lg';
|
|
131
|
+
|
|
132
|
+
export declare interface AvatarProps {
|
|
133
|
+
/** Image URL. When provided, renders the photo. */
|
|
134
|
+
src?: string;
|
|
135
|
+
alt?: string;
|
|
136
|
+
/** Renders centered initials instead of a photo/placeholder icon. */
|
|
137
|
+
initials?: React_2.ReactNode;
|
|
138
|
+
size?: AvatarSize;
|
|
139
|
+
status?: AvatarStatus;
|
|
140
|
+
/** Custom content for the "company" status badge (e.g. a logo image). */
|
|
141
|
+
statusIcon?: React_2.ReactNode;
|
|
142
|
+
contrastBorder?: boolean;
|
|
143
|
+
className?: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
147
|
+
|
|
148
|
+
export declare type AvatarStatus = 'none' | 'online' | 'company' | 'verified';
|
|
149
|
+
|
|
150
|
+
export declare const Badge: {
|
|
151
|
+
({ children, size, shape, variant, color, customColor, modern, icon, trailingIcon, checked, onCheckedChange, onClose, iconOnly, disabled, className, }: BadgeProps): JSX_2.Element;
|
|
152
|
+
displayName: string;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export declare type BadgeColor = 'brand' | 'gray' | 'error' | 'warning' | 'success' | 'blue-gray' | 'blue-light' | 'indigo' | 'purple' | 'blue' | 'pink' | 'orange';
|
|
156
|
+
|
|
157
|
+
export declare const BadgeGroup: {
|
|
158
|
+
({ badgeLabel, children, size, theme, color, badgePosition, icon, onClick, className, }: BadgeGroupProps): JSX_2.Element;
|
|
159
|
+
displayName: string;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export declare type BadgeGroupBadgePosition = 'leading' | 'trailing';
|
|
163
|
+
|
|
164
|
+
export declare type BadgeGroupColor = 'brand' | 'gray' | 'error' | 'warning' | 'success';
|
|
165
|
+
|
|
166
|
+
export declare interface BadgeGroupProps {
|
|
167
|
+
/** Text shown inside the small inner chip, e.g. "New" */
|
|
168
|
+
badgeLabel: React_2.ReactNode;
|
|
169
|
+
/** The announcement message */
|
|
170
|
+
children: React_2.ReactNode;
|
|
171
|
+
size?: BadgeGroupSize;
|
|
172
|
+
theme?: BadgeGroupTheme;
|
|
173
|
+
color?: BadgeGroupColor;
|
|
174
|
+
badgePosition?: BadgeGroupBadgePosition;
|
|
175
|
+
/** Optional trailing icon (e.g. an arrow) */
|
|
176
|
+
icon?: React_2.ReactNode;
|
|
177
|
+
onClick?: () => void;
|
|
178
|
+
className?: string;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export declare type BadgeGroupSize = 'md' | 'lg';
|
|
182
|
+
|
|
183
|
+
export declare type BadgeGroupTheme = 'light' | 'outline' | 'modern';
|
|
184
|
+
|
|
185
|
+
export declare interface BadgeProps {
|
|
186
|
+
children?: React_2.ReactNode;
|
|
187
|
+
size?: BadgeSize;
|
|
188
|
+
shape?: BadgeShape;
|
|
189
|
+
variant?: BadgeVariant;
|
|
190
|
+
color?: BadgeColor;
|
|
191
|
+
/** Custom accent color as a 6-digit hex (e.g. "#13a8bf"), applied to border, background/tint and text. Overrides `color` when set. Ignored if not a valid 6-digit hex. */
|
|
192
|
+
customColor?: string;
|
|
193
|
+
modern?: boolean;
|
|
194
|
+
icon?: React_2.ReactNode;
|
|
195
|
+
trailingIcon?: React_2.ReactNode;
|
|
196
|
+
checked?: boolean;
|
|
197
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
198
|
+
onClose?: () => void;
|
|
199
|
+
iconOnly?: boolean;
|
|
200
|
+
disabled?: boolean;
|
|
201
|
+
className?: string;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export declare type BadgeShape = 'pill' | 'badge';
|
|
205
|
+
|
|
206
|
+
export declare type BadgeSize = 'sm' | 'md' | 'lg';
|
|
207
|
+
|
|
208
|
+
export declare type BadgeVariant = 'solid' | 'outline';
|
|
209
|
+
|
|
210
|
+
export declare const Button: ButtonCompound;
|
|
211
|
+
|
|
212
|
+
/** `ForwardRefExoticComponent` rather than `FC`: the base forwards a ref to its `<button>`. */
|
|
213
|
+
declare type ButtonCompound = React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLButtonElement>> & {
|
|
214
|
+
Icon: React_2.FC<ButtonSubComponentProps>;
|
|
215
|
+
Text: React_2.FC<ButtonSubComponentProps>;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
219
|
+
tone?: ButtonTone;
|
|
220
|
+
size?: ButtonSize;
|
|
221
|
+
variant?: ButtonVariant;
|
|
222
|
+
iconOnly?: boolean;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
declare type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
226
|
+
|
|
227
|
+
declare interface ButtonSubComponentProps {
|
|
228
|
+
children: React_2.ReactNode;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
declare type ButtonTone = 'primary' | 'destructive';
|
|
232
|
+
|
|
233
|
+
declare type ButtonVariant = 'solid' | 'outline' | 'outline-primary' | 'ghost' | 'ghost-primary' | 'plain' | 'plain-black';
|
|
234
|
+
|
|
235
|
+
export declare function CardNumberInput({ size, label, required, hint, error, disabled, placeholder, value, onChange, rightIcon, prefix, className, wrapperClassName, }: CardNumberInputProps): JSX_2.Element;
|
|
236
|
+
|
|
237
|
+
declare interface CardNumberInputProps {
|
|
238
|
+
size?: 'sm' | 'md';
|
|
239
|
+
label?: string;
|
|
240
|
+
required?: boolean;
|
|
241
|
+
hint?: string;
|
|
242
|
+
error?: boolean;
|
|
243
|
+
disabled?: boolean;
|
|
244
|
+
placeholder?: string;
|
|
245
|
+
value?: string;
|
|
246
|
+
onChange?: default_2.ChangeEventHandler<HTMLInputElement>;
|
|
247
|
+
rightIcon?: default_2.ReactNode;
|
|
248
|
+
prefix?: default_2.ReactNode;
|
|
249
|
+
className?: InputProps['className'];
|
|
250
|
+
wrapperClassName?: InputProps['wrapperClassName'];
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export declare const Checkbox: React_2.ForwardRefExoticComponent<CheckboxProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
254
|
+
|
|
255
|
+
export declare interface CheckboxProps {
|
|
256
|
+
id?: string;
|
|
257
|
+
checked: boolean;
|
|
258
|
+
indeterminate?: boolean;
|
|
259
|
+
disabled?: boolean;
|
|
260
|
+
size?: CheckboxSize;
|
|
261
|
+
onCheckedChange?: (value: boolean) => void;
|
|
262
|
+
className?: string;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
declare type CheckboxSize = 'sm' | 'md'
|
|
266
|
+
/** @deprecated `lg` is no longer a distinct size — it now renders identically to `md` and will be removed in a future major version. Migrate to `md`. */
|
|
267
|
+
| 'lg';
|
|
268
|
+
|
|
269
|
+
export declare function Dropdown({ trigger, label, icon, avatarSrc, avatarInitials, header, items, open: openProp, defaultOpen, onOpenChange, disabled, align, className, menuClassName, }: DropdownProps): JSX_2.Element;
|
|
270
|
+
|
|
271
|
+
export declare interface DropdownHeader {
|
|
272
|
+
name: React_2.ReactNode;
|
|
273
|
+
subtitle?: React_2.ReactNode;
|
|
274
|
+
avatarSrc?: string;
|
|
275
|
+
avatarInitials?: React_2.ReactNode;
|
|
276
|
+
status?: AvatarStatus;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export declare interface DropdownMenuItem {
|
|
280
|
+
id: string;
|
|
281
|
+
/** Renders a horizontal divider instead of an item when true. */
|
|
282
|
+
divider?: boolean;
|
|
283
|
+
label?: string;
|
|
284
|
+
icon?: React_2.ReactNode;
|
|
285
|
+
/** Trailing shortcut hint (e.g. "⌘C"). */
|
|
286
|
+
shortcut?: string;
|
|
287
|
+
disabled?: boolean;
|
|
288
|
+
onClick?: () => void;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export declare interface DropdownProps {
|
|
292
|
+
/** "button" shows a labeled trigger, "icon" a kebab trigger, "avatar" the user's avatar. */
|
|
293
|
+
trigger?: DropdownTriggerType;
|
|
294
|
+
/** Label for the "button" trigger. */
|
|
295
|
+
label?: string;
|
|
296
|
+
/** Custom icon for the "icon" trigger (defaults to a vertical-dots icon). */
|
|
297
|
+
icon?: React_2.ReactNode;
|
|
298
|
+
/** Avatar image for the "avatar" trigger. */
|
|
299
|
+
avatarSrc?: string;
|
|
300
|
+
avatarInitials?: React_2.ReactNode;
|
|
301
|
+
/** Optional user summary rendered at the top of the menu. */
|
|
302
|
+
header?: DropdownHeader;
|
|
303
|
+
items: DropdownMenuItem[];
|
|
304
|
+
open?: boolean;
|
|
305
|
+
defaultOpen?: boolean;
|
|
306
|
+
onOpenChange?: (open: boolean) => void;
|
|
307
|
+
disabled?: boolean;
|
|
308
|
+
/** Which edge of the trigger the menu aligns to. */
|
|
309
|
+
align?: 'start' | 'end';
|
|
310
|
+
className?: ClassValue;
|
|
311
|
+
menuClassName?: ClassValue;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export declare type DropdownTriggerType = 'button' | 'icon' | 'avatar';
|
|
315
|
+
|
|
316
|
+
export declare const Input: InputCompound;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Forwards its ref to the inner `<input>`, so callers can focus, select, or measure
|
|
320
|
+
* the field — inline-edit affordances and autofocus need this.
|
|
321
|
+
*/
|
|
322
|
+
declare const Input_2: default_2.ForwardRefExoticComponent<InputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
323
|
+
|
|
324
|
+
declare type InputCompound = typeof Input_2 & {
|
|
325
|
+
Prefix: typeof InputPrefix;
|
|
326
|
+
Suffix: typeof InputSuffix;
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
export declare function InputCounter({ size, label, required, hint, disabled, error, className, wrapperClassName, value, maxLength, placeholder, onChange, }: InputCounterProps): JSX_2.Element;
|
|
330
|
+
|
|
331
|
+
declare interface InputCounterProps {
|
|
332
|
+
size?: 'sm' | 'md';
|
|
333
|
+
label?: string;
|
|
334
|
+
required?: boolean;
|
|
335
|
+
hint?: string;
|
|
336
|
+
disabled?: boolean;
|
|
337
|
+
error?: boolean;
|
|
338
|
+
className?: InputProps['className'];
|
|
339
|
+
wrapperClassName?: InputProps['wrapperClassName'];
|
|
340
|
+
value: string;
|
|
341
|
+
maxLength: number;
|
|
342
|
+
placeholder?: string;
|
|
343
|
+
onChange?: default_2.ChangeEventHandler<HTMLInputElement>;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export declare function InputDropdown({ size, type, label, required, helpIcon, hint, placeholder, disabled, compact, leadingIcon, options, value, onChange, values, onValuesChange, className, wrapperClassName, }: InputDropdownProps): JSX_2.Element;
|
|
347
|
+
|
|
348
|
+
export declare interface InputDropdownOption {
|
|
349
|
+
id: string;
|
|
350
|
+
label: string;
|
|
351
|
+
/** Muted secondary text rendered after the label (e.g. "@nicholas"). */
|
|
352
|
+
supportingText?: string;
|
|
353
|
+
/** Leading icon rendered before the label. */
|
|
354
|
+
icon?: React_2.ReactNode;
|
|
355
|
+
/** Avatar image URL rendered before the label. */
|
|
356
|
+
avatar?: string;
|
|
357
|
+
/** Dot color rendered before the label (any CSS color). */
|
|
358
|
+
dot?: string;
|
|
359
|
+
disabled?: boolean;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export declare interface InputDropdownProps {
|
|
363
|
+
size?: InputDropdownSize;
|
|
364
|
+
/**
|
|
365
|
+
* "default" is a click-to-select dropdown, "search" adds a filter input,
|
|
366
|
+
* "tags" is a searchable multi-select with removable tags.
|
|
367
|
+
*/
|
|
368
|
+
type?: InputDropdownType;
|
|
369
|
+
label?: string;
|
|
370
|
+
required?: boolean;
|
|
371
|
+
/** Tighter padding/height/radius and a smaller semibold label, independent of `size`'s font scale. Opt-in, does not affect default styling. */
|
|
372
|
+
compact?: boolean;
|
|
373
|
+
/** Rendered after the label (e.g. a help tooltip icon). */
|
|
374
|
+
helpIcon?: React_2.ReactNode;
|
|
375
|
+
hint?: string;
|
|
376
|
+
placeholder?: string;
|
|
377
|
+
disabled?: boolean;
|
|
378
|
+
/** Leading ornament shown on the trigger while no option is selected (e.g. a user icon or dot). */
|
|
379
|
+
leadingIcon?: React_2.ReactNode;
|
|
380
|
+
options: InputDropdownOption[];
|
|
381
|
+
/** Selected option id ("default" / "search" types). */
|
|
382
|
+
value?: string | null;
|
|
383
|
+
onChange?: (option: InputDropdownOption) => void;
|
|
384
|
+
/** Selected option ids ("tags" type). */
|
|
385
|
+
values?: string[];
|
|
386
|
+
onValuesChange?: (ids: string[]) => void;
|
|
387
|
+
className?: ClassValue;
|
|
388
|
+
wrapperClassName?: ClassValue;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export declare type InputDropdownSize = 'xs' | 'sm' | 'md';
|
|
392
|
+
|
|
393
|
+
declare interface InputDropdownSlot {
|
|
394
|
+
value: React_2.ReactNode;
|
|
395
|
+
onClick?: () => void;
|
|
396
|
+
disabled?: boolean;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export declare type InputDropdownType = 'default' | 'search' | 'tags';
|
|
400
|
+
|
|
401
|
+
declare function InputPrefix({ children }: {
|
|
402
|
+
children: ReactNode;
|
|
403
|
+
}): JSX_2.Element;
|
|
404
|
+
|
|
405
|
+
declare interface InputProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'className'> {
|
|
406
|
+
label?: string;
|
|
407
|
+
required?: boolean;
|
|
408
|
+
hint?: string;
|
|
409
|
+
rightIcon?: React_2.ReactNode;
|
|
410
|
+
size?: InputSize;
|
|
411
|
+
error?: boolean;
|
|
412
|
+
/** Tighter padding/height/radius and a smaller semibold label, independent of `size`'s font scale. Opt-in, does not affect default styling. */
|
|
413
|
+
compact?: boolean;
|
|
414
|
+
/** Hides the browser-native calendar icon on `type="date"` inputs (e.g. when a custom `prefix` icon already covers that affordance). Opt-in, no effect on other input types or existing consumers. */
|
|
415
|
+
hideCalendarIcon?: boolean;
|
|
416
|
+
prefix?: React_2.ReactNode;
|
|
417
|
+
suffix?: React_2.ReactNode;
|
|
418
|
+
/** Renders a separately-boxed add-on (e.g. "http://") divided from the input by its own border. */
|
|
419
|
+
leadingAddon?: React_2.ReactNode;
|
|
420
|
+
/** Renders a clickable value+chevron trigger sharing the input's border, no divider (e.g. country code). */
|
|
421
|
+
leadingDropdown?: InputDropdownSlot;
|
|
422
|
+
/** Renders a clickable value+chevron trigger sharing the input's border, no divider (e.g. currency). */
|
|
423
|
+
trailingDropdown?: InputDropdownSlot;
|
|
424
|
+
/** Renders a button fused to the input's trailing edge, sharing the outer border (e.g. "Copy"). */
|
|
425
|
+
trailingButton?: InputTrailingButtonSlot;
|
|
426
|
+
maxLength?: number;
|
|
427
|
+
className?: ClassValue;
|
|
428
|
+
wrapperClassName?: ClassValue;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
declare type InputSize = 'xs' | 'sm' | 'md';
|
|
432
|
+
|
|
433
|
+
declare function InputSuffix({ children }: {
|
|
434
|
+
children: ReactNode;
|
|
435
|
+
}): JSX_2.Element;
|
|
436
|
+
|
|
437
|
+
declare interface InputTrailingButtonSlot {
|
|
438
|
+
label: React_2.ReactNode;
|
|
439
|
+
icon?: React_2.ReactNode;
|
|
440
|
+
onClick: () => void;
|
|
441
|
+
disabled?: boolean;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export declare const Loading: {
|
|
445
|
+
({ size, style, supportingText, label, className, }: LoadingProps): JSX_2.Element;
|
|
446
|
+
displayName: string;
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
export declare interface LoadingProps {
|
|
450
|
+
size?: LoadingSize;
|
|
451
|
+
style?: LoadingStyle;
|
|
452
|
+
supportingText?: boolean;
|
|
453
|
+
label?: React_2.ReactNode;
|
|
454
|
+
className?: string;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export declare type LoadingSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
458
|
+
|
|
459
|
+
export declare type LoadingStyle = 'line-simple' | 'line-spinner' | 'dot-circle';
|
|
460
|
+
|
|
461
|
+
export declare function MultiSelectInput({ size, label, required, hint, error, disabled, placeholder, rightIcon, className, wrapperClassName, options, value, onChange, }: MultiSelectInputProps): JSX_2.Element;
|
|
462
|
+
|
|
463
|
+
declare interface MultiSelectInputProps {
|
|
464
|
+
size?: 'sm' | 'md';
|
|
465
|
+
label?: string;
|
|
466
|
+
required?: boolean;
|
|
467
|
+
hint?: string;
|
|
468
|
+
error?: boolean;
|
|
469
|
+
disabled?: boolean;
|
|
470
|
+
placeholder?: string;
|
|
471
|
+
rightIcon?: default_2.ReactNode;
|
|
472
|
+
className?: ClassValue;
|
|
473
|
+
wrapperClassName?: ClassValue;
|
|
474
|
+
options: MultiSelectOption[];
|
|
475
|
+
value?: MultiSelectOption[];
|
|
476
|
+
onChange?: (value: MultiSelectOption[]) => void;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
declare interface MultiSelectOption {
|
|
480
|
+
id: string;
|
|
481
|
+
label: string;
|
|
482
|
+
avatar?: string;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
export declare function PhoneInput({ size, label, required, hint, error, disabled, placeholder, rightIcon, value, onChange, className, wrapperClassName, }: PhoneInputProps): JSX_2.Element;
|
|
486
|
+
|
|
487
|
+
declare interface PhoneInputProps {
|
|
488
|
+
size?: 'sm' | 'md';
|
|
489
|
+
label?: string;
|
|
490
|
+
required?: boolean;
|
|
491
|
+
hint?: string;
|
|
492
|
+
error?: boolean;
|
|
493
|
+
disabled?: boolean;
|
|
494
|
+
placeholder?: string;
|
|
495
|
+
rightIcon?: default_2.ReactNode;
|
|
496
|
+
value?: string;
|
|
497
|
+
onChange?: default_2.ChangeEventHandler<HTMLInputElement>;
|
|
498
|
+
className?: InputProps['className'];
|
|
499
|
+
wrapperClassName?: InputProps['wrapperClassName'];
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export declare const RadioGroup: ({ value, defaultValue, onValueChange, children, className, }: RadioGroupProps) => JSX_2.Element;
|
|
503
|
+
|
|
504
|
+
export declare const RadioGroupItem: React_2.ForwardRefExoticComponent<RadioGroupItemProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
505
|
+
|
|
506
|
+
export declare interface RadioGroupItemProps {
|
|
507
|
+
id?: string;
|
|
508
|
+
value: string;
|
|
509
|
+
disabled?: boolean;
|
|
510
|
+
size?: RadioSize;
|
|
511
|
+
className?: string;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export declare interface RadioGroupProps {
|
|
515
|
+
value?: string;
|
|
516
|
+
defaultValue?: string;
|
|
517
|
+
onValueChange?: (value: string) => void;
|
|
518
|
+
children: React.ReactNode;
|
|
519
|
+
className?: string;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
declare type RadioSize = 'sm' | 'md'
|
|
523
|
+
/** @deprecated `lg` is no longer a distinct size — it now renders identically to `md` and will be removed in a future major version. Migrate to `md`. */
|
|
524
|
+
| 'lg';
|
|
525
|
+
|
|
526
|
+
export declare function SaleAmountInput({ size, label, required, hint, error, disabled, value, placeholder, currency, onCurrencyChange, rightIcon, onChange, className, wrapperClassName, }: SaleAmountInputProps): JSX_2.Element;
|
|
527
|
+
|
|
528
|
+
declare interface SaleAmountInputProps {
|
|
529
|
+
size?: 'sm' | 'md';
|
|
530
|
+
label?: string;
|
|
531
|
+
required?: boolean;
|
|
532
|
+
hint?: string;
|
|
533
|
+
error?: boolean;
|
|
534
|
+
disabled?: boolean;
|
|
535
|
+
value?: string;
|
|
536
|
+
placeholder?: string;
|
|
537
|
+
currency?: string;
|
|
538
|
+
onCurrencyChange?: () => void;
|
|
539
|
+
rightIcon?: default_2.ReactNode;
|
|
540
|
+
onChange?: default_2.ChangeEventHandler<HTMLInputElement>;
|
|
541
|
+
className?: InputProps['className'];
|
|
542
|
+
wrapperClassName?: InputProps['wrapperClassName'];
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Renders on react-aria-components' `<Tab>`, so it only works inside a `TabList` (which
|
|
547
|
+
* supplies the `<Tabs>` context). `active`/`onClick` stay the public API — `TabList` reads
|
|
548
|
+
* `active` off each child to derive RAC's `selectedKey`, and reaches back into `onClick` when
|
|
549
|
+
* a press or arrow-key navigation changes the selection — so callers keep driving state
|
|
550
|
+
* exactly as before and get roving-tabindex keyboard nav for free.
|
|
551
|
+
*/
|
|
552
|
+
export declare const Tab: {
|
|
553
|
+
({ children, variant, size, fullWidth, count, iconLeft, iconRight, disabled, onClick, className, id, active: _active, }: TabProps): JSX_2.Element;
|
|
554
|
+
displayName: string;
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Renders on react-aria-components' `<Tab>`, so it only works inside a `TabBrowserBar`
|
|
559
|
+
* (which supplies the `<Tabs>`/`<TabList>` context). `active`/`onClick` stay the public API —
|
|
560
|
+
* TabBrowserBar reads `active` off each child to derive RAC's `selectedKey`, and reaches back
|
|
561
|
+
* into `onClick` when a press or arrow-key navigation changes the selection — so callers keep
|
|
562
|
+
* driving state exactly as before and get roving-tabindex keyboard nav for free.
|
|
563
|
+
*/
|
|
564
|
+
export declare const TabBrowser: React_2.ForwardRefExoticComponent<TabBrowserProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Backed by react-aria-components' `<Tabs>` for roving-tabindex arrow-key navigation and
|
|
568
|
+
* focus management. Selection still lives with the caller: each `TabBrowser` child's own
|
|
569
|
+
* `active`/`onClick` stay the source of truth — this derives RAC's `selectedKey` from
|
|
570
|
+
* whichever child is `active`, and reaches back into that child's `onClick` when RAC changes
|
|
571
|
+
* the selection (arrow keys, click, or press), so the caller's state — and therefore
|
|
572
|
+
* `selectedKey` on the next render — stays in sync.
|
|
573
|
+
*
|
|
574
|
+
* Deliberately draws no divider — that belongs to whatever surface hosts the row, so it can
|
|
575
|
+
* span the full header width.
|
|
576
|
+
*
|
|
577
|
+
* No `gap` either: each tab reserves its own breathing room (see TAB_PADDING_X), which keeps
|
|
578
|
+
* spacing identical whether or not a tab is selected. A flex gap on top would read as dead
|
|
579
|
+
* space beside the selected tab only.
|
|
580
|
+
*
|
|
581
|
+
* Nor any height or leading space — how far the row sits from what's above it depends on the
|
|
582
|
+
* surface, so that stays with the caller.
|
|
583
|
+
*/
|
|
584
|
+
export declare const TabBrowserBar: {
|
|
585
|
+
({ children, separators, trailingSlot, overflow, overflowLabel, className, }: TabBrowserBarProps): JSX_2.Element;
|
|
586
|
+
displayName: string;
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
export declare interface TabBrowserBarProps {
|
|
590
|
+
children: React_2.ReactNode;
|
|
591
|
+
/** Renders a vertical divider between adjacent tabs. */
|
|
592
|
+
separators?: boolean;
|
|
593
|
+
/** Extra content pinned to the end of the row, e.g. a "+" add button or CTA buttons. */
|
|
594
|
+
trailingSlot?: React_2.ReactNode;
|
|
595
|
+
/**
|
|
596
|
+
* Collapses whichever tabs don't fit the row's measured width into a trailing "+N" menu,
|
|
597
|
+
* instead of letting the row overflow. Off by default — enable it once the bar sits in a
|
|
598
|
+
* container with a real width constraint (a flex/grid item, not one that grows to fit its
|
|
599
|
+
* content).
|
|
600
|
+
*/
|
|
601
|
+
overflow?: boolean;
|
|
602
|
+
/** Customizes the overflow trigger's label. Defaults to `+${hiddenCount}`. */
|
|
603
|
+
overflowLabel?: (hiddenCount: number) => React_2.ReactNode;
|
|
604
|
+
className?: string;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* A visual-only clone of `TabBrowser`, for places with no `TabBrowserBar` above them to
|
|
609
|
+
* supply react-aria-components' `Tabs`/`TabList` context — a dnd-kit drag-overlay clone of a
|
|
610
|
+
* tab is the motivating case. Same silhouette, same clip-path outline, driven off `active`
|
|
611
|
+
* directly instead of RAC's `isSelected` render prop.
|
|
612
|
+
*
|
|
613
|
+
* `TabBrowser` can't grow this fallback itself: RAC's `TabList` walks its children through a
|
|
614
|
+
* hidden collection-scan pass before the real commit, and that pass runs before
|
|
615
|
+
* `TabListStateContext` is populated — so a context check inside `TabBrowser` reads "not in a
|
|
616
|
+
* bar" even when it is, and the whole row comes up empty. Keeping this as its own component
|
|
617
|
+
* sidesteps that scan entirely.
|
|
618
|
+
*
|
|
619
|
+
* No keyboard nav, no selection wiring, no roving tabindex — this renders a picture of a tab,
|
|
620
|
+
* not a functioning one. Don't reach for it inside a `TabBrowserBar`; use `TabBrowser` there.
|
|
621
|
+
*/
|
|
622
|
+
export declare const TabBrowserPreview: React_2.ForwardRefExoticComponent<TabBrowserPreviewProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
623
|
+
|
|
624
|
+
export declare interface TabBrowserPreviewProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
625
|
+
/** Whether this preview renders in its selected/active look. */
|
|
626
|
+
active?: boolean;
|
|
627
|
+
/** Sizing variant — see `TabBrowserType`. */
|
|
628
|
+
type?: TabBrowserType;
|
|
629
|
+
disabled?: boolean;
|
|
630
|
+
/**
|
|
631
|
+
* Removes the browser-tab silhouette and fixed sizing so `className` can fully control
|
|
632
|
+
* padding, dimensions, borders, and hover states.
|
|
633
|
+
*/
|
|
634
|
+
unstyled?: boolean;
|
|
635
|
+
/** Icon rendered before the label. */
|
|
636
|
+
iconLeft?: React_2.ReactNode;
|
|
637
|
+
/** Rendered after the label, e.g. a status Badge. */
|
|
638
|
+
trailing?: React_2.ReactNode;
|
|
639
|
+
/** Shorthand for the native `title`, which wins if both are given. */
|
|
640
|
+
tooltip?: string;
|
|
641
|
+
/** Classes applied to the tab's inner content element. */
|
|
642
|
+
contentClassName?: string;
|
|
643
|
+
/** Inline styles applied to the tab's inner content element. */
|
|
644
|
+
contentStyle?: React_2.CSSProperties;
|
|
645
|
+
children: React_2.ReactNode;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Everything a `<button>` takes comes through — `id`, `aria-controls`, `tabIndex`,
|
|
650
|
+
* `onKeyDown`, `data-*`. The tab carries `role="tab"` but leaves selection and panel wiring
|
|
651
|
+
* to the caller, so those are the props they build it out of.
|
|
652
|
+
*
|
|
653
|
+
* `type` is the exception: it names the sizing variant here, and the rendered button is
|
|
654
|
+
* pinned to `type="button"` so it never submits a form it happens to sit in.
|
|
655
|
+
*/
|
|
656
|
+
export declare interface TabBrowserProps extends Omit<React_2.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
657
|
+
/** Whether this tab is the currently selected one. */
|
|
658
|
+
active?: boolean;
|
|
659
|
+
/** Sizing variant — see `TabBrowserType`. */
|
|
660
|
+
type?: TabBrowserType;
|
|
661
|
+
/**
|
|
662
|
+
* Removes the browser-tab silhouette and fixed sizing so `className` can fully control
|
|
663
|
+
* padding, dimensions, borders, and hover states.
|
|
664
|
+
*/
|
|
665
|
+
unstyled?: boolean;
|
|
666
|
+
/** Icon rendered before the label. */
|
|
667
|
+
iconLeft?: React_2.ReactNode;
|
|
668
|
+
/** Rendered after the label, e.g. a status Badge. */
|
|
669
|
+
trailing?: React_2.ReactNode;
|
|
670
|
+
/** Shorthand for the native `title`, which wins if both are given. */
|
|
671
|
+
tooltip?: string;
|
|
672
|
+
/** Classes applied to the tab's inner content element. */
|
|
673
|
+
contentClassName?: string;
|
|
674
|
+
/** Inline styles applied to the tab's inner content element. */
|
|
675
|
+
contentStyle?: React_2.CSSProperties;
|
|
676
|
+
children: React_2.ReactNode;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Sizing variant, mirroring the design system's Tab Browser Base. `default` sizes each tab
|
|
681
|
+
* to its own label; `max-width` makes them equal-width and lets the row divide itself
|
|
682
|
+
* between them, which also runs them shorter.
|
|
683
|
+
*/
|
|
684
|
+
export declare type TabBrowserType = 'default' | 'max-width';
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Backed by react-aria-components' `<Tabs>` for roving-tabindex arrow-key navigation and
|
|
688
|
+
* focus management. Selection still lives with the caller: each `Tab` child's own
|
|
689
|
+
* `active`/`onClick` stay the source of truth — this derives RAC's `selectedKey` from
|
|
690
|
+
* whichever child is `active`, and reaches back into that child's `onClick` when RAC changes
|
|
691
|
+
* the selection (arrow keys, click, or press), so the caller's state — and therefore
|
|
692
|
+
* `selectedKey` on the next render — stays in sync.
|
|
693
|
+
*/
|
|
694
|
+
export declare const TabList: {
|
|
695
|
+
({ children, variant, orientation, boxed, "aria-label": ariaLabel, keyboardActivation, disabledKeys, className, }: TabListProps): JSX_2.Element;
|
|
696
|
+
displayName: string;
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
export declare type TabListOrientation = 'horizontal' | 'vertical';
|
|
700
|
+
|
|
701
|
+
export declare interface TabListProps {
|
|
702
|
+
/** `Tab` elements to render; selection is read from each child's `active` prop. */
|
|
703
|
+
children: React_2.ReactNode;
|
|
704
|
+
/** Controls the default gap and whether a bottom hairline is drawn under the row. */
|
|
705
|
+
variant?: TabVariant;
|
|
706
|
+
/** Arrow-key axis: horizontal moves with Left/Right, vertical with Up/Down. */
|
|
707
|
+
orientation?: TabListOrientation;
|
|
708
|
+
/** Wraps the tabs in a padded gray card (used by the "boxed" button-tab treatments). */
|
|
709
|
+
boxed?: boolean;
|
|
710
|
+
/** Accessible name for the tab row, read by screen readers. */
|
|
711
|
+
'aria-label'?: string;
|
|
712
|
+
/** Whether arrow-key focus also selects ("automatic", RAC's default) or only Enter/Space does ("manual"). */
|
|
713
|
+
keyboardActivation?: 'automatic' | 'manual';
|
|
714
|
+
/** Keys of `Tab` children (their index as a string) to remove from selection and keyboard navigation. */
|
|
715
|
+
disabledKeys?: Iterable<Key>;
|
|
716
|
+
className?: string;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
export declare interface TabProps {
|
|
720
|
+
/** Tab label content. */
|
|
721
|
+
children: React_2.ReactNode;
|
|
722
|
+
/** Visual style; should match the parent TabList's variant. */
|
|
723
|
+
variant?: TabVariant;
|
|
724
|
+
size?: TabSize;
|
|
725
|
+
/** Whether this tab is the current selection. */
|
|
726
|
+
active?: boolean;
|
|
727
|
+
/** Stretches the tab to fill available row width. */
|
|
728
|
+
fullWidth?: boolean;
|
|
729
|
+
/** Count badge rendered after the label. */
|
|
730
|
+
count?: number | string;
|
|
731
|
+
/** Icon rendered before the label. */
|
|
732
|
+
iconLeft?: React_2.ReactNode;
|
|
733
|
+
/** Icon rendered after the badge, e.g. a chevron. */
|
|
734
|
+
iconRight?: React_2.ReactNode;
|
|
735
|
+
/** Removes the tab from RAC's keyboard/selection order. */
|
|
736
|
+
disabled?: boolean;
|
|
737
|
+
/** Fires on select, including via keyboard navigation. */
|
|
738
|
+
onClick?: () => void;
|
|
739
|
+
className?: string;
|
|
740
|
+
/** Set internally by `TabList` to key the tab for RAC's roving-tabindex selection. */
|
|
741
|
+
id?: string;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
export declare type TabSize = 'sm' | 'md';
|
|
745
|
+
|
|
746
|
+
export declare type TabVariant = 'button-gray' | 'button-white' | 'button-primary' | 'underline' | 'underline-filled' | 'line';
|
|
747
|
+
|
|
748
|
+
export declare const Tag: {
|
|
749
|
+
({ children, size, shape, icon, checked, onCheckedChange, onClose, count, disabled, className, color, customColor, }: TagProps): JSX_2.Element;
|
|
750
|
+
displayName: string;
|
|
751
|
+
};
|
|
752
|
+
|
|
753
|
+
export declare type TagColor = 'brand' | 'gray' | 'error' | 'warning' | 'success' | 'blue-gray' | 'blue-light' | 'indigo' | 'purple' | 'blue' | 'pink' | 'orange';
|
|
754
|
+
|
|
755
|
+
export declare interface TagProps {
|
|
756
|
+
children: React_2.ReactNode;
|
|
757
|
+
size?: TagSize;
|
|
758
|
+
/** Corner style. 'rounded' = rounded-md (default), 'pill' = fully rounded. */
|
|
759
|
+
shape?: TagShape;
|
|
760
|
+
icon?: React_2.ReactNode;
|
|
761
|
+
checked?: boolean;
|
|
762
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
763
|
+
onClose?: () => void;
|
|
764
|
+
count?: number | string;
|
|
765
|
+
disabled?: boolean;
|
|
766
|
+
className?: string;
|
|
767
|
+
/** Named accent color token for the border, background and text. Defaults to 'gray'. */
|
|
768
|
+
color?: TagColor;
|
|
769
|
+
/** Custom accent color as a 6-digit hex (e.g. "#13a8bf"), applied to border, background tint and text. Overrides `color` when set. Ignored if not a valid 6-digit hex. */
|
|
770
|
+
customColor?: string;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
export declare type TagShape = 'rounded' | 'pill';
|
|
774
|
+
|
|
775
|
+
export declare type TagSize = 'sm' | 'md' | 'lg';
|
|
776
|
+
|
|
777
|
+
export declare const Textarea: React_2.ForwardRefExoticComponent<TextareaProps & React_2.RefAttributes<HTMLTextAreaElement>>;
|
|
778
|
+
|
|
779
|
+
export declare interface TextareaProps extends Omit<React_2.TextareaHTMLAttributes<HTMLTextAreaElement>, 'className'> {
|
|
780
|
+
label?: string;
|
|
781
|
+
required?: boolean;
|
|
782
|
+
hint?: string;
|
|
783
|
+
helpIcon?: React_2.ReactNode;
|
|
784
|
+
error?: boolean;
|
|
785
|
+
disabled?: boolean;
|
|
786
|
+
resizable?: boolean;
|
|
787
|
+
/** Tighter padding/min-height and a smaller semibold label, for compact form layouts (e.g. a multi-field grid). Opt-in, does not affect default styling. */
|
|
788
|
+
compact?: boolean;
|
|
789
|
+
/** Number of visible text lines. Drives an explicit min-height (rows × 20px line-height) that overrides the default/compact min-height, instead of just being a floor the browser's intrinsic sizing can exceed unpredictably. */
|
|
790
|
+
rows?: number;
|
|
791
|
+
className?: ClassValue;
|
|
792
|
+
wrapperClassName?: ClassValue;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
export declare const Toggle: React_2.ForwardRefExoticComponent<ToggleProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
796
|
+
|
|
797
|
+
export declare interface ToggleProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
|
|
798
|
+
checked?: boolean;
|
|
799
|
+
size?: ToggleSize;
|
|
800
|
+
variant?: ToggleVariant;
|
|
801
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
declare type ToggleSize = 'sm' | 'md'
|
|
805
|
+
/** @deprecated `lg` is no longer a distinct size — it now renders identically to `md` and will be removed in a future major version. Migrate to `md`. */
|
|
806
|
+
| 'lg';
|
|
807
|
+
|
|
808
|
+
declare type ToggleVariant = 'default' | 'success';
|
|
809
|
+
|
|
810
|
+
export declare const Tooltip: {
|
|
811
|
+
({ content, supportingText, side, open, defaultOpen, disabled, delay, className, children, }: TooltipProps): JSX_2.Element;
|
|
812
|
+
displayName: string;
|
|
813
|
+
};
|
|
814
|
+
|
|
815
|
+
export declare interface TooltipProps {
|
|
816
|
+
content: React_2.ReactNode;
|
|
817
|
+
supportingText?: React_2.ReactNode;
|
|
818
|
+
children: React_2.ReactElement;
|
|
819
|
+
side?: TooltipSide;
|
|
820
|
+
open?: boolean;
|
|
821
|
+
defaultOpen?: boolean;
|
|
822
|
+
disabled?: boolean;
|
|
823
|
+
delay?: number;
|
|
824
|
+
className?: string;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
declare type TooltipSide = 'top' | 'bottom' | 'left' | 'right';
|
|
828
|
+
|
|
829
|
+
export declare function WebsiteCopyInput({ size, label, required, hint, error, disabled, placeholder, value, rightIcon, suffix, onChange, className, wrapperClassName, }: WebsiteCopyInputProps): JSX_2.Element;
|
|
830
|
+
|
|
831
|
+
declare interface WebsiteCopyInputProps {
|
|
832
|
+
size?: 'sm' | 'md';
|
|
833
|
+
label?: string;
|
|
834
|
+
required?: boolean;
|
|
835
|
+
hint?: string;
|
|
836
|
+
error?: boolean;
|
|
837
|
+
disabled?: boolean;
|
|
838
|
+
placeholder?: string;
|
|
839
|
+
value?: string;
|
|
840
|
+
rightIcon?: default_2.ReactNode;
|
|
841
|
+
suffix?: default_2.ReactNode;
|
|
842
|
+
onChange?: default_2.ChangeEventHandler<HTMLInputElement>;
|
|
843
|
+
className?: ClassValue;
|
|
844
|
+
wrapperClassName?: ClassValue;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
export declare function WebsiteInput({ size, label, required, hint, error, disabled, placeholder, value, rightIcon, onChange, className, wrapperClassName, }: WebsiteInputProps): JSX_2.Element;
|
|
848
|
+
|
|
849
|
+
declare interface WebsiteInputProps {
|
|
850
|
+
size?: 'sm' | 'md';
|
|
851
|
+
label?: string;
|
|
852
|
+
required?: boolean;
|
|
853
|
+
hint?: string;
|
|
854
|
+
error?: boolean;
|
|
855
|
+
disabled?: boolean;
|
|
856
|
+
placeholder?: string;
|
|
857
|
+
value?: string;
|
|
858
|
+
rightIcon?: default_2.ReactNode;
|
|
859
|
+
onChange?: default_2.ChangeEventHandler<HTMLInputElement>;
|
|
860
|
+
className?: ClassValue;
|
|
861
|
+
wrapperClassName?: ClassValue;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
export { }
|