@aviala-design/spiral 0.2.0 → 2.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/index.cjs +2633 -1291
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +133 -20
- package/dist/index.d.ts +133 -20
- package/dist/index.js +2641 -1291
- package/dist/index.js.map +1 -1
- package/dist/props.json +36 -10
- package/dist/styles.css +44 -17
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, ButtonHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, ComponentPropsWithoutRef, HTMLAttributes, ImgHTMLAttributes, MouseEvent, AnchorHTMLAttributes } from 'react';
|
|
2
|
+
import { ReactNode, ButtonHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, ComponentPropsWithoutRef, HTMLAttributes, ImgHTMLAttributes, MouseEvent, AnchorHTMLAttributes } 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';
|
|
@@ -140,14 +140,70 @@ declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HT
|
|
|
140
140
|
error?: boolean;
|
|
141
141
|
} & react.RefAttributes<HTMLInputElement>>;
|
|
142
142
|
|
|
143
|
-
/** Figma Components → Information Collect →
|
|
143
|
+
/** Figma Components → Information Collect → NumberInput (197:3237) */
|
|
144
|
+
type NumberInputStyle = "default" | "monospaced";
|
|
145
|
+
declare const numberInputRootVariants: (props?: ({
|
|
146
|
+
fullWidth?: boolean | null | undefined;
|
|
147
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
148
|
+
type NumberInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "value" | "defaultValue" | "onChange"> & {
|
|
149
|
+
/** Figma `Size` */
|
|
150
|
+
size?: InputSize;
|
|
151
|
+
/** Figma `All-Round` */
|
|
152
|
+
allRound?: boolean;
|
|
153
|
+
/** Figma `Style` — Default vs Monospaced (tabular / light numeric) */
|
|
154
|
+
inputStyle?: NumberInputStyle;
|
|
155
|
+
leftIcon?: ReactNode;
|
|
156
|
+
rightIcon?: ReactNode;
|
|
157
|
+
leftBadge?: ReactNode;
|
|
158
|
+
rightBadge?: ReactNode;
|
|
159
|
+
/** Figma `showNumberControlButton` — vertical steppers */
|
|
160
|
+
showControls?: boolean;
|
|
161
|
+
/** When false, input sizes to content */
|
|
162
|
+
fullWidth?: boolean;
|
|
163
|
+
error?: boolean;
|
|
164
|
+
value?: number | string | "";
|
|
165
|
+
defaultValue?: number | string;
|
|
166
|
+
step?: number;
|
|
167
|
+
min?: number;
|
|
168
|
+
max?: number;
|
|
169
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
170
|
+
/** Fires with the parsed number (or `null` when empty / invalid) */
|
|
171
|
+
onValueChange?: (value: number | null) => void;
|
|
172
|
+
};
|
|
173
|
+
declare const NumberInput: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "type" | "size"> & {
|
|
174
|
+
/** Figma `Size` */
|
|
175
|
+
size?: InputSize;
|
|
176
|
+
/** Figma `All-Round` */
|
|
177
|
+
allRound?: boolean;
|
|
178
|
+
/** Figma `Style` — Default vs Monospaced (tabular / light numeric) */
|
|
179
|
+
inputStyle?: NumberInputStyle;
|
|
180
|
+
leftIcon?: ReactNode;
|
|
181
|
+
rightIcon?: ReactNode;
|
|
182
|
+
leftBadge?: ReactNode;
|
|
183
|
+
rightBadge?: ReactNode;
|
|
184
|
+
/** Figma `showNumberControlButton` — vertical steppers */
|
|
185
|
+
showControls?: boolean;
|
|
186
|
+
/** When false, input sizes to content */
|
|
187
|
+
fullWidth?: boolean;
|
|
188
|
+
error?: boolean;
|
|
189
|
+
value?: number | string | "";
|
|
190
|
+
defaultValue?: number | string;
|
|
191
|
+
step?: number;
|
|
192
|
+
min?: number;
|
|
193
|
+
max?: number;
|
|
194
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
195
|
+
/** Fires with the parsed number (or `null` when empty / invalid) */
|
|
196
|
+
onValueChange?: (value: number | null) => void;
|
|
197
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
198
|
+
|
|
199
|
+
/** Figma Components → Information Collect → TextareaInput (301:6320) */
|
|
144
200
|
type TextareaSize = "regular" | "big";
|
|
145
201
|
type TextareaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> & {
|
|
146
202
|
/** Figma `Size` */
|
|
147
203
|
size?: TextareaSize;
|
|
148
204
|
leftIcon?: ReactNode;
|
|
149
205
|
rightIcon?: ReactNode;
|
|
150
|
-
/** Figma `Controller` — character counter +
|
|
206
|
+
/** Figma `Controller` — character counter + SymbolResize drag handle */
|
|
151
207
|
showController?: boolean;
|
|
152
208
|
error?: boolean;
|
|
153
209
|
};
|
|
@@ -156,7 +212,7 @@ declare const Textarea: react.ForwardRefExoticComponent<Omit<TextareaHTMLAttribu
|
|
|
156
212
|
size?: TextareaSize;
|
|
157
213
|
leftIcon?: ReactNode;
|
|
158
214
|
rightIcon?: ReactNode;
|
|
159
|
-
/** Figma `Controller` — character counter +
|
|
215
|
+
/** Figma `Controller` — character counter + SymbolResize drag handle */
|
|
160
216
|
showController?: boolean;
|
|
161
217
|
error?: boolean;
|
|
162
218
|
} & react.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -637,6 +693,8 @@ type SegmentatorGroupProps = Omit<React.HTMLAttributes<HTMLDivElement>, "default
|
|
|
637
693
|
onValueChange?: (value: string) => void;
|
|
638
694
|
mode?: SegmentatorMode;
|
|
639
695
|
allRound?: boolean;
|
|
696
|
+
/** When true, the group fills its container and items split the width equally. */
|
|
697
|
+
equalWidth?: boolean;
|
|
640
698
|
disabled?: boolean;
|
|
641
699
|
};
|
|
642
700
|
declare const SegmentatorGroup: react.ForwardRefExoticComponent<Omit<react.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> & {
|
|
@@ -645,6 +703,8 @@ declare const SegmentatorGroup: react.ForwardRefExoticComponent<Omit<react.HTMLA
|
|
|
645
703
|
onValueChange?: (value: string) => void;
|
|
646
704
|
mode?: SegmentatorMode;
|
|
647
705
|
allRound?: boolean;
|
|
706
|
+
/** When true, the group fills its container and items split the width equally. */
|
|
707
|
+
equalWidth?: boolean;
|
|
648
708
|
disabled?: boolean;
|
|
649
709
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
650
710
|
type SegmentatorItemProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "value"> & {
|
|
@@ -660,19 +720,31 @@ declare const SegmentatorItem: react.ForwardRefExoticComponent<Omit<ButtonHTMLAt
|
|
|
660
720
|
iconOnly?: boolean;
|
|
661
721
|
} & react.RefAttributes<HTMLButtonElement>>;
|
|
662
722
|
|
|
723
|
+
/** Figma Components → System Composition → Form (527:57461 / 527:57641) */
|
|
724
|
+
type FormFieldDirection = "vertical" | "horizontal";
|
|
663
725
|
type FormFieldProps = HTMLAttributes<HTMLDivElement> & {
|
|
664
|
-
label?:
|
|
726
|
+
label?: ReactNode;
|
|
665
727
|
htmlFor?: string;
|
|
666
728
|
description?: ReactNode;
|
|
667
|
-
error?:
|
|
729
|
+
error?: ReactNode;
|
|
730
|
+
info?: ReactNode;
|
|
731
|
+
/** Optional Alert / Feedback under the control */
|
|
732
|
+
alert?: ReactNode;
|
|
668
733
|
required?: boolean;
|
|
734
|
+
/** Figma `Direction` — vertical stacks label above control; horizontal places label beside */
|
|
735
|
+
direction?: FormFieldDirection;
|
|
669
736
|
};
|
|
670
737
|
declare const FormField: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
671
|
-
label?:
|
|
738
|
+
label?: ReactNode;
|
|
672
739
|
htmlFor?: string;
|
|
673
740
|
description?: ReactNode;
|
|
674
|
-
error?:
|
|
741
|
+
error?: ReactNode;
|
|
742
|
+
info?: ReactNode;
|
|
743
|
+
/** Optional Alert / Feedback under the control */
|
|
744
|
+
alert?: ReactNode;
|
|
675
745
|
required?: boolean;
|
|
746
|
+
/** Figma `Direction` — vertical stacks label above control; horizontal places label beside */
|
|
747
|
+
direction?: FormFieldDirection;
|
|
676
748
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
677
749
|
|
|
678
750
|
/** Figma Components → System Composition → Typography (128:85) */
|
|
@@ -759,8 +831,34 @@ declare const Stack: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivEleme
|
|
|
759
831
|
gap?: "inside" | "component" | "content" | "block" | "page";
|
|
760
832
|
direction?: "row" | "column";
|
|
761
833
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
834
|
+
/** Figma Components → System Composition → Form Group (530:65349) */
|
|
835
|
+
type FieldsetProps = HTMLAttributes<HTMLFieldSetElement> & {
|
|
836
|
+
/** @deprecated Prefer `title` — kept for API compatibility */
|
|
837
|
+
legend?: ReactNode;
|
|
838
|
+
/** Form Group title (Typeface Text+Title primary) */
|
|
839
|
+
title?: ReactNode;
|
|
840
|
+
/** Form Group subtitle (Typeface Text+Title secondary) */
|
|
841
|
+
description?: ReactNode;
|
|
842
|
+
/** Optional footer info row above actions */
|
|
843
|
+
info?: ReactNode;
|
|
844
|
+
/** Optional Alert / Feedback above actions */
|
|
845
|
+
feedback?: ReactNode;
|
|
846
|
+
/** Action slot — typically a Button row */
|
|
847
|
+
actions?: ReactNode;
|
|
848
|
+
};
|
|
762
849
|
declare const Fieldset: react.ForwardRefExoticComponent<HTMLAttributes<HTMLFieldSetElement> & {
|
|
763
|
-
|
|
850
|
+
/** @deprecated Prefer `title` — kept for API compatibility */
|
|
851
|
+
legend?: ReactNode;
|
|
852
|
+
/** Form Group title (Typeface Text+Title primary) */
|
|
853
|
+
title?: ReactNode;
|
|
854
|
+
/** Form Group subtitle (Typeface Text+Title secondary) */
|
|
855
|
+
description?: ReactNode;
|
|
856
|
+
/** Optional footer info row above actions */
|
|
857
|
+
info?: ReactNode;
|
|
858
|
+
/** Optional Alert / Feedback above actions */
|
|
859
|
+
feedback?: ReactNode;
|
|
860
|
+
/** Action slot — typically a Button row */
|
|
861
|
+
actions?: ReactNode;
|
|
764
862
|
} & react.RefAttributes<HTMLFieldSetElement>>;
|
|
765
863
|
|
|
766
864
|
type ColorFormat = "hex" | "rgb" | "hsl";
|
|
@@ -1020,11 +1118,20 @@ type DateRange = {
|
|
|
1020
1118
|
declare function formatDisplayDate(date: Date, locale?: string): string;
|
|
1021
1119
|
declare function formatMonthYear(date: Date, locale?: string): string;
|
|
1022
1120
|
declare function formatTimeValue(hours: number, minutes: number): string;
|
|
1121
|
+
type ParsedDateInput = {
|
|
1122
|
+
date: Date;
|
|
1123
|
+
hours?: number;
|
|
1124
|
+
minutes?: number;
|
|
1125
|
+
};
|
|
1126
|
+
/** Parse typed date strings: `YYYY-MM-DD`, `YYYY/MM/DD`, `YYYY.MM.DD`, optional `HH:mm`. */
|
|
1127
|
+
declare function parseDateInput(text: string): ParsedDateInput | null;
|
|
1128
|
+
/** Parse range text like `2026-07-01 - 2026-07-15` or `2026/07/01 至 2026/07/15`. */
|
|
1129
|
+
declare function parseDateRangeInput(text: string): DateRange | null;
|
|
1023
1130
|
|
|
1024
1131
|
/** Figma Components → Information Collect → DatePicker Input */
|
|
1025
1132
|
type DatePickerSize = "regular" | "big";
|
|
1026
1133
|
type DatePickerMode = "single" | "range";
|
|
1027
|
-
type DatePickerPanel = "date" | "time";
|
|
1134
|
+
type DatePickerPanel = "date" | "time" | "month";
|
|
1028
1135
|
type DatePickerTimeValue = {
|
|
1029
1136
|
hours: number;
|
|
1030
1137
|
minutes: number;
|
|
@@ -1065,7 +1172,7 @@ type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps;
|
|
|
1065
1172
|
* blur-initiated closes; pointer-down and Escape must still dismiss on first interaction.
|
|
1066
1173
|
*/
|
|
1067
1174
|
declare function DatePicker(props: DatePickerProps): react.JSX.Element;
|
|
1068
|
-
type DatePickerTriggerProps = Omit<
|
|
1175
|
+
type DatePickerTriggerProps = Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "size" | "onChange"> & {
|
|
1069
1176
|
size?: DatePickerSize;
|
|
1070
1177
|
allRound?: boolean;
|
|
1071
1178
|
leftIcon?: ReactNode;
|
|
@@ -1076,8 +1183,10 @@ type DatePickerTriggerProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "val
|
|
|
1076
1183
|
displayValue?: ReactNode;
|
|
1077
1184
|
rangeSeparator?: string;
|
|
1078
1185
|
className?: string;
|
|
1186
|
+
/** When false, shows a read-only value instead of an editable input. Default true. */
|
|
1187
|
+
editable?: boolean;
|
|
1079
1188
|
};
|
|
1080
|
-
declare const DatePickerTrigger: react.ForwardRefExoticComponent<Omit<
|
|
1189
|
+
declare const DatePickerTrigger: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "size"> & {
|
|
1081
1190
|
size?: DatePickerSize;
|
|
1082
1191
|
allRound?: boolean;
|
|
1083
1192
|
leftIcon?: ReactNode;
|
|
@@ -1088,7 +1197,9 @@ declare const DatePickerTrigger: react.ForwardRefExoticComponent<Omit<ButtonHTML
|
|
|
1088
1197
|
displayValue?: ReactNode;
|
|
1089
1198
|
rangeSeparator?: string;
|
|
1090
1199
|
className?: string;
|
|
1091
|
-
|
|
1200
|
+
/** When false, shows a read-only value instead of an editable input. Default true. */
|
|
1201
|
+
editable?: boolean;
|
|
1202
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
1092
1203
|
type DatePickerContentProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {
|
|
1093
1204
|
portalled?: boolean;
|
|
1094
1205
|
};
|
|
@@ -1120,7 +1231,7 @@ type DatePickerFieldProps = Omit<DatePickerTriggerProps, "displayValue"> & {
|
|
|
1120
1231
|
onTimeChange?: (value: DatePickerTimeValue) => void;
|
|
1121
1232
|
};
|
|
1122
1233
|
/** Convenience field — trigger + calendar panel. */
|
|
1123
|
-
declare function DatePickerField({ contentClassName, calendarClassName, className, size, mode, allRound, leftIcon, rightIcon, placeholder, rangePlaceholder, error, rangeSeparator, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, disabled, minDate, maxDate, enableTime, timeValue, defaultTimeValue, onTimeChange, }: DatePickerFieldProps): react.JSX.Element;
|
|
1234
|
+
declare function DatePickerField({ contentClassName, calendarClassName, className, size, mode, allRound, leftIcon, rightIcon, placeholder, rangePlaceholder, error, rangeSeparator, editable, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, disabled, minDate, maxDate, enableTime, timeValue, defaultTimeValue, onTimeChange, }: DatePickerFieldProps): react.JSX.Element;
|
|
1124
1235
|
|
|
1125
1236
|
/** Figma Components → Information Collect → TimePicker */
|
|
1126
1237
|
type TimePickerSize = "regular" | "big";
|
|
@@ -1353,7 +1464,7 @@ type AlertSize = "default" | "small";
|
|
|
1353
1464
|
/** Figma `Style` — bordered light surface vs filled secondary surface */
|
|
1354
1465
|
type AlertAppearance = "default" | "light";
|
|
1355
1466
|
declare const alertVariants: (props?: ({
|
|
1356
|
-
type?: "
|
|
1467
|
+
type?: "error" | "info" | "warning" | "success" | "neutral" | null | undefined;
|
|
1357
1468
|
size?: "default" | "small" | null | undefined;
|
|
1358
1469
|
appearance?: "light" | "default" | null | undefined;
|
|
1359
1470
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -1383,7 +1494,7 @@ type AlertProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVari
|
|
|
1383
1494
|
showActions?: boolean;
|
|
1384
1495
|
};
|
|
1385
1496
|
declare const Alert: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
1386
|
-
type?: "
|
|
1497
|
+
type?: "error" | "info" | "warning" | "success" | "neutral" | null | undefined;
|
|
1387
1498
|
size?: "default" | "small" | null | undefined;
|
|
1388
1499
|
appearance?: "light" | "default" | null | undefined;
|
|
1389
1500
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
@@ -1953,10 +2064,12 @@ declare const TableCell: react.ForwardRefExoticComponent<Omit<react.DetailedHTML
|
|
|
1953
2064
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1954
2065
|
|
|
1955
2066
|
/**
|
|
1956
|
-
*
|
|
1957
|
-
*
|
|
1958
|
-
*
|
|
2067
|
+
* Gate `.aviala-focus-ring` to true keyboard modality.
|
|
2068
|
+
*
|
|
2069
|
+
* `:focus-visible` alone is not enough for menus: mouse-opening Select/Cascader
|
|
2070
|
+
* programmatically focuses an item, and browsers treat that as focus-visible.
|
|
2071
|
+
* We clear the gate on pointer/touch and set it on non-modifier keydown.
|
|
1959
2072
|
*/
|
|
1960
2073
|
declare function initKeyboardFocus(): void;
|
|
1961
2074
|
|
|
1962
|
-
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 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, DEFAULT_COLOR, 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, Feedback, type FeedbackMode, type FeedbackProps, type FeedbackSize, type FeedbackType, Fieldset, FormField, type FormFieldProps, type HSVA, 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, 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, Pagehead, type PageheadProps, Pagination, type PaginationProps, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, Progress, type ProgressProps, type ProgressShape, type ProgressSize, type ProgressType, RadioGroup, type RadioGroupDirection, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, RadioInput, type RadioInputProps, type RadioInputVariant, Scroll, type ScrollOrientation, ScrollPicker, ScrollPickerColumn, type ScrollPickerColumnProps, ScrollPickerItem, type ScrollPickerItemProps, type ScrollPickerProps, type ScrollProps, type ScrollSize, 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, 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 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, alertVariants, buttonVariants, cn, formatDisplayDate, formatMonthYear, formatTimeValue, initKeyboardFocus, inputRootVariants, loadingLevelForButtonSize, modalContentVariants, typographyVariants, useColorPickerState, useTheme, useThemeLayoutKey };
|
|
2075
|
+
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 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, DEFAULT_COLOR, 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, Feedback, type FeedbackMode, type FeedbackProps, type FeedbackSize, type FeedbackType, Fieldset, type FieldsetProps, FormField, type FormFieldDirection, type FormFieldProps, type HSVA, 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, 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, Pagehead, type PageheadProps, Pagination, type PaginationProps, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, Progress, type ProgressProps, type ProgressShape, type ProgressSize, type ProgressType, RadioGroup, type RadioGroupDirection, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, RadioInput, type RadioInputProps, type RadioInputVariant, Scroll, type ScrollOrientation, ScrollPicker, ScrollPickerColumn, type ScrollPickerColumnProps, ScrollPickerItem, type ScrollPickerItemProps, type ScrollPickerProps, type ScrollProps, type ScrollSize, 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, 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 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, alertVariants, buttonVariants, cn, formatDisplayDate, formatMonthYear, formatTimeValue, initKeyboardFocus, inputRootVariants, loadingLevelForButtonSize, modalContentVariants, numberInputRootVariants, parseDateInput, parseDateRangeInput, typographyVariants, useColorPickerState, useTheme, useThemeLayoutKey };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, ButtonHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, ComponentPropsWithoutRef, HTMLAttributes, ImgHTMLAttributes, MouseEvent, AnchorHTMLAttributes } from 'react';
|
|
2
|
+
import { ReactNode, ButtonHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, ComponentPropsWithoutRef, HTMLAttributes, ImgHTMLAttributes, MouseEvent, AnchorHTMLAttributes } 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';
|
|
@@ -140,14 +140,70 @@ declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HT
|
|
|
140
140
|
error?: boolean;
|
|
141
141
|
} & react.RefAttributes<HTMLInputElement>>;
|
|
142
142
|
|
|
143
|
-
/** Figma Components → Information Collect →
|
|
143
|
+
/** Figma Components → Information Collect → NumberInput (197:3237) */
|
|
144
|
+
type NumberInputStyle = "default" | "monospaced";
|
|
145
|
+
declare const numberInputRootVariants: (props?: ({
|
|
146
|
+
fullWidth?: boolean | null | undefined;
|
|
147
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
148
|
+
type NumberInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "value" | "defaultValue" | "onChange"> & {
|
|
149
|
+
/** Figma `Size` */
|
|
150
|
+
size?: InputSize;
|
|
151
|
+
/** Figma `All-Round` */
|
|
152
|
+
allRound?: boolean;
|
|
153
|
+
/** Figma `Style` — Default vs Monospaced (tabular / light numeric) */
|
|
154
|
+
inputStyle?: NumberInputStyle;
|
|
155
|
+
leftIcon?: ReactNode;
|
|
156
|
+
rightIcon?: ReactNode;
|
|
157
|
+
leftBadge?: ReactNode;
|
|
158
|
+
rightBadge?: ReactNode;
|
|
159
|
+
/** Figma `showNumberControlButton` — vertical steppers */
|
|
160
|
+
showControls?: boolean;
|
|
161
|
+
/** When false, input sizes to content */
|
|
162
|
+
fullWidth?: boolean;
|
|
163
|
+
error?: boolean;
|
|
164
|
+
value?: number | string | "";
|
|
165
|
+
defaultValue?: number | string;
|
|
166
|
+
step?: number;
|
|
167
|
+
min?: number;
|
|
168
|
+
max?: number;
|
|
169
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
170
|
+
/** Fires with the parsed number (or `null` when empty / invalid) */
|
|
171
|
+
onValueChange?: (value: number | null) => void;
|
|
172
|
+
};
|
|
173
|
+
declare const NumberInput: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "type" | "size"> & {
|
|
174
|
+
/** Figma `Size` */
|
|
175
|
+
size?: InputSize;
|
|
176
|
+
/** Figma `All-Round` */
|
|
177
|
+
allRound?: boolean;
|
|
178
|
+
/** Figma `Style` — Default vs Monospaced (tabular / light numeric) */
|
|
179
|
+
inputStyle?: NumberInputStyle;
|
|
180
|
+
leftIcon?: ReactNode;
|
|
181
|
+
rightIcon?: ReactNode;
|
|
182
|
+
leftBadge?: ReactNode;
|
|
183
|
+
rightBadge?: ReactNode;
|
|
184
|
+
/** Figma `showNumberControlButton` — vertical steppers */
|
|
185
|
+
showControls?: boolean;
|
|
186
|
+
/** When false, input sizes to content */
|
|
187
|
+
fullWidth?: boolean;
|
|
188
|
+
error?: boolean;
|
|
189
|
+
value?: number | string | "";
|
|
190
|
+
defaultValue?: number | string;
|
|
191
|
+
step?: number;
|
|
192
|
+
min?: number;
|
|
193
|
+
max?: number;
|
|
194
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
195
|
+
/** Fires with the parsed number (or `null` when empty / invalid) */
|
|
196
|
+
onValueChange?: (value: number | null) => void;
|
|
197
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
198
|
+
|
|
199
|
+
/** Figma Components → Information Collect → TextareaInput (301:6320) */
|
|
144
200
|
type TextareaSize = "regular" | "big";
|
|
145
201
|
type TextareaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> & {
|
|
146
202
|
/** Figma `Size` */
|
|
147
203
|
size?: TextareaSize;
|
|
148
204
|
leftIcon?: ReactNode;
|
|
149
205
|
rightIcon?: ReactNode;
|
|
150
|
-
/** Figma `Controller` — character counter +
|
|
206
|
+
/** Figma `Controller` — character counter + SymbolResize drag handle */
|
|
151
207
|
showController?: boolean;
|
|
152
208
|
error?: boolean;
|
|
153
209
|
};
|
|
@@ -156,7 +212,7 @@ declare const Textarea: react.ForwardRefExoticComponent<Omit<TextareaHTMLAttribu
|
|
|
156
212
|
size?: TextareaSize;
|
|
157
213
|
leftIcon?: ReactNode;
|
|
158
214
|
rightIcon?: ReactNode;
|
|
159
|
-
/** Figma `Controller` — character counter +
|
|
215
|
+
/** Figma `Controller` — character counter + SymbolResize drag handle */
|
|
160
216
|
showController?: boolean;
|
|
161
217
|
error?: boolean;
|
|
162
218
|
} & react.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -637,6 +693,8 @@ type SegmentatorGroupProps = Omit<React.HTMLAttributes<HTMLDivElement>, "default
|
|
|
637
693
|
onValueChange?: (value: string) => void;
|
|
638
694
|
mode?: SegmentatorMode;
|
|
639
695
|
allRound?: boolean;
|
|
696
|
+
/** When true, the group fills its container and items split the width equally. */
|
|
697
|
+
equalWidth?: boolean;
|
|
640
698
|
disabled?: boolean;
|
|
641
699
|
};
|
|
642
700
|
declare const SegmentatorGroup: react.ForwardRefExoticComponent<Omit<react.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> & {
|
|
@@ -645,6 +703,8 @@ declare const SegmentatorGroup: react.ForwardRefExoticComponent<Omit<react.HTMLA
|
|
|
645
703
|
onValueChange?: (value: string) => void;
|
|
646
704
|
mode?: SegmentatorMode;
|
|
647
705
|
allRound?: boolean;
|
|
706
|
+
/** When true, the group fills its container and items split the width equally. */
|
|
707
|
+
equalWidth?: boolean;
|
|
648
708
|
disabled?: boolean;
|
|
649
709
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
650
710
|
type SegmentatorItemProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "value"> & {
|
|
@@ -660,19 +720,31 @@ declare const SegmentatorItem: react.ForwardRefExoticComponent<Omit<ButtonHTMLAt
|
|
|
660
720
|
iconOnly?: boolean;
|
|
661
721
|
} & react.RefAttributes<HTMLButtonElement>>;
|
|
662
722
|
|
|
723
|
+
/** Figma Components → System Composition → Form (527:57461 / 527:57641) */
|
|
724
|
+
type FormFieldDirection = "vertical" | "horizontal";
|
|
663
725
|
type FormFieldProps = HTMLAttributes<HTMLDivElement> & {
|
|
664
|
-
label?:
|
|
726
|
+
label?: ReactNode;
|
|
665
727
|
htmlFor?: string;
|
|
666
728
|
description?: ReactNode;
|
|
667
|
-
error?:
|
|
729
|
+
error?: ReactNode;
|
|
730
|
+
info?: ReactNode;
|
|
731
|
+
/** Optional Alert / Feedback under the control */
|
|
732
|
+
alert?: ReactNode;
|
|
668
733
|
required?: boolean;
|
|
734
|
+
/** Figma `Direction` — vertical stacks label above control; horizontal places label beside */
|
|
735
|
+
direction?: FormFieldDirection;
|
|
669
736
|
};
|
|
670
737
|
declare const FormField: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
671
|
-
label?:
|
|
738
|
+
label?: ReactNode;
|
|
672
739
|
htmlFor?: string;
|
|
673
740
|
description?: ReactNode;
|
|
674
|
-
error?:
|
|
741
|
+
error?: ReactNode;
|
|
742
|
+
info?: ReactNode;
|
|
743
|
+
/** Optional Alert / Feedback under the control */
|
|
744
|
+
alert?: ReactNode;
|
|
675
745
|
required?: boolean;
|
|
746
|
+
/** Figma `Direction` — vertical stacks label above control; horizontal places label beside */
|
|
747
|
+
direction?: FormFieldDirection;
|
|
676
748
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
677
749
|
|
|
678
750
|
/** Figma Components → System Composition → Typography (128:85) */
|
|
@@ -759,8 +831,34 @@ declare const Stack: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivEleme
|
|
|
759
831
|
gap?: "inside" | "component" | "content" | "block" | "page";
|
|
760
832
|
direction?: "row" | "column";
|
|
761
833
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
834
|
+
/** Figma Components → System Composition → Form Group (530:65349) */
|
|
835
|
+
type FieldsetProps = HTMLAttributes<HTMLFieldSetElement> & {
|
|
836
|
+
/** @deprecated Prefer `title` — kept for API compatibility */
|
|
837
|
+
legend?: ReactNode;
|
|
838
|
+
/** Form Group title (Typeface Text+Title primary) */
|
|
839
|
+
title?: ReactNode;
|
|
840
|
+
/** Form Group subtitle (Typeface Text+Title secondary) */
|
|
841
|
+
description?: ReactNode;
|
|
842
|
+
/** Optional footer info row above actions */
|
|
843
|
+
info?: ReactNode;
|
|
844
|
+
/** Optional Alert / Feedback above actions */
|
|
845
|
+
feedback?: ReactNode;
|
|
846
|
+
/** Action slot — typically a Button row */
|
|
847
|
+
actions?: ReactNode;
|
|
848
|
+
};
|
|
762
849
|
declare const Fieldset: react.ForwardRefExoticComponent<HTMLAttributes<HTMLFieldSetElement> & {
|
|
763
|
-
|
|
850
|
+
/** @deprecated Prefer `title` — kept for API compatibility */
|
|
851
|
+
legend?: ReactNode;
|
|
852
|
+
/** Form Group title (Typeface Text+Title primary) */
|
|
853
|
+
title?: ReactNode;
|
|
854
|
+
/** Form Group subtitle (Typeface Text+Title secondary) */
|
|
855
|
+
description?: ReactNode;
|
|
856
|
+
/** Optional footer info row above actions */
|
|
857
|
+
info?: ReactNode;
|
|
858
|
+
/** Optional Alert / Feedback above actions */
|
|
859
|
+
feedback?: ReactNode;
|
|
860
|
+
/** Action slot — typically a Button row */
|
|
861
|
+
actions?: ReactNode;
|
|
764
862
|
} & react.RefAttributes<HTMLFieldSetElement>>;
|
|
765
863
|
|
|
766
864
|
type ColorFormat = "hex" | "rgb" | "hsl";
|
|
@@ -1020,11 +1118,20 @@ type DateRange = {
|
|
|
1020
1118
|
declare function formatDisplayDate(date: Date, locale?: string): string;
|
|
1021
1119
|
declare function formatMonthYear(date: Date, locale?: string): string;
|
|
1022
1120
|
declare function formatTimeValue(hours: number, minutes: number): string;
|
|
1121
|
+
type ParsedDateInput = {
|
|
1122
|
+
date: Date;
|
|
1123
|
+
hours?: number;
|
|
1124
|
+
minutes?: number;
|
|
1125
|
+
};
|
|
1126
|
+
/** Parse typed date strings: `YYYY-MM-DD`, `YYYY/MM/DD`, `YYYY.MM.DD`, optional `HH:mm`. */
|
|
1127
|
+
declare function parseDateInput(text: string): ParsedDateInput | null;
|
|
1128
|
+
/** Parse range text like `2026-07-01 - 2026-07-15` or `2026/07/01 至 2026/07/15`. */
|
|
1129
|
+
declare function parseDateRangeInput(text: string): DateRange | null;
|
|
1023
1130
|
|
|
1024
1131
|
/** Figma Components → Information Collect → DatePicker Input */
|
|
1025
1132
|
type DatePickerSize = "regular" | "big";
|
|
1026
1133
|
type DatePickerMode = "single" | "range";
|
|
1027
|
-
type DatePickerPanel = "date" | "time";
|
|
1134
|
+
type DatePickerPanel = "date" | "time" | "month";
|
|
1028
1135
|
type DatePickerTimeValue = {
|
|
1029
1136
|
hours: number;
|
|
1030
1137
|
minutes: number;
|
|
@@ -1065,7 +1172,7 @@ type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps;
|
|
|
1065
1172
|
* blur-initiated closes; pointer-down and Escape must still dismiss on first interaction.
|
|
1066
1173
|
*/
|
|
1067
1174
|
declare function DatePicker(props: DatePickerProps): react.JSX.Element;
|
|
1068
|
-
type DatePickerTriggerProps = Omit<
|
|
1175
|
+
type DatePickerTriggerProps = Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "size" | "onChange"> & {
|
|
1069
1176
|
size?: DatePickerSize;
|
|
1070
1177
|
allRound?: boolean;
|
|
1071
1178
|
leftIcon?: ReactNode;
|
|
@@ -1076,8 +1183,10 @@ type DatePickerTriggerProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "val
|
|
|
1076
1183
|
displayValue?: ReactNode;
|
|
1077
1184
|
rangeSeparator?: string;
|
|
1078
1185
|
className?: string;
|
|
1186
|
+
/** When false, shows a read-only value instead of an editable input. Default true. */
|
|
1187
|
+
editable?: boolean;
|
|
1079
1188
|
};
|
|
1080
|
-
declare const DatePickerTrigger: react.ForwardRefExoticComponent<Omit<
|
|
1189
|
+
declare const DatePickerTrigger: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "size"> & {
|
|
1081
1190
|
size?: DatePickerSize;
|
|
1082
1191
|
allRound?: boolean;
|
|
1083
1192
|
leftIcon?: ReactNode;
|
|
@@ -1088,7 +1197,9 @@ declare const DatePickerTrigger: react.ForwardRefExoticComponent<Omit<ButtonHTML
|
|
|
1088
1197
|
displayValue?: ReactNode;
|
|
1089
1198
|
rangeSeparator?: string;
|
|
1090
1199
|
className?: string;
|
|
1091
|
-
|
|
1200
|
+
/** When false, shows a read-only value instead of an editable input. Default true. */
|
|
1201
|
+
editable?: boolean;
|
|
1202
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
1092
1203
|
type DatePickerContentProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {
|
|
1093
1204
|
portalled?: boolean;
|
|
1094
1205
|
};
|
|
@@ -1120,7 +1231,7 @@ type DatePickerFieldProps = Omit<DatePickerTriggerProps, "displayValue"> & {
|
|
|
1120
1231
|
onTimeChange?: (value: DatePickerTimeValue) => void;
|
|
1121
1232
|
};
|
|
1122
1233
|
/** Convenience field — trigger + calendar panel. */
|
|
1123
|
-
declare function DatePickerField({ contentClassName, calendarClassName, className, size, mode, allRound, leftIcon, rightIcon, placeholder, rangePlaceholder, error, rangeSeparator, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, disabled, minDate, maxDate, enableTime, timeValue, defaultTimeValue, onTimeChange, }: DatePickerFieldProps): react.JSX.Element;
|
|
1234
|
+
declare function DatePickerField({ contentClassName, calendarClassName, className, size, mode, allRound, leftIcon, rightIcon, placeholder, rangePlaceholder, error, rangeSeparator, editable, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, disabled, minDate, maxDate, enableTime, timeValue, defaultTimeValue, onTimeChange, }: DatePickerFieldProps): react.JSX.Element;
|
|
1124
1235
|
|
|
1125
1236
|
/** Figma Components → Information Collect → TimePicker */
|
|
1126
1237
|
type TimePickerSize = "regular" | "big";
|
|
@@ -1353,7 +1464,7 @@ type AlertSize = "default" | "small";
|
|
|
1353
1464
|
/** Figma `Style` — bordered light surface vs filled secondary surface */
|
|
1354
1465
|
type AlertAppearance = "default" | "light";
|
|
1355
1466
|
declare const alertVariants: (props?: ({
|
|
1356
|
-
type?: "
|
|
1467
|
+
type?: "error" | "info" | "warning" | "success" | "neutral" | null | undefined;
|
|
1357
1468
|
size?: "default" | "small" | null | undefined;
|
|
1358
1469
|
appearance?: "light" | "default" | null | undefined;
|
|
1359
1470
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -1383,7 +1494,7 @@ type AlertProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVari
|
|
|
1383
1494
|
showActions?: boolean;
|
|
1384
1495
|
};
|
|
1385
1496
|
declare const Alert: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
1386
|
-
type?: "
|
|
1497
|
+
type?: "error" | "info" | "warning" | "success" | "neutral" | null | undefined;
|
|
1387
1498
|
size?: "default" | "small" | null | undefined;
|
|
1388
1499
|
appearance?: "light" | "default" | null | undefined;
|
|
1389
1500
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
@@ -1953,10 +2064,12 @@ declare const TableCell: react.ForwardRefExoticComponent<Omit<react.DetailedHTML
|
|
|
1953
2064
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1954
2065
|
|
|
1955
2066
|
/**
|
|
1956
|
-
*
|
|
1957
|
-
*
|
|
1958
|
-
*
|
|
2067
|
+
* Gate `.aviala-focus-ring` to true keyboard modality.
|
|
2068
|
+
*
|
|
2069
|
+
* `:focus-visible` alone is not enough for menus: mouse-opening Select/Cascader
|
|
2070
|
+
* programmatically focuses an item, and browsers treat that as focus-visible.
|
|
2071
|
+
* We clear the gate on pointer/touch and set it on non-modifier keydown.
|
|
1959
2072
|
*/
|
|
1960
2073
|
declare function initKeyboardFocus(): void;
|
|
1961
2074
|
|
|
1962
|
-
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 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, DEFAULT_COLOR, 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, Feedback, type FeedbackMode, type FeedbackProps, type FeedbackSize, type FeedbackType, Fieldset, FormField, type FormFieldProps, type HSVA, 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, 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, Pagehead, type PageheadProps, Pagination, type PaginationProps, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, Progress, type ProgressProps, type ProgressShape, type ProgressSize, type ProgressType, RadioGroup, type RadioGroupDirection, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, RadioInput, type RadioInputProps, type RadioInputVariant, Scroll, type ScrollOrientation, ScrollPicker, ScrollPickerColumn, type ScrollPickerColumnProps, ScrollPickerItem, type ScrollPickerItemProps, type ScrollPickerProps, type ScrollProps, type ScrollSize, 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, 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 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, alertVariants, buttonVariants, cn, formatDisplayDate, formatMonthYear, formatTimeValue, initKeyboardFocus, inputRootVariants, loadingLevelForButtonSize, modalContentVariants, typographyVariants, useColorPickerState, useTheme, useThemeLayoutKey };
|
|
2075
|
+
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 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, DEFAULT_COLOR, 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, Feedback, type FeedbackMode, type FeedbackProps, type FeedbackSize, type FeedbackType, Fieldset, type FieldsetProps, FormField, type FormFieldDirection, type FormFieldProps, type HSVA, 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, 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, Pagehead, type PageheadProps, Pagination, type PaginationProps, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, Progress, type ProgressProps, type ProgressShape, type ProgressSize, type ProgressType, RadioGroup, type RadioGroupDirection, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, RadioInput, type RadioInputProps, type RadioInputVariant, Scroll, type ScrollOrientation, ScrollPicker, ScrollPickerColumn, type ScrollPickerColumnProps, ScrollPickerItem, type ScrollPickerItemProps, type ScrollPickerProps, type ScrollProps, type ScrollSize, 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, 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 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, alertVariants, buttonVariants, cn, formatDisplayDate, formatMonthYear, formatTimeValue, initKeyboardFocus, inputRootVariants, loadingLevelForButtonSize, modalContentVariants, numberInputRootVariants, parseDateInput, parseDateRangeInput, typographyVariants, useColorPickerState, useTheme, useThemeLayoutKey };
|