@varlet/ui 2.2.1-alpha.1668396604067 → 2.3.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.
Files changed (108) hide show
  1. package/es/action-sheet/ActionSheet.js +1 -1
  2. package/es/app-bar/AppBar.js +1 -1
  3. package/es/badge/Badge.js +5 -3
  4. package/es/button/Button.js +1 -1
  5. package/es/button/button.css +1 -1
  6. package/es/button/props.js +1 -2
  7. package/es/card/Card.js +3 -3
  8. package/es/cell/Cell.js +0 -1
  9. package/es/chip/Chip.js +6 -4
  10. package/es/chip/chip.css +1 -1
  11. package/es/col/Col.js +1 -1
  12. package/es/counter/Counter.js +2 -2
  13. package/es/date-picker/DatePicker.js +1 -1
  14. package/es/dialog/Dialog.js +1 -1
  15. package/es/divider/Divider.js +1 -1
  16. package/es/image/Image.js +1 -1
  17. package/es/image-preview/ImagePreview.js +3 -3
  18. package/es/index-anchor/IndexAnchor.js +1 -1
  19. package/es/index.js +5 -0
  20. package/es/input/Input.js +2 -2
  21. package/es/link/Link.js +102 -0
  22. package/es/link/LinkSfc.css +0 -0
  23. package/es/link/index.js +8 -0
  24. package/es/link/link.css +1 -0
  25. package/es/link/props.js +50 -0
  26. package/es/link/style/index.js +3 -0
  27. package/es/list/List.js +1 -1
  28. package/es/loading/Loading.js +1 -1
  29. package/es/menu/Menu.js +1 -1
  30. package/es/option/Option.js +2 -2
  31. package/es/pagination/Pagination.js +3 -3
  32. package/es/picker/Picker.js +1 -1
  33. package/es/popup/Popup.js +4 -4
  34. package/es/pull-refresh/PullRefresh.js +1 -1
  35. package/es/row/Row.js +1 -1
  36. package/es/select/Select.js +3 -3
  37. package/es/skeleton/Skeleton.js +1 -1
  38. package/es/slider/Slider.js +1 -1
  39. package/es/snackbar/core.js +1 -1
  40. package/es/space/Space.js +2 -4
  41. package/es/style.css +1 -1
  42. package/es/style.js +1 -0
  43. package/es/switch/Switch.js +1 -1
  44. package/es/tab/Tab.js +2 -2
  45. package/es/table/Table.js +1 -1
  46. package/es/tabs/Tabs.js +2 -2
  47. package/es/time-picker/TimePicker.js +1 -1
  48. package/es/umdIndex.js +5 -0
  49. package/es/uploader/Uploader.js +3 -3
  50. package/es/utils/components.js +9 -3
  51. package/es/varlet.esm.js +3772 -3650
  52. package/highlight/attributes.json +38 -2
  53. package/highlight/tags.json +13 -0
  54. package/highlight/web-types.json +101 -3
  55. package/lib/action-sheet/ActionSheet.js +1 -1
  56. package/lib/app-bar/AppBar.js +1 -1
  57. package/lib/badge/Badge.js +5 -3
  58. package/lib/button/Button.js +1 -1
  59. package/lib/button/button.css +1 -1
  60. package/lib/button/props.js +1 -2
  61. package/lib/card/Card.js +3 -3
  62. package/lib/cell/Cell.js +0 -1
  63. package/lib/chip/Chip.js +6 -4
  64. package/lib/chip/chip.css +1 -1
  65. package/lib/col/Col.js +1 -1
  66. package/lib/counter/Counter.js +2 -2
  67. package/lib/date-picker/DatePicker.js +1 -1
  68. package/lib/dialog/Dialog.js +1 -1
  69. package/lib/divider/Divider.js +1 -1
  70. package/lib/image/Image.js +1 -1
  71. package/lib/image-preview/ImagePreview.js +3 -3
  72. package/lib/index-anchor/IndexAnchor.js +1 -1
  73. package/lib/index.js +3 -0
  74. package/lib/input/Input.js +2 -2
  75. package/lib/link/Link.js +115 -0
  76. package/lib/link/LinkSfc.css +0 -0
  77. package/lib/link/index.js +17 -0
  78. package/lib/link/link.css +1 -0
  79. package/lib/link/props.js +56 -0
  80. package/lib/link/style/index.js +3 -0
  81. package/lib/list/List.js +1 -1
  82. package/lib/loading/Loading.js +1 -1
  83. package/lib/menu/Menu.js +1 -1
  84. package/lib/option/Option.js +2 -2
  85. package/lib/pagination/Pagination.js +3 -3
  86. package/lib/picker/Picker.js +1 -1
  87. package/lib/popup/Popup.js +4 -4
  88. package/lib/pull-refresh/PullRefresh.js +1 -1
  89. package/lib/row/Row.js +1 -1
  90. package/lib/select/Select.js +3 -3
  91. package/lib/skeleton/Skeleton.js +1 -1
  92. package/lib/slider/Slider.js +1 -1
  93. package/lib/snackbar/core.js +1 -1
  94. package/lib/snackbar/style/index.js +1 -1
  95. package/lib/space/Space.js +2 -4
  96. package/lib/style.css +1 -1
  97. package/lib/style.js +1 -0
  98. package/lib/switch/Switch.js +1 -1
  99. package/lib/tab/Tab.js +2 -2
  100. package/lib/table/Table.js +1 -1
  101. package/lib/tabs/Tabs.js +2 -2
  102. package/lib/time-picker/TimePicker.js +1 -1
  103. package/lib/uploader/Uploader.js +3 -3
  104. package/lib/utils/components.js +9 -3
  105. package/package.json +7 -7
  106. package/types/index.d.ts +2 -0
  107. package/types/link.d.ts +30 -0
  108. package/umd/varlet.js +7 -7
@@ -35,7 +35,7 @@ export function render(_ctx, _cache) {
35
35
  return _ctx.touchEnd && _ctx.touchEnd(...arguments);
36
36
  })
37
37
  }, [_createElementVNode("div", {
38
- class: _normalizeClass(_ctx.classes(_ctx.n('control'), 'var-elevation--2', [_ctx.isSuccess, _ctx.n('control-success')])),
38
+ class: _normalizeClass(_ctx.classes(_ctx.n('control'), _ctx.n('$-elevation--2'), [_ctx.isSuccess, _ctx.n('control-success')])),
39
39
  style: _normalizeStyle(_ctx.controlStyle)
40
40
  }, [_createVNode(_component_var_icon, {
41
41
  name: _ctx.iconName,
package/es/row/Row.js CHANGED
@@ -10,7 +10,7 @@ var {
10
10
  import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
11
11
  export function render(_ctx, _cache) {
12
12
  return _openBlock(), _createElementBlock("div", {
13
- class: _normalizeClass(_ctx.classes(_ctx.n(), 'var--box')),
13
+ class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'))),
14
14
  style: _normalizeStyle({
15
15
  justifyContent: _ctx.justify,
16
16
  alignItems: _ctx.align,
@@ -33,7 +33,7 @@ export function render(_ctx, _cache) {
33
33
  var _component_var_form_details = _resolveComponent("var-form-details");
34
34
 
35
35
  return _openBlock(), _createElementBlock("div", {
36
- class: _normalizeClass(_ctx.classes(_ctx.n(), 'var--box', [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')])),
36
+ class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'), [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')])),
37
37
  onClick: _cache[3] || (_cache[3] = function () {
38
38
  return _ctx.handleClick && _ctx.handleClick(...arguments);
39
39
  })
@@ -64,7 +64,7 @@ export function render(_ctx, _cache) {
64
64
  }, {
65
65
  menu: _withCtx(() => [_createElementVNode("div", {
66
66
  ref: "menuEl",
67
- class: _normalizeClass(_ctx.classes(_ctx.n('scroller'), 'var-elevation--3'))
67
+ class: _normalizeClass(_ctx.classes(_ctx.n('scroller'), _ctx.n('$-elevation--3')))
68
68
  }, [_renderSlot(_ctx.$slots, "default")], 2
69
69
  /* CLASS */
70
70
  )]),
@@ -120,7 +120,7 @@ export function render(_ctx, _cache) {
120
120
  , ["class"])])], 6
121
121
  /* CLASS, STYLE */
122
122
  ), _createElementVNode("label", {
123
- class: _normalizeClass(_ctx.classes(_ctx.n('placeholder'), 'var--ellipsis', [_ctx.isFocus, _ctx.n('--focus')], [_ctx.errorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')], _ctx.computePlaceholderState(), [!_ctx.hint, _ctx.n('--placeholder-non-hint')])),
123
+ class: _normalizeClass(_ctx.classes(_ctx.n('placeholder'), _ctx.n('$--ellipsis'), [_ctx.isFocus, _ctx.n('--focus')], [_ctx.errorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')], _ctx.computePlaceholderState(), [!_ctx.hint, _ctx.n('--placeholder-non-hint')])),
124
124
  style: _normalizeStyle({
125
125
  color: !_ctx.errorMessage ? _ctx.isFocus ? _ctx.focusColor : _ctx.blurColor : undefined
126
126
  })
@@ -10,7 +10,7 @@ var {
10
10
  import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, renderList as _renderList, Fragment as _Fragment } from "vue";
11
11
  export function render(_ctx, _cache) {
12
12
  return _openBlock(), _createElementBlock("div", {
13
- class: _normalizeClass(_ctx.classes('var--box', _ctx.n()))
13
+ class: _normalizeClass(_ctx.classes(_ctx.n('$--box'), _ctx.n()))
14
14
  }, [!_ctx.loading ? (_openBlock(), _createElementBlock("div", {
15
15
  key: 0,
16
16
  class: _normalizeClass(_ctx.n('data'))
@@ -291,7 +291,7 @@ export default defineComponent({
291
291
 
292
292
  var click = event => {
293
293
  if (isDisabled.value || isReadonly.value) return;
294
- if (event.target.closest('.var-slider__thumb')) return;
294
+ if (event.target.closest("." + n('thumb'))) return;
295
295
  var offset = event.clientX - getLeft(event.currentTarget);
296
296
  var type = getType(offset);
297
297
  setPercent(offset, type);
@@ -30,7 +30,7 @@ export function render(_ctx, _cache) {
30
30
  zIndex: _ctx.zIndex
31
31
  })
32
32
  }, [_createElementVNode("div", {
33
- class: _normalizeClass(_ctx.classes(_ctx.n('wrapper'), _ctx.n("wrapper-" + _ctx.position), 'var-elevation--4', [_ctx.vertical, _ctx.n('vertical')], [_ctx.type && _ctx.SNACKBAR_TYPE.includes(_ctx.type), _ctx.n("wrapper-" + _ctx.type)])),
33
+ class: _normalizeClass(_ctx.classes(_ctx.n('wrapper'), _ctx.n("wrapper-" + _ctx.position), _ctx.n('$-elevation--4'), [_ctx.vertical, _ctx.n('vertical')], [_ctx.type && _ctx.SNACKBAR_TYPE.includes(_ctx.type), _ctx.n("wrapper-" + _ctx.type)])),
34
34
  style: _normalizeStyle({
35
35
  zIndex: _ctx.zIndex
36
36
  })
package/es/space/Space.js CHANGED
@@ -68,7 +68,6 @@ export default defineComponent({
68
68
  children = flatten(children);
69
69
  var lastIndex = children.length - 1;
70
70
  var spacers = children.map((child, index) => {
71
- var width = direction === 'row' ? undefined : '100%';
72
71
  var margin = '0';
73
72
 
74
73
  if (direction === 'row') {
@@ -97,13 +96,12 @@ export default defineComponent({
97
96
 
98
97
  return _createVNode("div", {
99
98
  "style": {
100
- margin,
101
- width
99
+ margin
102
100
  }
103
101
  }, [child]);
104
102
  });
105
103
  return _createVNode("div", {
106
- "class": classes(n(), 'var--box', [inline, n('--inline')]),
104
+ "class": classes(n(), n('$--box'), [inline, n('--inline')]),
107
105
  "style": {
108
106
  flexDirection: direction,
109
107
  justifyContent: padStartFlex(justify),