@sdata/web-vue 3.14.0 → 3.16.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 +44 -3
- package/dist/sd.min.css +1 -1
- package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/_components/select-view/select-view.js +3 -1
- package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +5 -2
- 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 +520 -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 +60 -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 +54 -0
- package/es/basic-crud-table/style/token.scss +8 -0
- package/es/basic-crud-table/types.d.ts +70 -0
- package/es/breadcrumb/breadcrumb-item.js +4 -2
- package/es/breadcrumb/breadcrumb.js +3 -1
- 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/card/card.d.ts +1 -1
- package/es/card/index.d.ts +3 -3
- package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +9 -5
- package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/carousel/carousel.js +3 -1
- package/es/cascader/cascader-option.js +1 -1
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/color-picker/color-picker.js +6 -5
- package/es/color-picker/panel.d.ts +2 -2
- package/es/color-picker/panel.js +5 -4
- package/es/components.d.ts +1 -0
- package/es/config-provider/config-provider.vue.d.ts +7 -1
- package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +7 -1
- package/es/config-provider/context.d.ts +4 -0
- package/es/config-provider/index.d.ts +25 -15
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/hooks/use-provide-datepicker-transform.js +1 -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 +3 -3
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +4 -3
- package/es/dropdown/dropdown-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +13 -9
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/form/index.js +1 -1
- 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_vue_type_script_setup_true_lang.js +1 -1
- package/es/index.css +44 -3
- package/es/index.d.ts +2 -0
- package/es/index.js +55 -54
- package/es/index.scss +1 -0
- package/es/input/input.js +3 -1
- package/es/input-number/input-number.js +8 -6
- package/es/json-form/style/index.css +0 -3
- package/es/json-form/style/index.scss +4 -3
- package/es/json-form/utils.js +5 -5
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +9 -7
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +1 -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/menu/item.d.ts +1 -1
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +4 -3
- package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +8 -2
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +5 -3
- package/es/pagination/page-options.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/pagination/pagination.js +1 -1
- package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/rate/rate.js +3 -1
- package/es/sd-vue.js +54 -52
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/select/select.js +3 -3
- package/es/statistic/statistic.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/table/index.d.ts +4 -4
- package/es/table/table-operation-td.js +3 -3
- package/es/table/table-th.d.ts +1 -1
- package/es/table/table-th.js +2 -2
- package/es/table/table.d.ts +1 -1
- package/es/table/table.js +2 -2
- package/es/tabs/tabs-button.js +1 -1
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +8 -2
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +2 -2
- 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/transfer/transfer-list-item.js +3 -1
- 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 +1 -1
- package/es/tree/node-switcher.vue_vue_type_script_lang.js +1 -1
- package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +8 -2
- package/es/upload/upload-list-item.js +1 -1
- package/es/upload/upload-picture-item.js +5 -3
- package/es/verification-code/verification-code.js +4 -2
- package/json/vetur-attributes.json +3 -0
- package/json/vetur-tags.json +4 -0
- package/json/web-types.json +15 -1
- package/package.json +1 -1
- package/es/color-picker/colors.d.ts +0 -1
- package/es/color-picker/colors.js +0 -27
|
@@ -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,60 @@
|
|
|
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-full-height {
|
|
26
|
+
height: 100%;
|
|
27
|
+
min-height: 0;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
}
|
|
30
|
+
.sd-basic-crud-table-full-height .sd-basic-crud-table-body {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex: 1 1 auto;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
min-height: 0;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
}
|
|
37
|
+
.sd-basic-crud-table-full-height .sd-basic-crud-table-body > .sd-table {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex: 1 1 auto;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
min-height: 0;
|
|
42
|
+
}
|
|
43
|
+
.sd-basic-crud-table-header {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
gap: 8px;
|
|
47
|
+
}
|
|
48
|
+
.sd-basic-crud-table-header-actions {
|
|
49
|
+
display: flex;
|
|
50
|
+
justify-content: flex-end;
|
|
51
|
+
}
|
|
52
|
+
.sd-basic-crud-table-title {
|
|
53
|
+
margin: 0;
|
|
54
|
+
color: var(--sd-color-text-1);
|
|
55
|
+
font-size: 24px;
|
|
56
|
+
}
|
|
57
|
+
.sd-basic-crud-table-body {
|
|
58
|
+
width: 100%;
|
|
59
|
+
min-width: 0;
|
|
60
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
&-full-height {
|
|
13
|
+
height: 100%;
|
|
14
|
+
min-height: 0;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-full-height &-body {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex: 1 1 auto;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
min-height: 0;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-full-height &-body > .#{theme.$prefix}-table {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex: 1 1 auto;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
min-height: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&-header {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: $basic-crud-table-gap;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&-header-actions {
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: flex-end;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&-title {
|
|
45
|
+
margin: 0;
|
|
46
|
+
color: $basic-crud-table-title-color;
|
|
47
|
+
font-size: $basic-crud-table-title-size;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&-body {
|
|
51
|
+
width: 100%;
|
|
52
|
+
min-width: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -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,70 @@
|
|
|
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
|
+
fullHeight?: boolean;
|
|
25
|
+
showCreate?: boolean;
|
|
26
|
+
openCreateModal?: boolean;
|
|
27
|
+
showEdit?: boolean;
|
|
28
|
+
showDelete?: boolean;
|
|
29
|
+
showToolbar?: boolean;
|
|
30
|
+
showHeader?: boolean;
|
|
31
|
+
showTitle?: boolean;
|
|
32
|
+
showActionColumn?: boolean;
|
|
33
|
+
fetchExcludeEmptyValues?: boolean;
|
|
34
|
+
fetchTableOnMounted?: boolean;
|
|
35
|
+
actionWidth?: number;
|
|
36
|
+
fetchTableApi?: (params: UnknownRecord) => MaybePromise<unknown>;
|
|
37
|
+
tableDataTransformer?: (data: unknown) => MaybePromise<BasicCrudTableDataResult<TRow>>;
|
|
38
|
+
createApi?: (data: UnknownRecord) => MaybePromise<unknown>;
|
|
39
|
+
updateApi?: (data: UnknownRecord) => MaybePromise<unknown>;
|
|
40
|
+
detailApi?: (row: TRow) => MaybePromise<UnknownRecord>;
|
|
41
|
+
valueTransformer?: (data: UnknownRecord) => UnknownRecord;
|
|
42
|
+
beforeModalSubmit?: (context: BasicCrudTableModalSubmitContext<TRow>) => MaybePromise<boolean | void>;
|
|
43
|
+
deleteContent?: string | ((row: TRow) => MaybePromise<string>);
|
|
44
|
+
deleteApi?: (row: TRow) => MaybePromise<unknown>;
|
|
45
|
+
beforeDelete?: (row: TRow) => MaybePromise<boolean | void>;
|
|
46
|
+
deleteNameKey?: string;
|
|
47
|
+
}
|
|
48
|
+
export type BasicCrudTableModalSubmitContext<TRow extends TableData = TableData> = {
|
|
49
|
+
type: 'create' | 'edit';
|
|
50
|
+
row?: TRow;
|
|
51
|
+
model: UnknownRecord;
|
|
52
|
+
};
|
|
53
|
+
export type BasicCrudTableActionSlotProps<TRow extends TableData = TableData> = {
|
|
54
|
+
record: TRow;
|
|
55
|
+
column: TableColumnData;
|
|
56
|
+
rowIndex: number;
|
|
57
|
+
};
|
|
58
|
+
export type BasicCrudTableModalSlotProps<TRow extends TableData = TableData> = {
|
|
59
|
+
type: 'create' | 'edit';
|
|
60
|
+
row?: TRow;
|
|
61
|
+
model: UnknownRecord;
|
|
62
|
+
};
|
|
63
|
+
export type InferBasicCrudTableRowFromValue<TValue> = TValue extends readonly (infer TItem)[] ? TItem : TValue extends {
|
|
64
|
+
data: infer TData;
|
|
65
|
+
} ? InferBasicCrudTableRowFromValue<TData> : TValue extends {
|
|
66
|
+
results: infer TResults;
|
|
67
|
+
} ? InferBasicCrudTableRowFromValue<TResults> : never;
|
|
68
|
+
type AwaitedReturn<T> = T extends (...args: never[]) => infer TResult ? Awaited<TResult> : never;
|
|
69
|
+
export type InferBasicCrudTableRow<TFetchTableApi, TTableDataTransformer = undefined> = TTableDataTransformer extends (...args: never[]) => unknown ? InferBasicCrudTableRowFromValue<AwaitedReturn<TTableDataTransformer>> : InferBasicCrudTableRowFromValue<AwaitedReturn<TFetchTableApi>>;
|
|
70
|
+
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,7 +107,7 @@ var breadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
|
105
107
|
return () => {
|
|
106
108
|
return createVNode("div", {
|
|
107
109
|
"role": "list",
|
|
108
|
-
"aria-label": "
|
|
110
|
+
"aria-label": t("a11y.breadcrumb"),
|
|
109
111
|
"class": prefixCls
|
|
110
112
|
}, [slots.default ? renderByChildren() : renderByRoutes()]);
|
|
111
113
|
};
|
|
@@ -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
|
package/es/card/card.d.ts
CHANGED
|
@@ -82,8 +82,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
82
82
|
bordered: boolean;
|
|
83
83
|
hoverable: boolean;
|
|
84
84
|
bodyStyle: CSSProperties;
|
|
85
|
-
headerStyle: CSSProperties;
|
|
86
85
|
fullHeight: boolean;
|
|
86
|
+
headerStyle: CSSProperties;
|
|
87
87
|
}, {}, {
|
|
88
88
|
Spin: {
|
|
89
89
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
package/es/card/index.d.ts
CHANGED
|
@@ -48,8 +48,8 @@ declare const Card: {
|
|
|
48
48
|
bordered: boolean;
|
|
49
49
|
hoverable: boolean;
|
|
50
50
|
bodyStyle: import("vue").CSSProperties;
|
|
51
|
-
headerStyle: import("vue").CSSProperties;
|
|
52
51
|
fullHeight: boolean;
|
|
52
|
+
headerStyle: import("vue").CSSProperties;
|
|
53
53
|
}, true, {}, {}, {
|
|
54
54
|
Spin: {
|
|
55
55
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -455,8 +455,8 @@ declare const Card: {
|
|
|
455
455
|
bordered: boolean;
|
|
456
456
|
hoverable: boolean;
|
|
457
457
|
bodyStyle: import("vue").CSSProperties;
|
|
458
|
-
headerStyle: import("vue").CSSProperties;
|
|
459
458
|
fullHeight: boolean;
|
|
459
|
+
headerStyle: import("vue").CSSProperties;
|
|
460
460
|
}>;
|
|
461
461
|
__isFragment?: never;
|
|
462
462
|
__isTeleport?: never;
|
|
@@ -505,8 +505,8 @@ declare const Card: {
|
|
|
505
505
|
bordered: boolean;
|
|
506
506
|
hoverable: boolean;
|
|
507
507
|
bodyStyle: import("vue").CSSProperties;
|
|
508
|
-
headerStyle: import("vue").CSSProperties;
|
|
509
508
|
fullHeight: boolean;
|
|
509
|
+
headerStyle: import("vue").CSSProperties;
|
|
510
510
|
}, {}, string, {}, {
|
|
511
511
|
Spin: {
|
|
512
512
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,12 +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
3
|
import { isActivationKey } from "../_utils/keyboard.js";
|
|
4
|
+
import { useI18n } from "../locale/index.js";
|
|
5
|
+
import IconLeft from "../icon/icon-left/index.js";
|
|
4
6
|
import IconRight from "../icon/icon-right/index.js";
|
|
5
7
|
import IconDown from "../icon/icon-down/index.js";
|
|
6
|
-
import IconLeft from "../icon/icon-left/index.js";
|
|
7
8
|
import IconUp from "../icon/icon-up/index.js";
|
|
8
9
|
import { computed, createBlock, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, unref } from "vue";
|
|
9
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"];
|
|
10
13
|
var carousel_arrow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Arrow" }), {}, {
|
|
11
14
|
__name: "carousel-arrow",
|
|
12
15
|
props: {
|
|
@@ -23,6 +26,7 @@ var carousel_arrow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
23
26
|
setup(__props, { emit: __emit }) {
|
|
24
27
|
const props = __props;
|
|
25
28
|
const emit = __emit;
|
|
29
|
+
const { t } = useI18n();
|
|
26
30
|
const prefixCls = getPrefixCls("carousel");
|
|
27
31
|
const onPreviousClick = (ev) => {
|
|
28
32
|
emit("previousClick", ev);
|
|
@@ -42,18 +46,18 @@ var carousel_arrow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
42
46
|
return openBlock(), createElementBlock("div", { class: normalizeClass(cls.value) }, [createElementVNode("div", {
|
|
43
47
|
role: "button",
|
|
44
48
|
tabindex: "0",
|
|
45
|
-
"aria-label": "
|
|
49
|
+
"aria-label": unref(t)("a11y.prevSlide"),
|
|
46
50
|
class: normalizeClass(`${unref(prefixCls)}-arrow-${__props.direction === "vertical" ? "top" : "left"}`),
|
|
47
51
|
onClick: onPreviousClick,
|
|
48
52
|
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 }))],
|
|
53
|
+
}, [__props.direction === "horizontal" ? (openBlock(), createBlock(unref(IconLeft), { key: 0 })) : (openBlock(), createBlock(unref(IconUp), { key: 1 }))], 42, _hoisted_1), createElementVNode("div", {
|
|
50
54
|
role: "button",
|
|
51
55
|
tabindex: "0",
|
|
52
|
-
"aria-label": "
|
|
56
|
+
"aria-label": unref(t)("a11y.nextSlide"),
|
|
53
57
|
class: normalizeClass(`${unref(prefixCls)}-arrow-${__props.direction === "vertical" ? "bottom" : "right"}`),
|
|
54
58
|
onClick: onNextClick,
|
|
55
59
|
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 }))],
|
|
60
|
+
}, [__props.direction === "horizontal" ? (openBlock(), createBlock(unref(IconRight), { key: 0 })) : (openBlock(), createBlock(unref(IconDown), { key: 1 }))], 42, _hoisted_2)], 2);
|
|
57
61
|
};
|
|
58
62
|
}
|
|
59
63
|
}));
|
|
@@ -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 { isActivationKey } from "../_utils/keyboard.js";
|
|
4
|
+
import { useI18n } from "../locale/index.js";
|
|
4
5
|
import { Fragment, computed, createElementBlock, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, renderList, unref } from "vue";
|
|
5
6
|
//#region components/carousel/carousel-indicator.vue?vue&type=script&setup=true&lang.ts
|
|
6
7
|
var _hoisted_1 = ["aria-label"];
|
|
@@ -38,6 +39,7 @@ var carousel_indicator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
|
|
|
38
39
|
setup(__props, { emit: __emit }) {
|
|
39
40
|
const props = __props;
|
|
40
41
|
const emit = __emit;
|
|
42
|
+
const { t } = useI18n();
|
|
41
43
|
const prefixCls = getPrefixCls("carousel-indicator");
|
|
42
44
|
const onClick = (event) => {
|
|
43
45
|
event.preventDefault();
|
|
@@ -79,7 +81,7 @@ var carousel_indicator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
|
|
|
79
81
|
return openBlock(), createElementBlock("div", mergeProps({ class: cls.value }, eventHandlers.value), [__props.type === "slider" ? (openBlock(), createElementBlock("span", {
|
|
80
82
|
key: 0,
|
|
81
83
|
style: normalizeStyle(sliderStyle.value),
|
|
82
|
-
"aria-label":
|
|
84
|
+
"aria-label": unref(t)("a11y.slideOf", __props.activeIndex + 1, __props.count),
|
|
83
85
|
class: normalizeClass([`${unref(prefixCls)}-item`, `${unref(prefixCls)}-item-active`])
|
|
84
86
|
}, null, 14, _hoisted_1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(Array(__props.count), (_, index) => {
|
|
85
87
|
return openBlock(), createElementBlock("span", {
|
|
@@ -87,7 +89,7 @@ var carousel_indicator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
|
|
|
87
89
|
role: "button",
|
|
88
90
|
tabindex: "0",
|
|
89
91
|
"data-index": index,
|
|
90
|
-
"aria-label":
|
|
92
|
+
"aria-label": unref(t)("a11y.goToSlide", index + 1),
|
|
91
93
|
"aria-current": index === __props.activeIndex ? "true" : void 0,
|
|
92
94
|
class: normalizeClass([`${unref(prefixCls)}-item`, { [`${unref(prefixCls)}-item-active`]: index === __props.activeIndex }]),
|
|
93
95
|
onKeydown: ($event) => onItemKeydown($event, index)
|
|
@@ -1,12 +1,14 @@
|
|
|
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 { useI18n } from "../locale/index.js";
|
|
3
4
|
import { carouselInjectionKey } from "./context.js";
|
|
4
|
-
import { computed, createElementBlock, defineComponent, getCurrentInstance, inject, normalizeClass, normalizeStyle, openBlock, renderSlot } from "vue";
|
|
5
|
+
import { computed, createElementBlock, defineComponent, getCurrentInstance, inject, normalizeClass, normalizeStyle, openBlock, renderSlot, unref } from "vue";
|
|
5
6
|
//#region components/carousel/carousel-item.vue?vue&type=script&setup=true&lang.ts
|
|
6
7
|
var _hoisted_1 = ["aria-label", "aria-hidden"];
|
|
7
8
|
var carousel_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "CarouselItem" }), {}, {
|
|
8
9
|
__name: "carousel-item",
|
|
9
10
|
setup(__props) {
|
|
11
|
+
const { t } = useI18n();
|
|
10
12
|
const prefixCls = getPrefixCls("carousel-item");
|
|
11
13
|
const instance = getCurrentInstance();
|
|
12
14
|
const context = inject(carouselInjectionKey, {});
|
|
@@ -45,7 +47,7 @@ var carousel_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
45
47
|
return openBlock(), createElementBlock("div", {
|
|
46
48
|
role: "group",
|
|
47
49
|
"aria-roledescription": "slide",
|
|
48
|
-
"aria-label":
|
|
50
|
+
"aria-label": unref(t)("a11y.slideOf", index.value + 1, slideCount.value),
|
|
49
51
|
"aria-hidden": !isCurrent.value,
|
|
50
52
|
class: normalizeClass(cls.value),
|
|
51
53
|
style: normalizeStyle(animationStyle.value)
|
package/es/carousel/carousel.js
CHANGED
|
@@ -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, isObject } from "../_utils/is.js";
|
|
4
4
|
import { KEYBOARD_KEY } from "../_utils/keyboard.js";
|
|
5
|
+
import { useI18n } from "../locale/index.js";
|
|
5
6
|
import { useChildrenComponents } from "../_hooks/use-children-components.js";
|
|
6
7
|
import carousel_arrow_default from "./carousel-arrow.js";
|
|
7
8
|
import carousel_indicator_default from "./carousel-indicator.js";
|
|
@@ -142,6 +143,7 @@ var carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
142
143
|
},
|
|
143
144
|
setup(props, { emit, slots }) {
|
|
144
145
|
const { current, animationName, moveSpeed, transitionTimingFunction } = toRefs(props);
|
|
146
|
+
const { t } = useI18n();
|
|
145
147
|
const prefixCls = getPrefixCls("carousel");
|
|
146
148
|
const isPause = ref(false);
|
|
147
149
|
const previousIndex = ref();
|
|
@@ -260,7 +262,7 @@ var carousel_default = /* @__PURE__ */ defineComponent({
|
|
|
260
262
|
"class": cls.value,
|
|
261
263
|
"role": "region",
|
|
262
264
|
"aria-roledescription": "carousel",
|
|
263
|
-
"aria-label": "
|
|
265
|
+
"aria-label": t("a11y.carousel"),
|
|
264
266
|
"tabindex": "0",
|
|
265
267
|
"onKeydown": onKeydown
|
|
266
268
|
}, eventHandlers.value), [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
2
2
|
import { isFunction } from "../_utils/is.js";
|
|
3
3
|
import IconLoading from "../icon/icon-loading/index.js";
|
|
4
|
-
import IconRight from "../icon/icon-right/index.js";
|
|
5
4
|
import { PerformantEllipsis } from "../ellipsis/index.js";
|
|
5
|
+
import IconRight from "../icon/icon-right/index.js";
|
|
6
6
|
import Checkbox from "../checkbox/index.js";
|
|
7
7
|
import Radio from "../radio/index.js";
|
|
8
8
|
import { cascaderInjectionKey } from "./context.js";
|
|
@@ -8,14 +8,14 @@ import { resolveDropdownVirtualListProps } from "../_utils/virtual-dropdown.js";
|
|
|
8
8
|
import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
9
9
|
import Trigger from "../trigger/index.js";
|
|
10
10
|
import Tooltip from "../tooltip/index.js";
|
|
11
|
+
import { debounce } from "../_utils/debounce.js";
|
|
12
|
+
import select_view_default from "../_components/select-view/select-view.js";
|
|
13
|
+
import { useAllowSearch } from "../_hooks/use-allow-search.js";
|
|
11
14
|
import { useTrigger } from "../_hooks/use-trigger.js";
|
|
12
15
|
import { cascaderInjectionKey } from "./context.js";
|
|
13
16
|
import { getCheckedStatus, getLeafOptionInfos, getLeafOptionKeys, getOptionInfos, getOptionLabel, getValidValues, getValueKey } from "./utils.js";
|
|
14
17
|
import base_cascader_panel_default from "./base-cascader-panel.js";
|
|
15
18
|
import { useSelectedPath } from "./hooks/use-selected-path.js";
|
|
16
|
-
import select_view_default from "../_components/select-view/select-view.js";
|
|
17
|
-
import { useAllowSearch } from "../_hooks/use-allow-search.js";
|
|
18
|
-
import { debounce } from "../_utils/debounce.js";
|
|
19
19
|
import cascader_search_panel_default from "./cascader-search-panel.js";
|
|
20
20
|
import { computed, createBlock, createSlots, createVNode, defineComponent, getCurrentInstance, guardReactiveProps, mergeProps, normalizeProps, openBlock, provide, reactive, ref, renderSlot, toRef, toRefs, unref, useAttrs, useSlots, watch, withCtx } from "vue";
|
|
21
21
|
//#region components/cascader/cascader.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
1
2
|
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
2
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
4
|
import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
4
5
|
import Trigger from "../trigger/index.js";
|
|
5
6
|
import Tooltip from "../tooltip/index.js";
|
|
6
7
|
import Input from "../input/index.js";
|
|
7
|
-
import { colors } from "./colors.js";
|
|
8
8
|
import { formatColorState, getColorBackground, getColorObject, normalizeFormat, parseColorState } from "./utils.js";
|
|
9
9
|
import panel_default from "./panel.js";
|
|
10
|
-
import { computed, createVNode, defineComponent, mergeProps, ref, toRef } from "vue";
|
|
10
|
+
import { computed, createVNode, defineComponent, inject, mergeProps, ref, toRef } from "vue";
|
|
11
11
|
//#region components/color-picker/color-picker.tsx
|
|
12
12
|
var color_picker_default = /* @__PURE__ */ defineComponent({
|
|
13
13
|
name: "ColorPicker",
|
|
@@ -139,6 +139,7 @@ var color_picker_default = /* @__PURE__ */ defineComponent({
|
|
|
139
139
|
},
|
|
140
140
|
setup(props, { emit, slots }) {
|
|
141
141
|
const prefixCls = getPrefixCls("color-picker");
|
|
142
|
+
const configProvider = inject(configProviderInjectionKey, void 0);
|
|
142
143
|
const innerValue = ref(props.defaultValue);
|
|
143
144
|
const popupVisible = ref(false);
|
|
144
145
|
const innerRecentColors = ref(Array.isArray(props.defaultRecentColors) ? props.defaultRecentColors : []);
|
|
@@ -154,9 +155,9 @@ var color_picker_default = /* @__PURE__ */ defineComponent({
|
|
|
154
155
|
return innerRecentColors.value;
|
|
155
156
|
});
|
|
156
157
|
const mergedSwatchColors = computed(() => {
|
|
157
|
-
|
|
158
|
-
if (
|
|
159
|
-
return
|
|
158
|
+
var _configProvider$color, _configProvider$color2;
|
|
159
|
+
if (props.swatchColors !== void 0) return props.swatchColors;
|
|
160
|
+
return (_configProvider$color = configProvider === null || configProvider === void 0 || (_configProvider$color2 = configProvider.colorPicker) === null || _configProvider$color2 === void 0 ? void 0 : _configProvider$color2.swatchColors) !== null && _configProvider$color !== void 0 ? _configProvider$color : [];
|
|
160
161
|
});
|
|
161
162
|
const colorState = computed(() => parseColorState(mergedValue.value, props.colorModes));
|
|
162
163
|
const triggerInputValue = computed(() => {
|
|
@@ -29,7 +29,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
29
29
|
};
|
|
30
30
|
swatchColors: {
|
|
31
31
|
type: PropType<string[] | null>;
|
|
32
|
-
default: () =>
|
|
32
|
+
default: () => never[];
|
|
33
33
|
};
|
|
34
34
|
onChange: PropType<(value: string, trigger: ColorPickerChangeTrigger) => void>;
|
|
35
35
|
onRecentColorsChange: PropType<(value: string[]) => void>;
|
|
@@ -65,7 +65,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
65
65
|
};
|
|
66
66
|
swatchColors: {
|
|
67
67
|
type: PropType<string[] | null>;
|
|
68
|
-
default: () =>
|
|
68
|
+
default: () => never[];
|
|
69
69
|
};
|
|
70
70
|
onChange: PropType<(value: string, trigger: ColorPickerChangeTrigger) => void>;
|
|
71
71
|
onRecentColorsChange: PropType<(value: string[]) => void>;
|
package/es/color-picker/panel.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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 { useI18n } from "../locale/index.js";
|
|
3
4
|
import input_group_default from "../input/input-group.js";
|
|
4
5
|
import Input from "../input/index.js";
|
|
5
|
-
import Radio from "../radio/index.js";
|
|
6
|
-
import { colors } from "./colors.js";
|
|
7
6
|
import InputNumber from "../input-number/index.js";
|
|
8
7
|
import Select from "../select/index.js";
|
|
8
|
+
import Radio from "../radio/index.js";
|
|
9
9
|
import control_bar_default from "./control-bar.js";
|
|
10
10
|
import palette_default from "./palette.js";
|
|
11
11
|
import { addGradientColor, formatColor, formatColorState, getActiveGradientPoint, getColorBackground, getColorObject, getDefaultColorState, getDefaultGradientState, getFormatInputs, getGradientThumbBackground, getLinearGradientString, normalizeFormat, parseColorState, parseFormatInputValues, removeGradientColor, round, setActiveColorHsva, setGradientColors, setGradientDegree, setGradientSelectedPoint } from "./utils.js";
|
|
@@ -151,13 +151,14 @@ var panel_default = /* @__PURE__ */ defineComponent({
|
|
|
151
151
|
},
|
|
152
152
|
swatchColors: {
|
|
153
153
|
type: Array,
|
|
154
|
-
default: () =>
|
|
154
|
+
default: () => []
|
|
155
155
|
},
|
|
156
156
|
onChange: Function,
|
|
157
157
|
onRecentColorsChange: Function,
|
|
158
158
|
onPaletteBarChange: Function
|
|
159
159
|
},
|
|
160
160
|
setup(props) {
|
|
161
|
+
const { t } = useI18n();
|
|
161
162
|
const prefixCls = getPrefixCls("color-picker");
|
|
162
163
|
const sliderRef = ref();
|
|
163
164
|
const gradientShellRef = ref();
|
|
@@ -332,7 +333,7 @@ var panel_default = /* @__PURE__ */ defineComponent({
|
|
|
332
333
|
"key": value,
|
|
333
334
|
"type": "button",
|
|
334
335
|
"class": `${prefixCls}-color-block`,
|
|
335
|
-
"aria-label":
|
|
336
|
+
"aria-label": t("a11y.selectColor", value),
|
|
336
337
|
"onClick": () => emitStateChange(parseColorState(value, props.colorModes), trigger)
|
|
337
338
|
}, [createVNode("div", {
|
|
338
339
|
"class": `${prefixCls}-block`,
|
package/es/components.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ declare module 'vue' {
|
|
|
15
15
|
SdBackTop: SDVue['BackTop'];
|
|
16
16
|
SdBorderBeam: SDVue['BorderBeam'];
|
|
17
17
|
SdBadge: SDVue['Badge'];
|
|
18
|
+
SdBasicCrudTable: SDVue['BasicCrudTable'];
|
|
18
19
|
SdBreadcrumb: SDVue['Breadcrumb'];
|
|
19
20
|
SdBreadcrumbItem: SDVue['BreadcrumbItem'];
|
|
20
21
|
SdButton: SDVue['Button'];
|
|
@@ -2,7 +2,7 @@ import type { PropType } from 'vue';
|
|
|
2
2
|
import { VirtualListProps } from '../_components/virtual-list/interface';
|
|
3
3
|
import { Size } from '../_utils/constant';
|
|
4
4
|
import { SdLang } from '../locale/interface';
|
|
5
|
-
import { ConfigProviderDatePicker, ConfigProviderDrawer, type JsonFormProviderConfig, ConfigProviderModal, ConfigProviderPagination } from './context';
|
|
5
|
+
import { ConfigProviderColorPicker, ConfigProviderDatePicker, ConfigProviderDrawer, type JsonFormProviderConfig, ConfigProviderModal, ConfigProviderPagination } from './context';
|
|
6
6
|
import { SdThemeConfig, SdThemeMode } from './theme';
|
|
7
7
|
declare var __VLS_8: {};
|
|
8
8
|
type __VLS_Slots = {} & {
|
|
@@ -66,6 +66,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
66
66
|
pagination: {
|
|
67
67
|
type: PropType<ConfigProviderPagination>;
|
|
68
68
|
};
|
|
69
|
+
colorPicker: {
|
|
70
|
+
type: PropType<ConfigProviderColorPicker>;
|
|
71
|
+
};
|
|
69
72
|
jsonForm: {
|
|
70
73
|
type: PropType<JsonFormProviderConfig>;
|
|
71
74
|
};
|
|
@@ -133,6 +136,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
133
136
|
pagination: {
|
|
134
137
|
type: PropType<ConfigProviderPagination>;
|
|
135
138
|
};
|
|
139
|
+
colorPicker: {
|
|
140
|
+
type: PropType<ConfigProviderColorPicker>;
|
|
141
|
+
};
|
|
136
142
|
jsonForm: {
|
|
137
143
|
type: PropType<JsonFormProviderConfig>;
|
|
138
144
|
};
|