@yuhuanowo/yunui 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.d.ts +61 -2
- package/dist/ai.js +1 -1
- package/dist/ai.js.map +1 -1
- package/dist/{chunk-FYXF43G3.js → chunk-EFIELFBW.js} +3 -3
- package/dist/chunk-EFIELFBW.js.map +1 -0
- package/dist/{chunk-ORS36OUN.js → chunk-N7JHOWGR.js} +2 -2
- package/dist/chunk-N7JHOWGR.js.map +1 -0
- package/dist/index.d.ts +147 -3
- package/dist/index.js +2 -2
- package/dist/patterns.d.ts +68 -0
- package/dist/patterns.js +2 -2
- package/dist/patterns.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-FYXF43G3.js.map +0 -1
- package/dist/chunk-ORS36OUN.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -134,20 +134,29 @@ declare function DeleteConfirmModal({ itemName, ...props }: DeleteConfirmModalPr
|
|
|
134
134
|
declare function RegenerateConfirmModal({ itemName, ...props }: RegenerateConfirmModalProps): React$1.JSX.Element;
|
|
135
135
|
|
|
136
136
|
interface SheetProps {
|
|
137
|
+
/** Whether the sheet is open (controlled). */
|
|
137
138
|
open: boolean;
|
|
139
|
+
/** Called when the sheet should close (backdrop click, escape, close button). */
|
|
138
140
|
onClose: () => void;
|
|
139
141
|
children: React.ReactNode;
|
|
142
|
+
/** Optional header title. */
|
|
140
143
|
title?: string;
|
|
141
144
|
}
|
|
145
|
+
/** Mobile-only slide-in panel from the right, with a backdrop (hidden on `lg` and up). */
|
|
142
146
|
declare function Sheet({ open, onClose, children, title }: SheetProps): React$1.ReactPortal | null;
|
|
143
147
|
|
|
144
148
|
interface CheckboxProps {
|
|
149
|
+
/** Whether the box is checked (controlled). */
|
|
145
150
|
checked: boolean;
|
|
151
|
+
/** Called with the next checked state when toggled. */
|
|
146
152
|
onCheckedChange: (checked: boolean) => void;
|
|
153
|
+
/** Disable interaction and dim the control. */
|
|
147
154
|
disabled?: boolean;
|
|
148
155
|
className?: string;
|
|
156
|
+
/** Element id (e.g. to pair with a `<label htmlFor>`). */
|
|
149
157
|
id?: string;
|
|
150
158
|
}
|
|
159
|
+
/** Controlled checkbox rendered as an accessible toggle button with a check icon. */
|
|
151
160
|
declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
152
161
|
|
|
153
162
|
/**
|
|
@@ -157,8 +166,11 @@ declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$
|
|
|
157
166
|
declare function cn(...inputs: ClassValue[]): string;
|
|
158
167
|
|
|
159
168
|
interface ComboboxOption {
|
|
169
|
+
/** The value reported to `onChange` when selected. */
|
|
160
170
|
value: string;
|
|
171
|
+
/** Display text for the option. */
|
|
161
172
|
label: string;
|
|
173
|
+
/** Optional secondary text for the option. */
|
|
162
174
|
description?: string;
|
|
163
175
|
/**
|
|
164
176
|
* Optional resolved icon URL for the option. The host app resolves this
|
|
@@ -168,89 +180,154 @@ interface ComboboxOption {
|
|
|
168
180
|
iconUrl?: string | null;
|
|
169
181
|
}
|
|
170
182
|
interface ComboboxProps {
|
|
183
|
+
/** The selectable options. */
|
|
171
184
|
options: ComboboxOption[];
|
|
185
|
+
/** Currently selected value (controlled). */
|
|
172
186
|
value: string;
|
|
187
|
+
/** Called with the chosen (or newly created) value. */
|
|
173
188
|
onChange: (value: string) => void;
|
|
189
|
+
/** Placeholder for the input (falls back to i18n default). */
|
|
174
190
|
placeholder?: string;
|
|
175
191
|
className?: string;
|
|
192
|
+
/** Disable interaction and dim the control. */
|
|
176
193
|
disabled?: boolean;
|
|
194
|
+
/** Allow entering a value not in `options` (creatable). @defaultValue true */
|
|
177
195
|
allowCustom?: boolean;
|
|
196
|
+
/** Label template for the "create new" row; `{value}` is replaced with the typed text. */
|
|
178
197
|
creatableText?: string;
|
|
179
198
|
}
|
|
199
|
+
/** Searchable, optionally creatable combobox — type to filter, Enter to pick or create. */
|
|
180
200
|
declare function Combobox({ options, value, onChange, placeholder, className, disabled, allowCustom, creatableText, }: ComboboxProps): React$1.JSX.Element;
|
|
181
201
|
|
|
182
202
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
183
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Visual style. Options: `primary`, `secondary`, `ghost`, `accent`, `outline`, `amber`, `red`/`destructive`.
|
|
205
|
+
* @defaultValue "default"
|
|
206
|
+
*/
|
|
207
|
+
variant?: /** @deprecated alias of `primary` */ "default" | "primary" | "secondary" | "ghost" | "accent" | "outline" | "amber" | /** @deprecated alias of `destructive` */ "red" | "destructive";
|
|
208
|
+
/** Size: `sm`, `md` (default), `lg`, or `icon` (square 40×40). */
|
|
184
209
|
size?: "sm" | "md" | "lg" | "icon";
|
|
210
|
+
/** Show a spinner before the children and disable the button while busy. */
|
|
185
211
|
loading?: boolean;
|
|
186
212
|
/** Render the single child element with the button styling instead of a <button> (e.g. wrap a <Link>). */
|
|
187
213
|
asChild?: boolean;
|
|
188
214
|
}
|
|
215
|
+
/** Primary action button with style variants, sizes, a loading spinner, and `asChild` slotting. */
|
|
189
216
|
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
190
217
|
interface InputProps extends React$1.InputHTMLAttributes<HTMLInputElement> {
|
|
218
|
+
/** Leading icon rendered inside the field on the left. */
|
|
191
219
|
icon?: React$1.ReactNode;
|
|
220
|
+
/** Error message shown below the field; also switches the border to a red error style. */
|
|
192
221
|
error?: string;
|
|
193
222
|
}
|
|
223
|
+
/** Single-line text input with an optional leading icon and inline error message. */
|
|
194
224
|
declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
195
225
|
interface TextareaProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
226
|
+
/** Error message shown below the field; also switches the border to a red error style. */
|
|
196
227
|
error?: string;
|
|
197
228
|
}
|
|
229
|
+
/** Multi-line text input with an inline error message. */
|
|
198
230
|
declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
199
231
|
interface CardProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
232
|
+
/** Add a hover lift (border + shadow transition). */
|
|
200
233
|
hover?: boolean;
|
|
201
234
|
}
|
|
235
|
+
/** Surface container rendering the canonical `.card` style. */
|
|
202
236
|
declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
203
237
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
|
|
238
|
+
/** Semantic color: `default` (neutral), `success`, `warning`, `error`, or `info`. */
|
|
204
239
|
variant?: "default" | "success" | "warning" | "error" | "info";
|
|
205
240
|
}
|
|
241
|
+
/** Small inline pill for status/labels, with semantic color variants. */
|
|
206
242
|
declare function Badge({ className, variant, ...props }: BadgeProps): React$1.JSX.Element;
|
|
243
|
+
/** Radix Dialog root — controls open state for a modal dialog. Compose with Dialog* parts. */
|
|
207
244
|
declare const Dialog: React$1.FC<DialogPrimitive.DialogProps>;
|
|
245
|
+
/** Element that opens the dialog when activated. */
|
|
208
246
|
declare const DialogTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
247
|
+
/** Portals dialog content into the document body. */
|
|
209
248
|
declare const DialogPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
|
|
249
|
+
/** Element that closes the dialog when activated. */
|
|
210
250
|
declare const DialogClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
251
|
+
/** Dimmed, blurred backdrop behind the dialog content. */
|
|
211
252
|
declare const DialogOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
253
|
+
/** Centered, animated dialog panel (includes the overlay and a built-in close button). */
|
|
212
254
|
declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
255
|
+
/** Header layout block for the dialog title/description. */
|
|
213
256
|
declare function DialogHeader({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
257
|
+
/** Accessible dialog title (labels the dialog for screen readers). */
|
|
214
258
|
declare const DialogTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
259
|
+
/** Accessible dialog description (supplementary text under the title). */
|
|
215
260
|
declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
261
|
+
/** Footer layout block (right-aligned action buttons) for the dialog. */
|
|
216
262
|
declare function DialogFooter({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
263
|
+
/** Radix Select root — a styled native-feeling single-select. Compose with Select* parts. */
|
|
217
264
|
declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
|
|
265
|
+
/** Renders the selected value (or placeholder) inside the trigger. */
|
|
218
266
|
declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
267
|
+
/** Groups related SelectItems together. */
|
|
219
268
|
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
269
|
+
/** Button that opens the select dropdown and shows the current value. */
|
|
220
270
|
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
271
|
+
/** Portalled, animated dropdown panel holding the SelectItems. */
|
|
221
272
|
declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
273
|
+
/** A selectable option in the dropdown (shows a check when selected). */
|
|
222
274
|
declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
275
|
+
/** Range slider with a track, filled range, and draggable thumb. */
|
|
223
276
|
declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
277
|
+
/** Horizontal progress bar; `value` is the percent complete (0–100). */
|
|
224
278
|
declare const Progress: React$1.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
279
|
+
/** Percent complete, 0–100. */
|
|
225
280
|
value?: number;
|
|
226
281
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
282
|
+
/** Radix Tabs root — manages the active tab. Compose with TabsList/TabsTrigger/TabsContent. */
|
|
227
283
|
declare const Tabs: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
284
|
+
/** Horizontal container holding the TabsTriggers. */
|
|
228
285
|
declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
286
|
+
/** Clickable tab that activates its matching TabsContent. */
|
|
229
287
|
declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
288
|
+
/** Panel shown when its matching TabsTrigger is active. */
|
|
230
289
|
declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
290
|
+
/** Circular avatar container. Compose with AvatarImage + AvatarFallback. */
|
|
231
291
|
declare const Avatar: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
292
|
+
/** The avatar's image; falls back to AvatarFallback if it fails to load. */
|
|
232
293
|
declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
|
|
294
|
+
/** Placeholder (e.g. initials) shown when the avatar image is missing or loading. */
|
|
233
295
|
declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
296
|
+
/** Wraps tooltips to share open/close timing; place once near the app root. */
|
|
234
297
|
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
298
|
+
/** Radix Tooltip root — pairs a trigger with its content. */
|
|
235
299
|
declare const Tooltip: React$1.FC<TooltipPrimitive.TooltipProps>;
|
|
300
|
+
/** Element that shows the tooltip on hover/focus. */
|
|
236
301
|
declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
302
|
+
/** The floating tooltip bubble. */
|
|
237
303
|
declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
304
|
+
/** Pulsing placeholder block for loading states; size it via `className`. */
|
|
238
305
|
declare function Skeleton({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
239
306
|
interface SpinnerProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
307
|
+
/** Size: `sm` (16px), `md` (24px, default), or `lg` (32px). */
|
|
240
308
|
size?: "sm" | "md" | "lg";
|
|
241
309
|
}
|
|
310
|
+
/** Animated loading spinner with an accessible "Loading…" label. */
|
|
242
311
|
declare function Spinner({ size, className, ...props }: SpinnerProps): React$1.JSX.Element;
|
|
243
312
|
interface PageLoaderProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
313
|
+
/** Primary loading message shown under the spinner. */
|
|
244
314
|
title?: string;
|
|
315
|
+
/** Secondary, lighter message under the title. */
|
|
245
316
|
subtitle?: string;
|
|
246
317
|
}
|
|
318
|
+
/** Full-viewport centered loading screen with a spinner and optional title/subtitle. */
|
|
247
319
|
declare function PageLoader({ title, subtitle, className, ...props }: PageLoaderProps): React$1.JSX.Element;
|
|
248
320
|
interface EmptyStateProps {
|
|
321
|
+
/** Icon/illustration shown above the title. */
|
|
249
322
|
icon?: React$1.ReactNode;
|
|
323
|
+
/** Heading text. */
|
|
250
324
|
title: string;
|
|
325
|
+
/** Supporting text below the title. */
|
|
251
326
|
description?: string;
|
|
327
|
+
/** Action slot (e.g. a primary button) below the text. */
|
|
252
328
|
action?: React$1.ReactNode;
|
|
253
329
|
}
|
|
330
|
+
/** Centered "nothing here" placeholder with an icon, title, description, and action. */
|
|
254
331
|
declare function EmptyState({ icon, title, description, action }: EmptyStateProps): React$1.JSX.Element;
|
|
255
332
|
declare const MotionDiv: framer_motion.ForwardRefComponent<HTMLDivElement, framer_motion.HTMLMotionProps<"div">>;
|
|
256
333
|
declare const MotionSpan: framer_motion.ForwardRefComponent<HTMLSpanElement, framer_motion.HTMLMotionProps<"span">>;
|
|
@@ -289,80 +366,126 @@ declare const staggerItem: {
|
|
|
289
366
|
};
|
|
290
367
|
};
|
|
291
368
|
interface IconButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
369
|
+
/** The icon to render inside the button. */
|
|
292
370
|
icon: React$1.ReactNode;
|
|
371
|
+
/** Accessible label, also shown as the hover tooltip. */
|
|
293
372
|
label: string;
|
|
294
373
|
}
|
|
374
|
+
/** Icon-only button with a built-in tooltip (uses `label` for both a11y and the tooltip text). */
|
|
295
375
|
declare const IconButton: React$1.ForwardRefExoticComponent<IconButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
376
|
+
/** Uppercase, muted form-field label. */
|
|
296
377
|
declare function Label({ className, ...props }: React$1.LabelHTMLAttributes<HTMLLabelElement>): React$1.JSX.Element;
|
|
378
|
+
/** Radix DropdownMenu root — a contextual actions menu. Compose with DropdownMenu* parts. */
|
|
297
379
|
declare const DropdownMenu: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
380
|
+
/** Element that opens the dropdown menu. */
|
|
298
381
|
declare const DropdownMenuTrigger: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
382
|
+
/** Groups related menu items. */
|
|
299
383
|
declare const DropdownMenuGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
384
|
+
/** Portals menu content into the document body. */
|
|
300
385
|
declare const DropdownMenuPortal: React$1.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
386
|
+
/** Wraps a nested submenu (use with DropdownMenuSubTrigger/SubContent). */
|
|
301
387
|
declare const DropdownMenuSub: React$1.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
388
|
+
/** Groups DropdownMenuRadioItems into a single-choice set. */
|
|
302
389
|
declare const DropdownMenuRadioGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
390
|
+
/** Item that opens a nested submenu. `inset` adds left padding to align with checkable items. */
|
|
303
391
|
declare const DropdownMenuSubTrigger: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
304
392
|
inset?: boolean;
|
|
305
393
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
394
|
+
/** The panel for a nested submenu. */
|
|
306
395
|
declare const DropdownMenuSubContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
396
|
+
/** Portalled, animated dropdown menu panel holding the items. */
|
|
307
397
|
declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
398
|
+
/** A clickable menu action. `inset` adds left padding to align with checkable items. */
|
|
308
399
|
declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
400
|
+
/** Indent to align with checkbox/radio items. */
|
|
309
401
|
inset?: boolean;
|
|
310
402
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
403
|
+
/** A toggleable menu item showing a check when `checked`. */
|
|
311
404
|
declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
405
|
+
/** A single-choice menu item; use inside a DropdownMenuRadioGroup. */
|
|
312
406
|
declare const DropdownMenuRadioItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
407
|
+
/** Non-interactive section heading inside the menu. `inset` indents it to align with items. */
|
|
313
408
|
declare const DropdownMenuLabel: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
409
|
+
/** Indent to align with checkbox/radio items. */
|
|
314
410
|
inset?: boolean;
|
|
315
411
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
412
|
+
/** Thin divider between groups of menu items. */
|
|
316
413
|
declare const DropdownMenuSeparator: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
414
|
+
/** Right-aligned keyboard-shortcut hint shown inside a menu item. */
|
|
317
415
|
declare const DropdownMenuShortcut: {
|
|
318
416
|
({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): React$1.JSX.Element;
|
|
319
417
|
displayName: string;
|
|
320
418
|
};
|
|
321
419
|
|
|
322
420
|
interface SelectOption {
|
|
421
|
+
/** The value reported to `onChange` when selected. */
|
|
323
422
|
value: string;
|
|
423
|
+
/** Display text for the option. */
|
|
324
424
|
label: string;
|
|
425
|
+
/** Optional leading icon shown next to the label. */
|
|
325
426
|
icon?: React.ReactNode;
|
|
427
|
+
/** Optional secondary line shown under the label. */
|
|
326
428
|
description?: string;
|
|
327
429
|
}
|
|
328
430
|
interface CustomSelectProps {
|
|
431
|
+
/** The selectable options. */
|
|
329
432
|
options: SelectOption[];
|
|
433
|
+
/** Currently selected value (controlled). */
|
|
330
434
|
value: string;
|
|
435
|
+
/** Called with the chosen option's value. */
|
|
331
436
|
onChange: (value: string) => void;
|
|
437
|
+
/** Placeholder shown when nothing is selected (falls back to i18n default). */
|
|
332
438
|
placeholder?: string;
|
|
439
|
+
/** Show an in-dropdown search box that filters options by label/value. */
|
|
333
440
|
searchable?: boolean;
|
|
334
441
|
className?: string;
|
|
442
|
+
/** Disable interaction and dim the control. */
|
|
335
443
|
disabled?: boolean;
|
|
336
444
|
}
|
|
445
|
+
/** Custom dropdown select with optional search, icons, descriptions, and full keyboard support. */
|
|
337
446
|
declare function CustomSelect({ options, value, onChange, placeholder, searchable, className, disabled, }: CustomSelectProps): React$1.JSX.Element;
|
|
338
447
|
|
|
339
448
|
interface SegmentedOption<T = string> {
|
|
449
|
+
/** The value reported to `onChange` when selected. */
|
|
340
450
|
value: T;
|
|
451
|
+
/** Display text for the segment. */
|
|
341
452
|
label: string;
|
|
453
|
+
/** Optional native tooltip (`title`) for the segment. */
|
|
342
454
|
desc?: string;
|
|
455
|
+
/** Optional Lucide icon shown before the label. */
|
|
343
456
|
icon?: LucideIcon;
|
|
344
457
|
}
|
|
345
458
|
interface SegmentedSelectProps<T = string> {
|
|
459
|
+
/** The selectable segments. */
|
|
346
460
|
options: SegmentedOption<T>[];
|
|
461
|
+
/** Currently selected value (controlled). */
|
|
347
462
|
value: T;
|
|
463
|
+
/** Called with the chosen segment's value. */
|
|
348
464
|
onChange: (value: T) => void;
|
|
349
465
|
className?: string;
|
|
466
|
+
/** Disable interaction and dim the control. */
|
|
350
467
|
disabled?: boolean;
|
|
351
468
|
}
|
|
469
|
+
/** Inline segmented control — a row of buttons where one option is active at a time. */
|
|
352
470
|
declare function SegmentedSelect<T = string>({ options, value, onChange, className, disabled, }: SegmentedSelectProps<T>): React$1.JSX.Element;
|
|
353
471
|
|
|
354
472
|
interface NavTab {
|
|
473
|
+
/** Unique key; matched against `activeKey` to mark the active tab. */
|
|
355
474
|
key: string;
|
|
475
|
+
/** Tab label content. */
|
|
356
476
|
label: ReactNode;
|
|
357
477
|
/** When set, the tab renders as a route Link instead of a button. */
|
|
358
478
|
href?: string;
|
|
359
479
|
}
|
|
360
480
|
interface NavTabsProps {
|
|
481
|
+
/** The tabs to render. */
|
|
361
482
|
tabs: NavTab[];
|
|
483
|
+
/** Key of the currently active tab. */
|
|
362
484
|
activeKey: string;
|
|
363
485
|
/** Called for button-mode (in-page) tabs. Ignored when tabs use `href`. */
|
|
364
486
|
onChange?: (key: string) => void;
|
|
365
487
|
className?: string;
|
|
488
|
+
/** Accessible label for the tab `<nav>`. */
|
|
366
489
|
ariaLabel?: string;
|
|
367
490
|
}
|
|
368
491
|
/**
|
|
@@ -373,32 +496,45 @@ interface NavTabsProps {
|
|
|
373
496
|
*/
|
|
374
497
|
declare function NavTabs({ tabs, activeKey, onChange, className, ariaLabel }: NavTabsProps): React$1.JSX.Element;
|
|
375
498
|
|
|
499
|
+
/** CTA button with an animated shimmer sweep and a trailing arrow; renders a Link when `href` is set. */
|
|
376
500
|
declare function ShinyButton({ children, className, href, onClick, }: {
|
|
377
501
|
children: ReactNode;
|
|
378
502
|
className?: string;
|
|
503
|
+
/** When set, renders as a routing Link to this destination instead of a button. */
|
|
379
504
|
href?: string;
|
|
380
505
|
onClick?: () => void;
|
|
381
506
|
}): React$1.JSX.Element;
|
|
382
507
|
|
|
508
|
+
/** Infinitely scrolling row (or column) that repeats its children; supports reverse direction and pause-on-hover. */
|
|
383
509
|
declare function Marquee({ className, reverse, pauseOnHover, children, vertical, repeat, ...props }: {
|
|
384
510
|
className?: string;
|
|
511
|
+
/** Scroll in the opposite direction. */
|
|
385
512
|
reverse?: boolean;
|
|
513
|
+
/** Pause the animation while hovered. */
|
|
386
514
|
pauseOnHover?: boolean;
|
|
387
515
|
children?: React.ReactNode;
|
|
516
|
+
/** Scroll vertically instead of horizontally. */
|
|
388
517
|
vertical?: boolean;
|
|
518
|
+
/** How many times to repeat the children to fill the loop. @defaultValue 4 */
|
|
389
519
|
repeat?: number;
|
|
390
520
|
[key: string]: unknown;
|
|
391
521
|
}): React$1.JSX.Element;
|
|
392
522
|
|
|
523
|
+
/** Responsive bento-style grid container for BentoCard children. */
|
|
393
524
|
declare const BentoGrid: ({ className, children, }: {
|
|
394
525
|
className?: string;
|
|
395
526
|
children?: ReactNode;
|
|
396
527
|
}) => React$1.JSX.Element;
|
|
528
|
+
/** A glass card tile for use inside a BentoGrid, with a header slot, icon, title, and description. */
|
|
397
529
|
declare const BentoCard: ({ className, title, description, header, icon, }: {
|
|
398
530
|
className?: string;
|
|
531
|
+
/** Card title. */
|
|
399
532
|
title?: string | ReactNode;
|
|
533
|
+
/** Card body text. */
|
|
400
534
|
description?: string | ReactNode;
|
|
535
|
+
/** Top media/visual slot above the icon and text. */
|
|
401
536
|
header?: ReactNode;
|
|
537
|
+
/** Icon shown above the title. */
|
|
402
538
|
icon?: ReactNode;
|
|
403
539
|
}) => React$1.JSX.Element;
|
|
404
540
|
|
|
@@ -416,24 +552,32 @@ declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrim
|
|
|
416
552
|
declare const PopoverClose: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
417
553
|
|
|
418
554
|
interface ThemeToggleProps {
|
|
419
|
-
/** Visual variant */
|
|
555
|
+
/** Visual variant: `icon` (default, icon-only) or `pill`. */
|
|
420
556
|
variant?: "icon" | "pill";
|
|
421
|
-
/** Dropdown alignment */
|
|
557
|
+
/** Dropdown alignment: `left` or `right` (default). */
|
|
422
558
|
align?: "left" | "right";
|
|
423
559
|
/** Additional className */
|
|
424
560
|
className?: string;
|
|
425
561
|
}
|
|
562
|
+
/** Theme switcher dropdown (light / dark / true-black / system) backed by next-themes. */
|
|
426
563
|
declare function ThemeToggle({ variant, align, className }: ThemeToggleProps): React$1.JSX.Element;
|
|
427
564
|
|
|
428
565
|
interface SwitchProps {
|
|
566
|
+
/** Whether the switch is on (controlled). */
|
|
429
567
|
checked: boolean;
|
|
568
|
+
/** Called with the next checked state when toggled. */
|
|
430
569
|
onCheckedChange: (checked: boolean) => void;
|
|
570
|
+
/** Disable interaction and dim the control. */
|
|
431
571
|
disabled?: boolean;
|
|
572
|
+
/** Size: `sm` (default) or `md`. */
|
|
432
573
|
size?: "sm" | "md";
|
|
574
|
+
/** Checked-state color: `default`, `success`, `warning`, or `danger`. */
|
|
433
575
|
variant?: "default" | "success" | "warning" | "danger";
|
|
434
576
|
className?: string;
|
|
577
|
+
/** Element id (e.g. to pair with a `<label htmlFor>`). */
|
|
435
578
|
id?: string;
|
|
436
579
|
}
|
|
580
|
+
/** Controlled on/off toggle rendered as an accessible switch button. */
|
|
437
581
|
declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
438
582
|
|
|
439
583
|
interface AnimatedNumberProps {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { AnimatedNumber, Avatar, AvatarFallback, AvatarImage, Badge, BentoCard, BentoGrid, Button, Card, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ConfirmModal, CustomSelect, DeleteConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, IconButton, Input, Label, Marquee, Modal, MotionDiv, MotionSpan, NavTabs, PageLoader, Popover, PopoverClose, PopoverContent, PopoverTrigger, Progress, RegenerateConfirmModal, SegmentedSelect, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Sheet, ShinyButton, Skeleton, Slider, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, fadeIn, staggerContainer, staggerItem, toast, useBodyScrollLock, useEscapeKey, useModalBehavior } from './chunk-
|
|
3
|
-
export { ThemeToggle, cn } from './chunk-
|
|
2
|
+
export { AnimatedNumber, Avatar, AvatarFallback, AvatarImage, Badge, BentoCard, BentoGrid, Button, Card, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ConfirmModal, CustomSelect, DeleteConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, IconButton, Input, Label, Marquee, Modal, MotionDiv, MotionSpan, NavTabs, PageLoader, Popover, PopoverClose, PopoverContent, PopoverTrigger, Progress, RegenerateConfirmModal, SegmentedSelect, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Sheet, ShinyButton, Skeleton, Slider, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, fadeIn, staggerContainer, staggerItem, toast, useBodyScrollLock, useEscapeKey, useModalBehavior } from './chunk-EFIELFBW.js';
|
|
3
|
+
export { ThemeToggle, cn } from './chunk-N7JHOWGR.js';
|
|
4
4
|
import './chunk-T37N6OZA.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/patterns.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ declare function BackgroundEffects(): React$1.JSX.Element;
|
|
|
6
6
|
declare function CodeDemo(): React$1.JSX.Element;
|
|
7
7
|
|
|
8
8
|
interface FAQItem {
|
|
9
|
+
/** The question heading. */
|
|
9
10
|
question: string;
|
|
11
|
+
/** The answer content (revealed when expanded). */
|
|
10
12
|
answer: React.ReactNode;
|
|
11
13
|
}
|
|
12
14
|
interface FAQProps {
|
|
@@ -15,23 +17,35 @@ interface FAQProps {
|
|
|
15
17
|
/** Which item starts expanded (default: first). Pass null for all collapsed. */
|
|
16
18
|
defaultOpenIndex?: number | null;
|
|
17
19
|
}
|
|
20
|
+
/** Accordion list of questions where one item expands at a time. */
|
|
18
21
|
declare function FAQ({ items, defaultOpenIndex }: FAQProps): React$1.JSX.Element;
|
|
19
22
|
|
|
20
23
|
interface Tab {
|
|
24
|
+
/** Unique tab id. */
|
|
21
25
|
id: string;
|
|
26
|
+
/** Tab label shown in the header. */
|
|
22
27
|
label: string;
|
|
28
|
+
/** Code shown when this tab is active. */
|
|
23
29
|
code: string;
|
|
30
|
+
/** Language for this tab's code. */
|
|
24
31
|
language?: string;
|
|
25
32
|
}
|
|
26
33
|
interface CodeBlockProps {
|
|
34
|
+
/** The code to display (ignored when `tabs` are provided). */
|
|
27
35
|
code: string;
|
|
36
|
+
/** Language label, also used by the lightweight highlighter. @defaultValue "text" */
|
|
28
37
|
language?: string;
|
|
38
|
+
/** Filename shown in the header instead of the language badge. */
|
|
29
39
|
filename?: string;
|
|
40
|
+
/** Show line numbers in the gutter. @defaultValue true */
|
|
30
41
|
showLineNumbers?: boolean;
|
|
42
|
+
/** Show the copy-to-clipboard button. @defaultValue true */
|
|
31
43
|
copyable?: boolean;
|
|
32
44
|
className?: string;
|
|
45
|
+
/** Render multiple switchable code tabs instead of a single `code` block. */
|
|
33
46
|
tabs?: Tab[];
|
|
34
47
|
}
|
|
48
|
+
/** Styled code block with a window-chrome header, optional tabs, line numbers, basic syntax highlighting, and copy. */
|
|
35
49
|
declare function CodeBlock({ code, language, filename, showLineNumbers, copyable, className, tabs, }: CodeBlockProps): React$1.JSX.Element;
|
|
36
50
|
|
|
37
51
|
declare function LLMCopyButton({ markdownUrl }: {
|
|
@@ -43,23 +57,34 @@ declare function ViewOptions({ markdownUrl, githubUrl, }: {
|
|
|
43
57
|
}): React$1.JSX.Element;
|
|
44
58
|
|
|
45
59
|
interface BlogCardProps {
|
|
60
|
+
/** Post title. */
|
|
46
61
|
title: string;
|
|
62
|
+
/** Short excerpt/summary. */
|
|
47
63
|
description?: string;
|
|
64
|
+
/** Publish date (ISO string); formatted via `locale`. */
|
|
48
65
|
date?: string;
|
|
66
|
+
/** Post author (name shown in the meta row). */
|
|
49
67
|
author?: {
|
|
50
68
|
name?: string;
|
|
51
69
|
avatar?: string;
|
|
52
70
|
url?: string;
|
|
53
71
|
};
|
|
72
|
+
/** Category label shown as an info badge. */
|
|
54
73
|
category?: string;
|
|
74
|
+
/** Tag list (first 3 rendered as clickable chips). */
|
|
55
75
|
tags?: string[];
|
|
76
|
+
/** Estimated reading time in minutes. */
|
|
56
77
|
readingTime?: number;
|
|
78
|
+
/** Cover image URL; a placeholder icon is shown when absent. */
|
|
57
79
|
coverImage?: string;
|
|
80
|
+
/** Destination the card links to. */
|
|
58
81
|
url: string;
|
|
82
|
+
/** Layout: `default` or `featured` (spans 2 columns on `md`+). */
|
|
59
83
|
variant?: "default" | "featured";
|
|
60
84
|
/** Locale for the date; defaults to a stable "en-US" (SSR-safe). */
|
|
61
85
|
locale?: string;
|
|
62
86
|
}
|
|
87
|
+
/** Blog post preview card with cover image, category, meta (date/reading time/author), and tags. */
|
|
63
88
|
declare function BlogCard({ title, description, date, author, category, tags, readingTime, coverImage, url, variant, locale, }: BlogCardProps): React$1.JSX.Element;
|
|
64
89
|
|
|
65
90
|
interface BlogPostHeaderProps {
|
|
@@ -102,28 +127,39 @@ interface CategoryFilterProps {
|
|
|
102
127
|
declare function CategoryFilter({ categories, selectedCategory, onSelect, allLabel, }: CategoryFilterProps): React$1.JSX.Element;
|
|
103
128
|
|
|
104
129
|
interface SidebarNavItem {
|
|
130
|
+
/** Link text. */
|
|
105
131
|
label: string;
|
|
132
|
+
/** Destination href; also the basis for active-state matching. */
|
|
106
133
|
href: string;
|
|
134
|
+
/** Optional leading icon component. */
|
|
107
135
|
icon?: ElementType;
|
|
108
136
|
/** Extra path prefixes that should also mark this item active. */
|
|
109
137
|
match?: string[];
|
|
110
138
|
}
|
|
111
139
|
interface SidebarSection {
|
|
140
|
+
/** Optional section heading. */
|
|
112
141
|
title?: string;
|
|
142
|
+
/** Nav items in this section. */
|
|
113
143
|
items: SidebarNavItem[];
|
|
114
144
|
}
|
|
115
145
|
interface SidebarProps {
|
|
146
|
+
/** Brand name shown next to the logo. */
|
|
116
147
|
appName: string;
|
|
148
|
+
/** Logo image src. @defaultValue "/favicon.ico" */
|
|
117
149
|
logoSrc?: string;
|
|
150
|
+
/** Where the logo links to. @defaultValue "/" */
|
|
118
151
|
homeHref?: string;
|
|
152
|
+
/** Grouped navigation sections. */
|
|
119
153
|
sections: SidebarSection[];
|
|
120
154
|
/** Used to compute the active item. */
|
|
121
155
|
currentPath?: string;
|
|
122
156
|
/** Mobile drawer open state. */
|
|
123
157
|
isOpen?: boolean;
|
|
158
|
+
/** Called to close the mobile drawer. */
|
|
124
159
|
onClose?: () => void;
|
|
125
160
|
/** Desktop collapse state (hides the sidebar off-canvas). */
|
|
126
161
|
collapsed?: boolean;
|
|
162
|
+
/** Called to toggle the desktop collapse state (also renders the collapse button when set). */
|
|
127
163
|
onToggleCollapse?: () => void;
|
|
128
164
|
/**
|
|
129
165
|
* Called when a nav item is clicked. When provided, default link navigation
|
|
@@ -133,12 +169,14 @@ interface SidebarProps {
|
|
|
133
169
|
onNavigate?: (href: string) => void;
|
|
134
170
|
/** Bottom-pinned slot (balance card, user card, etc.). */
|
|
135
171
|
footer?: ReactNode;
|
|
172
|
+
/** Accessible label for the close/collapse buttons. @defaultValue "Close" */
|
|
136
173
|
closeLabel?: string;
|
|
137
174
|
/** While true, the nav (and footer slot) render shimmer skeletons. */
|
|
138
175
|
loading?: boolean;
|
|
139
176
|
/** sessionStorage key for persisting nav scroll position across navigations. */
|
|
140
177
|
scrollStorageKey?: string;
|
|
141
178
|
}
|
|
179
|
+
/** App navigation sidebar: logo, grouped nav sections with active-state matching, a mobile drawer, desktop collapse, and a footer slot. */
|
|
142
180
|
declare function Sidebar({ appName, logoSrc, homeHref, sections, currentPath, isOpen, onClose, collapsed, onToggleCollapse, onNavigate, footer, closeLabel, loading, scrollStorageKey, }: SidebarProps): React$1.JSX.Element;
|
|
143
181
|
|
|
144
182
|
interface PageHeaderProps {
|
|
@@ -150,21 +188,32 @@ interface PageHeaderProps {
|
|
|
150
188
|
declare function PageHeader({ title, description, actions, className }: PageHeaderProps): React$1.JSX.Element;
|
|
151
189
|
|
|
152
190
|
interface PageLoadingStateProps {
|
|
191
|
+
/** Optional text shown beside the spinner. */
|
|
153
192
|
message?: string;
|
|
154
193
|
}
|
|
194
|
+
/** Centered in-page loading state (spinner + optional message). */
|
|
155
195
|
declare function PageLoadingState({ message }: PageLoadingStateProps): React$1.JSX.Element;
|
|
156
196
|
interface PageErrorStateProps {
|
|
197
|
+
/** Error message to display. */
|
|
157
198
|
message: string;
|
|
199
|
+
/** When provided, shows a retry link that calls this. */
|
|
158
200
|
onRetry?: () => void;
|
|
201
|
+
/** Label for the retry link. @defaultValue "Retry" */
|
|
159
202
|
retryLabel?: string;
|
|
160
203
|
}
|
|
204
|
+
/** Centered in-page error state with an optional retry link. */
|
|
161
205
|
declare function PageErrorState({ message, onRetry, retryLabel }: PageErrorStateProps): React$1.JSX.Element;
|
|
162
206
|
interface PageEmptyStateProps {
|
|
207
|
+
/** Optional icon component shown above the title. */
|
|
163
208
|
icon?: ElementType;
|
|
209
|
+
/** Heading text. */
|
|
164
210
|
title: string;
|
|
211
|
+
/** Supporting text below the title. */
|
|
165
212
|
description?: string;
|
|
213
|
+
/** Action slot (e.g. a button) below the text. */
|
|
166
214
|
action?: ReactNode;
|
|
167
215
|
}
|
|
216
|
+
/** Centered in-page empty state with an icon, title, description, and optional action. */
|
|
168
217
|
declare function PageEmptyState({ icon: Icon, title, description, action }: PageEmptyStateProps): React$1.JSX.Element;
|
|
169
218
|
|
|
170
219
|
/**
|
|
@@ -178,10 +227,15 @@ declare const TONES: Record<string, {
|
|
|
178
227
|
value: string;
|
|
179
228
|
}>;
|
|
180
229
|
interface StatCardProps {
|
|
230
|
+
/** Optional leading icon component (e.g. a Lucide icon). */
|
|
181
231
|
icon?: ElementType;
|
|
232
|
+
/** Metric name. */
|
|
182
233
|
label: string;
|
|
234
|
+
/** The metric value (string, number, or node). */
|
|
183
235
|
value: ReactNode;
|
|
236
|
+
/** Optional supporting line under the value. */
|
|
184
237
|
subtext?: ReactNode;
|
|
238
|
+
/** Optional trend indicator: percent `value` plus whether it's `positive` (up/green) or down/red. */
|
|
185
239
|
trend?: {
|
|
186
240
|
value: number;
|
|
187
241
|
positive: boolean;
|
|
@@ -259,27 +313,41 @@ interface AccountLockedCardProps {
|
|
|
259
313
|
declare function AccountLockedCard({ appName, logoSrc, icon, title, subtitle, appeal, backLabel, onBack, onMount, loading, children, }: AccountLockedCardProps): React$1.JSX.Element;
|
|
260
314
|
|
|
261
315
|
interface MediaPageHeaderProps {
|
|
316
|
+
/** Page title. */
|
|
262
317
|
title: string;
|
|
318
|
+
/** Page subtitle/description. */
|
|
263
319
|
description: string;
|
|
320
|
+
/** While true, the sync button spins and is disabled. */
|
|
264
321
|
isSyncing: boolean;
|
|
322
|
+
/** Sync error message; shown in a red banner when non-null. */
|
|
265
323
|
syncError: string | null;
|
|
324
|
+
/** Called when the sync button is clicked. */
|
|
266
325
|
onSync: () => void;
|
|
326
|
+
/** Optional inline stat chips (`label` + `value`) below the header. */
|
|
267
327
|
stats?: {
|
|
268
328
|
label: string;
|
|
269
329
|
value: string | number;
|
|
270
330
|
}[];
|
|
271
331
|
}
|
|
332
|
+
/** Media library page header with a title, description, sync button, error banner, and optional stats. */
|
|
272
333
|
declare function MediaPageHeader({ title, description, isSyncing, syncError, onSync, stats }: MediaPageHeaderProps): React$1.JSX.Element;
|
|
273
334
|
interface MediaEmptyStateProps {
|
|
335
|
+
/** Icon component shown above the title. */
|
|
274
336
|
icon: ElementType;
|
|
337
|
+
/** Heading text. */
|
|
275
338
|
title: string;
|
|
339
|
+
/** Supporting text below the title. */
|
|
276
340
|
description: string;
|
|
341
|
+
/** Action slot (e.g. a button) below the text. */
|
|
277
342
|
action?: ReactNode;
|
|
278
343
|
}
|
|
344
|
+
/** Empty state for media pages (icon, title, description, optional action). */
|
|
279
345
|
declare function MediaEmptyState({ icon: Icon, title, description, action }: MediaEmptyStateProps): React$1.JSX.Element;
|
|
346
|
+
/** Loading state for media pages (spinning sync icon + message, falls back to i18n default). */
|
|
280
347
|
declare function MediaLoadingState({ message }: {
|
|
281
348
|
message?: string;
|
|
282
349
|
}): React$1.JSX.Element;
|
|
350
|
+
/** Error state for media pages with an optional retry button. */
|
|
283
351
|
declare function MediaErrorState({ message, onRetry }: {
|
|
284
352
|
message: string;
|
|
285
353
|
onRetry?: () => void;
|
package/dist/patterns.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Button, Card, Badge, Avatar, AvatarImage, AvatarFallback, IconButton, Spinner } from './chunk-
|
|
2
|
+
import { Button, Card, Badge, Avatar, AvatarImage, AvatarFallback, IconButton, Spinner } from './chunk-EFIELFBW.js';
|
|
3
3
|
import { copyToClipboard } from './chunk-WASCOOVD.js';
|
|
4
|
-
import { cn } from './chunk-
|
|
4
|
+
import { cn } from './chunk-N7JHOWGR.js';
|
|
5
5
|
import { useYunUI } from './chunk-T37N6OZA.js';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import React, { useState, useEffect, useCallback, useRef } from 'react';
|