@varlet/ui 1.25.1 → 1.26.1-alpha.1644652196468

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.
@@ -6,7 +6,7 @@ import { props } from './props';
6
6
  import VarFormDetails from '../form-details';
7
7
  import VarLoading from '../loading';
8
8
  import Ripple from '../ripple';
9
- import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createVNode as _createVNode, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
9
+ import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveDirective as _resolveDirective, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
10
10
 
11
11
  var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
12
12
 
@@ -31,7 +31,7 @@ export function render(_ctx, _cache) {
31
31
  class: _normalizeClass(["var-switch__track", [_ctx.modelValue === _ctx.activeValue ? 'var-switch__track-active' : null, _ctx.errorMessage ? 'var-switch__track-error' : null]])
32
32
  }, null, 6
33
33
  /* CLASS, STYLE */
34
- ), _withDirectives(_createElementVNode("div", {
34
+ ), _withDirectives((_openBlock(), _createElementBlock("div", {
35
35
  class: "var-switch__ripple",
36
36
  style: _normalizeStyle(_ctx.styleComputed.ripple)
37
37
  }, [_createElementVNode("div", {
@@ -46,7 +46,7 @@ export function render(_ctx, _cache) {
46
46
  /* CLASS, STYLE */
47
47
  )], 4
48
48
  /* STYLE */
49
- ), [[_directive_ripple, {
49
+ )), [[_directive_ripple, {
50
50
  disabled: !_ctx.ripple || _ctx.disabled || _ctx.loading || _ctx.formDisabled
51
51
  }]])], 6
52
52
  /* CLASS, STYLE */
package/es/tab/Tab.js CHANGED
@@ -2,7 +2,7 @@ import Ripple from '../ripple';
2
2
  import { defineComponent, ref, computed, watch } from 'vue';
3
3
  import { props } from './props';
4
4
  import { useTabs } from './provide';
5
- import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
5
+ import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives } from "vue";
6
6
  export function render(_ctx, _cache) {
7
7
  var _directive_ripple = _resolveDirective("ripple");
8
8
 
@@ -4,7 +4,7 @@ import Clock from './clock.js'
4
4
  import { props, hoursAmpm, hours24 } from './props';
5
5
  import { toNumber } from '../utils/shared';
6
6
  import { getNumberTime, getIsDisableMinute, getIsDisableSecond } from './utils';
7
- import { toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, resolveComponent as _resolveComponent, createVNode as _createVNode, Transition as _Transition, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
7
+ import { toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, resolveComponent as _resolveComponent, createBlock as _createBlock, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
8
8
 
9
9
  var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
10
10
 
@@ -80,7 +80,7 @@ export function render(_ctx, _cache) {
80
80
  }, [_createVNode(_Transition, {
81
81
  name: "var-time-picker-panel-fade"
82
82
  }, {
83
- default: _withCtx(() => [_createVNode(_component_clock, {
83
+ default: _withCtx(() => [(_openBlock(), _createBlock(_component_clock, {
84
84
  key: _ctx.type,
85
85
  ref: "inner",
86
86
  type: _ctx.type,
@@ -99,7 +99,7 @@ export function render(_ctx, _cache) {
99
99
  onChangePreventUpdate: _ctx.changePreventUpdate
100
100
  }, null, 8
101
101
  /* PROPS */
102
- , ["type", "ampm", "color", "is-inner", "format", "allowed-time", "rad", "time", "prevent-next-update", "use-seconds", "max", "min", "onUpdate", "onChangePreventUpdate"])]),
102
+ , ["type", "ampm", "color", "is-inner", "format", "allowed-time", "rad", "time", "prevent-next-update", "use-seconds", "max", "min", "onUpdate", "onChangePreventUpdate"]))]),
103
103
  _: 1
104
104
  /* STABLE */
105
105
 
package/es/varlet.esm.js CHANGED
@@ -2368,7 +2368,7 @@ function render$N(_ctx, _cache) {
2368
2368
  onClick: _cache[0] || (_cache[0] = function() {
2369
2369
  return _ctx.handleClick && _ctx.handleClick(...arguments);
2370
2370
  })
2371
- }, [createElementVNode("div", _hoisted_1$A, [withDirectives(createElementVNode("div", {
2371
+ }, [createElementVNode("div", _hoisted_1$A, [withDirectives((openBlock(), createElementBlock("div", {
2372
2372
  class: normalizeClass(["var-checkbox__action", [_ctx.checked ? "var-checkbox--checked" : "var-checkbox--unchecked", _ctx.errorMessage || _ctx.checkboxGroupErrorMessage ? "var-checkbox--error" : null, _ctx.formDisabled || _ctx.disabled ? "var-checkbox--disabled" : null]]),
2373
2373
  style: normalizeStyle({
2374
2374
  color: _ctx.checked ? _ctx.checkedColor : _ctx.uncheckedColor
@@ -2387,7 +2387,7 @@ function render$N(_ctx, _cache) {
2387
2387
  name: "checkbox-blank-outline",
2388
2388
  size: _ctx.iconSize,
2389
2389
  "var-checkbox-cover": ""
2390
- }, null, 8, ["class", "size"])])], 6), [[_directive_ripple, {
2390
+ }, null, 8, ["class", "size"])])], 6)), [[_directive_ripple, {
2391
2391
  disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled || !_ctx.ripple
2392
2392
  }]]), createElementVNode("div", {
2393
2393
  class: normalizeClass(["var-checkbox__text", [_ctx.errorMessage || _ctx.checkboxGroupErrorMessage ? "var-checkbox--error" : null, _ctx.formDisabled || _ctx.disabled ? "var-checkbox--disabled" : null]])
@@ -2820,6 +2820,21 @@ var props$E = {
2820
2820
  },
2821
2821
  onClick: {
2822
2822
  type: Function
2823
+ },
2824
+ xs: {
2825
+ type: [Object, Number, String]
2826
+ },
2827
+ sm: {
2828
+ type: [Object, Number, String]
2829
+ },
2830
+ md: {
2831
+ type: [Object, Number, String]
2832
+ },
2833
+ lg: {
2834
+ type: [Object, Number, String]
2835
+ },
2836
+ xl: {
2837
+ type: [Object, Number, String]
2823
2838
  }
2824
2839
  };
2825
2840
  var ROW_BIND_COL_KEY = Symbol("ROW_BIND_COL_KEY");
@@ -2857,7 +2872,7 @@ function useRow() {
2857
2872
  }
2858
2873
  function render$K(_ctx, _cache) {
2859
2874
  return openBlock(), createElementBlock("div", {
2860
- class: normalizeClass(["var-col var--box", [_ctx.span ? "var-col--span-" + _ctx.toNumber(_ctx.span) : null, _ctx.offset ? "var-col--offset-" + _ctx.toNumber(_ctx.offset) : null]]),
2875
+ class: normalizeClass(["var-col var--box", [_ctx.span ? "var-col--span-" + _ctx.span : null, _ctx.offset ? "var-col--offset-" + _ctx.offset : null, ..._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)]]),
2861
2876
  style: normalizeStyle({
2862
2877
  paddingLeft: _ctx.toSizeUnit(_ctx.padding.left),
2863
2878
  paddingRight: _ctx.toSizeUnit(_ctx.padding.right)
@@ -2883,12 +2898,27 @@ var Col = defineComponent({
2883
2898
  bindRow
2884
2899
  } = useRow();
2885
2900
  var colProvider = {
2886
- span,
2887
- offset,
2888
2901
  setPadding(pad) {
2889
2902
  padding.value = pad;
2890
2903
  }
2891
2904
  };
2905
+ var getSize = (mode, size) => {
2906
+ var classes = [];
2907
+ if (!size) {
2908
+ return classes;
2909
+ }
2910
+ if (isPlainObject(size)) {
2911
+ var {
2912
+ span: _span,
2913
+ offset: _offset
2914
+ } = size;
2915
+ _span && classes.push("var-col--span-" + mode + "-" + _span);
2916
+ _offset && classes.push("var-col--offset-" + mode + "-" + _offset);
2917
+ } else {
2918
+ classes.push("var-col--span-" + mode + "-" + size);
2919
+ }
2920
+ return classes;
2921
+ };
2892
2922
  watch([() => props2.span, () => props2.offset], () => {
2893
2923
  row2 == null ? void 0 : row2.computePadding();
2894
2924
  });
@@ -2896,7 +2926,10 @@ var Col = defineComponent({
2896
2926
  return {
2897
2927
  padding,
2898
2928
  toNumber,
2899
- toSizeUnit
2929
+ toSizeUnit,
2930
+ getSize,
2931
+ span,
2932
+ offset
2900
2933
  };
2901
2934
  }
2902
2935
  });
@@ -6017,7 +6050,7 @@ var padZoneStr = function padZoneStr2(instance) {
6017
6050
  var minutes = Math.abs(negMinutes);
6018
6051
  var hourOffset = Math.floor(minutes / 60);
6019
6052
  var minuteOffset = minutes % 60;
6020
- return "" + (negMinutes <= 0 ? "+" : "-") + padStart(hourOffset, 2, "0") + ":" + padStart(minuteOffset, 2, "0");
6053
+ return (negMinutes <= 0 ? "+" : "-") + padStart(hourOffset, 2, "0") + ":" + padStart(minuteOffset, 2, "0");
6021
6054
  };
6022
6055
  var monthDiff = function monthDiff2(a, b) {
6023
6056
  if (a.date() < b.date())
@@ -10291,12 +10324,12 @@ function render$p(_ctx, _cache) {
10291
10324
  key: 1
10292
10325
  }, () => [createElementVNode("div", _hoisted_4$6, toDisplayString(_ctx.dt(_ctx.finishedText, _ctx.pack.listFinishedText)), 1)]) : createCommentVNode("v-if", true), _ctx.error ? renderSlot(_ctx.$slots, "error", {
10293
10326
  key: 2
10294
- }, () => [withDirectives(createElementVNode("div", {
10327
+ }, () => [withDirectives((openBlock(), createElementBlock("div", {
10295
10328
  class: "var-list__error",
10296
10329
  onClick: _cache[0] || (_cache[0] = function() {
10297
10330
  return _ctx.load && _ctx.load(...arguments);
10298
10331
  })
10299
- }, [createTextVNode(toDisplayString(_ctx.dt(_ctx.errorText, _ctx.pack.listErrorText)), 1)], 512), [[_directive_ripple]])]) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_5$6, null, 512)], 512);
10332
+ }, [createTextVNode(toDisplayString(_ctx.dt(_ctx.errorText, _ctx.pack.listErrorText)), 1)])), [[_directive_ripple]])]) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_5$6, null, 512)], 512);
10300
10333
  }
10301
10334
  var List = defineComponent({
10302
10335
  render: render$p,
@@ -10739,7 +10772,7 @@ function render$n(_ctx, _cache) {
10739
10772
  var _component_var_cell = resolveComponent("var-cell");
10740
10773
  var _component_var_menu = resolveComponent("var-menu");
10741
10774
  var _directive_ripple = resolveDirective("ripple");
10742
- return openBlock(), createElementBlock("ul", _hoisted_1$f, [withDirectives(createElementVNode("li", {
10775
+ return openBlock(), createElementBlock("ul", _hoisted_1$f, [withDirectives((openBlock(), createElementBlock("li", {
10743
10776
  class: normalizeClass(["var-pagination__item var-pagination__prev", {
10744
10777
  "var-pagination__item-disabled": _ctx.current <= 1 || _ctx.disabled,
10745
10778
  "var-pagination__item-hover": _ctx.simple,
@@ -10748,7 +10781,7 @@ function render$n(_ctx, _cache) {
10748
10781
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.clickItem("prev"))
10749
10782
  }, [renderSlot(_ctx.$slots, "prev", {}, () => [createVNode(_component_var_icon, {
10750
10783
  name: "chevron-left"
10751
- })])], 2), [[_directive_ripple, {
10784
+ })])], 2)), [[_directive_ripple, {
10752
10785
  disabled: _ctx.current <= 1 || _ctx.disabled
10753
10786
  }]]), _ctx.simple ? (openBlock(), createElementBlock("li", {
10754
10787
  key: 0,
@@ -10778,7 +10811,7 @@ function render$n(_ctx, _cache) {
10778
10811
  }, [createTextVNode(toDisplayString(item), 1)], 10, _hoisted_2$b)), [[_directive_ripple, {
10779
10812
  disabled: _ctx.disabled
10780
10813
  }]]);
10781
- }), 128)), withDirectives(createElementVNode("li", {
10814
+ }), 128)), withDirectives((openBlock(), createElementBlock("li", {
10782
10815
  class: normalizeClass(["var-pagination__item var-pagination__next", {
10783
10816
  "var-pagination__item-disabled": _ctx.current >= _ctx.pageCount || _ctx.disabled,
10784
10817
  "var-pagination__item-hover": _ctx.simple,
@@ -10787,7 +10820,7 @@ function render$n(_ctx, _cache) {
10787
10820
  onClick: _cache[4] || (_cache[4] = ($event) => _ctx.clickItem("next"))
10788
10821
  }, [renderSlot(_ctx.$slots, "next", {}, () => [createVNode(_component_var_icon, {
10789
10822
  name: "chevron-right"
10790
- })])], 2), [[_directive_ripple, {
10823
+ })])], 2)), [[_directive_ripple, {
10791
10824
  disabled: _ctx.current >= _ctx.pageCount || _ctx.disabled
10792
10825
  }]]), _ctx.showSizeChanger ? (openBlock(), createElementBlock("li", {
10793
10826
  key: 2,
@@ -11152,6 +11185,7 @@ function render$m(_ctx, _cache) {
11152
11185
  onTouchend: ($event) => _ctx.handleTouchend($event, c)
11153
11186
  }, [createElementVNode("div", {
11154
11187
  class: "var-picker__scroller",
11188
+ ref_for: true,
11155
11189
  ref: (el) => _ctx.getScrollEl(el, c),
11156
11190
  style: normalizeStyle({
11157
11191
  transform: "translateY(" + c.translate + "px)",
@@ -11916,7 +11950,7 @@ function render$j(_ctx, _cache) {
11916
11950
  onClick: _cache[0] || (_cache[0] = function() {
11917
11951
  return _ctx.handleClick && _ctx.handleClick(...arguments);
11918
11952
  })
11919
- }, _ctx.$attrs), [withDirectives(createElementVNode("div", {
11953
+ }, _ctx.$attrs), [withDirectives((openBlock(), createElementBlock("div", {
11920
11954
  class: normalizeClass(["var-radio__action", [_ctx.checked ? "var-radio--checked" : "var-radio--unchecked", _ctx.errorMessage || _ctx.radioGroupErrorMessage ? "var-radio--error" : null, _ctx.formDisabled || _ctx.disabled ? "var-radio--disabled" : null]]),
11921
11955
  style: normalizeStyle({
11922
11956
  color: _ctx.checked ? _ctx.checkedColor : _ctx.uncheckedColor
@@ -11935,7 +11969,7 @@ function render$j(_ctx, _cache) {
11935
11969
  "var-radio-cover": "",
11936
11970
  name: "radio-blank",
11937
11971
  size: _ctx.iconSize
11938
- }, null, 8, ["class", "size"])])], 6), [[_directive_ripple, {
11972
+ }, null, 8, ["class", "size"])])], 6)), [[_directive_ripple, {
11939
11973
  disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled || !_ctx.ripple
11940
11974
  }]]), createElementVNode("div", {
11941
11975
  class: normalizeClass(["var-radio__text", [_ctx.errorMessage || _ctx.radioGroupErrorMessage ? "var-radio--error" : null, _ctx.formDisabled || _ctx.disabled ? "var-radio--disabled" : null]])
@@ -12455,7 +12489,8 @@ function render$g(_ctx, _cache) {
12455
12489
  class: "var-row var--box",
12456
12490
  style: normalizeStyle({
12457
12491
  justifyContent: _ctx.justify,
12458
- alignItems: _ctx.align
12492
+ alignItems: _ctx.align,
12493
+ margin: _ctx.average ? "0 -" + _ctx.average + "px" : void 0
12459
12494
  }),
12460
12495
  onClick: _cache[0] || (_cache[0] = function() {
12461
12496
  return _ctx.onClick && _ctx.onClick(...arguments);
@@ -12472,49 +12507,15 @@ var Row = defineComponent({
12472
12507
  bindCols,
12473
12508
  length
12474
12509
  } = useCols();
12475
- var computeGroups = () => {
12476
- var groups = [[]];
12477
- var span = 0;
12478
- cols.forEach((col2) => {
12479
- var colSpan = col2.span.value + col2.offset.value;
12480
- var nextSpan = span + colSpan;
12481
- if (nextSpan > 24) {
12482
- groups.push([col2]);
12483
- span = colSpan;
12484
- } else {
12485
- groups[groups.length - 1].push(col2);
12486
- span += colSpan;
12487
- }
12488
- });
12489
- return groups;
12490
- };
12491
- var computePadding = () => {
12492
- var groups = computeGroups();
12510
+ var average = computed(() => {
12493
12511
  var gutter = toPxNum(props2.gutter);
12494
- var average = gutter / 2;
12495
- groups.forEach((cols2) => {
12496
- cols2.forEach((col2, index) => {
12497
- if (cols2.length <= 1) {
12498
- return;
12499
- }
12500
- if (index === 0) {
12501
- col2.setPadding({
12502
- left: 0,
12503
- right: average
12504
- });
12505
- }
12506
- if (index === cols2.length - 1) {
12507
- col2.setPadding({
12508
- left: average,
12509
- right: 0
12510
- });
12511
- }
12512
- if (index > 0 && index < cols2.length - 1) {
12513
- col2.setPadding({
12514
- left: average,
12515
- right: average
12516
- });
12517
- }
12512
+ return gutter / 2;
12513
+ });
12514
+ var computePadding = () => {
12515
+ cols.forEach((col2) => {
12516
+ col2.setPadding({
12517
+ left: average.value,
12518
+ right: average.value
12518
12519
  });
12519
12520
  });
12520
12521
  };
@@ -12524,6 +12525,9 @@ var Row = defineComponent({
12524
12525
  watch(() => length.value, computePadding);
12525
12526
  watch(() => props2.gutter, computePadding);
12526
12527
  bindCols(rowProvider);
12528
+ return {
12529
+ average
12530
+ };
12527
12531
  }
12528
12532
  });
12529
12533
  Row.install = function(app) {
@@ -12679,7 +12683,7 @@ function render$f(_ctx, _cache) {
12679
12683
  key: l,
12680
12684
  onClick: _cache[0] || (_cache[0] = withModifiers(() => {
12681
12685
  }, ["stop"])),
12682
- onClose: (e) => _ctx.handleClose(l)
12686
+ onClose: () => _ctx.handleClose(l)
12683
12687
  }, {
12684
12688
  default: withCtx(() => [createTextVNode(toDisplayString(l), 1)]),
12685
12689
  _: 2
@@ -14376,7 +14380,7 @@ function render$8(_ctx, _cache) {
14376
14380
  }, [createElementVNode("div", {
14377
14381
  style: normalizeStyle(_ctx.styleComputed.track),
14378
14382
  class: normalizeClass(["var-switch__track", [_ctx.modelValue === _ctx.activeValue ? "var-switch__track-active" : null, _ctx.errorMessage ? "var-switch__track-error" : null]])
14379
- }, null, 6), withDirectives(createElementVNode("div", {
14383
+ }, null, 6), withDirectives((openBlock(), createElementBlock("div", {
14380
14384
  class: "var-switch__ripple",
14381
14385
  style: normalizeStyle(_ctx.styleComputed.ripple)
14382
14386
  }, [createElementVNode("div", {
@@ -14385,7 +14389,7 @@ function render$8(_ctx, _cache) {
14385
14389
  }, [_ctx.loading ? (openBlock(), createBlock(_component_var_loading, {
14386
14390
  key: 0,
14387
14391
  radius: _ctx.toNumber(_ctx.size) / 2 - 2
14388
- }, null, 8, ["radius"])) : createCommentVNode("v-if", true)], 6)], 4), [[_directive_ripple, {
14392
+ }, null, 8, ["radius"])) : createCommentVNode("v-if", true)], 6)], 4)), [[_directive_ripple, {
14389
14393
  disabled: !_ctx.ripple || _ctx.disabled || _ctx.loading || _ctx.formDisabled
14390
14394
  }]])], 6), createVNode(_component_var_form_details, {
14391
14395
  "error-message": _ctx.errorMessage
@@ -15544,7 +15548,7 @@ var Clock = defineComponent({
15544
15548
  } = allowedTime;
15545
15549
  var _disableAmpmHours3 = hoursAmpm.filter((hour) => !hours(toNumber(hour)));
15546
15550
  var _disable24Hours3 = hours24.filter((hour) => !hours(toNumber(hour)));
15547
- disableHour.value = [...new Set([...disableHour.value, ..._disableAmpmHours3, ..._disable24Hours3])];
15551
+ disableHour.value = [.../* @__PURE__ */ new Set([...disableHour.value, ..._disableAmpmHours3, ..._disable24Hours3])];
15548
15552
  }
15549
15553
  disable24HourIndex.value = disableHour.value.map((hour) => hours24.findIndex((hour24) => hour === hour24)).filter((hour) => hour >= 0);
15550
15554
  }, {
@@ -15620,7 +15624,7 @@ function render$1(_ctx, _cache) {
15620
15624
  }, [createVNode(Transition, {
15621
15625
  name: "var-time-picker-panel-fade"
15622
15626
  }, {
15623
- default: withCtx(() => [createVNode(_component_clock, {
15627
+ default: withCtx(() => [(openBlock(), createBlock(_component_clock, {
15624
15628
  key: _ctx.type,
15625
15629
  ref: "inner",
15626
15630
  type: _ctx.type,
@@ -15637,7 +15641,7 @@ function render$1(_ctx, _cache) {
15637
15641
  min: _ctx.min,
15638
15642
  onUpdate: _ctx.update,
15639
15643
  onChangePreventUpdate: _ctx.changePreventUpdate
15640
- }, null, 8, ["type", "ampm", "color", "is-inner", "format", "allowed-time", "rad", "time", "prevent-next-update", "use-seconds", "max", "min", "onUpdate", "onChangePreventUpdate"])]),
15644
+ }, null, 8, ["type", "ampm", "color", "is-inner", "format", "allowed-time", "rad", "time", "prevent-next-update", "use-seconds", "max", "min", "onUpdate", "onChangePreventUpdate"]))]),
15641
15645
  _: 1
15642
15646
  })], 544)])], 2);
15643
15647
  }
@@ -335,6 +335,26 @@
335
335
  "type": "number | string",
336
336
  "description": "列偏移的栅格数 默认值:0"
337
337
  },
338
+ "var-col/xs": {
339
+ "type": "string | number | { span?: number | string, offset?: number | string }",
340
+ "description": "`<768px` 响应式栅格数或者栅格属性对象 默认值:-"
341
+ },
342
+ "var-col/sm": {
343
+ "type": "string | number | { span?: number | string, offset?: number | string }",
344
+ "description": "`≥768px` 响应式栅格数或者栅格属性对象 默认值:-"
345
+ },
346
+ "var-col/md": {
347
+ "type": "string | number | { span?: number | string, offset?: number | string }",
348
+ "description": "`≥992px` 响应式栅格数或者栅格属性对象 默认值:-"
349
+ },
350
+ "var-col/lg": {
351
+ "type": "string | number | { span?: number | string, offset?: number | string }",
352
+ "description": "`≥1200px` 响应式栅格数或者栅格属性对象 默认值:-"
353
+ },
354
+ "var-col/xl": {
355
+ "type": "string | number | { span?: number | string, offset?: number | string }",
356
+ "description": "`≥1920px` 响应式栅格数或者栅格属性对象 默认值:-"
357
+ },
338
358
  "var-collapse/v-model": {
339
359
  "type": "手风琴模式: string | number<br> 非手风琴模式:string[] | number[]",
340
360
  "description": "当前展开面板的 name 默认值:-"
@@ -124,7 +124,12 @@
124
124
  "var-col": {
125
125
  "attributes": [
126
126
  "span",
127
- "offset"
127
+ "offset",
128
+ "xs",
129
+ "sm",
130
+ "md",
131
+ "lg",
132
+ "xl"
128
133
  ]
129
134
  },
130
135
  "var-collapse": {
@@ -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": "1.25.0",
4
+ "version": "1.26.0",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -1003,6 +1003,51 @@
1003
1003
  "type": "number | string",
1004
1004
  "kind": "expression"
1005
1005
  }
1006
+ },
1007
+ {
1008
+ "name": "xs",
1009
+ "description": "`<768px` 响应式栅格数或者栅格属性对象",
1010
+ "default": "-",
1011
+ "value": {
1012
+ "type": "string | number | { span?: number | string, offset?: number | string }",
1013
+ "kind": "expression"
1014
+ }
1015
+ },
1016
+ {
1017
+ "name": "sm",
1018
+ "description": "`≥768px` 响应式栅格数或者栅格属性对象",
1019
+ "default": "-",
1020
+ "value": {
1021
+ "type": "string | number | { span?: number | string, offset?: number | string }",
1022
+ "kind": "expression"
1023
+ }
1024
+ },
1025
+ {
1026
+ "name": "md",
1027
+ "description": "`≥992px` 响应式栅格数或者栅格属性对象",
1028
+ "default": "-",
1029
+ "value": {
1030
+ "type": "string | number | { span?: number | string, offset?: number | string }",
1031
+ "kind": "expression"
1032
+ }
1033
+ },
1034
+ {
1035
+ "name": "lg",
1036
+ "description": "`≥1200px` 响应式栅格数或者栅格属性对象",
1037
+ "default": "-",
1038
+ "value": {
1039
+ "type": "string | number | { span?: number | string, offset?: number | string }",
1040
+ "kind": "expression"
1041
+ }
1042
+ },
1043
+ {
1044
+ "name": "xl",
1045
+ "description": "`≥1920px` 响应式栅格数或者栅格属性对象",
1046
+ "default": "-",
1047
+ "value": {
1048
+ "type": "string | number | { span?: number | string, offset?: number | string }",
1049
+ "kind": "expression"
1050
+ }
1006
1051
  }
1007
1052
  ],
1008
1053
  "events": [
@@ -40,7 +40,7 @@ function render(_ctx, _cache) {
40
40
  onClick: _cache[0] || (_cache[0] = function () {
41
41
  return _ctx.handleClick && _ctx.handleClick(...arguments);
42
42
  })
43
- }, [(0, _vue.createElementVNode)("div", _hoisted_1, [(0, _vue.withDirectives)((0, _vue.createElementVNode)("div", {
43
+ }, [(0, _vue.createElementVNode)("div", _hoisted_1, [(0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
44
44
  class: (0, _vue.normalizeClass)(["var-checkbox__action", [_ctx.checked ? 'var-checkbox--checked' : 'var-checkbox--unchecked', _ctx.errorMessage || _ctx.checkboxGroupErrorMessage ? 'var-checkbox--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-checkbox--disabled' : null]]),
45
45
  style: (0, _vue.normalizeStyle)({
46
46
  color: _ctx.checked ? _ctx.checkedColor : _ctx.uncheckedColor
@@ -65,7 +65,7 @@ function render(_ctx, _cache) {
65
65
  /* PROPS */
66
66
  , ["class", "size"])])], 6
67
67
  /* CLASS, STYLE */
68
- ), [[_directive_ripple, {
68
+ )), [[_directive_ripple, {
69
69
  disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled || !_ctx.ripple
70
70
  }]]), (0, _vue.createElementVNode)("div", {
71
71
  class: (0, _vue.normalizeClass)(["var-checkbox__text", [_ctx.errorMessage || _ctx.checkboxGroupErrorMessage ? 'var-checkbox--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-checkbox--disabled' : null]])
package/lib/col/Col.js CHANGED
@@ -16,7 +16,7 @@ var _elements = require("../utils/elements");
16
16
 
17
17
  function render(_ctx, _cache) {
18
18
  return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
19
- class: (0, _vue.normalizeClass)(["var-col var--box", [_ctx.span ? "var-col--span-" + _ctx.toNumber(_ctx.span) : null, _ctx.offset ? "var-col--offset-" + _ctx.toNumber(_ctx.offset) : null]]),
19
+ class: (0, _vue.normalizeClass)(["var-col var--box", [_ctx.span ? "var-col--span-" + _ctx.span : null, _ctx.offset ? "var-col--offset-" + _ctx.offset : null, ..._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)]]),
20
20
  style: (0, _vue.normalizeStyle)({
21
21
  paddingLeft: _ctx.toSizeUnit(_ctx.padding.left),
22
22
  paddingRight: _ctx.toSizeUnit(_ctx.padding.right)
@@ -46,14 +46,33 @@ var _default = (0, _vue.defineComponent)({
46
46
  bindRow
47
47
  } = (0, _provide.useRow)();
48
48
  var colProvider = {
49
- span,
50
- offset,
51
-
52
49
  setPadding(pad) {
53
50
  padding.value = pad;
54
51
  }
55
52
 
56
53
  };
54
+
55
+ var getSize = (mode, size) => {
56
+ var classes = [];
57
+
58
+ if (!size) {
59
+ return classes;
60
+ }
61
+
62
+ if ((0, _shared.isPlainObject)(size)) {
63
+ var {
64
+ span: _span,
65
+ offset: _offset
66
+ } = size;
67
+ _span && classes.push("var-col--span-" + mode + "-" + _span);
68
+ _offset && classes.push("var-col--offset-" + mode + "-" + _offset);
69
+ } else {
70
+ classes.push("var-col--span-" + mode + "-" + size);
71
+ }
72
+
73
+ return classes;
74
+ };
75
+
57
76
  (0, _vue.watch)([() => props.span, () => props.offset], () => {
58
77
  row == null ? void 0 : row.computePadding();
59
78
  });
@@ -61,7 +80,10 @@ var _default = (0, _vue.defineComponent)({
61
80
  return {
62
81
  padding,
63
82
  toNumber: _shared.toNumber,
64
- toSizeUnit: _elements.toSizeUnit
83
+ toSizeUnit: _elements.toSizeUnit,
84
+ getSize,
85
+ span,
86
+ offset
65
87
  };
66
88
  }
67
89
 
package/lib/col/col.css CHANGED
@@ -1 +1 @@
1
- .var-col { transition: all 0.25s;}.var-col--span-1 { flex: 0 0 4.16666667%;}.var-col--offset-1 { margin-left: 4.16666667%;}.var-col--span-2 { flex: 0 0 8.33333333%;}.var-col--offset-2 { margin-left: 8.33333333%;}.var-col--span-3 { flex: 0 0 12.5%;}.var-col--offset-3 { margin-left: 12.5%;}.var-col--span-4 { flex: 0 0 16.66666667%;}.var-col--offset-4 { margin-left: 16.66666667%;}.var-col--span-5 { flex: 0 0 20.83333333%;}.var-col--offset-5 { margin-left: 20.83333333%;}.var-col--span-6 { flex: 0 0 25%;}.var-col--offset-6 { margin-left: 25%;}.var-col--span-7 { flex: 0 0 29.16666667%;}.var-col--offset-7 { margin-left: 29.16666667%;}.var-col--span-8 { flex: 0 0 33.33333333%;}.var-col--offset-8 { margin-left: 33.33333333%;}.var-col--span-9 { flex: 0 0 37.5%;}.var-col--offset-9 { margin-left: 37.5%;}.var-col--span-10 { flex: 0 0 41.66666667%;}.var-col--offset-10 { margin-left: 41.66666667%;}.var-col--span-11 { flex: 0 0 45.83333333%;}.var-col--offset-11 { margin-left: 45.83333333%;}.var-col--span-12 { flex: 0 0 50%;}.var-col--offset-12 { margin-left: 50%;}.var-col--span-13 { flex: 0 0 54.16666667%;}.var-col--offset-13 { margin-left: 54.16666667%;}.var-col--span-14 { flex: 0 0 58.33333333%;}.var-col--offset-14 { margin-left: 58.33333333%;}.var-col--span-15 { flex: 0 0 62.5%;}.var-col--offset-15 { margin-left: 62.5%;}.var-col--span-16 { flex: 0 0 66.66666667%;}.var-col--offset-16 { margin-left: 66.66666667%;}.var-col--span-17 { flex: 0 0 70.83333333%;}.var-col--offset-17 { margin-left: 70.83333333%;}.var-col--span-18 { flex: 0 0 75%;}.var-col--offset-18 { margin-left: 75%;}.var-col--span-19 { flex: 0 0 79.16666667%;}.var-col--offset-19 { margin-left: 79.16666667%;}.var-col--span-20 { flex: 0 0 83.33333333%;}.var-col--offset-20 { margin-left: 83.33333333%;}.var-col--span-21 { flex: 0 0 87.5%;}.var-col--offset-21 { margin-left: 87.5%;}.var-col--span-22 { flex: 0 0 91.66666667%;}.var-col--offset-22 { margin-left: 91.66666667%;}.var-col--span-23 { flex: 0 0 95.83333333%;}.var-col--offset-23 { margin-left: 95.83333333%;}.var-col--span-24 { flex: 0 0 100%;}.var-col--offset-24 { margin-left: 100%;}
1
+ .var-col { transition: all 0.25s;}.var-col--span-1 { flex: 0 0 4.16666667%;}.var-col--offset-1 { margin-left: 4.16666667%;}.var-col--span-2 { flex: 0 0 8.33333333%;}.var-col--offset-2 { margin-left: 8.33333333%;}.var-col--span-3 { flex: 0 0 12.5%;}.var-col--offset-3 { margin-left: 12.5%;}.var-col--span-4 { flex: 0 0 16.66666667%;}.var-col--offset-4 { margin-left: 16.66666667%;}.var-col--span-5 { flex: 0 0 20.83333333%;}.var-col--offset-5 { margin-left: 20.83333333%;}.var-col--span-6 { flex: 0 0 25%;}.var-col--offset-6 { margin-left: 25%;}.var-col--span-7 { flex: 0 0 29.16666667%;}.var-col--offset-7 { margin-left: 29.16666667%;}.var-col--span-8 { flex: 0 0 33.33333333%;}.var-col--offset-8 { margin-left: 33.33333333%;}.var-col--span-9 { flex: 0 0 37.5%;}.var-col--offset-9 { margin-left: 37.5%;}.var-col--span-10 { flex: 0 0 41.66666667%;}.var-col--offset-10 { margin-left: 41.66666667%;}.var-col--span-11 { flex: 0 0 45.83333333%;}.var-col--offset-11 { margin-left: 45.83333333%;}.var-col--span-12 { flex: 0 0 50%;}.var-col--offset-12 { margin-left: 50%;}.var-col--span-13 { flex: 0 0 54.16666667%;}.var-col--offset-13 { margin-left: 54.16666667%;}.var-col--span-14 { flex: 0 0 58.33333333%;}.var-col--offset-14 { margin-left: 58.33333333%;}.var-col--span-15 { flex: 0 0 62.5%;}.var-col--offset-15 { margin-left: 62.5%;}.var-col--span-16 { flex: 0 0 66.66666667%;}.var-col--offset-16 { margin-left: 66.66666667%;}.var-col--span-17 { flex: 0 0 70.83333333%;}.var-col--offset-17 { margin-left: 70.83333333%;}.var-col--span-18 { flex: 0 0 75%;}.var-col--offset-18 { margin-left: 75%;}.var-col--span-19 { flex: 0 0 79.16666667%;}.var-col--offset-19 { margin-left: 79.16666667%;}.var-col--span-20 { flex: 0 0 83.33333333%;}.var-col--offset-20 { margin-left: 83.33333333%;}.var-col--span-21 { flex: 0 0 87.5%;}.var-col--offset-21 { margin-left: 87.5%;}.var-col--span-22 { flex: 0 0 91.66666667%;}.var-col--offset-22 { margin-left: 91.66666667%;}.var-col--span-23 { flex: 0 0 95.83333333%;}.var-col--offset-23 { margin-left: 95.83333333%;}.var-col--span-24 { flex: 0 0 100%;}.var-col--offset-24 { margin-left: 100%;}@media only screen and (max-width: 767px) { .var-col--span-xs-1 { flex: 0 0 4.16666667%; } .var-col--offset-xs-1 { margin-left: 4.16666667%; } .var-col--span-xs-2 { flex: 0 0 8.33333333%; } .var-col--offset-xs-2 { margin-left: 8.33333333%; } .var-col--span-xs-3 { flex: 0 0 12.5%; } .var-col--offset-xs-3 { margin-left: 12.5%; } .var-col--span-xs-4 { flex: 0 0 16.66666667%; } .var-col--offset-xs-4 { margin-left: 16.66666667%; } .var-col--span-xs-5 { flex: 0 0 20.83333333%; } .var-col--offset-xs-5 { margin-left: 20.83333333%; } .var-col--span-xs-6 { flex: 0 0 25%; } .var-col--offset-xs-6 { margin-left: 25%; } .var-col--span-xs-7 { flex: 0 0 29.16666667%; } .var-col--offset-xs-7 { margin-left: 29.16666667%; } .var-col--span-xs-8 { flex: 0 0 33.33333333%; } .var-col--offset-xs-8 { margin-left: 33.33333333%; } .var-col--span-xs-9 { flex: 0 0 37.5%; } .var-col--offset-xs-9 { margin-left: 37.5%; } .var-col--span-xs-10 { flex: 0 0 41.66666667%; } .var-col--offset-xs-10 { margin-left: 41.66666667%; } .var-col--span-xs-11 { flex: 0 0 45.83333333%; } .var-col--offset-xs-11 { margin-left: 45.83333333%; } .var-col--span-xs-12 { flex: 0 0 50%; } .var-col--offset-xs-12 { margin-left: 50%; } .var-col--span-xs-13 { flex: 0 0 54.16666667%; } .var-col--offset-xs-13 { margin-left: 54.16666667%; } .var-col--span-xs-14 { flex: 0 0 58.33333333%; } .var-col--offset-xs-14 { margin-left: 58.33333333%; } .var-col--span-xs-15 { flex: 0 0 62.5%; } .var-col--offset-xs-15 { margin-left: 62.5%; } .var-col--span-xs-16 { flex: 0 0 66.66666667%; } .var-col--offset-xs-16 { margin-left: 66.66666667%; } .var-col--span-xs-17 { flex: 0 0 70.83333333%; } .var-col--offset-xs-17 { margin-left: 70.83333333%; } .var-col--span-xs-18 { flex: 0 0 75%; } .var-col--offset-xs-18 { margin-left: 75%; } .var-col--span-xs-19 { flex: 0 0 79.16666667%; } .var-col--offset-xs-19 { margin-left: 79.16666667%; } .var-col--span-xs-20 { flex: 0 0 83.33333333%; } .var-col--offset-xs-20 { margin-left: 83.33333333%; } .var-col--span-xs-21 { flex: 0 0 87.5%; } .var-col--offset-xs-21 { margin-left: 87.5%; } .var-col--span-xs-22 { flex: 0 0 91.66666667%; } .var-col--offset-xs-22 { margin-left: 91.66666667%; } .var-col--span-xs-23 { flex: 0 0 95.83333333%; } .var-col--offset-xs-23 { margin-left: 95.83333333%; } .var-col--span-xs-24 { flex: 0 0 100%; } .var-col--offset-xs-24 { margin-left: 100%; }}@media only screen and (min-width: 768px) and (max-width: 991px) { .var-col--span-sm-1 { flex: 0 0 4.16666667%; } .var-col--offset-sm-1 { margin-left: 4.16666667%; } .var-col--span-sm-2 { flex: 0 0 8.33333333%; } .var-col--offset-sm-2 { margin-left: 8.33333333%; } .var-col--span-sm-3 { flex: 0 0 12.5%; } .var-col--offset-sm-3 { margin-left: 12.5%; } .var-col--span-sm-4 { flex: 0 0 16.66666667%; } .var-col--offset-sm-4 { margin-left: 16.66666667%; } .var-col--span-sm-5 { flex: 0 0 20.83333333%; } .var-col--offset-sm-5 { margin-left: 20.83333333%; } .var-col--span-sm-6 { flex: 0 0 25%; } .var-col--offset-sm-6 { margin-left: 25%; } .var-col--span-sm-7 { flex: 0 0 29.16666667%; } .var-col--offset-sm-7 { margin-left: 29.16666667%; } .var-col--span-sm-8 { flex: 0 0 33.33333333%; } .var-col--offset-sm-8 { margin-left: 33.33333333%; } .var-col--span-sm-9 { flex: 0 0 37.5%; } .var-col--offset-sm-9 { margin-left: 37.5%; } .var-col--span-sm-10 { flex: 0 0 41.66666667%; } .var-col--offset-sm-10 { margin-left: 41.66666667%; } .var-col--span-sm-11 { flex: 0 0 45.83333333%; } .var-col--offset-sm-11 { margin-left: 45.83333333%; } .var-col--span-sm-12 { flex: 0 0 50%; } .var-col--offset-sm-12 { margin-left: 50%; } .var-col--span-sm-13 { flex: 0 0 54.16666667%; } .var-col--offset-sm-13 { margin-left: 54.16666667%; } .var-col--span-sm-14 { flex: 0 0 58.33333333%; } .var-col--offset-sm-14 { margin-left: 58.33333333%; } .var-col--span-sm-15 { flex: 0 0 62.5%; } .var-col--offset-sm-15 { margin-left: 62.5%; } .var-col--span-sm-16 { flex: 0 0 66.66666667%; } .var-col--offset-sm-16 { margin-left: 66.66666667%; } .var-col--span-sm-17 { flex: 0 0 70.83333333%; } .var-col--offset-sm-17 { margin-left: 70.83333333%; } .var-col--span-sm-18 { flex: 0 0 75%; } .var-col--offset-sm-18 { margin-left: 75%; } .var-col--span-sm-19 { flex: 0 0 79.16666667%; } .var-col--offset-sm-19 { margin-left: 79.16666667%; } .var-col--span-sm-20 { flex: 0 0 83.33333333%; } .var-col--offset-sm-20 { margin-left: 83.33333333%; } .var-col--span-sm-21 { flex: 0 0 87.5%; } .var-col--offset-sm-21 { margin-left: 87.5%; } .var-col--span-sm-22 { flex: 0 0 91.66666667%; } .var-col--offset-sm-22 { margin-left: 91.66666667%; } .var-col--span-sm-23 { flex: 0 0 95.83333333%; } .var-col--offset-sm-23 { margin-left: 95.83333333%; } .var-col--span-sm-24 { flex: 0 0 100%; } .var-col--offset-sm-24 { margin-left: 100%; }}@media only screen and (min-width: 992px) and (max-width: 1199px) { .var-col--span-md-1 { flex: 0 0 4.16666667%; } .var-col--offset-md-1 { margin-left: 4.16666667%; } .var-col--span-md-2 { flex: 0 0 8.33333333%; } .var-col--offset-md-2 { margin-left: 8.33333333%; } .var-col--span-md-3 { flex: 0 0 12.5%; } .var-col--offset-md-3 { margin-left: 12.5%; } .var-col--span-md-4 { flex: 0 0 16.66666667%; } .var-col--offset-md-4 { margin-left: 16.66666667%; } .var-col--span-md-5 { flex: 0 0 20.83333333%; } .var-col--offset-md-5 { margin-left: 20.83333333%; } .var-col--span-md-6 { flex: 0 0 25%; } .var-col--offset-md-6 { margin-left: 25%; } .var-col--span-md-7 { flex: 0 0 29.16666667%; } .var-col--offset-md-7 { margin-left: 29.16666667%; } .var-col--span-md-8 { flex: 0 0 33.33333333%; } .var-col--offset-md-8 { margin-left: 33.33333333%; } .var-col--span-md-9 { flex: 0 0 37.5%; } .var-col--offset-md-9 { margin-left: 37.5%; } .var-col--span-md-10 { flex: 0 0 41.66666667%; } .var-col--offset-md-10 { margin-left: 41.66666667%; } .var-col--span-md-11 { flex: 0 0 45.83333333%; } .var-col--offset-md-11 { margin-left: 45.83333333%; } .var-col--span-md-12 { flex: 0 0 50%; } .var-col--offset-md-12 { margin-left: 50%; } .var-col--span-md-13 { flex: 0 0 54.16666667%; } .var-col--offset-md-13 { margin-left: 54.16666667%; } .var-col--span-md-14 { flex: 0 0 58.33333333%; } .var-col--offset-md-14 { margin-left: 58.33333333%; } .var-col--span-md-15 { flex: 0 0 62.5%; } .var-col--offset-md-15 { margin-left: 62.5%; } .var-col--span-md-16 { flex: 0 0 66.66666667%; } .var-col--offset-md-16 { margin-left: 66.66666667%; } .var-col--span-md-17 { flex: 0 0 70.83333333%; } .var-col--offset-md-17 { margin-left: 70.83333333%; } .var-col--span-md-18 { flex: 0 0 75%; } .var-col--offset-md-18 { margin-left: 75%; } .var-col--span-md-19 { flex: 0 0 79.16666667%; } .var-col--offset-md-19 { margin-left: 79.16666667%; } .var-col--span-md-20 { flex: 0 0 83.33333333%; } .var-col--offset-md-20 { margin-left: 83.33333333%; } .var-col--span-md-21 { flex: 0 0 87.5%; } .var-col--offset-md-21 { margin-left: 87.5%; } .var-col--span-md-22 { flex: 0 0 91.66666667%; } .var-col--offset-md-22 { margin-left: 91.66666667%; } .var-col--span-md-23 { flex: 0 0 95.83333333%; } .var-col--offset-md-23 { margin-left: 95.83333333%; } .var-col--span-md-24 { flex: 0 0 100%; } .var-col--offset-md-24 { margin-left: 100%; }}@media only screen and (min-width: 1200px) and (max-width: 1919px) { .var-col--span-lg-1 { flex: 0 0 4.16666667%; } .var-col--offset-lg-1 { margin-left: 4.16666667%; } .var-col--span-lg-2 { flex: 0 0 8.33333333%; } .var-col--offset-lg-2 { margin-left: 8.33333333%; } .var-col--span-lg-3 { flex: 0 0 12.5%; } .var-col--offset-lg-3 { margin-left: 12.5%; } .var-col--span-lg-4 { flex: 0 0 16.66666667%; } .var-col--offset-lg-4 { margin-left: 16.66666667%; } .var-col--span-lg-5 { flex: 0 0 20.83333333%; } .var-col--offset-lg-5 { margin-left: 20.83333333%; } .var-col--span-lg-6 { flex: 0 0 25%; } .var-col--offset-lg-6 { margin-left: 25%; } .var-col--span-lg-7 { flex: 0 0 29.16666667%; } .var-col--offset-lg-7 { margin-left: 29.16666667%; } .var-col--span-lg-8 { flex: 0 0 33.33333333%; } .var-col--offset-lg-8 { margin-left: 33.33333333%; } .var-col--span-lg-9 { flex: 0 0 37.5%; } .var-col--offset-lg-9 { margin-left: 37.5%; } .var-col--span-lg-10 { flex: 0 0 41.66666667%; } .var-col--offset-lg-10 { margin-left: 41.66666667%; } .var-col--span-lg-11 { flex: 0 0 45.83333333%; } .var-col--offset-lg-11 { margin-left: 45.83333333%; } .var-col--span-lg-12 { flex: 0 0 50%; } .var-col--offset-lg-12 { margin-left: 50%; } .var-col--span-lg-13 { flex: 0 0 54.16666667%; } .var-col--offset-lg-13 { margin-left: 54.16666667%; } .var-col--span-lg-14 { flex: 0 0 58.33333333%; } .var-col--offset-lg-14 { margin-left: 58.33333333%; } .var-col--span-lg-15 { flex: 0 0 62.5%; } .var-col--offset-lg-15 { margin-left: 62.5%; } .var-col--span-lg-16 { flex: 0 0 66.66666667%; } .var-col--offset-lg-16 { margin-left: 66.66666667%; } .var-col--span-lg-17 { flex: 0 0 70.83333333%; } .var-col--offset-lg-17 { margin-left: 70.83333333%; } .var-col--span-lg-18 { flex: 0 0 75%; } .var-col--offset-lg-18 { margin-left: 75%; } .var-col--span-lg-19 { flex: 0 0 79.16666667%; } .var-col--offset-lg-19 { margin-left: 79.16666667%; } .var-col--span-lg-20 { flex: 0 0 83.33333333%; } .var-col--offset-lg-20 { margin-left: 83.33333333%; } .var-col--span-lg-21 { flex: 0 0 87.5%; } .var-col--offset-lg-21 { margin-left: 87.5%; } .var-col--span-lg-22 { flex: 0 0 91.66666667%; } .var-col--offset-lg-22 { margin-left: 91.66666667%; } .var-col--span-lg-23 { flex: 0 0 95.83333333%; } .var-col--offset-lg-23 { margin-left: 95.83333333%; } .var-col--span-lg-24 { flex: 0 0 100%; } .var-col--offset-lg-24 { margin-left: 100%; }}@media only screen and (min-width: 1920px) { .var-col--span-xl-1 { flex: 0 0 4.16666667%; } .var-col--offset-xl-1 { margin-left: 4.16666667%; } .var-col--span-xl-2 { flex: 0 0 8.33333333%; } .var-col--offset-xl-2 { margin-left: 8.33333333%; } .var-col--span-xl-3 { flex: 0 0 12.5%; } .var-col--offset-xl-3 { margin-left: 12.5%; } .var-col--span-xl-4 { flex: 0 0 16.66666667%; } .var-col--offset-xl-4 { margin-left: 16.66666667%; } .var-col--span-xl-5 { flex: 0 0 20.83333333%; } .var-col--offset-xl-5 { margin-left: 20.83333333%; } .var-col--span-xl-6 { flex: 0 0 25%; } .var-col--offset-xl-6 { margin-left: 25%; } .var-col--span-xl-7 { flex: 0 0 29.16666667%; } .var-col--offset-xl-7 { margin-left: 29.16666667%; } .var-col--span-xl-8 { flex: 0 0 33.33333333%; } .var-col--offset-xl-8 { margin-left: 33.33333333%; } .var-col--span-xl-9 { flex: 0 0 37.5%; } .var-col--offset-xl-9 { margin-left: 37.5%; } .var-col--span-xl-10 { flex: 0 0 41.66666667%; } .var-col--offset-xl-10 { margin-left: 41.66666667%; } .var-col--span-xl-11 { flex: 0 0 45.83333333%; } .var-col--offset-xl-11 { margin-left: 45.83333333%; } .var-col--span-xl-12 { flex: 0 0 50%; } .var-col--offset-xl-12 { margin-left: 50%; } .var-col--span-xl-13 { flex: 0 0 54.16666667%; } .var-col--offset-xl-13 { margin-left: 54.16666667%; } .var-col--span-xl-14 { flex: 0 0 58.33333333%; } .var-col--offset-xl-14 { margin-left: 58.33333333%; } .var-col--span-xl-15 { flex: 0 0 62.5%; } .var-col--offset-xl-15 { margin-left: 62.5%; } .var-col--span-xl-16 { flex: 0 0 66.66666667%; } .var-col--offset-xl-16 { margin-left: 66.66666667%; } .var-col--span-xl-17 { flex: 0 0 70.83333333%; } .var-col--offset-xl-17 { margin-left: 70.83333333%; } .var-col--span-xl-18 { flex: 0 0 75%; } .var-col--offset-xl-18 { margin-left: 75%; } .var-col--span-xl-19 { flex: 0 0 79.16666667%; } .var-col--offset-xl-19 { margin-left: 79.16666667%; } .var-col--span-xl-20 { flex: 0 0 83.33333333%; } .var-col--offset-xl-20 { margin-left: 83.33333333%; } .var-col--span-xl-21 { flex: 0 0 87.5%; } .var-col--offset-xl-21 { margin-left: 87.5%; } .var-col--span-xl-22 { flex: 0 0 91.66666667%; } .var-col--offset-xl-22 { margin-left: 91.66666667%; } .var-col--span-xl-23 { flex: 0 0 95.83333333%; } .var-col--offset-xl-23 { margin-left: 95.83333333%; } .var-col--span-xl-24 { flex: 0 0 100%; } .var-col--offset-xl-24 { margin-left: 100%; }}
package/lib/col/col.less CHANGED
@@ -2,7 +2,7 @@
2
2
  transition: all 0.25s;
3
3
  }
4
4
 
5
- .create-col(@count, @i) when (@i =< @count) {
5
+ .create-col(@i) when (@i =< 24) {
6
6
  .var-col--span-@{i} {
7
7
  flex: 0 0 @i * (100% / 24);
8
8
  }
@@ -11,7 +11,39 @@
11
11
  margin-left: @i * (100% / 24);
12
12
  }
13
13
 
14
- .create-col(@count, @i + 1);
14
+ .create-col(@i + 1);
15
15
  }
16
16
 
17
- .create-col(24, 1);
17
+ .create-responsive-col(@i, @mode) when (@i =< 24) {
18
+ .var-col--span-@{mode}-@{i} {
19
+ flex: 0 0 @i * (100% / 24);
20
+ }
21
+
22
+ .var-col--offset-@{mode}-@{i} {
23
+ margin-left: @i * (100% / 24);
24
+ }
25
+
26
+ .create-responsive-col(@i + 1,@mode);
27
+ }
28
+
29
+ .create-col(1);
30
+
31
+ @media only screen and (max-width: 767px) {
32
+ .create-responsive-col(1, xs);
33
+ }
34
+
35
+ @media only screen and (min-width: 768px) and (max-width: 991px) {
36
+ .create-responsive-col(1, sm);
37
+ }
38
+
39
+ @media only screen and (min-width: 992px) and (max-width: 1199px) {
40
+ .create-responsive-col(1, md);
41
+ }
42
+
43
+ @media only screen and (min-width: 1200px) and (max-width: 1919px) {
44
+ .create-responsive-col(1, lg);
45
+ }
46
+
47
+ @media only screen and (min-width: 1920px) {
48
+ .create-responsive-col(1, xl);
49
+ }