pro-design-vue 1.2.4 → 1.2.6

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 (45) hide show
  1. package/dist/index.full.js +40 -14
  2. package/dist/index.full.min.js +7 -7
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +8 -8
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +40 -14
  7. package/es/components/config-provider/src/typing.d.ts +4 -2
  8. package/es/components/table/index.d.ts +2 -2
  9. package/es/components/table/src/components/InteralTable.vue.d.ts +3 -3
  10. package/es/components/table/src/components/Table.d.ts +3 -3
  11. package/es/index.d.ts +29 -27
  12. package/es/packages/components/config-provider/src/config-provider.vue2.mjs.map +1 -1
  13. package/es/packages/components/config-provider/src/useCssVariables.mjs +1 -0
  14. package/es/packages/components/config-provider/src/useCssVariables.mjs.map +1 -1
  15. package/es/packages/components/table/index.mjs.map +1 -1
  16. package/es/packages/components/table/src/components/Form/Form.mjs +0 -1
  17. package/es/packages/components/table/src/components/Form/Form.mjs.map +1 -1
  18. package/es/packages/components/table/src/components/Table.mjs +22 -9
  19. package/es/packages/components/table/src/components/Table.mjs.map +1 -1
  20. package/es/packages/utils/color/generator.mjs +15 -2
  21. package/es/packages/utils/color/generator.mjs.map +1 -1
  22. package/es/utils/color/generator.d.ts +1 -1
  23. package/es/version.d.ts +1 -1
  24. package/es/version.mjs +1 -1
  25. package/es/version.mjs.map +1 -1
  26. package/lib/components/config-provider/src/typing.d.ts +4 -2
  27. package/lib/components/table/index.d.ts +2 -2
  28. package/lib/components/table/src/components/InteralTable.vue.d.ts +3 -3
  29. package/lib/components/table/src/components/Table.d.ts +3 -3
  30. package/lib/index.d.ts +29 -27
  31. package/lib/packages/components/config-provider/src/config-provider.vue2.js.map +1 -1
  32. package/lib/packages/components/config-provider/src/useCssVariables.js +1 -0
  33. package/lib/packages/components/config-provider/src/useCssVariables.js.map +1 -1
  34. package/lib/packages/components/table/index.js.map +1 -1
  35. package/lib/packages/components/table/src/components/Form/Form.js +0 -1
  36. package/lib/packages/components/table/src/components/Form/Form.js.map +1 -1
  37. package/lib/packages/components/table/src/components/Table.js +22 -9
  38. package/lib/packages/components/table/src/components/Table.js.map +1 -1
  39. package/lib/packages/utils/color/generator.js +15 -2
  40. package/lib/packages/utils/color/generator.js.map +1 -1
  41. package/lib/utils/color/generator.d.ts +1 -1
  42. package/lib/version.d.ts +1 -1
  43. package/lib/version.js +1 -1
  44. package/lib/version.js.map +1 -1
  45. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /*! Pro Design Vue v1.2.4 */
1
+ /*! Pro Design Vue v1.2.6 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('ant-design-vue'), require('vue'), require('ant-design-vue/es/locale/zh_CN.js')) :
@@ -32,7 +32,7 @@
32
32
  const DEFAULT_NAMESPACE = "pro";
33
33
  const DEFAULT_LOCALE = "zh-CN";
34
34
 
35
- const version$1 = "1.2.4";
35
+ const version$1 = "1.2.6";
36
36
 
37
37
  const makeInstaller = (components = []) => {
38
38
  const install = (app) => {
@@ -3366,7 +3366,20 @@
3366
3366
  return colors;
3367
3367
  }
3368
3368
 
3369
- function generatorColorVariables(colorItems, namespace) {
3369
+ const darkColorKeyMap = {
3370
+ 50: "950",
3371
+ 100: "900",
3372
+ 200: "800",
3373
+ 300: "700",
3374
+ 400: "600",
3375
+ 500: "500",
3376
+ 600: "400",
3377
+ 700: "300",
3378
+ 800: "200",
3379
+ 900: "100",
3380
+ 950: "50"
3381
+ };
3382
+ function generatorColorVariables(colorItems, dark, namespace) {
3370
3383
  const colorVariables = {};
3371
3384
  colorItems.forEach(({ alias, color, name }) => {
3372
3385
  if (color) {
@@ -3374,7 +3387,7 @@
3374
3387
  let mainColor = colorsMap["500"];
3375
3388
  const colorKeys = Object.keys(colorsMap);
3376
3389
  colorKeys.forEach((key) => {
3377
- const colorValue = colorsMap[key];
3390
+ const colorValue = !dark ? colorsMap[key] : colorsMap[darkColorKeyMap[key]];
3378
3391
  if (colorValue) {
3379
3392
  const hslColor = convertToHslCssVar(colorValue);
3380
3393
  colorVariables[`--${namespace}-${name}-${key}`] = hslColor;
@@ -8307,6 +8320,7 @@
8307
8320
  const oldColor = (oldToken == null ? void 0 : oldToken[item.key]) || defaultColor;
8308
8321
  return newToken[item.key] !== defaultColor || newToken[item.key] === defaultColor && oldColor !== defaultColor;
8309
8322
  }),
8323
+ dark,
8310
8324
  DEFAULT_NAMESPACE
8311
8325
  );
8312
8326
  const colorMappings = {
@@ -35162,7 +35176,6 @@
35162
35176
  });
35163
35177
  (_e = (_d = cardProps.value) == null ? void 0 : _d.onTabChange) == null ? void 0 : _e.call(_d, key);
35164
35178
  };
35165
- console.log("\u{1F680} ~ return ~ cardProps.value:", cardProps.value);
35166
35179
  return () => {
35167
35180
  var _a2, _b2, _c2, _d;
35168
35181
  const searchDom = vue.createVNode(ProQueryFilter, vue.mergeProps({
@@ -35243,6 +35256,19 @@
35243
35256
  var _a2;
35244
35257
  return (_a2 = props.prefixCls) != null ? _a2 : prefixCls;
35245
35258
  });
35259
+ const mergeOptions = vue.computed(() => {
35260
+ var _a2, _b;
35261
+ if (props.options === false) {
35262
+ return false;
35263
+ }
35264
+ if (props.options === void 0) {
35265
+ return (_a2 = table == null ? void 0 : table.value) == null ? void 0 : _a2.options;
35266
+ }
35267
+ return {
35268
+ ...(_b = table == null ? void 0 : table.value) == null ? void 0 : _b.options,
35269
+ ...props.options
35270
+ };
35271
+ });
35246
35272
  useProvideLevel();
35247
35273
  vue.watch(hoverRowKey, (newValue, oldValue) => {
35248
35274
  if (counter.rootDomRef.value) {
@@ -35294,11 +35320,11 @@
35294
35320
  });
35295
35321
  const onFormSearchSubmit = (values) => {
35296
35322
  var _a2, _b;
35297
- if (props.options && props.options.search) {
35323
+ if (mergeOptions.value && mergeOptions.value.search) {
35298
35324
  const {
35299
35325
  name = "keyword"
35300
- } = props.options.search === true ? {} : props.options.search;
35301
- const success = (_b = (_a2 = props.options.search) == null ? void 0 : _a2.onSearch) == null ? void 0 : _b.call(_a2, actions.keyword.value);
35326
+ } = mergeOptions.value.search === true ? {} : mergeOptions.value.search;
35327
+ const success = (_b = (_a2 = mergeOptions.value.search) == null ? void 0 : _a2.onSearch) == null ? void 0 : _b.call(_a2, actions.keyword.value);
35302
35328
  if (success !== false) {
35303
35329
  actions.setFormSearch({
35304
35330
  ...values,
@@ -35445,7 +35471,7 @@
35445
35471
  (_a2 = props["onUpdate:selectedRowKeys"]) == null ? void 0 : _a2.call(props, [], []);
35446
35472
  setSelectedRowKeys([]);
35447
35473
  };
35448
- const hideToolbar = vue.computed(() => props.options === false && !props.title && !slots.title && !slots.toolbar && !slots.searchExtra && !slots.toolbarActions);
35474
+ const hideToolbar = vue.computed(() => mergeOptions.value === false && !props.title && !slots.title && !slots.toolbar && !slots.searchExtra && !slots.toolbarActions);
35449
35475
  const notNeedCardDom = vue.computed(() => {
35450
35476
  var _a2;
35451
35477
  if ((props.search === false || !((_a2 = formItems.value) == null ? void 0 : _a2.length)) && props.toolBar === false) {
@@ -35515,7 +35541,7 @@
35515
35541
  reset
35516
35542
  });
35517
35543
  return () => {
35518
- var _a2, _b;
35544
+ var _a2, _b, _c, _d;
35519
35545
  const {
35520
35546
  expandIcon = slots.expandIcon,
35521
35547
  expandedRowRender = slots.expandedRowRender
@@ -35526,7 +35552,7 @@
35526
35552
  "subTitle": props.subTitle,
35527
35553
  "tooltip": props.tooltip,
35528
35554
  "prefixCls": mergedPrefixCls.value,
35529
- "options": props.options,
35555
+ "options": mergeOptions.value,
35530
35556
  "actionsRef": {
35531
35557
  ...actions,
35532
35558
  fullScreen: () => {
@@ -35589,7 +35615,7 @@
35589
35615
  return tableDom;
35590
35616
  })();
35591
35617
  tableDom = vue.createVNode(antDesignVue.Card, vue.mergeProps({
35592
- "bordered": isBordered("table", props.cardBordered),
35618
+ "bordered": isBordered("table", (_d = props.cardBordered) != null ? _d : (_c = table == null ? void 0 : table.value) == null ? void 0 : _c.cardBordered),
35593
35619
  "bodyStyle": cardBodyStyle.value
35594
35620
  }, props.cardProps), _isSlot$2(tableDom) ? tableDom : {
35595
35621
  default: () => [_tableDom]
@@ -35602,7 +35628,7 @@
35602
35628
  }
35603
35629
  }, {
35604
35630
  default: () => {
35605
- var _a3;
35631
+ var _a3, _b2, _c2;
35606
35632
  return [vue.createVNode("div", vue.mergeProps({
35607
35633
  "ref": counter.rootDomRef
35608
35634
  }, attrs, {
@@ -35611,7 +35637,7 @@
35611
35637
  }), [props.search !== false && !!((_a3 = formItems.value) == null ? void 0 : _a3.length) && vue.createVNode(FormRender, {
35612
35638
  "prefixCls": mergedPrefixCls.value,
35613
35639
  "items": formItems.value,
35614
- "cardBordered": props.cardBordered,
35640
+ "cardBordered": (_c2 = props.cardBordered) != null ? _c2 : (_b2 = table == null ? void 0 : table.value) == null ? void 0 : _b2.cardBordered,
35615
35641
  "search": props.search,
35616
35642
  "tableShowCard": props.cardProps !== false,
35617
35643
  "loading": formSubmitLoading.value,