@varlet/ui 3.3.1 → 3.3.2

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.
@@ -20,6 +20,7 @@ function __render__(_ctx, _cache) {
20
20
  [_ctx.safeAreaTop, _ctx.n("--safe-area-top")],
21
21
  [_ctx.round, _ctx.n("--round")],
22
22
  [_ctx.fixed, _ctx.n("--fixed")],
23
+ [_ctx.border, _ctx.n("--border")],
23
24
  _ctx.formatElevation(_ctx.elevation, 3)
24
25
  ),
25
26
  ref: "appBar",
@@ -1 +1 @@
1
- :root { --app-bar-color: var(--color-primary); --app-bar-title-padding: 0 12px; --app-bar-title-font-size: var(--font-size-lg); --app-bar-text-color: #fff; --app-bar-height: 54px; --app-bar-left-gap: 6px; --app-bar-right-gap: 6px; --app-bar-border-radius: 4px; --app-bar-font-size: var(--font-size-lg);}.var-app-bar { position: relative; width: 100%; font-size: var(--app-bar-font-size); background: var(--app-bar-color); color: var(--app-bar-text-color); transition: background-color 0.25s;}.var-app-bar__toolbar { position: relative; display: flex; justify-content: center; align-items: center; height: var(--app-bar-height);}.var-app-bar__title { font-size: var(--app-bar-title-font-size); flex: 1; display: flex; justify-content: center; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; padding: var(--app-bar-title-padding);}.var-app-bar__left,.var-app-bar__right { display: flex; align-items: center; height: 100%;}.var-app-bar__left { position: absolute; top: 0; left: var(--app-bar-left-gap);}.var-app-bar__right { position: absolute; top: 0; right: var(--app-bar-right-gap);}.var-app-bar--round { border-radius: var(--app-bar-border-radius);}.var-app-bar--safe-area-top { padding-top: constant(safe-area-inset-top); padding-top: env(safe-area-inset-top); box-sizing: content-box !important;}.var-app-bar--fixed { position: fixed; top: 0; left: 0;}
1
+ :root { --app-bar-color: var(--color-primary); --app-bar-title-padding: 0 12px; --app-bar-title-font-size: var(--font-size-lg); --app-bar-text-color: #fff; --app-bar-height: 54px; --app-bar-left-gap: 6px; --app-bar-right-gap: 6px; --app-bar-border-radius: 4px; --app-bar-font-size: var(--font-size-lg); --app-bar-border-bottom: thin solid var(--color-outline);}.var-app-bar { position: relative; width: 100%; font-size: var(--app-bar-font-size); background: var(--app-bar-color); color: var(--app-bar-text-color); transition: background-color 0.25s;}.var-app-bar__toolbar { position: relative; display: flex; justify-content: center; align-items: center; height: var(--app-bar-height);}.var-app-bar__title { font-size: var(--app-bar-title-font-size); flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; padding: var(--app-bar-title-padding);}.var-app-bar__left,.var-app-bar__right { display: flex; align-items: center; height: 100%;}.var-app-bar__left { position: absolute; top: 0; left: var(--app-bar-left-gap);}.var-app-bar__right { position: absolute; top: 0; right: var(--app-bar-right-gap);}.var-app-bar--round { border-radius: var(--app-bar-border-radius);}.var-app-bar--safe-area-top { padding-top: constant(safe-area-inset-top); padding-top: env(safe-area-inset-top); box-sizing: content-box !important;}.var-app-bar--fixed { position: fixed; top: 0; left: 0;}.var-app-bar--border { border-bottom: var(--app-bar-border-bottom);}
@@ -14,6 +14,7 @@ const props = {
14
14
  image: String,
15
15
  imageLinearGradient: String,
16
16
  safeAreaTop: Boolean,
17
+ border: Boolean,
17
18
  zIndex: {
18
19
  type: [Number, String],
19
20
  default: 1
@@ -1,15 +1,16 @@
1
1
  import VarFormDetails from "../form-details/index.mjs";
2
- import CheckboxGroupOption from "./CheckboxGroupOption.mjs";
2
+ import VarCheckbox from "../checkbox/index.mjs";
3
3
  import { defineComponent, computed, watch, nextTick } from "vue";
4
4
  import { props } from "./props.mjs";
5
- import { useValidation, createNamespace } from "../utils/components.mjs";
5
+ import { useValidation, createNamespace, MaybeVNode } from "../utils/components.mjs";
6
6
  import { useCheckboxes } from "./provide.mjs";
7
7
  import { useForm } from "../form/provide.mjs";
8
- import { uniq, call, isArray } from "@varlet/shared";
8
+ import { uniq, call, isArray, isFunction } from "@varlet/shared";
9
9
  const { name, n, classes } = createNamespace("checkbox-group");
10
- import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, createVNode as _createVNode } from "vue";
10
+ import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from "vue";
11
11
  function __render__(_ctx, _cache) {
12
- const _component_checkbox_group_option = _resolveComponent("checkbox-group-option");
12
+ const _component_maybe_v_node = _resolveComponent("maybe-v-node");
13
+ const _component_var_checkbox = _resolveComponent("var-checkbox");
13
14
  const _component_var_form_details = _resolveComponent("var-form-details");
14
15
  return _openBlock(), _createElementBlock(
15
16
  "div",
@@ -27,12 +28,19 @@ function __render__(_ctx, _cache) {
27
28
  _Fragment,
28
29
  { key: 0 },
29
30
  _renderList(_ctx.checkboxGroupOptions, (option) => {
30
- return _openBlock(), _createBlock(_component_checkbox_group_option, {
31
+ return _openBlock(), _createBlock(_component_var_checkbox, {
31
32
  key: option[_ctx.valueKey],
32
- "label-key": _ctx.labelKey,
33
- "value-key": _ctx.valueKey,
34
- option
35
- }, null, 8, ["label-key", "value-key", "option"]);
33
+ "checked-value": option[_ctx.valueKey],
34
+ disabled: option.disabled
35
+ }, {
36
+ default: _withCtx(({ checked }) => [
37
+ _createVNode(_component_maybe_v_node, {
38
+ is: _ctx.isFunction(option[_ctx.labelKey]) ? option[_ctx.labelKey](option, checked) : option[_ctx.labelKey]
39
+ }, null, 8, ["is"])
40
+ ]),
41
+ _: 2
42
+ /* DYNAMIC */
43
+ }, 1032, ["checked-value", "disabled"]);
36
44
  }),
37
45
  128
38
46
  /* KEYED_FRAGMENT */
@@ -50,7 +58,7 @@ function __render__(_ctx, _cache) {
50
58
  }
51
59
  const __sfc__ = defineComponent({
52
60
  name,
53
- components: { VarFormDetails, CheckboxGroupOption },
61
+ components: { VarFormDetails, VarCheckbox, MaybeVNode },
54
62
  props,
55
63
  setup(props2) {
56
64
  const max = computed(() => props2.max);
@@ -140,7 +148,8 @@ const __sfc__ = defineComponent({
140
148
  inverseAll,
141
149
  reset,
142
150
  validate,
143
- resetValidation
151
+ resetValidation,
152
+ isFunction
144
153
  };
145
154
  }
146
155
  });
@@ -265,7 +265,7 @@ import './tooltip/style/index.mjs'
265
265
  import './uploader/style/index.mjs'
266
266
  import './watermark/style/index.mjs'
267
267
 
268
- const version = '3.3.1'
268
+ const version = '3.3.2'
269
269
 
270
270
  function install(app) {
271
271
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -176,7 +176,7 @@ export * from './tooltip/index.mjs'
176
176
  export * from './uploader/index.mjs'
177
177
  export * from './watermark/index.mjs'
178
178
 
179
- const version = '3.3.1'
179
+ const version = '3.3.2'
180
180
 
181
181
  function install(app) {
182
182
  ActionSheet.install && app.use(ActionSheet)
@@ -1,16 +1,17 @@
1
1
  import VarFormDetails from "../form-details/index.mjs";
2
- import RadioGroupOption from "./RadioGroupOption.mjs";
2
+ import VarRadio from "../radio/index.mjs";
3
3
  import { computed, defineComponent, nextTick, watch } from "vue";
4
4
  import { props } from "./props.mjs";
5
- import { useValidation, createNamespace } from "../utils/components.mjs";
5
+ import { useValidation, createNamespace, MaybeVNode } from "../utils/components.mjs";
6
6
  import { useRadios } from "./provide.mjs";
7
7
  import { useForm } from "../form/provide.mjs";
8
- import { call, preventDefault, isArray } from "@varlet/shared";
8
+ import { call, preventDefault, isArray, isFunction } from "@varlet/shared";
9
9
  import { useEventListener } from "@varlet/use";
10
10
  const { name, n, classes } = createNamespace("radio-group");
11
- import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, createVNode as _createVNode } from "vue";
11
+ import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from "vue";
12
12
  function __render__(_ctx, _cache) {
13
- const _component_radio_group_option = _resolveComponent("radio-group-option");
13
+ const _component_maybe_v_node = _resolveComponent("maybe-v-node");
14
+ const _component_var_radio = _resolveComponent("var-radio");
14
15
  const _component_var_form_details = _resolveComponent("var-form-details");
15
16
  return _openBlock(), _createElementBlock(
16
17
  "div",
@@ -28,12 +29,19 @@ function __render__(_ctx, _cache) {
28
29
  _Fragment,
29
30
  { key: 0 },
30
31
  _renderList(_ctx.radioGroupOptions, (option) => {
31
- return _openBlock(), _createBlock(_component_radio_group_option, {
32
+ return _openBlock(), _createBlock(_component_var_radio, {
32
33
  key: option[_ctx.valueKey],
33
- "label-key": _ctx.labelKey,
34
- "value-key": _ctx.valueKey,
35
- option
36
- }, null, 8, ["label-key", "value-key", "option"]);
34
+ "checked-value": option[_ctx.valueKey],
35
+ disabled: option.disabled
36
+ }, {
37
+ default: _withCtx(({ checked }) => [
38
+ _createVNode(_component_maybe_v_node, {
39
+ is: _ctx.isFunction(option[_ctx.labelKey]) ? option[_ctx.labelKey](option, checked) : option[_ctx.labelKey]
40
+ }, null, 8, ["is"])
41
+ ]),
42
+ _: 2
43
+ /* DYNAMIC */
44
+ }, 1032, ["checked-value", "disabled"]);
37
45
  }),
38
46
  128
39
47
  /* KEYED_FRAGMENT */
@@ -51,7 +59,7 @@ function __render__(_ctx, _cache) {
51
59
  }
52
60
  const __sfc__ = defineComponent({
53
61
  name,
54
- components: { VarFormDetails, RadioGroupOption },
62
+ components: { VarFormDetails, VarRadio, MaybeVNode },
55
63
  props,
56
64
  setup(props2) {
57
65
  const { length, radios, bindRadios } = useRadios();
@@ -145,6 +153,7 @@ const __sfc__ = defineComponent({
145
153
  reset,
146
154
  validate,
147
155
  resetValidation,
156
+ isFunction,
148
157
  radioGroupOptions
149
158
  };
150
159
  }