@dsh-plugin/dsh-ui-components-vue 0.0.0-stage → 0.1.0-dev.44009856440

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.
@@ -0,0 +1,78 @@
1
+ import { type PropType } from 'vue';
2
+ /** 按钮的视觉层级,与 HeroUI 的语义变体对应。 */
3
+ export type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'outline' | 'ghost' | 'danger' | 'danger-soft';
4
+ /** 统一的控件尺寸。 */
5
+ export type ControlSize = 'sm' | 'md' | 'lg';
6
+ /** 可按组件覆盖提供器中的圆角。 */
7
+ export type Radius = 'none' | 'sm' | 'md' | 'lg' | 'full';
8
+ /** 按钮沿用 Arco 的链接、提交、加载和点击行为,并增加语义化外观。 */
9
+ export declare const Button: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
10
+ type: PropType<"primary" | "secondary" | "outline" | "dashed" | "text">;
11
+ shape: PropType<"round" | "circle" | "square">;
12
+ status: PropType<"normal" | "success" | "warning" | "danger">;
13
+ htmlType: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ };
17
+ href: StringConstructor;
18
+ autofocus: BooleanConstructor;
19
+ long: BooleanConstructor;
20
+ loadingFixedWidth: BooleanConstructor;
21
+ variant: {
22
+ type: PropType<ButtonVariant>;
23
+ default: string;
24
+ };
25
+ size: {
26
+ type: PropType<ControlSize>;
27
+ default: string;
28
+ };
29
+ radius: PropType<Radius>;
30
+ disabled: BooleanConstructor;
31
+ loading: BooleanConstructor;
32
+ iconOnly: BooleanConstructor;
33
+ block: BooleanConstructor;
34
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
35
+ [key: string]: any;
36
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
37
+ type: PropType<"primary" | "secondary" | "outline" | "dashed" | "text">;
38
+ shape: PropType<"round" | "circle" | "square">;
39
+ status: PropType<"normal" | "success" | "warning" | "danger">;
40
+ htmlType: {
41
+ type: StringConstructor;
42
+ default: string;
43
+ };
44
+ href: StringConstructor;
45
+ autofocus: BooleanConstructor;
46
+ long: BooleanConstructor;
47
+ loadingFixedWidth: BooleanConstructor;
48
+ variant: {
49
+ type: PropType<ButtonVariant>;
50
+ default: string;
51
+ };
52
+ size: {
53
+ type: PropType<ControlSize>;
54
+ default: string;
55
+ };
56
+ radius: PropType<Radius>;
57
+ disabled: BooleanConstructor;
58
+ loading: BooleanConstructor;
59
+ iconOnly: BooleanConstructor;
60
+ block: BooleanConstructor;
61
+ }>> & Readonly<{}>, {
62
+ size: ControlSize;
63
+ disabled: boolean;
64
+ loading: boolean;
65
+ autofocus: boolean;
66
+ block: boolean;
67
+ long: boolean;
68
+ loadingFixedWidth: boolean;
69
+ iconOnly: boolean;
70
+ htmlType: string;
71
+ variant: ButtonVariant;
72
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
73
+ /** 关闭按钮需要可访问名称,默认使用中文操作说明。 */
74
+ export declare const CloseButton: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
75
+ [key: string]: any;
76
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
77
+ /** 对外参数类型包含 Arco 按钮功能及本库外观参数。 */
78
+ export type ButtonProps = InstanceType<typeof Button>['$props'];
@@ -0,0 +1,2 @@
1
+ /** 将 Arco 支持的 RGB/Hex 输入换算为 HeroUI 的色面坐标和色相滑块坐标。 */
2
+ export declare function colorVariables(value: unknown, opaque?: boolean): Record<string, string>;
@@ -0,0 +1,3 @@
1
+ import * as Arco from '@arco-design/web-vue';
2
+ /** 原始颜色交互保留在 Arco,默认面板采用 HeroUI 色面、滑块与 Hex 输入布局。 */
3
+ export declare const ColorPicker: typeof Arco.ColorPicker;
@@ -0,0 +1,48 @@
1
+ import { type PropType } from 'vue';
2
+ export { InputNumber as NumberField } from './basic.js';
3
+ export { Tag as Chip } from './basic.js';
4
+ /** Arco Vue 全量入口保留原有组件、子组件、实例类型与功能 API。 */
5
+ export * from '@arco-design/web-vue';
6
+ /** HeroUI 名称与 Arco 同等用途组件的映射,参数仍采用 Arco Vue API。 */
7
+ export { AutoComplete as Autocomplete, Breadcrumb as Breadcrumbs, CollapseItem as AccordionItem, Collapse as DisclosureGroup, CollapseItem as Disclosure, Empty as EmptyState, Divider as Separator, Textarea as TextArea, RangePicker as DateRangePicker, TypographyText as Text, } from '@arco-design/web-vue';
8
+ /** 手风琴默认只展开一项,设置 accordion=false 可展开多项。 */
9
+ export declare const Accordion: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
10
+ [key: string]: any;
11
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ /** 开关组通过原生 fieldset 同时提供分组名称和整体禁用语义。 */
13
+ export declare const SwitchGroup: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
14
+ label: StringConstructor;
15
+ disabled: BooleanConstructor;
16
+ orientation: {
17
+ type: PropType<"horizontal" | "vertical">;
18
+ default: string;
19
+ };
20
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
21
+ [key: string]: any;
22
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
+ label: StringConstructor;
24
+ disabled: BooleanConstructor;
25
+ orientation: {
26
+ type: PropType<"horizontal" | "vertical">;
27
+ default: string;
28
+ };
29
+ }>> & Readonly<{}>, {
30
+ disabled: boolean;
31
+ orientation: "horizontal" | "vertical";
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
33
+ /** 忙碌指示器为辅助技术提供状态名称。 */
34
+ export declare const Spinner: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
35
+ label: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
39
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
40
+ [key: string]: any;
41
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
42
+ label: {
43
+ type: StringConstructor;
44
+ default: string;
45
+ };
46
+ }>> & Readonly<{}>, {
47
+ label: string;
48
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,35 @@
1
+ import { type Dayjs } from 'dayjs';
2
+ import { type CalendarFactory } from './picker-model.js';
3
+ type DateUnit = 'year' | 'month' | 'day';
4
+ type DateParts = Partial<Record<DateUnit, number>>;
5
+ /** 分段输入按格式排列,日期计算始终限制在公历有效范围内。 */
6
+ export declare function dateSegments(format: string): {
7
+ unit?: DateUnit;
8
+ text: string;
9
+ }[];
10
+ export declare function dateFromParts(parts: DateParts): Dayjs | undefined;
11
+ /** 编辑草稿独立于受控值,允许空日期逐段录入后再提交完整日期。 */
12
+ export interface DateInputDraft {
13
+ parts: DateParts[];
14
+ source: string;
15
+ buffer: string;
16
+ target?: string;
17
+ }
18
+ export interface DateInputOptions {
19
+ dates: (Dayjs | undefined)[];
20
+ range: boolean;
21
+ format: string;
22
+ label: string;
23
+ disabled: boolean;
24
+ readonly: boolean;
25
+ open: boolean;
26
+ allowClear: boolean;
27
+ draft: DateInputDraft;
28
+ invalidate: () => void;
29
+ change: (dates: (Dayjs | undefined)[]) => void;
30
+ toggle: () => void;
31
+ disabledDate: (date: Dayjs) => boolean;
32
+ }
33
+ /** 两个框架共享输入语义,Arco Trigger 继续负责定位与关闭。 */
34
+ export declare function renderDateInput<N>(h: CalendarFactory<N>, options: DateInputOptions): N;
35
+ export {};
@@ -0,0 +1,2 @@
1
+ /** Vue 图标入口,按命名导入以便构建器移除未使用的图标。 */
2
+ export * from '@arco-design/web-vue/es/icon/index.js';
@@ -0,0 +1,33 @@
1
+ import { type DefineComponent } from 'vue';
2
+ import { Drawer as ArcoDrawer, Modal as ArcoModal, type MessageMethod, type NotificationMethod, type ModalMethod, type DrawerMethod } from '@arco-design/web-vue';
3
+ import { type ToastApi } from './provider.js';
4
+ /** 保留 Arco 的事件与异步确认接口,并提供初始显示状态。 */
5
+ export type ModalProps = InstanceType<typeof ArcoModal>['$props'] & {
6
+ label?: string;
7
+ };
8
+ /** 抽屉沿用 Arco 的位置和尺寸接口。 */
9
+ export type DrawerProps = InstanceType<typeof ArcoDrawer>['$props'] & {
10
+ label?: string;
11
+ };
12
+ /** 带焦点限制、焦点恢复和独立滚动区的模态对话框。 */
13
+ export declare const Modal: DefineComponent<ModalProps>;
14
+ /** 侧边抽屉占满窗口高度,上下抽屉按内容高度展开。 */
15
+ export declare const Drawer: DefineComponent<DrawerProps>;
16
+ /** 默认禁止点击遮罩关闭的确认对话框。 */
17
+ export declare const AlertDialog: DefineComponent<ModalProps>;
18
+ /** 获取当前主题范围内的消息接口,计时器随 Provider 卸载释放。 */
19
+ export declare function useToast(): ToastApi;
20
+ /** 提供作用域内的 Arco 消息和通知接口,支持独立位置与标识更新。 */
21
+ export interface FeedbackApi {
22
+ message: MessageMethod;
23
+ notification: NotificationMethod;
24
+ }
25
+ /** 命令式提示通过当前 Provider 渲染,避免共享全局容器和主题。 */
26
+ export declare function useFeedback(): FeedbackApi;
27
+ /** 作用域内的命令式对话框接口,句柄支持关闭与更新。 */
28
+ export interface DialogApi {
29
+ modal: ModalMethod;
30
+ drawer: DrawerMethod;
31
+ }
32
+ /** 动态内容作为 Provider 后代渲染,继承语言、主题和 Vue 注入值。 */
33
+ export declare function useDialog(): DialogApi;
@@ -0,0 +1,37 @@
1
+ import { type Dayjs } from 'dayjs';
2
+ /** 日期面板保留公历日期算术,格式化和事件值交由 Dayjs 与 Arco。 */
3
+ export declare function pickerDate(value: unknown, format?: string): Dayjs | undefined;
4
+ /** 日期网格包含当前月及首尾周,避免额外空周改变面板高度。 */
5
+ export declare function monthDays(month: Dayjs, firstDay: number): Dayjs[];
6
+ /** 焦点限制在可见月份内,优先原日期,再选择与其最近的可用日期。 */
7
+ export declare function calendarFocus(month: Dayjs, preferred: Dayjs, range: boolean, disabled: (date: Dayjs) => boolean): Dayjs | undefined;
8
+ export declare function orderedRange(first: Dayjs, second: Dayjs): [Dayjs, Dayjs];
9
+ export declare function calendarWeekStart(locale: string): number;
10
+ export declare function calendarKeyDate(date: Dayjs, key: string, firstDay: number, shift?: boolean): Dayjs | undefined;
11
+ export declare const calendarIcons: {
12
+ previous: string;
13
+ next: string;
14
+ };
15
+ export interface CalendarViewState {
16
+ month: Dayjs;
17
+ focused: Dayjs;
18
+ selected: Dayjs[];
19
+ anchor?: Dayjs;
20
+ hover?: Dayjs;
21
+ range: boolean;
22
+ yearOpen: boolean;
23
+ locale: string;
24
+ firstDay: number;
25
+ disabled: (date: Dayjs) => boolean;
26
+ }
27
+ export interface CalendarViewActions {
28
+ select: (date: Dayjs) => void;
29
+ hover: (date: Dayjs) => void;
30
+ month: (date: Dayjs) => void;
31
+ focus: (date: Dayjs) => void;
32
+ year: (value: boolean) => void;
33
+ yearSelect: (year: number) => void;
34
+ }
35
+ export type CalendarFactory<N> = (tag: string, props: Record<string, unknown>, ...children: (N | string | number | null)[]) => N;
36
+ /** 两端使用相同语义结构;工厂只转换框架的 class 与事件绑定。 */
37
+ export declare function renderCalendar<N>(h: CalendarFactory<N>, state: CalendarViewState, actions: CalendarViewActions): N;