@varlet/ui 2.7.4 → 2.8.0-alpha.1676441771603

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 (55) hide show
  1. package/README.md +3 -1
  2. package/README.zh-CN.md +6 -4
  3. package/es/app-bar/AppBar.mjs +30 -6
  4. package/es/app-bar/appBar.css +1 -1
  5. package/es/app-bar/props.mjs +6 -0
  6. package/es/badge/Badge.mjs +3 -2
  7. package/es/card/Card.mjs +7 -2
  8. package/es/cell/Cell.mjs +59 -31
  9. package/es/cell/cell.css +1 -1
  10. package/es/cell/props.mjs +11 -0
  11. package/es/chip/Chip.mjs +9 -3
  12. package/es/col/Col.mjs +7 -2
  13. package/es/collapse/Collapse.mjs +2 -2
  14. package/es/ellipsis/Ellipsis.mjs +106 -0
  15. package/es/ellipsis/EllipsisSfc.css +0 -0
  16. package/es/ellipsis/ellipsis.css +1 -0
  17. package/es/ellipsis/index.mjs +8 -0
  18. package/es/ellipsis/props.mjs +16 -0
  19. package/es/ellipsis/style/index.mjs +4 -0
  20. package/es/image/Image.mjs +8 -3
  21. package/es/index.bundle.mjs +13 -1
  22. package/es/index.mjs +11 -1
  23. package/es/paper/Paper.mjs +55 -0
  24. package/es/paper/PaperSfc.css +0 -0
  25. package/es/paper/index.mjs +9 -0
  26. package/es/paper/paper.css +1 -0
  27. package/es/paper/props.mjs +28 -0
  28. package/es/paper/style/index.mjs +4 -0
  29. package/es/picker/Picker.mjs +4 -3
  30. package/es/ripple/index.mjs +2 -2
  31. package/es/row/Row.mjs +8 -3
  32. package/es/snackbar/style/index.mjs +1 -1
  33. package/es/style.css +1 -1
  34. package/es/style.mjs +2 -0
  35. package/es/tabs/Tabs.mjs +5 -4
  36. package/es/themes/dark/index.mjs +2 -1
  37. package/es/themes/dark/paper.mjs +3 -0
  38. package/es/tooltip/Tooltip.mjs +6 -1
  39. package/es/tooltip/props.mjs +4 -0
  40. package/es/tooltip/tooltip.css +1 -1
  41. package/es/varlet.esm.js +7674 -7409
  42. package/highlight/web-types.en-US.json +180 -3
  43. package/highlight/web-types.zh-CN.json +180 -3
  44. package/lib/style.css +1 -1
  45. package/lib/varlet.cjs.js +5739 -5425
  46. package/package.json +5 -5
  47. package/types/appBar.d.ts +2 -0
  48. package/types/cell.d.ts +4 -1
  49. package/types/ellipsis.d.ts +23 -0
  50. package/types/index.d.ts +4 -0
  51. package/types/paper.d.ts +25 -0
  52. package/types/snackbar.d.ts +0 -1
  53. package/types/tooltip.d.ts +1 -0
  54. package/umd/style.css +1 -1
  55. package/umd/varlet.js +6 -6
@@ -21,6 +21,7 @@ import Counter from './counter/index.mjs'
21
21
  import DatePicker from './date-picker/index.mjs'
22
22
  import Dialog from './dialog/index.mjs'
23
23
  import Divider from './divider/index.mjs'
24
+ import Ellipsis from './ellipsis/index.mjs'
24
25
  import Form from './form/index.mjs'
25
26
  import FormDetails from './form-details/index.mjs'
26
27
  import Icon from './icon/index.mjs'
@@ -39,6 +40,7 @@ import Menu from './menu/index.mjs'
39
40
  import Option from './option/index.mjs'
40
41
  import Overlay from './overlay/index.mjs'
41
42
  import Pagination from './pagination/index.mjs'
43
+ import Paper from './paper/index.mjs'
42
44
  import Picker from './picker/index.mjs'
43
45
  import Popup from './popup/index.mjs'
44
46
  import Progress from './progress/index.mjs'
@@ -94,6 +96,7 @@ export * from './counter/index.mjs'
94
96
  export * from './date-picker/index.mjs'
95
97
  export * from './dialog/index.mjs'
96
98
  export * from './divider/index.mjs'
99
+ export * from './ellipsis/index.mjs'
97
100
  export * from './form/index.mjs'
98
101
  export * from './form-details/index.mjs'
99
102
  export * from './icon/index.mjs'
@@ -112,6 +115,7 @@ export * from './menu/index.mjs'
112
115
  export * from './option/index.mjs'
113
116
  export * from './overlay/index.mjs'
114
117
  export * from './pagination/index.mjs'
118
+ export * from './paper/index.mjs'
115
119
  export * from './picker/index.mjs'
116
120
  export * from './popup/index.mjs'
117
121
  export * from './progress/index.mjs'
@@ -167,6 +171,7 @@ import './counter/style/index.mjs'
167
171
  import './date-picker/style/index.mjs'
168
172
  import './dialog/style/index.mjs'
169
173
  import './divider/style/index.mjs'
174
+ import './ellipsis/style/index.mjs'
170
175
  import './form/style/index.mjs'
171
176
  import './form-details/style/index.mjs'
172
177
  import './icon/style/index.mjs'
@@ -185,6 +190,7 @@ import './menu/style/index.mjs'
185
190
  import './option/style/index.mjs'
186
191
  import './overlay/style/index.mjs'
187
192
  import './pagination/style/index.mjs'
193
+ import './paper/style/index.mjs'
188
194
  import './picker/style/index.mjs'
189
195
  import './popup/style/index.mjs'
190
196
  import './progress/style/index.mjs'
@@ -217,7 +223,7 @@ import './time-picker/style/index.mjs'
217
223
  import './tooltip/style/index.mjs'
218
224
  import './uploader/style/index.mjs'
219
225
 
220
- const version = '2.7.4'
226
+ const version = '2.8.0-alpha.1676441771603'
221
227
 
222
228
  function install(app) {
223
229
  ActionSheet.install && app.use(ActionSheet)
@@ -243,6 +249,7 @@ function install(app) {
243
249
  DatePicker.install && app.use(DatePicker)
244
250
  Dialog.install && app.use(Dialog)
245
251
  Divider.install && app.use(Divider)
252
+ Ellipsis.install && app.use(Ellipsis)
246
253
  Form.install && app.use(Form)
247
254
  FormDetails.install && app.use(FormDetails)
248
255
  Icon.install && app.use(Icon)
@@ -261,6 +268,7 @@ function install(app) {
261
268
  Option.install && app.use(Option)
262
269
  Overlay.install && app.use(Overlay)
263
270
  Pagination.install && app.use(Pagination)
271
+ Paper.install && app.use(Paper)
264
272
  Picker.install && app.use(Picker)
265
273
  Popup.install && app.use(Popup)
266
274
  Progress.install && app.use(Progress)
@@ -320,6 +328,7 @@ export {
320
328
  DatePicker,
321
329
  Dialog,
322
330
  Divider,
331
+ Ellipsis,
323
332
  Form,
324
333
  FormDetails,
325
334
  Icon,
@@ -338,6 +347,7 @@ export {
338
347
  Option,
339
348
  Overlay,
340
349
  Pagination,
350
+ Paper,
341
351
  Picker,
342
352
  Popup,
343
353
  Progress,
@@ -397,6 +407,7 @@ export default {
397
407
  DatePicker,
398
408
  Dialog,
399
409
  Divider,
410
+ Ellipsis,
400
411
  Form,
401
412
  FormDetails,
402
413
  Icon,
@@ -415,6 +426,7 @@ export default {
415
426
  Option,
416
427
  Overlay,
417
428
  Pagination,
429
+ Paper,
418
430
  Picker,
419
431
  Popup,
420
432
  Progress,
package/es/index.mjs CHANGED
@@ -21,6 +21,7 @@ import Counter from './counter/index.mjs'
21
21
  import DatePicker from './date-picker/index.mjs'
22
22
  import Dialog from './dialog/index.mjs'
23
23
  import Divider from './divider/index.mjs'
24
+ import Ellipsis from './ellipsis/index.mjs'
24
25
  import Form from './form/index.mjs'
25
26
  import FormDetails from './form-details/index.mjs'
26
27
  import Icon from './icon/index.mjs'
@@ -39,6 +40,7 @@ import Menu from './menu/index.mjs'
39
40
  import Option from './option/index.mjs'
40
41
  import Overlay from './overlay/index.mjs'
41
42
  import Pagination from './pagination/index.mjs'
43
+ import Paper from './paper/index.mjs'
42
44
  import Picker from './picker/index.mjs'
43
45
  import Popup from './popup/index.mjs'
44
46
  import Progress from './progress/index.mjs'
@@ -94,6 +96,7 @@ export * from './counter/index.mjs'
94
96
  export * from './date-picker/index.mjs'
95
97
  export * from './dialog/index.mjs'
96
98
  export * from './divider/index.mjs'
99
+ export * from './ellipsis/index.mjs'
97
100
  export * from './form/index.mjs'
98
101
  export * from './form-details/index.mjs'
99
102
  export * from './icon/index.mjs'
@@ -112,6 +115,7 @@ export * from './menu/index.mjs'
112
115
  export * from './option/index.mjs'
113
116
  export * from './overlay/index.mjs'
114
117
  export * from './pagination/index.mjs'
118
+ export * from './paper/index.mjs'
115
119
  export * from './picker/index.mjs'
116
120
  export * from './popup/index.mjs'
117
121
  export * from './progress/index.mjs'
@@ -144,7 +148,7 @@ export * from './time-picker/index.mjs'
144
148
  export * from './tooltip/index.mjs'
145
149
  export * from './uploader/index.mjs'
146
150
 
147
- const version = '2.7.4'
151
+ const version = '2.8.0-alpha.1676441771603'
148
152
 
149
153
  function install(app) {
150
154
  ActionSheet.install && app.use(ActionSheet)
@@ -170,6 +174,7 @@ function install(app) {
170
174
  DatePicker.install && app.use(DatePicker)
171
175
  Dialog.install && app.use(Dialog)
172
176
  Divider.install && app.use(Divider)
177
+ Ellipsis.install && app.use(Ellipsis)
173
178
  Form.install && app.use(Form)
174
179
  FormDetails.install && app.use(FormDetails)
175
180
  Icon.install && app.use(Icon)
@@ -188,6 +193,7 @@ function install(app) {
188
193
  Option.install && app.use(Option)
189
194
  Overlay.install && app.use(Overlay)
190
195
  Pagination.install && app.use(Pagination)
196
+ Paper.install && app.use(Paper)
191
197
  Picker.install && app.use(Picker)
192
198
  Popup.install && app.use(Popup)
193
199
  Progress.install && app.use(Progress)
@@ -247,6 +253,7 @@ export {
247
253
  DatePicker,
248
254
  Dialog,
249
255
  Divider,
256
+ Ellipsis,
250
257
  Form,
251
258
  FormDetails,
252
259
  Icon,
@@ -265,6 +272,7 @@ export {
265
272
  Option,
266
273
  Overlay,
267
274
  Pagination,
275
+ Paper,
268
276
  Picker,
269
277
  Popup,
270
278
  Progress,
@@ -324,6 +332,7 @@ export default {
324
332
  DatePicker,
325
333
  Dialog,
326
334
  Divider,
335
+ Ellipsis,
327
336
  Form,
328
337
  FormDetails,
329
338
  Icon,
@@ -342,6 +351,7 @@ export default {
342
351
  Option,
343
352
  Overlay,
344
353
  Pagination,
354
+ Paper,
345
355
  Picker,
346
356
  Popup,
347
357
  Progress,
@@ -0,0 +1,55 @@
1
+ import Ripple from '../ripple/index.mjs';
2
+ import { defineComponent } from 'vue';
3
+ import { call, createNamespace } from '../utils/components.mjs';
4
+ import { props } from './props.mjs';
5
+ import { toSizeUnit } from '../utils/elements.mjs';
6
+ var {
7
+ n,
8
+ classes
9
+ } = createNamespace('paper');
10
+ import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives } from "vue";
11
+
12
+ function __render__(_ctx, _cache) {
13
+ var _directive_ripple = _resolveDirective("ripple");
14
+
15
+ return _withDirectives((_openBlock(), _createElementBlock("div", {
16
+ class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'), _ctx.n("$-elevation--" + _ctx.elevation), [_ctx.onClick, _ctx.n('--cursor')], [_ctx.round, _ctx.n('--round')], [_ctx.inline, _ctx.n('$--inline-flex')])),
17
+ style: _normalizeStyle({
18
+ width: _ctx.toSizeUnit(_ctx.width),
19
+ height: _ctx.toSizeUnit(_ctx.height),
20
+ 'border-radius': _ctx.toSizeUnit(_ctx.radius)
21
+ }),
22
+ onClick: _cache[0] || (_cache[0] = function () {
23
+ return _ctx.handleClick && _ctx.handleClick(...arguments);
24
+ })
25
+ }, [_renderSlot(_ctx.$slots, "default")], 6
26
+ /* CLASS, STYLE */
27
+ )), [[_directive_ripple, {
28
+ disabled: !_ctx.ripple
29
+ }]]);
30
+ }
31
+
32
+ var __sfc__ = defineComponent({
33
+ name: 'VarPaper',
34
+ directives: {
35
+ Ripple
36
+ },
37
+ props,
38
+
39
+ setup(props) {
40
+ var handleClick = e => {
41
+ call(props.onClick, e);
42
+ };
43
+
44
+ return {
45
+ n,
46
+ classes,
47
+ toSizeUnit,
48
+ handleClick
49
+ };
50
+ }
51
+
52
+ });
53
+
54
+ __sfc__.render = __render__;
55
+ export default __sfc__;
File without changes
@@ -0,0 +1,9 @@
1
+ import Paper from './Paper.mjs';
2
+
3
+ Paper.install = function (app) {
4
+ app.component(Paper.name, Paper);
5
+ };
6
+
7
+ export { props as paperProps } from './props.mjs';
8
+ export var _PaperComponent = Paper;
9
+ export default Paper;
@@ -0,0 +1 @@
1
+ :root { --paper-background: #fff;}.var-paper { background: var(--paper-background); transition: background-color 0.25s; overflow: hidden;}.var-paper--round { border-radius: 50%;}.var-paper--cursor { cursor: pointer;}
@@ -0,0 +1,28 @@
1
+ import { defineListenerProp } from '../utils/components.mjs';
2
+ export var props = {
3
+ elevation: {
4
+ type: [Number, String]
5
+ },
6
+ ripple: {
7
+ type: Boolean,
8
+ default: false
9
+ },
10
+ radius: {
11
+ type: [Number, String]
12
+ },
13
+ width: {
14
+ type: [Number, String]
15
+ },
16
+ height: {
17
+ type: [Number, String]
18
+ },
19
+ round: {
20
+ type: Boolean,
21
+ default: false
22
+ },
23
+ inline: {
24
+ type: Boolean,
25
+ default: false
26
+ },
27
+ onClick: defineListenerProp()
28
+ };
@@ -0,0 +1,4 @@
1
+ import '../../styles/common.css'
2
+ import '../../styles/elevation.css'
3
+ import '../paper.css'
4
+ import '../PaperSfc.css'
@@ -14,7 +14,7 @@ var {
14
14
  var MOMENTUM_RECORD_TIME = 300;
15
15
  var MOMENTUM_ALLOW_DISTANCE = 15;
16
16
  var sid = 0;
17
- import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, withModifiers as _withModifiers, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
17
+ import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, normalizeStyle as _normalizeStyle, withModifiers as _withModifiers, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
18
18
 
19
19
  var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
20
20
 
@@ -42,7 +42,8 @@ function __render__(_ctx, _cache) {
42
42
  }), {
43
43
  default: _withCtx(() => [_createElementVNode("div", _mergeProps({
44
44
  class: _ctx.n()
45
- }, _ctx.$attrs), [_createElementVNode("div", {
45
+ }, _ctx.$attrs), [_ctx.toolbar ? (_openBlock(), _createElementBlock("div", {
46
+ key: 0,
46
47
  class: _normalizeClass(_ctx.n('toolbar'))
47
48
  }, [_renderSlot(_ctx.$slots, "cancel", {}, () => [_createVNode(_component_var_button, {
48
49
  class: _normalizeClass(_ctx.n('cancel-button')),
@@ -80,7 +81,7 @@ function __render__(_ctx, _cache) {
80
81
  /* PROPS */
81
82
  , ["class", "text-color", "onClick"])])], 2
82
83
  /* CLASS */
83
- ), _createElementVNode("div", {
84
+ )) : _createCommentVNode("v-if", true), _createElementVNode("div", {
84
85
  class: _normalizeClass(_ctx.n('columns')),
85
86
  style: _normalizeStyle({
86
87
  height: _ctx.columnHeight + "px"
@@ -82,7 +82,7 @@ function createRipple(event) {
82
82
  }, 20);
83
83
  };
84
84
 
85
- _ripple.tasker = window.setTimeout(task, 60);
85
+ _ripple.tasker = window.setTimeout(task, 30);
86
86
  }
87
87
 
88
88
  function removeRipple() {
@@ -107,7 +107,7 @@ function removeRipple() {
107
107
  }, delay);
108
108
  };
109
109
 
110
- _ripple.tasker ? setTimeout(task, 60) : task();
110
+ _ripple.tasker ? setTimeout(task, 30) : task();
111
111
  }
112
112
 
113
113
  function forbidRippleTask() {
package/es/row/Row.mjs CHANGED
@@ -2,7 +2,7 @@ import { defineComponent, computed, watch } from 'vue';
2
2
  import { props } from './props.mjs';
3
3
  import { useCols } from './provide.mjs';
4
4
  import { toPxNum } from '../utils/elements.mjs';
5
- import { createNamespace } from '../utils/components.mjs';
5
+ import { call, createNamespace } from '../utils/components.mjs';
6
6
  var {
7
7
  n,
8
8
  classes
@@ -18,7 +18,7 @@ function __render__(_ctx, _cache) {
18
18
  margin: _ctx.average ? "0 -" + _ctx.average + "px" : undefined
19
19
  }),
20
20
  onClick: _cache[0] || (_cache[0] = function () {
21
- return _ctx.onClick && _ctx.onClick(...arguments);
21
+ return _ctx.handleClick && _ctx.handleClick(...arguments);
22
22
  })
23
23
  }, [_renderSlot(_ctx.$slots, "default")], 6
24
24
  /* CLASS, STYLE */
@@ -49,6 +49,10 @@ var __sfc__ = defineComponent({
49
49
  });
50
50
  };
51
51
 
52
+ var handleClick = e => {
53
+ call(props.onClick, e);
54
+ };
55
+
52
56
  var rowProvider = {
53
57
  computePadding
54
58
  };
@@ -58,7 +62,8 @@ var __sfc__ = defineComponent({
58
62
  return {
59
63
  n,
60
64
  classes,
61
- average
65
+ average,
66
+ handleClick
62
67
  };
63
68
  }
64
69
 
@@ -1,8 +1,8 @@
1
1
  import '../../styles/common.css'
2
- import '../SnackbarSfc.css'
3
2
  import '../../styles/elevation.css'
4
3
  import '../../loading/loading.css'
5
4
  import '../../button/button.css'
6
5
  import '../../icon/icon.css'
7
6
  import '../snackbar.css'
8
7
  import '../coreSfc.css'
8
+ import '../SnackbarSfc.css'