@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
|
@@ -100,6 +100,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
100
100
|
type: BooleanConstructor;
|
|
101
101
|
default: boolean;
|
|
102
102
|
};
|
|
103
|
+
tabindex: {
|
|
104
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
105
|
+
default: undefined;
|
|
106
|
+
};
|
|
103
107
|
uninjectGroupContext: {
|
|
104
108
|
type: BooleanConstructor;
|
|
105
109
|
default: boolean;
|
|
@@ -115,6 +119,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
115
119
|
modelValue: boolean | (string | number | boolean)[];
|
|
116
120
|
defaultChecked: boolean;
|
|
117
121
|
indeterminate: boolean;
|
|
122
|
+
tabindex: string | number;
|
|
118
123
|
uninjectGroupContext: boolean;
|
|
119
124
|
}, true, {}, {}, {
|
|
120
125
|
IconCheck: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -217,6 +222,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
217
222
|
type: BooleanConstructor;
|
|
218
223
|
default: boolean;
|
|
219
224
|
};
|
|
225
|
+
tabindex: {
|
|
226
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
227
|
+
default: undefined;
|
|
228
|
+
};
|
|
220
229
|
uninjectGroupContext: {
|
|
221
230
|
type: BooleanConstructor;
|
|
222
231
|
default: boolean;
|
|
@@ -229,6 +238,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
229
238
|
modelValue: boolean | (string | number | boolean)[];
|
|
230
239
|
defaultChecked: boolean;
|
|
231
240
|
indeterminate: boolean;
|
|
241
|
+
tabindex: string | number;
|
|
232
242
|
uninjectGroupContext: boolean;
|
|
233
243
|
}>;
|
|
234
244
|
__isFragment?: never;
|
|
@@ -254,6 +264,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
254
264
|
type: BooleanConstructor;
|
|
255
265
|
default: boolean;
|
|
256
266
|
};
|
|
267
|
+
tabindex: {
|
|
268
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
269
|
+
default: undefined;
|
|
270
|
+
};
|
|
257
271
|
uninjectGroupContext: {
|
|
258
272
|
type: BooleanConstructor;
|
|
259
273
|
default: boolean;
|
|
@@ -269,6 +283,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
269
283
|
modelValue: boolean | (string | number | boolean)[];
|
|
270
284
|
defaultChecked: boolean;
|
|
271
285
|
indeterminate: boolean;
|
|
286
|
+
tabindex: string | number;
|
|
272
287
|
uninjectGroupContext: boolean;
|
|
273
288
|
}, {}, string, {}, {
|
|
274
289
|
IconCheck: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/es/table/table-tbody.js
CHANGED
|
@@ -7,7 +7,10 @@ var table_tbody_default = /* @__PURE__ */ defineComponent({
|
|
|
7
7
|
const prefixCls = getPrefixCls("table");
|
|
8
8
|
return () => {
|
|
9
9
|
var _slots$tbody$, _slots$tbody;
|
|
10
|
-
return createVNode((_slots$tbody$ = (_slots$tbody = slots.tbody) === null || _slots$tbody === void 0 ? void 0 : _slots$tbody.call(slots)[0]) !== null && _slots$tbody$ !== void 0 ? _slots$tbody$ : "div", {
|
|
10
|
+
return createVNode((_slots$tbody$ = (_slots$tbody = slots.tbody) === null || _slots$tbody === void 0 ? void 0 : _slots$tbody.call(slots)[0]) !== null && _slots$tbody$ !== void 0 ? _slots$tbody$ : "div", {
|
|
11
|
+
class: `${prefixCls}-tbody`,
|
|
12
|
+
role: "rowgroup"
|
|
13
|
+
}, { default: slots.default });
|
|
11
14
|
};
|
|
12
15
|
}
|
|
13
16
|
});
|
package/es/table/table-td.js
CHANGED
|
@@ -184,7 +184,8 @@ var table_td_default = /* @__PURE__ */ defineComponent({
|
|
|
184
184
|
rowIndex: (_props$rowIndex2 = props.rowIndex) !== null && _props$rowIndex2 !== void 0 ? _props$rowIndex2 : -1
|
|
185
185
|
})[0]) !== null && _slots$td$ !== void 0 ? _slots$td$ : "div", {
|
|
186
186
|
class: cls.value,
|
|
187
|
-
style: style.value
|
|
187
|
+
style: style.value,
|
|
188
|
+
role: "cell"
|
|
188
189
|
}, { default: () => [renderCell()] });
|
|
189
190
|
};
|
|
190
191
|
}
|
package/es/table/table-th.js
CHANGED
|
@@ -207,8 +207,10 @@ var table_th_default = /* @__PURE__ */ defineComponent({
|
|
|
207
207
|
return () => {
|
|
208
208
|
var _slots$th$, _slots$th;
|
|
209
209
|
return createVNode((_slots$th$ = (_slots$th = slots.th) === null || _slots$th === void 0 ? void 0 : _slots$th.call(slots, { column: props.column })[0]) !== null && _slots$th$ !== void 0 ? _slots$th$ : "div", {
|
|
210
|
-
class: cls.value,
|
|
211
|
-
style: style.value
|
|
210
|
+
"class": cls.value,
|
|
211
|
+
"style": style.value,
|
|
212
|
+
"role": "columnheader",
|
|
213
|
+
"aria-sort": hasSorter.value ? sortOrder.value === "ascend" ? "ascending" : sortOrder.value === "descend" ? "descending" : "none" : void 0
|
|
212
214
|
}, { default: () => [
|
|
213
215
|
renderCell(),
|
|
214
216
|
!filterIconAlignLeft.value && renderFilter(),
|
package/es/table/table-thead.js
CHANGED
|
@@ -7,7 +7,10 @@ var table_thead_default = /* @__PURE__ */ defineComponent({
|
|
|
7
7
|
const prefixCls = getPrefixCls("table");
|
|
8
8
|
return () => {
|
|
9
9
|
var _slots$thead$, _slots$thead;
|
|
10
|
-
return createVNode((_slots$thead$ = (_slots$thead = slots.thead) === null || _slots$thead === void 0 ? void 0 : _slots$thead.call(slots)[0]) !== null && _slots$thead$ !== void 0 ? _slots$thead$ : "div", {
|
|
10
|
+
return createVNode((_slots$thead$ = (_slots$thead = slots.thead) === null || _slots$thead === void 0 ? void 0 : _slots$thead.call(slots)[0]) !== null && _slots$thead$ !== void 0 ? _slots$thead$ : "div", {
|
|
11
|
+
class: `${prefixCls}-thead`,
|
|
12
|
+
role: "rowgroup"
|
|
13
|
+
}, { default: slots.default });
|
|
11
14
|
};
|
|
12
15
|
}
|
|
13
16
|
});
|
package/es/table/table-tr.js
CHANGED
|
@@ -25,7 +25,10 @@ var table_tr_default = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
return createVNode((_slots$tr$ = (_slots$tr = slots.tr) === null || _slots$tr === void 0 ? void 0 : _slots$tr.call(slots, {
|
|
26
26
|
rowIndex: props.rowIndex,
|
|
27
27
|
record: (_props$record = props.record) === null || _props$record === void 0 ? void 0 : _props$record.raw
|
|
28
|
-
})[0]) !== null && _slots$tr$ !== void 0 ? _slots$tr$ : "div", {
|
|
28
|
+
})[0]) !== null && _slots$tr$ !== void 0 ? _slots$tr$ : "div", {
|
|
29
|
+
class: cls.value,
|
|
30
|
+
role: "row"
|
|
31
|
+
}, { default: slots.default });
|
|
29
32
|
};
|
|
30
33
|
}
|
|
31
34
|
});
|
package/es/table/table.js
CHANGED
|
@@ -1502,11 +1502,15 @@ var table_default = /* @__PURE__ */ defineComponent({
|
|
|
1502
1502
|
});
|
|
1503
1503
|
const render = () => {
|
|
1504
1504
|
var _slots$columns;
|
|
1505
|
-
if (slots.default) return createVNode("div", {
|
|
1505
|
+
if (slots.default) return createVNode("div", {
|
|
1506
|
+
"class": cls.value,
|
|
1507
|
+
"role": "table"
|
|
1508
|
+
}, [renderTable(slots.default)]);
|
|
1506
1509
|
children.value = (_slots$columns = slots.columns) === null || _slots$columns === void 0 ? void 0 : _slots$columns.call(slots);
|
|
1507
1510
|
return createVNode("div", {
|
|
1508
1511
|
"class": cls.value,
|
|
1509
|
-
"style": style.value
|
|
1512
|
+
"style": style.value,
|
|
1513
|
+
"role": "table"
|
|
1510
1514
|
}, [children.value, createVNode(Spin, spinProps.value, { default: () => [
|
|
1511
1515
|
props.pagination !== false && (flattenData.value.length > 0 || sortedData.value.length > 0) && isPaginationTop.value && renderPagination(),
|
|
1512
1516
|
renderTable(),
|
package/es/tabs/context.d.ts
CHANGED
package/es/tabs/style/index.css
CHANGED
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
line-height: 1.5715;
|
|
114
114
|
outline: none;
|
|
115
115
|
cursor: pointer;
|
|
116
|
-
transition: color 0.2s cubic-bezier(0, 0, 1, 1);
|
|
116
|
+
transition: color 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
117
117
|
}
|
|
118
118
|
.sd-tabs-tab-title {
|
|
119
119
|
display: inline-block;
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
background-color: transparent;
|
|
170
170
|
border-radius: var(--sd-border-radius-small);
|
|
171
171
|
opacity: 1;
|
|
172
|
-
transition: background-color 0.2s cubic-bezier(0, 0, 1, 1), opacity 0.2s cubic-bezier(0, 0, 1, 1);
|
|
172
|
+
transition: background-color 0.2s cubic-bezier(0.34, 0.69, 0.1, 1), opacity 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
173
173
|
content: "";
|
|
174
174
|
}
|
|
175
175
|
.sd-tabs-nav-type-line .sd-tabs-tab:hover .sd-tabs-tab-title::before {
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
padding: 4px 16px;
|
|
196
196
|
font-size: 14px;
|
|
197
197
|
border: 1px solid var(--sd-color-neutral-3);
|
|
198
|
-
transition: padding 0.2s cubic-bezier(0, 0, 1, 1), color 0.2s cubic-bezier(0, 0, 1, 1);
|
|
198
|
+
transition: padding 0.2s cubic-bezier(0.34, 0.69, 0.1, 1), color 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
199
199
|
}
|
|
200
200
|
.sd-tabs-nav-type-card .sd-tabs-tab-closable, .sd-tabs-nav-type-card-gutter .sd-tabs-tab-closable {
|
|
201
201
|
padding-right: 12px;
|
|
@@ -370,7 +370,7 @@
|
|
|
370
370
|
height: 14px;
|
|
371
371
|
background-color: var(--sd-color-fill-3);
|
|
372
372
|
transform: translateY(-50%);
|
|
373
|
-
transition:
|
|
373
|
+
transition: opacity 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
374
374
|
content: "";
|
|
375
375
|
}
|
|
376
376
|
|
|
@@ -407,7 +407,7 @@
|
|
|
407
407
|
border-top: none;
|
|
408
408
|
}
|
|
409
409
|
.sd-tabs-content-animation {
|
|
410
|
-
transition:
|
|
410
|
+
transition: margin 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
411
411
|
}
|
|
412
412
|
.sd-tabs-horizontal.sd-tabs-justify {
|
|
413
413
|
display: flex;
|
package/es/tabs/style/index.scss
CHANGED
|
@@ -181,7 +181,7 @@ $tabs-prefix-cls: string.unquote('#{theme.$prefix}-tabs');
|
|
|
181
181
|
line-height: 1.5715;
|
|
182
182
|
outline: none;
|
|
183
183
|
cursor: pointer;
|
|
184
|
-
transition: color theme.$transition-duration-2 theme.$transition-timing-function-
|
|
184
|
+
transition: color theme.$transition-duration-2 theme.$transition-timing-function-standard;
|
|
185
185
|
|
|
186
186
|
&-title {
|
|
187
187
|
display: inline-block;
|
|
@@ -261,8 +261,8 @@ $tabs-prefix-cls: string.unquote('#{theme.$prefix}-tabs');
|
|
|
261
261
|
border-radius: $tabs-line-border-radius;
|
|
262
262
|
opacity: 1;
|
|
263
263
|
transition:
|
|
264
|
-
background-color theme.$transition-duration-2 theme.$transition-timing-function-
|
|
265
|
-
opacity theme.$transition-duration-2 theme.$transition-timing-function-
|
|
264
|
+
background-color theme.$transition-duration-2 theme.$transition-timing-function-standard,
|
|
265
|
+
opacity theme.$transition-duration-2 theme.$transition-timing-function-standard;
|
|
266
266
|
content: '';
|
|
267
267
|
}
|
|
268
268
|
}
|
|
@@ -318,8 +318,8 @@ $tabs-prefix-cls: string.unquote('#{theme.$prefix}-tabs');
|
|
|
318
318
|
font-size: $tabs-size-default-font-size_card;
|
|
319
319
|
border: $tabs-card-border-width solid $tabs-card-color-title-border;
|
|
320
320
|
transition:
|
|
321
|
-
padding theme.$transition-duration-2 theme.$transition-timing-function-
|
|
322
|
-
color theme.$transition-duration-2 theme.$transition-timing-function-
|
|
321
|
+
padding theme.$transition-duration-2 theme.$transition-timing-function-standard,
|
|
322
|
+
color theme.$transition-duration-2 theme.$transition-timing-function-standard;
|
|
323
323
|
|
|
324
324
|
&-closable {
|
|
325
325
|
padding-right: $tabs-card-padding-title-right_editable;
|
|
@@ -574,7 +574,7 @@ $tabs-prefix-cls: string.unquote('#{theme.$prefix}-tabs');
|
|
|
574
574
|
height: $tabs-capsule-size-separator-height;
|
|
575
575
|
background-color: $tabs-capsule-color-separator-bg;
|
|
576
576
|
transform: translateY(-50%);
|
|
577
|
-
transition:
|
|
577
|
+
transition: opacity theme.$transition-duration-2 theme.$transition-timing-function-standard;
|
|
578
578
|
content: '';
|
|
579
579
|
}
|
|
580
580
|
}
|
|
@@ -627,7 +627,7 @@ $tabs-prefix-cls: string.unquote('#{theme.$prefix}-tabs');
|
|
|
627
627
|
}
|
|
628
628
|
|
|
629
629
|
&-content-animation {
|
|
630
|
-
transition:
|
|
630
|
+
transition: margin theme.$transition-duration-2 theme.$transition-timing-function-standard;
|
|
631
631
|
}
|
|
632
632
|
|
|
633
633
|
&-horizontal#{&}-justify {
|
|
@@ -4,6 +4,13 @@ import Scrollbar from "../scrollbar/index.js";
|
|
|
4
4
|
import { tabsInjectionKey } from "./context.js";
|
|
5
5
|
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, getCurrentInstance, inject, mergeProps, normalizeClass, onBeforeUnmount, onUpdated, openBlock, reactive, ref, renderSlot, toRefs, unref, useSlots, watch, withCtx } from "vue";
|
|
6
6
|
//#region components/tabs/tab-pane.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var _hoisted_1 = [
|
|
8
|
+
"id",
|
|
9
|
+
"aria-labelledby",
|
|
10
|
+
"aria-hidden",
|
|
11
|
+
"tabindex",
|
|
12
|
+
"inert"
|
|
13
|
+
];
|
|
7
14
|
var tab_pane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "TabPane" }), {}, {
|
|
8
15
|
__name: "tab-pane",
|
|
9
16
|
props: {
|
|
@@ -53,6 +60,12 @@ var tab_pane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
53
60
|
const itemRef = ref();
|
|
54
61
|
const key = computed(() => instance === null || instance === void 0 ? void 0 : instance.vnode.key);
|
|
55
62
|
const active = computed(() => key.value === tabsCtx.activeKey);
|
|
63
|
+
const tabsId = computed(() => {
|
|
64
|
+
var _tabsCtx$tabsId;
|
|
65
|
+
return (_tabsCtx$tabsId = tabsCtx.tabsId) !== null && _tabsCtx$tabsId !== void 0 ? _tabsCtx$tabsId : "";
|
|
66
|
+
});
|
|
67
|
+
const panelId = computed(() => `${tabsId.value}-${key.value}-panel`);
|
|
68
|
+
const tabLabelledBy = computed(() => `${tabsId.value}-${key.value}-tab`);
|
|
56
69
|
const mounted = ref(tabsCtx.lazyLoad ? active.value : true);
|
|
57
70
|
const paneScrollbarProps = computed(() => {
|
|
58
71
|
const { scrollbar } = tabsCtx;
|
|
@@ -92,7 +105,13 @@ var tab_pane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
92
105
|
return openBlock(), createElementBlock("div", {
|
|
93
106
|
ref_key: "itemRef",
|
|
94
107
|
ref: itemRef,
|
|
95
|
-
class: normalizeClass([`${unref(prefixCls)}-content-item`, { [`${unref(prefixCls)}-content-item-active`]: active.value }])
|
|
108
|
+
class: normalizeClass([`${unref(prefixCls)}-content-item`, { [`${unref(prefixCls)}-content-item-active`]: active.value }]),
|
|
109
|
+
role: "tabpanel",
|
|
110
|
+
id: panelId.value,
|
|
111
|
+
"aria-labelledby": tabLabelledBy.value,
|
|
112
|
+
"aria-hidden": active.value ? void 0 : "true",
|
|
113
|
+
tabindex: active.value ? 0 : void 0,
|
|
114
|
+
inert: active.value ? void 0 : true
|
|
96
115
|
}, [mounted.value ? (openBlock(), createElementBlock("div", {
|
|
97
116
|
key: 0,
|
|
98
117
|
class: normalizeClass(paneCls.value)
|
|
@@ -102,7 +121,7 @@ var tab_pane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
102
121
|
}, paneScrollbarProps.value), {
|
|
103
122
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
104
123
|
_: 3
|
|
105
|
-
}, 16, ["outer-class"])) : renderSlot(_ctx.$slots, "default", { key: 1 })], 2)) : createCommentVNode("", true)],
|
|
124
|
+
}, 16, ["outer-class"])) : renderSlot(_ctx.$slots, "default", { key: 1 })], 2)) : createCommentVNode("", true)], 10, _hoisted_1);
|
|
106
125
|
};
|
|
107
126
|
}
|
|
108
127
|
}));
|
package/es/tabs/tabs-nav.js
CHANGED
|
@@ -4,6 +4,7 @@ import { isNumber, isUndefined } from "../_utils/is.js";
|
|
|
4
4
|
import resize_observer_default from "../_components/resize-observer.js";
|
|
5
5
|
import { off, on } from "../_utils/dom.js";
|
|
6
6
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
7
|
+
import { KEYBOARD_KEY } from "../_utils/keyboard.js";
|
|
7
8
|
import IconPlus from "../icon/icon-plus/index.js";
|
|
8
9
|
import tabs_button_default from "./tabs-button.js";
|
|
9
10
|
import tabs_nav_ink_default from "./tabs-nav-ink.js";
|
|
@@ -171,6 +172,35 @@ var tabs_nav_default = /* @__PURE__ */ defineComponent({
|
|
|
171
172
|
const scrollDirection = type === "previous" !== isRtlHorizontal.value ? -1 : 1;
|
|
172
173
|
setOffset(offset.value + scrollDirection * wrapperLength.value);
|
|
173
174
|
};
|
|
175
|
+
const focusAndActivate = (key, ev) => {
|
|
176
|
+
const el = tabsRef.value[key];
|
|
177
|
+
if (el instanceof HTMLElement) el.focus();
|
|
178
|
+
emit("click", key, ev);
|
|
179
|
+
};
|
|
180
|
+
const handleListKeydown = (ev) => {
|
|
181
|
+
const enabled = props.tabs.filter((t) => !t.disabled);
|
|
182
|
+
if (enabled.length === 0) return;
|
|
183
|
+
const len = enabled.length;
|
|
184
|
+
const currentIdx = Math.max(0, enabled.findIndex((t) => t.key === activeKey.value));
|
|
185
|
+
let nextIdx = currentIdx;
|
|
186
|
+
const key = ev.key;
|
|
187
|
+
if (direction.value === "vertical") if (key === KEYBOARD_KEY.ARROW_DOWN) nextIdx = currentIdx + 1;
|
|
188
|
+
else if (key === KEYBOARD_KEY.ARROW_UP) nextIdx = currentIdx - 1;
|
|
189
|
+
else if (key === KEYBOARD_KEY.HOME) nextIdx = 0;
|
|
190
|
+
else if (key === KEYBOARD_KEY.END) nextIdx = len - 1;
|
|
191
|
+
else return;
|
|
192
|
+
else {
|
|
193
|
+
const rtl = isRtlHorizontal.value;
|
|
194
|
+
if (key === KEYBOARD_KEY.ARROW_RIGHT) nextIdx = rtl ? currentIdx - 1 : currentIdx + 1;
|
|
195
|
+
else if (key === KEYBOARD_KEY.ARROW_LEFT) nextIdx = rtl ? currentIdx + 1 : currentIdx - 1;
|
|
196
|
+
else if (key === KEYBOARD_KEY.HOME) nextIdx = 0;
|
|
197
|
+
else if (key === KEYBOARD_KEY.END) nextIdx = len - 1;
|
|
198
|
+
else return;
|
|
199
|
+
}
|
|
200
|
+
ev.preventDefault();
|
|
201
|
+
nextIdx = (nextIdx % len + len) % len;
|
|
202
|
+
focusAndActivate(enabled[nextIdx].key, ev);
|
|
203
|
+
};
|
|
174
204
|
const handleResize = () => {
|
|
175
205
|
getSize();
|
|
176
206
|
if (inkRef.value) inkRef.value.$forceUpdate();
|
|
@@ -229,7 +259,10 @@ var tabs_nav_default = /* @__PURE__ */ defineComponent({
|
|
|
229
259
|
}, [createVNode(resize_observer_default, { "onResize": handleResize }, { default: () => [createVNode("div", {
|
|
230
260
|
"ref": listRef,
|
|
231
261
|
"class": listCls.value,
|
|
232
|
-
"style": listStyle.value
|
|
262
|
+
"style": listStyle.value,
|
|
263
|
+
"role": "tablist",
|
|
264
|
+
"aria-orientation": direction.value === "vertical" ? "vertical" : "horizontal",
|
|
265
|
+
"onKeydown": handleListKeydown
|
|
233
266
|
}, [props.tabs.map((tab) => createVNode(tabs_tab_default, {
|
|
234
267
|
"key": tab.key,
|
|
235
268
|
"ref": (component) => {
|
|
@@ -1,10 +1,18 @@
|
|
|
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 icon_hover_default from "../_components/icon-hover.js";
|
|
4
|
+
import { KEYBOARD_KEY } from "../_utils/keyboard.js";
|
|
4
5
|
import IconClose from "../icon/icon-close/index.js";
|
|
5
6
|
import { tabsInjectionKey } from "./context.js";
|
|
6
7
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, inject, mergeProps, normalizeClass, openBlock, renderSlot, unref, withCtx, withModifiers } from "vue";
|
|
7
8
|
//#region components/tabs/tabs-tab.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var _hoisted_1 = [
|
|
10
|
+
"id",
|
|
11
|
+
"tabindex",
|
|
12
|
+
"aria-selected",
|
|
13
|
+
"aria-disabled",
|
|
14
|
+
"aria-controls"
|
|
15
|
+
];
|
|
8
16
|
var tabs_tab_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "TabsTab" }), {}, {
|
|
9
17
|
__name: "tabs-tab",
|
|
10
18
|
props: {
|
|
@@ -21,11 +29,21 @@ var tabs_tab_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
21
29
|
const emit = __emit;
|
|
22
30
|
const prefixCls = getPrefixCls("tabs-tab");
|
|
23
31
|
const tabsCtx = inject(tabsInjectionKey, {});
|
|
32
|
+
const tabsId = computed(() => {
|
|
33
|
+
var _tabsCtx$tabsId;
|
|
34
|
+
return (_tabsCtx$tabsId = tabsCtx.tabsId) !== null && _tabsCtx$tabsId !== void 0 ? _tabsCtx$tabsId : "";
|
|
35
|
+
});
|
|
36
|
+
const tabId = computed(() => `${tabsId.value}-${props.tab.key}-tab`);
|
|
37
|
+
const panelId = computed(() => `${tabsId.value}-${props.tab.key}-panel`);
|
|
24
38
|
const handleClick = (e) => {
|
|
25
39
|
if (!props.tab.disabled) emit("click", props.tab.key, e);
|
|
26
40
|
};
|
|
27
41
|
const onKeyDown = (ev) => {
|
|
28
|
-
if (ev.key ===
|
|
42
|
+
if (ev.key === KEYBOARD_KEY.ENTER) handleClick(ev);
|
|
43
|
+
else if (ev.key === KEYBOARD_KEY.SPACE) {
|
|
44
|
+
ev.preventDefault();
|
|
45
|
+
handleClick(ev);
|
|
46
|
+
}
|
|
29
47
|
};
|
|
30
48
|
const eventHandlers = computed(() => {
|
|
31
49
|
return Object.assign(tabsCtx.trigger === "click" ? { onClick: handleClick } : { onMouseover: handleClick }, { onKeydown: onKeyDown });
|
|
@@ -40,8 +58,13 @@ var tabs_tab_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
40
58
|
}]);
|
|
41
59
|
return (_ctx, _cache) => {
|
|
42
60
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
43
|
-
|
|
44
|
-
class: cls.value
|
|
61
|
+
id: tabId.value,
|
|
62
|
+
class: cls.value,
|
|
63
|
+
role: "tab",
|
|
64
|
+
tabindex: __props.active && !__props.tab.disabled ? 0 : -1,
|
|
65
|
+
"aria-selected": __props.active,
|
|
66
|
+
"aria-disabled": __props.tab.disabled || void 0,
|
|
67
|
+
"aria-controls": panelId.value
|
|
45
68
|
}, eventHandlers.value), [createElementVNode("span", { class: normalizeClass(`${unref(prefixCls)}-title`) }, [renderSlot(_ctx.$slots, "default")], 2), __props.editable && __props.tab.closable ? (openBlock(), createBlock(icon_hover_default, {
|
|
46
69
|
key: 0,
|
|
47
70
|
class: normalizeClass(`${unref(prefixCls)}-close-btn`),
|
|
@@ -49,7 +72,7 @@ var tabs_tab_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
49
72
|
}, {
|
|
50
73
|
default: withCtx(() => [createVNode(unref(IconClose))]),
|
|
51
74
|
_: 1
|
|
52
|
-
}, 8, ["class"])) : createCommentVNode("", true)], 16);
|
|
75
|
+
}, 8, ["class"])) : createCommentVNode("", true)], 16, _hoisted_1);
|
|
53
76
|
};
|
|
54
77
|
}
|
|
55
78
|
}));
|
package/es/tabs/tabs.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useScrollbar } from "../_hooks/use-scrollbar.js";
|
|
|
6
6
|
import { useChildrenComponents } from "../_hooks/use-children-components.js";
|
|
7
7
|
import { tabsInjectionKey } from "./context.js";
|
|
8
8
|
import tabs_nav_default from "./tabs-nav.js";
|
|
9
|
-
import { computed, createVNode, defineComponent, inject, nextTick, provide, reactive, ref, toRef, toRefs } from "vue";
|
|
9
|
+
import { computed, createVNode, defineComponent, getCurrentInstance, inject, nextTick, provide, reactive, ref, toRef, toRefs } from "vue";
|
|
10
10
|
//#region components/tabs/tabs.tsx
|
|
11
11
|
var tabs_default = /* @__PURE__ */ defineComponent({
|
|
12
12
|
name: "Tabs",
|
|
@@ -208,6 +208,7 @@ var tabs_default = /* @__PURE__ */ defineComponent({
|
|
|
208
208
|
setup(props, { emit, slots }) {
|
|
209
209
|
const { size, lazyLoad, destroyOnHide, trigger } = toRefs(props);
|
|
210
210
|
const prefixCls = getPrefixCls("tabs");
|
|
211
|
+
const tabsId = `${prefixCls}-${getCurrentInstance().uid}`;
|
|
211
212
|
const { mergedSize } = useSize(size);
|
|
212
213
|
const mergedPosition = computed(() => props.direction === "vertical" ? "left" : props.position);
|
|
213
214
|
const mergedDirection = computed(() => ["left", "right"].includes(mergedPosition.value) ? "vertical" : "horizontal");
|
|
@@ -248,7 +249,8 @@ var tabs_default = /* @__PURE__ */ defineComponent({
|
|
|
248
249
|
addItem,
|
|
249
250
|
removeItem,
|
|
250
251
|
trigger,
|
|
251
|
-
scrollbar: computed(() => props.fullHeight && props.scrollbar !== false ? scrollbarProps.value : false)
|
|
252
|
+
scrollbar: computed(() => props.fullHeight && props.scrollbar !== false ? scrollbarProps.value : false),
|
|
253
|
+
tabsId
|
|
252
254
|
}));
|
|
253
255
|
const handleChange = (key) => {
|
|
254
256
|
if (key !== computedActiveKey.value) {
|
package/es/tag/index.d.ts
CHANGED
|
@@ -74,12 +74,12 @@ declare const Tag: {
|
|
|
74
74
|
default: undefined;
|
|
75
75
|
};
|
|
76
76
|
}>> & Readonly<{
|
|
77
|
-
onClose?: ((_ev:
|
|
77
|
+
onClose?: ((_ev: KeyboardEvent | MouseEvent) => any) | undefined;
|
|
78
78
|
"onUpdate:visible"?: ((_visible: boolean) => any) | undefined;
|
|
79
79
|
"onUpdate:checked"?: ((_checked: boolean) => any) | undefined;
|
|
80
80
|
onCheck?: ((_checked: boolean, _ev: MouseEvent) => any) | undefined;
|
|
81
81
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
82
|
-
close: (_ev:
|
|
82
|
+
close: (_ev: KeyboardEvent | MouseEvent) => any;
|
|
83
83
|
"update:visible": (_visible: boolean) => any;
|
|
84
84
|
"update:checked": (_checked: boolean) => any;
|
|
85
85
|
check: (_checked: boolean, _ev: MouseEvent) => any;
|
|
@@ -179,7 +179,7 @@ declare const Tag: {
|
|
|
179
179
|
default: undefined;
|
|
180
180
|
};
|
|
181
181
|
}>> & Readonly<{
|
|
182
|
-
onClose?: ((_ev:
|
|
182
|
+
onClose?: ((_ev: KeyboardEvent | MouseEvent) => any) | undefined;
|
|
183
183
|
"onUpdate:visible"?: ((_visible: boolean) => any) | undefined;
|
|
184
184
|
"onUpdate:checked"?: ((_checked: boolean) => any) | undefined;
|
|
185
185
|
onCheck?: ((_checked: boolean, _ev: MouseEvent) => any) | undefined;
|
|
@@ -276,12 +276,12 @@ declare const Tag: {
|
|
|
276
276
|
default: undefined;
|
|
277
277
|
};
|
|
278
278
|
}>> & Readonly<{
|
|
279
|
-
onClose?: ((_ev:
|
|
279
|
+
onClose?: ((_ev: KeyboardEvent | MouseEvent) => any) | undefined;
|
|
280
280
|
"onUpdate:visible"?: ((_visible: boolean) => any) | undefined;
|
|
281
281
|
"onUpdate:checked"?: ((_checked: boolean) => any) | undefined;
|
|
282
282
|
onCheck?: ((_checked: boolean, _ev: MouseEvent) => any) | undefined;
|
|
283
283
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
284
|
-
close: (_ev:
|
|
284
|
+
close: (_ev: KeyboardEvent | MouseEvent) => any;
|
|
285
285
|
"update:visible": (_visible: boolean) => any;
|
|
286
286
|
"update:checked": (_checked: boolean) => any;
|
|
287
287
|
check: (_checked: boolean, _ev: MouseEvent) => any;
|
package/es/tag/style/index.css
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
.sd-tag-checkable {
|
|
41
41
|
cursor: pointer;
|
|
42
|
-
transition:
|
|
42
|
+
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);
|
|
43
43
|
}
|
|
44
44
|
.sd-tag-checkable:hover {
|
|
45
45
|
background-color: var(--sd-color-fill-2);
|
package/es/tag/style/index.scss
CHANGED
|
@@ -68,7 +68,9 @@ $colors:
|
|
|
68
68
|
|
|
69
69
|
&-checkable {
|
|
70
70
|
cursor: pointer;
|
|
71
|
-
transition:
|
|
71
|
+
transition:
|
|
72
|
+
background-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
73
|
+
border-color theme.$transition-duration-1 theme.$transition-timing-function-standard;
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
&-checkable:hover {
|
package/es/tag/tag.vue.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
84
84
|
default: undefined;
|
|
85
85
|
};
|
|
86
86
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
87
|
-
close: (_ev:
|
|
87
|
+
close: (_ev: KeyboardEvent | MouseEvent) => any;
|
|
88
88
|
"update:visible": (_visible: boolean) => any;
|
|
89
89
|
"update:checked": (_checked: boolean) => any;
|
|
90
90
|
check: (_checked: boolean, _ev: MouseEvent) => any;
|
|
@@ -160,7 +160,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
160
160
|
default: undefined;
|
|
161
161
|
};
|
|
162
162
|
}>> & Readonly<{
|
|
163
|
-
onClose?: ((_ev:
|
|
163
|
+
onClose?: ((_ev: KeyboardEvent | MouseEvent) => any) | undefined;
|
|
164
164
|
"onUpdate:visible"?: ((_visible: boolean) => any) | undefined;
|
|
165
165
|
"onUpdate:checked"?: ((_checked: boolean) => any) | undefined;
|
|
166
166
|
onCheck?: ((_checked: boolean, _ev: MouseEvent) => any) | undefined;
|
|
@@ -2,6 +2,7 @@ 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
4
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
5
|
+
import { isActivationKey } from "../_utils/keyboard.js";
|
|
5
6
|
import IconClose from "../icon/icon-close/index.js";
|
|
6
7
|
import IconLoading from "../icon/icon-loading/index.js";
|
|
7
8
|
import { useSize } from "../_hooks/use-size.js";
|
|
@@ -12,6 +13,11 @@ import { computed, createBlock, createCommentVNode, createElementBlock, createSl
|
|
|
12
13
|
import chroma from "chroma-js";
|
|
13
14
|
import { isNil } from "es-toolkit/compat";
|
|
14
15
|
//#region components/tag/tag.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
+
var _hoisted_1 = [
|
|
17
|
+
"role",
|
|
18
|
+
"tabindex",
|
|
19
|
+
"aria-pressed"
|
|
20
|
+
];
|
|
15
21
|
var tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Tag" }), {}, {
|
|
16
22
|
__name: "tag",
|
|
17
23
|
props: {
|
|
@@ -321,12 +327,23 @@ var tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompon
|
|
|
321
327
|
emit("check", newChecked, ev);
|
|
322
328
|
}
|
|
323
329
|
};
|
|
330
|
+
const handleTagKeydown = (ev) => {
|
|
331
|
+
if (!props.checkable) return;
|
|
332
|
+
if (isActivationKey(ev)) {
|
|
333
|
+
ev.preventDefault();
|
|
334
|
+
handleClick(ev);
|
|
335
|
+
}
|
|
336
|
+
};
|
|
324
337
|
return (_ctx, _cache) => {
|
|
325
338
|
return computedVisible.value ? (openBlock(), createElementBlock("span", {
|
|
326
339
|
key: 0,
|
|
327
340
|
class: normalizeClass(cls.value),
|
|
328
341
|
style: normalizeStyle(style.value),
|
|
329
|
-
|
|
342
|
+
role: __props.checkable ? "button" : void 0,
|
|
343
|
+
tabindex: __props.checkable ? 0 : void 0,
|
|
344
|
+
"aria-pressed": __props.checkable ? computedChecked.value : void 0,
|
|
345
|
+
onClick: handleClick,
|
|
346
|
+
onKeydown: handleTagKeydown
|
|
330
347
|
}, [
|
|
331
348
|
_ctx.$slots.icon ? (openBlock(), createElementBlock("span", {
|
|
332
349
|
key: 0,
|
|
@@ -371,7 +388,7 @@ var tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompon
|
|
|
371
388
|
key: 4,
|
|
372
389
|
class: normalizeClass(`${unref(prefixCls)}-loading-icon`)
|
|
373
390
|
}, [createVNode(unref(IconLoading))], 2)) : createCommentVNode("", true)
|
|
374
|
-
],
|
|
391
|
+
], 46, _hoisted_1)) : createCommentVNode("", true);
|
|
375
392
|
};
|
|
376
393
|
}
|
|
377
394
|
}));
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
border: 1px solid transparent;
|
|
33
33
|
border-radius: var(--sd-border-radius-small);
|
|
34
34
|
cursor: text;
|
|
35
|
-
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);
|
|
35
|
+
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);
|
|
36
36
|
}
|
|
37
37
|
.sd-textarea-wrapper:hover {
|
|
38
38
|
background-color: var(--sd-color-fill-3);
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
}
|
|
118
118
|
.sd-textarea-wrapper .sd-textarea-clear-btn > svg {
|
|
119
119
|
position: relative;
|
|
120
|
-
transition: color 0.1s cubic-bezier(0, 0, 1, 1);
|
|
120
|
+
transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
121
121
|
}
|
|
122
122
|
.sd-textarea-wrapper:hover .sd-textarea-clear-btn {
|
|
123
123
|
visibility: visible;
|
|
@@ -4,6 +4,7 @@ import { getPrefixCls } from "../_utils/global-config.js";
|
|
|
4
4
|
import { isFunction, isNull, isObject, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import resize_observer_default from "../_components/resize-observer.js";
|
|
6
6
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
7
|
+
import { isActivationKey } from "../_utils/keyboard.js";
|
|
7
8
|
import IconClose from "../icon/icon-close/index.js";
|
|
8
9
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
9
10
|
import { useCursor } from "../_hooks/use-cursor.js";
|
|
@@ -133,7 +134,7 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
133
134
|
const attrs = useAttrs();
|
|
134
135
|
const { disabled, error, modelValue, allowClear } = toRefs(props);
|
|
135
136
|
const prefixCls = getPrefixCls("textarea");
|
|
136
|
-
const { mergedDisabled, mergedError: _mergedError, eventHandlers } = useFormItem({
|
|
137
|
+
const { mergedDisabled, mergedError: _mergedError, eventHandlers, formItemCtx } = useFormItem({
|
|
137
138
|
disabled,
|
|
138
139
|
error
|
|
139
140
|
});
|
|
@@ -246,6 +247,12 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
246
247
|
emitChange("", ev);
|
|
247
248
|
emit("clear", ev);
|
|
248
249
|
};
|
|
250
|
+
const handleClearKeydown = (ev) => {
|
|
251
|
+
if (isActivationKey(ev)) {
|
|
252
|
+
ev.preventDefault();
|
|
253
|
+
handleClear(ev);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
249
256
|
const handleKeyDown = (e) => {
|
|
250
257
|
if (props.readonly && !mergedDisabled.value && isReadonlyModificationKey(e)) showReadonlyTip();
|
|
251
258
|
};
|
|
@@ -257,6 +264,7 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
257
264
|
const rawTextareaAttrs = getTextareaAttrs(attrs);
|
|
258
265
|
const mergeTextareaAttrs = computed(() => {
|
|
259
266
|
const attrs = _objectSpread2(_objectSpread2({}, rawTextareaAttrs), props.textareaAttrs);
|
|
267
|
+
if (formItemCtx.fieldId && attrs.id === void 0) attrs.id = formItemCtx.fieldId;
|
|
260
268
|
if (mergedError.value) attrs["aria-invalid"] = true;
|
|
261
269
|
return attrs;
|
|
262
270
|
});
|
|
@@ -397,11 +405,15 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
397
405
|
showClearBtn.value ? (openBlock(), createElementBlock("div", {
|
|
398
406
|
key: 2,
|
|
399
407
|
class: normalizeClass(`${unref(prefixCls)}-clear-btn`),
|
|
400
|
-
|
|
408
|
+
role: "button",
|
|
409
|
+
tabindex: "0",
|
|
410
|
+
"aria-label": "Clear",
|
|
411
|
+
onClick: handleClear,
|
|
412
|
+
onKeydown: handleClearKeydown
|
|
401
413
|
}, [createVNode(icon_hover_default, null, {
|
|
402
414
|
default: withCtx(() => [createVNode(unref(IconClose))]),
|
|
403
415
|
_: 1
|
|
404
|
-
})],
|
|
416
|
+
})], 34)) : createCommentVNode("", true)
|
|
405
417
|
], 16)]),
|
|
406
418
|
_: 3
|
|
407
419
|
}, 8, ["popup-visible", "content"]);
|