x-next 1.16.1 → 1.18.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 (179) hide show
  1. package/AI_USAGE/catalog.md +3 -2
  2. package/AI_USAGE/components/alert-api.md +1 -1
  3. package/AI_USAGE/components/alert.md +33 -1
  4. package/AI_USAGE/components/bar-chart-api.md +1 -1
  5. package/AI_USAGE/components/bar-chart.md +1 -1
  6. package/AI_USAGE/components/boxicons.md +1 -1
  7. package/AI_USAGE/components/button-api.md +13 -16
  8. package/AI_USAGE/components/button.md +242 -31
  9. package/AI_USAGE/components/charts.md +1 -1
  10. package/AI_USAGE/components/checkbox-api.md +1 -1
  11. package/AI_USAGE/components/checkbox.md +1 -1
  12. package/AI_USAGE/components/color-picker-api.md +1 -1
  13. package/AI_USAGE/components/color-picker.md +1 -1
  14. package/AI_USAGE/components/config-provider-api.md +1 -1
  15. package/AI_USAGE/components/config-provider.md +1 -1
  16. package/AI_USAGE/components/date-picker-api.md +1 -1
  17. package/AI_USAGE/components/date-picker.md +1 -1
  18. package/AI_USAGE/components/dialog-api.md +1 -1
  19. package/AI_USAGE/components/dialog.md +1 -1
  20. package/AI_USAGE/components/draggable-api.md +1 -1
  21. package/AI_USAGE/components/draggable.md +1 -1
  22. package/AI_USAGE/components/drawer-api.md +3 -3
  23. package/AI_USAGE/components/drawer.md +1 -1
  24. package/AI_USAGE/components/dropdown-api.md +3 -3
  25. package/AI_USAGE/components/dropdown.md +1 -1
  26. package/AI_USAGE/components/empty-api.md +1 -1
  27. package/AI_USAGE/components/empty.md +1 -1
  28. package/AI_USAGE/components/finicon.md +1 -1
  29. package/AI_USAGE/components/form-api.md +1 -1
  30. package/AI_USAGE/components/form.md +1 -1
  31. package/AI_USAGE/components/grid-api.md +1 -1
  32. package/AI_USAGE/components/grid.md +1 -1
  33. package/AI_USAGE/components/heatmap-api.md +1 -1
  34. package/AI_USAGE/components/heatmap.md +1 -1
  35. package/AI_USAGE/components/icon-api.md +1 -1
  36. package/AI_USAGE/components/icon.md +1 -1
  37. package/AI_USAGE/components/image-api.md +1 -1
  38. package/AI_USAGE/components/image.md +1 -1
  39. package/AI_USAGE/components/input-api.md +2 -2
  40. package/AI_USAGE/components/input-number-api.md +1 -1
  41. package/AI_USAGE/components/input-number.md +1 -1
  42. package/AI_USAGE/components/input-tag-api.md +1 -1
  43. package/AI_USAGE/components/input-tag.md +1 -1
  44. package/AI_USAGE/components/input.md +1 -1
  45. package/AI_USAGE/components/layout-api.md +1 -1
  46. package/AI_USAGE/components/layout.md +1 -1
  47. package/AI_USAGE/components/line-chart-api.md +1 -1
  48. package/AI_USAGE/components/line-chart.md +1 -1
  49. package/AI_USAGE/components/link-api.md +1 -1
  50. package/AI_USAGE/components/link.md +1 -1
  51. package/AI_USAGE/components/menu-api.md +1 -1
  52. package/AI_USAGE/components/menu.md +1 -1
  53. package/AI_USAGE/components/message-api.md +1 -1
  54. package/AI_USAGE/components/message-box-api.md +1 -1
  55. package/AI_USAGE/components/message-box.md +1 -1
  56. package/AI_USAGE/components/message.md +1 -1
  57. package/AI_USAGE/components/network-api.md +1 -1
  58. package/AI_USAGE/components/network.md +1 -1
  59. package/AI_USAGE/components/notification-api.md +1 -1
  60. package/AI_USAGE/components/notification.md +1 -1
  61. package/AI_USAGE/components/pagination-api.md +1 -1
  62. package/AI_USAGE/components/pagination.md +1 -1
  63. package/AI_USAGE/components/pie-chart-api.md +1 -1
  64. package/AI_USAGE/components/pie-chart.md +1 -1
  65. package/AI_USAGE/components/popconfirm-api.md +3 -3
  66. package/AI_USAGE/components/popconfirm.md +1 -1
  67. package/AI_USAGE/components/popover-api.md +1 -1
  68. package/AI_USAGE/components/popover.md +1 -1
  69. package/AI_USAGE/components/popup-api.md +1 -1
  70. package/AI_USAGE/components/popup.md +1 -1
  71. package/AI_USAGE/components/progress-api.md +1 -1
  72. package/AI_USAGE/components/progress.md +1 -1
  73. package/AI_USAGE/components/radio-api.md +1 -1
  74. package/AI_USAGE/components/radio.md +1 -1
  75. package/AI_USAGE/components/rate-api.md +1 -1
  76. package/AI_USAGE/components/rate.md +1 -1
  77. package/AI_USAGE/components/resize-box-api.md +1 -1
  78. package/AI_USAGE/components/resize-box.md +1 -1
  79. package/AI_USAGE/components/scrollbar-api.md +1 -1
  80. package/AI_USAGE/components/scrollbar.md +1 -1
  81. package/AI_USAGE/components/select-api.md +1 -1
  82. package/AI_USAGE/components/select.md +1 -1
  83. package/AI_USAGE/components/skeleton-api.md +1 -1
  84. package/AI_USAGE/components/skeleton.md +1 -1
  85. package/AI_USAGE/components/slider-api.md +1 -1
  86. package/AI_USAGE/components/slider.md +1 -1
  87. package/AI_USAGE/components/space-api.md +1 -1
  88. package/AI_USAGE/components/space.md +1 -1
  89. package/AI_USAGE/components/spin-api.md +1 -1
  90. package/AI_USAGE/components/spin.md +1 -1
  91. package/AI_USAGE/components/steps-api.md +1 -1
  92. package/AI_USAGE/components/steps.md +1 -1
  93. package/AI_USAGE/components/switch-api.md +1 -1
  94. package/AI_USAGE/components/switch.md +1 -1
  95. package/AI_USAGE/components/table-api.md +1 -1
  96. package/AI_USAGE/components/table.md +1 -1
  97. package/AI_USAGE/components/tabs-api.md +1 -1
  98. package/AI_USAGE/components/tabs.md +1 -1
  99. package/AI_USAGE/components/tag-api.md +1 -1
  100. package/AI_USAGE/components/tag.md +1 -1
  101. package/AI_USAGE/components/textarea-api.md +1 -1
  102. package/AI_USAGE/components/textarea.md +1 -1
  103. package/AI_USAGE/components/time-picker-api.md +1 -1
  104. package/AI_USAGE/components/time-picker.md +1 -1
  105. package/AI_USAGE/components/time-range-selector-api.md +1 -1
  106. package/AI_USAGE/components/time-range-selector.md +1 -1
  107. package/AI_USAGE/components/timeline-api.md +3 -3
  108. package/AI_USAGE/components/timeline.md +1 -1
  109. package/AI_USAGE/components/tooltip-api.md +1 -1
  110. package/AI_USAGE/components/tooltip.md +1 -1
  111. package/AI_USAGE/components/transfer-api.md +165 -0
  112. package/AI_USAGE/components/transfer.md +515 -0
  113. package/AI_USAGE/components/tree-select-api.md +1 -1
  114. package/AI_USAGE/components/tree-select.md +1 -1
  115. package/AI_USAGE/components/trend-chart-api.md +1 -1
  116. package/AI_USAGE/components/trend-chart.md +1 -1
  117. package/AI_USAGE/components/trigger-api.md +1 -1
  118. package/AI_USAGE/components/trigger.md +1 -1
  119. package/AI_USAGE/components/upload-api.md +1 -1
  120. package/AI_USAGE/components/upload.md +1 -1
  121. package/AI_USAGE/components/watermark-api.md +1 -1
  122. package/AI_USAGE/components/watermark.md +1 -1
  123. package/AI_USAGE/core.md +1 -1
  124. package/AI_USAGE/index.md +3 -2
  125. package/AI_USAGE/recipes/form-on-demand.md +1 -1
  126. package/AI_USAGE.md +957 -57
  127. package/CHANGELOG.md +40 -0
  128. package/dist/_styles/palette-aliases.d.ts +1 -0
  129. package/dist/components/button/Button.d.ts +0 -9
  130. package/dist/components/button/appearance.d.ts +7 -0
  131. package/dist/components/button/index.d.ts +0 -16
  132. package/dist/components/button/props.d.ts +2 -6
  133. package/dist/components/color-picker/panel.d.ts +0 -9
  134. package/dist/components/date-picker/DatePicker.vue.d.ts +0 -15
  135. package/dist/components/date-picker/index.d.ts +0 -30
  136. package/dist/components/drawer/index.d.ts +0 -30
  137. package/dist/components/drawer/src/Drawer.vue.d.ts +0 -15
  138. package/dist/components/dropdown/DropdownButton.vue.d.ts +0 -15
  139. package/dist/components/dropdown/index.d.ts +0 -30
  140. package/dist/components/index.d.ts +1 -0
  141. package/dist/components/popconfirm/src/popup.vue.d.ts +0 -15
  142. package/dist/components/time-picker/TimePanel.vue.d.ts +0 -15
  143. package/dist/components/time-picker/TimePicker.vue.d.ts +0 -15
  144. package/dist/components/time-picker/index.d.ts +0 -30
  145. package/dist/components/transfer/Transfer.d.ts +211 -0
  146. package/dist/components/transfer/index.d.ts +299 -0
  147. package/dist/components/transfer/interface.d.ts +80 -0
  148. package/dist/components/transfer/transfer-panel.d.ts +82 -0
  149. package/dist/components/transfer/utils.d.ts +5 -0
  150. package/dist/es/_styles/palette-aliases.js +102 -17
  151. package/dist/es/_utils/palette.js +54 -54
  152. package/dist/es/components/button/Button.js +77 -49
  153. package/dist/es/components/button/appearance.js +7 -0
  154. package/dist/es/components/button/props.js +0 -4
  155. package/dist/es/components/index.js +47 -45
  156. package/dist/es/components/transfer/Transfer.js +267 -0
  157. package/dist/es/components/transfer/index.js +7 -0
  158. package/dist/es/components/transfer/transfer-panel.js +251 -0
  159. package/dist/es/components/transfer/utils.js +9 -0
  160. package/dist/es/directives/wave.js +14 -8
  161. package/dist/es/index.js +46 -44
  162. package/dist/es/locale/en-US.js +16 -0
  163. package/dist/es/locale/zh-CN.js +16 -0
  164. package/dist/es/style.css +1 -1
  165. package/dist/index.cjs +3 -3
  166. package/dist/index.umd.js +3 -3
  167. package/dist/locale/interface.d.ts +16 -0
  168. package/dist/style/alert.css +1 -1
  169. package/dist/style/base.css +1 -1
  170. package/dist/style/button.css +1 -1
  171. package/dist/style/color-picker.css +1 -1
  172. package/dist/style/dependencies.json +14 -0
  173. package/dist/style/link.css +1 -1
  174. package/dist/style/transfer.css +1 -0
  175. package/dist/style/transfer.js +12 -0
  176. package/dist/style.css +1 -1
  177. package/dist/types.d.ts +1 -0
  178. package/package.json +3 -1
  179. package/volar.d.ts +1 -0
@@ -5,7 +5,7 @@ import { Dialog as n } from "./dialog/index.js";
5
5
  import { Drawer as u } from "./drawer/index.js";
6
6
  import { Dropdown as c, DropdownButton as d, DropdownGroup as T, DropdownOption as S, DropdownSubmenu as P } from "./dropdown/index.js";
7
7
  import { Empty as I } from "./empty/index.js";
8
- import { DatePicker as w, MonthPicker as L, QuarterPicker as b, RangePicker as s, WeekPicker as C, YearPicker as h } from "./date-picker/index.js";
8
+ import { DatePicker as s, MonthPicker as w, QuarterPicker as L, RangePicker as b, WeekPicker as C, YearPicker as h } from "./date-picker/index.js";
9
9
  import { Form as y, FormItem as G } from "./form/index.js";
10
10
  import { Checkbox as B, CheckboxGroup as M } from "./form-checkbox/index.js";
11
11
  import { Input as A, InputGroup as E, InputPassword as _, InputSearch as N } from "./form-input/index.js";
@@ -22,7 +22,7 @@ import { Draggable as xo } from "./draggable/index.js";
22
22
  import { Col as no, Grid as io, GridItem as uo, Row as lo } from "./grid/index.js";
23
23
  import { Heatmap as To } from "./heatmap/index.js";
24
24
  import { Image as Po, ImagePreview as go, ImagePreviewAction as Io, ImagePreviewGroup as ko } from "./image/index.js";
25
- import { Layout as Lo, LayoutContent as bo, LayoutFooter as so, LayoutHeader as Co, LayoutSidebar as ho } from "./layout/index.js";
25
+ import { Layout as wo, LayoutContent as Lo, LayoutFooter as bo, LayoutHeader as Co, LayoutSidebar as ho } from "./layout/index.js";
26
26
  import { LineChart as yo } from "./line-chart/index.js";
27
27
  import { Link as vo } from "./link/index.js";
28
28
  import { Menu as Mo, MenuItem as Ro, MenuItemGroup as Ao, MenuSubMenu as Eo } from "./menu/index.js";
@@ -43,28 +43,29 @@ import { Space as ur } from "./space/index.js";
43
43
  import { Spin as cr } from "./spin/index.js";
44
44
  import { Step as Tr, Steps as Sr } from "./steps/index.js";
45
45
  import { Table as gr, TableColumn as Ir } from "./table/index.js";
46
- import { TabPane as wr, Tabs as Lr } from "./tabs/index.js";
47
- import { Tag as sr } from "./tag/index.js";
46
+ import { TabPane as sr, Tabs as wr } from "./tabs/index.js";
47
+ import { Tag as br } from "./tag/index.js";
48
48
  import { TimePicker as hr } from "./time-picker/index.js";
49
49
  import { TimeRangeSelector as yr } from "./time-range-selector/index.js";
50
50
  import { Timeline as vr } from "./timeline/index.js";
51
51
  import { TimelineItem as Mr } from "./timeline-item/index.js";
52
52
  import { Tooltip as Ar } from "./tooltip/index.js";
53
53
  import { TreeSelect as _r, TreeSelectDropdown as Nr } from "./tree-select/index.js";
54
- import { TrendChart as jr } from "./trend-chart/index.js";
55
- import { Trigger as Hr } from "./trigger/index.js";
56
- import { Upload as Wr } from "./upload/index.js";
57
- import { Watermark as zr } from "./watermark/index.js";
58
- import { TABLE_LOCALE_EN_US as Yr, TABLE_LOCALE_ZH_CN as Zr, formatLocaleText as qr } from "./table/locale.js";
59
- import { default as Vr } from "./table/table-tbody.js";
60
- import { default as $r } from "./table/table-td.js";
61
- import { default as re } from "./table/table-th.js";
62
- import { default as te } from "./table/table-thead.js";
63
- import { default as me } from "./table/table-tr.js";
64
- import { configProviderInjectionKey as xe } from "./config-provider/context.js";
65
- import { formInjectionKey as ne, formItemInjectionKey as ie } from "./form/context.js";
66
- import { vDraggable as le } from "./draggable/directive.js";
67
- import { vWatermark as de } from "./watermark/directive.js";
54
+ import { Transfer as jr } from "./transfer/index.js";
55
+ import { TrendChart as Hr } from "./trend-chart/index.js";
56
+ import { Trigger as Wr } from "./trigger/index.js";
57
+ import { Upload as zr } from "./upload/index.js";
58
+ import { Watermark as Yr } from "./watermark/index.js";
59
+ import { TABLE_LOCALE_EN_US as qr, TABLE_LOCALE_ZH_CN as Jr, formatLocaleText as Vr } from "./table/locale.js";
60
+ import { default as $r } from "./table/table-tbody.js";
61
+ import { default as re } from "./table/table-td.js";
62
+ import { default as te } from "./table/table-th.js";
63
+ import { default as me } from "./table/table-thead.js";
64
+ import { default as xe } from "./table/table-tr.js";
65
+ import { configProviderInjectionKey as ne } from "./config-provider/context.js";
66
+ import { formInjectionKey as ue, formItemInjectionKey as le } from "./form/context.js";
67
+ import { vDraggable as de } from "./draggable/directive.js";
68
+ import { vWatermark as Se } from "./watermark/directive.js";
68
69
  export {
69
70
  e as Alert,
70
71
  mo as BarChart,
@@ -75,7 +76,7 @@ export {
75
76
  no as Col,
76
77
  to as ColorPicker,
77
78
  x as ConfigProvider,
78
- w as DatePicker,
79
+ s as DatePicker,
79
80
  n as Dialog,
80
81
  xo as Draggable,
81
82
  u as Drawer,
@@ -100,9 +101,9 @@ export {
100
101
  _ as InputPassword,
101
102
  N as InputSearch,
102
103
  H as InputTag,
103
- Lo as Layout,
104
- bo as LayoutContent,
105
- so as LayoutFooter,
104
+ wo as Layout,
105
+ Lo as LayoutContent,
106
+ bo as LayoutFooter,
106
107
  Co as LayoutHeader,
107
108
  ho as LayoutSidebar,
108
109
  yo as LineChart,
@@ -112,7 +113,7 @@ export {
112
113
  Ao as MenuItemGroup,
113
114
  Eo as MenuSubMenu,
114
115
  No as Message,
115
- L as MonthPicker,
116
+ w as MonthPicker,
116
117
  jo as Network,
117
118
  Ho as Notification,
118
119
  Wo as Pagination,
@@ -121,10 +122,10 @@ export {
121
122
  qo as Popover,
122
123
  Vo as Popup,
123
124
  $o as Progress,
124
- b as QuarterPicker,
125
+ L as QuarterPicker,
125
126
  W as Radio,
126
127
  U as RadioGroup,
127
- s as RangePicker,
128
+ b as RangePicker,
128
129
  rr as Rate,
129
130
  tr as ResizeBox,
130
131
  lo as Row,
@@ -142,36 +143,37 @@ export {
142
143
  Tr as Step,
143
144
  Sr as Steps,
144
145
  $ as Switch,
145
- Yr as TABLE_LOCALE_EN_US,
146
- Zr as TABLE_LOCALE_ZH_CN,
147
- wr as TabPane,
146
+ qr as TABLE_LOCALE_EN_US,
147
+ Jr as TABLE_LOCALE_ZH_CN,
148
+ sr as TabPane,
148
149
  gr as Table,
149
150
  Ir as TableColumn,
150
- Lr as Tabs,
151
- sr as Tag,
152
- Vr as Tbody,
153
- $r as Td,
151
+ wr as Tabs,
152
+ br as Tag,
153
+ $r as Tbody,
154
+ re as Td,
154
155
  ro as Textarea,
155
- re as Th,
156
- te as Thead,
156
+ te as Th,
157
+ me as Thead,
157
158
  hr as TimePicker,
158
159
  yr as TimeRangeSelector,
159
160
  vr as Timeline,
160
161
  Mr as TimelineItem,
161
162
  Ar as Tooltip,
162
- me as Tr,
163
+ xe as Tr,
164
+ jr as Transfer,
163
165
  _r as TreeSelect,
164
166
  Nr as TreeSelectDropdown,
165
- jr as TrendChart,
166
- Hr as Trigger,
167
- Wr as Upload,
168
- zr as Watermark,
167
+ Hr as TrendChart,
168
+ Wr as Trigger,
169
+ zr as Upload,
170
+ Yr as Watermark,
169
171
  C as WeekPicker,
170
172
  h as YearPicker,
171
- xe as configProviderInjectionKey,
172
- ne as formInjectionKey,
173
- ie as formItemInjectionKey,
174
- qr as formatLocaleText,
175
- le as vDraggable,
176
- de as vWatermark
173
+ ne as configProviderInjectionKey,
174
+ ue as formInjectionKey,
175
+ le as formItemInjectionKey,
176
+ Vr as formatLocaleText,
177
+ de as vDraggable,
178
+ Se as vWatermark
177
179
  };
@@ -0,0 +1,267 @@
1
+ import { defineComponent as R, toRefs as G, provide as J, ref as L, computed as d, watch as D, createVNode as g, mergeProps as Q } from "vue";
2
+ import { Button as E } from "../button/index.js";
3
+ import U from "./transfer-panel.js";
4
+ import { Icon as M } from "../../icons/index.js";
5
+ import { useLocale as X } from "../../locale/index.js";
6
+ import { useFormItem as Y, useFormItemControl as Z } from "../../_hooks/use-form-item.js";
7
+ import { formItemInjectionKey as k } from "../form/context.js";
8
+ import { uniqueValues as i, uniqueItems as p } from "./utils.js";
9
+ const oe = /* @__PURE__ */ R({
10
+ name: "Transfer",
11
+ inheritAttrs: !1,
12
+ props: {
13
+ /** @zh 穿梭框数据,value 在数据内唯一 @en Transfer data with unique values */
14
+ data: {
15
+ type: Array,
16
+ default: () => []
17
+ },
18
+ /** @zh 目标列表的值 @en Target values @vModel */
19
+ modelValue: {
20
+ type: Array,
21
+ default: void 0
22
+ },
23
+ /** @zh 非受控目标默认值 @en Default target values */
24
+ defaultValue: {
25
+ type: Array,
26
+ default: () => []
27
+ },
28
+ /** @zh 两侧临时勾选值 @en Checked values in both panels @vModel */
29
+ selectedKeys: {
30
+ type: Array,
31
+ default: void 0
32
+ },
33
+ /** @zh 非受控默认勾选值 @en Default checked values */
34
+ defaultSelectedKeys: {
35
+ type: Array,
36
+ default: () => []
37
+ },
38
+ /** @zh 禁用整个穿梭框 @en Disable transfer */
39
+ disabled: {
40
+ type: Boolean,
41
+ default: !1
42
+ },
43
+ /** @zh 加载中,阻止勾选和移动 @en Loading, blocks selection and moves */
44
+ loading: {
45
+ type: Boolean,
46
+ default: !1
47
+ },
48
+ /** @zh 错误状态 @en Error state */
49
+ error: {
50
+ type: Boolean,
51
+ default: !1
52
+ },
53
+ /** @zh 点击选项立即移动 @en Move items immediately when clicked */
54
+ simple: {
55
+ type: Boolean,
56
+ default: !1
57
+ },
58
+ /** @zh 单向模式,目标侧通过移除按钮返回 @en One-way mode with target remove buttons */
59
+ oneWay: {
60
+ type: Boolean,
61
+ default: !1
62
+ },
63
+ /** @zh 显示两侧搜索 @en Show search inputs */
64
+ showSearch: {
65
+ type: Boolean,
66
+ default: !1
67
+ },
68
+ /** @zh 显示全选,搜索/分页时仅当前可见项 @en Select all visible items */
69
+ showSelectAll: {
70
+ type: Boolean,
71
+ default: !0
72
+ },
73
+ /** @zh 源、目标列表标题 @en Source and target titles */
74
+ title: Array,
75
+ /** @zh 向右、向左操作文案 @en Move right and left operation labels */
76
+ operations: {
77
+ type: Array,
78
+ default: () => []
79
+ },
80
+ /** @zh 搜索占位文案 @en Search placeholder */
81
+ searchPlaceholder: String,
82
+ /** @zh 自定义搜索过滤 @en Custom search filter */
83
+ filterOption: Function,
84
+ /** @zh 目标排序:数据源顺序或模型追加顺序 @en Target ordering */
85
+ targetOrder: {
86
+ type: String,
87
+ default: "original"
88
+ },
89
+ /** @zh 两侧面板样式 @en Panel style */
90
+ listStyle: Object,
91
+ /** @zh 分页配置,优先于虚拟列表 @en Pagination takes precedence over virtual list */
92
+ pagination: {
93
+ type: [Boolean, Object],
94
+ default: !1
95
+ },
96
+ /** @zh 虚拟滚动配置 @en Virtual list options */
97
+ virtualListProps: Object
98
+ },
99
+ emits: {
100
+ "update:modelValue": (a) => !0,
101
+ "update:selectedKeys": (a) => !0,
102
+ /** @zh 移动完成时报告目标值、移动方向及实际移动值 @en Target values, destination and moved values */
103
+ change: (a, u, s) => !0,
104
+ /** @zh 临时勾选变化,分别报告源侧和目标侧 @en Source and target checked values */
105
+ select: (a, u) => !0,
106
+ /** @zh 搜索输入变化 @en Search input changes */
107
+ search: (a, u) => !0,
108
+ /** @zh 列表滚动 @en List scroll */
109
+ scroll: (a, u) => !0
110
+ },
111
+ slots: Object,
112
+ setup(a, {
113
+ attrs: u,
114
+ emit: s,
115
+ slots: r
116
+ }) {
117
+ const {
118
+ t: y
119
+ } = X(), {
120
+ disabled: q,
121
+ error: z
122
+ } = G(a), {
123
+ formItemCtx: j,
124
+ mergedDisabled: b,
125
+ mergedError: P,
126
+ eventHandlers: B
127
+ } = Y({
128
+ disabled: q,
129
+ error: z
130
+ }), I = Z(j, () => ({
131
+ ...Object.fromEntries(Object.entries(u).filter(([e]) => e === "id" || e.startsWith("aria-"))),
132
+ "aria-label": u["aria-label"] ?? (j.labelId ? void 0 : y("transfer.label"))
133
+ }), {
134
+ labelable: !1
135
+ });
136
+ J(k, {});
137
+ const K = L(i(a.modelValue ?? a.defaultValue)), T = L(i(a.selectedKeys ?? a.defaultSelectedKeys)), S = d(() => i(a.modelValue ?? K.value)), c = d(() => i(a.selectedKeys ?? T.value)), f = d(() => new Set(S.value)), _ = d(() => p(a.data)), v = d(() => new Map(_.value.map((e) => [e.value, e]))), N = d(() => _.value.filter((e) => !f.value.has(e.value))), $ = d(() => a.targetOrder === "append" ? S.value.map((e) => v.value.get(e)).filter((e) => !!e) : _.value.filter((e) => f.value.has(e.value))), O = d(() => b.value || a.loading), V = (e) => c.value.filter((l) => {
138
+ var t;
139
+ return v.value.has(l) && !((t = v.value.get(l)) != null && t.disabled) && e === "target" === f.value.has(l);
140
+ });
141
+ D(() => a.modelValue, (e) => {
142
+ e !== void 0 && (K.value = i(e));
143
+ }, {
144
+ deep: !0
145
+ }), D(() => a.selectedKeys, (e) => {
146
+ e !== void 0 && (T.value = i(e));
147
+ }, {
148
+ deep: !0
149
+ });
150
+ const W = (e) => {
151
+ if (e = i(e), e.length === c.value.length && e.every((t, n) => t === c.value[n])) return;
152
+ a.selectedKeys === void 0 && (T.value = e), s("update:selectedKeys", [...e]);
153
+ const l = e.filter((t) => {
154
+ var n;
155
+ return v.value.has(t) && !((n = v.value.get(t)) != null && n.disabled);
156
+ });
157
+ s("select", l.filter((t) => !f.value.has(t)), l.filter((t) => f.value.has(t)));
158
+ }, H = (e, l, t) => {
159
+ if (O.value || a.simple || a.oneWay && e === "target") return;
160
+ const n = i(l).filter((o) => {
161
+ const m = v.value.get(o);
162
+ return m && !m.disabled && e === "target" === f.value.has(o);
163
+ }), A = new Set(n);
164
+ W(t ? [...c.value, ...n] : c.value.filter((o) => !A.has(o)));
165
+ }, w = (e, l, t) => {
166
+ var m, C;
167
+ if (O.value) return;
168
+ const n = i(l).filter((h) => {
169
+ const F = v.value.get(h);
170
+ return F && !F.disabled && e === "target" === f.value.has(h);
171
+ });
172
+ if (!n.length) return;
173
+ const A = new Set(n), o = e === "source" ? i([...S.value, ...n]) : S.value.filter((h) => !A.has(h));
174
+ a.modelValue === void 0 && (K.value = o), s("update:modelValue", [...o]), s("change", [...o], e === "source" ? "target" : "source", [...n]), W(c.value.filter((h) => !A.has(h))), (C = (m = B.value) == null ? void 0 : m.onChange) == null || C.call(m, t);
175
+ }, x = (e) => {
176
+ var l;
177
+ return g(U, {
178
+ type: e,
179
+ data: e === "source" ? N.value : $.value,
180
+ title: ((l = a.title) == null ? void 0 : l[e === "source" ? 0 : 1]) ?? y(e === "source" ? "transfer.sourceTitle" : "transfer.targetTitle"),
181
+ selectedKeys: c.value,
182
+ disabled: !!b.value,
183
+ loading: a.loading,
184
+ simple: a.simple,
185
+ oneWay: a.oneWay,
186
+ showSearch: a.showSearch,
187
+ showSelectAll: a.showSelectAll,
188
+ searchPlaceholder: a.searchPlaceholder,
189
+ filterOption: a.filterOption,
190
+ pagination: a.pagination,
191
+ virtualListProps: a.virtualListProps,
192
+ style: a.listStyle,
193
+ onSelect: (t, n) => H(e, t, n),
194
+ onMove: (t) => w(e, t),
195
+ onSearch: (t) => s("search", t, e),
196
+ onScroll: (t) => s("scroll", t, e)
197
+ }, {
198
+ ...r.item ? {
199
+ item: r.item
200
+ } : {},
201
+ ...r[e] ? {
202
+ default: r[e]
203
+ } : {},
204
+ ...r[`${e}-title`] ? {
205
+ title: r[`${e}-title`]
206
+ } : {},
207
+ ...r.footer ? {
208
+ footer: r.footer
209
+ } : {},
210
+ ...r.empty ? {
211
+ empty: r.empty
212
+ } : {}
213
+ });
214
+ };
215
+ return () => g("div", Q(Object.fromEntries(Object.entries(u).filter(([e]) => e !== "class" && e !== "style" && e !== "id" && !e.startsWith("aria-"))), I.value, {
216
+ role: "group",
217
+ tabindex: u.tabindex === void 0 ? -1 : Number(u.tabindex),
218
+ class: ["x-transfer", {
219
+ "x-transfer-disabled": b.value,
220
+ "x-transfer-loading": a.loading,
221
+ "x-transfer-error": P.value,
222
+ "x-transfer-simple": a.simple
223
+ }, u.class],
224
+ style: u.style,
225
+ "aria-disabled": b.value || void 0,
226
+ "aria-invalid": P.value || I.value["aria-invalid"],
227
+ "aria-busy": a.loading,
228
+ onFocusin: (e) => {
229
+ var l, t;
230
+ e.currentTarget.contains(e.relatedTarget) || (t = (l = B.value) == null ? void 0 : l.onFocus) == null || t.call(l, e);
231
+ },
232
+ onFocusout: (e) => {
233
+ var l, t;
234
+ e.currentTarget.contains(e.relatedTarget) || (t = (l = B.value) == null ? void 0 : l.onBlur) == null || t.call(l, e);
235
+ }
236
+ }), [x("source"), !a.simple && g("div", {
237
+ class: "x-transfer--operations"
238
+ }, [g(E, {
239
+ size: "small",
240
+ disabled: O.value || !V("source").length,
241
+ "aria-label": y("transfer.moveToTarget"),
242
+ onClick: (e) => w("source", V("source"), e)
243
+ }, {
244
+ default: () => {
245
+ var e;
246
+ return [((e = r["to-target-icon"]) == null ? void 0 : e.call(r)) ?? g(M, {
247
+ name: "chevron-right"
248
+ }, null), a.operations[0]];
249
+ }
250
+ }), !a.oneWay && g(E, {
251
+ size: "small",
252
+ disabled: O.value || !V("target").length,
253
+ "aria-label": y("transfer.moveToSource"),
254
+ onClick: (e) => w("target", V("target"), e)
255
+ }, {
256
+ default: () => {
257
+ var e;
258
+ return [((e = r["to-source-icon"]) == null ? void 0 : e.call(r)) ?? g(M, {
259
+ name: "chevron-left"
260
+ }, null), a.operations[1]];
261
+ }
262
+ })]), x("target")]);
263
+ }
264
+ });
265
+ export {
266
+ oe as default
267
+ };
@@ -0,0 +1,7 @@
1
+ import r from "./Transfer.js";
2
+ import { generateComponent as o } from "../../_utils/vue-eco.js";
3
+ import { getComponentPrefix as e } from "../../_utils/config.js";
4
+ const f = o(e("Transfer"), r);
5
+ export {
6
+ f as Transfer
7
+ };