nkk-flow 0.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.
Files changed (82) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +180 -0
  3. package/dist/index.cjs +226 -0
  4. package/dist/index.js +5682 -0
  5. package/dist/style.css +2 -0
  6. package/dist/types/components/ui/cascader/Cascader.vue.d.ts +44 -0
  7. package/dist/types/components/ui/cascader/index.d.ts +2 -0
  8. package/dist/types/components/ui/cascader/types.d.ts +27 -0
  9. package/dist/types/components/ui/checkbox/Checkbox.vue.d.ts +24 -0
  10. package/dist/types/components/ui/checkbox/index.d.ts +1 -0
  11. package/dist/types/components/ui/date/DatePanel.vue.d.ts +11 -0
  12. package/dist/types/components/ui/date/DatePicker.vue.d.ts +21 -0
  13. package/dist/types/components/ui/date/index.d.ts +2 -0
  14. package/dist/types/components/ui/date/useFloatingPanel.d.ts +18 -0
  15. package/dist/types/components/ui/date-time/DateTimePicker.vue.d.ts +18 -0
  16. package/dist/types/components/ui/date-time/index.d.ts +1 -0
  17. package/dist/types/components/ui/drawer/Drawer.vue.d.ts +40 -0
  18. package/dist/types/components/ui/drawer/index.d.ts +1 -0
  19. package/dist/types/components/ui/empty/Empty.vue.d.ts +11 -0
  20. package/dist/types/components/ui/empty/index.d.ts +1 -0
  21. package/dist/types/components/ui/input/Input.vue.d.ts +20 -0
  22. package/dist/types/components/ui/input/index.d.ts +1 -0
  23. package/dist/types/components/ui/input-number/InputNumber.vue.d.ts +23 -0
  24. package/dist/types/components/ui/input-number/index.d.ts +1 -0
  25. package/dist/types/components/ui/loading/Loading.vue.d.ts +9 -0
  26. package/dist/types/components/ui/loading/LoadingMask.vue.d.ts +15 -0
  27. package/dist/types/components/ui/loading/index.d.ts +14 -0
  28. package/dist/types/components/ui/loading/service.d.ts +20 -0
  29. package/dist/types/components/ui/radio/Radio.vue.d.ts +26 -0
  30. package/dist/types/components/ui/radio/index.d.ts +1 -0
  31. package/dist/types/components/ui/scrollbar/Scrollbar.vue.d.ts +24 -0
  32. package/dist/types/components/ui/scrollbar/index.d.ts +1 -0
  33. package/dist/types/components/ui/segmented/Segmented.vue.d.ts +20 -0
  34. package/dist/types/components/ui/segmented/index.d.ts +2 -0
  35. package/dist/types/components/ui/segmented/types.d.ts +12 -0
  36. package/dist/types/components/ui/select/Select.vue.d.ts +34 -0
  37. package/dist/types/components/ui/select/index.d.ts +2 -0
  38. package/dist/types/components/ui/select-field/SelectField.vue.d.ts +33 -0
  39. package/dist/types/components/ui/select-field/index.d.ts +3 -0
  40. package/dist/types/components/ui/switch/Switch.vue.d.ts +15 -0
  41. package/dist/types/components/ui/switch/index.d.ts +1 -0
  42. package/dist/types/components/ui/tree-node/TreeNode.vue.d.ts +55 -0
  43. package/dist/types/components/ui/tree-node/TreeNodeRow.vue.d.ts +22 -0
  44. package/dist/types/components/ui/tree-node/context.d.ts +23 -0
  45. package/dist/types/components/ui/tree-node/index.d.ts +3 -0
  46. package/dist/types/components/ui/tree-node/types.d.ts +15 -0
  47. package/dist/types/components/ui/tree-node/utils.d.ts +41 -0
  48. package/dist/types/hooks/logicflow/adapter.d.ts +17 -0
  49. package/dist/types/hooks/logicflow/components/add-node-dialog/index.vue.d.ts +18 -0
  50. package/dist/types/hooks/logicflow/components/index.d.ts +3 -0
  51. package/dist/types/hooks/logicflow/components/node-config/ApprovalNodeConfig.vue.d.ts +4 -0
  52. package/dist/types/hooks/logicflow/components/node-config/CcNodeConfig.vue.d.ts +4 -0
  53. package/dist/types/hooks/logicflow/components/node-config/ConditionNodeConfig.vue.d.ts +4 -0
  54. package/dist/types/hooks/logicflow/components/node-config/StartNodeConfig.vue.d.ts +4 -0
  55. package/dist/types/hooks/logicflow/components/node-config/TimerNodeConfig.vue.d.ts +4 -0
  56. package/dist/types/hooks/logicflow/components/node-config/index.d.ts +19 -0
  57. package/dist/types/hooks/logicflow/components/node-config/index.vue.d.ts +43 -0
  58. package/dist/types/hooks/logicflow/components/node-config/types.d.ts +28 -0
  59. package/dist/types/hooks/logicflow/components/primitives/pickers/NodeConfigAssigneePicker.vue.d.ts +56 -0
  60. package/dist/types/hooks/logicflow/components/primitives/pickers/NodeConfigAssigneeTags.vue.d.ts +12 -0
  61. package/dist/types/hooks/logicflow/components/primitives/pickers/NodeConfigInitiatorPicker.vue.d.ts +30 -0
  62. package/dist/types/hooks/logicflow/components/primitives/ui/NodeConfigAddButton.vue.d.ts +12 -0
  63. package/dist/types/hooks/logicflow/components/primitives/ui/NodeConfigRadioCard.vue.d.ts +14 -0
  64. package/dist/types/hooks/logicflow/components/primitives/ui/NodeConfigSectionTitle.vue.d.ts +9 -0
  65. package/dist/types/hooks/logicflow/defaults.d.ts +9 -0
  66. package/dist/types/hooks/logicflow/edges/index.d.ts +1 -0
  67. package/dist/types/hooks/logicflow/edges/process/FlowProcessEdge.d.ts +34 -0
  68. package/dist/types/hooks/logicflow/edges/process/index.d.ts +1 -0
  69. package/dist/types/hooks/logicflow/index.d.ts +31 -0
  70. package/dist/types/hooks/logicflow/nodes/process/FlowProcessNode.d.ts +93 -0
  71. package/dist/types/hooks/logicflow/nodes/process/index.d.ts +1 -0
  72. package/dist/types/hooks/logicflow/register.d.ts +2 -0
  73. package/dist/types/hooks/logicflow/types/form.d.ts +26 -0
  74. package/dist/types/hooks/logicflow/types/index.d.ts +3 -0
  75. package/dist/types/hooks/logicflow/types/logicflow.d.ts +209 -0
  76. package/dist/types/hooks/logicflow/types/process/base.d.ts +52 -0
  77. package/dist/types/hooks/logicflow/types/process/endpoint.d.ts +19 -0
  78. package/dist/types/hooks/logicflow/types/process/router.d.ts +48 -0
  79. package/dist/types/hooks/logicflow/types/process/task.d.ts +86 -0
  80. package/dist/types/hooks/logicflow/types/process.d.ts +24 -0
  81. package/dist/types/index.d.ts +1 -0
  82. package/package.json +77 -0
package/dist/style.css ADDED
@@ -0,0 +1,2 @@
1
+ .node-picker-panel[data-v-dec2f897]{isolation:isolate;z-index:0;transform-origin:top;transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1),box-shadow .18s cubic-bezier(.16,1,.3,1);overflow:visible}.node-picker-panel[data-state=open][data-v-dec2f897]{opacity:1;transform:scale(1)translate(0,0)}.node-picker-panel[data-state=closed][data-v-dec2f897]{opacity:0}.node-picker-panel[data-side=right][data-state=closed][data-v-dec2f897]{transform:scale(.96)translate(-8px)}.node-picker-panel[data-side=left][data-state=closed][data-v-dec2f897]{transform:scale(.96)translate(8px)}.node-picker-arrow[data-v-dec2f897]{top:var(--arrow-top);z-index:-1;pointer-events:none;width:10px;height:10px;position:absolute;transform:translateY(-50%)}.node-picker-arrow[data-v-dec2f897]:before{z-index:-1;content:"";box-sizing:border-box;background:#fff;border:1px solid #e2e8f0;width:10px;height:10px;position:absolute;transform:rotate(45deg)}.node-picker-panel[data-side=right] .node-picker-arrow[data-v-dec2f897]{left:calc(var(--arrow-gap,6px) * -1)}.node-picker-panel[data-side=right] .node-picker-arrow[data-v-dec2f897]:before{border-top-color:#0000;border-right-color:#0000}.node-picker-panel[data-side=left] .node-picker-arrow[data-v-dec2f897]{right:calc(var(--arrow-gap,6px) * -1)}.node-picker-panel[data-side=left] .node-picker-arrow[data-v-dec2f897]:before{border-bottom-color:#0000;border-left-color:#0000}.node-picker-option[data-v-dec2f897]:hover{border-color:var(--option-border)}.node-picker-option:hover .node-picker-icon[data-v-dec2f897]{transform:scale(1.1)}.node-picker-option[data-v-dec2f897]:active{transform:translateY(1px)}.drawer-fade-enter-active[data-v-8f114467],.drawer-fade-leave-active[data-v-8f114467]{transition:opacity .18s}.drawer-fade-enter-from[data-v-8f114467],.drawer-fade-leave-to[data-v-8f114467]{opacity:0}.drawer-right-enter-active[data-v-8f114467],.drawer-right-leave-active[data-v-8f114467],.drawer-left-enter-active[data-v-8f114467],.drawer-left-leave-active[data-v-8f114467],.drawer-bottom-enter-active[data-v-8f114467],.drawer-bottom-leave-active[data-v-8f114467],.drawer-top-enter-active[data-v-8f114467],.drawer-top-leave-active[data-v-8f114467]{transition:transform .24s cubic-bezier(.22,1,.36,1),opacity .18s}.drawer-right-enter-from[data-v-8f114467],.drawer-right-leave-to[data-v-8f114467]{opacity:0;transform:translate(100%)}.drawer-left-enter-from[data-v-8f114467],.drawer-left-leave-to[data-v-8f114467]{opacity:0;transform:translate(-100%)}.drawer-bottom-enter-from[data-v-8f114467],.drawer-bottom-leave-to[data-v-8f114467]{opacity:0;transform:translateY(100%)}.drawer-top-enter-from[data-v-8f114467],.drawer-top-leave-to[data-v-8f114467]{opacity:0;transform:translateY(-100%)}.picker-panel[data-v-c622d5c5]{isolation:isolate;transform-origin:top;transition:opacity .21s cubic-bezier(.16,1,.3,1),transform .21s cubic-bezier(.16,1,.3,1),width .21s cubic-bezier(.16,1,.3,1);position:relative;overflow:visible}.picker-panel[data-state=open][data-v-c622d5c5]{opacity:1;transform:scale(1)translate(0,0)}.picker-panel[data-state=closed][data-v-c622d5c5]{opacity:0;transform:scale(.96)translateY(6px)}.picker-panel[data-placement=top][data-v-c622d5c5]{transform-origin:bottom}.picker-panel[data-placement=top][data-state=closed][data-v-c622d5c5]{transform:scale(.96)translateY(-6px)}.picker-arrow[data-v-c622d5c5]{left:var(--arrow-left,20px);z-index:-1;pointer-events:none;width:10px;height:10px;position:absolute;transform:translate(-50%)}.picker-panel:not([data-placement=top]) .picker-arrow[data-v-c622d5c5]{top:-5px}.picker-panel:not([data-placement=top]) .picker-arrow[data-v-c622d5c5]:before{content:"";box-sizing:border-box;background:#fff;border:1px solid #0000;border-color:#e2e8f0 #0000 #0000 #e2e8f0;position:absolute;inset:0;transform:rotate(45deg)}.picker-panel[data-placement=top] .picker-arrow[data-v-c622d5c5]{top:auto;bottom:-5px}.picker-panel[data-placement=top] .picker-arrow[data-v-c622d5c5]:before{content:"";box-sizing:border-box;background:#fff;border:1px solid #e2e8f0;border-color:#0000 #e2e8f0 #e2e8f0 #0000;position:absolute;inset:0;transform:rotate(45deg)}.relative[data-open=true][data-v-d05a38e7] .select-trigger,.relative[data-v-d05a38e7]:hover .select-trigger{border-color:var(--color-brand-600)}.relative[data-invalid=true][data-v-d05a38e7] .select-trigger,.relative[data-invalid=true][data-v-d05a38e7]:hover .select-trigger,.relative[data-invalid=true][data-open=true][data-v-d05a38e7] .select-trigger{border-color:var(--color-red-500,#ef4444)}.select-fade-enter-active[data-v-d05a38e7],.select-fade-leave-active[data-v-d05a38e7]{transition:opacity .15s,transform .15s}.select-fade-enter-from[data-v-d05a38e7],.select-fade-leave-to[data-v-d05a38e7]{opacity:0;transform:translateY(-4px)}.relative[data-open=true][data-v-7a83b4f0] .select-trigger,.relative[data-v-7a83b4f0]:hover .select-trigger{border-color:var(--color-brand-600)}.select-fade-enter-active[data-v-7a83b4f0],.select-fade-leave-active[data-v-7a83b4f0]{transition:opacity .15s,transform .15s}.select-fade-enter-from[data-v-7a83b4f0],.select-fade-leave-to[data-v-7a83b4f0]{opacity:0;transform:translateY(-4px)}.date-trigger[data-v-ae30219d]:hover,.relative[data-open=true] .date-trigger[data-v-ae30219d]{border-color:var(--color-brand-600)}.relative[data-invalid=true] .date-trigger[data-v-ae30219d],.relative[data-invalid=true]:hover .date-trigger[data-v-ae30219d],.relative[data-invalid=true][data-open=true] .date-trigger[data-v-ae30219d]{border-color:var(--color-red-500,#ef4444)}.date-fade-enter-active[data-v-ae30219d],.date-fade-leave-active[data-v-ae30219d]{transition:opacity .15s,transform .15s}.date-fade-enter-from[data-v-ae30219d],.date-fade-leave-to[data-v-ae30219d]{opacity:0;transform:translateY(-4px)}.datetime-trigger[data-v-6f56c5a4]:hover,.relative[data-open=true] .datetime-trigger[data-v-6f56c5a4]{border-color:var(--color-brand-600)}.relative[data-invalid=true] .datetime-trigger[data-v-6f56c5a4],.relative[data-invalid=true]:hover .datetime-trigger[data-v-6f56c5a4],.relative[data-invalid=true][data-open=true] .datetime-trigger[data-v-6f56c5a4]{border-color:var(--color-red-500,#ef4444)}.datetime-fade-enter-active[data-v-6f56c5a4],.datetime-fade-leave-active[data-v-6f56c5a4]{transition:opacity .15s,transform .15s}.datetime-fade-enter-from[data-v-6f56c5a4],.datetime-fade-leave-to[data-v-6f56c5a4]{opacity:0;transform:translateY(-4px)}.picker-panel[data-v-546ff3ce]{isolation:isolate;transform-origin:top;transition:opacity .21s cubic-bezier(.16,1,.3,1),transform .21s cubic-bezier(.16,1,.3,1),width .21s cubic-bezier(.16,1,.3,1);position:relative;overflow:visible}.picker-panel[data-state=open][data-v-546ff3ce]{opacity:1;transform:scale(1)translate(0,0)}.picker-panel[data-state=closed][data-v-546ff3ce]{opacity:0;transform:scale(.96)translateY(6px)}.picker-panel[data-placement=top][data-v-546ff3ce]{transform-origin:bottom}.picker-panel[data-placement=top][data-state=closed][data-v-546ff3ce]{transform:scale(.96)translateY(-6px)}.picker-arrow[data-v-546ff3ce]{left:var(--arrow-left,20px);z-index:-1;pointer-events:none;width:10px;height:10px;position:absolute;transform:translate(-50%)}.picker-panel:not([data-placement=top]) .picker-arrow[data-v-546ff3ce]{top:-5px}.picker-panel:not([data-placement=top]) .picker-arrow[data-v-546ff3ce]:before{content:"";box-sizing:border-box;background:#fff;border:1px solid #0000;border-color:#e2e8f0 #0000 #0000 #e2e8f0;position:absolute;inset:0;transform:rotate(45deg)}.picker-panel[data-placement=top] .picker-arrow[data-v-546ff3ce]{top:auto;bottom:-5px}.picker-panel[data-placement=top] .picker-arrow[data-v-546ff3ce]:before{content:"";box-sizing:border-box;background:#fff;border:1px solid #e2e8f0;border-color:#0000 #e2e8f0 #e2e8f0 #0000;position:absolute;inset:0;transform:rotate(45deg)}
2
+ /*$vite$:1*/
@@ -0,0 +1,44 @@
1
+ import type { CascaderNode, CascaderSelected } from './types';
2
+ type __VLS_Props = {
3
+ /** 选中叶子节点的 value(v-model) */
4
+ modelValue?: string | null;
5
+ /** 级联数据 */
6
+ options?: CascaderNode[];
7
+ placeholder?: string;
8
+ disabled?: boolean;
9
+ /** 回显是否显示完整路径(根→叶子),默认只显示叶子 label */
10
+ showFullPath?: boolean;
11
+ /** 完整路径的分隔符,默认 " / " */
12
+ separator?: string;
13
+ /** 节点 key 字段名,默认 "id" */
14
+ nodeKey?: string;
15
+ /** 节点 label 字段名,默认 "name" */
16
+ labelKey?: string;
17
+ /** 子节点字段名,默认 "children" */
18
+ childrenKey?: string;
19
+ /** 是否叶子字段名,默认 "leaf" */
20
+ leafKey?: string;
21
+ /** 是否禁用字段名,默认 "disabled" */
22
+ disabledKey?: string;
23
+ };
24
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ change: (selected: CascaderSelected | null) => any;
26
+ "update:modelValue": (value: string | null) => any;
27
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
28
+ onChange?: ((selected: CascaderSelected | null) => any) | undefined;
29
+ "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
30
+ }>, {
31
+ nodeKey: string;
32
+ modelValue: string | null;
33
+ options: CascaderNode[];
34
+ disabled: boolean;
35
+ placeholder: string;
36
+ labelKey: string;
37
+ childrenKey: string;
38
+ showFullPath: boolean;
39
+ separator: string;
40
+ leafKey: string;
41
+ disabledKey: string;
42
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
43
+ declare const _default: typeof __VLS_export;
44
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as Cascader } from './Cascader.vue';
2
+ export type { CascaderNode, CascaderSelected } from './types';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Cascader 类型定义
3
+ *
4
+ * 设计约束:单选叶子模式 —— 每次选择必须达到叶子节点(leaf=true 或无 children),
5
+ * 非叶子节点只能展开下一级,不能被"选中"。
6
+ */
7
+ /** 级联节点数据(宽松结构,通过 nodeKey/labelKey/childrenKey 适配任意树数据) */
8
+ export interface CascaderNode {
9
+ id?: string;
10
+ name?: string;
11
+ label?: string;
12
+ /** 是否叶子节点(缺省时由 children 是否为空推断) */
13
+ leaf?: boolean;
14
+ /** 是否禁用选择 */
15
+ disabled?: boolean;
16
+ children?: CascaderNode[];
17
+ [key: string]: unknown;
18
+ }
19
+ /** 选中的路径信息(emit change 时附带,便于父组件处理 label 回写等) */
20
+ export interface CascaderSelected {
21
+ /** 从根到叶子的完整路径节点 */
22
+ path: CascaderNode[];
23
+ /** 叶子节点 value(即 v-model 存储的值) */
24
+ value: string;
25
+ /** 叶子节点 label */
26
+ label: string;
27
+ }
@@ -0,0 +1,24 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
4
+ modelValue: boolean;
5
+ disabled?: boolean;
6
+ /** 半选状态(子节点部分选中),优先级低于 modelValue */
7
+ indeterminate?: boolean;
8
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:modelValue": (value: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<{
11
+ modelValue: boolean;
12
+ disabled?: boolean;
13
+ /** 半选状态(子节点部分选中),优先级低于 modelValue */
14
+ indeterminate?: boolean;
15
+ }> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
18
+ default?: (props: {}) => any;
19
+ }>;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1 @@
1
+ export { default as Checkbox } from './Checkbox.vue';
@@ -0,0 +1,11 @@
1
+ type __VLS_Props = {
2
+ /** 当前选中日期(YYYY-MM-DD,空 = 未选中) */
3
+ modelValue?: string;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ select: (value: string) => any;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onSelect?: ((value: string) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,21 @@
1
+ type __VLS_Props = {
2
+ placeholder?: string;
3
+ disabled?: boolean;
4
+ /** 校验失败态:true 时 trigger 显示红色边框 */
5
+ invalid?: boolean;
6
+ };
7
+ type __VLS_ModelProps = {
8
+ modelValue?: string;
9
+ };
10
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ "update:modelValue": (value: string) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
15
+ }>, {
16
+ invalid: boolean;
17
+ disabled: boolean;
18
+ placeholder: string;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as DatePanel } from './DatePanel.vue';
2
+ export { default as DatePicker } from './DatePicker.vue';
@@ -0,0 +1,18 @@
1
+ import type { Ref } from 'vue';
2
+ /**
3
+ * 悬浮面板定位(Teleport 到 body + position: fixed)
4
+ *
5
+ * 触发器所在区域常处于 overflow: auto/scroll 的滚动容器内(如抽屉内容区),
6
+ * 挂在触发器内部的绝对定位面板无论怎么对齐都会被容器裁剪。
7
+ * 此工具将面板脱离文档流后按视口边界计算 fixed 坐标:
8
+ * - 水平:优先与触发器左缘对齐;超出视口右缘则改为右缘对齐;最终夹在视口内
9
+ * - 垂直:优先在触发器下方展开;下方空间不足时向上弹出
10
+ * - 滚动 / 窗口缩放时实时跟随重算
11
+ */
12
+ export declare function useFloatingPanel(triggerRef: Ref<HTMLElement | null>, dropdownRef: Ref<HTMLElement | null>, options?: {
13
+ offset?: number;
14
+ margin?: number;
15
+ }): {
16
+ panelStyle: Ref<Record<string, string>, Record<string, string>>;
17
+ update: () => void;
18
+ };
@@ -0,0 +1,18 @@
1
+ type __VLS_Props = {
2
+ placeholder?: string;
3
+ disabled?: boolean;
4
+ };
5
+ type __VLS_ModelProps = {
6
+ modelValue?: string;
7
+ };
8
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:modelValue": (value: string) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
13
+ }>, {
14
+ disabled: boolean;
15
+ placeholder: string;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as DateTimePicker } from './DateTimePicker.vue';
@@ -0,0 +1,40 @@
1
+ type DrawerSide = 'top' | 'right' | 'bottom' | 'left';
2
+ type __VLS_Props = {
3
+ modelValue: boolean;
4
+ title?: string;
5
+ description?: string;
6
+ side?: DrawerSide;
7
+ closeOnOverlay?: boolean;
8
+ closeOnEsc?: boolean;
9
+ };
10
+ declare var __VLS_19: {}, __VLS_21: {}, __VLS_23: {}, __VLS_25: {};
11
+ type __VLS_Slots = {} & {
12
+ title?: (props: typeof __VLS_19) => any;
13
+ } & {
14
+ description?: (props: typeof __VLS_21) => any;
15
+ } & {
16
+ default?: (props: typeof __VLS_23) => any;
17
+ } & {
18
+ footer?: (props: typeof __VLS_25) => any;
19
+ };
20
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ close: () => any;
22
+ "update:modelValue": (value: boolean) => any;
23
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
24
+ onClose?: (() => any) | undefined;
25
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
26
+ }>, {
27
+ title: string;
28
+ description: string;
29
+ side: DrawerSide;
30
+ closeOnOverlay: boolean;
31
+ closeOnEsc: boolean;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
34
+ declare const _default: typeof __VLS_export;
35
+ export default _default;
36
+ type __VLS_WithSlots<T, S> = T & {
37
+ new (): {
38
+ $slots: S;
39
+ };
40
+ };
@@ -0,0 +1 @@
1
+ export { default as Drawer } from './Drawer.vue';
@@ -0,0 +1,11 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{
4
+ /** 空状态提示文字 */
5
+ text?: string;
6
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
7
+ /** 空状态提示文字 */
8
+ text?: string;
9
+ }> & Readonly<{}>, {
10
+ text: string;
11
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1 @@
1
+ export { default as Empty } from './Empty.vue';
@@ -0,0 +1,20 @@
1
+ type __VLS_Slots = {
2
+ prefix?: () => unknown;
3
+ suffix?: () => unknown;
4
+ };
5
+ type __VLS_ModelProps = {
6
+ modelValue?: string | number;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:modelValue": (value: string | number) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
11
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1 @@
1
+ export { default as Input } from './Input.vue';
@@ -0,0 +1,23 @@
1
+ type __VLS_Props = {
2
+ placeholder?: string;
3
+ min?: number;
4
+ max?: number;
5
+ step?: number;
6
+ integer?: boolean;
7
+ disabled?: boolean;
8
+ };
9
+ type __VLS_ModelProps = {
10
+ modelValue?: number | null;
11
+ };
12
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
13
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "update:modelValue": (value: number | null) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
17
+ }>, {
18
+ disabled: boolean;
19
+ placeholder: string;
20
+ integer: boolean;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as InputNumber } from './InputNumber.vue';
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ /** 尺寸:sm(4px) / md(6px) / lg(8px) 方块边长,默认 md */
3
+ size?: 'sm' | 'md' | 'lg';
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ size: "sm" | "md" | "lg";
7
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,15 @@
1
+ type __VLS_Props = {
2
+ /** 提示文字 */
3
+ text?: string;
4
+ /** 遮罩背景色 */
5
+ background?: string;
6
+ /** 动画尺寸 */
7
+ size?: 'sm' | 'md' | 'lg';
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ background: string;
11
+ text: string;
12
+ size: "sm" | "md" | "lg";
13
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import Loading from './Loading.vue';
2
+ import { LoadingService } from './service';
3
+ export { Loading };
4
+ export { LoadingService };
5
+ export type { LoadingOptions, LoadingInstance } from './service';
6
+ /** 全局类型声明:模板全局组件 <Loading /> 与全局属性 $loading */
7
+ declare module 'vue' {
8
+ interface GlobalComponents {
9
+ Loading: typeof Loading;
10
+ }
11
+ interface ComponentCustomProperties {
12
+ $loading: typeof LoadingService;
13
+ }
14
+ }
@@ -0,0 +1,20 @@
1
+ export interface LoadingOptions {
2
+ /** 提示文字(可选) */
3
+ text?: string;
4
+ /** 遮罩背景色,默认 rgba(255, 255, 255, 0.6) */
5
+ background?: string;
6
+ /** 动画尺寸:sm / md / lg,默认 md */
7
+ size?: 'sm' | 'md' | 'lg';
8
+ }
9
+ export interface LoadingInstance {
10
+ /** 关闭 loading */
11
+ close: () => void;
12
+ }
13
+ export declare const LoadingService: {
14
+ /**
15
+ * 打开全屏 loading
16
+ * @param options 配置项
17
+ * @returns loading 实例(调用 close() 关闭)
18
+ */
19
+ service(options?: LoadingOptions): LoadingInstance;
20
+ };
@@ -0,0 +1,26 @@
1
+ type __VLS_Props = {
2
+ modelValue: string | number | null;
3
+ value: string | number;
4
+ disabled?: boolean;
5
+ };
6
+ declare var __VLS_1: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_1) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ change: (value: string | number) => any;
12
+ "update:modelValue": (value: string | number) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ onChange?: ((value: string | number) => any) | undefined;
15
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
16
+ }>, {
17
+ disabled: boolean;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1 @@
1
+ export { default as Radio } from './Radio.vue';
@@ -0,0 +1,24 @@
1
+ type __VLS_Props = {
2
+ targetEl?: HTMLElement | null;
3
+ thumbWidth?: number;
4
+ thumbMinHeight?: number;
5
+ railInsetRight?: number;
6
+ };
7
+ declare var __VLS_1: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_1) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
+ targetEl: HTMLElement | null;
13
+ thumbWidth: number;
14
+ thumbMinHeight: number;
15
+ railInsetRight: number;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1 @@
1
+ export { default as Scrollbar } from './Scrollbar.vue';
@@ -0,0 +1,20 @@
1
+ import type { SegmentedOption } from './types';
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
4
+ declare const __VLS_export: import("vue").DefineComponent<{
5
+ modelValue: string | number | null;
6
+ options: SegmentedOption[];
7
+ disabled?: boolean;
8
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ change: (value: string | number) => any;
10
+ "update:modelValue": (value: string | number) => any;
11
+ }, string, import("vue").PublicProps, Readonly<{
12
+ modelValue: string | number | null;
13
+ options: SegmentedOption[];
14
+ disabled?: boolean;
15
+ }> & Readonly<{
16
+ onChange?: ((value: string | number) => any) | undefined;
17
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
18
+ }>, {
19
+ disabled: boolean;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,2 @@
1
+ export { default as Segmented } from './Segmented.vue';
2
+ export type { SegmentedOption } from './types';
@@ -0,0 +1,12 @@
1
+ import type { Component } from 'vue';
2
+ /**
3
+ * Segmented 选项
4
+ * - string / number 简写:label 和 value 相同
5
+ * - 对象:支持图标、禁用等扩展
6
+ */
7
+ export type SegmentedOption = string | number | {
8
+ label: string;
9
+ value: string | number;
10
+ icon?: Component;
11
+ disabled?: boolean;
12
+ };
@@ -0,0 +1,34 @@
1
+ export interface SelectOption {
2
+ value: string | number;
3
+ label: string;
4
+ description?: string;
5
+ }
6
+ /** 选中值:单选为单个值,多选(multiple)为值数组 */
7
+ export type SelectValue = string | number | (string | number)[];
8
+ type __VLS_Props = {
9
+ options: SelectOption[];
10
+ placeholder?: string;
11
+ disabled?: boolean;
12
+ /** 多选模式:选中值数组、选项可勾选、选中项以标签展示 */
13
+ multiple?: boolean;
14
+ /** 校验失败态:true 时 trigger 显示红色边框 */
15
+ invalid?: boolean;
16
+ };
17
+ type __VLS_ModelProps = {
18
+ modelValue?: SelectValue;
19
+ };
20
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
21
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ change: (value: SelectValue) => any;
23
+ "update:modelValue": (value: SelectValue) => any;
24
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
25
+ onChange?: ((value: SelectValue) => any) | undefined;
26
+ "onUpdate:modelValue"?: ((value: SelectValue) => any) | undefined;
27
+ }>, {
28
+ invalid: boolean;
29
+ disabled: boolean;
30
+ placeholder: string;
31
+ multiple: boolean;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as Select } from './Select.vue';
2
+ export type { SelectOption, SelectValue } from './Select.vue';
@@ -0,0 +1,33 @@
1
+ import type { SelectOption } from '../select';
2
+ type __VLS_Props = {
3
+ options?: SelectOption[];
4
+ placeholder?: string;
5
+ disabled?: boolean;
6
+ };
7
+ type __VLS_ModelProps = {
8
+ modelValue?: string | number;
9
+ };
10
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
11
+ declare var __VLS_1: {};
12
+ type __VLS_Slots = {} & {
13
+ 'suffix-icon'?: (props: typeof __VLS_1) => any;
14
+ };
15
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ change: (value: string | number) => any;
17
+ "update:modelValue": (value: string | number) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
+ onChange?: ((value: string | number) => any) | undefined;
20
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
21
+ }>, {
22
+ options: SelectOption[];
23
+ disabled: boolean;
24
+ placeholder: string;
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
29
+ type __VLS_WithSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,3 @@
1
+ import SelectField from './SelectField.vue';
2
+ export { SelectField };
3
+ export type { SelectOption } from '../select/Select.vue';
@@ -0,0 +1,15 @@
1
+ type __VLS_Props = {
2
+ modelValue: boolean;
3
+ disabled?: boolean;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ change: (value: boolean) => any;
7
+ "update:modelValue": (value: boolean) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onChange?: ((value: boolean) => any) | undefined;
10
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
11
+ }>, {
12
+ disabled: boolean;
13
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Switch } from './Switch.vue';
@@ -0,0 +1,55 @@
1
+ import type { TreeNodeData } from './types';
2
+ type __VLS_Props = {
3
+ /** 树数据 */
4
+ data: TreeNodeData[];
5
+ /** 勾选模式(带 checkbox,级联全选/半选);默认导航模式 */
6
+ checkable?: boolean;
7
+ /** 勾选的节点 keys(最小化集合,v-model:checked-keys) */
8
+ checkedKeys?: string[];
9
+ /** 导航模式高亮节点 key(v-model:active-id) */
10
+ activeId?: string | null;
11
+ /** 受控展开 keys(v-model:expanded-keys);不传则内部管理 */
12
+ expandedKeys?: string[];
13
+ /** 非受控模式下是否默认全部展开,默认 true */
14
+ defaultExpandAll?: boolean;
15
+ nodeKey?: string;
16
+ labelKey?: string;
17
+ childrenKey?: string;
18
+ /** 是否展示节点类型图标 */
19
+ showIcon?: boolean;
20
+ };
21
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ "update:checkedKeys": (keys: string[]) => any;
23
+ "update:activeId": (id: string | null) => any;
24
+ "update:expandedKeys": (keys: string[]) => any;
25
+ "node-click": (node: TreeNodeData) => any;
26
+ check: (payload: {
27
+ node: TreeNodeData;
28
+ checked: boolean;
29
+ checkedKeys: string[];
30
+ checkedNodes: TreeNodeData[];
31
+ }) => any;
32
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
33
+ "onUpdate:checkedKeys"?: ((keys: string[]) => any) | undefined;
34
+ "onUpdate:activeId"?: ((id: string | null) => any) | undefined;
35
+ "onUpdate:expandedKeys"?: ((keys: string[]) => any) | undefined;
36
+ "onNode-click"?: ((node: TreeNodeData) => any) | undefined;
37
+ onCheck?: ((payload: {
38
+ node: TreeNodeData;
39
+ checked: boolean;
40
+ checkedKeys: string[];
41
+ checkedNodes: TreeNodeData[];
42
+ }) => any) | undefined;
43
+ }>, {
44
+ nodeKey: string;
45
+ checkable: boolean;
46
+ checkedKeys: string[];
47
+ activeId: string | null;
48
+ expandedKeys: string[];
49
+ defaultExpandAll: boolean;
50
+ labelKey: string;
51
+ childrenKey: string;
52
+ showIcon: boolean;
53
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
54
+ declare const _default: typeof __VLS_export;
55
+ export default _default;