yc-design-vue 1.7.8 → 1.8.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/es/Calendar/Calendar.vue.js +15 -14
- package/es/Calendar/CalendarMonth.vue.js +11 -1
- package/es/Calendar/CalendarYear.vue.js +20 -16
- package/es/ColorPicker/ColorList.vue.js +4 -2
- package/es/ColorPicker/ColorPanel.vue.js +6 -4
- package/es/ColorPicker/index.css +1 -1
- package/es/ConfigProvider/index.d.ts +3 -0
- package/es/ConfigProvider/index.vue.d.ts +1 -0
- package/es/ConfigProvider/index.vue.js +13 -2
- package/es/ConfigProvider/type.d.ts +1 -0
- package/es/Drawer/Drawer.vue.js +6 -4
- package/es/Drawer/DrawerService.vue.js +2 -2
- package/es/Drawer/index.css +1 -1
- package/es/Dropdown/index.css +1 -1
- package/es/Empty/index.vue.js +11 -4
- package/es/Image/Image.vue.js +4 -2
- package/es/Image/ImagePreviewToolbar.vue.js +13 -29
- package/es/Layout/hooks/useTheme.js +0 -1
- package/es/Modal/Modal.vue.js +6 -4
- package/es/Modal/ModalService.vue.js +2 -2
- package/es/Pagination/Pagination.vue.js +5 -3
- package/es/Pagination/hooks/useContext.d.ts +5 -0
- package/es/Pagination/hooks/useContext.js +5 -2
- package/es/Popconfirm/index.css +1 -1
- package/es/Popconfirm/index.vue.js +6 -4
- package/es/Popover/index.css +1 -1
- package/es/Tooltip/index.css +1 -1
- package/es/Typography/TypographyBase.vue.js +5 -4
- package/es/_shared/locale/i18n.d.ts +256 -0
- package/es/_shared/locale/i18n.js +35 -0
- package/es/_shared/locale/lang/ar-eg.d.ts +205 -0
- package/es/_shared/locale/lang/ar-eg.js +153 -0
- package/es/_shared/locale/lang/de-de.d.ts +205 -0
- package/es/_shared/locale/lang/de-de.js +153 -0
- package/es/_shared/locale/lang/en-us.d.ts +253 -0
- package/es/_shared/locale/lang/en-us.js +158 -0
- package/es/_shared/locale/lang/es-es.d.ts +205 -0
- package/es/_shared/locale/lang/es-es.js +153 -0
- package/es/_shared/locale/lang/fr-fr.d.ts +205 -0
- package/es/_shared/locale/lang/fr-fr.js +153 -0
- package/es/_shared/locale/lang/id-id.d.ts +205 -0
- package/es/_shared/locale/lang/id-id.js +153 -0
- package/es/_shared/locale/lang/it-it.d.ts +205 -0
- package/es/_shared/locale/lang/it-it.js +153 -0
- package/es/_shared/locale/lang/ja-jp.d.ts +253 -0
- package/es/_shared/locale/lang/ja-jp.js +201 -0
- package/es/_shared/locale/lang/km-kh.d.ts +205 -0
- package/es/_shared/locale/lang/km-kh.js +153 -0
- package/es/_shared/locale/lang/ko-kr.d.ts +205 -0
- package/es/_shared/locale/lang/ko-kr.js +153 -0
- package/es/_shared/locale/lang/ms-my.d.ts +205 -0
- package/es/_shared/locale/lang/ms-my.js +153 -0
- package/es/_shared/locale/lang/nl-nl.d.ts +253 -0
- package/es/_shared/locale/lang/nl-nl.js +201 -0
- package/es/_shared/locale/lang/pt-pt.d.ts +205 -0
- package/es/_shared/locale/lang/pt-pt.js +153 -0
- package/es/_shared/locale/lang/ru-ru.d.ts +253 -0
- package/es/_shared/locale/lang/ru-ru.js +201 -0
- package/es/_shared/locale/lang/th-th.d.ts +205 -0
- package/es/_shared/locale/lang/th-th.js +153 -0
- package/es/_shared/locale/lang/vi-vn.d.ts +205 -0
- package/es/_shared/locale/lang/vi-vn.js +153 -0
- package/es/_shared/locale/lang/zh-cn.d.ts +253 -0
- package/es/_shared/locale/lang/zh-cn.js +201 -0
- package/es/_shared/locale/lang/zh-tw.d.ts +253 -0
- package/es/_shared/locale/lang/zh-tw.js +201 -0
- package/es/_shared/utils/time.js +1 -1
- package/es/_virtual/dynamic-import-helper.js +19 -0
- package/es/index.js +2 -0
- package/es/node_modules/@intlify/core-base/dist/core-base.js +1129 -0
- package/es/node_modules/@intlify/message-compiler/dist/message-compiler.js +65 -0
- package/es/node_modules/@intlify/shared/dist/shared.js +199 -0
- package/es/node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js +1381 -0
- package/es/node_modules/@vue/devtools-api/lib/esm/const.js +6 -0
- package/es/node_modules/@vue/devtools-api/lib/esm/env.js +12 -0
- package/es/node_modules/@vue/devtools-api/lib/esm/index.js +26 -0
- package/es/node_modules/@vue/devtools-api/lib/esm/proxy.js +103 -0
- package/es/node_modules/@vue/devtools-api/lib/esm/time.js +25 -0
- package/es/node_modules/b-validate/es/is.js +27 -0
- package/es/node_modules/b-validate/es/locale/en-US.js +50 -0
- package/es/node_modules/b-validate/es/rules/base.js +86 -0
- package/es/node_modules/b-validate/es/util.js +25 -0
- package/es/style.css +1 -1
- package/lib/Calendar/Calendar.vue.js +1 -1
- package/lib/Calendar/CalendarMonth.vue.js +1 -1
- package/lib/Calendar/CalendarYear.vue.js +1 -1
- package/lib/ColorPicker/ColorList.vue.js +1 -1
- package/lib/ColorPicker/ColorPanel.vue.js +1 -1
- package/lib/ColorPicker/index.css +1 -1
- package/lib/ConfigProvider/index.d.ts +3 -0
- package/lib/ConfigProvider/index.vue.d.ts +1 -0
- package/lib/ConfigProvider/index.vue.js +1 -1
- package/lib/ConfigProvider/type.d.ts +1 -0
- package/lib/Drawer/Drawer.vue.js +1 -1
- package/lib/Drawer/DrawerService.vue.js +1 -1
- package/lib/Drawer/index.css +1 -1
- package/lib/Dropdown/index.css +1 -1
- package/lib/Empty/index.vue.js +1 -1
- package/lib/Image/Image.vue.js +1 -1
- package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
- package/lib/Modal/Modal.vue.js +1 -1
- package/lib/Modal/ModalService.vue.js +1 -1
- package/lib/Pagination/Pagination.vue.js +1 -1
- package/lib/Pagination/hooks/useContext.d.ts +5 -0
- package/lib/Pagination/hooks/useContext.js +1 -1
- package/lib/Popconfirm/index.css +1 -1
- package/lib/Popconfirm/index.vue.js +1 -1
- package/lib/Popover/index.css +1 -1
- package/lib/Tooltip/index.css +1 -1
- package/lib/Typography/TypographyBase.vue.js +1 -1
- package/lib/_shared/locale/i18n.d.ts +256 -0
- package/lib/_shared/locale/i18n.js +1 -0
- package/lib/_shared/locale/lang/ar-eg.d.ts +205 -0
- package/lib/_shared/locale/lang/ar-eg.js +1 -0
- package/lib/_shared/locale/lang/de-de.d.ts +205 -0
- package/lib/_shared/locale/lang/de-de.js +1 -0
- package/lib/_shared/locale/lang/en-us.d.ts +253 -0
- package/lib/_shared/locale/lang/en-us.js +1 -0
- package/lib/_shared/locale/lang/es-es.d.ts +205 -0
- package/lib/_shared/locale/lang/es-es.js +1 -0
- package/lib/_shared/locale/lang/fr-fr.d.ts +205 -0
- package/lib/_shared/locale/lang/fr-fr.js +1 -0
- package/lib/_shared/locale/lang/id-id.d.ts +205 -0
- package/lib/_shared/locale/lang/id-id.js +1 -0
- package/lib/_shared/locale/lang/it-it.d.ts +205 -0
- package/lib/_shared/locale/lang/it-it.js +1 -0
- package/lib/_shared/locale/lang/ja-jp.d.ts +253 -0
- package/lib/_shared/locale/lang/ja-jp.js +1 -0
- package/lib/_shared/locale/lang/km-kh.d.ts +205 -0
- package/lib/_shared/locale/lang/km-kh.js +1 -0
- package/lib/_shared/locale/lang/ko-kr.d.ts +205 -0
- package/lib/_shared/locale/lang/ko-kr.js +1 -0
- package/lib/_shared/locale/lang/ms-my.d.ts +205 -0
- package/lib/_shared/locale/lang/ms-my.js +1 -0
- package/lib/_shared/locale/lang/nl-nl.d.ts +253 -0
- package/lib/_shared/locale/lang/nl-nl.js +1 -0
- package/lib/_shared/locale/lang/pt-pt.d.ts +205 -0
- package/lib/_shared/locale/lang/pt-pt.js +1 -0
- package/lib/_shared/locale/lang/ru-ru.d.ts +253 -0
- package/lib/_shared/locale/lang/ru-ru.js +1 -0
- package/lib/_shared/locale/lang/th-th.d.ts +205 -0
- package/lib/_shared/locale/lang/th-th.js +1 -0
- package/lib/_shared/locale/lang/vi-vn.d.ts +205 -0
- package/lib/_shared/locale/lang/vi-vn.js +1 -0
- package/lib/_shared/locale/lang/zh-cn.d.ts +253 -0
- package/lib/_shared/locale/lang/zh-cn.js +1 -0
- package/lib/_shared/locale/lang/zh-tw.d.ts +253 -0
- package/lib/_shared/locale/lang/zh-tw.js +1 -0
- package/lib/_shared/utils/time.js +1 -1
- package/lib/_virtual/dynamic-import-helper.js +1 -0
- package/lib/index.js +1 -1
- package/lib/node_modules/@intlify/core-base/dist/core-base.js +1 -0
- package/lib/node_modules/@intlify/message-compiler/dist/message-compiler.js +6 -0
- package/lib/node_modules/@intlify/shared/dist/shared.js +7 -0
- package/lib/node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js +1 -0
- package/lib/node_modules/@vue/devtools-api/lib/esm/const.js +1 -0
- package/lib/node_modules/@vue/devtools-api/lib/esm/env.js +1 -0
- package/lib/node_modules/@vue/devtools-api/lib/esm/index.js +1 -0
- package/lib/node_modules/@vue/devtools-api/lib/esm/proxy.js +1 -0
- package/lib/node_modules/@vue/devtools-api/lib/esm/time.js +1 -0
- package/lib/node_modules/b-validate/es/is.js +1 -0
- package/lib/node_modules/b-validate/es/locale/en-US.js +1 -0
- package/lib/node_modules/b-validate/es/rules/base.js +1 -0
- package/lib/node_modules/b-validate/es/util.js +1 -0
- package/lib/style.css +1 -1
- package/package.json +3 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, toRefs, ref,
|
1
|
+
import { defineComponent, toRefs, ref, computed, watch, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createVNode, withCtx, renderSlot, createTextVNode, toDisplayString, isRef, createBlock, createSlots, normalizeProps, guardReactiveProps } from "vue";
|
2
2
|
import dayjs from "../node_modules/dayjs/dayjs.min.js";
|
3
3
|
import "../node_modules/tinycolor2/esm/tinycolor.js";
|
4
4
|
import "../_shared/utils/dom.js";
|
@@ -16,6 +16,7 @@ import _sfc_main$4 from "./CalendarMonth.vue.js";
|
|
16
16
|
/* empty css */
|
17
17
|
import _sfc_main$5 from "./CalendarYear.vue.js";
|
18
18
|
/* empty css */
|
19
|
+
import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
|
19
20
|
import _sfc_main$3 from "../Radio/RadioGroup.vue.js";
|
20
21
|
/* empty css */
|
21
22
|
const _hoisted_1 = { class: "yc-calendar-header" };
|
@@ -46,6 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
46
47
|
defaultMode,
|
47
48
|
modes: _modes
|
48
49
|
} = toRefs(props);
|
50
|
+
const { t } = useI18n();
|
49
51
|
const computedValue = useControlValue(
|
50
52
|
modelValue,
|
51
53
|
defaultValue.value,
|
@@ -55,6 +57,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
55
57
|
}
|
56
58
|
);
|
57
59
|
const recordDate = ref({});
|
60
|
+
const recordDateFormat = computed(() => {
|
61
|
+
const { year, month } = recordDate.value;
|
62
|
+
return dayjs().set("year", year).set("month", month).format(t("calendar.formatMonth"));
|
63
|
+
});
|
58
64
|
watch(
|
59
65
|
() => computedValue.value,
|
60
66
|
(val) => {
|
@@ -78,14 +84,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
78
84
|
}
|
79
85
|
);
|
80
86
|
const modes = computed(() => {
|
81
|
-
|
82
|
-
month: "月",
|
83
|
-
year: "年"
|
84
|
-
};
|
85
|
-
return _modes.value.map((item) => {
|
87
|
+
return _modes.value.map((v) => {
|
86
88
|
return {
|
87
|
-
label:
|
88
|
-
value:
|
89
|
+
label: t(`calendar.view.${v}`),
|
90
|
+
value: v
|
89
91
|
};
|
90
92
|
});
|
91
93
|
});
|
@@ -136,7 +138,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
136
138
|
year: recordDate.value.year,
|
137
139
|
month: recordDate.value.month
|
138
140
|
}, () => [
|
139
|
-
createTextVNode(toDisplayString(
|
141
|
+
createTextVNode(toDisplayString(recordDateFormat.value), 1)
|
140
142
|
])
|
141
143
|
]),
|
142
144
|
createVNode(unref(_sfc_main$1), {
|
@@ -156,11 +158,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
156
158
|
onClick: _cache[2] || (_cache[2] = ($event) => handleDateChange("today")),
|
157
159
|
size: "small"
|
158
160
|
}, {
|
159
|
-
default: withCtx(() =>
|
160
|
-
createTextVNode("
|
161
|
-
])
|
162
|
-
_: 1
|
163
|
-
__: [4]
|
161
|
+
default: withCtx(() => [
|
162
|
+
createTextVNode(toDisplayString(unref(t)("calendar.today")), 1)
|
163
|
+
]),
|
164
|
+
_: 1
|
164
165
|
})
|
165
166
|
]),
|
166
167
|
createElementVNode("div", _hoisted_4, [
|
@@ -6,6 +6,7 @@ import { generateMonthCalendar } from "../_shared/utils/time.js";
|
|
6
6
|
import "../Empty/index.js";
|
7
7
|
/* empty css */
|
8
8
|
import useControlValue from "../_shared/utils/control.js";
|
9
|
+
import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
|
9
10
|
const _hoisted_1 = { class: "yc-calendar-week-list" };
|
10
11
|
const _hoisted_2 = { class: "yc-calendar-month-cell-body" };
|
11
12
|
const _hoisted_3 = ["onClick"];
|
@@ -24,8 +25,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
24
25
|
setup(__props) {
|
25
26
|
const props = __props;
|
26
27
|
const { computedValue, calendar: _calendar, small, recordDate } = toRefs(props);
|
28
|
+
const { t } = useI18n();
|
27
29
|
const weekList = computed(() => {
|
28
|
-
return
|
30
|
+
return [
|
31
|
+
"sunday",
|
32
|
+
"monday",
|
33
|
+
"tuesday",
|
34
|
+
"wednesday",
|
35
|
+
"thursday",
|
36
|
+
"friday",
|
37
|
+
"saturday"
|
38
|
+
].map((v) => t(`calendar.week.${small.value ? "short" : "long"}.${v}`));
|
29
39
|
});
|
30
40
|
const calendar = useControlValue(_calendar, []);
|
31
41
|
watch(
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, toRefs, ref, watch, createElementBlock, openBlock, Fragment, renderList, createElementVNode, createVNode, toDisplayString, unref, createSlots, withCtx, renderSlot } from "vue";
|
1
|
+
import { defineComponent, toRefs, ref, computed, watch, createElementBlock, openBlock, Fragment, renderList, createElementVNode, createVNode, toDisplayString, unref, createSlots, withCtx, renderSlot } from "vue";
|
2
2
|
import "../node_modules/tinycolor2/esm/tinycolor.js";
|
3
3
|
import "../_shared/utils/dom.js";
|
4
4
|
import { generateMonthCalendar } from "../_shared/utils/time.js";
|
@@ -6,6 +6,7 @@ import "../Empty/index.js";
|
|
6
6
|
/* empty css */
|
7
7
|
import _sfc_main$1 from "./CalendarMonth.vue.js";
|
8
8
|
/* empty css */
|
9
|
+
import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
|
9
10
|
const _hoisted_1 = { class: "yc-calendar-year" };
|
10
11
|
const _hoisted_2 = { class: "yc-calendar-year-cell-title" };
|
11
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
@@ -18,21 +19,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
19
|
setup(__props) {
|
19
20
|
const props = __props;
|
20
21
|
const { computedValue, recordDate } = toRefs(props);
|
22
|
+
const { t } = useI18n();
|
21
23
|
const calendar = ref([]);
|
22
|
-
const monthList =
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
24
|
+
const monthList = computed(() => {
|
25
|
+
return [
|
26
|
+
"January",
|
27
|
+
"February",
|
28
|
+
"March",
|
29
|
+
"April",
|
30
|
+
"May",
|
31
|
+
"June",
|
32
|
+
"July",
|
33
|
+
"August",
|
34
|
+
"September",
|
35
|
+
"October",
|
36
|
+
"November",
|
37
|
+
"December"
|
38
|
+
].map((v) => t(`calendar.month.short.${v}`));
|
39
|
+
});
|
36
40
|
watch(
|
37
41
|
() => recordDate.value.year,
|
38
42
|
() => {
|
@@ -63,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
63
67
|
key: i1,
|
64
68
|
class: "yc-calendar-year-cell"
|
65
69
|
}, [
|
66
|
-
createElementVNode("div", _hoisted_2, toDisplayString(monthList[i * 4 + i1]), 1),
|
70
|
+
createElementVNode("div", _hoisted_2, toDisplayString(monthList.value[i * 4 + i1]), 1),
|
67
71
|
createVNode(_sfc_main$1, {
|
68
72
|
"computed-value": unref(computedValue),
|
69
73
|
calendar: col,
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, toDisplayString, Fragment, renderList, normalizeStyle } from "vue";
|
1
|
+
import { defineComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, toDisplayString, unref, Fragment, renderList, normalizeStyle } from "vue";
|
2
|
+
import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
|
2
3
|
const _hoisted_1 = { class: "yc-color-picker-colors-section" };
|
3
4
|
const _hoisted_2 = { class: "yc-color-picker-colors-text" };
|
4
5
|
const _hoisted_3 = {
|
@@ -15,10 +16,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
16
|
},
|
16
17
|
emits: ["colorClick"],
|
17
18
|
setup(__props) {
|
19
|
+
const { t } = useI18n();
|
18
20
|
return (_ctx, _cache) => {
|
19
21
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
20
22
|
createElementVNode("div", _hoisted_2, toDisplayString(_ctx.label), 1),
|
21
|
-
!_ctx.colors.length ? (openBlock(), createElementBlock("div", _hoisted_3, "
|
23
|
+
!_ctx.colors.length ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(unref(t)("colorPicker.empty")), 1)) : createCommentVNode("", true),
|
22
24
|
createElementVNode("div", _hoisted_4, [
|
23
25
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.colors, (color, index) => {
|
24
26
|
return openBlock(), createElementBlock("div", {
|
@@ -8,6 +8,7 @@ import _sfc_main$4 from "./ColorList.vue.js";
|
|
8
8
|
/* empty css */
|
9
9
|
import _sfc_main$2 from "./ColorControl.vue.js";
|
10
10
|
/* empty css */
|
11
|
+
import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
|
11
12
|
const _hoisted_1 = { class: "yc-color-picker-panel-control" };
|
12
13
|
const _hoisted_2 = { class: "yc-color-picker-control-wrapper" };
|
13
14
|
const _hoisted_3 = { class: "yc-color-picker-control-bar-bg" };
|
@@ -31,6 +32,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
31
32
|
presetColors,
|
32
33
|
historyColors
|
33
34
|
} = useContext().inject();
|
35
|
+
const { t } = useI18n();
|
34
36
|
const colorBarRef = ref();
|
35
37
|
const alphaBarRef = ref();
|
36
38
|
const paletteRef = ref();
|
@@ -128,16 +130,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
128
130
|
unref(showHistory) || unref(showPreset) ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
129
131
|
unref(showHistory) ? (openBlock(), createBlock(_sfc_main$4, {
|
130
132
|
key: 0,
|
131
|
-
label: "
|
133
|
+
label: unref(t)("colorPicker.history"),
|
132
134
|
colors: unref(historyColors),
|
133
135
|
onColorClick: handleColorClick
|
134
|
-
}, null, 8, ["colors"])) : createCommentVNode("", true),
|
136
|
+
}, null, 8, ["label", "colors"])) : createCommentVNode("", true),
|
135
137
|
unref(showPreset) ? (openBlock(), createBlock(_sfc_main$4, {
|
136
138
|
key: 1,
|
137
|
-
label: "
|
139
|
+
label: unref(t)("colorPicker.preset"),
|
138
140
|
colors: unref(presetColors),
|
139
141
|
onColorClick: handleColorClick
|
140
|
-
}, null, 8, ["colors"])) : createCommentVNode("", true)
|
142
|
+
}, null, 8, ["label", "colors"])) : createCommentVNode("", true)
|
141
143
|
])) : createCommentVNode("", true)
|
142
144
|
], 2);
|
143
145
|
};
|
package/es/ColorPicker/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.yc-color-picker-panel{overflow:hidden;width:260px;background-color:var(--color-bg-1);border-radius:2px;box-shadow:0 8px 20px 0 rgba(0,0,0,0.1)}.yc-color-picker-panel .yc-color-picker-palette{overflow:hidden;position:relative;cursor:pointer;width:100%;height:178px;background-image:linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, rgba(255,255,255,0));border:1px solid var(--color-border-2);border-bottom:0}.yc-color-picker-panel .yc-color-picker-palette .yc-color-picker-handler{position:absolute;width:16px;height:16px;border:2px solid #fff;border-radius:50%;background-color:transparent;transform:translate(-50%, -50%)}.yc-color-picker-panel .yc-color-picker-panel-control{padding:12px;display:flex;flex-direction:column;gap:12px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper{display:flex;justify-content:space-between;align-items:center}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper:not(.yc-color-picker-preview)>div{display:flex;flex-direction:column;gap:12px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper .yc-color-picker-control-bar{cursor:pointer;position:relative;width:182px;height:14px;border-radius:10px;border:1px solid var(--color-border-2);background-image:linear-gradient(90deg, #f00 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00)}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper .yc-color-picker-control-bar .yc-color-picker-control-bar-handler{user-select:none;position:absolute;top:50%;transform:translate(-50%, -50%);width:16px;height:16px;border-radius:50%;border:1px solid var(--color-border-2)}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper .yc-color-picker-control-bar .yc-color-picker-control-bar-handler::before{display:block;content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:8px;height:8px;background:currentColor;border-radius:50%}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper .yc-color-picker-control-bar .yc-color-picker-control-bar-handler::after{display:block;content:'';width:100%;height:100%;background:var(--color-bg-white);border-radius:50%}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper .yc-color-picker-control-bar-bg{width:fit-content;height:fit-content;background-image:conic-gradient(rgba(0,0,0,0.06) 0 25%, transparent 0 50%, rgba(0,0,0,0.06) 0 75%, transparent 0);background-size:8px 8px;border-radius:10px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper .yc-color-picker-preview{width:40px;height:40px;border:1px solid var(--color-border-2);border-radius:4px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper{display:flex;align-items:center;gap:20px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-input-outer .yc-input-wrapper{padding:0 6px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-input-outer .yc-input-wrapper .yc-input-suffix{padding-left:0}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-format .yc-select{width:58px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-color{flex:1;overflow:hidden;display:flex;align-items:center}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-color .yc-input-outer .yc-input-wrapper{border-radius:
|
1
|
+
.yc-color-picker-panel{overflow:hidden;width:260px;background-color:var(--color-bg-1);border-radius:2px;box-shadow:0 8px 20px 0 rgba(0,0,0,0.1)}.yc-color-picker-panel .yc-color-picker-palette{overflow:hidden;position:relative;cursor:pointer;width:100%;height:178px;background-image:linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, rgba(255,255,255,0));border:1px solid var(--color-border-2);border-bottom:0}.yc-color-picker-panel .yc-color-picker-palette .yc-color-picker-handler{position:absolute;width:16px;height:16px;border:2px solid #fff;border-radius:50%;background-color:transparent;transform:translate(-50%, -50%)}.yc-color-picker-panel .yc-color-picker-panel-control{padding:12px;display:flex;flex-direction:column;gap:12px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper{display:flex;justify-content:space-between;align-items:center}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper:not(.yc-color-picker-preview)>div{display:flex;flex-direction:column;gap:12px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper .yc-color-picker-control-bar{cursor:pointer;position:relative;width:182px;height:14px;border-radius:10px;border:1px solid var(--color-border-2);background-image:linear-gradient(90deg, #f00 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00)}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper .yc-color-picker-control-bar .yc-color-picker-control-bar-handler{user-select:none;position:absolute;top:50%;transform:translate(-50%, -50%);width:16px;height:16px;border-radius:50%;border:1px solid var(--color-border-2)}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper .yc-color-picker-control-bar .yc-color-picker-control-bar-handler::before{display:block;content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:8px;height:8px;background:currentColor;border-radius:50%}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper .yc-color-picker-control-bar .yc-color-picker-control-bar-handler::after{display:block;content:'';width:100%;height:100%;background:var(--color-bg-white);border-radius:50%}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper .yc-color-picker-control-bar-bg{width:fit-content;height:fit-content;background-image:conic-gradient(rgba(0,0,0,0.06) 0 25%, transparent 0 50%, rgba(0,0,0,0.06) 0 75%, transparent 0);background-size:8px 8px;border-radius:10px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-control-wrapper .yc-color-picker-preview{width:40px;height:40px;border:1px solid var(--color-border-2);border-radius:4px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper{display:flex;align-items:center;gap:20px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-input-outer .yc-input-wrapper{padding:0 6px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-input-outer .yc-input-wrapper .yc-input-suffix{padding-left:0}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-format .yc-select{width:58px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-color{flex:1;overflow:hidden;display:flex;align-items:center}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-color .yc-input-outer:first-child .yc-input-wrapper{border-top-left-radius:2px;border-bottom-left-radius:2px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-color .yc-input-outer:last-child .yc-input-wrapper{border-right-color:var(--color-border-2);border-top-right-radius:2px;border-bottom-right-radius:2px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-color .yc-input-outer .yc-input-wrapper{border-radius:0;border-color:var(--color-border-2);border-right-color:transparent}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-color .yc-input-outer .yc-input-wrapper:not(.yc-input-disabled):focus-within{border-radius:2px;border-color:rgb(var(--primary-6))}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-color .yc-input-outer .yc-input-wrapper .yc-input-prefix{padding-right:6px}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-color .yc-input-number .yc-input{text-align:center}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-color .rgb-input,.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-color .hex-input{flex:1}.yc-color-picker-panel .yc-color-picker-panel-control .yc-color-picker-input-wrapper .yc-color-picker-color .alpha-input{width:52px}.yc-color-picker-panel .yc-color-picker-panel-colors{padding:12px;border-top:1px solid var(--color-border-2);display:flex;flex-direction:column;gap:12px}.yc-color-picker-panel .yc-color-picker-panel-colors .yc-color-picker-colors-section{display:flex;flex-direction:column;gap:6px}.yc-color-picker-panel .yc-color-picker-panel-colors .yc-color-picker-colors-section .yc-color-picker-colors-text{color:var(--color-text-1);font-weight:400;font-size:12px}.yc-color-picker-panel .yc-color-picker-panel-colors .yc-color-picker-colors-section .yc-color-picker-colors-empty{margin:6px 0 0 0;color:var(--color-text-3);font-size:12px}.yc-color-picker-panel .yc-color-picker-panel-colors .yc-color-picker-colors-section .yc-color-picker-colors-list{display:flex;flex-wrap:wrap;gap:6px 4px}.yc-color-picker-panel .yc-color-picker-panel-colors .yc-color-picker-colors-section .yc-color-picker-colors-list .yc-color-picker-color-block{cursor:pointer;width:16px;height:16px;overflow:hidden;background-image:conic-gradient(rgba(0,0,0,0.06) 0 25%, transparent 0 50%, rgba(0,0,0,0.06) 0 75%, transparent 0);background-size:8px 8px;border-radius:2px;transition:transform ease-out 60ms}.yc-color-picker-panel .yc-color-picker-panel-colors .yc-color-picker-colors-section .yc-color-picker-colors-list .yc-color-picker-color-block:hover{transform:scale(1.1)}.yc-color-picker-panel .yc-color-picker-panel-colors .yc-color-picker-colors-section .yc-color-picker-colors-list .yc-color-picker-color-block .yc-color-picker-block{height:100%;width:100%}.yc-color-picker-panel-disabled{cursor:not-allowed}.yc-color-picker-panel-disabled .yc-color-picker-palette{cursor:not-allowed}.yc-color-picker-panel-disabled .yc-color-picker-panel-control .yc-color-picker-control-wrapper .yc-color-picker-control-bar{cursor:not-allowed}.yc-color-picker{cursor:pointer;background-color:var(--color-fill-2);border-radius:2px;display:inline-flex;align-items:center;gap:4px}.yc-color-picker:not(.yc-color-picker-disabled):hover{background-color:var(--color-fill-3)}.yc-color-picker .yc-color-picker-value{color:var(--color-text-1);font-weight:400}.yc-color-picker.yc-color-picker-disabled{cursor:not-allowed;background-color:var(--color-fill-2)}.yc-color-picker.yc-color-picker-disabled .yc-color-picker-value{color:var(--color-text-4)}.yc-color-picker-size-mini{height:24px;padding:4px;font-size:12px}.yc-color-picker-size-mini .yc-color-picker-preview{height:100%;width:calc(24px - 8px)}.yc-color-picker-size-small{height:28px;padding:3px 4px;font-size:14px}.yc-color-picker-size-small .yc-color-picker-preview{height:100%;width:calc(28px - 8px)}.yc-color-picker-size-medium{height:32px;padding:4px;font-size:14px}.yc-color-picker-size-medium .yc-color-picker-preview{height:100%;width:calc(32px - 8px)}.yc-color-picker-size-large{height:36px;padding:5px;font-size:14px}.yc-color-picker-size-large .yc-color-picker-preview{height:100%;width:calc(36px - 10px)}.yc-color-picker-format-popup-content .yc-select-option{font-size:12px;line-height:24px}
|
@@ -9,6 +9,7 @@ declare const ConfigProvider: {
|
|
9
9
|
updateAtScroll: boolean;
|
10
10
|
scrollToClose: boolean;
|
11
11
|
zIndex: number;
|
12
|
+
locale: "ar-EG" | "de-DE" | "en-US" | "es-ES" | "fr-FR" | "id-ID" | "it-it" | "ja-JP" | "km-KH" | "ko-KR" | "ms-MY" | "nl-NL" | "pt-PT" | "ru-RU" | "th-TH" | "vi-VN" | "zh-CN" | "zh-TW";
|
12
13
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
13
14
|
P: {};
|
14
15
|
B: {};
|
@@ -22,6 +23,7 @@ declare const ConfigProvider: {
|
|
22
23
|
updateAtScroll: boolean;
|
23
24
|
scrollToClose: boolean;
|
24
25
|
zIndex: number;
|
26
|
+
locale: "ar-EG" | "de-DE" | "en-US" | "es-ES" | "fr-FR" | "id-ID" | "it-it" | "ja-JP" | "km-KH" | "ko-KR" | "ms-MY" | "nl-NL" | "pt-PT" | "ru-RU" | "th-TH" | "vi-VN" | "zh-CN" | "zh-TW";
|
25
27
|
}>;
|
26
28
|
__isFragment?: never;
|
27
29
|
__isTeleport?: never;
|
@@ -32,6 +34,7 @@ declare const ConfigProvider: {
|
|
32
34
|
updateAtScroll: boolean;
|
33
35
|
scrollToClose: boolean;
|
34
36
|
zIndex: number;
|
37
|
+
locale: "ar-EG" | "de-DE" | "en-US" | "es-ES" | "fr-FR" | "id-ID" | "it-it" | "ja-JP" | "km-KH" | "ko-KR" | "ms-MY" | "nl-NL" | "pt-PT" | "ru-RU" | "th-TH" | "vi-VN" | "zh-CN" | "zh-TW";
|
35
38
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
36
39
|
$slots: Readonly<import('./type').ConfigconfigSlots> & import('./type').ConfigconfigSlots;
|
37
40
|
}) & {
|
@@ -12,6 +12,7 @@ declare const __VLS_component: import('vue').DefineComponent<ConfigProviderProps
|
|
12
12
|
updateAtScroll: boolean;
|
13
13
|
scrollToClose: boolean;
|
14
14
|
zIndex: number;
|
15
|
+
locale: "ar-EG" | "de-DE" | "en-US" | "es-ES" | "fr-FR" | "id-ID" | "it-it" | "ja-JP" | "km-KH" | "ko-KR" | "ms-MY" | "nl-NL" | "pt-PT" | "ru-RU" | "th-TH" | "vi-VN" | "zh-CN" | "zh-TW";
|
15
16
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
16
17
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
17
18
|
export default _default;
|
@@ -1,14 +1,16 @@
|
|
1
|
-
import { defineComponent, useSlots, toRefs, provide, renderSlot } from "vue";
|
1
|
+
import { defineComponent, useSlots, toRefs, provide, watch, renderSlot } from "vue";
|
2
2
|
import "../node_modules/tinycolor2/esm/tinycolor.js";
|
3
3
|
import "../_shared/utils/dom.js";
|
4
4
|
import "../_shared/utils/time.js";
|
5
5
|
import { CONFIG_PROVIDER_PROVIDE_KEY } from "../_shared/utils/global-config.js";
|
6
|
+
import { loadLanguageAsync } from "../_shared/locale/i18n.js";
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
7
8
|
...{
|
8
9
|
name: "ConfigProvider"
|
9
10
|
},
|
10
11
|
__name: "index",
|
11
12
|
props: {
|
13
|
+
locale: { default: "zh-CN" },
|
12
14
|
zIndex: { default: 1001 },
|
13
15
|
size: { default: "medium" },
|
14
16
|
popupContainer: { default: "body" },
|
@@ -18,7 +20,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
20
|
setup(__props) {
|
19
21
|
const slots = useSlots();
|
20
22
|
const props = __props;
|
21
|
-
const { zIndex, size, updateAtScroll, scrollToClose, popupContainer } = toRefs(props);
|
23
|
+
const { locale, zIndex, size, updateAtScroll, scrollToClose, popupContainer } = toRefs(props);
|
22
24
|
provide(CONFIG_PROVIDER_PROVIDE_KEY, {
|
23
25
|
slots,
|
24
26
|
zIndex,
|
@@ -27,6 +29,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27
29
|
scrollToClose,
|
28
30
|
popupContainer
|
29
31
|
});
|
32
|
+
watch(
|
33
|
+
() => locale.value,
|
34
|
+
(v) => {
|
35
|
+
loadLanguageAsync(v);
|
36
|
+
},
|
37
|
+
{
|
38
|
+
immediate: true
|
39
|
+
}
|
40
|
+
);
|
30
41
|
return (_ctx, _cache) => {
|
31
42
|
return renderSlot(_ctx.$slots, "default");
|
32
43
|
};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Size, PopupContainer } from '../_shared/type';
|
2
2
|
import { VNode } from 'vue';
|
3
3
|
export interface ConfigProviderProps {
|
4
|
+
locale?: 'ar-EG' | 'de-DE' | 'en-US' | 'es-ES' | 'fr-FR' | 'id-ID' | 'it-it' | 'ja-JP' | 'km-KH' | 'ko-KR' | 'ms-MY' | 'nl-NL' | 'pt-PT' | 'ru-RU' | 'th-TH' | 'vi-VN' | 'zh-CN' | 'zh-TW';
|
4
5
|
zIndex?: number;
|
5
6
|
size?: Size;
|
6
7
|
popupContainer?: PopupContainer;
|
package/es/Drawer/Drawer.vue.js
CHANGED
@@ -9,6 +9,7 @@ import _sfc_main$1 from "../_shared/components/IconButton.vue.js";
|
|
9
9
|
/* empty css */
|
10
10
|
/* empty css */
|
11
11
|
/* empty css */
|
12
|
+
import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
|
12
13
|
const _hoisted_1 = {
|
13
14
|
key: 0,
|
14
15
|
class: "yc-drawer-header"
|
@@ -33,8 +34,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
33
34
|
mask: { type: Boolean, default: true },
|
34
35
|
maskClosable: { type: Boolean, default: true },
|
35
36
|
closable: { type: Boolean, default: true },
|
36
|
-
okText: { default: "
|
37
|
-
cancelText: { default: "
|
37
|
+
okText: { default: "" },
|
38
|
+
cancelText: { default: "" },
|
38
39
|
okLoading: { type: Boolean, default: false },
|
39
40
|
okButtonProps: { default: () => {
|
40
41
|
return {};
|
@@ -79,6 +80,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
79
80
|
} = toRefs(props);
|
80
81
|
const { onBeforeOk, onBeforeCancel } = props;
|
81
82
|
const { zIndex, popupContainer } = getGlobalConfig(props);
|
83
|
+
const { t } = useI18n();
|
82
84
|
const drawerStyle = computed(() => {
|
83
85
|
return {
|
84
86
|
height: placement.value == "left" || placement.value == "right" ? "" : valueToPx(height.value),
|
@@ -169,7 +171,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
169
171
|
onClick: _cache[2] || (_cache[2] = ($event) => unref(handleClose)("cancelBtn", $event))
|
170
172
|
}), {
|
171
173
|
default: withCtx(() => [
|
172
|
-
createTextVNode(toDisplayString(_ctx.cancelText), 1)
|
174
|
+
createTextVNode(toDisplayString(_ctx.cancelText || unref(t)("drawer.cancelText")), 1)
|
173
175
|
]),
|
174
176
|
_: 1
|
175
177
|
}, 16)) : createCommentVNode("", true),
|
@@ -180,7 +182,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
180
182
|
onClick: _cache[3] || (_cache[3] = ($event) => unref(handleClose)("confirmBtn", $event))
|
181
183
|
}), {
|
182
184
|
default: withCtx(() => [
|
183
|
-
createTextVNode(toDisplayString(_ctx.okText), 1)
|
185
|
+
createTextVNode(toDisplayString(_ctx.okText || unref(t)("drawer.okText")), 1)
|
184
186
|
]),
|
185
187
|
_: 1
|
186
188
|
}, 16, ["loading"])
|
@@ -16,8 +16,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
16
|
mask: { type: Boolean, default: true },
|
17
17
|
maskClosable: { type: Boolean, default: true },
|
18
18
|
closable: { type: Boolean, default: true },
|
19
|
-
okText: { default: "
|
20
|
-
cancelText: { default: "
|
19
|
+
okText: { default: "" },
|
20
|
+
cancelText: { default: "" },
|
21
21
|
okLoading: { type: Boolean, default: false },
|
22
22
|
okButtonProps: { default: () => {
|
23
23
|
return {};
|
package/es/Drawer/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.yc-drawer-wrapper{overflow:hidden;position:fixed;height:100%;width:100%;top:0;left:0}.yc-drawer-wrapper .yc-drawer-mask{position:absolute;height:100%;width:100%;background-color:var(--color-mask-bg)}.yc-drawer-wrapper .yc-drawer-container{position:absolute;height:100%;background-color:var(--color-bg-3);display:flex;flex-direction:column}.yc-drawer-wrapper .yc-drawer-container .yc-drawer-footer,.yc-drawer-wrapper .yc-drawer-container .yc-drawer-body,.yc-drawer-wrapper .yc-drawer-container .yc-drawer-header,.yc-drawer-wrapper .yc-drawer-container .yc-drawer-title,.yc-drawer-wrapper .yc-drawer-container .yc-drawer-close-button{flex-shrink:0}.yc-drawer-wrapper .yc-drawer-container .yc-drawer-header{height:48px;width:100%;padding:0 16px;border-bottom:1px solid var(--color-neutral-3);display:flex;align-items:center}.yc-drawer-wrapper .yc-drawer-container .yc-drawer-header .yc-drawer-title{flex:1
|
1
|
+
.yc-drawer-wrapper{overflow:hidden;position:fixed;height:100%;width:100%;top:0;left:0}.yc-drawer-wrapper .yc-drawer-mask{position:absolute;height:100%;width:100%;background-color:var(--color-mask-bg)}.yc-drawer-wrapper .yc-drawer-container{position:absolute;height:100%;background-color:var(--color-bg-3);display:flex;flex-direction:column}.yc-drawer-wrapper .yc-drawer-container .yc-drawer-footer,.yc-drawer-wrapper .yc-drawer-container .yc-drawer-body,.yc-drawer-wrapper .yc-drawer-container .yc-drawer-header,.yc-drawer-wrapper .yc-drawer-container .yc-drawer-title,.yc-drawer-wrapper .yc-drawer-container .yc-drawer-close-button{flex-shrink:0}.yc-drawer-wrapper .yc-drawer-container .yc-drawer-header{height:48px;width:100%;padding:0 16px;border-bottom:1px solid var(--color-neutral-3);display:flex;align-items:center}.yc-drawer-wrapper .yc-drawer-container .yc-drawer-header .yc-drawer-title{flex:1;font-size:16px;font-weight:500;color:var(--color-text-1)}.yc-drawer-wrapper .yc-drawer-container .yc-drawer-header .yc-drawer-close-button{margin-left:-12px}.yc-drawer-wrapper .yc-drawer-container .yc-drawer-body{flex:1;line-height:1.5715;padding:12px 16px;color:var(--color-text-1);font-size:14px}.yc-drawer-wrapper .yc-drawer-container .yc-drawer-footer{height:64px;width:100%;padding:0 16px;border-top:1px solid var(--color-neutral-3);display:flex;justify-content:flex-end;align-items:center;gap:12px}.yc-drawer-position-absolute{position:absolute}.yc-drawer-placement-left .yc-drawer-container{left:0;top:0;bottom:0}.yc-drawer-placement-right .yc-drawer-container{right:0;top:0;bottom:0}.yc-drawer-placement-bottom .yc-drawer-container{left:0;bottom:0;right:0}.yc-drawer-placement-top .yc-drawer-container{left:0;top:0;right:0}
|
package/es/Dropdown/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.yc-dropdown{padding:4px 0;border-radius:4px;box-shadow:0 4px 10px #0000001a}.yc-dropdown .yc-dropdown-list{display:flex;flex-direction:column}.yc-dropdown .yc-dropdown-footer{border-top:1px solid #e5e6eb}.yc-trigger-content .yc-dropdown
|
1
|
+
.yc-dropdown{padding:4px 0;border-radius:4px;box-shadow:0 4px 10px #0000001a}.yc-dropdown .yc-dropdown-list{display:flex;flex-direction:column}.yc-dropdown .yc-dropdown-footer{border-top:1px solid #e5e6eb}.yc-dropdown-light .yc-trigger-content .yc-dropdown{background-color:#fff;border:1px solid #e5e6eb}.yc-dropdown-light .yc-trigger-arrow{background-color:#fff;border:1px solid #e5e6eb}.yc-dropdown-dark .yc-trigger-content .yc-dropdown{background-color:#232324;border:1px solid #232324}.yc-dropdown-dark .yc-trigger-arrow{background-color:#232324;border:1px solid #232324}.yc-dropdown-option{position:relative;z-index:1;padding:0 12px;line-height:36px;font-size:14px;text-align:left;display:flex;align-items:center;transition:all .1s cubic-bezier(0, 0, 1, 1)}.yc-dropdown-option.yc-dropdown-option-disabled{cursor:not-allowed}.yc-dropdown-option .yc-dropdown-option-icon,.yc-dropdown-option .yc-dropdown-option-content,.yc-dropdown-option .yc-dropdown-option-suffix{flex-shrink:0;display:flex;align-items:center}.yc-dropdown-option .yc-dropdown-option-icon{margin-right:8px;color:inherit}.yc-dropdown-option .yc-dropdown-option-suffix{color:inherit;margin-left:12px}.yc-dropdown-option .yc-dropdown-option-content{flex:1;overflow:hidden}.yc-dropdown-option-theme-light{color:#1d2129}.yc-dropdown-option-theme-light:not(.yc-dropdown-option-disabled):hover{background-color:#f2f3f5}.yc-dropdown-option-theme-light.yc-dropdown-option-active{color:#165dff;background-color:#f2f3f5}.yc-dropdown-option-theme-light.yc-dropdown-optiond-disabled{color:#c9cdd4;background:transparent;cursor:not-allowed}.yc-dropdown-option-theme-dark{color:#c9cdd4}.yc-dropdown-option-theme-dark:not(.yc-dropdown-option-disabled):hover{background-color:rgba(255,255,255,0.04)}.yc-dropdown-option-theme-dark.yc-dropdown-option-active{color:#fff;background-color:rgba(255,255,255,0.04)}.yc-dropdown-option-theme-dark.yc-dropdown-optiond-disabled{color:#4e5969;background:transparent;cursor:not-allowed}.yc-dropdown-group-title{margin-top:8px;padding:0 12px;color:var(--color-text-3);font-size:12px;line-height:20px}
|
package/es/Empty/index.vue.js
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, renderSlot, createVNode, unref, createTextVNode, toDisplayString } from "vue";
|
1
|
+
import { defineComponent, toRefs, computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, renderSlot, createVNode, unref, createTextVNode, toDisplayString } from "vue";
|
2
2
|
import "../node_modules/tinycolor2/esm/tinycolor.js";
|
3
3
|
import "../_shared/utils/dom.js";
|
4
4
|
import "../_shared/utils/time.js";
|
5
5
|
import "./index.js";
|
6
6
|
/* empty css */
|
7
7
|
import _sfc_main$1 from "../_shared/icons/IconEmpty.vue.js";
|
8
|
+
import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
|
8
9
|
const _hoisted_1 = { class: "yc-empty" };
|
9
10
|
const _hoisted_2 = { class: "yc-empty-image" };
|
10
11
|
const _hoisted_3 = ["src"];
|
@@ -18,10 +19,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
19
|
},
|
19
20
|
__name: "index",
|
20
21
|
props: {
|
21
|
-
description: { default: "
|
22
|
+
description: { default: "" },
|
22
23
|
imgSrc: { default: "" }
|
23
24
|
},
|
24
25
|
setup(__props) {
|
26
|
+
const props = __props;
|
27
|
+
const { description: _description } = toRefs(props);
|
28
|
+
const { t } = useI18n();
|
29
|
+
const description = computed(
|
30
|
+
() => _description.value || t("empty.description")
|
31
|
+
);
|
25
32
|
return (_ctx, _cache) => {
|
26
33
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
27
34
|
createElementVNode("div", _hoisted_2, [
|
@@ -34,9 +41,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
34
41
|
createVNode(unref(_sfc_main$1))
|
35
42
|
])
|
36
43
|
]),
|
37
|
-
|
44
|
+
description.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
38
45
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
39
|
-
createTextVNode(toDisplayString(
|
46
|
+
createTextVNode(toDisplayString(description.value), 1)
|
40
47
|
])
|
41
48
|
])) : createCommentVNode("", true)
|
42
49
|
]);
|
package/es/Image/Image.vue.js
CHANGED
@@ -10,6 +10,7 @@ import useContext from "./hooks/useContext.js";
|
|
10
10
|
import Spin from "../Spin/index.js";
|
11
11
|
import _sfc_main$1 from "./ImagePreview.vue.js";
|
12
12
|
/* empty css */
|
13
|
+
import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
|
13
14
|
const _hoisted_1 = ["src", "title", "alt"];
|
14
15
|
const _hoisted_2 = {
|
15
16
|
key: 1,
|
@@ -60,6 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
60
61
|
const emits = __emit;
|
61
62
|
const { src, preview, previewVisible, defaultPreviewVisible } = toRefs(props);
|
62
63
|
const { hasGroupFather, handleClick: previewImage } = useContext().inject();
|
64
|
+
const { t } = useI18n();
|
63
65
|
const computedVisible = useControlValue(
|
64
66
|
previewVisible,
|
65
67
|
defaultPreviewVisible.value,
|
@@ -136,8 +138,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
136
138
|
renderSlot(_ctx.$slots, "loader", {}, () => [
|
137
139
|
createVNode(unref(Spin), {
|
138
140
|
size: 30,
|
139
|
-
tip: "
|
140
|
-
})
|
141
|
+
tip: unref(t)("image.loading")
|
142
|
+
}, null, 8, ["tip"])
|
141
143
|
])
|
142
144
|
])
|
143
145
|
])) : createCommentVNode("", true),
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, createElementBlock, createCommentVNode, openBlock, renderSlot, Fragment, renderList, createBlock, withCtx, resolveDynamicComponent } from "vue";
|
1
|
+
import { defineComponent, createElementBlock, createCommentVNode, openBlock, renderSlot, Fragment, renderList, createBlock, unref, withCtx, resolveDynamicComponent } from "vue";
|
2
2
|
import "../node_modules/tinycolor2/esm/tinycolor.js";
|
3
3
|
import "../_shared/utils/dom.js";
|
4
4
|
import "../_shared/utils/time.js";
|
@@ -12,6 +12,7 @@ import _sfc_main$3 from "../_shared/icons/IconZoomIn.vue2.js";
|
|
12
12
|
import _sfc_main$2 from "../_shared/icons/IconZoomOut.vue2.js";
|
13
13
|
import _sfc_main$7 from "./ImagePreviewAction.vue.js";
|
14
14
|
/* empty css */
|
15
|
+
import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
|
15
16
|
const _hoisted_1 = {
|
16
17
|
key: 0,
|
17
18
|
class: "yc-image-preview-toolbar"
|
@@ -23,43 +24,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
23
24
|
},
|
24
25
|
emits: ["click"],
|
25
26
|
setup(__props) {
|
26
|
-
const
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
},
|
35
|
-
rotateLeft: {
|
36
|
-
icon: _sfc_main$4,
|
37
|
-
name: "向左旋转"
|
38
|
-
},
|
39
|
-
zoomIn: {
|
40
|
-
icon: _sfc_main$3,
|
41
|
-
name: "放大"
|
42
|
-
},
|
43
|
-
zoomOut: {
|
44
|
-
icon: _sfc_main$2,
|
45
|
-
name: "缩小"
|
46
|
-
},
|
47
|
-
originalSize: {
|
48
|
-
icon: _sfc_main$1,
|
49
|
-
name: "还原"
|
50
|
-
}
|
27
|
+
const { t } = useI18n();
|
28
|
+
const iconMap = {
|
29
|
+
fullScreen: _sfc_main$6,
|
30
|
+
rotateRight: _sfc_main$5,
|
31
|
+
rotateLeft: _sfc_main$4,
|
32
|
+
zoomIn: _sfc_main$3,
|
33
|
+
zoomOut: _sfc_main$2,
|
34
|
+
originalSize: _sfc_main$1
|
51
35
|
};
|
52
36
|
return (_ctx, _cache) => {
|
53
37
|
return _ctx.actionsLayout.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
54
38
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.actionsLayout, (action) => {
|
55
39
|
return openBlock(), createElementBlock(Fragment, { key: action }, [
|
56
|
-
|
40
|
+
iconMap[action] ? (openBlock(), createBlock(_sfc_main$7, {
|
57
41
|
key: 0,
|
58
|
-
name:
|
42
|
+
name: unref(t)(`imagePreview.${action}`),
|
59
43
|
onClick: (ev) => _ctx.$emit("click", action, ev)
|
60
44
|
}, {
|
61
45
|
default: withCtx(() => [
|
62
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
46
|
+
(openBlock(), createBlock(resolveDynamicComponent(iconMap[action])))
|
63
47
|
]),
|
64
48
|
_: 2
|
65
49
|
}, 1032, ["name", "onClick"])) : createCommentVNode("", true)
|
package/es/Modal/Modal.vue.js
CHANGED
@@ -10,6 +10,7 @@ import _sfc_main$1 from "../_shared/components/IconButton.vue.js";
|
|
10
10
|
/* empty css */
|
11
11
|
/* empty css */
|
12
12
|
/* empty css */
|
13
|
+
import { useI18n } from "../node_modules/@intlify/vue-i18n-core/dist/vue-i18n-core.js";
|
13
14
|
const _hoisted_1 = {
|
14
15
|
key: 0,
|
15
16
|
class: "yc-modal-footer"
|
@@ -33,8 +34,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
33
34
|
maskClosable: { type: Boolean, default: true },
|
34
35
|
hideCancel: { type: Boolean, default: false },
|
35
36
|
closable: { type: Boolean, default: true },
|
36
|
-
okText: { default: "
|
37
|
-
cancelText: { default: "
|
37
|
+
okText: { default: "" },
|
38
|
+
cancelText: { default: "" },
|
38
39
|
okLoading: { type: Boolean, default: false },
|
39
40
|
okButtonProps: { default: () => {
|
40
41
|
return {};
|
@@ -90,6 +91,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
90
91
|
} = toRefs(props);
|
91
92
|
const { onBeforeOk, onBeforeCancel } = props;
|
92
93
|
const { popupContainer, zIndex } = getGlobalConfig(props);
|
94
|
+
const { t } = useI18n();
|
93
95
|
const {
|
94
96
|
outerVisible,
|
95
97
|
innerVisible,
|
@@ -221,7 +223,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
221
223
|
onClick: _cache[1] || (_cache[1] = ($event) => unref(handleClose)("cancelBtn", $event))
|
222
224
|
}), {
|
223
225
|
default: withCtx(() => [
|
224
|
-
createTextVNode(toDisplayString(_ctx.cancelText), 1)
|
226
|
+
createTextVNode(toDisplayString(_ctx.cancelText || unref(t)("modal.cancelText")), 1)
|
225
227
|
]),
|
226
228
|
_: 1
|
227
229
|
}, 16)) : createCommentVNode("", true),
|
@@ -232,7 +234,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
232
234
|
onClick: _cache[2] || (_cache[2] = ($event) => unref(handleClose)("confirmBtn", $event))
|
233
235
|
}), {
|
234
236
|
default: withCtx(() => [
|
235
|
-
createTextVNode(toDisplayString(_ctx.okText), 1)
|
237
|
+
createTextVNode(toDisplayString(_ctx.okText || unref(t)("modal.okText")), 1)
|
236
238
|
]),
|
237
239
|
_: 1
|
238
240
|
}, 16, ["loading"])
|
@@ -27,8 +27,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27
27
|
maskClosable: { type: Boolean, default: true },
|
28
28
|
hideCancel: { type: Boolean, default: false },
|
29
29
|
closable: { type: Boolean, default: true },
|
30
|
-
okText: { default: "
|
31
|
-
cancelText: { default: "
|
30
|
+
okText: { default: "" },
|
31
|
+
cancelText: { default: "" },
|
32
32
|
okLoading: { type: Boolean, default: false },
|
33
33
|
okButtonProps: { default: () => {
|
34
34
|
return {};
|