@godxjp/ui 0.1.1 → 2.1.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/BRAND.md +286 -0
- package/CHANGELOG.md +94 -0
- package/README.md +189 -33
- package/dist/components/primitives.d.ts +266 -0
- package/dist/components/primitives.js +252 -0
- package/dist/components/primitives.js.map +1 -0
- package/dist/components/screens.d.ts +51 -0
- package/dist/components/screens.js +806 -0
- package/dist/components/screens.js.map +1 -0
- package/dist/components/shell.d.ts +112 -0
- package/dist/components/shell.js +768 -0
- package/dist/components/shell.js.map +1 -0
- package/dist/data.d.ts +35 -0
- package/dist/data.js +93 -0
- package/dist/data.js.map +1 -0
- package/dist/hooks.d.ts +25 -0
- package/dist/hooks.js +144 -0
- package/dist/hooks.js.map +1 -0
- package/dist/i18n.d.ts +9 -0
- package/dist/i18n.js +409 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +14 -2650
- package/dist/index.js +726 -5295
- package/dist/index.js.map +1 -1
- package/package.json +76 -94
- package/src/tokens/tokens.css +765 -0
- package/src/styles/theme.css +0 -678
package/dist/index.d.ts
CHANGED
|
@@ -1,2650 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
16
|
-
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
17
|
-
import { Locale } from 'date-fns';
|
|
18
|
-
import { Drawer as Drawer$1 } from 'vaul';
|
|
19
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
20
|
-
import * as react_hook_form from 'react-hook-form';
|
|
21
|
-
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
22
|
-
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
23
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
24
|
-
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
25
|
-
import { OTPInput } from 'input-otp';
|
|
26
|
-
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
27
|
-
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
28
|
-
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
29
|
-
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
30
|
-
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
31
|
-
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
32
|
-
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
33
|
-
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
34
|
-
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
35
|
-
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
36
|
-
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
37
|
-
import { ToasterProps } from 'sonner';
|
|
38
|
-
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
39
|
-
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
40
|
-
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
41
|
-
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Vertically collapsible content sections built on Radix Accordion.
|
|
45
|
-
*
|
|
46
|
-
* Supports `"single"` (one panel open at a time) and `"multiple"` (any number open)
|
|
47
|
-
* modes via the `type` prop. Each section animates open/closed with a chevron indicator.
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```tsx
|
|
51
|
-
* <Accordion type="single" collapsible>
|
|
52
|
-
* <AccordionItem value="item-1">
|
|
53
|
-
* <AccordionTrigger>Is it accessible?</AccordionTrigger>
|
|
54
|
-
* <AccordionContent>
|
|
55
|
-
* Yes. It adheres to the WAI-ARIA Accordion pattern.
|
|
56
|
-
* </AccordionContent>
|
|
57
|
-
* </AccordionItem>
|
|
58
|
-
* <AccordionItem value="item-2">
|
|
59
|
-
* <AccordionTrigger>Is it styled?</AccordionTrigger>
|
|
60
|
-
* <AccordionContent>
|
|
61
|
-
* Yes. It ships with default styles via Tailwind CSS.
|
|
62
|
-
* </AccordionContent>
|
|
63
|
-
* </AccordionItem>
|
|
64
|
-
* </Accordion>
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
declare function Accordion({ ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
68
|
-
/** Individual accordion section. Requires a unique `value` prop. */
|
|
69
|
-
declare function AccordionItem({ className, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Item>): react_jsx_runtime.JSX.Element;
|
|
70
|
-
/** Clickable trigger that toggles its parent `AccordionItem`. Renders a chevron icon that rotates on open. */
|
|
71
|
-
declare function AccordionTrigger({ className, children, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
72
|
-
/** Animated collapsible content area within an `AccordionItem`. */
|
|
73
|
-
declare function AccordionContent({ className, children, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Shared UI types for the components in `src/components/ui/`.
|
|
77
|
-
*
|
|
78
|
-
* Originally from @omnifyjp/ui — copied into this repo so we own the source
|
|
79
|
-
* (the npm package is no longer a dependency). These types enforce consistent
|
|
80
|
-
* APIs across Button, Badge, Alert, and future components.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* ```tsx
|
|
84
|
-
* import type { UIColor, UISize } from '@godxjp/ui';
|
|
85
|
-
* ```
|
|
86
|
-
*/
|
|
87
|
-
/**
|
|
88
|
-
* Semantic color intent for UI components.
|
|
89
|
-
*
|
|
90
|
-
* Each color maps to a pair of CSS custom properties in theme.css:
|
|
91
|
-
* `--{color}` (background) and `--{color}-foreground` (text on that background).
|
|
92
|
-
*
|
|
93
|
-
* | Color | CSS Variable | Default (Light) | Use for |
|
|
94
|
-
* |-------|-------------|-----------------|---------|
|
|
95
|
-
* | `primary` | `--primary` | `#030213` | Main actions, active states |
|
|
96
|
-
* | `destructive` | `--destructive` | `#d4183d` | Delete, errors, dangerous actions |
|
|
97
|
-
* | `success` | `--success` | `#10b981` | Confirmed, approved, completed |
|
|
98
|
-
* | `warning` | `--warning` | `#f59e0b` | Caution, needs attention |
|
|
99
|
-
* | `info` | `--info` | `#3b82f6` | Informational, neutral highlights |
|
|
100
|
-
*
|
|
101
|
-
* Consumers override these via CSS custom properties:
|
|
102
|
-
* ```css
|
|
103
|
-
* :root { --primary: #dc2626; }
|
|
104
|
-
* ```
|
|
105
|
-
*
|
|
106
|
-
* @example
|
|
107
|
-
* ```tsx
|
|
108
|
-
* <Button color="success">Approve</Button>
|
|
109
|
-
* <Badge color="warning">Pending</Badge>
|
|
110
|
-
* <Alert color="info">Tip: use keyboard shortcuts</Alert>
|
|
111
|
-
* ```
|
|
112
|
-
*/
|
|
113
|
-
type UIColor = 'primary' | 'destructive' | 'success' | 'warning' | 'info';
|
|
114
|
-
|
|
115
|
-
declare const alertVariants: (props?: ({
|
|
116
|
-
variant?: "destructive" | "default" | "soft" | null | undefined;
|
|
117
|
-
color?: "primary" | "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
118
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
119
|
-
interface AlertProps extends React$1.ComponentProps<"div">, Omit<VariantProps<typeof alertVariants>, "color"> {
|
|
120
|
-
/**
|
|
121
|
-
* Semantic color intent.
|
|
122
|
-
*
|
|
123
|
-
* @default "primary"
|
|
124
|
-
* @example
|
|
125
|
-
* ```tsx
|
|
126
|
-
* <Alert color="success">Operation completed</Alert>
|
|
127
|
-
* <Alert color="warning">Check your input</Alert>
|
|
128
|
-
* <Alert variant="soft" color="info">Tip</Alert>
|
|
129
|
-
* ```
|
|
130
|
-
*/
|
|
131
|
-
color?: UIColor;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Static alert banner for displaying important messages.
|
|
135
|
-
*
|
|
136
|
-
* Supports semantic colors via `color` prop and two visual styles: `default` (bordered)
|
|
137
|
-
* and `soft` (filled background). All existing `variant="destructive"` usage continues to work.
|
|
138
|
-
*
|
|
139
|
-
* @example
|
|
140
|
-
* ```tsx
|
|
141
|
-
* // Default (bordered)
|
|
142
|
-
* <Alert>
|
|
143
|
-
* <InfoIcon className="size-4" />
|
|
144
|
-
* <AlertTitle>Heads up!</AlertTitle>
|
|
145
|
-
* <AlertDescription>You can add components using the CLI.</AlertDescription>
|
|
146
|
-
* </Alert>
|
|
147
|
-
*
|
|
148
|
-
* // Semantic colors
|
|
149
|
-
* <Alert color="success">
|
|
150
|
-
* <CheckIcon className="size-4" />
|
|
151
|
-
* <AlertTitle>Success</AlertTitle>
|
|
152
|
-
* <AlertDescription>Changes saved successfully.</AlertDescription>
|
|
153
|
-
* </Alert>
|
|
154
|
-
*
|
|
155
|
-
* // Soft variant (filled background)
|
|
156
|
-
* <Alert variant="soft" color="warning">
|
|
157
|
-
* <AlertTriangleIcon className="size-4" />
|
|
158
|
-
* <AlertTitle>Warning</AlertTitle>
|
|
159
|
-
* <AlertDescription>This action cannot be undone.</AlertDescription>
|
|
160
|
-
* </Alert>
|
|
161
|
-
*
|
|
162
|
-
* // Legacy (still works)
|
|
163
|
-
* <Alert variant="destructive">
|
|
164
|
-
* <AlertCircleIcon className="size-4" />
|
|
165
|
-
* <AlertTitle>Error</AlertTitle>
|
|
166
|
-
* <AlertDescription>Session expired.</AlertDescription>
|
|
167
|
-
* </Alert>
|
|
168
|
-
* ```
|
|
169
|
-
*/
|
|
170
|
-
declare function Alert({ className, variant, color, ...props }: AlertProps): react_jsx_runtime.JSX.Element;
|
|
171
|
-
/** Bold title text within an Alert. Rendered in the second grid column when an icon is present. */
|
|
172
|
-
declare function AlertTitle({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
173
|
-
/** Descriptive body text within an Alert, rendered below the title. */
|
|
174
|
-
declare function AlertDescription({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Confirmation dialog built on Radix UI AlertDialog.
|
|
178
|
-
*
|
|
179
|
-
* Unlike `Dialog`, an alert dialog requires an explicit user action to dismiss
|
|
180
|
-
* (no click-outside or Escape by default). Use it for destructive actions or
|
|
181
|
-
* important confirmations.
|
|
182
|
-
*
|
|
183
|
-
* **When to use:** destructive or irreversible actions ONLY — delete, archive,
|
|
184
|
-
* force-logout, payment confirmation. The no-dismiss-on-overlay-click behaviour
|
|
185
|
-
* is intentional friction so the user can't fat-finger the action away. For any
|
|
186
|
-
* non-destructive confirmation (save, publish, edit) use `<Dialog>` instead.
|
|
187
|
-
*
|
|
188
|
-
* @example
|
|
189
|
-
* ```tsx
|
|
190
|
-
* <AlertDialog open={open} onOpenChange={setOpen}>
|
|
191
|
-
* <AlertDialogTrigger asChild>
|
|
192
|
-
* <Button variant="destructive">Delete Item</Button>
|
|
193
|
-
* </AlertDialogTrigger>
|
|
194
|
-
* <AlertDialogContent>
|
|
195
|
-
* <AlertDialogHeader>
|
|
196
|
-
* <AlertDialogTitle>Are you sure?</AlertDialogTitle>
|
|
197
|
-
* <AlertDialogDescription>
|
|
198
|
-
* This action cannot be undone. This will permanently delete
|
|
199
|
-
* your item and remove it from our servers.
|
|
200
|
-
* </AlertDialogDescription>
|
|
201
|
-
* </AlertDialogHeader>
|
|
202
|
-
* <AlertDialogFooter>
|
|
203
|
-
* <AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
204
|
-
* <AlertDialogAction>Delete</AlertDialogAction>
|
|
205
|
-
* </AlertDialogFooter>
|
|
206
|
-
* </AlertDialogContent>
|
|
207
|
-
* </AlertDialog>
|
|
208
|
-
* ```
|
|
209
|
-
*/
|
|
210
|
-
declare function AlertDialog({ ...props }: React$1.ComponentProps<typeof AlertDialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
211
|
-
/** Element that opens the alert dialog when clicked. Use `asChild` to merge into your own button. */
|
|
212
|
-
declare function AlertDialogTrigger({ ...props }: React$1.ComponentProps<typeof AlertDialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
213
|
-
/** Portal that renders alert dialog content outside the DOM hierarchy. */
|
|
214
|
-
declare function AlertDialogPortal({ ...props }: React$1.ComponentProps<typeof AlertDialogPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
215
|
-
/** Semi-transparent backdrop rendered behind the alert dialog content. */
|
|
216
|
-
declare function AlertDialogOverlay({ className, ...props }: React$1.ComponentProps<typeof AlertDialogPrimitive.Overlay>): react_jsx_runtime.JSX.Element;
|
|
217
|
-
/** Alert dialog content panel with overlay backdrop. */
|
|
218
|
-
declare function AlertDialogContent({ className, ...props }: React$1.ComponentProps<typeof AlertDialogPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
219
|
-
/** Container for AlertDialogTitle and AlertDialogDescription. */
|
|
220
|
-
declare function AlertDialogHeader({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
221
|
-
/** Container for AlertDialogAction and AlertDialogCancel buttons. */
|
|
222
|
-
declare function AlertDialogFooter({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
223
|
-
/** Accessible title for the alert dialog. */
|
|
224
|
-
declare function AlertDialogTitle({ className, ...props }: React$1.ComponentProps<typeof AlertDialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
225
|
-
/** Accessible description explaining the consequences of the action. */
|
|
226
|
-
declare function AlertDialogDescription({ className, ...props }: React$1.ComponentProps<typeof AlertDialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
|
|
227
|
-
/** Primary action button that confirms and closes the alert dialog. */
|
|
228
|
-
declare function AlertDialogAction({ className, ...props }: React$1.ComponentProps<typeof AlertDialogPrimitive.Action>): react_jsx_runtime.JSX.Element;
|
|
229
|
-
/** Cancel button that dismisses the alert dialog without taking action. Styled as outline variant. */
|
|
230
|
-
declare function AlertDialogCancel({ className, ...props }: React$1.ComponentProps<typeof AlertDialogPrimitive.Cancel>): react_jsx_runtime.JSX.Element;
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Maintains a consistent width-to-height ratio for its content.
|
|
234
|
-
*
|
|
235
|
-
* Useful for images, videos, and maps that need to preserve their aspect ratio
|
|
236
|
-
* across different viewport sizes. Built on Radix AspectRatio.
|
|
237
|
-
*
|
|
238
|
-
* @example
|
|
239
|
-
* ```tsx
|
|
240
|
-
* <AspectRatio ratio={16 / 9}>
|
|
241
|
-
* <img
|
|
242
|
-
* src="/hero.jpg"
|
|
243
|
-
* alt="Hero image"
|
|
244
|
-
* className="h-full w-full rounded-md object-cover"
|
|
245
|
-
* />
|
|
246
|
-
* </AspectRatio>
|
|
247
|
-
* ```
|
|
248
|
-
*/
|
|
249
|
-
declare function AspectRatio({ ...props }: React.ComponentProps<typeof AspectRatioPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
250
|
-
|
|
251
|
-
type AvatarProps = React$1.ComponentProps<typeof AvatarPrimitive.Root>;
|
|
252
|
-
/**
|
|
253
|
-
* Circular container for user profile images or initials.
|
|
254
|
-
* Use with {@link AvatarImage} and {@link AvatarFallback} for graceful loading.
|
|
255
|
-
*
|
|
256
|
-
* @example
|
|
257
|
-
* ```tsx
|
|
258
|
-
* <Avatar>
|
|
259
|
-
* <AvatarImage src="/avatar.jpg" alt="User" />
|
|
260
|
-
* <AvatarFallback>JD</AvatarFallback>
|
|
261
|
-
* </Avatar>
|
|
262
|
-
*
|
|
263
|
-
* // Custom size
|
|
264
|
-
* <Avatar className="size-8">
|
|
265
|
-
* <AvatarImage src="/small.jpg" alt="User" />
|
|
266
|
-
* <AvatarFallback>U</AvatarFallback>
|
|
267
|
-
* </Avatar>
|
|
268
|
-
* ```
|
|
269
|
-
*/
|
|
270
|
-
declare function Avatar({ className, ...props }: AvatarProps): react_jsx_runtime.JSX.Element;
|
|
271
|
-
type AvatarImageProps = React$1.ComponentProps<typeof AvatarPrimitive.Image>;
|
|
272
|
-
/**
|
|
273
|
-
* Image element rendered inside an {@link Avatar}. Falls back to
|
|
274
|
-
* {@link AvatarFallback} when the image fails to load.
|
|
275
|
-
*
|
|
276
|
-
* @example
|
|
277
|
-
* ```tsx
|
|
278
|
-
* <AvatarImage src="/photo.jpg" alt="Jane Doe" />
|
|
279
|
-
* ```
|
|
280
|
-
*/
|
|
281
|
-
declare function AvatarImage({ className, ...props }: AvatarImageProps): react_jsx_runtime.JSX.Element;
|
|
282
|
-
type AvatarFallbackProps = React$1.ComponentProps<typeof AvatarPrimitive.Fallback>;
|
|
283
|
-
/**
|
|
284
|
-
* Fallback content displayed while the {@link AvatarImage} is loading or
|
|
285
|
-
* if it fails. Typically shows user initials (max 2 characters).
|
|
286
|
-
*
|
|
287
|
-
* @example
|
|
288
|
-
* ```tsx
|
|
289
|
-
* <AvatarFallback>JD</AvatarFallback>
|
|
290
|
-
* ```
|
|
291
|
-
*/
|
|
292
|
-
declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): react_jsx_runtime.JSX.Element;
|
|
293
|
-
|
|
294
|
-
declare const badgeVariants: (props?: ({
|
|
295
|
-
variant?: "destructive" | "default" | "secondary" | "outline" | "soft" | null | undefined;
|
|
296
|
-
color?: "primary" | "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
297
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
298
|
-
interface BadgeProps extends React$1.ComponentProps<"span">, Omit<VariantProps<typeof badgeVariants>, "color"> {
|
|
299
|
-
/**
|
|
300
|
-
* Semantic color intent.
|
|
301
|
-
*
|
|
302
|
-
* @default "primary"
|
|
303
|
-
* @example
|
|
304
|
-
* ```tsx
|
|
305
|
-
* <Badge color="success">Done</Badge>
|
|
306
|
-
* <Badge color="warning">Pending</Badge>
|
|
307
|
-
* <Badge variant="soft" color="destructive">Failed</Badge>
|
|
308
|
-
* ```
|
|
309
|
-
*/
|
|
310
|
-
color?: UIColor;
|
|
311
|
-
/** Render as a child component using Radix Slot. @default false */
|
|
312
|
-
asChild?: boolean;
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* Inline status descriptor with semantic colors and visual variants.
|
|
316
|
-
*
|
|
317
|
-
* **Tokens used** (Phase B foundation — `plans/design-foundations-japanese.md`):
|
|
318
|
-
* - Color combinations apply via cva compoundVariants over
|
|
319
|
-
* `--color-{primary,success,warning,info,destructive}`. Status colors map to
|
|
320
|
-
* 和色 hue centers (若竹 success / 山吹 warning / 群青 info / 茜 destructive
|
|
321
|
-
* — NOT pure red, cited cultural rule).
|
|
322
|
-
* - `rounded-md` → `--radius-md` = 4 px for tag-style badges; pass `rounded-full`
|
|
323
|
-
* on the className for pill-style status indicators.
|
|
324
|
-
* - `text-xs` → `--text-xs` = 12 px / 18 px line-height (JMDC convergent CJK)
|
|
325
|
-
* - 1 px border (`border` utility) per JP enterprise convention — borders > shadows
|
|
326
|
-
* for hierarchy (See Foundations / Cultural Notes in Storybook).
|
|
327
|
-
*
|
|
328
|
-
* @example
|
|
329
|
-
* ```tsx
|
|
330
|
-
* // Solid (default)
|
|
331
|
-
* <Badge>New</Badge>
|
|
332
|
-
* <Badge color="success">Done</Badge>
|
|
333
|
-
* <Badge color="warning">Pending</Badge>
|
|
334
|
-
*
|
|
335
|
-
* // Soft (light tinted background)
|
|
336
|
-
* <Badge variant="soft" color="success">Approved</Badge>
|
|
337
|
-
* <Badge variant="soft" color="destructive">Rejected</Badge>
|
|
338
|
-
*
|
|
339
|
-
* // Outline
|
|
340
|
-
* <Badge variant="outline">v1.0.0</Badge>
|
|
341
|
-
* <Badge variant="outline" color="info">Beta</Badge>
|
|
342
|
-
*
|
|
343
|
-
* // Legacy (still works)
|
|
344
|
-
* <Badge variant="destructive">Error</Badge>
|
|
345
|
-
* <Badge variant="secondary">Draft</Badge>
|
|
346
|
-
* ```
|
|
347
|
-
*/
|
|
348
|
-
declare function Badge({ className, variant, color, asChild, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* Navigation breadcrumb trail showing the current page hierarchy.
|
|
352
|
-
*
|
|
353
|
-
* Renders as a `<nav>` with `aria-label="breadcrumb"` for accessibility.
|
|
354
|
-
* Use `BreadcrumbSeparator` between items (defaults to a chevron icon)
|
|
355
|
-
* and `BreadcrumbEllipsis` for collapsed intermediate items.
|
|
356
|
-
*
|
|
357
|
-
* @example
|
|
358
|
-
* ```tsx
|
|
359
|
-
* <Breadcrumb>
|
|
360
|
-
* <BreadcrumbList>
|
|
361
|
-
* <BreadcrumbItem>
|
|
362
|
-
* <BreadcrumbLink href="/">Home</BreadcrumbLink>
|
|
363
|
-
* </BreadcrumbItem>
|
|
364
|
-
* <BreadcrumbSeparator />
|
|
365
|
-
* <BreadcrumbItem>
|
|
366
|
-
* <BreadcrumbLink href="/projects">Projects</BreadcrumbLink>
|
|
367
|
-
* </BreadcrumbItem>
|
|
368
|
-
* <BreadcrumbSeparator />
|
|
369
|
-
* <BreadcrumbItem>
|
|
370
|
-
* <BreadcrumbPage>Current Project</BreadcrumbPage>
|
|
371
|
-
* </BreadcrumbItem>
|
|
372
|
-
* </BreadcrumbList>
|
|
373
|
-
* </Breadcrumb>
|
|
374
|
-
* ```
|
|
375
|
-
*/
|
|
376
|
-
declare function Breadcrumb({ ...props }: React$1.ComponentProps<"nav">): react_jsx_runtime.JSX.Element;
|
|
377
|
-
/** Ordered list container for breadcrumb items. Handles wrapping and spacing. */
|
|
378
|
-
declare function BreadcrumbList({ className, ...props }: React$1.ComponentProps<"ol">): react_jsx_runtime.JSX.Element;
|
|
379
|
-
/** Individual breadcrumb list item wrapping a link or page indicator. */
|
|
380
|
-
declare function BreadcrumbItem({ className, ...props }: React$1.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
|
|
381
|
-
/**
|
|
382
|
-
* Clickable breadcrumb link. Set `asChild` to render a custom element (e.g., React Router `Link`).
|
|
383
|
-
*
|
|
384
|
-
* @param asChild - When true, renders the child element instead of an `<a>` tag.
|
|
385
|
-
*/
|
|
386
|
-
declare function BreadcrumbLink({ asChild, className, ...props }: React$1.ComponentProps<"a"> & {
|
|
387
|
-
asChild?: boolean;
|
|
388
|
-
}): react_jsx_runtime.JSX.Element;
|
|
389
|
-
/** Non-interactive breadcrumb label for the current page. Rendered with `aria-current="page"`. */
|
|
390
|
-
declare function BreadcrumbPage({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
391
|
-
/** Visual separator between breadcrumb items. Defaults to a `ChevronRight` icon; pass custom children to override. */
|
|
392
|
-
declare function BreadcrumbSeparator({ children, className, ...props }: React$1.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
|
|
393
|
-
/** Ellipsis indicator for collapsed breadcrumb items. Renders a `MoreHorizontal` icon with screen-reader text. */
|
|
394
|
-
declare function BreadcrumbEllipsis({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
395
|
-
|
|
396
|
-
declare const buttonVariants: (props?: ({
|
|
397
|
-
variant?: "link" | "destructive" | "default" | "secondary" | "outline" | "soft" | "ghost" | null | undefined;
|
|
398
|
-
color?: "primary" | "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
399
|
-
size?: "default" | "xs" | "sm" | "lg" | "xl" | "icon" | null | undefined;
|
|
400
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
401
|
-
interface ButtonProps extends React$1.ComponentProps<"button">, Omit<VariantProps<typeof buttonVariants>, "color"> {
|
|
402
|
-
/**
|
|
403
|
-
* Semantic color intent. Works with `variant` to produce the final appearance.
|
|
404
|
-
*
|
|
405
|
-
* | Color | Use for |
|
|
406
|
-
* |-------|---------|
|
|
407
|
-
* | `primary` | Main actions (default) |
|
|
408
|
-
* | `destructive` | Delete, errors |
|
|
409
|
-
* | `success` | Approve, confirm |
|
|
410
|
-
* | `warning` | Caution, attention |
|
|
411
|
-
* | `info` | Informational |
|
|
412
|
-
*
|
|
413
|
-
* @default "primary"
|
|
414
|
-
* @example
|
|
415
|
-
* ```tsx
|
|
416
|
-
* <Button color="success">Approve</Button>
|
|
417
|
-
* <Button variant="outline" color="destructive">Reject</Button>
|
|
418
|
-
* <Button variant="soft" color="warning">Review</Button>
|
|
419
|
-
* ```
|
|
420
|
-
*/
|
|
421
|
-
color?: UIColor;
|
|
422
|
-
/**
|
|
423
|
-
* Render as a child component using Radix Slot.
|
|
424
|
-
* When `true`, the button merges its props onto its single child element.
|
|
425
|
-
* @default false
|
|
426
|
-
*/
|
|
427
|
-
asChild?: boolean;
|
|
428
|
-
/**
|
|
429
|
-
* Make the button take the full width of its container.
|
|
430
|
-
* @default false
|
|
431
|
-
* @example
|
|
432
|
-
* ```tsx
|
|
433
|
-
* <Button block>Full Width</Button>
|
|
434
|
-
* <Button size="xl" block>Sign In</Button>
|
|
435
|
-
* ```
|
|
436
|
-
*/
|
|
437
|
-
block?: boolean;
|
|
438
|
-
}
|
|
439
|
-
/**
|
|
440
|
-
* Button component with semantic colors, visual variants, and standard sizes.
|
|
441
|
-
*
|
|
442
|
-
* Combines `variant` (how it looks) with `color` (what it means) for full flexibility.
|
|
443
|
-
* All existing `variant="destructive"` usage continues to work unchanged.
|
|
444
|
-
*
|
|
445
|
-
* **Tokens used** (Phase B foundation — `plans/design-foundations-japanese.md`):
|
|
446
|
-
* - Heights via `h-element-{xs,sm,default,lg,xl}` → `--density-element-*` tokens.
|
|
447
|
-
* Default 32 px shifts to 28 / 44 under `[data-density]` modes.
|
|
448
|
-
* - `--color-primary` (oklch 56% 0.15 240 ≈ SmartHR MAIN, chroma ≤ 0.15 per 渋み)
|
|
449
|
-
* - `--color-destructive` = 茜 (akane, NOT pure red — cited cultural rule)
|
|
450
|
-
* - `--color-success` / `--color-warning` / `--color-info` mapped to 和色 hue centers
|
|
451
|
-
* - `rounded-md` → `--radius-md` = 4 px (control radius, JP enterprise subtle)
|
|
452
|
-
*
|
|
453
|
-
* **Touch target**: only `size="xl"` (44 px) clears Digital Agency hard rule on its
|
|
454
|
-
* own. Smaller sizes need a wrapper / `::before` padding to reach 44×44 on mobile.
|
|
455
|
-
* See Foundations / Touch Targets in Storybook.
|
|
456
|
-
*
|
|
457
|
-
* @example
|
|
458
|
-
* ```tsx
|
|
459
|
-
* // Default (solid primary)
|
|
460
|
-
* <Button>Save</Button>
|
|
461
|
-
*
|
|
462
|
-
* // Semantic colors
|
|
463
|
-
* <Button color="success">Approve</Button>
|
|
464
|
-
* <Button color="destructive">Delete</Button>
|
|
465
|
-
* <Button color="warning">Proceed with caution</Button>
|
|
466
|
-
*
|
|
467
|
-
* // Variant × Color combinations
|
|
468
|
-
* <Button variant="outline" color="destructive">Reject</Button>
|
|
469
|
-
* <Button variant="soft" color="success">Approved</Button>
|
|
470
|
-
* <Button variant="ghost" color="info">Learn more</Button>
|
|
471
|
-
*
|
|
472
|
-
* // Legacy (still works)
|
|
473
|
-
* <Button variant="destructive">Delete</Button>
|
|
474
|
-
*
|
|
475
|
-
* // Sizes: xs (24px) | sm (28px) | default (32px) | lg (36px) | xl (44px) | icon (32x32)
|
|
476
|
-
* <Button size="xs">Tiny</Button>
|
|
477
|
-
* <Button size="xl" block>Sign In</Button>
|
|
478
|
-
* <Button size="icon"><PlusIcon /></Button>
|
|
479
|
-
* ```
|
|
480
|
-
*/
|
|
481
|
-
declare const Button: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
482
|
-
|
|
483
|
-
/**
|
|
484
|
-
* Date picker calendar built on `react-day-picker` v9. Supports single, multiple,
|
|
485
|
-
* and range selection modes. Styled with Shadcn UI conventions.
|
|
486
|
-
*
|
|
487
|
-
* @param showOutsideDays - Whether to show days from adjacent months. Defaults to `true`.
|
|
488
|
-
*
|
|
489
|
-
* @example
|
|
490
|
-
* ```tsx
|
|
491
|
-
* const [date, setDate] = useState<Date | undefined>();
|
|
492
|
-
* <Calendar mode="single" selected={date} onSelect={setDate} />
|
|
493
|
-
* ```
|
|
494
|
-
*/
|
|
495
|
-
declare function Calendar({ className, classNames, showOutsideDays, ...props }: React$1.ComponentProps<typeof DayPicker>): react_jsx_runtime.JSX.Element;
|
|
496
|
-
|
|
497
|
-
/**
|
|
498
|
-
* Styled card container with header, title, description, action, content, and footer sub-components.
|
|
499
|
-
*
|
|
500
|
-
* **Tokens used** (Phase B foundation — `plans/design-foundations-japanese.md`):
|
|
501
|
-
* - `gap-card` → `--spacing-card` = 16 px (24 px on `[data-density="comfortable"]`, 12 px on compact)
|
|
502
|
-
* - `px-card` / `pt-card` / `pb-card` → same `--spacing-card` token
|
|
503
|
-
* - `bg-card` / `text-card-foreground` → semantic role tokens (warm off-white / off-black per SmartHR)
|
|
504
|
-
* - `rounded-lg` → `--radius-lg` = 6 px (SmartHR card radius — JP enterprise subtle)
|
|
505
|
-
* - `border` = 1 px hairline (border > shadow per JP enterprise convention)
|
|
506
|
-
*
|
|
507
|
-
* The Card automatically adopts the active density mode via the density tokens
|
|
508
|
-
* — wrap a subtree in `<div data-density="compact">` or `"comfortable"` to shift.
|
|
509
|
-
*
|
|
510
|
-
* @example
|
|
511
|
-
* ```tsx
|
|
512
|
-
* <Card>
|
|
513
|
-
* <CardHeader>
|
|
514
|
-
* <CardTitle>Notifications</CardTitle>
|
|
515
|
-
* <CardDescription>You have 3 unread messages.</CardDescription>
|
|
516
|
-
* <CardAction>
|
|
517
|
-
* <Button variant="outline">Mark all read</Button>
|
|
518
|
-
* </CardAction>
|
|
519
|
-
* </CardHeader>
|
|
520
|
-
* <CardContent>
|
|
521
|
-
* <p>Your recent activity will appear here.</p>
|
|
522
|
-
* </CardContent>
|
|
523
|
-
* <CardFooter>
|
|
524
|
-
* <Button>View all</Button>
|
|
525
|
-
* </CardFooter>
|
|
526
|
-
* </Card>
|
|
527
|
-
* ```
|
|
528
|
-
*/
|
|
529
|
-
declare function Card({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
530
|
-
/**
|
|
531
|
-
* Card header section. Lays out title, description, and optional action in a grid.
|
|
532
|
-
*
|
|
533
|
-
* **Tokens used:**
|
|
534
|
-
* - `px-card` / `pt-card` / `pb-card` → `--spacing-card`
|
|
535
|
-
* - `gap-2` (8 px = `--spacing-2`) — title-to-description gap inside the header.
|
|
536
|
-
* Sits between the related-items "tight" yohaku step (4 px) and the inside-card
|
|
537
|
-
* "default" (16 px) — see Foundations / Spacing for the 1:1.5:3 ratio.
|
|
538
|
-
*/
|
|
539
|
-
declare function CardHeader({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
540
|
-
/** Card title rendered as an `<h4>` element. */
|
|
541
|
-
declare function CardTitle({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
542
|
-
/** Card description text displayed in muted foreground color. */
|
|
543
|
-
declare function CardDescription({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
544
|
-
/** Card action slot positioned at the top-right of `CardHeader`. Place buttons or menus here. */
|
|
545
|
-
declare function CardAction({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
546
|
-
/** Card content area with horizontal padding. Bottom padding applied when last child. */
|
|
547
|
-
declare function CardContent({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
548
|
-
/**
|
|
549
|
-
* Edge-to-edge media slot for image / video / illustration cards (Pinterest,
|
|
550
|
-
* product gallery, blog preview, etc).
|
|
551
|
-
*
|
|
552
|
-
* Unlike the other Card sub-components, `CardMedia` has **no horizontal
|
|
553
|
-
* padding** — the child media fills the full Card width. When `CardMedia` is
|
|
554
|
-
* the first child of `Card` it rounds its top corners to match the Card's
|
|
555
|
-
* border radius; when it's the last child it rounds its bottom corners.
|
|
556
|
-
*
|
|
557
|
-
* The default has no aspect-ratio constraint — pass `aspectRatio` (any
|
|
558
|
-
* Tailwind aspect-ratio class string fragment, e.g. `"16/9"`, `"4/3"`,
|
|
559
|
-
* `"square"`) for a consistent gallery layout.
|
|
560
|
-
*
|
|
561
|
-
* Place an `<img>`, `<video>`, or Next.js `<Image fill>` inside.
|
|
562
|
-
*
|
|
563
|
-
* @example
|
|
564
|
-
* ```tsx
|
|
565
|
-
* <Card className="w-72 overflow-hidden">
|
|
566
|
-
* <CardMedia aspectRatio="16/9">
|
|
567
|
-
* <img src="/cover.jpg" alt="" className="size-full object-cover" />
|
|
568
|
-
* </CardMedia>
|
|
569
|
-
* <CardHeader>
|
|
570
|
-
* <CardTitle>Yakiniku platter</CardTitle>
|
|
571
|
-
* <CardDescription>From the spring menu</CardDescription>
|
|
572
|
-
* </CardHeader>
|
|
573
|
-
* </Card>
|
|
574
|
-
* ```
|
|
575
|
-
*/
|
|
576
|
-
declare function CardMedia({ className, aspectRatio, children, ...props }: React$1.ComponentProps<"div"> & {
|
|
577
|
-
aspectRatio?: string;
|
|
578
|
-
}): react_jsx_runtime.JSX.Element;
|
|
579
|
-
/** Card footer with horizontal layout. Typically used for action buttons. */
|
|
580
|
-
declare function CardFooter({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
581
|
-
|
|
582
|
-
type CarouselApi = ReturnType<typeof useEmblaCarousel>[1];
|
|
583
|
-
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
584
|
-
type CarouselOptions = UseCarouselParameters[0];
|
|
585
|
-
type CarouselPlugin = UseCarouselParameters[1];
|
|
586
|
-
type CarouselProps = {
|
|
587
|
-
/** Embla Carousel options (e.g., `{ loop: true, align: "start" }`). */
|
|
588
|
-
opts?: CarouselOptions;
|
|
589
|
-
/** Embla Carousel plugins (e.g., Autoplay, ClassNames). */
|
|
590
|
-
plugins?: CarouselPlugin;
|
|
591
|
-
/** Scroll axis direction. Defaults to `"horizontal"`. */
|
|
592
|
-
orientation?: "horizontal" | "vertical";
|
|
593
|
-
/** Callback to receive the Embla API instance for external control. */
|
|
594
|
-
setApi?: (api: CarouselApi) => void;
|
|
595
|
-
};
|
|
596
|
-
/**
|
|
597
|
-
* Carousel/slider component powered by Embla Carousel.
|
|
598
|
-
*
|
|
599
|
-
* Provides a context for child components (`CarouselContent`, `CarouselItem`,
|
|
600
|
-
* `CarouselPrevious`, `CarouselNext`). Supports horizontal/vertical orientation,
|
|
601
|
-
* keyboard navigation (arrow keys), and plugin extensibility.
|
|
602
|
-
*
|
|
603
|
-
* @example
|
|
604
|
-
* ```tsx
|
|
605
|
-
* <Carousel opts={{ loop: true }}>
|
|
606
|
-
* <CarouselContent>
|
|
607
|
-
* <CarouselItem>Slide 1</CarouselItem>
|
|
608
|
-
* <CarouselItem>Slide 2</CarouselItem>
|
|
609
|
-
* <CarouselItem>Slide 3</CarouselItem>
|
|
610
|
-
* </CarouselContent>
|
|
611
|
-
* <CarouselPrevious />
|
|
612
|
-
* <CarouselNext />
|
|
613
|
-
* </Carousel>
|
|
614
|
-
* ```
|
|
615
|
-
*/
|
|
616
|
-
declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React$1.ComponentProps<"div"> & CarouselProps): react_jsx_runtime.JSX.Element;
|
|
617
|
-
/** Scrollable container for `CarouselItem` elements. Manages the overflow viewport. */
|
|
618
|
-
declare function CarouselContent({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
619
|
-
/** Individual slide within the carousel. Defaults to full-width (`basis-full`). */
|
|
620
|
-
declare function CarouselItem({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
621
|
-
/** Navigation button to scroll to the previous slide. Automatically disabled when at the beginning. */
|
|
622
|
-
declare function CarouselPrevious({ className, variant, size, ...props }: React$1.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
|
|
623
|
-
/** Navigation button to scroll to the next slide. Automatically disabled when at the end. */
|
|
624
|
-
declare function CarouselNext({ className, variant, size, ...props }: React$1.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
|
|
625
|
-
|
|
626
|
-
type CheckboxProps = React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;
|
|
627
|
-
/**
|
|
628
|
-
* Checkable input that allows selecting one or more options from a set.
|
|
629
|
-
* Supports checked, unchecked, and indeterminate states.
|
|
630
|
-
*
|
|
631
|
-
* @example
|
|
632
|
-
* ```tsx
|
|
633
|
-
* // Basic usage
|
|
634
|
-
* <Checkbox id="terms" />
|
|
635
|
-
* <Label htmlFor="terms">Accept terms</Label>
|
|
636
|
-
*
|
|
637
|
-
* // Controlled
|
|
638
|
-
* <Checkbox checked={accepted} onCheckedChange={setAccepted} />
|
|
639
|
-
*
|
|
640
|
-
* // Indeterminate (partial selection)
|
|
641
|
-
* <Checkbox checked="indeterminate" />
|
|
642
|
-
* ```
|
|
643
|
-
*/
|
|
644
|
-
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
645
|
-
|
|
646
|
-
/**
|
|
647
|
-
* Expandable/collapsible container built on Radix Collapsible.
|
|
648
|
-
*
|
|
649
|
-
* Manages open/closed state for a single content region. For multiple
|
|
650
|
-
* collapsible sections, consider using `Accordion` instead.
|
|
651
|
-
*
|
|
652
|
-
* @example
|
|
653
|
-
* ```tsx
|
|
654
|
-
* <Collapsible>
|
|
655
|
-
* <CollapsibleTrigger asChild>
|
|
656
|
-
* <Button variant="ghost">Toggle details</Button>
|
|
657
|
-
* </CollapsibleTrigger>
|
|
658
|
-
* <CollapsibleContent>
|
|
659
|
-
* <p>Hidden content revealed on toggle.</p>
|
|
660
|
-
* </CollapsibleContent>
|
|
661
|
-
* </Collapsible>
|
|
662
|
-
* ```
|
|
663
|
-
*/
|
|
664
|
-
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
665
|
-
/** Button or element that toggles the collapsible open/closed state. Supports `asChild` for custom trigger elements. */
|
|
666
|
-
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): react_jsx_runtime.JSX.Element;
|
|
667
|
-
/** Content region that shows/hides when the collapsible is toggled. */
|
|
668
|
-
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): react_jsx_runtime.JSX.Element;
|
|
669
|
-
|
|
670
|
-
interface ColorPickerProps {
|
|
671
|
-
/** Currently selected color as a hex string (e.g., `"#3B82F6"`). */
|
|
672
|
-
value?: string;
|
|
673
|
-
/** Callback fired when a color is selected. Receives a hex string. */
|
|
674
|
-
onChange?: (color: string) => void;
|
|
675
|
-
/** Additional CSS class for the trigger button. */
|
|
676
|
-
className?: string;
|
|
677
|
-
/** Whether the color picker is disabled. */
|
|
678
|
-
disabled?: boolean;
|
|
679
|
-
/** Whether to show the preset color grid. Defaults to `true`. */
|
|
680
|
-
showPresets?: boolean;
|
|
681
|
-
/** Whether to show the custom hex input with native color picker. Defaults to `true`. */
|
|
682
|
-
showInput?: boolean;
|
|
683
|
-
}
|
|
684
|
-
/**
|
|
685
|
-
* Color picker with a popover containing preset color swatches and an optional custom hex input.
|
|
686
|
-
* The trigger button shows the currently selected color swatch and its hex value.
|
|
687
|
-
*
|
|
688
|
-
* @example
|
|
689
|
-
* ```tsx
|
|
690
|
-
* const [color, setColor] = useState("#3B82F6");
|
|
691
|
-
*
|
|
692
|
-
* <ColorPicker
|
|
693
|
-
* value={color}
|
|
694
|
-
* onChange={setColor}
|
|
695
|
-
* showPresets
|
|
696
|
-
* showInput
|
|
697
|
-
* />
|
|
698
|
-
* ```
|
|
699
|
-
*/
|
|
700
|
-
declare function ColorPicker({ value, onChange, className, disabled, showPresets, showInput, }: ColorPickerProps): react_jsx_runtime.JSX.Element;
|
|
701
|
-
|
|
702
|
-
/** A single option in the Combobox dropdown. */
|
|
703
|
-
interface ComboboxOption {
|
|
704
|
-
/** Unique value for this option. */
|
|
705
|
-
value: string;
|
|
706
|
-
/** Display label shown in the dropdown list. */
|
|
707
|
-
label: string;
|
|
708
|
-
/** Whether this option is non-selectable. */
|
|
709
|
-
disabled?: boolean;
|
|
710
|
-
}
|
|
711
|
-
interface ComboboxProps {
|
|
712
|
-
/** Available options to display in the dropdown. */
|
|
713
|
-
options: ComboboxOption[];
|
|
714
|
-
/** Currently selected value. */
|
|
715
|
-
value?: string;
|
|
716
|
-
/** Callback fired when the selected value changes. */
|
|
717
|
-
onChange?: (value: string) => void;
|
|
718
|
-
/** Placeholder text shown when no value is selected. */
|
|
719
|
-
placeholder?: string;
|
|
720
|
-
/** Placeholder text for the search input inside the dropdown. */
|
|
721
|
-
searchPlaceholder?: string;
|
|
722
|
-
/** Text shown when no options match the search query. */
|
|
723
|
-
emptyText?: string;
|
|
724
|
-
/** Additional CSS class for the trigger button. */
|
|
725
|
-
className?: string;
|
|
726
|
-
/** Whether the combobox is disabled. */
|
|
727
|
-
disabled?: boolean;
|
|
728
|
-
/** Whether to show a clear button when a value is selected. */
|
|
729
|
-
clearable?: boolean;
|
|
730
|
-
}
|
|
731
|
-
/**
|
|
732
|
-
* Searchable single-select combobox built on cmdk and Radix Popover.
|
|
733
|
-
* Combines a text search input with a selectable option list.
|
|
734
|
-
*
|
|
735
|
-
* @example
|
|
736
|
-
* ```tsx
|
|
737
|
-
* const [value, setValue] = useState("");
|
|
738
|
-
*
|
|
739
|
-
* <Combobox
|
|
740
|
-
* options={[
|
|
741
|
-
* { value: "react", label: "React" },
|
|
742
|
-
* { value: "vue", label: "Vue" },
|
|
743
|
-
* { value: "svelte", label: "Svelte" },
|
|
744
|
-
* ]}
|
|
745
|
-
* value={value}
|
|
746
|
-
* onChange={setValue}
|
|
747
|
-
* placeholder="Select framework..."
|
|
748
|
-
* searchPlaceholder="Search..."
|
|
749
|
-
* clearable
|
|
750
|
-
* />
|
|
751
|
-
* ```
|
|
752
|
-
*/
|
|
753
|
-
declare function Combobox({ options, value, onChange, placeholder, searchPlaceholder, emptyText, className, disabled, clearable, }: ComboboxProps): react_jsx_runtime.JSX.Element;
|
|
754
|
-
interface MultiComboboxProps {
|
|
755
|
-
/** Available options to display in the dropdown. */
|
|
756
|
-
options: ComboboxOption[];
|
|
757
|
-
/** Array of currently selected values. */
|
|
758
|
-
value?: string[];
|
|
759
|
-
/** Callback fired when the selection changes. */
|
|
760
|
-
onChange?: (value: string[]) => void;
|
|
761
|
-
/** Placeholder text shown when no values are selected. */
|
|
762
|
-
placeholder?: string;
|
|
763
|
-
/** Placeholder text for the search input inside the dropdown. */
|
|
764
|
-
searchPlaceholder?: string;
|
|
765
|
-
/** Text shown when no options match the search query. */
|
|
766
|
-
emptyText?: string;
|
|
767
|
-
/** Additional CSS class for the trigger button. */
|
|
768
|
-
className?: string;
|
|
769
|
-
/** Whether the combobox is disabled. */
|
|
770
|
-
disabled?: boolean;
|
|
771
|
-
/** Maximum number of items that can be selected. */
|
|
772
|
-
maxSelected?: number;
|
|
773
|
-
}
|
|
774
|
-
/**
|
|
775
|
-
* Searchable multi-select combobox that allows selecting multiple values.
|
|
776
|
-
* Selected items are shown as a count in the trigger button.
|
|
777
|
-
*
|
|
778
|
-
* @example
|
|
779
|
-
* ```tsx
|
|
780
|
-
* const [selected, setSelected] = useState<string[]>([]);
|
|
781
|
-
*
|
|
782
|
-
* <MultiCombobox
|
|
783
|
-
* options={[
|
|
784
|
-
* { value: "react", label: "React" },
|
|
785
|
-
* { value: "vue", label: "Vue" },
|
|
786
|
-
* { value: "svelte", label: "Svelte" },
|
|
787
|
-
* ]}
|
|
788
|
-
* value={selected}
|
|
789
|
-
* onChange={setSelected}
|
|
790
|
-
* placeholder="Select frameworks..."
|
|
791
|
-
* maxSelected={3}
|
|
792
|
-
* />
|
|
793
|
-
* ```
|
|
794
|
-
*/
|
|
795
|
-
declare function MultiCombobox({ options, value, onChange, placeholder, searchPlaceholder, emptyText, className, disabled, maxSelected, }: MultiComboboxProps): react_jsx_runtime.JSX.Element;
|
|
796
|
-
|
|
797
|
-
/**
|
|
798
|
-
* Modal dialog component built on Radix UI Dialog.
|
|
799
|
-
*
|
|
800
|
-
* Renders a centered overlay panel that interrupts the user with important content
|
|
801
|
-
* and expects a response. Supports controlled (`open`/`onOpenChange`) and
|
|
802
|
-
* uncontrolled usage (via `DialogTrigger`).
|
|
803
|
-
*
|
|
804
|
-
* **When to use:** forms, content viewers, non-destructive confirmations.
|
|
805
|
-
* Click-outside and Escape both dismiss. For irreversible actions (delete,
|
|
806
|
-
* force-logout) use `<AlertDialog>` instead — the lack of overlay-click dismiss
|
|
807
|
-
* is intentional friction. For touch-first mobile UX with swipe-to-dismiss use
|
|
808
|
-
* `<Drawer>`. For desktop side-rail content (filters, settings) use `<Sheet>`.
|
|
809
|
-
*
|
|
810
|
-
* @example
|
|
811
|
-
* ```tsx
|
|
812
|
-
* <Dialog open={open} onOpenChange={setOpen}>
|
|
813
|
-
* <DialogTrigger asChild>
|
|
814
|
-
* <Button>Open Dialog</Button>
|
|
815
|
-
* </DialogTrigger>
|
|
816
|
-
* <DialogContent>
|
|
817
|
-
* <DialogHeader>
|
|
818
|
-
* <DialogTitle>Edit Profile</DialogTitle>
|
|
819
|
-
* <DialogDescription>
|
|
820
|
-
* Make changes to your profile here.
|
|
821
|
-
* </DialogDescription>
|
|
822
|
-
* </DialogHeader>
|
|
823
|
-
* <div className="space-y-4">
|
|
824
|
-
* <Input placeholder="Name" />
|
|
825
|
-
* </div>
|
|
826
|
-
* <DialogFooter>
|
|
827
|
-
* <Button variant="outline" onClick={() => setOpen(false)}>
|
|
828
|
-
* Cancel
|
|
829
|
-
* </Button>
|
|
830
|
-
* <Button>Save Changes</Button>
|
|
831
|
-
* </DialogFooter>
|
|
832
|
-
* </DialogContent>
|
|
833
|
-
* </Dialog>
|
|
834
|
-
* ```
|
|
835
|
-
*/
|
|
836
|
-
declare function Dialog({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
837
|
-
/** Element that opens the dialog when clicked. Use `asChild` to merge into your own button. */
|
|
838
|
-
declare function DialogTrigger({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
839
|
-
/** Portal that renders dialog content outside the DOM hierarchy. */
|
|
840
|
-
declare function DialogPortal({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
841
|
-
/** Button that closes the dialog. Use `asChild` to merge into your own button. */
|
|
842
|
-
declare function DialogClose({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
|
|
843
|
-
/** Semi-transparent backdrop rendered behind the dialog content. */
|
|
844
|
-
declare const DialogOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
845
|
-
/** Dialog content panel with overlay backdrop and a built-in close button. */
|
|
846
|
-
declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
847
|
-
/** Container for DialogTitle and DialogDescription at the top of the dialog. */
|
|
848
|
-
declare function DialogHeader({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
849
|
-
/** Container for action buttons at the bottom of the dialog. */
|
|
850
|
-
declare function DialogFooter({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
851
|
-
/** Accessible title rendered inside DialogHeader. */
|
|
852
|
-
declare function DialogTitle({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
853
|
-
/** Accessible description rendered inside DialogHeader below the title. */
|
|
854
|
-
declare function DialogDescription({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
|
|
855
|
-
|
|
856
|
-
/**
|
|
857
|
-
* Command palette component built on cmdk.
|
|
858
|
-
*
|
|
859
|
-
* Provides a searchable, keyboard-navigable list of commands or options.
|
|
860
|
-
* Use `CommandDialog` for a modal command palette, or `Command` inline
|
|
861
|
-
* for embedded search/filter interfaces like comboboxes.
|
|
862
|
-
*
|
|
863
|
-
* @example
|
|
864
|
-
* ```tsx
|
|
865
|
-
* <CommandDialog open={open} onOpenChange={setOpen}>
|
|
866
|
-
* <CommandInput placeholder="Type a command or search..." />
|
|
867
|
-
* <CommandList>
|
|
868
|
-
* <CommandEmpty>No results found.</CommandEmpty>
|
|
869
|
-
* <CommandGroup heading="Suggestions">
|
|
870
|
-
* <CommandItem>
|
|
871
|
-
* <CalendarIcon className="size-4" />
|
|
872
|
-
* Calendar
|
|
873
|
-
* </CommandItem>
|
|
874
|
-
* <CommandItem>
|
|
875
|
-
* <SearchIcon className="size-4" />
|
|
876
|
-
* Search
|
|
877
|
-
* <CommandShortcut>Ctrl+K</CommandShortcut>
|
|
878
|
-
* </CommandItem>
|
|
879
|
-
* </CommandGroup>
|
|
880
|
-
* <CommandSeparator />
|
|
881
|
-
* <CommandGroup heading="Settings">
|
|
882
|
-
* <CommandItem>
|
|
883
|
-
* <SettingsIcon className="size-4" />
|
|
884
|
-
* Settings
|
|
885
|
-
* </CommandItem>
|
|
886
|
-
* </CommandGroup>
|
|
887
|
-
* </CommandList>
|
|
888
|
-
* </CommandDialog>
|
|
889
|
-
* ```
|
|
890
|
-
*/
|
|
891
|
-
declare function Command({ className, ...props }: React$1.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
|
|
892
|
-
/** Modal wrapper that renders a Command palette inside a Dialog. Accepts optional `title` and `description` for accessibility. */
|
|
893
|
-
declare function CommandDialog({ title, description, children, ...props }: React$1.ComponentProps<typeof Dialog> & {
|
|
894
|
-
title?: string;
|
|
895
|
-
description?: string;
|
|
896
|
-
}): react_jsx_runtime.JSX.Element;
|
|
897
|
-
/** Search input field with a magnifying glass icon for filtering command items. */
|
|
898
|
-
declare function CommandInput({ className, ...props }: React$1.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
|
|
899
|
-
/** Scrollable container for command groups and items. */
|
|
900
|
-
declare function CommandList({ className, ...props }: React$1.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
|
|
901
|
-
/** Fallback content shown when no command items match the search query. */
|
|
902
|
-
declare function CommandEmpty({ ...props }: React$1.ComponentProps<typeof Command$1.Empty>): react_jsx_runtime.JSX.Element;
|
|
903
|
-
/** Groups related command items under an optional heading. */
|
|
904
|
-
declare function CommandGroup({ className, ...props }: React$1.ComponentProps<typeof Command$1.Group>): react_jsx_runtime.JSX.Element;
|
|
905
|
-
/** Visual divider between groups of command items. */
|
|
906
|
-
declare function CommandSeparator({ className, ...props }: React$1.ComponentProps<typeof Command$1.Separator>): react_jsx_runtime.JSX.Element;
|
|
907
|
-
/** Selectable command item that can be navigated with keyboard arrows and activated with Enter. */
|
|
908
|
-
declare function CommandItem({ className, ...props }: React$1.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
|
|
909
|
-
/** Keyboard shortcut hint displayed at the end of a command item. */
|
|
910
|
-
declare function CommandShortcut({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
911
|
-
|
|
912
|
-
/**
|
|
913
|
-
* Right-click context menu built on Radix UI ContextMenu.
|
|
914
|
-
*
|
|
915
|
-
* Displays a menu of actions when the user right-clicks (or long-presses)
|
|
916
|
-
* on the trigger area. Supports items, checkbox items, radio items,
|
|
917
|
-
* sub-menus, separators, labels, and shortcuts.
|
|
918
|
-
*
|
|
919
|
-
* **When to use:** ONLY when the user model expects right-click affordance —
|
|
920
|
-
* file managers, canvas editors, code editors, table cells with rich
|
|
921
|
-
* per-cell actions. Most action menus should use `<DropdownMenu>` instead
|
|
922
|
-
* (button trigger is more discoverable). Don't use `<ContextMenu>` as the
|
|
923
|
-
* primary affordance for an action — touch users can't right-click.
|
|
924
|
-
*
|
|
925
|
-
* @example
|
|
926
|
-
* ```tsx
|
|
927
|
-
* <ContextMenu>
|
|
928
|
-
* <ContextMenuTrigger className="flex h-40 w-64 items-center justify-center rounded-md border border-dashed">
|
|
929
|
-
* Right click here
|
|
930
|
-
* </ContextMenuTrigger>
|
|
931
|
-
* <ContextMenuContent>
|
|
932
|
-
* <ContextMenuItem>
|
|
933
|
-
* Copy
|
|
934
|
-
* <ContextMenuShortcut>Ctrl+C</ContextMenuShortcut>
|
|
935
|
-
* </ContextMenuItem>
|
|
936
|
-
* <ContextMenuItem>
|
|
937
|
-
* Paste
|
|
938
|
-
* <ContextMenuShortcut>Ctrl+V</ContextMenuShortcut>
|
|
939
|
-
* </ContextMenuItem>
|
|
940
|
-
* <ContextMenuSeparator />
|
|
941
|
-
* <ContextMenuItem variant="destructive">Delete</ContextMenuItem>
|
|
942
|
-
* </ContextMenuContent>
|
|
943
|
-
* </ContextMenu>
|
|
944
|
-
* ```
|
|
945
|
-
*/
|
|
946
|
-
declare function ContextMenu({ ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
947
|
-
/** Area that opens the context menu on right-click. */
|
|
948
|
-
declare function ContextMenuTrigger({ ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
949
|
-
/** Groups related context menu items together for accessibility. */
|
|
950
|
-
declare function ContextMenuGroup({ ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
951
|
-
/** Portal that renders context menu content outside the DOM hierarchy. */
|
|
952
|
-
declare function ContextMenuPortal({ ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
953
|
-
/** Container for a nested sub-menu within the context menu. */
|
|
954
|
-
declare function ContextMenuSub({ ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
|
|
955
|
-
/** Container for radio context menu items where only one can be selected at a time. */
|
|
956
|
-
declare function ContextMenuRadioGroup({ ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
957
|
-
/** Menu item that opens a sub-menu on hover. Displays a chevron indicator. */
|
|
958
|
-
declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
959
|
-
inset?: boolean;
|
|
960
|
-
}): react_jsx_runtime.JSX.Element;
|
|
961
|
-
/** Floating container for sub-menu items. */
|
|
962
|
-
declare function ContextMenuSubContent({ className, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
963
|
-
/** Floating container for context menu items, positioned at the cursor location. */
|
|
964
|
-
declare function ContextMenuContent({ className, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
965
|
-
/** Actionable menu item. Set `variant="destructive"` for dangerous actions, `inset` for left-padding alignment. */
|
|
966
|
-
declare function ContextMenuItem({ className, inset, variant, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Item> & {
|
|
967
|
-
inset?: boolean;
|
|
968
|
-
variant?: "default" | "destructive";
|
|
969
|
-
}): react_jsx_runtime.JSX.Element;
|
|
970
|
-
/** Menu item with a checkbox indicator for toggling options. */
|
|
971
|
-
declare function ContextMenuCheckboxItem({ className, children, checked, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
972
|
-
/** Menu item with a radio indicator for single-selection groups. */
|
|
973
|
-
declare function ContextMenuRadioItem({ className, children, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
974
|
-
/** Non-interactive label used to title a group of menu items. */
|
|
975
|
-
declare function ContextMenuLabel({ className, inset, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Label> & {
|
|
976
|
-
inset?: boolean;
|
|
977
|
-
}): react_jsx_runtime.JSX.Element;
|
|
978
|
-
/** Visual divider between groups of menu items. */
|
|
979
|
-
declare function ContextMenuSeparator({ className, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
980
|
-
/** Keyboard shortcut hint displayed at the end of a menu item. */
|
|
981
|
-
declare function ContextMenuShortcut({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
982
|
-
|
|
983
|
-
interface DatePickerProps {
|
|
984
|
-
/** Currently selected date. */
|
|
985
|
-
value?: Date;
|
|
986
|
-
/** Callback fired when a date is selected or cleared. */
|
|
987
|
-
onChange?: (date: Date | undefined) => void;
|
|
988
|
-
/** Placeholder text shown when no date is selected. */
|
|
989
|
-
placeholder?: string;
|
|
990
|
-
/** Additional CSS class for the trigger button. */
|
|
991
|
-
className?: string;
|
|
992
|
-
/** Whether the date picker is disabled. */
|
|
993
|
-
disabled?: boolean;
|
|
994
|
-
/** date-fns Locale object for date formatting (e.g., `ja` for Japanese). */
|
|
995
|
-
locale?: Locale;
|
|
996
|
-
}
|
|
997
|
-
/**
|
|
998
|
-
* Single date picker with a calendar popover.
|
|
999
|
-
* Displays the selected date formatted with date-fns and opens a calendar on click.
|
|
1000
|
-
*
|
|
1001
|
-
* @example
|
|
1002
|
-
* ```tsx
|
|
1003
|
-
* const [date, setDate] = useState<Date>();
|
|
1004
|
-
*
|
|
1005
|
-
* <DatePicker
|
|
1006
|
-
* value={date}
|
|
1007
|
-
* onChange={setDate}
|
|
1008
|
-
* placeholder="Pick a date"
|
|
1009
|
-
* />
|
|
1010
|
-
* ```
|
|
1011
|
-
*/
|
|
1012
|
-
declare function DatePicker({ value, onChange, placeholder, className, disabled, locale: localeProp, }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
1013
|
-
interface DateRangePickerProps {
|
|
1014
|
-
/** Currently selected date range with `from` and optional `to`. */
|
|
1015
|
-
value?: {
|
|
1016
|
-
from: Date | undefined;
|
|
1017
|
-
to?: Date | undefined;
|
|
1018
|
-
};
|
|
1019
|
-
/** Callback fired when the date range changes. */
|
|
1020
|
-
onChange?: (range: {
|
|
1021
|
-
from: Date | undefined;
|
|
1022
|
-
to?: Date | undefined;
|
|
1023
|
-
} | undefined) => void;
|
|
1024
|
-
/** Placeholder text shown when no range is selected. */
|
|
1025
|
-
placeholder?: string;
|
|
1026
|
-
/** Additional CSS class for the trigger button. */
|
|
1027
|
-
className?: string;
|
|
1028
|
-
/** Whether the date range picker is disabled. */
|
|
1029
|
-
disabled?: boolean;
|
|
1030
|
-
/** date-fns Locale object for date formatting (e.g., `ja` for Japanese). */
|
|
1031
|
-
locale?: Locale;
|
|
1032
|
-
}
|
|
1033
|
-
/**
|
|
1034
|
-
* Date range picker with a two-month calendar popover.
|
|
1035
|
-
* Allows selecting a start and end date displayed as a range string.
|
|
1036
|
-
*
|
|
1037
|
-
* @example
|
|
1038
|
-
* ```tsx
|
|
1039
|
-
* const [range, setRange] = useState<{ from: Date | undefined; to?: Date }>();
|
|
1040
|
-
*
|
|
1041
|
-
* <DateRangePicker
|
|
1042
|
-
* value={range}
|
|
1043
|
-
* onChange={setRange}
|
|
1044
|
-
* placeholder="Select date range"
|
|
1045
|
-
* />
|
|
1046
|
-
* ```
|
|
1047
|
-
*/
|
|
1048
|
-
declare function DateRangePicker({ value, onChange, placeholder, className, disabled, locale: localeProp, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
|
|
1049
|
-
|
|
1050
|
-
/**
|
|
1051
|
-
* Swipeable drawer component built on Vaul.
|
|
1052
|
-
*
|
|
1053
|
-
* Slides from any edge of the screen and can be dismissed by swiping.
|
|
1054
|
-
* Set the `direction` prop on the root to control direction (`"top"`, `"bottom"`,
|
|
1055
|
-
* `"left"`, `"right"`). Always wrap content in `DrawerBody` for proper scrolling.
|
|
1056
|
-
*
|
|
1057
|
-
* **When to use:** mobile-first touch UX where swipe-to-dismiss is expected
|
|
1058
|
-
* (mobile filters, action sheets, picker bottom-sheets). For desktop-first side
|
|
1059
|
-
* panels without swipe affordance use `<Sheet>`. For centered modal dialogs
|
|
1060
|
-
* use `<Dialog>`. For destructive confirmations use `<AlertDialog>`.
|
|
1061
|
-
*
|
|
1062
|
-
* @example
|
|
1063
|
-
* ```tsx
|
|
1064
|
-
* <Drawer open={open} onOpenChange={setOpen}>
|
|
1065
|
-
* <DrawerTrigger asChild>
|
|
1066
|
-
* <Button variant="outline">Open Drawer</Button>
|
|
1067
|
-
* </DrawerTrigger>
|
|
1068
|
-
* <DrawerContent>
|
|
1069
|
-
* <DrawerHeader>
|
|
1070
|
-
* <DrawerTitle>Task Details</DrawerTitle>
|
|
1071
|
-
* <DrawerDescription>
|
|
1072
|
-
* View and edit task information.
|
|
1073
|
-
* </DrawerDescription>
|
|
1074
|
-
* </DrawerHeader>
|
|
1075
|
-
* <DrawerBody>
|
|
1076
|
-
* <p>Scrollable content goes here.</p>
|
|
1077
|
-
* </DrawerBody>
|
|
1078
|
-
* <DrawerFooter>
|
|
1079
|
-
* <Button>Save</Button>
|
|
1080
|
-
* <DrawerClose asChild>
|
|
1081
|
-
* <Button variant="outline">Cancel</Button>
|
|
1082
|
-
* </DrawerClose>
|
|
1083
|
-
* </DrawerFooter>
|
|
1084
|
-
* </DrawerContent>
|
|
1085
|
-
* </Drawer>
|
|
1086
|
-
* ```
|
|
1087
|
-
*/
|
|
1088
|
-
declare function Drawer({ ...props }: React$1.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
|
|
1089
|
-
/** Element that opens the drawer when clicked. Use `asChild` to merge into your own button. */
|
|
1090
|
-
declare function DrawerTrigger({ ...props }: React$1.ComponentProps<typeof Drawer$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
1091
|
-
/** Portal that renders drawer content outside the DOM hierarchy. */
|
|
1092
|
-
declare function DrawerPortal({ ...props }: React$1.ComponentProps<typeof Drawer$1.Portal>): react_jsx_runtime.JSX.Element;
|
|
1093
|
-
/** Button that closes the drawer. Use `asChild` to merge into your own button. */
|
|
1094
|
-
declare function DrawerClose({ ...props }: React$1.ComponentProps<typeof Drawer$1.Close>): react_jsx_runtime.JSX.Element;
|
|
1095
|
-
/** Semi-transparent backdrop rendered behind the drawer panel. */
|
|
1096
|
-
declare function DrawerOverlay({ className, ...props }: React$1.ComponentProps<typeof Drawer$1.Overlay>): react_jsx_runtime.JSX.Element;
|
|
1097
|
-
/** Drawer content panel that slides in from the configured direction. Includes a drag handle for bottom drawers. */
|
|
1098
|
-
declare function DrawerContent({ className, children, ...props }: React$1.ComponentProps<typeof Drawer$1.Content>): react_jsx_runtime.JSX.Element;
|
|
1099
|
-
/** Container for DrawerTitle and DrawerDescription at the top of the drawer. */
|
|
1100
|
-
declare function DrawerHeader({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1101
|
-
/** Scrollable body area for drawer content. Always wrap main content in this component. */
|
|
1102
|
-
declare function DrawerBody({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1103
|
-
/** Container for action buttons at the bottom of the drawer. Pushed to the bottom via `mt-auto`. */
|
|
1104
|
-
declare function DrawerFooter({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1105
|
-
/** Accessible title rendered inside DrawerHeader. */
|
|
1106
|
-
declare function DrawerTitle({ className, ...props }: React$1.ComponentProps<typeof Drawer$1.Title>): react_jsx_runtime.JSX.Element;
|
|
1107
|
-
/** Accessible description rendered inside DrawerHeader below the title. */
|
|
1108
|
-
declare function DrawerDescription({ className, ...props }: React$1.ComponentProps<typeof Drawer$1.Description>): react_jsx_runtime.JSX.Element;
|
|
1109
|
-
|
|
1110
|
-
/**
|
|
1111
|
-
* Dropdown menu component built on Radix UI DropdownMenu.
|
|
1112
|
-
*
|
|
1113
|
-
* Displays a menu of actions or options triggered by a button click.
|
|
1114
|
-
* Supports items, checkbox items, radio items, sub-menus, separators,
|
|
1115
|
-
* labels, shortcuts, and destructive variants.
|
|
1116
|
-
*
|
|
1117
|
-
* **When to use:** button-triggered actions on a single subject — table row
|
|
1118
|
-
* actions, user avatar menu, kebab "more options" overflow. For right-click
|
|
1119
|
-
* affordance on a UI element use `<ContextMenu>`. For app-chrome top menu
|
|
1120
|
-
* bars (File / Edit / View) use `<Menubar>`. For site/app-wide primary
|
|
1121
|
-
* navigation use `<NavigationMenu>`.
|
|
1122
|
-
*
|
|
1123
|
-
* @example
|
|
1124
|
-
* ```tsx
|
|
1125
|
-
* <DropdownMenu>
|
|
1126
|
-
* <DropdownMenuTrigger asChild>
|
|
1127
|
-
* <Button variant="outline">Actions</Button>
|
|
1128
|
-
* </DropdownMenuTrigger>
|
|
1129
|
-
* <DropdownMenuContent>
|
|
1130
|
-
* <DropdownMenuLabel>My Account</DropdownMenuLabel>
|
|
1131
|
-
* <DropdownMenuSeparator />
|
|
1132
|
-
* <DropdownMenuItem>
|
|
1133
|
-
* <UserIcon className="size-4" />
|
|
1134
|
-
* Profile
|
|
1135
|
-
* <DropdownMenuShortcut>Ctrl+P</DropdownMenuShortcut>
|
|
1136
|
-
* </DropdownMenuItem>
|
|
1137
|
-
* <DropdownMenuItem>
|
|
1138
|
-
* <SettingsIcon className="size-4" />
|
|
1139
|
-
* Settings
|
|
1140
|
-
* </DropdownMenuItem>
|
|
1141
|
-
* <DropdownMenuSeparator />
|
|
1142
|
-
* <DropdownMenuItem variant="destructive">
|
|
1143
|
-
* <TrashIcon className="size-4" />
|
|
1144
|
-
* Delete
|
|
1145
|
-
* </DropdownMenuItem>
|
|
1146
|
-
* </DropdownMenuContent>
|
|
1147
|
-
* </DropdownMenu>
|
|
1148
|
-
* ```
|
|
1149
|
-
*/
|
|
1150
|
-
declare function DropdownMenu({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1151
|
-
/** Portal that renders dropdown content outside the DOM hierarchy. */
|
|
1152
|
-
declare function DropdownMenuPortal({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
1153
|
-
/** Element that opens the dropdown menu when clicked. Use `asChild` to merge into your own button. */
|
|
1154
|
-
declare function DropdownMenuTrigger({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
1155
|
-
/** Floating container for menu items, positioned relative to the trigger. */
|
|
1156
|
-
declare function DropdownMenuContent({ className, sideOffset, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
1157
|
-
/** Groups related menu items together for accessibility. */
|
|
1158
|
-
declare function DropdownMenuGroup({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
1159
|
-
/** Actionable menu item. Set `variant="destructive"` for dangerous actions, `inset` for left-padding alignment. */
|
|
1160
|
-
declare function DropdownMenuItem({ className, inset, variant, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
1161
|
-
inset?: boolean;
|
|
1162
|
-
variant?: "default" | "destructive";
|
|
1163
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1164
|
-
/** Menu item with a checkbox indicator for toggling options. */
|
|
1165
|
-
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
1166
|
-
/** Container for radio menu items where only one can be selected at a time. */
|
|
1167
|
-
declare function DropdownMenuRadioGroup({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
1168
|
-
/** Menu item with a radio indicator for single-selection groups. */
|
|
1169
|
-
declare function DropdownMenuRadioItem({ className, children, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
1170
|
-
/** Non-interactive label used to title a group of menu items. */
|
|
1171
|
-
declare function DropdownMenuLabel({ className, inset, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
1172
|
-
inset?: boolean;
|
|
1173
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1174
|
-
/** Visual divider between groups of menu items. */
|
|
1175
|
-
declare function DropdownMenuSeparator({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
1176
|
-
/** Keyboard shortcut hint displayed at the end of a menu item. */
|
|
1177
|
-
declare function DropdownMenuShortcut({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
1178
|
-
/** Container for a nested sub-menu within the dropdown. */
|
|
1179
|
-
declare function DropdownMenuSub({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
|
|
1180
|
-
/** Menu item that opens a sub-menu on hover. Displays a chevron indicator. */
|
|
1181
|
-
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
1182
|
-
inset?: boolean;
|
|
1183
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1184
|
-
/** Floating container for sub-menu items. */
|
|
1185
|
-
declare function DropdownMenuSubContent({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
1186
|
-
|
|
1187
|
-
type FileUploadVariant = "dropzone" | "compact" | "avatar" | "gallery" | "inline";
|
|
1188
|
-
interface FileUploadProps {
|
|
1189
|
-
value?: File[];
|
|
1190
|
-
onChange?: (files: File[]) => void;
|
|
1191
|
-
accept?: string;
|
|
1192
|
-
multiple?: boolean;
|
|
1193
|
-
maxSize?: number;
|
|
1194
|
-
maxFiles?: number;
|
|
1195
|
-
disabled?: boolean;
|
|
1196
|
-
className?: string;
|
|
1197
|
-
showPreview?: boolean;
|
|
1198
|
-
variant?: FileUploadVariant;
|
|
1199
|
-
placeholder?: string;
|
|
1200
|
-
hint?: string;
|
|
1201
|
-
}
|
|
1202
|
-
declare function FileUpload({ value, onChange, accept, multiple, maxSize, maxFiles, disabled, className, showPreview, variant, placeholder, hint, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
1203
|
-
|
|
1204
|
-
/**
|
|
1205
|
-
* Form provider component built on react-hook-form's FormProvider.
|
|
1206
|
-
* Wraps form fields and provides form context for validation, error display, and accessibility.
|
|
1207
|
-
*
|
|
1208
|
-
* @example
|
|
1209
|
-
* ```tsx
|
|
1210
|
-
* const form = useForm({ defaultValues: { email: "" } });
|
|
1211
|
-
*
|
|
1212
|
-
* <Form {...form}>
|
|
1213
|
-
* <form onSubmit={form.handleSubmit(onSubmit)}>
|
|
1214
|
-
* <FormField
|
|
1215
|
-
* control={form.control}
|
|
1216
|
-
* name="email"
|
|
1217
|
-
* render={({ field }) => (
|
|
1218
|
-
* <FormItem>
|
|
1219
|
-
* <FormLabel>Email</FormLabel>
|
|
1220
|
-
* <FormControl>
|
|
1221
|
-
* <Input placeholder="you@example.com" {...field} />
|
|
1222
|
-
* </FormControl>
|
|
1223
|
-
* <FormDescription>Your work email address.</FormDescription>
|
|
1224
|
-
* <FormMessage />
|
|
1225
|
-
* </FormItem>
|
|
1226
|
-
* )}
|
|
1227
|
-
* />
|
|
1228
|
-
* <Button type="submit">Submit</Button>
|
|
1229
|
-
* </form>
|
|
1230
|
-
* </Form>
|
|
1231
|
-
* ```
|
|
1232
|
-
*/
|
|
1233
|
-
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
|
|
1234
|
-
/** Connects a form field to react-hook-form's Controller and provides field context. */
|
|
1235
|
-
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
|
|
1236
|
-
/**
|
|
1237
|
-
* Hook that returns field state, IDs, and error information for the current form field.
|
|
1238
|
-
* Must be used within a `FormField` component.
|
|
1239
|
-
*/
|
|
1240
|
-
declare const useFormField: () => {
|
|
1241
|
-
invalid: boolean;
|
|
1242
|
-
isDirty: boolean;
|
|
1243
|
-
isTouched: boolean;
|
|
1244
|
-
isValidating: boolean;
|
|
1245
|
-
error?: react_hook_form.FieldError;
|
|
1246
|
-
id: string;
|
|
1247
|
-
name: string;
|
|
1248
|
-
formItemId: string;
|
|
1249
|
-
formDescriptionId: string;
|
|
1250
|
-
formMessageId: string;
|
|
1251
|
-
};
|
|
1252
|
-
/** Container for a single form field, grouping label, control, description, and message. */
|
|
1253
|
-
declare function FormItem({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1254
|
-
/** Label for a form field that turns red on validation error. */
|
|
1255
|
-
declare function FormLabel({ className, ...props }: React$1.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1256
|
-
/** Slot wrapper that wires up aria attributes for the form control. */
|
|
1257
|
-
declare function FormControl({ ...props }: React$1.ComponentProps<typeof Slot>): react_jsx_runtime.JSX.Element;
|
|
1258
|
-
/** Helper text displayed below the form control. */
|
|
1259
|
-
declare function FormDescription({ className, ...props }: React$1.ComponentProps<"p">): react_jsx_runtime.JSX.Element;
|
|
1260
|
-
/** Displays the validation error message for the form field. */
|
|
1261
|
-
declare function FormMessage({ className, ...props }: React$1.ComponentProps<"p">): react_jsx_runtime.JSX.Element | null;
|
|
1262
|
-
|
|
1263
|
-
/**
|
|
1264
|
-
* Hover-activated floating card built on Radix UI HoverCard.
|
|
1265
|
-
*
|
|
1266
|
-
* Displays a preview card when the user hovers over a trigger element.
|
|
1267
|
-
* Ideal for showing user profiles, link previews, or supplementary info
|
|
1268
|
-
* without requiring a click.
|
|
1269
|
-
*
|
|
1270
|
-
* @example
|
|
1271
|
-
* ```tsx
|
|
1272
|
-
* <HoverCard>
|
|
1273
|
-
* <HoverCardTrigger asChild>
|
|
1274
|
-
* <a href="/user/john" className="underline">
|
|
1275
|
-
* @john
|
|
1276
|
-
* </a>
|
|
1277
|
-
* </HoverCardTrigger>
|
|
1278
|
-
* <HoverCardContent>
|
|
1279
|
-
* <div className="flex gap-4">
|
|
1280
|
-
* <Avatar>
|
|
1281
|
-
* <AvatarImage src="/avatars/john.png" />
|
|
1282
|
-
* <AvatarFallback>JD</AvatarFallback>
|
|
1283
|
-
* </Avatar>
|
|
1284
|
-
* <div>
|
|
1285
|
-
* <h4 className="text-sm font-semibold">John Doe</h4>
|
|
1286
|
-
* <p className="text-sm text-muted-foreground">
|
|
1287
|
-
* Software Engineer
|
|
1288
|
-
* </p>
|
|
1289
|
-
* </div>
|
|
1290
|
-
* </div>
|
|
1291
|
-
* </HoverCardContent>
|
|
1292
|
-
* </HoverCard>
|
|
1293
|
-
* ```
|
|
1294
|
-
*/
|
|
1295
|
-
declare function HoverCard({ ...props }: React$1.ComponentProps<typeof HoverCardPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1296
|
-
/** Element that shows the hover card on mouse enter. Use `asChild` to merge into your own element. */
|
|
1297
|
-
declare function HoverCardTrigger({ ...props }: React$1.ComponentProps<typeof HoverCardPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
1298
|
-
/** Floating content panel that appears on hover. */
|
|
1299
|
-
declare function HoverCardContent({ className, align, sideOffset, ...props }: React$1.ComponentProps<typeof HoverCardPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
1300
|
-
|
|
1301
|
-
type Theme = 'light' | 'dark' | 'system';
|
|
1302
|
-
type LocaleCode = string;
|
|
1303
|
-
/**
|
|
1304
|
-
* Map of locale code → display label.
|
|
1305
|
-
* @example { en: 'English', vi: 'Tiếng Việt', ja: '日本語' }
|
|
1306
|
-
*/
|
|
1307
|
-
type LocaleMap = Record<LocaleCode, string>;
|
|
1308
|
-
/** Value shape for translatable fields: locale code → string content. */
|
|
1309
|
-
type TranslatableValue = Record<LocaleCode, string>;
|
|
1310
|
-
/** Locale configuration used by UIProvider and translatable fields. */
|
|
1311
|
-
interface UILocaleConfig {
|
|
1312
|
-
/** Available locales. e.g. `{ en: 'English', vi: 'Tiếng Việt' }` */
|
|
1313
|
-
locales: LocaleMap;
|
|
1314
|
-
/** Locale shown by default when a translatable field is first rendered. */
|
|
1315
|
-
defaultLocale: LocaleCode;
|
|
1316
|
-
/** Locale to fall back to when the active locale has no value. */
|
|
1317
|
-
fallbackLocale: LocaleCode;
|
|
1318
|
-
}
|
|
1319
|
-
/**
|
|
1320
|
-
* `true` — inherit UIProvider's locale config.
|
|
1321
|
-
* `object` — override per-field (merged with provider config).
|
|
1322
|
-
*/
|
|
1323
|
-
type TranslatableConfig = true | Partial<UILocaleConfig>;
|
|
1324
|
-
|
|
1325
|
-
declare const inputVariants: (props?: ({
|
|
1326
|
-
size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
1327
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1328
|
-
type InputSize = VariantProps<typeof inputVariants>['size'];
|
|
1329
|
-
type NativeInputProps = Omit<React$1.ComponentProps<'input'>, 'value' | 'onChange' | 'size'>;
|
|
1330
|
-
interface StandardInputProps extends NativeInputProps {
|
|
1331
|
-
size?: InputSize;
|
|
1332
|
-
/** Translatable mode disabled (default). */
|
|
1333
|
-
translatable?: never;
|
|
1334
|
-
value?: string;
|
|
1335
|
-
onChange?: React$1.ChangeEventHandler<HTMLInputElement>;
|
|
1336
|
-
}
|
|
1337
|
-
interface TranslatableInputProps extends NativeInputProps {
|
|
1338
|
-
size?: InputSize;
|
|
1339
|
-
/**
|
|
1340
|
-
* Enable locale-switching tabs on this input.
|
|
1341
|
-
* - `true` — inherit UIProvider's locale config
|
|
1342
|
-
* - `object` — override locales/defaultLocale/fallbackLocale per field
|
|
1343
|
-
*
|
|
1344
|
-
* @example
|
|
1345
|
-
* ```tsx
|
|
1346
|
-
* // Uses UIProvider config
|
|
1347
|
-
* <Input translatable value={val} onChange={setVal} />
|
|
1348
|
-
*
|
|
1349
|
-
* // Custom per-field config
|
|
1350
|
-
* <Input
|
|
1351
|
-
* translatable={{ locales: { en: 'English', vi: 'Tiếng Việt' }, fallbackLocale: 'en' }}
|
|
1352
|
-
* value={val}
|
|
1353
|
-
* onChange={setVal}
|
|
1354
|
-
* />
|
|
1355
|
-
* ```
|
|
1356
|
-
*/
|
|
1357
|
-
translatable: TranslatableConfig;
|
|
1358
|
-
value?: TranslatableValue;
|
|
1359
|
-
onChange?: (value: TranslatableValue) => void;
|
|
1360
|
-
/**
|
|
1361
|
-
* Per-locale validation errors. Truthy string = that locale is invalid.
|
|
1362
|
-
* The active locale's error is forwarded as `aria-invalid` on the input;
|
|
1363
|
-
* all locale tabs with errors show a red dot indicator.
|
|
1364
|
-
*
|
|
1365
|
-
* @example `{ en: 'Required', vi: 'Too long (120/100)' }`
|
|
1366
|
-
*/
|
|
1367
|
-
errors?: Partial<Record<string, string>>;
|
|
1368
|
-
}
|
|
1369
|
-
type InputProps = StandardInputProps | TranslatableInputProps;
|
|
1370
|
-
/**
|
|
1371
|
-
* Text input component with multiple size variants.
|
|
1372
|
-
* Supports translatable mode via the `translatable` prop.
|
|
1373
|
-
*
|
|
1374
|
-
* **Tokens used** (Phase B foundation — `plans/design-foundations-japanese.md`):
|
|
1375
|
-
* - Heights via `h-element-*` → `--density-element-*` tokens (28/32/36/44 default;
|
|
1376
|
-
* shifts under `[data-density="compact"]` / `"comfortable"` modes)
|
|
1377
|
-
* - `bg-input-background` → `--input-background` (warm off-white per SmartHR)
|
|
1378
|
-
* - `border-input` → `--border` = oklch(86% 0.006 60) (SmartHR BORDER #d6d3d0)
|
|
1379
|
-
* - `rounded-md` → `--radius-md` = 4 px (JP enterprise subtle radius)
|
|
1380
|
-
* - `text-base` → `--text-base` = 14 px / 1.7 line-height (JMDC convergent CJK)
|
|
1381
|
-
* - `aria-invalid` styling reads from `--destructive` = 茜 (NOT pure red)
|
|
1382
|
-
*
|
|
1383
|
-
* Translatable mode (`translatable` prop) wraps the input in `<TranslatableField>`
|
|
1384
|
-
* and renders a locale tab bar above. Per-locale errors via the `errors` prop.
|
|
1385
|
-
*
|
|
1386
|
-
* @example
|
|
1387
|
-
* ```tsx
|
|
1388
|
-
* // Standard
|
|
1389
|
-
* <Input placeholder="Enter text..." />
|
|
1390
|
-
* <Input size="sm" value={val} onChange={(e) => setVal(e.target.value)} />
|
|
1391
|
-
*
|
|
1392
|
-
* // Translatable — uses UIProvider's locale config
|
|
1393
|
-
* <Input translatable value={val} onChange={setVal} />
|
|
1394
|
-
*
|
|
1395
|
-
* // Translatable — custom config
|
|
1396
|
-
* <Input
|
|
1397
|
-
* translatable={{ locales: { en: 'English', vi: 'Tiếng Việt' }, fallbackLocale: 'en' }}
|
|
1398
|
-
* value={val}
|
|
1399
|
-
* onChange={setVal}
|
|
1400
|
-
* />
|
|
1401
|
-
* ```
|
|
1402
|
-
*/
|
|
1403
|
-
declare const Input: React$1.ForwardRefExoticComponent<(Omit<StandardInputProps, "ref"> | Omit<TranslatableInputProps, "ref">) & React$1.RefAttributes<HTMLInputElement>>;
|
|
1404
|
-
|
|
1405
|
-
/**
|
|
1406
|
-
* One-time password input component built on the `input-otp` library.
|
|
1407
|
-
* Renders a segmented input for entering verification codes.
|
|
1408
|
-
*
|
|
1409
|
-
* @example
|
|
1410
|
-
* ```tsx
|
|
1411
|
-
* <InputOTP maxLength={6} value={otp} onChange={setOtp}>
|
|
1412
|
-
* <InputOTPGroup>
|
|
1413
|
-
* <InputOTPSlot index={0} />
|
|
1414
|
-
* <InputOTPSlot index={1} />
|
|
1415
|
-
* <InputOTPSlot index={2} />
|
|
1416
|
-
* </InputOTPGroup>
|
|
1417
|
-
* <InputOTPSeparator />
|
|
1418
|
-
* <InputOTPGroup>
|
|
1419
|
-
* <InputOTPSlot index={3} />
|
|
1420
|
-
* <InputOTPSlot index={4} />
|
|
1421
|
-
* <InputOTPSlot index={5} />
|
|
1422
|
-
* </InputOTPGroup>
|
|
1423
|
-
* </InputOTP>
|
|
1424
|
-
* ```
|
|
1425
|
-
*/
|
|
1426
|
-
declare function InputOTP({ className, containerClassName, ...props }: React$1.ComponentProps<typeof OTPInput> & {
|
|
1427
|
-
containerClassName?: string;
|
|
1428
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1429
|
-
/** Groups adjacent OTP slots together visually. */
|
|
1430
|
-
declare function InputOTPGroup({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1431
|
-
/** Individual character slot within an OTP group. */
|
|
1432
|
-
declare function InputOTPSlot({ index, className, ...props }: React$1.ComponentProps<"div"> & {
|
|
1433
|
-
index: number;
|
|
1434
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1435
|
-
/** Visual separator (dash) between OTP groups. */
|
|
1436
|
-
declare function InputOTPSeparator({ ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1437
|
-
|
|
1438
|
-
type LabelProps = React$1.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;
|
|
1439
|
-
/**
|
|
1440
|
-
* Accessible label for form controls, automatically associated via `htmlFor`.
|
|
1441
|
-
*
|
|
1442
|
-
* @example
|
|
1443
|
-
* ```tsx
|
|
1444
|
-
* // With an input
|
|
1445
|
-
* <Label htmlFor="email">Email address</Label>
|
|
1446
|
-
* <Input id="email" type="email" />
|
|
1447
|
-
*
|
|
1448
|
-
* // Disabled state (responds to group/peer disabled)
|
|
1449
|
-
* <Label htmlFor="name">Name</Label>
|
|
1450
|
-
* ```
|
|
1451
|
-
*/
|
|
1452
|
-
declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & React$1.RefAttributes<HTMLLabelElement>>;
|
|
1453
|
-
|
|
1454
|
-
/**
|
|
1455
|
-
* Horizontal menu bar component built on Radix UI Menubar.
|
|
1456
|
-
*
|
|
1457
|
-
* Provides a desktop-style menu bar with multiple dropdown menus.
|
|
1458
|
-
* Each menu is defined by a `MenubarMenu` containing a `MenubarTrigger`
|
|
1459
|
-
* and `MenubarContent` with items.
|
|
1460
|
-
*
|
|
1461
|
-
* **When to use:** macOS / desktop-app style menu bar where File / Edit /
|
|
1462
|
-
* View / Help live as siblings at the top of the app chrome. Rare in modern
|
|
1463
|
-
* web apps. For action menus on individual UI elements use `<DropdownMenu>`.
|
|
1464
|
-
* For website / app-router navigation use `<NavigationMenu>`. Pick this only
|
|
1465
|
-
* when the product mimics a native desktop app (rich text editors, IDEs,
|
|
1466
|
-
* canvas tools).
|
|
1467
|
-
*
|
|
1468
|
-
* @example
|
|
1469
|
-
* ```tsx
|
|
1470
|
-
* <Menubar>
|
|
1471
|
-
* <MenubarMenu>
|
|
1472
|
-
* <MenubarTrigger>File</MenubarTrigger>
|
|
1473
|
-
* <MenubarContent>
|
|
1474
|
-
* <MenubarItem>
|
|
1475
|
-
* New Tab
|
|
1476
|
-
* <MenubarShortcut>Ctrl+T</MenubarShortcut>
|
|
1477
|
-
* </MenubarItem>
|
|
1478
|
-
* <MenubarItem>New Window</MenubarItem>
|
|
1479
|
-
* <MenubarSeparator />
|
|
1480
|
-
* <MenubarSub>
|
|
1481
|
-
* <MenubarSubTrigger>Share</MenubarSubTrigger>
|
|
1482
|
-
* <MenubarSubContent>
|
|
1483
|
-
* <MenubarItem>Email Link</MenubarItem>
|
|
1484
|
-
* <MenubarItem>Messages</MenubarItem>
|
|
1485
|
-
* </MenubarSubContent>
|
|
1486
|
-
* </MenubarSub>
|
|
1487
|
-
* </MenubarContent>
|
|
1488
|
-
* </MenubarMenu>
|
|
1489
|
-
* <MenubarMenu>
|
|
1490
|
-
* <MenubarTrigger>Edit</MenubarTrigger>
|
|
1491
|
-
* <MenubarContent>
|
|
1492
|
-
* <MenubarItem>Undo</MenubarItem>
|
|
1493
|
-
* <MenubarItem>Redo</MenubarItem>
|
|
1494
|
-
* </MenubarContent>
|
|
1495
|
-
* </MenubarMenu>
|
|
1496
|
-
* </Menubar>
|
|
1497
|
-
* ```
|
|
1498
|
-
*/
|
|
1499
|
-
declare function Menubar({ className, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1500
|
-
/** Wraps a single menu within the menu bar, containing a trigger and content. */
|
|
1501
|
-
declare function MenubarMenu({ ...props }: React$1.ComponentProps<typeof MenubarPrimitive.Menu>): react_jsx_runtime.JSX.Element;
|
|
1502
|
-
/** Groups related menubar items together for accessibility. */
|
|
1503
|
-
declare function MenubarGroup({ ...props }: React$1.ComponentProps<typeof MenubarPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
1504
|
-
/** Portal that renders menubar content outside the DOM hierarchy. */
|
|
1505
|
-
declare function MenubarPortal({ ...props }: React$1.ComponentProps<typeof MenubarPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
1506
|
-
/** Container for radio menubar items where only one can be selected at a time. */
|
|
1507
|
-
declare function MenubarRadioGroup({ ...props }: React$1.ComponentProps<typeof MenubarPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
1508
|
-
/** Button label in the menu bar that opens its associated dropdown content on click. */
|
|
1509
|
-
declare function MenubarTrigger({ className, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
1510
|
-
/** Floating container for menubar items, positioned below the trigger. */
|
|
1511
|
-
declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
1512
|
-
/** Actionable menu item. Set `variant="destructive"` for dangerous actions, `inset` for left-padding alignment. */
|
|
1513
|
-
declare function MenubarItem({ className, inset, variant, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.Item> & {
|
|
1514
|
-
inset?: boolean;
|
|
1515
|
-
variant?: "default" | "destructive";
|
|
1516
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1517
|
-
/** Menu item with a checkbox indicator for toggling options. */
|
|
1518
|
-
declare function MenubarCheckboxItem({ className, children, checked, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
1519
|
-
/** Menu item with a radio indicator for single-selection groups. */
|
|
1520
|
-
declare function MenubarRadioItem({ className, children, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
1521
|
-
/** Non-interactive label used to title a group of menu items. */
|
|
1522
|
-
declare function MenubarLabel({ className, inset, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.Label> & {
|
|
1523
|
-
inset?: boolean;
|
|
1524
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1525
|
-
/** Visual divider between groups of menu items. */
|
|
1526
|
-
declare function MenubarSeparator({ className, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
1527
|
-
/** Keyboard shortcut hint displayed at the end of a menu item. */
|
|
1528
|
-
declare function MenubarShortcut({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
1529
|
-
/** Container for a nested sub-menu within the menubar. */
|
|
1530
|
-
declare function MenubarSub({ ...props }: React$1.ComponentProps<typeof MenubarPrimitive.Sub>): react_jsx_runtime.JSX.Element;
|
|
1531
|
-
/** Menu item that opens a sub-menu on hover. Displays a chevron indicator. */
|
|
1532
|
-
declare function MenubarSubTrigger({ className, inset, children, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
|
|
1533
|
-
inset?: boolean;
|
|
1534
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1535
|
-
/** Floating container for sub-menu items. */
|
|
1536
|
-
declare function MenubarSubContent({ className, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
1537
|
-
|
|
1538
|
-
/**
|
|
1539
|
-
* Accessible navigation menu built on Radix UI NavigationMenu.
|
|
1540
|
-
*
|
|
1541
|
-
* Provides a horizontal navigation bar with dropdown content panels,
|
|
1542
|
-
* suitable for site-wide navigation with rich sub-menus. Set `viewport={false}`
|
|
1543
|
-
* to render content inline instead of in a shared viewport container.
|
|
1544
|
-
*
|
|
1545
|
-
* **When to use:** site or app primary navigation header with rich submenu
|
|
1546
|
-
* content (mega menus, marketing site nav, dashboard top-nav). For action
|
|
1547
|
-
* menus on individual UI elements use `<DropdownMenu>`. For desktop-app
|
|
1548
|
-
* style menu bars (File / Edit / View) use `<Menubar>`. For sidebar
|
|
1549
|
-
* navigation use `<Sidebar>`.
|
|
1550
|
-
*
|
|
1551
|
-
* @example
|
|
1552
|
-
* ```tsx
|
|
1553
|
-
* <NavigationMenu>
|
|
1554
|
-
* <NavigationMenuList>
|
|
1555
|
-
* <NavigationMenuItem>
|
|
1556
|
-
* <NavigationMenuTrigger>Getting Started</NavigationMenuTrigger>
|
|
1557
|
-
* <NavigationMenuContent>
|
|
1558
|
-
* <ul className="grid gap-3 p-4 w-[400px]">
|
|
1559
|
-
* <li>
|
|
1560
|
-
* <NavigationMenuLink href="/docs">
|
|
1561
|
-
* <div className="font-medium">Introduction</div>
|
|
1562
|
-
* <p className="text-muted-foreground">
|
|
1563
|
-
* Learn the basics of the component library.
|
|
1564
|
-
* </p>
|
|
1565
|
-
* </NavigationMenuLink>
|
|
1566
|
-
* </li>
|
|
1567
|
-
* </ul>
|
|
1568
|
-
* </NavigationMenuContent>
|
|
1569
|
-
* </NavigationMenuItem>
|
|
1570
|
-
* <NavigationMenuItem>
|
|
1571
|
-
* <NavigationMenuLink
|
|
1572
|
-
* className={navigationMenuTriggerStyle()}
|
|
1573
|
-
* href="/docs"
|
|
1574
|
-
* >
|
|
1575
|
-
* Documentation
|
|
1576
|
-
* </NavigationMenuLink>
|
|
1577
|
-
* </NavigationMenuItem>
|
|
1578
|
-
* </NavigationMenuList>
|
|
1579
|
-
* </NavigationMenu>
|
|
1580
|
-
* ```
|
|
1581
|
-
*/
|
|
1582
|
-
declare function NavigationMenu({ className, children, viewport, ...props }: React$1.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
1583
|
-
viewport?: boolean;
|
|
1584
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1585
|
-
/** Horizontal list container for navigation menu items. */
|
|
1586
|
-
declare function NavigationMenuList({ className, ...props }: React$1.ComponentProps<typeof NavigationMenuPrimitive.List>): react_jsx_runtime.JSX.Element;
|
|
1587
|
-
/** Individual navigation menu item that can contain a trigger and content or a direct link. */
|
|
1588
|
-
declare function NavigationMenuItem({ className, ...props }: React$1.ComponentProps<typeof NavigationMenuPrimitive.Item>): react_jsx_runtime.JSX.Element;
|
|
1589
|
-
/** Shared style variant for navigation menu trigger buttons and standalone links. Apply with `className={navigationMenuTriggerStyle()}`. */
|
|
1590
|
-
declare const navigationMenuTriggerStyle: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
1591
|
-
/** Button that opens the associated NavigationMenuContent dropdown. Displays a chevron indicator. */
|
|
1592
|
-
declare function NavigationMenuTrigger({ className, children, ...props }: React$1.ComponentProps<typeof NavigationMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
1593
|
-
/** Dropdown content panel revealed when a NavigationMenuTrigger is activated. */
|
|
1594
|
-
declare function NavigationMenuContent({ className, ...props }: React$1.ComponentProps<typeof NavigationMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
1595
|
-
/** Shared viewport container that displays the active NavigationMenuContent with animated transitions. */
|
|
1596
|
-
declare function NavigationMenuViewport({ className, ...props }: React$1.ComponentProps<typeof NavigationMenuPrimitive.Viewport>): react_jsx_runtime.JSX.Element;
|
|
1597
|
-
/** Accessible link element within navigation menu content. Supports `data-[active=true]` styling. */
|
|
1598
|
-
declare function NavigationMenuLink({ className, ...props }: React$1.ComponentProps<typeof NavigationMenuPrimitive.Link>): react_jsx_runtime.JSX.Element;
|
|
1599
|
-
/** Animated arrow indicator that tracks the active menu trigger position. */
|
|
1600
|
-
declare function NavigationMenuIndicator({ className, ...props }: React$1.ComponentProps<typeof NavigationMenuPrimitive.Indicator>): react_jsx_runtime.JSX.Element;
|
|
1601
|
-
|
|
1602
|
-
interface PageContainerProps {
|
|
1603
|
-
/**
|
|
1604
|
-
* Page title
|
|
1605
|
-
*/
|
|
1606
|
-
title?: string;
|
|
1607
|
-
/**
|
|
1608
|
-
* Subtitle or description below title
|
|
1609
|
-
*/
|
|
1610
|
-
subtitle?: string;
|
|
1611
|
-
/**
|
|
1612
|
-
* Extra content (buttons, actions) displayed on the right side of header
|
|
1613
|
-
*/
|
|
1614
|
-
extra?: ReactNode;
|
|
1615
|
-
/**
|
|
1616
|
-
* Main page content
|
|
1617
|
-
*/
|
|
1618
|
-
children: ReactNode;
|
|
1619
|
-
/**
|
|
1620
|
-
* Footer content displayed at the bottom
|
|
1621
|
-
*/
|
|
1622
|
-
footer?: ReactNode;
|
|
1623
|
-
/**
|
|
1624
|
-
* Sidebar content displayed on left or right
|
|
1625
|
-
*/
|
|
1626
|
-
sidebar?: ReactNode;
|
|
1627
|
-
/**
|
|
1628
|
-
* Sidebar position
|
|
1629
|
-
* @default 'right'
|
|
1630
|
-
*/
|
|
1631
|
-
sidebarPosition?: 'left' | 'right';
|
|
1632
|
-
/**
|
|
1633
|
-
* Sidebar width
|
|
1634
|
-
* @default 'w-80'
|
|
1635
|
-
*/
|
|
1636
|
-
sidebarWidth?: string;
|
|
1637
|
-
/**
|
|
1638
|
-
* Layout variant
|
|
1639
|
-
* - 'standard': Default padded layout with header
|
|
1640
|
-
* - 'full': Full width, no padding (for boards, gantt)
|
|
1641
|
-
* - 'split': Layout with sidebar inside page
|
|
1642
|
-
* @default 'standard'
|
|
1643
|
-
*/
|
|
1644
|
-
variant?: 'standard' | 'full' | 'split';
|
|
1645
|
-
/**
|
|
1646
|
-
* Custom container className
|
|
1647
|
-
*/
|
|
1648
|
-
className?: string;
|
|
1649
|
-
/**
|
|
1650
|
-
* Custom content className
|
|
1651
|
-
*/
|
|
1652
|
-
contentClassName?: string;
|
|
1653
|
-
/**
|
|
1654
|
-
* Show separator below header
|
|
1655
|
-
* @default true for standard variant
|
|
1656
|
-
*/
|
|
1657
|
-
showHeaderSeparator?: boolean;
|
|
1658
|
-
}
|
|
1659
|
-
/**
|
|
1660
|
-
* PageContainer - Flexible page layout component
|
|
1661
|
-
*
|
|
1662
|
-
* @example
|
|
1663
|
-
* // Standard layout with title and actions
|
|
1664
|
-
* <PageContainer
|
|
1665
|
-
* title="Dashboard"
|
|
1666
|
-
* subtitle="Overview of all projects"
|
|
1667
|
-
* extra={<Button>Create</Button>}
|
|
1668
|
-
* >
|
|
1669
|
-
* <div>Content here</div>
|
|
1670
|
-
* </PageContainer>
|
|
1671
|
-
*
|
|
1672
|
-
* @example
|
|
1673
|
-
* // Split layout with right sidebar
|
|
1674
|
-
* <PageContainer
|
|
1675
|
-
* title="Task Detail"
|
|
1676
|
-
* variant="split"
|
|
1677
|
-
* sidebar={<CommentSection />}
|
|
1678
|
-
* sidebarPosition="right"
|
|
1679
|
-
* >
|
|
1680
|
-
* <div>Main content</div>
|
|
1681
|
-
* </PageContainer>
|
|
1682
|
-
*
|
|
1683
|
-
* @example
|
|
1684
|
-
* // Full width layout (no padding)
|
|
1685
|
-
* <PageContainer variant="full">
|
|
1686
|
-
* <KanbanBoard />
|
|
1687
|
-
* </PageContainer>
|
|
1688
|
-
*/
|
|
1689
|
-
declare function PageContainer({ title, subtitle, extra, children, footer, sidebar, sidebarPosition, sidebarWidth, variant, className, contentClassName, showHeaderSeparator, }: PageContainerProps): react_jsx_runtime.JSX.Element;
|
|
1690
|
-
declare function StandardPageContainer(props: Omit<PageContainerProps, 'variant'>): react_jsx_runtime.JSX.Element;
|
|
1691
|
-
declare function SplitPageContainer(props: Omit<PageContainerProps, 'variant'>): react_jsx_runtime.JSX.Element;
|
|
1692
|
-
declare function FullWidthPageContainer(props: Omit<PageContainerProps, 'variant' | 'title' | 'subtitle' | 'extra'>): react_jsx_runtime.JSX.Element;
|
|
1693
|
-
|
|
1694
|
-
/**
|
|
1695
|
-
* Page navigation component with numbered links, previous/next buttons, and ellipsis indicators.
|
|
1696
|
-
*
|
|
1697
|
-
* Renders as a `<nav>` with `aria-label="pagination"` for accessibility.
|
|
1698
|
-
* Compose with `PaginationContent`, `PaginationItem`, `PaginationLink`,
|
|
1699
|
-
* `PaginationPrevious`, `PaginationNext`, and `PaginationEllipsis`.
|
|
1700
|
-
*
|
|
1701
|
-
* @example
|
|
1702
|
-
* ```tsx
|
|
1703
|
-
* <Pagination>
|
|
1704
|
-
* <PaginationContent>
|
|
1705
|
-
* <PaginationItem>
|
|
1706
|
-
* <PaginationPrevious href="#" />
|
|
1707
|
-
* </PaginationItem>
|
|
1708
|
-
* <PaginationItem>
|
|
1709
|
-
* <PaginationLink href="#" isActive>1</PaginationLink>
|
|
1710
|
-
* </PaginationItem>
|
|
1711
|
-
* <PaginationItem>
|
|
1712
|
-
* <PaginationLink href="#">2</PaginationLink>
|
|
1713
|
-
* </PaginationItem>
|
|
1714
|
-
* <PaginationItem>
|
|
1715
|
-
* <PaginationEllipsis />
|
|
1716
|
-
* </PaginationItem>
|
|
1717
|
-
* <PaginationItem>
|
|
1718
|
-
* <PaginationLink href="#">10</PaginationLink>
|
|
1719
|
-
* </PaginationItem>
|
|
1720
|
-
* <PaginationItem>
|
|
1721
|
-
* <PaginationNext href="#" />
|
|
1722
|
-
* </PaginationItem>
|
|
1723
|
-
* </PaginationContent>
|
|
1724
|
-
* </Pagination>
|
|
1725
|
-
* ```
|
|
1726
|
-
*/
|
|
1727
|
-
declare function Pagination({ className, ...props }: React$1.ComponentProps<"nav">): react_jsx_runtime.JSX.Element;
|
|
1728
|
-
/** Flex container for pagination items. Renders as a `<ul>`. */
|
|
1729
|
-
declare function PaginationContent({ className, ...props }: React$1.ComponentProps<"ul">): react_jsx_runtime.JSX.Element;
|
|
1730
|
-
/** List item wrapper for a single pagination element. */
|
|
1731
|
-
declare function PaginationItem({ ...props }: React$1.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
|
|
1732
|
-
type PaginationLinkProps = {
|
|
1733
|
-
/** When true, renders the link with an `outline` variant and `aria-current="page"`. */
|
|
1734
|
-
isActive?: boolean;
|
|
1735
|
-
} & Pick<React$1.ComponentProps<typeof Button>, "size"> & React$1.ComponentProps<"a">;
|
|
1736
|
-
/** Styled pagination link using button variants. Supports `isActive` for the current page. */
|
|
1737
|
-
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): react_jsx_runtime.JSX.Element;
|
|
1738
|
-
/** "Previous" pagination link with a left chevron icon. */
|
|
1739
|
-
declare function PaginationPrevious({ className, ...props }: React$1.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
|
|
1740
|
-
/** "Next" pagination link with a right chevron icon. */
|
|
1741
|
-
declare function PaginationNext({ className, ...props }: React$1.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
|
|
1742
|
-
/** Ellipsis indicator for omitted page numbers. Renders a `MoreHorizontal` icon with screen-reader text. */
|
|
1743
|
-
declare function PaginationEllipsis({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
1744
|
-
|
|
1745
|
-
interface PasswordInputProps extends Omit<React$1.ComponentProps<"input">, "type" | "size">, VariantProps<typeof inputVariants> {
|
|
1746
|
-
/**
|
|
1747
|
-
* Single-string validation error. When set, the inner input gets
|
|
1748
|
-
* `aria-invalid` and a red error message is rendered below.
|
|
1749
|
-
*/
|
|
1750
|
-
error?: string;
|
|
1751
|
-
}
|
|
1752
|
-
/**
|
|
1753
|
-
* Password input with a built-in show/hide toggle button.
|
|
1754
|
-
*
|
|
1755
|
-
* Extends native `<input>` (minus `type` which is managed internally).
|
|
1756
|
-
* Shares the same size variants as `Input`.
|
|
1757
|
-
*
|
|
1758
|
-
* @example
|
|
1759
|
-
* ```tsx
|
|
1760
|
-
* // Default size
|
|
1761
|
-
* <PasswordInput placeholder="Enter password" />
|
|
1762
|
-
*
|
|
1763
|
-
* // Sizes: xs (24px) | sm (28px) | default (32px) | lg (36px) | xl (44px)
|
|
1764
|
-
* <PasswordInput size="xl" placeholder="Password" />
|
|
1765
|
-
*
|
|
1766
|
-
* // Controlled
|
|
1767
|
-
* <PasswordInput
|
|
1768
|
-
* value={password}
|
|
1769
|
-
* onChange={(e) => setPassword(e.target.value)}
|
|
1770
|
-
* placeholder="Password"
|
|
1771
|
-
* />
|
|
1772
|
-
* ```
|
|
1773
|
-
*/
|
|
1774
|
-
declare const PasswordInput: React$1.ForwardRefExoticComponent<Omit<PasswordInputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
1775
|
-
|
|
1776
|
-
/**
|
|
1777
|
-
* Floating popover component built on Radix UI Popover.
|
|
1778
|
-
*
|
|
1779
|
-
* Displays rich content in a floating panel anchored to a trigger element.
|
|
1780
|
-
* Supports controlled (`open`/`onOpenChange`) and uncontrolled usage.
|
|
1781
|
-
* Content is portaled and positioned automatically.
|
|
1782
|
-
*
|
|
1783
|
-
* @example
|
|
1784
|
-
* ```tsx
|
|
1785
|
-
* <Popover>
|
|
1786
|
-
* <PopoverTrigger asChild>
|
|
1787
|
-
* <Button variant="outline">Open Popover</Button>
|
|
1788
|
-
* </PopoverTrigger>
|
|
1789
|
-
* <PopoverContent>
|
|
1790
|
-
* <div className="space-y-2">
|
|
1791
|
-
* <h4 className="font-medium text-sm">Dimensions</h4>
|
|
1792
|
-
* <p className="text-sm text-muted-foreground">
|
|
1793
|
-
* Set the dimensions for the layer.
|
|
1794
|
-
* </p>
|
|
1795
|
-
* </div>
|
|
1796
|
-
* </PopoverContent>
|
|
1797
|
-
* </Popover>
|
|
1798
|
-
* ```
|
|
1799
|
-
*/
|
|
1800
|
-
declare function Popover({ ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1801
|
-
/** Element that toggles the popover when clicked. Use `asChild` to merge into your own button. */
|
|
1802
|
-
declare function PopoverTrigger({ ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
1803
|
-
/** Floating content panel positioned relative to the trigger. */
|
|
1804
|
-
declare function PopoverContent({ className, align, sideOffset, ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
1805
|
-
/** Custom anchor element for positioning the popover content relative to a different element than the trigger. */
|
|
1806
|
-
declare function PopoverAnchor({ ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Anchor>): react_jsx_runtime.JSX.Element;
|
|
1807
|
-
|
|
1808
|
-
type ProgressProps = React$1.ComponentProps<typeof ProgressPrimitive.Root>;
|
|
1809
|
-
/**
|
|
1810
|
-
* Horizontal bar that indicates the completion progress of a task or operation.
|
|
1811
|
-
*
|
|
1812
|
-
* @example
|
|
1813
|
-
* ```tsx
|
|
1814
|
-
* // Basic usage (65% complete)
|
|
1815
|
-
* <Progress value={65} />
|
|
1816
|
-
*
|
|
1817
|
-
* // With custom styling
|
|
1818
|
-
* <Progress value={40} className="h-3" />
|
|
1819
|
-
* ```
|
|
1820
|
-
*/
|
|
1821
|
-
declare function Progress({ className, value, ...props }: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
1822
|
-
|
|
1823
|
-
type RadioGroupProps = React$1.ComponentProps<typeof RadioGroupPrimitive.Root>;
|
|
1824
|
-
/**
|
|
1825
|
-
* Container for a set of mutually exclusive radio options.
|
|
1826
|
-
* Use with {@link RadioGroupItem} to build single-selection groups.
|
|
1827
|
-
*
|
|
1828
|
-
* @example
|
|
1829
|
-
* ```tsx
|
|
1830
|
-
* <RadioGroup defaultValue="option-1">
|
|
1831
|
-
* <div className="flex items-center gap-2">
|
|
1832
|
-
* <RadioGroupItem value="option-1" id="opt1" />
|
|
1833
|
-
* <Label htmlFor="opt1">Option 1</Label>
|
|
1834
|
-
* </div>
|
|
1835
|
-
* <div className="flex items-center gap-2">
|
|
1836
|
-
* <RadioGroupItem value="option-2" id="opt2" />
|
|
1837
|
-
* <Label htmlFor="opt2">Option 2</Label>
|
|
1838
|
-
* </div>
|
|
1839
|
-
* </RadioGroup>
|
|
1840
|
-
* ```
|
|
1841
|
-
*/
|
|
1842
|
-
declare function RadioGroup({ className, ...props }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
1843
|
-
type RadioGroupItemProps = React$1.ComponentProps<typeof RadioGroupPrimitive.Item>;
|
|
1844
|
-
/**
|
|
1845
|
-
* Individual radio option within a {@link RadioGroup}.
|
|
1846
|
-
* Renders as a circular indicator that fills when selected.
|
|
1847
|
-
*
|
|
1848
|
-
* @example
|
|
1849
|
-
* ```tsx
|
|
1850
|
-
* <RadioGroupItem value="dark" id="theme-dark" />
|
|
1851
|
-
* <Label htmlFor="theme-dark">Dark mode</Label>
|
|
1852
|
-
* ```
|
|
1853
|
-
*/
|
|
1854
|
-
declare function RadioGroupItem({ className, ...props }: RadioGroupItemProps): react_jsx_runtime.JSX.Element;
|
|
1855
|
-
|
|
1856
|
-
interface RatingProps {
|
|
1857
|
-
/** Current rating value (e.g., `3` or `3.5` with half stars). */
|
|
1858
|
-
value?: number;
|
|
1859
|
-
/** Callback fired when the user clicks a star. Receives the new rating number. */
|
|
1860
|
-
onChange?: (value: number) => void;
|
|
1861
|
-
/** Maximum number of stars. Defaults to `5`. */
|
|
1862
|
-
max?: number;
|
|
1863
|
-
/** Size of the star icons. Defaults to `"md"`. */
|
|
1864
|
-
size?: "sm" | "md" | "lg";
|
|
1865
|
-
/** Whether the rating is display-only (non-interactive). Defaults to `false`. */
|
|
1866
|
-
readonly?: boolean;
|
|
1867
|
-
/** Whether half-star ratings are enabled. Defaults to `false`. */
|
|
1868
|
-
allowHalf?: boolean;
|
|
1869
|
-
/** Additional CSS class for the outer container. */
|
|
1870
|
-
className?: string;
|
|
1871
|
-
}
|
|
1872
|
-
/**
|
|
1873
|
-
* Star rating component with hover preview and optional half-star support.
|
|
1874
|
-
* Shows filled/empty/half star icons and displays the numeric value beside the stars.
|
|
1875
|
-
*
|
|
1876
|
-
* @example
|
|
1877
|
-
* ```tsx
|
|
1878
|
-
* const [rating, setRating] = useState(0);
|
|
1879
|
-
*
|
|
1880
|
-
* <Rating value={rating} onChange={setRating} max={5} />
|
|
1881
|
-
*
|
|
1882
|
-
* // Read-only display with half stars:
|
|
1883
|
-
* <Rating value={3.5} readonly allowHalf />
|
|
1884
|
-
* ```
|
|
1885
|
-
*/
|
|
1886
|
-
declare function Rating({ value, onChange, max, size, readonly, allowHalf, className, }: RatingProps): react_jsx_runtime.JSX.Element;
|
|
1887
|
-
|
|
1888
|
-
/**
|
|
1889
|
-
* Resizable panel layout built on `react-resizable-panels`.
|
|
1890
|
-
*
|
|
1891
|
-
* Groups multiple `ResizablePanel` components separated by `ResizableHandle` drag handles.
|
|
1892
|
-
* Supports horizontal (default) and vertical layouts via the `direction` prop.
|
|
1893
|
-
*
|
|
1894
|
-
* @example
|
|
1895
|
-
* ```tsx
|
|
1896
|
-
* <ResizablePanelGroup direction="horizontal">
|
|
1897
|
-
* <ResizablePanel defaultSize={50}>
|
|
1898
|
-
* <div className="p-4">Left panel</div>
|
|
1899
|
-
* </ResizablePanel>
|
|
1900
|
-
* <ResizableHandle withHandle />
|
|
1901
|
-
* <ResizablePanel defaultSize={50}>
|
|
1902
|
-
* <div className="p-4">Right panel</div>
|
|
1903
|
-
* </ResizablePanel>
|
|
1904
|
-
* </ResizablePanelGroup>
|
|
1905
|
-
* ```
|
|
1906
|
-
*/
|
|
1907
|
-
declare function ResizablePanelGroup({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>): react_jsx_runtime.JSX.Element;
|
|
1908
|
-
/** Individual resizable panel. Use `defaultSize` (percentage) to set the initial width/height. */
|
|
1909
|
-
declare function ResizablePanel({ ...props }: React$1.ComponentProps<typeof ResizablePrimitive.Panel>): react_jsx_runtime.JSX.Element;
|
|
1910
|
-
/**
|
|
1911
|
-
* Draggable handle between resizable panels.
|
|
1912
|
-
*
|
|
1913
|
-
* @param withHandle - When true, renders a visible grip icon on the handle for better discoverability.
|
|
1914
|
-
*/
|
|
1915
|
-
declare function ResizableHandle({ withHandle, className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
1916
|
-
withHandle?: boolean;
|
|
1917
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1918
|
-
|
|
1919
|
-
/**
|
|
1920
|
-
* Custom scrollable container with styled scrollbar built on Radix ScrollArea.
|
|
1921
|
-
*
|
|
1922
|
-
* Replaces native browser scrollbars with a thin, themed scrollbar.
|
|
1923
|
-
* Includes a vertical `ScrollBar` by default. Add a horizontal `ScrollBar`
|
|
1924
|
-
* as a child if needed.
|
|
1925
|
-
*
|
|
1926
|
-
* @example
|
|
1927
|
-
* ```tsx
|
|
1928
|
-
* <ScrollArea className="h-72 w-48 rounded-md border">
|
|
1929
|
-
* <div className="p-4">
|
|
1930
|
-
* {items.map((item) => (
|
|
1931
|
-
* <div key={item} className="py-2 text-sm">
|
|
1932
|
-
* {item}
|
|
1933
|
-
* </div>
|
|
1934
|
-
* ))}
|
|
1935
|
-
* </div>
|
|
1936
|
-
* </ScrollArea>
|
|
1937
|
-
* ```
|
|
1938
|
-
*/
|
|
1939
|
-
declare function ScrollArea({ className, children, ...props }: React$1.ComponentProps<typeof ScrollAreaPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1940
|
-
/** Styled scrollbar track and thumb. Set `orientation` to `"horizontal"` or `"vertical"` (default). */
|
|
1941
|
-
declare function ScrollBar({ className, orientation, ...props }: React$1.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
|
|
1942
|
-
|
|
1943
|
-
/**
|
|
1944
|
-
* Select dropdown component built on Radix UI Select.
|
|
1945
|
-
* Provides a styled, accessible dropdown for selecting a single value from a list.
|
|
1946
|
-
*
|
|
1947
|
-
* @example
|
|
1948
|
-
* ```tsx
|
|
1949
|
-
* <Select value={value} onValueChange={setValue}>
|
|
1950
|
-
* <SelectTrigger>
|
|
1951
|
-
* <SelectValue placeholder="Choose..." />
|
|
1952
|
-
* </SelectTrigger>
|
|
1953
|
-
* <SelectContent>
|
|
1954
|
-
* <SelectGroup>
|
|
1955
|
-
* <SelectLabel>Fruits</SelectLabel>
|
|
1956
|
-
* <SelectItem value="apple">Apple</SelectItem>
|
|
1957
|
-
* <SelectItem value="banana">Banana</SelectItem>
|
|
1958
|
-
* </SelectGroup>
|
|
1959
|
-
* <SelectSeparator />
|
|
1960
|
-
* <SelectGroup>
|
|
1961
|
-
* <SelectLabel>Vegetables</SelectLabel>
|
|
1962
|
-
* <SelectItem value="carrot">Carrot</SelectItem>
|
|
1963
|
-
* </SelectGroup>
|
|
1964
|
-
* </SelectContent>
|
|
1965
|
-
* </Select>
|
|
1966
|
-
* ```
|
|
1967
|
-
*/
|
|
1968
|
-
declare function Select({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1969
|
-
/** Groups related select items under an optional label. */
|
|
1970
|
-
declare function SelectGroup({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
1971
|
-
/** Displays the currently selected value or a placeholder. */
|
|
1972
|
-
declare function SelectValue({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Value>): react_jsx_runtime.JSX.Element;
|
|
1973
|
-
/** Button that toggles the select dropdown open/closed. */
|
|
1974
|
-
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
1975
|
-
size?: "sm" | "default";
|
|
1976
|
-
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1977
|
-
/** Dropdown content container rendered in a portal. */
|
|
1978
|
-
declare function SelectContent({ className, children, position, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
1979
|
-
/** Non-interactive label rendered inside a SelectGroup. */
|
|
1980
|
-
declare function SelectLabel({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Label>): react_jsx_runtime.JSX.Element;
|
|
1981
|
-
/** A selectable option within the dropdown. */
|
|
1982
|
-
declare function SelectItem({ className, children, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Item>): react_jsx_runtime.JSX.Element;
|
|
1983
|
-
/** Visual separator between select groups or items. */
|
|
1984
|
-
declare function SelectSeparator({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
1985
|
-
/** Scroll-up indicator shown when the list is scrollable. */
|
|
1986
|
-
declare function SelectScrollUpButton({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): react_jsx_runtime.JSX.Element;
|
|
1987
|
-
/** Scroll-down indicator shown when the list is scrollable. */
|
|
1988
|
-
declare function SelectScrollDownButton({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): react_jsx_runtime.JSX.Element;
|
|
1989
|
-
|
|
1990
|
-
type SeparatorProps = React$1.ComponentProps<typeof SeparatorPrimitive.Root>;
|
|
1991
|
-
/**
|
|
1992
|
-
* Visual divider between content sections, rendered as a horizontal or vertical line.
|
|
1993
|
-
*
|
|
1994
|
-
* @example
|
|
1995
|
-
* ```tsx
|
|
1996
|
-
* // Horizontal (default)
|
|
1997
|
-
* <Separator />
|
|
1998
|
-
*
|
|
1999
|
-
* // Vertical divider in a flex row
|
|
2000
|
-
* <div className="flex items-center gap-4">
|
|
2001
|
-
* <span>Left</span>
|
|
2002
|
-
* <Separator orientation="vertical" className="h-4" />
|
|
2003
|
-
* <span>Right</span>
|
|
2004
|
-
* </div>
|
|
2005
|
-
* ```
|
|
2006
|
-
*/
|
|
2007
|
-
declare function Separator({ className, orientation, decorative, ...props }: SeparatorProps): react_jsx_runtime.JSX.Element;
|
|
2008
|
-
|
|
2009
|
-
/**
|
|
2010
|
-
* Slide-out panel component built on Radix UI Dialog.
|
|
2011
|
-
*
|
|
2012
|
-
* A sheet slides in from the edge of the screen, ideal for navigation,
|
|
2013
|
-
* filters, or supplementary content. Supports `top`, `right`, `bottom`,
|
|
2014
|
-
* and `left` sides via the `side` prop on `SheetContent`.
|
|
2015
|
-
*
|
|
2016
|
-
* **When to use:** desktop-first side-rail content — secondary navigation,
|
|
2017
|
-
* filter panels, settings drawers, item details. No swipe affordance, click
|
|
2018
|
-
* overlay or Escape dismisses. For mobile-first touch UX with swipe use
|
|
2019
|
-
* `<Drawer>`. For centered modal dialogs use `<Dialog>`. For destructive
|
|
2020
|
-
* confirmations use `<AlertDialog>`.
|
|
2021
|
-
*
|
|
2022
|
-
* @example
|
|
2023
|
-
* ```tsx
|
|
2024
|
-
* <Sheet open={open} onOpenChange={setOpen}>
|
|
2025
|
-
* <SheetTrigger asChild>
|
|
2026
|
-
* <Button variant="outline">Open Sheet</Button>
|
|
2027
|
-
* </SheetTrigger>
|
|
2028
|
-
* <SheetContent side="right">
|
|
2029
|
-
* <SheetHeader>
|
|
2030
|
-
* <SheetTitle>Settings</SheetTitle>
|
|
2031
|
-
* <SheetDescription>
|
|
2032
|
-
* Adjust your preferences below.
|
|
2033
|
-
* </SheetDescription>
|
|
2034
|
-
* </SheetHeader>
|
|
2035
|
-
* <div className="p-4">Content here</div>
|
|
2036
|
-
* <SheetFooter>
|
|
2037
|
-
* <Button onClick={() => setOpen(false)}>Done</Button>
|
|
2038
|
-
* </SheetFooter>
|
|
2039
|
-
* </SheetContent>
|
|
2040
|
-
* </Sheet>
|
|
2041
|
-
* ```
|
|
2042
|
-
*/
|
|
2043
|
-
declare function Sheet({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
2044
|
-
/** Element that opens the sheet when clicked. Use `asChild` to merge into your own button. */
|
|
2045
|
-
declare function SheetTrigger({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
2046
|
-
/** Button that closes the sheet. Use `asChild` to merge into your own button. */
|
|
2047
|
-
declare function SheetClose({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
|
|
2048
|
-
/** Sliding content panel. Set `side` to control which edge it slides from (default: `"right"`). */
|
|
2049
|
-
declare function SheetContent({ className, children, side, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
2050
|
-
side?: "top" | "right" | "bottom" | "left";
|
|
2051
|
-
}): react_jsx_runtime.JSX.Element;
|
|
2052
|
-
/** Container for SheetTitle and SheetDescription at the top of the sheet. */
|
|
2053
|
-
declare function SheetHeader({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
2054
|
-
/** Container for action buttons at the bottom of the sheet. Pushed to the bottom via `mt-auto`. */
|
|
2055
|
-
declare function SheetFooter({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
2056
|
-
/** Accessible title rendered inside SheetHeader. */
|
|
2057
|
-
declare function SheetTitle({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
2058
|
-
/** Accessible description rendered inside SheetHeader below the title. */
|
|
2059
|
-
declare function SheetDescription({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
|
|
2060
|
-
|
|
2061
|
-
/** Provider that configures shared tooltip settings like delay duration. */
|
|
2062
|
-
declare function TooltipProvider({ delayDuration, ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Provider>): react_jsx_runtime.JSX.Element;
|
|
2063
|
-
/**
|
|
2064
|
-
* Tooltip component built on Radix UI Tooltip.
|
|
2065
|
-
*
|
|
2066
|
-
* Displays a short informational label when the user hovers over or focuses
|
|
2067
|
-
* an element. Includes a built-in `TooltipProvider` with zero delay.
|
|
2068
|
-
* Renders with an arrow pointer for visual anchoring.
|
|
2069
|
-
*
|
|
2070
|
-
* @example
|
|
2071
|
-
* ```tsx
|
|
2072
|
-
* <Tooltip>
|
|
2073
|
-
* <TooltipTrigger asChild>
|
|
2074
|
-
* <Button variant="ghost" size="icon">
|
|
2075
|
-
* <InfoIcon className="size-4" />
|
|
2076
|
-
* </Button>
|
|
2077
|
-
* </TooltipTrigger>
|
|
2078
|
-
* <TooltipContent>
|
|
2079
|
-
* <p>This is a helpful tooltip</p>
|
|
2080
|
-
* </TooltipContent>
|
|
2081
|
-
* </Tooltip>
|
|
2082
|
-
* ```
|
|
2083
|
-
*/
|
|
2084
|
-
declare function Tooltip({ ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
2085
|
-
/** Element that shows the tooltip on hover/focus. Use `asChild` to merge into your own element. */
|
|
2086
|
-
declare function TooltipTrigger({ ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
2087
|
-
/** Floating label that appears near the trigger. Includes an arrow indicator. */
|
|
2088
|
-
declare function TooltipContent({ className, sideOffset, children, ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
2089
|
-
|
|
2090
|
-
type SidebarContextProps = {
|
|
2091
|
-
state: "expanded" | "collapsed";
|
|
2092
|
-
open: boolean;
|
|
2093
|
-
setOpen: (open: boolean) => void;
|
|
2094
|
-
openMobile: boolean;
|
|
2095
|
-
setOpenMobile: (open: boolean) => void;
|
|
2096
|
-
isMobile: boolean;
|
|
2097
|
-
toggleSidebar: () => void;
|
|
2098
|
-
};
|
|
2099
|
-
declare function useSidebar(): SidebarContextProps;
|
|
2100
|
-
declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React$1.ComponentProps<"div"> & {
|
|
2101
|
-
defaultOpen?: boolean;
|
|
2102
|
-
open?: boolean;
|
|
2103
|
-
onOpenChange?: (open: boolean) => void;
|
|
2104
|
-
}): react_jsx_runtime.JSX.Element;
|
|
2105
|
-
declare function Sidebar({ side, variant, collapsible, className, children, ...props }: React$1.ComponentProps<"div"> & {
|
|
2106
|
-
side?: "left" | "right";
|
|
2107
|
-
variant?: "sidebar" | "floating" | "inset";
|
|
2108
|
-
collapsible?: "offcanvas" | "icon" | "none";
|
|
2109
|
-
}): react_jsx_runtime.JSX.Element;
|
|
2110
|
-
declare function SidebarTrigger({ className, onClick, ...props }: React$1.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
|
|
2111
|
-
declare function SidebarRail({ className, ...props }: React$1.ComponentProps<"button">): react_jsx_runtime.JSX.Element;
|
|
2112
|
-
declare function SidebarInset({ className, ...props }: React$1.ComponentProps<"main">): react_jsx_runtime.JSX.Element;
|
|
2113
|
-
declare function SidebarInput({ className, ...props }: React$1.ComponentProps<typeof Input>): react_jsx_runtime.JSX.Element;
|
|
2114
|
-
declare function SidebarHeader({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
2115
|
-
declare function SidebarFooter({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
2116
|
-
declare function SidebarSeparator({ className, ...props }: React$1.ComponentProps<typeof Separator>): react_jsx_runtime.JSX.Element;
|
|
2117
|
-
declare function SidebarContent({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
2118
|
-
declare function SidebarGroup({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
2119
|
-
declare function SidebarGroupLabel({ className, asChild, ...props }: React$1.ComponentProps<"div"> & {
|
|
2120
|
-
asChild?: boolean;
|
|
2121
|
-
}): react_jsx_runtime.JSX.Element;
|
|
2122
|
-
declare function SidebarGroupAction({ className, asChild, ...props }: React$1.ComponentProps<"button"> & {
|
|
2123
|
-
asChild?: boolean;
|
|
2124
|
-
}): react_jsx_runtime.JSX.Element;
|
|
2125
|
-
declare function SidebarGroupContent({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
2126
|
-
declare function SidebarMenu({ className, ...props }: React$1.ComponentProps<"ul">): react_jsx_runtime.JSX.Element;
|
|
2127
|
-
declare function SidebarMenuItem({ className, ...props }: React$1.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
|
|
2128
|
-
declare const sidebarMenuButtonVariants: (props?: ({
|
|
2129
|
-
variant?: "default" | "outline" | null | undefined;
|
|
2130
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
2131
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2132
|
-
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React$1.ComponentProps<"button"> & {
|
|
2133
|
-
asChild?: boolean;
|
|
2134
|
-
isActive?: boolean;
|
|
2135
|
-
tooltip?: string | React$1.ComponentProps<typeof TooltipContent>;
|
|
2136
|
-
} & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime.JSX.Element;
|
|
2137
|
-
declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: React$1.ComponentProps<"button"> & {
|
|
2138
|
-
asChild?: boolean;
|
|
2139
|
-
showOnHover?: boolean;
|
|
2140
|
-
}): react_jsx_runtime.JSX.Element;
|
|
2141
|
-
declare function SidebarMenuBadge({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
2142
|
-
declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React$1.ComponentProps<"div"> & {
|
|
2143
|
-
showIcon?: boolean;
|
|
2144
|
-
}): react_jsx_runtime.JSX.Element;
|
|
2145
|
-
declare function SidebarMenuSub({ className, ...props }: React$1.ComponentProps<"ul">): react_jsx_runtime.JSX.Element;
|
|
2146
|
-
declare function SidebarMenuSubItem({ className, ...props }: React$1.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
|
|
2147
|
-
declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...props }: React$1.ComponentProps<"a"> & {
|
|
2148
|
-
asChild?: boolean;
|
|
2149
|
-
size?: "sm" | "md";
|
|
2150
|
-
isActive?: boolean;
|
|
2151
|
-
}): react_jsx_runtime.JSX.Element;
|
|
2152
|
-
|
|
2153
|
-
type SkeletonProps = React.ComponentProps<"div">;
|
|
2154
|
-
/**
|
|
2155
|
-
* Placeholder loading indicator with a pulse animation, used to represent
|
|
2156
|
-
* content that is being fetched or rendered.
|
|
2157
|
-
*
|
|
2158
|
-
* @example
|
|
2159
|
-
* ```tsx
|
|
2160
|
-
* // Text placeholder
|
|
2161
|
-
* <Skeleton className="h-4 w-48" />
|
|
2162
|
-
*
|
|
2163
|
-
* // Circular avatar placeholder
|
|
2164
|
-
* <Skeleton className="size-10 rounded-full" />
|
|
2165
|
-
*
|
|
2166
|
-
* // Card skeleton
|
|
2167
|
-
* <div className="space-y-2">
|
|
2168
|
-
* <Skeleton className="h-4 w-full" />
|
|
2169
|
-
* <Skeleton className="h-4 w-3/4" />
|
|
2170
|
-
* </div>
|
|
2171
|
-
* ```
|
|
2172
|
-
*/
|
|
2173
|
-
declare function Skeleton({ className, ...props }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
2174
|
-
|
|
2175
|
-
type SliderProps = React$1.ComponentProps<typeof SliderPrimitive.Root>;
|
|
2176
|
-
/**
|
|
2177
|
-
* Draggable range input for selecting a numeric value or range within a given min/max.
|
|
2178
|
-
* Supports single-thumb and multi-thumb modes, as well as vertical orientation.
|
|
2179
|
-
*
|
|
2180
|
-
* @example
|
|
2181
|
-
* ```tsx
|
|
2182
|
-
* // Single value
|
|
2183
|
-
* <Slider defaultValue={[50]} max={100} step={1} />
|
|
2184
|
-
*
|
|
2185
|
-
* // Range (two thumbs)
|
|
2186
|
-
* <Slider defaultValue={[25, 75]} max={100} step={5} />
|
|
2187
|
-
*
|
|
2188
|
-
* // Controlled
|
|
2189
|
-
* <Slider value={[volume]} onValueChange={([v]) => setVolume(v)} />
|
|
2190
|
-
* ```
|
|
2191
|
-
*/
|
|
2192
|
-
declare function Slider({ className, defaultValue, value, min, max, ...props }: SliderProps): react_jsx_runtime.JSX.Element;
|
|
2193
|
-
|
|
2194
|
-
/**
|
|
2195
|
-
* Toast notification container powered by the Sonner library.
|
|
2196
|
-
* Renders toast messages at a configurable position on screen.
|
|
2197
|
-
* Place this once at the root of your app, then use `toast()` to trigger notifications.
|
|
2198
|
-
*
|
|
2199
|
-
* @example
|
|
2200
|
-
* ```tsx
|
|
2201
|
-
* // In your root layout:
|
|
2202
|
-
* <Toaster />
|
|
2203
|
-
*
|
|
2204
|
-
* // Anywhere in your app:
|
|
2205
|
-
* import { toast } from "sonner";
|
|
2206
|
-
* toast.success("Changes saved");
|
|
2207
|
-
* toast.error("Something went wrong");
|
|
2208
|
-
* ```
|
|
2209
|
-
*/
|
|
2210
|
-
declare const Toaster: ({ ...props }: ToasterProps) => react_jsx_runtime.JSX.Element;
|
|
2211
|
-
|
|
2212
|
-
declare function Spinner({ className, ...props }: React.ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
2213
|
-
|
|
2214
|
-
type SwitchProps = React$1.ComponentProps<typeof SwitchPrimitives.Root>;
|
|
2215
|
-
/**
|
|
2216
|
-
* Toggle switch for boolean on/off states, styled as a sliding pill.
|
|
2217
|
-
*
|
|
2218
|
-
* @example
|
|
2219
|
-
* ```tsx
|
|
2220
|
-
* // Uncontrolled
|
|
2221
|
-
* <Switch defaultChecked />
|
|
2222
|
-
*
|
|
2223
|
-
* // Controlled
|
|
2224
|
-
* <Switch checked={enabled} onCheckedChange={setEnabled} />
|
|
2225
|
-
*
|
|
2226
|
-
* // With label
|
|
2227
|
-
* <div className="flex items-center gap-2">
|
|
2228
|
-
* <Switch id="notifications" />
|
|
2229
|
-
* <Label htmlFor="notifications">Enable notifications</Label>
|
|
2230
|
-
* </div>
|
|
2231
|
-
* ```
|
|
2232
|
-
*/
|
|
2233
|
-
declare function Switch({ className, ...props }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
2234
|
-
|
|
2235
|
-
/**
|
|
2236
|
-
* Data table component with header, body, footer, row, head, cell, and caption sub-components.
|
|
2237
|
-
*
|
|
2238
|
-
* Renders inside a horizontally scrollable container. Uses density tokens for
|
|
2239
|
-
* consistent header height (`h-table-head`) and cell padding.
|
|
2240
|
-
*
|
|
2241
|
-
* @example
|
|
2242
|
-
* ```tsx
|
|
2243
|
-
* <Table>
|
|
2244
|
-
* <TableHeader>
|
|
2245
|
-
* <TableRow>
|
|
2246
|
-
* <TableHead>Name</TableHead>
|
|
2247
|
-
* <TableHead>Email</TableHead>
|
|
2248
|
-
* <TableHead>Role</TableHead>
|
|
2249
|
-
* </TableRow>
|
|
2250
|
-
* </TableHeader>
|
|
2251
|
-
* <TableBody>
|
|
2252
|
-
* <TableRow>
|
|
2253
|
-
* <TableCell>Alice</TableCell>
|
|
2254
|
-
* <TableCell>alice@example.com</TableCell>
|
|
2255
|
-
* <TableCell>Admin</TableCell>
|
|
2256
|
-
* </TableRow>
|
|
2257
|
-
* <TableRow>
|
|
2258
|
-
* <TableCell>Bob</TableCell>
|
|
2259
|
-
* <TableCell>bob@example.com</TableCell>
|
|
2260
|
-
* <TableCell>Member</TableCell>
|
|
2261
|
-
* </TableRow>
|
|
2262
|
-
* </TableBody>
|
|
2263
|
-
* <TableFooter>
|
|
2264
|
-
* <TableRow>
|
|
2265
|
-
* <TableCell colSpan={3}>2 users total</TableCell>
|
|
2266
|
-
* </TableRow>
|
|
2267
|
-
* </TableFooter>
|
|
2268
|
-
* <TableCaption>A list of team members.</TableCaption>
|
|
2269
|
-
* </Table>
|
|
2270
|
-
* ```
|
|
2271
|
-
*/
|
|
2272
|
-
declare function Table({ className, ...props }: React$1.ComponentProps<"table">): react_jsx_runtime.JSX.Element;
|
|
2273
|
-
/** Table header container. Groups `TableRow` elements for column headings. */
|
|
2274
|
-
declare function TableHeader({ className, ...props }: React$1.ComponentProps<"thead">): react_jsx_runtime.JSX.Element;
|
|
2275
|
-
/** Table body container. Groups `TableRow` elements for data rows. */
|
|
2276
|
-
declare function TableBody({ className, ...props }: React$1.ComponentProps<"tbody">): react_jsx_runtime.JSX.Element;
|
|
2277
|
-
/** Table footer container. Renders with a muted background and top border. */
|
|
2278
|
-
declare function TableFooter({ className, ...props }: React$1.ComponentProps<"tfoot">): react_jsx_runtime.JSX.Element;
|
|
2279
|
-
/** Table row with hover highlight and selected state support via `data-state="selected"`. */
|
|
2280
|
-
declare function TableRow({ className, ...props }: React$1.ComponentProps<"tr">): react_jsx_runtime.JSX.Element;
|
|
2281
|
-
/** Table head cell. Renders as a `<th>` with density-based height (`h-table-head`). */
|
|
2282
|
-
declare function TableHead({ className, ...props }: React$1.ComponentProps<"th">): react_jsx_runtime.JSX.Element;
|
|
2283
|
-
/** Table data cell. Renders as a `<td>` with consistent padding and alignment. */
|
|
2284
|
-
declare function TableCell({ className, ...props }: React$1.ComponentProps<"td">): react_jsx_runtime.JSX.Element;
|
|
2285
|
-
/** Table caption displayed below the table in muted text. */
|
|
2286
|
-
declare function TableCaption({ className, ...props }: React$1.ComponentProps<"caption">): react_jsx_runtime.JSX.Element;
|
|
2287
|
-
|
|
2288
|
-
/**
|
|
2289
|
-
* Tabbed interface component with list, trigger, and content sub-components.
|
|
2290
|
-
*
|
|
2291
|
-
* Built on Radix Tabs with density-aware sizing (`h-element` for the tab list).
|
|
2292
|
-
* Supports keyboard navigation and focus management out of the box.
|
|
2293
|
-
*
|
|
2294
|
-
* **Tokens used** (Phase B foundation):
|
|
2295
|
-
* - `h-element` → `--density-element` (32 default, 28 compact, 44 comfortable)
|
|
2296
|
-
* - `bg-muted` → `--muted` (warm subtle bg per SmartHR)
|
|
2297
|
-
* - `data-[state=active]:bg-card` → `--card` (warm off-white surface raise)
|
|
2298
|
-
* - `rounded-xl` (10 px) on TabsList for the pill-shape container
|
|
2299
|
-
* - `rounded-md` → `--radius-md` = 4 px on individual triggers
|
|
2300
|
-
*
|
|
2301
|
-
* @example
|
|
2302
|
-
* ```tsx
|
|
2303
|
-
* <Tabs defaultValue="overview">
|
|
2304
|
-
* <TabsList>
|
|
2305
|
-
* <TabsTrigger value="overview">Overview</TabsTrigger>
|
|
2306
|
-
* <TabsTrigger value="analytics">Analytics</TabsTrigger>
|
|
2307
|
-
* <TabsTrigger value="settings">Settings</TabsTrigger>
|
|
2308
|
-
* </TabsList>
|
|
2309
|
-
* <TabsContent value="overview">
|
|
2310
|
-
* <p>Overview content here.</p>
|
|
2311
|
-
* </TabsContent>
|
|
2312
|
-
* <TabsContent value="analytics">
|
|
2313
|
-
* <p>Analytics content here.</p>
|
|
2314
|
-
* </TabsContent>
|
|
2315
|
-
* <TabsContent value="settings">
|
|
2316
|
-
* <p>Settings content here.</p>
|
|
2317
|
-
* </TabsContent>
|
|
2318
|
-
* </Tabs>
|
|
2319
|
-
* ```
|
|
2320
|
-
*/
|
|
2321
|
-
declare function Tabs({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
2322
|
-
/** Container for `TabsTrigger` elements. Renders as a rounded pill with muted background. */
|
|
2323
|
-
declare function TabsList({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.List>): react_jsx_runtime.JSX.Element;
|
|
2324
|
-
/** Individual tab button. Highlights with a card background when active. Requires a `value` prop matching a `TabsContent`. */
|
|
2325
|
-
declare function TabsTrigger({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
2326
|
-
/** Content panel shown when its `value` matches the active tab. */
|
|
2327
|
-
declare function TabsContent({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
2328
|
-
|
|
2329
|
-
type NativeTextareaProps = Omit<React$1.ComponentProps<'textarea'>, 'value' | 'onChange'>;
|
|
2330
|
-
interface StandardTextareaProps extends NativeTextareaProps {
|
|
2331
|
-
/** Translatable mode disabled (default). */
|
|
2332
|
-
translatable?: never;
|
|
2333
|
-
value?: string;
|
|
2334
|
-
onChange?: React$1.ChangeEventHandler<HTMLTextAreaElement>;
|
|
2335
|
-
}
|
|
2336
|
-
interface TranslatableTextareaProps extends NativeTextareaProps {
|
|
2337
|
-
/**
|
|
2338
|
-
* Enable locale-switching tabs on this textarea.
|
|
2339
|
-
* - `true` — inherit UIProvider's locale config
|
|
2340
|
-
* - `object` — override locales/defaultLocale/fallbackLocale per field
|
|
2341
|
-
*
|
|
2342
|
-
* @example
|
|
2343
|
-
* ```tsx
|
|
2344
|
-
* // Uses UIProvider config
|
|
2345
|
-
* <Textarea translatable value={val} onChange={setVal} />
|
|
2346
|
-
*
|
|
2347
|
-
* // Custom per-field config
|
|
2348
|
-
* <Textarea
|
|
2349
|
-
* translatable={{ locales: { en: 'English', vi: 'Tiếng Việt' }, fallbackLocale: 'en' }}
|
|
2350
|
-
* value={val}
|
|
2351
|
-
* onChange={setVal}
|
|
2352
|
-
* />
|
|
2353
|
-
* ```
|
|
2354
|
-
*/
|
|
2355
|
-
translatable: TranslatableConfig;
|
|
2356
|
-
value?: TranslatableValue;
|
|
2357
|
-
onChange?: (value: TranslatableValue) => void;
|
|
2358
|
-
/**
|
|
2359
|
-
* Per-locale validation errors. Truthy string = that locale is invalid.
|
|
2360
|
-
* The active locale's error is forwarded as `aria-invalid` on the textarea;
|
|
2361
|
-
* all locale tabs with errors show a red dot indicator.
|
|
2362
|
-
*
|
|
2363
|
-
* @example `{ en: 'Required', vi: 'Too long (120/100)' }`
|
|
2364
|
-
*/
|
|
2365
|
-
errors?: Partial<Record<string, string>>;
|
|
2366
|
-
}
|
|
2367
|
-
type TextareaProps = StandardTextareaProps | TranslatableTextareaProps;
|
|
2368
|
-
/**
|
|
2369
|
-
* Multi-line text input with auto-sizing via `field-sizing-content`.
|
|
2370
|
-
* Supports translatable mode via the `translatable` prop.
|
|
2371
|
-
*
|
|
2372
|
-
* @example
|
|
2373
|
-
* ```tsx
|
|
2374
|
-
* // Standard
|
|
2375
|
-
* <Textarea placeholder="Enter a description..." />
|
|
2376
|
-
* <Textarea value={content} onChange={(e) => setContent(e.target.value)} />
|
|
2377
|
-
*
|
|
2378
|
-
* // Translatable — uses UIProvider's locale config
|
|
2379
|
-
* <Textarea translatable value={val} onChange={setVal} />
|
|
2380
|
-
*
|
|
2381
|
-
* // Translatable — custom config
|
|
2382
|
-
* <Textarea
|
|
2383
|
-
* translatable={{ locales: { en: 'English', vi: 'Tiếng Việt' }, fallbackLocale: 'en' }}
|
|
2384
|
-
* value={val}
|
|
2385
|
-
* onChange={setVal}
|
|
2386
|
-
* />
|
|
2387
|
-
* ```
|
|
2388
|
-
*/
|
|
2389
|
-
declare const Textarea: React$1.ForwardRefExoticComponent<(Omit<StandardTextareaProps, "ref"> | Omit<TranslatableTextareaProps, "ref">) & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
2390
|
-
|
|
2391
|
-
interface TimePickerProps {
|
|
2392
|
-
/** Currently selected time in `"HH:mm"` format (e.g., `"14:30"`). */
|
|
2393
|
-
value?: string;
|
|
2394
|
-
/** Callback fired when a time is selected. Receives a `"HH:mm"` string. */
|
|
2395
|
-
onChange?: (time: string) => void;
|
|
2396
|
-
/** Placeholder text shown when no time is selected. */
|
|
2397
|
-
placeholder?: string;
|
|
2398
|
-
/** Additional CSS class for the trigger button. */
|
|
2399
|
-
className?: string;
|
|
2400
|
-
/** Whether the time picker is disabled. */
|
|
2401
|
-
disabled?: boolean;
|
|
2402
|
-
/** Use 24-hour format (0-23). When false, shows 12-hour (1-12). Defaults to `true`. */
|
|
2403
|
-
format24h?: boolean;
|
|
2404
|
-
}
|
|
2405
|
-
/**
|
|
2406
|
-
* Time picker with a scrollable hour/minute popover.
|
|
2407
|
-
* Opens a two-column dropdown for selecting hours and minutes.
|
|
2408
|
-
*
|
|
2409
|
-
* @example
|
|
2410
|
-
* ```tsx
|
|
2411
|
-
* const [time, setTime] = useState<string>();
|
|
2412
|
-
*
|
|
2413
|
-
* <TimePicker
|
|
2414
|
-
* value={time}
|
|
2415
|
-
* onChange={setTime}
|
|
2416
|
-
* placeholder="Select time"
|
|
2417
|
-
* format24h
|
|
2418
|
-
* />
|
|
2419
|
-
* ```
|
|
2420
|
-
*/
|
|
2421
|
-
declare function TimePicker({ value, onChange, placeholder, className, disabled, format24h, }: TimePickerProps): react_jsx_runtime.JSX.Element;
|
|
2422
|
-
interface TimeInputProps {
|
|
2423
|
-
/** Current time value in `"HH:mm"` format. */
|
|
2424
|
-
value?: string;
|
|
2425
|
-
/** Callback fired on blur with a valid `"HH:mm"` string. */
|
|
2426
|
-
onChange?: (time: string) => void;
|
|
2427
|
-
/** Additional CSS class for the input wrapper. */
|
|
2428
|
-
className?: string;
|
|
2429
|
-
/** Whether the input is disabled. */
|
|
2430
|
-
disabled?: boolean;
|
|
2431
|
-
}
|
|
2432
|
-
/**
|
|
2433
|
-
* Inline text input for typing a time value directly.
|
|
2434
|
-
* Automatically formats input as `HH:mm` and validates on blur.
|
|
2435
|
-
*
|
|
2436
|
-
* @example
|
|
2437
|
-
* ```tsx
|
|
2438
|
-
* const [time, setTime] = useState("09:00");
|
|
2439
|
-
*
|
|
2440
|
-
* <TimeInput value={time} onChange={setTime} />
|
|
2441
|
-
* ```
|
|
2442
|
-
*/
|
|
2443
|
-
declare function TimeInput({ value, onChange, className, disabled, }: TimeInputProps): react_jsx_runtime.JSX.Element;
|
|
2444
|
-
|
|
2445
|
-
declare const toggleVariants: (props?: ({
|
|
2446
|
-
variant?: "default" | "outline" | null | undefined;
|
|
2447
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
2448
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2449
|
-
interface ToggleProps extends React$1.ComponentProps<typeof TogglePrimitive.Root>, VariantProps<typeof toggleVariants> {
|
|
2450
|
-
}
|
|
2451
|
-
/**
|
|
2452
|
-
* Two-state button that can be toggled on or off, with variant and size options.
|
|
2453
|
-
*
|
|
2454
|
-
* @example
|
|
2455
|
-
* ```tsx
|
|
2456
|
-
* // Basic toggle
|
|
2457
|
-
* <Toggle aria-label="Toggle bold">
|
|
2458
|
-
* <BoldIcon className="size-4" />
|
|
2459
|
-
* </Toggle>
|
|
2460
|
-
*
|
|
2461
|
-
* // Outline variant, small size
|
|
2462
|
-
* <Toggle variant="outline" size="sm">
|
|
2463
|
-
* <ItalicIcon className="size-4" />
|
|
2464
|
-
* </Toggle>
|
|
2465
|
-
* ```
|
|
2466
|
-
*/
|
|
2467
|
-
declare function Toggle({ className, variant, size, ...props }: ToggleProps): react_jsx_runtime.JSX.Element;
|
|
2468
|
-
|
|
2469
|
-
type ToggleGroupProps = React$1.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>;
|
|
2470
|
-
/**
|
|
2471
|
-
* Group of toggle buttons where one or multiple items can be active.
|
|
2472
|
-
* Provides shared `variant` and `size` context to child {@link ToggleGroupItem} components.
|
|
2473
|
-
*
|
|
2474
|
-
* @example
|
|
2475
|
-
* ```tsx
|
|
2476
|
-
* // Single selection
|
|
2477
|
-
* <ToggleGroup type="single" defaultValue="center">
|
|
2478
|
-
* <ToggleGroupItem value="left"><AlignLeftIcon /></ToggleGroupItem>
|
|
2479
|
-
* <ToggleGroupItem value="center"><AlignCenterIcon /></ToggleGroupItem>
|
|
2480
|
-
* <ToggleGroupItem value="right"><AlignRightIcon /></ToggleGroupItem>
|
|
2481
|
-
* </ToggleGroup>
|
|
2482
|
-
*
|
|
2483
|
-
* // Multiple selection with outline variant
|
|
2484
|
-
* <ToggleGroup type="multiple" variant="outline" size="sm">
|
|
2485
|
-
* <ToggleGroupItem value="bold"><BoldIcon /></ToggleGroupItem>
|
|
2486
|
-
* <ToggleGroupItem value="italic"><ItalicIcon /></ToggleGroupItem>
|
|
2487
|
-
* </ToggleGroup>
|
|
2488
|
-
* ```
|
|
2489
|
-
*/
|
|
2490
|
-
declare function ToggleGroup({ className, variant, size, children, ...props }: ToggleGroupProps): react_jsx_runtime.JSX.Element;
|
|
2491
|
-
type ToggleGroupItemProps = React$1.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>;
|
|
2492
|
-
/**
|
|
2493
|
-
* Individual toggle item within a {@link ToggleGroup}.
|
|
2494
|
-
* Inherits `variant` and `size` from the parent group context unless overridden.
|
|
2495
|
-
*
|
|
2496
|
-
* @example
|
|
2497
|
-
* ```tsx
|
|
2498
|
-
* <ToggleGroupItem value="bold" aria-label="Toggle bold">
|
|
2499
|
-
* <BoldIcon className="size-4" />
|
|
2500
|
-
* </ToggleGroupItem>
|
|
2501
|
-
* ```
|
|
2502
|
-
*/
|
|
2503
|
-
declare function ToggleGroupItem({ className, children, variant, size, ...props }: ToggleGroupItemProps): react_jsx_runtime.JSX.Element;
|
|
2504
|
-
|
|
2505
|
-
interface TranslatableRenderProps {
|
|
2506
|
-
/** Active locale code, e.g. `'en'` */
|
|
2507
|
-
locale: LocaleCode;
|
|
2508
|
-
/** String value for the active locale */
|
|
2509
|
-
value: string;
|
|
2510
|
-
/** Call with the new string to update the active locale's value */
|
|
2511
|
-
onChange: (value: string) => void;
|
|
2512
|
-
/** Fallback value shown as placeholder when the active locale is empty */
|
|
2513
|
-
fallbackPlaceholder: string | undefined;
|
|
2514
|
-
/** True when the active locale has a truthy entry in `errors` */
|
|
2515
|
-
hasError: boolean;
|
|
2516
|
-
}
|
|
2517
|
-
interface TranslatableFieldProps {
|
|
2518
|
-
config: UILocaleConfig;
|
|
2519
|
-
value: TranslatableValue;
|
|
2520
|
-
onChange: (value: TranslatableValue) => void;
|
|
2521
|
-
/** Render the actual input. Receives locale-scoped value/onChange. */
|
|
2522
|
-
children: (props: TranslatableRenderProps) => ReactNode;
|
|
2523
|
-
className?: string;
|
|
2524
|
-
/**
|
|
2525
|
-
* Per-locale validation errors. A truthy string for a locale code marks that
|
|
2526
|
-
* locale as invalid: its tab dot turns red and `hasError` is `true` in the
|
|
2527
|
-
* render props when that locale is active.
|
|
2528
|
-
*
|
|
2529
|
-
* @example `{ en: '', vi: 'Too long' }` — only VI has an error
|
|
2530
|
-
*/
|
|
2531
|
-
errors?: Partial<Record<string, string>>;
|
|
2532
|
-
}
|
|
2533
|
-
/**
|
|
2534
|
-
* Wraps any text input with a locale switcher tab bar.
|
|
2535
|
-
* Used internally by `Input` and `Textarea` when `translatable` prop is set.
|
|
2536
|
-
*
|
|
2537
|
-
* When more than 3 locales are configured, overflow locales are collapsed into
|
|
2538
|
-
* a dropdown button to prevent the tab bar from overflowing.
|
|
2539
|
-
*
|
|
2540
|
-
* @example
|
|
2541
|
-
* ```tsx
|
|
2542
|
-
* <TranslatableField config={localeConfig} value={val} onChange={setVal} errors={{ vi: 'Too long' }}>
|
|
2543
|
-
* {({ value, onChange, fallbackPlaceholder, hasError }) => (
|
|
2544
|
-
* <input aria-invalid={hasError || undefined} value={value} onChange={(e) => onChange(e.target.value)} />
|
|
2545
|
-
* )}
|
|
2546
|
-
* </TranslatableField>
|
|
2547
|
-
* ```
|
|
2548
|
-
*/
|
|
2549
|
-
declare function TranslatableField({ config, value, onChange, children, className, errors, }: TranslatableFieldProps): react_jsx_runtime.JSX.Element;
|
|
2550
|
-
|
|
2551
|
-
interface UIProviderProps {
|
|
2552
|
-
children: ReactNode;
|
|
2553
|
-
/**
|
|
2554
|
-
* Initial theme. Defaults to user's saved localStorage value or `'system'`.
|
|
2555
|
-
*/
|
|
2556
|
-
defaultTheme?: Theme;
|
|
2557
|
-
/**
|
|
2558
|
-
* Available locales for translatable fields.
|
|
2559
|
-
* @example { en: 'English', vi: 'Tiếng Việt', ja: '日本語' }
|
|
2560
|
-
*/
|
|
2561
|
-
locales?: LocaleMap;
|
|
2562
|
-
/**
|
|
2563
|
-
* Locale shown first in translatable fields.
|
|
2564
|
-
* Defaults to the first key in `locales`.
|
|
2565
|
-
*/
|
|
2566
|
-
defaultLocale?: LocaleCode;
|
|
2567
|
-
/**
|
|
2568
|
-
* Locale used when a field has no value for the active locale.
|
|
2569
|
-
* Defaults to `defaultLocale`.
|
|
2570
|
-
*/
|
|
2571
|
-
fallbackLocale?: LocaleCode;
|
|
2572
|
-
/**
|
|
2573
|
-
* date-fns `Locale` object used by date components (DatePicker, CalendarMini, etc.).
|
|
2574
|
-
* Typed as `object` to avoid importing date-fns as a direct dependency.
|
|
2575
|
-
*
|
|
2576
|
-
* @example
|
|
2577
|
-
* ```tsx
|
|
2578
|
-
* import { ja } from 'date-fns/locale';
|
|
2579
|
-
* <UIProvider dateFnsLocale={ja}>{children}</UIProvider>
|
|
2580
|
-
* ```
|
|
2581
|
-
*/
|
|
2582
|
-
dateFnsLocale?: object;
|
|
2583
|
-
/**
|
|
2584
|
-
* Callback fired when the active locale changes via `setLocale`.
|
|
2585
|
-
* Use this to sync with i18n libraries, localStorage, etc.
|
|
2586
|
-
*/
|
|
2587
|
-
onLocaleChange?: (locale: LocaleCode) => void;
|
|
2588
|
-
/**
|
|
2589
|
-
* IANA timezone string (e.g. `'Asia/Tokyo'`).
|
|
2590
|
-
* Defaults to the browser's local timezone.
|
|
2591
|
-
*/
|
|
2592
|
-
timezone?: string;
|
|
2593
|
-
/**
|
|
2594
|
-
* Callback fired when the timezone changes via `setTimezone`.
|
|
2595
|
-
* Use this to sync with backend, localStorage, etc.
|
|
2596
|
-
*/
|
|
2597
|
-
onTimezoneChange?: (timezone: string) => void;
|
|
2598
|
-
}
|
|
2599
|
-
/**
|
|
2600
|
-
* Root provider for @omnifyjp/ui — handles dark mode and translatable field config.
|
|
2601
|
-
*
|
|
2602
|
-
* @example
|
|
2603
|
-
* ```tsx
|
|
2604
|
-
* <UIProvider
|
|
2605
|
-
* locales={{ en: 'English', vi: 'Tiếng Việt', ja: '日本語' }}
|
|
2606
|
-
* defaultLocale="en"
|
|
2607
|
-
* fallbackLocale="en"
|
|
2608
|
-
* >
|
|
2609
|
-
* {children}
|
|
2610
|
-
* </UIProvider>
|
|
2611
|
-
* ```
|
|
2612
|
-
*/
|
|
2613
|
-
declare function UIProvider({ children, defaultTheme, locales, defaultLocale, fallbackLocale, dateFnsLocale, onLocaleChange, timezone: timezoneProp, onTimezoneChange, }: UIProviderProps): react_jsx_runtime.JSX.Element;
|
|
2614
|
-
|
|
2615
|
-
/** Access theme and setTheme. Must be inside UIProvider. */
|
|
2616
|
-
declare function useTheme(): {
|
|
2617
|
-
theme: Theme;
|
|
2618
|
-
setTheme: (t: Theme) => void;
|
|
2619
|
-
};
|
|
2620
|
-
/**
|
|
2621
|
-
* Returns the locale config from UIProvider.
|
|
2622
|
-
* Returns `undefined` when no `locales` prop was passed to UIProvider.
|
|
2623
|
-
*/
|
|
2624
|
-
declare function useUILocales(): UILocaleConfig | undefined;
|
|
2625
|
-
/**
|
|
2626
|
-
* Returns the active locale state and locale config from UIProvider.
|
|
2627
|
-
* Must be used inside UIProvider.
|
|
2628
|
-
*/
|
|
2629
|
-
declare function useLocale(): {
|
|
2630
|
-
currentLocale: LocaleCode;
|
|
2631
|
-
setLocale: (locale: LocaleCode) => void;
|
|
2632
|
-
locales: LocaleMap;
|
|
2633
|
-
defaultLocale: LocaleCode;
|
|
2634
|
-
fallbackLocale: LocaleCode;
|
|
2635
|
-
};
|
|
2636
|
-
/**
|
|
2637
|
-
* Returns the active timezone and setter from UIProvider.
|
|
2638
|
-
* Must be used inside UIProvider.
|
|
2639
|
-
*/
|
|
2640
|
-
declare function useTimezone(): {
|
|
2641
|
-
timezone: string;
|
|
2642
|
-
setTimezone: (tz: string) => void;
|
|
2643
|
-
};
|
|
2644
|
-
/**
|
|
2645
|
-
* Resolves the effective UILocaleConfig for a translatable field.
|
|
2646
|
-
* Merges inline `TranslatableConfig` with the provider's locale config.
|
|
2647
|
-
*/
|
|
2648
|
-
declare function resolveTranslatableConfig(translatable: TranslatableConfig, providerLocales: UILocaleConfig | undefined): UILocaleConfig | undefined;
|
|
2649
|
-
|
|
2650
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, type FileUploadProps, type FileUploadVariant, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FullWidthPageContainer, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, type LabelProps, type LocaleCode, type LocaleMap, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MultiCombobox, type MultiComboboxProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageContainer, type PageContainerProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, type ProgressProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, Rating, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, SplitPageContainer, StandardPageContainer, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, type Theme, TimeInput, TimePicker, Toaster, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TranslatableConfig, TranslatableField, type TranslatableRenderProps, type TranslatableValue, type UILocaleConfig, UIProvider, badgeVariants, buttonVariants, inputVariants, navigationMenuTriggerStyle, resolveTranslatableConfig, toggleVariants, useFormField, useLocale, useSidebar, useTheme, useTimezone, useUILocales };
|
|
1
|
+
export { Avatar, AvatarProps, Badge, BadgeProps, BadgeVariant, Button, ButtonProps, ButtonSize, ButtonVariant, Calendar, Card, CardContent, CardHeader, CardSubtitle, CardSubtitleProps, CardTitle, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuTrigger, Input, InputProps, Label, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Separator, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TextareaProps, TimeInput, TimeInputProps, cn } from './components/primitives.js';
|
|
2
|
+
export { Density, PRODUCT_OPTIONS, Theme, Tweaks, useTweaks } from './hooks.js';
|
|
3
|
+
export { ForgeProduct, ForgeProject, PRODUCTS, PROJECT_KIND, ProjectKind, ProjectStatus, findProductByTenant } from './data.js';
|
|
4
|
+
export { FORGE_LOCALE_STORAGE_KEY, ForgeLocale, SUPPORTED_LOCALES, initI18n } from './i18n.js';
|
|
5
|
+
import 'clsx';
|
|
6
|
+
import 'react/jsx-runtime';
|
|
7
|
+
import 'react';
|
|
8
|
+
import '@radix-ui/react-label';
|
|
9
|
+
import '@radix-ui/react-tabs';
|
|
10
|
+
import '@radix-ui/react-separator';
|
|
11
|
+
import '@radix-ui/react-popover';
|
|
12
|
+
import '@radix-ui/react-dropdown-menu';
|
|
13
|
+
import 'react-day-picker';
|
|
14
|
+
import 'i18next';
|