x-next 1.3.1 → 1.5.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/AI_USAGE.md +2 -2
- package/CHANGELOG.md +71 -0
- package/dist/_utils/constant.d.ts +1 -1
- package/dist/_utils/palette.d.ts +6 -14
- package/dist/components/alert/Alert.vue.d.ts +9 -9
- package/dist/components/alert/index.d.ts +6 -6
- package/dist/components/button/ButtonGroup.vue.d.ts +22 -18
- package/dist/components/date-picker/DatePanel.vue.d.ts +342 -1
- package/dist/components/date-picker/DatePicker.vue.d.ts +343 -2
- package/dist/components/date-picker/index.d.ts +1765 -1083
- package/dist/components/dropdown/DropdownButton.vue.d.ts +2 -1
- package/dist/components/dropdown/index.d.ts +3 -0
- package/dist/components/form-input-tag/index.d.ts +26 -25
- package/dist/components/form-input-tag/interface.d.ts +8 -0
- package/dist/components/link/Link.vue.d.ts +4 -4
- package/dist/components/link/index.d.ts +6 -6
- package/dist/components/message/index.d.ts +3 -3
- package/dist/components/message/message.vue.d.ts +1 -1
- package/dist/components/notification/Notification.d.ts +1 -1
- package/dist/components/notification/index.d.ts +3 -3
- package/dist/components/popconfirm/src/types.d.ts +1 -1
- package/dist/components/progress/Progress.vue.d.ts +3 -3
- package/dist/components/progress/index.d.ts +3 -3
- package/dist/components/steps/context.d.ts +9 -0
- package/dist/components/tabs/TabPane.vue.d.ts +2 -0
- package/dist/components/tabs/index.d.ts +6 -0
- package/dist/components/tabs/interface.d.ts +4 -0
- package/dist/components/tag/Tag.vue.d.ts +14 -0
- package/dist/components/tag/index.d.ts +9 -0
- package/dist/components/tag/interface.d.ts +5 -0
- package/dist/components/trend-chart/components/TrendChart.d.ts +127 -17
- package/dist/components/trend-chart/components/trend-chart-curve.d.ts +27 -7
- package/dist/components/trend-chart/components/trend-chart-labels.d.ts +4 -0
- package/dist/components/trend-chart/helpers/getPadding.d.ts +3 -2
- package/dist/components/trend-chart/index.d.ts +223 -28
- package/dist/components/trend-chart/props.d.ts +63 -5
- package/dist/es/_styles/palette-aliases.js +182 -127
- package/dist/es/_utils/palette.js +49 -43
- package/dist/es/components/_components/picker/input-range.vue2.js +10 -10
- package/dist/es/components/_components/picker/input.vue2.js +20 -20
- package/dist/es/components/_components/select-view/select-view.js +2 -2
- package/dist/es/components/alert/Alert.vue.js +2 -2
- package/dist/es/components/alert/Alert.vue2.js +21 -20
- package/dist/es/components/button/Button.js +17 -17
- package/dist/es/components/button/ButtonGroup.vue2.js +11 -9
- package/dist/es/components/date-picker/DatePanel.vue.js +71 -62
- package/dist/es/components/date-picker/DatePanel.vue2.js +50 -40
- package/dist/es/components/date-picker/DatePicker.vue2.js +1 -1
- package/dist/es/components/dropdown/Dropdown.vue2.js +11 -4
- package/dist/es/components/dropdown/DropdownButton.vue.js +8 -7
- package/dist/es/components/dropdown/DropdownButton.vue2.js +19 -17
- package/dist/es/components/dropdown/DropdownSubmenu.vue.js +18 -17
- package/dist/es/components/form/form-item-label.vue.js +25 -22
- package/dist/es/components/form/form-item-label.vue2.js +1 -1
- package/dist/es/components/form-checkbox/icon-check.js +12 -43
- package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
- package/dist/es/components/form-input/InputSearch.js +1 -1
- package/dist/es/components/form-input-number/InputNumber.js +4 -4
- package/dist/es/components/form-input-tag/InputTag.js +168 -147
- package/dist/es/components/form-input-tag/utils.js +21 -19
- package/dist/es/components/form-textarea/Textarea.vue2.js +1 -1
- package/dist/es/components/link/Link.vue2.js +1 -1
- package/dist/es/components/menu/MenuSubMenu.js +50 -36
- package/dist/es/components/menu/sub-menu-pop.vue2.js +30 -30
- package/dist/es/components/pagination/Pagination.js +73 -70
- package/dist/es/components/popconfirm/src/popup.vue.js +1 -1
- package/dist/es/components/progress/Progress.vue2.js +1 -1
- package/dist/es/components/steps/Step.vue2.js +51 -47
- package/dist/es/components/steps/Steps.vue2.js +22 -19
- package/dist/es/components/table/Table.js +1 -1
- package/dist/es/components/table/table-th.js +2 -2
- package/dist/es/components/tabs/TabPane.vue.js +11 -9
- package/dist/es/components/tabs/TabPane.vue2.js +28 -24
- package/dist/es/components/tabs/tabs-button.js +2 -2
- package/dist/es/components/tabs/tabs-nav.js +21 -19
- package/dist/es/components/tabs/tabs-tab.vue.js +10 -8
- package/dist/es/components/tag/Tag.vue.js +20 -20
- package/dist/es/components/tag/Tag.vue2.js +35 -28
- package/dist/es/components/time-picker/TimePanel.vue.js +30 -29
- package/dist/es/components/time-picker/TimePicker.vue2.js +1 -1
- package/dist/es/components/time-picker/TimeRangePanel.js +26 -23
- package/dist/es/components/trend-chart/components/TrendChart.js +208 -142
- package/dist/es/components/trend-chart/components/trend-chart-curve.js +124 -59
- package/dist/es/components/trend-chart/components/trend-chart-labels.js +43 -41
- package/dist/es/components/trend-chart/helpers/getPadding.js +3 -3
- package/dist/es/components/trend-chart/props.js +101 -33
- package/dist/es/components/trend-chart/themes.js +15 -15
- package/dist/es/components/watermark/controller.js +40 -40
- package/dist/es/icons/default/calendar.js +15 -0
- package/dist/es/icons/default/clock-circle.js +15 -0
- package/dist/es/icons/default/double-left.js +15 -0
- package/dist/es/icons/default/double-right.js +15 -0
- package/dist/es/icons/default/down.js +16 -0
- package/dist/es/icons/default/eye-invisible.js +20 -0
- package/dist/es/icons/default/eye.js +18 -0
- package/dist/es/icons/default/left.js +15 -0
- package/dist/es/icons/default/minus.js +16 -0
- package/dist/es/icons/default/plus.js +16 -0
- package/dist/es/icons/default/question-circle.js +18 -0
- package/dist/es/icons/default/right.js +15 -0
- package/dist/es/icons/default/search.js +16 -0
- package/dist/es/icons/default/up.js +16 -0
- package/dist/es/icons/icon.js +26 -25
- package/dist/es/icons/public/boxicons/basic.js +1893 -0
- package/dist/es/icons/public/boxicons/brands.js +304 -0
- package/dist/es/icons/public/boxicons/filled.js +1893 -0
- package/dist/es/icons/public/boxicons/index.js +24 -0
- package/dist/es/icons/public/boxicons/names.js +4082 -0
- package/dist/es/icons/registry.js +15 -15
- package/dist/es/locale/en-US.js +2 -1
- package/dist/es/locale/zh-CN.js +2 -1
- package/dist/es/style.css +1 -1
- package/dist/icons/default/calendar.d.ts +93 -0
- package/dist/icons/default/clock-circle.d.ts +93 -0
- package/dist/icons/{_self/down.d.ts → default/double-left.d.ts} +6 -0
- package/dist/icons/{_self/eye-invisible.d.ts → default/double-right.d.ts} +6 -0
- package/dist/icons/default/down.d.ts +93 -0
- package/dist/icons/default/eye-invisible.d.ts +93 -0
- package/dist/icons/default/eye.d.ts +93 -0
- package/dist/icons/{_self/eye.d.ts → default/left.d.ts} +7 -0
- package/dist/icons/default/minus.d.ts +93 -0
- package/dist/icons/{_self → default}/plus.d.ts +7 -0
- package/dist/icons/default/question-circle.d.ts +93 -0
- package/dist/icons/{_self/minus.d.ts → default/right.d.ts} +7 -0
- package/dist/icons/{_self → default}/search.d.ts +7 -0
- package/dist/icons/{_self → default}/up.d.ts +7 -0
- package/dist/icons/public/boxicons/basic.cjs +1 -0
- package/dist/icons/public/boxicons/basic.d.ts +2 -0
- package/dist/icons/public/boxicons/brands.cjs +1 -0
- package/dist/icons/public/boxicons/brands.d.ts +2 -0
- package/dist/icons/public/boxicons/filled.cjs +1 -0
- package/dist/icons/public/boxicons/filled.d.ts +2 -0
- package/dist/icons/public/boxicons/index.cjs +1 -0
- package/dist/icons/public/boxicons/index.d.ts +10 -0
- package/dist/icons/public/boxicons/names.d.ts +10 -0
- package/dist/icons/registry.d.ts +5 -0
- package/dist/index.cjs +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/locale/interface.d.ts +2 -0
- package/dist/style/alert.css +1 -1
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/date-picker.css +1 -1
- package/dist/style/dialog.css +1 -1
- package/dist/style/drawer.css +1 -1
- package/dist/style/dropdown.css +1 -1
- package/dist/style/form-input-number.css +1 -1
- package/dist/style/form-input-tag.css +1 -1
- package/dist/style/form-input.css +1 -1
- package/dist/style/form-radio.css +1 -1
- package/dist/style/form-select.css +1 -1
- package/dist/style/form-textarea.css +1 -1
- package/dist/style/form.css +1 -1
- package/dist/style/link.css +1 -1
- package/dist/style/menu.css +1 -1
- package/dist/style/message-box.css +1 -1
- package/dist/style/network.css +1 -1
- package/dist/style/pagination.css +1 -1
- package/dist/style/popconfirm.css +1 -1
- package/dist/style/popover.css +1 -1
- package/dist/style/popup.css +1 -1
- package/dist/style/progress.css +1 -1
- package/dist/style/rate.css +1 -1
- package/dist/style/spin.css +1 -1
- package/dist/style/steps.css +1 -1
- package/dist/style/table.css +1 -1
- package/dist/style/tabs.css +1 -1
- package/dist/style/tag.css +1 -1
- package/dist/style/time-picker.css +1 -1
- package/dist/style/time-range-selector.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +31 -4
- package/dist/es/icons/_self/down.js +0 -16
- package/dist/es/icons/_self/eye-invisible.js +0 -13
- package/dist/es/icons/_self/eye.js +0 -13
- package/dist/es/icons/_self/minus.js +0 -13
- package/dist/es/icons/_self/plus.js +0 -12
- package/dist/es/icons/_self/question-message.js +0 -12
- package/dist/es/icons/_self/search.js +0 -13
- package/dist/es/icons/_self/up.js +0 -16
- package/dist/es/icons/_ui/calendar.js +0 -13
- package/dist/es/icons/_ui/time.js +0 -12
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as j, toRefs as x, computed as a, ref as A } from "vue";
|
|
2
2
|
import { isDayjs as E, isFunction as k } from "../../../_utils/is.js";
|
|
3
|
-
import O from "../../../icons/default/close
|
|
3
|
+
import O from "../../../icons/default/close.js";
|
|
4
4
|
import _ from "../icon-hover/index.vue.js";
|
|
5
5
|
import { useFormItem as D, useFormItemControl as T } from "../../../_hooks/use-form-item.js";
|
|
6
6
|
import { useLocale as w } from "../../../locale/index.js";
|
|
7
7
|
import { useSize as P } from "../../../_hooks/use-size.js";
|
|
8
|
-
import { INPUT_EVENTS as
|
|
8
|
+
import { INPUT_EVENTS as l } from "../../../_utils/constant.js";
|
|
9
9
|
import W from "../../../_utils/pick.js";
|
|
10
10
|
import { omit as q } from "../../../_utils/omit.js";
|
|
11
11
|
import H from "../feedback-icon/index.vue.js";
|
|
@@ -59,45 +59,45 @@ const re = j({
|
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
emits: ["clear", "press-enter", "change", "focus", "blur"],
|
|
62
|
-
setup(f, { emit: s, slots:
|
|
63
|
-
const { t:
|
|
62
|
+
setup(f, { emit: s, slots: u, attrs: i }) {
|
|
63
|
+
const { t: c } = w(), { error: p, focused: d, disabled: g, size: v, value: o, format: n, inputValue: t } = x(f), {
|
|
64
64
|
formItemCtx: b,
|
|
65
65
|
mergedSize: h,
|
|
66
|
-
mergedDisabled:
|
|
66
|
+
mergedDisabled: m,
|
|
67
67
|
mergedError: I,
|
|
68
68
|
feedback: y
|
|
69
|
-
} = D({ size: v, disabled: g, error: p }), { mergedSize:
|
|
70
|
-
...
|
|
69
|
+
} = D({ size: v, disabled: g, error: p }), { mergedSize: S } = P(h), C = a(() => q(i, [
|
|
70
|
+
...l,
|
|
71
71
|
...Object.keys(i).filter((e) => e.startsWith("aria-") || e === "role")
|
|
72
72
|
])), z = T(b, () => ({
|
|
73
|
-
...W(i,
|
|
73
|
+
...W(i, l),
|
|
74
74
|
...Object.fromEntries(
|
|
75
75
|
Object.entries(i).filter(([e]) => e.startsWith("aria-") || e === "role")
|
|
76
76
|
)
|
|
77
|
-
})), r = K("picker"),
|
|
77
|
+
})), r = K("picker"), N = a(() => [
|
|
78
78
|
r.block,
|
|
79
|
-
r.modifier(`size-${
|
|
79
|
+
r.modifier(`size-${S.value}`),
|
|
80
80
|
{
|
|
81
81
|
[r.modifier("focused")]: d.value,
|
|
82
|
-
[r.modifier("disabled")]:
|
|
82
|
+
[r.modifier("disabled")]: m.value,
|
|
83
83
|
[r.modifier("error")]: I.value,
|
|
84
|
-
[r.modifier("has-prefix")]:
|
|
84
|
+
[r.modifier("has-prefix")]: u.prefix
|
|
85
85
|
}
|
|
86
|
-
]),
|
|
86
|
+
]), B = a(() => {
|
|
87
87
|
if (t != null && t.value) return t == null ? void 0 : t.value;
|
|
88
88
|
if (o != null && o.value && E(o.value))
|
|
89
89
|
return k(n.value) ? n.value(o.value) : o.value.format(n.value);
|
|
90
|
-
}),
|
|
90
|
+
}), F = A();
|
|
91
91
|
return {
|
|
92
|
-
wrapperAttrs:
|
|
92
|
+
wrapperAttrs: C,
|
|
93
93
|
formControlAttrs: z,
|
|
94
|
-
t:
|
|
94
|
+
t: c,
|
|
95
95
|
feedback: y,
|
|
96
96
|
className: r,
|
|
97
|
-
classNames:
|
|
98
|
-
displayValue:
|
|
99
|
-
mergedDisabled:
|
|
100
|
-
refInput:
|
|
97
|
+
classNames: N,
|
|
98
|
+
displayValue: B,
|
|
99
|
+
mergedDisabled: m,
|
|
100
|
+
refInput: F,
|
|
101
101
|
onPressEnter() {
|
|
102
102
|
s("press-enter");
|
|
103
103
|
},
|
|
@@ -4,10 +4,10 @@ import q from "../feedback-icon/index.vue.js";
|
|
|
4
4
|
import O from "../input-label/input-label.js";
|
|
5
5
|
import { InputTag as _ } from "../../form-input-tag/index.js";
|
|
6
6
|
import $ from "../icon-hover/index.vue.js";
|
|
7
|
-
import G from "../../../icons/
|
|
7
|
+
import G from "../../../icons/default/down.js";
|
|
8
8
|
import J from "../../../icons/animation/animation-loading.js";
|
|
9
9
|
import Q from "../../../icons/default/close.js";
|
|
10
|
-
import U from "../../../icons/
|
|
10
|
+
import U from "../../../icons/default/search.js";
|
|
11
11
|
import { useFormItem as W, useFormItemControl as X } from "../../../_hooks/use-form-item.js";
|
|
12
12
|
import { useLocale as Y } from "../../../locale/index.js";
|
|
13
13
|
import { useSize as Z } from "../../../_hooks/use-size.js";
|
|
@@ -2,7 +2,7 @@ import h from "./Alert.vue2.js";
|
|
|
2
2
|
import { resolveComponent as l, openBlock as o, createBlock as t, Transition as N, withCtx as c, createElementBlock as i, mergeProps as L, normalizeClass as n, renderSlot as a, createCommentVNode as s, createElementVNode as m, createTextVNode as C, toDisplayString as b, createVNode as f } from "vue";
|
|
3
3
|
import B from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
function A(e, r, V, g, w, S) {
|
|
5
|
-
const
|
|
5
|
+
const p = l("icon-info-circle-fill"), d = l("icon-check-circle-fill"), y = l("icon-exclamation-circle-fill"), u = l("icon-close-circle-fill"), v = l("icon-close"), k = l("icon-hover");
|
|
6
6
|
return o(), t(N, {
|
|
7
7
|
name: "x-alert-slide",
|
|
8
8
|
onBeforeLeave: e.handleBeforeLeave,
|
|
@@ -20,7 +20,7 @@ function A(e, r, V, g, w, S) {
|
|
|
20
20
|
class: n(e.className.element("icon"))
|
|
21
21
|
}, [
|
|
22
22
|
a(e.$slots, "icon", {}, () => [
|
|
23
|
-
e.type === "info" ? (o(), t(
|
|
23
|
+
e.type === "info" ? (o(), t(p, { key: 0 })) : e.type === "success" ? (o(), t(d, { key: 1 })) : e.type === "warning" || e.type === "strong" ? (o(), t(y, { key: 2 })) : e.type === "error" ? (o(), t(u, { key: 3 })) : s("", !0)
|
|
24
24
|
])
|
|
25
25
|
], 2)) : s("", !0),
|
|
26
26
|
m("div", {
|
|
@@ -2,8 +2,8 @@ import { defineComponent as v, ref as h, computed as i } from "vue";
|
|
|
2
2
|
import { MESSAGE_TYPES as I } from "../../_utils/constant.js";
|
|
3
3
|
import B from "../_components/icon-hover/index.vue.js";
|
|
4
4
|
import F from "../../icons/default/close.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import g from "../../icons/default/info-circle-fill.js";
|
|
6
|
+
import x from "../../icons/default/check-circle-fill.js";
|
|
7
7
|
import S from "../../icons/default/exclamation-circle-fill.js";
|
|
8
8
|
import A from "../../icons/default/close-circle-fill.js";
|
|
9
9
|
import { getClassNameMixin as E } from "../../_utils/config.js";
|
|
@@ -13,21 +13,22 @@ const G = v({
|
|
|
13
13
|
components: {
|
|
14
14
|
IconHover: B,
|
|
15
15
|
IconClose: F,
|
|
16
|
-
IconInfoCircleFill:
|
|
17
|
-
IconCheckCircleFill:
|
|
16
|
+
IconInfoCircleFill: g,
|
|
17
|
+
IconCheckCircleFill: x,
|
|
18
18
|
IconExclamationCircleFill: S,
|
|
19
19
|
IconCloseCircleFill: A
|
|
20
20
|
},
|
|
21
21
|
props: {
|
|
22
22
|
/**
|
|
23
|
-
* @zh
|
|
24
|
-
* @en Type of the alert
|
|
25
|
-
* @values info, success, warning, error, normal
|
|
23
|
+
* @zh 警告提示的类型
|
|
24
|
+
* @en Type of the alert
|
|
25
|
+
* @values info, success, warning, strong, error, normal
|
|
26
26
|
*/
|
|
27
27
|
type: {
|
|
28
|
+
// strong 是 x-next 扩展的品牌强调族,与 Message 的 strong 保持一致
|
|
28
29
|
type: String,
|
|
29
30
|
default: "info",
|
|
30
|
-
validator: (e) => [...I, "normal"].includes(e)
|
|
31
|
+
validator: (e) => [...I, "normal", "strong"].includes(e)
|
|
31
32
|
},
|
|
32
33
|
/**
|
|
33
34
|
* @zh 是否展示图标
|
|
@@ -122,31 +123,31 @@ const G = v({
|
|
|
122
123
|
* @version 2.36.0
|
|
123
124
|
*/
|
|
124
125
|
setup(e, { attrs: n, slots: r, emit: s }) {
|
|
125
|
-
const
|
|
126
|
+
const l = E("alert"), a = h(e.defaultVisible), c = i(() => e.visible ?? a.value), f = (o) => {
|
|
126
127
|
a.value = !1, s("update:visible", !1), s("close", o);
|
|
127
128
|
}, m = (o) => {
|
|
128
|
-
const
|
|
129
|
-
|
|
129
|
+
const t = o;
|
|
130
|
+
t.style.maxHeight = `${t.offsetHeight}px`, t.style.opacity = "1";
|
|
130
131
|
}, d = (o) => {
|
|
131
|
-
const
|
|
132
|
-
|
|
132
|
+
const t = o;
|
|
133
|
+
t.style.maxHeight = "0", t.style.opacity = "0";
|
|
133
134
|
}, u = () => {
|
|
134
135
|
s("afterClose");
|
|
135
136
|
}, p = i(() => [
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
l.block,
|
|
138
|
+
l.modifier(e.type),
|
|
138
139
|
n.class,
|
|
139
140
|
{
|
|
140
|
-
[
|
|
141
|
-
[
|
|
142
|
-
[
|
|
141
|
+
[l.modifier("with-title")]: !!(e.title || r.title),
|
|
142
|
+
[l.modifier("banner")]: e.banner,
|
|
143
|
+
[l.modifier("center")]: e.center
|
|
143
144
|
}
|
|
144
145
|
]), y = i(() => n.style), C = i(() => {
|
|
145
|
-
const { class: o, style:
|
|
146
|
+
const { class: o, style: t, ...b } = n;
|
|
146
147
|
return b;
|
|
147
148
|
});
|
|
148
149
|
return {
|
|
149
|
-
className:
|
|
150
|
+
className: l,
|
|
150
151
|
cls: p,
|
|
151
152
|
rootAttrs: C,
|
|
152
153
|
rootStyle: y,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as O, getCurrentInstance as P, inject as p, reactive as x, computed as c, withDirectives as
|
|
2
|
-
import { getClassNameMixin as
|
|
1
|
+
import { defineComponent as O, getCurrentInstance as P, inject as p, reactive as x, computed as c, withDirectives as T, createVNode as o, resolveDirective as F } from "vue";
|
|
2
|
+
import { getClassNameMixin as L } from "../../_utils/config.js";
|
|
3
3
|
import { buttonProps as A } from "./props.js";
|
|
4
4
|
import B from "../../icons/animation/animation-loading.js";
|
|
5
5
|
import I from "../../directives/wave.js";
|
|
@@ -18,30 +18,30 @@ const q = /* @__PURE__ */ O({
|
|
|
18
18
|
slots: l,
|
|
19
19
|
emit: h
|
|
20
20
|
}) {
|
|
21
|
-
const
|
|
21
|
+
const f = P(), a = p(K, void 0), {
|
|
22
22
|
mergedSize: k
|
|
23
23
|
} = N(void 0, {
|
|
24
24
|
defaultValue: "medium"
|
|
25
|
-
}),
|
|
25
|
+
}), r = x({
|
|
26
26
|
clicked: !1,
|
|
27
27
|
isDebounce: !1
|
|
28
|
-
}), i =
|
|
29
|
-
const d = (
|
|
28
|
+
}), i = L("button"), w = (n) => n.replace(/[A-Z]/g, (d) => `-${d.toLowerCase()}`), u = (n) => {
|
|
29
|
+
const d = (f == null ? void 0 : f.vnode.props) ?? {};
|
|
30
30
|
return Object.prototype.hasOwnProperty.call(d, n) || Object.prototype.hasOwnProperty.call(d, w(n));
|
|
31
|
-
},
|
|
32
|
-
e.debounce > 0 && !
|
|
33
|
-
|
|
31
|
+
}, s = c(() => u("type") ? e.type : (a == null ? void 0 : a.type) ?? e.type), v = c(() => u("size") ? e.size : (a == null ? void 0 : a.size) ?? k.value), b = c(() => u("status") ? e.status : (a == null ? void 0 : a.status) ?? e.status), g = c(() => u("shape") ? e.shape : (a == null ? void 0 : a.shape) ?? e.shape), m = c(() => u("disabled") ? e.disabled : (a == null ? void 0 : a.disabled) ?? e.disabled), D = c(() => [i.block, s.value && s.value !== "default" && i.modifier(s.value), v.value && i.modifier(v.value), b.value && i.modifier(b.value), m.value && i.is("disabled"), e.block && i.modifier("block"), e.plain && i.modifier("plain"), g.value && i.modifier(g.value), e.link && i.modifier("link"), !e.border && i.modifier("hide-border"), t.value && i.modifier("loading"), e.loadingFill && i.modifier("loading-fill"), e.narrow && i.modifier("narrow")]), z = () => {
|
|
32
|
+
e.debounce > 0 && !r.isDebounce && (r.isDebounce = !0, setTimeout(() => {
|
|
33
|
+
r.isDebounce = !1;
|
|
34
34
|
}, e.debounce));
|
|
35
|
-
}, t = c(() => e.loading ||
|
|
36
|
-
var d
|
|
37
|
-
|
|
35
|
+
}, t = c(() => e.loading || r.clicked || r.isDebounce), S = c(() => m.value || t.value || e.link || s.value === "text"), j = (n) => {
|
|
36
|
+
var d;
|
|
37
|
+
n.detail > 0 && ((d = n.currentTarget) == null || d.blur()), !(m.value || t.value) && (z(), h("click", n));
|
|
38
38
|
};
|
|
39
39
|
return () => {
|
|
40
|
-
var n, d,
|
|
41
|
-
return
|
|
40
|
+
var n, d, y;
|
|
41
|
+
return T(o("button", {
|
|
42
42
|
class: D.value,
|
|
43
43
|
type: e.htmlType,
|
|
44
|
-
disabled:
|
|
44
|
+
disabled: m.value || t.value,
|
|
45
45
|
"aria-busy": t.value || void 0,
|
|
46
46
|
onClick: j
|
|
47
47
|
}, [o("span", {
|
|
@@ -60,9 +60,9 @@ const q = /* @__PURE__ */ O({
|
|
|
60
60
|
class: i.element("prefix")
|
|
61
61
|
}, [(d = l.icon) == null ? void 0 : d.call(l)]), o("span", {
|
|
62
62
|
class: i.element("content")
|
|
63
|
-
}, [(
|
|
63
|
+
}, [(y = l.default) == null ? void 0 : y.call(l)]), l.suffix && o("span", {
|
|
64
64
|
class: i.element("suffix")
|
|
65
|
-
}, [l.suffix()])]), [[
|
|
65
|
+
}, [l.suffix()])]), [[F("wave"), {
|
|
66
66
|
disabled: S.value
|
|
67
67
|
}]]);
|
|
68
68
|
};
|
|
@@ -5,31 +5,33 @@ const l = i({
|
|
|
5
5
|
name: "ButtonGroup",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
8
|
-
* @zh
|
|
9
|
-
* @en Children button
|
|
8
|
+
* @zh 子按钮默认类型:默认、主要、虚框、线性、文字
|
|
9
|
+
* @en Children button type: default, primary, dashed, outline and text
|
|
10
|
+
* @values 'default','primary','dashed','outline','text'
|
|
10
11
|
*/
|
|
11
12
|
type: {
|
|
12
13
|
type: String
|
|
13
14
|
},
|
|
14
15
|
/**
|
|
15
|
-
* @zh
|
|
16
|
-
* @en Children button
|
|
17
|
-
* @values '
|
|
16
|
+
* @zh 子按钮默认状态
|
|
17
|
+
* @en Children button status
|
|
18
|
+
* @values 'default','success','warning','strong','danger','info'
|
|
18
19
|
*/
|
|
19
20
|
status: {
|
|
20
21
|
type: String
|
|
21
22
|
},
|
|
22
23
|
/**
|
|
23
|
-
* @zh
|
|
24
|
-
* @en
|
|
24
|
+
* @zh 子按钮默认形状
|
|
25
|
+
* @en Children button shape
|
|
26
|
+
* @values 'round','circle','square'
|
|
25
27
|
*/
|
|
26
28
|
shape: {
|
|
27
29
|
type: String
|
|
28
30
|
},
|
|
29
31
|
/**
|
|
30
|
-
* @zh
|
|
32
|
+
* @zh 子按钮默认尺寸
|
|
31
33
|
* @en Children button size
|
|
32
|
-
* @values 'mini','small','medium','large'
|
|
34
|
+
* @values 'mini','small','medium','large','huge'
|
|
33
35
|
*/
|
|
34
36
|
size: {
|
|
35
37
|
type: String
|
|
@@ -1,71 +1,80 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { openBlock as s, createElementBlock as n, withKeys as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
function
|
|
1
|
+
import C from "./DatePanel.vue2.js";
|
|
2
|
+
import { resolveComponent as u, openBlock as s, createElementBlock as n, withKeys as h, normalizeClass as o, createElementVNode as d, createVNode as b, createCommentVNode as r, toDisplayString as i, Fragment as k, renderList as p, renderSlot as v, createTextVNode as P } from "vue";
|
|
3
|
+
import L from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const I = ["aria-label"], R = ["aria-label"], S = ["aria-label"], E = ["aria-label"], D = { key: 0 }, M = ["title", "aria-label", "role", "tabindex", "disabled", "aria-selected", "onMouseenter", "onFocus", "onKeydown", "onClick"], T = ["onClick"];
|
|
5
|
+
function V(e, t, K, B, W, z) {
|
|
6
|
+
const w = u("IconDoubleLeft"), g = u("IconLeft"), $ = u("IconRight"), f = u("IconDoubleRight");
|
|
6
7
|
return s(), n("div", {
|
|
7
8
|
ref: "panelRef",
|
|
8
|
-
class:
|
|
9
|
+
class: o([
|
|
9
10
|
e.className.element("panel"),
|
|
10
11
|
e.className.modifier(`mode-${e.mode}`),
|
|
11
12
|
{ [e.className.is("show-lunar")]: e.showLunar && e.mode === "date" }
|
|
12
13
|
]),
|
|
13
|
-
onKeydown: t[8] || (t[8] =
|
|
14
|
+
onKeydown: t[8] || (t[8] = h((l) => e.$emit("cancel"), ["esc"]))
|
|
14
15
|
}, [
|
|
15
|
-
|
|
16
|
-
class:
|
|
16
|
+
d("div", {
|
|
17
|
+
class: o([e.className.element("header"), e.className.element(`header-${e.panelPosition}`)])
|
|
17
18
|
}, [
|
|
18
19
|
e.panelPosition !== "right" ? (s(), n("button", {
|
|
19
20
|
key: 0,
|
|
20
21
|
type: "button",
|
|
21
|
-
class:
|
|
22
|
+
class: o(e.className.element("header-btn")),
|
|
22
23
|
"aria-label": e.t("datePicker.prevPage"),
|
|
23
|
-
onClick: t[0] || (t[0] = (
|
|
24
|
-
},
|
|
24
|
+
onClick: t[0] || (t[0] = (l) => e.movePanel(-1, !0))
|
|
25
|
+
}, [
|
|
26
|
+
b(w)
|
|
27
|
+
], 10, I)) : r("", !0),
|
|
25
28
|
e.panelPosition !== "right" ? (s(), n("button", {
|
|
26
29
|
key: 1,
|
|
27
30
|
type: "button",
|
|
28
|
-
class:
|
|
31
|
+
class: o(e.className.element("header-btn")),
|
|
29
32
|
"aria-label": e.t("datePicker.prevItem"),
|
|
30
|
-
onClick: t[1] || (t[1] = (
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
+
onClick: t[1] || (t[1] = (l) => e.movePanel(-1))
|
|
34
|
+
}, [
|
|
35
|
+
b(g)
|
|
36
|
+
], 10, R)) : r("", !0),
|
|
37
|
+
d("button", {
|
|
33
38
|
type: "button",
|
|
34
|
-
class:
|
|
35
|
-
onClick: t[2] || (t[2] = (...
|
|
39
|
+
class: o(e.className.element("header-label")),
|
|
40
|
+
onClick: t[2] || (t[2] = (...l) => e.zoomHeader && e.zoomHeader(...l))
|
|
36
41
|
}, i(e.headerLabel), 3),
|
|
37
42
|
e.panelPosition !== "left" ? (s(), n("button", {
|
|
38
43
|
key: 2,
|
|
39
44
|
type: "button",
|
|
40
|
-
class:
|
|
45
|
+
class: o(e.className.element("header-btn")),
|
|
41
46
|
"aria-label": e.t("datePicker.nextItem"),
|
|
42
|
-
onClick: t[3] || (t[3] = (
|
|
43
|
-
},
|
|
47
|
+
onClick: t[3] || (t[3] = (l) => e.movePanel(1))
|
|
48
|
+
}, [
|
|
49
|
+
b($)
|
|
50
|
+
], 10, S)) : r("", !0),
|
|
44
51
|
e.panelPosition !== "left" ? (s(), n("button", {
|
|
45
52
|
key: 3,
|
|
46
53
|
type: "button",
|
|
47
|
-
class:
|
|
54
|
+
class: o(e.className.element("header-btn")),
|
|
48
55
|
"aria-label": e.t("datePicker.nextPage"),
|
|
49
|
-
onClick: t[4] || (t[4] = (
|
|
50
|
-
},
|
|
56
|
+
onClick: t[4] || (t[4] = (l) => e.movePanel(1, !0))
|
|
57
|
+
}, [
|
|
58
|
+
b(f)
|
|
59
|
+
], 10, E)) : r("", !0)
|
|
51
60
|
], 2),
|
|
52
61
|
e.mode === "date" || e.mode === "week" ? (s(), n("div", {
|
|
53
62
|
key: 0,
|
|
54
|
-
class:
|
|
63
|
+
class: o([e.className.element("weekdays"), { [e.className.is("week-mode")]: e.mode === "week" }])
|
|
55
64
|
}, [
|
|
56
|
-
e.mode === "week" ? (s(), n("span",
|
|
57
|
-
(s(!0), n(
|
|
65
|
+
e.mode === "week" ? (s(), n("span", D, i(e.t("datePicker.weekColumn")), 1)) : r("", !0),
|
|
66
|
+
(s(!0), n(k, null, p(e.weekdayLabels, (l) => (s(), n("span", { key: l }, i(l), 1))), 128))
|
|
58
67
|
], 2)) : r("", !0),
|
|
59
|
-
|
|
60
|
-
class:
|
|
68
|
+
d("div", {
|
|
69
|
+
class: o([e.className.element("body"), e.className.element(`body-${e.mode}`)]),
|
|
61
70
|
role: "grid"
|
|
62
71
|
}, [
|
|
63
|
-
(s(!0), n(
|
|
64
|
-
key:
|
|
72
|
+
(s(!0), n(k, null, p(e.cellRows, (l, N) => (s(), n("div", {
|
|
73
|
+
key: N,
|
|
65
74
|
role: "row",
|
|
66
|
-
class:
|
|
75
|
+
class: o(e.className.element("row"))
|
|
67
76
|
}, [
|
|
68
|
-
(s(!0), n(
|
|
77
|
+
(s(!0), n(k, null, p(l, (a) => {
|
|
69
78
|
var y;
|
|
70
79
|
return s(), n("button", {
|
|
71
80
|
key: a.title,
|
|
@@ -76,13 +85,13 @@ function E(e, t, M, T, R, K) {
|
|
|
76
85
|
tabindex: a.title === ((y = e.activeCell) == null ? void 0 : y.title) ? 0 : -1,
|
|
77
86
|
disabled: a.isWeekLabel || a.disabled || !a.inView,
|
|
78
87
|
"aria-selected": !a.isWeekLabel && (a.selected || a.rangeStart || a.rangeEnd),
|
|
79
|
-
onMouseenter: (
|
|
80
|
-
onMouseleave: t[5] || (t[5] = (...
|
|
81
|
-
onFocus: (
|
|
88
|
+
onMouseenter: (m) => e.handleCellMouseEnter(a),
|
|
89
|
+
onMouseleave: t[5] || (t[5] = (...m) => e.handleCellMouseLeave && e.handleCellMouseLeave(...m)),
|
|
90
|
+
onFocus: (m) => {
|
|
82
91
|
e.activeTitle = a.title, e.handleCellMouseEnter(a);
|
|
83
92
|
},
|
|
84
|
-
onKeydown: (
|
|
85
|
-
class:
|
|
93
|
+
onKeydown: (m) => e.handleCellKeydown(m, a),
|
|
94
|
+
class: o([
|
|
86
95
|
e.className.element("cell"),
|
|
87
96
|
{
|
|
88
97
|
[e.className.is("out-view")]: a.outView,
|
|
@@ -101,67 +110,67 @@ function E(e, t, M, T, R, K) {
|
|
|
101
110
|
[e.className.is("week-selected")]: a.weekSelected
|
|
102
111
|
}
|
|
103
112
|
]),
|
|
104
|
-
onClick: (
|
|
113
|
+
onClick: (m) => e.handleSelect(a)
|
|
105
114
|
}, [
|
|
106
|
-
|
|
107
|
-
class:
|
|
115
|
+
d("span", {
|
|
116
|
+
class: o(e.className.element("cell-date"))
|
|
108
117
|
}, [
|
|
109
|
-
|
|
110
|
-
class:
|
|
118
|
+
d("span", {
|
|
119
|
+
class: o(e.className.element("cell-inner"))
|
|
111
120
|
}, [
|
|
112
|
-
|
|
121
|
+
v(e.$slots, "cell", {
|
|
113
122
|
date: a.value.toDate(),
|
|
114
123
|
label: a.label
|
|
115
124
|
}, () => [
|
|
116
|
-
|
|
125
|
+
P(i(a.label), 1)
|
|
117
126
|
])
|
|
118
127
|
], 2)
|
|
119
128
|
], 2),
|
|
120
129
|
a.lunar && !e.$slots.cell ? (s(), n("span", {
|
|
121
130
|
key: 0,
|
|
122
|
-
class:
|
|
131
|
+
class: o(e.className.element("cell-lunar"))
|
|
123
132
|
}, i(a.lunar.displayText), 3)) : r("", !0)
|
|
124
|
-
], 42,
|
|
133
|
+
], 42, M);
|
|
125
134
|
}), 128))
|
|
126
135
|
], 2))), 128))
|
|
127
136
|
], 2),
|
|
128
137
|
e.shortcuts.length || e.$slots.extra ? (s(), n("div", {
|
|
129
138
|
key: 1,
|
|
130
|
-
class:
|
|
139
|
+
class: o(e.className.element("shortcuts"))
|
|
131
140
|
}, [
|
|
132
|
-
(s(!0), n(
|
|
133
|
-
key: String(
|
|
141
|
+
(s(!0), n(k, null, p(e.shortcuts, (l) => (s(), n("button", {
|
|
142
|
+
key: String(l.label),
|
|
134
143
|
type: "button",
|
|
135
|
-
class:
|
|
136
|
-
onClick: (
|
|
137
|
-
}, i(
|
|
144
|
+
class: o(e.className.element("shortcut")),
|
|
145
|
+
onClick: (N) => e.$emit("shortcut", l)
|
|
146
|
+
}, i(l.label), 11, T))), 128)),
|
|
138
147
|
e.$slots.extra ? (s(), n("div", {
|
|
139
148
|
key: 0,
|
|
140
|
-
class:
|
|
149
|
+
class: o(e.className.element("extra"))
|
|
141
150
|
}, [
|
|
142
|
-
|
|
151
|
+
v(e.$slots, "extra")
|
|
143
152
|
], 2)) : r("", !0)
|
|
144
153
|
], 2)) : r("", !0),
|
|
145
154
|
e.showToday || e.showConfirmBtn ? (s(), n("div", {
|
|
146
155
|
key: 2,
|
|
147
|
-
class:
|
|
156
|
+
class: o(e.className.element("footer"))
|
|
148
157
|
}, [
|
|
149
158
|
e.showToday ? (s(), n("button", {
|
|
150
159
|
key: 0,
|
|
151
160
|
type: "button",
|
|
152
|
-
class:
|
|
153
|
-
onClick: t[6] || (t[6] = (...
|
|
161
|
+
class: o([e.className.element("footer-btn"), e.className.element("today")]),
|
|
162
|
+
onClick: t[6] || (t[6] = (...l) => e.selectToday && e.selectToday(...l))
|
|
154
163
|
}, i(e.todayLabel), 3)) : r("", !0),
|
|
155
164
|
e.showConfirmBtn ? (s(), n("button", {
|
|
156
165
|
key: 1,
|
|
157
166
|
type: "button",
|
|
158
|
-
class:
|
|
159
|
-
onClick: t[7] || (t[7] = (
|
|
167
|
+
class: o([e.className.element("footer-btn"), e.className.element("confirm")]),
|
|
168
|
+
onClick: t[7] || (t[7] = (l) => e.$emit("confirm"))
|
|
160
169
|
}, i(e.t("datePicker.ok")), 3)) : r("", !0)
|
|
161
170
|
], 2)) : r("", !0)
|
|
162
171
|
], 34);
|
|
163
172
|
}
|
|
164
|
-
const
|
|
173
|
+
const q = /* @__PURE__ */ L(C, [["render", V]]);
|
|
165
174
|
export {
|
|
166
|
-
|
|
175
|
+
q as default
|
|
167
176
|
};
|