@varlet/ui 2.8.5-alpha.1677482594728 → 2.8.5-alpha.1677567613819
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 +5 -2
- package/es/col/props.mjs +16 -0
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/row/Row.mjs +5 -4
- package/es/row/props.mjs +2 -2
- package/es/space/Space.mjs +1 -5
- package/es/space/margin.mjs +1 -1
- package/es/space/props.mjs +10 -5
- package/es/step/step.css +1 -1
- package/es/style.css +1 -1
- package/es/utils/elements.mjs +3 -0
- package/es/varlet.esm.js +3002 -2980
- package/highlight/web-types.en-US.json +33 -15
- package/highlight/web-types.zh-CN.json +33 -15
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +40 -18
- package/package.json +5 -5
- package/types/col.d.ts +15 -0
- package/types/row.d.ts +2 -2
- package/types/space.d.ts +2 -2
- package/umd/varlet.js +6 -6
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
|
},
|
package/es/index.bundle.mjs
CHANGED
|
@@ -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.
|
|
238
|
+
const version = '2.8.5-alpha.1677567613819'
|
|
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.
|
|
159
|
+
const version = '2.8.5-alpha.1677567613819'
|
|
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 = {
|
package/es/space/Space.mjs
CHANGED
|
@@ -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
|
|
package/es/space/margin.mjs
CHANGED
|
@@ -11,7 +11,7 @@ export function computeMargin(y, x, options) {
|
|
|
11
11
|
var margin = '0';
|
|
12
12
|
|
|
13
13
|
if (direction === 'row') {
|
|
14
|
-
if (
|
|
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 {
|
package/es/space/props.mjs
CHANGED
|
@@ -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
|
package/es/step/step.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --step-tag-size: 20px; --step-tag-background: #9e9e9e; --step-tag-font-size: var(--font-size-md); --step-tag-color: #fff; --step-tag-active-color: var(--color-primary); --step-tag-margin: 4px 0; --step-tag-icon-size: var(--font-size-lg); --step-content-font-size: var(--font-size-md); --step-content-color: rgba(0, 0, 0, 0.38); --step-content-active-color: #000; --step-line-background: #000; --step-vertical-min-height: 30px; --step-vertical-tag-margin: 0 4px; --step-vertical-line-height: calc(100% - 30px); --step-vertical-line-min-height: 20px;}.tag { width: var(--step-tag-size); height: var(--step-tag-size); background: var(--step-tag-background); display: flex; font-size: var(--step-tag-font-size); align-items: center; justify-content: center; border-radius: 50%; color: var(--step-tag-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.content { font-size: var(--step-content-font-size); color: var(--step-content-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step { display: flex; position: relative; flex: 1; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-step__horizontal { display: flex; width: 100%;}.var-step__horizontal-main { display: flex; flex-direction: column; align-items: center; flex-basis: 100%;}.var-step__horizontal-tag { margin: var(--step-tag-margin); width: var(--step-tag-size); height: var(--step-tag-size); background: var(--step-tag-background); display: flex; font-size: var(--step-tag-font-size); align-items: center; justify-content: center; border-radius: 50%; color: var(--step-tag-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step__horizontal-tag--active { background: var(--step-tag-active-color);}.var-step__horizontal-content { font-size: var(--step-content-font-size); color: var(--step-content-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step__horizontal-content--active { color: var(--step-content-active-color);}.var-step__horizontal-line { position: relative; top: 14px; flex: 1; height: 1px; transform: scaleY(0.5); background: var(--step-line-background);}.var-step__vertical { width: 100%;}.var-step__vertical-main { display: flex; align-items: flex-start; min-height: var(--step-vertical-min-height);}.var-step__vertical-tag { margin: var(--step-vertical-tag-margin); width: var(--step-tag-size); height: var(--step-tag-size); background: var(--step-tag-background); display: flex; font-size: var(--step-tag-font-size); align-items: center; justify-content: center; border-radius: 50%; color: var(--step-tag-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step__vertical-tag--active { background: var(--step-tag-active-color);}.var-step__vertical-content { font-size: var(--step-content-font-size); color: var(--step-content-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step__vertical-content--active { color: var(--step-content-active-color);}.var-step__vertical-line { position: relative; height: var(--step-vertical-line-height); left: 14px; top: calc(-100% + 45px); min-height: var(--step-vertical-line-min-height); width: 1px; transform: scaleX(0.5); background: var(--step-line-background);}.var-step__icon[var-step-cover] { font-size: var(--step-tag-icon-size);}
|
|
1
|
+
:root { --step-tag-size: 20px; --step-tag-background: #9e9e9e; --step-tag-font-size: var(--font-size-md); --step-tag-color: #fff; --step-tag-active-color: var(--color-primary); --step-tag-margin: 4px 0; --step-tag-icon-size: var(--font-size-lg); --step-content-font-size: var(--font-size-md); --step-content-color: rgba(0, 0, 0, 0.38); --step-content-active-color: #000; --step-line-background: #000; --step-vertical-min-height: 30px; --step-vertical-tag-margin: 0 4px; --step-vertical-line-height: calc(100% - 30px); --step-vertical-line-min-height: 20px;}.tag { width: var(--step-tag-size); height: var(--step-tag-size); background: var(--step-tag-background); display: flex; font-size: var(--step-tag-font-size); align-items: center; justify-content: center; border-radius: 50%; color: var(--step-tag-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.content { font-size: var(--step-content-font-size); color: var(--step-content-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step { display: flex; position: relative; flex: 1; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-step__horizontal { display: flex; width: 100%;}.var-step__horizontal-main { display: flex; flex-direction: column; align-items: center; flex-basis: 100%;}.var-step__horizontal-tag { margin: var(--step-tag-margin); width: var(--step-tag-size); height: var(--step-tag-size); background: var(--step-tag-background); display: flex; font-size: var(--step-tag-font-size); align-items: center; justify-content: center; border-radius: 50%; color: var(--step-tag-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step__horizontal-tag--active { background: var(--step-tag-active-color);}.var-step__horizontal-content { font-size: var(--step-content-font-size); color: var(--step-content-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step__horizontal-content--active { color: var(--step-content-active-color);}.var-step__horizontal-line { position: relative; top: 14px; flex: 1; height: 1px; transform: scaleY(0.5); background: var(--step-line-background);}.var-step__vertical { width: 100%;}.var-step__vertical-main { display: flex; align-items: flex-start; min-height: var(--step-vertical-min-height);}.var-step__vertical-tag { flex-shrink: 0; margin: var(--step-vertical-tag-margin); width: var(--step-tag-size); height: var(--step-tag-size); background: var(--step-tag-background); display: flex; font-size: var(--step-tag-font-size); align-items: center; justify-content: center; border-radius: 50%; color: var(--step-tag-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step__vertical-tag--active { background: var(--step-tag-active-color);}.var-step__vertical-content { font-size: var(--step-content-font-size); color: var(--step-content-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step__vertical-content--active { color: var(--step-content-active-color);}.var-step__vertical-line { position: relative; height: var(--step-vertical-line-height); left: 14px; top: calc(-100% + 45px); min-height: var(--step-vertical-line-min-height); width: 1px; transform: scaleX(0.5); background: var(--step-line-background);}.var-step__icon[var-step-cover] { font-size: var(--step-tag-icon-size);}
|