@sdata/web-vue 3.12.0 → 3.14.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/dist/sd.css +288 -126
- package/dist/sd.min.css +43 -1
- package/es/_components/input-label/input-label.d.ts +2 -0
- package/es/_components/input-label/input-label.js +4 -2
- package/es/_components/input-label/style/index.css +2 -2
- package/es/_components/picker/input-range.vue.d.ts +6 -7
- package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +63 -46
- package/es/_components/picker/input.vue.d.ts +5 -6
- package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +52 -35
- package/es/_components/picker/style/index.scss +8 -2
- package/es/_components/resize-observer.js +1 -1
- package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +9 -2
- package/es/_components/select-view/select-view.d.ts +2 -0
- package/es/_components/select-view/select-view.js +5 -1
- package/es/_components/select-view/style/index.css +5 -5
- package/es/_hooks/use-focus-trap.d.ts +10 -0
- package/es/_hooks/use-focus-trap.js +115 -0
- package/es/_hooks/use-readonly-tip.d.ts +11 -0
- package/es/_hooks/use-readonly-tip.js +66 -0
- package/es/_utils/dom.js +1 -10
- package/es/_utils/keyboard.d.ts +4 -0
- package/es/_utils/keyboard.js +21 -2
- package/es/alert/alert.vue.d.ts +2 -2
- package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +12 -3
- package/es/alert/index.d.ts +5 -5
- package/es/alert/style/index.css +1 -1
- package/es/alert/style/index.scss +1 -1
- package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +2 -0
- package/es/anchor/style/index.css +1 -1
- package/es/anchor/style/index.scss +3 -1
- package/es/auto-complete/auto-complete.d.ts +9 -0
- package/es/auto-complete/auto-complete.js +19 -1
- package/es/auto-complete/index.d.ts +15 -0
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +8 -2
- package/es/avatar/style/index.css +2 -2
- package/es/avatar/style/index.scss +2 -2
- package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/back-top/style/index.css +1 -1
- package/es/back-top/style/index.scss +2 -1
- package/es/badge/badge.js +4 -1
- package/es/badge/style/index.css +3 -3
- package/es/badge/style/index.scss +3 -3
- package/es/breadcrumb/breadcrumb.js +1 -0
- package/es/button/button.vue.d.ts +16 -7
- package/es/button/button.vue_vue_type_script_setup_true_lang.js +62 -31
- package/es/button/index.d.ts +11 -0
- package/es/button/interface.d.ts +2 -0
- package/es/button/style/index.css +15 -6
- package/es/button/style/index.scss +25 -7
- package/es/calendar/style/event.scss +2 -2
- package/es/calendar/style/index.css +2 -2
- package/es/card/card.d.ts +312 -0
- package/es/card/card.js +39 -7
- package/es/card/index.d.ts +616 -0
- package/es/card/style/index.css +26 -3
- package/es/card/style/index.scss +34 -3
- package/es/carousel/carousel-arrow.vue.d.ts +4 -4
- package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +20 -4
- package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +23 -4
- package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +8 -1
- package/es/carousel/carousel.js +18 -1
- package/es/carousel/style/index.css +1 -1
- package/es/carousel/style/index.scss +1 -1
- package/es/cascader/cascader.vue.d.ts +9 -8
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +158 -128
- package/es/cascader/style/index.css +2 -2
- package/es/cascader/style/index.scss +3 -1
- package/es/cascader/types.d.ts +1 -0
- package/es/checkbox/checkbox-group.js +4 -1
- package/es/checkbox/checkbox.d.ts +9 -0
- package/es/checkbox/checkbox.js +14 -0
- package/es/checkbox/index.d.ts +15 -0
- package/es/checkbox/style/index.css +1 -1
- package/es/checkbox/style/index.scss +1 -1
- package/es/collapse/collapse-item.js +21 -3
- package/es/collapse/context.d.ts +1 -1
- package/es/color-picker/color-picker.d.ts +9 -0
- package/es/color-picker/color-picker.js +39 -11
- package/es/color-picker/index.d.ts +15 -0
- package/es/config-provider/context.d.ts +9 -9
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/date-picker/index.d.ts +3 -6
- package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +14 -1
- package/es/date-picker/picker.vue.d.ts +2 -3
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +6 -5
- package/es/date-picker/range-picker.vue.d.ts +2 -3
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/date-picker/style/index.css +5 -5
- package/es/date-picker/style/index.scss +4 -3
- package/es/drawer/drawer.vue.d.ts +1 -1
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +30 -9
- package/es/drawer/index.d.ts +3 -3
- package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/dropdown/dropdown-panel.vue.d.ts +9 -0
- package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +75 -2
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/dropdown/style/index.css +1 -1
- package/es/dropdown/style/index.scss +3 -1
- package/es/empty/empty.js +1 -1
- package/es/file-previewer/file-previewer.vue.d.ts +1 -1
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/file-previewer/index.d.ts +3 -3
- package/es/form/context.d.ts +1 -0
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +6 -2
- package/es/form/style/index.css +2 -2
- package/es/form/style/index.scss +2 -2
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-action.d.ts +7 -127
- package/es/image/preview.vue.d.ts +1 -1
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/index.css +288 -126
- package/es/index.js +3 -3
- package/es/input/index.d.ts +6 -6
- package/es/input/input.d.ts +3 -3
- package/es/input/input.js +34 -8
- package/es/input/style/index.css +2 -2
- package/es/input/style/input.scss +4 -4
- package/es/input-number/index.d.ts +9 -9
- package/es/input-number/input-number.d.ts +5 -5
- package/es/input-number/input-number.js +13 -9
- package/es/input-number/style/index.css +3 -3
- package/es/input-number/style/index.scss +5 -1
- package/es/input-tag/index.d.ts +9 -6
- package/es/input-tag/input-tag.d.ts +5 -3
- package/es/input-tag/input-tag.js +49 -36
- package/es/input-tag/style/index.css +8 -8
- package/es/input-tag/style/index.scss +11 -5
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +31 -6
- package/es/layout/style/index.css +2 -2
- package/es/layout/style/index.scss +4 -2
- package/es/link/style/index.css +1 -1
- package/es/link/style/index.scss +3 -1
- package/es/locale/interface.d.ts +1 -0
- package/es/locale/lang/en-us.js +1 -0
- package/es/locale/lang/zh-cn.js +1 -0
- package/es/locale/lang/zh-tw.js +1 -0
- package/es/mention/index.d.ts +15 -0
- package/es/mention/mention.d.ts +9 -0
- package/es/mention/mention.js +20 -1
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +30 -4
- package/es/menu/item.js +14 -1
- package/es/menu/style/index.css +6 -6
- package/es/menu/style/index.scss +5 -3
- package/es/message/style/index.css +3 -3
- package/es/message/style/index.scss +5 -3
- package/es/modal/index.d.ts +3 -3
- package/es/modal/modal.vue.d.ts +1 -1
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +30 -15
- package/es/modal/style/index.css +2 -2
- package/es/modal/style/index.scss +3 -2
- package/es/notification/style/index.css +3 -3
- package/es/notification/style/index.scss +11 -3
- package/es/page-header/page-header.vue.d.ts +6 -6
- package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +12 -1
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +12 -2
- package/es/pagination/page-item-step.vue.d.ts +2 -2
- package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +19 -2
- package/es/pagination/page-item.vue.d.ts +2 -2
- package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +21 -3
- package/es/pagination/pagination.js +6 -2
- package/es/pagination/style/index.css +6 -1
- package/es/pagination/style/index.scss +9 -3
- package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/progress/style/index.css +2 -2
- package/es/progress/style/index.scss +5 -3
- package/es/qr-code/qr-code-status.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +11 -6
- package/es/radio/context.d.ts +1 -0
- package/es/radio/radio-group.js +6 -2
- package/es/radio/radio.js +1 -0
- package/es/radio/style/index.css +2 -2
- package/es/radio/style/index.scss +4 -2
- package/es/rate/index.d.ts +6 -6
- package/es/rate/rate.d.ts +3 -3
- package/es/rate/rate.js +42 -8
- package/es/resize-box/resize-box.vue.d.ts +4 -4
- package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +30 -1
- package/es/result/result.vue_vue_type_script_setup_true_lang.js +7 -4
- package/es/scrollbar/style/index.css +57 -15
- package/es/scrollbar/style/index.scss +63 -15
- package/es/sd-vue.js +3 -3
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/select/index.d.ts +139 -0
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/select/select.d.ts +71 -0
- package/es/select/select.js +45 -6
- package/es/select/style/index.css +1 -1
- package/es/select/style/index.scss +3 -1
- package/es/selectable-card/style/index.css +2 -2
- package/es/selectable-card/style/index.scss +5 -5
- package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/slider/slider-button.vue.d.ts +2 -0
- package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +7 -2
- package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +23 -2
- package/es/slider/style/index.css +1 -1
- package/es/slider/style/index.scss +3 -1
- package/es/spin/spin.js +7 -2
- package/es/spin/style/index.css +1 -1
- package/es/spin/style/index.scss +1 -1
- package/es/split/split.vue.d.ts +4 -4
- package/es/split/split.vue_vue_type_script_setup_true_lang.js +27 -3
- package/es/steps/context.d.ts +1 -0
- package/es/steps/step.vue_vue_type_script_setup_true_lang.js +15 -2
- package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/steps/style/index.css +1 -1
- package/es/steps/style/index.scss +1 -1
- package/es/style/animation/index.scss +1 -0
- package/es/style/animation/reduced-motion.scss +22 -0
- package/es/style/animation/zoom.scss +7 -6
- package/es/style/icon.scss +9 -1
- package/es/style/normalize.scss +68 -0
- package/es/switch/style/index.css +1 -1
- package/es/switch/style/index.scss +4 -1
- package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/table/style/index.css +8 -8
- package/es/table/style/index.scss +11 -8
- package/es/table/table-operation-td.d.ts +15 -0
- package/es/table/table-tbody.js +4 -1
- package/es/table/table-td.js +2 -1
- package/es/table/table-th.js +6 -4
- package/es/table/table-thead.js +4 -1
- package/es/table/table-tr.js +4 -1
- package/es/table/table.js +6 -2
- package/es/tabs/context.d.ts +3 -0
- package/es/tabs/index.d.ts +32 -0
- package/es/tabs/style/index.css +34 -5
- package/es/tabs/style/index.scss +45 -7
- package/es/tabs/tab-pane.vue.d.ts +4 -2
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +39 -4
- package/es/tabs/tabs-nav.js +34 -1
- package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +27 -4
- package/es/tabs/tabs.d.ts +19 -0
- package/es/tabs/tabs.js +25 -2
- package/es/tag/index.d.ts +5 -5
- package/es/tag/style/index.css +1 -1
- package/es/tag/style/index.scss +3 -1
- package/es/tag/tag.vue.d.ts +2 -2
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +19 -2
- package/es/textarea/index.d.ts +15 -0
- package/es/textarea/style/index.css +2 -2
- package/es/textarea/textarea.vue.d.ts +11 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +84 -47
- package/es/time-picker/index.d.ts +3 -6
- package/es/time-picker/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/time-picker/time-picker.vue.d.ts +2 -3
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +12 -6
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tooltip/index.d.ts +8 -127
- package/es/tooltip/interface.d.ts +17 -0
- package/es/tooltip/tooltip.vue.d.ts +5 -88
- package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +9 -69
- package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/style/index.css +1 -1
- package/es/transfer/style/index.scss +1 -1
- package/es/transfer/transfer-list-item.js +16 -2
- package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +27 -7
- package/es/tree/context.d.ts +2 -0
- package/es/tree/style/index.css +1 -1
- package/es/tree/style/index.scss +1 -1
- package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +82 -3
- package/es/tree-select/tree-select.vue.d.ts +16 -10
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +165 -133
- package/es/trigger/index.d.ts +45 -0
- package/es/trigger/trigger.d.ts +27 -0
- package/es/trigger/trigger.js +47 -5
- package/es/typography/base.js +1 -1
- package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +11 -8
- package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +38 -6
- package/es/typography/style/index.css +2 -2
- package/es/typography/style/index.scss +2 -2
- package/es/upload/style/index.css +9 -9
- package/es/upload/style/index.scss +15 -9
- package/es/upload/upload-button.js +1 -1
- package/es/upload/upload-list-item.js +18 -5
- package/es/upload/upload-picture-item.js +25 -3
- package/es/verification-code/index.d.ts +15 -6
- package/es/verification-code/verification-code.d.ts +9 -3
- package/es/verification-code/verification-code.js +10 -2
- package/json/vetur-attributes.json +63 -7
- package/json/vetur-tags.json +23 -7
- package/json/web-types.json +131 -10
- package/package.json +1 -1
- package/es/style/base.scss +0 -18
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
|
+
import { isActivationKey } from "../_utils/keyboard.js";
|
|
3
4
|
import { computed, createElementBlock, createTextVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, toDisplayString } from "vue";
|
|
4
5
|
//#region components/pagination/page-item.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _hoisted_1 = [
|
|
7
|
+
"tabindex",
|
|
8
|
+
"aria-current",
|
|
9
|
+
"aria-disabled"
|
|
10
|
+
];
|
|
5
11
|
var page_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Pager" }), {}, {
|
|
6
12
|
__name: "page-item",
|
|
7
13
|
props: {
|
|
@@ -20,9 +26,17 @@ var page_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
20
26
|
const emit = __emit;
|
|
21
27
|
const prefixCls = getPrefixCls("pagination-item");
|
|
22
28
|
const isActive = computed(() => props.current === props.pageNumber);
|
|
23
|
-
const
|
|
29
|
+
const activate = (e) => {
|
|
24
30
|
if (!props.disabled) emit("click", props.pageNumber, e);
|
|
25
31
|
};
|
|
32
|
+
const handleClick = (e) => activate(e);
|
|
33
|
+
const handleKeydown = (e) => {
|
|
34
|
+
if (props.disabled) return;
|
|
35
|
+
if (isActivationKey(e)) {
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
activate(e);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
26
40
|
const cls = computed(() => [prefixCls, { [`${prefixCls}-active`]: isActive.value }]);
|
|
27
41
|
const mergedStyle = computed(() => {
|
|
28
42
|
return isActive.value ? props.activeStyle : props.style;
|
|
@@ -31,8 +45,12 @@ var page_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
31
45
|
return openBlock(), createElementBlock("li", {
|
|
32
46
|
class: normalizeClass(cls.value),
|
|
33
47
|
style: normalizeStyle(mergedStyle.value),
|
|
34
|
-
|
|
35
|
-
|
|
48
|
+
tabindex: __props.disabled ? -1 : 0,
|
|
49
|
+
"aria-current": isActive.value ? "page" : void 0,
|
|
50
|
+
"aria-disabled": __props.disabled || void 0,
|
|
51
|
+
onClick: handleClick,
|
|
52
|
+
onKeydown: handleKeydown
|
|
53
|
+
}, [renderSlot(_ctx.$slots, "default", { page: __props.pageNumber }, () => [createTextVNode(toDisplayString(__props.pageNumber), 1)])], 46, _hoisted_1);
|
|
36
54
|
};
|
|
37
55
|
}
|
|
38
56
|
}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
2
2
|
import { isNumber } from "../_utils/is.js";
|
|
3
|
-
import { useSize } from "../_hooks/use-size.js";
|
|
4
3
|
import { useI18n } from "../locale/index.js";
|
|
4
|
+
import { useSize } from "../_hooks/use-size.js";
|
|
5
5
|
import { useConfigProviderProp } from "../_hooks/use-config-provider-prop.js";
|
|
6
6
|
import page_item_ellipsis_default from "./page-item-ellipsis.js";
|
|
7
7
|
import page_item_step_default from "./page-item-step.js";
|
|
@@ -432,7 +432,11 @@ var pagination_default = /* @__PURE__ */ defineComponent({
|
|
|
432
432
|
return () => {
|
|
433
433
|
var _slots$total, _slots$total2, _mergedPageSizeOption;
|
|
434
434
|
if (props.hideOnSinglePage && pages.value <= 1) return null;
|
|
435
|
-
return createVNode("div", {
|
|
435
|
+
return createVNode("div", {
|
|
436
|
+
"role": "navigation",
|
|
437
|
+
"aria-label": "Pagination",
|
|
438
|
+
"class": cls.value
|
|
439
|
+
}, [
|
|
436
440
|
mergedShowTotal.value && createVNode("span", { "class": `${prefixCls}-total` }, [(_slots$total = (_slots$total2 = slots.total) === null || _slots$total2 === void 0 ? void 0 : _slots$total2.call(slots, { total: props.total })) !== null && _slots$total !== void 0 ? _slots$total : t("pagination.total", props.total)]),
|
|
437
441
|
renderPager(),
|
|
438
442
|
mergedShowPageSize.value && createVNode(page_options_default, {
|
|
@@ -41,7 +41,13 @@
|
|
|
41
41
|
border-radius: var(--sd-border-radius-small);
|
|
42
42
|
outline: 0;
|
|
43
43
|
cursor: pointer;
|
|
44
|
+
transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), background-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), border-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), transform 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
44
45
|
user-select: none;
|
|
46
|
+
}
|
|
47
|
+
.sd-pagination-item:active:not(.sd-pagination-item-disabled) {
|
|
48
|
+
transform: scale(0.97);
|
|
49
|
+
}
|
|
50
|
+
.sd-pagination-item {
|
|
45
51
|
min-width: 32px;
|
|
46
52
|
height: 32px;
|
|
47
53
|
font-size: 14px;
|
|
@@ -59,7 +65,6 @@
|
|
|
59
65
|
color: rgb(var(--sd-primary-6));
|
|
60
66
|
background-color: var(--sd-color-primary-light-1);
|
|
61
67
|
border-color: transparent;
|
|
62
|
-
transition: color 0.2s cubic-bezier(0, 0, 1, 1), background-color 0.2s cubic-bezier(0, 0, 1, 1);
|
|
63
68
|
}
|
|
64
69
|
.sd-pagination-item-disabled, .sd-pagination-item-disabled:hover {
|
|
65
70
|
color: var(--sd-color-text-4);
|
|
@@ -85,8 +85,17 @@
|
|
|
85
85
|
border-radius: $pagination-item-border-radius;
|
|
86
86
|
outline: 0;
|
|
87
87
|
cursor: pointer;
|
|
88
|
+
transition:
|
|
89
|
+
color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
90
|
+
background-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
91
|
+
border-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
92
|
+
transform theme.$transition-duration-1 theme.$transition-timing-function-standard;
|
|
88
93
|
user-select: none;
|
|
89
94
|
|
|
95
|
+
&:active:not(&-disabled) {
|
|
96
|
+
transform: scale(0.97);
|
|
97
|
+
}
|
|
98
|
+
|
|
90
99
|
@include page-item(default);
|
|
91
100
|
|
|
92
101
|
&:hover {
|
|
@@ -100,9 +109,6 @@
|
|
|
100
109
|
color: $pagination-color-item-text_active;
|
|
101
110
|
background-color: $pagination-color-bg-item_active;
|
|
102
111
|
border-color: $pagination-color-item-border_active;
|
|
103
|
-
transition:
|
|
104
|
-
color theme.$transition-duration-2 theme.$transition-timing-function-linear,
|
|
105
|
-
background-color theme.$transition-duration-2 theme.$transition-timing-function-linear;
|
|
106
112
|
}
|
|
107
113
|
|
|
108
114
|
&-disabled,
|
|
@@ -6,9 +6,9 @@ import IconCloseCircleFill from "../icon/icon-close-circle-fill/index.js";
|
|
|
6
6
|
import IconExclamationCircleFill from "../icon/icon-exclamation-circle-fill/index.js";
|
|
7
7
|
import IconInfoCircleFill from "../icon/icon-info-circle-fill/index.js";
|
|
8
8
|
import { _asyncToGenerator } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/asyncToGenerator.js";
|
|
9
|
-
import Button from "../button/index.js";
|
|
10
|
-
import Trigger from "../trigger/index.js";
|
|
11
9
|
import { useI18n } from "../locale/index.js";
|
|
10
|
+
import Trigger from "../trigger/index.js";
|
|
11
|
+
import Button from "../button/index.js";
|
|
12
12
|
import { computed, createBlock, createCommentVNode, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderSlot, toDisplayString, unref, withCtx } from "vue";
|
|
13
13
|
//#region components/popconfirm/popconfirm.vue?vue&type=script&setup=true&lang.ts
|
|
14
14
|
var popconfirm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Popconfirm" }), {}, {
|
|
@@ -231,6 +231,8 @@ var popconfirm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
231
231
|
"arrow-style": __props.arrowStyle,
|
|
232
232
|
"animation-name": "zoom-in-fade-out",
|
|
233
233
|
"auto-fit-transform-origin": "",
|
|
234
|
+
"esc-to-close": "",
|
|
235
|
+
"aria-has-popup": "dialog",
|
|
234
236
|
onPopupVisibleChange: handlePopupVisibleChange
|
|
235
237
|
}, {
|
|
236
238
|
content: withCtx(() => [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-body`) }, [createElementVNode("span", { class: normalizeClass(`${unref(prefixCls)}-icon`) }, [renderSlot(_ctx.$slots, "icon", {}, () => [__props.type === "info" ? (openBlock(), createBlock(unref(IconInfoCircleFill), { key: 0 })) : __props.type === "success" ? (openBlock(), createBlock(unref(IconCheckCircleFill), { key: 1 })) : __props.type === "warning" ? (openBlock(), createBlock(unref(IconExclamationCircleFill), { key: 2 })) : __props.type === "error" ? (openBlock(), createBlock(unref(IconCloseCircleFill), { key: 3 })) : createCommentVNode("", true)])], 2), createElementVNode("span", { class: normalizeClass(`${unref(prefixCls)}-content`) }, [renderSlot(_ctx.$slots, "content", {}, () => [createTextVNode(toDisplayString(__props.content), 1)])], 2)], 2), createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-footer`) }, [createVNode(unref(Button), mergeProps({ size: "mini" }, __props.cancelButtonProps, { onClick: handleCancel }), {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
|
+
import Trigger from "../trigger/index.js";
|
|
3
4
|
import { useScrollbar } from "../_hooks/use-scrollbar.js";
|
|
4
5
|
import Scrollbar from "../scrollbar/index.js";
|
|
5
|
-
import Trigger from "../trigger/index.js";
|
|
6
6
|
import { computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderSlot, toDisplayString, toRefs, unref, withCtx } from "vue";
|
|
7
7
|
//#region components/popover/popover.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var popover_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Popover" }), {}, {
|
|
@@ -135,6 +135,8 @@ var popover_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
135
135
|
"popup-container": __props.popupContainer,
|
|
136
136
|
"animation-name": "zoom-in-fade-out",
|
|
137
137
|
"auto-fit-transform-origin": "",
|
|
138
|
+
"esc-to-close": "",
|
|
139
|
+
"aria-has-popup": "true",
|
|
138
140
|
onPopupVisibleChange: handlePopupVisibleChange
|
|
139
141
|
}, {
|
|
140
142
|
content: withCtx(() => [__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
height: 100%;
|
|
74
74
|
background-color: var(--sd-color-primary-light-3);
|
|
75
75
|
border-radius: 0 100px 100px 0;
|
|
76
|
-
transition:
|
|
76
|
+
transition: width 0.6s cubic-bezier(0.34, 0.69, 0.1, 1), background-color 0.6s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
77
77
|
}
|
|
78
78
|
.sd-progress-line-bar-animate::after {
|
|
79
79
|
position: absolute;
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
stroke: var(--sd-color-fill-3);
|
|
208
208
|
}
|
|
209
209
|
.sd-progress-circle-bar {
|
|
210
|
-
transition: stroke-dashoffset 0.6s cubic-bezier(0, 0, 1, 1) 0s, stroke 0.6s cubic-bezier(0, 0, 1, 1);
|
|
210
|
+
transition: stroke-dashoffset 0.6s cubic-bezier(0.34, 0.69, 0.1, 1) 0s, stroke 0.6s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
211
211
|
stroke: rgb(var(--sd-primary-6));
|
|
212
212
|
}
|
|
213
213
|
.sd-progress-size-mini .sd-progress-circle-bg {
|
|
@@ -76,7 +76,9 @@ $progress-prefix-cls: string.unquote('#{$prefix}-progress');
|
|
|
76
76
|
height: 100%;
|
|
77
77
|
background-color: $progress-line-color-buffer-bg;
|
|
78
78
|
border-radius: 0 100px 100px 0;
|
|
79
|
-
transition:
|
|
79
|
+
transition:
|
|
80
|
+
width 0.6s $transition-timing-function-standard,
|
|
81
|
+
background-color 0.6s $transition-timing-function-standard;
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
&-animate::after {
|
|
@@ -270,8 +272,8 @@ $progress-prefix-cls: string.unquote('#{$prefix}-progress');
|
|
|
270
272
|
|
|
271
273
|
&-bar {
|
|
272
274
|
transition:
|
|
273
|
-
stroke-dashoffset 0.6s $transition-timing-function-
|
|
274
|
-
stroke 0.6s $transition-timing-function-
|
|
275
|
+
stroke-dashoffset 0.6s $transition-timing-function-standard 0s,
|
|
276
|
+
stroke 0.6s $transition-timing-function-standard;
|
|
275
277
|
stroke: $progress-circle-color-path-stroke;
|
|
276
278
|
}
|
|
277
279
|
}
|
|
@@ -15,7 +15,11 @@ var qr_code_status_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
15
15
|
emit("refresh");
|
|
16
16
|
};
|
|
17
17
|
return (_ctx, _cache) => {
|
|
18
|
-
return openBlock(), createElementBlock("div", {
|
|
18
|
+
return openBlock(), createElementBlock("div", {
|
|
19
|
+
class: normalizeClass(`${__props.prefixCls}-status`),
|
|
20
|
+
role: "status",
|
|
21
|
+
"aria-live": "polite"
|
|
22
|
+
}, [__props.status === "loading" ? (openBlock(), createBlock(unref(Spin), normalizeProps(mergeProps({ key: 0 }, __props.spinProps)), null, 16)) : __props.status === "expired" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("p", { class: normalizeClass(`${__props.prefixCls}-expired`) }, "二维码已过期", 2), createElementVNode("button", {
|
|
19
23
|
type: "button",
|
|
20
24
|
class: normalizeClass(`${__props.prefixCls}-refresh-btn`),
|
|
21
25
|
onClick: handleRefresh
|
|
@@ -5,8 +5,9 @@ import qr_code_status_default from "./qr-code-status.js";
|
|
|
5
5
|
import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, unref, useSlots, watch } from "vue";
|
|
6
6
|
import QRCode from "qrcode";
|
|
7
7
|
//#region components/qr-code/qr-code.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var _hoisted_1 = ["
|
|
9
|
-
var _hoisted_2 = ["
|
|
8
|
+
var _hoisted_1 = ["aria-label"];
|
|
9
|
+
var _hoisted_2 = ["aria-label", "innerHTML"];
|
|
10
|
+
var _hoisted_3 = ["src", "alt"];
|
|
10
11
|
var qr_code_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "QrCode" }), {}, {
|
|
11
12
|
__name: "qr-code",
|
|
12
13
|
props: {
|
|
@@ -290,12 +291,16 @@ var qr_code_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
290
291
|
key: 1,
|
|
291
292
|
ref_key: "canvasRef",
|
|
292
293
|
ref: canvasRef,
|
|
293
|
-
class: normalizeClass(`${unref(prefixCls)}-canvas`)
|
|
294
|
-
|
|
294
|
+
class: normalizeClass(`${unref(prefixCls)}-canvas`),
|
|
295
|
+
role: "img",
|
|
296
|
+
"aria-label": `QR code: ${mergedValue.value}`
|
|
297
|
+
}, null, 10, _hoisted_1)) : (openBlock(), createElementBlock("div", {
|
|
295
298
|
key: 2,
|
|
296
299
|
class: normalizeClass(`${unref(prefixCls)}-svg`),
|
|
300
|
+
role: "img",
|
|
301
|
+
"aria-label": `QR code: ${mergedValue.value}`,
|
|
297
302
|
innerHTML: svgMarkup.value
|
|
298
|
-
}, null, 10,
|
|
303
|
+
}, null, 10, _hoisted_2)),
|
|
299
304
|
hasIcon.value ? (openBlock(), createElementBlock("div", {
|
|
300
305
|
key: 3,
|
|
301
306
|
class: normalizeClass(`${unref(prefixCls)}-icon`)
|
|
@@ -304,7 +309,7 @@ var qr_code_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
304
309
|
src: __props.icon,
|
|
305
310
|
alt: __props.iconAlt,
|
|
306
311
|
style: normalizeStyle(iconStyle.value)
|
|
307
|
-
}, null, 12,
|
|
312
|
+
}, null, 12, _hoisted_3)) : createCommentVNode("", true)])], 2)) : createCommentVNode("", true)
|
|
308
313
|
], 6)) : createCommentVNode("", true);
|
|
309
314
|
};
|
|
310
315
|
}
|
package/es/radio/context.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare const RADIO_TYPES: readonly ["radio", "button"];
|
|
|
4
4
|
export type RadioType = (typeof RADIO_TYPES)[number];
|
|
5
5
|
export interface RadioGroupContext {
|
|
6
6
|
name: 'SDRadioGroup';
|
|
7
|
+
inputName?: string;
|
|
7
8
|
value: string | number | boolean;
|
|
8
9
|
size: Size;
|
|
9
10
|
type: RadioType;
|
package/es/radio/radio-group.js
CHANGED
|
@@ -4,7 +4,7 @@ import { isFunction, isNull, isNumber, isString, isUndefined } from "../_utils/i
|
|
|
4
4
|
import { useSize } from "../_hooks/use-size.js";
|
|
5
5
|
import { radioGroupKey } from "./context.js";
|
|
6
6
|
import radio_default from "./radio.js";
|
|
7
|
-
import { computed, createVNode, defineComponent, provide, reactive, ref, toRefs, watch } from "vue";
|
|
7
|
+
import { computed, createVNode, defineComponent, getCurrentInstance, provide, reactive, ref, toRefs, watch } from "vue";
|
|
8
8
|
//#region components/radio/radio-group.tsx
|
|
9
9
|
var radio_group_default = /* @__PURE__ */ defineComponent({
|
|
10
10
|
name: "RadioGroup",
|
|
@@ -129,6 +129,7 @@ var radio_group_default = /* @__PURE__ */ defineComponent({
|
|
|
129
129
|
};
|
|
130
130
|
provide(radioGroupKey, reactive({
|
|
131
131
|
name: "SDRadioGroup",
|
|
132
|
+
inputName: `${prefixCls}-${getCurrentInstance().uid}`,
|
|
132
133
|
value: computedValue,
|
|
133
134
|
size: mergedSize,
|
|
134
135
|
type,
|
|
@@ -158,7 +159,10 @@ var radio_group_default = /* @__PURE__ */ defineComponent({
|
|
|
158
159
|
};
|
|
159
160
|
return () => {
|
|
160
161
|
var _slots$default;
|
|
161
|
-
return createVNode("span", {
|
|
162
|
+
return createVNode("span", {
|
|
163
|
+
"role": "radiogroup",
|
|
164
|
+
"class": cls.value
|
|
165
|
+
}, [options.value.length > 0 ? renderOptions() : (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)]);
|
|
162
166
|
};
|
|
163
167
|
}
|
|
164
168
|
});
|
package/es/radio/radio.js
CHANGED
|
@@ -156,6 +156,7 @@ var radio_default = /* @__PURE__ */ defineComponent({
|
|
|
156
156
|
"type": "radio",
|
|
157
157
|
"checked": computedChecked.value,
|
|
158
158
|
"value": props.value,
|
|
159
|
+
"name": radioGroupCtx === null || radioGroupCtx === void 0 ? void 0 : radioGroupCtx.inputName,
|
|
159
160
|
"class": `${prefixCls}-target`,
|
|
160
161
|
"disabled": mergedDisabled.value,
|
|
161
162
|
"onClick": handleClick,
|
package/es/radio/style/index.css
CHANGED
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
background-color: transparent;
|
|
143
143
|
border-radius: var(--sd-border-radius-small);
|
|
144
144
|
cursor: pointer;
|
|
145
|
-
transition:
|
|
145
|
+
transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), background-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
146
146
|
}
|
|
147
147
|
.sd-radio-button-content {
|
|
148
148
|
position: relative;
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
height: 14px;
|
|
159
159
|
background-color: var(--sd-color-neutral-3);
|
|
160
160
|
transform: translateY(-50%);
|
|
161
|
-
transition:
|
|
161
|
+
transition: opacity 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
162
162
|
content: "";
|
|
163
163
|
}
|
|
164
164
|
.sd-radio-button:hover::before, .sd-radio-button:hover + .sd-radio-button::before, .sd-radio-button.sd-radio-checked::before, .sd-radio-button.sd-radio-checked + .sd-radio-button::before {
|
|
@@ -161,7 +161,9 @@ $radio-prefix-cls: string.unquote('#{theme.$prefix}-radio');
|
|
|
161
161
|
background-color: $radio-button-color-bg;
|
|
162
162
|
border-radius: $radio-button-border-radius;
|
|
163
163
|
cursor: pointer;
|
|
164
|
-
transition:
|
|
164
|
+
transition:
|
|
165
|
+
color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
166
|
+
background-color theme.$transition-duration-1 theme.$transition-timing-function-standard;
|
|
165
167
|
|
|
166
168
|
&-content {
|
|
167
169
|
position: relative;
|
|
@@ -180,7 +182,7 @@ $radio-prefix-cls: string.unquote('#{theme.$prefix}-radio');
|
|
|
180
182
|
height: $radio-button-size-separator-height;
|
|
181
183
|
background-color: $radio-button-color-separator-bg;
|
|
182
184
|
transform: translateY(-50%);
|
|
183
|
-
transition:
|
|
185
|
+
transition: opacity theme.$transition-duration-1 theme.$transition-timing-function-standard;
|
|
184
186
|
content: '';
|
|
185
187
|
}
|
|
186
188
|
|
package/es/rate/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ declare const Rate: {
|
|
|
28
28
|
default: boolean;
|
|
29
29
|
};
|
|
30
30
|
readonly: {
|
|
31
|
-
type: BooleanConstructor;
|
|
31
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
32
32
|
default: boolean;
|
|
33
33
|
};
|
|
34
34
|
disabled: {
|
|
@@ -47,7 +47,7 @@ declare const Rate: {
|
|
|
47
47
|
change: (_value: number) => true;
|
|
48
48
|
hoverChange: (_value: number) => true;
|
|
49
49
|
}, import("vue").PublicProps, {
|
|
50
|
-
readonly: boolean;
|
|
50
|
+
readonly: string | boolean;
|
|
51
51
|
disabled: boolean;
|
|
52
52
|
defaultValue: number;
|
|
53
53
|
modelValue: number;
|
|
@@ -88,7 +88,7 @@ declare const Rate: {
|
|
|
88
88
|
default: boolean;
|
|
89
89
|
};
|
|
90
90
|
readonly: {
|
|
91
|
-
type: BooleanConstructor;
|
|
91
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
92
92
|
default: boolean;
|
|
93
93
|
};
|
|
94
94
|
disabled: {
|
|
@@ -103,7 +103,7 @@ declare const Rate: {
|
|
|
103
103
|
"onUpdate:modelValue"?: ((_value: number) => any) | undefined;
|
|
104
104
|
onHoverChange?: ((_value: number) => any) | undefined;
|
|
105
105
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
106
|
-
readonly: boolean;
|
|
106
|
+
readonly: string | boolean;
|
|
107
107
|
disabled: boolean;
|
|
108
108
|
defaultValue: number;
|
|
109
109
|
modelValue: number;
|
|
@@ -141,7 +141,7 @@ declare const Rate: {
|
|
|
141
141
|
default: boolean;
|
|
142
142
|
};
|
|
143
143
|
readonly: {
|
|
144
|
-
type: BooleanConstructor;
|
|
144
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
145
145
|
default: boolean;
|
|
146
146
|
};
|
|
147
147
|
disabled: {
|
|
@@ -160,7 +160,7 @@ declare const Rate: {
|
|
|
160
160
|
change: (_value: number) => true;
|
|
161
161
|
hoverChange: (_value: number) => true;
|
|
162
162
|
}, string, {
|
|
163
|
-
readonly: boolean;
|
|
163
|
+
readonly: string | boolean;
|
|
164
164
|
disabled: boolean;
|
|
165
165
|
defaultValue: number;
|
|
166
166
|
modelValue: number;
|
package/es/rate/rate.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
25
25
|
default: boolean;
|
|
26
26
|
};
|
|
27
27
|
readonly: {
|
|
28
|
-
type: BooleanConstructor;
|
|
28
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
29
29
|
default: boolean;
|
|
30
30
|
};
|
|
31
31
|
disabled: {
|
|
@@ -65,7 +65,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
65
65
|
default: boolean;
|
|
66
66
|
};
|
|
67
67
|
readonly: {
|
|
68
|
-
type: BooleanConstructor;
|
|
68
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
69
69
|
default: boolean;
|
|
70
70
|
};
|
|
71
71
|
disabled: {
|
|
@@ -80,7 +80,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
80
80
|
"onUpdate:modelValue"?: ((_value: number) => any) | undefined;
|
|
81
81
|
onHoverChange?: ((_value: number) => any) | undefined;
|
|
82
82
|
}>, {
|
|
83
|
-
readonly: boolean;
|
|
83
|
+
readonly: string | boolean;
|
|
84
84
|
disabled: boolean;
|
|
85
85
|
defaultValue: number;
|
|
86
86
|
modelValue: number;
|
package/es/rate/rate.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isNull, isObject, isString, isUndefined } from "../_utils/is.js";
|
|
4
|
+
import { KEYBOARD_KEY } from "../_utils/keyboard.js";
|
|
4
5
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
6
|
+
import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
7
|
+
import Tooltip from "../tooltip/index.js";
|
|
5
8
|
import IconFaceFrownFill from "../icon/icon-face-frown-fill/index.js";
|
|
6
9
|
import IconFaceMehFill from "../icon/icon-face-meh-fill/index.js";
|
|
7
10
|
import IconFaceSmileFill from "../icon/icon-face-smile-fill/index.js";
|
|
@@ -66,7 +69,7 @@ var rate_default = /* @__PURE__ */ defineComponent({
|
|
|
66
69
|
* @en Whether it is readonly
|
|
67
70
|
*/
|
|
68
71
|
readonly: {
|
|
69
|
-
type: Boolean,
|
|
72
|
+
type: [Boolean, String],
|
|
70
73
|
default: false
|
|
71
74
|
},
|
|
72
75
|
/**
|
|
@@ -110,6 +113,8 @@ var rate_default = /* @__PURE__ */ defineComponent({
|
|
|
110
113
|
const prefixCls = getPrefixCls("rate");
|
|
111
114
|
const { mergedDisabled: _mergedDisabled, eventHandlers } = useFormItem({ disabled: toRef(props, "disabled") });
|
|
112
115
|
const { mergedAllowClear } = useAllowClear(allowClear);
|
|
116
|
+
const { tipVisible, show: showReadonlyTip } = useReadonlyTip(toRef(props, "readonly"), _mergedDisabled);
|
|
117
|
+
const readonlyTipText = useReadonlyTipText(toRef(props, "readonly"));
|
|
113
118
|
const _value = ref(props.defaultValue);
|
|
114
119
|
const animation = ref(false);
|
|
115
120
|
watch(modelValue, (value) => {
|
|
@@ -174,6 +179,25 @@ var rate_default = /* @__PURE__ */ defineComponent({
|
|
|
174
179
|
const handleAnimationEnd = (index) => {
|
|
175
180
|
if (animation.value && index + 1 >= computedValue.value - 1) animation.value = false;
|
|
176
181
|
};
|
|
182
|
+
const handleKeydown = (e) => {
|
|
183
|
+
if (mergedDisabled.value) return;
|
|
184
|
+
const step = props.allowHalf ? .5 : 1;
|
|
185
|
+
let next = computedValue.value;
|
|
186
|
+
if (e.key === KEYBOARD_KEY.ARROW_RIGHT || e.key === KEYBOARD_KEY.ARROW_UP) next = next + step;
|
|
187
|
+
else if (e.key === KEYBOARD_KEY.ARROW_LEFT || e.key === KEYBOARD_KEY.ARROW_DOWN) next = next - step;
|
|
188
|
+
else if (e.key === KEYBOARD_KEY.HOME) next = 0;
|
|
189
|
+
else if (e.key === KEYBOARD_KEY.END) next = indexArray.value.length;
|
|
190
|
+
else return;
|
|
191
|
+
e.preventDefault();
|
|
192
|
+
next = Math.max(0, Math.min(next, indexArray.value.length));
|
|
193
|
+
if (next !== computedValue.value) {
|
|
194
|
+
var _eventHandlers$value4, _eventHandlers$value5;
|
|
195
|
+
_value.value = next;
|
|
196
|
+
emit("update:modelValue", next);
|
|
197
|
+
emit("change", next);
|
|
198
|
+
(_eventHandlers$value4 = eventHandlers.value) === null || _eventHandlers$value4 === void 0 || (_eventHandlers$value5 = _eventHandlers$value4.onChange) === null || _eventHandlers$value5 === void 0 || _eventHandlers$value5.call(_eventHandlers$value4);
|
|
199
|
+
}
|
|
200
|
+
};
|
|
177
201
|
const renderGradingCharacter = (index, displayIndex) => {
|
|
178
202
|
if (index > displayIndex) return createVNode(IconFaceMehFill, null, null);
|
|
179
203
|
if (displayIndex <= 2) return createVNode(IconFaceFrownFill, null, null);
|
|
@@ -194,14 +218,16 @@ var rate_default = /* @__PURE__ */ defineComponent({
|
|
|
194
218
|
return createVNode(IconStarFill, null, null);
|
|
195
219
|
};
|
|
196
220
|
const renderCharacter = (index) => {
|
|
197
|
-
const
|
|
221
|
+
const interactive = !mergedDisabled.value;
|
|
222
|
+
const readonlyOnly = props.readonly && !_mergedDisabled.value;
|
|
223
|
+
const leftProps = interactive ? {
|
|
198
224
|
onMouseenter: () => handleMouseEnter(index, true),
|
|
199
225
|
onClick: () => handleClick(index, true)
|
|
200
|
-
};
|
|
201
|
-
const rightProps =
|
|
226
|
+
} : readonlyOnly ? { onClick: () => showReadonlyTip() } : {};
|
|
227
|
+
const rightProps = interactive ? {
|
|
202
228
|
onMouseenter: () => handleMouseEnter(index, false),
|
|
203
229
|
onClick: () => handleClick(index, false)
|
|
204
|
-
};
|
|
230
|
+
} : readonlyOnly ? { onClick: () => showReadonlyTip() } : {};
|
|
205
231
|
const style = animation.value ? { animationDelay: `${50 * index}ms` } : void 0;
|
|
206
232
|
const parseDisplayIndex = Math.ceil(displayIndex.value) - 1;
|
|
207
233
|
const leftStyle = customColor.value && props.allowHalf && index + .5 === displayIndex.value ? { color: customColor.value[parseDisplayIndex] } : void 0;
|
|
@@ -225,10 +251,18 @@ var rate_default = /* @__PURE__ */ defineComponent({
|
|
|
225
251
|
[`${prefixCls}-readonly`]: props.readonly,
|
|
226
252
|
[`${prefixCls}-disabled`]: _mergedDisabled.value
|
|
227
253
|
}]);
|
|
228
|
-
return () => createVNode(
|
|
254
|
+
return () => createVNode(Tooltip, {
|
|
255
|
+
"popupVisible": tipVisible.value,
|
|
256
|
+
"content": readonlyTipText.value,
|
|
257
|
+
"position": "top"
|
|
258
|
+
}, { default: () => [createVNode("div", {
|
|
229
259
|
"class": cls.value,
|
|
230
|
-
"
|
|
231
|
-
|
|
260
|
+
"role": "radiogroup",
|
|
261
|
+
"aria-label": "Rating",
|
|
262
|
+
"tabindex": mergedDisabled.value ? void 0 : 0,
|
|
263
|
+
"onMouseleave": resetHoverIndex,
|
|
264
|
+
"onKeydown": handleKeydown
|
|
265
|
+
}, [indexArray.value.map((_, index) => renderCharacter(index))])] });
|
|
232
266
|
}
|
|
233
267
|
});
|
|
234
268
|
//#endregion
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
export type DirectionType = 'left' | 'right' | 'top' | 'bottom';
|
|
3
|
-
declare var __VLS_9: {},
|
|
3
|
+
declare var __VLS_9: {}, __VLS_21: {
|
|
4
4
|
direction: "top" | "bottom" | "left" | "right";
|
|
5
|
-
},
|
|
5
|
+
}, __VLS_24: {
|
|
6
6
|
direction: "top" | "bottom" | "left" | "right";
|
|
7
7
|
};
|
|
8
8
|
type __VLS_Slots = {} & {
|
|
9
9
|
default?: (props: typeof __VLS_9) => any;
|
|
10
10
|
} & {
|
|
11
|
-
'resize-trigger'?: (props: typeof
|
|
11
|
+
'resize-trigger'?: (props: typeof __VLS_21) => any;
|
|
12
12
|
} & {
|
|
13
|
-
'resize-trigger-icon'?: (props: typeof
|
|
13
|
+
'resize-trigger-icon'?: (props: typeof __VLS_24) => any;
|
|
14
14
|
};
|
|
15
15
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
16
16
|
width: {
|
|
@@ -2,6 +2,7 @@ import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helper
|
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isNumber } from "../_utils/is.js";
|
|
4
4
|
import { off, on } from "../_utils/dom.js";
|
|
5
|
+
import { KEYBOARD_KEY } from "../_utils/keyboard.js";
|
|
5
6
|
import useMergeState from "../_hooks/use-merge-state.js";
|
|
6
7
|
import resize_trigger_default from "../_components/resize-trigger.js";
|
|
7
8
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createSlots, defineComponent, mergeProps, normalizeClass, openBlock, reactive, ref, renderList, renderSlot, resolveDynamicComponent, toRefs, unref, withCtx } from "vue";
|
|
@@ -167,6 +168,30 @@ var resize_box_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
167
168
|
record.padding[direction] = size;
|
|
168
169
|
paddingStyles[`padding-${direction}`] = `${size}px`;
|
|
169
170
|
}
|
|
171
|
+
function onTriggerKeydown(direction, e) {
|
|
172
|
+
const horiz = direction === DIRECTION_LEFT || direction === DIRECTION_RIGHT;
|
|
173
|
+
const key = e.key;
|
|
174
|
+
const posKey = horiz ? KEYBOARD_KEY.ARROW_RIGHT : KEYBOARD_KEY.ARROW_DOWN;
|
|
175
|
+
const negKey = horiz ? KEYBOARD_KEY.ARROW_LEFT : KEYBOARD_KEY.ARROW_UP;
|
|
176
|
+
if (key !== posKey && key !== negKey) return;
|
|
177
|
+
e.preventDefault();
|
|
178
|
+
const step = e.shiftKey ? 20 : 10;
|
|
179
|
+
const dirSign = direction === DIRECTION_LEFT || direction === DIRECTION_TOP ? -1 : 1;
|
|
180
|
+
const delta = step * (key === posKey ? 1 : -1) * dirSign;
|
|
181
|
+
if (horiz) {
|
|
182
|
+
var _wrapperRef$value$cli, _wrapperRef$value3;
|
|
183
|
+
const base = isNumber(resWidth.value) ? resWidth.value : (_wrapperRef$value$cli = (_wrapperRef$value3 = wrapperRef.value) === null || _wrapperRef$value3 === void 0 ? void 0 : _wrapperRef$value3.clientWidth) !== null && _wrapperRef$value$cli !== void 0 ? _wrapperRef$value$cli : 0;
|
|
184
|
+
const newWidth = Math.max(0, base + delta);
|
|
185
|
+
setResWidth(newWidth);
|
|
186
|
+
emit("update:width", newWidth);
|
|
187
|
+
} else {
|
|
188
|
+
var _wrapperRef$value$cli2, _wrapperRef$value4;
|
|
189
|
+
const base = isNumber(resHeight.value) ? resHeight.value : (_wrapperRef$value$cli2 = (_wrapperRef$value4 = wrapperRef.value) === null || _wrapperRef$value4 === void 0 ? void 0 : _wrapperRef$value4.clientHeight) !== null && _wrapperRef$value$cli2 !== void 0 ? _wrapperRef$value$cli2 : 0;
|
|
190
|
+
const newHeight = Math.max(0, base + delta);
|
|
191
|
+
setResHeight(newHeight);
|
|
192
|
+
emit("update:height", newHeight);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
170
195
|
return (_ctx, _cache) => {
|
|
171
196
|
return openBlock(), createBlock(resolveDynamicComponent(__props.component), mergeProps({
|
|
172
197
|
ref_key: "wrapperRef",
|
|
@@ -184,6 +209,9 @@ var resize_box_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
184
209
|
},
|
|
185
210
|
onResize: (entry) => {
|
|
186
211
|
onTiggerResize(direction, entry);
|
|
212
|
+
},
|
|
213
|
+
onKeydown: (e) => {
|
|
214
|
+
onTriggerKeydown(direction, e);
|
|
187
215
|
}
|
|
188
216
|
}, createSlots({
|
|
189
217
|
default: withCtx(() => [_ctx.$slots["resize-trigger"] ? renderSlot(_ctx.$slots, "resize-trigger", {
|
|
@@ -200,7 +228,8 @@ var resize_box_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
200
228
|
"class",
|
|
201
229
|
"direction",
|
|
202
230
|
"onMousedown",
|
|
203
|
-
"onResize"
|
|
231
|
+
"onResize",
|
|
232
|
+
"onKeydown"
|
|
204
233
|
]);
|
|
205
234
|
}), 128))]),
|
|
206
235
|
_: 3
|
|
@@ -67,10 +67,13 @@ var result_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
67
67
|
const prefixCls = getPrefixCls("result");
|
|
68
68
|
return (_ctx, _cache) => {
|
|
69
69
|
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(prefixCls)) }, [
|
|
70
|
-
createElementVNode("div", {
|
|
71
|
-
|
|
72
|
-
[`${unref(prefixCls)}-icon
|
|
73
|
-
|
|
70
|
+
createElementVNode("div", {
|
|
71
|
+
"aria-hidden": "true",
|
|
72
|
+
class: normalizeClass([`${unref(prefixCls)}-icon`, {
|
|
73
|
+
[`${unref(prefixCls)}-icon-${__props.status}`]: __props.status,
|
|
74
|
+
[`${unref(prefixCls)}-icon-custom`]: __props.status === null
|
|
75
|
+
}])
|
|
76
|
+
}, [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-icon-tip`) }, [renderSlot(_ctx.$slots, "icon", {}, () => [__props.status === "info" ? (openBlock(), createBlock(unref(IconInfo), { key: 0 })) : __props.status === "success" ? (openBlock(), createBlock(unref(IconCheck), { key: 1 })) : __props.status === "warning" ? (openBlock(), createBlock(unref(IconExclamation), { key: 2 })) : __props.status === "error" ? (openBlock(), createBlock(unref(IconClose), { key: 3 })) : __props.status === "403" ? (openBlock(), createBlock(unref(_403_default), { key: 4 })) : __props.status === "404" ? (openBlock(), createBlock(unref(_404_default), { key: 5 })) : __props.status === "500" ? (openBlock(), createBlock(unref(_500_default), { key: 6 })) : createCommentVNode("", true)])], 2)], 2),
|
|
74
77
|
__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
|
75
78
|
key: 0,
|
|
76
79
|
class: normalizeClass(`${unref(prefixCls)}-title`)
|