@aviala-design/spiral 2.7.1 → 2.8.1
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/component-changelogs.json +150 -0
- package/dist/index.cjs +2962 -1501
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +164 -8
- package/dist/index.d.ts +164 -8
- package/dist/index.js +2785 -1302
- package/dist/index.js.map +1 -1
- package/dist/props.json +163 -10
- package/dist/styles.css +48 -5
- package/package.json +6 -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, Ref, ReactElement } from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties, ButtonHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, ComponentPropsWithoutRef, HTMLAttributes, ImgHTMLAttributes, MouseEvent, AnchorHTMLAttributes, Ref, ReactElement, 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';
|
|
@@ -101,6 +101,28 @@ type LocaleUpload = {
|
|
|
101
101
|
title: string;
|
|
102
102
|
description: string;
|
|
103
103
|
};
|
|
104
|
+
type LocaleVideo = {
|
|
105
|
+
play: string;
|
|
106
|
+
pause: string;
|
|
107
|
+
previous: string;
|
|
108
|
+
next: string;
|
|
109
|
+
speed: string;
|
|
110
|
+
speedAdjust: string;
|
|
111
|
+
/** Template: `${rate}` */
|
|
112
|
+
speedRate: string;
|
|
113
|
+
mute: string;
|
|
114
|
+
unmute: string;
|
|
115
|
+
volume: string;
|
|
116
|
+
settings: string;
|
|
117
|
+
fullscreen: string;
|
|
118
|
+
exitFullscreen: string;
|
|
119
|
+
settingsTitle: string;
|
|
120
|
+
aspectRatio: string;
|
|
121
|
+
aspectOriginal: string;
|
|
122
|
+
aspectStretch: string;
|
|
123
|
+
aspectFill: string;
|
|
124
|
+
volumeBalance: string;
|
|
125
|
+
};
|
|
104
126
|
type LocaleColorPicker = {
|
|
105
127
|
placeholder: string;
|
|
106
128
|
hue: string;
|
|
@@ -118,6 +140,7 @@ type Locale = {
|
|
|
118
140
|
TimePicker: LocaleTimePicker;
|
|
119
141
|
Pagination: LocalePagination;
|
|
120
142
|
Upload: LocaleUpload;
|
|
143
|
+
Video: LocaleVideo;
|
|
121
144
|
Modal: {
|
|
122
145
|
close: string;
|
|
123
146
|
};
|
|
@@ -216,6 +239,19 @@ declare function forwardChevronSide(direction: Direction): PhysicalSide;
|
|
|
216
239
|
*/
|
|
217
240
|
declare function backChevronSide(direction: Direction): PhysicalSide;
|
|
218
241
|
|
|
242
|
+
type OverlayContainerProviderProps = {
|
|
243
|
+
container: HTMLElement | null;
|
|
244
|
+
children: ReactNode;
|
|
245
|
+
};
|
|
246
|
+
/** Nest overlays (Popover / Select / Tooltip) inside a stacking context such as Modal. */
|
|
247
|
+
declare function OverlayContainerProvider({ container, children, }: OverlayContainerProviderProps): react.JSX.Element;
|
|
248
|
+
/**
|
|
249
|
+
* Portal target for floating layers.
|
|
250
|
+
* Fullscreen element wins (browser only paints that subtree), then a nested
|
|
251
|
+
* overlay container (Modal), otherwise `document.body`.
|
|
252
|
+
*/
|
|
253
|
+
declare function useOverlayPortalContainer(): HTMLElement | undefined;
|
|
254
|
+
|
|
219
255
|
/** Figma Components → Basic Input → Button */
|
|
220
256
|
type ButtonMode = "primary" | "second" | "default" | "defaultCustom" | "outline" | "outlineCustom" | "noBackground" | "noBackgroundCustom" | "destructive";
|
|
221
257
|
type ButtonSize = "tiny" | "small" | "regular" | "big";
|
|
@@ -898,6 +934,11 @@ declare const SegmentatorItem: react.ForwardRefExoticComponent<Omit<ButtonHTMLAt
|
|
|
898
934
|
|
|
899
935
|
/** Figma Components → System Composition → Form (527:57461 / 527:57641) */
|
|
900
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;
|
|
901
942
|
/** Layout mode — the original props-driven wrapper */
|
|
902
943
|
type FormFieldLayoutProps = HTMLAttributes<HTMLDivElement> & {
|
|
903
944
|
label?: ReactNode;
|
|
@@ -927,7 +968,8 @@ type FormFieldRenderProps<TFieldValues extends FieldValues = FieldValues, TName
|
|
|
927
968
|
* react-hook-form mode — bind the field to a form via `name` (+ optional
|
|
928
969
|
* `control`; falls back to the surrounding `<Form>` context). Validation
|
|
929
970
|
* errors from the resolver (zod etc.) are rendered automatically unless the
|
|
930
|
-
* `error` prop overrides them.
|
|
971
|
+
* `error` prop overrides them. Nested controls inherit the invalid state via
|
|
972
|
+
* context unless they set an explicit `error` prop.
|
|
931
973
|
*/
|
|
932
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"> & {
|
|
933
975
|
name: TName;
|
|
@@ -941,8 +983,12 @@ type FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extend
|
|
|
941
983
|
* FormField — layout wrapper around a form control, or a react-hook-form
|
|
942
984
|
* bound field when given `name` + `render` (shadcn-style).
|
|
943
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
|
+
*
|
|
944
990
|
* @example Layout mode
|
|
945
|
-
* <FormField label="Email" htmlFor="email"
|
|
991
|
+
* <FormField label="Email" htmlFor="email" error="Required">
|
|
946
992
|
* <Input id="email" />
|
|
947
993
|
* </FormField>
|
|
948
994
|
*
|
|
@@ -953,8 +999,8 @@ type FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extend
|
|
|
953
999
|
* control={form.control}
|
|
954
1000
|
* name="email"
|
|
955
1001
|
* label="Email"
|
|
956
|
-
* render={({ field,
|
|
957
|
-
* <Input id={id}
|
|
1002
|
+
* render={({ field, id }) => (
|
|
1003
|
+
* <Input id={id} {...field} />
|
|
958
1004
|
* )}
|
|
959
1005
|
* />
|
|
960
1006
|
* </form>
|
|
@@ -2188,7 +2234,7 @@ declare const TabItem: react.ForwardRefExoticComponent<Omit<ButtonHTMLAttributes
|
|
|
2188
2234
|
/** Figma Components → Information Collect → Slider (384:21585) */
|
|
2189
2235
|
type SliderSize = "default" | "big";
|
|
2190
2236
|
type SliderType = "default" | "range";
|
|
2191
|
-
type SliderRootProps =
|
|
2237
|
+
type SliderRootProps = ComponentPropsWithoutRef<typeof SliderPrimitive.Root>;
|
|
2192
2238
|
declare const sliderVariants: (props?: ({
|
|
2193
2239
|
size?: "default" | "big" | null | undefined;
|
|
2194
2240
|
type?: "default" | "range" | null | undefined;
|
|
@@ -2196,6 +2242,8 @@ declare const sliderVariants: (props?: ({
|
|
|
2196
2242
|
type SliderProps = SliderRootProps & VariantProps<typeof sliderVariants> & {
|
|
2197
2243
|
/** Figma `Type` — single thumb vs range (two thumbs) */
|
|
2198
2244
|
type?: SliderType;
|
|
2245
|
+
/** Figma volume popover and other vertical tracks — `horizontal` (default) or `vertical`. */
|
|
2246
|
+
orientation?: "horizontal" | "vertical";
|
|
2199
2247
|
/**
|
|
2200
2248
|
* When true, hovering a thumb (and while dragging it) shows a value
|
|
2201
2249
|
* tooltip bound to that thumb.
|
|
@@ -2204,12 +2252,14 @@ type SliderProps = SliderRootProps & VariantProps<typeof sliderVariants> & {
|
|
|
2204
2252
|
/** Format the value tooltip label. Defaults to `String(value)`. */
|
|
2205
2253
|
formatValueTooltip?: (value: number, index: number) => ReactNode;
|
|
2206
2254
|
};
|
|
2207
|
-
declare const Slider: react.ForwardRefExoticComponent<
|
|
2255
|
+
declare const Slider: react.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & react.RefAttributes<HTMLSpanElement>, "ref"> & VariantProps<(props?: ({
|
|
2208
2256
|
size?: "default" | "big" | null | undefined;
|
|
2209
2257
|
type?: "default" | "range" | null | undefined;
|
|
2210
2258
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
2211
2259
|
/** Figma `Type` — single thumb vs range (two thumbs) */
|
|
2212
2260
|
type?: SliderType;
|
|
2261
|
+
/** Figma volume popover and other vertical tracks — `horizontal` (default) or `vertical`. */
|
|
2262
|
+
orientation?: "horizontal" | "vertical";
|
|
2213
2263
|
/**
|
|
2214
2264
|
* When true, hovering a thumb (and while dragging it) shows a value
|
|
2215
2265
|
* tooltip bound to that thumb.
|
|
@@ -2257,6 +2307,112 @@ declare const Upload: react.ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDi
|
|
|
2257
2307
|
inputProps?: Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "accept" | "multiple" | "disabled" | "onChange">;
|
|
2258
2308
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
2259
2309
|
|
|
2310
|
+
/** Figma 画面比例 → CSS object-fit */
|
|
2311
|
+
type VideoObjectFit = "original" | "stretch" | "fill";
|
|
2312
|
+
declare function videoObjectFitToCss(fit: VideoObjectFit): string;
|
|
2313
|
+
declare function formatVideoTime(seconds: number): string;
|
|
2314
|
+
/** Parse `mm:ss`, `h:mm:ss`, or `current / duration` (uses the first segment). */
|
|
2315
|
+
declare function parseVideoTime(input: string): number | null;
|
|
2316
|
+
declare const DEFAULT_PLAYBACK_RATES: readonly [0.5, 1, 1.5, 2, 3];
|
|
2317
|
+
|
|
2318
|
+
/** Figma Components → Information Display → Video (1958:1400) Style */
|
|
2319
|
+
type VideoAppearance = "default" | "light";
|
|
2320
|
+
type VideoProps = Omit<VideoHTMLAttributes<HTMLVideoElement>, "controls" | "muted" | "onVolumeChange"> & {
|
|
2321
|
+
/** Figma `Style` — Default stacks the bar; Light floats a pill bar over the stage. */
|
|
2322
|
+
appearance?: VideoAppearance;
|
|
2323
|
+
/** Seconds to skip when Previous / Next have no playlist handlers. */
|
|
2324
|
+
skipSeconds?: number;
|
|
2325
|
+
/** Available playback rates in the speed popover. */
|
|
2326
|
+
playbackRates?: number[];
|
|
2327
|
+
muted?: boolean;
|
|
2328
|
+
defaultMuted?: boolean;
|
|
2329
|
+
onMutedChange?: (muted: boolean) => void;
|
|
2330
|
+
playbackRate?: number;
|
|
2331
|
+
defaultPlaybackRate?: number;
|
|
2332
|
+
onPlaybackRateChange?: (rate: number) => void;
|
|
2333
|
+
/** Figma 画面比例 — original→contain, stretch→fill, fill→cover. */
|
|
2334
|
+
objectFit?: VideoObjectFit;
|
|
2335
|
+
defaultObjectFit?: VideoObjectFit;
|
|
2336
|
+
onObjectFitChange?: (fit: VideoObjectFit) => void;
|
|
2337
|
+
/** Lightweight loudness balance via Web Audio DynamicsCompressor. */
|
|
2338
|
+
volumeBalance?: boolean;
|
|
2339
|
+
defaultVolumeBalance?: boolean;
|
|
2340
|
+
onVolumeBalanceChange?: (enabled: boolean) => void;
|
|
2341
|
+
/** Linear gain 0–1 (`HTMLMediaElement.volume`). */
|
|
2342
|
+
volume?: number;
|
|
2343
|
+
defaultVolume?: number;
|
|
2344
|
+
onVolumeChange?: (volume: number) => void;
|
|
2345
|
+
/** Override Previous (default: seek back `skipSeconds`). */
|
|
2346
|
+
onPrevious?: () => void;
|
|
2347
|
+
/** Override Next (default: seek forward `skipSeconds`). */
|
|
2348
|
+
onNext?: () => void;
|
|
2349
|
+
/**
|
|
2350
|
+
* Letterbox / pillarbox fill behind the media.
|
|
2351
|
+
* CSS color value — prefer a token, e.g. `var(--box-box-normal-background-blackonly)`.
|
|
2352
|
+
* Defaults to Black (`--box-box-normal-background-blackonly`).
|
|
2353
|
+
*/
|
|
2354
|
+
stageBackground?: string;
|
|
2355
|
+
/**
|
|
2356
|
+
* Auto-hide the control bar after idle (slide down + fade).
|
|
2357
|
+
* Pointer move / press on the player reveals it again.
|
|
2358
|
+
*/
|
|
2359
|
+
autoHideControls?: boolean;
|
|
2360
|
+
/** Idle time in ms before hiding when `autoHideControls` is on. Default 2500. */
|
|
2361
|
+
autoHideDelay?: number;
|
|
2362
|
+
className?: string;
|
|
2363
|
+
style?: CSSProperties;
|
|
2364
|
+
};
|
|
2365
|
+
type VideoHandle = {
|
|
2366
|
+
video: HTMLVideoElement | null;
|
|
2367
|
+
play: () => Promise<void> | undefined;
|
|
2368
|
+
pause: () => void;
|
|
2369
|
+
};
|
|
2370
|
+
declare const Video: react.ForwardRefExoticComponent<Omit<VideoHTMLAttributes<HTMLVideoElement>, "onVolumeChange" | "muted" | "controls"> & {
|
|
2371
|
+
/** Figma `Style` — Default stacks the bar; Light floats a pill bar over the stage. */
|
|
2372
|
+
appearance?: VideoAppearance;
|
|
2373
|
+
/** Seconds to skip when Previous / Next have no playlist handlers. */
|
|
2374
|
+
skipSeconds?: number;
|
|
2375
|
+
/** Available playback rates in the speed popover. */
|
|
2376
|
+
playbackRates?: number[];
|
|
2377
|
+
muted?: boolean;
|
|
2378
|
+
defaultMuted?: boolean;
|
|
2379
|
+
onMutedChange?: (muted: boolean) => void;
|
|
2380
|
+
playbackRate?: number;
|
|
2381
|
+
defaultPlaybackRate?: number;
|
|
2382
|
+
onPlaybackRateChange?: (rate: number) => void;
|
|
2383
|
+
/** Figma 画面比例 — original→contain, stretch→fill, fill→cover. */
|
|
2384
|
+
objectFit?: VideoObjectFit;
|
|
2385
|
+
defaultObjectFit?: VideoObjectFit;
|
|
2386
|
+
onObjectFitChange?: (fit: VideoObjectFit) => void;
|
|
2387
|
+
/** Lightweight loudness balance via Web Audio DynamicsCompressor. */
|
|
2388
|
+
volumeBalance?: boolean;
|
|
2389
|
+
defaultVolumeBalance?: boolean;
|
|
2390
|
+
onVolumeBalanceChange?: (enabled: boolean) => void;
|
|
2391
|
+
/** Linear gain 0–1 (`HTMLMediaElement.volume`). */
|
|
2392
|
+
volume?: number;
|
|
2393
|
+
defaultVolume?: number;
|
|
2394
|
+
onVolumeChange?: (volume: number) => void;
|
|
2395
|
+
/** Override Previous (default: seek back `skipSeconds`). */
|
|
2396
|
+
onPrevious?: () => void;
|
|
2397
|
+
/** Override Next (default: seek forward `skipSeconds`). */
|
|
2398
|
+
onNext?: () => void;
|
|
2399
|
+
/**
|
|
2400
|
+
* Letterbox / pillarbox fill behind the media.
|
|
2401
|
+
* CSS color value — prefer a token, e.g. `var(--box-box-normal-background-blackonly)`.
|
|
2402
|
+
* Defaults to Black (`--box-box-normal-background-blackonly`).
|
|
2403
|
+
*/
|
|
2404
|
+
stageBackground?: string;
|
|
2405
|
+
/**
|
|
2406
|
+
* Auto-hide the control bar after idle (slide down + fade).
|
|
2407
|
+
* Pointer move / press on the player reveals it again.
|
|
2408
|
+
*/
|
|
2409
|
+
autoHideControls?: boolean;
|
|
2410
|
+
/** Idle time in ms before hiding when `autoHideControls` is on. Default 2500. */
|
|
2411
|
+
autoHideDelay?: number;
|
|
2412
|
+
className?: string;
|
|
2413
|
+
style?: CSSProperties;
|
|
2414
|
+
} & react.RefAttributes<VideoHandle>>;
|
|
2415
|
+
|
|
2260
2416
|
type ScrollPickerProps = HTMLAttributes<HTMLDivElement>;
|
|
2261
2417
|
declare function ScrollPicker({ className, children, ...props }: ScrollPickerProps): react.JSX.Element;
|
|
2262
2418
|
type ScrollPickerColumnProps<T = string> = {
|
|
@@ -2566,4 +2722,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
2566
2722
|
*/
|
|
2567
2723
|
declare function initKeyboardFocus(): void;
|
|
2568
2724
|
|
|
2569
|
-
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, 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, Feedback, type FeedbackMode, type FeedbackProps, type FeedbackSize, type FeedbackType, Fieldset, type FieldsetProps, Form, FormField, type FormFieldControlledProps, type FormFieldDirection, type FormFieldLayoutProps, type FormFieldProps, type FormFieldRenderProps, 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, 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, alertVariants, backChevronSide, buttonVariants, cn, enUS, formatDisplayDate, formatMonthYear, formatTimeValue, forwardChevronSide, initKeyboardFocus, inputRootVariants, interpolate, loadingLevelForButtonSize, mirrorSide, mirrorSideForDirection, modalContentVariants, numberInputRootVariants, parseDateInput, parseDateRangeInput, typographyVariants, useColorPickerState, useDirection, useLocale, useLocaleMessages, useRtl, useTheme, useThemeLayoutKey, zhCN };
|
|
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, Feedback, type FeedbackMode, type FeedbackProps, type FeedbackSize, type FeedbackType, Fieldset, type FieldsetProps, Form, FormField, type FormFieldControlledProps, type FormFieldDirection, type FormFieldLayoutProps, type FormFieldProps, type FormFieldRenderProps, 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, enUS, formatDisplayDate, formatMonthYear, formatTimeValue, formatVideoTime, forwardChevronSide, initKeyboardFocus, inputRootVariants, interpolate, loadingLevelForButtonSize, mirrorSide, mirrorSideForDirection, modalContentVariants, numberInputRootVariants, parseDateInput, parseDateRangeInput, parseVideoTime, typographyVariants, useColorPickerState, useDirection, useLocale, useLocaleMessages, useOverlayPortalContainer, useResolvedControlError, 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, Ref, ReactElement } from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties, ButtonHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, ComponentPropsWithoutRef, HTMLAttributes, ImgHTMLAttributes, MouseEvent, AnchorHTMLAttributes, Ref, ReactElement, 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';
|
|
@@ -101,6 +101,28 @@ type LocaleUpload = {
|
|
|
101
101
|
title: string;
|
|
102
102
|
description: string;
|
|
103
103
|
};
|
|
104
|
+
type LocaleVideo = {
|
|
105
|
+
play: string;
|
|
106
|
+
pause: string;
|
|
107
|
+
previous: string;
|
|
108
|
+
next: string;
|
|
109
|
+
speed: string;
|
|
110
|
+
speedAdjust: string;
|
|
111
|
+
/** Template: `${rate}` */
|
|
112
|
+
speedRate: string;
|
|
113
|
+
mute: string;
|
|
114
|
+
unmute: string;
|
|
115
|
+
volume: string;
|
|
116
|
+
settings: string;
|
|
117
|
+
fullscreen: string;
|
|
118
|
+
exitFullscreen: string;
|
|
119
|
+
settingsTitle: string;
|
|
120
|
+
aspectRatio: string;
|
|
121
|
+
aspectOriginal: string;
|
|
122
|
+
aspectStretch: string;
|
|
123
|
+
aspectFill: string;
|
|
124
|
+
volumeBalance: string;
|
|
125
|
+
};
|
|
104
126
|
type LocaleColorPicker = {
|
|
105
127
|
placeholder: string;
|
|
106
128
|
hue: string;
|
|
@@ -118,6 +140,7 @@ type Locale = {
|
|
|
118
140
|
TimePicker: LocaleTimePicker;
|
|
119
141
|
Pagination: LocalePagination;
|
|
120
142
|
Upload: LocaleUpload;
|
|
143
|
+
Video: LocaleVideo;
|
|
121
144
|
Modal: {
|
|
122
145
|
close: string;
|
|
123
146
|
};
|
|
@@ -216,6 +239,19 @@ declare function forwardChevronSide(direction: Direction): PhysicalSide;
|
|
|
216
239
|
*/
|
|
217
240
|
declare function backChevronSide(direction: Direction): PhysicalSide;
|
|
218
241
|
|
|
242
|
+
type OverlayContainerProviderProps = {
|
|
243
|
+
container: HTMLElement | null;
|
|
244
|
+
children: ReactNode;
|
|
245
|
+
};
|
|
246
|
+
/** Nest overlays (Popover / Select / Tooltip) inside a stacking context such as Modal. */
|
|
247
|
+
declare function OverlayContainerProvider({ container, children, }: OverlayContainerProviderProps): react.JSX.Element;
|
|
248
|
+
/**
|
|
249
|
+
* Portal target for floating layers.
|
|
250
|
+
* Fullscreen element wins (browser only paints that subtree), then a nested
|
|
251
|
+
* overlay container (Modal), otherwise `document.body`.
|
|
252
|
+
*/
|
|
253
|
+
declare function useOverlayPortalContainer(): HTMLElement | undefined;
|
|
254
|
+
|
|
219
255
|
/** Figma Components → Basic Input → Button */
|
|
220
256
|
type ButtonMode = "primary" | "second" | "default" | "defaultCustom" | "outline" | "outlineCustom" | "noBackground" | "noBackgroundCustom" | "destructive";
|
|
221
257
|
type ButtonSize = "tiny" | "small" | "regular" | "big";
|
|
@@ -898,6 +934,11 @@ declare const SegmentatorItem: react.ForwardRefExoticComponent<Omit<ButtonHTMLAt
|
|
|
898
934
|
|
|
899
935
|
/** Figma Components → System Composition → Form (527:57461 / 527:57641) */
|
|
900
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;
|
|
901
942
|
/** Layout mode — the original props-driven wrapper */
|
|
902
943
|
type FormFieldLayoutProps = HTMLAttributes<HTMLDivElement> & {
|
|
903
944
|
label?: ReactNode;
|
|
@@ -927,7 +968,8 @@ type FormFieldRenderProps<TFieldValues extends FieldValues = FieldValues, TName
|
|
|
927
968
|
* react-hook-form mode — bind the field to a form via `name` (+ optional
|
|
928
969
|
* `control`; falls back to the surrounding `<Form>` context). Validation
|
|
929
970
|
* errors from the resolver (zod etc.) are rendered automatically unless the
|
|
930
|
-
* `error` prop overrides them.
|
|
971
|
+
* `error` prop overrides them. Nested controls inherit the invalid state via
|
|
972
|
+
* context unless they set an explicit `error` prop.
|
|
931
973
|
*/
|
|
932
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"> & {
|
|
933
975
|
name: TName;
|
|
@@ -941,8 +983,12 @@ type FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extend
|
|
|
941
983
|
* FormField — layout wrapper around a form control, or a react-hook-form
|
|
942
984
|
* bound field when given `name` + `render` (shadcn-style).
|
|
943
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
|
+
*
|
|
944
990
|
* @example Layout mode
|
|
945
|
-
* <FormField label="Email" htmlFor="email"
|
|
991
|
+
* <FormField label="Email" htmlFor="email" error="Required">
|
|
946
992
|
* <Input id="email" />
|
|
947
993
|
* </FormField>
|
|
948
994
|
*
|
|
@@ -953,8 +999,8 @@ type FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extend
|
|
|
953
999
|
* control={form.control}
|
|
954
1000
|
* name="email"
|
|
955
1001
|
* label="Email"
|
|
956
|
-
* render={({ field,
|
|
957
|
-
* <Input id={id}
|
|
1002
|
+
* render={({ field, id }) => (
|
|
1003
|
+
* <Input id={id} {...field} />
|
|
958
1004
|
* )}
|
|
959
1005
|
* />
|
|
960
1006
|
* </form>
|
|
@@ -2188,7 +2234,7 @@ declare const TabItem: react.ForwardRefExoticComponent<Omit<ButtonHTMLAttributes
|
|
|
2188
2234
|
/** Figma Components → Information Collect → Slider (384:21585) */
|
|
2189
2235
|
type SliderSize = "default" | "big";
|
|
2190
2236
|
type SliderType = "default" | "range";
|
|
2191
|
-
type SliderRootProps =
|
|
2237
|
+
type SliderRootProps = ComponentPropsWithoutRef<typeof SliderPrimitive.Root>;
|
|
2192
2238
|
declare const sliderVariants: (props?: ({
|
|
2193
2239
|
size?: "default" | "big" | null | undefined;
|
|
2194
2240
|
type?: "default" | "range" | null | undefined;
|
|
@@ -2196,6 +2242,8 @@ declare const sliderVariants: (props?: ({
|
|
|
2196
2242
|
type SliderProps = SliderRootProps & VariantProps<typeof sliderVariants> & {
|
|
2197
2243
|
/** Figma `Type` — single thumb vs range (two thumbs) */
|
|
2198
2244
|
type?: SliderType;
|
|
2245
|
+
/** Figma volume popover and other vertical tracks — `horizontal` (default) or `vertical`. */
|
|
2246
|
+
orientation?: "horizontal" | "vertical";
|
|
2199
2247
|
/**
|
|
2200
2248
|
* When true, hovering a thumb (and while dragging it) shows a value
|
|
2201
2249
|
* tooltip bound to that thumb.
|
|
@@ -2204,12 +2252,14 @@ type SliderProps = SliderRootProps & VariantProps<typeof sliderVariants> & {
|
|
|
2204
2252
|
/** Format the value tooltip label. Defaults to `String(value)`. */
|
|
2205
2253
|
formatValueTooltip?: (value: number, index: number) => ReactNode;
|
|
2206
2254
|
};
|
|
2207
|
-
declare const Slider: react.ForwardRefExoticComponent<
|
|
2255
|
+
declare const Slider: react.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & react.RefAttributes<HTMLSpanElement>, "ref"> & VariantProps<(props?: ({
|
|
2208
2256
|
size?: "default" | "big" | null | undefined;
|
|
2209
2257
|
type?: "default" | "range" | null | undefined;
|
|
2210
2258
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
2211
2259
|
/** Figma `Type` — single thumb vs range (two thumbs) */
|
|
2212
2260
|
type?: SliderType;
|
|
2261
|
+
/** Figma volume popover and other vertical tracks — `horizontal` (default) or `vertical`. */
|
|
2262
|
+
orientation?: "horizontal" | "vertical";
|
|
2213
2263
|
/**
|
|
2214
2264
|
* When true, hovering a thumb (and while dragging it) shows a value
|
|
2215
2265
|
* tooltip bound to that thumb.
|
|
@@ -2257,6 +2307,112 @@ declare const Upload: react.ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDi
|
|
|
2257
2307
|
inputProps?: Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "accept" | "multiple" | "disabled" | "onChange">;
|
|
2258
2308
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
2259
2309
|
|
|
2310
|
+
/** Figma 画面比例 → CSS object-fit */
|
|
2311
|
+
type VideoObjectFit = "original" | "stretch" | "fill";
|
|
2312
|
+
declare function videoObjectFitToCss(fit: VideoObjectFit): string;
|
|
2313
|
+
declare function formatVideoTime(seconds: number): string;
|
|
2314
|
+
/** Parse `mm:ss`, `h:mm:ss`, or `current / duration` (uses the first segment). */
|
|
2315
|
+
declare function parseVideoTime(input: string): number | null;
|
|
2316
|
+
declare const DEFAULT_PLAYBACK_RATES: readonly [0.5, 1, 1.5, 2, 3];
|
|
2317
|
+
|
|
2318
|
+
/** Figma Components → Information Display → Video (1958:1400) Style */
|
|
2319
|
+
type VideoAppearance = "default" | "light";
|
|
2320
|
+
type VideoProps = Omit<VideoHTMLAttributes<HTMLVideoElement>, "controls" | "muted" | "onVolumeChange"> & {
|
|
2321
|
+
/** Figma `Style` — Default stacks the bar; Light floats a pill bar over the stage. */
|
|
2322
|
+
appearance?: VideoAppearance;
|
|
2323
|
+
/** Seconds to skip when Previous / Next have no playlist handlers. */
|
|
2324
|
+
skipSeconds?: number;
|
|
2325
|
+
/** Available playback rates in the speed popover. */
|
|
2326
|
+
playbackRates?: number[];
|
|
2327
|
+
muted?: boolean;
|
|
2328
|
+
defaultMuted?: boolean;
|
|
2329
|
+
onMutedChange?: (muted: boolean) => void;
|
|
2330
|
+
playbackRate?: number;
|
|
2331
|
+
defaultPlaybackRate?: number;
|
|
2332
|
+
onPlaybackRateChange?: (rate: number) => void;
|
|
2333
|
+
/** Figma 画面比例 — original→contain, stretch→fill, fill→cover. */
|
|
2334
|
+
objectFit?: VideoObjectFit;
|
|
2335
|
+
defaultObjectFit?: VideoObjectFit;
|
|
2336
|
+
onObjectFitChange?: (fit: VideoObjectFit) => void;
|
|
2337
|
+
/** Lightweight loudness balance via Web Audio DynamicsCompressor. */
|
|
2338
|
+
volumeBalance?: boolean;
|
|
2339
|
+
defaultVolumeBalance?: boolean;
|
|
2340
|
+
onVolumeBalanceChange?: (enabled: boolean) => void;
|
|
2341
|
+
/** Linear gain 0–1 (`HTMLMediaElement.volume`). */
|
|
2342
|
+
volume?: number;
|
|
2343
|
+
defaultVolume?: number;
|
|
2344
|
+
onVolumeChange?: (volume: number) => void;
|
|
2345
|
+
/** Override Previous (default: seek back `skipSeconds`). */
|
|
2346
|
+
onPrevious?: () => void;
|
|
2347
|
+
/** Override Next (default: seek forward `skipSeconds`). */
|
|
2348
|
+
onNext?: () => void;
|
|
2349
|
+
/**
|
|
2350
|
+
* Letterbox / pillarbox fill behind the media.
|
|
2351
|
+
* CSS color value — prefer a token, e.g. `var(--box-box-normal-background-blackonly)`.
|
|
2352
|
+
* Defaults to Black (`--box-box-normal-background-blackonly`).
|
|
2353
|
+
*/
|
|
2354
|
+
stageBackground?: string;
|
|
2355
|
+
/**
|
|
2356
|
+
* Auto-hide the control bar after idle (slide down + fade).
|
|
2357
|
+
* Pointer move / press on the player reveals it again.
|
|
2358
|
+
*/
|
|
2359
|
+
autoHideControls?: boolean;
|
|
2360
|
+
/** Idle time in ms before hiding when `autoHideControls` is on. Default 2500. */
|
|
2361
|
+
autoHideDelay?: number;
|
|
2362
|
+
className?: string;
|
|
2363
|
+
style?: CSSProperties;
|
|
2364
|
+
};
|
|
2365
|
+
type VideoHandle = {
|
|
2366
|
+
video: HTMLVideoElement | null;
|
|
2367
|
+
play: () => Promise<void> | undefined;
|
|
2368
|
+
pause: () => void;
|
|
2369
|
+
};
|
|
2370
|
+
declare const Video: react.ForwardRefExoticComponent<Omit<VideoHTMLAttributes<HTMLVideoElement>, "onVolumeChange" | "muted" | "controls"> & {
|
|
2371
|
+
/** Figma `Style` — Default stacks the bar; Light floats a pill bar over the stage. */
|
|
2372
|
+
appearance?: VideoAppearance;
|
|
2373
|
+
/** Seconds to skip when Previous / Next have no playlist handlers. */
|
|
2374
|
+
skipSeconds?: number;
|
|
2375
|
+
/** Available playback rates in the speed popover. */
|
|
2376
|
+
playbackRates?: number[];
|
|
2377
|
+
muted?: boolean;
|
|
2378
|
+
defaultMuted?: boolean;
|
|
2379
|
+
onMutedChange?: (muted: boolean) => void;
|
|
2380
|
+
playbackRate?: number;
|
|
2381
|
+
defaultPlaybackRate?: number;
|
|
2382
|
+
onPlaybackRateChange?: (rate: number) => void;
|
|
2383
|
+
/** Figma 画面比例 — original→contain, stretch→fill, fill→cover. */
|
|
2384
|
+
objectFit?: VideoObjectFit;
|
|
2385
|
+
defaultObjectFit?: VideoObjectFit;
|
|
2386
|
+
onObjectFitChange?: (fit: VideoObjectFit) => void;
|
|
2387
|
+
/** Lightweight loudness balance via Web Audio DynamicsCompressor. */
|
|
2388
|
+
volumeBalance?: boolean;
|
|
2389
|
+
defaultVolumeBalance?: boolean;
|
|
2390
|
+
onVolumeBalanceChange?: (enabled: boolean) => void;
|
|
2391
|
+
/** Linear gain 0–1 (`HTMLMediaElement.volume`). */
|
|
2392
|
+
volume?: number;
|
|
2393
|
+
defaultVolume?: number;
|
|
2394
|
+
onVolumeChange?: (volume: number) => void;
|
|
2395
|
+
/** Override Previous (default: seek back `skipSeconds`). */
|
|
2396
|
+
onPrevious?: () => void;
|
|
2397
|
+
/** Override Next (default: seek forward `skipSeconds`). */
|
|
2398
|
+
onNext?: () => void;
|
|
2399
|
+
/**
|
|
2400
|
+
* Letterbox / pillarbox fill behind the media.
|
|
2401
|
+
* CSS color value — prefer a token, e.g. `var(--box-box-normal-background-blackonly)`.
|
|
2402
|
+
* Defaults to Black (`--box-box-normal-background-blackonly`).
|
|
2403
|
+
*/
|
|
2404
|
+
stageBackground?: string;
|
|
2405
|
+
/**
|
|
2406
|
+
* Auto-hide the control bar after idle (slide down + fade).
|
|
2407
|
+
* Pointer move / press on the player reveals it again.
|
|
2408
|
+
*/
|
|
2409
|
+
autoHideControls?: boolean;
|
|
2410
|
+
/** Idle time in ms before hiding when `autoHideControls` is on. Default 2500. */
|
|
2411
|
+
autoHideDelay?: number;
|
|
2412
|
+
className?: string;
|
|
2413
|
+
style?: CSSProperties;
|
|
2414
|
+
} & react.RefAttributes<VideoHandle>>;
|
|
2415
|
+
|
|
2260
2416
|
type ScrollPickerProps = HTMLAttributes<HTMLDivElement>;
|
|
2261
2417
|
declare function ScrollPicker({ className, children, ...props }: ScrollPickerProps): react.JSX.Element;
|
|
2262
2418
|
type ScrollPickerColumnProps<T = string> = {
|
|
@@ -2566,4 +2722,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
2566
2722
|
*/
|
|
2567
2723
|
declare function initKeyboardFocus(): void;
|
|
2568
2724
|
|
|
2569
|
-
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, 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, Feedback, type FeedbackMode, type FeedbackProps, type FeedbackSize, type FeedbackType, Fieldset, type FieldsetProps, Form, FormField, type FormFieldControlledProps, type FormFieldDirection, type FormFieldLayoutProps, type FormFieldProps, type FormFieldRenderProps, 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, 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, alertVariants, backChevronSide, buttonVariants, cn, enUS, formatDisplayDate, formatMonthYear, formatTimeValue, forwardChevronSide, initKeyboardFocus, inputRootVariants, interpolate, loadingLevelForButtonSize, mirrorSide, mirrorSideForDirection, modalContentVariants, numberInputRootVariants, parseDateInput, parseDateRangeInput, typographyVariants, useColorPickerState, useDirection, useLocale, useLocaleMessages, useRtl, useTheme, useThemeLayoutKey, zhCN };
|
|
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, Feedback, type FeedbackMode, type FeedbackProps, type FeedbackSize, type FeedbackType, Fieldset, type FieldsetProps, Form, FormField, type FormFieldControlledProps, type FormFieldDirection, type FormFieldLayoutProps, type FormFieldProps, type FormFieldRenderProps, 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, enUS, formatDisplayDate, formatMonthYear, formatTimeValue, formatVideoTime, forwardChevronSide, initKeyboardFocus, inputRootVariants, interpolate, loadingLevelForButtonSize, mirrorSide, mirrorSideForDirection, modalContentVariants, numberInputRootVariants, parseDateInput, parseDateRangeInput, parseVideoTime, typographyVariants, useColorPickerState, useDirection, useLocale, useLocaleMessages, useOverlayPortalContainer, useResolvedControlError, useRtl, useTheme, useThemeLayoutKey, videoObjectFitToCss, zhCN };
|