@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.
Files changed (135) hide show
  1. package/dist/sd.css +44 -3
  2. package/dist/sd.min.css +1 -1
  3. package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +6 -3
  4. package/es/_components/select-view/select-view.js +3 -1
  5. package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +5 -2
  6. package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +5 -2
  7. package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +5 -2
  8. package/es/basic-crud-table/basic-crud-modal.js +5 -0
  9. package/es/basic-crud-table/basic-crud-modal.vue.d.ts +264 -0
  10. package/es/basic-crud-table/basic-crud-modal.vue_vue_type_script_setup_true_lang.js +139 -0
  11. package/es/basic-crud-table/basic-crud-table.js +5 -0
  12. package/es/basic-crud-table/basic-crud-table.vue.d.ts +935 -0
  13. package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +520 -0
  14. package/es/basic-crud-table/index.d.ts +2722 -0
  15. package/es/basic-crud-table/index.js +9 -0
  16. package/es/basic-crud-table/style/css.js +2 -0
  17. package/es/basic-crud-table/style/index.css +60 -0
  18. package/es/basic-crud-table/style/index.d.ts +2 -0
  19. package/es/basic-crud-table/style/index.js +2 -0
  20. package/es/basic-crud-table/style/index.scss +54 -0
  21. package/es/basic-crud-table/style/token.scss +8 -0
  22. package/es/basic-crud-table/types.d.ts +70 -0
  23. package/es/breadcrumb/breadcrumb-item.js +4 -2
  24. package/es/breadcrumb/breadcrumb.js +3 -1
  25. package/es/calendar/components/event.vue_vue_type_script_setup_true_lang.js +1 -1
  26. package/es/calendar/components/headings-bar.vue_vue_type_script_setup_true_lang.js +1 -1
  27. package/es/card/card.d.ts +1 -1
  28. package/es/card/index.d.ts +3 -3
  29. package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +9 -5
  30. package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +4 -2
  31. package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +4 -2
  32. package/es/carousel/carousel.js +3 -1
  33. package/es/cascader/cascader-option.js +1 -1
  34. package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +3 -3
  35. package/es/color-picker/color-picker.js +6 -5
  36. package/es/color-picker/panel.d.ts +2 -2
  37. package/es/color-picker/panel.js +5 -4
  38. package/es/components.d.ts +1 -0
  39. package/es/config-provider/config-provider.vue.d.ts +7 -1
  40. package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +7 -1
  41. package/es/config-provider/context.d.ts +4 -0
  42. package/es/config-provider/index.d.ts +25 -15
  43. package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +1 -1
  44. package/es/date-picker/hooks/use-provide-datepicker-transform.js +1 -1
  45. package/es/date-picker/panels/header.vue_vue_type_script_setup_true_lang.js +1 -1
  46. package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +3 -3
  47. package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +2 -2
  48. package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +4 -3
  49. package/es/dropdown/dropdown-button.vue_vue_type_script_setup_true_lang.js +1 -1
  50. package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +1 -1
  51. package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +1 -1
  52. package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +13 -9
  53. package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +1 -1
  54. package/es/form/index.js +1 -1
  55. package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +1 -1
  56. package/es/grid/grid-item.vue_vue_type_script_setup_true_lang.js +1 -1
  57. package/es/grid/grid-row.vue_vue_type_script_setup_true_lang.js +1 -1
  58. package/es/grid/grid.vue_vue_type_script_setup_true_lang.js +1 -1
  59. package/es/image/image.vue_vue_type_script_setup_true_lang.js +1 -1
  60. package/es/image/preview-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
  61. package/es/image/preview.vue_vue_type_script_setup_true_lang.js +1 -1
  62. package/es/index.css +44 -3
  63. package/es/index.d.ts +2 -0
  64. package/es/index.js +55 -54
  65. package/es/index.scss +1 -0
  66. package/es/input/input.js +3 -1
  67. package/es/input-number/input-number.js +8 -6
  68. package/es/json-form/style/index.css +0 -3
  69. package/es/json-form/style/index.scss +4 -3
  70. package/es/json-form/utils.js +5 -5
  71. package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +9 -7
  72. package/es/link/link.vue_vue_type_script_setup_true_lang.js +1 -1
  73. package/es/list/list.js +1 -1
  74. package/es/locale/interface.d.ts +39 -0
  75. package/es/locale/lang/ar-eg.js +38 -0
  76. package/es/locale/lang/de-de.js +38 -0
  77. package/es/locale/lang/en-us.js +38 -0
  78. package/es/locale/lang/es-es.js +38 -0
  79. package/es/locale/lang/fr-fr.js +38 -0
  80. package/es/locale/lang/id-id.js +38 -0
  81. package/es/locale/lang/it-it.js +38 -0
  82. package/es/locale/lang/ja-jp.js +38 -0
  83. package/es/locale/lang/km-kh.js +38 -0
  84. package/es/locale/lang/ko-kr.js +38 -0
  85. package/es/locale/lang/ms-my.js +38 -0
  86. package/es/locale/lang/nl-nl.js +38 -0
  87. package/es/locale/lang/pt-pt.js +38 -0
  88. package/es/locale/lang/ru-ru.js +38 -0
  89. package/es/locale/lang/th-th.js +38 -0
  90. package/es/locale/lang/vi-vn.js +38 -0
  91. package/es/locale/lang/zh-cn.js +38 -0
  92. package/es/locale/lang/zh-tw.js +38 -0
  93. package/es/menu/item.d.ts +1 -1
  94. package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +4 -3
  95. package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +8 -2
  96. package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +5 -2
  97. package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +5 -3
  98. package/es/pagination/page-options.vue_vue_type_script_setup_true_lang.js +3 -3
  99. package/es/pagination/pagination.js +1 -1
  100. package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +1 -1
  101. package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +4 -2
  102. package/es/rate/rate.js +3 -1
  103. package/es/sd-vue.js +54 -52
  104. package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +3 -1
  105. package/es/select/select.js +3 -3
  106. package/es/statistic/statistic.vue_vue_type_script_setup_true_lang.js +1 -1
  107. package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +6 -3
  108. package/es/table/index.d.ts +4 -4
  109. package/es/table/table-operation-td.js +3 -3
  110. package/es/table/table-th.d.ts +1 -1
  111. package/es/table/table-th.js +2 -2
  112. package/es/table/table.d.ts +1 -1
  113. package/es/table/table.js +2 -2
  114. package/es/tabs/tabs-button.js +1 -1
  115. package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +8 -2
  116. package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +2 -2
  117. package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +5 -2
  118. package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +2 -2
  119. package/es/toolbar/index.d.ts +3 -3
  120. package/es/toolbar/toolbar.vue.d.ts +2 -2
  121. package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +5 -5
  122. package/es/transfer/transfer-list-item.js +3 -1
  123. package/es/transfer/transfer.vue_vue_type_script_setup_true_lang.js +7 -5
  124. package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +1 -1
  125. package/es/tree/node-switcher.vue_vue_type_script_lang.js +1 -1
  126. package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +8 -2
  127. package/es/upload/upload-list-item.js +1 -1
  128. package/es/upload/upload-picture-item.js +5 -3
  129. package/es/verification-code/verification-code.js +4 -2
  130. package/json/vetur-attributes.json +3 -0
  131. package/json/vetur-tags.json +4 -0
  132. package/json/web-types.json +15 -1
  133. package/package.json +1 -1
  134. package/es/color-picker/colors.d.ts +0 -1
  135. package/es/color-picker/colors.js +0 -27
package/es/table/table.js CHANGED
@@ -10,12 +10,12 @@ import { useComponentRef } from "../_hooks/use-component-ref.js";
10
10
  import { useScrollbar } from "../_hooks/use-scrollbar.js";
11
11
  import Scrollbar from "../scrollbar/index.js";
12
12
  import Spin from "../spin/index.js";
13
- import Empty from "../empty/index.js";
14
13
  import { useChildrenComponents } from "../_hooks/use-children-components.js";
15
14
  import { debounce } from "../_utils/debounce.js";
15
+ import { getValueByPath, setValueByPath } from "../_utils/get-value-by-path.js";
16
+ import Empty from "../empty/index.js";
16
17
  import IconMinus from "../icon/icon-minus/index.js";
17
18
  import IconPlus from "../icon/icon-plus/index.js";
18
- import { getValueByPath, setValueByPath } from "../_utils/get-value-by-path.js";
19
19
  import Pagination from "../pagination/index.js";
20
20
  import { tableInjectionKey } from "./context.js";
21
21
  import { useColumnResize } from "./hooks/use-column-resize.js";
@@ -1,8 +1,8 @@
1
1
  import { getPrefixCls } from "../_utils/global-config.js";
2
2
  import icon_hover_default from "../_components/icon-hover.js";
3
+ import IconLeft from "../icon/icon-left/index.js";
3
4
  import IconRight from "../icon/icon-right/index.js";
4
5
  import IconDown from "../icon/icon-down/index.js";
5
- import IconLeft from "../icon/icon-left/index.js";
6
6
  import IconUp from "../icon/icon-up/index.js";
7
7
  import { computed, createVNode, defineComponent, isVNode } from "vue";
8
8
  //#region components/tabs/tabs-button.tsx
@@ -4,6 +4,7 @@ import { getPrefixCls } from "../_utils/global-config.js";
4
4
  import icon_hover_default from "../_components/icon-hover.js";
5
5
  import { isActivationKey } from "../_utils/keyboard.js";
6
6
  import IconClose from "../icon/icon-close/index.js";
7
+ import { useI18n } from "../locale/index.js";
7
8
  import IconLoading from "../icon/icon-loading/index.js";
8
9
  import { useSize } from "../_hooks/use-size.js";
9
10
  import Ellipsis, { PerformantEllipsis } from "../ellipsis/index.js";
@@ -180,6 +181,7 @@ var tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompon
180
181
  const props = __props;
181
182
  const emit = __emit;
182
183
  const slots = useSlots();
184
+ const { t } = useI18n();
183
185
  const prefixCls = getPrefixCls("tag");
184
186
  const { mergedSize: _mergedSize } = useSize(computed(() => props.size));
185
187
  const configCtx = inject(configProviderInjectionKey, void 0);
@@ -375,7 +377,7 @@ var tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompon
375
377
  key: 3,
376
378
  tabindex: "0",
377
379
  role: "button",
378
- "aria-label": "Close",
380
+ "aria-label": unref(t)("a11y.close"),
379
381
  prefix: unref(prefixCls),
380
382
  class: normalizeClass(`${unref(prefixCls)}-close-btn`),
381
383
  onClick: withModifiers(handleClose, ["stop"]),
@@ -383,7 +385,11 @@ var tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompon
383
385
  }, {
384
386
  default: withCtx(() => [renderSlot(_ctx.$slots, "close-icon", {}, () => [createVNode(unref(IconClose))])]),
385
387
  _: 3
386
- }, 8, ["prefix", "class"])) : createCommentVNode("", true),
388
+ }, 8, [
389
+ "aria-label",
390
+ "prefix",
391
+ "class"
392
+ ])) : createCommentVNode("", true),
387
393
  __props.loading ? (openBlock(), createElementBlock("span", {
388
394
  key: 4,
389
395
  class: normalizeClass(`${unref(prefixCls)}-loading-icon`)
@@ -6,8 +6,8 @@ import Ellipsis from "../ellipsis/index.js";
6
6
  import Tag from "../tag/index.js";
7
7
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useSlots, watch, withCtx } from "vue";
8
8
  import { createReusableTemplate } from "@vueuse/core";
9
- import { isNumber } from "es-toolkit/compat";
10
9
  import { isFunction, isString } from "es-toolkit";
10
+ import { isNumber as isNumber$1 } from "es-toolkit/compat";
11
11
  //#region components/tag-group/tag-group.vue?vue&type=script&setup=true&lang.ts
12
12
  var OVERFLOW_COUNTER_VALUE = "__sd_tag_group_more__";
13
13
  var tag_group_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "TagGroup" }), {}, {
@@ -42,7 +42,7 @@ var tag_group_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
42
42
  }
43
43
  function normalizeOption(option, index) {
44
44
  const { label = "label", value = "value" } = props.fieldNames;
45
- if (isString(option) || isNumber(option)) return {
45
+ if (isString(option) || isNumber$1(option)) return {
46
46
  key: `${String(option)}-${index}`,
47
47
  label: option,
48
48
  value: option,
@@ -6,6 +6,7 @@ import resize_observer_default from "../_components/resize-observer.js";
6
6
  import icon_hover_default from "../_components/icon-hover.js";
7
7
  import { isActivationKey } from "../_utils/keyboard.js";
8
8
  import IconClose from "../icon/icon-close/index.js";
9
+ import { useI18n } from "../locale/index.js";
9
10
  import { useAllowClear } from "../_hooks/use-allow-clear.js";
10
11
  import { useCursor } from "../_hooks/use-cursor.js";
11
12
  import { isReadonlyModificationKey, useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
@@ -22,6 +23,7 @@ var _hoisted_1 = [
22
23
  "value",
23
24
  "placeholder"
24
25
  ];
26
+ var _hoisted_2 = ["aria-label"];
25
27
  var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
26
28
  name: "Textarea",
27
29
  inheritAttrs: false
@@ -133,6 +135,7 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
133
135
  const emit = __emit;
134
136
  const attrs = useAttrs();
135
137
  const { disabled, error, modelValue, allowClear } = toRefs(props);
138
+ const { t } = useI18n();
136
139
  const prefixCls = getPrefixCls("textarea");
137
140
  const { mergedDisabled, mergedError: _mergedError, eventHandlers, formItemCtx } = useFormItem({
138
141
  disabled,
@@ -407,13 +410,13 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
407
410
  class: normalizeClass(`${unref(prefixCls)}-clear-btn`),
408
411
  role: "button",
409
412
  tabindex: "0",
410
- "aria-label": "Clear",
413
+ "aria-label": unref(t)("a11y.clear"),
411
414
  onClick: handleClear,
412
415
  onKeydown: handleClearKeydown
413
416
  }, [createVNode(icon_hover_default, null, {
414
417
  default: withCtx(() => [createVNode(unref(IconClose))]),
415
418
  _: 1
416
- })], 34)) : createCommentVNode("", true)
419
+ })], 42, _hoisted_2)) : createCommentVNode("", true)
417
420
  ], 16)]),
418
421
  _: 3
419
422
  }, 8, ["popup-visible", "content"]);
@@ -2,13 +2,13 @@ import { useFormItem } from "../_hooks/use-form-item.js";
2
2
  import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
3
3
  import { getPrefixCls } from "../_utils/global-config.js";
4
4
  import { isArray, isUndefined } from "../_utils/is.js";
5
- import { useAllowClear } from "../_hooks/use-allow-clear.js";
6
5
  import { useI18n } from "../locale/index.js";
6
+ import { useAllowClear } from "../_hooks/use-allow-clear.js";
7
7
  import Trigger from "../trigger/index.js";
8
8
  import useState from "../_hooks/use-state.js";
9
9
  import useMergeState from "../_hooks/use-merge-state.js";
10
- import { dayjs, getDateValue, getSortedDayjsArray, isValueChange } from "../_utils/date.js";
11
10
  import input_default from "../_components/picker/input.js";
11
+ import { dayjs, getDateValue, getSortedDayjsArray, isValueChange } from "../_utils/date.js";
12
12
  import { getFormattedValue, isValidInputValue, isValidRangeValue } from "./utils/index.js";
13
13
  import useTimeFormat from "./hooks/use-time-format.js";
14
14
  import IconClockCircle from "../icon/icon-clock-circle/index.js";
@@ -10,7 +10,7 @@ declare const Toolbar: {
10
10
  "onUpdate:modelValue"?: ((value: import("./types").ToolbarModelValue) => any) | undefined;
11
11
  }>, {
12
12
  search: () => void;
13
- reset: () => void;
13
+ reset: (emitReset?: unknown) => void;
14
14
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
15
  search: (params: import("./types").ToolbarModelValue) => any;
16
16
  reset: () => any;
@@ -30,7 +30,7 @@ declare const Toolbar: {
30
30
  "onUpdate:modelValue"?: ((value: import("./types").ToolbarModelValue) => any) | undefined;
31
31
  }>, {
32
32
  search: () => void;
33
- reset: () => void;
33
+ reset: (emitReset?: unknown) => void;
34
34
  }, {}, {}, {}, {}>;
35
35
  __isFragment?: never;
36
36
  __isTeleport?: never;
@@ -43,7 +43,7 @@ declare const Toolbar: {
43
43
  "onUpdate:modelValue"?: ((value: import("./types").ToolbarModelValue) => any) | undefined;
44
44
  }>, {
45
45
  search: () => void;
46
- reset: () => void;
46
+ reset: (emitReset?: unknown) => void;
47
47
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
48
48
  search: (params: import("./types").ToolbarModelValue) => any;
49
49
  reset: () => any;
@@ -1,7 +1,7 @@
1
1
  import type { ToolbarModelValue, ToolbarProps } from './types';
2
2
  type __VLS_Props = ToolbarProps;
3
3
  declare function handleSearch(): void;
4
- declare function handleReset(): void;
4
+ declare function reset(emitReset?: unknown): void;
5
5
  type __VLS_ModelProps = {
6
6
  modelValue?: ToolbarModelValue;
7
7
  };
@@ -24,7 +24,7 @@ type __VLS_Slots = {} & {
24
24
  };
25
25
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
26
26
  search: typeof handleSearch;
27
- reset: typeof handleReset;
27
+ reset: typeof reset;
28
28
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
29
29
  search: (params: ToolbarModelValue) => any;
30
30
  reset: () => any;
@@ -3,8 +3,8 @@ import { getPrefixCls } from "../_utils/global-config.js";
3
3
  import { useResizeObserver } from "../_hooks/use-resize-observer.js";
4
4
  import Button from "../button/index.js";
5
5
  import Spin from "../spin/index.js";
6
- import IconDown from "../icon/icon-down/index.js";
7
6
  import Link from "../link/index.js";
7
+ import IconDown from "../icon/icon-down/index.js";
8
8
  import JsonForm from "../json-form/index.js";
9
9
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeModels, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useModel, withCtx, withKeys } from "vue";
10
10
  import { cloneDeep, omit } from "es-toolkit";
@@ -115,7 +115,7 @@ var toolbar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
115
115
  function handleSearch() {
116
116
  emit("search", modelValue.value);
117
117
  }
118
- function handleReset() {
118
+ function reset(emitReset = true) {
119
119
  var _formRef$value;
120
120
  const initMinusSkip = omit(initModel, __props.resetSkipKeys);
121
121
  const next = {};
@@ -123,14 +123,14 @@ var toolbar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
123
123
  for (const key of Object.keys(initMinusSkip)) next[key] = initMinusSkip[key];
124
124
  modelValue.value = next;
125
125
  (_formRef$value = formRef.value) === null || _formRef$value === void 0 || _formRef$value.clearValidate();
126
- emit("reset");
126
+ if (emitReset) emit("reset");
127
127
  }
128
128
  function toggleExpand() {
129
129
  isExpand.value = !isExpand.value;
130
130
  }
131
131
  __expose({
132
132
  search: handleSearch,
133
- reset: handleReset
133
+ reset
134
134
  });
135
135
  return (_ctx, _cache) => {
136
136
  return openBlock(), createElementBlock("div", {
@@ -181,7 +181,7 @@ var toolbar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
181
181
  })) : createCommentVNode("", true),
182
182
  __props.showReset ? (openBlock(), createBlock(unref(Button), {
183
183
  key: 1,
184
- onClick: handleReset
184
+ onClick: _cache[1] || (_cache[1] = ($event) => reset())
185
185
  }, {
186
186
  default: withCtx(() => [createTextVNode(toDisplayString(__props.resetText), 1)]),
187
187
  _: 1
@@ -2,6 +2,7 @@ import { getPrefixCls } from "../_utils/global-config.js";
2
2
  import icon_hover_default from "../_components/icon-hover.js";
3
3
  import { isActivationKey } from "../_utils/keyboard.js";
4
4
  import IconClose from "../icon/icon-close/index.js";
5
+ import { useI18n } from "../locale/index.js";
5
6
  import Checkbox from "../checkbox/index.js";
6
7
  import { transferInjectionKey } from "./context.js";
7
8
  import { computed, createVNode, defineComponent, inject } from "vue";
@@ -20,6 +21,7 @@ var transfer_list_item_default = /* @__PURE__ */ defineComponent({
20
21
  simple: Boolean
21
22
  },
22
23
  setup(props) {
24
+ const { t } = useI18n();
23
25
  const prefixCls = getPrefixCls("transfer-list-item");
24
26
  const transferCtx = inject(transferInjectionKey, void 0);
25
27
  const handleClick = () => {
@@ -63,7 +65,7 @@ var transfer_list_item_default = /* @__PURE__ */ defineComponent({
63
65
  "class": `${prefixCls}-remove-btn`,
64
66
  "role": "button",
65
67
  "tabindex": "0",
66
- "aria-label": "Remove",
68
+ "aria-label": t("a11y.remove"),
67
69
  "onClick": handleRemove,
68
70
  "onKeydown": handleRemoveKeydown
69
71
  }, [createVNode(icon_hover_default, null, { default: () => [createVNode(IconClose, null, null)] })])]);
@@ -1,9 +1,10 @@
1
1
  import { useFormItem } from "../_hooks/use-form-item.js";
2
2
  import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
3
3
  import { getPrefixCls } from "../_utils/global-config.js";
4
+ import { useI18n } from "../locale/index.js";
4
5
  import Button from "../button/index.js";
5
- import IconRight from "../icon/icon-right/index.js";
6
6
  import IconLeft from "../icon/icon-left/index.js";
7
+ import IconRight from "../icon/icon-right/index.js";
7
8
  import { transferInjectionKey } from "./context.js";
8
9
  import transfer_view_default from "./transfer-view.js";
9
10
  import { computed, createBlock, createCommentVNode, createElementBlock, createSlots, createVNode, defineComponent, guardReactiveProps, normalizeClass, normalizeProps, openBlock, provide, reactive, ref, renderSlot, toRef, unref, useSlots, withCtx } from "vue";
@@ -190,6 +191,7 @@ var transfer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
190
191
  */
191
192
  const slots = useSlots();
192
193
  const { mergedDisabled, eventHandlers } = useFormItem({ disabled: toRef(props, "disabled") });
194
+ const { t } = useI18n();
193
195
  const prefixCls = getPrefixCls("transfer");
194
196
  const _target = ref(props.defaultValue);
195
197
  const computedTarget = computed(() => {
@@ -312,7 +314,7 @@ var transfer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
312
314
  class: normalizeClass([`${unref(prefixCls)}-operations`])
313
315
  }, [createVNode(unref(Button), {
314
316
  tabindex: "-1",
315
- "aria-label": "Move selected right",
317
+ "aria-label": unref(t)("a11y.moveSelectedRight"),
316
318
  size: "small",
317
319
  shape: "round",
318
320
  disabled: dataInfo.value.sourceInfo.validSelected.length === 0,
@@ -320,10 +322,10 @@ var transfer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
320
322
  }, {
321
323
  icon: withCtx(() => [renderSlot(_ctx.$slots, "to-target-icon", {}, () => [createVNode(unref(IconRight))])]),
322
324
  _: 3
323
- }, 8, ["disabled"]), !__props.oneWay ? (openBlock(), createBlock(unref(Button), {
325
+ }, 8, ["aria-label", "disabled"]), !__props.oneWay ? (openBlock(), createBlock(unref(Button), {
324
326
  key: 0,
325
327
  tabindex: "-1",
326
- "aria-label": "Move selected left",
328
+ "aria-label": unref(t)("a11y.moveSelectedLeft"),
327
329
  size: "small",
328
330
  shape: "round",
329
331
  disabled: dataInfo.value.targetInfo.validSelected.length === 0,
@@ -331,7 +333,7 @@ var transfer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
331
333
  }, {
332
334
  icon: withCtx(() => [renderSlot(_ctx.$slots, "to-source-icon", {}, () => [createVNode(unref(IconLeft))])]),
333
335
  _: 3
334
- }, 8, ["disabled"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true),
336
+ }, 8, ["aria-label", "disabled"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true),
335
337
  createVNode(transfer_view_default, {
336
338
  type: "target",
337
339
  class: normalizeClass(`${unref(prefixCls)}-view-target`),
@@ -3,8 +3,8 @@ import { getPrefixCls } from "../_utils/global-config.js";
3
3
  import { isFunction } from "../_utils/is.js";
4
4
  import Ellipsis, { PerformantEllipsis } from "../ellipsis/index.js";
5
5
  import Checkbox from "../checkbox/index.js";
6
- import { toArray } from "../_utils/to-array.js";
7
6
  import IconDragDotVertical from "../icon/icon-drag-dot-vertical/index.js";
7
+ import { toArray } from "../_utils/to-array.js";
8
8
  import useTreeContext from "./hooks/use-tree-context.js";
9
9
  import useDraggable$1 from "./hooks/use-draggable.js";
10
10
  import useNodeKey from "./hooks/use-node-key.js";
@@ -1,8 +1,8 @@
1
1
  import icon_hover_default from "../_components/icon-hover.js";
2
2
  import IconLoading from "../icon/icon-loading/index.js";
3
3
  import usePickSlots from "../_hooks/use-pick-slots.js";
4
- import useTreeContext from "./hooks/use-tree-context.js";
5
4
  import IconCaretDown from "../icon/icon-caret-down/index.js";
5
+ import useTreeContext from "./hooks/use-tree-context.js";
6
6
  import IconFile from "../icon/icon-file/index.js";
7
7
  import { defineComponent, h, toRefs } from "vue";
8
8
  //#region components/tree/node-switcher.vue?vue&type=script&lang.tsx
@@ -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 { useI18n } from "../locale/index.js";
3
4
  import Input from "../input/index.js";
4
5
  import { createElementBlock, createVNode, defineComponent, normalizeClass, onMounted, openBlock, ref, unref, withKeys } from "vue";
5
6
  //#region components/typography/edit-content.vue?vue&type=script&setup=true&lang.ts
@@ -16,6 +17,7 @@ var edit_content_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
16
17
  ],
17
18
  setup(__props, { emit: __emit }) {
18
19
  const emit = __emit;
20
+ const { t } = useI18n();
19
21
  const classNames = [`${getPrefixCls("typography")}-edit-content`];
20
22
  const rootRef = ref();
21
23
  function onChange(value) {
@@ -41,12 +43,16 @@ var edit_content_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
41
43
  class: normalizeClass(classNames)
42
44
  }, [createVNode(unref(Input), {
43
45
  "auto-size": "",
44
- "input-attrs": { "aria-label": "Edit text" },
46
+ "input-attrs": { "aria-label": unref(t)("a11y.editText") },
45
47
  "model-value": __props.text,
46
48
  onBlur: unref(onBlur),
47
49
  onInput: onChange,
48
50
  onKeydown: withKeys(onEnd, ["enter"])
49
- }, null, 8, ["model-value", "onBlur"])], 512);
51
+ }, null, 8, [
52
+ "input-attrs",
53
+ "model-value",
54
+ "onBlur"
55
+ ])], 512);
50
56
  };
51
57
  }
52
58
  }));
@@ -97,7 +97,7 @@ var upload_list_item_default = /* @__PURE__ */ defineComponent({
97
97
  (uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.showRemoveButton) && createVNode("span", { "class": `${itemCls}-operation` }, [createVNode("span", {
98
98
  "role": "button",
99
99
  "tabindex": "0",
100
- "aria-label": "Remove",
100
+ "aria-label": t("a11y.remove"),
101
101
  "onClick": () => {
102
102
  var _uploadCtx$onRemove;
103
103
  return uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$onRemove = uploadCtx.onRemove) === null || _uploadCtx$onRemove === void 0 ? void 0 : _uploadCtx$onRemove.call(uploadCtx, props.file);
@@ -1,5 +1,6 @@
1
1
  import { getPrefixCls } from "../_utils/global-config.js";
2
2
  import { isActivationKey } from "../_utils/keyboard.js";
3
+ import { useI18n } from "../locale/index.js";
3
4
  import IconEye from "../icon/icon-eye/index.js";
4
5
  import IconImageClose from "../icon/icon-image-close/index.js";
5
6
  import IconDelete from "../icon/icon-delete/index.js";
@@ -21,6 +22,7 @@ var upload_picture_item_default = /* @__PURE__ */ defineComponent({
21
22
  }
22
23
  },
23
24
  setup(props) {
25
+ const { t } = useI18n();
24
26
  const itemCls = `${getPrefixCls("upload-list")}-picture`;
25
27
  const cls = computed(() => [itemCls, { [`${itemCls}-status-error`]: props.file.status === "error" }]);
26
28
  const uploadCtx = inject(uploadInjectionKey, void 0);
@@ -44,7 +46,7 @@ var upload_picture_item_default = /* @__PURE__ */ defineComponent({
44
46
  "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-preview`],
45
47
  "role": "button",
46
48
  "tabindex": "0",
47
- "aria-label": "Preview",
49
+ "aria-label": t("a11y.preview"),
48
50
  "onClick": () => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onPreview(props.file),
49
51
  "onKeydown": onActionKeydown(() => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onPreview(props.file))
50
52
  }, [(_ref2 = (_uploadCtx$slots$prev = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots3$pre = (_uploadCtx$slots3 = uploadCtx.slots)["preview-icon"]) === null || _uploadCtx$slots3$pre === void 0 ? void 0 : _uploadCtx$slots3$pre.call(_uploadCtx$slots3)) !== null && _uploadCtx$slots$prev !== void 0 ? _uploadCtx$slots$prev : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon3 = uploadCtx.customIcon) === null || _uploadCtx$customIcon3 === void 0 || (_uploadCtx$customIcon4 = _uploadCtx$customIcon3.previewIcon) === null || _uploadCtx$customIcon4 === void 0 ? void 0 : _uploadCtx$customIcon4.call(_uploadCtx$customIcon3)) !== null && _ref2 !== void 0 ? _ref2 : createVNode(IconEye, null, null)]),
@@ -52,7 +54,7 @@ var upload_picture_item_default = /* @__PURE__ */ defineComponent({
52
54
  "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-upload`],
53
55
  "role": "button",
54
56
  "tabindex": "0",
55
- "aria-label": "Retry upload",
57
+ "aria-label": t("a11y.retryUpload"),
56
58
  "onClick": () => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onUpload(props.file),
57
59
  "onKeydown": onActionKeydown(() => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onUpload(props.file))
58
60
  }, [(_ref3 = (_uploadCtx$slots$retr = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots4$ret = (_uploadCtx$slots4 = uploadCtx.slots)["retry-icon"]) === null || _uploadCtx$slots4$ret === void 0 ? void 0 : _uploadCtx$slots4$ret.call(_uploadCtx$slots4)) !== null && _uploadCtx$slots$retr !== void 0 ? _uploadCtx$slots$retr : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon5 = uploadCtx.customIcon) === null || _uploadCtx$customIcon5 === void 0 || (_uploadCtx$customIcon6 = _uploadCtx$customIcon5.retryIcon) === null || _uploadCtx$customIcon6 === void 0 ? void 0 : _uploadCtx$customIcon6.call(_uploadCtx$customIcon5)) !== null && _ref3 !== void 0 ? _ref3 : createVNode(IconUpload, null, null)]),
@@ -60,7 +62,7 @@ var upload_picture_item_default = /* @__PURE__ */ defineComponent({
60
62
  "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-remove`],
61
63
  "role": "button",
62
64
  "tabindex": "0",
63
- "aria-label": "Remove",
65
+ "aria-label": t("a11y.remove"),
64
66
  "onClick": () => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onRemove(props.file),
65
67
  "onKeydown": onActionKeydown(() => {
66
68
  var _uploadCtx$onRemove;
@@ -1,5 +1,6 @@
1
1
  import { getPrefixCls } from "../_utils/global-config.js";
2
2
  import { isExist, isFunction, isString, isUndefined } from "../_utils/is.js";
3
+ import { useI18n } from "../locale/index.js";
3
4
  import { ArrowLeft, ArrowRight, Backspace } from "../_utils/keycode.js";
4
5
  import Input from "../input/index.js";
5
6
  import { Fragment, computed, createVNode, defineComponent, mergeProps, ref, watch } from "vue";
@@ -96,6 +97,7 @@ var verification_code_default = /* @__PURE__ */ defineComponent({
96
97
  "input": (_inputValue, _index, _ev) => true
97
98
  },
98
99
  setup(props, { emit }) {
100
+ const { t } = useI18n();
99
101
  const prefixCls = getPrefixCls("verification-code");
100
102
  const prefixInputCls = getPrefixCls("input");
101
103
  const inputRefList = ref([]);
@@ -187,7 +189,7 @@ var verification_code_default = /* @__PURE__ */ defineComponent({
187
189
  return createVNode("div", {
188
190
  "class": prefixCls,
189
191
  "role": "group",
190
- "aria-label": "Verification code"
192
+ "aria-label": t("a11y.verificationCode")
191
193
  }, [innerValue.value.map((c, i) => {
192
194
  var _props$separator;
193
195
  return createVNode(Fragment, null, [createVNode(Input, mergeProps({
@@ -200,7 +202,7 @@ var verification_code_default = /* @__PURE__ */ defineComponent({
200
202
  "error": props.error,
201
203
  "disabled": props.disabled,
202
204
  "readonly": props.readonly,
203
- "inputAttrs": { "aria-label": `Character ${i + 1} of ${props.length}` },
205
+ "inputAttrs": { "aria-label": t("a11y.characterOf", i + 1, props.length) },
204
206
  "onFocus": () => focusFirstEmptyInput(i),
205
207
  "onInput": (v, e) => handleInput(i, v, e)
206
208
  }, {
@@ -661,6 +661,9 @@
661
661
  "sd-config-provider/pagination": {
662
662
  "description": "Default config for Pagination"
663
663
  },
664
+ "sd-config-provider/color-picker": {
665
+ "description": "Default config for ColorPicker"
666
+ },
664
667
  "sd-config-provider/json-form": {
665
668
  "description": "Default config for JsonForm"
666
669
  },
@@ -109,6 +109,9 @@
109
109
  "count"
110
110
  ]
111
111
  },
112
+ "sd-basic-crud-table": {
113
+ "attributes": []
114
+ },
112
115
  "sd-border-beam": {
113
116
  "attributes": []
114
117
  },
@@ -296,6 +299,7 @@
296
299
  "modal",
297
300
  "drawer",
298
301
  "pagination",
302
+ "color-picker",
299
303
  "json-form",
300
304
  "theme",
301
305
  "theme-mode"
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
4
  "name": "@sdata/web-vue",
5
- "version": "3.13.0",
5
+ "version": "3.15.0",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
@@ -629,6 +629,12 @@
629
629
  "events": [],
630
630
  "slots": []
631
631
  },
632
+ {
633
+ "name": "sd-basic-crud-table",
634
+ "attributes": [],
635
+ "events": [],
636
+ "slots": []
637
+ },
632
638
  {
633
639
  "name": "sd-border-beam",
634
640
  "attributes": [],
@@ -1729,6 +1735,14 @@
1729
1735
  "kind": "expression"
1730
1736
  }
1731
1737
  },
1738
+ {
1739
+ "name": "color-picker",
1740
+ "description": "Default config for ColorPicker",
1741
+ "value": {
1742
+ "type": "ConfigProviderColorPicker",
1743
+ "kind": "expression"
1744
+ }
1745
+ },
1732
1746
  {
1733
1747
  "name": "json-form",
1734
1748
  "description": "Default config for JsonForm",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdata/web-vue",
3
- "version": "3.14.0",
3
+ "version": "3.16.0",
4
4
  "description": "SD Design Vue: A Vue.js 3 UI Library",
5
5
  "keywords": [
6
6
  "sd",
@@ -1 +0,0 @@
1
- export declare const colors: string[];
@@ -1,27 +0,0 @@
1
- //#region components/color-picker/colors.ts
2
- var colors = [
3
- "#00B42A",
4
- "#3C7EFF",
5
- "#FF7D00",
6
- "#F76965",
7
- "#F7BA1E",
8
- "#F5319D",
9
- "#D91AD9",
10
- "#9FDB1D",
11
- "#FADC19",
12
- "#722ED1",
13
- "#3491FA",
14
- "#7BE188",
15
- "#93BEFF",
16
- "#FFCF8B",
17
- "#FBB0A7",
18
- "#FCE996",
19
- "#FB9DC7",
20
- "#F08EE6",
21
- "#DCF190",
22
- "#FDFA94",
23
- "#C396ED",
24
- "#9FD4FD"
25
- ];
26
- //#endregion
27
- export { colors };