@sdata/web-vue 3.13.0 → 3.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sd.css +167 -114
- package/dist/sd.min.css +2 -2
- package/es/_components/input-label/input-label.d.ts +2 -0
- package/es/_components/input-label/input-label.js +4 -2
- package/es/_components/input-label/style/index.css +2 -2
- package/es/_components/picker/style/index.scss +8 -2
- package/es/_components/resize-observer.js +1 -1
- package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +13 -3
- package/es/_components/select-view/select-view.d.ts +2 -0
- package/es/_components/select-view/select-view.js +7 -1
- package/es/_components/select-view/style/index.css +5 -5
- package/es/_hooks/use-focus-trap.d.ts +10 -0
- package/es/_hooks/use-focus-trap.js +115 -0
- package/es/_utils/dom.js +1 -10
- package/es/_utils/keyboard.d.ts +4 -0
- package/es/_utils/keyboard.js +21 -2
- package/es/alert/alert.vue.d.ts +2 -2
- package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +16 -4
- package/es/alert/index.d.ts +5 -5
- package/es/alert/style/index.css +1 -1
- package/es/alert/style/index.scss +1 -1
- package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/anchor/style/index.css +1 -1
- package/es/anchor/style/index.scss +3 -1
- package/es/auto-complete/auto-complete.js +8 -0
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +8 -2
- package/es/avatar/style/index.css +2 -2
- package/es/avatar/style/index.scss +2 -2
- package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +8 -1
- package/es/back-top/style/index.css +1 -1
- package/es/back-top/style/index.scss +2 -1
- package/es/badge/badge.js +4 -1
- package/es/badge/style/index.css +3 -3
- package/es/badge/style/index.scss +3 -3
- package/es/basic-crud-table/basic-crud-modal.js +5 -0
- package/es/basic-crud-table/basic-crud-modal.vue.d.ts +264 -0
- package/es/basic-crud-table/basic-crud-modal.vue_vue_type_script_setup_true_lang.js +139 -0
- package/es/basic-crud-table/basic-crud-table.js +5 -0
- package/es/basic-crud-table/basic-crud-table.vue.d.ts +935 -0
- package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +510 -0
- package/es/basic-crud-table/index.d.ts +2722 -0
- package/es/basic-crud-table/index.js +9 -0
- package/es/basic-crud-table/style/css.js +2 -0
- package/es/basic-crud-table/style/index.css +42 -0
- package/es/basic-crud-table/style/index.d.ts +2 -0
- package/es/basic-crud-table/style/index.js +2 -0
- package/es/basic-crud-table/style/index.scss +33 -0
- package/es/basic-crud-table/style/token.scss +8 -0
- package/es/basic-crud-table/types.d.ts +69 -0
- package/es/breadcrumb/breadcrumb-item.js +4 -2
- package/es/breadcrumb/breadcrumb.js +3 -0
- package/es/button/button.vue_vue_type_script_setup_true_lang.js +10 -5
- package/es/button/style/index.css +15 -6
- package/es/button/style/index.scss +25 -7
- package/es/calendar/components/event.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/calendar/components/headings-bar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/calendar/style/event.scss +2 -2
- package/es/calendar/style/index.css +2 -2
- package/es/card/style/index.css +3 -3
- package/es/card/style/index.scss +3 -3
- package/es/carousel/carousel-arrow.vue.d.ts +4 -4
- package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +25 -5
- package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +25 -4
- package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +11 -2
- package/es/carousel/carousel.js +20 -1
- package/es/carousel/style/index.css +1 -1
- package/es/carousel/style/index.scss +1 -1
- package/es/cascader/cascader-option.js +1 -1
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +13 -4
- package/es/cascader/style/index.css +2 -2
- package/es/cascader/style/index.scss +3 -1
- package/es/checkbox/checkbox-group.js +4 -1
- package/es/checkbox/checkbox.d.ts +9 -0
- package/es/checkbox/checkbox.js +14 -0
- package/es/checkbox/index.d.ts +15 -0
- package/es/checkbox/style/index.css +1 -1
- package/es/checkbox/style/index.scss +1 -1
- package/es/collapse/collapse-item.js +21 -3
- package/es/collapse/context.d.ts +1 -1
- package/es/color-picker/color-picker.js +6 -0
- package/es/color-picker/panel.js +5 -3
- package/es/components.d.ts +1 -0
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/date-picker/hooks/use-provide-datepicker-transform.js +1 -1
- package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +14 -1
- package/es/date-picker/panels/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +4 -3
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/date-picker/style/index.css +5 -5
- package/es/date-picker/style/index.scss +4 -3
- package/es/drawer/drawer.vue.d.ts +1 -1
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +31 -9
- package/es/drawer/index.d.ts +3 -3
- package/es/dropdown/dropdown-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/dropdown/dropdown-panel.vue.d.ts +9 -0
- package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +76 -3
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/dropdown/style/index.css +1 -1
- package/es/dropdown/style/index.scss +3 -1
- package/es/file-previewer/file-previewer.vue.d.ts +1 -1
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +18 -10
- package/es/file-previewer/index.d.ts +3 -3
- package/es/form/context.d.ts +1 -0
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/form/index.js +1 -1
- package/es/form/style/index.css +2 -2
- package/es/form/style/index.scss +2 -2
- package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/grid/grid-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/grid/grid-row.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/grid/grid.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview.vue.d.ts +1 -1
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/index.css +167 -114
- package/es/index.d.ts +2 -0
- package/es/index.js +55 -54
- package/es/index.scss +1 -0
- package/es/input/input.js +18 -2
- package/es/input/style/index.css +2 -2
- package/es/input/style/input.scss +4 -4
- package/es/input-number/input-number.js +9 -3
- package/es/input-number/style/index.css +3 -3
- package/es/input-number/style/index.scss +5 -1
- package/es/input-tag/index.d.ts +3 -0
- package/es/input-tag/input-tag.d.ts +2 -0
- package/es/input-tag/input-tag.js +34 -30
- package/es/input-tag/style/index.css +8 -8
- package/es/input-tag/style/index.scss +11 -5
- package/es/json-form/style/index.css +0 -3
- package/es/json-form/style/index.scss +4 -3
- package/es/json-form/utils.js +4 -4
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +34 -7
- package/es/layout/style/index.css +2 -2
- package/es/layout/style/index.scss +4 -2
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/link/style/index.css +1 -1
- package/es/link/style/index.scss +3 -1
- package/es/list/list.js +1 -1
- package/es/locale/interface.d.ts +39 -0
- package/es/locale/lang/ar-eg.js +38 -0
- package/es/locale/lang/de-de.js +38 -0
- package/es/locale/lang/en-us.js +38 -0
- package/es/locale/lang/es-es.js +38 -0
- package/es/locale/lang/fr-fr.js +38 -0
- package/es/locale/lang/id-id.js +38 -0
- package/es/locale/lang/it-it.js +38 -0
- package/es/locale/lang/ja-jp.js +38 -0
- package/es/locale/lang/km-kh.js +38 -0
- package/es/locale/lang/ko-kr.js +38 -0
- package/es/locale/lang/ms-my.js +38 -0
- package/es/locale/lang/nl-nl.js +38 -0
- package/es/locale/lang/pt-pt.js +38 -0
- package/es/locale/lang/ru-ru.js +38 -0
- package/es/locale/lang/th-th.js +38 -0
- package/es/locale/lang/vi-vn.js +38 -0
- package/es/locale/lang/zh-cn.js +38 -0
- package/es/locale/lang/zh-tw.js +38 -0
- package/es/mention/mention.js +8 -0
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +29 -3
- package/es/menu/item.d.ts +1 -1
- package/es/menu/item.js +14 -1
- package/es/menu/style/index.css +6 -6
- package/es/menu/style/index.scss +5 -3
- package/es/message/style/index.css +3 -3
- package/es/message/style/index.scss +5 -3
- package/es/modal/index.d.ts +3 -3
- package/es/modal/modal.vue.d.ts +1 -1
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +31 -15
- package/es/modal/style/index.css +2 -2
- package/es/modal/style/index.scss +3 -2
- package/es/notification/style/index.css +3 -3
- package/es/notification/style/index.scss +11 -3
- package/es/overflow-list/overflow-list.js +1 -1
- package/es/page-header/page-header.vue.d.ts +6 -6
- package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +19 -2
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +15 -2
- package/es/pagination/page-item-step.vue.d.ts +2 -2
- package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +23 -4
- package/es/pagination/page-item.vue.d.ts +2 -2
- package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +21 -3
- package/es/pagination/pagination.js +5 -1
- package/es/pagination/style/index.css +6 -1
- package/es/pagination/style/index.scss +9 -3
- package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +2 -0
- package/es/progress/style/index.css +2 -2
- package/es/progress/style/index.scss +5 -3
- package/es/qr-code/qr-code-status.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +13 -6
- package/es/radio/context.d.ts +1 -0
- package/es/radio/radio-group.js +6 -2
- package/es/radio/radio.js +1 -0
- package/es/radio/style/index.css +2 -2
- package/es/radio/style/index.scss +4 -2
- package/es/rate/rate.js +27 -1
- package/es/resize-box/resize-box.vue.d.ts +4 -4
- package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +30 -1
- package/es/result/result.vue_vue_type_script_setup_true_lang.js +7 -4
- package/es/sd-vue.js +54 -52
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/select/index.d.ts +124 -0
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/select/select.d.ts +62 -0
- package/es/select/select.js +20 -4
- package/es/select/style/index.css +1 -1
- package/es/select/style/index.scss +3 -1
- package/es/selectable-card/style/index.css +2 -2
- package/es/selectable-card/style/index.scss +5 -5
- package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/slider/slider-button.vue.d.ts +2 -0
- package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +7 -2
- package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +23 -2
- package/es/slider/style/index.css +1 -1
- package/es/slider/style/index.scss +3 -1
- package/es/spin/spin.js +7 -2
- package/es/spin/style/index.css +1 -1
- package/es/spin/style/index.scss +1 -1
- package/es/split/split.vue.d.ts +4 -4
- package/es/split/split.vue_vue_type_script_setup_true_lang.js +27 -3
- package/es/statistic/statistic.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/steps/context.d.ts +1 -0
- package/es/steps/step.vue_vue_type_script_setup_true_lang.js +15 -2
- package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +10 -2
- package/es/steps/style/index.css +1 -1
- package/es/steps/style/index.scss +1 -1
- package/es/style/animation/index.scss +1 -0
- package/es/style/animation/reduced-motion.scss +22 -0
- package/es/style/animation/zoom.scss +7 -6
- package/es/style/icon.scss +9 -1
- package/es/switch/style/index.css +1 -1
- package/es/switch/style/index.scss +4 -1
- package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/table/index.d.ts +4 -4
- package/es/table/style/index.css +8 -8
- package/es/table/style/index.scss +11 -8
- package/es/table/table-operation-td.d.ts +15 -0
- package/es/table/table-operation-td.js +3 -3
- package/es/table/table-operation-th.js +1 -1
- package/es/table/table-tbody.js +4 -1
- package/es/table/table-td.js +2 -1
- package/es/table/table-th.d.ts +1 -1
- package/es/table/table-th.js +7 -5
- package/es/table/table-thead.js +4 -1
- package/es/table/table-tr.js +4 -1
- package/es/table/table.d.ts +1 -1
- package/es/table/table.js +8 -4
- package/es/tabs/context.d.ts +1 -0
- package/es/tabs/style/index.css +5 -5
- package/es/tabs/style/index.scss +7 -7
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +21 -2
- package/es/tabs/tabs-button.js +1 -1
- package/es/tabs/tabs-nav.js +34 -1
- package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +27 -4
- package/es/tabs/tabs.js +4 -2
- package/es/tag/index.d.ts +5 -5
- package/es/tag/style/index.css +1 -1
- package/es/tag/style/index.scss +3 -1
- package/es/tag/tag.vue.d.ts +2 -2
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +27 -4
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/textarea/style/index.css +2 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +18 -3
- package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/toolbar/index.d.ts +3 -3
- package/es/toolbar/toolbar.vue.d.ts +2 -2
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +1 -0
- package/es/transfer/style/index.css +1 -1
- package/es/transfer/style/index.scss +1 -1
- package/es/transfer/transfer-list-item.js +18 -2
- package/es/transfer/transfer.vue_vue_type_script_setup_true_lang.js +7 -5
- package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +28 -8
- package/es/tree/context.d.ts +2 -0
- package/es/tree/node-switcher.vue_vue_type_script_lang.js +1 -1
- package/es/tree/style/index.css +1 -1
- package/es/tree/style/index.scss +1 -1
- package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +81 -2
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +10 -1
- package/es/trigger/index.d.ts +45 -0
- package/es/trigger/trigger.d.ts +27 -0
- package/es/trigger/trigger.js +47 -5
- package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +17 -8
- package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +38 -6
- package/es/typography/style/index.css +2 -2
- package/es/typography/style/index.scss +2 -2
- package/es/upload/style/index.css +9 -9
- package/es/upload/style/index.scss +15 -9
- package/es/upload/upload-list-item.js +18 -5
- package/es/upload/upload-picture-item.js +27 -3
- package/es/verification-code/verification-code.js +8 -1
- package/json/vetur-attributes.json +15 -0
- package/json/vetur-tags.json +9 -2
- package/json/web-types.json +39 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getComponentPrefix, setGlobalConfig } from "../_utils/global-config.js";
|
|
2
|
+
import basic_crud_table_default from "./basic-crud-table.js";
|
|
3
|
+
//#region components/basic-crud-table/index.ts
|
|
4
|
+
var BasicCrudTable = Object.assign(basic_crud_table_default, { install: (app, options) => {
|
|
5
|
+
setGlobalConfig(app, options);
|
|
6
|
+
app.component(getComponentPrefix(options) + basic_crud_table_default.name, basic_crud_table_default);
|
|
7
|
+
} });
|
|
8
|
+
//#endregion
|
|
9
|
+
export { BasicCrudTable as default };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/******** borderSize *******/
|
|
2
|
+
/******** borderStyle *******/
|
|
3
|
+
/******** radius *******/
|
|
4
|
+
/******** shadow distance *******/
|
|
5
|
+
/******** size *******/
|
|
6
|
+
/******** spacing *******/
|
|
7
|
+
/******** shadow *******/
|
|
8
|
+
/******** opacity *******/
|
|
9
|
+
/******** fontSize *******/
|
|
10
|
+
/******** fontWeight ********/
|
|
11
|
+
/******** Primary *******/
|
|
12
|
+
/******** success *******/
|
|
13
|
+
/******** warning *******/
|
|
14
|
+
/******** danger *******/
|
|
15
|
+
/******** link *******/
|
|
16
|
+
/******** radius *******/
|
|
17
|
+
/********* icon hover *********/
|
|
18
|
+
.sd-basic-crud-table {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
gap: 8px;
|
|
22
|
+
width: 100%;
|
|
23
|
+
min-width: 0;
|
|
24
|
+
}
|
|
25
|
+
.sd-basic-crud-table-header {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
gap: 8px;
|
|
29
|
+
}
|
|
30
|
+
.sd-basic-crud-table-header-actions {
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: flex-end;
|
|
33
|
+
}
|
|
34
|
+
.sd-basic-crud-table-title {
|
|
35
|
+
margin: 0;
|
|
36
|
+
color: var(--sd-color-text-1);
|
|
37
|
+
font-size: 24px;
|
|
38
|
+
}
|
|
39
|
+
.sd-basic-crud-table-body {
|
|
40
|
+
width: 100%;
|
|
41
|
+
min-width: 0;
|
|
42
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@use '@style/theme/index.scss' as theme;
|
|
2
|
+
@use 'sass:string';
|
|
3
|
+
@use '@components/basic-crud-table/style/token.scss' as *;
|
|
4
|
+
$basic-crud-table-prefix-cls: string.unquote('#{theme.$prefix}-basic-crud-table');
|
|
5
|
+
.#{$basic-crud-table-prefix-cls} {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: $basic-crud-table-gap;
|
|
9
|
+
width: 100%;
|
|
10
|
+
min-width: 0;
|
|
11
|
+
|
|
12
|
+
&-header {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: $basic-crud-table-gap;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-header-actions {
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: flex-end;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-title {
|
|
24
|
+
margin: 0;
|
|
25
|
+
color: $basic-crud-table-title-color;
|
|
26
|
+
font-size: $basic-crud-table-title-size;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&-body {
|
|
30
|
+
width: 100%;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
@use '@style/theme/index.scss' as global;
|
|
2
|
+
|
|
3
|
+
@forward '@style/theme/index.scss';
|
|
4
|
+
|
|
5
|
+
@use 'sass:string';
|
|
6
|
+
$basic-crud-table-gap: global.$spacing-4;
|
|
7
|
+
$basic-crud-table-title-size: global.$font-size-title-3;
|
|
8
|
+
$basic-crud-table-title-color: var(string.unquote('#{global.$sd-cssvars-prefix}-color-text-1'));
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { UnknownRecord } from 'type-fest';
|
|
2
|
+
import type { JsonFormProps } from '../json-form';
|
|
3
|
+
import type ModalComponent from '../modal/modal.vue';
|
|
4
|
+
import type { TableColumnData, TableData, TableInstance } from '../table';
|
|
5
|
+
import type { ToolbarProps } from '../toolbar';
|
|
6
|
+
export type MaybePromise<T> = T | Promise<T>;
|
|
7
|
+
export type BasicCrudTableDataResult<TData extends TableData = TableData> = TData[] | {
|
|
8
|
+
data: TData[];
|
|
9
|
+
total?: number;
|
|
10
|
+
count?: number;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
export type BasicCrudTableTableProps = Omit<TableInstance['$props'], 'columns' | 'data' | 'onChange' | 'onPageChange' | 'onPageSizeChange'>;
|
|
14
|
+
export type BasicCrudTableToolbarProps = Omit<ToolbarProps, 'loading'>;
|
|
15
|
+
export type BasicCrudTableModalProps = Omit<InstanceType<typeof ModalComponent>['$props'], 'visible' | 'title' | 'onBeforeOk' | 'onClose' | 'onUpdate:visible'>;
|
|
16
|
+
export type BasicCrudTableModalFormProps = Omit<JsonFormProps, 'model'>;
|
|
17
|
+
export interface BasicCrudTableProps<TRow extends TableData = TableData> {
|
|
18
|
+
title?: string;
|
|
19
|
+
columns: TableColumnData[];
|
|
20
|
+
tableProps?: BasicCrudTableTableProps;
|
|
21
|
+
toolbarProps?: BasicCrudTableToolbarProps;
|
|
22
|
+
modalProps?: BasicCrudTableModalProps;
|
|
23
|
+
modalFormProps?: BasicCrudTableModalFormProps;
|
|
24
|
+
showCreate?: boolean;
|
|
25
|
+
openCreateModal?: boolean;
|
|
26
|
+
showEdit?: boolean;
|
|
27
|
+
showDelete?: boolean;
|
|
28
|
+
showToolbar?: boolean;
|
|
29
|
+
showHeader?: boolean;
|
|
30
|
+
showTitle?: boolean;
|
|
31
|
+
showActionColumn?: boolean;
|
|
32
|
+
fetchExcludeEmptyValues?: boolean;
|
|
33
|
+
fetchTableOnMounted?: boolean;
|
|
34
|
+
actionWidth?: number;
|
|
35
|
+
fetchTableApi?: (params: UnknownRecord) => MaybePromise<unknown>;
|
|
36
|
+
tableDataTransformer?: (data: unknown) => MaybePromise<BasicCrudTableDataResult<TRow>>;
|
|
37
|
+
createApi?: (data: UnknownRecord) => MaybePromise<unknown>;
|
|
38
|
+
updateApi?: (data: UnknownRecord) => MaybePromise<unknown>;
|
|
39
|
+
detailApi?: (row: TRow) => MaybePromise<UnknownRecord>;
|
|
40
|
+
valueTransformer?: (data: UnknownRecord) => UnknownRecord;
|
|
41
|
+
beforeModalSubmit?: (context: BasicCrudTableModalSubmitContext<TRow>) => MaybePromise<boolean | void>;
|
|
42
|
+
deleteContent?: string | ((row: TRow) => MaybePromise<string>);
|
|
43
|
+
deleteApi?: (row: TRow) => MaybePromise<unknown>;
|
|
44
|
+
beforeDelete?: (row: TRow) => MaybePromise<boolean | void>;
|
|
45
|
+
deleteNameKey?: string;
|
|
46
|
+
}
|
|
47
|
+
export type BasicCrudTableModalSubmitContext<TRow extends TableData = TableData> = {
|
|
48
|
+
type: 'create' | 'edit';
|
|
49
|
+
row?: TRow;
|
|
50
|
+
model: UnknownRecord;
|
|
51
|
+
};
|
|
52
|
+
export type BasicCrudTableActionSlotProps<TRow extends TableData = TableData> = {
|
|
53
|
+
record: TRow;
|
|
54
|
+
column: TableColumnData;
|
|
55
|
+
rowIndex: number;
|
|
56
|
+
};
|
|
57
|
+
export type BasicCrudTableModalSlotProps<TRow extends TableData = TableData> = {
|
|
58
|
+
type: 'create' | 'edit';
|
|
59
|
+
row?: TRow;
|
|
60
|
+
model: UnknownRecord;
|
|
61
|
+
};
|
|
62
|
+
export type InferBasicCrudTableRowFromValue<TValue> = TValue extends readonly (infer TItem)[] ? TItem : TValue extends {
|
|
63
|
+
data: infer TData;
|
|
64
|
+
} ? InferBasicCrudTableRowFromValue<TData> : TValue extends {
|
|
65
|
+
results: infer TResults;
|
|
66
|
+
} ? InferBasicCrudTableRowFromValue<TResults> : never;
|
|
67
|
+
type AwaitedReturn<T> = T extends (...args: never[]) => infer TResult ? Awaited<TResult> : never;
|
|
68
|
+
export type InferBasicCrudTableRow<TFetchTableApi, TTableDataTransformer = undefined> = TTableDataTransformer extends (...args: never[]) => unknown ? InferBasicCrudTableRowFromValue<AwaitedReturn<TTableDataTransformer>> : InferBasicCrudTableRowFromValue<AwaitedReturn<TFetchTableApi>>;
|
|
69
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
2
|
+
import { useI18n } from "../locale/index.js";
|
|
2
3
|
import IconMore from "../icon/icon-more/index.js";
|
|
4
|
+
import IconDown from "../icon/icon-down/index.js";
|
|
3
5
|
import dropdown_option_default from "../dropdown/dropdown-option.js";
|
|
4
6
|
import Dropdown from "../dropdown/index.js";
|
|
5
|
-
import IconDown from "../icon/icon-down/index.js";
|
|
6
7
|
import IconObliqueLine from "../icon/icon-oblique-line/index.js";
|
|
7
8
|
import { breadcrumbInjectKey } from "./context.js";
|
|
8
9
|
import { Fragment, computed, createVNode, defineComponent, inject, mergeProps, ref } from "vue";
|
|
@@ -47,6 +48,7 @@ var breadcrumb_item_default = /* @__PURE__ */ defineComponent({
|
|
|
47
48
|
* @version 2.36.0
|
|
48
49
|
*/
|
|
49
50
|
setup(props, { slots, attrs }) {
|
|
51
|
+
const { t } = useI18n();
|
|
50
52
|
const prefixCls = getPrefixCls("breadcrumb-item");
|
|
51
53
|
const breadcrumbCtx = inject(breadcrumbInjectKey, void 0);
|
|
52
54
|
const dropdownVisible = ref(false);
|
|
@@ -78,7 +80,7 @@ var breadcrumb_item_default = /* @__PURE__ */ defineComponent({
|
|
|
78
80
|
return createVNode("div", mergeProps({
|
|
79
81
|
"role": "listitem",
|
|
80
82
|
"class": [prefixCls, { [`${prefixCls}-with-dropdown`]: props.droplist || slots.droplist }]
|
|
81
|
-
}, displayMore.value ? { "aria-label": "
|
|
83
|
+
}, displayMore.value ? { "aria-label": t("a11y.breadcrumbEllipsis") } : void 0, attrs), [displayMore.value ? (_breadcrumbCtx$slots$2 = breadcrumbCtx === null || breadcrumbCtx === void 0 || (_breadcrumbCtx$slots3 = (_breadcrumbCtx$slots2 = breadcrumbCtx.slots)["more-icon"]) === null || _breadcrumbCtx$slots3 === void 0 ? void 0 : _breadcrumbCtx$slots3.call(_breadcrumbCtx$slots2)) !== null && _breadcrumbCtx$slots$2 !== void 0 ? _breadcrumbCtx$slots$2 : createVNode(IconMore, null, null) : (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots), (props.droplist || slots.droplist) && createVNode("span", {
|
|
82
84
|
"aria-hidden": true,
|
|
83
85
|
"class": [`${prefixCls}-dropdown-icon`, { [`${prefixCls}-dropdown-icon-active`]: dropdownVisible.value }]
|
|
84
86
|
}, [createVNode(IconDown, null, null)])]);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
2
2
|
import { getAllElements } from "../_utils/vue-utils.js";
|
|
3
|
+
import { useI18n } from "../locale/index.js";
|
|
3
4
|
import { breadcrumbInjectKey } from "./context.js";
|
|
4
5
|
import breadcrumb_item_default from "./breadcrumb-item.js";
|
|
5
6
|
import { computed, createVNode, defineComponent, mergeProps, provide, reactive, ref, toRefs } from "vue";
|
|
@@ -56,6 +57,7 @@ var breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
|
56
57
|
*/
|
|
57
58
|
setup(props, { slots }) {
|
|
58
59
|
const { maxCount, separator, routes } = toRefs(props);
|
|
60
|
+
const { t } = useI18n();
|
|
59
61
|
const prefixCls = getPrefixCls("breadcrumb");
|
|
60
62
|
const total = ref(0);
|
|
61
63
|
provide(breadcrumbInjectKey, reactive({
|
|
@@ -105,6 +107,7 @@ var breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
|
105
107
|
return () => {
|
|
106
108
|
return createVNode("div", {
|
|
107
109
|
"role": "list",
|
|
110
|
+
"aria-label": t("a11y.breadcrumb"),
|
|
108
111
|
"class": prefixCls
|
|
109
112
|
}, [slots.default ? renderByChildren() : renderByRoutes()]);
|
|
110
113
|
};
|
|
@@ -7,7 +7,7 @@ import IconLoading from "../icon/icon-loading/index.js";
|
|
|
7
7
|
import { useSize } from "../_hooks/use-size.js";
|
|
8
8
|
import Tooltip from "../tooltip/index.js";
|
|
9
9
|
import { buttonGroupInjectionKey } from "./context.js";
|
|
10
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createSlots, defineComponent, guardReactiveProps, inject, normalizeClass, normalizeProps, onMounted, onUpdated, openBlock, ref, renderSlot, resolveDynamicComponent, toRefs, unref, useSlots, withCtx } from "vue";
|
|
10
|
+
import { cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createSlots, defineComponent, guardReactiveProps, inject, normalizeClass, normalizeProps, onMounted, onUpdated, openBlock, ref, renderSlot, resolveDynamicComponent, toRefs, unref, useSlots, withCtx } from "vue";
|
|
11
11
|
//#region components/button/button.vue?vue&type=script&setup=true&lang.ts
|
|
12
12
|
var _hoisted_1 = ["href"];
|
|
13
13
|
var _hoisted_2 = { key: 2 };
|
|
@@ -114,10 +114,15 @@ var button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
114
114
|
*/
|
|
115
115
|
const { size, disabled } = toRefs(props);
|
|
116
116
|
const prefixCls = getPrefixCls("btn");
|
|
117
|
-
const PassThrough = (
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
const PassThrough = defineComponent({
|
|
118
|
+
name: "ButtonPassThrough",
|
|
119
|
+
inheritAttrs: false,
|
|
120
|
+
setup: (_, { slots, attrs }) => () => {
|
|
121
|
+
var _slots$default;
|
|
122
|
+
const vnodes = (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
|
123
|
+
return (vnodes === null || vnodes === void 0 ? void 0 : vnodes.length) ? cloneVNode(vnodes[0], attrs) : void 0;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
121
126
|
const slots = useSlots();
|
|
122
127
|
const hasTooltip = computed(() => props.tooltip != null || Boolean(slots.tooltip));
|
|
123
128
|
const tooltipWrapper = computed(() => hasTooltip.value ? Tooltip : PassThrough);
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
white-space: nowrap;
|
|
33
33
|
outline: none;
|
|
34
34
|
cursor: pointer;
|
|
35
|
-
transition:
|
|
35
|
+
transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), background-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), border-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), transform 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
36
36
|
appearance: none;
|
|
37
37
|
user-select: none;
|
|
38
38
|
}
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
color: currentcolor;
|
|
41
41
|
}
|
|
42
42
|
.sd-btn:active {
|
|
43
|
-
|
|
43
|
+
transform: scale(0.97);
|
|
44
44
|
}
|
|
45
45
|
.sd-btn-long {
|
|
46
46
|
display: flex;
|
|
@@ -80,13 +80,10 @@
|
|
|
80
80
|
background: #fff;
|
|
81
81
|
border-radius: inherit;
|
|
82
82
|
opacity: 0.4;
|
|
83
|
-
transition: opacity 0.1s cubic-bezier(0, 0, 1, 1);
|
|
83
|
+
transition: opacity 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
84
84
|
content: "";
|
|
85
85
|
pointer-events: none;
|
|
86
86
|
}
|
|
87
|
-
.sd-btn-loading-fixed-width {
|
|
88
|
-
transition: none;
|
|
89
|
-
}
|
|
90
87
|
.sd-btn-two-chinese-chars > *:not(svg) {
|
|
91
88
|
margin-right: -0.3em;
|
|
92
89
|
letter-spacing: 0.3em;
|
|
@@ -909,6 +906,9 @@
|
|
|
909
906
|
.sd-btn-group .sd-btn-dashed:active {
|
|
910
907
|
z-index: 2;
|
|
911
908
|
}
|
|
909
|
+
.sd-btn-group .sd-btn:active {
|
|
910
|
+
transform: none;
|
|
911
|
+
}
|
|
912
912
|
.sd-btn-group .sd-btn:first-child {
|
|
913
913
|
border-top-right-radius: 0;
|
|
914
914
|
border-bottom-right-radius: 0;
|
|
@@ -923,4 +923,13 @@
|
|
|
923
923
|
|
|
924
924
|
:where(body, [sd-theme])[sd-theme=dark] .sd-btn-primary.sd-btn-disabled {
|
|
925
925
|
color: rgba(255, 255, 255, 0.3);
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
@media (prefers-reduced-motion: reduce) {
|
|
929
|
+
.sd-btn:active {
|
|
930
|
+
transform: none;
|
|
931
|
+
}
|
|
932
|
+
.sd-btn .sd-icon-loading {
|
|
933
|
+
animation-duration: 3s;
|
|
934
|
+
}
|
|
926
935
|
}
|
|
@@ -63,7 +63,12 @@ $token-var-aliases: (
|
|
|
63
63
|
white-space: nowrap;
|
|
64
64
|
outline: none;
|
|
65
65
|
cursor: pointer;
|
|
66
|
-
|
|
66
|
+
// 状态切换只过渡颜色与按压形变;box-shadow(聚焦环)保持即时切换以保证可见性
|
|
67
|
+
transition:
|
|
68
|
+
color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
69
|
+
background-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
70
|
+
border-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
|
|
71
|
+
transform theme.$transition-duration-1 theme.$transition-timing-function-standard;
|
|
67
72
|
appearance: none;
|
|
68
73
|
user-select: none;
|
|
69
74
|
|
|
@@ -72,7 +77,7 @@ $token-var-aliases: (
|
|
|
72
77
|
}
|
|
73
78
|
|
|
74
79
|
&:active {
|
|
75
|
-
|
|
80
|
+
transform: scale(0.97);
|
|
76
81
|
}
|
|
77
82
|
|
|
78
83
|
&-long {
|
|
@@ -119,16 +124,12 @@ $token-var-aliases: (
|
|
|
119
124
|
background: #fff;
|
|
120
125
|
border-radius: inherit;
|
|
121
126
|
opacity: 0.4;
|
|
122
|
-
transition: opacity theme.$transition-duration-1 theme.$transition-timing-function-
|
|
127
|
+
transition: opacity theme.$transition-duration-1 theme.$transition-timing-function-standard;
|
|
123
128
|
content: '';
|
|
124
129
|
pointer-events: none;
|
|
125
130
|
}
|
|
126
131
|
}
|
|
127
132
|
|
|
128
|
-
&-loading-fixed-width {
|
|
129
|
-
transition: none;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
133
|
&-two-chinese-chars > *:not(svg) {
|
|
133
134
|
margin-right: -0.3em;
|
|
134
135
|
letter-spacing: 0.3em;
|
|
@@ -324,6 +325,11 @@ $token-var-aliases: (
|
|
|
324
325
|
}
|
|
325
326
|
}
|
|
326
327
|
|
|
328
|
+
// 按钮组是连体控件,单个按钮按压形变会与相邻按钮产生缝隙,故禁用形变
|
|
329
|
+
.#{$btn-prefix-cls}:active {
|
|
330
|
+
transform: none;
|
|
331
|
+
}
|
|
332
|
+
|
|
327
333
|
.#{$btn-prefix-cls}:first-child {
|
|
328
334
|
border-top-right-radius: 0;
|
|
329
335
|
border-bottom-right-radius: 0;
|
|
@@ -344,3 +350,15 @@ $token-var-aliases: (
|
|
|
344
350
|
color: rgb(255 255 255 / 30%);
|
|
345
351
|
}
|
|
346
352
|
}
|
|
353
|
+
|
|
354
|
+
// 减少动态偏好:去掉按压形变(位移),保留颜色过渡(有助于理解状态);
|
|
355
|
+
// 放慢加载图标旋转,避免快速循环带来的不适,但仍可表达加载态
|
|
356
|
+
@media (prefers-reduced-motion: reduce) {
|
|
357
|
+
.#{$btn-prefix-cls}:active {
|
|
358
|
+
transform: none;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.#{$btn-prefix-cls} .#{theme.$prefix}-icon-loading {
|
|
362
|
+
animation-duration: 3s;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
2
|
+
import { PerformantEllipsis } from "../../ellipsis/index.js";
|
|
2
3
|
import { calendarInjectionKey } from "../context.js";
|
|
3
4
|
import { minutesToPercentage } from "../utils/conversions.js";
|
|
4
|
-
import { PerformantEllipsis } from "../../ellipsis/index.js";
|
|
5
5
|
import { Transition, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, mergeProps, normalizeClass, onBeforeUnmount, onMounted, openBlock, reactive, ref, renderSlot, shallowRef, toDisplayString, toHandlers, unref, watch, withCtx, withModifiers } from "vue";
|
|
6
6
|
//#region components/calendar/components/event.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var _hoisted_1 = ["draggable"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { PerformantEllipsis } from "../../ellipsis/index.js";
|
|
1
2
|
import { calendarElInjectionKey, calendarInjectionKey } from "../context.js";
|
|
2
3
|
import { weekdays } from "../core/config.js";
|
|
3
|
-
import { PerformantEllipsis } from "../../ellipsis/index.js";
|
|
4
4
|
import cell_default from "./cell.js";
|
|
5
5
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, inject, mergeProps, normalizeClass, onBeforeUnmount, openBlock, ref, renderList, renderSlot, toDisplayString, unref, withCtx } from "vue";
|
|
6
6
|
//#region components/calendar/components/headings-bar.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -56,7 +56,7 @@ $calendar-css-prefix: string.unquote('--#{theme.$prefix}-calendar');
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
[class*='-calendar-delete-btn-enter-from'] {
|
|
59
|
-
transform: scale(0) rotate(-90deg);
|
|
59
|
+
transform: scale(0.5) rotate(-90deg);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
[class*='-calendar-delete-btn-enter-to'] {
|
|
@@ -64,6 +64,6 @@ $calendar-css-prefix: string.unquote('--#{theme.$prefix}-calendar');
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
[class*='-calendar-delete-btn-leave-active'] {
|
|
67
|
-
transform: scale(0);
|
|
67
|
+
transform: scale(0.5);
|
|
68
68
|
transition: 0.3s ease-in-out;
|
|
69
69
|
}
|
|
@@ -1626,7 +1626,7 @@
|
|
|
1626
1626
|
}
|
|
1627
1627
|
|
|
1628
1628
|
[class*=-calendar-delete-btn-enter-from] {
|
|
1629
|
-
transform: scale(0) rotate(-90deg);
|
|
1629
|
+
transform: scale(0.5) rotate(-90deg);
|
|
1630
1630
|
}
|
|
1631
1631
|
|
|
1632
1632
|
[class*=-calendar-delete-btn-enter-to] {
|
|
@@ -1634,6 +1634,6 @@
|
|
|
1634
1634
|
}
|
|
1635
1635
|
|
|
1636
1636
|
[class*=-calendar-delete-btn-leave-active] {
|
|
1637
|
-
transform: scale(0);
|
|
1637
|
+
transform: scale(0.5);
|
|
1638
1638
|
transition: 0.3s ease-in-out;
|
|
1639
1639
|
}
|
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
|
}
|
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
|
}
|
|
@@ -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,11 +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";
|
|
4
|
+
import { useI18n } from "../locale/index.js";
|
|
5
|
+
import IconLeft from "../icon/icon-left/index.js";
|
|
3
6
|
import IconRight from "../icon/icon-right/index.js";
|
|
4
7
|
import IconDown from "../icon/icon-down/index.js";
|
|
5
|
-
import IconLeft from "../icon/icon-left/index.js";
|
|
6
8
|
import IconUp from "../icon/icon-up/index.js";
|
|
7
9
|
import { computed, createBlock, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, unref } from "vue";
|
|
8
10
|
//#region components/carousel/carousel-arrow.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
+
var _hoisted_1 = ["aria-label"];
|
|
12
|
+
var _hoisted_2 = ["aria-label"];
|
|
9
13
|
var carousel_arrow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Arrow" }), {}, {
|
|
10
14
|
__name: "carousel-arrow",
|
|
11
15
|
props: {
|
|
@@ -22,6 +26,7 @@ var carousel_arrow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
22
26
|
setup(__props, { emit: __emit }) {
|
|
23
27
|
const props = __props;
|
|
24
28
|
const emit = __emit;
|
|
29
|
+
const { t } = useI18n();
|
|
25
30
|
const prefixCls = getPrefixCls("carousel");
|
|
26
31
|
const onPreviousClick = (ev) => {
|
|
27
32
|
emit("previousClick", ev);
|
|
@@ -29,15 +34,30 @@ var carousel_arrow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
29
34
|
const onNextClick = (ev) => {
|
|
30
35
|
emit("nextClick", ev);
|
|
31
36
|
};
|
|
37
|
+
const onKeydown = (e, which) => {
|
|
38
|
+
if (isActivationKey(e)) {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
if (which === "previous") emit("previousClick", e);
|
|
41
|
+
else emit("nextClick", e);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
32
44
|
const cls = computed(() => [`${prefixCls}-arrow`, { [`${prefixCls}-arrow-hover`]: props.showArrow === "hover" }]);
|
|
33
45
|
return (_ctx, _cache) => {
|
|
34
46
|
return openBlock(), createElementBlock("div", { class: normalizeClass(cls.value) }, [createElementVNode("div", {
|
|
47
|
+
role: "button",
|
|
48
|
+
tabindex: "0",
|
|
49
|
+
"aria-label": unref(t)("a11y.prevSlide"),
|
|
35
50
|
class: normalizeClass(`${unref(prefixCls)}-arrow-${__props.direction === "vertical" ? "top" : "left"}`),
|
|
36
|
-
onClick: onPreviousClick
|
|
37
|
-
|
|
51
|
+
onClick: onPreviousClick,
|
|
52
|
+
onKeydown: _cache[0] || (_cache[0] = (e) => onKeydown(e, "previous"))
|
|
53
|
+
}, [__props.direction === "horizontal" ? (openBlock(), createBlock(unref(IconLeft), { key: 0 })) : (openBlock(), createBlock(unref(IconUp), { key: 1 }))], 42, _hoisted_1), createElementVNode("div", {
|
|
54
|
+
role: "button",
|
|
55
|
+
tabindex: "0",
|
|
56
|
+
"aria-label": unref(t)("a11y.nextSlide"),
|
|
38
57
|
class: normalizeClass(`${unref(prefixCls)}-arrow-${__props.direction === "vertical" ? "bottom" : "right"}`),
|
|
39
|
-
onClick: onNextClick
|
|
40
|
-
|
|
58
|
+
onClick: onNextClick,
|
|
59
|
+
onKeydown: _cache[1] || (_cache[1] = (e) => onKeydown(e, "next"))
|
|
60
|
+
}, [__props.direction === "horizontal" ? (openBlock(), createBlock(unref(IconRight), { key: 0 })) : (openBlock(), createBlock(unref(IconDown), { key: 1 }))], 42, _hoisted_2)], 2);
|
|
41
61
|
};
|
|
42
62
|
}
|
|
43
63
|
}));
|
|
@@ -1,8 +1,16 @@
|
|
|
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";
|
|
4
|
+
import { useI18n } from "../locale/index.js";
|
|
3
5
|
import { Fragment, computed, createElementBlock, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, renderList, unref } from "vue";
|
|
4
6
|
//#region components/carousel/carousel-indicator.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var _hoisted_1 = ["
|
|
7
|
+
var _hoisted_1 = ["aria-label"];
|
|
8
|
+
var _hoisted_2 = [
|
|
9
|
+
"data-index",
|
|
10
|
+
"aria-label",
|
|
11
|
+
"aria-current",
|
|
12
|
+
"onKeydown"
|
|
13
|
+
];
|
|
6
14
|
var carousel_indicator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Indicator" }), {}, {
|
|
7
15
|
__name: "carousel-indicator",
|
|
8
16
|
props: {
|
|
@@ -31,6 +39,7 @@ var carousel_indicator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
|
|
|
31
39
|
setup(__props, { emit: __emit }) {
|
|
32
40
|
const props = __props;
|
|
33
41
|
const emit = __emit;
|
|
42
|
+
const { t } = useI18n();
|
|
34
43
|
const prefixCls = getPrefixCls("carousel-indicator");
|
|
35
44
|
const onClick = (event) => {
|
|
36
45
|
event.preventDefault();
|
|
@@ -47,6 +56,12 @@ var carousel_indicator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
|
|
|
47
56
|
if (!Number.isNaN(index) && index !== props.activeIndex) emit("select", index);
|
|
48
57
|
}
|
|
49
58
|
};
|
|
59
|
+
const onItemKeydown = (event, index) => {
|
|
60
|
+
if (isActivationKey(event) && index !== props.activeIndex) {
|
|
61
|
+
event.preventDefault();
|
|
62
|
+
emit("select", index);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
50
65
|
const eventHandlers = computed(() => {
|
|
51
66
|
return props.trigger === "click" ? { onClick } : { onMouseover: onClick };
|
|
52
67
|
});
|
|
@@ -66,13 +81,19 @@ var carousel_indicator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
|
|
|
66
81
|
return openBlock(), createElementBlock("div", mergeProps({ class: cls.value }, eventHandlers.value), [__props.type === "slider" ? (openBlock(), createElementBlock("span", {
|
|
67
82
|
key: 0,
|
|
68
83
|
style: normalizeStyle(sliderStyle.value),
|
|
84
|
+
"aria-label": unref(t)("a11y.slideOf", __props.activeIndex + 1, __props.count),
|
|
69
85
|
class: normalizeClass([`${unref(prefixCls)}-item`, `${unref(prefixCls)}-item-active`])
|
|
70
|
-
}, null,
|
|
86
|
+
}, null, 14, _hoisted_1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(Array(__props.count), (_, index) => {
|
|
71
87
|
return openBlock(), createElementBlock("span", {
|
|
72
88
|
key: index,
|
|
89
|
+
role: "button",
|
|
90
|
+
tabindex: "0",
|
|
73
91
|
"data-index": index,
|
|
74
|
-
|
|
75
|
-
|
|
92
|
+
"aria-label": unref(t)("a11y.goToSlide", index + 1),
|
|
93
|
+
"aria-current": index === __props.activeIndex ? "true" : void 0,
|
|
94
|
+
class: normalizeClass([`${unref(prefixCls)}-item`, { [`${unref(prefixCls)}-item-active`]: index === __props.activeIndex }]),
|
|
95
|
+
onKeydown: ($event) => onItemKeydown($event, index)
|
|
96
|
+
}, null, 42, _hoisted_2);
|
|
76
97
|
}), 128))], 16);
|
|
77
98
|
};
|
|
78
99
|
}
|