@aviala-design/spiral 2.8.1 → 3.0.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/dist/chunk-CXGFGGGI.cjs +174 -0
- package/dist/chunk-CXGFGGGI.cjs.map +1 -0
- package/dist/chunk-XVABQUTX.js +174 -0
- package/dist/chunk-XVABQUTX.js.map +1 -0
- package/dist/component-changelogs.json +155 -0
- package/dist/form-field-context-XYh-G1KL.d.cts +7 -0
- package/dist/form-field-context-XYh-G1KL.d.ts +7 -0
- package/dist/form.cjs +187 -0
- package/dist/form.cjs.map +1 -0
- package/dist/form.d.cts +85 -0
- package/dist/form.d.ts +85 -0
- package/dist/form.js +187 -0
- package/dist/form.js.map +1 -0
- package/dist/index.cjs +4643 -3506
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +86 -99
- package/dist/index.d.ts +86 -99
- package/dist/index.js +3481 -2419
- package/dist/index.js.map +1 -1
- package/dist/props.json +214 -12
- package/dist/styles.css +273 -65
- package/package.json +17 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, CSSProperties, ButtonHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, ComponentPropsWithoutRef, HTMLAttributes, ImgHTMLAttributes, MouseEvent, AnchorHTMLAttributes,
|
|
2
|
+
import { ReactNode, CSSProperties, ButtonHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, ComponentPropsWithoutRef, HTMLAttributes, ImgHTMLAttributes, MouseEvent, AnchorHTMLAttributes, VideoHTMLAttributes } from 'react';
|
|
3
3
|
import { ThemeMode, PaletteConfig, BaseNumbersDensity, ThemePreset } from '@aviala-design/tokens';
|
|
4
4
|
export { BaseNumbersDensity, DEFAULT_PALETTE_CONFIG, HueFamily, PALETTE_HUE_FAMILIES, PaletteConfig } from '@aviala-design/tokens';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
@@ -9,8 +9,7 @@ import * as LabelPrimitive from '@radix-ui/react-label';
|
|
|
9
9
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
10
10
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
11
11
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
12
|
-
|
|
13
|
-
import { FieldValues, FieldPath, UseControllerProps, Control, ControllerRenderProps, ControllerFieldState, UseFormStateReturn } from 'react-hook-form';
|
|
12
|
+
export { u as useResolvedControlError } from './form-field-context-XYh-G1KL.cjs';
|
|
14
13
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
15
14
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
16
15
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -144,6 +143,9 @@ type Locale = {
|
|
|
144
143
|
Modal: {
|
|
145
144
|
close: string;
|
|
146
145
|
};
|
|
146
|
+
Drawer: {
|
|
147
|
+
close: string;
|
|
148
|
+
};
|
|
147
149
|
Feedback: {
|
|
148
150
|
close: string;
|
|
149
151
|
};
|
|
@@ -188,7 +190,7 @@ type LocaleProviderProps = {
|
|
|
188
190
|
/** Locale pack. Defaults to `zhCN`. */
|
|
189
191
|
locale?: Locale;
|
|
190
192
|
};
|
|
191
|
-
declare function LocaleProvider({ children, locale }: LocaleProviderProps): react.JSX.Element;
|
|
193
|
+
declare function LocaleProvider({ children, locale, }: LocaleProviderProps): react.JSX.Element;
|
|
192
194
|
|
|
193
195
|
/** Current locale pack (falls back to zh-CN when no Provider). */
|
|
194
196
|
declare function useLocale(): Locale;
|
|
@@ -437,12 +439,7 @@ declare namespace SelectSubMenu {
|
|
|
437
439
|
var displayName: string;
|
|
438
440
|
}
|
|
439
441
|
type SelectProps = ComponentPropsWithoutRef<typeof SelectPrimitive.Root>;
|
|
440
|
-
|
|
441
|
-
* Radix Select closes on `window` blur (e.g. focusing DevTools). Suppress only
|
|
442
|
-
* blur-initiated closes; pointer-down (outside click, item select, trigger toggle)
|
|
443
|
-
* and Escape must still dismiss on the first interaction.
|
|
444
|
-
*/
|
|
445
|
-
declare function Select({ open: openProp, defaultOpen, onOpenChange, ...props }: SelectProps): react.JSX.Element;
|
|
442
|
+
declare function Select({ open: openProp, defaultOpen, onOpenChange, disabled, ...props }: SelectProps): react.JSX.Element;
|
|
446
443
|
declare const SelectValue: react.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & react.RefAttributes<HTMLSpanElement>>;
|
|
447
444
|
declare const SelectGroup: react.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
448
445
|
type SelectTriggerProps = ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> & {
|
|
@@ -745,7 +742,6 @@ type LoadingLevel = "display" | "headline1" | "headline2" | "title" | "subtitle"
|
|
|
745
742
|
type LoadingMode = "theme" | "themeText" | "black" | "white" | "inherit";
|
|
746
743
|
declare const loadingVariants: (props?: ({
|
|
747
744
|
level?: "display" | "headline1" | "headline2" | "title" | "subtitle" | "text" | "caption" | null | undefined;
|
|
748
|
-
mode?: "theme" | "themeText" | "black" | "white" | "inherit" | null | undefined;
|
|
749
745
|
lineHeightFix?: boolean | null | undefined;
|
|
750
746
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
751
747
|
declare const BUTTON_SIZE_TO_LOADING_LEVEL: {
|
|
@@ -757,14 +753,17 @@ declare const BUTTON_SIZE_TO_LOADING_LEVEL: {
|
|
|
757
753
|
type LoadingButtonSize = keyof typeof BUTTON_SIZE_TO_LOADING_LEVEL;
|
|
758
754
|
declare function loadingLevelForButtonSize(size: LoadingButtonSize): LoadingLevel;
|
|
759
755
|
type LoadingProps = HTMLAttributes<HTMLSpanElement> & VariantProps<typeof loadingVariants> & {
|
|
756
|
+
/** Ring color source; applied through the inline conic gradient, not a class. */
|
|
757
|
+
mode?: LoadingMode;
|
|
760
758
|
/** Accessible name; omit when decorative (`aria-hidden`). */
|
|
761
759
|
label?: string;
|
|
762
760
|
};
|
|
763
761
|
declare const Loading: react.ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
|
|
764
762
|
level?: "display" | "headline1" | "headline2" | "title" | "subtitle" | "text" | "caption" | null | undefined;
|
|
765
|
-
mode?: "theme" | "themeText" | "black" | "white" | "inherit" | null | undefined;
|
|
766
763
|
lineHeightFix?: boolean | null | undefined;
|
|
767
764
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
765
|
+
/** Ring color source; applied through the inline conic gradient, not a class. */
|
|
766
|
+
mode?: LoadingMode;
|
|
768
767
|
/** Accessible name; omit when decorative (`aria-hidden`). */
|
|
769
768
|
label?: string;
|
|
770
769
|
} & react.RefAttributes<HTMLSpanElement>>;
|
|
@@ -932,89 +931,6 @@ declare const SegmentatorItem: react.ForwardRefExoticComponent<Omit<ButtonHTMLAt
|
|
|
932
931
|
iconOnly?: boolean;
|
|
933
932
|
} & react.RefAttributes<HTMLButtonElement>>;
|
|
934
933
|
|
|
935
|
-
/** Figma Components → System Composition → Form (527:57461 / 527:57641) */
|
|
936
|
-
type FormFieldDirection = "vertical" | "horizontal";
|
|
937
|
-
/**
|
|
938
|
-
* Resolve a control `error` prop against the surrounding FormField.
|
|
939
|
-
* Explicit `error={true|false}` wins; otherwise inherits FormField tip invalidity.
|
|
940
|
-
*/
|
|
941
|
-
declare function useResolvedControlError(errorProp?: boolean): boolean;
|
|
942
|
-
/** Layout mode — the original props-driven wrapper */
|
|
943
|
-
type FormFieldLayoutProps = HTMLAttributes<HTMLDivElement> & {
|
|
944
|
-
label?: ReactNode;
|
|
945
|
-
htmlFor?: string;
|
|
946
|
-
description?: ReactNode;
|
|
947
|
-
error?: ReactNode;
|
|
948
|
-
info?: ReactNode;
|
|
949
|
-
/** Optional Alert / Feedback under the control */
|
|
950
|
-
alert?: ReactNode;
|
|
951
|
-
required?: boolean;
|
|
952
|
-
/** Figma `Direction` — vertical stacks label above control; horizontal places label beside */
|
|
953
|
-
direction?: FormFieldDirection;
|
|
954
|
-
children?: ReactNode;
|
|
955
|
-
};
|
|
956
|
-
/** Render arguments passed to `render` in react-hook-form mode */
|
|
957
|
-
type FormFieldRenderProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
958
|
-
field: ControllerRenderProps<TFieldValues, TName>;
|
|
959
|
-
fieldState: ControllerFieldState;
|
|
960
|
-
formState: UseFormStateReturn<TFieldValues>;
|
|
961
|
-
/**
|
|
962
|
-
* Auto-generated control id. The field label is already wired to it via
|
|
963
|
-
* `htmlFor` — pass it to the underlying input (`<Input id={id} />`).
|
|
964
|
-
*/
|
|
965
|
-
id: string;
|
|
966
|
-
};
|
|
967
|
-
/**
|
|
968
|
-
* react-hook-form mode — bind the field to a form via `name` (+ optional
|
|
969
|
-
* `control`; falls back to the surrounding `<Form>` context). Validation
|
|
970
|
-
* errors from the resolver (zod etc.) are rendered automatically unless the
|
|
971
|
-
* `error` prop overrides them. Nested controls inherit the invalid state via
|
|
972
|
-
* context unless they set an explicit `error` prop.
|
|
973
|
-
*/
|
|
974
|
-
type FormFieldControlledProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = Omit<FormFieldLayoutProps, "children" | "htmlFor"> & Pick<UseControllerProps<TFieldValues, TName>, "rules" | "defaultValue" | "shouldUnregister" | "disabled"> & {
|
|
975
|
-
name: TName;
|
|
976
|
-
control?: Control<TFieldValues>;
|
|
977
|
-
render: (props: FormFieldRenderProps<TFieldValues, TName>) => ReactNode;
|
|
978
|
-
/** Overrides the validation error message shown under the control */
|
|
979
|
-
error?: ReactNode;
|
|
980
|
-
};
|
|
981
|
-
type FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = FormFieldLayoutProps | FormFieldControlledProps<TFieldValues, TName>;
|
|
982
|
-
/**
|
|
983
|
-
* FormField — layout wrapper around a form control, or a react-hook-form
|
|
984
|
-
* bound field when given `name` + `render` (shadcn-style).
|
|
985
|
-
*
|
|
986
|
-
* When an error tip is shown, nested Spiral controls that support `error`
|
|
987
|
-
* (Input, Textarea, SelectTrigger, …) inherit the invalid state unless they
|
|
988
|
-
* set an explicit `error` prop.
|
|
989
|
-
*
|
|
990
|
-
* @example Layout mode
|
|
991
|
-
* <FormField label="Email" htmlFor="email" error="Required">
|
|
992
|
-
* <Input id="email" />
|
|
993
|
-
* </FormField>
|
|
994
|
-
*
|
|
995
|
-
* @example react-hook-form + zod mode
|
|
996
|
-
* <Form {...form}>
|
|
997
|
-
* <form onSubmit={form.handleSubmit(onSubmit)}>
|
|
998
|
-
* <FormField
|
|
999
|
-
* control={form.control}
|
|
1000
|
-
* name="email"
|
|
1001
|
-
* label="Email"
|
|
1002
|
-
* render={({ field, id }) => (
|
|
1003
|
-
* <Input id={id} {...field} />
|
|
1004
|
-
* )}
|
|
1005
|
-
* />
|
|
1006
|
-
* </form>
|
|
1007
|
-
* </Form>
|
|
1008
|
-
*/
|
|
1009
|
-
declare const FormField: {
|
|
1010
|
-
<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: FormFieldProps<TFieldValues, TName> & {
|
|
1011
|
-
ref?: Ref<HTMLDivElement>;
|
|
1012
|
-
}): ReactElement | null;
|
|
1013
|
-
displayName?: string;
|
|
1014
|
-
};
|
|
1015
|
-
/** Alias of react-hook-form's FormProvider — wrap your form with it (shadcn-style `<Form {...form}>`) */
|
|
1016
|
-
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
1017
|
-
|
|
1018
934
|
/** Figma Components → System Composition → Typography (128:85) */
|
|
1019
935
|
type TypographyLevel = "display" | "headline1" | "headline2" | "title" | "subtitle" | "text" | "caption";
|
|
1020
936
|
type TypographyContent = "text" | "number";
|
|
@@ -1372,9 +1288,11 @@ type CascaderItemProps = {
|
|
|
1372
1288
|
declare const CascaderItem: react.ForwardRefExoticComponent<CascaderItemProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1373
1289
|
type CascaderOptionsMenuProps = {
|
|
1374
1290
|
className?: string;
|
|
1291
|
+
/** Optional group header above each column's options — omitted by default */
|
|
1292
|
+
groupTitle?: ReactNode;
|
|
1375
1293
|
};
|
|
1376
1294
|
/** Renders cascade columns from `Cascader` `options` prop. */
|
|
1377
|
-
declare function CascaderOptionsMenu({ className }: CascaderOptionsMenuProps): react.JSX.Element;
|
|
1295
|
+
declare function CascaderOptionsMenu({ className, groupTitle, }: CascaderOptionsMenuProps): react.JSX.Element;
|
|
1378
1296
|
type CascaderFieldProps = Omit<CascaderProps, "children"> & Omit<CascaderTriggerProps, "displayValue"> & {
|
|
1379
1297
|
contentClassName?: string;
|
|
1380
1298
|
menuClassName?: string;
|
|
@@ -1578,7 +1496,7 @@ type TimePickerWheelsProps = {
|
|
|
1578
1496
|
onChange: (value: TimePickerWheelsValue) => void;
|
|
1579
1497
|
className?: string;
|
|
1580
1498
|
};
|
|
1581
|
-
declare function TimePickerWheels({ value, onChange, className }: TimePickerWheelsProps): react.JSX.Element;
|
|
1499
|
+
declare function TimePickerWheels({ value, onChange, className, }: TimePickerWheelsProps): react.JSX.Element;
|
|
1582
1500
|
|
|
1583
1501
|
type PopoverProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>;
|
|
1584
1502
|
/**
|
|
@@ -1757,6 +1675,75 @@ declare const ModalBody: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivE
|
|
|
1757
1675
|
type ModalFooterProps = HTMLAttributes<HTMLDivElement>;
|
|
1758
1676
|
declare const ModalFooter: react.ForwardRefExoticComponent<ModalFooterProps & react.RefAttributes<HTMLDivElement>>;
|
|
1759
1677
|
|
|
1678
|
+
/** Figma Components → Drawer (2051:26823) */
|
|
1679
|
+
type DrawerPosition = "left" | "right" | "top" | "bottom";
|
|
1680
|
+
declare const drawerContentVariants: (props?: ({
|
|
1681
|
+
position?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
1682
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1683
|
+
type DrawerProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
|
|
1684
|
+
declare const Drawer: react.FC<DialogPrimitive.DialogProps>;
|
|
1685
|
+
declare const DrawerTrigger: react.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1686
|
+
declare const DrawerPortal: react.FC<DialogPrimitive.DialogPortalProps>;
|
|
1687
|
+
declare const DrawerClose: react.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1688
|
+
type DrawerOverlayProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
|
|
1689
|
+
declare const DrawerOverlay: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
1690
|
+
type DrawerContentProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & VariantProps<typeof drawerContentVariants> & {
|
|
1691
|
+
/** Render without Portal — use inside nested overlays. */
|
|
1692
|
+
portalled?: boolean;
|
|
1693
|
+
/** Show the default overlay scrim. */
|
|
1694
|
+
showOverlay?: boolean;
|
|
1695
|
+
};
|
|
1696
|
+
declare const DrawerContent: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & VariantProps<(props?: ({
|
|
1697
|
+
position?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
1698
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
1699
|
+
/** Render without Portal — use inside nested overlays. */
|
|
1700
|
+
portalled?: boolean;
|
|
1701
|
+
/** Show the default overlay scrim. */
|
|
1702
|
+
showOverlay?: boolean;
|
|
1703
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
1704
|
+
type DrawerHeaderProps = HTMLAttributes<HTMLDivElement> & {
|
|
1705
|
+
/** Optional leading status icon */
|
|
1706
|
+
icon?: ReactNode;
|
|
1707
|
+
/** Show the leading icon slot */
|
|
1708
|
+
showIcon?: boolean;
|
|
1709
|
+
/** Show the header close control */
|
|
1710
|
+
showClose?: boolean;
|
|
1711
|
+
closeLabel?: string;
|
|
1712
|
+
};
|
|
1713
|
+
declare const DrawerHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
1714
|
+
/** Optional leading status icon */
|
|
1715
|
+
icon?: ReactNode;
|
|
1716
|
+
/** Show the leading icon slot */
|
|
1717
|
+
showIcon?: boolean;
|
|
1718
|
+
/** Show the header close control */
|
|
1719
|
+
showClose?: boolean;
|
|
1720
|
+
closeLabel?: string;
|
|
1721
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
1722
|
+
type DrawerTitleProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
|
1723
|
+
declare const DrawerTitle: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & react.RefAttributes<HTMLHeadingElement>, "ref"> & react.RefAttributes<HTMLHeadingElement>>;
|
|
1724
|
+
type DrawerDescriptionProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
|
1725
|
+
declare const DrawerDescription: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & react.RefAttributes<HTMLParagraphElement>, "ref"> & react.RefAttributes<HTMLParagraphElement>>;
|
|
1726
|
+
/** Convenience wrapper — Figma header Typeface (text + caption). */
|
|
1727
|
+
type DrawerHeaderTextProps = Omit<DrawerHeaderProps, "children"> & {
|
|
1728
|
+
title: ReactNode;
|
|
1729
|
+
description?: ReactNode;
|
|
1730
|
+
};
|
|
1731
|
+
declare function DrawerHeaderText({ title, description, ...props }: DrawerHeaderTextProps): react.JSX.Element;
|
|
1732
|
+
type DrawerBodyProps = HTMLAttributes<HTMLDivElement> & {
|
|
1733
|
+
/** Figma `Content=Text` — title + body copy preset */
|
|
1734
|
+
layout?: "default" | "text";
|
|
1735
|
+
title?: ReactNode;
|
|
1736
|
+
description?: ReactNode;
|
|
1737
|
+
};
|
|
1738
|
+
declare const DrawerBody: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
1739
|
+
/** Figma `Content=Text` — title + body copy preset */
|
|
1740
|
+
layout?: "default" | "text";
|
|
1741
|
+
title?: ReactNode;
|
|
1742
|
+
description?: ReactNode;
|
|
1743
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
1744
|
+
type DrawerFooterProps = HTMLAttributes<HTMLDivElement>;
|
|
1745
|
+
declare const DrawerFooter: react.ForwardRefExoticComponent<DrawerFooterProps & react.RefAttributes<HTMLDivElement>>;
|
|
1746
|
+
|
|
1760
1747
|
/** Default show delay — 300ms per ALD / Radix convention. */
|
|
1761
1748
|
declare const TOOLTIP_DELAY_DURATION = 300;
|
|
1762
1749
|
interface TooltipProviderProps {
|
|
@@ -2002,7 +1989,7 @@ type ListItemGroupProps = {
|
|
|
2002
1989
|
className?: string;
|
|
2003
1990
|
};
|
|
2004
1991
|
/** Convenience wrapper — titled list section (Figma List title + card) */
|
|
2005
|
-
declare function ListItemGroup({ label, children, className }: ListItemGroupProps): react.JSX.Element;
|
|
1992
|
+
declare function ListItemGroup({ label, children, className, }: ListItemGroupProps): react.JSX.Element;
|
|
2006
1993
|
type ListDividerProps = HTMLAttributes<HTMLSpanElement>;
|
|
2007
1994
|
/** Vertical divider between trailing actions (Figma `last` separator) */
|
|
2008
1995
|
declare const ListDivider: react.ForwardRefExoticComponent<ListDividerProps & react.RefAttributes<HTMLSpanElement>>;
|
|
@@ -2722,4 +2709,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
2722
2709
|
*/
|
|
2723
2710
|
declare function initKeyboardFocus(): void;
|
|
2724
2711
|
|
|
2725
|
-
export { Alert, type AlertAppearance, type AlertProps, type AlertSize, type AlertType, Anchor, type AnchorIndentLevel, AnchorItem, type AnchorItemProps, type AnchorProps, Avatar, type AvatarContent, type AvatarLevel, type AvatarProps, Badge, type BadgeLevel, type BadgeLineHeightFix, type BadgeProps, type BadgeStyle, Breadcrumb, BreadcrumbEllipsis, BreadcrumbEllipsisItem, type BreadcrumbEllipsisItemProps, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, type BreadcrumbSize, Button, type ButtonMode, type ButtonProps, type ButtonSize, Card, CardBody, type CardBodyProps, CardBottom, type CardBottomProps, CardHead, type CardHeadProps, type CardProps, type CardSlotType, Cascader, CascaderColumn, type CascaderColumnProps, CascaderContent, type CascaderContentProps, CascaderField, type CascaderFieldProps, CascaderItem, type CascaderItemFunction, CascaderItemGroup, type CascaderItemGroupProps, type CascaderItemLayout, type CascaderItemProps, CascaderMenu, type CascaderMenuProps, type CascaderOption, CascaderOptionsMenu, type CascaderOptionsMenuProps, type CascaderProps, type CascaderSize, CascaderTrigger, type CascaderTriggerProps, Checkbox, CheckboxGroup, type CheckboxGroupDirection, type CheckboxGroupProps, CheckboxInput, type CheckboxInputProps, type CheckboxProps, type CheckboxSize, type ColorFormat, ColorPickButton, type ColorPickButtonProps, ColorPicker, ColorPickerArea, type ColorPickerAreaProps, ColorPickerContent, type ColorPickerContentProps, ColorPickerInputs, type ColorPickerInputsProps, ColorPickerPanel, type ColorPickerPanelProps, ColorPickerPresets, type ColorPickerPresetsProps, type ColorPickerProps, ColorPickerSlider, type ColorPickerSliderProps, ColorPickerTrigger, type ColorPickerTriggerProps, ConfigProvider, type ConfigProviderProps, DEFAULT_COLOR, DEFAULT_PLAYBACK_RATES, DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerContent, type DatePickerContentProps, DatePickerField, type DatePickerFieldProps, type DatePickerMode, type DatePickerPanel, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DatePickerSize, type DatePickerTimeValue, DatePickerTrigger, type DatePickerTriggerProps, type DateRange, type Direction,
|
|
2712
|
+
export { Alert, type AlertAppearance, type AlertProps, type AlertSize, type AlertType, Anchor, type AnchorIndentLevel, AnchorItem, type AnchorItemProps, type AnchorProps, Avatar, type AvatarContent, type AvatarLevel, type AvatarProps, Badge, type BadgeLevel, type BadgeLineHeightFix, type BadgeProps, type BadgeStyle, Breadcrumb, BreadcrumbEllipsis, BreadcrumbEllipsisItem, type BreadcrumbEllipsisItemProps, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, type BreadcrumbSize, Button, type ButtonMode, type ButtonProps, type ButtonSize, Card, CardBody, type CardBodyProps, CardBottom, type CardBottomProps, CardHead, type CardHeadProps, type CardProps, type CardSlotType, Cascader, CascaderColumn, type CascaderColumnProps, CascaderContent, type CascaderContentProps, CascaderField, type CascaderFieldProps, CascaderItem, type CascaderItemFunction, CascaderItemGroup, type CascaderItemGroupProps, type CascaderItemLayout, type CascaderItemProps, CascaderMenu, type CascaderMenuProps, type CascaderOption, CascaderOptionsMenu, type CascaderOptionsMenuProps, type CascaderProps, type CascaderSize, CascaderTrigger, type CascaderTriggerProps, Checkbox, CheckboxGroup, type CheckboxGroupDirection, type CheckboxGroupProps, CheckboxInput, type CheckboxInputProps, type CheckboxProps, type CheckboxSize, type ColorFormat, ColorPickButton, type ColorPickButtonProps, ColorPicker, ColorPickerArea, type ColorPickerAreaProps, ColorPickerContent, type ColorPickerContentProps, ColorPickerInputs, type ColorPickerInputsProps, ColorPickerPanel, type ColorPickerPanelProps, ColorPickerPresets, type ColorPickerPresetsProps, type ColorPickerProps, ColorPickerSlider, type ColorPickerSliderProps, ColorPickerTrigger, type ColorPickerTriggerProps, ConfigProvider, type ConfigProviderProps, DEFAULT_COLOR, DEFAULT_PLAYBACK_RATES, DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerContent, type DatePickerContentProps, DatePickerField, type DatePickerFieldProps, type DatePickerMode, type DatePickerPanel, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DatePickerSize, type DatePickerTimeValue, DatePickerTrigger, type DatePickerTriggerProps, type DateRange, type Direction, Drawer, DrawerBody, type DrawerBodyProps, DrawerClose, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, DrawerHeaderText, type DrawerHeaderTextProps, DrawerOverlay, type DrawerOverlayProps, DrawerPortal, type DrawerPosition, type DrawerProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, Feedback, type FeedbackMode, type FeedbackProps, type FeedbackSize, type FeedbackType, Fieldset, type FieldsetProps, type HSVA, HoverPopover, type HoverPopoverProps, Input, InputGroup, InputGroupAddon, type InputGroupProps, type InputProps, type InputSize, Label, Link, type LinkLevel, type LinkMode, type LinkProps, List, ListDivider, type ListDividerProps, ListGroup, type ListGroupProps, ListItem, ListItemGroup, type ListItemGroupProps, type ListItemLeading, type ListItemProps, type ListItemType, type ListProps, ListSeparator, type ListSeparatorProps, ListTitle, type ListTitleProps, Loading, type LoadingButtonSize, type LoadingLevel, type LoadingMode, type LoadingProps, type Locale, type LocaleComponentName, LocaleProvider, type LocaleProviderProps, Modal, ModalBody, type ModalBodyProps, ModalClose, ModalContent, type ModalContentProps, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalHeaderText, type ModalHeaderTextProps, ModalOverlay, type ModalOverlayProps, ModalPortal, type ModalProps, type ModalSize, ModalTitle, type ModalTitleProps, ModalTrigger, Navigation, NavigationActions, type NavigationActionsProps, NavigationActionsSlot, type NavigationActionsSlotProps, type NavigationBackground, NavigationBrand, type NavigationBrandProps, NavigationBrandTitle, type NavigationBrandTitleProps, type NavigationDirection, NavigationGroup, type NavigationGroupProps, NavigationItem, NavigationItemGroup, type NavigationItemGroupProps, NavigationItemMenu, NavigationItemMenuContent, type NavigationItemMenuContentProps, NavigationItemMenuItem, type NavigationItemMenuItemProps, type NavigationItemMenuProps, NavigationItemMenuTrigger, type NavigationItemMenuTriggerProps, type NavigationItemProps, type NavigationItemType, type NavigationProps, NavigationSection, type NavigationSectionProps, NumberInput, type NumberInputProps, type NumberInputStyle, OverlayContainerProvider, type OverlayContainerProviderProps, Pagehead, type PageheadProps, Pagination, type PaginationProps, type PhysicalSide, Popover, PopoverAnchor, type PopoverAppearance, PopoverContent, type PopoverContentLevel, type PopoverContentProps, type PopoverProps, PopoverTrigger, Progress, type ProgressProps, type ProgressShape, type ProgressSize, type ProgressType, RESPONSIVE_TOOLTIP_LONG_PRESS_MS, RadioGroup, type RadioGroupDirection, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, RadioInput, type RadioInputProps, type RadioInputVariant, ResponsiveTooltip, type ResponsiveTooltipProps, Scroll, type ScrollOrientation, ScrollPicker, ScrollPickerColumn, type ScrollPickerColumnProps, ScrollPickerItem, type ScrollPickerItemProps, type ScrollPickerProps, type ScrollProps, type ScrollSize, type SegmentatorDirection, SegmentatorGroup, type SegmentatorGroupProps, SegmentatorItem, type SegmentatorItemProps, type SegmentatorMode, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemFunction, SelectItemGroup, type SelectItemGroupProps, type SelectItemLayout, SelectItemPeople, type SelectItemPeopleProps, type SelectItemProps, SelectLabel, type SelectLabelProps, SelectSeparator, type SelectSeparatorProps, type SelectSize, SelectSubItem, SelectSubItemPeople, type SelectSubItemPeopleProps, type SelectSubItemProps, SelectSubMenu, type SelectSubMenuProps, SelectTrigger, type SelectTriggerProps, SelectValue, Slider, type SliderProps, type SliderSize, type SliderType, Stack, type StackProps, Steps, type StepsDirection, StepsIcon, type StepsIconProps, StepsItem, type StepsItemProps, type StepsProps, type StepsState, Switch, type SwitchProps, type SwitchSize, TOOLTIP_DELAY_DURATION, Tab, type TabBackground, TabItem, type TabItemProps, type TabProps, type TabStyle, Table, TableCell, type TableCellContent, type TableCellProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tag, TagClose, type TagCloseProps, type TagContent, type TagLevel, type TagLineHeightFix, type TagProps, Textarea, type TextareaProps, type TextareaSize, ThemeProvider, type ThemeProviderProps, ThemeScript, TimePicker, TimePickerContent, type TimePickerContentProps, TimePickerField, type TimePickerFieldProps, TimePickerPanel, type TimePickerPanelProps, type TimePickerProps, type TimePickerSize, TimePickerTrigger, type TimePickerTriggerProps, type TimePickerValue, TimePickerWheels, type TimePickerWheelsValue, Tooltip, TooltipContent, type TooltipContentLevel, type TooltipContentProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, Typeface, type TypefaceContent, TypefacePair, type TypefacePairProps, type TypefaceProps, Typography, type TypographyContent, type TypographyLevel, type TypographyProps, type TypographyTone, Upload, type UploadProps, type UploadStyle, type UseColorPickerStateOptions, Video, type VideoAppearance, type VideoHandle, type VideoObjectFit, type VideoProps, alertVariants, backChevronSide, buttonVariants, cn, drawerContentVariants, enUS, formatDisplayDate, formatMonthYear, formatTimeValue, formatVideoTime, forwardChevronSide, initKeyboardFocus, inputRootVariants, interpolate, loadingLevelForButtonSize, mirrorSide, mirrorSideForDirection, modalContentVariants, numberInputRootVariants, parseDateInput, parseDateRangeInput, parseVideoTime, typographyVariants, useColorPickerState, useDirection, useLocale, useLocaleMessages, useOverlayPortalContainer, useRtl, useTheme, useThemeLayoutKey, videoObjectFitToCss, zhCN };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, CSSProperties, ButtonHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, ComponentPropsWithoutRef, HTMLAttributes, ImgHTMLAttributes, MouseEvent, AnchorHTMLAttributes,
|
|
2
|
+
import { ReactNode, CSSProperties, ButtonHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, ComponentPropsWithoutRef, HTMLAttributes, ImgHTMLAttributes, MouseEvent, AnchorHTMLAttributes, VideoHTMLAttributes } from 'react';
|
|
3
3
|
import { ThemeMode, PaletteConfig, BaseNumbersDensity, ThemePreset } from '@aviala-design/tokens';
|
|
4
4
|
export { BaseNumbersDensity, DEFAULT_PALETTE_CONFIG, HueFamily, PALETTE_HUE_FAMILIES, PaletteConfig } from '@aviala-design/tokens';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
@@ -9,8 +9,7 @@ import * as LabelPrimitive from '@radix-ui/react-label';
|
|
|
9
9
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
10
10
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
11
11
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
12
|
-
|
|
13
|
-
import { FieldValues, FieldPath, UseControllerProps, Control, ControllerRenderProps, ControllerFieldState, UseFormStateReturn } from 'react-hook-form';
|
|
12
|
+
export { u as useResolvedControlError } from './form-field-context-XYh-G1KL.js';
|
|
14
13
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
15
14
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
16
15
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -144,6 +143,9 @@ type Locale = {
|
|
|
144
143
|
Modal: {
|
|
145
144
|
close: string;
|
|
146
145
|
};
|
|
146
|
+
Drawer: {
|
|
147
|
+
close: string;
|
|
148
|
+
};
|
|
147
149
|
Feedback: {
|
|
148
150
|
close: string;
|
|
149
151
|
};
|
|
@@ -188,7 +190,7 @@ type LocaleProviderProps = {
|
|
|
188
190
|
/** Locale pack. Defaults to `zhCN`. */
|
|
189
191
|
locale?: Locale;
|
|
190
192
|
};
|
|
191
|
-
declare function LocaleProvider({ children, locale }: LocaleProviderProps): react.JSX.Element;
|
|
193
|
+
declare function LocaleProvider({ children, locale, }: LocaleProviderProps): react.JSX.Element;
|
|
192
194
|
|
|
193
195
|
/** Current locale pack (falls back to zh-CN when no Provider). */
|
|
194
196
|
declare function useLocale(): Locale;
|
|
@@ -437,12 +439,7 @@ declare namespace SelectSubMenu {
|
|
|
437
439
|
var displayName: string;
|
|
438
440
|
}
|
|
439
441
|
type SelectProps = ComponentPropsWithoutRef<typeof SelectPrimitive.Root>;
|
|
440
|
-
|
|
441
|
-
* Radix Select closes on `window` blur (e.g. focusing DevTools). Suppress only
|
|
442
|
-
* blur-initiated closes; pointer-down (outside click, item select, trigger toggle)
|
|
443
|
-
* and Escape must still dismiss on the first interaction.
|
|
444
|
-
*/
|
|
445
|
-
declare function Select({ open: openProp, defaultOpen, onOpenChange, ...props }: SelectProps): react.JSX.Element;
|
|
442
|
+
declare function Select({ open: openProp, defaultOpen, onOpenChange, disabled, ...props }: SelectProps): react.JSX.Element;
|
|
446
443
|
declare const SelectValue: react.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & react.RefAttributes<HTMLSpanElement>>;
|
|
447
444
|
declare const SelectGroup: react.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
448
445
|
type SelectTriggerProps = ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> & {
|
|
@@ -745,7 +742,6 @@ type LoadingLevel = "display" | "headline1" | "headline2" | "title" | "subtitle"
|
|
|
745
742
|
type LoadingMode = "theme" | "themeText" | "black" | "white" | "inherit";
|
|
746
743
|
declare const loadingVariants: (props?: ({
|
|
747
744
|
level?: "display" | "headline1" | "headline2" | "title" | "subtitle" | "text" | "caption" | null | undefined;
|
|
748
|
-
mode?: "theme" | "themeText" | "black" | "white" | "inherit" | null | undefined;
|
|
749
745
|
lineHeightFix?: boolean | null | undefined;
|
|
750
746
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
751
747
|
declare const BUTTON_SIZE_TO_LOADING_LEVEL: {
|
|
@@ -757,14 +753,17 @@ declare const BUTTON_SIZE_TO_LOADING_LEVEL: {
|
|
|
757
753
|
type LoadingButtonSize = keyof typeof BUTTON_SIZE_TO_LOADING_LEVEL;
|
|
758
754
|
declare function loadingLevelForButtonSize(size: LoadingButtonSize): LoadingLevel;
|
|
759
755
|
type LoadingProps = HTMLAttributes<HTMLSpanElement> & VariantProps<typeof loadingVariants> & {
|
|
756
|
+
/** Ring color source; applied through the inline conic gradient, not a class. */
|
|
757
|
+
mode?: LoadingMode;
|
|
760
758
|
/** Accessible name; omit when decorative (`aria-hidden`). */
|
|
761
759
|
label?: string;
|
|
762
760
|
};
|
|
763
761
|
declare const Loading: react.ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
|
|
764
762
|
level?: "display" | "headline1" | "headline2" | "title" | "subtitle" | "text" | "caption" | null | undefined;
|
|
765
|
-
mode?: "theme" | "themeText" | "black" | "white" | "inherit" | null | undefined;
|
|
766
763
|
lineHeightFix?: boolean | null | undefined;
|
|
767
764
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
765
|
+
/** Ring color source; applied through the inline conic gradient, not a class. */
|
|
766
|
+
mode?: LoadingMode;
|
|
768
767
|
/** Accessible name; omit when decorative (`aria-hidden`). */
|
|
769
768
|
label?: string;
|
|
770
769
|
} & react.RefAttributes<HTMLSpanElement>>;
|
|
@@ -932,89 +931,6 @@ declare const SegmentatorItem: react.ForwardRefExoticComponent<Omit<ButtonHTMLAt
|
|
|
932
931
|
iconOnly?: boolean;
|
|
933
932
|
} & react.RefAttributes<HTMLButtonElement>>;
|
|
934
933
|
|
|
935
|
-
/** Figma Components → System Composition → Form (527:57461 / 527:57641) */
|
|
936
|
-
type FormFieldDirection = "vertical" | "horizontal";
|
|
937
|
-
/**
|
|
938
|
-
* Resolve a control `error` prop against the surrounding FormField.
|
|
939
|
-
* Explicit `error={true|false}` wins; otherwise inherits FormField tip invalidity.
|
|
940
|
-
*/
|
|
941
|
-
declare function useResolvedControlError(errorProp?: boolean): boolean;
|
|
942
|
-
/** Layout mode — the original props-driven wrapper */
|
|
943
|
-
type FormFieldLayoutProps = HTMLAttributes<HTMLDivElement> & {
|
|
944
|
-
label?: ReactNode;
|
|
945
|
-
htmlFor?: string;
|
|
946
|
-
description?: ReactNode;
|
|
947
|
-
error?: ReactNode;
|
|
948
|
-
info?: ReactNode;
|
|
949
|
-
/** Optional Alert / Feedback under the control */
|
|
950
|
-
alert?: ReactNode;
|
|
951
|
-
required?: boolean;
|
|
952
|
-
/** Figma `Direction` — vertical stacks label above control; horizontal places label beside */
|
|
953
|
-
direction?: FormFieldDirection;
|
|
954
|
-
children?: ReactNode;
|
|
955
|
-
};
|
|
956
|
-
/** Render arguments passed to `render` in react-hook-form mode */
|
|
957
|
-
type FormFieldRenderProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
958
|
-
field: ControllerRenderProps<TFieldValues, TName>;
|
|
959
|
-
fieldState: ControllerFieldState;
|
|
960
|
-
formState: UseFormStateReturn<TFieldValues>;
|
|
961
|
-
/**
|
|
962
|
-
* Auto-generated control id. The field label is already wired to it via
|
|
963
|
-
* `htmlFor` — pass it to the underlying input (`<Input id={id} />`).
|
|
964
|
-
*/
|
|
965
|
-
id: string;
|
|
966
|
-
};
|
|
967
|
-
/**
|
|
968
|
-
* react-hook-form mode — bind the field to a form via `name` (+ optional
|
|
969
|
-
* `control`; falls back to the surrounding `<Form>` context). Validation
|
|
970
|
-
* errors from the resolver (zod etc.) are rendered automatically unless the
|
|
971
|
-
* `error` prop overrides them. Nested controls inherit the invalid state via
|
|
972
|
-
* context unless they set an explicit `error` prop.
|
|
973
|
-
*/
|
|
974
|
-
type FormFieldControlledProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = Omit<FormFieldLayoutProps, "children" | "htmlFor"> & Pick<UseControllerProps<TFieldValues, TName>, "rules" | "defaultValue" | "shouldUnregister" | "disabled"> & {
|
|
975
|
-
name: TName;
|
|
976
|
-
control?: Control<TFieldValues>;
|
|
977
|
-
render: (props: FormFieldRenderProps<TFieldValues, TName>) => ReactNode;
|
|
978
|
-
/** Overrides the validation error message shown under the control */
|
|
979
|
-
error?: ReactNode;
|
|
980
|
-
};
|
|
981
|
-
type FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = FormFieldLayoutProps | FormFieldControlledProps<TFieldValues, TName>;
|
|
982
|
-
/**
|
|
983
|
-
* FormField — layout wrapper around a form control, or a react-hook-form
|
|
984
|
-
* bound field when given `name` + `render` (shadcn-style).
|
|
985
|
-
*
|
|
986
|
-
* When an error tip is shown, nested Spiral controls that support `error`
|
|
987
|
-
* (Input, Textarea, SelectTrigger, …) inherit the invalid state unless they
|
|
988
|
-
* set an explicit `error` prop.
|
|
989
|
-
*
|
|
990
|
-
* @example Layout mode
|
|
991
|
-
* <FormField label="Email" htmlFor="email" error="Required">
|
|
992
|
-
* <Input id="email" />
|
|
993
|
-
* </FormField>
|
|
994
|
-
*
|
|
995
|
-
* @example react-hook-form + zod mode
|
|
996
|
-
* <Form {...form}>
|
|
997
|
-
* <form onSubmit={form.handleSubmit(onSubmit)}>
|
|
998
|
-
* <FormField
|
|
999
|
-
* control={form.control}
|
|
1000
|
-
* name="email"
|
|
1001
|
-
* label="Email"
|
|
1002
|
-
* render={({ field, id }) => (
|
|
1003
|
-
* <Input id={id} {...field} />
|
|
1004
|
-
* )}
|
|
1005
|
-
* />
|
|
1006
|
-
* </form>
|
|
1007
|
-
* </Form>
|
|
1008
|
-
*/
|
|
1009
|
-
declare const FormField: {
|
|
1010
|
-
<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: FormFieldProps<TFieldValues, TName> & {
|
|
1011
|
-
ref?: Ref<HTMLDivElement>;
|
|
1012
|
-
}): ReactElement | null;
|
|
1013
|
-
displayName?: string;
|
|
1014
|
-
};
|
|
1015
|
-
/** Alias of react-hook-form's FormProvider — wrap your form with it (shadcn-style `<Form {...form}>`) */
|
|
1016
|
-
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
1017
|
-
|
|
1018
934
|
/** Figma Components → System Composition → Typography (128:85) */
|
|
1019
935
|
type TypographyLevel = "display" | "headline1" | "headline2" | "title" | "subtitle" | "text" | "caption";
|
|
1020
936
|
type TypographyContent = "text" | "number";
|
|
@@ -1372,9 +1288,11 @@ type CascaderItemProps = {
|
|
|
1372
1288
|
declare const CascaderItem: react.ForwardRefExoticComponent<CascaderItemProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1373
1289
|
type CascaderOptionsMenuProps = {
|
|
1374
1290
|
className?: string;
|
|
1291
|
+
/** Optional group header above each column's options — omitted by default */
|
|
1292
|
+
groupTitle?: ReactNode;
|
|
1375
1293
|
};
|
|
1376
1294
|
/** Renders cascade columns from `Cascader` `options` prop. */
|
|
1377
|
-
declare function CascaderOptionsMenu({ className }: CascaderOptionsMenuProps): react.JSX.Element;
|
|
1295
|
+
declare function CascaderOptionsMenu({ className, groupTitle, }: CascaderOptionsMenuProps): react.JSX.Element;
|
|
1378
1296
|
type CascaderFieldProps = Omit<CascaderProps, "children"> & Omit<CascaderTriggerProps, "displayValue"> & {
|
|
1379
1297
|
contentClassName?: string;
|
|
1380
1298
|
menuClassName?: string;
|
|
@@ -1578,7 +1496,7 @@ type TimePickerWheelsProps = {
|
|
|
1578
1496
|
onChange: (value: TimePickerWheelsValue) => void;
|
|
1579
1497
|
className?: string;
|
|
1580
1498
|
};
|
|
1581
|
-
declare function TimePickerWheels({ value, onChange, className }: TimePickerWheelsProps): react.JSX.Element;
|
|
1499
|
+
declare function TimePickerWheels({ value, onChange, className, }: TimePickerWheelsProps): react.JSX.Element;
|
|
1582
1500
|
|
|
1583
1501
|
type PopoverProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>;
|
|
1584
1502
|
/**
|
|
@@ -1757,6 +1675,75 @@ declare const ModalBody: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivE
|
|
|
1757
1675
|
type ModalFooterProps = HTMLAttributes<HTMLDivElement>;
|
|
1758
1676
|
declare const ModalFooter: react.ForwardRefExoticComponent<ModalFooterProps & react.RefAttributes<HTMLDivElement>>;
|
|
1759
1677
|
|
|
1678
|
+
/** Figma Components → Drawer (2051:26823) */
|
|
1679
|
+
type DrawerPosition = "left" | "right" | "top" | "bottom";
|
|
1680
|
+
declare const drawerContentVariants: (props?: ({
|
|
1681
|
+
position?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
1682
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1683
|
+
type DrawerProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
|
|
1684
|
+
declare const Drawer: react.FC<DialogPrimitive.DialogProps>;
|
|
1685
|
+
declare const DrawerTrigger: react.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1686
|
+
declare const DrawerPortal: react.FC<DialogPrimitive.DialogPortalProps>;
|
|
1687
|
+
declare const DrawerClose: react.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1688
|
+
type DrawerOverlayProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
|
|
1689
|
+
declare const DrawerOverlay: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
1690
|
+
type DrawerContentProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & VariantProps<typeof drawerContentVariants> & {
|
|
1691
|
+
/** Render without Portal — use inside nested overlays. */
|
|
1692
|
+
portalled?: boolean;
|
|
1693
|
+
/** Show the default overlay scrim. */
|
|
1694
|
+
showOverlay?: boolean;
|
|
1695
|
+
};
|
|
1696
|
+
declare const DrawerContent: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & VariantProps<(props?: ({
|
|
1697
|
+
position?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
1698
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
1699
|
+
/** Render without Portal — use inside nested overlays. */
|
|
1700
|
+
portalled?: boolean;
|
|
1701
|
+
/** Show the default overlay scrim. */
|
|
1702
|
+
showOverlay?: boolean;
|
|
1703
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
1704
|
+
type DrawerHeaderProps = HTMLAttributes<HTMLDivElement> & {
|
|
1705
|
+
/** Optional leading status icon */
|
|
1706
|
+
icon?: ReactNode;
|
|
1707
|
+
/** Show the leading icon slot */
|
|
1708
|
+
showIcon?: boolean;
|
|
1709
|
+
/** Show the header close control */
|
|
1710
|
+
showClose?: boolean;
|
|
1711
|
+
closeLabel?: string;
|
|
1712
|
+
};
|
|
1713
|
+
declare const DrawerHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
1714
|
+
/** Optional leading status icon */
|
|
1715
|
+
icon?: ReactNode;
|
|
1716
|
+
/** Show the leading icon slot */
|
|
1717
|
+
showIcon?: boolean;
|
|
1718
|
+
/** Show the header close control */
|
|
1719
|
+
showClose?: boolean;
|
|
1720
|
+
closeLabel?: string;
|
|
1721
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
1722
|
+
type DrawerTitleProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
|
1723
|
+
declare const DrawerTitle: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & react.RefAttributes<HTMLHeadingElement>, "ref"> & react.RefAttributes<HTMLHeadingElement>>;
|
|
1724
|
+
type DrawerDescriptionProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
|
1725
|
+
declare const DrawerDescription: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & react.RefAttributes<HTMLParagraphElement>, "ref"> & react.RefAttributes<HTMLParagraphElement>>;
|
|
1726
|
+
/** Convenience wrapper — Figma header Typeface (text + caption). */
|
|
1727
|
+
type DrawerHeaderTextProps = Omit<DrawerHeaderProps, "children"> & {
|
|
1728
|
+
title: ReactNode;
|
|
1729
|
+
description?: ReactNode;
|
|
1730
|
+
};
|
|
1731
|
+
declare function DrawerHeaderText({ title, description, ...props }: DrawerHeaderTextProps): react.JSX.Element;
|
|
1732
|
+
type DrawerBodyProps = HTMLAttributes<HTMLDivElement> & {
|
|
1733
|
+
/** Figma `Content=Text` — title + body copy preset */
|
|
1734
|
+
layout?: "default" | "text";
|
|
1735
|
+
title?: ReactNode;
|
|
1736
|
+
description?: ReactNode;
|
|
1737
|
+
};
|
|
1738
|
+
declare const DrawerBody: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
1739
|
+
/** Figma `Content=Text` — title + body copy preset */
|
|
1740
|
+
layout?: "default" | "text";
|
|
1741
|
+
title?: ReactNode;
|
|
1742
|
+
description?: ReactNode;
|
|
1743
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
1744
|
+
type DrawerFooterProps = HTMLAttributes<HTMLDivElement>;
|
|
1745
|
+
declare const DrawerFooter: react.ForwardRefExoticComponent<DrawerFooterProps & react.RefAttributes<HTMLDivElement>>;
|
|
1746
|
+
|
|
1760
1747
|
/** Default show delay — 300ms per ALD / Radix convention. */
|
|
1761
1748
|
declare const TOOLTIP_DELAY_DURATION = 300;
|
|
1762
1749
|
interface TooltipProviderProps {
|
|
@@ -2002,7 +1989,7 @@ type ListItemGroupProps = {
|
|
|
2002
1989
|
className?: string;
|
|
2003
1990
|
};
|
|
2004
1991
|
/** Convenience wrapper — titled list section (Figma List title + card) */
|
|
2005
|
-
declare function ListItemGroup({ label, children, className }: ListItemGroupProps): react.JSX.Element;
|
|
1992
|
+
declare function ListItemGroup({ label, children, className, }: ListItemGroupProps): react.JSX.Element;
|
|
2006
1993
|
type ListDividerProps = HTMLAttributes<HTMLSpanElement>;
|
|
2007
1994
|
/** Vertical divider between trailing actions (Figma `last` separator) */
|
|
2008
1995
|
declare const ListDivider: react.ForwardRefExoticComponent<ListDividerProps & react.RefAttributes<HTMLSpanElement>>;
|
|
@@ -2722,4 +2709,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
2722
2709
|
*/
|
|
2723
2710
|
declare function initKeyboardFocus(): void;
|
|
2724
2711
|
|
|
2725
|
-
export { Alert, type AlertAppearance, type AlertProps, type AlertSize, type AlertType, Anchor, type AnchorIndentLevel, AnchorItem, type AnchorItemProps, type AnchorProps, Avatar, type AvatarContent, type AvatarLevel, type AvatarProps, Badge, type BadgeLevel, type BadgeLineHeightFix, type BadgeProps, type BadgeStyle, Breadcrumb, BreadcrumbEllipsis, BreadcrumbEllipsisItem, type BreadcrumbEllipsisItemProps, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, type BreadcrumbSize, Button, type ButtonMode, type ButtonProps, type ButtonSize, Card, CardBody, type CardBodyProps, CardBottom, type CardBottomProps, CardHead, type CardHeadProps, type CardProps, type CardSlotType, Cascader, CascaderColumn, type CascaderColumnProps, CascaderContent, type CascaderContentProps, CascaderField, type CascaderFieldProps, CascaderItem, type CascaderItemFunction, CascaderItemGroup, type CascaderItemGroupProps, type CascaderItemLayout, type CascaderItemProps, CascaderMenu, type CascaderMenuProps, type CascaderOption, CascaderOptionsMenu, type CascaderOptionsMenuProps, type CascaderProps, type CascaderSize, CascaderTrigger, type CascaderTriggerProps, Checkbox, CheckboxGroup, type CheckboxGroupDirection, type CheckboxGroupProps, CheckboxInput, type CheckboxInputProps, type CheckboxProps, type CheckboxSize, type ColorFormat, ColorPickButton, type ColorPickButtonProps, ColorPicker, ColorPickerArea, type ColorPickerAreaProps, ColorPickerContent, type ColorPickerContentProps, ColorPickerInputs, type ColorPickerInputsProps, ColorPickerPanel, type ColorPickerPanelProps, ColorPickerPresets, type ColorPickerPresetsProps, type ColorPickerProps, ColorPickerSlider, type ColorPickerSliderProps, ColorPickerTrigger, type ColorPickerTriggerProps, ConfigProvider, type ConfigProviderProps, DEFAULT_COLOR, DEFAULT_PLAYBACK_RATES, DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerContent, type DatePickerContentProps, DatePickerField, type DatePickerFieldProps, type DatePickerMode, type DatePickerPanel, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DatePickerSize, type DatePickerTimeValue, DatePickerTrigger, type DatePickerTriggerProps, type DateRange, type Direction,
|
|
2712
|
+
export { Alert, type AlertAppearance, type AlertProps, type AlertSize, type AlertType, Anchor, type AnchorIndentLevel, AnchorItem, type AnchorItemProps, type AnchorProps, Avatar, type AvatarContent, type AvatarLevel, type AvatarProps, Badge, type BadgeLevel, type BadgeLineHeightFix, type BadgeProps, type BadgeStyle, Breadcrumb, BreadcrumbEllipsis, BreadcrumbEllipsisItem, type BreadcrumbEllipsisItemProps, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, type BreadcrumbSize, Button, type ButtonMode, type ButtonProps, type ButtonSize, Card, CardBody, type CardBodyProps, CardBottom, type CardBottomProps, CardHead, type CardHeadProps, type CardProps, type CardSlotType, Cascader, CascaderColumn, type CascaderColumnProps, CascaderContent, type CascaderContentProps, CascaderField, type CascaderFieldProps, CascaderItem, type CascaderItemFunction, CascaderItemGroup, type CascaderItemGroupProps, type CascaderItemLayout, type CascaderItemProps, CascaderMenu, type CascaderMenuProps, type CascaderOption, CascaderOptionsMenu, type CascaderOptionsMenuProps, type CascaderProps, type CascaderSize, CascaderTrigger, type CascaderTriggerProps, Checkbox, CheckboxGroup, type CheckboxGroupDirection, type CheckboxGroupProps, CheckboxInput, type CheckboxInputProps, type CheckboxProps, type CheckboxSize, type ColorFormat, ColorPickButton, type ColorPickButtonProps, ColorPicker, ColorPickerArea, type ColorPickerAreaProps, ColorPickerContent, type ColorPickerContentProps, ColorPickerInputs, type ColorPickerInputsProps, ColorPickerPanel, type ColorPickerPanelProps, ColorPickerPresets, type ColorPickerPresetsProps, type ColorPickerProps, ColorPickerSlider, type ColorPickerSliderProps, ColorPickerTrigger, type ColorPickerTriggerProps, ConfigProvider, type ConfigProviderProps, DEFAULT_COLOR, DEFAULT_PLAYBACK_RATES, DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerContent, type DatePickerContentProps, DatePickerField, type DatePickerFieldProps, type DatePickerMode, type DatePickerPanel, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DatePickerSize, type DatePickerTimeValue, DatePickerTrigger, type DatePickerTriggerProps, type DateRange, type Direction, Drawer, DrawerBody, type DrawerBodyProps, DrawerClose, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, DrawerHeaderText, type DrawerHeaderTextProps, DrawerOverlay, type DrawerOverlayProps, DrawerPortal, type DrawerPosition, type DrawerProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, Feedback, type FeedbackMode, type FeedbackProps, type FeedbackSize, type FeedbackType, Fieldset, type FieldsetProps, type HSVA, HoverPopover, type HoverPopoverProps, Input, InputGroup, InputGroupAddon, type InputGroupProps, type InputProps, type InputSize, Label, Link, type LinkLevel, type LinkMode, type LinkProps, List, ListDivider, type ListDividerProps, ListGroup, type ListGroupProps, ListItem, ListItemGroup, type ListItemGroupProps, type ListItemLeading, type ListItemProps, type ListItemType, type ListProps, ListSeparator, type ListSeparatorProps, ListTitle, type ListTitleProps, Loading, type LoadingButtonSize, type LoadingLevel, type LoadingMode, type LoadingProps, type Locale, type LocaleComponentName, LocaleProvider, type LocaleProviderProps, Modal, ModalBody, type ModalBodyProps, ModalClose, ModalContent, type ModalContentProps, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalHeaderText, type ModalHeaderTextProps, ModalOverlay, type ModalOverlayProps, ModalPortal, type ModalProps, type ModalSize, ModalTitle, type ModalTitleProps, ModalTrigger, Navigation, NavigationActions, type NavigationActionsProps, NavigationActionsSlot, type NavigationActionsSlotProps, type NavigationBackground, NavigationBrand, type NavigationBrandProps, NavigationBrandTitle, type NavigationBrandTitleProps, type NavigationDirection, NavigationGroup, type NavigationGroupProps, NavigationItem, NavigationItemGroup, type NavigationItemGroupProps, NavigationItemMenu, NavigationItemMenuContent, type NavigationItemMenuContentProps, NavigationItemMenuItem, type NavigationItemMenuItemProps, type NavigationItemMenuProps, NavigationItemMenuTrigger, type NavigationItemMenuTriggerProps, type NavigationItemProps, type NavigationItemType, type NavigationProps, NavigationSection, type NavigationSectionProps, NumberInput, type NumberInputProps, type NumberInputStyle, OverlayContainerProvider, type OverlayContainerProviderProps, Pagehead, type PageheadProps, Pagination, type PaginationProps, type PhysicalSide, Popover, PopoverAnchor, type PopoverAppearance, PopoverContent, type PopoverContentLevel, type PopoverContentProps, type PopoverProps, PopoverTrigger, Progress, type ProgressProps, type ProgressShape, type ProgressSize, type ProgressType, RESPONSIVE_TOOLTIP_LONG_PRESS_MS, RadioGroup, type RadioGroupDirection, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, RadioInput, type RadioInputProps, type RadioInputVariant, ResponsiveTooltip, type ResponsiveTooltipProps, Scroll, type ScrollOrientation, ScrollPicker, ScrollPickerColumn, type ScrollPickerColumnProps, ScrollPickerItem, type ScrollPickerItemProps, type ScrollPickerProps, type ScrollProps, type ScrollSize, type SegmentatorDirection, SegmentatorGroup, type SegmentatorGroupProps, SegmentatorItem, type SegmentatorItemProps, type SegmentatorMode, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemFunction, SelectItemGroup, type SelectItemGroupProps, type SelectItemLayout, SelectItemPeople, type SelectItemPeopleProps, type SelectItemProps, SelectLabel, type SelectLabelProps, SelectSeparator, type SelectSeparatorProps, type SelectSize, SelectSubItem, SelectSubItemPeople, type SelectSubItemPeopleProps, type SelectSubItemProps, SelectSubMenu, type SelectSubMenuProps, SelectTrigger, type SelectTriggerProps, SelectValue, Slider, type SliderProps, type SliderSize, type SliderType, Stack, type StackProps, Steps, type StepsDirection, StepsIcon, type StepsIconProps, StepsItem, type StepsItemProps, type StepsProps, type StepsState, Switch, type SwitchProps, type SwitchSize, TOOLTIP_DELAY_DURATION, Tab, type TabBackground, TabItem, type TabItemProps, type TabProps, type TabStyle, Table, TableCell, type TableCellContent, type TableCellProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tag, TagClose, type TagCloseProps, type TagContent, type TagLevel, type TagLineHeightFix, type TagProps, Textarea, type TextareaProps, type TextareaSize, ThemeProvider, type ThemeProviderProps, ThemeScript, TimePicker, TimePickerContent, type TimePickerContentProps, TimePickerField, type TimePickerFieldProps, TimePickerPanel, type TimePickerPanelProps, type TimePickerProps, type TimePickerSize, TimePickerTrigger, type TimePickerTriggerProps, type TimePickerValue, TimePickerWheels, type TimePickerWheelsValue, Tooltip, TooltipContent, type TooltipContentLevel, type TooltipContentProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, Typeface, type TypefaceContent, TypefacePair, type TypefacePairProps, type TypefaceProps, Typography, type TypographyContent, type TypographyLevel, type TypographyProps, type TypographyTone, Upload, type UploadProps, type UploadStyle, type UseColorPickerStateOptions, Video, type VideoAppearance, type VideoHandle, type VideoObjectFit, type VideoProps, alertVariants, backChevronSide, buttonVariants, cn, drawerContentVariants, enUS, formatDisplayDate, formatMonthYear, formatTimeValue, formatVideoTime, forwardChevronSide, initKeyboardFocus, inputRootVariants, interpolate, loadingLevelForButtonSize, mirrorSide, mirrorSideForDirection, modalContentVariants, numberInputRootVariants, parseDateInput, parseDateRangeInput, parseVideoTime, typographyVariants, useColorPickerState, useDirection, useLocale, useLocaleMessages, useOverlayPortalContainer, useRtl, useTheme, useThemeLayoutKey, videoObjectFitToCss, zhCN };
|