@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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "2.8.5-alpha.1677518578668",
4
+ "version": "2.8.5",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -1530,6 +1530,24 @@
1530
1530
  "kind": "expression"
1531
1531
  }
1532
1532
  },
1533
+ {
1534
+ "name": "justify",
1535
+ "description": "Main axis arrangement, Can be set to `flex-start` `flex-end` `center` `space-around` `space-between`",
1536
+ "default": "-",
1537
+ "value": {
1538
+ "type": "string",
1539
+ "kind": "expression"
1540
+ }
1541
+ },
1542
+ {
1543
+ "name": "align",
1544
+ "description": "Cross axis arrangement, Can be set to `stretch` `center` `flex-start` `flex-end` `baseline`",
1545
+ "default": "-",
1546
+ "value": {
1547
+ "type": "string",
1548
+ "kind": "expression"
1549
+ }
1550
+ },
1533
1551
  {
1534
1552
  "name": "xs",
1535
1553
  "description": "`<768px` Responsive columns or column props object",
@@ -5172,9 +5190,9 @@
5172
5190
  "name": "var-space",
5173
5191
  "attributes": [
5174
5192
  {
5175
- "name": "align",
5176
- "description": "Vertical arrangement, Can be set to `stretch` `center` `start` `end` `baseline`",
5177
- "default": "-",
5193
+ "name": "direction",
5194
+ "description": "Layout direction, Can be set to `row` `column`",
5195
+ "default": "row",
5178
5196
  "value": {
5179
5197
  "type": "string",
5180
5198
  "kind": "expression"
@@ -5182,8 +5200,17 @@
5182
5200
  },
5183
5201
  {
5184
5202
  "name": "justify",
5185
- "description": "Horizontal arrangement, Can be set to `start` `end` `center` `space-around` `space-between`",
5186
- "default": "start",
5203
+ "description": "Main axis arrangement, Can be set to `flex-start` `flex-end` `center` `space-around` `space-between`",
5204
+ "default": "flex-start",
5205
+ "value": {
5206
+ "type": "string",
5207
+ "kind": "expression"
5208
+ }
5209
+ },
5210
+ {
5211
+ "name": "align",
5212
+ "description": "Cross axis arrangement, Can be set to `stretch` `center` `flex-start` `flex-end` `baseline`",
5213
+ "default": "-",
5187
5214
  "value": {
5188
5215
  "type": "string",
5189
5216
  "kind": "expression"
@@ -5207,15 +5234,6 @@
5207
5234
  "kind": "expression"
5208
5235
  }
5209
5236
  },
5210
- {
5211
- "name": "direction",
5212
- "description": "Layout direction, Can be set to `row` `column`",
5213
- "default": "row",
5214
- "value": {
5215
- "type": "string",
5216
- "kind": "expression"
5217
- }
5218
- },
5219
5237
  {
5220
5238
  "name": "inline",
5221
5239
  "description": "Is it an inline element",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "2.8.5-alpha.1677518578668",
4
+ "version": "2.8.5",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -1590,6 +1590,24 @@
1590
1590
  "kind": "expression"
1591
1591
  }
1592
1592
  },
1593
+ {
1594
+ "name": "justify",
1595
+ "description": "主轴排列方式 可选值为 `flex-start` `flex-end` `center` `space-around` `space-between`",
1596
+ "default": "-",
1597
+ "value": {
1598
+ "type": "string",
1599
+ "kind": "expression"
1600
+ }
1601
+ },
1602
+ {
1603
+ "name": "align",
1604
+ "description": "交叉轴排列方式 可选值为 `stretch` `center` `flex-start` `flex-end` `baseline`",
1605
+ "default": "-",
1606
+ "value": {
1607
+ "type": "string",
1608
+ "kind": "expression"
1609
+ }
1610
+ },
1593
1611
  {
1594
1612
  "name": "xs",
1595
1613
  "description": "`<768px` 响应式栅格数或者栅格属性对象",
@@ -5390,9 +5408,9 @@
5390
5408
  "name": "var-space",
5391
5409
  "attributes": [
5392
5410
  {
5393
- "name": "align",
5394
- "description": "垂直排列方式 可选值为 `stretch` `center` `start` `end` `baseline`",
5395
- "default": "-",
5411
+ "name": "direction",
5412
+ "description": "布局方向 可选值为 `row` `column`",
5413
+ "default": "row",
5396
5414
  "value": {
5397
5415
  "type": "string",
5398
5416
  "kind": "expression"
@@ -5400,8 +5418,17 @@
5400
5418
  },
5401
5419
  {
5402
5420
  "name": "justify",
5403
- "description": "水平排列方式 可选值为 `start` `end` `center` `space-around` `space-between`",
5404
- "default": "start",
5421
+ "description": "主轴排列方式 可选值为 `flex-start` `flex-end` `center` `space-around` `space-between`",
5422
+ "default": "flex-start",
5423
+ "value": {
5424
+ "type": "string",
5425
+ "kind": "expression"
5426
+ }
5427
+ },
5428
+ {
5429
+ "name": "align",
5430
+ "description": "交叉轴排列方式 可选值为 `stretch` `center` `flex-start` `flex-end` `baseline`",
5431
+ "default": "-",
5405
5432
  "value": {
5406
5433
  "type": "string",
5407
5434
  "kind": "expression"
@@ -5425,15 +5452,6 @@
5425
5452
  "kind": "expression"
5426
5453
  }
5427
5454
  },
5428
- {
5429
- "name": "direction",
5430
- "description": "布局方向 可选值为 `row` `column`",
5431
- "default": "row",
5432
- "value": {
5433
- "type": "string",
5434
- "kind": "expression"
5435
- }
5436
- },
5437
5455
  {
5438
5456
  "name": "inline",
5439
5457
  "description": "是否为行内元素",
package/lib/varlet.cjs.js CHANGED
@@ -372,6 +372,9 @@ function supportTouch() {
372
372
  var inBrowser2 = typeof window !== "undefined";
373
373
  return inBrowser2 && "ontouchstart" in window;
374
374
  }
375
+ function padStartFlex(style) {
376
+ return style === "start" || style === "end" ? "flex-" + style : style;
377
+ }
375
378
  var _excluded = ["collect", "clear"];
376
379
  function asyncGeneratorStep$d(gen, resolve, reject, _next, _throw, key, arg) {
377
380
  try {
@@ -5206,6 +5209,12 @@ var _ChipComponent = Chip;
5206
5209
  function directionValidator$3(direction) {
5207
5210
  return ["row", "column"].includes(direction);
5208
5211
  }
5212
+ function justifyValidator$2(justify) {
5213
+ return ["start", "end", "center", "space-around", "space-between", "flex-start", "flex-end"].includes(justify);
5214
+ }
5215
+ function alignValidator$2(align) {
5216
+ return ["stretch", "center", "start", "end", "baseline", "initial", "inherit", "flex-start", "flex-end"].includes(align);
5217
+ }
5209
5218
  var props$O = {
5210
5219
  span: {
5211
5220
  type: [String, Number],
@@ -5220,6 +5229,14 @@ var props$O = {
5220
5229
  default: "row",
5221
5230
  validator: directionValidator$3
5222
5231
  },
5232
+ justify: {
5233
+ type: String,
5234
+ validator: justifyValidator$2
5235
+ },
5236
+ align: {
5237
+ type: String,
5238
+ validator: alignValidator$2
5239
+ },
5223
5240
  xs: {
5224
5241
  type: [Object, Number, String]
5225
5242
  },
@@ -5281,6 +5298,8 @@ function __render__$W(_ctx, _cache) {
5281
5298
  class: vue.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))),
5282
5299
  style: vue.normalizeStyle({
5283
5300
  flexDirection: _ctx.direction,
5301
+ justifyContent: _ctx.padStartFlex(_ctx.justify),
5302
+ alignItems: _ctx.padStartFlex(_ctx.align),
5284
5303
  paddingLeft: _ctx.toSizeUnit(_ctx.padding.left),
5285
5304
  paddingRight: _ctx.toSizeUnit(_ctx.padding.right)
5286
5305
  }),
@@ -5345,7 +5364,8 @@ var __sfc__$X = vue.defineComponent({
5345
5364
  getSize,
5346
5365
  span,
5347
5366
  offset: offset2,
5348
- handleClick
5367
+ handleClick,
5368
+ padStartFlex
5349
5369
  };
5350
5370
  }
5351
5371
  });
@@ -19118,10 +19138,10 @@ Result.install = function(app) {
19118
19138
  };
19119
19139
  var _ResultComponent = Result;
19120
19140
  function justifyValidator$1(justify) {
19121
- return ["flex-start", "flex-end", "center", "space-between", "space-around"].includes(justify);
19141
+ return ["flex-start", "flex-end", "start", "end", "center", "space-between", "space-around"].includes(justify);
19122
19142
  }
19123
- function alignValidator(align) {
19124
- return ["flex-start", "center", "flex-end"].includes(align);
19143
+ function alignValidator$1(align) {
19144
+ return ["flex-start", "center", "flex-end", "start", "end"].includes(align);
19125
19145
  }
19126
19146
  var props$g = {
19127
19147
  gutter: {
@@ -19136,7 +19156,7 @@ var props$g = {
19136
19156
  align: {
19137
19157
  type: String,
19138
19158
  default: "flex-start",
19139
- validator: alignValidator
19159
+ validator: alignValidator$1
19140
19160
  },
19141
19161
  onClick: defineListenerProp()
19142
19162
  };
@@ -19150,8 +19170,8 @@ function __render__$g(_ctx, _cache) {
19150
19170
  {
19151
19171
  class: vue.normalizeClass(_ctx.classes(_ctx.n(), _ctx.n("$--box"))),
19152
19172
  style: vue.normalizeStyle({
19153
- justifyContent: _ctx.justify,
19154
- alignItems: _ctx.align,
19173
+ justifyContent: _ctx.padStartFlex(_ctx.justify),
19174
+ alignItems: _ctx.padStartFlex(_ctx.align),
19155
19175
  margin: _ctx.average ? "0 -" + _ctx.average + "px" : void 0
19156
19176
  }),
19157
19177
  onClick: _cache[0] || (_cache[0] = function() {
@@ -19197,7 +19217,8 @@ var __sfc__$h = vue.defineComponent({
19197
19217
  n: n$i,
19198
19218
  classes: classes$e,
19199
19219
  average,
19200
- handleClick
19220
+ handleClick,
19221
+ padStartFlex
19201
19222
  };
19202
19223
  }
19203
19224
  });
@@ -21054,12 +21075,12 @@ var sizeValidator = (size) => {
21054
21075
  return internalSizeValidator(size) || isArray(size) || isNumber(size) || isString(size);
21055
21076
  };
21056
21077
  var justifyValidator = (justify) => {
21057
- return ["start", "end", "center", "space-around", "space-between"].includes(justify);
21078
+ return ["start", "end", "center", "space-around", "space-between", "flex-start", "flex-end"].includes(justify);
21079
+ };
21080
+ var alignValidator = (align) => {
21081
+ return ["stretch", "center", "start", "end", "baseline", "flex-start", "flex-end"].includes(align);
21058
21082
  };
21059
21083
  var props$b = {
21060
- align: {
21061
- type: String
21062
- },
21063
21084
  size: {
21064
21085
  type: [String, Number, Array],
21065
21086
  default: "normal",
@@ -21075,9 +21096,13 @@ var props$b = {
21075
21096
  },
21076
21097
  justify: {
21077
21098
  type: String,
21078
- default: "start",
21099
+ default: "flex-start",
21079
21100
  validator: justifyValidator
21080
21101
  },
21102
+ align: {
21103
+ type: String,
21104
+ validator: alignValidator
21105
+ },
21081
21106
  inline: {
21082
21107
  type: Boolean,
21083
21108
  default: false
@@ -21095,7 +21120,7 @@ function computeMargin(y, x, options) {
21095
21120
  } = options;
21096
21121
  var margin = "0";
21097
21122
  if (direction === "row") {
21098
- if (justify === "start" || justify === "center" || justify === "end") {
21123
+ if (["flex-start", "center", "flex-end", "start", "end"].includes(justify)) {
21099
21124
  if (index !== lastIndex) {
21100
21125
  margin = half(y) + " " + x + " " + half(y) + " 0";
21101
21126
  } else {
@@ -21132,9 +21157,6 @@ const Space = vue.defineComponent({
21132
21157
  var getSize = (size, isInternalSize) => {
21133
21158
  return isInternalSize ? ["var(--space-size-" + size + "-y)", "var(--space-size-" + size + "-x)"] : isArray(size) ? size.map(toSizeUnit) : [toSizeUnit(size), toSizeUnit(size)];
21134
21159
  };
21135
- var padStartFlex = (style) => {
21136
- return style === "start" || style === "end" ? "flex-" + style : style;
21137
- };
21138
21160
  return () => {
21139
21161
  var _call;
21140
21162
  var {
@@ -24326,9 +24348,9 @@ const skeleton = "";
24326
24348
  const SkeletonSfc = "";
24327
24349
  const slider = "";
24328
24350
  const SliderSfc = "";
24351
+ const SnackbarSfc = "";
24329
24352
  const snackbar = "";
24330
24353
  const coreSfc = "";
24331
- const SnackbarSfc = "";
24332
24354
  const space = "";
24333
24355
  const step = "";
24334
24356
  const StepSfc = "";
@@ -24353,7 +24375,7 @@ const TimePickerSfc = "";
24353
24375
  const TooltipSfc = "";
24354
24376
  const uploader = "";
24355
24377
  const UploaderSfc = "";
24356
- const version = "2.8.5-alpha.1677518578668";
24378
+ const version = "2.8.5";
24357
24379
  function install(app) {
24358
24380
  ActionSheet.install && app.use(ActionSheet);
24359
24381
  AppBar.install && app.use(AppBar);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "2.8.5-alpha.1677518578668",
3
+ "version": "2.8.5",
4
4
  "description": "A material like components library",
5
5
  "main": "lib/varlet.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -46,8 +46,8 @@
46
46
  "@popperjs/core": "^2.11.6",
47
47
  "dayjs": "^1.10.4",
48
48
  "decimal.js": "^10.2.1",
49
- "@varlet/icons": "2.8.5-alpha.1677518578668",
50
- "@varlet/shared": "2.8.5-alpha.1677518578668"
49
+ "@varlet/icons": "2.8.5",
50
+ "@varlet/shared": "2.8.5"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/jest": "^26.0.15",
@@ -62,8 +62,8 @@
62
62
  "typescript": "^4.4.4",
63
63
  "vue": "3.2.25",
64
64
  "vue-router": "4.0.12",
65
- "@varlet/cli": "2.8.5-alpha.1677518578668",
66
- "@varlet/touch-emulator": "2.8.5-alpha.1677518578668"
65
+ "@varlet/cli": "2.8.5",
66
+ "@varlet/touch-emulator": "2.8.5"
67
67
  },
68
68
  "browserslist": [
69
69
  "Chrome >= 54",
package/types/col.d.ts CHANGED
@@ -8,12 +8,27 @@ export type ColSizeDescriptor = {
8
8
  offset?: number | string
9
9
  }
10
10
 
11
+ export type ColAlign =
12
+ | 'stretch'
13
+ | 'center'
14
+ | 'start'
15
+ | 'end'
16
+ | 'baseline'
17
+ | 'initial'
18
+ | 'inherit'
19
+ | 'flex-start'
20
+ | 'flex-end'
21
+
22
+ export type ColJustify = 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'flex-start' | 'flex-end'
23
+
11
24
  export type ColDirection = 'row' | 'column'
12
25
 
13
26
  export interface ColProps extends BasicAttributes {
14
27
  span?: string | number
15
28
  offset?: string | number
16
29
  direction?: ColDirection
30
+ justify?: ColJustify
31
+ align?: ColAlign
17
32
  xs?: string | number | ColSizeDescriptor | undefined
18
33
  sm?: string | number | ColSizeDescriptor | undefined
19
34
  md?: string | number | ColSizeDescriptor | undefined
package/types/row.d.ts CHANGED
@@ -3,9 +3,9 @@ import { VNode } from 'vue'
3
3
 
4
4
  export declare const rowProps: Record<string, any>
5
5
 
6
- export type RowJustify = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around'
6
+ export type RowJustify = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'start' | 'end'
7
7
 
8
- export type RowAlign = 'flex-start' | 'center' | 'flex-end'
8
+ export type RowAlign = 'flex-start' | 'center' | 'flex-end' | 'start' | 'end'
9
9
 
10
10
  export interface RowProps extends BasicAttributes {
11
11
  gutter?: string | number
package/types/space.d.ts CHANGED
@@ -3,11 +3,11 @@ import { VNode } from 'vue'
3
3
 
4
4
  export declare const spaceProps: Record<string, any>
5
5
 
6
- export type SpaceAlign = 'stretch' | 'center' | 'start' | 'end' | 'baseline' | 'initial' | 'inherit'
6
+ export type SpaceAlign = 'stretch' | 'center' | 'start' | 'end' | 'baseline' | 'flex-start' | 'flex-end'
7
7
 
8
8
  export type SpaceDirection = 'row' | 'column'
9
9
 
10
- export type SpaceJustify = 'start' | 'end' | 'center' | 'space-around' | 'space-between'
10
+ export type SpaceJustify = 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'flex-start' | 'flex-end'
11
11
 
12
12
  export type SpaceInternalSize = 'mini' | 'small' | 'normal' | 'large'
13
13