zartui 3.1.7 → 3.1.8

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 (220) hide show
  1. package/README.md +25 -0
  2. package/es/action-sheet/ActionSheet.d.ts +2 -2
  3. package/es/action-sheet/index.d.ts +2 -2
  4. package/es/button/Button.d.ts +3 -3
  5. package/es/button/index.d.ts +3 -3
  6. package/es/calendar/Calendar.d.ts +2 -2
  7. package/es/calendar/index.d.ts +2 -2
  8. package/es/cascader/Cascader.d.ts +1 -1
  9. package/es/cascader/index.d.ts +1 -1
  10. package/es/cell/Cell.d.ts +2 -2
  11. package/es/cell/index.d.ts +2 -2
  12. package/es/cell-group/CellGroup.d.ts +1 -1
  13. package/es/cell-group/CellGroup.mjs +2 -1
  14. package/es/cell-group/index.d.ts +1 -1
  15. package/es/checkbox/Checkbox.d.ts +26 -12
  16. package/es/checkbox/Checkbox.mjs +13 -2
  17. package/es/checkbox/Checker.d.ts +9 -0
  18. package/es/checkbox/Checker.mjs +10 -10
  19. package/es/checkbox/index.css +1 -1
  20. package/es/checkbox/index.d.ts +9 -0
  21. package/es/composables/use-global-z-index.d.ts +4 -0
  22. package/es/composables/use-global-z-index.mjs +9 -0
  23. package/es/composables/use-scope-id.d.ts +3 -0
  24. package/es/composables/use-scope-id.mjs +9 -0
  25. package/es/composables/use-sync-prop-ref.d.ts +2 -0
  26. package/es/composables/use-sync-prop-ref.mjs +18 -0
  27. package/es/config-provider/ConfigProvider.d.ts +30 -6
  28. package/es/config-provider/ConfigProvider.mjs +48 -9
  29. package/es/config-provider/index.d.ts +17 -2
  30. package/es/date-time-picker/DateTimePicker.d.ts +2 -2
  31. package/es/date-time-picker/DateTimePickerWrapper.d.ts +2 -2
  32. package/es/date-time-picker/index.d.ts +2 -2
  33. package/es/dialog/Dialog.d.ts +1 -1
  34. package/es/dialog/function-call.d.ts +3 -3
  35. package/es/dialog/function-call.mjs +1 -1
  36. package/es/dialog/index.d.ts +1 -1
  37. package/es/divider/Divider.d.ts +1 -1
  38. package/es/divider/index.d.ts +1 -1
  39. package/es/dropdown-item/DropdownItem.mjs +2 -2
  40. package/es/dropdown-item/types.d.ts +2 -1
  41. package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
  42. package/es/dropdown-menu/index.d.ts +1 -1
  43. package/es/field/Field.d.ts +3 -3
  44. package/es/field/index.d.ts +3 -3
  45. package/es/grid/Grid.d.ts +1 -1
  46. package/es/grid/index.d.ts +1 -1
  47. package/es/icon/config.mjs +34 -11
  48. package/es/icon/index.css +1 -1
  49. package/es/image/Image.d.ts +1 -1
  50. package/es/image/index.d.ts +1 -1
  51. package/es/image-preview/ImagePreview.d.ts +17 -1
  52. package/es/image-preview/ImagePreview.mjs +17 -4
  53. package/es/image-preview/ImagePreviewItem.d.ts +6 -0
  54. package/es/image-preview/ImagePreviewItem.mjs +9 -3
  55. package/es/image-preview/function-call.mjs +1 -0
  56. package/es/image-preview/index.d.ts +12 -1
  57. package/es/image-preview/types.d.ts +1 -0
  58. package/es/index.d.ts +1 -1
  59. package/es/index.mjs +1 -1
  60. package/es/lazyload/vue-lazyload/index.d.ts +55 -55
  61. package/es/list/List.d.ts +7 -3
  62. package/es/list/List.mjs +5 -3
  63. package/es/list/index.d.ts +2 -0
  64. package/es/nav-bar/NavBar.d.ts +1 -1
  65. package/es/nav-bar/index.d.ts +1 -1
  66. package/es/notify/Notify.d.ts +1 -1
  67. package/es/notify/index.d.ts +1 -1
  68. package/es/number-keyboard/NumberKeyboard.d.ts +3 -3
  69. package/es/number-keyboard/NumberKeyboardKey.d.ts +1 -1
  70. package/es/number-keyboard/index.d.ts +3 -3
  71. package/es/popover/Popover.d.ts +1 -1
  72. package/es/popover/Popover.mjs +16 -12
  73. package/es/popover/index.d.ts +1 -1
  74. package/es/popup/Popup.d.ts +2 -2
  75. package/es/popup/Popup.mjs +9 -10
  76. package/es/popup/index.d.ts +2 -2
  77. package/es/search/Search.d.ts +1 -1
  78. package/es/search/index.d.ts +1 -1
  79. package/es/skeleton/Skeleton.d.ts +2 -2
  80. package/es/skeleton/index.d.ts +2 -2
  81. package/es/stepper/Stepper.d.ts +2 -2
  82. package/es/stepper/index.d.ts +2 -2
  83. package/es/steps/Steps.d.ts +1 -1
  84. package/es/steps/index.d.ts +1 -1
  85. package/es/sticky/Sticky.d.ts +1 -1
  86. package/es/sticky/index.d.ts +1 -1
  87. package/es/swipe/Swipe.mjs +1 -1
  88. package/es/swipe/index.css +1 -1
  89. package/es/swipe-cell/SwipeCell.mjs +10 -1
  90. package/es/tabs/Tabs.d.ts +4 -4
  91. package/es/tabs/index.d.ts +4 -4
  92. package/es/tag/Tag.d.ts +1 -1
  93. package/es/tag/index.d.ts +1 -1
  94. package/es/text-ellipsis/TextEllipsis.d.ts +17 -4
  95. package/es/text-ellipsis/TextEllipsis.mjs +52 -30
  96. package/es/text-ellipsis/index.d.ts +12 -3
  97. package/es/toast/Toast.d.ts +5 -2
  98. package/es/toast/Toast.mjs +2 -1
  99. package/es/toast/index.css +1 -1
  100. package/es/toast/index.d.ts +4 -2
  101. package/es/toast/types.d.ts +2 -0
  102. package/es/uploader/Uploader.d.ts +1 -1
  103. package/es/uploader/index.d.ts +1 -1
  104. package/es/utils/interceptor.d.ts +2 -1
  105. package/es/utils/interceptor.mjs +3 -2
  106. package/es/vue-sfc-shim.d.ts +6 -6
  107. package/es/vue-tsx-shim.d.ts +23 -23
  108. package/lib/action-sheet/ActionSheet.d.ts +2 -2
  109. package/lib/action-sheet/index.d.ts +2 -2
  110. package/lib/button/Button.d.ts +3 -3
  111. package/lib/button/index.d.ts +3 -3
  112. package/lib/calendar/Calendar.d.ts +2 -2
  113. package/lib/calendar/index.d.ts +2 -2
  114. package/lib/cascader/Cascader.d.ts +1 -1
  115. package/lib/cascader/index.d.ts +1 -1
  116. package/lib/cell/Cell.d.ts +2 -2
  117. package/lib/cell/index.d.ts +2 -2
  118. package/lib/cell-group/CellGroup.d.ts +1 -1
  119. package/lib/cell-group/CellGroup.js +2 -1
  120. package/lib/cell-group/index.d.ts +1 -1
  121. package/lib/checkbox/Checkbox.d.ts +26 -12
  122. package/lib/checkbox/Checkbox.js +13 -2
  123. package/lib/checkbox/Checker.d.ts +9 -0
  124. package/lib/checkbox/Checker.js +10 -10
  125. package/lib/checkbox/index.css +1 -1
  126. package/lib/checkbox/index.d.ts +9 -0
  127. package/lib/composables/use-global-z-index.d.ts +4 -0
  128. package/lib/composables/use-global-z-index.js +28 -0
  129. package/lib/composables/use-scope-id.d.ts +3 -0
  130. package/lib/composables/use-scope-id.js +28 -0
  131. package/lib/composables/use-sync-prop-ref.d.ts +2 -0
  132. package/lib/composables/use-sync-prop-ref.js +37 -0
  133. package/lib/config-provider/ConfigProvider.d.ts +30 -6
  134. package/lib/config-provider/ConfigProvider.js +46 -7
  135. package/lib/config-provider/index.d.ts +17 -2
  136. package/lib/date-time-picker/DateTimePicker.d.ts +2 -2
  137. package/lib/date-time-picker/DateTimePickerWrapper.d.ts +2 -2
  138. package/lib/date-time-picker/index.d.ts +2 -2
  139. package/lib/dialog/Dialog.d.ts +1 -1
  140. package/lib/dialog/function-call.d.ts +3 -3
  141. package/lib/dialog/function-call.js +1 -1
  142. package/lib/dialog/index.d.ts +1 -1
  143. package/lib/divider/Divider.d.ts +1 -1
  144. package/lib/divider/index.d.ts +1 -1
  145. package/lib/dropdown-item/DropdownItem.js +2 -2
  146. package/lib/dropdown-item/types.d.ts +2 -1
  147. package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
  148. package/lib/dropdown-menu/index.d.ts +1 -1
  149. package/lib/field/Field.d.ts +3 -3
  150. package/lib/field/index.d.ts +3 -3
  151. package/lib/grid/Grid.d.ts +1 -1
  152. package/lib/grid/index.d.ts +1 -1
  153. package/lib/icon/config.js +34 -11
  154. package/lib/icon/index.css +1 -1
  155. package/lib/image/Image.d.ts +1 -1
  156. package/lib/image/index.d.ts +1 -1
  157. package/lib/image-preview/ImagePreview.d.ts +17 -1
  158. package/lib/image-preview/ImagePreview.js +17 -4
  159. package/lib/image-preview/ImagePreviewItem.d.ts +6 -0
  160. package/lib/image-preview/ImagePreviewItem.js +9 -3
  161. package/lib/image-preview/function-call.js +1 -0
  162. package/lib/image-preview/index.d.ts +12 -1
  163. package/lib/image-preview/types.d.ts +1 -0
  164. package/lib/index.css +1 -1
  165. package/lib/index.d.ts +1 -1
  166. package/lib/index.js +1 -1
  167. package/lib/lazyload/vue-lazyload/index.d.ts +55 -55
  168. package/lib/list/List.d.ts +7 -3
  169. package/lib/list/List.js +4 -2
  170. package/lib/list/index.d.ts +2 -0
  171. package/lib/nav-bar/NavBar.d.ts +1 -1
  172. package/lib/nav-bar/index.d.ts +1 -1
  173. package/lib/notify/Notify.d.ts +1 -1
  174. package/lib/notify/index.d.ts +1 -1
  175. package/lib/number-keyboard/NumberKeyboard.d.ts +3 -3
  176. package/lib/number-keyboard/NumberKeyboardKey.d.ts +1 -1
  177. package/lib/number-keyboard/index.d.ts +3 -3
  178. package/lib/popover/Popover.d.ts +1 -1
  179. package/lib/popover/Popover.js +16 -12
  180. package/lib/popover/index.d.ts +1 -1
  181. package/lib/popup/Popup.d.ts +2 -2
  182. package/lib/popup/Popup.js +8 -9
  183. package/lib/popup/index.d.ts +2 -2
  184. package/lib/search/Search.d.ts +1 -1
  185. package/lib/search/index.d.ts +1 -1
  186. package/lib/skeleton/Skeleton.d.ts +2 -2
  187. package/lib/skeleton/index.d.ts +2 -2
  188. package/lib/stepper/Stepper.d.ts +2 -2
  189. package/lib/stepper/index.d.ts +2 -2
  190. package/lib/steps/Steps.d.ts +1 -1
  191. package/lib/steps/index.d.ts +1 -1
  192. package/lib/sticky/Sticky.d.ts +1 -1
  193. package/lib/sticky/index.d.ts +1 -1
  194. package/lib/swipe/Swipe.js +1 -1
  195. package/lib/swipe/index.css +1 -1
  196. package/lib/swipe-cell/SwipeCell.js +10 -1
  197. package/lib/tabs/Tabs.d.ts +4 -4
  198. package/lib/tabs/index.d.ts +4 -4
  199. package/lib/tag/Tag.d.ts +1 -1
  200. package/lib/tag/index.d.ts +1 -1
  201. package/lib/text-ellipsis/TextEllipsis.d.ts +17 -4
  202. package/lib/text-ellipsis/TextEllipsis.js +51 -29
  203. package/lib/text-ellipsis/index.d.ts +12 -3
  204. package/lib/toast/Toast.d.ts +5 -2
  205. package/lib/toast/Toast.js +2 -1
  206. package/lib/toast/index.css +1 -1
  207. package/lib/toast/index.d.ts +4 -2
  208. package/lib/toast/types.d.ts +2 -0
  209. package/lib/uploader/Uploader.d.ts +1 -1
  210. package/lib/uploader/index.d.ts +1 -1
  211. package/lib/utils/interceptor.d.ts +2 -1
  212. package/lib/utils/interceptor.js +3 -2
  213. package/lib/vue-sfc-shim.d.ts +6 -6
  214. package/lib/vue-tsx-shim.d.ts +23 -23
  215. package/lib/web-types.json +1 -1
  216. package/lib/zartui.cjs.js +214 -88
  217. package/lib/zartui.es.js +215 -89
  218. package/lib/zartui.js +214 -88
  219. package/lib/zartui.min.js +1 -1
  220. package/package.json +19 -9
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # ZartUI
2
+
3
+ [ZartUI](https://zartui.egova.com.cn) 是数字政通基于 Vue 研发的一款面向政务场景的移动端组件库。
4
+
5
+ Zart(读音 /zɑːt/)的命名,灵感源自数字政通秉承的理念:让城市治理变得更智慧。Zart = zt + smart, zt是政通的首字母缩写,smart代表公司理念中的“智慧”,将smart中间的“ar”字母包裹于zt之间,体现了ZartUI的核心目标:追求极致的用户体验,致力于做灵活智能的组件库。
6
+
7
+ ## 特性
8
+
9
+ 1)【组件重构】【组件审核】提供60多个高质量组件,覆盖移动端各类场景;
10
+
11
+ 2)【UI重构】基于全新的视觉规范;
12
+
13
+ 3)【在线网站】完善的文档、示例、演示效果;
14
+
15
+ 4)支持主题定制、按需引入;
16
+
17
+ 5)支持vue3.0、TypeScript;
18
+
19
+ 6)性能佳,组件平均体积小(min+gzip);
20
+
21
+ 7)单元测试覆盖率 90%+,提供稳定性保障。
22
+
23
+ ## 浏览器支持
24
+
25
+ ZartUI 3 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一致)。
@@ -177,13 +177,13 @@ declare const _default: import("vue").DefineComponent<{
177
177
  "onUpdate:show"?: ((...args: any[]) => any) | undefined;
178
178
  onCancel?: ((...args: any[]) => any) | undefined;
179
179
  }, {
180
- show: boolean;
181
180
  overlay: boolean;
181
+ round: boolean;
182
+ show: boolean;
182
183
  lockScroll: boolean;
183
184
  lazyRender: boolean;
184
185
  transitionAppear: boolean;
185
186
  closeOnClickOverlay: boolean;
186
- round: boolean;
187
187
  closeIcon: string;
188
188
  closeable: boolean;
189
189
  closeOnPopstate: boolean;
@@ -111,13 +111,13 @@ export declare const ActionSheet: import("../utils").WithInstall<import("vue").D
111
111
  "onUpdate:show"?: ((...args: any[]) => any) | undefined;
112
112
  onCancel?: ((...args: any[]) => any) | undefined;
113
113
  }, {
114
- show: boolean;
115
114
  overlay: boolean;
115
+ round: boolean;
116
+ show: boolean;
116
117
  lockScroll: boolean;
117
118
  lazyRender: boolean;
118
119
  transitionAppear: boolean;
119
120
  closeOnClickOverlay: boolean;
120
- round: boolean;
121
121
  closeIcon: string;
122
122
  closeable: boolean;
123
123
  closeOnPopstate: boolean;
@@ -142,11 +142,11 @@ declare const _default: import("vue").DefineComponent<{
142
142
  type: ButtonType;
143
143
  tag: keyof HTMLElementTagNameMap;
144
144
  disabled: boolean;
145
- size: ButtonSize;
146
145
  round: boolean;
147
- loading: boolean;
148
- square: boolean;
149
146
  block: boolean;
147
+ size: ButtonSize;
148
+ square: boolean;
149
+ loading: boolean;
150
150
  borderLess: boolean;
151
151
  blockInner: boolean;
152
152
  plain: boolean;
@@ -93,11 +93,11 @@ export declare const Button: import("../utils").WithInstall<import("vue").Define
93
93
  type: import("./types").ButtonType;
94
94
  tag: keyof HTMLElementTagNameMap;
95
95
  disabled: boolean;
96
- size: import("./types").ButtonSize;
97
96
  round: boolean;
98
- loading: boolean;
99
- square: boolean;
100
97
  block: boolean;
98
+ size: import("./types").ButtonSize;
99
+ square: boolean;
100
+ loading: boolean;
101
101
  borderLess: boolean;
102
102
  blockInner: boolean;
103
103
  plain: boolean;
@@ -282,11 +282,11 @@ declare const _default: import("vue").DefineComponent<{
282
282
  }, {
283
283
  type: CalendarType;
284
284
  position: PopupPosition;
285
- readonly: boolean;
285
+ round: boolean;
286
286
  show: boolean;
287
+ readonly: boolean;
287
288
  lazyRender: boolean;
288
289
  closeOnClickOverlay: boolean;
289
- round: boolean;
290
290
  closeOnPopstate: boolean;
291
291
  safeAreaInsetTop: boolean;
292
292
  safeAreaInsetBottom: boolean;
@@ -188,11 +188,11 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
188
188
  }, {
189
189
  type: import("./types").CalendarType;
190
190
  position: import("..").PopupPosition;
191
- readonly: boolean;
191
+ round: boolean;
192
192
  show: boolean;
193
+ readonly: boolean;
193
194
  lazyRender: boolean;
194
195
  closeOnClickOverlay: boolean;
195
- round: boolean;
196
196
  closeOnPopstate: boolean;
197
197
  safeAreaInsetTop: boolean;
198
198
  safeAreaInsetBottom: boolean;
@@ -156,10 +156,10 @@ declare const _default: import("vue").DefineComponent<{
156
156
  onFinish?: ((...args: any[]) => any) | undefined;
157
157
  }, {
158
158
  position: PopupPosition;
159
+ round: boolean;
159
160
  show: boolean;
160
161
  teleport: string;
161
162
  closeOnClickOverlay: boolean;
162
- round: boolean;
163
163
  closeable: boolean;
164
164
  closeOnPopstate: boolean;
165
165
  safeAreaInsetTop: boolean;
@@ -103,10 +103,10 @@ export declare const Cascader: import("../utils").WithInstall<import("vue").Defi
103
103
  onFinish?: ((...args: any[]) => any) | undefined;
104
104
  }, {
105
105
  position: import("..").PopupPosition;
106
+ round: boolean;
106
107
  show: boolean;
107
108
  teleport: string;
108
109
  closeOnClickOverlay: boolean;
109
- round: boolean;
110
110
  closeable: boolean;
111
111
  closeOnPopstate: boolean;
112
112
  safeAreaInsetTop: boolean;
package/es/cell/Cell.d.ts CHANGED
@@ -141,10 +141,10 @@ declare const _default: import("vue").DefineComponent<{
141
141
  }, {
142
142
  replace: boolean;
143
143
  value: string;
144
- direction: CellDirection;
145
144
  center: boolean;
146
- isLink: boolean;
147
145
  border: boolean;
146
+ direction: CellDirection;
147
+ isLink: boolean;
148
148
  required: boolean;
149
149
  clickable: boolean | null;
150
150
  }, {}>;
@@ -71,10 +71,10 @@ export declare const Cell: import("../utils").WithInstall<import("vue").DefineCo
71
71
  }, {
72
72
  replace: boolean;
73
73
  value: string;
74
- direction: import("./types").CellDirection;
75
74
  center: boolean;
76
- isLink: boolean;
77
75
  border: boolean;
76
+ direction: import("./types").CellDirection;
77
+ isLink: boolean;
78
78
  required: boolean;
79
79
  clickable: boolean | null;
80
80
  }, {}>>;
@@ -23,7 +23,7 @@ declare const _default: import("vue").DefineComponent<{
23
23
  default: true;
24
24
  };
25
25
  }>>, {
26
- border: boolean;
27
26
  inset: boolean;
27
+ border: boolean;
28
28
  }, {}>;
29
29
  export default _default;
@@ -1,6 +1,7 @@
1
1
  import { Fragment as _Fragment, createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
2
2
  import { defineComponent } from "vue";
3
3
  import { truthProp, createNamespace, BORDER_TOP_BOTTOM } from "../utils/index.mjs";
4
+ import { useScopeId } from "../composables/use-scope-id.mjs";
4
5
  const [name, bem] = createNamespace("cell-group");
5
6
  const cellGroupProps = {
6
7
  title: String,
@@ -23,7 +24,7 @@ var stdin_default = defineComponent({
23
24
  }), {
24
25
  [BORDER_TOP_BOTTOM]: props.border && !props.inset
25
26
  }]
26
- }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
27
+ }, attrs, useScopeId()), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
27
28
  };
28
29
  const renderTitle = () => _createVNode("div", {
29
30
  "class": bem("title", {
@@ -13,8 +13,8 @@ export declare const CellGroup: import("../utils").WithInstall<import("vue").Def
13
13
  default: true;
14
14
  };
15
15
  }>>, {
16
- border: boolean;
17
16
  inset: boolean;
17
+ border: boolean;
18
18
  }, {}>>;
19
19
  export default CellGroup;
20
20
  export type { CellGroupProps } from './CellGroup';
@@ -1,57 +1,70 @@
1
+ import { PropType } from 'vue';
1
2
  import type { ExtractPropTypes } from 'vue';
2
3
  declare const checkboxProps: {
3
- name: import("vue").PropType<unknown>;
4
+ name: PropType<unknown>;
4
5
  shape: {
5
- type: import("vue").PropType<import("./Checker").CheckerShape>;
6
+ type: PropType<import("./Checker").CheckerShape>;
6
7
  default: import("./Checker").CheckerShape;
7
8
  };
8
9
  disabled: BooleanConstructor;
9
10
  iconSize: (NumberConstructor | StringConstructor)[];
10
- modelValue: import("vue").PropType<unknown>;
11
+ modelValue: PropType<unknown>;
11
12
  checkedColor: StringConstructor;
12
- labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
13
+ labelPosition: PropType<import("./Checker").CheckerLabelPosition>;
13
14
  labelDisabled: BooleanConstructor;
14
15
  } & {
15
16
  bindGroup: {
16
17
  type: BooleanConstructor;
17
18
  default: true;
18
19
  };
20
+ indeterminate: {
21
+ type: PropType<boolean | null>;
22
+ default: null;
23
+ };
19
24
  };
20
25
  export type CheckboxProps = ExtractPropTypes<typeof checkboxProps>;
21
26
  declare const _default: import("vue").DefineComponent<{
22
- name: import("vue").PropType<unknown>;
27
+ name: PropType<unknown>;
23
28
  shape: {
24
- type: import("vue").PropType<import("./Checker").CheckerShape>;
29
+ type: PropType<import("./Checker").CheckerShape>;
25
30
  default: import("./Checker").CheckerShape;
26
31
  };
27
32
  disabled: BooleanConstructor;
28
33
  iconSize: (NumberConstructor | StringConstructor)[];
29
- modelValue: import("vue").PropType<unknown>;
34
+ modelValue: PropType<unknown>;
30
35
  checkedColor: StringConstructor;
31
- labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
36
+ labelPosition: PropType<import("./Checker").CheckerLabelPosition>;
32
37
  labelDisabled: BooleanConstructor;
33
38
  } & {
34
39
  bindGroup: {
35
40
  type: BooleanConstructor;
36
41
  default: true;
37
42
  };
43
+ indeterminate: {
44
+ type: PropType<boolean | null>;
45
+ default: null;
46
+ };
38
47
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
39
- name: import("vue").PropType<unknown>;
48
+ name: PropType<unknown>;
40
49
  shape: {
41
- type: import("vue").PropType<import("./Checker").CheckerShape>;
50
+ type: PropType<import("./Checker").CheckerShape>;
42
51
  default: import("./Checker").CheckerShape;
43
52
  };
44
53
  disabled: BooleanConstructor;
45
54
  iconSize: (NumberConstructor | StringConstructor)[];
46
- modelValue: import("vue").PropType<unknown>;
55
+ modelValue: PropType<unknown>;
47
56
  checkedColor: StringConstructor;
48
- labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
57
+ labelPosition: PropType<import("./Checker").CheckerLabelPosition>;
49
58
  labelDisabled: BooleanConstructor;
50
59
  } & {
51
60
  bindGroup: {
52
61
  type: BooleanConstructor;
53
62
  default: true;
54
63
  };
64
+ indeterminate: {
65
+ type: PropType<boolean | null>;
66
+ default: null;
67
+ };
55
68
  }>> & {
56
69
  onChange?: ((...args: any[]) => any) | undefined;
57
70
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -60,5 +73,6 @@ declare const _default: import("vue").DefineComponent<{
60
73
  disabled: boolean;
61
74
  labelDisabled: boolean;
62
75
  bindGroup: boolean;
76
+ indeterminate: boolean | null;
63
77
  }, {}>;
64
78
  export default _default;
@@ -7,7 +7,11 @@ import { useExpose } from "../composables/use-expose.mjs";
7
7
  import Checker, { checkerProps } from "./Checker.mjs";
8
8
  const [name, bem] = createNamespace("checkbox");
9
9
  const checkboxProps = extend({}, checkerProps, {
10
- bindGroup: truthProp
10
+ bindGroup: truthProp,
11
+ indeterminate: {
12
+ type: Boolean,
13
+ default: null
14
+ }
11
15
  });
12
16
  var stdin_default = defineComponent({
13
17
  name,
@@ -58,9 +62,16 @@ var stdin_default = defineComponent({
58
62
  setParentValue(newValue);
59
63
  } else {
60
64
  emit("update:modelValue", newValue);
65
+ if (props.indeterminate !== null) {
66
+ emit("change", newValue);
67
+ }
61
68
  }
62
69
  };
63
- watch(() => props.modelValue, (value) => emit("change", value));
70
+ watch(() => props.modelValue, (value) => {
71
+ if (props.indeterminate === null) {
72
+ emit("change", value);
73
+ }
74
+ });
64
75
  useExpose({
65
76
  toggle,
66
77
  props,
@@ -48,6 +48,10 @@ declare const _default: import("vue").DefineComponent<{
48
48
  type: BooleanConstructor;
49
49
  default: true;
50
50
  };
51
+ indeterminate: {
52
+ type: PropType<boolean | null>;
53
+ default: null;
54
+ };
51
55
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "toggle")[], "click" | "toggle", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
52
56
  name: PropType<unknown>;
53
57
  shape: {
@@ -72,6 +76,10 @@ declare const _default: import("vue").DefineComponent<{
72
76
  type: BooleanConstructor;
73
77
  default: true;
74
78
  };
79
+ indeterminate: {
80
+ type: PropType<boolean | null>;
81
+ default: null;
82
+ };
75
83
  }>> & {
76
84
  onClick?: ((...args: any[]) => any) | undefined;
77
85
  onToggle?: ((...args: any[]) => any) | undefined;
@@ -81,5 +89,6 @@ declare const _default: import("vue").DefineComponent<{
81
89
  checked: boolean;
82
90
  labelDisabled: boolean;
83
91
  bindGroup: boolean;
92
+ indeterminate: boolean | null;
84
93
  }, {}>;
85
94
  export default _default;
@@ -18,7 +18,11 @@ var stdin_default = defineComponent({
18
18
  role: String,
19
19
  parent: Object,
20
20
  checked: Boolean,
21
- bindGroup: truthProp
21
+ bindGroup: truthProp,
22
+ indeterminate: {
23
+ type: Boolean,
24
+ default: null
25
+ }
22
26
  }),
23
27
  emits: ["click", "toggle"],
24
28
  setup(props, {
@@ -57,14 +61,16 @@ var stdin_default = defineComponent({
57
61
  const {
58
62
  bem,
59
63
  shape,
60
- checked
64
+ checked,
65
+ indeterminate
61
66
  } = props;
62
67
  const iconSize = props.iconSize || getParentProp("iconSize");
63
68
  return _createVNode("div", {
64
69
  "ref": iconRef,
65
70
  "class": bem("icon", [shape, {
66
71
  disabled: disabled.value,
67
- checked
72
+ checked,
73
+ indeterminate
68
74
  }]),
69
75
  "style": {
70
76
  fontSize: addUnit(iconSize)
@@ -72,14 +78,8 @@ var stdin_default = defineComponent({
72
78
  }, [slots.icon ? slots.icon({
73
79
  checked,
74
80
  disabled: disabled.value
75
- }) : props.role === "radio" ? _createVNode(Icon, {
76
- "style": iconStyle.value
77
- }, {
78
- default: () => [checked ? _createVNode("div", {
79
- "class": bem("dot")
80
- }, null) : ""]
81
81
  }) : _createVNode(Icon, {
82
- "name": "checkbox-select",
82
+ "name": indeterminate ? "minus" : "checkbox-select",
83
83
  "style": iconStyle.value
84
84
  }, null)]);
85
85
  };
@@ -1 +1 @@
1
- :root{--zt-checkbox-size: 16px;--zt-checkbox-padding: 12px 0;--zt-checkbox-border-color: var(--zt-gray-5);--zt-checkbox-duration: var(--zt-duration-fast);--zt-checkbox-round-icon-border: 1px solid rgba(45, 75, 115, .13);--zt-checkbox-round-icon-box-shadow: -1px -1px 2px 0 #ffffff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-checkbox-round-icon-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%);--zt-checkbox-label-margin: var(--zt-padding-xs);--zt-checkbox-label-color: var(--zt-text-color);--zt-checkbox-label-font-size: var(--zt-font-size-md);--zt-checkbox-checked-icon-color: var(--zt-primary-color);--zt-checkbox-checked-icon-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, .2);--zt-checkbox-checked-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-checkbox-disabled-icon-color: var(--zt-gray-5);--zt-checkbox-disabled-icon-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-checkbox-disabled-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-checkbox-disabled-label-color: var(--zt-text-color-3);--zt-checkbox-disabled-background: var(--zt-border-color);--zt-checkbox-disabled-checked-icon-opacity: .4;--zt-checkbox-disabled-icon-background: linear-gradient(134deg, #e1e6eb 0%, #e5edf5 100%)}.zt-checkbox{position:relative;display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;padding:var(--zt-checkbox-padding)}.zt-checkbox--disabled{cursor:not-allowed}.zt-checkbox--label-disabled{cursor:default}.zt-checkbox--horizontal{margin-right:var(--zt-padding-sm)}.zt-checkbox__icon{font-size:var(--zt-checkbox-size);cursor:pointer;box-sizing:border-box}.zt-checkbox__icon .zt-icon{display:flex;justify-content:center;align-items:center;width:1em;height:1em;color:transparent;text-align:center;border:1px solid var(--zt-checkbox-border-color);transition-duration:var(--zt-checkbox-duration);transition-property:color,border-color,background-color}.zt-checkbox__icon--round .zt-icon{border-radius:100%;border:var(--zt-checkbox-round-icon-border);box-shadow:var(--zt-checkbox-round-icon-box-shadow);background:var(--zt-checkbox-round-icon-background)}.zt-checkbox__icon--checked .zt-icon{color:var(--zt-white);background:var(--zt-checkbox-checked-icon-color);box-shadow:var(--zt-checkbox-checked-icon-shadow);border:var(--zt-checkbox-checked-icon-border)}.zt-checkbox__icon--disabled{cursor:not-allowed}.zt-checkbox__icon--disabled .zt-icon{border:var(--zt-checkbox-disabled-icon-border);box-shadow:var(--zt-checkbox-disabled-icon-shadow);background:var(--zt-checkbox-disabled-icon-background)}.zt-checkbox__icon--disabled.zt-checkbox__icon--checked .zt-icon{opacity:var(--zt-checkbox-disabled-checked-icon-opacity);background:var(--zt-blue);color:var(--zt-white)}.zt-checkbox__label{margin-left:var(--zt-checkbox-label-margin);color:var(--zt-checkbox-label-color);font-size:var(--zt-checkbox-label-font-size)}.zt-checkbox__label--left{margin:0 var(--zt-checkbox-label-margin) 0 0}.zt-checkbox__label--disabled{color:var(--zt-checkbox-disabled-label-color)}.zt-theme-dark{--zt-checkbox-round-icon-box-shadow: none;--zt-checkbox-disabled-icon-shadow: none;--zt-checkbox-round-icon-background: rgba(255, 255, 255, .04);--zt-checkbox-round-icon-border: 1px solid var(--zt-gray-default);--zt-checkbox-disabled-icon-border: 1px solid var(--zt-gray-default);--zt-checkbox-disabled-icon-background: rgba(255, 255, 255, .2)}
1
+ :root{--zt-checkbox-size: 16px;--zt-checkbox-padding: 12px 0;--zt-checkbox-border-color: var(--zt-gray-5);--zt-checkbox-duration: var(--zt-duration-fast);--zt-checkbox-round-icon-border: 1px solid rgba(45, 75, 115, .13);--zt-checkbox-round-icon-box-shadow: -1px -1px 2px 0 #ffffff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-checkbox-round-icon-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%);--zt-checkbox-label-margin: var(--zt-padding-xs);--zt-checkbox-label-color: var(--zt-text-color);--zt-checkbox-label-font-size: var(--zt-font-size-md);--zt-checkbox-checked-icon-color: var(--zt-primary-color);--zt-checkbox-checked-icon-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, .2);--zt-checkbox-checked-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-checkbox-disabled-icon-color: var(--zt-gray-5);--zt-checkbox-disabled-icon-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-checkbox-disabled-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-checkbox-disabled-label-color: var(--zt-text-color-3);--zt-checkbox-disabled-background: var(--zt-border-color);--zt-checkbox-disabled-checked-icon-opacity: .4;--zt-checkbox-disabled-icon-background: linear-gradient(134deg, #e1e6eb 0%, #e5edf5 100%)}.zt-checkbox{position:relative;display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;padding:var(--zt-checkbox-padding)}.zt-checkbox--disabled{cursor:not-allowed}.zt-checkbox--label-disabled{cursor:default}.zt-checkbox--horizontal{margin-right:var(--zt-padding-sm)}.zt-checkbox__icon{font-size:var(--zt-checkbox-size);cursor:pointer;box-sizing:border-box}.zt-checkbox__icon .zt-icon{display:flex;justify-content:center;align-items:center;width:1em;height:1em;color:transparent;text-align:center;border:1px solid var(--zt-checkbox-border-color);transition-duration:var(--zt-checkbox-duration);transition-property:color,border-color,background-color}.zt-checkbox__icon--round .zt-icon{border-radius:100%;border:var(--zt-checkbox-round-icon-border);box-shadow:var(--zt-checkbox-round-icon-box-shadow);background:var(--zt-checkbox-round-icon-background)}.zt-checkbox__icon--indeterminate .zt-icon,.zt-checkbox__icon--checked .zt-icon{color:var(--zt-white);background:var(--zt-checkbox-checked-icon-color);box-shadow:var(--zt-checkbox-checked-icon-shadow);border:var(--zt-checkbox-checked-icon-border)}.zt-checkbox__icon--disabled{cursor:not-allowed}.zt-checkbox__icon--disabled .zt-icon{border:var(--zt-checkbox-disabled-icon-border);box-shadow:var(--zt-checkbox-disabled-icon-shadow);background:var(--zt-checkbox-disabled-icon-background)}.zt-checkbox__icon--disabled.zt-checkbox__icon--checked .zt-icon{opacity:var(--zt-checkbox-disabled-checked-icon-opacity);background:var(--zt-blue);color:var(--zt-white)}.zt-checkbox__label{margin-left:var(--zt-checkbox-label-margin);color:var(--zt-checkbox-label-color);font-size:var(--zt-checkbox-label-font-size)}.zt-checkbox__label--left{margin:0 var(--zt-checkbox-label-margin) 0 0}.zt-checkbox__label--disabled{color:var(--zt-checkbox-disabled-label-color)}.zt-theme-dark{--zt-checkbox-round-icon-box-shadow: none;--zt-checkbox-disabled-icon-shadow: none;--zt-checkbox-round-icon-background: rgba(255, 255, 255, .04);--zt-checkbox-round-icon-border: 1px solid var(--zt-gray-default);--zt-checkbox-disabled-icon-border: 1px solid var(--zt-gray-default);--zt-checkbox-disabled-icon-background: rgba(255, 255, 255, .2)}
@@ -15,6 +15,10 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
15
15
  type: BooleanConstructor;
16
16
  default: true;
17
17
  };
18
+ indeterminate: {
19
+ type: import("vue").PropType<boolean | null>;
20
+ default: null;
21
+ };
18
22
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
23
  name: import("vue").PropType<unknown>;
20
24
  shape: {
@@ -32,6 +36,10 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
32
36
  type: BooleanConstructor;
33
37
  default: true;
34
38
  };
39
+ indeterminate: {
40
+ type: import("vue").PropType<boolean | null>;
41
+ default: null;
42
+ };
35
43
  }>> & {
36
44
  onChange?: ((...args: any[]) => any) | undefined;
37
45
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -40,6 +48,7 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
40
48
  disabled: boolean;
41
49
  labelDisabled: boolean;
42
50
  bindGroup: boolean;
51
+ indeterminate: boolean | null;
43
52
  }, {}>>;
44
53
  export default Checkbox;
45
54
  export type { CheckboxProps } from './Checkbox';
@@ -0,0 +1,4 @@
1
+ /** the global z-index is automatically incremented after reading */
2
+ export declare const useGlobalZIndex: () => number;
3
+ /** reset the global z-index */
4
+ export declare const setGlobalZIndex: (val: number) => void;
@@ -0,0 +1,9 @@
1
+ let globalZIndex = 2e3;
2
+ const useGlobalZIndex = () => ++globalZIndex;
3
+ const setGlobalZIndex = (val) => {
4
+ globalZIndex = val;
5
+ };
6
+ export {
7
+ setGlobalZIndex,
8
+ useGlobalZIndex
9
+ };
@@ -0,0 +1,3 @@
1
+ export declare const useScopeId: () => {
2
+ [x: string]: string;
3
+ } | null;
@@ -0,0 +1,9 @@
1
+ import { getCurrentInstance } from "vue";
2
+ const useScopeId = () => {
3
+ var _a;
4
+ const { scopeId } = ((_a = getCurrentInstance()) == null ? void 0 : _a.vnode) || {};
5
+ return scopeId ? { [scopeId]: "" } : null;
6
+ };
7
+ export {
8
+ useScopeId
9
+ };
@@ -0,0 +1,2 @@
1
+ import { Ref } from 'vue';
2
+ export declare const useSyncPropRef: <T>(getProp: () => T, setProp: (value: T) => void) => Ref<T>;
@@ -0,0 +1,18 @@
1
+ import { ref, watch } from "vue";
2
+ const useSyncPropRef = (getProp, setProp) => {
3
+ const propRef = ref(getProp());
4
+ watch(getProp, (value) => {
5
+ if (value !== propRef.value) {
6
+ propRef.value = value;
7
+ }
8
+ });
9
+ watch(propRef, (value) => {
10
+ if (value !== getProp()) {
11
+ setProp(value);
12
+ }
13
+ });
14
+ return propRef;
15
+ };
16
+ export {
17
+ useSyncPropRef
18
+ };
@@ -1,11 +1,13 @@
1
- import type { PropType, InjectionKey, ExtractPropTypes } from 'vue';
2
- import type { Numeric } from '../utils';
1
+ import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
2
+ import { type Numeric } from '../utils';
3
3
  export type ConfigProviderTheme = 'light' | 'dark';
4
+ export type ConfigProviderThemeVarsScope = 'local' | 'global';
4
5
  export type ConfigProviderProvide = {
5
6
  iconPrefix?: string;
6
7
  };
7
8
  export declare const CONFIG_PROVIDER_KEY: InjectionKey<ConfigProviderProvide>;
8
- declare const configProviderProps: {
9
+ export type ThemeVars = PropType<Record<string, Numeric>>;
10
+ export declare const configProviderProps: {
9
11
  tag: {
10
12
  type: PropType<keyof HTMLElementTagNameMap>;
11
13
  default: keyof HTMLElementTagNameMap;
@@ -14,7 +16,14 @@ declare const configProviderProps: {
14
16
  type: PropType<ConfigProviderTheme>;
15
17
  default: ConfigProviderTheme;
16
18
  };
17
- themeVars: PropType<Record<string, Numeric>>;
19
+ zIndex: NumberConstructor;
20
+ themeVars: ThemeVars;
21
+ themeVarsDark: ThemeVars;
22
+ themeVarsLight: ThemeVars;
23
+ themeVarsScope: {
24
+ type: PropType<ConfigProviderThemeVarsScope>;
25
+ default: ConfigProviderThemeVarsScope;
26
+ };
18
27
  iconPrefix: StringConstructor;
19
28
  };
20
29
  export type ConfigProviderProps = ExtractPropTypes<typeof configProviderProps>;
@@ -27,7 +36,14 @@ declare const _default: import("vue").DefineComponent<{
27
36
  type: PropType<ConfigProviderTheme>;
28
37
  default: ConfigProviderTheme;
29
38
  };
30
- themeVars: PropType<Record<string, Numeric>>;
39
+ zIndex: NumberConstructor;
40
+ themeVars: ThemeVars;
41
+ themeVarsDark: ThemeVars;
42
+ themeVarsLight: ThemeVars;
43
+ themeVarsScope: {
44
+ type: PropType<ConfigProviderThemeVarsScope>;
45
+ default: ConfigProviderThemeVarsScope;
46
+ };
31
47
  iconPrefix: StringConstructor;
32
48
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
33
49
  tag: {
@@ -38,10 +54,18 @@ declare const _default: import("vue").DefineComponent<{
38
54
  type: PropType<ConfigProviderTheme>;
39
55
  default: ConfigProviderTheme;
40
56
  };
41
- themeVars: PropType<Record<string, Numeric>>;
57
+ zIndex: NumberConstructor;
58
+ themeVars: ThemeVars;
59
+ themeVarsDark: ThemeVars;
60
+ themeVarsLight: ThemeVars;
61
+ themeVarsScope: {
62
+ type: PropType<ConfigProviderThemeVarsScope>;
63
+ default: ConfigProviderThemeVarsScope;
64
+ };
42
65
  iconPrefix: StringConstructor;
43
66
  }>>, {
44
67
  tag: keyof HTMLElementTagNameMap;
45
68
  theme: ConfigProviderTheme;
69
+ themeVarsScope: ConfigProviderThemeVarsScope;
46
70
  }, {}>;
47
71
  export default _default;