@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/card/style/index.css
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
position: relative;
|
|
20
20
|
background: var(--sd-color-bg-2);
|
|
21
21
|
border-radius: var(--sd-border-radius-none);
|
|
22
|
-
transition: box-shadow 0.2s cubic-bezier(0, 0, 1, 1);
|
|
22
|
+
transition: box-shadow 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
23
23
|
}
|
|
24
24
|
.sd-card-header {
|
|
25
25
|
position: relative;
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
justify-content: center;
|
|
80
80
|
color: var(--sd-color-text-2);
|
|
81
81
|
cursor: pointer;
|
|
82
|
-
transition: color 0.2s cubic-bezier(0, 0, 1, 1);
|
|
82
|
+
transition: color 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
83
83
|
overflow: hidden;
|
|
84
84
|
white-space: nowrap;
|
|
85
85
|
text-overflow: ellipsis;
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
.sd-card-grid::before {
|
|
125
125
|
position: absolute;
|
|
126
126
|
inset: 0;
|
|
127
|
-
transition: box-shadow 0.2s cubic-bezier(0, 0, 1, 1);
|
|
127
|
+
transition: box-shadow 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
128
128
|
content: "";
|
|
129
129
|
pointer-events: none;
|
|
130
130
|
}
|
|
@@ -193,6 +193,29 @@
|
|
|
193
193
|
padding: 12px 16px;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
.sd-card-full-height {
|
|
197
|
+
display: flex;
|
|
198
|
+
flex-direction: column;
|
|
199
|
+
height: 100%;
|
|
200
|
+
overflow: hidden;
|
|
201
|
+
}
|
|
202
|
+
.sd-card-full-height .sd-card-header {
|
|
203
|
+
flex-shrink: 0;
|
|
204
|
+
}
|
|
205
|
+
.sd-card-full-height .sd-card-body {
|
|
206
|
+
flex: 1;
|
|
207
|
+
min-height: 0;
|
|
208
|
+
}
|
|
209
|
+
.sd-card-full-height .sd-card-body-native {
|
|
210
|
+
overflow: auto;
|
|
211
|
+
}
|
|
212
|
+
.sd-card-full-height .sd-card-body-scroll {
|
|
213
|
+
overflow: hidden;
|
|
214
|
+
}
|
|
215
|
+
.sd-card-full-height .sd-card-body-scroll .sd-card-body-scrollbar {
|
|
216
|
+
height: 100%;
|
|
217
|
+
}
|
|
218
|
+
|
|
196
219
|
:where(body, [sd-theme])[sd-theme=dark] .sd-card-grid-hoverable:hover::before,
|
|
197
220
|
:where(body, [sd-theme])[sd-theme=dark] .sd-card-hoverable:hover {
|
|
198
221
|
box-shadow: 0 4px 10px rgb(var(--sd-gray-1), 40%);
|
package/es/card/style/index.scss
CHANGED
|
@@ -23,7 +23,7 @@ $card-prefix-cls: string.unquote('#{theme.$prefix}-card');
|
|
|
23
23
|
position: relative;
|
|
24
24
|
background: $card-color-bg;
|
|
25
25
|
border-radius: $card-border-radius-no-border;
|
|
26
|
-
transition: box-shadow theme.$transition-duration-2 theme.$transition-timing-function-
|
|
26
|
+
transition: box-shadow theme.$transition-duration-2 theme.$transition-timing-function-standard;
|
|
27
27
|
|
|
28
28
|
&-header {
|
|
29
29
|
position: relative;
|
|
@@ -90,7 +90,7 @@ $card-prefix-cls: string.unquote('#{theme.$prefix}-card');
|
|
|
90
90
|
justify-content: center;
|
|
91
91
|
color: $card-color-action;
|
|
92
92
|
cursor: pointer;
|
|
93
|
-
transition: color theme.$transition-duration-2 theme.$transition-timing-function-
|
|
93
|
+
transition: color theme.$transition-duration-2 theme.$transition-timing-function-standard;
|
|
94
94
|
|
|
95
95
|
@include text-ellipsis();
|
|
96
96
|
|
|
@@ -150,7 +150,7 @@ $card-prefix-cls: string.unquote('#{theme.$prefix}-card');
|
|
|
150
150
|
&::before {
|
|
151
151
|
position: absolute;
|
|
152
152
|
inset: 0;
|
|
153
|
-
transition: box-shadow theme.$transition-duration-2 theme.$transition-timing-function-
|
|
153
|
+
transition: box-shadow theme.$transition-duration-2 theme.$transition-timing-function-standard;
|
|
154
154
|
content: '';
|
|
155
155
|
pointer-events: none;
|
|
156
156
|
}
|
|
@@ -227,6 +227,37 @@ $card-prefix-cls: string.unquote('#{theme.$prefix}-card');
|
|
|
227
227
|
@include size(small, small);
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
+
// full-height:撑满父容器高度,内容区域自动滚动
|
|
231
|
+
.#{$card-prefix-cls}-full-height {
|
|
232
|
+
display: flex;
|
|
233
|
+
flex-direction: column;
|
|
234
|
+
height: 100%;
|
|
235
|
+
overflow: hidden;
|
|
236
|
+
|
|
237
|
+
.#{$card-prefix-cls}-header {
|
|
238
|
+
flex-shrink: 0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.#{$card-prefix-cls}-body {
|
|
242
|
+
flex: 1;
|
|
243
|
+
min-height: 0;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// scrollbar === false:使用原生 overflow 滚动
|
|
247
|
+
.#{$card-prefix-cls}-body-native {
|
|
248
|
+
overflow: auto;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// scrollbar !== false:使用 Scrollbar 组件
|
|
252
|
+
.#{$card-prefix-cls}-body-scroll {
|
|
253
|
+
overflow: hidden;
|
|
254
|
+
|
|
255
|
+
.#{$card-prefix-cls}-body-scrollbar {
|
|
256
|
+
height: 100%;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
230
261
|
// dark mode
|
|
231
262
|
#{global.$sd-theme-tag}[sd-theme='dark'] {
|
|
232
263
|
.#{$card-prefix-cls}-grid-hoverable:hover::before,
|
|
@@ -8,8 +8,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
8
8
|
default: string;
|
|
9
9
|
};
|
|
10
10
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
-
previousClick: (_ev:
|
|
12
|
-
nextClick: (_ev:
|
|
11
|
+
previousClick: (_ev: Event) => any;
|
|
12
|
+
nextClick: (_ev: Event) => any;
|
|
13
13
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
14
|
direction: {
|
|
15
15
|
type: StringConstructor;
|
|
@@ -20,8 +20,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
20
20
|
default: string;
|
|
21
21
|
};
|
|
22
22
|
}>> & Readonly<{
|
|
23
|
-
onPreviousClick?: ((_ev:
|
|
24
|
-
onNextClick?: ((_ev:
|
|
23
|
+
onPreviousClick?: ((_ev: Event) => any) | undefined;
|
|
24
|
+
onNextClick?: ((_ev: Event) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
showArrow: string;
|
|
27
27
|
direction: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
|
+
import { isActivationKey } from "../_utils/keyboard.js";
|
|
3
4
|
import IconRight from "../icon/icon-right/index.js";
|
|
4
5
|
import IconDown from "../icon/icon-down/index.js";
|
|
5
6
|
import IconLeft from "../icon/icon-left/index.js";
|
|
@@ -29,15 +30,30 @@ var carousel_arrow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
29
30
|
const onNextClick = (ev) => {
|
|
30
31
|
emit("nextClick", ev);
|
|
31
32
|
};
|
|
33
|
+
const onKeydown = (e, which) => {
|
|
34
|
+
if (isActivationKey(e)) {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
if (which === "previous") emit("previousClick", e);
|
|
37
|
+
else emit("nextClick", e);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
32
40
|
const cls = computed(() => [`${prefixCls}-arrow`, { [`${prefixCls}-arrow-hover`]: props.showArrow === "hover" }]);
|
|
33
41
|
return (_ctx, _cache) => {
|
|
34
42
|
return openBlock(), createElementBlock("div", { class: normalizeClass(cls.value) }, [createElementVNode("div", {
|
|
43
|
+
role: "button",
|
|
44
|
+
tabindex: "0",
|
|
45
|
+
"aria-label": "Previous slide",
|
|
35
46
|
class: normalizeClass(`${unref(prefixCls)}-arrow-${__props.direction === "vertical" ? "top" : "left"}`),
|
|
36
|
-
onClick: onPreviousClick
|
|
37
|
-
|
|
47
|
+
onClick: onPreviousClick,
|
|
48
|
+
onKeydown: _cache[0] || (_cache[0] = (e) => onKeydown(e, "previous"))
|
|
49
|
+
}, [__props.direction === "horizontal" ? (openBlock(), createBlock(unref(IconLeft), { key: 0 })) : (openBlock(), createBlock(unref(IconUp), { key: 1 }))], 34), createElementVNode("div", {
|
|
50
|
+
role: "button",
|
|
51
|
+
tabindex: "0",
|
|
52
|
+
"aria-label": "Next slide",
|
|
38
53
|
class: normalizeClass(`${unref(prefixCls)}-arrow-${__props.direction === "vertical" ? "bottom" : "right"}`),
|
|
39
|
-
onClick: onNextClick
|
|
40
|
-
|
|
54
|
+
onClick: onNextClick,
|
|
55
|
+
onKeydown: _cache[1] || (_cache[1] = (e) => onKeydown(e, "next"))
|
|
56
|
+
}, [__props.direction === "horizontal" ? (openBlock(), createBlock(unref(IconRight), { key: 0 })) : (openBlock(), createBlock(unref(IconDown), { key: 1 }))], 34)], 2);
|
|
41
57
|
};
|
|
42
58
|
}
|
|
43
59
|
}));
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
|
+
import { isActivationKey } from "../_utils/keyboard.js";
|
|
3
4
|
import { Fragment, computed, createElementBlock, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, renderList, unref } from "vue";
|
|
4
5
|
//#region components/carousel/carousel-indicator.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var _hoisted_1 = ["
|
|
6
|
+
var _hoisted_1 = ["aria-label"];
|
|
7
|
+
var _hoisted_2 = [
|
|
8
|
+
"data-index",
|
|
9
|
+
"aria-label",
|
|
10
|
+
"aria-current",
|
|
11
|
+
"onKeydown"
|
|
12
|
+
];
|
|
6
13
|
var carousel_indicator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Indicator" }), {}, {
|
|
7
14
|
__name: "carousel-indicator",
|
|
8
15
|
props: {
|
|
@@ -47,6 +54,12 @@ var carousel_indicator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
|
|
|
47
54
|
if (!Number.isNaN(index) && index !== props.activeIndex) emit("select", index);
|
|
48
55
|
}
|
|
49
56
|
};
|
|
57
|
+
const onItemKeydown = (event, index) => {
|
|
58
|
+
if (isActivationKey(event) && index !== props.activeIndex) {
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
emit("select", index);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
50
63
|
const eventHandlers = computed(() => {
|
|
51
64
|
return props.trigger === "click" ? { onClick } : { onMouseover: onClick };
|
|
52
65
|
});
|
|
@@ -66,13 +79,19 @@ var carousel_indicator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
|
|
|
66
79
|
return openBlock(), createElementBlock("div", mergeProps({ class: cls.value }, eventHandlers.value), [__props.type === "slider" ? (openBlock(), createElementBlock("span", {
|
|
67
80
|
key: 0,
|
|
68
81
|
style: normalizeStyle(sliderStyle.value),
|
|
82
|
+
"aria-label": `Slide ${__props.activeIndex + 1} of ${__props.count}`,
|
|
69
83
|
class: normalizeClass([`${unref(prefixCls)}-item`, `${unref(prefixCls)}-item-active`])
|
|
70
|
-
}, null,
|
|
84
|
+
}, null, 14, _hoisted_1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(Array(__props.count), (_, index) => {
|
|
71
85
|
return openBlock(), createElementBlock("span", {
|
|
72
86
|
key: index,
|
|
87
|
+
role: "button",
|
|
88
|
+
tabindex: "0",
|
|
73
89
|
"data-index": index,
|
|
74
|
-
|
|
75
|
-
|
|
90
|
+
"aria-label": `Go to slide ${index + 1}`,
|
|
91
|
+
"aria-current": index === __props.activeIndex ? "true" : void 0,
|
|
92
|
+
class: normalizeClass([`${unref(prefixCls)}-item`, { [`${unref(prefixCls)}-item-active`]: index === __props.activeIndex }]),
|
|
93
|
+
onKeydown: ($event) => onItemKeydown($event, index)
|
|
94
|
+
}, null, 42, _hoisted_2);
|
|
76
95
|
}), 128))], 16);
|
|
77
96
|
};
|
|
78
97
|
}
|
|
@@ -3,7 +3,7 @@ import { getPrefixCls } from "../_utils/global-config.js";
|
|
|
3
3
|
import { carouselInjectionKey } from "./context.js";
|
|
4
4
|
import { computed, createElementBlock, defineComponent, getCurrentInstance, inject, normalizeClass, normalizeStyle, openBlock, renderSlot } from "vue";
|
|
5
5
|
//#region components/carousel/carousel-item.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var _hoisted_1 = ["aria-hidden"];
|
|
6
|
+
var _hoisted_1 = ["aria-label", "aria-hidden"];
|
|
7
7
|
var carousel_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "CarouselItem" }), {}, {
|
|
8
8
|
__name: "carousel-item",
|
|
9
9
|
setup(__props) {
|
|
@@ -14,6 +14,10 @@ var carousel_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
14
14
|
var _context$items$indexO, _context$items, _instance$uid;
|
|
15
15
|
return (_context$items$indexO = (_context$items = context.items) === null || _context$items === void 0 ? void 0 : _context$items.indexOf((_instance$uid = instance === null || instance === void 0 ? void 0 : instance.uid) !== null && _instance$uid !== void 0 ? _instance$uid : -1)) !== null && _context$items$indexO !== void 0 ? _context$items$indexO : -1;
|
|
16
16
|
});
|
|
17
|
+
const slideCount = computed(() => {
|
|
18
|
+
var _context$items$length, _context$items2;
|
|
19
|
+
return (_context$items$length = (_context$items2 = context.items) === null || _context$items2 === void 0 ? void 0 : _context$items2.length) !== null && _context$items$length !== void 0 ? _context$items$length : 0;
|
|
20
|
+
});
|
|
17
21
|
const isCurrent = computed(() => {
|
|
18
22
|
var _context$mergedIndexe;
|
|
19
23
|
return ((_context$mergedIndexe = context.mergedIndexes) === null || _context$mergedIndexe === void 0 ? void 0 : _context$mergedIndexe.mergedIndex) === index.value;
|
|
@@ -39,6 +43,9 @@ var carousel_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
39
43
|
});
|
|
40
44
|
return (_ctx, _cache) => {
|
|
41
45
|
return openBlock(), createElementBlock("div", {
|
|
46
|
+
role: "group",
|
|
47
|
+
"aria-roledescription": "slide",
|
|
48
|
+
"aria-label": `Slide ${index.value + 1} of ${slideCount.value}`,
|
|
42
49
|
"aria-hidden": !isCurrent.value,
|
|
43
50
|
class: normalizeClass(cls.value),
|
|
44
51
|
style: normalizeStyle(animationStyle.value)
|
package/es/carousel/carousel.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isNumber, isObject } from "../_utils/is.js";
|
|
4
|
+
import { KEYBOARD_KEY } from "../_utils/keyboard.js";
|
|
4
5
|
import { useChildrenComponents } from "../_hooks/use-children-components.js";
|
|
5
6
|
import carousel_arrow_default from "./carousel-arrow.js";
|
|
6
7
|
import carousel_indicator_default from "./carousel-indicator.js";
|
|
@@ -214,6 +215,15 @@ var carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
214
215
|
isNegative: index < mergedIndexes.value.mergedIndex,
|
|
215
216
|
isManual: true
|
|
216
217
|
});
|
|
218
|
+
const onKeydown = (e) => {
|
|
219
|
+
if (e.key === KEYBOARD_KEY.ARROW_RIGHT || e.key === KEYBOARD_KEY.ARROW_DOWN) {
|
|
220
|
+
e.preventDefault();
|
|
221
|
+
onNextClick();
|
|
222
|
+
} else if (e.key === KEYBOARD_KEY.ARROW_LEFT || e.key === KEYBOARD_KEY.ARROW_UP) {
|
|
223
|
+
e.preventDefault();
|
|
224
|
+
onPreviousClick();
|
|
225
|
+
}
|
|
226
|
+
};
|
|
217
227
|
const eventHandlers = computed(() => {
|
|
218
228
|
return computedAutoPlay.value.hoverToPause ? {
|
|
219
229
|
onMouseenter: () => {
|
|
@@ -246,7 +256,14 @@ var carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
246
256
|
return () => {
|
|
247
257
|
var _slots$default;
|
|
248
258
|
children.value = (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
|
249
|
-
return createVNode("div", mergeProps({
|
|
259
|
+
return createVNode("div", mergeProps({
|
|
260
|
+
"class": cls.value,
|
|
261
|
+
"role": "region",
|
|
262
|
+
"aria-roledescription": "carousel",
|
|
263
|
+
"aria-label": "Carousel",
|
|
264
|
+
"tabindex": "0",
|
|
265
|
+
"onKeydown": onKeydown
|
|
266
|
+
}, eventHandlers.value), [
|
|
250
267
|
createVNode("div", { "class": contentCls.value }, [children.value]),
|
|
251
268
|
hasIndicator.value && createVNode("div", { "class": indicatorCls.value }, [createVNode(carousel_indicator_default, {
|
|
252
269
|
"class": props.indicatorClass,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { CascaderModelValue, CascaderOption } from './interface';
|
|
2
2
|
import type { CascaderProps } from './types';
|
|
3
|
-
declare var
|
|
3
|
+
declare var __VLS_30: any, __VLS_33: {}, __VLS_36: {}, __VLS_39: {}, __VLS_42: {}, __VLS_52: {}, __VLS_61: {};
|
|
4
4
|
type __VLS_Slots = {} & {
|
|
5
|
-
label?: (props: typeof
|
|
5
|
+
label?: (props: typeof __VLS_30) => any;
|
|
6
6
|
} & {
|
|
7
|
-
prefix?: (props: typeof
|
|
7
|
+
prefix?: (props: typeof __VLS_33) => any;
|
|
8
8
|
} & {
|
|
9
|
-
'arrow-icon'?: (props: typeof
|
|
9
|
+
'arrow-icon'?: (props: typeof __VLS_36) => any;
|
|
10
10
|
} & {
|
|
11
|
-
'loading-icon'?: (props: typeof
|
|
11
|
+
'loading-icon'?: (props: typeof __VLS_39) => any;
|
|
12
12
|
} & {
|
|
13
|
-
'search-icon'?: (props: typeof
|
|
13
|
+
'search-icon'?: (props: typeof __VLS_42) => any;
|
|
14
14
|
} & {
|
|
15
|
-
empty?: (props: typeof
|
|
15
|
+
empty?: (props: typeof __VLS_52) => any;
|
|
16
16
|
} & {
|
|
17
|
-
empty?: (props: typeof
|
|
17
|
+
empty?: (props: typeof __VLS_61) => any;
|
|
18
18
|
};
|
|
19
19
|
declare const __VLS_base: import("vue").DefineComponent<CascaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
20
|
search: (value: string) => any;
|
|
@@ -43,6 +43,7 @@ declare const __VLS_base: import("vue").DefineComponent<CascaderProps, {}, {}, {
|
|
|
43
43
|
}>, {
|
|
44
44
|
options: CascaderOption[];
|
|
45
45
|
error: boolean;
|
|
46
|
+
readonly: boolean | string;
|
|
46
47
|
defaultPopupVisible: boolean;
|
|
47
48
|
disabled: boolean;
|
|
48
49
|
allowClear: boolean;
|