@sdata/web-vue 3.13.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 +141 -111
- 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 +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/_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.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 +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_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/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 +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_vue_type_script_setup_true_lang.js +11 -2
- 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/copy/copy.vue_vue_type_script_setup_true_lang.js +10 -2
- package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +14 -1
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +1 -0
- 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 +28 -7
- 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/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/preview.vue.d.ts +1 -1
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/index.css +141 -111
- package/es/input/input.js +16 -2
- package/es/input/style/index.css +2 -2
- package/es/input/style/input.scss +4 -4
- package/es/input-number/input-number.js +5 -1
- 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/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/mention/mention.js +8 -0
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +29 -3
- 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 +28 -13
- 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 +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 +2 -0
- 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 +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/rate.js +25 -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/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 +18 -2
- 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/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 +4 -2
- 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 +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-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 +19 -2
- package/es/textarea/style/index.css +2 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +15 -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 +4 -1
- 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 +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 +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 +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-list-item.js +18 -5
- package/es/upload/upload-picture-item.js +25 -3
- package/es/verification-code/verification-code.js +6 -1
- package/json/vetur-attributes.json +15 -0
- package/json/vetur-tags.json +6 -2
- package/json/web-types.json +33 -1
- package/package.json +1 -1
package/es/input/input.js
CHANGED
|
@@ -3,6 +3,7 @@ import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helper
|
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isFunction, isNull, isObject, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
6
|
+
import { isActivationKey } from "../_utils/keyboard.js";
|
|
6
7
|
import IconClose from "../icon/icon-close/index.js";
|
|
7
8
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
8
9
|
import feedback_icon_default from "../_components/feedback-icon.js";
|
|
@@ -195,7 +196,7 @@ var input_default = /* @__PURE__ */ defineComponent({
|
|
|
195
196
|
const { size, disabled, error, modelValue, allowClear } = toRefs(props);
|
|
196
197
|
const prefixCls = getPrefixCls("input");
|
|
197
198
|
const inputRef = ref();
|
|
198
|
-
const { mergedSize: _mergedSize, mergedDisabled, mergedError: _mergedError, feedback, eventHandlers } = useFormItem({
|
|
199
|
+
const { mergedSize: _mergedSize, mergedDisabled, mergedError: _mergedError, feedback, eventHandlers, formItemCtx } = useFormItem({
|
|
199
200
|
size,
|
|
200
201
|
disabled,
|
|
201
202
|
error
|
|
@@ -320,6 +321,12 @@ var input_default = /* @__PURE__ */ defineComponent({
|
|
|
320
321
|
emitChange("", ev);
|
|
321
322
|
emit("clear", ev);
|
|
322
323
|
};
|
|
324
|
+
const handleClearKeydown = (ev) => {
|
|
325
|
+
if (isActivationKey(ev)) {
|
|
326
|
+
ev.preventDefault();
|
|
327
|
+
handleClear(ev);
|
|
328
|
+
}
|
|
329
|
+
};
|
|
323
330
|
const handleKeyDown = (e) => {
|
|
324
331
|
if (props.readonly && !mergedDisabled.value && isReadonlyModificationKey(e)) showReadonlyTip();
|
|
325
332
|
const keyCode = e.key || e.code;
|
|
@@ -346,6 +353,7 @@ var input_default = /* @__PURE__ */ defineComponent({
|
|
|
346
353
|
const inputAttrs = computed(() => pick(attrs, INPUT_EVENTS));
|
|
347
354
|
const mergeInputAttrs = computed(() => {
|
|
348
355
|
const attrs = _objectSpread2(_objectSpread2({}, inputAttrs.value), props.inputAttrs);
|
|
356
|
+
if (formItemCtx.fieldId && attrs.id === void 0) attrs.id = formItemCtx.fieldId;
|
|
349
357
|
if (mergedError.value) attrs["aria-invalid"] = true;
|
|
350
358
|
return attrs;
|
|
351
359
|
});
|
|
@@ -375,7 +383,13 @@ var input_default = /* @__PURE__ */ defineComponent({
|
|
|
375
383
|
showClearBtn.value && createVNode(icon_hover_default, mergeProps({
|
|
376
384
|
"prefix": prefixCls,
|
|
377
385
|
"class": `${prefixCls}-clear-btn`
|
|
378
|
-
}, {
|
|
386
|
+
}, {
|
|
387
|
+
"onClick": handleClear,
|
|
388
|
+
"onKeydown": handleClearKeydown,
|
|
389
|
+
"role": "button",
|
|
390
|
+
"tabindex": 0,
|
|
391
|
+
"aria-label": "Clear"
|
|
392
|
+
}), { default: () => [createVNode(IconClose, null, null)] }),
|
|
379
393
|
(slots.suffix || Boolean(props.maxLength) && props.showWordLimit || Boolean(feedback.value)) && createVNode("span", { "class": [`${prefixCls}-suffix`, { [`${prefixCls}-suffix-has-feedback`]: feedback.value }] }, [
|
|
380
394
|
Boolean(props.maxLength) && props.showWordLimit && createVNode("span", { "class": `${prefixCls}-word-limit` }, [
|
|
381
395
|
valueLength.value,
|
package/es/input/style/index.css
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
border: 1px solid transparent;
|
|
56
56
|
border-radius: var(--sd-border-radius-small);
|
|
57
57
|
cursor: text;
|
|
58
|
-
transition: color 0.1s cubic-bezier(0, 0, 1, 1), border-color 0.1s cubic-bezier(0, 0, 1, 1), background-color 0.1s cubic-bezier(0, 0, 1, 1);
|
|
58
|
+
transition: 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), background-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
59
59
|
}
|
|
60
60
|
.sd-input-wrapper:hover {
|
|
61
61
|
background-color: var(--sd-color-fill-3);
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
}
|
|
141
141
|
.sd-input-wrapper .sd-input-clear-btn > svg {
|
|
142
142
|
position: relative;
|
|
143
|
-
transition: color 0.1s cubic-bezier(0, 0, 1, 1);
|
|
143
|
+
transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
144
144
|
}
|
|
145
145
|
.sd-input-wrapper:hover .sd-input-clear-btn {
|
|
146
146
|
visibility: visible;
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
border-radius: $input-border-radius;
|
|
53
53
|
cursor: text;
|
|
54
54
|
transition:
|
|
55
|
-
color theme.$transition-duration-1 theme.$transition-timing-function-
|
|
56
|
-
border-color theme.$transition-duration-1 theme.$transition-timing-function-
|
|
57
|
-
background-color theme.$transition-duration-1 theme.$transition-timing-function-
|
|
55
|
+
color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
56
|
+
border-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
57
|
+
background-color theme.$transition-duration-1 theme.$transition-timing-function-standard;
|
|
58
58
|
|
|
59
59
|
&:hover {
|
|
60
60
|
background-color: $input-color-bg_hover;
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
|
|
144
144
|
> svg {
|
|
145
145
|
position: relative;
|
|
146
|
-
transition: color theme.$transition-duration-1 theme.$transition-timing-function-
|
|
146
|
+
transition: color theme.$transition-duration-1 theme.$transition-timing-function-standard;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
|
|
@@ -2,11 +2,11 @@ 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 { isNumber, isUndefined } from "../_utils/is.js";
|
|
5
|
+
import { KEYBOARD_KEY, getKeyDownHandler } from "../_utils/keyboard.js";
|
|
5
6
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
6
7
|
import { useSize } from "../_hooks/use-size.js";
|
|
7
8
|
import Button from "../button/index.js";
|
|
8
9
|
import Input from "../input/index.js";
|
|
9
|
-
import { KEYBOARD_KEY, getKeyDownHandler } from "../_utils/keyboard.js";
|
|
10
10
|
import IconDown from "../icon/icon-down/index.js";
|
|
11
11
|
import IconUp from "../icon/icon-up/index.js";
|
|
12
12
|
import IconMinus from "../icon/icon-minus/index.js";
|
|
@@ -392,6 +392,7 @@ var input_number_default = /* @__PURE__ */ defineComponent({
|
|
|
392
392
|
"class": [`${prefixCls}-step-button`, { [`${prefixCls}-step-button-disabled`]: mergedDisabled.value || isMax.value }],
|
|
393
393
|
"type": "button",
|
|
394
394
|
"tabindex": "-1",
|
|
395
|
+
"aria-label": "Increase",
|
|
395
396
|
"disabled": mergedDisabled.value || isMax.value,
|
|
396
397
|
"onMousedown": (e) => handleStepButton(e, "plus", true),
|
|
397
398
|
"onMouseup": clearRepeatTimer,
|
|
@@ -400,6 +401,7 @@ var input_number_default = /* @__PURE__ */ defineComponent({
|
|
|
400
401
|
"class": [`${prefixCls}-step-button`, { [`${prefixCls}-step-button-disabled`]: mergedDisabled.value || isMin.value }],
|
|
401
402
|
"type": "button",
|
|
402
403
|
"tabindex": "-1",
|
|
404
|
+
"aria-label": "Decrease",
|
|
403
405
|
"disabled": mergedDisabled.value || isMin.value,
|
|
404
406
|
"onMousedown": (e) => handleStepButton(e, "minus", true),
|
|
405
407
|
"onMouseup": clearRepeatTimer,
|
|
@@ -415,6 +417,7 @@ var input_number_default = /* @__PURE__ */ defineComponent({
|
|
|
415
417
|
const renderPrependButton = () => {
|
|
416
418
|
return createVNode(Button, mergeProps({
|
|
417
419
|
"size": mergedSize.value,
|
|
420
|
+
"aria-label": "Decrease",
|
|
418
421
|
"class": `${prefixCls}-step-button`,
|
|
419
422
|
"disabled": mergedDisabled.value || isMin.value
|
|
420
423
|
}, {
|
|
@@ -427,6 +430,7 @@ var input_number_default = /* @__PURE__ */ defineComponent({
|
|
|
427
430
|
const renderAppendButton = () => {
|
|
428
431
|
return createVNode(Button, mergeProps({
|
|
429
432
|
"size": mergedSize.value,
|
|
433
|
+
"aria-label": "Increase",
|
|
430
434
|
"class": `${prefixCls}-step-button`,
|
|
431
435
|
"disabled": mergedDisabled.value || isMax.value
|
|
432
436
|
}, {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
background-color: var(--sd-color-fill-2);
|
|
37
37
|
cursor: pointer;
|
|
38
38
|
user-select: none;
|
|
39
|
-
transition:
|
|
39
|
+
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), opacity 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
40
40
|
}
|
|
41
41
|
.sd-input-number-step-button:hover {
|
|
42
42
|
background-color: var(--sd-color-fill-3);
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
position: relative;
|
|
60
60
|
}
|
|
61
61
|
.sd-input-number-prefix, .sd-input-number-suffix {
|
|
62
|
-
transition:
|
|
62
|
+
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), opacity 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
63
63
|
}
|
|
64
64
|
.sd-input-number-mode-embed .sd-input-number-step {
|
|
65
65
|
position: absolute;
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
overflow: hidden;
|
|
71
71
|
border-radius: 1px;
|
|
72
72
|
opacity: 0;
|
|
73
|
-
transition:
|
|
73
|
+
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), opacity 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
74
74
|
}
|
|
75
75
|
.sd-input-number-mode-embed .sd-input-number-step .sd-input-number-step-button {
|
|
76
76
|
width: 100%;
|
|
@@ -14,7 +14,11 @@ $input-number-prefix-cls: string.unquote('#{theme.$prefix}-input-number');
|
|
|
14
14
|
border-radius: $input-number-border-radius;
|
|
15
15
|
|
|
16
16
|
@mixin transition() {
|
|
17
|
-
transition:
|
|
17
|
+
transition:
|
|
18
|
+
color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
19
|
+
background-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
20
|
+
border-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
21
|
+
opacity theme.$transition-duration-1 theme.$transition-timing-function-standard;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
&-step-button {
|
package/es/input-tag/index.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ declare const InputTag: {
|
|
|
64
64
|
focused: BooleanConstructor;
|
|
65
65
|
disabledInput: BooleanConstructor;
|
|
66
66
|
uninjectFormItemContext: BooleanConstructor;
|
|
67
|
+
inputAttrs: import("vue").PropType<Record<string, unknown>>;
|
|
67
68
|
}>> & Readonly<{
|
|
68
69
|
onFocus?: ((_ev: FocusEvent) => any) | undefined;
|
|
69
70
|
onClear?: ((_ev: MouseEvent) => any) | undefined;
|
|
@@ -176,6 +177,7 @@ declare const InputTag: {
|
|
|
176
177
|
focused: BooleanConstructor;
|
|
177
178
|
disabledInput: BooleanConstructor;
|
|
178
179
|
uninjectFormItemContext: BooleanConstructor;
|
|
180
|
+
inputAttrs: import("vue").PropType<Record<string, unknown>>;
|
|
179
181
|
}>> & Readonly<{
|
|
180
182
|
onFocus?: ((_ev: FocusEvent) => any) | undefined;
|
|
181
183
|
onClear?: ((_ev: MouseEvent) => any) | undefined;
|
|
@@ -275,6 +277,7 @@ declare const InputTag: {
|
|
|
275
277
|
focused: BooleanConstructor;
|
|
276
278
|
disabledInput: BooleanConstructor;
|
|
277
279
|
uninjectFormItemContext: BooleanConstructor;
|
|
280
|
+
inputAttrs: import("vue").PropType<Record<string, unknown>>;
|
|
278
281
|
}>> & Readonly<{
|
|
279
282
|
onFocus?: ((_ev: FocusEvent) => any) | undefined;
|
|
280
283
|
onClear?: ((_ev: MouseEvent) => any) | undefined;
|
|
@@ -63,6 +63,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
63
63
|
focused: BooleanConstructor;
|
|
64
64
|
disabledInput: BooleanConstructor;
|
|
65
65
|
uninjectFormItemContext: BooleanConstructor;
|
|
66
|
+
inputAttrs: PropType<Record<string, unknown>>;
|
|
66
67
|
}>, {
|
|
67
68
|
inputRef: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
68
69
|
render: () => import("vue/jsx-runtime").JSX.Element;
|
|
@@ -141,6 +142,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
141
142
|
focused: BooleanConstructor;
|
|
142
143
|
disabledInput: BooleanConstructor;
|
|
143
144
|
uninjectFormItemContext: BooleanConstructor;
|
|
145
|
+
inputAttrs: PropType<Record<string, unknown>>;
|
|
144
146
|
}>> & Readonly<{
|
|
145
147
|
onFocus?: ((_ev: FocusEvent) => any) | undefined;
|
|
146
148
|
onClear?: ((_ev: MouseEvent) => any) | undefined;
|
|
@@ -152,7 +152,8 @@ var input_tag_default = /* @__PURE__ */ defineComponent({
|
|
|
152
152
|
baseCls: String,
|
|
153
153
|
focused: Boolean,
|
|
154
154
|
disabledInput: Boolean,
|
|
155
|
-
uninjectFormItemContext: Boolean
|
|
155
|
+
uninjectFormItemContext: Boolean,
|
|
156
|
+
inputAttrs: Object
|
|
156
157
|
},
|
|
157
158
|
emits: {
|
|
158
159
|
"update:modelValue": (_value) => true,
|
|
@@ -567,35 +568,38 @@ var input_tag_default = /* @__PURE__ */ defineComponent({
|
|
|
567
568
|
}, { class: [`${prefixCls}-inner`, {
|
|
568
569
|
[`${prefixCls}-inner-responsive`]: isResponsiveMaxTagCount.value,
|
|
569
570
|
[`${prefixCls}-nowrap`]: props.tagNowrap
|
|
570
|
-
}] }), { default: () =>
|
|
571
|
-
|
|
572
|
-
return
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
[`${prefixCls}-tag
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
571
|
+
}] }), { default: () => {
|
|
572
|
+
var _props$inputAttrs;
|
|
573
|
+
return [tags.value.map((item, index) => {
|
|
574
|
+
let _slot;
|
|
575
|
+
return createVNode(Tag, mergeProps({
|
|
576
|
+
"key": `tag-${item.value}`,
|
|
577
|
+
"class": [`${prefixCls}-tag`, {
|
|
578
|
+
[`${prefixCls}-tag-counter`]: isOverflowCounterTag(item.value),
|
|
579
|
+
[`${prefixCls}-tag-overflow`]: isCompressedResponsiveTag(index, item.value)
|
|
580
|
+
}],
|
|
581
|
+
"closable": isClosableTag(item),
|
|
582
|
+
"visible": true,
|
|
583
|
+
"nowrap": props.tagNowrap || isResponsiveMaxTagCount.value,
|
|
584
|
+
"style": getTagStyle(index)
|
|
585
|
+
}, item.tagProps, { "onClose": (ev) => handleRemove(item.value, index, ev) }), _isSlot(_slot = renderTagContent(item, index)) ? _slot : { default: () => [_slot] });
|
|
586
|
+
}), createVNode("input", mergeProps(inputAttrs.value, (_props$inputAttrs = props.inputAttrs) !== null && _props$inputAttrs !== void 0 ? _props$inputAttrs : {}, {
|
|
587
|
+
"ref": inputRef,
|
|
588
|
+
"key": "input-tag-input",
|
|
589
|
+
"class": `${prefixCls}-input`,
|
|
590
|
+
"style": getInputStyle.value,
|
|
591
|
+
"placeholder": valueData.value.length === 0 ? props.placeholder : void 0,
|
|
592
|
+
"disabled": mergedDisabled.value,
|
|
593
|
+
"readonly": !!(props.readonly || props.disabledInput),
|
|
594
|
+
"onInput": handleInput,
|
|
595
|
+
"onKeydown": handleKeyDown,
|
|
596
|
+
"onFocus": handleFocus,
|
|
597
|
+
"onBlur": handleBlur,
|
|
598
|
+
"onCompositionstart": handleComposition,
|
|
599
|
+
"onCompositionupdate": handleComposition,
|
|
600
|
+
"onCompositionend": handleComposition
|
|
601
|
+
}), null)];
|
|
602
|
+
} }),
|
|
599
603
|
showClearBtn.value && createVNode(icon_hover_default, mergeProps({ "class": `${prefixCls}-clear-btn` }, {
|
|
600
604
|
onClick: handleClear,
|
|
601
605
|
onMousedown: (e) => e.stopPropagation()
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
.sd-tag-checkable {
|
|
46
46
|
cursor: pointer;
|
|
47
|
-
transition:
|
|
47
|
+
transition: 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);
|
|
48
48
|
}
|
|
49
49
|
.sd-tag-checkable:hover {
|
|
50
50
|
background-color: var(--sd-color-fill-2);
|
|
@@ -489,7 +489,7 @@
|
|
|
489
489
|
border: 1px solid transparent;
|
|
490
490
|
border-radius: var(--sd-border-radius-small);
|
|
491
491
|
cursor: text;
|
|
492
|
-
transition: color 0.1s cubic-bezier(0, 0, 1, 1), border-color 0.1s cubic-bezier(0, 0, 1, 1), background-color 0.1s cubic-bezier(0, 0, 1, 1);
|
|
492
|
+
transition: 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), background-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
493
493
|
}
|
|
494
494
|
.sd-input-tag:hover {
|
|
495
495
|
background-color: var(--sd-color-fill-3);
|
|
@@ -574,7 +574,7 @@
|
|
|
574
574
|
}
|
|
575
575
|
.sd-input-tag .sd-input-tag-clear-btn > svg {
|
|
576
576
|
position: relative;
|
|
577
|
-
transition: color 0.1s cubic-bezier(0, 0, 1, 1);
|
|
577
|
+
transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
578
578
|
}
|
|
579
579
|
.sd-input-tag:hover .sd-input-tag-clear-btn {
|
|
580
580
|
visibility: visible;
|
|
@@ -808,7 +808,7 @@
|
|
|
808
808
|
}
|
|
809
809
|
|
|
810
810
|
.input-tag-zoom-enter-from {
|
|
811
|
-
transform: scale(0.
|
|
811
|
+
transform: scale(0.94, 0.94);
|
|
812
812
|
opacity: 0;
|
|
813
813
|
}
|
|
814
814
|
|
|
@@ -818,7 +818,7 @@
|
|
|
818
818
|
}
|
|
819
819
|
|
|
820
820
|
.input-tag-zoom-enter-active {
|
|
821
|
-
transition:
|
|
821
|
+
transition: transform 0.3s cubic-bezier(0.34, 0.69, 0.1, 1), opacity 0.3s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
822
822
|
}
|
|
823
823
|
|
|
824
824
|
.input-tag-zoom-leave-from {
|
|
@@ -827,15 +827,15 @@
|
|
|
827
827
|
}
|
|
828
828
|
|
|
829
829
|
.input-tag-zoom-leave-to {
|
|
830
|
-
transform: scale(0.
|
|
830
|
+
transform: scale(0.94, 0.94);
|
|
831
831
|
opacity: 0;
|
|
832
832
|
}
|
|
833
833
|
|
|
834
834
|
.input-tag-zoom-leave-active {
|
|
835
835
|
position: absolute;
|
|
836
|
-
transition:
|
|
836
|
+
transition: transform 0.3s cubic-bezier(0.34, 0.69, 0.1, 1), opacity 0.3s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
837
837
|
}
|
|
838
838
|
|
|
839
839
|
.input-tag-zoom-move {
|
|
840
|
-
transition:
|
|
840
|
+
transition: transform 0.3s cubic-bezier(0.3, 1.3, 0.3, 1);
|
|
841
841
|
}
|
|
@@ -8,8 +8,9 @@ $input-tag-prefix-cls: string.unquote('#{theme.$prefix}-input-tag');
|
|
|
8
8
|
@include input-tag-style($input-tag-prefix-cls);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
// 标签入场/退场:从 scale(0.94) 起步而非 scale(0.5),轻微弹出即可
|
|
11
12
|
.input-tag-zoom-enter-from {
|
|
12
|
-
transform: scale(0.
|
|
13
|
+
transform: scale(0.94, 0.94);
|
|
13
14
|
opacity: 0;
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -19,7 +20,9 @@ $input-tag-prefix-cls: string.unquote('#{theme.$prefix}-input-tag');
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
.input-tag-zoom-enter-active {
|
|
22
|
-
transition:
|
|
23
|
+
transition:
|
|
24
|
+
transform theme.$transition-duration-3 theme.$transition-timing-function-standard,
|
|
25
|
+
opacity theme.$transition-duration-3 theme.$transition-timing-function-standard;
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
.input-tag-zoom-leave-from {
|
|
@@ -28,15 +31,18 @@ $input-tag-prefix-cls: string.unquote('#{theme.$prefix}-input-tag');
|
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
.input-tag-zoom-leave-to {
|
|
31
|
-
transform: scale(0.
|
|
34
|
+
transform: scale(0.94, 0.94);
|
|
32
35
|
opacity: 0;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
.input-tag-zoom-leave-active {
|
|
36
39
|
position: absolute;
|
|
37
|
-
transition:
|
|
40
|
+
transition:
|
|
41
|
+
transform theme.$transition-duration-3 theme.$transition-timing-function-standard,
|
|
42
|
+
opacity theme.$transition-duration-3 theme.$transition-timing-function-standard;
|
|
38
43
|
}
|
|
39
44
|
|
|
45
|
+
// 列表重排(FLIP)只过渡 transform
|
|
40
46
|
.input-tag-zoom-move {
|
|
41
|
-
transition:
|
|
47
|
+
transition: transform theme.$transition-duration-3 theme.$transition-timing-function-overshoot;
|
|
42
48
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { configProviderInjectionKey } from "../config-provider/context.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
|
+
import { isActivationKey } from "../_utils/keyboard.js";
|
|
4
5
|
import { useScrollbar } from "../_hooks/use-scrollbar.js";
|
|
5
6
|
import Scrollbar from "../scrollbar/index.js";
|
|
6
7
|
import IconRight from "../icon/icon-right/index.js";
|
|
@@ -11,6 +12,9 @@ import { LayoutContextInjectionKey, SiderContextInjectionKey } from "./context.j
|
|
|
11
12
|
import IconMenu from "../icon/icon-menu/index.js";
|
|
12
13
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, inject, mergeProps, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, provide, reactive, ref, renderSlot, resolveDynamicComponent, toRef, unref, watch, withCtx } from "vue";
|
|
13
14
|
//#region components/layout/sider.vue?vue&type=script&setup=true&lang.ts
|
|
15
|
+
var _hoisted_1 = ["aria-expanded"];
|
|
16
|
+
var _hoisted_2 = ["aria-expanded"];
|
|
17
|
+
var _hoisted_3 = ["aria-expanded"];
|
|
14
18
|
var sider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "LayoutSider" }), {}, {
|
|
15
19
|
__name: "sider",
|
|
16
20
|
props: {
|
|
@@ -182,6 +186,12 @@ var sider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
182
186
|
const toggle = () => {
|
|
183
187
|
handleSetCollapsed(!mergedCollapsed.value, "clickTrigger");
|
|
184
188
|
};
|
|
189
|
+
const handleTriggerKeydown = (ev) => {
|
|
190
|
+
if (isActivationKey(ev)) {
|
|
191
|
+
ev.preventDefault();
|
|
192
|
+
toggle();
|
|
193
|
+
}
|
|
194
|
+
};
|
|
185
195
|
const below = ref(false);
|
|
186
196
|
const setupResponsive = () => {
|
|
187
197
|
const { breakpoint } = props;
|
|
@@ -369,8 +379,13 @@ var sider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
369
379
|
}, 16, ["visible"]), renderTrigger.value ? (openBlock(), createElementBlock("span", {
|
|
370
380
|
key: 0,
|
|
371
381
|
class: normalizeClass(`${unref(prefixCls)}-temporary-trigger`),
|
|
372
|
-
|
|
373
|
-
|
|
382
|
+
role: "button",
|
|
383
|
+
tabindex: "0",
|
|
384
|
+
"aria-expanded": !mergedCollapsed.value,
|
|
385
|
+
"aria-label": "Toggle sidebar",
|
|
386
|
+
onClick: toggle,
|
|
387
|
+
onKeydown: handleTriggerKeydown
|
|
388
|
+
}, [renderSlot(_ctx.$slots, "trigger", {}, () => [createVNode(unref(IconMenu))])], 42, _hoisted_1)) : createCommentVNode("", true)], 64)) : __props.rail ? (openBlock(), createElementBlock("div", {
|
|
374
389
|
key: 1,
|
|
375
390
|
class: normalizeClass(railOverlayCls.value),
|
|
376
391
|
style: normalizeStyle(railOverlayStyle.value)
|
|
@@ -405,13 +420,23 @@ var sider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
405
420
|
key: 0,
|
|
406
421
|
class: normalizeClass([`${unref(prefixCls)}-zero-width-trigger`, `${unref(prefixCls)}-zero-width-trigger-${__props.reverseArrow ? "right" : "left"}`]),
|
|
407
422
|
style: normalizeStyle(__props.zeroWidthTriggerStyle),
|
|
408
|
-
|
|
409
|
-
|
|
423
|
+
role: "button",
|
|
424
|
+
tabindex: "0",
|
|
425
|
+
"aria-expanded": !mergedCollapsed.value,
|
|
426
|
+
"aria-label": "Toggle sidebar",
|
|
427
|
+
onClick: toggle,
|
|
428
|
+
onKeydown: handleTriggerKeydown
|
|
429
|
+
}, [renderSlot(_ctx.$slots, "trigger", {}, () => [createVNode(unref(IconMenu))])], 46, _hoisted_2)) : (openBlock(), createElementBlock("div", {
|
|
410
430
|
key: 1,
|
|
411
431
|
class: normalizeClass(`${unref(prefixCls)}-trigger`),
|
|
412
432
|
style: normalizeStyle({ width: siderWidth.value }),
|
|
413
|
-
|
|
414
|
-
|
|
433
|
+
role: "button",
|
|
434
|
+
tabindex: "0",
|
|
435
|
+
"aria-expanded": !mergedCollapsed.value,
|
|
436
|
+
"aria-label": "Toggle sidebar",
|
|
437
|
+
onClick: toggle,
|
|
438
|
+
onKeydown: handleTriggerKeydown
|
|
439
|
+
}, [renderSlot(_ctx.$slots, "trigger", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(defaultTriggerComponent.value)))])], 46, _hoisted_3))], 64)) : createCommentVNode("", true)
|
|
415
440
|
], 64))], 38);
|
|
416
441
|
};
|
|
417
442
|
}
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
line-height: 44px;
|
|
125
125
|
text-align: center;
|
|
126
126
|
cursor: pointer;
|
|
127
|
-
transition:
|
|
127
|
+
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);
|
|
128
128
|
}
|
|
129
129
|
.sd-layout-sider-zero-width-trigger {
|
|
130
130
|
position: absolute;
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
position: absolute;
|
|
148
148
|
inset: 0;
|
|
149
149
|
background: transparent;
|
|
150
|
-
transition:
|
|
150
|
+
transition: background-color 0.3s ease;
|
|
151
151
|
content: "";
|
|
152
152
|
}
|
|
153
153
|
.sd-layout-sider-zero-width-trigger:hover::after {
|
|
@@ -123,7 +123,9 @@ $text-color: var(string.unquote('#{theme.$sd-cssvars-prefix}-color-text-1'));
|
|
|
123
123
|
line-height: $layout-sider-trigger-height;
|
|
124
124
|
text-align: center;
|
|
125
125
|
cursor: pointer;
|
|
126
|
-
transition:
|
|
126
|
+
transition:
|
|
127
|
+
color $layout-motion-duration-mid theme.$transition-timing-function-standard,
|
|
128
|
+
background-color $layout-motion-duration-mid theme.$transition-timing-function-standard;
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
&-zero-width-trigger {
|
|
@@ -147,7 +149,7 @@ $text-color: var(string.unquote('#{theme.$sd-cssvars-prefix}-color-text-1'));
|
|
|
147
149
|
position: absolute;
|
|
148
150
|
inset: 0;
|
|
149
151
|
background: transparent;
|
|
150
|
-
transition:
|
|
152
|
+
transition: background-color $layout-motion-duration-slow ease;
|
|
151
153
|
content: '';
|
|
152
154
|
}
|
|
153
155
|
|
package/es/link/style/index.css
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
background-color: transparent;
|
|
28
28
|
border-radius: var(--sd-border-radius-small);
|
|
29
29
|
cursor: pointer;
|
|
30
|
-
transition:
|
|
30
|
+
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);
|
|
31
31
|
}
|
|
32
32
|
.sd-link:hover {
|
|
33
33
|
color: rgb(var(--sd-link-6));
|
package/es/link/style/index.scss
CHANGED
|
@@ -17,7 +17,9 @@ $link-prefix-cls: string.unquote('#{theme.$prefix}-link');
|
|
|
17
17
|
background-color: global.$color-transparent;
|
|
18
18
|
border-radius: $link-border-radius;
|
|
19
19
|
cursor: pointer;
|
|
20
|
-
transition:
|
|
20
|
+
transition:
|
|
21
|
+
color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
22
|
+
background-color theme.$transition-duration-1 theme.$transition-timing-function-standard;
|
|
21
23
|
|
|
22
24
|
&:hover {
|
|
23
25
|
color: $link-color-text_hover;
|
package/es/mention/mention.js
CHANGED
|
@@ -277,6 +277,8 @@ var mention_default = /* @__PURE__ */ defineComponent({
|
|
|
277
277
|
},
|
|
278
278
|
"key": item.key,
|
|
279
279
|
"class": cls,
|
|
280
|
+
"role": "option",
|
|
281
|
+
"aria-disabled": item.disabled || void 0,
|
|
280
282
|
"onClick": (ev) => {
|
|
281
283
|
if (!item.disabled) handleSelect(item.key, ev);
|
|
282
284
|
},
|
|
@@ -358,6 +360,12 @@ var mention_default = /* @__PURE__ */ defineComponent({
|
|
|
358
360
|
"modelValue": computedValue.value,
|
|
359
361
|
"disabled": mergedDisabled.value,
|
|
360
362
|
"readonly": props.readonly,
|
|
363
|
+
"inputAttrs": {
|
|
364
|
+
"role": "combobox",
|
|
365
|
+
"aria-haspopup": "listbox",
|
|
366
|
+
"aria-expanded": computedPopupVisible.value,
|
|
367
|
+
"aria-autocomplete": "list"
|
|
368
|
+
},
|
|
361
369
|
"onInput": handleInput,
|
|
362
370
|
"onClear": handleClear,
|
|
363
371
|
"onFocus": onFocus,
|
|
@@ -1,6 +1,7 @@
|
|
|
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";
|
|
4
5
|
import { omit } from "../_utils/omit.js";
|
|
5
6
|
import usePickSlots from "../_hooks/use-pick-slots.js";
|
|
6
7
|
import useMergeState from "../_hooks/use-merge-state.js";
|
|
@@ -13,6 +14,7 @@ import IconMenuUnfold from "../icon/icon-menu-unfold/index.js";
|
|
|
13
14
|
import useMenuOpenState from "./hooks/use-menu-open-state.js";
|
|
14
15
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeClass, openBlock, provide, reactive, renderSlot, toRefs, unref, useSlots } from "vue";
|
|
15
16
|
//#region components/menu/base-menu.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
+
var _hoisted_1 = ["role"];
|
|
16
18
|
/**
|
|
17
19
|
* @displayName Menu
|
|
18
20
|
*/
|
|
@@ -242,6 +244,26 @@ var base_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
242
244
|
const width = computedCollapsed.value ? pxCollapsedWidth : objectStyle === null || objectStyle === void 0 ? void 0 : objectStyle.width;
|
|
243
245
|
return [objectStyle ? omit(objectStyle, ["width"]) : style.value, { width }];
|
|
244
246
|
});
|
|
247
|
+
const expandIconDown = usePickSlots(slots, "expand-icon-down");
|
|
248
|
+
const expandIconRight = usePickSlots(slots, "expand-icon-right");
|
|
249
|
+
const onMenuKeydown = (e) => {
|
|
250
|
+
const horizontal = mode.value === "horizontal";
|
|
251
|
+
const forward = horizontal ? e.key === KEYBOARD_KEY.ARROW_RIGHT : e.key === KEYBOARD_KEY.ARROW_DOWN;
|
|
252
|
+
const backward = horizontal ? e.key === KEYBOARD_KEY.ARROW_LEFT : e.key === KEYBOARD_KEY.ARROW_UP;
|
|
253
|
+
if (!forward && !backward && e.key !== KEYBOARD_KEY.HOME && e.key !== KEYBOARD_KEY.END) return;
|
|
254
|
+
const container = e.currentTarget;
|
|
255
|
+
const items = Array.from(container.querySelectorAll("[role=\"menuitem\"]")).filter((el) => el.tabIndex === 0);
|
|
256
|
+
if (!items.length) return;
|
|
257
|
+
const current = e.target;
|
|
258
|
+
const idx = items.indexOf(current);
|
|
259
|
+
e.preventDefault();
|
|
260
|
+
let target;
|
|
261
|
+
if (e.key === KEYBOARD_KEY.HOME) target = items[0];
|
|
262
|
+
else if (e.key === KEYBOARD_KEY.END) target = items[items.length - 1];
|
|
263
|
+
else if (forward) target = items[idx < 0 ? 0 : Math.min(idx + 1, items.length - 1)];
|
|
264
|
+
else if (backward) target = items[idx < 0 ? 0 : Math.max(idx - 1, 0)];
|
|
265
|
+
target === null || target === void 0 || target.focus();
|
|
266
|
+
};
|
|
245
267
|
provide(MenuInjectionKey, reactive({
|
|
246
268
|
theme,
|
|
247
269
|
mode,
|
|
@@ -258,8 +280,8 @@ var base_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
258
280
|
ellipsis,
|
|
259
281
|
ellipsisProps,
|
|
260
282
|
popupMaxHeight,
|
|
261
|
-
expandIconDown
|
|
262
|
-
expandIconRight
|
|
283
|
+
expandIconDown,
|
|
284
|
+
expandIconRight,
|
|
263
285
|
onMenuItemClick: (key) => {
|
|
264
286
|
setSelectedKeys([key]);
|
|
265
287
|
emit("update:selectedKeys", [key]);
|
|
@@ -274,7 +296,11 @@ var base_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
274
296
|
}));
|
|
275
297
|
provideLevel(1);
|
|
276
298
|
return (_ctx, _cache) => {
|
|
277
|
-
return openBlock(), createElementBlock("div", mergeProps({ class: classNames.value }, _ctx.$attrs, { style: computedStyle.value }), [createElementVNode("div", {
|
|
299
|
+
return openBlock(), createElementBlock("div", mergeProps({ class: classNames.value }, _ctx.$attrs, { style: computedStyle.value }), [createElementVNode("div", {
|
|
300
|
+
class: normalizeClass(`${computedPrefixCls.value}-inner`),
|
|
301
|
+
role: !unref(inTrigger) && unref(mode) === "horizontal" ? "menubar" : "menu",
|
|
302
|
+
onKeydown: onMenuKeydown
|
|
303
|
+
}, [renderSlot(_ctx.$slots, "default")], 42, _hoisted_1), computedHasCollapseButton.value ? (openBlock(), createElementBlock("div", {
|
|
278
304
|
key: 0,
|
|
279
305
|
class: normalizeClass(`${computedPrefixCls.value}-collapse-button`),
|
|
280
306
|
onClick: onCollapseBtnClick
|