@king-design/vue 3.4.5 → 3.5.0-beta.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.
@@ -3,18 +3,17 @@ import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
3
3
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
4
4
  import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
5
5
  import BasicDemo from '~/components/input/demos/basic';
6
- import { mount, unmount, dispatchEvent, wait, getElement } from '../../test/utils';
6
+ import { mount, dispatchEvent, wait, getElement } from '../../test/utils';
7
7
  import SearchDemo from '~/components/input/demos/search';
8
8
  import FrozenDemo from '~/components/input/demos/frozen';
9
9
  import AutoRowsDemo from '~/components/input/demos/autoRows';
10
10
  import PasswordDemo from '~/components/input/demos/password';
11
+ import AutoWidthDemo from '~/components/input/demos/autowidth';
11
12
  import { Input } from './';
12
13
  import { Dialog } from '../dialog';
13
14
  import { Component } from 'intact-vue-next';
14
15
  describe('Input', function () {
15
- afterEach(function () {
16
- unmount();
17
- });
16
+ // afterEach(() => {unmount()});
18
17
  it('basic test', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
19
18
  var _mount, instance, element, input;
20
19
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -238,4 +237,24 @@ describe('Input', function () {
238
237
  }
239
238
  }, _callee6);
240
239
  })));
240
+ it('autoWidth', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
241
+ var _mount7, instance, element, input;
242
+ return _regeneratorRuntime.wrap(function _callee7$(_context8) {
243
+ while (1) switch (_context8.prev = _context8.next) {
244
+ case 0:
245
+ // should expand when input spaces
246
+ _mount7 = mount(AutoWidthDemo), instance = _mount7[0], element = _mount7[1];
247
+ input = element.querySelector('input');
248
+ input.value = 'ab ';
249
+ dispatchEvent(input, 'input');
250
+ _context8.next = 6;
251
+ return wait(50);
252
+ case 6:
253
+ expect(input.offsetWidth).to.gt(16);
254
+ case 7:
255
+ case "end":
256
+ return _context8.stop();
257
+ }
258
+ }, _callee7);
259
+ })));
241
260
  });
@@ -133,7 +133,7 @@ export default function ($props, $blocks, $__proto__) {
133
133
  return block ? block.call($this, callBlock, data) : callBlock();
134
134
  }, __$blocks['suffix'](_$no))], 0, _$cn(k + "-input-suffix"), {
135
135
  'ev-click': stopPropagation
136
- }) : undefined, autoWidth ? _$ce(2, 'div', _$ce(2, 'span', !hasValue ? hasInputValue || !defaultValue ? placeholder : defaultValue : inputValue, 0, null, null, null, fakeRef), 2, _$cn(k + "-input-fake")) : undefined], 0, _$cn(k + "-input-wrapper"), {
136
+ }) : undefined, autoWidth ? _$ce(2, 'div', _$ce(2, 'pre', !hasValue ? hasInputValue || !defaultValue ? placeholder : defaultValue : inputValue, 0, null, null, null, fakeRef), 2, _$cn(k + "-input-fake")) : undefined], 0, _$cn(k + "-input-wrapper"), {
137
137
  'ev-click': focusInputOnClick
138
138
  })
139
139
  });
@@ -125,7 +125,7 @@ export var makeStyles = cache(function makeStyles(k) {
125
125
  return /*#__PURE__*/css("&.", k, "-", size, "{", sizeClassName, ";}");
126
126
  }), "&.", k, "-inline{.", k, "-input-wrapper{height:auto;border:none;border-radius:0;padding:0;}}&.", k, "-type-textarea{.", k, "-input-wrapper{display:inline-block;padding:0;height:auto;}.", k, "-textarea{width:100%;padding:", input.textareaPadding, ";line-height:1.5;vertical-align:top;}.", k, "-input-suffix{margin:0;justify-content:flex-end;}}", _mapInstanceProperty(_context = Input.typeDefs.resize).call(_context, function (type) {
127
127
  return /*#__PURE__*/css("&.", k, "-resize-", type, "{.", k, "-textarea{resize:", type, ";}}");
128
- }), ".", k, "-input-fake{left:0;top:0;position:absolute;overflow:hidden;visibility:hidden;white-space:nowrap;}&.", k, "-auto-width{width:auto;max-width:100%;}.", k, "-input-count{color:", input.count.color, ";}");
128
+ }), ".", k, "-input-fake{left:0;top:0;position:absolute;overflow:hidden;visibility:hidden;white-space:nowrap;pre{font-family:inherit;}}&.", k, "-auto-width{width:auto;max-width:100%;}.", k, "-input-count{color:", input.count.color, ";}");
129
129
  });
130
130
  export var makeSearchStyles = cache(function makeSearchStyles(k) {
131
131
  return /*#__PURE__*/css("position:relative;display:inline-block;.", k, "-input{transition:width ", input.transition, ";}.", k, "-btn{position:absolute;top:0;right:0;z-index:1;}&.", k, "-default .", k, "-btn:hover{background:transparent;}.", k, "-input-suffix{margin-right:", input.search.suffixMarginRight, ";}&.", k, "-hide{", _mapInstanceProperty(sizes).call(sizes, function (size) {
@@ -71,7 +71,8 @@ export default function ($props, $blocks, $__proto__) {
71
71
  'key': 'filter',
72
72
  'readonly': !show,
73
73
  'waveDisabled': true,
74
- 'flat': flat
74
+ 'flat': flat,
75
+ 'frozenOnInput': true
75
76
  }, 'filter', inputRef) : undefined;
76
77
  return _$cc(ErrorContext.Consumer, {
77
78
  'defaultValue': false,
@@ -122,7 +123,8 @@ export default function ($props, $blocks, $__proto__) {
122
123
  'key': 'input',
123
124
  'readonly': !show,
124
125
  'waveDisabled': true,
125
- 'flat': flat
126
+ 'flat': flat,
127
+ 'frozenOnInput': true
126
128
  }, 'input', inputRef) : !filterable && !hasValue ? _$ce(2, 'div', placeholder, 0, _$cn(k + "-select-placeholder c-ellipsis"), null, 'placeholder') : !multiple ? _$ce(2, 'div', (_$blocks['value'] = function ($super) {
127
129
  return label;
128
130
  }, __$blocks['value'] = function ($super, data) {
@@ -240,7 +240,19 @@ describe('Select', function () {
240
240
  return wait();
241
241
  case 50:
242
242
  expect(instance.get('day1')).to.eql('Wednesday');
243
- case 51:
243
+ // should input spaces
244
+ input1.click();
245
+ _context6.next = 54;
246
+ return wait();
247
+ case 54:
248
+ dispatchEvent(input1, 'focus');
249
+ input1.value = 'm ';
250
+ dispatchEvent(input1, 'input');
251
+ _context6.next = 59;
252
+ return wait();
253
+ case 59:
254
+ expect(input1.value).to.eql('m ');
255
+ case 60:
244
256
  case "end":
245
257
  return _context6.stop();
246
258
  }
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @king-design v3.4.5
2
+ * @king-design v3.5.0-beta.0
3
3
  *
4
4
  * Copyright (c) Kingsoft Cloud
5
5
  * Released under the MIT License
@@ -64,7 +64,7 @@ export * from './components/treeSelect';
64
64
  export * from './components/upload';
65
65
  export * from './components/view';
66
66
  export * from './components/wave';
67
- export declare const version = "3.4.5";
67
+ export declare const version = "3.5.0-beta.0";
68
68
 
69
69
 
70
70
  export {normalize} from 'intact-vue-next';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @king-design v3.4.5
2
+ * @king-design v3.5.0-beta.0
3
3
  *
4
4
  * Copyright (c) Kingsoft Cloud
5
5
  * Released under the MIT License
@@ -65,7 +65,7 @@ export * from './components/treeSelect';
65
65
  export * from './components/upload';
66
66
  export * from './components/view';
67
67
  export * from './components/wave';
68
- export var version = '3.4.5';
68
+ export var version = '3.5.0-beta.0';
69
69
  /* generate end */
70
70
 
71
71
  export {normalize} from 'intact-vue-next';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@king-design/vue",
3
- "version": "3.4.5",
3
+ "version": "3.5.0-beta.0",
4
4
  "description": "King-Design UI components for Vue3.0.",
5
5
  "keywords": [
6
6
  "component",
package/yarn-error.log CHANGED
@@ -1,8 +1,8 @@
1
1
  Arguments:
2
- /usr/local/bin/node /usr/local/Cellar/yarn/1.22.19/libexec/bin/yarn.js
2
+ /home/javey/.nvm/versions/node/v14.21.3/bin/node /usr/share/yarn/bin/yarn.js --registry=https://registry.npmjs.org
3
3
 
4
4
  PATH:
5
- /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/knightedge/bin
5
+ /tmp/yarn--1709196756448-0.38987287096922607:/home/javey/Workspaces/kpc/node_modules/.bin:/home/javey/.config/yarn/link/node_modules/.bin:/home/javey/.nvm/versions/node/v14.21.3/libexec/lib/node_modules/npm/bin/node-gyp-bin:/home/javey/.nvm/versions/node/v14.21.3/lib/node_modules/npm/bin/node-gyp-bin:/home/javey/.nvm/versions/node/v14.21.3/bin/node_modules/npm/bin/node-gyp-bin:/home/javey/.nvm/versions/node/v14.21.3/bin:/home/javey/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/javey/.yarn/bin:/home/javey/.local/bin:/home/javey/.yarn/bin:/home/javey/.local/bin
6
6
 
7
7
  Yarn version:
8
8
  1.22.19
@@ -11,18 +11,18 @@ Node version:
11
11
  14.21.3
12
12
 
13
13
  Platform:
14
- darwin x64
14
+ linux x64
15
15
 
16
16
  Trace:
17
- Error: https://registry.npmjs.org/intact-vue-next/-/intact-vue-next-3.0.34.tgz: ETIMEDOUT
18
- at Timeout._onTimeout (/usr/local/Cellar/yarn/1.22.19/libexec/lib/cli.js:141550:19)
17
+ Error: https://registry.npmjs.org/intact-vue-next: ETIMEDOUT
18
+ at Timeout._onTimeout (/usr/share/yarn/lib/cli.js:141550:19)
19
19
  at listOnTimeout (internal/timers.js:557:17)
20
20
  at processTimers (internal/timers.js:500:7)
21
21
 
22
22
  npm manifest:
23
23
  {
24
24
  "name": "@king-design/vue",
25
- "version": "3.3.0",
25
+ "version": "3.2.0",
26
26
  "description": "King-Design UI components for Vue3.0.",
27
27
  "keywords": [
28
28
  "component",
@@ -59,7 +59,7 @@ npm manifest:
59
59
  "@emotion/css": "^11.5.0",
60
60
  "dayjs": "^1.10.7",
61
61
  "enquire.js": "^2.1.6",
62
- "intact-vue-next": "3.0.34",
62
+ "intact-vue-next": "3.0.31",
63
63
  "monaco-editor": "^0.26.1",
64
64
  "mxgraphx": "^4.0.7",
65
65
  "resize-observer-polyfill": "^1.5.1",
@@ -67,7 +67,8 @@ npm manifest:
67
67
  "tslib": "^2.3.1"
68
68
  },
69
69
  "sideEffects": [
70
- "./styles/**/*"
70
+ "**/*/styles/global.*",
71
+ "**/*/styles/fonts/*"
71
72
  ],
72
73
  "devDependencies": {
73
74
  "@vue/babel-plugin-jsx": "^1.1.5",
@@ -708,30 +709,30 @@ Lockfile:
708
709
  parent-module "^1.0.0"
709
710
  resolve-from "^4.0.0"
710
711
 
711
- intact-shared@^3.0.34:
712
- version "3.0.34"
713
- resolved "https://registry.npmjs.org/intact-shared/-/intact-shared-3.0.34.tgz#ddaf0e098540d8e98bf49c5f378a33681f1c55a9"
714
- integrity sha512-pT8cpl7XDF7lYM6xWEoLwtf12sEysPjSfdmUr5DXaWvRm8cByg4dTxC+/+KQ0m3Umv0WE2vilQMixIh9hqe0Fg==
712
+ intact-shared@^3.0.30:
713
+ version "3.0.30"
714
+ resolved "https://registry.npmjs.org/intact-shared/-/intact-shared-3.0.30.tgz#ba07cad0f88a3ad6dfae4a2e3dd7c8bac0b1713b"
715
+ integrity sha512-Umk8DDJSNvGKnccSH3VhkHiaLEVabgAupFmDACMbT2pW8phjVRqJxTzTOeyCX+1NEPkxouEAvtNKPWngVsLquw==
715
716
 
716
- intact-vue-next@3.0.34:
717
- version "3.0.34"
718
- resolved "https://registry.npmjs.org/intact-vue-next/-/intact-vue-next-3.0.34.tgz#e9c4268c9be81900f590ec536df561ec70aa3a85"
719
- integrity sha512-nv9UUXZ72jfXflVbopTWb+oxrGw9aoIdguaMwnn8EzIhiNaA34zpRqhy8GXOUJCG85P9BCkZZfU1zD0LqMtVIQ==
717
+ intact-vue-next@3.0.30:
718
+ version "3.0.30"
719
+ resolved "https://registry.npmjs.org/intact-vue-next/-/intact-vue-next-3.0.30.tgz#6e5301d52b19bed602b434424502a311712f464e"
720
+ integrity sha512-MqRhCxS0j7T8x+dRsnPaDGRE+i7A6XJ7gpxtMa33IYCNsOY/a/mGNRT3cvXvjY43+OunwV5IrT6x4w/fwAiaPQ==
720
721
  dependencies:
721
- intact "^3.0.34"
722
- intact-shared "^3.0.34"
722
+ intact "^3.0.30"
723
+ intact-shared "^3.0.30"
723
724
  tslib "^2.3.1"
724
725
 
725
- intact@^3.0.34:
726
- version "3.0.34"
727
- resolved "https://registry.npmjs.org/intact/-/intact-3.0.34.tgz#9407202bd159f29d80792c26218b97b682cfae78"
728
- integrity sha512-j13WHChj5aJmw4+FSgMoEF/s67mnsq/fSA0LhSpmGYY6CChsBH6aPyQJUvEdYtjytZBCABvuJYgbcbyNHynb+w==
726
+ intact@^3.0.30:
727
+ version "3.0.30"
728
+ resolved "https://registry.npmjs.org/intact/-/intact-3.0.30.tgz#b6eff7635dddb2d351710853891799f5b32e2666"
729
+ integrity sha512-1hdp7oiELdVdeCCh8+CFlkGx5NoNe5HNE3Gaz84tt0DE17BS87rH6h3ByPChqYvEgfuvN8l2/Iobl5PNJWOuGQ==
729
730
  dependencies:
730
- intact-shared "^3.0.34"
731
- misstime "^3.0.34"
731
+ intact-shared "^3.0.30"
732
+ misstime "^3.0.30"
732
733
  tslib "^2.2.0"
733
- vdt "^3.0.34"
734
- vdt-compiler "^3.0.34"
734
+ vdt "^3.0.30"
735
+ vdt-compiler "^3.0.30"
735
736
 
736
737
  is-arrayish@^0.2.1:
737
738
  version "0.2.1"
@@ -807,12 +808,12 @@ Lockfile:
807
808
  resolved "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
808
809
  integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
809
810
 
810
- misstime@^3.0.34:
811
- version "3.0.34"
812
- resolved "https://registry.npmjs.org/misstime/-/misstime-3.0.34.tgz#462f6509d06e1e80e7622b0ffa96df5438bbb87d"
813
- integrity sha512-xO5ZHcG0cYkcWr7ZPquGFQWnZaMC5y4r1lKlFqCedLHFAAiV8SNEnj4bpFge8yTJJNO8LEXKOFWuE8WWpfy22g==
811
+ misstime@^3.0.30:
812
+ version "3.0.30"
813
+ resolved "https://registry.npmjs.org/misstime/-/misstime-3.0.30.tgz#59a307e3b099cf988e03eef25d67921ec2131db5"
814
+ integrity sha512-UoDxIiRZl0i4IOPyJpDLc/rxxPEU9Co3H5rwrZeTxrQFQBTbaP/JxUYJ76hnYqeSDOC9doN7jeSrHH+3oTqfig==
814
815
  dependencies:
815
- intact-shared "^3.0.34"
816
+ intact-shared "^3.0.30"
816
817
 
817
818
  monaco-editor@^0.26.1:
818
819
  version "0.26.1"
@@ -953,22 +954,22 @@ Lockfile:
953
954
  resolved "https://registry.npmmirror.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410"
954
955
  integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==
955
956
 
956
- vdt-compiler@^3.0.34:
957
- version "3.0.34"
958
- resolved "https://registry.npmjs.org/vdt-compiler/-/vdt-compiler-3.0.34.tgz#7110da7dc1e86a5a54987e9e07922cc25f46e0fb"
959
- integrity sha512-UFILLLLSg9SxXkiyGLdGbExOttTf5Tawpu07YFOxjRQJA5mpUWhus2+2RUbkNiWzr+9OJB7hZCwEWBKF+pQd1Q==
957
+ vdt-compiler@^3.0.30:
958
+ version "3.0.30"
959
+ resolved "https://registry.npmjs.org/vdt-compiler/-/vdt-compiler-3.0.30.tgz#557368a09ac602e2c5ef90fd421bc6c86f92df19"
960
+ integrity sha512-W8kAoGqz56+rauoJfhRDOFO1tV6RNPsZIXeCATWIgmv8+DnciJXU8WgrbqDW9IQbYCXrOnMGZZXaZJATPkNXGg==
960
961
  dependencies:
961
- intact-shared "^3.0.34"
962
- misstime "^3.0.34"
962
+ intact-shared "^3.0.30"
963
+ misstime "^3.0.30"
963
964
  tslib "^2.2.0"
964
965
 
965
- vdt@^3.0.34:
966
- version "3.0.34"
967
- resolved "https://registry.npmjs.org/vdt/-/vdt-3.0.34.tgz#b01df681dbd986ef0515ead3f0a8c060b840a327"
968
- integrity sha512-mGGTKgCTXZYHIlUYb2UsZxfp/n4sRLUP5XU+tA9l3qUXjvKeHz9tSsPdS4JdugvhTapaf8USTeE59e7SeMbzlA==
966
+ vdt@^3.0.30:
967
+ version "3.0.30"
968
+ resolved "https://registry.npmjs.org/vdt/-/vdt-3.0.30.tgz#12dbf2644a96cf2d6428cb1f17e02aa4076f7a98"
969
+ integrity sha512-HkkgHTDWHBiffZtVRnQb3rKs0p1/VoPkeMQH+5nbqYesAFhFOiF1jpvrQn6cRWZvcRsQMcJWNZT46V8t6eL8KQ==
969
970
  dependencies:
970
- intact-shared "^3.0.34"
971
- misstime "^3.0.34"
971
+ intact-shared "^3.0.30"
972
+ misstime "^3.0.30"
972
973
  tslib "^2.2.0"
973
974
 
974
975
  vue-loader@^16.1.2: