@varlet/ui 2.8.5-alpha.1677518578668 → 2.8.5

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.
package/es/col/Col.mjs CHANGED
@@ -2,7 +2,7 @@ import { defineComponent, ref, computed, watch } from 'vue';
2
2
  import { isPlainObject, toNumber } from '@varlet/shared';
3
3
  import { props } from './props.mjs';
4
4
  import { useRow } from './provide.mjs';
5
- import { toSizeUnit } from '../utils/elements.mjs';
5
+ import { padStartFlex, toSizeUnit } from '../utils/elements.mjs';
6
6
  import { createNamespace, call } from '../utils/components.mjs';
7
7
  var {
8
8
  n,
@@ -15,6 +15,8 @@ function __render__(_ctx, _cache) {
15
15
  class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'), [_ctx.span >= 0, _ctx.n("--span-" + _ctx.span)], [_ctx.offset, _ctx.n("--offset-" + _ctx.offset)], ..._ctx.getSize('xs', _ctx.xs), ..._ctx.getSize('sm', _ctx.sm), ..._ctx.getSize('md', _ctx.md), ..._ctx.getSize('lg', _ctx.lg), ..._ctx.getSize('xl', _ctx.xl))),
16
16
  style: _normalizeStyle({
17
17
  flexDirection: _ctx.direction,
18
+ justifyContent: _ctx.padStartFlex(_ctx.justify),
19
+ alignItems: _ctx.padStartFlex(_ctx.align),
18
20
  paddingLeft: _ctx.toSizeUnit(_ctx.padding.left),
19
21
  paddingRight: _ctx.toSizeUnit(_ctx.padding.right)
20
22
  }),
@@ -86,7 +88,8 @@ var __sfc__ = defineComponent({
86
88
  getSize,
87
89
  span,
88
90
  offset,
89
- handleClick
91
+ handleClick,
92
+ padStartFlex
90
93
  };
91
94
  }
92
95
 
package/es/col/props.mjs CHANGED
@@ -4,6 +4,14 @@ function directionValidator(direction) {
4
4
  return ['row', 'column'].includes(direction);
5
5
  }
6
6
 
7
+ function justifyValidator(justify) {
8
+ return ['start', 'end', 'center', 'space-around', 'space-between', 'flex-start', 'flex-end'].includes(justify);
9
+ }
10
+
11
+ function alignValidator(align) {
12
+ return ['stretch', 'center', 'start', 'end', 'baseline', 'initial', 'inherit', 'flex-start', 'flex-end'].includes(align);
13
+ }
14
+
7
15
  export var props = {
8
16
  span: {
9
17
  type: [String, Number],
@@ -18,6 +26,14 @@ export var props = {
18
26
  default: 'row',
19
27
  validator: directionValidator
20
28
  },
29
+ justify: {
30
+ type: String,
31
+ validator: justifyValidator
32
+ },
33
+ align: {
34
+ type: String,
35
+ validator: alignValidator
36
+ },
21
37
  xs: {
22
38
  type: [Object, Number, String]
23
39
  },
@@ -235,7 +235,7 @@ import './time-picker/style/index.mjs'
235
235
  import './tooltip/style/index.mjs'
236
236
  import './uploader/style/index.mjs'
237
237
 
238
- const version = '2.8.5-alpha.1677518578668'
238
+ const version = '2.8.5'
239
239
 
240
240
  function install(app) {
241
241
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -156,7 +156,7 @@ export * from './time-picker/index.mjs'
156
156
  export * from './tooltip/index.mjs'
157
157
  export * from './uploader/index.mjs'
158
158
 
159
- const version = '2.8.5-alpha.1677518578668'
159
+ const version = '2.8.5'
160
160
 
161
161
  function install(app) {
162
162
  ActionSheet.install && app.use(ActionSheet)
package/es/row/Row.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, watch } from 'vue';
2
2
  import { props } from './props.mjs';
3
3
  import { useCols } from './provide.mjs';
4
- import { toPxNum } from '../utils/elements.mjs';
4
+ import { toPxNum, padStartFlex } from '../utils/elements.mjs';
5
5
  import { call, createNamespace } from '../utils/components.mjs';
6
6
  var {
7
7
  n,
@@ -13,8 +13,8 @@ function __render__(_ctx, _cache) {
13
13
  return _openBlock(), _createElementBlock("div", {
14
14
  class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'))),
15
15
  style: _normalizeStyle({
16
- justifyContent: _ctx.justify,
17
- alignItems: _ctx.align,
16
+ justifyContent: _ctx.padStartFlex(_ctx.justify),
17
+ alignItems: _ctx.padStartFlex(_ctx.align),
18
18
  margin: _ctx.average ? "0 -" + _ctx.average + "px" : undefined
19
19
  }),
20
20
  onClick: _cache[0] || (_cache[0] = function () {
@@ -63,7 +63,8 @@ var __sfc__ = defineComponent({
63
63
  n,
64
64
  classes,
65
65
  average,
66
- handleClick
66
+ handleClick,
67
+ padStartFlex
67
68
  };
68
69
  }
69
70
 
package/es/row/props.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import { defineListenerProp } from '../utils/components.mjs';
2
2
 
3
3
  function justifyValidator(justify) {
4
- return ['flex-start', 'flex-end', 'center', 'space-between', 'space-around'].includes(justify);
4
+ return ['flex-start', 'flex-end', 'start', 'end', 'center', 'space-between', 'space-around'].includes(justify);
5
5
  }
6
6
 
7
7
  function alignValidator(align) {
8
- return ['flex-start', 'center', 'flex-end'].includes(align);
8
+ return ['flex-start', 'center', 'flex-end', 'start', 'end'].includes(align);
9
9
  }
10
10
 
11
11
  export var props = {
@@ -1,8 +1,8 @@
1
1
  import '../../styles/common.css'
2
+ import '../SnackbarSfc.css'
2
3
  import '../../styles/elevation.css'
3
4
  import '../../loading/loading.css'
4
5
  import '../../button/button.css'
5
6
  import '../../icon/icon.css'
6
7
  import '../snackbar.css'
7
8
  import '../coreSfc.css'
8
- import '../SnackbarSfc.css'
@@ -3,7 +3,7 @@ import { defineComponent, Fragment, Comment } from 'vue';
3
3
  import { internalSizeValidator, props } from './props.mjs';
4
4
  import { isArray } from '@varlet/shared';
5
5
  import { call, createNamespace } from '../utils/components.mjs';
6
- import { toSizeUnit } from '../utils/elements.mjs';
6
+ import { padStartFlex, toSizeUnit } from '../utils/elements.mjs';
7
7
  import { computeMargin } from './margin.mjs';
8
8
 
9
9
 
@@ -24,10 +24,6 @@ export default defineComponent({
24
24
  return isInternalSize ? ["var(--space-size-" + size + "-y)", "var(--space-size-" + size + "-x)"] : isArray(size) ? size.map(toSizeUnit) : [toSizeUnit(size), toSizeUnit(size)];
25
25
  };
26
26
 
27
- var padStartFlex = style => {
28
- return style === 'start' || style === 'end' ? "flex-" + style : style;
29
- };
30
-
31
27
  return () => {
32
28
  var _call;
33
29
 
@@ -11,7 +11,7 @@ export function computeMargin(y, x, options) {
11
11
  var margin = '0';
12
12
 
13
13
  if (direction === 'row') {
14
- if (justify === 'start' || justify === 'center' || justify === 'end') {
14
+ if (['flex-start', 'center', 'flex-end', 'start', 'end'].includes(justify)) {
15
15
  if (index !== lastIndex) {
16
16
  margin = half(y) + " " + x + " " + half(y) + " 0";
17
17
  } else {
@@ -5,13 +5,14 @@ export var sizeValidator = size => {
5
5
  };
6
6
 
7
7
  var justifyValidator = justify => {
8
- return ['start', 'end', 'center', 'space-around', 'space-between'].includes(justify);
8
+ return ['start', 'end', 'center', 'space-around', 'space-between', 'flex-start', 'flex-end'].includes(justify);
9
+ };
10
+
11
+ var alignValidator = align => {
12
+ return ['stretch', 'center', 'start', 'end', 'baseline', 'flex-start', 'flex-end'].includes(align);
9
13
  };
10
14
 
11
15
  export var props = {
12
- align: {
13
- type: String
14
- },
15
16
  size: {
16
17
  type: [String, Number, Array],
17
18
  default: 'normal',
@@ -27,9 +28,13 @@ export var props = {
27
28
  },
28
29
  justify: {
29
30
  type: String,
30
- default: 'start',
31
+ default: 'flex-start',
31
32
  validator: justifyValidator
32
33
  },
34
+ align: {
35
+ type: String,
36
+ validator: alignValidator
37
+ },
33
38
  inline: {
34
39
  type: Boolean,
35
40
  default: false
@@ -241,4 +241,7 @@ export function formatStyleVars(styleVars) {
241
241
  export function supportTouch() {
242
242
  var inBrowser = typeof window !== 'undefined';
243
243
  return inBrowser && 'ontouchstart' in window;
244
+ }
245
+ export function padStartFlex(style) {
246
+ return style === 'start' || style === 'end' ? "flex-" + style : style;
244
247
  }