@aplus-frontend/ui 0.0.16 → 0.0.18

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 (81) hide show
  1. package/es/index.mjs +51 -46
  2. package/es/src/ap-field/date/helper.d.ts +7 -0
  3. package/es/src/ap-field/date/helper.mjs +17 -7
  4. package/es/src/ap-field/date/index.vue.mjs +46 -39
  5. package/es/src/ap-field/date-range/index.vue.mjs +63 -61
  6. package/es/src/ap-field/interface.d.ts +9 -0
  7. package/es/src/ap-table/ap-table.vue.mjs +92 -95
  8. package/es/src/ap-table/constants.d.ts +24 -0
  9. package/es/src/ap-table/interface.d.ts +18 -4
  10. package/es/src/ap-table/style/ap-table.css +6 -0
  11. package/es/src/ap-table/utils.d.ts +6831 -845
  12. package/es/src/business/ap-label/ApLabel.vue.d.ts +38 -0
  13. package/es/src/business/ap-label/ApLabel.vue.mjs +4 -0
  14. package/es/src/business/ap-label/ApLabel.vue2.mjs +52 -0
  15. package/es/src/business/ap-label/index.d.ts +4 -0
  16. package/es/src/business/ap-label/interface.d.ts +8 -0
  17. package/es/src/business/ap-label/style.css +4 -0
  18. package/es/src/business/index.d.ts +256 -1
  19. package/es/src/business/index.mjs +7 -4
  20. package/es/src/check-card/checked.svg.mjs +4 -0
  21. package/es/src/check-card/context.d.ts +6 -0
  22. package/es/src/check-card/context.mjs +16 -0
  23. package/es/src/check-card/group.vue.d.ts +57 -0
  24. package/es/src/check-card/group.vue.mjs +57 -0
  25. package/es/src/check-card/group.vue2.mjs +4 -0
  26. package/es/src/check-card/index.d.ts +9 -0
  27. package/es/src/check-card/index.mjs +11 -0
  28. package/es/src/check-card/index.vue.d.ts +54 -0
  29. package/es/src/check-card/index.vue.mjs +4 -0
  30. package/es/src/check-card/index.vue2.mjs +133 -0
  31. package/es/src/check-card/interface.d.ts +100 -0
  32. package/es/src/check-card/interface.mjs +1 -0
  33. package/es/src/check-card/style/index.css +108 -0
  34. package/es/src/editable-table/interface.d.ts +1 -1
  35. package/es/src/hooks/useControllableValue.mjs +15 -13
  36. package/es/src/index.d.ts +1 -0
  37. package/es/src/index.mjs +197 -192
  38. package/es/src/theme/ap-label/ap-label.css +4 -0
  39. package/es/src/theme/ap-table/ap-table.css +6 -0
  40. package/es/src/theme/check-card/index.css +108 -0
  41. package/lib/index.js +1 -1
  42. package/lib/src/ap-field/date/helper.d.ts +7 -0
  43. package/lib/src/ap-field/date/helper.js +1 -1
  44. package/lib/src/ap-field/date/index.vue.js +1 -1
  45. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  46. package/lib/src/ap-field/interface.d.ts +9 -0
  47. package/lib/src/ap-table/ap-table.vue.js +1 -1
  48. package/lib/src/ap-table/constants.d.ts +24 -0
  49. package/lib/src/ap-table/interface.d.ts +18 -4
  50. package/lib/src/ap-table/style/ap-table.css +6 -0
  51. package/lib/src/ap-table/utils.d.ts +6831 -845
  52. package/lib/src/business/ap-label/ApLabel.vue.d.ts +38 -0
  53. package/lib/src/business/ap-label/ApLabel.vue.js +1 -0
  54. package/lib/src/business/ap-label/ApLabel.vue2.js +1 -0
  55. package/lib/src/business/ap-label/index.d.ts +4 -0
  56. package/lib/src/business/ap-label/interface.d.ts +8 -0
  57. package/lib/src/business/ap-label/style.css +4 -0
  58. package/lib/src/business/index.d.ts +256 -1
  59. package/lib/src/business/index.js +1 -1
  60. package/lib/src/check-card/checked.svg.js +1 -0
  61. package/lib/src/check-card/context.d.ts +6 -0
  62. package/lib/src/check-card/context.js +1 -0
  63. package/lib/src/check-card/group.vue.d.ts +57 -0
  64. package/lib/src/check-card/group.vue.js +1 -0
  65. package/lib/src/check-card/group.vue2.js +1 -0
  66. package/lib/src/check-card/index.d.ts +9 -0
  67. package/lib/src/check-card/index.js +1 -0
  68. package/lib/src/check-card/index.vue.d.ts +54 -0
  69. package/lib/src/check-card/index.vue.js +1 -0
  70. package/lib/src/check-card/index.vue2.js +1 -0
  71. package/lib/src/check-card/interface.d.ts +100 -0
  72. package/lib/src/check-card/interface.js +1 -0
  73. package/lib/src/check-card/style/index.css +108 -0
  74. package/lib/src/editable-table/interface.d.ts +1 -1
  75. package/lib/src/hooks/useControllableValue.js +1 -1
  76. package/lib/src/index.d.ts +1 -0
  77. package/lib/src/index.js +1 -1
  78. package/lib/src/theme/ap-label/ap-label.css +4 -0
  79. package/lib/src/theme/ap-table/ap-table.css +6 -0
  80. package/lib/src/theme/check-card/index.css +108 -0
  81. package/package.json +2 -2
@@ -0,0 +1,38 @@
1
+ import { ApLabelProps } from './interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
4
+
5
+ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApLabelProps>, {
6
+ status: string;
7
+ placement: string;
8
+ iconColor: string;
9
+ text: string;
10
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApLabelProps>, {
11
+ status: string;
12
+ placement: string;
13
+ iconColor: string;
14
+ text: string;
15
+ }>>>, {
16
+ text: any;
17
+ placement: TooltipPlacement;
18
+ status: "success" | "error" | "default" | "warning" | "processing";
19
+ iconColor: string;
20
+ }, {}>;
21
+ export default _default;
22
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
23
+ type __VLS_TypePropsToRuntimeProps<T> = {
24
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
25
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
26
+ } : {
27
+ type: PropType<T[K]>;
28
+ required: true;
29
+ };
30
+ };
31
+ type __VLS_WithDefaults<P, D> = {
32
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
33
+ default: D[K];
34
+ }> : P[K];
35
+ };
36
+ type __VLS_Prettify<T> = {
37
+ [K in keyof T]: T[K];
38
+ } & {};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ApLabel.vue2.js");exports.default=e.default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("ant-design-vue"),n=require("@ant-design/icons-vue");require("../../config-provider/index.js");const a=require("lodash-unified");require("./style.css");const s=require("../../config-provider/hooks/use-namespace.js"),u=e.defineComponent({name:"ApLabel",__name:"ApLabel",props:{count:{},showZero:{type:Boolean},overflowCount:{},dot:{type:Boolean},prefixCls:{},scrollNumberPrefixCls:{},status:{default:"default"},size:{},color:{},text:{default:""},offset:{},numberStyle:{},title:{},helpMessage:{},placement:{default:"top"},iconColor:{default:"#FF4D4F"}},setup(l){const t=l,{b:r}=s.useNamespace("ap-label");return(c,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(r)()])},[e.createVNode(e.unref(o.Badge),e.normalizeProps(e.guardReactiveProps(e.unref(a.omit)(t,["helpMessage","placement","iconColor"]))),null,16),t.helpMessage?(e.openBlock(),e.createBlock(e.unref(o.Tooltip),{key:0,placement:t.placement,title:t.helpMessage},{default:e.withCtx(()=>[e.createVNode(e.unref(n.QuestionCircleOutlined),{style:e.normalizeStyle({color:t.iconColor,marginLeft:"6px"})},null,8,["style"])]),_:1},8,["placement","title"])):e.createCommentVNode("",!0)],2))}});exports.default=u;
@@ -0,0 +1,4 @@
1
+ import { default as ApLabel } from './ApLabel.vue';
2
+
3
+ export * from './interface';
4
+ export { ApLabel };
@@ -0,0 +1,8 @@
1
+ import { BadgeProps } from 'ant-design-vue';
2
+ import { TooltipPlacement } from 'ant-design-vue/es/Tooltip';
3
+
4
+ export type ApLabelProps = BadgeProps & {
5
+ helpMessage?: string;
6
+ placement: TooltipPlacement;
7
+ iconColor: string;
8
+ };
@@ -0,0 +1,4 @@
1
+ .aplus-ap-label {
2
+ display: inline-block;
3
+ font-size: 14px;
4
+ }
@@ -1,4 +1,6 @@
1
- import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
1
+ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin, CSSProperties } from 'vue';
2
+ import { LiteralUnion } from 'ant-design-vue/es/_util/type';
3
+ import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
2
4
  export type { ApTitleProps } from './title/interface';
3
5
  export declare const ApTitle: {
4
6
  new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
@@ -121,3 +123,256 @@ export declare const ApTitle: {
121
123
  onClick?: (() => void) | undefined;
122
124
  };
123
125
  });
126
+ export type { ApLabelProps } from './ap-label/interface';
127
+ export declare const ApLabel: {
128
+ new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
129
+ text: {
130
+ type: PropType<any>;
131
+ default: string;
132
+ };
133
+ color: {
134
+ type: PropType<LiteralUnion<"blue" | "purple" | "cyan" | "green" | "magenta" | "pink" | "red" | "orange" | "yellow" | "volcano" | "geekblue" | "lime" | "gold">>;
135
+ };
136
+ prefixCls: {
137
+ type: PropType<string>;
138
+ };
139
+ placement: {
140
+ type: PropType<TooltipPlacement>;
141
+ required: true;
142
+ default: string;
143
+ };
144
+ title: {
145
+ type: PropType<string>;
146
+ };
147
+ size: {
148
+ type: PropType<"default" | "small">;
149
+ };
150
+ status: {
151
+ type: PropType<"success" | "error" | "default" | "warning" | "processing">;
152
+ default: string;
153
+ };
154
+ offset: {
155
+ type: PropType<[string | number, string | number]>;
156
+ };
157
+ dot: {
158
+ type: PropType<boolean>;
159
+ };
160
+ helpMessage: {
161
+ type: PropType<string>;
162
+ };
163
+ count: {
164
+ type: PropType<any>;
165
+ };
166
+ showZero: {
167
+ type: PropType<boolean>;
168
+ };
169
+ overflowCount: {
170
+ type: PropType<number>;
171
+ };
172
+ scrollNumberPrefixCls: {
173
+ type: PropType<string>;
174
+ };
175
+ numberStyle: {
176
+ type: PropType<CSSProperties>;
177
+ };
178
+ iconColor: {
179
+ type: PropType<string>;
180
+ required: true;
181
+ default: string;
182
+ };
183
+ }>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
184
+ text: {
185
+ type: PropType<any>;
186
+ default: string;
187
+ };
188
+ color: {
189
+ type: PropType<LiteralUnion<"blue" | "purple" | "cyan" | "green" | "magenta" | "pink" | "red" | "orange" | "yellow" | "volcano" | "geekblue" | "lime" | "gold">>;
190
+ };
191
+ prefixCls: {
192
+ type: PropType<string>;
193
+ };
194
+ placement: {
195
+ type: PropType<TooltipPlacement>;
196
+ required: true;
197
+ default: string;
198
+ };
199
+ title: {
200
+ type: PropType<string>;
201
+ };
202
+ size: {
203
+ type: PropType<"default" | "small">;
204
+ };
205
+ status: {
206
+ type: PropType<"success" | "error" | "default" | "warning" | "processing">;
207
+ default: string;
208
+ };
209
+ offset: {
210
+ type: PropType<[string | number, string | number]>;
211
+ };
212
+ dot: {
213
+ type: PropType<boolean>;
214
+ };
215
+ helpMessage: {
216
+ type: PropType<string>;
217
+ };
218
+ count: {
219
+ type: PropType<any>;
220
+ };
221
+ showZero: {
222
+ type: PropType<boolean>;
223
+ };
224
+ overflowCount: {
225
+ type: PropType<number>;
226
+ };
227
+ scrollNumberPrefixCls: {
228
+ type: PropType<string>;
229
+ };
230
+ numberStyle: {
231
+ type: PropType<CSSProperties>;
232
+ };
233
+ iconColor: {
234
+ type: PropType<string>;
235
+ required: true;
236
+ default: string;
237
+ };
238
+ }>>, {
239
+ text: any;
240
+ placement: TooltipPlacement;
241
+ status: "success" | "error" | "default" | "warning" | "processing";
242
+ iconColor: string;
243
+ }, true, {}, {}, {
244
+ P: {};
245
+ B: {};
246
+ D: {};
247
+ C: {};
248
+ M: {};
249
+ Defaults: {};
250
+ }, Readonly< ExtractPropTypes<{
251
+ text: {
252
+ type: PropType<any>;
253
+ default: string;
254
+ };
255
+ color: {
256
+ type: PropType<LiteralUnion<"blue" | "purple" | "cyan" | "green" | "magenta" | "pink" | "red" | "orange" | "yellow" | "volcano" | "geekblue" | "lime" | "gold">>;
257
+ };
258
+ prefixCls: {
259
+ type: PropType<string>;
260
+ };
261
+ placement: {
262
+ type: PropType<TooltipPlacement>;
263
+ required: true;
264
+ default: string;
265
+ };
266
+ title: {
267
+ type: PropType<string>;
268
+ };
269
+ size: {
270
+ type: PropType<"default" | "small">;
271
+ };
272
+ status: {
273
+ type: PropType<"success" | "error" | "default" | "warning" | "processing">;
274
+ default: string;
275
+ };
276
+ offset: {
277
+ type: PropType<[string | number, string | number]>;
278
+ };
279
+ dot: {
280
+ type: PropType<boolean>;
281
+ };
282
+ helpMessage: {
283
+ type: PropType<string>;
284
+ };
285
+ count: {
286
+ type: PropType<any>;
287
+ };
288
+ showZero: {
289
+ type: PropType<boolean>;
290
+ };
291
+ overflowCount: {
292
+ type: PropType<number>;
293
+ };
294
+ scrollNumberPrefixCls: {
295
+ type: PropType<string>;
296
+ };
297
+ numberStyle: {
298
+ type: PropType<CSSProperties>;
299
+ };
300
+ iconColor: {
301
+ type: PropType<string>;
302
+ required: true;
303
+ default: string;
304
+ };
305
+ }>>, {}, {}, {}, {}, {
306
+ text: any;
307
+ placement: TooltipPlacement;
308
+ status: "success" | "error" | "default" | "warning" | "processing";
309
+ iconColor: string;
310
+ }>;
311
+ __isFragment?: undefined;
312
+ __isTeleport?: undefined;
313
+ __isSuspense?: undefined;
314
+ } & ComponentOptionsBase<Readonly< ExtractPropTypes<{
315
+ text: {
316
+ type: PropType<any>;
317
+ default: string;
318
+ };
319
+ color: {
320
+ type: PropType<LiteralUnion<"blue" | "purple" | "cyan" | "green" | "magenta" | "pink" | "red" | "orange" | "yellow" | "volcano" | "geekblue" | "lime" | "gold">>;
321
+ };
322
+ prefixCls: {
323
+ type: PropType<string>;
324
+ };
325
+ placement: {
326
+ type: PropType<TooltipPlacement>;
327
+ required: true;
328
+ default: string;
329
+ };
330
+ title: {
331
+ type: PropType<string>;
332
+ };
333
+ size: {
334
+ type: PropType<"default" | "small">;
335
+ };
336
+ status: {
337
+ type: PropType<"success" | "error" | "default" | "warning" | "processing">;
338
+ default: string;
339
+ };
340
+ offset: {
341
+ type: PropType<[string | number, string | number]>;
342
+ };
343
+ dot: {
344
+ type: PropType<boolean>;
345
+ };
346
+ helpMessage: {
347
+ type: PropType<string>;
348
+ };
349
+ count: {
350
+ type: PropType<any>;
351
+ };
352
+ showZero: {
353
+ type: PropType<boolean>;
354
+ };
355
+ overflowCount: {
356
+ type: PropType<number>;
357
+ };
358
+ scrollNumberPrefixCls: {
359
+ type: PropType<string>;
360
+ };
361
+ numberStyle: {
362
+ type: PropType<CSSProperties>;
363
+ };
364
+ iconColor: {
365
+ type: PropType<string>;
366
+ required: true;
367
+ default: string;
368
+ };
369
+ }>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
370
+ text: any;
371
+ placement: TooltipPlacement;
372
+ status: "success" | "error" | "default" | "warning" | "processing";
373
+ iconColor: string;
374
+ }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin<any[]> & (new (...args: any[]) => {
375
+ $props: {
376
+ onClick?: (() => void) | undefined;
377
+ };
378
+ });
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@aplus-frontend/utils");require("./title/ApTitle.vue.js");const t=require("./title/ApTitle.vue2.js"),i=e.withInstall(t.default);exports.ApTitle=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@aplus-frontend/utils");require("./title/ApTitle.vue.js");require("./ap-label/ApLabel.vue.js");const t=require("./title/ApTitle.vue2.js"),u=require("./ap-label/ApLabel.vue2.js"),l=e.withInstall(t.default),r=e.withInstall(u.default);exports.ApLabel=r;exports.ApTitle=l;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const M="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBmaWxsPSJub25lIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMy43MTQyODY4MDQxOTkyMTkiIGhlaWdodD0iMTMuNzE0Mjg2ODA0MTk5MjE5IiB2aWV3Qm94PSIwIDAgMTMuNzE0Mjg2ODA0MTk5MjE5IDEzLjcxNDI4NjgwNDE5OTIxOSI+PGRlZnM+PGNsaXBQYXRoIGlkPSJtYXN0ZXJfc3ZnMF8xMjgyXzYxNTg1Ij48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTMuNzE0Mjg2ODA0MTk5MjE5IiBoZWlnaHQ9IjEzLjcxNDI4NjgwNDE5OTIxOSIgcng9IjAiLz48L2NsaXBQYXRoPjwvZGVmcz48ZyBjbGlwLXBhdGg9InVybCgjbWFzdGVyX3N2ZzBfMTI4Ml82MTU4NSkiPjxnPjxwYXRoIGQ9Ik0xMi42MzgzNTgzNDk2MDkzNzUsMy40OTcyODMzMDA3ODEyNVExMi43MDkxNTgzNDk2MDkzNzUsMy40MjY5MDYzMDA3ODEyNSwxMi43NDc0NTgzNDk2MDkzNzQsMy4zMzQ3NzgzMDA3ODEyNVExMi43ODU2NTgzNDk2MDkzNzYsMy4yNDI2NTEwMDA3ODEyNSwxMi43ODU2NTgzNDk2MDkzNzYsMy4xNDI4ODMzMDA3ODEyNVExMi43ODU2NTgzNDk2MDkzNzYsMy4wOTM2Mzc2MDA3ODEyNSwxMi43NzYwNTgzNDk2MDkzNzUsMy4wN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ImV2ZW5vZGQiIGZpbGw9IiNGRkZGRkYiIGZpbGwtb3BhY2l0eT0iMSIvPjwvZz48L2c+PC9zdmc+";exports.default=M;
@@ -0,0 +1,6 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ import { CheckCardGroupContextType } from './interface';
3
+
4
+ export declare const checkCardContextKey: InjectionKey<ComputedRef<CheckCardGroupContextType | null>>;
5
+ export declare function useProvideCheckCard(context: ComputedRef<CheckCardGroupContextType>): void;
6
+ export declare function useInjectCheckCard(): ComputedRef<CheckCardGroupContextType | null>;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=Symbol("checkCardContextKey");function r(c){e.provide(t,c)}function n(){return e.inject(t,e.computed(()=>null))}exports.checkCardContextKey=t;exports.useInjectCheckCard=n;exports.useProvideCheckCard=r;
@@ -0,0 +1,57 @@
1
+ import { CheckCardGroupProps, CheckCardValueType } from './interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+
4
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CheckCardGroupProps>, {
5
+ value: undefined;
6
+ multiple: boolean;
7
+ bordered: undefined;
8
+ disabled: undefined;
9
+ loading: undefined;
10
+ size: undefined;
11
+ stopPropagation: undefined;
12
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
13
+ "update:value": (...args: any[]) => void;
14
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CheckCardGroupProps>, {
15
+ value: undefined;
16
+ multiple: boolean;
17
+ bordered: undefined;
18
+ disabled: undefined;
19
+ loading: undefined;
20
+ size: undefined;
21
+ stopPropagation: undefined;
22
+ }>>> & {
23
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
24
+ }, {
25
+ disabled: boolean;
26
+ loading: boolean;
27
+ multiple: boolean;
28
+ size: "small" | "middle";
29
+ value: CheckCardValueType | CheckCardValueType[];
30
+ bordered: boolean;
31
+ stopPropagation: boolean;
32
+ }, {}>, {
33
+ default?(_: {}): any;
34
+ }>;
35
+ export default _default;
36
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
37
+ type __VLS_TypePropsToRuntimeProps<T> = {
38
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
39
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
40
+ } : {
41
+ type: PropType<T[K]>;
42
+ required: true;
43
+ };
44
+ };
45
+ type __VLS_WithDefaults<P, D> = {
46
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
47
+ default: D[K];
48
+ }> : P[K];
49
+ };
50
+ type __VLS_Prettify<T> = {
51
+ [K in keyof T]: T[K];
52
+ } & {};
53
+ type __VLS_WithTemplateSlots<T, S> = T & {
54
+ new (): {
55
+ $slots: S;
56
+ };
57
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue");require("../hooks/index.js");const m=require("./context.js"),v=require("lodash-unified"),b=require("../hooks/useControllableValue.js"),y=a.defineComponent({name:"CheckCardGroup",__name:"group",props:{bordered:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},size:{default:void 0},stopPropagation:{type:Boolean,default:void 0},multiple:{type:Boolean,default:!1},defaultValue:{type:[String,Number,Boolean,Array]},value:{type:[String,Number,Boolean,Array],default:void 0},"onUpdate:Value":{}},emits:["update:value"],setup(n,{emit:d}){const o=n,s=d,{value:r,updateValue:u}=b.useControllableValue(o,s),i=new Map;function p(e){if(!o.multiple){let t=a.unref(r);t===e?t=void 0:t=e,u(t);return}let l=[...a.unref(r)||[]];const g=l.find(t=>t===e);v.isUndefined(g)?l.push(e):l=l.filter(t=>t!==e).filter(t=>i.has(t)),u(l)}function f(e){i.set(e,!0)}function c(e){i.delete(e)}return m.useProvideCheckCard(a.computed(()=>({toggleOption:p,registerValue:f,cancelValue:c,disabled:o.disabled,size:o.size,bordered:o.bordered,loading:o.loading,value:a.unref(r),multiple:o.multiple,stopPropagation:o.stopPropagation}))),(e,l)=>a.renderSlot(e.$slots,"default")}});exports.default=y;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./group.vue.js");exports.default=e.default;
@@ -0,0 +1,9 @@
1
+ import { default as _CheckCard } from './index.vue';
2
+ import { default as CheckCardGroup } from './group.vue';
3
+
4
+ type CheckCardType = typeof _CheckCard & {
5
+ Group: typeof CheckCardGroup;
6
+ };
7
+ declare const CheckCard: CheckCardType;
8
+ export * from './interface';
9
+ export { CheckCard, CheckCardGroup };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index.vue.js");require("./group.vue2.js");require("./interface.js");const u=require("./index.vue2.js"),e=require("./group.vue.js"),r=u.default;r.Group=e.default;exports.CheckCardGroup=e.default;exports.CheckCard=r;
@@ -0,0 +1,54 @@
1
+ import { CheckCardProps } from './interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, CSSProperties, PropType } from 'vue';
3
+
4
+ type CheckCardSlots = {
5
+ default(config: {
6
+ checked: boolean;
7
+ }): void;
8
+ };
9
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CheckCardProps>, {
10
+ bordered: boolean;
11
+ size: string;
12
+ checked: undefined;
13
+ style: () => {};
14
+ stopPropagation: boolean;
15
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
16
+ "update:checked": (...args: any[]) => void;
17
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CheckCardProps>, {
18
+ bordered: boolean;
19
+ size: string;
20
+ checked: undefined;
21
+ style: () => {};
22
+ stopPropagation: boolean;
23
+ }>>> & {
24
+ "onUpdate:checked"?: ((...args: any[]) => any) | undefined;
25
+ }, {
26
+ style: CSSProperties;
27
+ size: "small" | "middle";
28
+ bordered: boolean;
29
+ checked: boolean;
30
+ stopPropagation: boolean;
31
+ }, {}>, Readonly<CheckCardSlots> & CheckCardSlots>;
32
+ export default _default;
33
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
34
+ type __VLS_TypePropsToRuntimeProps<T> = {
35
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
36
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
37
+ } : {
38
+ type: PropType<T[K]>;
39
+ required: true;
40
+ };
41
+ };
42
+ type __VLS_WithDefaults<P, D> = {
43
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
44
+ default: D[K];
45
+ }> : P[K];
46
+ };
47
+ type __VLS_Prettify<T> = {
48
+ [K in keyof T]: T[K];
49
+ } & {};
50
+ type __VLS_WithTemplateSlots<T, S> = T & {
51
+ new (): {
52
+ $slots: S;
53
+ };
54
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.vue2.js");exports.default=e.default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),P=require("ant-design-vue");require("../config-provider/index.js");require("../hooks/index.js");const b=require("lodash-unified"),_=require("./context.js");require("./style/index.css");const z=require("./checked.svg.js"),D=require("../config-provider/hooks/use-namespace.js"),S=require("../config-provider/hooks/use-global-config.js"),w=require("../hooks/useControllableValue.js"),E=["src"],M=e.defineComponent({name:"CheckCard",__name:"index",props:{bordered:{type:Boolean,default:!0},disabled:{type:Boolean},loading:{type:Boolean},size:{default:"middle"},stopPropagation:{type:Boolean,default:!1},checked:{type:Boolean,default:void 0},"onUpdate:checked":{},defaultChecked:{type:Boolean},value:{type:[String,Number,Boolean]},style:{default:()=>({})},title:{},content:{}},emits:["update:checked"],setup(h,{emit:C}){const l=h,{b:s,m:d,e:i,bm:y,em:p}=D.useNamespace("check-card"),m=S.useGlobalConfig("uiMode","aplus"),B=C,a=_.useInjectCheckCard(),{value:r,updateValue:f}=w.useControllableValue(l,B,{valuePropName:"checked",defaultValuePropName:"defaultChecked"}),n=e.computed(()=>{const t={...l},o=e.unref(a);return o&&(t.disabled=t.disabled||o.disabled,t.bordered=t.bordered||o.bordered,t.loading=t.loading||o.loading,t.size=t.size||o.size,t.stopPropagation=t.stopPropagation||o.stopPropagation),t}),N=e.computed(()=>{const t=e.unref(m),o=e.unref(n);return[s(),...o.disabled?[]:[s(t),e.unref(r)?y(t,"checked"):null],d(o.size),o.bordered?d("bordered"):null,o.disabled?d("disabled"):null]}),V=e.computed(()=>({...l.style,"--check-card-border-color":m.value==="admin"?"#D9D9D9":"#E9EDF3"})),v=e.computed(()=>{if(!l.title)return;const t=b.isFunction(l.title)?l.title(e.unref(r)):e.createVNode("span",null,[l.title]);return e.createVNode("div",{class:[i("title"),n.value.disabled?p("title","disabled"):null]},[t])}),k=e.computed(()=>{if(!l.content)return;const t=b.isFunction(l.content)?l.content(e.unref(r)):l.content;return e.createVNode("div",{class:[i("content"),n.value.disabled?p("content","disabled"):null]},[t])});function q(t){var o,u;n.value.stopPropagation&&t.target!==t.currentTarget||n.value.loading||n.value.disabled||(a.value?(u=(o=a.value)==null?void 0:o.toggleOption)==null||u.call(o,l.value):f(!e.unref(r)))}return e.watch(()=>a.value,t=>{if(!t)return;const o=t.multiple?(t.value||[]).includes(l.value):t.value===l.value;f(o)},{immediate:!0}),e.watchEffect(t=>{var o,u;(u=(o=a.value)==null?void 0:o.registerValue)==null||u.call(o,l.value),t(()=>{var c,g;return(g=(c=a.value)==null?void 0:c.cancelValue)==null?void 0:g.call(c,l.value)})}),(t,o)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(V.value),class:e.normalizeClass(N.value),onClick:e.withModifiers(q,["stop"])},[n.value.loading?(e.openBlock(),e.createBlock(e.unref(P.Skeleton),{key:0,active:""})):e.renderSlot(t.$slots,"default",{key:1,checked:e.unref(r)},()=>[v.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v.value),{key:0})):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k.value),{key:1})):e.createCommentVNode("",!0)]),e.unref(r)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(i)("checked-icon"))},[e.createElementVNode("img",{src:e.unref(z.default)},null,8,E)],2)):e.createCommentVNode("",!0)],6))}});exports.default=M;
@@ -0,0 +1,100 @@
1
+ import { CSSProperties, VNode } from 'vue';
2
+
3
+ export type CheckCardValueType = string | number | boolean;
4
+ /**
5
+ * 可选卡片的通用配置,在Group中使用将会是整组CheckCard生效
6
+ */
7
+ type CheckCardCommonType = {
8
+ /**
9
+ * 是否显示边框
10
+ */
11
+ bordered?: boolean;
12
+ /**
13
+ * 是否禁用
14
+ */
15
+ disabled?: boolean;
16
+ /**
17
+ * 是否显示加载中样式
18
+ */
19
+ loading?: boolean;
20
+ /**
21
+ * 卡片的尺寸,目前内置中等/小尺寸两种
22
+ */
23
+ size?: 'middle' | 'small';
24
+ /**
25
+ * 是否阻止点击事件冒泡(对于自定义内容包含输入控件时需要设置)
26
+ */
27
+ stopPropagation?: boolean;
28
+ };
29
+ export type CheckCardProps = CheckCardCommonType & {
30
+ /**
31
+ * 当前选项卡是否选中(v-model)
32
+ */
33
+ checked?: boolean;
34
+ 'onUpdate:checked'?: (checked: boolean) => void;
35
+ /**
36
+ * 默认是否选中
37
+ */
38
+ defaultChecked?: boolean;
39
+ /**
40
+ * 作为选项时的值
41
+ */
42
+ value?: CheckCardValueType;
43
+ /**
44
+ * 容器自定义CSS样式
45
+ */
46
+ style?: CSSProperties;
47
+ /**
48
+ * 标题
49
+ */
50
+ title?: string | ((checked: boolean) => VNode);
51
+ /**
52
+ * 内容
53
+ */
54
+ content?: string | ((checked: boolean) => VNode);
55
+ };
56
+ export type CheckCardGroupValueType = CheckCardValueType | CheckCardValueType[] | undefined;
57
+ export type CheckCardGroupProps = CheckCardCommonType & {
58
+ /**
59
+ * 是否多选
60
+ */
61
+ multiple?: boolean;
62
+ /**
63
+ * 选中的默认值
64
+ */
65
+ defaultValue?: CheckCardGroupValueType;
66
+ /**
67
+ * 选中的值(v-model)
68
+ */
69
+ value?: CheckCardGroupValueType;
70
+ 'onUpdate:Value'?: (nextValue: CheckCardGroupValueType) => void;
71
+ };
72
+ export type CheckCardGroupContextType = CheckCardCommonType & {
73
+ /**
74
+ * 是否是多选
75
+ */
76
+ multiple?: boolean;
77
+ /**
78
+ * 切换单个可选卡片时触发
79
+ * @param value
80
+ * @returns
81
+ */
82
+ toggleOption?: (value: any) => void;
83
+ /**
84
+ * 当前被选中的值
85
+ */
86
+ value?: any;
87
+ /**
88
+ * 注册一个CheckCard的value
89
+ * @param value
90
+ * @returns
91
+ */
92
+ registerValue?: (value: any) => void;
93
+ /**
94
+ * 取消注册
95
+ * @param value
96
+ * @returns
97
+ */
98
+ cancelValue?: (value: any) => void;
99
+ };
100
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";