savor-ui 0.3.3 → 0.4.0
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/CHANGELOG.md +29 -0
- package/dist/es/components/index.d.ts +4 -0
- package/dist/es/components/index.mjs +5 -0
- package/dist/es/components/src/alert/alert.d.ts +22 -0
- package/dist/es/components/src/alert/alert.vue.mjs +5 -0
- package/dist/es/components/src/alert/alert.vue_vue_type_script_setup_true_vapor_true_lang.mjs +58 -0
- package/dist/es/components/src/alert/index.d.ts +26 -0
- package/dist/es/components/src/alert/index.mjs +7 -0
- package/dist/es/components/src/alert/types.d.ts +24 -0
- package/dist/es/components/src/cascader/cascader.vue_vue_type_script_setup_true_vapor_true_lang.mjs +5 -5
- package/dist/es/components/src/chat-list/chat-list.d.ts +35 -0
- package/dist/es/components/src/chat-list/chat-list.vue.mjs +5 -0
- package/dist/es/components/src/chat-list/chat-list.vue_vue_type_script_setup_true_vapor_true_lang.mjs +55 -0
- package/dist/es/components/src/chat-list/index.d.ts +47 -0
- package/dist/es/components/src/chat-list/index.mjs +7 -0
- package/dist/es/components/src/chat-list/types.d.ts +44 -0
- package/dist/es/components/src/chat-sender/chat-sender.d.ts +26 -0
- package/dist/es/components/src/chat-sender/chat-sender.vue.mjs +5 -0
- package/dist/es/components/src/chat-sender/chat-sender.vue_vue_type_script_setup_true_vapor_true_lang.mjs +92 -0
- package/dist/es/components/src/chat-sender/index.d.ts +27 -0
- package/dist/es/components/src/chat-sender/index.mjs +7 -0
- package/dist/es/components/src/chat-sender/types.d.ts +24 -0
- package/dist/es/components/src/collapse/collapse-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
- package/dist/es/components/src/date-picker/date-picker.vue_vue_type_script_setup_true_vapor_true_lang.mjs +28 -28
- package/dist/es/components/src/datetime-picker/datetime-picker.vue_vue_type_script_setup_true_vapor_true_lang.mjs +28 -28
- package/dist/es/components/src/drawer/drawer.vue_vue_type_script_setup_true_vapor_true_lang.mjs +72 -72
- package/dist/es/components/src/form/form-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +13 -13
- package/dist/es/components/src/form/use-form-item.d.ts +1 -1
- package/dist/es/components/src/grid/grid-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +24 -23
- package/dist/es/components/src/grid/grid.vue_vue_type_script_setup_true_vapor_true_lang.mjs +6 -7
- package/dist/es/components/src/grid/types.d.ts +1 -0
- package/dist/es/components/src/input/input.vue_vue_type_script_setup_true_vapor_true_lang.mjs +9 -9
- package/dist/es/components/src/input-number/input-number.vue_vue_type_script_setup_true_vapor_true_lang.mjs +83 -83
- package/dist/es/components/src/input-tag/input-tag.vue_vue_type_script_setup_true_vapor_true_lang.mjs +10 -10
- package/dist/es/components/src/layer/layer.vue_vue_type_script_setup_true_vapor_true_lang.mjs +105 -105
- package/dist/es/components/src/list/index.d.ts +5 -5
- package/dist/es/components/src/list/list.d.ts +3 -3
- package/dist/es/components/src/list/list.vue_vue_type_script_setup_true_vapor_true_lang.mjs +7 -12
- package/dist/es/components/src/list/types.d.ts +7 -5
- package/dist/es/components/src/menu/sub-menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
- package/dist/es/components/src/modal/modal.vue_vue_type_script_setup_true_vapor_true_lang.mjs +121 -121
- package/dist/es/components/src/panel/panel.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
- package/dist/es/components/src/popover/index.d.ts +1 -0
- package/dist/es/components/src/popover/popover.vue_vue_type_script_setup_true_vapor_true_lang.mjs +77 -76
- package/dist/es/components/src/popover/types.d.ts +4 -0
- package/dist/es/components/src/scrollbar/index.d.ts +7 -2
- package/dist/es/components/src/scrollbar/scrollbar.d.ts +5 -2
- package/dist/es/components/src/scrollbar/scrollbar.vue_vue_type_script_setup_true_vapor_true_lang.mjs +131 -96
- package/dist/es/components/src/scrollbar/types.d.ts +15 -1
- package/dist/es/components/src/segmented/segmented.vue_vue_type_script_setup_true_vapor_true_lang.mjs +41 -45
- package/dist/es/components/src/select/select.vue_vue_type_script_setup_true_vapor_true_lang.mjs +9 -9
- package/dist/es/components/src/table/col-group.d.ts +22 -0
- package/dist/es/components/src/table/col-group.vue.mjs +5 -0
- package/dist/es/components/src/table/col-group.vue_vue_type_script_setup_true_vapor_true_lang.mjs +25 -0
- package/dist/es/components/src/table/index.d.ts +18 -41
- package/dist/es/components/src/table/index.mjs +1 -0
- package/dist/es/components/src/table/table-body.d.ts +32 -0
- package/dist/es/components/src/table/table-body.vue.mjs +5 -0
- package/dist/es/components/src/table/table-body.vue_vue_type_script_setup_true_vapor_true_lang.mjs +153 -0
- package/dist/es/components/src/table/table-header.d.ts +23 -0
- package/dist/es/components/src/table/table-header.vue.mjs +5 -0
- package/dist/es/components/src/table/table-header.vue_vue_type_script_setup_true_vapor_true_lang.mjs +80 -0
- package/dist/es/components/src/table/table.d.ts +12 -25
- package/dist/es/components/src/table/table.vue_vue_type_script_setup_true_vapor_true_lang.mjs +167 -391
- package/dist/es/components/src/table/types.d.ts +61 -45
- package/dist/es/components/src/table/types.mjs +4 -0
- package/dist/es/components/src/textarea/textarea.vue_vue_type_script_setup_true_vapor_true_lang.mjs +6 -6
- package/dist/es/components/src/tooltip/index.d.ts +1 -0
- package/dist/es/components/src/tooltip/tooltip.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -0
- package/dist/es/components/src/tooltip/types.d.ts +2 -0
- package/dist/es/components/src/transition/index.d.ts +29 -0
- package/dist/es/components/src/transition/index.mjs +7 -0
- package/dist/es/components/src/{_comp/HeightTransition.d.ts → transition/transition-height.d.ts} +0 -4
- package/dist/es/components/src/transition/transition-height.vue.mjs +5 -0
- package/dist/es/components/src/transition/transition-height.vue_vue_type_script_setup_true_vapor_true_lang.mjs +54 -0
- package/dist/es/components/src/transition/transition-opacity.vue.mjs +5 -0
- package/dist/es/components/src/{_comp/OpacityTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs → transition/transition-opacity.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +2 -2
- package/dist/es/components/src/transition/transition-scale.vue.mjs +5 -0
- package/dist/es/components/src/{_comp/ScaleTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs → transition/transition-scale.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +2 -2
- package/dist/es/components/src/transition/transition-side.vue.mjs +5 -0
- package/dist/es/components/src/{_comp/SideTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs → transition/transition-side.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +2 -2
- package/dist/es/components/src/transition/transition-width.d.ts +31 -0
- package/dist/es/components/src/transition/transition-width.vue.mjs +5 -0
- package/dist/es/components/src/transition/transition-width.vue_vue_type_script_setup_true_vapor_true_lang.mjs +54 -0
- package/dist/es/components/src/transition/transition.d.ts +27 -0
- package/dist/es/components/src/transition/transition.vue.mjs +5 -0
- package/dist/es/components/src/transition/transition.vue_vue_type_script_setup_true_vapor_true_lang.mjs +47 -0
- package/dist/es/components/src/transition/types.d.ts +28 -0
- package/dist/es/components/src/tree/index.d.ts +5 -5
- package/dist/es/components/src/tree/node.vue_vue_type_script_setup_true_vapor_true_lang.mjs +26 -29
- package/dist/es/components/src/tree/tree.d.ts +3 -1
- package/dist/es/components/src/tree/tree.vue_vue_type_script_setup_true_vapor_true_lang.mjs +45 -49
- package/dist/es/components/src/tree/types.d.ts +5 -9
- package/dist/es/core/components.mjs +94 -86
- package/dist/es/core/index.mjs +84 -79
- package/dist/es/hooks/src/use-element-size.mjs +7 -38
- package/dist/es/icons/index.d.ts +4 -1
- package/dist/es/icons/index.mjs +3 -0
- package/dist/es/icons/src/loading-stop.d.ts +19 -0
- package/dist/es/icons/src/loading-stop.vue.mjs +11 -0
- package/dist/es/icons/src/send.d.ts +19 -0
- package/dist/es/icons/src/send.vue.mjs +11 -0
- package/dist/es/icons/src/stop.d.ts +19 -0
- package/dist/es/icons/src/stop.vue.mjs +5 -0
- package/dist/es/theme/components/alert.scss +101 -0
- package/dist/es/theme/components/chat-list.scss +134 -0
- package/dist/es/theme/components/chat-sender.scss +123 -0
- package/dist/es/theme/components/index.scss +3 -0
- package/dist/es/theme/components/input.scss +0 -1
- package/dist/es/theme/components/list.scss +7 -0
- package/dist/es/theme/components/menu.scss +1 -1
- package/dist/es/theme/components/scrollbar.scss +61 -7
- package/dist/es/theme/components/table.scss +360 -329
- package/dist/es/theme/components/transition.scss +21 -21
- package/dist/es/theme/components/tree.scss +8 -0
- package/dist/es/utils/src/tool.d.ts +8 -3
- package/dist/es/utils/src/tool.mjs +6 -6
- package/dist/json/vetur-attributes.json +170 -48
- package/dist/json/vetur-tags.json +74 -15
- package/dist/json/web-types.json +391 -83
- package/package.json +1 -1
- package/dist/es/components/src/_comp/HeightTransition.vue.mjs +0 -5
- package/dist/es/components/src/_comp/HeightTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs +0 -77
- package/dist/es/components/src/_comp/OpacityTransition.vue.mjs +0 -5
- package/dist/es/components/src/_comp/ScaleTransition.vue.mjs +0 -5
- package/dist/es/components/src/_comp/SideTransition.vue.mjs +0 -5
- /package/dist/es/components/src/{_comp/OpacityTransition.d.ts → transition/transition-opacity.d.ts} +0 -0
- /package/dist/es/components/src/{_comp/ScaleTransition.d.ts → transition/transition-scale.d.ts} +0 -0
- /package/dist/es/components/src/{_comp/SideTransition.d.ts → transition/transition-side.d.ts} +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ChatSenderProps {
|
|
2
|
+
/** 内容 (v-model)*/
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
/** 加载中 */
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
/** 自动聚焦 */
|
|
7
|
+
autofocus?: boolean;
|
|
8
|
+
/** 占位符 */
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
/** 是否上下结构 */
|
|
11
|
+
updown?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ChatSenderSlots {
|
|
14
|
+
/** 额外操作 */
|
|
15
|
+
extra?: () => any;
|
|
16
|
+
}
|
|
17
|
+
export interface ChatSenderEmits {
|
|
18
|
+
/** 发送 */
|
|
19
|
+
send: [];
|
|
20
|
+
/** 停止 */
|
|
21
|
+
stop: [];
|
|
22
|
+
}
|
|
23
|
+
export interface ChatSenderExpose {
|
|
24
|
+
}
|
|
@@ -2,7 +2,7 @@ import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
|
2
2
|
import "../../../hooks/index.mjs";
|
|
3
3
|
import t from "../../../icons/src/right.vue.mjs";
|
|
4
4
|
import "../../../icons/index.mjs";
|
|
5
|
-
import n from "../
|
|
5
|
+
import { STransition as n } from "../transition/index.mjs";
|
|
6
6
|
import { collapseContextKey as r } from "./types.mjs";
|
|
7
7
|
import { applyVShow as i, child as a, computed as o, createComponent as s, createInvoker as c, createSlot as l, defineVaporComponent as u, delegateEvents as d, inject as f, next as p, renderEffect as m, setClass as h, setInsertionState as g, setStyle as _, setText as v, template as y, toDisplayString as b, unref as x } from "vue";
|
|
8
8
|
//#region ../components/src/collapse/collapse-item.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
@@ -26,7 +26,7 @@ var T = /*@__PURE__*/ u({
|
|
|
26
26
|
}), g(A, null, 0), s(x(t)), m(() => h(j, x(y).e("header-title"))), g(j, null, 0), l("title", null, () => {
|
|
27
27
|
let e = S();
|
|
28
28
|
return m(() => v(e, b(u.title))), e;
|
|
29
|
-
}), m(() => h(M, x(y).e("extra"))), g(M, null, 0), l("extra"), k.$evtclick = c(D), g(O, null, 1), s(n,
|
|
29
|
+
}), m(() => h(M, x(y).e("extra"))), g(M, null, 0), l("extra"), k.$evtclick = c(D), g(O, null, 1), s(x(n), { type: "height" }, () => {
|
|
30
30
|
let e = C();
|
|
31
31
|
return m(() => h(e, x(y).e("content"))), g(e, null, 0), l(), i(e, () => E.value), e;
|
|
32
32
|
}), O;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
2
|
import "../../../hooks/index.mjs";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import r from "../../../icons/src/calendar.vue.mjs";
|
|
6
|
-
import i from "../../../icons/src/close.vue.mjs";
|
|
3
|
+
import t from "../../../icons/src/calendar.vue.mjs";
|
|
4
|
+
import n from "../../../icons/src/close.vue.mjs";
|
|
7
5
|
import "../../../icons/index.mjs";
|
|
6
|
+
import { formItemContextKey as r } from "../form/types.mjs";
|
|
7
|
+
import { useFormItem as i } from "../form/use-form-item.mjs";
|
|
8
8
|
import { configProviderContextKey as a } from "../config-provider/types.mjs";
|
|
9
9
|
import "../config-provider/index.mjs";
|
|
10
10
|
import { SPopover as o } from "../popover/index.mjs";
|
|
@@ -53,7 +53,7 @@ var O = /*@__PURE__*/ m({
|
|
|
53
53
|
emits: /*@__PURE__*/ h(["change", "clear"], ["update:modelValue"]),
|
|
54
54
|
setup(m, { emit: oe }) {
|
|
55
55
|
E.extend(xe), E.extend(ve), E.extend(be), E.extend(ye);
|
|
56
|
-
let h = m, C = oe, O = e("date-picker"), k = me(m, "modelValue"), Ee = se(a, void 0), De = u(() => Ee?.inputFilled?.value || h.filled), { size: Oe, error: ke } = fe(h), { mergedSize: Ae, mergedError: je } =
|
|
56
|
+
let h = m, C = oe, O = e("date-picker"), k = me(m, "modelValue"), Ee = se(a, void 0), De = u(() => Ee?.inputFilled?.value || h.filled), { size: Oe, error: ke } = fe(h), { mergedSize: Ae, mergedError: je } = i({
|
|
57
57
|
size: Oe,
|
|
58
58
|
error: ke
|
|
59
59
|
}), A = _(!1), Me = () => {
|
|
@@ -243,7 +243,7 @@ var O = /*@__PURE__*/ m({
|
|
|
243
243
|
}, Ye = (e) => Y(e, !1), Xe = () => X(!1), Ze = (e) => Y(e, !0, 0), Qe = () => X(!0, 0), $e = (e) => Y(e, !0, 1), et = () => X(!0, 1), Z = () => {
|
|
244
244
|
let e = k.value;
|
|
245
245
|
P.value = Array.isArray(e) ? [...e] : e, C("change", e), Q("change"), B(!1);
|
|
246
|
-
}, tt = se(
|
|
246
|
+
}, tt = se(r, null), Q = (e) => {
|
|
247
247
|
tt?.validate(e).catch(() => {});
|
|
248
248
|
};
|
|
249
249
|
ge(k, (e) => {
|
|
@@ -315,41 +315,41 @@ var O = /*@__PURE__*/ m({
|
|
|
315
315
|
})), 2565), 2309), 2053), 1797), 1541), 1285), 1029), e.$evtmousedown = _e(() => {}, ["prevent"]), e;
|
|
316
316
|
},
|
|
317
317
|
default: () => f(() => !H.value, () => {
|
|
318
|
-
let e = Ce(),
|
|
319
|
-
return
|
|
320
|
-
let
|
|
318
|
+
let e = Ce(), r = ae(e);
|
|
319
|
+
return r.$evtinput = p(Ye), g(r, "blur", Xe), g(r, "click", T(V, ["stop"])), v(() => {
|
|
320
|
+
let t = w(O), n = m.disabled;
|
|
321
321
|
y(e, [
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
]), S(
|
|
322
|
+
t.e("wrapper"),
|
|
323
|
+
t.is("disabled", n),
|
|
324
|
+
t.is("range", H.value),
|
|
325
|
+
t.is("error", w(je)),
|
|
326
|
+
t.is("filled", De.value)
|
|
327
|
+
]), S(r, Re.value), x(r, "clearable", m.clearable), x(r, "placeholder", Be.value), x(r, "disabled", n), y(r, [t.e("input")]);
|
|
328
328
|
}), b(e, null, 1), f(() => A.value && !!k.value && m.clearable, () => {
|
|
329
329
|
let e = Se();
|
|
330
|
-
return v(() => y(e, [w(O).e("close")])), b(e, null, 0), d(w(
|
|
330
|
+
return v(() => y(e, [w(O).e("close")])), b(e, null, 0), d(w(n)), g(e, "click", T(Pe, ["stop"])), e;
|
|
331
331
|
}, () => {
|
|
332
332
|
let e = D();
|
|
333
|
-
return v(() => y(e, [w(O).e("icon")])), b(e, null, 0), d(w(
|
|
333
|
+
return v(() => y(e, [w(O).e("icon")])), b(e, null, 0), d(w(t)), e;
|
|
334
334
|
}, 261), g(e, "mouseenter", Me), g(e, "mouseleave", Ne), e;
|
|
335
335
|
}, () => {
|
|
336
|
-
let e = we(),
|
|
337
|
-
|
|
338
|
-
let o = pe(
|
|
336
|
+
let e = we(), r = ae(e), i = ce(r, 1), a = ce(i, 2);
|
|
337
|
+
r.$evtinput = p(Ze), g(r, "blur", Qe), g(r, "click", T(V, ["stop"]));
|
|
338
|
+
let o = pe(i);
|
|
339
339
|
return a.$evtinput = p($e), g(a, "blur", et), g(a, "click", T(V, ["stop"])), v(() => {
|
|
340
|
-
let
|
|
340
|
+
let t = w(O), n = m.disabled, i = ze.value, s = m.clearable, c = Ve.value, l = [t.e("input")];
|
|
341
341
|
y(e, [
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
]), S(
|
|
342
|
+
t.e("wrapper"),
|
|
343
|
+
t.is("disabled", n),
|
|
344
|
+
t.is("range", H.value),
|
|
345
|
+
t.is("error", w(je))
|
|
346
|
+
]), S(r, i[0]), x(r, "clearable", s), x(r, "placeholder", c[0]), x(r, "disabled", n), y(r, l), ue(o, de(m.textSeparator)), S(a, i[1]), x(a, "clearable", s), x(a, "placeholder", c[1]), x(a, "disabled", n), y(a, l);
|
|
347
347
|
}), b(e, null, 3), f(() => A.value && !!k.value && m.clearable, () => {
|
|
348
348
|
let e = Se();
|
|
349
|
-
return v(() => y(e, [w(O).e("close")])), b(e, null, 0), d(w(
|
|
349
|
+
return v(() => y(e, [w(O).e("close")])), b(e, null, 0), d(w(n)), g(e, "click", T(Pe, ["stop"])), e.$evtmousedown = _e(() => {}, ["prevent"]), e;
|
|
350
350
|
}, () => {
|
|
351
351
|
let e = D();
|
|
352
|
-
return v(() => y(e, [w(O).e("icon")])), b(e, null, 0), d(w(
|
|
352
|
+
return v(() => y(e, [w(O).e("icon")])), b(e, null, 0), d(w(t)), e;
|
|
353
353
|
}, 773), g(e, "mouseenter", Me), g(e, "mouseleave", Ne), e;
|
|
354
354
|
}, 645)
|
|
355
355
|
}), z, null, "popoverRef"), $;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
2
|
import "../../../hooks/index.mjs";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import r from "../../../icons/src/calendar.vue.mjs";
|
|
6
|
-
import i from "../../../icons/src/close.vue.mjs";
|
|
3
|
+
import t from "../../../icons/src/calendar.vue.mjs";
|
|
4
|
+
import n from "../../../icons/src/close.vue.mjs";
|
|
7
5
|
import "../../../icons/index.mjs";
|
|
6
|
+
import { formItemContextKey as r } from "../form/types.mjs";
|
|
7
|
+
import { useFormItem as i } from "../form/use-form-item.mjs";
|
|
8
8
|
import { configProviderContextKey as a } from "../config-provider/types.mjs";
|
|
9
9
|
import "../config-provider/index.mjs";
|
|
10
10
|
import { SPopover as o } from "../popover/index.mjs";
|
|
@@ -48,7 +48,7 @@ var k = /*@__PURE__*/ m({
|
|
|
48
48
|
emits: /*@__PURE__*/ h(["change", "clear"], ["update:modelValue"]),
|
|
49
49
|
setup(m, { emit: te }) {
|
|
50
50
|
D.extend(pe), D.extend(he), D.extend(fe), D.extend(me);
|
|
51
|
-
let h = m, w = te, k = e("datetime-picker"), A = ce(m, "modelValue"), be = ne(a, void 0), xe = u(() => be?.inputFilled?.value || h.filled), { size: Se, error: Ce } = oe(h), { mergedSize: we, mergedError: j } =
|
|
51
|
+
let h = m, w = te, k = e("datetime-picker"), A = ce(m, "modelValue"), be = ne(a, void 0), xe = u(() => be?.inputFilled?.value || h.filled), { size: Se, error: Ce } = oe(h), { mergedSize: we, mergedError: j } = i({
|
|
52
52
|
size: Se,
|
|
53
53
|
error: Ce
|
|
54
54
|
}), M = v(!1), Te = () => {
|
|
@@ -202,7 +202,7 @@ var k = /*@__PURE__*/ m({
|
|
|
202
202
|
}, Ve = (e) => Y(e, !1), He = () => X(!1), Ue = (e) => Y(e, !0, 0), We = () => X(!0, 0), Ge = (e) => Y(e, !0, 1), Ke = () => X(!0, 1), Z = () => {
|
|
203
203
|
let e = A.value;
|
|
204
204
|
I.value = Array.isArray(e) ? [...e] : e, w("change", e), Q("change"), H(!1);
|
|
205
|
-
}, qe = ne(
|
|
205
|
+
}, qe = ne(r, null), Q = (e) => {
|
|
206
206
|
qe?.validate(e).catch(() => {});
|
|
207
207
|
};
|
|
208
208
|
ue(A, (e) => {
|
|
@@ -243,41 +243,41 @@ var k = /*@__PURE__*/ m({
|
|
|
243
243
|
})), 1285), 1029), e.$evtmousedown = de(() => {}, ["prevent"]), e;
|
|
244
244
|
},
|
|
245
245
|
default: () => f(() => !W.value, () => {
|
|
246
|
-
let e = _e(),
|
|
247
|
-
return
|
|
248
|
-
let
|
|
246
|
+
let e = _e(), r = ee(e);
|
|
247
|
+
return r.$evtinput = p(Ve), _(r, "blur", He), _(r, "click", E(U, ["stop"])), y(() => {
|
|
248
|
+
let t = T(k), n = m.disabled;
|
|
249
249
|
b(e, [
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
]), C(
|
|
250
|
+
t.e("wrapper"),
|
|
251
|
+
t.is("disabled", n),
|
|
252
|
+
t.is("range", W.value),
|
|
253
|
+
t.is("error", T(j)),
|
|
254
|
+
t.is("filled", xe.value)
|
|
255
|
+
]), C(r, Me.value), S(r, "clearable", m.clearable), S(r, "placeholder", Pe.value), S(r, "disabled", n), b(r, [t.e("input")]);
|
|
256
256
|
}), x(e, null, 1), f(() => M.value && !!A.value && m.clearable, () => {
|
|
257
257
|
let e = ge();
|
|
258
|
-
return y(() => b(e, [T(k).e("close")])), x(e, null, 0), d(T(
|
|
258
|
+
return y(() => b(e, [T(k).e("close")])), x(e, null, 0), d(T(n)), _(e, "click", E(De, ["stop"])), e;
|
|
259
259
|
}, () => {
|
|
260
260
|
let e = O();
|
|
261
|
-
return y(() => b(e, [T(k).e("icon")])), x(e, null, 0), d(T(
|
|
261
|
+
return y(() => b(e, [T(k).e("icon")])), x(e, null, 0), d(T(t)), e;
|
|
262
262
|
}, 261), _(e, "mouseenter", Te), _(e, "mouseleave", Ee), e;
|
|
263
263
|
}, () => {
|
|
264
|
-
let e = ve(),
|
|
265
|
-
|
|
266
|
-
let o = se(
|
|
264
|
+
let e = ve(), r = ee(e), i = g(r, 1), a = g(i, 2);
|
|
265
|
+
r.$evtinput = p(Ue), _(r, "blur", We), _(r, "click", E(U, ["stop"]));
|
|
266
|
+
let o = se(i);
|
|
267
267
|
return a.$evtinput = p(Ge), _(a, "blur", Ke), _(a, "click", E(U, ["stop"])), y(() => {
|
|
268
|
-
let
|
|
268
|
+
let t = T(k), n = m.disabled, i = Ne.value, s = m.clearable, c = Fe.value, l = [t.e("input")];
|
|
269
269
|
b(e, [
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
]), C(
|
|
270
|
+
t.e("wrapper"),
|
|
271
|
+
t.is("disabled", n),
|
|
272
|
+
t.is("range", W.value),
|
|
273
|
+
t.is("error", T(j))
|
|
274
|
+
]), C(r, i[0]), S(r, "clearable", s), S(r, "placeholder", c[0]), S(r, "disabled", n), b(r, l), ie(o, ae(m.textSeparator)), C(a, i[1]), S(a, "clearable", s), S(a, "placeholder", c[1]), S(a, "disabled", n), b(a, l);
|
|
275
275
|
}), x(e, null, 3), f(() => M.value && !!A.value && m.clearable, () => {
|
|
276
276
|
let e = ge();
|
|
277
|
-
return y(() => b(e, [T(k).e("close")])), x(e, null, 0), d(T(
|
|
277
|
+
return y(() => b(e, [T(k).e("close")])), x(e, null, 0), d(T(n)), _(e, "click", E(De, ["stop"])), e.$evtmousedown = de(() => {}, ["prevent"]), e;
|
|
278
278
|
}, () => {
|
|
279
279
|
let e = O();
|
|
280
|
-
return y(() => b(e, [T(k).e("icon")])), x(e, null, 0), d(T(
|
|
280
|
+
return y(() => b(e, [T(k).e("icon")])), x(e, null, 0), d(T(t)), e;
|
|
281
281
|
}, 773), _(e, "mouseenter", Te), _(e, "mouseleave", Ee), e;
|
|
282
282
|
}, 645)
|
|
283
283
|
}), V, null, "popoverRef"), $;
|
package/dist/es/components/src/drawer/drawer.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -8,13 +8,12 @@ import i from "../../../icons/src/close.vue.mjs";
|
|
|
8
8
|
import "../../../icons/index.mjs";
|
|
9
9
|
import a from "../button/button.vue.mjs";
|
|
10
10
|
import o from "../scrollbar/scrollbar.vue.mjs";
|
|
11
|
-
import s from "../
|
|
12
|
-
import ee from "
|
|
13
|
-
import { VaporTeleport as c, applyVShow as l, child as u, computed as d, createComponent as f, createIf as p, createInvoker as m, createSlot as h, createTemplateRefSetter as te, defineVaporComponent as g, delegateEvents as _, mergeModels as v, next as y, nextTick as b, onMounted as ne, onUnmounted as re, ref as x, renderEffect as S, setClass as C, setInsertionState as w, setStyle as T, setText as ie, template as E, toDisplayString as D, txt as ae, unref as O, useModel as k, watch as A } from "vue";
|
|
11
|
+
import { STransition as s } from "../transition/index.mjs";
|
|
12
|
+
import { VaporTeleport as ee, applyVShow as c, child as l, computed as u, createComponent as d, createIf as f, createInvoker as p, createSlot as m, createTemplateRefSetter as h, defineVaporComponent as g, delegateEvents as _, mergeModels as v, next as y, nextTick as b, onMounted as x, onUnmounted as te, ref as S, renderEffect as C, setClass as w, setInsertionState as T, setStyle as E, setText as D, template as O, toDisplayString as ne, txt as re, unref as k, useModel as ie, watch as A } from "vue";
|
|
14
13
|
//#region ../components/src/drawer/drawer.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
15
|
-
var j =
|
|
14
|
+
var j = O("<div>"), ae = O("<div> "), oe = O("<div><div><div></div><div></div><div>");
|
|
16
15
|
_("click", "mousedown");
|
|
17
|
-
var
|
|
16
|
+
var M = /*@__PURE__*/ g({
|
|
18
17
|
name: "SDrawer",
|
|
19
18
|
__name: "drawer",
|
|
20
19
|
props: /*@__PURE__*/ v({
|
|
@@ -67,42 +66,42 @@ var N = /*@__PURE__*/ g({
|
|
|
67
66
|
"closed"
|
|
68
67
|
], ["update:modelValue"]),
|
|
69
68
|
setup(g, { emit: _ }) {
|
|
70
|
-
let v = g,
|
|
71
|
-
|
|
72
|
-
let
|
|
73
|
-
zIndex:
|
|
69
|
+
let v = g, O = _, M = t("drawer"), { nextZIndex: se } = r(), N = S(0), { lockScroll: ce, unlockScroll: le } = n(), P = ie(g, "modelValue"), F = S(!1), I = S(!1), L = S(!1), R = S(""), z = S("");
|
|
70
|
+
R.value = e(v.width), z.value = e(v.height);
|
|
71
|
+
let B = u(() => ({
|
|
72
|
+
zIndex: N.value,
|
|
74
73
|
position: v.to === "body" ? "fixed" : "absolute"
|
|
75
|
-
})),
|
|
74
|
+
})), V = u(() => {
|
|
76
75
|
let e = { ...v.drawerStyle };
|
|
77
|
-
return (v.placement === "left" || v.placement === "right") && (e.width =
|
|
78
|
-
}),
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
|
|
76
|
+
return (v.placement === "left" || v.placement === "right") && (e.width = R.value), (v.placement === "top" || v.placement === "bottom") && (e.height = z.value), e;
|
|
77
|
+
}), H = () => {
|
|
78
|
+
O("opened");
|
|
79
|
+
}, U = () => {
|
|
80
|
+
I.value = !1, O("closed"), b(() => {
|
|
82
81
|
Z.value && (Z.value.style.transition = "", Z.value.style.transform = ""), le();
|
|
83
82
|
});
|
|
84
83
|
}, W = () => {
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
v.closeOnMask && (W(),
|
|
88
|
-
},
|
|
89
|
-
e.preventDefault(),
|
|
90
|
-
},
|
|
91
|
-
if (
|
|
92
|
-
if (v.placement === "right" && (
|
|
84
|
+
P.value = !1, O("close");
|
|
85
|
+
}, G = () => {
|
|
86
|
+
v.closeOnMask && (W(), O("maskClick"));
|
|
87
|
+
}, ue = (e) => {
|
|
88
|
+
e.preventDefault(), L.value = !0;
|
|
89
|
+
}, K = (e) => {
|
|
90
|
+
if (L.value) {
|
|
91
|
+
if (v.placement === "right" && (R.value = X(window.innerWidth - e.clientX, v.minWidth, v.maxWidth, !0), $(R.value, !0)), v.placement === "left") {
|
|
93
92
|
let t = e.clientX;
|
|
94
|
-
|
|
93
|
+
R.value = X(t, v.minWidth, v.maxWidth, !0), $(R.value, !0);
|
|
95
94
|
}
|
|
96
|
-
if (v.placement === "bottom" && (
|
|
95
|
+
if (v.placement === "bottom" && (z.value = X(window.innerHeight - e.clientY, v.minHeight, v.maxHeight, !1), $(z.value, !0)), v.placement === "top") {
|
|
97
96
|
let t = e.clientY;
|
|
98
|
-
|
|
97
|
+
z.value = X(t, v.minHeight, v.maxHeight, !1), $(z.value, !0);
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
}, q = (e) => {
|
|
104
|
-
e.key === "Escape" && v.closeOnEsc && F.value && (W(), E("esc"));
|
|
100
|
+
}, q = () => {
|
|
101
|
+
L.value &&= !1;
|
|
105
102
|
}, J = (e) => {
|
|
103
|
+
e.key === "Escape" && v.closeOnEsc && P.value && (W(), O("esc"));
|
|
104
|
+
}, de = (e) => {
|
|
106
105
|
let t = String(e).trim().match(/^(\d*\.?\d+)(.*)$/);
|
|
107
106
|
return t ? {
|
|
108
107
|
num: parseFloat(t[1]),
|
|
@@ -112,7 +111,7 @@ var N = /*@__PURE__*/ g({
|
|
|
112
111
|
unit: "px"
|
|
113
112
|
};
|
|
114
113
|
}, Y = (e, t) => {
|
|
115
|
-
let { num: n, unit: r } =
|
|
114
|
+
let { num: n, unit: r } = de(e), i = t ? window.innerWidth : window.innerHeight;
|
|
116
115
|
switch (r) {
|
|
117
116
|
case "%":
|
|
118
117
|
case "vw":
|
|
@@ -123,73 +122,74 @@ var N = /*@__PURE__*/ g({
|
|
|
123
122
|
}, X = (e, t, n, r) => {
|
|
124
123
|
let i = Y(t, r), a = Y(n, r);
|
|
125
124
|
return Math.max(i, Math.min(e, a)) + "px";
|
|
126
|
-
}, Z =
|
|
125
|
+
}, Z = S(null), Q = () => {
|
|
127
126
|
v.to === "body" ? Z.value = document.querySelector("#app") : v.to instanceof HTMLElement ? Z.value = v.to : typeof v.to == "string" && (Z.value = document.querySelector(v.to));
|
|
128
127
|
}, $ = (e, t) => {
|
|
129
128
|
v.push && Z.value && (t ? (Z.value.style.transition = "transform 0.3s var(--s-bezier-out)", v.placement === "left" ? Z.value.style.transform = `translateX(${e})` : v.placement === "right" ? Z.value.style.transform = `translateX(-${e})` : v.placement === "top" ? Z.value.style.transform = `translateY(${e})` : v.placement === "bottom" && (Z.value.style.transform = `translateY(-${e})`)) : (Z.value.style.transition = "transform 0.3s var(--s-bezier-in)", Z.value.style.transform = "translate(0,0)"));
|
|
130
129
|
};
|
|
131
|
-
A(() => v.to, Q), A(() =>
|
|
132
|
-
e ? (
|
|
133
|
-
|
|
134
|
-
})) : (
|
|
130
|
+
A(() => v.to, Q), A(() => P.value, (e) => {
|
|
131
|
+
e ? (N.value = se(), ce(), I.value = !0, b(() => {
|
|
132
|
+
F.value = !0, v.placement === "left" || v.placement === "right" ? $(V.value.width, !0) : (v.placement === "top" || v.placement === "bottom") && $(V.value.height, !0), v.closeOnEsc && (document.removeEventListener("keydown", J), document.addEventListener("keydown", J)), O("open");
|
|
133
|
+
})) : (F.value = !1, document.removeEventListener("keydown", J), $("0", !1));
|
|
135
134
|
}, { immediate: !0 }), A(() => v.resizable, (e) => {
|
|
136
|
-
e ? (window.addEventListener("mousemove",
|
|
137
|
-
}, { immediate: !0 }),
|
|
135
|
+
e ? (window.addEventListener("mousemove", K), window.addEventListener("mouseup", q)) : (window.removeEventListener("mousemove", K), window.removeEventListener("mouseup", q));
|
|
136
|
+
}, { immediate: !0 }), x(() => {
|
|
138
137
|
Q();
|
|
139
|
-
}),
|
|
140
|
-
document.removeEventListener("keydown",
|
|
138
|
+
}), te(() => {
|
|
139
|
+
document.removeEventListener("keydown", J), window.removeEventListener("mousemove", K), window.removeEventListener("mouseup", q);
|
|
141
140
|
});
|
|
142
|
-
let
|
|
143
|
-
return
|
|
141
|
+
let fe = h();
|
|
142
|
+
return d(ee, {
|
|
144
143
|
to: () => g.to,
|
|
145
144
|
defer: ""
|
|
146
145
|
}, () => {
|
|
147
146
|
let e = j();
|
|
148
|
-
return
|
|
149
|
-
|
|
150
|
-
}),
|
|
147
|
+
return C(() => {
|
|
148
|
+
w(e, [k(M).e("container")]), E(e, B.value);
|
|
149
|
+
}), T(e, null, 0), d(k(s), { type: "opacity" }, () => f(() => g.mask && F.value, () => {
|
|
151
150
|
let e = j();
|
|
152
|
-
return e.$evtclick =
|
|
153
|
-
|
|
151
|
+
return e.$evtclick = p(G), C(() => {
|
|
152
|
+
w(e, [k(M).e("mask")]), E(e, g.maskStyle);
|
|
154
153
|
}), e;
|
|
155
|
-
}, null, 129)),
|
|
154
|
+
}, null, 129)), T(e, null, 1), d(k(s), {
|
|
155
|
+
type: "side",
|
|
156
156
|
placement: () => g.placement,
|
|
157
|
-
onAfterLeave: () =>
|
|
158
|
-
onAfterEnter: () =>
|
|
157
|
+
onAfterLeave: () => U,
|
|
158
|
+
onAfterEnter: () => H
|
|
159
159
|
}, () => {
|
|
160
|
-
let e = oe(), t =
|
|
161
|
-
return
|
|
162
|
-
let t =
|
|
163
|
-
|
|
164
|
-
}),
|
|
160
|
+
let e = oe(), t = l(e, 1), n = l(t), r = y(n, 1), s = y(r, 2);
|
|
161
|
+
return C(() => {
|
|
162
|
+
let t = k(M);
|
|
163
|
+
w(e, [t.b(), t.m(g.placement)]), E(e, V.value);
|
|
164
|
+
}), T(e, 0, 0), f(() => g.resizable, () => {
|
|
165
165
|
let e = j();
|
|
166
|
-
return e.$evtmousedown =
|
|
167
|
-
let t =
|
|
168
|
-
|
|
166
|
+
return e.$evtmousedown = p(ue), C(() => {
|
|
167
|
+
let t = k(M);
|
|
168
|
+
w(e, [t.e("trigger"), t.is("dragging", L.value)]);
|
|
169
169
|
}), e;
|
|
170
|
-
}),
|
|
171
|
-
let e =
|
|
172
|
-
|
|
173
|
-
}),
|
|
174
|
-
let e =
|
|
175
|
-
return
|
|
176
|
-
|
|
170
|
+
}), C(() => {
|
|
171
|
+
let e = k(M);
|
|
172
|
+
w(t, [e.e("wrapper")]), w(n, [e.e("header")]);
|
|
173
|
+
}), T(n, null, 0), m("header", null, () => {
|
|
174
|
+
let e = ae(), t = re(e);
|
|
175
|
+
return C(() => {
|
|
176
|
+
w(e, [k(M).e("title")]), D(t, ne(g.header));
|
|
177
177
|
}), e;
|
|
178
|
-
}),
|
|
178
|
+
}), T(n, null, 1), f(() => g.closable, () => d(a, {
|
|
179
179
|
circle: "",
|
|
180
180
|
text: "",
|
|
181
181
|
size: "small",
|
|
182
182
|
onClick: () => W
|
|
183
|
-
}, { icon: () =>
|
|
183
|
+
}, { icon: () => d(k(i)) })), C(() => w(r, [k(M).e("body")])), T(r, null, 0), f(() => g.bodyScroll, () => d(o, { $: [() => ({ ...g.scrollbarProps })] }, () => {
|
|
184
184
|
let e = j();
|
|
185
|
-
return
|
|
185
|
+
return C(() => w(e, [k(M).e("content")])), T(e, null, 0), m(), e;
|
|
186
186
|
}), () => {
|
|
187
187
|
let e = j();
|
|
188
|
-
return
|
|
189
|
-
}, 1029),
|
|
190
|
-
}),
|
|
188
|
+
return C(() => w(e, [k(M).e("content")])), T(e, null, 0), m(), e;
|
|
189
|
+
}, 1029), C(() => w(s, [k(M).e("footer")])), T(s, null, 0), m("footer"), c(e, () => F.value), e;
|
|
190
|
+
}), c(e, () => I.value), fe(e, "drawerContainerRef"), e;
|
|
191
191
|
}, !0);
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
194
|
//#endregion
|
|
195
|
-
export {
|
|
195
|
+
export { M as default };
|
package/dist/es/components/src/form/form-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import { getSize as e } from "../../../utils/src/tool.mjs";
|
|
|
2
2
|
import "../../../utils/index.mjs";
|
|
3
3
|
import { useNamespace as t } from "../../../hooks/src/use-namespace.mjs";
|
|
4
4
|
import "../../../hooks/index.mjs";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import o from "../../../icons/src/question.vue.mjs";
|
|
5
|
+
import n from "../../../icons/src/asterisk.vue.mjs";
|
|
6
|
+
import r from "../../../icons/src/question.vue.mjs";
|
|
8
7
|
import "../../../icons/index.mjs";
|
|
8
|
+
import { formContextKey as i, formItemContextKey as a, formItemStatusContextKey as o } from "./types.mjs";
|
|
9
9
|
import { STooltip as s } from "../tooltip/index.mjs";
|
|
10
10
|
import { child as c, computed as l, createComponent as u, createIf as d, createSlot as f, defineVaporComponent as p, inject as m, onMounted as h, onUnmounted as g, provide as _, ref as v, renderEffect as y, setClass as b, setInsertionState as x, setStyle as S, setText as C, template as w, toDisplayString as T, txt as E, unref as D } from "vue";
|
|
11
11
|
import O from "async-validator";
|
|
@@ -26,7 +26,7 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
setup(p, { expose: w }) {
|
|
29
|
-
let P = p, F = t("form-item"), I = m(
|
|
29
|
+
let P = p, F = t("form-item"), I = m(i), L = l(() => I?.labelPosition?.value === "top" ? "" : P.labelWidth || I?.labelWidth?.value), R = l(() => P.labelAlign ? P.labelAlign : I?.labelAlign?.value ? I?.labelAlign?.value : I?.labelPosition?.value === "top" ? "left" : "right"), z = null, B = l(() => {
|
|
30
30
|
let e = I?.model?.value;
|
|
31
31
|
return e && P.field && e[P.field] !== void 0 ? e[P.field] : null;
|
|
32
32
|
}), V = l(() => {
|
|
@@ -65,7 +65,7 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
65
65
|
resetField: q,
|
|
66
66
|
clearValidate: K
|
|
67
67
|
};
|
|
68
|
-
_(
|
|
68
|
+
_(a, Y), _(o, {
|
|
69
69
|
size: I?.size,
|
|
70
70
|
error: J
|
|
71
71
|
}), h(() => {
|
|
@@ -90,22 +90,22 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
90
90
|
e.m(n?.size?.value)
|
|
91
91
|
]);
|
|
92
92
|
}), x(X, 0, 0), d(() => W.value || p.label || p.tooltip, () => {
|
|
93
|
-
let t = j(),
|
|
93
|
+
let t = j(), i = c(t);
|
|
94
94
|
return y(() => {
|
|
95
|
-
let
|
|
96
|
-
b(t, [
|
|
97
|
-
}), x(
|
|
95
|
+
let n = D(F);
|
|
96
|
+
b(t, [n.e("label-wrapper")]), b(i, [n.e("label"), n.m("align-" + R.value)]), S(i, { width: D(e)(L.value) });
|
|
97
|
+
}), x(i, null, 0), d(() => W.value, () => {
|
|
98
98
|
let e = k();
|
|
99
|
-
return y(() => b(e, [D(F).e("required")])), x(e, null, 0), u(D(
|
|
100
|
-
}), x(
|
|
99
|
+
return y(() => b(e, [D(F).e("required")])), x(e, null, 0), u(D(n)), e;
|
|
100
|
+
}), x(i, null, 1), f("label", { label: () => p.label }, () => {
|
|
101
101
|
let e = A();
|
|
102
102
|
return y(() => C(e, T(p.label))), e;
|
|
103
|
-
}), x(
|
|
103
|
+
}), x(i, null, 2), d(() => p.tooltip, () => u(D(s), {
|
|
104
104
|
content: () => p.tooltip,
|
|
105
105
|
mini: ""
|
|
106
106
|
}, () => {
|
|
107
107
|
let e = k();
|
|
108
|
-
return y(() => b(e, [D(F).e("tooltip")])), x(e, null, 0), u(D(
|
|
108
|
+
return y(() => b(e, [D(F).e("tooltip")])), x(e, null, 0), u(D(r)), e;
|
|
109
109
|
})), t;
|
|
110
110
|
}), y(() => {
|
|
111
111
|
let e = D(F);
|
|
@@ -3,6 +3,6 @@ export declare const useFormItem: ({ size, error, }?: {
|
|
|
3
3
|
size?: Ref<"mini" | "small" | "medium" | "large">;
|
|
4
4
|
error?: Ref<boolean>;
|
|
5
5
|
}) => {
|
|
6
|
-
mergedSize: ComputedRef<"small" | "
|
|
6
|
+
mergedSize: ComputedRef<"small" | "medium" | "large" | "mini" | undefined>;
|
|
7
7
|
mergedError: ComputedRef<boolean | undefined>;
|
|
8
8
|
};
|
package/dist/es/components/src/grid/grid-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
2
|
import "../../../hooks/index.mjs";
|
|
3
3
|
import { gridContextKey as t } from "./types.mjs";
|
|
4
|
-
import { computed as n, createSlot as r, defineVaporComponent as i, inject as a, onMounted as o, onUnmounted as s, renderEffect as c, setClass as l, setInsertionState as u,
|
|
4
|
+
import { computed as n, createSlot as r, defineVaporComponent as i, inject as a, onMounted as o, onUnmounted as s, renderEffect as c, setClass as l, setInsertionState as u, setStaticTemplateRef as d, setStyle as f, template as p, unref as m, useId as h, useTemplateRef as g, watch as _ } from "vue";
|
|
5
5
|
//#region ../components/src/grid/grid-item.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
6
|
-
var
|
|
6
|
+
var v = p("<div>", 1), y = /*@__PURE__*/ i({
|
|
7
7
|
name: "SGridItem",
|
|
8
8
|
__name: "grid-item",
|
|
9
9
|
props: {
|
|
@@ -11,37 +11,38 @@ var g = f("<div>", 1), _ = /*@__PURE__*/ i({
|
|
|
11
11
|
offset: { default: 0 }
|
|
12
12
|
},
|
|
13
13
|
setup(i) {
|
|
14
|
-
let
|
|
15
|
-
if (!
|
|
16
|
-
let e =
|
|
14
|
+
let p = i, y = g("gridItemRef"), b = e("grid-item"), x = "grid-item-" + h(), S = a(t, {}), C = n(() => {
|
|
15
|
+
if (!S?.positionList) return {};
|
|
16
|
+
let e = S?.positionList.value[x];
|
|
17
17
|
return e ? { gridColumn: `${e.start} / ${e.end}` } : {};
|
|
18
|
-
}),
|
|
19
|
-
|
|
20
|
-
...
|
|
21
|
-
uid:
|
|
18
|
+
}), w = () => {
|
|
19
|
+
S?.addGridItem?.({
|
|
20
|
+
...p,
|
|
21
|
+
uid: x,
|
|
22
|
+
el: y.value ?? void 0
|
|
22
23
|
});
|
|
23
24
|
};
|
|
24
25
|
o(() => {
|
|
25
|
-
|
|
26
|
-
}),
|
|
27
|
-
span:
|
|
28
|
-
offset:
|
|
26
|
+
w();
|
|
27
|
+
}), _(() => ({
|
|
28
|
+
span: p.span,
|
|
29
|
+
offset: p.offset
|
|
29
30
|
}), () => {
|
|
30
|
-
|
|
31
|
-
...
|
|
32
|
-
uid:
|
|
31
|
+
S?.updateGridItem?.({
|
|
32
|
+
...p,
|
|
33
|
+
uid: x
|
|
33
34
|
});
|
|
34
35
|
}), s(() => {
|
|
35
|
-
|
|
36
|
-
...
|
|
37
|
-
uid:
|
|
36
|
+
S?.removeGridItem?.({
|
|
37
|
+
...p,
|
|
38
|
+
uid: x
|
|
38
39
|
});
|
|
39
40
|
});
|
|
40
|
-
let
|
|
41
|
+
let T = v();
|
|
41
42
|
return c(() => {
|
|
42
|
-
l(
|
|
43
|
-
}), u(
|
|
43
|
+
l(T, [m(b).b()]), f(T, C.value);
|
|
44
|
+
}), u(T, null, 0), r(), d(T, y, null, "gridItemRef"), T;
|
|
44
45
|
}
|
|
45
46
|
});
|
|
46
47
|
//#endregion
|
|
47
|
-
export {
|
|
48
|
+
export { y as default };
|