@sdata/web-vue 3.13.0 → 3.15.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 +167 -114
- package/dist/sd.min.css +2 -2
- 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/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 +13 -3
- package/es/_components/select-view/select-view.d.ts +2 -0
- package/es/_components/select-view/select-view.js +7 -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/_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 +16 -4
- 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 +6 -1
- package/es/anchor/style/index.css +1 -1
- package/es/anchor/style/index.scss +3 -1
- package/es/auto-complete/auto-complete.js +8 -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 +8 -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/basic-crud-table/basic-crud-modal.js +5 -0
- package/es/basic-crud-table/basic-crud-modal.vue.d.ts +264 -0
- package/es/basic-crud-table/basic-crud-modal.vue_vue_type_script_setup_true_lang.js +139 -0
- package/es/basic-crud-table/basic-crud-table.js +5 -0
- package/es/basic-crud-table/basic-crud-table.vue.d.ts +935 -0
- package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +510 -0
- package/es/basic-crud-table/index.d.ts +2722 -0
- package/es/basic-crud-table/index.js +9 -0
- package/es/basic-crud-table/style/css.js +2 -0
- package/es/basic-crud-table/style/index.css +42 -0
- package/es/basic-crud-table/style/index.d.ts +2 -0
- package/es/basic-crud-table/style/index.js +2 -0
- package/es/basic-crud-table/style/index.scss +33 -0
- package/es/basic-crud-table/style/token.scss +8 -0
- package/es/basic-crud-table/types.d.ts +69 -0
- package/es/breadcrumb/breadcrumb-item.js +4 -2
- package/es/breadcrumb/breadcrumb.js +3 -0
- package/es/button/button.vue_vue_type_script_setup_true_lang.js +10 -5
- package/es/button/style/index.css +15 -6
- package/es/button/style/index.scss +25 -7
- package/es/calendar/components/event.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/calendar/components/headings-bar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/calendar/style/event.scss +2 -2
- package/es/calendar/style/index.css +2 -2
- package/es/card/style/index.css +3 -3
- package/es/card/style/index.scss +3 -3
- package/es/carousel/carousel-arrow.vue.d.ts +4 -4
- package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +25 -5
- package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +25 -4
- package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +11 -2
- package/es/carousel/carousel.js +20 -1
- package/es/carousel/style/index.css +1 -1
- package/es/carousel/style/index.scss +1 -1
- package/es/cascader/cascader-option.js +1 -1
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +13 -4
- package/es/cascader/style/index.css +2 -2
- package/es/cascader/style/index.scss +3 -1
- 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.js +6 -0
- package/es/color-picker/panel.js +5 -3
- package/es/components.d.ts +1 -0
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/date-picker/hooks/use-provide-datepicker-transform.js +1 -1
- package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +14 -1
- package/es/date-picker/panels/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +4 -3
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +2 -2
- 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 +31 -9
- package/es/drawer/index.d.ts +3 -3
- package/es/dropdown/dropdown-button.vue_vue_type_script_setup_true_lang.js +1 -1
- 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 +76 -3
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +6 -3
- 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/file-previewer/file-previewer.vue.d.ts +1 -1
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +18 -10
- 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 +7 -3
- package/es/form/index.js +1 -1
- package/es/form/style/index.css +2 -2
- package/es/form/style/index.scss +2 -2
- package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/grid/grid-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/grid/grid-row.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/grid/grid.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview.vue.d.ts +1 -1
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/index.css +167 -114
- package/es/index.d.ts +2 -0
- package/es/index.js +55 -54
- package/es/index.scss +1 -0
- package/es/input/input.js +18 -2
- package/es/input/style/index.css +2 -2
- package/es/input/style/input.scss +4 -4
- package/es/input-number/input-number.js +9 -3
- 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 +3 -0
- package/es/input-tag/input-tag.d.ts +2 -0
- package/es/input-tag/input-tag.js +34 -30
- package/es/input-tag/style/index.css +8 -8
- package/es/input-tag/style/index.scss +11 -5
- package/es/json-form/style/index.css +0 -3
- package/es/json-form/style/index.scss +4 -3
- package/es/json-form/utils.js +4 -4
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +34 -7
- package/es/layout/style/index.css +2 -2
- package/es/layout/style/index.scss +4 -2
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/link/style/index.css +1 -1
- package/es/link/style/index.scss +3 -1
- package/es/list/list.js +1 -1
- package/es/locale/interface.d.ts +39 -0
- package/es/locale/lang/ar-eg.js +38 -0
- package/es/locale/lang/de-de.js +38 -0
- package/es/locale/lang/en-us.js +38 -0
- package/es/locale/lang/es-es.js +38 -0
- package/es/locale/lang/fr-fr.js +38 -0
- package/es/locale/lang/id-id.js +38 -0
- package/es/locale/lang/it-it.js +38 -0
- package/es/locale/lang/ja-jp.js +38 -0
- package/es/locale/lang/km-kh.js +38 -0
- package/es/locale/lang/ko-kr.js +38 -0
- package/es/locale/lang/ms-my.js +38 -0
- package/es/locale/lang/nl-nl.js +38 -0
- package/es/locale/lang/pt-pt.js +38 -0
- package/es/locale/lang/ru-ru.js +38 -0
- package/es/locale/lang/th-th.js +38 -0
- package/es/locale/lang/vi-vn.js +38 -0
- package/es/locale/lang/zh-cn.js +38 -0
- package/es/locale/lang/zh-tw.js +38 -0
- package/es/mention/mention.js +8 -0
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +29 -3
- package/es/menu/item.d.ts +1 -1
- 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 +31 -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/overflow-list/overflow-list.js +1 -1
- 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 +19 -2
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +15 -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 +23 -4
- 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 +5 -1
- 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 +3 -1
- package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +2 -0
- 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 +13 -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/rate.js +27 -1
- 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/sd-vue.js +54 -52
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/select/index.d.ts +124 -0
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/select/select.d.ts +62 -0
- package/es/select/select.js +20 -4
- 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/statistic/statistic.vue_vue_type_script_setup_true_lang.js +1 -1
- 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 +10 -2
- 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/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/index.d.ts +4 -4
- 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-operation-td.js +3 -3
- package/es/table/table-operation-th.js +1 -1
- package/es/table/table-tbody.js +4 -1
- package/es/table/table-td.js +2 -1
- package/es/table/table-th.d.ts +1 -1
- package/es/table/table-th.js +7 -5
- package/es/table/table-thead.js +4 -1
- package/es/table/table-tr.js +4 -1
- package/es/table/table.d.ts +1 -1
- package/es/table/table.js +8 -4
- package/es/tabs/context.d.ts +1 -0
- package/es/tabs/style/index.css +5 -5
- package/es/tabs/style/index.scss +7 -7
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +21 -2
- package/es/tabs/tabs-button.js +1 -1
- 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.js +4 -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 +27 -4
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/textarea/style/index.css +2 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +18 -3
- package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/toolbar/index.d.ts +3 -3
- package/es/toolbar/toolbar.vue.d.ts +2 -2
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +1 -0
- package/es/transfer/style/index.css +1 -1
- package/es/transfer/style/index.scss +1 -1
- package/es/transfer/transfer-list-item.js +18 -2
- package/es/transfer/transfer.vue_vue_type_script_setup_true_lang.js +7 -5
- package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +28 -8
- package/es/tree/context.d.ts +2 -0
- package/es/tree/node-switcher.vue_vue_type_script_lang.js +1 -1
- 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 +81 -2
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +10 -1
- 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/edit-content.vue_vue_type_script_setup_true_lang.js +17 -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-list-item.js +18 -5
- package/es/upload/upload-picture-item.js +27 -3
- package/es/verification-code/verification-code.js +8 -1
- package/json/vetur-attributes.json +15 -0
- package/json/vetur-tags.json +9 -2
- package/json/web-types.json +39 -1
- package/package.json +1 -1
|
@@ -1,12 +1,14 @@
|
|
|
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 { useI18n } from "../locale/index.js";
|
|
3
4
|
import { carouselInjectionKey } from "./context.js";
|
|
4
|
-
import { computed, createElementBlock, defineComponent, getCurrentInstance, inject, normalizeClass, normalizeStyle, openBlock, renderSlot } from "vue";
|
|
5
|
+
import { computed, createElementBlock, defineComponent, getCurrentInstance, inject, normalizeClass, normalizeStyle, openBlock, renderSlot, unref } from "vue";
|
|
5
6
|
//#region components/carousel/carousel-item.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var _hoisted_1 = ["aria-hidden"];
|
|
7
|
+
var _hoisted_1 = ["aria-label", "aria-hidden"];
|
|
7
8
|
var carousel_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "CarouselItem" }), {}, {
|
|
8
9
|
__name: "carousel-item",
|
|
9
10
|
setup(__props) {
|
|
11
|
+
const { t } = useI18n();
|
|
10
12
|
const prefixCls = getPrefixCls("carousel-item");
|
|
11
13
|
const instance = getCurrentInstance();
|
|
12
14
|
const context = inject(carouselInjectionKey, {});
|
|
@@ -14,6 +16,10 @@ var carousel_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
14
16
|
var _context$items$indexO, _context$items, _instance$uid;
|
|
15
17
|
return (_context$items$indexO = (_context$items = context.items) === null || _context$items === void 0 ? void 0 : _context$items.indexOf((_instance$uid = instance === null || instance === void 0 ? void 0 : instance.uid) !== null && _instance$uid !== void 0 ? _instance$uid : -1)) !== null && _context$items$indexO !== void 0 ? _context$items$indexO : -1;
|
|
16
18
|
});
|
|
19
|
+
const slideCount = computed(() => {
|
|
20
|
+
var _context$items$length, _context$items2;
|
|
21
|
+
return (_context$items$length = (_context$items2 = context.items) === null || _context$items2 === void 0 ? void 0 : _context$items2.length) !== null && _context$items$length !== void 0 ? _context$items$length : 0;
|
|
22
|
+
});
|
|
17
23
|
const isCurrent = computed(() => {
|
|
18
24
|
var _context$mergedIndexe;
|
|
19
25
|
return ((_context$mergedIndexe = context.mergedIndexes) === null || _context$mergedIndexe === void 0 ? void 0 : _context$mergedIndexe.mergedIndex) === index.value;
|
|
@@ -39,6 +45,9 @@ var carousel_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
39
45
|
});
|
|
40
46
|
return (_ctx, _cache) => {
|
|
41
47
|
return openBlock(), createElementBlock("div", {
|
|
48
|
+
role: "group",
|
|
49
|
+
"aria-roledescription": "slide",
|
|
50
|
+
"aria-label": unref(t)("a11y.slideOf", index.value + 1, slideCount.value),
|
|
42
51
|
"aria-hidden": !isCurrent.value,
|
|
43
52
|
class: normalizeClass(cls.value),
|
|
44
53
|
style: normalizeStyle(animationStyle.value)
|
package/es/carousel/carousel.js
CHANGED
|
@@ -1,6 +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
3
|
import { isNumber, isObject } from "../_utils/is.js";
|
|
4
|
+
import { KEYBOARD_KEY } from "../_utils/keyboard.js";
|
|
5
|
+
import { useI18n } from "../locale/index.js";
|
|
4
6
|
import { useChildrenComponents } from "../_hooks/use-children-components.js";
|
|
5
7
|
import carousel_arrow_default from "./carousel-arrow.js";
|
|
6
8
|
import carousel_indicator_default from "./carousel-indicator.js";
|
|
@@ -141,6 +143,7 @@ var carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
141
143
|
},
|
|
142
144
|
setup(props, { emit, slots }) {
|
|
143
145
|
const { current, animationName, moveSpeed, transitionTimingFunction } = toRefs(props);
|
|
146
|
+
const { t } = useI18n();
|
|
144
147
|
const prefixCls = getPrefixCls("carousel");
|
|
145
148
|
const isPause = ref(false);
|
|
146
149
|
const previousIndex = ref();
|
|
@@ -214,6 +217,15 @@ var carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
214
217
|
isNegative: index < mergedIndexes.value.mergedIndex,
|
|
215
218
|
isManual: true
|
|
216
219
|
});
|
|
220
|
+
const onKeydown = (e) => {
|
|
221
|
+
if (e.key === KEYBOARD_KEY.ARROW_RIGHT || e.key === KEYBOARD_KEY.ARROW_DOWN) {
|
|
222
|
+
e.preventDefault();
|
|
223
|
+
onNextClick();
|
|
224
|
+
} else if (e.key === KEYBOARD_KEY.ARROW_LEFT || e.key === KEYBOARD_KEY.ARROW_UP) {
|
|
225
|
+
e.preventDefault();
|
|
226
|
+
onPreviousClick();
|
|
227
|
+
}
|
|
228
|
+
};
|
|
217
229
|
const eventHandlers = computed(() => {
|
|
218
230
|
return computedAutoPlay.value.hoverToPause ? {
|
|
219
231
|
onMouseenter: () => {
|
|
@@ -246,7 +258,14 @@ var carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
246
258
|
return () => {
|
|
247
259
|
var _slots$default;
|
|
248
260
|
children.value = (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
|
249
|
-
return createVNode("div", mergeProps({
|
|
261
|
+
return createVNode("div", mergeProps({
|
|
262
|
+
"class": cls.value,
|
|
263
|
+
"role": "region",
|
|
264
|
+
"aria-roledescription": "carousel",
|
|
265
|
+
"aria-label": t("a11y.carousel"),
|
|
266
|
+
"tabindex": "0",
|
|
267
|
+
"onKeydown": onKeydown
|
|
268
|
+
}, eventHandlers.value), [
|
|
250
269
|
createVNode("div", { "class": contentCls.value }, [children.value]),
|
|
251
270
|
hasIndicator.value && createVNode("div", { "class": indicatorCls.value }, [createVNode(carousel_indicator_default, {
|
|
252
271
|
"class": props.indicatorClass,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
2
2
|
import { isFunction } from "../_utils/is.js";
|
|
3
3
|
import IconLoading from "../icon/icon-loading/index.js";
|
|
4
|
-
import IconRight from "../icon/icon-right/index.js";
|
|
5
4
|
import { PerformantEllipsis } from "../ellipsis/index.js";
|
|
5
|
+
import IconRight from "../icon/icon-right/index.js";
|
|
6
6
|
import Checkbox from "../checkbox/index.js";
|
|
7
7
|
import Radio from "../radio/index.js";
|
|
8
8
|
import { cascaderInjectionKey } from "./context.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
2
|
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { isArray, isFunction, isNull, isUndefined } from "../_utils/is.js";
|
|
4
|
+
import { KEYBOARD_KEY, getKeyDownHandler } from "../_utils/keyboard.js";
|
|
4
5
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
5
6
|
import { useDropdownVirtualListProps } from "../_hooks/use-dropdown-virtual-list-props.js";
|
|
6
7
|
import { resolveDropdownVirtualListProps } from "../_utils/virtual-dropdown.js";
|
|
7
8
|
import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
8
9
|
import Trigger from "../trigger/index.js";
|
|
9
10
|
import Tooltip from "../tooltip/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import { useTrigger } from "../_hooks/use-trigger.js";
|
|
11
|
+
import { debounce } from "../_utils/debounce.js";
|
|
12
12
|
import { cascaderInjectionKey } from "./context.js";
|
|
13
13
|
import { getCheckedStatus, getLeafOptionInfos, getLeafOptionKeys, getOptionInfos, getOptionLabel, getValidValues, getValueKey } from "./utils.js";
|
|
14
14
|
import base_cascader_panel_default from "./base-cascader-panel.js";
|
|
15
15
|
import { useSelectedPath } from "./hooks/use-selected-path.js";
|
|
16
16
|
import select_view_default from "../_components/select-view/select-view.js";
|
|
17
17
|
import { useAllowSearch } from "../_hooks/use-allow-search.js";
|
|
18
|
-
import {
|
|
18
|
+
import { useTrigger } from "../_hooks/use-trigger.js";
|
|
19
19
|
import cascader_search_panel_default from "./cascader-search-panel.js";
|
|
20
20
|
import { computed, createBlock, createSlots, createVNode, defineComponent, getCurrentInstance, guardReactiveProps, mergeProps, normalizeProps, openBlock, provide, reactive, ref, renderSlot, toRef, toRefs, unref, useAttrs, useSlots, watch, withCtx } from "vue";
|
|
21
21
|
//#region components/cascader/cascader.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -185,6 +185,12 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
185
185
|
var _props$triggerProps;
|
|
186
186
|
return (_props$triggerProps = props.triggerProps) !== null && _props$triggerProps !== void 0 ? _props$triggerProps : {};
|
|
187
187
|
});
|
|
188
|
+
const triggerInputAttrs = computed(() => ({
|
|
189
|
+
"role": "combobox",
|
|
190
|
+
"aria-expanded": computedPopupVisible.value,
|
|
191
|
+
"aria-haspopup": "menu",
|
|
192
|
+
"aria-autocomplete": mergedAllowSearch.value ? "list" : "none"
|
|
193
|
+
}));
|
|
188
194
|
watch(modelValue, (nextModelValue) => {
|
|
189
195
|
if (isUndefined(nextModelValue) || isNull(nextModelValue)) _value.value = getDefaultValue(props.multiple, props.pathMode);
|
|
190
196
|
});
|
|
@@ -483,6 +489,7 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
483
489
|
"popup-container": unref(popupContainer),
|
|
484
490
|
"prevent-focus": true,
|
|
485
491
|
"click-to-close": !Boolean(unref(mergedAllowSearch)),
|
|
492
|
+
"aria-has-popup": "menu",
|
|
486
493
|
onPopupVisibleChange: handlePopupVisibleChange
|
|
487
494
|
}), {
|
|
488
495
|
content: withCtx(() => [showSearchPanel.value ? (openBlock(), createBlock(unref(cascader_search_panel_default), {
|
|
@@ -542,7 +549,8 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
542
549
|
placeholder: unref(placeholder),
|
|
543
550
|
loading: unref(loading),
|
|
544
551
|
"max-tag-count": unref(maxTagCount),
|
|
545
|
-
"tag-nowrap": unref(tagNowrap)
|
|
552
|
+
"tag-nowrap": unref(tagNowrap),
|
|
553
|
+
"input-attrs": triggerInputAttrs.value
|
|
546
554
|
}, unref(attrs), {
|
|
547
555
|
onInputValueChange: handleInputValueChange,
|
|
548
556
|
onClear: handleClear,
|
|
@@ -590,6 +598,7 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
590
598
|
"loading",
|
|
591
599
|
"max-tag-count",
|
|
592
600
|
"tag-nowrap",
|
|
601
|
+
"input-attrs",
|
|
593
602
|
"onKeydown"
|
|
594
603
|
])]),
|
|
595
604
|
_: 3
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
.sd-select-dropdown .sd-select-option-active, .sd-select-dropdown .sd-select-option:not(.sd-select-dropdown .sd-select-option-disabled):hover {
|
|
86
86
|
color: var(--sd-color-text-1);
|
|
87
87
|
background-color: var(--sd-color-fill-2);
|
|
88
|
-
transition:
|
|
88
|
+
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);
|
|
89
89
|
}
|
|
90
90
|
.sd-select-dropdown .sd-select-option-disabled {
|
|
91
91
|
color: var(--sd-color-text-4);
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
.sd-cascader-option-active {
|
|
290
290
|
color: var(--sd-color-text-1);
|
|
291
291
|
background-color: var(--sd-color-fill-2);
|
|
292
|
-
transition:
|
|
292
|
+
transition: color 0.2s cubic-bezier(0.34, 0.69, 0.1, 1), background-color 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
293
293
|
}
|
|
294
294
|
.sd-cascader-option-active:hover {
|
|
295
295
|
color: var(--sd-color-text-1);
|
|
@@ -217,7 +217,9 @@ $cascader-prefix-cls: string.unquote('#{theme.$prefix}-cascader');
|
|
|
217
217
|
&-active {
|
|
218
218
|
color: $cascader-color-item-text_active;
|
|
219
219
|
background-color: $cascader-color-item-bg_active;
|
|
220
|
-
transition:
|
|
220
|
+
transition:
|
|
221
|
+
color theme.$transition-duration-2 theme.$transition-timing-function-standard,
|
|
222
|
+
background-color theme.$transition-duration-2 theme.$transition-timing-function-standard;
|
|
221
223
|
|
|
222
224
|
&:hover {
|
|
223
225
|
color: $cascader-color-item-text_active;
|
|
@@ -130,7 +130,10 @@ var checkbox_group_default = /* @__PURE__ */ defineComponent({
|
|
|
130
130
|
};
|
|
131
131
|
return () => {
|
|
132
132
|
var _slots$default;
|
|
133
|
-
return createVNode("span", {
|
|
133
|
+
return createVNode("span", {
|
|
134
|
+
"role": "group",
|
|
135
|
+
"class": cls.value
|
|
136
|
+
}, [options.value.length > 0 ? renderOptions() : (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)]);
|
|
134
137
|
};
|
|
135
138
|
}
|
|
136
139
|
});
|
|
@@ -19,6 +19,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
19
19
|
type: BooleanConstructor;
|
|
20
20
|
default: boolean;
|
|
21
21
|
};
|
|
22
|
+
tabindex: {
|
|
23
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
24
|
+
default: undefined;
|
|
25
|
+
};
|
|
22
26
|
uninjectGroupContext: {
|
|
23
27
|
type: BooleanConstructor;
|
|
24
28
|
default: boolean;
|
|
@@ -46,6 +50,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
46
50
|
type: BooleanConstructor;
|
|
47
51
|
default: boolean;
|
|
48
52
|
};
|
|
53
|
+
tabindex: {
|
|
54
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
55
|
+
default: undefined;
|
|
56
|
+
};
|
|
49
57
|
uninjectGroupContext: {
|
|
50
58
|
type: BooleanConstructor;
|
|
51
59
|
default: boolean;
|
|
@@ -58,6 +66,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
58
66
|
modelValue: boolean | (string | number | boolean)[];
|
|
59
67
|
defaultChecked: boolean;
|
|
60
68
|
indeterminate: boolean;
|
|
69
|
+
tabindex: string | number;
|
|
61
70
|
uninjectGroupContext: boolean;
|
|
62
71
|
}, {}, {
|
|
63
72
|
IconCheck: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/es/checkbox/checkbox.js
CHANGED
|
@@ -55,6 +55,14 @@ var checkbox_default = /* @__PURE__ */ defineComponent({
|
|
|
55
55
|
type: Boolean,
|
|
56
56
|
default: false
|
|
57
57
|
},
|
|
58
|
+
/**
|
|
59
|
+
* @zh 原生 input 的 tabindex(默认不渲染,input 保持原生可聚焦;树节点内传 -1 把 checkbox 移出 Tab 序列,改由 treeitem 统一聚焦/操作)
|
|
60
|
+
* @en tabindex for the native input (omitted by default so the input stays natively focusable; pass -1 in tree nodes to remove the checkbox from the Tab order and operate it via the treeitem)
|
|
61
|
+
*/
|
|
62
|
+
tabindex: {
|
|
63
|
+
type: [Number, String],
|
|
64
|
+
default: void 0
|
|
65
|
+
},
|
|
58
66
|
uninjectGroupContext: {
|
|
59
67
|
type: Boolean,
|
|
60
68
|
default: false
|
|
@@ -149,6 +157,11 @@ var checkbox_default = /* @__PURE__ */ defineComponent({
|
|
|
149
157
|
if (_checked.value !== checked) _checked.value = checked;
|
|
150
158
|
if (checkboxRef.value && checkboxRef.value.checked !== checked) checkboxRef.value.checked = checked;
|
|
151
159
|
});
|
|
160
|
+
watch(() => props.indeterminate, () => {
|
|
161
|
+
nextTick(() => {
|
|
162
|
+
if (checkboxRef.value) checkboxRef.value.indeterminate = props.indeterminate;
|
|
163
|
+
});
|
|
164
|
+
}, { immediate: true });
|
|
152
165
|
return () => {
|
|
153
166
|
var _ref, _ref2, _slots$checkbox, _checkboxGroupCtx$slo;
|
|
154
167
|
return createVNode("label", {
|
|
@@ -158,6 +171,7 @@ var checkbox_default = /* @__PURE__ */ defineComponent({
|
|
|
158
171
|
createVNode("input", {
|
|
159
172
|
"ref": checkboxRef,
|
|
160
173
|
"type": "checkbox",
|
|
174
|
+
"tabindex": props.tabindex,
|
|
161
175
|
"checked": computedChecked.value,
|
|
162
176
|
"value": props.value,
|
|
163
177
|
"class": `${prefixCls}-target`,
|
package/es/checkbox/index.d.ts
CHANGED
|
@@ -23,6 +23,10 @@ declare const Checkbox: {
|
|
|
23
23
|
type: BooleanConstructor;
|
|
24
24
|
default: boolean;
|
|
25
25
|
};
|
|
26
|
+
tabindex: {
|
|
27
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
28
|
+
default: undefined;
|
|
29
|
+
};
|
|
26
30
|
uninjectGroupContext: {
|
|
27
31
|
type: BooleanConstructor;
|
|
28
32
|
default: boolean;
|
|
@@ -38,6 +42,7 @@ declare const Checkbox: {
|
|
|
38
42
|
modelValue: boolean | (string | number | boolean)[];
|
|
39
43
|
defaultChecked: boolean;
|
|
40
44
|
indeterminate: boolean;
|
|
45
|
+
tabindex: string | number;
|
|
41
46
|
uninjectGroupContext: boolean;
|
|
42
47
|
}, true, {}, {}, {
|
|
43
48
|
IconCheck: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -140,6 +145,10 @@ declare const Checkbox: {
|
|
|
140
145
|
type: BooleanConstructor;
|
|
141
146
|
default: boolean;
|
|
142
147
|
};
|
|
148
|
+
tabindex: {
|
|
149
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
150
|
+
default: undefined;
|
|
151
|
+
};
|
|
143
152
|
uninjectGroupContext: {
|
|
144
153
|
type: BooleanConstructor;
|
|
145
154
|
default: boolean;
|
|
@@ -152,6 +161,7 @@ declare const Checkbox: {
|
|
|
152
161
|
modelValue: boolean | (string | number | boolean)[];
|
|
153
162
|
defaultChecked: boolean;
|
|
154
163
|
indeterminate: boolean;
|
|
164
|
+
tabindex: string | number;
|
|
155
165
|
uninjectGroupContext: boolean;
|
|
156
166
|
}>;
|
|
157
167
|
__isFragment?: never;
|
|
@@ -177,6 +187,10 @@ declare const Checkbox: {
|
|
|
177
187
|
type: BooleanConstructor;
|
|
178
188
|
default: boolean;
|
|
179
189
|
};
|
|
190
|
+
tabindex: {
|
|
191
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
192
|
+
default: undefined;
|
|
193
|
+
};
|
|
180
194
|
uninjectGroupContext: {
|
|
181
195
|
type: BooleanConstructor;
|
|
182
196
|
default: boolean;
|
|
@@ -192,6 +206,7 @@ declare const Checkbox: {
|
|
|
192
206
|
modelValue: boolean | (string | number | boolean)[];
|
|
193
207
|
defaultChecked: boolean;
|
|
194
208
|
indeterminate: boolean;
|
|
209
|
+
tabindex: string | number;
|
|
195
210
|
uninjectGroupContext: boolean;
|
|
196
211
|
}, {}, string, {}, {
|
|
197
212
|
IconCheck: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
}
|
|
83
83
|
.sd-checkbox:hover .sd-checkbox-icon {
|
|
84
84
|
border-color: var(--sd-color-fill-4);
|
|
85
|
-
transition: border-color 0.1s cubic-bezier(0, 0, 1, 1), transform 0.3s cubic-bezier(0.3, 1.3, 0.3, 1);
|
|
85
|
+
transition: border-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), transform 0.3s cubic-bezier(0.3, 1.3, 0.3, 1);
|
|
86
86
|
}
|
|
87
87
|
.sd-checkbox-checked:hover .sd-checkbox-icon, .sd-checkbox-indeterminate:hover .sd-checkbox-icon {
|
|
88
88
|
transition: transform 0.3s cubic-bezier(0.3, 1.3, 0.3, 1);
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
&:hover &-icon {
|
|
85
85
|
border-color: $checkbox-mask-color-border_hover;
|
|
86
86
|
transition:
|
|
87
|
-
border-color theme.$transition-duration-1 theme.$transition-timing-function-
|
|
87
|
+
border-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
88
88
|
transform theme.$transition-duration-3 theme.$transition-timing-function-overshoot;
|
|
89
89
|
}
|
|
90
90
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
2
2
|
import { isNumber } from "../_utils/is.js";
|
|
3
3
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
4
|
+
import { isActivationKey } from "../_utils/keyboard.js";
|
|
4
5
|
import IconCaretLeft from "../icon/icon-caret-left/index.js";
|
|
5
6
|
import IconCaretRight from "../icon/icon-caret-right/index.js";
|
|
6
7
|
import { collapseKey } from "./context.js";
|
|
@@ -90,6 +91,16 @@ var collapse_item_default = /* @__PURE__ */ defineComponent({
|
|
|
90
91
|
(_collapseCtx$handleCl = collapseCtx.handleClick) === null || _collapseCtx$handleCl === void 0 || _collapseCtx$handleCl.call(collapseCtx, key, e);
|
|
91
92
|
}
|
|
92
93
|
};
|
|
94
|
+
const headerId = `${prefixCls}-${instance === null || instance === void 0 ? void 0 : instance.uid}-header`;
|
|
95
|
+
const contentId = `${prefixCls}-${instance === null || instance === void 0 ? void 0 : instance.uid}-content`;
|
|
96
|
+
const handleKeydown = (e) => {
|
|
97
|
+
if (props.disabled) return;
|
|
98
|
+
if (isActivationKey(e)) {
|
|
99
|
+
var _collapseCtx$handleCl2;
|
|
100
|
+
e.preventDefault();
|
|
101
|
+
(_collapseCtx$handleCl2 = collapseCtx.handleClick) === null || _collapseCtx$handleCl2 === void 0 || _collapseCtx$handleCl2.call(collapseCtx, key, e);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
93
104
|
watch(isActive, (isActive) => {
|
|
94
105
|
if (isActive && !mounted.value) mounted.value = true;
|
|
95
106
|
});
|
|
@@ -137,17 +148,24 @@ var collapse_item_default = /* @__PURE__ */ defineComponent({
|
|
|
137
148
|
"role": "button",
|
|
138
149
|
"aria-disabled": props.disabled,
|
|
139
150
|
"aria-expanded": isActive.value,
|
|
140
|
-
"
|
|
151
|
+
"aria-controls": contentId,
|
|
152
|
+
"tabindex": props.disabled ? -1 : 0,
|
|
141
153
|
"class": headerCls.value,
|
|
142
|
-
"onClick": handleClick
|
|
154
|
+
"onClick": handleClick,
|
|
155
|
+
"onKeydown": handleKeydown
|
|
143
156
|
}, [
|
|
144
157
|
expandIconRender(),
|
|
145
|
-
createVNode("div", {
|
|
158
|
+
createVNode("div", {
|
|
159
|
+
"id": headerId,
|
|
160
|
+
"class": `${prefixCls}-header-title`
|
|
161
|
+
}, [(_slots$header = (_slots$header2 = slots.header) === null || _slots$header2 === void 0 ? void 0 : _slots$header2.call(slots)) !== null && _slots$header !== void 0 ? _slots$header : props.header]),
|
|
146
162
|
slots.extra && createVNode("div", { "class": `${prefixCls}-header-extra` }, [(_slots$extra = slots.extra) === null || _slots$extra === void 0 ? void 0 : _slots$extra.call(slots)])
|
|
147
163
|
]), createVNode(Transition, mergeProps({ "name": "collapse-slider" }, transitionEvents), { default: () => {
|
|
148
164
|
var _slots$default;
|
|
149
165
|
return [withDirectives(createVNode("div", {
|
|
150
166
|
"role": "region",
|
|
167
|
+
"id": contentId,
|
|
168
|
+
"aria-labelledby": headerId,
|
|
151
169
|
"class": contentCls.value
|
|
152
170
|
}, [mounted.value && createVNode("div", {
|
|
153
171
|
"ref": "contentBoxRef",
|
package/es/collapse/context.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ export interface CollapseContext {
|
|
|
5
5
|
showExpandIcon?: boolean;
|
|
6
6
|
expandIconPosition: string;
|
|
7
7
|
destroyOnHide: boolean;
|
|
8
|
-
handleClick: (key: string | number, e:
|
|
8
|
+
handleClick: (key: string | number, e: Event) => void;
|
|
9
9
|
}
|
|
10
10
|
export declare const collapseKey: InjectionKey<CollapseContext>;
|
|
@@ -140,6 +140,7 @@ var color_picker_default = /* @__PURE__ */ defineComponent({
|
|
|
140
140
|
setup(props, { emit, slots }) {
|
|
141
141
|
const prefixCls = getPrefixCls("color-picker");
|
|
142
142
|
const innerValue = ref(props.defaultValue);
|
|
143
|
+
const popupVisible = ref(false);
|
|
143
144
|
const innerRecentColors = ref(Array.isArray(props.defaultRecentColors) ? props.defaultRecentColors : []);
|
|
144
145
|
const mergedValue = computed(() => {
|
|
145
146
|
var _props$modelValue;
|
|
@@ -201,6 +202,7 @@ var color_picker_default = /* @__PURE__ */ defineComponent({
|
|
|
201
202
|
handleColorChange(formatColorState(parseColorState(value, props.colorModes), normalizedFormat.value, mergedEnableAlpha.value), "input");
|
|
202
203
|
};
|
|
203
204
|
const onPopupVisibleChange = (visible) => {
|
|
205
|
+
popupVisible.value = visible;
|
|
204
206
|
emit("popup-visible-change", visible, triggerInputValue.value);
|
|
205
207
|
};
|
|
206
208
|
const { tipVisible, show: showReadonlyTip } = useReadonlyTip(toRef(props, "readonly"), toRef(props, "disabled"));
|
|
@@ -229,6 +231,10 @@ var color_picker_default = /* @__PURE__ */ defineComponent({
|
|
|
229
231
|
"disabled": props.disabled,
|
|
230
232
|
"readonly": props.readonly,
|
|
231
233
|
"modelValue": triggerInputValue.value,
|
|
234
|
+
"inputAttrs": {
|
|
235
|
+
"aria-haspopup": "dialog",
|
|
236
|
+
"aria-expanded": popupVisible.value
|
|
237
|
+
},
|
|
232
238
|
"onChange": handleTriggerInputChange,
|
|
233
239
|
"onClear": handleClear
|
|
234
240
|
}, props.inputProps), { prefix: () => createVNode("div", {
|
package/es/color-picker/panel.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
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 { useI18n } from "../locale/index.js";
|
|
3
4
|
import input_group_default from "../input/input-group.js";
|
|
4
5
|
import Input from "../input/index.js";
|
|
5
|
-
import Radio from "../radio/index.js";
|
|
6
|
-
import { colors } from "./colors.js";
|
|
7
6
|
import InputNumber from "../input-number/index.js";
|
|
7
|
+
import Radio from "../radio/index.js";
|
|
8
8
|
import Select from "../select/index.js";
|
|
9
|
+
import { colors } from "./colors.js";
|
|
9
10
|
import control_bar_default from "./control-bar.js";
|
|
10
11
|
import palette_default from "./palette.js";
|
|
11
12
|
import { addGradientColor, formatColor, formatColorState, getActiveGradientPoint, getColorBackground, getColorObject, getDefaultColorState, getDefaultGradientState, getFormatInputs, getGradientThumbBackground, getLinearGradientString, normalizeFormat, parseColorState, parseFormatInputValues, removeGradientColor, round, setActiveColorHsva, setGradientColors, setGradientDegree, setGradientSelectedPoint } from "./utils.js";
|
|
@@ -158,6 +159,7 @@ var panel_default = /* @__PURE__ */ defineComponent({
|
|
|
158
159
|
onPaletteBarChange: Function
|
|
159
160
|
},
|
|
160
161
|
setup(props) {
|
|
162
|
+
const { t } = useI18n();
|
|
161
163
|
const prefixCls = getPrefixCls("color-picker");
|
|
162
164
|
const sliderRef = ref();
|
|
163
165
|
const gradientShellRef = ref();
|
|
@@ -332,7 +334,7 @@ var panel_default = /* @__PURE__ */ defineComponent({
|
|
|
332
334
|
"key": value,
|
|
333
335
|
"type": "button",
|
|
334
336
|
"class": `${prefixCls}-color-block`,
|
|
335
|
-
"aria-label":
|
|
337
|
+
"aria-label": t("a11y.selectColor", value),
|
|
336
338
|
"onClick": () => emitStateChange(parseColorState(value, props.colorModes), trigger)
|
|
337
339
|
}, [createVNode("div", {
|
|
338
340
|
"class": `${prefixCls}-block`,
|
package/es/components.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ declare module 'vue' {
|
|
|
15
15
|
SdBackTop: SDVue['BackTop'];
|
|
16
16
|
SdBorderBeam: SDVue['BorderBeam'];
|
|
17
17
|
SdBadge: SDVue['Badge'];
|
|
18
|
+
SdBasicCrudTable: SDVue['BasicCrudTable'];
|
|
18
19
|
SdBreadcrumb: SDVue['Breadcrumb'];
|
|
19
20
|
SdBreadcrumbItem: SDVue['BreadcrumbItem'];
|
|
20
21
|
SdButton: SDVue['Button'];
|
|
@@ -3,10 +3,10 @@ import { getPrefixCls } from "../_utils/global-config.js";
|
|
|
3
3
|
import { _asyncToGenerator } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/asyncToGenerator.js";
|
|
4
4
|
import Tooltip from "../tooltip/index.js";
|
|
5
5
|
import Button from "../button/index.js";
|
|
6
|
-
import IconCopy from "../icon/icon-copy/index.js";
|
|
7
6
|
import Link from "../link/index.js";
|
|
7
|
+
import IconCopy from "../icon/icon-copy/index.js";
|
|
8
8
|
import Message from "../message/index.js";
|
|
9
|
-
import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useAttrs, withCtx } from "vue";
|
|
9
|
+
import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useAttrs, useSlots, withCtx } from "vue";
|
|
10
10
|
import copy from "copy-to-clipboard";
|
|
11
11
|
//#region components/copy/copy.vue?vue&type=script&setup=true&lang.ts
|
|
12
12
|
var copy_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
|
|
@@ -49,7 +49,14 @@ var copy_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
49
49
|
const props = __props;
|
|
50
50
|
const emit = __emit;
|
|
51
51
|
const attrs = useAttrs();
|
|
52
|
+
const slots = useSlots();
|
|
52
53
|
const prefixCls = getPrefixCls("copy");
|
|
54
|
+
const computedAriaLabel = computed(() => {
|
|
55
|
+
const consumer = attrs["aria-label"];
|
|
56
|
+
if (consumer !== void 0) return consumer;
|
|
57
|
+
if (slots.default) return void 0;
|
|
58
|
+
return props.tooltip;
|
|
59
|
+
});
|
|
53
60
|
const componentMap = {
|
|
54
61
|
link: Link,
|
|
55
62
|
button: Button
|
|
@@ -81,12 +88,13 @@ var copy_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
81
88
|
return openBlock(), createBlock(unref(Tooltip), normalizeProps(guardReactiveProps(mergedTooltipProps.value)), {
|
|
82
89
|
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(renderComponent.value), mergeProps(unref(attrs), {
|
|
83
90
|
class: componentClass.value,
|
|
91
|
+
"aria-label": computedAriaLabel.value,
|
|
84
92
|
onClick: handleCopy
|
|
85
93
|
}), {
|
|
86
94
|
icon: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(unref(IconCopy))])]),
|
|
87
95
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
88
96
|
_: 3
|
|
89
|
-
}, 16, ["class"]))]),
|
|
97
|
+
}, 16, ["class", "aria-label"]))]),
|
|
90
98
|
_: 3
|
|
91
99
|
}, 16);
|
|
92
100
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useI18n } from "../../locale/index.js";
|
|
2
|
-
import { dayjs } from "../../_utils/date.js";
|
|
3
2
|
import { getValueByPath } from "../../_utils/get-value-by-path.js";
|
|
3
|
+
import { dayjs } from "../../_utils/date.js";
|
|
4
4
|
import { PickerInjectionKey } from "../context.js";
|
|
5
5
|
import { provide, toRefs } from "vue";
|
|
6
6
|
//#region components/date-picker/hooks/use-provide-datepicker-transform.ts
|
|
@@ -5,6 +5,9 @@ import useCellClassName from "../hooks/use-cell-class-name.js";
|
|
|
5
5
|
import { Fragment, computed, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, reactive, renderList, renderSlot, toDisplayString, toRefs, unref } from "vue";
|
|
6
6
|
//#region components/date-picker/panels/body.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var _hoisted_1 = [
|
|
8
|
+
"aria-label",
|
|
9
|
+
"aria-selected",
|
|
10
|
+
"aria-disabled",
|
|
8
11
|
"onMouseenter",
|
|
9
12
|
"onMouseleave",
|
|
10
13
|
"onClick"
|
|
@@ -45,6 +48,7 @@ var body_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
45
48
|
now
|
|
46
49
|
}));
|
|
47
50
|
const isCellDisabled = (cellData) => isDisabledDate(cellData.value, disabledDate === null || disabledDate === void 0 ? void 0 : disabledDate.value, mode === null || mode === void 0 ? void 0 : mode.value);
|
|
51
|
+
const isCellSelected = (cellData) => Boolean((value === null || value === void 0 ? void 0 : value.value) && (isSameTime === null || isSameTime === void 0 ? void 0 : isSameTime.value) && isSameTime.value(cellData.value, value.value));
|
|
48
52
|
const isWeek = computed(() => (mode === null || mode === void 0 ? void 0 : mode.value) === "week");
|
|
49
53
|
const isHiddenNotInViewCell = (cellData) => props.hideNotInViewDates && (cellData.isPrev || cellData.isNext);
|
|
50
54
|
const getCellClassNameFn = (cellData) => {
|
|
@@ -63,17 +67,26 @@ var body_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
63
67
|
emit("cell-mouse-enter", cellData);
|
|
64
68
|
};
|
|
65
69
|
return (_ctx, _cache) => {
|
|
66
|
-
return openBlock(), createElementBlock("div", {
|
|
70
|
+
return openBlock(), createElementBlock("div", {
|
|
71
|
+
class: normalizeClass(`${unref(prefixCls)}-body`),
|
|
72
|
+
role: "grid"
|
|
73
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (row, rowIndex) => {
|
|
67
74
|
return openBlock(), createElementBlock("div", {
|
|
68
75
|
key: rowIndex,
|
|
76
|
+
role: "row",
|
|
69
77
|
class: normalizeClass([`${unref(prefixCls)}-row`, { [`${unref(prefixCls)}-row-week`]: isWeek.value }])
|
|
70
78
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, colIndex) => {
|
|
79
|
+
var _cell$value;
|
|
71
80
|
return openBlock(), createElementBlock(Fragment, null, [isWeek.value && colIndex === 0 ? (openBlock(), createElementBlock("div", {
|
|
72
81
|
key: colIndex,
|
|
73
82
|
class: normalizeClass([`${unref(prefixCls)}-cell`, `${unref(prefixCls)}-cell-week`])
|
|
74
83
|
}, [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-date`) }, [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-date-value`) }, toDisplayString(cell.label), 3)], 2)], 2)) : (openBlock(), createElementBlock("div", {
|
|
75
84
|
key: colIndex,
|
|
76
85
|
class: normalizeClass(getCellClassNameFn(cell)),
|
|
86
|
+
role: "gridcell",
|
|
87
|
+
"aria-label": (_cell$value = cell.value) === null || _cell$value === void 0 ? void 0 : _cell$value.format("YYYY-MM-DD"),
|
|
88
|
+
"aria-selected": isCellSelected(cell) ? "true" : void 0,
|
|
89
|
+
"aria-disabled": isCellDisabled(cell) || isHiddenNotInViewCell(cell) || void 0,
|
|
77
90
|
onMouseenter: () => {
|
|
78
91
|
onCellMouseEnter(cell);
|
|
79
92
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { isFunction } from "../../_utils/is.js";
|
|
3
|
-
import IconRight from "../../icon/icon-right/index.js";
|
|
4
3
|
import IconLeft from "../../icon/icon-left/index.js";
|
|
4
|
+
import IconRight from "../../icon/icon-right/index.js";
|
|
5
5
|
import useDatePickerTransform from "../hooks/use-inject-datepicker-transform.js";
|
|
6
6
|
import IconDoubleLeft from "../../icon/icon-double-left/index.js";
|
|
7
7
|
import IconDoubleRight from "../../icon/icon-double-right/index.js";
|
|
@@ -2,16 +2,16 @@ import { useFormItem } from "../_hooks/use-form-item.js";
|
|
|
2
2
|
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isBoolean, isFunction } from "../_utils/is.js";
|
|
5
|
-
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
6
5
|
import { useI18n } from "../locale/index.js";
|
|
6
|
+
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
7
7
|
import { omit } from "../_utils/omit.js";
|
|
8
8
|
import pick from "../_utils/pick.js";
|
|
9
9
|
import Trigger from "../trigger/index.js";
|
|
10
10
|
import useState from "../_hooks/use-state.js";
|
|
11
11
|
import useMergeState from "../_hooks/use-merge-state.js";
|
|
12
|
-
import { getDateValue, getDayjsValue, getNow, initializeDateLocale, isValueChange, toLocal } from "../_utils/date.js";
|
|
13
|
-
import input_default from "../_components/picker/input.js";
|
|
14
12
|
import { useConfigProviderProp } from "../_hooks/use-config-provider-prop.js";
|
|
13
|
+
import input_default from "../_components/picker/input.js";
|
|
14
|
+
import { getDateValue, getDayjsValue, getNow, initializeDateLocale, isValueChange, toLocal } from "../_utils/date.js";
|
|
15
15
|
import IconCalendar from "../icon/icon-calendar/index.js";
|
|
16
16
|
import { getFormattedValue, isValidInputValue } from "../time-picker/utils/index.js";
|
|
17
17
|
import useFormat from "./hooks/use-format.js";
|
|
@@ -637,6 +637,7 @@ var picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
637
637
|
"popup-visible": unref(panelVisible),
|
|
638
638
|
"unmount-on-close": __props.unmountOnClose,
|
|
639
639
|
"popup-container": __props.popupContainer,
|
|
640
|
+
"aria-has-popup": "dialog",
|
|
640
641
|
onPopupVisibleChange: onPanelVisibleChange
|
|
641
642
|
}), {
|
|
642
643
|
content: withCtx(() => [renderSlot(_ctx.$slots, "panelRender", {
|