x-next 1.4.0 → 1.6.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 (144) hide show
  1. package/AI_USAGE.md +2 -2
  2. package/CHANGELOG.md +71 -0
  3. package/dist/_utils/color.d.ts +53 -0
  4. package/dist/components/color-picker/ColorPicker.d.ts +239 -0
  5. package/dist/components/color-picker/gradient-slider.d.ts +52 -0
  6. package/dist/components/color-picker/index.d.ts +238 -0
  7. package/dist/components/color-picker/panel.d.ts +721 -0
  8. package/dist/components/color-picker/sv-panel.d.ts +48 -0
  9. package/dist/components/date-picker/DatePicker.vue.d.ts +3 -3
  10. package/dist/components/date-picker/index.d.ts +6 -6
  11. package/dist/components/dropdown/Dropdown.vue.d.ts +34 -4
  12. package/dist/components/dropdown/DropdownButton.vue.d.ts +37 -6
  13. package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +34 -4
  14. package/dist/components/dropdown/dropdown-panel.vue.d.ts +30 -0
  15. package/dist/components/dropdown/index.d.ts +212 -29
  16. package/dist/components/form/FormItem.vue.d.ts +3 -3
  17. package/dist/components/form/form-item-label.vue.d.ts +3 -3
  18. package/dist/components/form/index.d.ts +6 -6
  19. package/dist/components/form-select/Select.d.ts +3 -3
  20. package/dist/components/form-select/SelectDropdown.vue.d.ts +30 -0
  21. package/dist/components/form-select/index.d.ts +66 -6
  22. package/dist/components/form-slider/Slider.vue.d.ts +3 -3
  23. package/dist/components/form-slider/index.d.ts +6 -6
  24. package/dist/components/form-slider/slider-button.vue.d.ts +3 -3
  25. package/dist/components/heatmap/Heatmap.d.ts +311 -0
  26. package/dist/components/heatmap/helpers/matrix.d.ts +58 -0
  27. package/dist/components/heatmap/index.d.ts +372 -0
  28. package/dist/components/heatmap/interface.d.ts +57 -0
  29. package/dist/components/image/Image.vue.d.ts +3 -3
  30. package/dist/components/image/ImagePreview.vue.d.ts +3 -3
  31. package/dist/components/image/ImagePreviewAction.d.ts +3 -3
  32. package/dist/components/image/ImagePreviewGroup.vue.d.ts +3 -3
  33. package/dist/components/image/index.d.ts +24 -24
  34. package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
  35. package/dist/components/index.d.ts +2 -0
  36. package/dist/components/menu/sub-menu-pop.vue.d.ts +3 -3
  37. package/dist/components/network/Network.vue.d.ts +1 -1
  38. package/dist/components/network/index.d.ts +3 -3
  39. package/dist/components/network/utils.d.ts +2 -0
  40. package/dist/components/pagination/page-item-ellipsis.vue.d.ts +9 -0
  41. package/dist/components/pagination/page-jumper.vue.d.ts +6 -0
  42. package/dist/components/pagination/page-options.vue.d.ts +6 -6
  43. package/dist/components/popover/Popover.d.ts +1 -1
  44. package/dist/components/popover/index.d.ts +3 -3
  45. package/dist/components/popup/Popup.d.ts +1 -1
  46. package/dist/components/popup/index.d.ts +3 -3
  47. package/dist/components/skeleton/SkeletonShape.vue.d.ts +3 -3
  48. package/dist/components/skeleton/index.d.ts +6 -6
  49. package/dist/components/spin/Spin.d.ts +38 -0
  50. package/dist/components/spin/index.d.ts +30 -0
  51. package/dist/components/steps/context.d.ts +9 -0
  52. package/dist/components/table/Table.d.ts +1 -1
  53. package/dist/components/table/index.d.ts +3 -3
  54. package/dist/components/tabs/TabPane.vue.d.ts +2 -0
  55. package/dist/components/tabs/Tabs.d.ts +1 -1
  56. package/dist/components/tabs/index.d.ts +9 -3
  57. package/dist/components/tabs/interface.d.ts +4 -0
  58. package/dist/components/time-picker/TimePicker.vue.d.ts +3 -3
  59. package/dist/components/time-picker/index.d.ts +6 -6
  60. package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
  61. package/dist/components/tooltip/index.d.ts +3 -3
  62. package/dist/components/trigger/Trigger.d.ts +1 -1
  63. package/dist/components/trigger/index.d.ts +3 -3
  64. package/dist/components/watermark/Watermark.d.ts +1 -1
  65. package/dist/components/watermark/index.d.ts +3 -3
  66. package/dist/es/_styles/palette-aliases.js +8 -0
  67. package/dist/es/_utils/color.js +73 -0
  68. package/dist/es/components/button/Button.js +2 -2
  69. package/dist/es/components/color-picker/ColorPicker.js +239 -0
  70. package/dist/es/components/color-picker/gradient-slider.js +79 -0
  71. package/dist/es/components/color-picker/index.js +8 -0
  72. package/dist/es/components/color-picker/panel.js +307 -0
  73. package/dist/es/components/color-picker/sv-panel.js +99 -0
  74. package/dist/es/components/dropdown/Dropdown.vue2.js +11 -4
  75. package/dist/es/components/dropdown/DropdownButton.vue.js +8 -7
  76. package/dist/es/components/dropdown/DropdownButton.vue2.js +19 -17
  77. package/dist/es/components/dropdown/DropdownSubmenu.vue.js +18 -17
  78. package/dist/es/components/dropdown/dropdown-panel.vue.js +17 -17
  79. package/dist/es/components/form-input/Input.js +7 -7
  80. package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
  81. package/dist/es/components/form-input/InputSearch.js +2 -2
  82. package/dist/es/components/form-input-number/InputNumber.js +12 -12
  83. package/dist/es/components/heatmap/Heatmap.js +334 -0
  84. package/dist/es/components/heatmap/helpers/matrix.js +106 -0
  85. package/dist/es/components/heatmap/index.js +8 -0
  86. package/dist/es/components/index.js +118 -114
  87. package/dist/es/components/menu/MenuSubMenu.js +50 -36
  88. package/dist/es/components/menu/sub-menu-pop.vue2.js +30 -30
  89. package/dist/es/components/network/Network.vue2.js +72 -72
  90. package/dist/es/components/network/utils.js +44 -35
  91. package/dist/es/components/pagination/Pagination.js +124 -112
  92. package/dist/es/components/pagination/page-item-ellipsis.vue.js +13 -12
  93. package/dist/es/components/pagination/page-item-ellipsis.vue2.js +19 -15
  94. package/dist/es/components/pagination/page-jumper.vue.js +13 -12
  95. package/dist/es/components/pagination/page-jumper.vue2.js +7 -4
  96. package/dist/es/components/pagination/page-options.vue.js +4 -3
  97. package/dist/es/components/pagination/page-options.vue2.js +17 -15
  98. package/dist/es/components/skeleton/Skeleton.vue.js +11 -9
  99. package/dist/es/components/skeleton/SkeletonLine.vue.js +9 -8
  100. package/dist/es/components/skeleton/SkeletonShape.vue.js +8 -7
  101. package/dist/es/components/spin/Spin.js +124 -60
  102. package/dist/es/components/steps/Step.vue2.js +51 -47
  103. package/dist/es/components/steps/Steps.vue2.js +22 -19
  104. package/dist/es/components/table/Table.js +3 -1
  105. package/dist/es/components/tabs/TabPane.vue.js +11 -9
  106. package/dist/es/components/tabs/TabPane.vue2.js +28 -24
  107. package/dist/es/components/tabs/tabs-nav.js +20 -18
  108. package/dist/es/components/tabs/tabs-tab.vue.js +10 -8
  109. package/dist/es/components/trigger/Trigger.js +19 -19
  110. package/dist/es/icons/_self/empty-better.js +25 -8
  111. package/dist/es/index.js +162 -158
  112. package/dist/es/locale/en-US.js +19 -2
  113. package/dist/es/locale/zh-CN.js +19 -2
  114. package/dist/es/style.css +1 -1
  115. package/dist/index.cjs +4 -4
  116. package/dist/index.umd.js +4 -4
  117. package/dist/locale/interface.d.ts +30 -0
  118. package/dist/style/base.css +1 -1
  119. package/dist/style/button.css +1 -1
  120. package/dist/style/color-picker.css +1 -0
  121. package/dist/style/color-picker.js +2 -0
  122. package/dist/style/date-picker.css +1 -1
  123. package/dist/style/dropdown.css +1 -1
  124. package/dist/style/empty.css +1 -1
  125. package/dist/style/form-checkbox.css +1 -1
  126. package/dist/style/form-input-tag.css +1 -1
  127. package/dist/style/form-input.css +1 -1
  128. package/dist/style/form-radio.css +1 -1
  129. package/dist/style/form-textarea.css +1 -1
  130. package/dist/style/form.css +1 -1
  131. package/dist/style/heatmap.css +1 -0
  132. package/dist/style/heatmap.js +2 -0
  133. package/dist/style/image.css +1 -1
  134. package/dist/style/menu.css +1 -1
  135. package/dist/style/pagination.css +1 -1
  136. package/dist/style/skeleton.css +1 -1
  137. package/dist/style/spin.css +1 -1
  138. package/dist/style/steps.css +1 -1
  139. package/dist/style/table.css +1 -1
  140. package/dist/style/tabs.css +1 -1
  141. package/dist/style.css +1 -1
  142. package/dist/types.d.ts +2 -0
  143. package/package.json +3 -2
  144. package/volar.d.ts +2 -0
@@ -4,159 +4,163 @@ import { ConfigProvider as x } from "./config-provider/index.js";
4
4
  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 g } from "./dropdown/index.js";
7
- import { Empty as P } from "./empty/index.js";
8
- import { DatePicker as b, MonthPicker as s, QuarterPicker as w, RangePicker as L, WeekPicker as D, YearPicker as y } from "./date-picker/index.js";
7
+ import { Empty as I } from "./empty/index.js";
8
+ import { DatePicker as b, MonthPicker as s, QuarterPicker as w, RangePicker as L, WeekPicker as C, YearPicker as D } from "./date-picker/index.js";
9
9
  import { Form as G, FormItem as h } from "./form/index.js";
10
10
  import { Checkbox as M, CheckboxGroup as R } from "./form-checkbox/index.js";
11
11
  import { Input as B, InputGroup as E, InputPassword as _, InputSearch as N } from "./form-input/index.js";
12
12
  import { InputNumber as j } from "./form-input-number/index.js";
13
- import { InputTag as K } from "./form-input-tag/index.js";
14
- import { Radio as H, RadioGroup as z } from "./form-radio/index.js";
13
+ import { InputTag as H } from "./form-input-tag/index.js";
14
+ import { Radio as W, RadioGroup as z } from "./form-radio/index.js";
15
15
  import { Select as U, SelectDropdown as Y, SelectOption as Z, SelectOptionGroup as q } from "./form-select/index.js";
16
16
  import { Slider as V } from "./form-slider/index.js";
17
17
  import { Switch as $ } from "./form-switch/index.js";
18
18
  import { Textarea as ro } from "./form-textarea/index.js";
19
- import { Draggable as to } from "./draggable/index.js";
20
- import { Col as mo, Grid as fo, GridItem as xo, Row as ao } from "./grid/index.js";
21
- import { Image as io, ImagePreview as uo, ImagePreviewAction as lo, ImagePreviewGroup as co } from "./image/index.js";
22
- import { Layout as So, LayoutContent as go, LayoutFooter as Io, LayoutHeader as Po, LayoutSidebar as ko } from "./layout/index.js";
23
- import { Link as so } from "./link/index.js";
24
- import { Menu as Lo, MenuItem as Do, MenuItemGroup as yo, MenuSubMenu as Co } from "./menu/index.js";
25
- import { Message as ho } from "./message/index.js";
26
- import { Network as Mo } from "./network/index.js";
27
- import { Notification as Ao } from "./notification/index.js";
28
- import { Pagination as Eo } from "./pagination/index.js";
29
- import { Popconfirm as No } from "./popconfirm/index.js";
30
- import { Popover as jo } from "./popover/index.js";
31
- import { Popup as Ko } from "./popup/index.js";
32
- import { Progress as Ho } from "./progress/index.js";
33
- import { Rate as Qo } from "./rate/index.js";
34
- import { ResizeBox as Yo } from "./resize-box/index.js";
35
- import { Scrollbar as qo } from "./scrollbar-v2/index.js";
36
- import { Skeleton as Vo, SkeletonLine as Xo, SkeletonShape as $o } from "./skeleton/index.js";
37
- import { Space as rr } from "./space/index.js";
38
- import { Spin as tr } from "./spin/index.js";
39
- import { Step as mr, Steps as fr } from "./steps/index.js";
40
- import { Table as ar, TableColumn as nr } from "./table/index.js";
41
- import { TabPane as ur, Tabs as lr } from "./tabs/index.js";
42
- import { Tag as dr } from "./tag/index.js";
43
- import { TimePicker as Sr } from "./time-picker/index.js";
44
- import { TimeRangeSelector as Ir } from "./time-range-selector/index.js";
45
- import { Timeline as kr } from "./timeline/index.js";
46
- import { TimelineItem as sr } from "./timeline-item/index.js";
47
- import { Tooltip as Lr } from "./tooltip/index.js";
48
- import { TrendChart as yr } from "./trend-chart/index.js";
49
- import { Trigger as Gr } from "./trigger/index.js";
50
- import { Watermark as vr } from "./watermark/index.js";
51
- import { TABLE_LOCALE_EN_US as Rr, TABLE_LOCALE_ZH_CN as Ar, formatLocaleText as Br } from "./table/locale.js";
52
- import { default as _r } from "./table/table-tbody.js";
53
- import { default as Or } from "./table/table-td.js";
54
- import { default as Fr } from "./table/table-th.js";
55
- import { default as Wr } from "./table/table-thead.js";
56
- import { default as zr } from "./table/table-tr.js";
57
- import { configProviderInjectionKey as Ur } from "./config-provider/context.js";
58
- import { formInjectionKey as Zr, formItemInjectionKey as qr } from "./form/context.js";
59
- import { vDraggable as Vr } from "./draggable/directive.js";
60
- import { vWatermark as $r } from "./watermark/directive.js";
19
+ import { ColorPicker as to } from "./color-picker/index.js";
20
+ import { Draggable as mo } from "./draggable/index.js";
21
+ import { Col as xo, Grid as ao, GridItem as no, Row as io } from "./grid/index.js";
22
+ import { Heatmap as lo } from "./heatmap/index.js";
23
+ import { Image as To, ImagePreview as So, ImagePreviewAction as go, ImagePreviewGroup as Po } from "./image/index.js";
24
+ import { Layout as ko, LayoutContent as bo, LayoutFooter as so, LayoutHeader as wo, LayoutSidebar as Lo } from "./layout/index.js";
25
+ import { Link as Do } from "./link/index.js";
26
+ import { Menu as Go, MenuItem as ho, MenuItemGroup as vo, MenuSubMenu as Mo } from "./menu/index.js";
27
+ import { Message as Ao } from "./message/index.js";
28
+ import { Network as Eo } from "./network/index.js";
29
+ import { Notification as No } from "./notification/index.js";
30
+ import { Pagination as jo } from "./pagination/index.js";
31
+ import { Popconfirm as Ho } from "./popconfirm/index.js";
32
+ import { Popover as Wo } from "./popover/index.js";
33
+ import { Popup as Qo } from "./popup/index.js";
34
+ import { Progress as Yo } from "./progress/index.js";
35
+ import { Rate as qo } from "./rate/index.js";
36
+ import { ResizeBox as Vo } from "./resize-box/index.js";
37
+ import { Scrollbar as $o } from "./scrollbar-v2/index.js";
38
+ import { Skeleton as rr, SkeletonLine as er, SkeletonShape as tr } from "./skeleton/index.js";
39
+ import { Space as mr } from "./space/index.js";
40
+ import { Spin as xr } from "./spin/index.js";
41
+ import { Step as nr, Steps as ir } from "./steps/index.js";
42
+ import { Table as lr, TableColumn as cr } from "./table/index.js";
43
+ import { TabPane as Tr, Tabs as Sr } from "./tabs/index.js";
44
+ import { Tag as Pr } from "./tag/index.js";
45
+ import { TimePicker as kr } from "./time-picker/index.js";
46
+ import { TimeRangeSelector as sr } from "./time-range-selector/index.js";
47
+ import { Timeline as Lr } from "./timeline/index.js";
48
+ import { TimelineItem as Dr } from "./timeline-item/index.js";
49
+ import { Tooltip as Gr } from "./tooltip/index.js";
50
+ import { TrendChart as vr } from "./trend-chart/index.js";
51
+ import { Trigger as Rr } from "./trigger/index.js";
52
+ import { Watermark as Br } from "./watermark/index.js";
53
+ import { TABLE_LOCALE_EN_US as _r, TABLE_LOCALE_ZH_CN as Nr, formatLocaleText as Or } from "./table/locale.js";
54
+ import { default as Fr } from "./table/table-tbody.js";
55
+ import { default as Kr } from "./table/table-td.js";
56
+ import { default as zr } from "./table/table-th.js";
57
+ import { default as Ur } from "./table/table-thead.js";
58
+ import { default as Zr } from "./table/table-tr.js";
59
+ import { configProviderInjectionKey as Jr } from "./config-provider/context.js";
60
+ import { formInjectionKey as Xr, formItemInjectionKey as $r } from "./form/context.js";
61
+ import { vDraggable as re } from "./draggable/directive.js";
62
+ import { vWatermark as te } from "./watermark/directive.js";
61
63
  export {
62
64
  e as Alert,
63
65
  p as Button,
64
66
  m as ButtonGroup,
65
67
  M as Checkbox,
66
68
  R as CheckboxGroup,
67
- mo as Col,
69
+ xo as Col,
70
+ to as ColorPicker,
68
71
  x as ConfigProvider,
69
72
  b as DatePicker,
70
73
  n as Dialog,
71
- to as Draggable,
74
+ mo as Draggable,
72
75
  u as Drawer,
73
76
  c as Dropdown,
74
77
  d as DropdownButton,
75
78
  T as DropdownGroup,
76
79
  S as DropdownOption,
77
80
  g as DropdownSubmenu,
78
- P as Empty,
81
+ I as Empty,
79
82
  G as Form,
80
83
  h as FormItem,
81
- fo as Grid,
82
- xo as GridItem,
83
- io as Image,
84
- uo as ImagePreview,
85
- lo as ImagePreviewAction,
86
- co as ImagePreviewGroup,
84
+ ao as Grid,
85
+ no as GridItem,
86
+ lo as Heatmap,
87
+ To as Image,
88
+ So as ImagePreview,
89
+ go as ImagePreviewAction,
90
+ Po as ImagePreviewGroup,
87
91
  B as Input,
88
92
  E as InputGroup,
89
93
  j as InputNumber,
90
94
  _ as InputPassword,
91
95
  N as InputSearch,
92
- K as InputTag,
93
- So as Layout,
94
- go as LayoutContent,
95
- Io as LayoutFooter,
96
- Po as LayoutHeader,
97
- ko as LayoutSidebar,
98
- so as Link,
99
- Lo as Menu,
100
- Do as MenuItem,
101
- yo as MenuItemGroup,
102
- Co as MenuSubMenu,
103
- ho as Message,
96
+ H as InputTag,
97
+ ko as Layout,
98
+ bo as LayoutContent,
99
+ so as LayoutFooter,
100
+ wo as LayoutHeader,
101
+ Lo as LayoutSidebar,
102
+ Do as Link,
103
+ Go as Menu,
104
+ ho as MenuItem,
105
+ vo as MenuItemGroup,
106
+ Mo as MenuSubMenu,
107
+ Ao as Message,
104
108
  s as MonthPicker,
105
- Mo as Network,
106
- Ao as Notification,
107
- Eo as Pagination,
108
- No as Popconfirm,
109
- jo as Popover,
110
- Ko as Popup,
111
- Ho as Progress,
109
+ Eo as Network,
110
+ No as Notification,
111
+ jo as Pagination,
112
+ Ho as Popconfirm,
113
+ Wo as Popover,
114
+ Qo as Popup,
115
+ Yo as Progress,
112
116
  w as QuarterPicker,
113
- H as Radio,
117
+ W as Radio,
114
118
  z as RadioGroup,
115
119
  L as RangePicker,
116
- Qo as Rate,
117
- Yo as ResizeBox,
118
- ao as Row,
119
- qo as Scrollbar,
120
+ qo as Rate,
121
+ Vo as ResizeBox,
122
+ io as Row,
123
+ $o as Scrollbar,
120
124
  U as Select,
121
125
  Y as SelectDropdown,
122
126
  Z as SelectOption,
123
127
  q as SelectOptionGroup,
124
- Vo as Skeleton,
125
- Xo as SkeletonLine,
126
- $o as SkeletonShape,
128
+ rr as Skeleton,
129
+ er as SkeletonLine,
130
+ tr as SkeletonShape,
127
131
  V as Slider,
128
- rr as Space,
129
- tr as Spin,
130
- mr as Step,
131
- fr as Steps,
132
+ mr as Space,
133
+ xr as Spin,
134
+ nr as Step,
135
+ ir as Steps,
132
136
  $ as Switch,
133
- Rr as TABLE_LOCALE_EN_US,
134
- Ar as TABLE_LOCALE_ZH_CN,
135
- ur as TabPane,
136
- ar as Table,
137
- nr as TableColumn,
138
- lr as Tabs,
139
- dr as Tag,
140
- _r as Tbody,
141
- Or as Td,
137
+ _r as TABLE_LOCALE_EN_US,
138
+ Nr as TABLE_LOCALE_ZH_CN,
139
+ Tr as TabPane,
140
+ lr as Table,
141
+ cr as TableColumn,
142
+ Sr as Tabs,
143
+ Pr as Tag,
144
+ Fr as Tbody,
145
+ Kr as Td,
142
146
  ro as Textarea,
143
- Fr as Th,
144
- Wr as Thead,
145
- Sr as TimePicker,
146
- Ir as TimeRangeSelector,
147
- kr as Timeline,
148
- sr as TimelineItem,
149
- Lr as Tooltip,
150
- zr as Tr,
151
- yr as TrendChart,
152
- Gr as Trigger,
153
- vr as Watermark,
154
- D as WeekPicker,
155
- y as YearPicker,
156
- Ur as configProviderInjectionKey,
157
- Zr as formInjectionKey,
158
- qr as formItemInjectionKey,
159
- Br as formatLocaleText,
160
- Vr as vDraggable,
161
- $r as vWatermark
147
+ zr as Th,
148
+ Ur as Thead,
149
+ kr as TimePicker,
150
+ sr as TimeRangeSelector,
151
+ Lr as Timeline,
152
+ Dr as TimelineItem,
153
+ Gr as Tooltip,
154
+ Zr as Tr,
155
+ vr as TrendChart,
156
+ Rr as Trigger,
157
+ Br as Watermark,
158
+ C as WeekPicker,
159
+ D as YearPicker,
160
+ Jr as configProviderInjectionKey,
161
+ Xr as formInjectionKey,
162
+ $r as formItemInjectionKey,
163
+ Or as formatLocaleText,
164
+ re as vDraggable,
165
+ te as vWatermark
162
166
  };
@@ -1,13 +1,14 @@
1
- import { defineComponent as x, createVNode as r, mergeProps as y, toRefs as M, computed as a, toRef as h } from "vue";
1
+ import { defineComponent as h, createVNode as s, mergeProps as y, toRefs as x, computed as a, provide as C, toRef as b } from "vue";
2
2
  import g from "./sub-menu-inline.vue.js";
3
- import C from "./sub-menu-pop.vue.js";
4
- import k from "./hooks/use-menu.js";
5
- import I from "./hooks/use-level.js";
6
- import v from "../../icons/_self/menu/down.js";
7
- import K from "../../icons/_self/dropdown/more.js";
8
- import P from "./hooks/use-menu-context.js";
9
- import _ from "./hooks/use-menu-data-collector.js";
10
- const w = {
3
+ import I from "./sub-menu-pop.vue.js";
4
+ import v from "./hooks/use-menu.js";
5
+ import k from "./hooks/use-level.js";
6
+ import K from "../../icons/_self/menu/down.js";
7
+ import _ from "../../icons/_self/dropdown/more.js";
8
+ import D from "./hooks/use-menu-context.js";
9
+ import P from "./hooks/use-menu-data-collector.js";
10
+ import { DataCollectorInjectionKey as w } from "./context.js";
11
+ const R = {
11
12
  /**
12
13
  * @zh 子菜单的标题
13
14
  * @en The title of the submenu
@@ -51,9 +52,9 @@ const w = {
51
52
  _internalSkipCollect: {
52
53
  type: Boolean
53
54
  }
54
- }, O = /* @__PURE__ */ x({
55
+ }, q = /* @__PURE__ */ h({
55
56
  name: "SubMenu",
56
- props: w,
57
+ props: R,
57
58
  slots: Object,
58
59
  /**
59
60
  * @zh 菜单的图标
@@ -81,47 +82,60 @@ const w = {
81
82
  }) {
82
83
  const {
83
84
  key: n
84
- } = k(), {
85
+ } = v(), {
85
86
  level: d
86
- } = I(), {
87
+ } = k(), {
87
88
  popup: o
88
- } = M(e), t = P(), s = a(() => {
89
+ } = x(e), t = D(), i = a(() => {
89
90
  const {
90
- mode: i,
91
- collapsed: p,
91
+ mode: p,
92
+ collapsed: c,
92
93
  inTrigger: m
93
94
  } = t;
94
- return !!(typeof o.value == "function" ? o.value(d.value) : o.value) || p || m || i !== "vertical";
95
+ return !!(typeof o.value == "function" ? o.value(d.value) : o.value) || c || m || p !== "vertical";
95
96
  }), {
96
97
  subMenuKeys: l,
97
98
  menuItemKeys: f
98
99
  } = e._internalSkipCollect ? {
99
100
  subMenuKeys: a(() => []),
100
101
  menuItemKeys: a(() => [])
101
- } : _({
102
+ } : P({
102
103
  key: n.value,
103
104
  type: "subMenu"
104
- }), b = a(() => {
105
- const i = t.selectedKeys || [], p = (m) => {
106
- for (let c = 0; c < i.length; c++) {
107
- const S = i[c];
105
+ });
106
+ e._internalSkipCollect && C(w, {
107
+ collectSubMenu: () => {
108
+ },
109
+ removeSubMenu: () => {
110
+ },
111
+ collectMenuItem: () => {
112
+ },
113
+ removeMenuItem: () => {
114
+ },
115
+ reportMenuData: () => {
116
+ }
117
+ });
118
+ const M = a(() => {
119
+ const p = t.selectedKeys || [], c = (m) => {
120
+ for (let r = 0; r < p.length; r++) {
121
+ const S = p[r];
108
122
  if (m.includes(S))
109
123
  return !0;
110
124
  }
111
125
  return !1;
112
126
  };
113
- return p(l.value) || p(f.value);
127
+ return c(l.value) || c(f.value);
114
128
  });
115
129
  return {
116
130
  subMenuKeys: l,
117
131
  menuItemKeys: f,
118
- isChildrenSelected: b,
132
+ isChildrenSelected: M,
119
133
  props: e,
120
134
  attrs: u,
121
135
  computedKey: n,
122
- computedPopup: s,
123
- expandIconDown: h(t, "expandIconDown"),
124
- expandIconRight: h(t, "expandIconRight")
136
+ computedPopup: i,
137
+ expandIconDown: b(t, "expandIconDown"),
138
+ expandIconRight: b(t, "expandIconRight")
125
139
  };
126
140
  },
127
141
  render() {
@@ -132,30 +146,30 @@ const w = {
132
146
  computedPopup: d,
133
147
  expandIconDown: o,
134
148
  expandIconRight: t,
135
- isChildrenSelected: s
149
+ isChildrenSelected: i
136
150
  } = this, l = {
137
151
  ...this.$slots,
138
- "expand-icon-down": this.$slots["expand-icon-down"] || o || (() => [r(v, null, null)]),
139
- "expand-icon-right": this.$slots["expand-icon-right"] || t || (() => [r(K, null, null)])
152
+ "expand-icon-down": this.$slots["expand-icon-down"] || o || (() => [s(K, null, null)]),
153
+ "expand-icon-right": this.$slots["expand-icon-right"] || t || (() => [s(_, null, null)])
140
154
  };
141
- return d ? r(C, y({
155
+ return d ? s(I, y({
142
156
  key: n,
143
157
  title: e.title,
144
158
  selectable: e.selectable,
145
159
  disabled: e.disabled,
146
- isChildrenSelected: s,
160
+ isChildrenSelected: i,
147
161
  popupMaxHeight: e.popupMaxHeight,
148
162
  _internalSkipCollect: e._internalSkipCollect
149
- }, u), l) : r(g, y({
163
+ }, u), l) : s(g, y({
150
164
  key: n,
151
165
  title: e.title,
152
166
  disabled: e.disabled,
153
- isChildrenSelected: s,
167
+ isChildrenSelected: i,
154
168
  _internalSkipCollect: e._internalSkipCollect
155
169
  }, u), l);
156
170
  }
157
171
  });
158
172
  export {
159
- O as default,
160
- w as menuSubMenuProps
173
+ q as default,
174
+ R as menuSubMenuProps
161
175
  };
@@ -2,10 +2,10 @@ import { defineComponent as S, toRefs as B, computed as o, ref as P } from "vue"
2
2
  import { Trigger as $ } from "../trigger/index.js";
3
3
  import H from "./base-menu.vue.js";
4
4
  import N from "./hooks/use-menu.js";
5
- import I from "./hooks/use-level.js";
6
- import { omit as K } from "../../_utils/omit.js";
7
- import V from "./indent.vue.js";
8
- import _ from "./hooks/use-menu-context.js";
5
+ import _ from "./hooks/use-level.js";
6
+ import { omit as I } from "../../_utils/omit.js";
7
+ import K from "./indent.vue.js";
8
+ import V from "./hooks/use-menu-context.js";
9
9
  import R from "../../_container/render-function.js";
10
10
  import { isNumber as T } from "../../_utils/is.js";
11
11
  import { getClassNameMixin as w } from "../../_utils/config.js";
@@ -14,7 +14,7 @@ const Q = S({
14
14
  components: {
15
15
  Menu: H,
16
16
  Trigger: $,
17
- MenuIndent: V,
17
+ MenuIndent: K,
18
18
  RenderFunction: R
19
19
  },
20
20
  inheritAttrs: !1,
@@ -39,57 +39,57 @@ const Q = S({
39
39
  type: Boolean
40
40
  }
41
41
  },
42
- setup(g) {
43
- const { key: l } = N(), { level: i } = I(), { selectable: a, disabled: u, isChildrenSelected: C, popupMaxHeight: x } = B(g), t = _(), { onSubMenuClick: r, onMenuItemClick: n } = t, p = o(() => t.prefixCls), m = o(() => t.mode), c = o(() => t.selectedKeys || []), s = o(() => `${p.value}-pop`), f = o(
44
- () => a.value && c.value.includes(l.value) || C.value
42
+ setup(s) {
43
+ const { key: l } = N(), { level: a } = _(), { selectable: u, disabled: p, isChildrenSelected: C, popupMaxHeight: x } = B(s), t = V(), { onSubMenuClick: r, onMenuItemClick: n } = t, m = o(() => t.prefixCls), f = o(() => t.mode), v = o(() => t.selectedKeys || []), i = o(() => `${m.value}-pop`), d = o(
44
+ () => u.value && v.value.includes(l.value) || C.value
45
45
  ), M = o(() => [
46
- `${s.value}`,
47
- `${s.value}-header`,
46
+ `${i.value}`,
47
+ `${i.value}-header`,
48
48
  {
49
- [`${p.value}-selected`]: f.value
49
+ [`${m.value}-selected`]: d.value
50
50
  }
51
- ]), h = o(() => m.value === "horizontal" && !t.inTrigger), v = P(!1), d = (e) => {
52
- v.value = e;
53
- }, y = w("trigger"), b = o(() => {
51
+ ]), h = o(() => f.value === "horizontal" && !t.inTrigger), g = P(!1), c = (e) => {
52
+ g.value = e;
53
+ }, y = w("trigger"), k = o(() => {
54
54
  var e;
55
55
  return [
56
- `${s.value}-trigger`,
56
+ `${i.value}-trigger`,
57
57
  {
58
- [`${s.value}-trigger-dark`]: t.theme === "dark"
58
+ [`${i.value}-trigger-dark`]: t.theme === "dark"
59
59
  },
60
60
  // @ts-ignore
61
61
  (e = t.triggerProps) == null ? void 0 : e.class
62
62
  ];
63
- }), k = o(() => K(t.triggerProps || {}, ["class"]));
63
+ }), b = o(() => I(t.triggerProps || {}, ["class"]));
64
64
  return {
65
- menuPrefixCls: p,
66
- mode: m,
67
- level: i,
65
+ menuPrefixCls: m,
66
+ mode: f,
67
+ level: a,
68
68
  classNames: M,
69
- isSelected: f,
70
- disabled: u,
71
- selectedKeys: c,
69
+ isSelected: d,
70
+ disabled: p,
71
+ selectedKeys: v,
72
72
  needPopOnBottom: h,
73
- popVisible: v,
73
+ popVisible: g,
74
74
  className: y,
75
- triggerClassNames: b,
76
- triggerProps: k,
75
+ triggerClassNames: k,
76
+ triggerProps: b,
77
77
  menuContext: t,
78
78
  popupMenuStyles: o(() => {
79
79
  const e = x.value ?? t.popupMaxHeight;
80
80
  return T(e) ? { maxHeight: `${e}px` } : e ? {} : { maxHeight: "unset" };
81
81
  }),
82
82
  onClick: () => {
83
- u.value || (r && r(l.value, i.value), a.value && n && n(l.value));
83
+ p.value || s._internalSkipCollect || (r && r(l.value, a.value), u.value && n && n(l.value));
84
84
  },
85
85
  onKeydown: (e) => {
86
- u.value || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r && r(l.value, i.value), a.value && n && n(l.value));
86
+ p.value || s._internalSkipCollect || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r && r(l.value, a.value), c(!0), u.value && n && n(l.value));
87
87
  },
88
88
  onMenuItemClick: (e) => {
89
- n && n(e), d(!1);
89
+ n && n(e), c(!1);
90
90
  },
91
91
  onVisibleChange: (e) => {
92
- d(e);
92
+ c(e);
93
93
  }
94
94
  };
95
95
  }