@lec-space/liquidglass 0.0.0-stage → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +60 -2
- package/dist/button-DSXdLDuQ.js +1051 -0
- package/dist/button-EFLg6M7I.cjs +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.js +8931 -0
- package/dist/styles.css +7101 -0
- package/dist/types/accordion.d.ts +33 -0
- package/dist/types/activity-calendar.d.ts +18 -0
- package/dist/types/alert.d.ts +18 -0
- package/dist/types/aspect-ratio.d.ts +10 -0
- package/dist/types/autocomplete.d.ts +41 -0
- package/dist/types/avatar-group.d.ts +16 -0
- package/dist/types/avatar.d.ts +12 -0
- package/dist/types/badge.d.ts +13 -0
- package/dist/types/box.d.ts +12 -0
- package/dist/types/breadcrumbs.d.ts +31 -0
- package/dist/types/button-group.d.ts +12 -0
- package/dist/types/button.d.ts +16 -0
- package/dist/types/calendar.d.ts +23 -0
- package/dist/types/card.d.ts +10 -0
- package/dist/types/checkbox-group.d.ts +39 -0
- package/dist/types/checkbox.d.ts +9 -0
- package/dist/types/close-button.d.ts +11 -0
- package/dist/types/color-area.d.ts +15 -0
- package/dist/types/color-field.d.ts +15 -0
- package/dist/types/color-picker.d.ts +21 -0
- package/dist/types/color-slider.d.ts +21 -0
- package/dist/types/color-swatch-picker.d.ts +24 -0
- package/dist/types/color-swatch.d.ts +15 -0
- package/dist/types/combo-box.d.ts +37 -0
- package/dist/types/command-palette.d.ts +22 -0
- package/dist/types/config-provider.d.ts +100 -0
- package/dist/types/confirm.d.ts +22 -0
- package/dist/types/container.d.ts +12 -0
- package/dist/types/context-menu.d.ts +17 -0
- package/dist/types/data-table.d.ts +32 -0
- package/dist/types/date-field.d.ts +25 -0
- package/dist/types/date-picker.d.ts +29 -0
- package/dist/types/date-range-picker.d.ts +23 -0
- package/dist/types/description.d.ts +8 -0
- package/dist/types/descriptions.d.ts +13 -0
- package/dist/types/dialog.d.ts +19 -0
- package/dist/types/disclosure-group.d.ts +18 -0
- package/dist/types/disclosure.d.ts +31 -0
- package/dist/types/drawer.d.ts +7 -0
- package/dist/types/empty.d.ts +8 -0
- package/dist/types/field-error.d.ts +12 -0
- package/dist/types/fieldset.d.ts +12 -0
- package/dist/types/filter-bar.d.ts +9 -0
- package/dist/types/flex.d.ts +32 -0
- package/dist/types/form-field.d.ts +19 -0
- package/dist/types/form.d.ts +12 -0
- package/dist/types/glass-group.d.ts +10 -0
- package/dist/types/glass.d.ts +3 -0
- package/dist/types/grid.d.ts +30 -0
- package/dist/types/import-wizard.d.ts +11 -0
- package/dist/types/index.d.ts +107 -0
- package/dist/types/input-group.d.ts +22 -0
- package/dist/types/input-otp.d.ts +29 -0
- package/dist/types/input.d.ts +13 -0
- package/dist/types/internal/bend.d.ts +15 -0
- package/dist/types/internal/calendar-day.d.ts +13 -0
- package/dist/types/internal/chevron.d.ts +6 -0
- package/dist/types/internal/color.d.ts +29 -0
- package/dist/types/internal/contour.d.ts +10 -0
- package/dist/types/internal/controllable.d.ts +1 -0
- package/dist/types/internal/cx.d.ts +1 -0
- package/dist/types/internal/date-only.d.ts +4 -0
- package/dist/types/internal/field-error.d.ts +6 -0
- package/dist/types/internal/floating.d.ts +15 -0
- package/dist/types/internal/form-context.d.ts +5 -0
- package/dist/types/internal/form-reset.d.ts +3 -0
- package/dist/types/internal/hold.d.ts +8 -0
- package/dist/types/internal/href.d.ts +7 -0
- package/dist/types/internal/jelly.d.ts +22 -0
- package/dist/types/internal/layout-style.d.ts +62 -0
- package/dist/types/internal/modal.d.ts +11 -0
- package/dist/types/internal/placement.d.ts +33 -0
- package/dist/types/internal/press.d.ts +2 -0
- package/dist/types/internal/range-calendar-navigation.d.ts +6 -0
- package/dist/types/internal/range-calendar.d.ts +11 -0
- package/dist/types/internal/refraction.d.ts +20 -0
- package/dist/types/internal/schedule-utils.d.ts +32 -0
- package/dist/types/internal/scroller.d.ts +2 -0
- package/dist/types/internal/sheet-drag.d.ts +17 -0
- package/dist/types/internal/spring.d.ts +13 -0
- package/dist/types/internal/styles.d.ts +5 -0
- package/dist/types/internal/tab-motion.d.ts +2 -0
- package/dist/types/internal/tree-branch.d.ts +13 -0
- package/dist/types/kbd.d.ts +13 -0
- package/dist/types/label.d.ts +12 -0
- package/dist/types/link.d.ts +19 -0
- package/dist/types/list-box.d.ts +39 -0
- package/dist/types/loading-overlay.d.ts +17 -0
- package/dist/types/member-picker.d.ts +15 -0
- package/dist/types/mention.d.ts +44 -0
- package/dist/types/menu.d.ts +61 -0
- package/dist/types/message.d.ts +12 -0
- package/dist/types/meter.d.ts +28 -0
- package/dist/types/multi-select.d.ts +25 -0
- package/dist/types/navigation-bar.d.ts +25 -0
- package/dist/types/number-field.d.ts +25 -0
- package/dist/types/page-control.d.ts +13 -0
- package/dist/types/pagination.d.ts +12 -0
- package/dist/types/popover.d.ts +20 -0
- package/dist/types/progress-circle.d.ts +20 -0
- package/dist/types/progress.d.ts +10 -0
- package/dist/types/radio-group.d.ts +39 -0
- package/dist/types/radio.d.ts +8 -0
- package/dist/types/range-calendar.d.ts +24 -0
- package/dist/types/schedule-calendar.d.ts +103 -0
- package/dist/types/scroll-shadow.d.ts +16 -0
- package/dist/types/search-field.d.ts +5 -0
- package/dist/types/section.d.ts +10 -0
- package/dist/types/segmented-control.d.ts +14 -0
- package/dist/types/select.d.ts +20 -0
- package/dist/types/separator.d.ts +13 -0
- package/dist/types/sheet.d.ts +14 -0
- package/dist/types/skeleton.d.ts +9 -0
- package/dist/types/slider.d.ts +10 -0
- package/dist/types/statistic.d.ts +11 -0
- package/dist/types/stepper.d.ts +12 -0
- package/dist/types/steps.d.ts +30 -0
- package/dist/types/style-entry.d.ts +1 -0
- package/dist/types/surface.d.ts +17 -0
- package/dist/types/switch.d.ts +7 -0
- package/dist/types/tab-bar.d.ts +23 -0
- package/dist/types/table.d.ts +22 -0
- package/dist/types/tabs.d.ts +19 -0
- package/dist/types/tag-group.d.ts +40 -0
- package/dist/types/tag.d.ts +10 -0
- package/dist/types/tags-input.d.ts +29 -0
- package/dist/types/text-area.d.ts +13 -0
- package/dist/types/time-field.d.ts +25 -0
- package/dist/types/toast.d.ts +35 -0
- package/dist/types/toggle-button-group.d.ts +24 -0
- package/dist/types/toggle-button.d.ts +27 -0
- package/dist/types/toolbar.d.ts +13 -0
- package/dist/types/tooltip.d.ts +16 -0
- package/dist/types/tree.d.ts +18 -0
- package/dist/types/typography.d.ts +11 -0
- package/dist/types/upload.d.ts +15 -0
- package/dist/types/workspace.d.ts +22 -0
- package/dist/workspace.cjs +1 -0
- package/dist/workspace.js +42 -0
- package/package.json +65 -3
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** 液态玻璃手风琴面板:通过结构化 items 渲染带分割线与玻璃光泽的折叠列表。 */
|
|
2
|
+
import { type HTMLAttributes, type JSX, type ReactNode } from "react";
|
|
3
|
+
export interface AccordionItem {
|
|
4
|
+
/** 面板唯一标识。 */
|
|
5
|
+
key: string;
|
|
6
|
+
/** 标题文案。 */
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
/** 可选副标题或补充说明。 */
|
|
9
|
+
subtitle?: ReactNode;
|
|
10
|
+
/** 可选前置图标。 */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** 展开后的内容。 */
|
|
13
|
+
content: ReactNode;
|
|
14
|
+
/** 是否禁用展开。 */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface AccordionProps extends HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
/** 手风琴条目集合。 */
|
|
19
|
+
items: readonly AccordionItem[];
|
|
20
|
+
/** 是否允许同时展开多个面板,默认单展。 */
|
|
21
|
+
allowsMultiple?: boolean;
|
|
22
|
+
/** 受控已展开键数组。 */
|
|
23
|
+
expandedKeys?: readonly string[];
|
|
24
|
+
/** 非受控默认展开键数组。 */
|
|
25
|
+
defaultExpandedKeys?: readonly string[];
|
|
26
|
+
/** 展开键变化回调。 */
|
|
27
|
+
onExpandedChange?: (keys: string[]) => void;
|
|
28
|
+
/** 外观风格:`surface` 实底卡片,`glass` 液态玻璃容器,`separated` 独立分离玻璃项。 */
|
|
29
|
+
variant?: "surface" | "glass" | "separated";
|
|
30
|
+
/** 统一禁用所有面板。 */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function Accordion({ items, allowsMultiple, expandedKeys: controlledKeys, defaultExpandedKeys, onExpandedChange, variant, disabled, className, ...props }: AccordionProps): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** 按日期展示活动强度,可用于提交、考勤等数据;日期与统计口径由业务提供。 */
|
|
2
|
+
import { type JSX } from "react";
|
|
3
|
+
export interface ActivityDay {
|
|
4
|
+
date: string;
|
|
5
|
+
value: number;
|
|
6
|
+
label?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ActivityCalendarProps {
|
|
9
|
+
month: string;
|
|
10
|
+
days: readonly ActivityDay[];
|
|
11
|
+
selectedDate?: string;
|
|
12
|
+
/** 由宿主按业务时区传入今天,避免服务器渲染与浏览器时区不一致。 */
|
|
13
|
+
today?: string;
|
|
14
|
+
onDateSelect?: (date: string) => void;
|
|
15
|
+
onMonthChange?: (month: string) => void;
|
|
16
|
+
"aria-label": string;
|
|
17
|
+
}
|
|
18
|
+
export declare function ActivityCalendar({ month, days, selectedDate, today, onDateSelect, onMonthChange, "aria-label": label, }: ActivityCalendarProps): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type JSX, type ReactNode } from "react";
|
|
2
|
+
export interface AlertAction {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
/** `cancel` is also what Escape does. `destructive` is red. */
|
|
5
|
+
role?: "cancel" | "destructive";
|
|
6
|
+
onSelect?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export interface AlertProps {
|
|
9
|
+
open?: boolean;
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
title: ReactNode;
|
|
13
|
+
message?: ReactNode;
|
|
14
|
+
actions: AlertAction[];
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/** The iOS alert: a modal question with a row of pill buttons. Closes when an action is chosen. */
|
|
18
|
+
export declare function Alert({ open: openProp, defaultOpen, onOpenChange, title, message, actions, className, }: AlertProps): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** 固定宽高比容器(参考 Radix UI AspectRatio):确保封面图、视频与嵌入画板在任意宽度下保持稳定比例。 */
|
|
2
|
+
import { type ForwardRefExoticComponent, type HTMLAttributes, type ReactNode, type RefAttributes } from "react";
|
|
3
|
+
export interface AspectRatioProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** 宽高比(例如 `16 / 9`、`4 / 3`、`1`),默认 `16 / 9`。 */
|
|
5
|
+
ratio?: number;
|
|
6
|
+
/** 圆角规格,默认无额外裁切。 */
|
|
7
|
+
radius?: "none" | "small" | "regular" | "large";
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const AspectRatio: ForwardRefExoticComponent<AspectRatioProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** 液态玻璃浮层搜索自动补全(Autocomplete):点击触发胶囊后在玻璃浮层内实时搜索过滤并选择。 */
|
|
2
|
+
import { type HTMLAttributes, type JSX, type ReactNode } from "react";
|
|
3
|
+
export interface AutocompleteOption {
|
|
4
|
+
/** 唯一值。 */
|
|
5
|
+
value: string;
|
|
6
|
+
/** 展示名称。 */
|
|
7
|
+
label: string;
|
|
8
|
+
/** 可选说明。 */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** 可选分组名。 */
|
|
11
|
+
group?: string;
|
|
12
|
+
/** 禁用该选项。 */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface AutocompleteProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue"> {
|
|
16
|
+
/** 可选数据列表。 */
|
|
17
|
+
options: readonly AutocompleteOption[];
|
|
18
|
+
/** 受控选中值。 */
|
|
19
|
+
value?: string;
|
|
20
|
+
/** 非受控初始值。 */
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
/** 选中值变化回调。 */
|
|
23
|
+
onValueChange?: (value: string) => void;
|
|
24
|
+
/** 触发按钮占位文案。 */
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
/** 浮层内搜索框占位文案。 */
|
|
27
|
+
searchPlaceholder?: string;
|
|
28
|
+
/** 自定义过滤函数。 */
|
|
29
|
+
filter?: (option: AutocompleteOption, query: string) => boolean;
|
|
30
|
+
/** 无匹配时的自定义展示。 */
|
|
31
|
+
empty?: ReactNode;
|
|
32
|
+
/** 是否允许一键清除。 */
|
|
33
|
+
clearable?: boolean;
|
|
34
|
+
/** 原生表单字段名。 */
|
|
35
|
+
name?: string;
|
|
36
|
+
/** 禁用交互。 */
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/** 校验错误提示。 */
|
|
39
|
+
error?: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
export declare function Autocomplete({ options, value: controlledValue, defaultValue, onValueChange, placeholder, searchPlaceholder, filter, empty, clearable, name, disabled, error, className, "aria-label": ariaLabel, ...props }: AutocompleteProps): JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** 液态玻璃堆叠头像组:自动折叠超量头像并展示玻璃质感 +N 溢出圆章。 */
|
|
2
|
+
import { type HTMLAttributes, type JSX, type ReactNode } from "react";
|
|
3
|
+
export interface AvatarGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** 最多直接展示的头像数量,超出部分折叠为 `+N`。 */
|
|
5
|
+
max?: number;
|
|
6
|
+
/** 显式总数(当只渲染前几项但真实成员更多时使用)。 */
|
|
7
|
+
total?: number;
|
|
8
|
+
/** 统一覆盖子头像尺寸。 */
|
|
9
|
+
size?: "small" | "regular" | "large" | number;
|
|
10
|
+
/** 堆叠重叠紧凑度。 */
|
|
11
|
+
spacing?: "tight" | "regular" | "loose";
|
|
12
|
+
/** 自定义溢出计数渲染。 */
|
|
13
|
+
renderCount?: (overflowCount: number) => ReactNode;
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare function AvatarGroup({ max, total, size, spacing, renderCount, className, style, children, ...props }: AvatarGroupProps): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type HTMLAttributes, type JSX, type ReactNode } from "react";
|
|
2
|
+
export interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
src?: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
/** 图片加载失败或未提供时,优先显示 children,再显示姓名首字。 */
|
|
6
|
+
name?: string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
size?: "small" | "regular" | "large" | number;
|
|
9
|
+
shape?: "circle" | "rounded";
|
|
10
|
+
onImageError?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function Avatar({ src, alt, name, children, size, shape, onImageError, className, style, ...props }: AvatarProps): JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HTMLAttributes, JSX, ReactNode } from "react";
|
|
2
|
+
import type { TagTone } from "./tag.js";
|
|
3
|
+
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
count?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
dot?: boolean;
|
|
7
|
+
showZero?: boolean;
|
|
8
|
+
tone?: TagTone;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/** 点状徽标应提供描述,例如“有未读消息”。 */
|
|
11
|
+
label?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function Badge({ count, max, dot, showZero, tone, label, children, className, ...props }: BadgeProps): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** 基础布局原语(参考 Radix UI Box):提供统一的语义间距阶梯、尺寸与定位简写属性。 */
|
|
2
|
+
import { type ForwardRefExoticComponent, type HTMLAttributes, type ReactNode, type RefAttributes } from "react";
|
|
3
|
+
import { type LayoutSpaceProps } from "./internal/layout-style.js";
|
|
4
|
+
export type BoxElement = "div" | "span" | "section" | "article" | "main" | "aside" | "header" | "footer" | "nav";
|
|
5
|
+
export interface BoxProps extends HTMLAttributes<HTMLElement>, LayoutSpaceProps {
|
|
6
|
+
/** 渲染的语义 HTML 标签,默认 `div`。 */
|
|
7
|
+
as?: BoxElement;
|
|
8
|
+
/** CSS display 模式。 */
|
|
9
|
+
display?: "none" | "inline" | "inline-block" | "block" | "contents";
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const Box: ForwardRefExoticComponent<BoxProps & RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** 液态玻璃面包屑导航:支持路径折叠展开、自定义分隔符与当前页语义。 */
|
|
2
|
+
import { type HTMLAttributes, type JSX, type MouseEvent, type ReactNode } from "react";
|
|
3
|
+
export interface BreadcrumbItem {
|
|
4
|
+
/** 唯一标识。 */
|
|
5
|
+
key: string;
|
|
6
|
+
/** 展示文案。 */
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
/** 可选链接地址;最后一项默认作为当前页不渲染链接。 */
|
|
9
|
+
href?: string;
|
|
10
|
+
/** 可选前置图标。 */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** 禁用点击。 */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** 单项点击回调。 */
|
|
15
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface BreadcrumbsProps extends HTMLAttributes<HTMLElement> {
|
|
18
|
+
/** 路径节点列表,按从根到当前页顺序排列。 */
|
|
19
|
+
items: readonly BreadcrumbItem[];
|
|
20
|
+
/** 自定义分隔符,默认为精致右尖括号图标。 */
|
|
21
|
+
separator?: ReactNode;
|
|
22
|
+
/** 超出该数量时自动折叠中间层级为 `…` 展开按钮。 */
|
|
23
|
+
maxItems?: number;
|
|
24
|
+
/** 视觉变体:`plain` 简洁文字路径,`glass` 液态玻璃胶囊包裹。 */
|
|
25
|
+
variant?: "plain" | "glass";
|
|
26
|
+
/** 尺寸规格。 */
|
|
27
|
+
size?: "small" | "regular";
|
|
28
|
+
/** 点击非当前页节点时的统一回调。 */
|
|
29
|
+
onNavigate?: (item: BreadcrumbItem, index: number) => void;
|
|
30
|
+
}
|
|
31
|
+
export declare function Breadcrumbs({ items, separator, maxItems, variant, size, onNavigate, className, "aria-label": ariaLabel, ...props }: BreadcrumbsProps): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** 连体液态玻璃按钮组:统一组织相关动作,支持水平/垂直连体拼接与分割线。 */
|
|
2
|
+
import { type ForwardRefExoticComponent, type HTMLAttributes, type ReactNode, type RefAttributes } from "react";
|
|
3
|
+
export interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** 排列方向。 */
|
|
5
|
+
orientation?: "horizontal" | "vertical";
|
|
6
|
+
/** 是否铺满容器宽度。 */
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
/** 是否使用独立液态玻璃底座包裹子按钮形成连体胶囊。 */
|
|
9
|
+
attached?: boolean;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const ButtonGroup: ForwardRefExoticComponent<ButtonGroupProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ForwardRefExoticComponent, type ReactNode, type RefAttributes } from "react";
|
|
2
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
/** 等待期间保留按钮名称,阻止重复点击和表单提交。 */
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
/** Shown before the label. On its own, the button is a circle; give it an `aria-label`. */
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
/** `glass` is clear; `filled` fills it with the accent colour, for the primary action. */
|
|
8
|
+
variant?: "glass" | "filled";
|
|
9
|
+
/** 统一控件高度:小号 32、常规 40、大号 48px;触屏至少 44px。 */
|
|
10
|
+
size?: "small" | "regular" | "large";
|
|
11
|
+
/** Marks an action that deletes or can't be undone. Shorthand for a red `tint`. */
|
|
12
|
+
destructive?: boolean;
|
|
13
|
+
/** Any CSS colour. Tints a glass button's label, or a filled button's fill. */
|
|
14
|
+
tint?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** 独立液态玻璃日历组件:基于 @daypicker/react,输出稳定 YYYY-MM-DD 日期字符串。 */
|
|
2
|
+
import { type HTMLAttributes, type JSX } from "react";
|
|
3
|
+
export interface CalendarProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue"> {
|
|
4
|
+
/** 受控日期字符串(`YYYY-MM-DD`)。 */
|
|
5
|
+
value?: string;
|
|
6
|
+
/** 非受控初始日期字符串。 */
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
/** 选中日期变化回调。 */
|
|
9
|
+
onValueChange?: (value: string) => void;
|
|
10
|
+
/** 允许选择的最小日期(`YYYY-MM-DD`)。 */
|
|
11
|
+
min?: string;
|
|
12
|
+
/** 允许选择的最大日期(`YYYY-MM-DD`)。 */
|
|
13
|
+
max?: string;
|
|
14
|
+
/** 指定今天日期(用于服务端渲染或稳定截图)。 */
|
|
15
|
+
today?: string;
|
|
16
|
+
/** 同时展示的月份数,默认 1。 */
|
|
17
|
+
numberOfMonths?: number;
|
|
18
|
+
/** 禁用日历交互。 */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** 外观风格:`glass` 带液态玻璃卡片外壳,`plain` 嵌入已有浮层。 */
|
|
21
|
+
variant?: "glass" | "plain";
|
|
22
|
+
}
|
|
23
|
+
export declare function Calendar({ value: controlledValue, defaultValue, onValueChange, min, max, today, numberOfMonths, disabled, variant, className, ...props }: CalendarProps): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ForwardRefExoticComponent, type HTMLAttributes, type ReactNode, type RefAttributes } from "react";
|
|
2
|
+
export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
3
|
+
title?: ReactNode;
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
extra?: ReactNode;
|
|
6
|
+
cover?: ReactNode;
|
|
7
|
+
footer?: ReactNode;
|
|
8
|
+
padding?: "small" | "regular" | "large";
|
|
9
|
+
}
|
|
10
|
+
export declare const Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** 多选框组:统一管理多个 Checkbox 的受控值数组、布局方向、校验与表单重置。 */
|
|
2
|
+
import { type HTMLAttributes, type JSX, type ReactNode } from "react";
|
|
3
|
+
export interface CheckboxGroupOption {
|
|
4
|
+
/** 选项值。 */
|
|
5
|
+
value: string;
|
|
6
|
+
/** 展示标签。 */
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
/** 可选说明文案。 */
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
/** 单项禁用。 */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface CheckboxGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue"> {
|
|
14
|
+
/** 数据驱动的选项集合。 */
|
|
15
|
+
options: readonly CheckboxGroupOption[];
|
|
16
|
+
/** 受控选中值数组。 */
|
|
17
|
+
value?: readonly string[];
|
|
18
|
+
/** 非受控初始选中值数组。 */
|
|
19
|
+
defaultValue?: readonly string[];
|
|
20
|
+
/** 选中值数组变化回调。 */
|
|
21
|
+
onValueChange?: (value: string[]) => void;
|
|
22
|
+
/** 原生表单字段名(同名多值提交)。 */
|
|
23
|
+
name?: string;
|
|
24
|
+
/** 分组标题。 */
|
|
25
|
+
label?: ReactNode;
|
|
26
|
+
/** 分组说明。 */
|
|
27
|
+
description?: ReactNode;
|
|
28
|
+
/** 校验错误提示。 */
|
|
29
|
+
error?: ReactNode;
|
|
30
|
+
/** 排列方向。 */
|
|
31
|
+
orientation?: "vertical" | "horizontal";
|
|
32
|
+
/** 卡片风格选项展示。 */
|
|
33
|
+
variant?: "default" | "card";
|
|
34
|
+
/** 禁用整个多选组。 */
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/** 标记必填。 */
|
|
37
|
+
required?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare function CheckboxGroup({ options, value: controlledValue, defaultValue, onValueChange, name, label, description, error, orientation, variant, disabled, required, className, ...props }: CheckboxGroupProps): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ForwardRefExoticComponent, type InputHTMLAttributes, type ReactNode, type RefAttributes } from "react";
|
|
2
|
+
export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "children"> {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
/** 半选状态独立于 checked,适合“全选”;由调用方根据子项计算。 */
|
|
6
|
+
indeterminate?: boolean;
|
|
7
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** 独立液态玻璃关闭按钮:用于卡片、浮层、提示条与抽屉的统一关闭交互。 */
|
|
2
|
+
import { type ButtonHTMLAttributes, type ForwardRefExoticComponent, type ReactNode, type RefAttributes } from "react";
|
|
3
|
+
export interface CloseButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
/** 按钮尺寸。 */
|
|
5
|
+
size?: "small" | "regular" | "large";
|
|
6
|
+
/** 视觉样式:`glass` 使用液态玻璃材质,`subtle` 使用轻柔填充底色。 */
|
|
7
|
+
variant?: "glass" | "subtle";
|
|
8
|
+
/** 自定义关闭图标;默认使用精致圆角十字图标。 */
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const CloseButton: ForwardRefExoticComponent<CloseButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** 二维饱和度/明度拾色画布(ColorArea):支持指针平滑拖拽与方向键精确微调。 */
|
|
2
|
+
import { type HTMLAttributes, type JSX } from "react";
|
|
3
|
+
export interface ColorAreaProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue"> {
|
|
4
|
+
/** 受控颜色值(Hex 或 RGB 字符串)。 */
|
|
5
|
+
value?: string;
|
|
6
|
+
/** 非受控初始颜色值。 */
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
/** 颜色变化回调,返回标准 Hex 字符串。 */
|
|
9
|
+
onValueChange?: (color: string) => void;
|
|
10
|
+
/** 可选外部色相锁定(0-360),避免纯白/纯黑时色相漂移。 */
|
|
11
|
+
hue?: number;
|
|
12
|
+
/** 禁用交互。 */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function ColorArea({ value: controlledValue, defaultValue, onValueChange, hue: externalHue, disabled, className, style, "aria-label": ariaLabel, ...props }: ColorAreaProps): JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** 液态玻璃颜色文本输入框:支持 Hex / RGB 校验与自动规整,内置实时预览色块。 */
|
|
2
|
+
import { type ForwardRefExoticComponent, type InputHTMLAttributes, type RefAttributes } from "react";
|
|
3
|
+
export interface ColorFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "size"> {
|
|
4
|
+
/** 受控颜色值。 */
|
|
5
|
+
value?: string;
|
|
6
|
+
/** 非受控初始颜色值。 */
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
/** 合法颜色变化回调。 */
|
|
9
|
+
onValueChange?: (color: string) => void;
|
|
10
|
+
/** 是否在左侧展示实时颜色预览色块,默认显示。 */
|
|
11
|
+
showSwatch?: boolean;
|
|
12
|
+
/** 尺寸规格。 */
|
|
13
|
+
size?: "small" | "regular" | "large";
|
|
14
|
+
}
|
|
15
|
+
export declare const ColorField: ForwardRefExoticComponent<ColorFieldProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** 完整液态玻璃拾色器(ColorPicker):集成触发色块胶囊、二维色域画布、色相/透明度滑块、文本输入与预设色板。 */
|
|
2
|
+
import { type HTMLAttributes, type JSX } from "react";
|
|
3
|
+
export interface ColorPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue"> {
|
|
4
|
+
/** 受控颜色值。 */
|
|
5
|
+
value?: string;
|
|
6
|
+
/** 非受控初始颜色值。 */
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
/** 颜色变化回调。 */
|
|
9
|
+
onValueChange?: (color: string) => void;
|
|
10
|
+
/** 是否显示透明度通道滑块。 */
|
|
11
|
+
showAlpha?: boolean;
|
|
12
|
+
/** 预设快捷色板;传空数组可隐藏色板区。 */
|
|
13
|
+
presets?: readonly string[];
|
|
14
|
+
/** 触发按钮标签;默认展示当前色值。 */
|
|
15
|
+
label?: string;
|
|
16
|
+
/** 原生表单字段名。 */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** 禁用交互。 */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function ColorPicker({ value: controlledValue, defaultValue, onValueChange, showAlpha, presets, label, name, disabled, className, "aria-label": ariaLabel, ...props }: ColorPickerProps): JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** 单通道液态玻璃颜色滑块:支持色相 Hue、透明度 Alpha、饱和度、明度与 RGB 通道调节。 */
|
|
2
|
+
import { type HTMLAttributes, type JSX, type ReactNode } from "react";
|
|
3
|
+
import { type ColorChannel } from "./internal/color.js";
|
|
4
|
+
export type { ColorChannel };
|
|
5
|
+
export interface ColorSliderProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue"> {
|
|
6
|
+
/** 要调节的颜色通道,默认 `hue`。 */
|
|
7
|
+
channel?: ColorChannel;
|
|
8
|
+
/** 受控颜色值。 */
|
|
9
|
+
value?: string;
|
|
10
|
+
/** 非受控初始颜色值。 */
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
/** 颜色变化回调。 */
|
|
13
|
+
onValueChange?: (color: string) => void;
|
|
14
|
+
/** 可选顶部标题。 */
|
|
15
|
+
label?: ReactNode;
|
|
16
|
+
/** 是否显示当前通道数值。 */
|
|
17
|
+
showValue?: boolean;
|
|
18
|
+
/** 禁用交互。 */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function ColorSlider({ channel, value: controlledValue, defaultValue, onValueChange, label, showValue, disabled, className, style, "aria-label": ariaLabel, ...props }: ColorSliderProps): JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** 预设色板选择器:基于 ColorSwatch 组合可选色板,支持键盘方向键切换与选中高亮。 */
|
|
2
|
+
import { type HTMLAttributes, type JSX } from "react";
|
|
3
|
+
export interface ColorSwatchOption {
|
|
4
|
+
color: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ColorSwatchPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue"> {
|
|
9
|
+
/** 可选色板,支持直接传色值字符串或含名称的对象。 */
|
|
10
|
+
colors: readonly (string | ColorSwatchOption)[];
|
|
11
|
+
/** 受控选中色值。 */
|
|
12
|
+
value?: string;
|
|
13
|
+
/** 非受控初始色值。 */
|
|
14
|
+
defaultValue?: string;
|
|
15
|
+
/** 选中变化回调。 */
|
|
16
|
+
onValueChange?: (color: string) => void;
|
|
17
|
+
/** 单个色块尺寸。 */
|
|
18
|
+
size?: "small" | "regular" | "large";
|
|
19
|
+
/** 单个色块形状。 */
|
|
20
|
+
shape?: "circle" | "rounded";
|
|
21
|
+
/** 禁用整个色板。 */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function ColorSwatchPicker({ colors, value: controlledValue, defaultValue, onValueChange, size, shape, disabled, className, "aria-label": ariaLabel, ...props }: ColorSwatchPickerProps): JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** 液态玻璃颜色色块:棋盘格透明底 + 玻璃边缘高光,清晰展示纯色与半透明色。 */
|
|
2
|
+
import { type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes } from "react";
|
|
3
|
+
export interface ColorSwatchProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
/** CSS 颜色字符串(如 `#005FC9`、`rgba(0, 95, 201, 0.5)`)。 */
|
|
5
|
+
color: string;
|
|
6
|
+
/** 可读颜色名称(用于无障碍播报)。 */
|
|
7
|
+
colorName?: string;
|
|
8
|
+
/** 尺寸规格,也可传像素值。 */
|
|
9
|
+
size?: "small" | "regular" | "large" | number;
|
|
10
|
+
/** 外形:圆形或圆角矩形。 */
|
|
11
|
+
shape?: "circle" | "rounded";
|
|
12
|
+
/** 是否处于选中态。 */
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const ColorSwatch: ForwardRefExoticComponent<ColorSwatchProps & RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** 液态玻璃可搜索组合框(ComboBox):内联输入框 + 玻璃浮层列表,支持过滤、键盘导航与自由输入。 */
|
|
2
|
+
import { type ForwardRefExoticComponent, type InputHTMLAttributes, type ReactNode, type RefAttributes } from "react";
|
|
3
|
+
export interface ComboBoxOption {
|
|
4
|
+
/** 唯一选项值。 */
|
|
5
|
+
value: string;
|
|
6
|
+
/** 展示标签。 */
|
|
7
|
+
label: string;
|
|
8
|
+
/** 可选辅助说明。 */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** 禁用该选项。 */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ComboBoxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "size"> {
|
|
14
|
+
/** 候选项列表。 */
|
|
15
|
+
options: readonly ComboBoxOption[];
|
|
16
|
+
/** 受控选中值。 */
|
|
17
|
+
value?: string;
|
|
18
|
+
/** 非受控初始选中值。 */
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
/** 选中值变化回调。 */
|
|
21
|
+
onValueChange?: (value: string) => void;
|
|
22
|
+
/** 受控输入文本。 */
|
|
23
|
+
inputValue?: string;
|
|
24
|
+
/** 输入文本变化回调。 */
|
|
25
|
+
onInputChange?: (input: string) => void;
|
|
26
|
+
/** 是否允许保留不在列表中的自定义输入值。 */
|
|
27
|
+
allowsCustomValue?: boolean;
|
|
28
|
+
/** 是否显示一键清除按钮。 */
|
|
29
|
+
clearable?: boolean;
|
|
30
|
+
/** 无匹配项时的提示文案。 */
|
|
31
|
+
emptyText?: ReactNode;
|
|
32
|
+
/** 校验错误提示。 */
|
|
33
|
+
error?: ReactNode;
|
|
34
|
+
/** 控件尺寸。 */
|
|
35
|
+
size?: "small" | "regular" | "large";
|
|
36
|
+
}
|
|
37
|
+
export declare const ComboBox: ForwardRefExoticComponent<ComboBoxProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** 应用级快捷命令入口。命令、搜索范围和执行行为由接入项目提供。 */
|
|
2
|
+
import { type JSX, type RefObject } from "react";
|
|
3
|
+
export interface PaletteCommand {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
group?: string;
|
|
8
|
+
keywords?: readonly string[];
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onSelect: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface CommandPaletteProps {
|
|
13
|
+
open: boolean;
|
|
14
|
+
onOpenChange: (open: boolean) => void;
|
|
15
|
+
commands: readonly PaletteCommand[];
|
|
16
|
+
title?: string;
|
|
17
|
+
/** 应用只为一个命令面板启用全局 Cmd/Ctrl+K。 */
|
|
18
|
+
shortcut?: boolean;
|
|
19
|
+
/** 按钮打开时传入触发按钮;快捷键打开时可传入工作区的返回入口。 */
|
|
20
|
+
returnFocusRef?: RefObject<HTMLElement | null>;
|
|
21
|
+
}
|
|
22
|
+
export declare function CommandPalette({ open, onOpenChange, commands, title, shortcut, returnFocusRef, }: CommandPaletteProps): JSX.Element;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/** 跨页面的主题、语言与布局配置。嵌套配置继承未指定的选项。 */
|
|
2
|
+
import { type HTMLAttributes, type JSX, type ReactNode } from "react";
|
|
3
|
+
export interface Locale {
|
|
4
|
+
languageTag: string;
|
|
5
|
+
cancel: string;
|
|
6
|
+
applyRange: string;
|
|
7
|
+
invalidDateRange: string;
|
|
8
|
+
requiredDateRange: string;
|
|
9
|
+
close: string;
|
|
10
|
+
choose: string;
|
|
11
|
+
pagination: string;
|
|
12
|
+
dateRange: string;
|
|
13
|
+
resetFilters: string;
|
|
14
|
+
increase: string;
|
|
15
|
+
decrease: string;
|
|
16
|
+
showTabs: string;
|
|
17
|
+
previousMonth: string;
|
|
18
|
+
nextMonth: string;
|
|
19
|
+
calendarMonth: (month: string) => string;
|
|
20
|
+
activeDays: (count: number) => string;
|
|
21
|
+
lessActivity: string;
|
|
22
|
+
moreActivity: string;
|
|
23
|
+
weekdays: readonly string[];
|
|
24
|
+
selectRow: (key: string) => string;
|
|
25
|
+
chooseAtLeastOne: string;
|
|
26
|
+
dropFiles: string;
|
|
27
|
+
tooManyFiles: (maximum: number) => string;
|
|
28
|
+
invalidFile: (name: string) => string;
|
|
29
|
+
clear: string;
|
|
30
|
+
showPassword: string;
|
|
31
|
+
hidePassword: string;
|
|
32
|
+
previous: string;
|
|
33
|
+
next: string;
|
|
34
|
+
loading: string;
|
|
35
|
+
empty: string;
|
|
36
|
+
retry: string;
|
|
37
|
+
selectAll: string;
|
|
38
|
+
columns: string;
|
|
39
|
+
search: string;
|
|
40
|
+
startDate: string;
|
|
41
|
+
endDate: string;
|
|
42
|
+
page: (page: number) => string;
|
|
43
|
+
pageSize: string;
|
|
44
|
+
pageSizeOption: (size: number) => string;
|
|
45
|
+
total: (total: number) => string;
|
|
46
|
+
selectDate: string;
|
|
47
|
+
date: string;
|
|
48
|
+
time: string;
|
|
49
|
+
year: string;
|
|
50
|
+
month: string;
|
|
51
|
+
day: string;
|
|
52
|
+
hour: string;
|
|
53
|
+
minute: string;
|
|
54
|
+
second: string;
|
|
55
|
+
dayPeriod: string;
|
|
56
|
+
am: string;
|
|
57
|
+
pm: string;
|
|
58
|
+
breadcrumb: string;
|
|
59
|
+
moreItems: string;
|
|
60
|
+
noMatches: string;
|
|
61
|
+
remove: string;
|
|
62
|
+
verificationCode: string;
|
|
63
|
+
color: string;
|
|
64
|
+
colorPicker: string;
|
|
65
|
+
hue: string;
|
|
66
|
+
saturation: string;
|
|
67
|
+
brightness: string;
|
|
68
|
+
alpha: string;
|
|
69
|
+
red: string;
|
|
70
|
+
green: string;
|
|
71
|
+
blue: string;
|
|
72
|
+
today: string;
|
|
73
|
+
dayView: string;
|
|
74
|
+
weekView: string;
|
|
75
|
+
monthView: string;
|
|
76
|
+
allDay: string;
|
|
77
|
+
createEvent: string;
|
|
78
|
+
searchEvents: string;
|
|
79
|
+
moreEvents: (count: number) => string;
|
|
80
|
+
noEvents: string;
|
|
81
|
+
toggleSidebar: string;
|
|
82
|
+
}
|
|
83
|
+
export declare const zhCN: Locale;
|
|
84
|
+
export declare const enUS: Locale;
|
|
85
|
+
export interface LiquidGlassConfig {
|
|
86
|
+
locale: Locale;
|
|
87
|
+
density: "comfortable" | "compact";
|
|
88
|
+
direction: "ltr" | "rtl";
|
|
89
|
+
}
|
|
90
|
+
export declare function useConfig(): LiquidGlassConfig;
|
|
91
|
+
export interface ConfigProviderProps extends Omit<HTMLAttributes<HTMLDivElement>, "dir"> {
|
|
92
|
+
children: ReactNode;
|
|
93
|
+
locale?: Partial<Locale>;
|
|
94
|
+
density?: LiquidGlassConfig["density"];
|
|
95
|
+
direction?: LiquidGlassConfig["direction"];
|
|
96
|
+
theme?: "light" | "dark";
|
|
97
|
+
/** 仅覆盖显式指定的 CSS token,例如 --lg-fill、--lg-foreground。 */
|
|
98
|
+
tokens?: Record<`--lg-${string}`, string | number>;
|
|
99
|
+
}
|
|
100
|
+
export declare function ConfigProvider({ locale, density, direction, theme, tokens, children, style, ...props }: ConfigProviderProps): JSX.Element;
|