@sdata/web-vue 3.12.0 → 3.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sd.css +288 -126
- package/dist/sd.min.css +43 -1
- package/es/_components/input-label/input-label.d.ts +2 -0
- package/es/_components/input-label/input-label.js +4 -2
- package/es/_components/input-label/style/index.css +2 -2
- package/es/_components/picker/input-range.vue.d.ts +6 -7
- package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +63 -46
- package/es/_components/picker/input.vue.d.ts +5 -6
- package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +52 -35
- package/es/_components/picker/style/index.scss +8 -2
- package/es/_components/resize-observer.js +1 -1
- package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +9 -2
- package/es/_components/select-view/select-view.d.ts +2 -0
- package/es/_components/select-view/select-view.js +5 -1
- package/es/_components/select-view/style/index.css +5 -5
- package/es/_hooks/use-focus-trap.d.ts +10 -0
- package/es/_hooks/use-focus-trap.js +115 -0
- package/es/_hooks/use-readonly-tip.d.ts +11 -0
- package/es/_hooks/use-readonly-tip.js +66 -0
- package/es/_utils/dom.js +1 -10
- package/es/_utils/keyboard.d.ts +4 -0
- package/es/_utils/keyboard.js +21 -2
- package/es/alert/alert.vue.d.ts +2 -2
- package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +12 -3
- package/es/alert/index.d.ts +5 -5
- package/es/alert/style/index.css +1 -1
- package/es/alert/style/index.scss +1 -1
- package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +2 -0
- package/es/anchor/style/index.css +1 -1
- package/es/anchor/style/index.scss +3 -1
- package/es/auto-complete/auto-complete.d.ts +9 -0
- package/es/auto-complete/auto-complete.js +19 -1
- package/es/auto-complete/index.d.ts +15 -0
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +8 -2
- package/es/avatar/style/index.css +2 -2
- package/es/avatar/style/index.scss +2 -2
- package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/back-top/style/index.css +1 -1
- package/es/back-top/style/index.scss +2 -1
- package/es/badge/badge.js +4 -1
- package/es/badge/style/index.css +3 -3
- package/es/badge/style/index.scss +3 -3
- package/es/breadcrumb/breadcrumb.js +1 -0
- package/es/button/button.vue.d.ts +16 -7
- package/es/button/button.vue_vue_type_script_setup_true_lang.js +62 -31
- package/es/button/index.d.ts +11 -0
- package/es/button/interface.d.ts +2 -0
- package/es/button/style/index.css +15 -6
- package/es/button/style/index.scss +25 -7
- package/es/calendar/style/event.scss +2 -2
- package/es/calendar/style/index.css +2 -2
- package/es/card/card.d.ts +312 -0
- package/es/card/card.js +39 -7
- package/es/card/index.d.ts +616 -0
- package/es/card/style/index.css +26 -3
- package/es/card/style/index.scss +34 -3
- package/es/carousel/carousel-arrow.vue.d.ts +4 -4
- package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +20 -4
- package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +23 -4
- package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +8 -1
- package/es/carousel/carousel.js +18 -1
- package/es/carousel/style/index.css +1 -1
- package/es/carousel/style/index.scss +1 -1
- package/es/cascader/cascader.vue.d.ts +9 -8
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +158 -128
- package/es/cascader/style/index.css +2 -2
- package/es/cascader/style/index.scss +3 -1
- package/es/cascader/types.d.ts +1 -0
- package/es/checkbox/checkbox-group.js +4 -1
- package/es/checkbox/checkbox.d.ts +9 -0
- package/es/checkbox/checkbox.js +14 -0
- package/es/checkbox/index.d.ts +15 -0
- package/es/checkbox/style/index.css +1 -1
- package/es/checkbox/style/index.scss +1 -1
- package/es/collapse/collapse-item.js +21 -3
- package/es/collapse/context.d.ts +1 -1
- package/es/color-picker/color-picker.d.ts +9 -0
- package/es/color-picker/color-picker.js +39 -11
- package/es/color-picker/index.d.ts +15 -0
- package/es/config-provider/context.d.ts +9 -9
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/date-picker/index.d.ts +3 -6
- package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +14 -1
- package/es/date-picker/picker.vue.d.ts +2 -3
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +6 -5
- package/es/date-picker/range-picker.vue.d.ts +2 -3
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/date-picker/style/index.css +5 -5
- package/es/date-picker/style/index.scss +4 -3
- package/es/drawer/drawer.vue.d.ts +1 -1
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +30 -9
- package/es/drawer/index.d.ts +3 -3
- package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/dropdown/dropdown-panel.vue.d.ts +9 -0
- package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +75 -2
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/dropdown/style/index.css +1 -1
- package/es/dropdown/style/index.scss +3 -1
- package/es/empty/empty.js +1 -1
- package/es/file-previewer/file-previewer.vue.d.ts +1 -1
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/file-previewer/index.d.ts +3 -3
- package/es/form/context.d.ts +1 -0
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +6 -2
- package/es/form/style/index.css +2 -2
- package/es/form/style/index.scss +2 -2
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-action.d.ts +7 -127
- package/es/image/preview.vue.d.ts +1 -1
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/index.css +288 -126
- package/es/index.js +3 -3
- package/es/input/index.d.ts +6 -6
- package/es/input/input.d.ts +3 -3
- package/es/input/input.js +34 -8
- package/es/input/style/index.css +2 -2
- package/es/input/style/input.scss +4 -4
- package/es/input-number/index.d.ts +9 -9
- package/es/input-number/input-number.d.ts +5 -5
- package/es/input-number/input-number.js +13 -9
- package/es/input-number/style/index.css +3 -3
- package/es/input-number/style/index.scss +5 -1
- package/es/input-tag/index.d.ts +9 -6
- package/es/input-tag/input-tag.d.ts +5 -3
- package/es/input-tag/input-tag.js +49 -36
- package/es/input-tag/style/index.css +8 -8
- package/es/input-tag/style/index.scss +11 -5
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +31 -6
- package/es/layout/style/index.css +2 -2
- package/es/layout/style/index.scss +4 -2
- package/es/link/style/index.css +1 -1
- package/es/link/style/index.scss +3 -1
- package/es/locale/interface.d.ts +1 -0
- package/es/locale/lang/en-us.js +1 -0
- package/es/locale/lang/zh-cn.js +1 -0
- package/es/locale/lang/zh-tw.js +1 -0
- package/es/mention/index.d.ts +15 -0
- package/es/mention/mention.d.ts +9 -0
- package/es/mention/mention.js +20 -1
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +30 -4
- package/es/menu/item.js +14 -1
- package/es/menu/style/index.css +6 -6
- package/es/menu/style/index.scss +5 -3
- package/es/message/style/index.css +3 -3
- package/es/message/style/index.scss +5 -3
- package/es/modal/index.d.ts +3 -3
- package/es/modal/modal.vue.d.ts +1 -1
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +30 -15
- package/es/modal/style/index.css +2 -2
- package/es/modal/style/index.scss +3 -2
- package/es/notification/style/index.css +3 -3
- package/es/notification/style/index.scss +11 -3
- package/es/page-header/page-header.vue.d.ts +6 -6
- package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +12 -1
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +12 -2
- package/es/pagination/page-item-step.vue.d.ts +2 -2
- package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +19 -2
- package/es/pagination/page-item.vue.d.ts +2 -2
- package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +21 -3
- package/es/pagination/pagination.js +6 -2
- package/es/pagination/style/index.css +6 -1
- package/es/pagination/style/index.scss +9 -3
- package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/progress/style/index.css +2 -2
- package/es/progress/style/index.scss +5 -3
- package/es/qr-code/qr-code-status.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +11 -6
- package/es/radio/context.d.ts +1 -0
- package/es/radio/radio-group.js +6 -2
- package/es/radio/radio.js +1 -0
- package/es/radio/style/index.css +2 -2
- package/es/radio/style/index.scss +4 -2
- package/es/rate/index.d.ts +6 -6
- package/es/rate/rate.d.ts +3 -3
- package/es/rate/rate.js +42 -8
- package/es/resize-box/resize-box.vue.d.ts +4 -4
- package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +30 -1
- package/es/result/result.vue_vue_type_script_setup_true_lang.js +7 -4
- package/es/scrollbar/style/index.css +57 -15
- package/es/scrollbar/style/index.scss +63 -15
- package/es/sd-vue.js +3 -3
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/select/index.d.ts +139 -0
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/select/select.d.ts +71 -0
- package/es/select/select.js +45 -6
- package/es/select/style/index.css +1 -1
- package/es/select/style/index.scss +3 -1
- package/es/selectable-card/style/index.css +2 -2
- package/es/selectable-card/style/index.scss +5 -5
- package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/slider/slider-button.vue.d.ts +2 -0
- package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +7 -2
- package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +23 -2
- package/es/slider/style/index.css +1 -1
- package/es/slider/style/index.scss +3 -1
- package/es/spin/spin.js +7 -2
- package/es/spin/style/index.css +1 -1
- package/es/spin/style/index.scss +1 -1
- package/es/split/split.vue.d.ts +4 -4
- package/es/split/split.vue_vue_type_script_setup_true_lang.js +27 -3
- package/es/steps/context.d.ts +1 -0
- package/es/steps/step.vue_vue_type_script_setup_true_lang.js +15 -2
- package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/steps/style/index.css +1 -1
- package/es/steps/style/index.scss +1 -1
- package/es/style/animation/index.scss +1 -0
- package/es/style/animation/reduced-motion.scss +22 -0
- package/es/style/animation/zoom.scss +7 -6
- package/es/style/icon.scss +9 -1
- package/es/style/normalize.scss +68 -0
- package/es/switch/style/index.css +1 -1
- package/es/switch/style/index.scss +4 -1
- package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/table/style/index.css +8 -8
- package/es/table/style/index.scss +11 -8
- package/es/table/table-operation-td.d.ts +15 -0
- package/es/table/table-tbody.js +4 -1
- package/es/table/table-td.js +2 -1
- package/es/table/table-th.js +6 -4
- package/es/table/table-thead.js +4 -1
- package/es/table/table-tr.js +4 -1
- package/es/table/table.js +6 -2
- package/es/tabs/context.d.ts +3 -0
- package/es/tabs/index.d.ts +32 -0
- package/es/tabs/style/index.css +34 -5
- package/es/tabs/style/index.scss +45 -7
- package/es/tabs/tab-pane.vue.d.ts +4 -2
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +39 -4
- package/es/tabs/tabs-nav.js +34 -1
- package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +27 -4
- package/es/tabs/tabs.d.ts +19 -0
- package/es/tabs/tabs.js +25 -2
- package/es/tag/index.d.ts +5 -5
- package/es/tag/style/index.css +1 -1
- package/es/tag/style/index.scss +3 -1
- package/es/tag/tag.vue.d.ts +2 -2
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +19 -2
- package/es/textarea/index.d.ts +15 -0
- package/es/textarea/style/index.css +2 -2
- package/es/textarea/textarea.vue.d.ts +11 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +84 -47
- package/es/time-picker/index.d.ts +3 -6
- package/es/time-picker/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/time-picker/time-picker.vue.d.ts +2 -3
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +12 -6
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tooltip/index.d.ts +8 -127
- package/es/tooltip/interface.d.ts +17 -0
- package/es/tooltip/tooltip.vue.d.ts +5 -88
- package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +9 -69
- package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/style/index.css +1 -1
- package/es/transfer/style/index.scss +1 -1
- package/es/transfer/transfer-list-item.js +16 -2
- package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +27 -7
- package/es/tree/context.d.ts +2 -0
- package/es/tree/style/index.css +1 -1
- package/es/tree/style/index.scss +1 -1
- package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +82 -3
- package/es/tree-select/tree-select.vue.d.ts +16 -10
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +165 -133
- package/es/trigger/index.d.ts +45 -0
- package/es/trigger/trigger.d.ts +27 -0
- package/es/trigger/trigger.js +47 -5
- package/es/typography/base.js +1 -1
- package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +11 -8
- package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +38 -6
- package/es/typography/style/index.css +2 -2
- package/es/typography/style/index.scss +2 -2
- package/es/upload/style/index.css +9 -9
- package/es/upload/style/index.scss +15 -9
- package/es/upload/upload-button.js +1 -1
- package/es/upload/upload-list-item.js +18 -5
- package/es/upload/upload-picture-item.js +25 -3
- package/es/verification-code/index.d.ts +15 -6
- package/es/verification-code/verification-code.d.ts +9 -3
- package/es/verification-code/verification-code.js +10 -2
- package/json/vetur-attributes.json +63 -7
- package/json/vetur-tags.json +23 -7
- package/json/web-types.json +131 -10
- package/package.json +1 -1
- package/es/style/base.scss +0 -18
package/es/select/select.d.ts
CHANGED
|
@@ -39,6 +39,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
39
39
|
type: BooleanConstructor;
|
|
40
40
|
default: boolean;
|
|
41
41
|
};
|
|
42
|
+
readonly: {
|
|
43
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
42
46
|
error: {
|
|
43
47
|
type: BooleanConstructor;
|
|
44
48
|
default: boolean;
|
|
@@ -198,6 +202,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
198
202
|
type: BooleanConstructor;
|
|
199
203
|
default: boolean;
|
|
200
204
|
};
|
|
205
|
+
readonly: {
|
|
206
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
207
|
+
default: boolean;
|
|
208
|
+
};
|
|
201
209
|
error: {
|
|
202
210
|
type: BooleanConstructor;
|
|
203
211
|
default: boolean;
|
|
@@ -326,6 +334,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
326
334
|
}>, {
|
|
327
335
|
options: SelectOption[];
|
|
328
336
|
error: boolean;
|
|
337
|
+
readonly: string | boolean;
|
|
329
338
|
popupVisible: boolean;
|
|
330
339
|
defaultPopupVisible: boolean;
|
|
331
340
|
disabled: boolean;
|
|
@@ -501,6 +510,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
501
510
|
type: NumberConstructor;
|
|
502
511
|
default: number;
|
|
503
512
|
};
|
|
513
|
+
escToClose: {
|
|
514
|
+
type: BooleanConstructor;
|
|
515
|
+
default: boolean;
|
|
516
|
+
};
|
|
517
|
+
ariaHasPopup: {
|
|
518
|
+
type: PropType<boolean | "menu" | "listbox" | "tree" | "grid" | "dialog">;
|
|
519
|
+
default: undefined;
|
|
520
|
+
};
|
|
521
|
+
ariaDescribedbyPopup: {
|
|
522
|
+
type: BooleanConstructor;
|
|
523
|
+
default: boolean;
|
|
524
|
+
};
|
|
504
525
|
}>> & Readonly<{
|
|
505
526
|
onHide?: (() => any) | undefined;
|
|
506
527
|
onResize?: (() => any) | undefined;
|
|
@@ -542,6 +563,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
542
563
|
preventFocus: boolean;
|
|
543
564
|
scrollToClose: boolean;
|
|
544
565
|
scrollToCloseDistance: number;
|
|
566
|
+
escToClose: boolean;
|
|
567
|
+
ariaHasPopup: boolean | "dialog" | "menu" | "listbox" | "tree" | "grid";
|
|
568
|
+
ariaDescribedbyPopup: boolean;
|
|
545
569
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
546
570
|
P: {};
|
|
547
571
|
B: {};
|
|
@@ -692,6 +716,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
692
716
|
type: NumberConstructor;
|
|
693
717
|
default: number;
|
|
694
718
|
};
|
|
719
|
+
escToClose: {
|
|
720
|
+
type: BooleanConstructor;
|
|
721
|
+
default: boolean;
|
|
722
|
+
};
|
|
723
|
+
ariaHasPopup: {
|
|
724
|
+
type: PropType<boolean | "menu" | "listbox" | "tree" | "grid" | "dialog">;
|
|
725
|
+
default: undefined;
|
|
726
|
+
};
|
|
727
|
+
ariaDescribedbyPopup: {
|
|
728
|
+
type: BooleanConstructor;
|
|
729
|
+
default: boolean;
|
|
730
|
+
};
|
|
695
731
|
}>> & Readonly<{
|
|
696
732
|
onHide?: (() => any) | undefined;
|
|
697
733
|
onResize?: (() => any) | undefined;
|
|
@@ -727,6 +763,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
727
763
|
preventFocus: boolean;
|
|
728
764
|
scrollToClose: boolean;
|
|
729
765
|
scrollToCloseDistance: number;
|
|
766
|
+
escToClose: boolean;
|
|
767
|
+
ariaHasPopup: boolean | "dialog" | "menu" | "listbox" | "tree" | "grid";
|
|
768
|
+
ariaDescribedbyPopup: boolean;
|
|
730
769
|
}>;
|
|
731
770
|
__isFragment?: never;
|
|
732
771
|
__isTeleport?: never;
|
|
@@ -874,6 +913,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
874
913
|
type: NumberConstructor;
|
|
875
914
|
default: number;
|
|
876
915
|
};
|
|
916
|
+
escToClose: {
|
|
917
|
+
type: BooleanConstructor;
|
|
918
|
+
default: boolean;
|
|
919
|
+
};
|
|
920
|
+
ariaHasPopup: {
|
|
921
|
+
type: PropType<boolean | "menu" | "listbox" | "tree" | "grid" | "dialog">;
|
|
922
|
+
default: undefined;
|
|
923
|
+
};
|
|
924
|
+
ariaDescribedbyPopup: {
|
|
925
|
+
type: BooleanConstructor;
|
|
926
|
+
default: boolean;
|
|
927
|
+
};
|
|
877
928
|
}>> & Readonly<{
|
|
878
929
|
onHide?: (() => any) | undefined;
|
|
879
930
|
onResize?: (() => any) | undefined;
|
|
@@ -915,6 +966,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
915
966
|
preventFocus: boolean;
|
|
916
967
|
scrollToClose: boolean;
|
|
917
968
|
scrollToCloseDistance: number;
|
|
969
|
+
escToClose: boolean;
|
|
970
|
+
ariaHasPopup: boolean | "dialog" | "menu" | "listbox" | "tree" | "grid";
|
|
971
|
+
ariaDescribedbyPopup: boolean;
|
|
918
972
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
919
973
|
install: (app: import("vue").App, options?: import("../_utils/types.ts").SDOptions) => void;
|
|
920
974
|
};
|
|
@@ -980,6 +1034,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
980
1034
|
type: BooleanConstructor;
|
|
981
1035
|
default: boolean;
|
|
982
1036
|
};
|
|
1037
|
+
inputAttrs: PropType<Record<string, unknown>>;
|
|
983
1038
|
}>, {
|
|
984
1039
|
inputRef: import("vue").ComputedRef<HTMLInputElement>;
|
|
985
1040
|
handleFocus: (ev: FocusEvent) => void;
|
|
@@ -1050,6 +1105,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1050
1105
|
type: BooleanConstructor;
|
|
1051
1106
|
default: boolean;
|
|
1052
1107
|
};
|
|
1108
|
+
inputAttrs: PropType<Record<string, unknown>>;
|
|
1053
1109
|
}>> & Readonly<{
|
|
1054
1110
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
1055
1111
|
onBlur?: ((...args: any[]) => any) | undefined;
|
|
@@ -1091,6 +1147,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1091
1147
|
type: BooleanConstructor;
|
|
1092
1148
|
default: boolean;
|
|
1093
1149
|
};
|
|
1150
|
+
tabindex: {
|
|
1151
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
1152
|
+
default: undefined;
|
|
1153
|
+
};
|
|
1094
1154
|
uninjectGroupContext: {
|
|
1095
1155
|
type: BooleanConstructor;
|
|
1096
1156
|
default: boolean;
|
|
@@ -1106,6 +1166,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1106
1166
|
modelValue: boolean | (string | number | boolean)[];
|
|
1107
1167
|
defaultChecked: boolean;
|
|
1108
1168
|
indeterminate: boolean;
|
|
1169
|
+
tabindex: string | number;
|
|
1109
1170
|
uninjectGroupContext: boolean;
|
|
1110
1171
|
}, true, {}, {}, {
|
|
1111
1172
|
IconCheck: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1208,6 +1269,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1208
1269
|
type: BooleanConstructor;
|
|
1209
1270
|
default: boolean;
|
|
1210
1271
|
};
|
|
1272
|
+
tabindex: {
|
|
1273
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
1274
|
+
default: undefined;
|
|
1275
|
+
};
|
|
1211
1276
|
uninjectGroupContext: {
|
|
1212
1277
|
type: BooleanConstructor;
|
|
1213
1278
|
default: boolean;
|
|
@@ -1220,6 +1285,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1220
1285
|
modelValue: boolean | (string | number | boolean)[];
|
|
1221
1286
|
defaultChecked: boolean;
|
|
1222
1287
|
indeterminate: boolean;
|
|
1288
|
+
tabindex: string | number;
|
|
1223
1289
|
uninjectGroupContext: boolean;
|
|
1224
1290
|
}>;
|
|
1225
1291
|
__isFragment?: never;
|
|
@@ -1245,6 +1311,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1245
1311
|
type: BooleanConstructor;
|
|
1246
1312
|
default: boolean;
|
|
1247
1313
|
};
|
|
1314
|
+
tabindex: {
|
|
1315
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
1316
|
+
default: undefined;
|
|
1317
|
+
};
|
|
1248
1318
|
uninjectGroupContext: {
|
|
1249
1319
|
type: BooleanConstructor;
|
|
1250
1320
|
default: boolean;
|
|
@@ -1260,6 +1330,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1260
1330
|
modelValue: boolean | (string | number | boolean)[];
|
|
1261
1331
|
defaultChecked: boolean;
|
|
1262
1332
|
indeterminate: boolean;
|
|
1333
|
+
tabindex: string | number;
|
|
1263
1334
|
uninjectGroupContext: boolean;
|
|
1264
1335
|
}, {}, string, {}, {
|
|
1265
1336
|
IconCheck: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/es/select/select.js
CHANGED
|
@@ -6,16 +6,18 @@ import virtual_list_default from "../_components/virtual-list/index.js";
|
|
|
6
6
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
7
7
|
import { useDropdownVirtualListProps } from "../_hooks/use-dropdown-virtual-list-props.js";
|
|
8
8
|
import { resolveDropdownVirtualListProps } from "../_utils/virtual-dropdown.js";
|
|
9
|
+
import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
10
|
+
import Trigger from "../trigger/index.js";
|
|
11
|
+
import Tooltip from "../tooltip/index.js";
|
|
9
12
|
import { getKeyFromValue, hasEmptyStringKey, isGroupOptionInfo, isValidOption } from "./utils.js";
|
|
10
13
|
import { useSelect } from "./hooks/use-select.js";
|
|
11
14
|
import select_dropdown_default from "./select-dropdown.js";
|
|
12
|
-
import Trigger from "../trigger/index.js";
|
|
13
15
|
import { useTrigger } from "../_hooks/use-trigger.js";
|
|
14
16
|
import Checkbox from "../checkbox/index.js";
|
|
15
17
|
import select_view_default from "../_components/select-view/select-view.js";
|
|
16
18
|
import { useAllowSearch } from "../_hooks/use-allow-search.js";
|
|
17
19
|
import { debounce } from "../_utils/debounce.js";
|
|
18
|
-
import { computed, createVNode, defineComponent, isVNode, mergeProps, nextTick, ref, toRefs, watch, watchEffect } from "vue";
|
|
20
|
+
import { computed, createVNode, defineComponent, getCurrentInstance, isVNode, mergeProps, nextTick, ref, toRef, toRefs, watch, watchEffect } from "vue";
|
|
19
21
|
//#region components/select/select.tsx
|
|
20
22
|
function _isSlot(s) {
|
|
21
23
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
@@ -76,6 +78,14 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
76
78
|
type: Boolean,
|
|
77
79
|
default: false
|
|
78
80
|
},
|
|
81
|
+
/**
|
|
82
|
+
* @zh 是否为只读状态
|
|
83
|
+
* @en Whether it is read-only
|
|
84
|
+
*/
|
|
85
|
+
readonly: {
|
|
86
|
+
type: [Boolean, String],
|
|
87
|
+
default: false
|
|
88
|
+
},
|
|
79
89
|
error: {
|
|
80
90
|
type: Boolean,
|
|
81
91
|
default: false
|
|
@@ -213,13 +223,22 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
213
223
|
const resolvedVirtualListProps = computed(() => {
|
|
214
224
|
return resolveDropdownVirtualListProps(mergedDropdownVirtualListProps.value, props.triggerProps, DEFAULT_SELECT_VIRTUAL_ITEM_SIZE);
|
|
215
225
|
});
|
|
216
|
-
const { computedPopupVisible, handlePopupVisibleChange } = useTrigger({
|
|
226
|
+
const { computedPopupVisible, handlePopupVisibleChange: _handlePopupVisibleChange } = useTrigger({
|
|
217
227
|
popupVisible,
|
|
218
228
|
defaultPopupVisible,
|
|
219
229
|
show,
|
|
220
230
|
defaultShow,
|
|
221
231
|
emit
|
|
222
232
|
});
|
|
233
|
+
const { tipVisible, show: showReadonlyTip } = useReadonlyTip(toRef(props, "readonly"), mergedDisabled);
|
|
234
|
+
const readonlyTipText = useReadonlyTipText(toRef(props, "readonly"));
|
|
235
|
+
const handlePopupVisibleChange = (visible) => {
|
|
236
|
+
if (visible && props.readonly && !mergedDisabled.value) {
|
|
237
|
+
showReadonlyTip();
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
_handlePopupVisibleChange(visible);
|
|
241
|
+
};
|
|
223
242
|
const _value = ref(props.defaultValue);
|
|
224
243
|
const computedValueObjects = computed(() => {
|
|
225
244
|
var _props$modelValue;
|
|
@@ -434,10 +453,14 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
434
453
|
};
|
|
435
454
|
const optionPrefixCls = getPrefixCls("select-option");
|
|
436
455
|
const groupPrefixCls = getPrefixCls("select-group");
|
|
456
|
+
const optionInstanceUid = getCurrentInstance().uid;
|
|
457
|
+
const optionId = (key) => `${optionPrefixCls}-${optionInstanceUid}-${key}`;
|
|
437
458
|
const renderOption = (optionInfo) => {
|
|
438
459
|
let _slot;
|
|
439
460
|
if (isGroupOptionInfo(optionInfo)) return createVNode("li", {
|
|
440
461
|
"key": optionInfo.key,
|
|
462
|
+
"role": "group",
|
|
463
|
+
"aria-label": optionInfo.label,
|
|
441
464
|
"class": groupPrefixCls
|
|
442
465
|
}, [createVNode("div", { "class": `${groupPrefixCls}-title` }, [renderOptionEllipsis(optionInfo.label)]), optionInfo.options.map((child) => renderOption(child))]);
|
|
443
466
|
if (!isValidOption(optionInfo, {
|
|
@@ -470,6 +493,10 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
470
493
|
},
|
|
471
494
|
"key": optionInfo.key,
|
|
472
495
|
"class": cls,
|
|
496
|
+
"role": "option",
|
|
497
|
+
"id": optionId(optionInfo.key),
|
|
498
|
+
"aria-selected": isSelected,
|
|
499
|
+
"aria-disabled": optionInfo.disabled || void 0,
|
|
473
500
|
"onClick": handleClick,
|
|
474
501
|
"onMouseenter": handleMouseEnter,
|
|
475
502
|
"onMouseleave": handleMouseLeave
|
|
@@ -525,7 +552,17 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
525
552
|
return (_selectViewRef$value2 = selectViewRef.value) === null || _selectViewRef$value2 === void 0 || (_selectViewRef$value3 = _selectViewRef$value2.blur) === null || _selectViewRef$value3 === void 0 ? void 0 : _selectViewRef$value3.call(_selectViewRef$value2);
|
|
526
553
|
}
|
|
527
554
|
});
|
|
528
|
-
|
|
555
|
+
const comboboxInputAttrs = computed(() => ({
|
|
556
|
+
"role": "combobox",
|
|
557
|
+
"aria-expanded": computedPopupVisible.value,
|
|
558
|
+
"aria-autocomplete": mergedAllowSearch.value ? "list" : "none",
|
|
559
|
+
"aria-activedescendant": activeKey.value ? optionId(activeKey.value) : void 0
|
|
560
|
+
}));
|
|
561
|
+
return () => createVNode(Tooltip, {
|
|
562
|
+
"popupVisible": tipVisible.value,
|
|
563
|
+
"content": readonlyTipText.value,
|
|
564
|
+
"position": "top"
|
|
565
|
+
}, { default: () => [createVNode(Trigger, mergeProps({
|
|
529
566
|
"trigger": "click",
|
|
530
567
|
"position": "bl",
|
|
531
568
|
"popupOffset": 4,
|
|
@@ -534,6 +571,7 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
534
571
|
"preventFocus": true,
|
|
535
572
|
"autoFitPopupWidth": true,
|
|
536
573
|
"autoFitTransformOrigin": true,
|
|
574
|
+
"aria-has-popup": "listbox",
|
|
537
575
|
"disabled": mergedDisabled.value,
|
|
538
576
|
"popupVisible": computedPopupVisible.value,
|
|
539
577
|
"unmountOnClose": props.unmountOnClose,
|
|
@@ -561,7 +599,8 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
561
599
|
"placeholder": props.placeholder,
|
|
562
600
|
"bordered": props.bordered,
|
|
563
601
|
"size": mergedSize.value,
|
|
564
|
-
"tagNowrap": props.tagNowrap
|
|
602
|
+
"tagNowrap": props.tagNowrap,
|
|
603
|
+
"inputAttrs": comboboxInputAttrs.value
|
|
565
604
|
}, {
|
|
566
605
|
onInputValueChange: handleInputValueChange,
|
|
567
606
|
onKeydown: handleKeyDown
|
|
@@ -578,7 +617,7 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
578
617
|
})];
|
|
579
618
|
},
|
|
580
619
|
content: renderDropDown
|
|
581
|
-
});
|
|
620
|
+
})] });
|
|
582
621
|
}
|
|
583
622
|
});
|
|
584
623
|
//#endregion
|
|
@@ -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);
|
|
@@ -78,7 +78,9 @@ $select-prefix-cls: string.unquote('#{theme.$prefix}-select');
|
|
|
78
78
|
&:not(#{&}-disabled):hover {
|
|
79
79
|
color: $select-popup-option-color-text_hover;
|
|
80
80
|
background-color: $select-popup-option-color-bg_hover;
|
|
81
|
-
transition:
|
|
81
|
+
transition:
|
|
82
|
+
color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
83
|
+
background-color theme.$transition-duration-1 theme.$transition-timing-function-standard;
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
// disabled
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
border: 1px solid var(--sd-color-neutral-3);
|
|
24
24
|
border-radius: var(--sd-border-radius-large);
|
|
25
25
|
cursor: pointer;
|
|
26
|
-
transition: color 0.2s cubic-bezier(0, 0, 1, 1), background-color 0.2s cubic-bezier(0, 0, 1, 1), border-color 0.2s cubic-bezier(0, 0, 1, 1), box-shadow 0.2s cubic-bezier(0, 0, 1, 1);
|
|
26
|
+
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), border-color 0.2s cubic-bezier(0.34, 0.69, 0.1, 1), box-shadow 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
27
27
|
}
|
|
28
28
|
.sd-selectable-card::after {
|
|
29
29
|
position: absolute;
|
|
30
30
|
background: transparent;
|
|
31
31
|
border-radius: inherit;
|
|
32
|
-
transition: background 0.2s cubic-bezier(0, 0, 1, 1);
|
|
32
|
+
transition: background 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
33
33
|
content: "";
|
|
34
34
|
pointer-events: none;
|
|
35
35
|
inset: 0;
|
|
@@ -23,16 +23,16 @@ $colors:
|
|
|
23
23
|
border-radius: $selectable-card-border-radius;
|
|
24
24
|
cursor: pointer;
|
|
25
25
|
transition:
|
|
26
|
-
color theme.$transition-duration-2 theme.$transition-timing-function-
|
|
27
|
-
background-color theme.$transition-duration-2 theme.$transition-timing-function-
|
|
28
|
-
border-color theme.$transition-duration-2 theme.$transition-timing-function-
|
|
29
|
-
box-shadow theme.$transition-duration-2 theme.$transition-timing-function-
|
|
26
|
+
color theme.$transition-duration-2 theme.$transition-timing-function-standard,
|
|
27
|
+
background-color theme.$transition-duration-2 theme.$transition-timing-function-standard,
|
|
28
|
+
border-color theme.$transition-duration-2 theme.$transition-timing-function-standard,
|
|
29
|
+
box-shadow theme.$transition-duration-2 theme.$transition-timing-function-standard;
|
|
30
30
|
|
|
31
31
|
&::after {
|
|
32
32
|
position: absolute;
|
|
33
33
|
background: transparent;
|
|
34
34
|
border-radius: inherit;
|
|
35
|
-
transition: background theme.$transition-duration-2 theme.$transition-timing-function-
|
|
35
|
+
transition: background theme.$transition-duration-2 theme.$transition-timing-function-standard;
|
|
36
36
|
content: '';
|
|
37
37
|
pointer-events: none;
|
|
38
38
|
inset: 0;
|
|
@@ -2,6 +2,7 @@ import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helper
|
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { computed, createElementBlock, defineComponent, normalizeClass, openBlock, renderSlot } from "vue";
|
|
4
4
|
//#region components/skeleton/skeleton.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var _hoisted_1 = ["aria-busy"];
|
|
5
6
|
var skeleton_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Skeleton" }), {}, {
|
|
6
7
|
__name: "skeleton",
|
|
7
8
|
props: {
|
|
@@ -27,7 +28,10 @@ var skeleton_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
27
28
|
const prefixCls = getPrefixCls("skeleton");
|
|
28
29
|
const cls = computed(() => [prefixCls, { [`${prefixCls}-animation`]: props.animation }]);
|
|
29
30
|
return (_ctx, _cache) => {
|
|
30
|
-
return openBlock(), createElementBlock("div", {
|
|
31
|
+
return openBlock(), createElementBlock("div", {
|
|
32
|
+
class: normalizeClass(cls.value),
|
|
33
|
+
"aria-busy": __props.loading || void 0
|
|
34
|
+
}, [__props.loading ? renderSlot(_ctx.$slots, "default", { key: 0 }) : renderSlot(_ctx.$slots, "content", { key: 1 })], 10, _hoisted_1);
|
|
31
35
|
};
|
|
32
36
|
}
|
|
33
37
|
}));
|
|
@@ -29,6 +29,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
29
29
|
default: boolean;
|
|
30
30
|
};
|
|
31
31
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
+
keydown: (_e: KeyboardEvent) => any;
|
|
32
33
|
movestart: () => any;
|
|
33
34
|
moving: (_x: number, _y: number) => any;
|
|
34
35
|
moveend: () => any;
|
|
@@ -61,6 +62,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
61
62
|
default: boolean;
|
|
62
63
|
};
|
|
63
64
|
}>> & Readonly<{
|
|
65
|
+
onKeydown?: ((_e: KeyboardEvent) => any) | undefined;
|
|
64
66
|
onMovestart?: (() => any) | undefined;
|
|
65
67
|
onMoving?: ((_x: number, _y: number) => any) | undefined;
|
|
66
68
|
onMoveend?: (() => any) | undefined;
|
|
@@ -41,13 +41,17 @@ var slider_button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
41
41
|
emits: [
|
|
42
42
|
"movestart",
|
|
43
43
|
"moving",
|
|
44
|
-
"moveend"
|
|
44
|
+
"moveend",
|
|
45
|
+
"keydown"
|
|
45
46
|
],
|
|
46
47
|
setup(__props, { emit: __emit }) {
|
|
47
48
|
const props = __props;
|
|
48
49
|
const emit = __emit;
|
|
49
50
|
const prefixCls = getPrefixCls("slider-btn");
|
|
50
51
|
const isDragging = ref(false);
|
|
52
|
+
const onKeydown = (e) => {
|
|
53
|
+
if (!props.disabled) emit("keydown", e);
|
|
54
|
+
};
|
|
51
55
|
const handleMouseDown = (e) => {
|
|
52
56
|
if (props.disabled) return;
|
|
53
57
|
e.preventDefault();
|
|
@@ -106,7 +110,8 @@ var slider_button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
106
110
|
onMousedown: handleMouseDown,
|
|
107
111
|
onTouchstart: handleMouseDown,
|
|
108
112
|
onContextmenu: _cache[0] || (_cache[0] = withModifiers(() => {}, ["prevent"])),
|
|
109
|
-
onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
|
|
113
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
|
|
114
|
+
onKeydown
|
|
110
115
|
}), null, 16, _hoisted_1)]),
|
|
111
116
|
_: 1
|
|
112
117
|
}, 8, [
|
|
@@ -2,6 +2,7 @@ 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 { isArray, isUndefined } from "../_utils/is.js";
|
|
5
|
+
import { KEYBOARD_KEY } from "../_utils/keyboard.js";
|
|
5
6
|
import slider_button_default from "./slider-button.js";
|
|
6
7
|
import { getOffsetPercent, getPositionStyle } from "./utils.js";
|
|
7
8
|
import slider_dots_default from "./slider-dots.js";
|
|
@@ -156,6 +157,24 @@ var slider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
156
157
|
endValue.value = value;
|
|
157
158
|
handleChange();
|
|
158
159
|
};
|
|
160
|
+
const handleButtonKeydown = (which, e) => {
|
|
161
|
+
if (mergedDisabled.value) return;
|
|
162
|
+
const minV = props.min;
|
|
163
|
+
const maxV = props.max;
|
|
164
|
+
const current = which === "start" ? startValue.value : endValue.value;
|
|
165
|
+
let next;
|
|
166
|
+
if (e.key === KEYBOARD_KEY.ARROW_RIGHT || e.key === KEYBOARD_KEY.ARROW_UP) next = current + props.step;
|
|
167
|
+
else if (e.key === KEYBOARD_KEY.ARROW_LEFT || e.key === KEYBOARD_KEY.ARROW_DOWN) next = current - props.step;
|
|
168
|
+
else if (e.key === KEYBOARD_KEY.HOME) next = minV;
|
|
169
|
+
else if (e.key === KEYBOARD_KEY.END) next = maxV;
|
|
170
|
+
else return;
|
|
171
|
+
e.preventDefault();
|
|
172
|
+
if (props.range) if (which === "start") next = Math.max(minV, Math.min(next, endValue.value - props.step));
|
|
173
|
+
else next = Math.max(startValue.value + props.step, Math.min(next, maxV));
|
|
174
|
+
else next = Math.max(minV, Math.min(next, maxV));
|
|
175
|
+
if (which === "start") handleStartChange(next);
|
|
176
|
+
else handleEndChange(next);
|
|
177
|
+
};
|
|
159
178
|
const computedValue = computed(() => {
|
|
160
179
|
var _props$min2;
|
|
161
180
|
if (props.range) {
|
|
@@ -293,7 +312,8 @@ var slider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
293
312
|
"show-tooltip": __props.showTooltip,
|
|
294
313
|
onMovestart: handleMoveStart,
|
|
295
314
|
onMoving: handleStartMoving,
|
|
296
|
-
onMoveend: handleMoveEnd
|
|
315
|
+
onMoveend: handleMoveEnd,
|
|
316
|
+
onKeydown: _cache[0] || (_cache[0] = (e) => handleButtonKeydown("start", e))
|
|
297
317
|
}, null, 8, [
|
|
298
318
|
"style",
|
|
299
319
|
"value",
|
|
@@ -315,7 +335,8 @@ var slider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
315
335
|
"show-tooltip": __props.showTooltip,
|
|
316
336
|
onMovestart: handleMoveStart,
|
|
317
337
|
onMoving: handleEndMoving,
|
|
318
|
-
onMoveend: handleMoveEnd
|
|
338
|
+
onMoveend: handleMoveEnd,
|
|
339
|
+
onKeydown: _cache[1] || (_cache[1] = (e) => handleButtonKeydown("end", e))
|
|
319
340
|
}, null, 8, [
|
|
320
341
|
"style",
|
|
321
342
|
"value",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
background: var(--sd-color-bg-2);
|
|
131
131
|
border: 2px solid rgb(var(--sd-primary-6));
|
|
132
132
|
border-radius: 50%;
|
|
133
|
-
transition:
|
|
133
|
+
transition: transform 0.3s cubic-bezier(0.3, 1.3, 0.3, 1), box-shadow 0.3s cubic-bezier(0.3, 1.3, 0.3, 1);
|
|
134
134
|
content: "";
|
|
135
135
|
}
|
|
136
136
|
.sd-slider-btn.sd-slider-btn-active::after, .sd-slider-btn:hover::after {
|
|
@@ -148,7 +148,9 @@ $slider-prefix: string.unquote('#{theme.$prefix}-slider');
|
|
|
148
148
|
background: $slider-color-button-bg;
|
|
149
149
|
border: $slider-border-size-button solid $slider-color-button-border;
|
|
150
150
|
border-radius: 50%;
|
|
151
|
-
transition:
|
|
151
|
+
transition:
|
|
152
|
+
transform theme.$transition-duration-3 theme.$transition-timing-function-overshoot,
|
|
153
|
+
box-shadow theme.$transition-duration-3 theme.$transition-timing-function-overshoot;
|
|
152
154
|
content: '';
|
|
153
155
|
}
|
|
154
156
|
|
package/es/spin/spin.js
CHANGED
|
@@ -78,10 +78,15 @@ var spin_default = /* @__PURE__ */ defineComponent({
|
|
|
78
78
|
const hasTip = Boolean((_slots$tip = slots.tip) !== null && _slots$tip !== void 0 ? _slots$tip : props.tip);
|
|
79
79
|
return createVNode(Fragment, null, [!props.hideIcon && createVNode("div", {
|
|
80
80
|
"class": `${prefixCls}-icon`,
|
|
81
|
-
"style": style
|
|
81
|
+
"style": style,
|
|
82
|
+
"aria-hidden": "true"
|
|
82
83
|
}, [renderIcon()]), hasTip && createVNode("div", { "class": `${prefixCls}-tip` }, [(_slots$tip2 = (_slots$tip3 = slots.tip) === null || _slots$tip3 === void 0 ? void 0 : _slots$tip3.call(slots)) !== null && _slots$tip2 !== void 0 ? _slots$tip2 : props.tip])]);
|
|
83
84
|
};
|
|
84
|
-
return () => createVNode("div", {
|
|
85
|
+
return () => createVNode("div", {
|
|
86
|
+
"role": "status",
|
|
87
|
+
"aria-live": "polite",
|
|
88
|
+
"class": cls.value
|
|
89
|
+
}, [slots.default ? createVNode(Fragment, null, [slots.default(), props.loading && createVNode("div", { "class": `${prefixCls}-mask` }, [createVNode("div", { "class": `${prefixCls}-mask-icon` }, [renderSpinIcon()])])]) : renderSpinIcon()]);
|
|
85
90
|
}
|
|
86
91
|
});
|
|
87
92
|
//#endregion
|
package/es/spin/style/index.css
CHANGED
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
z-index: 11;
|
|
181
181
|
text-align: center;
|
|
182
182
|
background-color: var(--sd-color-spin-layer-bg);
|
|
183
|
-
transition: opacity 0.1s cubic-bezier(0, 0, 1, 1);
|
|
183
|
+
transition: opacity 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
184
184
|
user-select: none;
|
|
185
185
|
}
|
|
186
186
|
.sd-spin-loading {
|
package/es/spin/style/index.scss
CHANGED
|
@@ -29,7 +29,7 @@ $spin-prefix-cls: string.unquote('#{theme.$prefix}-spin');
|
|
|
29
29
|
z-index: 11;
|
|
30
30
|
text-align: center;
|
|
31
31
|
background-color: var(string.unquote('#{global.$sd-cssvars-prefix}-color-spin-layer-bg'));
|
|
32
|
-
transition: opacity theme.$transition-duration-1 theme.$transition-timing-function-
|
|
32
|
+
transition: opacity theme.$transition-duration-1 theme.$transition-timing-function-standard;
|
|
33
33
|
user-select: none;
|
|
34
34
|
}
|
|
35
35
|
|
package/es/split/split.vue.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
declare var __VLS_9: {},
|
|
2
|
+
declare var __VLS_9: {}, __VLS_22: {}, __VLS_25: {}, __VLS_27: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
4
|
first?: (props: typeof __VLS_9) => any;
|
|
5
5
|
} & {
|
|
6
|
-
'resize-trigger'?: (props: typeof
|
|
6
|
+
'resize-trigger'?: (props: typeof __VLS_22) => any;
|
|
7
7
|
} & {
|
|
8
|
-
'resize-trigger-icon'?: (props: typeof
|
|
8
|
+
'resize-trigger-icon'?: (props: typeof __VLS_25) => any;
|
|
9
9
|
} & {
|
|
10
|
-
second?: (props: typeof
|
|
10
|
+
second?: (props: typeof __VLS_27) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
13
13
|
component: {
|
|
@@ -2,6 +2,7 @@ import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helper
|
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isNumber, isString } from "../_utils/is.js";
|
|
4
4
|
import { off, on } from "../_utils/dom.js";
|
|
5
|
+
import { KEYBOARD_KEY } from "../_utils/keyboard.js";
|
|
5
6
|
import { _asyncToGenerator } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/asyncToGenerator.js";
|
|
6
7
|
import useMergeState from "../_hooks/use-merge-state.js";
|
|
7
8
|
import resize_trigger_default from "../_components/resize-trigger.js";
|
|
@@ -222,9 +223,31 @@ var split_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
222
223
|
const { width, height } = entry.contentRect;
|
|
223
224
|
triggerSize.value = isHorizontal.value ? width : height;
|
|
224
225
|
}
|
|
226
|
+
function onTriggerKeydown(_x2) {
|
|
227
|
+
return _onTriggerKeydown.apply(this, arguments);
|
|
228
|
+
}
|
|
229
|
+
function _onTriggerKeydown() {
|
|
230
|
+
_onTriggerKeydown = _asyncToGenerator(function* (e) {
|
|
231
|
+
var _await$getContainerSi2;
|
|
232
|
+
if (props.disabled) return;
|
|
233
|
+
const horiz = isHorizontal.value;
|
|
234
|
+
const inc = horiz ? e.key === KEYBOARD_KEY.ARROW_RIGHT : e.key === KEYBOARD_KEY.ARROW_DOWN;
|
|
235
|
+
const dec = horiz ? e.key === KEYBOARD_KEY.ARROW_LEFT : e.key === KEYBOARD_KEY.ARROW_UP;
|
|
236
|
+
if (!inc && !dec) return;
|
|
237
|
+
e.preventDefault();
|
|
238
|
+
const containerSize = (_await$getContainerSi2 = yield getContainerSize()) !== null && _await$getContainerSi2 !== void 0 ? _await$getContainerSi2 : 0;
|
|
239
|
+
if (!containerSize) return;
|
|
240
|
+
const step = e.shiftKey ? 20 : 10;
|
|
241
|
+
updateSize(getLegalPxSize(`${getPxSize({
|
|
242
|
+
size: mergedSize.value,
|
|
243
|
+
containerSize
|
|
244
|
+
}) + (inc ? step : -step)}px`, containerSize), containerSize);
|
|
245
|
+
});
|
|
246
|
+
return _onTriggerKeydown.apply(this, arguments);
|
|
247
|
+
}
|
|
225
248
|
onMounted(_asyncToGenerator(function* () {
|
|
226
|
-
var _await$
|
|
227
|
-
const containerSize = (_await$
|
|
249
|
+
var _await$getContainerSi3;
|
|
250
|
+
const containerSize = (_await$getContainerSi3 = yield getContainerSize()) !== null && _await$getContainerSi3 !== void 0 ? _await$getContainerSi3 : 0;
|
|
228
251
|
updateSize(getLegalPxSize(mergedSize.value, containerSize), containerSize);
|
|
229
252
|
}));
|
|
230
253
|
return (_ctx, _cache) => {
|
|
@@ -243,7 +266,8 @@ var split_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
243
266
|
"prefix-cls": `${unref(prefixCls)}-trigger`,
|
|
244
267
|
direction: isHorizontal.value ? "vertical" : "horizontal",
|
|
245
268
|
onMousedown: onMoveStart,
|
|
246
|
-
onResize: onTriggerResize
|
|
269
|
+
onResize: onTriggerResize,
|
|
270
|
+
onKeydown: onTriggerKeydown
|
|
247
271
|
}, {
|
|
248
272
|
default: withCtx(() => [renderSlot(_ctx.$slots, "resize-trigger")]),
|
|
249
273
|
icon: withCtx(() => [renderSlot(_ctx.$slots, "resize-trigger-icon")]),
|
package/es/steps/context.d.ts
CHANGED