@sdata/web-vue 3.13.0 → 3.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/dist/sd.css +141 -111
  2. package/dist/sd.min.css +2 -2
  3. package/es/_components/input-label/input-label.d.ts +2 -0
  4. package/es/_components/input-label/input-label.js +4 -2
  5. package/es/_components/input-label/style/index.css +2 -2
  6. package/es/_components/picker/style/index.scss +8 -2
  7. package/es/_components/resize-observer.js +1 -1
  8. package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +9 -2
  9. package/es/_components/select-view/select-view.d.ts +2 -0
  10. package/es/_components/select-view/select-view.js +5 -1
  11. package/es/_components/select-view/style/index.css +5 -5
  12. package/es/_hooks/use-focus-trap.d.ts +10 -0
  13. package/es/_hooks/use-focus-trap.js +115 -0
  14. package/es/_utils/dom.js +1 -10
  15. package/es/_utils/keyboard.d.ts +4 -0
  16. package/es/_utils/keyboard.js +21 -2
  17. package/es/alert/alert.vue.d.ts +2 -2
  18. package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +12 -3
  19. package/es/alert/index.d.ts +5 -5
  20. package/es/alert/style/index.css +1 -1
  21. package/es/alert/style/index.scss +1 -1
  22. package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +3 -1
  23. package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +2 -0
  24. package/es/anchor/style/index.css +1 -1
  25. package/es/anchor/style/index.scss +3 -1
  26. package/es/auto-complete/auto-complete.js +8 -0
  27. package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +8 -2
  28. package/es/avatar/style/index.css +2 -2
  29. package/es/avatar/style/index.scss +2 -2
  30. package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +5 -1
  31. package/es/back-top/style/index.css +1 -1
  32. package/es/back-top/style/index.scss +2 -1
  33. package/es/badge/badge.js +4 -1
  34. package/es/badge/style/index.css +3 -3
  35. package/es/badge/style/index.scss +3 -3
  36. package/es/breadcrumb/breadcrumb.js +1 -0
  37. package/es/button/button.vue_vue_type_script_setup_true_lang.js +10 -5
  38. package/es/button/style/index.css +15 -6
  39. package/es/button/style/index.scss +25 -7
  40. package/es/calendar/style/event.scss +2 -2
  41. package/es/calendar/style/index.css +2 -2
  42. package/es/card/style/index.css +3 -3
  43. package/es/card/style/index.scss +3 -3
  44. package/es/carousel/carousel-arrow.vue.d.ts +4 -4
  45. package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +20 -4
  46. package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +23 -4
  47. package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +8 -1
  48. package/es/carousel/carousel.js +18 -1
  49. package/es/carousel/style/index.css +1 -1
  50. package/es/carousel/style/index.scss +1 -1
  51. package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +11 -2
  52. package/es/cascader/style/index.css +2 -2
  53. package/es/cascader/style/index.scss +3 -1
  54. package/es/checkbox/checkbox-group.js +4 -1
  55. package/es/checkbox/checkbox.d.ts +9 -0
  56. package/es/checkbox/checkbox.js +14 -0
  57. package/es/checkbox/index.d.ts +15 -0
  58. package/es/checkbox/style/index.css +1 -1
  59. package/es/checkbox/style/index.scss +1 -1
  60. package/es/collapse/collapse-item.js +21 -3
  61. package/es/collapse/context.d.ts +1 -1
  62. package/es/color-picker/color-picker.js +6 -0
  63. package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +10 -2
  64. package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +14 -1
  65. package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +1 -0
  66. package/es/date-picker/style/index.css +5 -5
  67. package/es/date-picker/style/index.scss +4 -3
  68. package/es/drawer/drawer.vue.d.ts +1 -1
  69. package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +28 -7
  70. package/es/drawer/index.d.ts +3 -3
  71. package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +5 -1
  72. package/es/dropdown/dropdown-panel.vue.d.ts +9 -0
  73. package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +75 -2
  74. package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +5 -2
  75. package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +4 -2
  76. package/es/dropdown/style/index.css +1 -1
  77. package/es/dropdown/style/index.scss +3 -1
  78. package/es/file-previewer/file-previewer.vue.d.ts +1 -1
  79. package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +7 -3
  80. package/es/file-previewer/index.d.ts +3 -3
  81. package/es/form/context.d.ts +1 -0
  82. package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +6 -2
  83. package/es/form/style/index.css +2 -2
  84. package/es/form/style/index.scss +2 -2
  85. package/es/image/preview.vue.d.ts +1 -1
  86. package/es/image/preview.vue_vue_type_script_setup_true_lang.js +1 -1
  87. package/es/index.css +141 -111
  88. package/es/input/input.js +16 -2
  89. package/es/input/style/index.css +2 -2
  90. package/es/input/style/input.scss +4 -4
  91. package/es/input-number/input-number.js +5 -1
  92. package/es/input-number/style/index.css +3 -3
  93. package/es/input-number/style/index.scss +5 -1
  94. package/es/input-tag/index.d.ts +3 -0
  95. package/es/input-tag/input-tag.d.ts +2 -0
  96. package/es/input-tag/input-tag.js +34 -30
  97. package/es/input-tag/style/index.css +8 -8
  98. package/es/input-tag/style/index.scss +11 -5
  99. package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +31 -6
  100. package/es/layout/style/index.css +2 -2
  101. package/es/layout/style/index.scss +4 -2
  102. package/es/link/style/index.css +1 -1
  103. package/es/link/style/index.scss +3 -1
  104. package/es/mention/mention.js +8 -0
  105. package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +29 -3
  106. package/es/menu/item.js +14 -1
  107. package/es/menu/style/index.css +6 -6
  108. package/es/menu/style/index.scss +5 -3
  109. package/es/message/style/index.css +3 -3
  110. package/es/message/style/index.scss +5 -3
  111. package/es/modal/index.d.ts +3 -3
  112. package/es/modal/modal.vue.d.ts +1 -1
  113. package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +28 -13
  114. package/es/modal/style/index.css +2 -2
  115. package/es/modal/style/index.scss +3 -2
  116. package/es/notification/style/index.css +3 -3
  117. package/es/notification/style/index.scss +11 -3
  118. package/es/page-header/page-header.vue.d.ts +6 -6
  119. package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +12 -1
  120. package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +12 -2
  121. package/es/pagination/page-item-step.vue.d.ts +2 -2
  122. package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +19 -2
  123. package/es/pagination/page-item.vue.d.ts +2 -2
  124. package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +21 -3
  125. package/es/pagination/pagination.js +5 -1
  126. package/es/pagination/style/index.css +6 -1
  127. package/es/pagination/style/index.scss +9 -3
  128. package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +2 -0
  129. package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +2 -0
  130. package/es/progress/style/index.css +2 -2
  131. package/es/progress/style/index.scss +5 -3
  132. package/es/qr-code/qr-code-status.vue_vue_type_script_setup_true_lang.js +5 -1
  133. package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +11 -6
  134. package/es/radio/context.d.ts +1 -0
  135. package/es/radio/radio-group.js +6 -2
  136. package/es/radio/radio.js +1 -0
  137. package/es/radio/style/index.css +2 -2
  138. package/es/radio/style/index.scss +4 -2
  139. package/es/rate/rate.js +25 -1
  140. package/es/resize-box/resize-box.vue.d.ts +4 -4
  141. package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +30 -1
  142. package/es/result/result.vue_vue_type_script_setup_true_lang.js +7 -4
  143. package/es/select/index.d.ts +124 -0
  144. package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +4 -1
  145. package/es/select/select.d.ts +62 -0
  146. package/es/select/select.js +18 -2
  147. package/es/select/style/index.css +1 -1
  148. package/es/select/style/index.scss +3 -1
  149. package/es/selectable-card/style/index.css +2 -2
  150. package/es/selectable-card/style/index.scss +5 -5
  151. package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +5 -1
  152. package/es/slider/slider-button.vue.d.ts +2 -0
  153. package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +7 -2
  154. package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +23 -2
  155. package/es/slider/style/index.css +1 -1
  156. package/es/slider/style/index.scss +3 -1
  157. package/es/spin/spin.js +7 -2
  158. package/es/spin/style/index.css +1 -1
  159. package/es/spin/style/index.scss +1 -1
  160. package/es/split/split.vue.d.ts +4 -4
  161. package/es/split/split.vue_vue_type_script_setup_true_lang.js +27 -3
  162. package/es/steps/context.d.ts +1 -0
  163. package/es/steps/step.vue_vue_type_script_setup_true_lang.js +15 -2
  164. package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +6 -1
  165. package/es/steps/style/index.css +1 -1
  166. package/es/steps/style/index.scss +1 -1
  167. package/es/style/animation/index.scss +1 -0
  168. package/es/style/animation/reduced-motion.scss +22 -0
  169. package/es/style/animation/zoom.scss +7 -6
  170. package/es/style/icon.scss +9 -1
  171. package/es/switch/style/index.css +1 -1
  172. package/es/switch/style/index.scss +4 -1
  173. package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +6 -1
  174. package/es/table/style/index.css +8 -8
  175. package/es/table/style/index.scss +11 -8
  176. package/es/table/table-operation-td.d.ts +15 -0
  177. package/es/table/table-tbody.js +4 -1
  178. package/es/table/table-td.js +2 -1
  179. package/es/table/table-th.js +4 -2
  180. package/es/table/table-thead.js +4 -1
  181. package/es/table/table-tr.js +4 -1
  182. package/es/table/table.js +6 -2
  183. package/es/tabs/context.d.ts +1 -0
  184. package/es/tabs/style/index.css +5 -5
  185. package/es/tabs/style/index.scss +7 -7
  186. package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +21 -2
  187. package/es/tabs/tabs-nav.js +34 -1
  188. package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +27 -4
  189. package/es/tabs/tabs.js +4 -2
  190. package/es/tag/index.d.ts +5 -5
  191. package/es/tag/style/index.css +1 -1
  192. package/es/tag/style/index.scss +3 -1
  193. package/es/tag/tag.vue.d.ts +2 -2
  194. package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +19 -2
  195. package/es/textarea/style/index.css +2 -2
  196. package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +15 -3
  197. package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +11 -3
  198. package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +4 -1
  199. package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +1 -0
  200. package/es/transfer/style/index.css +1 -1
  201. package/es/transfer/style/index.scss +1 -1
  202. package/es/transfer/transfer-list-item.js +16 -2
  203. package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +27 -7
  204. package/es/tree/context.d.ts +2 -0
  205. package/es/tree/style/index.css +1 -1
  206. package/es/tree/style/index.scss +1 -1
  207. package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +81 -2
  208. package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +10 -1
  209. package/es/trigger/index.d.ts +45 -0
  210. package/es/trigger/trigger.d.ts +27 -0
  211. package/es/trigger/trigger.js +47 -5
  212. package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +11 -8
  213. package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +38 -6
  214. package/es/typography/style/index.css +2 -2
  215. package/es/typography/style/index.scss +2 -2
  216. package/es/upload/style/index.css +9 -9
  217. package/es/upload/style/index.scss +15 -9
  218. package/es/upload/upload-list-item.js +18 -5
  219. package/es/upload/upload-picture-item.js +25 -3
  220. package/es/verification-code/verification-code.js +6 -1
  221. package/json/vetur-attributes.json +15 -0
  222. package/json/vetur-tags.json +6 -2
  223. package/json/web-types.json +33 -1
  224. package/package.json +1 -1
@@ -1,7 +1,13 @@
1
1
  import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
2
2
  import { getPrefixCls } from "../_utils/global-config.js";
3
+ import { isActivationKey } from "../_utils/keyboard.js";
3
4
  import { computed, createElementBlock, createTextVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, toDisplayString } from "vue";
4
5
  //#region components/pagination/page-item.vue?vue&type=script&setup=true&lang.ts
6
+ var _hoisted_1 = [
7
+ "tabindex",
8
+ "aria-current",
9
+ "aria-disabled"
10
+ ];
5
11
  var page_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Pager" }), {}, {
6
12
  __name: "page-item",
7
13
  props: {
@@ -20,9 +26,17 @@ var page_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
20
26
  const emit = __emit;
21
27
  const prefixCls = getPrefixCls("pagination-item");
22
28
  const isActive = computed(() => props.current === props.pageNumber);
23
- const handleClick = (e) => {
29
+ const activate = (e) => {
24
30
  if (!props.disabled) emit("click", props.pageNumber, e);
25
31
  };
32
+ const handleClick = (e) => activate(e);
33
+ const handleKeydown = (e) => {
34
+ if (props.disabled) return;
35
+ if (isActivationKey(e)) {
36
+ e.preventDefault();
37
+ activate(e);
38
+ }
39
+ };
26
40
  const cls = computed(() => [prefixCls, { [`${prefixCls}-active`]: isActive.value }]);
27
41
  const mergedStyle = computed(() => {
28
42
  return isActive.value ? props.activeStyle : props.style;
@@ -31,8 +45,12 @@ var page_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
31
45
  return openBlock(), createElementBlock("li", {
32
46
  class: normalizeClass(cls.value),
33
47
  style: normalizeStyle(mergedStyle.value),
34
- onClick: handleClick
35
- }, [renderSlot(_ctx.$slots, "default", { page: __props.pageNumber }, () => [createTextVNode(toDisplayString(__props.pageNumber), 1)])], 6);
48
+ tabindex: __props.disabled ? -1 : 0,
49
+ "aria-current": isActive.value ? "page" : void 0,
50
+ "aria-disabled": __props.disabled || void 0,
51
+ onClick: handleClick,
52
+ onKeydown: handleKeydown
53
+ }, [renderSlot(_ctx.$slots, "default", { page: __props.pageNumber }, () => [createTextVNode(toDisplayString(__props.pageNumber), 1)])], 46, _hoisted_1);
36
54
  };
37
55
  }
38
56
  }));
@@ -432,7 +432,11 @@ var pagination_default = /* @__PURE__ */ defineComponent({
432
432
  return () => {
433
433
  var _slots$total, _slots$total2, _mergedPageSizeOption;
434
434
  if (props.hideOnSinglePage && pages.value <= 1) return null;
435
- return createVNode("div", { "class": cls.value }, [
435
+ return createVNode("div", {
436
+ "role": "navigation",
437
+ "aria-label": "Pagination",
438
+ "class": cls.value
439
+ }, [
436
440
  mergedShowTotal.value && createVNode("span", { "class": `${prefixCls}-total` }, [(_slots$total = (_slots$total2 = slots.total) === null || _slots$total2 === void 0 ? void 0 : _slots$total2.call(slots, { total: props.total })) !== null && _slots$total !== void 0 ? _slots$total : t("pagination.total", props.total)]),
437
441
  renderPager(),
438
442
  mergedShowPageSize.value && createVNode(page_options_default, {
@@ -41,7 +41,13 @@
41
41
  border-radius: var(--sd-border-radius-small);
42
42
  outline: 0;
43
43
  cursor: pointer;
44
+ 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);
44
45
  user-select: none;
46
+ }
47
+ .sd-pagination-item:active:not(.sd-pagination-item-disabled) {
48
+ transform: scale(0.97);
49
+ }
50
+ .sd-pagination-item {
45
51
  min-width: 32px;
46
52
  height: 32px;
47
53
  font-size: 14px;
@@ -59,7 +65,6 @@
59
65
  color: rgb(var(--sd-primary-6));
60
66
  background-color: var(--sd-color-primary-light-1);
61
67
  border-color: transparent;
62
- transition: color 0.2s cubic-bezier(0, 0, 1, 1), background-color 0.2s cubic-bezier(0, 0, 1, 1);
63
68
  }
64
69
  .sd-pagination-item-disabled, .sd-pagination-item-disabled:hover {
65
70
  color: var(--sd-color-text-4);
@@ -85,8 +85,17 @@
85
85
  border-radius: $pagination-item-border-radius;
86
86
  outline: 0;
87
87
  cursor: pointer;
88
+ transition:
89
+ color theme.$transition-duration-1 theme.$transition-timing-function-standard,
90
+ background-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
91
+ border-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
92
+ transform theme.$transition-duration-1 theme.$transition-timing-function-standard;
88
93
  user-select: none;
89
94
 
95
+ &:active:not(&-disabled) {
96
+ transform: scale(0.97);
97
+ }
98
+
90
99
  @include page-item(default);
91
100
 
92
101
  &:hover {
@@ -100,9 +109,6 @@
100
109
  color: $pagination-color-item-text_active;
101
110
  background-color: $pagination-color-bg-item_active;
102
111
  border-color: $pagination-color-item-border_active;
103
- transition:
104
- color theme.$transition-duration-2 theme.$transition-timing-function-linear,
105
- background-color theme.$transition-duration-2 theme.$transition-timing-function-linear;
106
112
  }
107
113
 
108
114
  &-disabled,
@@ -231,6 +231,8 @@ var popconfirm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
231
231
  "arrow-style": __props.arrowStyle,
232
232
  "animation-name": "zoom-in-fade-out",
233
233
  "auto-fit-transform-origin": "",
234
+ "esc-to-close": "",
235
+ "aria-has-popup": "dialog",
234
236
  onPopupVisibleChange: handlePopupVisibleChange
235
237
  }, {
236
238
  content: withCtx(() => [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-body`) }, [createElementVNode("span", { class: normalizeClass(`${unref(prefixCls)}-icon`) }, [renderSlot(_ctx.$slots, "icon", {}, () => [__props.type === "info" ? (openBlock(), createBlock(unref(IconInfoCircleFill), { key: 0 })) : __props.type === "success" ? (openBlock(), createBlock(unref(IconCheckCircleFill), { key: 1 })) : __props.type === "warning" ? (openBlock(), createBlock(unref(IconExclamationCircleFill), { key: 2 })) : __props.type === "error" ? (openBlock(), createBlock(unref(IconCloseCircleFill), { key: 3 })) : createCommentVNode("", true)])], 2), createElementVNode("span", { class: normalizeClass(`${unref(prefixCls)}-content`) }, [renderSlot(_ctx.$slots, "content", {}, () => [createTextVNode(toDisplayString(__props.content), 1)])], 2)], 2), createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-footer`) }, [createVNode(unref(Button), mergeProps({ size: "mini" }, __props.cancelButtonProps, { onClick: handleCancel }), {
@@ -135,6 +135,8 @@ var popover_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
135
135
  "popup-container": __props.popupContainer,
136
136
  "animation-name": "zoom-in-fade-out",
137
137
  "auto-fit-transform-origin": "",
138
+ "esc-to-close": "",
139
+ "aria-has-popup": "true",
138
140
  onPopupVisibleChange: handlePopupVisibleChange
139
141
  }, {
140
142
  content: withCtx(() => [__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
@@ -73,7 +73,7 @@
73
73
  height: 100%;
74
74
  background-color: var(--sd-color-primary-light-3);
75
75
  border-radius: 0 100px 100px 0;
76
- transition: all 0.6s cubic-bezier(0.34, 0.69, 0.1, 1);
76
+ transition: width 0.6s cubic-bezier(0.34, 0.69, 0.1, 1), background-color 0.6s cubic-bezier(0.34, 0.69, 0.1, 1);
77
77
  }
78
78
  .sd-progress-line-bar-animate::after {
79
79
  position: absolute;
@@ -207,7 +207,7 @@
207
207
  stroke: var(--sd-color-fill-3);
208
208
  }
209
209
  .sd-progress-circle-bar {
210
- transition: stroke-dashoffset 0.6s cubic-bezier(0, 0, 1, 1) 0s, stroke 0.6s cubic-bezier(0, 0, 1, 1);
210
+ transition: stroke-dashoffset 0.6s cubic-bezier(0.34, 0.69, 0.1, 1) 0s, stroke 0.6s cubic-bezier(0.34, 0.69, 0.1, 1);
211
211
  stroke: rgb(var(--sd-primary-6));
212
212
  }
213
213
  .sd-progress-size-mini .sd-progress-circle-bg {
@@ -76,7 +76,9 @@ $progress-prefix-cls: string.unquote('#{$prefix}-progress');
76
76
  height: 100%;
77
77
  background-color: $progress-line-color-buffer-bg;
78
78
  border-radius: 0 100px 100px 0;
79
- transition: all 0.6s $transition-timing-function-standard;
79
+ transition:
80
+ width 0.6s $transition-timing-function-standard,
81
+ background-color 0.6s $transition-timing-function-standard;
80
82
  }
81
83
 
82
84
  &-animate::after {
@@ -270,8 +272,8 @@ $progress-prefix-cls: string.unquote('#{$prefix}-progress');
270
272
 
271
273
  &-bar {
272
274
  transition:
273
- stroke-dashoffset 0.6s $transition-timing-function-linear 0s,
274
- stroke 0.6s $transition-timing-function-linear;
275
+ stroke-dashoffset 0.6s $transition-timing-function-standard 0s,
276
+ stroke 0.6s $transition-timing-function-standard;
275
277
  stroke: $progress-circle-color-path-stroke;
276
278
  }
277
279
  }
@@ -15,7 +15,11 @@ var qr_code_status_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
15
15
  emit("refresh");
16
16
  };
17
17
  return (_ctx, _cache) => {
18
- return openBlock(), createElementBlock("div", { class: normalizeClass(`${__props.prefixCls}-status`) }, [__props.status === "loading" ? (openBlock(), createBlock(unref(Spin), normalizeProps(mergeProps({ key: 0 }, __props.spinProps)), null, 16)) : __props.status === "expired" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("p", { class: normalizeClass(`${__props.prefixCls}-expired`) }, "二维码已过期", 2), createElementVNode("button", {
18
+ return openBlock(), createElementBlock("div", {
19
+ class: normalizeClass(`${__props.prefixCls}-status`),
20
+ role: "status",
21
+ "aria-live": "polite"
22
+ }, [__props.status === "loading" ? (openBlock(), createBlock(unref(Spin), normalizeProps(mergeProps({ key: 0 }, __props.spinProps)), null, 16)) : __props.status === "expired" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("p", { class: normalizeClass(`${__props.prefixCls}-expired`) }, "二维码已过期", 2), createElementVNode("button", {
19
23
  type: "button",
20
24
  class: normalizeClass(`${__props.prefixCls}-refresh-btn`),
21
25
  onClick: handleRefresh
@@ -5,8 +5,9 @@ import qr_code_status_default from "./qr-code-status.js";
5
5
  import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, unref, useSlots, watch } from "vue";
6
6
  import QRCode from "qrcode";
7
7
  //#region components/qr-code/qr-code.vue?vue&type=script&setup=true&lang.ts
8
- var _hoisted_1 = ["innerHTML"];
9
- var _hoisted_2 = ["src", "alt"];
8
+ var _hoisted_1 = ["aria-label"];
9
+ var _hoisted_2 = ["aria-label", "innerHTML"];
10
+ var _hoisted_3 = ["src", "alt"];
10
11
  var qr_code_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "QrCode" }), {}, {
11
12
  __name: "qr-code",
12
13
  props: {
@@ -290,12 +291,16 @@ var qr_code_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
290
291
  key: 1,
291
292
  ref_key: "canvasRef",
292
293
  ref: canvasRef,
293
- class: normalizeClass(`${unref(prefixCls)}-canvas`)
294
- }, null, 2)) : (openBlock(), createElementBlock("div", {
294
+ class: normalizeClass(`${unref(prefixCls)}-canvas`),
295
+ role: "img",
296
+ "aria-label": `QR code: ${mergedValue.value}`
297
+ }, null, 10, _hoisted_1)) : (openBlock(), createElementBlock("div", {
295
298
  key: 2,
296
299
  class: normalizeClass(`${unref(prefixCls)}-svg`),
300
+ role: "img",
301
+ "aria-label": `QR code: ${mergedValue.value}`,
297
302
  innerHTML: svgMarkup.value
298
- }, null, 10, _hoisted_1)),
303
+ }, null, 10, _hoisted_2)),
299
304
  hasIcon.value ? (openBlock(), createElementBlock("div", {
300
305
  key: 3,
301
306
  class: normalizeClass(`${unref(prefixCls)}-icon`)
@@ -304,7 +309,7 @@ var qr_code_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
304
309
  src: __props.icon,
305
310
  alt: __props.iconAlt,
306
311
  style: normalizeStyle(iconStyle.value)
307
- }, null, 12, _hoisted_2)) : createCommentVNode("", true)])], 2)) : createCommentVNode("", true)
312
+ }, null, 12, _hoisted_3)) : createCommentVNode("", true)])], 2)) : createCommentVNode("", true)
308
313
  ], 6)) : createCommentVNode("", true);
309
314
  };
310
315
  }
@@ -4,6 +4,7 @@ export declare const RADIO_TYPES: readonly ["radio", "button"];
4
4
  export type RadioType = (typeof RADIO_TYPES)[number];
5
5
  export interface RadioGroupContext {
6
6
  name: 'SDRadioGroup';
7
+ inputName?: string;
7
8
  value: string | number | boolean;
8
9
  size: Size;
9
10
  type: RadioType;
@@ -4,7 +4,7 @@ import { isFunction, isNull, isNumber, isString, isUndefined } from "../_utils/i
4
4
  import { useSize } from "../_hooks/use-size.js";
5
5
  import { radioGroupKey } from "./context.js";
6
6
  import radio_default from "./radio.js";
7
- import { computed, createVNode, defineComponent, provide, reactive, ref, toRefs, watch } from "vue";
7
+ import { computed, createVNode, defineComponent, getCurrentInstance, provide, reactive, ref, toRefs, watch } from "vue";
8
8
  //#region components/radio/radio-group.tsx
9
9
  var radio_group_default = /* @__PURE__ */ defineComponent({
10
10
  name: "RadioGroup",
@@ -129,6 +129,7 @@ var radio_group_default = /* @__PURE__ */ defineComponent({
129
129
  };
130
130
  provide(radioGroupKey, reactive({
131
131
  name: "SDRadioGroup",
132
+ inputName: `${prefixCls}-${getCurrentInstance().uid}`,
132
133
  value: computedValue,
133
134
  size: mergedSize,
134
135
  type,
@@ -158,7 +159,10 @@ var radio_group_default = /* @__PURE__ */ defineComponent({
158
159
  };
159
160
  return () => {
160
161
  var _slots$default;
161
- return createVNode("span", { "class": cls.value }, [options.value.length > 0 ? renderOptions() : (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)]);
162
+ return createVNode("span", {
163
+ "role": "radiogroup",
164
+ "class": cls.value
165
+ }, [options.value.length > 0 ? renderOptions() : (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)]);
162
166
  };
163
167
  }
164
168
  });
package/es/radio/radio.js CHANGED
@@ -156,6 +156,7 @@ var radio_default = /* @__PURE__ */ defineComponent({
156
156
  "type": "radio",
157
157
  "checked": computedChecked.value,
158
158
  "value": props.value,
159
+ "name": radioGroupCtx === null || radioGroupCtx === void 0 ? void 0 : radioGroupCtx.inputName,
159
160
  "class": `${prefixCls}-target`,
160
161
  "disabled": mergedDisabled.value,
161
162
  "onClick": handleClick,
@@ -142,7 +142,7 @@
142
142
  background-color: transparent;
143
143
  border-radius: var(--sd-border-radius-small);
144
144
  cursor: pointer;
145
- transition: all 0.1s cubic-bezier(0, 0, 1, 1);
145
+ 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);
146
146
  }
147
147
  .sd-radio-button-content {
148
148
  position: relative;
@@ -158,7 +158,7 @@
158
158
  height: 14px;
159
159
  background-color: var(--sd-color-neutral-3);
160
160
  transform: translateY(-50%);
161
- transition: all 0.1s cubic-bezier(0, 0, 1, 1);
161
+ transition: opacity 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
162
162
  content: "";
163
163
  }
164
164
  .sd-radio-button:hover::before, .sd-radio-button:hover + .sd-radio-button::before, .sd-radio-button.sd-radio-checked::before, .sd-radio-button.sd-radio-checked + .sd-radio-button::before {
@@ -161,7 +161,9 @@ $radio-prefix-cls: string.unquote('#{theme.$prefix}-radio');
161
161
  background-color: $radio-button-color-bg;
162
162
  border-radius: $radio-button-border-radius;
163
163
  cursor: pointer;
164
- transition: all theme.$transition-duration-1 theme.$transition-timing-function-linear;
164
+ transition:
165
+ color theme.$transition-duration-1 theme.$transition-timing-function-standard,
166
+ background-color theme.$transition-duration-1 theme.$transition-timing-function-standard;
165
167
 
166
168
  &-content {
167
169
  position: relative;
@@ -180,7 +182,7 @@ $radio-prefix-cls: string.unquote('#{theme.$prefix}-radio');
180
182
  height: $radio-button-size-separator-height;
181
183
  background-color: $radio-button-color-separator-bg;
182
184
  transform: translateY(-50%);
183
- transition: all theme.$transition-duration-1 theme.$transition-timing-function-linear;
185
+ transition: opacity theme.$transition-duration-1 theme.$transition-timing-function-standard;
184
186
  content: '';
185
187
  }
186
188
 
package/es/rate/rate.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { useFormItem } from "../_hooks/use-form-item.js";
2
2
  import { getPrefixCls } from "../_utils/global-config.js";
3
3
  import { isNull, isObject, isString, isUndefined } from "../_utils/is.js";
4
+ import { KEYBOARD_KEY } from "../_utils/keyboard.js";
4
5
  import { useAllowClear } from "../_hooks/use-allow-clear.js";
5
6
  import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
6
7
  import Tooltip from "../tooltip/index.js";
@@ -178,6 +179,25 @@ var rate_default = /* @__PURE__ */ defineComponent({
178
179
  const handleAnimationEnd = (index) => {
179
180
  if (animation.value && index + 1 >= computedValue.value - 1) animation.value = false;
180
181
  };
182
+ const handleKeydown = (e) => {
183
+ if (mergedDisabled.value) return;
184
+ const step = props.allowHalf ? .5 : 1;
185
+ let next = computedValue.value;
186
+ if (e.key === KEYBOARD_KEY.ARROW_RIGHT || e.key === KEYBOARD_KEY.ARROW_UP) next = next + step;
187
+ else if (e.key === KEYBOARD_KEY.ARROW_LEFT || e.key === KEYBOARD_KEY.ARROW_DOWN) next = next - step;
188
+ else if (e.key === KEYBOARD_KEY.HOME) next = 0;
189
+ else if (e.key === KEYBOARD_KEY.END) next = indexArray.value.length;
190
+ else return;
191
+ e.preventDefault();
192
+ next = Math.max(0, Math.min(next, indexArray.value.length));
193
+ if (next !== computedValue.value) {
194
+ var _eventHandlers$value4, _eventHandlers$value5;
195
+ _value.value = next;
196
+ emit("update:modelValue", next);
197
+ emit("change", next);
198
+ (_eventHandlers$value4 = eventHandlers.value) === null || _eventHandlers$value4 === void 0 || (_eventHandlers$value5 = _eventHandlers$value4.onChange) === null || _eventHandlers$value5 === void 0 || _eventHandlers$value5.call(_eventHandlers$value4);
199
+ }
200
+ };
181
201
  const renderGradingCharacter = (index, displayIndex) => {
182
202
  if (index > displayIndex) return createVNode(IconFaceMehFill, null, null);
183
203
  if (displayIndex <= 2) return createVNode(IconFaceFrownFill, null, null);
@@ -237,7 +257,11 @@ var rate_default = /* @__PURE__ */ defineComponent({
237
257
  "position": "top"
238
258
  }, { default: () => [createVNode("div", {
239
259
  "class": cls.value,
240
- "onMouseleave": resetHoverIndex
260
+ "role": "radiogroup",
261
+ "aria-label": "Rating",
262
+ "tabindex": mergedDisabled.value ? void 0 : 0,
263
+ "onMouseleave": resetHoverIndex,
264
+ "onKeydown": handleKeydown
241
265
  }, [indexArray.value.map((_, index) => renderCharacter(index))])] });
242
266
  }
243
267
  });
@@ -1,16 +1,16 @@
1
1
  import { PropType } from 'vue';
2
2
  export type DirectionType = 'left' | 'right' | 'top' | 'bottom';
3
- declare var __VLS_9: {}, __VLS_20: {
3
+ declare var __VLS_9: {}, __VLS_21: {
4
4
  direction: "top" | "bottom" | "left" | "right";
5
- }, __VLS_23: {
5
+ }, __VLS_24: {
6
6
  direction: "top" | "bottom" | "left" | "right";
7
7
  };
8
8
  type __VLS_Slots = {} & {
9
9
  default?: (props: typeof __VLS_9) => any;
10
10
  } & {
11
- 'resize-trigger'?: (props: typeof __VLS_20) => any;
11
+ 'resize-trigger'?: (props: typeof __VLS_21) => any;
12
12
  } & {
13
- 'resize-trigger-icon'?: (props: typeof __VLS_23) => any;
13
+ 'resize-trigger-icon'?: (props: typeof __VLS_24) => any;
14
14
  };
15
15
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
16
16
  width: {
@@ -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 } from "../_utils/is.js";
4
4
  import { off, on } from "../_utils/dom.js";
5
+ import { KEYBOARD_KEY } from "../_utils/keyboard.js";
5
6
  import useMergeState from "../_hooks/use-merge-state.js";
6
7
  import resize_trigger_default from "../_components/resize-trigger.js";
7
8
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createSlots, defineComponent, mergeProps, normalizeClass, openBlock, reactive, ref, renderList, renderSlot, resolveDynamicComponent, toRefs, unref, withCtx } from "vue";
@@ -167,6 +168,30 @@ var resize_box_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
167
168
  record.padding[direction] = size;
168
169
  paddingStyles[`padding-${direction}`] = `${size}px`;
169
170
  }
171
+ function onTriggerKeydown(direction, e) {
172
+ const horiz = direction === DIRECTION_LEFT || direction === DIRECTION_RIGHT;
173
+ const key = e.key;
174
+ const posKey = horiz ? KEYBOARD_KEY.ARROW_RIGHT : KEYBOARD_KEY.ARROW_DOWN;
175
+ const negKey = horiz ? KEYBOARD_KEY.ARROW_LEFT : KEYBOARD_KEY.ARROW_UP;
176
+ if (key !== posKey && key !== negKey) return;
177
+ e.preventDefault();
178
+ const step = e.shiftKey ? 20 : 10;
179
+ const dirSign = direction === DIRECTION_LEFT || direction === DIRECTION_TOP ? -1 : 1;
180
+ const delta = step * (key === posKey ? 1 : -1) * dirSign;
181
+ if (horiz) {
182
+ var _wrapperRef$value$cli, _wrapperRef$value3;
183
+ const base = isNumber(resWidth.value) ? resWidth.value : (_wrapperRef$value$cli = (_wrapperRef$value3 = wrapperRef.value) === null || _wrapperRef$value3 === void 0 ? void 0 : _wrapperRef$value3.clientWidth) !== null && _wrapperRef$value$cli !== void 0 ? _wrapperRef$value$cli : 0;
184
+ const newWidth = Math.max(0, base + delta);
185
+ setResWidth(newWidth);
186
+ emit("update:width", newWidth);
187
+ } else {
188
+ var _wrapperRef$value$cli2, _wrapperRef$value4;
189
+ const base = isNumber(resHeight.value) ? resHeight.value : (_wrapperRef$value$cli2 = (_wrapperRef$value4 = wrapperRef.value) === null || _wrapperRef$value4 === void 0 ? void 0 : _wrapperRef$value4.clientHeight) !== null && _wrapperRef$value$cli2 !== void 0 ? _wrapperRef$value$cli2 : 0;
190
+ const newHeight = Math.max(0, base + delta);
191
+ setResHeight(newHeight);
192
+ emit("update:height", newHeight);
193
+ }
194
+ }
170
195
  return (_ctx, _cache) => {
171
196
  return openBlock(), createBlock(resolveDynamicComponent(__props.component), mergeProps({
172
197
  ref_key: "wrapperRef",
@@ -184,6 +209,9 @@ var resize_box_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
184
209
  },
185
210
  onResize: (entry) => {
186
211
  onTiggerResize(direction, entry);
212
+ },
213
+ onKeydown: (e) => {
214
+ onTriggerKeydown(direction, e);
187
215
  }
188
216
  }, createSlots({
189
217
  default: withCtx(() => [_ctx.$slots["resize-trigger"] ? renderSlot(_ctx.$slots, "resize-trigger", {
@@ -200,7 +228,8 @@ var resize_box_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
200
228
  "class",
201
229
  "direction",
202
230
  "onMousedown",
203
- "onResize"
231
+ "onResize",
232
+ "onKeydown"
204
233
  ]);
205
234
  }), 128))]),
206
235
  _: 3
@@ -67,10 +67,13 @@ var result_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
67
67
  const prefixCls = getPrefixCls("result");
68
68
  return (_ctx, _cache) => {
69
69
  return openBlock(), createElementBlock("div", { class: normalizeClass(unref(prefixCls)) }, [
70
- createElementVNode("div", { class: normalizeClass([`${unref(prefixCls)}-icon`, {
71
- [`${unref(prefixCls)}-icon-${__props.status}`]: __props.status,
72
- [`${unref(prefixCls)}-icon-custom`]: __props.status === null
73
- }]) }, [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-icon-tip`) }, [renderSlot(_ctx.$slots, "icon", {}, () => [__props.status === "info" ? (openBlock(), createBlock(unref(IconInfo), { key: 0 })) : __props.status === "success" ? (openBlock(), createBlock(unref(IconCheck), { key: 1 })) : __props.status === "warning" ? (openBlock(), createBlock(unref(IconExclamation), { key: 2 })) : __props.status === "error" ? (openBlock(), createBlock(unref(IconClose), { key: 3 })) : __props.status === "403" ? (openBlock(), createBlock(unref(_403_default), { key: 4 })) : __props.status === "404" ? (openBlock(), createBlock(unref(_404_default), { key: 5 })) : __props.status === "500" ? (openBlock(), createBlock(unref(_500_default), { key: 6 })) : createCommentVNode("", true)])], 2)], 2),
70
+ createElementVNode("div", {
71
+ "aria-hidden": "true",
72
+ class: normalizeClass([`${unref(prefixCls)}-icon`, {
73
+ [`${unref(prefixCls)}-icon-${__props.status}`]: __props.status,
74
+ [`${unref(prefixCls)}-icon-custom`]: __props.status === null
75
+ }])
76
+ }, [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-icon-tip`) }, [renderSlot(_ctx.$slots, "icon", {}, () => [__props.status === "info" ? (openBlock(), createBlock(unref(IconInfo), { key: 0 })) : __props.status === "success" ? (openBlock(), createBlock(unref(IconCheck), { key: 1 })) : __props.status === "warning" ? (openBlock(), createBlock(unref(IconExclamation), { key: 2 })) : __props.status === "error" ? (openBlock(), createBlock(unref(IconClose), { key: 3 })) : __props.status === "403" ? (openBlock(), createBlock(unref(_403_default), { key: 4 })) : __props.status === "404" ? (openBlock(), createBlock(unref(_404_default), { key: 5 })) : __props.status === "500" ? (openBlock(), createBlock(unref(_500_default), { key: 6 })) : createCommentVNode("", true)])], 2)], 2),
74
77
  __props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
75
78
  key: 0,
76
79
  class: normalizeClass(`${unref(prefixCls)}-title`)