@varlet/ui 3.3.2-alpha.1718701627164 → 3.3.3
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/action-sheet/style/index.mjs +1 -1
- package/es/app-bar/AppBar.mjs +1 -0
- package/es/app-bar/appBar.css +1 -1
- package/es/app-bar/props.mjs +1 -0
- package/es/checkbox-group/CheckboxGroup.mjs +21 -12
- package/es/dialog/Dialog.mjs +60 -54
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/radio-group/RadioGroup.mjs +20 -11
- package/es/ripple/style/index.mjs +1 -1
- package/es/snackbar/style/index.mjs +1 -1
- package/es/style.css +1 -1
- package/es/themes/dark/appBar.mjs +2 -1
- package/es/themes/md3-dark/appBar.mjs +2 -1
- package/es/themes/md3-light/appBar.mjs +2 -1
- package/es/utils/components.mjs +18 -2
- package/es/varlet.esm.js +3270 -3303
- package/highlight/web-types.en-US.json +14 -1
- package/highlight/web-types.zh-CN.json +15 -2
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +891 -922
- package/package.json +7 -7
- package/types/appBar.d.ts +1 -0
- package/types/dialog.d.ts +7 -0
- package/types/styleVars.d.ts +1 -0
- package/umd/varlet.js +8 -8
- package/es/checkbox-group/CheckboxGroupOption.mjs +0 -45
- package/es/radio-group/RadioGroupOption.mjs +0 -45
package/es/app-bar/AppBar.mjs
CHANGED
|
@@ -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",
|
package/es/app-bar/appBar.css
CHANGED
|
@@ -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);}
|
package/es/app-bar/props.mjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import VarFormDetails from "../form-details/index.mjs";
|
|
2
|
-
import
|
|
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
|
|
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
|
|
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(
|
|
31
|
+
return _openBlock(), _createBlock(_component_var_checkbox, {
|
|
31
32
|
key: option[_ctx.valueKey],
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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,
|
|
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
|
});
|
package/es/dialog/Dialog.mjs
CHANGED
|
@@ -93,60 +93,66 @@ function __render__(_ctx, _cache) {
|
|
|
93
93
|
6
|
|
94
94
|
/* CLASS, STYLE */
|
|
95
95
|
),
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
class: _normalizeClass(_ctx.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
text: "",
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
96
|
+
_renderSlot(_ctx.$slots, "actions", {
|
|
97
|
+
slotClass: _ctx.n("actions"),
|
|
98
|
+
cancel: _ctx.cancel,
|
|
99
|
+
confirm: _ctx.confirm
|
|
100
|
+
}, () => [
|
|
101
|
+
_createElementVNode(
|
|
102
|
+
"div",
|
|
103
|
+
{
|
|
104
|
+
class: _normalizeClass(_ctx.n("actions"))
|
|
105
|
+
},
|
|
106
|
+
[
|
|
107
|
+
_ctx.cancelButton ? (_openBlock(), _createBlock(_component_var_button, {
|
|
108
|
+
key: 0,
|
|
109
|
+
class: _normalizeClass(_ctx.classes(_ctx.n("button"), _ctx.n("cancel-button"))),
|
|
110
|
+
"var-dialog-cover": "",
|
|
111
|
+
text: "",
|
|
112
|
+
"text-color": _ctx.cancelButtonTextColor,
|
|
113
|
+
color: _ctx.cancelButtonColor,
|
|
114
|
+
onClick: _ctx.cancel
|
|
115
|
+
}, {
|
|
116
|
+
default: _withCtx(() => {
|
|
117
|
+
var _a;
|
|
118
|
+
return [
|
|
119
|
+
_createTextVNode(
|
|
120
|
+
_toDisplayString((_a = _ctx.cancelButtonText) != null ? _a : (_ctx.pt ? _ctx.pt : _ctx.t)("dialogCancelButtonText")),
|
|
121
|
+
1
|
|
122
|
+
/* TEXT */
|
|
123
|
+
)
|
|
124
|
+
];
|
|
125
|
+
}),
|
|
126
|
+
_: 1
|
|
127
|
+
/* STABLE */
|
|
128
|
+
}, 8, ["class", "text-color", "color", "onClick"])) : _createCommentVNode("v-if", true),
|
|
129
|
+
_ctx.confirmButton ? (_openBlock(), _createBlock(_component_var_button, {
|
|
130
|
+
key: 1,
|
|
131
|
+
class: _normalizeClass(_ctx.classes(_ctx.n("button"), _ctx.n("confirm-button"))),
|
|
132
|
+
"var-dialog-cover": "",
|
|
133
|
+
text: "",
|
|
134
|
+
"text-color": _ctx.confirmButtonTextColor,
|
|
135
|
+
color: _ctx.confirmButtonColor,
|
|
136
|
+
onClick: _ctx.confirm
|
|
137
|
+
}, {
|
|
138
|
+
default: _withCtx(() => {
|
|
139
|
+
var _a;
|
|
140
|
+
return [
|
|
141
|
+
_createTextVNode(
|
|
142
|
+
_toDisplayString((_a = _ctx.confirmButtonText) != null ? _a : (_ctx.pt ? _ctx.pt : _ctx.t)("dialogConfirmButtonText")),
|
|
143
|
+
1
|
|
144
|
+
/* TEXT */
|
|
145
|
+
)
|
|
146
|
+
];
|
|
147
|
+
}),
|
|
148
|
+
_: 1
|
|
149
|
+
/* STABLE */
|
|
150
|
+
}, 8, ["class", "text-color", "color", "onClick"])) : _createCommentVNode("v-if", true)
|
|
151
|
+
],
|
|
152
|
+
2
|
|
153
|
+
/* CLASS */
|
|
154
|
+
)
|
|
155
|
+
])
|
|
150
156
|
],
|
|
151
157
|
16
|
|
152
158
|
/* FULL_PROPS */
|
package/es/index.bundle.mjs
CHANGED
|
@@ -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.
|
|
268
|
+
const version = '3.3.3'
|
|
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.
|
|
179
|
+
const version = '3.3.3'
|
|
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
|
|
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
|
|
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
|
|
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(
|
|
32
|
+
return _openBlock(), _createBlock(_component_var_radio, {
|
|
32
33
|
key: option[_ctx.valueKey],
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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,
|
|
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
|
}
|