@gyyxds/zy-ui 0.0.4 → 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.
@@ -1,7 +1,11 @@
1
1
  type __VLS_Props = {
2
- /** 选中态的轨道文案 */
2
+ /** default 常用基础款 / holographic 全息变体 */
3
+ variant?: 'default' | 'holographic';
4
+ /** 基础款等比尺寸:small 48×20 / default 72×30 / large 为参考原稿 120×50 */
5
+ size?: 'small' | 'default' | 'large';
6
+ /** 选中态文案:全息变体显示在轨道内;基础款不显示文案 */
3
7
  activeText?: string;
4
- /** 未选态的轨道文案 */
8
+ /** 未选态文案:基础款显示在轨道右侧,全息变体显示在轨道内 */
5
9
  inactiveText?: string;
6
10
  disabled?: boolean;
7
11
  /** 无障碍名称:不传则读屏只说「开关」,不带名字 */
@@ -16,8 +20,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
16
20
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
21
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
18
22
  }>, {
23
+ size: "small" | "default" | "large";
19
24
  label: string;
20
25
  disabled: boolean;
26
+ variant: "default" | "holographic";
21
27
  activeText: string;
22
28
  inactiveText: string;
23
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,4 +1,6 @@
1
1
  export declare const ZySwitch: import("../utils/withInstall").SFCWithInstall<import("vue").DefineComponent<{
2
+ variant?: "default" | "holographic";
3
+ size?: "small" | "default" | "large";
2
4
  activeText?: string;
3
5
  inactiveText?: string;
4
6
  disabled?: boolean;
@@ -8,6 +10,8 @@ export declare const ZySwitch: import("../utils/withInstall").SFCWithInstall<imp
8
10
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
11
  "update:modelValue": (value: boolean) => any;
10
12
  }, string, import("vue").PublicProps, Readonly<{
13
+ variant?: "default" | "holographic";
14
+ size?: "small" | "default" | "large";
11
15
  activeText?: string;
12
16
  inactiveText?: string;
13
17
  disabled?: boolean;
@@ -17,8 +21,10 @@ export declare const ZySwitch: import("../utils/withInstall").SFCWithInstall<imp
17
21
  }> & Readonly<{
18
22
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
19
23
  }>, {
24
+ size: "small" | "default" | "large";
20
25
  label: string;
21
26
  disabled: boolean;
27
+ variant: "default" | "holographic";
22
28
  activeText: string;
23
29
  inactiveText: string;
24
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>>;
@@ -0,0 +1,49 @@
1
+ import type { ZyTabItem } from './types';
2
+ type __VLS_Props = {
3
+ /** 标签数据 */
4
+ items: ZyTabItem[];
5
+ /** 无障碍名称 */
6
+ ariaLabel?: string;
7
+ /** 是否渲染下方内容面板 */
8
+ panels?: boolean;
9
+ /** 标签等分铺满 */
10
+ stretch?: boolean;
11
+ };
12
+ type __VLS_ModelProps = {
13
+ modelValue?: string | number;
14
+ };
15
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
16
+ declare var __VLS_1: {
17
+ item: ZyTabItem;
18
+ active: boolean;
19
+ }, __VLS_10: `panel-${string}` | `panel-${number}`, __VLS_11: {
20
+ item: ZyTabItem | undefined;
21
+ }, __VLS_13: {
22
+ item: ZyTabItem | undefined;
23
+ };
24
+ type __VLS_Slots = {} & {
25
+ [K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
26
+ } & {
27
+ tab?: (props: typeof __VLS_1) => any;
28
+ } & {
29
+ panel?: (props: typeof __VLS_13) => any;
30
+ };
31
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
+ change: (key: string | number) => any;
33
+ "update:modelValue": (value: string | number) => any;
34
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
35
+ onChange?: ((key: string | number) => any) | undefined;
36
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
37
+ }>, {
38
+ ariaLabel: string;
39
+ stretch: boolean;
40
+ panels: boolean;
41
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
42
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
43
+ declare const _default: typeof __VLS_export;
44
+ export default _default;
45
+ type __VLS_WithSlots<T, S> = T & {
46
+ new (): {
47
+ $slots: S;
48
+ };
49
+ };
@@ -0,0 +1,81 @@
1
+ export declare const ZyTabs: import("../utils/withInstall").SFCWithInstall<{
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
3
+ items: import("./types").ZyTabItem[];
4
+ ariaLabel?: string;
5
+ panels?: boolean;
6
+ stretch?: boolean;
7
+ } & {
8
+ modelValue?: string | number;
9
+ }> & Readonly<{
10
+ onChange?: ((key: string | number) => any) | undefined;
11
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
12
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ change: (key: string | number) => any;
14
+ "update:modelValue": (value: string | number) => any;
15
+ }, import("vue").PublicProps, {
16
+ ariaLabel: string;
17
+ stretch: boolean;
18
+ panels: boolean;
19
+ }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
20
+ P: {};
21
+ B: {};
22
+ D: {};
23
+ C: {};
24
+ M: {};
25
+ Defaults: {};
26
+ }, Readonly<{
27
+ items: import("./types").ZyTabItem[];
28
+ ariaLabel?: string;
29
+ panels?: boolean;
30
+ stretch?: boolean;
31
+ } & {
32
+ modelValue?: string | number;
33
+ }> & Readonly<{
34
+ onChange?: ((key: string | number) => any) | undefined;
35
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
36
+ }>, {}, {}, {}, {}, {
37
+ ariaLabel: string;
38
+ stretch: boolean;
39
+ panels: boolean;
40
+ }>;
41
+ __isFragment?: never;
42
+ __isTeleport?: never;
43
+ __isSuspense?: never;
44
+ } & import("vue").ComponentOptionsBase<Readonly<{
45
+ items: import("./types").ZyTabItem[];
46
+ ariaLabel?: string;
47
+ panels?: boolean;
48
+ stretch?: boolean;
49
+ } & {
50
+ modelValue?: string | number;
51
+ }> & Readonly<{
52
+ onChange?: ((key: string | number) => any) | undefined;
53
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
54
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
55
+ change: (key: string | number) => any;
56
+ "update:modelValue": (value: string | number) => any;
57
+ }, string, {
58
+ ariaLabel: string;
59
+ stretch: boolean;
60
+ panels: boolean;
61
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
62
+ $slots: {
63
+ [x: `panel-${string}`]: ((props: {
64
+ item: import("./types").ZyTabItem | undefined;
65
+ }) => any) | undefined;
66
+ [x: `panel-${number}`]: ((props: {
67
+ item: import("./types").ZyTabItem | undefined;
68
+ }) => any) | undefined;
69
+ } & {
70
+ tab?: (props: {
71
+ item: import("./types").ZyTabItem;
72
+ active: boolean;
73
+ }) => any;
74
+ } & {
75
+ panel?: (props: {
76
+ item: import("./types").ZyTabItem | undefined;
77
+ }) => any;
78
+ };
79
+ })>;
80
+ export type { ZyTabItem } from './types';
81
+ export default ZyTabs;
@@ -0,0 +1,10 @@
1
+ export interface ZyTabItem {
2
+ /** 唯一键,v-model 绑定这个值 */
3
+ key: string | number;
4
+ /** 标签文字 */
5
+ label: string;
6
+ /** 标签右侧的计数 / 状态 */
7
+ badge?: string | number;
8
+ /** 禁用后不参与点击与键盘切换 */
9
+ disabled?: boolean;
10
+ }
@@ -78,6 +78,67 @@ html[data-zy-theme='basic'] .zy-pagination .el-pagination__jump {
78
78
  color: var(--zy-muted);
79
79
  }
80
80
 
81
+ /* 每页条数:与选择器同一条纸片控件 */
82
+ html[data-zy-theme='basic'] .zy-pagination .el-pagination__sizes .el-select__wrapper {
83
+ min-height: 28px;
84
+ height: 28px;
85
+ padding: 0 8px;
86
+ border: 1px solid var(--zy-hairline);
87
+ border-radius: var(--zy-radius-sm);
88
+ background-color: var(--zy-surface);
89
+ box-shadow: var(--zy-shadow-card);
90
+ font-family: var(--zy-font-sans);
91
+ transition:
92
+ border-color var(--zy-duration-press) var(--zy-ease-soft),
93
+ box-shadow var(--zy-duration-press) var(--zy-ease-soft);
94
+ }
95
+
96
+ html[data-zy-theme='basic'] .zy-pagination .el-pagination__sizes .el-select__wrapper:hover {
97
+ border-color: var(--zy-hairline-strong);
98
+ }
99
+
100
+ html[data-zy-theme='basic'] .zy-pagination .el-pagination__sizes .el-select__wrapper.is-focused,
101
+ html[data-zy-theme='basic'] .zy-pagination .el-pagination__sizes .el-select__wrapper:focus-within {
102
+ border-color: var(--zy-brand);
103
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--zy-brand) 14%, transparent);
104
+ }
105
+
106
+ html[data-zy-theme='basic'] .zy-pagination .el-pagination__sizes .el-select__selected-item,
107
+ html[data-zy-theme='basic'] .zy-pagination .el-pagination__sizes .el-select__placeholder {
108
+ color: var(--zy-ink);
109
+ font-size: 12px;
110
+ }
111
+
112
+ html[data-zy-theme='basic'] .zy-pagination .el-pagination__sizes .el-select__caret {
113
+ color: var(--zy-muted);
114
+ }
115
+
116
+ html[data-zy-theme='basic'] .zy-pagination-popper {
117
+ border: 1px solid var(--zy-hairline) !important;
118
+ border-radius: var(--zy-radius) !important;
119
+ background: var(--zy-surface);
120
+ box-shadow: var(--zy-shadow-card) !important;
121
+ }
122
+
123
+ html[data-zy-theme='basic'] .zy-pagination-popper .el-select-dropdown__item {
124
+ min-height: 28px;
125
+ height: 28px;
126
+ line-height: 28px;
127
+ border-radius: var(--zy-radius-sm);
128
+ color: var(--zy-ink);
129
+ font-family: var(--zy-font-sans);
130
+ font-size: 12px;
131
+ }
132
+
133
+ html[data-zy-theme='basic'] .zy-pagination-popper .el-select-dropdown__item.is-hovering {
134
+ background: var(--zy-brand-soft);
135
+ }
136
+
137
+ html[data-zy-theme='basic'] .zy-pagination-popper .el-select-dropdown__item.is-selected {
138
+ color: var(--zy-brand);
139
+ font-weight: 600;
140
+ }
141
+
81
142
  /* 卡 = 白纸片(发丝边 + 极轻双层影),键帽只留给键帽主题 */
82
143
  html[data-zy-theme='basic'] .zy-card {
83
144
  --zy-card-fill-clr: var(--zy-surface);
@@ -835,3 +896,66 @@ html.dark[data-zy-theme='basic'] .zy-tag.is-fill.el-tag--danger {
835
896
  html.dark[data-zy-theme='basic'] .zy-tag.is-fill.el-tag--info {
836
897
  --zy-tag-fill-clr: var(--zy-info-key);
837
898
  }
899
+
900
+ /* ---------- 级联选择器:el-cascader 的主题化类 .zy-cascader / .zy-cascader-popper ---------- */
901
+ html[data-zy-theme='basic'] .zy-cascader .el-input__wrapper {
902
+ border: 1px solid var(--zy-hairline);
903
+ border-radius: var(--zy-radius);
904
+ background-color: var(--zy-surface);
905
+ box-shadow: none;
906
+ transition:
907
+ border-color var(--zy-duration-press) var(--zy-ease-soft),
908
+ box-shadow var(--zy-duration-fast) var(--zy-ease-soft);
909
+ }
910
+
911
+ html[data-zy-theme='basic'] .zy-cascader .el-input__wrapper:hover {
912
+ border-color: var(--zy-hairline-strong);
913
+ }
914
+
915
+ html[data-zy-theme='basic'] .zy-cascader .el-input__wrapper.is-focus {
916
+ border-color: var(--zy-brand);
917
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--zy-brand) 14%, transparent);
918
+ }
919
+
920
+ html[data-zy-theme='basic'] .zy-cascader .el-input__inner {
921
+ color: var(--zy-ink);
922
+ font-family: var(--zy-font-sans);
923
+ }
924
+
925
+ html[data-zy-theme='basic'] .zy-cascader-popper {
926
+ border: 1px solid var(--zy-hairline);
927
+ border-radius: var(--zy-radius);
928
+ background: var(--zy-surface);
929
+ box-shadow: var(--zy-shadow-card);
930
+ }
931
+
932
+ html[data-zy-theme='basic'] .zy-cascader-popper .el-cascader-menu {
933
+ border-right-color: var(--zy-hairline);
934
+ }
935
+
936
+ html[data-zy-theme='basic'] .zy-cascader-popper .el-cascader-node {
937
+ color: var(--zy-ink);
938
+ }
939
+
940
+ html[data-zy-theme='basic'] .zy-cascader-popper .el-cascader-node.in-active-path,
941
+ html[data-zy-theme='basic'] .zy-cascader-popper .el-cascader-node.is-active {
942
+ background: var(--zy-brand-soft);
943
+ color: var(--zy-brand);
944
+ font-weight: 600;
945
+ }
946
+
947
+ html[data-zy-theme='basic'] .zy-cascader-popper .el-cascader-node.is-disabled {
948
+ opacity: 0.45;
949
+ }
950
+
951
+ html[data-zy-theme='basic'] .zy-cascader-popper .el-cascader-node__prefix {
952
+ color: var(--zy-muted);
953
+ }
954
+
955
+ /* ---------- 侧边菜单:显式品牌面比白纸多一层品牌薄雾 ---------- */
956
+ html[data-zy-theme='basic'] .zy-side-menu[data-surface='brand'] {
957
+ --zy-side-menu-bg: color-mix(in srgb, var(--zy-brand) 7%, var(--zy-surface));
958
+ --zy-side-menu-bg-image: none;
959
+
960
+ border-color: color-mix(in srgb, var(--zy-brand) 22%, var(--zy-hairline));
961
+ }
@@ -22,7 +22,8 @@ html[data-zy-theme='solid']
22
22
  .zy-mega-menu__plain.is-current,
23
23
  .zy-mega-menu__trigger.is-open,
24
24
  .zy-verify__piece,
25
- .zy-verify__handle
25
+ .zy-verify__handle,
26
+ .zy-switch--default .zy-switch-default-track
26
27
  ) {
27
28
  --zy-key-gloss: linear-gradient(
28
29
  to bottom,