@uzum-tech/ui 1.13.2 → 1.14.1

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 (188) hide show
  1. package/dist/index.js +1848 -1664
  2. package/dist/index.prod.js +3 -3
  3. package/es/_mixins/use-css-vars-class.js +5 -3
  4. package/es/_mixins/use-rtl.js +5 -2
  5. package/es/_mixins/use-style.js +4 -2
  6. package/es/_mixins/use-theme.js +4 -2
  7. package/es/auto-complete/src/AutoComplete.d.ts +70 -0
  8. package/es/auto-complete/styles/light.d.ts +7 -0
  9. package/es/chat/src/Chat.d.ts +70 -0
  10. package/es/chat/src/ChatListItems.d.ts +77 -0
  11. package/es/chat/src/ChatMessages.d.ts +77 -0
  12. package/es/chat/src/ChatParts/MainArea.js +47 -54
  13. package/es/chat/src/ChatParts/Sidebar.d.ts +7 -0
  14. package/es/chat/src/styles/index.cssr.js +12 -7
  15. package/es/chat/styles/dark.d.ts +7 -0
  16. package/es/chat/styles/light.d.ts +7 -0
  17. package/es/color-picker/src/ColorInputUnit.d.ts +7 -0
  18. package/es/color-picker/src/ColorPicker.d.ts +63 -0
  19. package/es/color-picker/styles/light.d.ts +7 -0
  20. package/es/config-provider/src/ConfigProvider.d.ts +3 -0
  21. package/es/config-provider/src/ConfigProvider.js +4 -1
  22. package/es/config-provider/src/internal-interface.d.ts +1 -0
  23. package/es/data-table/src/DataTable.d.ts +58 -0
  24. package/es/data-table/src/DataTable.js +71 -4
  25. package/es/data-table/src/HeaderButton/FilterButton.d.ts +14 -0
  26. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +14 -0
  27. package/es/data-table/src/TableParts/Body.d.ts +14 -0
  28. package/es/data-table/src/TableParts/Body.js +6 -2
  29. package/es/data-table/src/TableParts/Header.d.ts +14 -0
  30. package/es/data-table/src/TableParts/Header.js +17 -5
  31. package/es/data-table/src/interface.d.ts +34 -0
  32. package/es/data-table/src/interface.js +1 -1
  33. package/es/data-table/src/use-resizable.d.ts +1 -0
  34. package/es/data-table/src/use-resizable.js +2 -1
  35. package/es/data-table/src/use-sorter.d.ts +1 -0
  36. package/es/data-table/src/use-sorter.js +2 -1
  37. package/es/data-table/src/use-table-data.d.ts +3 -2
  38. package/es/data-table/src/use-table-data.js +5 -1
  39. package/es/data-table/src/use-table-storage.d.ts +4 -0
  40. package/es/data-table/src/use-table-storage.js +43 -0
  41. package/es/data-table/src/utils.js +39 -5
  42. package/es/data-table/styles/light.d.ts +7 -0
  43. package/es/date-picker/src/DatePicker.d.ts +147 -0
  44. package/es/date-picker/src/panel/date.d.ts +21 -0
  45. package/es/date-picker/src/panel/daterange.d.ts +21 -0
  46. package/es/date-picker/src/panel/datetime.d.ts +21 -0
  47. package/es/date-picker/src/panel/datetimerange.d.ts +21 -0
  48. package/es/date-picker/src/panel/panelMonth.d.ts +42 -0
  49. package/es/date-picker/src/panel/panelMonthContent.d.ts +21 -0
  50. package/es/date-picker/src/panel/panelYear.d.ts +42 -0
  51. package/es/date-picker/src/panel/panelYearContent.d.ts +21 -0
  52. package/es/date-picker/src/panel/use-calendar.d.ts +21 -0
  53. package/es/date-picker/src/panel/use-dual-calendar.d.ts +21 -0
  54. package/es/date-picker/src/panel/use-panel-common.d.ts +21 -0
  55. package/es/date-picker/styles/light.d.ts +14 -0
  56. package/es/date-picker-v2/src/DatePickerV2.d.ts +70 -0
  57. package/es/date-picker-v2/styles/dark.d.ts +7 -0
  58. package/es/date-picker-v2/styles/light.d.ts +7 -0
  59. package/es/dynamic-input/src/DynamicInput.d.ts +70 -0
  60. package/es/dynamic-input/src/InputPreset.d.ts +7 -0
  61. package/es/dynamic-input/src/PairPreset.d.ts +7 -0
  62. package/es/dynamic-input/styles/light.d.ts +7 -0
  63. package/es/dynamic-tags/src/DynamicTags.d.ts +70 -0
  64. package/es/dynamic-tags/styles/light.d.ts +7 -0
  65. package/es/input/src/Input.d.ts +77 -0
  66. package/es/input/src/Input.js +9 -1
  67. package/es/input/src/InputGroupLabel.d.ts +63 -0
  68. package/es/input/src/styles/input.cssr.js +1 -1
  69. package/es/input/styles/light.d.ts +7 -0
  70. package/es/input/styles/light.js +11 -1
  71. package/es/input-number/src/InputNumber.d.ts +70 -0
  72. package/es/input-number/styles/light.d.ts +7 -0
  73. package/es/input-otp/src/InputOtp.d.ts +70 -0
  74. package/es/input-otp/styles/light.d.ts +7 -0
  75. package/es/legacy-transfer/src/Transfer.d.ts +70 -0
  76. package/es/legacy-transfer/src/TransferFilter.d.ts +7 -0
  77. package/es/legacy-transfer/src/TransferList.d.ts +7 -0
  78. package/es/legacy-transfer/src/TransferListItem.d.ts +7 -0
  79. package/es/legacy-transfer/styles/light.d.ts +7 -0
  80. package/es/locales/date/enUS.js +1 -1
  81. package/es/mention/src/Mention.d.ts +70 -0
  82. package/es/mention/styles/light.d.ts +7 -0
  83. package/es/pagination/src/Pagination.d.ts +70 -0
  84. package/es/pagination/styles/light.d.ts +7 -0
  85. package/es/time-picker/src/Panel.d.ts +7 -0
  86. package/es/time-picker/src/TimePicker.d.ts +70 -0
  87. package/es/time-picker/styles/light.d.ts +7 -0
  88. package/es/transfer/src/Transfer.d.ts +70 -0
  89. package/es/transfer/src/TransferFilter.d.ts +7 -0
  90. package/es/transfer/src/TransferList.d.ts +7 -0
  91. package/es/transfer/src/TransferListItem.d.ts +7 -0
  92. package/es/transfer/styles/light.d.ts +7 -0
  93. package/es/version.d.ts +1 -1
  94. package/es/version.js +1 -1
  95. package/lib/_mixins/use-css-vars-class.js +5 -3
  96. package/lib/_mixins/use-rtl.js +4 -1
  97. package/lib/_mixins/use-style.js +4 -2
  98. package/lib/_mixins/use-theme.js +4 -2
  99. package/lib/auto-complete/src/AutoComplete.d.ts +70 -0
  100. package/lib/auto-complete/styles/light.d.ts +7 -0
  101. package/lib/chat/src/Chat.d.ts +70 -0
  102. package/lib/chat/src/ChatListItems.d.ts +77 -0
  103. package/lib/chat/src/ChatMessages.d.ts +77 -0
  104. package/lib/chat/src/ChatParts/MainArea.js +47 -54
  105. package/lib/chat/src/ChatParts/Sidebar.d.ts +7 -0
  106. package/lib/chat/src/styles/index.cssr.js +12 -7
  107. package/lib/chat/styles/dark.d.ts +7 -0
  108. package/lib/chat/styles/light.d.ts +7 -0
  109. package/lib/color-picker/src/ColorInputUnit.d.ts +7 -0
  110. package/lib/color-picker/src/ColorPicker.d.ts +63 -0
  111. package/lib/color-picker/styles/light.d.ts +7 -0
  112. package/lib/config-provider/src/ConfigProvider.d.ts +3 -0
  113. package/lib/config-provider/src/ConfigProvider.js +4 -1
  114. package/lib/config-provider/src/internal-interface.d.ts +1 -0
  115. package/lib/data-table/src/DataTable.d.ts +58 -0
  116. package/lib/data-table/src/DataTable.js +70 -3
  117. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +14 -0
  118. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +14 -0
  119. package/lib/data-table/src/TableParts/Body.d.ts +14 -0
  120. package/lib/data-table/src/TableParts/Body.js +6 -2
  121. package/lib/data-table/src/TableParts/Header.d.ts +14 -0
  122. package/lib/data-table/src/TableParts/Header.js +16 -4
  123. package/lib/data-table/src/interface.d.ts +34 -0
  124. package/lib/data-table/src/interface.js +1 -1
  125. package/lib/data-table/src/use-resizable.d.ts +1 -0
  126. package/lib/data-table/src/use-resizable.js +2 -1
  127. package/lib/data-table/src/use-sorter.d.ts +1 -0
  128. package/lib/data-table/src/use-sorter.js +2 -1
  129. package/lib/data-table/src/use-table-data.d.ts +3 -2
  130. package/lib/data-table/src/use-table-data.js +5 -1
  131. package/lib/data-table/src/use-table-storage.d.ts +4 -0
  132. package/lib/data-table/src/use-table-storage.js +48 -0
  133. package/lib/data-table/src/utils.js +39 -5
  134. package/lib/data-table/styles/light.d.ts +7 -0
  135. package/lib/date-picker/src/DatePicker.d.ts +147 -0
  136. package/lib/date-picker/src/panel/date.d.ts +21 -0
  137. package/lib/date-picker/src/panel/daterange.d.ts +21 -0
  138. package/lib/date-picker/src/panel/datetime.d.ts +21 -0
  139. package/lib/date-picker/src/panel/datetimerange.d.ts +21 -0
  140. package/lib/date-picker/src/panel/panelMonth.d.ts +42 -0
  141. package/lib/date-picker/src/panel/panelMonthContent.d.ts +21 -0
  142. package/lib/date-picker/src/panel/panelYear.d.ts +42 -0
  143. package/lib/date-picker/src/panel/panelYearContent.d.ts +21 -0
  144. package/lib/date-picker/src/panel/use-calendar.d.ts +21 -0
  145. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +21 -0
  146. package/lib/date-picker/src/panel/use-panel-common.d.ts +21 -0
  147. package/lib/date-picker/styles/light.d.ts +14 -0
  148. package/lib/date-picker-v2/src/DatePickerV2.d.ts +70 -0
  149. package/lib/date-picker-v2/styles/dark.d.ts +7 -0
  150. package/lib/date-picker-v2/styles/light.d.ts +7 -0
  151. package/lib/dynamic-input/src/DynamicInput.d.ts +70 -0
  152. package/lib/dynamic-input/src/InputPreset.d.ts +7 -0
  153. package/lib/dynamic-input/src/PairPreset.d.ts +7 -0
  154. package/lib/dynamic-input/styles/light.d.ts +7 -0
  155. package/lib/dynamic-tags/src/DynamicTags.d.ts +70 -0
  156. package/lib/dynamic-tags/styles/light.d.ts +7 -0
  157. package/lib/input/src/Input.d.ts +77 -0
  158. package/lib/input/src/Input.js +9 -1
  159. package/lib/input/src/InputGroupLabel.d.ts +63 -0
  160. package/lib/input/src/styles/input.cssr.js +1 -1
  161. package/lib/input/styles/light.d.ts +7 -0
  162. package/lib/input/styles/light.js +11 -1
  163. package/lib/input-number/src/InputNumber.d.ts +70 -0
  164. package/lib/input-number/styles/light.d.ts +7 -0
  165. package/lib/input-otp/src/InputOtp.d.ts +70 -0
  166. package/lib/input-otp/styles/light.d.ts +7 -0
  167. package/lib/legacy-transfer/src/Transfer.d.ts +70 -0
  168. package/lib/legacy-transfer/src/TransferFilter.d.ts +7 -0
  169. package/lib/legacy-transfer/src/TransferList.d.ts +7 -0
  170. package/lib/legacy-transfer/src/TransferListItem.d.ts +7 -0
  171. package/lib/legacy-transfer/styles/light.d.ts +7 -0
  172. package/lib/locales/date/enUS.js +2 -2
  173. package/lib/mention/src/Mention.d.ts +70 -0
  174. package/lib/mention/styles/light.d.ts +7 -0
  175. package/lib/pagination/src/Pagination.d.ts +70 -0
  176. package/lib/pagination/styles/light.d.ts +7 -0
  177. package/lib/time-picker/src/Panel.d.ts +7 -0
  178. package/lib/time-picker/src/TimePicker.d.ts +70 -0
  179. package/lib/time-picker/styles/light.d.ts +7 -0
  180. package/lib/transfer/src/Transfer.d.ts +70 -0
  181. package/lib/transfer/src/TransferFilter.d.ts +7 -0
  182. package/lib/transfer/src/TransferList.d.ts +7 -0
  183. package/lib/transfer/src/TransferListItem.d.ts +7 -0
  184. package/lib/transfer/styles/light.d.ts +7 -0
  185. package/lib/version.d.ts +1 -1
  186. package/lib/version.js +1 -1
  187. package/package.json +1 -1
  188. package/web-types.json +18 -1
@@ -181,61 +181,54 @@ export default defineComponent({
181
181
  return value != null ? String(value) : '';
182
182
  };
183
183
  const renderHeader = () => {
184
+ const chat = selectedChatRef.value;
185
+ const keyId = toKeyString(chat === null || chat === void 0 ? void 0 : chat.id);
186
+ const keyTitle = toKeyString(chat === null || chat === void 0 ? void 0 : chat.title);
184
187
  return (h("div", { class: `${mergedClsPrefixRef.value}-chat-main__header` },
185
- h(UFlex, { justify: "space-between", align: "flex-start", wrap: false }, {
186
- default: () => {
187
- const chat = selectedChatRef.value;
188
- const keyId = toKeyString(chat === null || chat === void 0 ? void 0 : chat.id);
189
- const keyTitle = toKeyString(chat === null || chat === void 0 ? void 0 : chat.title);
190
- return (h(Fragment, null,
191
- h(UFlex, { vertical: true, size: [0, 0], justify: 'flex-start"' },
192
- h(UText, { key: `${keyId}-${keyTitle}`, variant: "heading-s-bold", class: `${mergedClsPrefixRef.value}-chat-main__header-title`, theme: mergedThemeRef.value.peers.Typography, themeOverrides: mergedThemeRef.value.peerOverrides.Typography }, {
193
- default: () => { var _a, _b; return (_b = (_a = selectedChatRef.value) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : ''; }
194
- }),
195
- isTyping.value && (h(UText, { class: [
196
- `${mergedClsPrefixRef.value}-chat-main__header-subtitle`,
197
- 'typing'
198
- ], variant: "body-m-medium" }, {
199
- default: () => { var _a; return (_a = typingTextRef.value) !== null && _a !== void 0 ? _a : ''; }
200
- }))),
201
- h(UFlex, { align: "center", size: "small", class: `${mergedClsPrefixRef.value}-chat-main__header-actions` }, {
202
- default: () => resolveSlot(slots.headerActions, () => {
203
- const shareButtonProps = Object.assign(Object.assign({}, headerButtonPropsRef.value), headerShareButtonPropsRef.value);
204
- const profileButtonProps = Object.assign(Object.assign({}, headerButtonPropsRef.value), headerProfileButtonPropsRef.value);
205
- const closeButtonProps = Object.assign(Object.assign({}, headerButtonPropsRef.value), headerCloseButtonPropsRef.value);
206
- const shareIconProps = Object.assign(Object.assign({}, headerIconPropsRef.value), headerShareIconPropsRef.value);
207
- const profileIconProps = Object.assign(Object.assign({}, headerIconPropsRef.value), headerProfileIconPropsRef.value);
208
- const buttons = [];
209
- buttons.push(h(UTooltip, null, {
210
- trigger: () => (h(UButton, Object.assign({ secondary: true, circle: true, size: "large" }, shareButtonProps, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides
211
- .Button, onClick: () => { var _a; return (_a = onChatShare === null || onChatShare === void 0 ? void 0 : onChatShare.value) === null || _a === void 0 ? void 0 : _a.call(onChatShare); } }), {
212
- default: () => (h(UIcon, Object.assign({ size: 20 }, shareIconProps, { theme: mergedThemeRef.value.peers
213
- .HeaderShareIcon, themeOverrides: mergedThemeRef.value.peerOverrides
214
- .HeaderShareIcon }), {
215
- default: () => (h(ArrowHookUpRight, null))
216
- }))
217
- })),
218
- default: () => shareButtonTooltipRef.value
219
- }));
220
- buttons.push(h(UTooltip, null, {
221
- trigger: () => (h(UButton, Object.assign({ secondary: true, circle: true, size: "large" }, profileButtonProps, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides
222
- .Button, onClick: () => { var _a; return (_a = onUserProfile === null || onUserProfile === void 0 ? void 0 : onUserProfile.value) === null || _a === void 0 ? void 0 : _a.call(onUserProfile); } }), {
223
- default: () => (h(UIcon, Object.assign({ size: 20 }, profileIconProps, { theme: mergedThemeRef.value.peers
224
- .HeaderProfileIcon, themeOverrides: mergedThemeRef.value.peerOverrides
225
- .HeaderProfileIcon }), {
226
- default: () => h(PersonNote, null)
227
- }))
228
- })),
229
- default: () => profileButtonTooltipRef.value
230
- }));
231
- buttons.push(h(UButton, Object.assign({ type: "primary", size: "large", round: true }, closeButtonProps, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button, onClick: () => { var _a; return (_a = onChatClose === null || onChatClose === void 0 ? void 0 : onChatClose.value) === null || _a === void 0 ? void 0 : _a.call(onChatClose); } }), {
232
- default: () => closeButtonTextRef.value
233
- }));
234
- return buttons;
235
- })
236
- })));
237
- }
238
- })));
188
+ h("div", { class: `${mergedClsPrefixRef.value}-chat-main__header-inner` },
189
+ h("div", { class: `${mergedClsPrefixRef.value}-chat-main__header-title-wrap` },
190
+ h(UText, { key: `${keyId}-${keyTitle}`, variant: "heading-s-bold", class: `${mergedClsPrefixRef.value}-chat-main__header-title`, theme: mergedThemeRef.value.peers.Typography, themeOverrides: mergedThemeRef.value.peerOverrides.Typography }, {
191
+ default: () => { var _a, _b; return (_b = (_a = selectedChatRef.value) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : ''; }
192
+ }),
193
+ isTyping.value && (h(UText, { class: [
194
+ `${mergedClsPrefixRef.value}-chat-main__header-subtitle`,
195
+ 'typing'
196
+ ], variant: "body-m-medium" }, {
197
+ default: () => { var _a; return (_a = typingTextRef.value) !== null && _a !== void 0 ? _a : ''; }
198
+ }))),
199
+ h(UFlex, { align: "center", size: "small", class: `${mergedClsPrefixRef.value}-chat-main__header-actions` }, {
200
+ default: () => resolveSlot(slots.headerActions, () => {
201
+ const shareButtonProps = Object.assign(Object.assign({}, headerButtonPropsRef.value), headerShareButtonPropsRef.value);
202
+ const profileButtonProps = Object.assign(Object.assign({}, headerButtonPropsRef.value), headerProfileButtonPropsRef.value);
203
+ const closeButtonProps = Object.assign(Object.assign({}, headerButtonPropsRef.value), headerCloseButtonPropsRef.value);
204
+ const shareIconProps = Object.assign(Object.assign({}, headerIconPropsRef.value), headerShareIconPropsRef.value);
205
+ const profileIconProps = Object.assign(Object.assign({}, headerIconPropsRef.value), headerProfileIconPropsRef.value);
206
+ const buttons = [];
207
+ buttons.push(h(UTooltip, null, {
208
+ trigger: () => (h(UButton, Object.assign({ secondary: true, circle: true, size: "large" }, shareButtonProps, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button, onClick: () => { var _a; return (_a = onChatShare === null || onChatShare === void 0 ? void 0 : onChatShare.value) === null || _a === void 0 ? void 0 : _a.call(onChatShare); } }), {
209
+ default: () => (h(UIcon, Object.assign({ size: 20 }, shareIconProps, { theme: mergedThemeRef.value.peers.HeaderShareIcon, themeOverrides: mergedThemeRef.value.peerOverrides
210
+ .HeaderShareIcon }), {
211
+ default: () => h(ArrowHookUpRight, null)
212
+ }))
213
+ })),
214
+ default: () => shareButtonTooltipRef.value
215
+ }));
216
+ buttons.push(h(UTooltip, null, {
217
+ trigger: () => (h(UButton, Object.assign({ secondary: true, circle: true, size: "large" }, profileButtonProps, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button, onClick: () => { var _a; return (_a = onUserProfile === null || onUserProfile === void 0 ? void 0 : onUserProfile.value) === null || _a === void 0 ? void 0 : _a.call(onUserProfile); } }), {
218
+ default: () => (h(UIcon, Object.assign({ size: 20 }, profileIconProps, { theme: mergedThemeRef.value.peers
219
+ .HeaderProfileIcon, themeOverrides: mergedThemeRef.value.peerOverrides
220
+ .HeaderProfileIcon }), {
221
+ default: () => h(PersonNote, null)
222
+ }))
223
+ })),
224
+ default: () => profileButtonTooltipRef.value
225
+ }));
226
+ buttons.push(h(UButton, Object.assign({ type: "primary", size: "large", round: true }, closeButtonProps, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button, onClick: () => { var _a; return (_a = onChatClose === null || onChatClose === void 0 ? void 0 : onChatClose.value) === null || _a === void 0 ? void 0 : _a.call(onChatClose); } }), {
227
+ default: () => closeButtonTextRef.value
228
+ }));
229
+ return buttons;
230
+ })
231
+ }))));
239
232
  };
240
233
  const renderMessages = () => {
241
234
  var _a;
@@ -88,6 +88,13 @@ declare const _default: import("vue").DefineComponent<{}, {
88
88
  borderFocus: string;
89
89
  boxShadowFocus: string;
90
90
  loadingColor: string;
91
+ loadingColorSuccess: string;
92
+ borderSuccess: string;
93
+ borderHoverSuccess: string;
94
+ colorFocusSuccess: string;
95
+ borderFocusSuccess: string;
96
+ boxShadowFocusSuccess: string;
97
+ caretColorSuccess: string;
91
98
  loadingColorWarning: string;
92
99
  borderWarning: string;
93
100
  borderHoverWarning: string;
@@ -134,23 +134,28 @@ export default cB('chat', `
134
134
  width: 100%;
135
135
  padding: 24px 20px 10px 24px;
136
136
  flex-shrink: 0;
137
+ `), cE('header-inner', `
138
+ display: grid;
139
+ grid-template-columns: minmax(0, 1fr) auto;
140
+ align-items: flex-start;
141
+ gap: 8px;
142
+ `), cE('header-title-wrap', `
143
+ min-width: 0;
144
+ overflow: hidden;
137
145
  `), cE('header-title', `
138
146
  color: var(--u-header-title-color);
139
- flex: 1;
140
- min-width: 0;
147
+ display: block;
141
148
  overflow: hidden;
142
- text-overflow: ellipsis;
143
149
  white-space: nowrap;
144
- display: block;
145
- margin-right: 16px;
150
+ text-overflow: ellipsis;
151
+ width: 100%;
146
152
  `), cE('header-subtitle', `
147
153
  display: block;
148
154
  color: var(--u-sidebar-item-subtitle-color);
149
155
  overflow: hidden;
150
156
  text-overflow: ellipsis;
151
157
  white-space: nowrap;
152
- minWidth: 0;
153
- maxWidth: 100%;
158
+ width: 100%;
154
159
  `), cE('header-actions', `
155
160
  padding: 4px;
156
161
  flex-shrink: 0;
@@ -75,6 +75,13 @@ declare const chatDark: import("../../_mixins").Theme<"Chat", {
75
75
  borderFocus: string;
76
76
  boxShadowFocus: string;
77
77
  loadingColor: string;
78
+ loadingColorSuccess: string;
79
+ borderSuccess: string;
80
+ borderHoverSuccess: string;
81
+ colorFocusSuccess: string;
82
+ borderFocusSuccess: string;
83
+ boxShadowFocusSuccess: string;
84
+ caretColorSuccess: string;
78
85
  loadingColorWarning: string;
79
86
  borderWarning: string;
80
87
  borderHoverWarning: string;
@@ -113,6 +113,13 @@ declare const chatLight: import("../../_mixins").Theme<"Chat", {
113
113
  borderFocus: string;
114
114
  boxShadowFocus: string;
115
115
  loadingColor: string;
116
+ loadingColorSuccess: string;
117
+ borderSuccess: string;
118
+ borderHoverSuccess: string;
119
+ colorFocusSuccess: string;
120
+ borderFocusSuccess: string;
121
+ boxShadowFocusSuccess: string;
122
+ caretColorSuccess: string;
116
123
  loadingColorWarning: string;
117
124
  borderWarning: string;
118
125
  borderHoverWarning: string;
@@ -77,6 +77,13 @@ declare const _default: import("vue").DefineComponent<{
77
77
  borderFocus: string;
78
78
  boxShadowFocus: string;
79
79
  loadingColor: string;
80
+ loadingColorSuccess: string;
81
+ borderSuccess: string;
82
+ borderHoverSuccess: string;
83
+ colorFocusSuccess: string;
84
+ borderFocusSuccess: string;
85
+ boxShadowFocusSuccess: string;
86
+ caretColorSuccess: string;
80
87
  loadingColorWarning: string;
81
88
  borderWarning: string;
82
89
  borderHoverWarning: string;
@@ -107,6 +107,13 @@ export declare const colorPickerProps: {
107
107
  borderFocus: string;
108
108
  boxShadowFocus: string;
109
109
  loadingColor: string;
110
+ loadingColorSuccess: string;
111
+ borderSuccess: string;
112
+ borderHoverSuccess: string;
113
+ colorFocusSuccess: string;
114
+ borderFocusSuccess: string;
115
+ boxShadowFocusSuccess: string;
116
+ caretColorSuccess: string;
110
117
  loadingColorWarning: string;
111
118
  borderWarning: string;
112
119
  borderHoverWarning: string;
@@ -411,6 +418,13 @@ export declare const colorPickerProps: {
411
418
  borderFocus: string;
412
419
  boxShadowFocus: string;
413
420
  loadingColor: string;
421
+ loadingColorSuccess: string;
422
+ borderSuccess: string;
423
+ borderHoverSuccess: string;
424
+ colorFocusSuccess: string;
425
+ borderFocusSuccess: string;
426
+ boxShadowFocusSuccess: string;
427
+ caretColorSuccess: string;
414
428
  loadingColorWarning: string;
415
429
  borderWarning: string;
416
430
  borderHoverWarning: string;
@@ -715,6 +729,13 @@ export declare const colorPickerProps: {
715
729
  borderFocus: string;
716
730
  boxShadowFocus: string;
717
731
  loadingColor: string;
732
+ loadingColorSuccess: string;
733
+ borderSuccess: string;
734
+ borderHoverSuccess: string;
735
+ colorFocusSuccess: string;
736
+ borderFocusSuccess: string;
737
+ boxShadowFocusSuccess: string;
738
+ caretColorSuccess: string;
718
739
  loadingColorWarning: string;
719
740
  borderWarning: string;
720
741
  borderHoverWarning: string;
@@ -1064,6 +1085,13 @@ declare const _default: import("vue").DefineComponent<{
1064
1085
  borderFocus: string;
1065
1086
  boxShadowFocus: string;
1066
1087
  loadingColor: string;
1088
+ loadingColorSuccess: string;
1089
+ borderSuccess: string;
1090
+ borderHoverSuccess: string;
1091
+ colorFocusSuccess: string;
1092
+ borderFocusSuccess: string;
1093
+ boxShadowFocusSuccess: string;
1094
+ caretColorSuccess: string;
1067
1095
  loadingColorWarning: string;
1068
1096
  borderWarning: string;
1069
1097
  borderHoverWarning: string;
@@ -1368,6 +1396,13 @@ declare const _default: import("vue").DefineComponent<{
1368
1396
  borderFocus: string;
1369
1397
  boxShadowFocus: string;
1370
1398
  loadingColor: string;
1399
+ loadingColorSuccess: string;
1400
+ borderSuccess: string;
1401
+ borderHoverSuccess: string;
1402
+ colorFocusSuccess: string;
1403
+ borderFocusSuccess: string;
1404
+ boxShadowFocusSuccess: string;
1405
+ caretColorSuccess: string;
1371
1406
  loadingColorWarning: string;
1372
1407
  borderWarning: string;
1373
1408
  borderHoverWarning: string;
@@ -1672,6 +1707,13 @@ declare const _default: import("vue").DefineComponent<{
1672
1707
  borderFocus: string;
1673
1708
  boxShadowFocus: string;
1674
1709
  loadingColor: string;
1710
+ loadingColorSuccess: string;
1711
+ borderSuccess: string;
1712
+ borderHoverSuccess: string;
1713
+ colorFocusSuccess: string;
1714
+ borderFocusSuccess: string;
1715
+ boxShadowFocusSuccess: string;
1716
+ caretColorSuccess: string;
1675
1717
  loadingColorWarning: string;
1676
1718
  borderWarning: string;
1677
1719
  borderHoverWarning: string;
@@ -2050,6 +2092,13 @@ declare const _default: import("vue").DefineComponent<{
2050
2092
  borderFocus: string;
2051
2093
  boxShadowFocus: string;
2052
2094
  loadingColor: string;
2095
+ loadingColorSuccess: string;
2096
+ borderSuccess: string;
2097
+ borderHoverSuccess: string;
2098
+ colorFocusSuccess: string;
2099
+ borderFocusSuccess: string;
2100
+ boxShadowFocusSuccess: string;
2101
+ caretColorSuccess: string;
2053
2102
  loadingColorWarning: string;
2054
2103
  borderWarning: string;
2055
2104
  borderHoverWarning: string;
@@ -2354,6 +2403,13 @@ declare const _default: import("vue").DefineComponent<{
2354
2403
  borderFocus: string;
2355
2404
  boxShadowFocus: string;
2356
2405
  loadingColor: string;
2406
+ loadingColorSuccess: string;
2407
+ borderSuccess: string;
2408
+ borderHoverSuccess: string;
2409
+ colorFocusSuccess: string;
2410
+ borderFocusSuccess: string;
2411
+ boxShadowFocusSuccess: string;
2412
+ caretColorSuccess: string;
2357
2413
  loadingColorWarning: string;
2358
2414
  borderWarning: string;
2359
2415
  borderHoverWarning: string;
@@ -2658,6 +2714,13 @@ declare const _default: import("vue").DefineComponent<{
2658
2714
  borderFocus: string;
2659
2715
  boxShadowFocus: string;
2660
2716
  loadingColor: string;
2717
+ loadingColorSuccess: string;
2718
+ borderSuccess: string;
2719
+ borderHoverSuccess: string;
2720
+ colorFocusSuccess: string;
2721
+ borderFocusSuccess: string;
2722
+ boxShadowFocusSuccess: string;
2723
+ caretColorSuccess: string;
2661
2724
  loadingColorWarning: string;
2662
2725
  borderWarning: string;
2663
2726
  borderHoverWarning: string;
@@ -80,6 +80,13 @@ declare const colorPickerLight: import("../../_mixins/use-theme").Theme<"ColorPi
80
80
  borderFocus: string;
81
81
  boxShadowFocus: string;
82
82
  loadingColor: string;
83
+ loadingColorSuccess: string;
84
+ borderSuccess: string;
85
+ borderHoverSuccess: string;
86
+ colorFocusSuccess: string;
87
+ borderFocusSuccess: string;
88
+ boxShadowFocusSuccess: string;
89
+ caretColorSuccess: string;
83
90
  loadingColorWarning: string;
84
91
  borderWarning: string;
85
92
  borderHoverWarning: string;
@@ -36,6 +36,7 @@ export declare const configProviderProps: {
36
36
  readonly default: "desktop-first";
37
37
  };
38
38
  readonly preflightStyleDisabled: BooleanConstructor;
39
+ readonly styleMountTarget: PropType<ParentNode | null>;
39
40
  readonly inlineThemeDisabled: {
40
41
  readonly type: BooleanConstructor;
41
42
  readonly default: undefined;
@@ -79,6 +80,7 @@ declare const _default: import("vue").DefineComponent<{
79
80
  readonly default: "desktop-first";
80
81
  };
81
82
  readonly preflightStyleDisabled: BooleanConstructor;
83
+ readonly styleMountTarget: PropType<ParentNode | null>;
82
84
  readonly inlineThemeDisabled: {
83
85
  readonly type: BooleanConstructor;
84
86
  readonly default: undefined;
@@ -126,6 +128,7 @@ declare const _default: import("vue").DefineComponent<{
126
128
  readonly default: "desktop-first";
127
129
  };
128
130
  readonly preflightStyleDisabled: BooleanConstructor;
131
+ readonly styleMountTarget: PropType<ParentNode | null>;
129
132
  readonly inlineThemeDisabled: {
130
133
  readonly type: BooleanConstructor;
131
134
  readonly default: undefined;
@@ -34,6 +34,7 @@ export const configProviderProps = {
34
34
  default: 'desktop-first'
35
35
  },
36
36
  preflightStyleDisabled: Boolean,
37
+ styleMountTarget: Object,
37
38
  inlineThemeDisabled: {
38
39
  type: Boolean,
39
40
  default: undefined
@@ -243,6 +244,7 @@ export default defineComponent({
243
244
  });
244
245
  const inlineThemeDisabled = props.inlineThemeDisabled || (UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.inlineThemeDisabled);
245
246
  const preflightStyleDisabled = props.preflightStyleDisabled || (UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.preflightStyleDisabled);
247
+ const styleMountTarget = props.styleMountTarget || (UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.styleMountTarget);
246
248
  const mergedThemeHashRef = computed(() => {
247
249
  const { value: theme } = mergedThemeRef;
248
250
  const { value: mergedThemeOverrides } = mergedThemeOverridesRef;
@@ -304,7 +306,8 @@ export default defineComponent({
304
306
  mergedThemeRef,
305
307
  mergedThemeOverridesRef,
306
308
  inlineThemeDisabled: inlineThemeDisabled || false,
307
- preflightStyleDisabled: preflightStyleDisabled || false
309
+ preflightStyleDisabled: preflightStyleDisabled || false,
310
+ styleMountTarget
308
311
  });
309
312
  return {
310
313
  mergedClsPrefix: mergedClsPrefixRef,
@@ -457,4 +457,5 @@ export interface ConfigProviderInjection {
457
457
  activeBreakpointThemeOverridesRef: Ref<GlobalThemeOverrides | undefined>;
458
458
  inlineThemeDisabled: boolean;
459
459
  preflightStyleDisabled: boolean;
460
+ styleMountTarget: ParentNode | undefined;
460
461
  }
@@ -85,6 +85,7 @@ declare const _default: import("vue").DefineComponent<{
85
85
  readonly default: "current";
86
86
  };
87
87
  readonly scrollbarProps: import("vue").PropType<import("../..").ScrollbarProps>;
88
+ readonly localStorageKey: StringConstructor;
88
89
  readonly renderCell: import("vue").PropType<(value: any, rowData: object, column: TableBaseColumn) => import("vue").VNodeChild>;
89
90
  readonly defaultEmptyValue: import("vue").PropType<string | (() => import("vue").VNodeChild) | undefined>;
90
91
  readonly renderExpandIcon: import("vue").PropType<import("./interface").RenderExpandIcon>;
@@ -801,6 +802,13 @@ declare const _default: import("vue").DefineComponent<{
801
802
  borderFocus: string;
802
803
  boxShadowFocus: string;
803
804
  loadingColor: string;
805
+ loadingColorSuccess: string;
806
+ borderSuccess: string;
807
+ borderHoverSuccess: string;
808
+ colorFocusSuccess: string;
809
+ borderFocusSuccess: string;
810
+ boxShadowFocusSuccess: string;
811
+ caretColorSuccess: string;
804
812
  loadingColorWarning: string;
805
813
  borderWarning: string;
806
814
  borderHoverWarning: string;
@@ -1749,6 +1757,13 @@ declare const _default: import("vue").DefineComponent<{
1749
1757
  borderFocus: string;
1750
1758
  boxShadowFocus: string;
1751
1759
  loadingColor: string;
1760
+ loadingColorSuccess: string;
1761
+ borderSuccess: string;
1762
+ borderHoverSuccess: string;
1763
+ colorFocusSuccess: string;
1764
+ borderFocusSuccess: string;
1765
+ boxShadowFocusSuccess: string;
1766
+ caretColorSuccess: string;
1752
1767
  loadingColorWarning: string;
1753
1768
  borderWarning: string;
1754
1769
  borderHoverWarning: string;
@@ -2697,6 +2712,13 @@ declare const _default: import("vue").DefineComponent<{
2697
2712
  borderFocus: string;
2698
2713
  boxShadowFocus: string;
2699
2714
  loadingColor: string;
2715
+ loadingColorSuccess: string;
2716
+ borderSuccess: string;
2717
+ borderHoverSuccess: string;
2718
+ colorFocusSuccess: string;
2719
+ borderFocusSuccess: string;
2720
+ boxShadowFocusSuccess: string;
2721
+ caretColorSuccess: string;
2700
2722
  loadingColorWarning: string;
2701
2723
  borderWarning: string;
2702
2724
  borderHoverWarning: string;
@@ -3668,6 +3690,13 @@ declare const _default: import("vue").DefineComponent<{
3668
3690
  borderFocus: string;
3669
3691
  boxShadowFocus: string;
3670
3692
  loadingColor: string;
3693
+ loadingColorSuccess: string;
3694
+ borderSuccess: string;
3695
+ borderHoverSuccess: string;
3696
+ colorFocusSuccess: string;
3697
+ borderFocusSuccess: string;
3698
+ boxShadowFocusSuccess: string;
3699
+ caretColorSuccess: string;
3671
3700
  loadingColorWarning: string;
3672
3701
  borderWarning: string;
3673
3702
  borderHoverWarning: string;
@@ -4177,6 +4206,13 @@ declare const _default: import("vue").DefineComponent<{
4177
4206
  borderFocus: string;
4178
4207
  boxShadowFocus: string;
4179
4208
  loadingColor: string;
4209
+ loadingColorSuccess: string;
4210
+ borderSuccess: string;
4211
+ borderHoverSuccess: string;
4212
+ colorFocusSuccess: string;
4213
+ borderFocusSuccess: string;
4214
+ boxShadowFocusSuccess: string;
4215
+ caretColorSuccess: string;
4180
4216
  loadingColorWarning: string;
4181
4217
  borderWarning: string;
4182
4218
  borderHoverWarning: string;
@@ -4498,6 +4534,7 @@ declare const _default: import("vue").DefineComponent<{
4498
4534
  readonly default: "current";
4499
4535
  };
4500
4536
  readonly scrollbarProps: import("vue").PropType<import("../..").ScrollbarProps>;
4537
+ readonly localStorageKey: StringConstructor;
4501
4538
  readonly renderCell: import("vue").PropType<(value: any, rowData: object, column: TableBaseColumn) => import("vue").VNodeChild>;
4502
4539
  readonly defaultEmptyValue: import("vue").PropType<string | (() => import("vue").VNodeChild) | undefined>;
4503
4540
  readonly renderExpandIcon: import("vue").PropType<import("./interface").RenderExpandIcon>;
@@ -5214,6 +5251,13 @@ declare const _default: import("vue").DefineComponent<{
5214
5251
  borderFocus: string;
5215
5252
  boxShadowFocus: string;
5216
5253
  loadingColor: string;
5254
+ loadingColorSuccess: string;
5255
+ borderSuccess: string;
5256
+ borderHoverSuccess: string;
5257
+ colorFocusSuccess: string;
5258
+ borderFocusSuccess: string;
5259
+ boxShadowFocusSuccess: string;
5260
+ caretColorSuccess: string;
5217
5261
  loadingColorWarning: string;
5218
5262
  borderWarning: string;
5219
5263
  borderHoverWarning: string;
@@ -6162,6 +6206,13 @@ declare const _default: import("vue").DefineComponent<{
6162
6206
  borderFocus: string;
6163
6207
  boxShadowFocus: string;
6164
6208
  loadingColor: string;
6209
+ loadingColorSuccess: string;
6210
+ borderSuccess: string;
6211
+ borderHoverSuccess: string;
6212
+ colorFocusSuccess: string;
6213
+ borderFocusSuccess: string;
6214
+ boxShadowFocusSuccess: string;
6215
+ caretColorSuccess: string;
6165
6216
  loadingColorWarning: string;
6166
6217
  borderWarning: string;
6167
6218
  borderHoverWarning: string;
@@ -7110,6 +7161,13 @@ declare const _default: import("vue").DefineComponent<{
7110
7161
  borderFocus: string;
7111
7162
  boxShadowFocus: string;
7112
7163
  loadingColor: string;
7164
+ loadingColorSuccess: string;
7165
+ borderSuccess: string;
7166
+ borderHoverSuccess: string;
7167
+ colorFocusSuccess: string;
7168
+ borderFocusSuccess: string;
7169
+ boxShadowFocusSuccess: string;
7170
+ caretColorSuccess: string;
7113
7171
  loadingColorWarning: string;
7114
7172
  borderWarning: string;
7115
7173
  borderHoverWarning: string;
@@ -1,4 +1,4 @@
1
- import { h, computed, defineComponent, ref, provide, toRef, Transition, watchEffect } from 'vue';
1
+ import { h, computed, defineComponent, ref, provide, toRef, onMounted, watch, Transition, watchEffect } from 'vue';
2
2
  import { createId } from 'seemly';
3
3
  import { useConfig, useLocale, useTheme, useThemeClass } from '../../_mixins';
4
4
  import { UBaseLoading } from '../../_internal';
@@ -13,6 +13,7 @@ import { useResizable } from './use-resizable';
13
13
  import { dataTableInjectionKey, dataTableProps } from './interface';
14
14
  import { useGroupHeader } from './use-group-header';
15
15
  import { useExpand } from './use-expand';
16
+ import { loadTableState, saveTableState, restoreSortStateFromStored } from './use-table-storage';
16
17
  import style from './styles/index.cssr';
17
18
  export default defineComponent({
18
19
  name: 'DataTable',
@@ -53,10 +54,10 @@ export default defineComponent({
53
54
  const themeRef = useTheme('DataTable', '-data-table', style, dataTableLight, props, mergedClsPrefixRef);
54
55
  const bodyWidthRef = ref(null);
55
56
  const mainTableInstRef = ref(null);
56
- const { getResizableWidth, clearResizableWidth, doUpdateResizableWidth } = useResizable();
57
+ const { getResizableWidth, clearResizableWidth, doUpdateResizableWidth, resizableWidthsRef } = useResizable();
57
58
  const { rowsRef, colsRef, dataRelatedColsRef, hasEllipsisRef } = useGroupHeader(props, getResizableWidth);
58
- const { treeMateRef, mergedCurrentPageRef, paginatedDataRef, rawPaginatedDataRef, selectionColumnRef, hoverKeyRef, mergedPaginationRef, mergedFilterStateRef, mergedSortStateRef, childTriggerColIndexRef, doUpdatePage, doUpdateFilters, onUnstableColumnResize, deriveNextSorter, filter, filters, clearFilter, clearFilters, clearSorter, page, sort } = useTableData(props, { dataRelatedColsRef });
59
- const { doCheckAll, doUncheckAll, doCheck, doUncheck, headerCheckboxDisabledRef, someRowsCheckedRef, allRowsCheckedRef, mergedCheckedRowKeySetRef, mergedInderminateRowKeySetRef } = useCheck(props, {
59
+ const { treeMateRef, mergedCurrentPageRef, paginatedDataRef, rawPaginatedDataRef, selectionColumnRef, hoverKeyRef, mergedPaginationRef, mergedFilterStateRef, mergedSortStateRef, childTriggerColIndexRef, doUpdatePage, doUpdatePageSize, doUpdateFilters, onUnstableColumnResize, deriveNextSorter, restoreSortState, filter, filters, clearFilter, clearFilters, clearSorter, page, sort } = useTableData(props, { dataRelatedColsRef });
60
+ const { doCheckAll, doUncheckAll, doCheck, doUncheck, doUpdateCheckedRowKeys, mergedCheckedRowKeysRef, headerCheckboxDisabledRef, someRowsCheckedRef, allRowsCheckedRef, mergedCheckedRowKeySetRef, mergedInderminateRowKeySetRef } = useCheck(props, {
60
61
  selectionColumnRef,
61
62
  treeMateRef,
62
63
  paginatedDataRef
@@ -67,6 +68,72 @@ export default defineComponent({
67
68
  mainTableInstRef,
68
69
  mergedCurrentPageRef
69
70
  });
71
+ onMounted(() => {
72
+ var _a, _b;
73
+ const key = props.localStorageKey;
74
+ if (!key)
75
+ return;
76
+ const stored = loadTableState(key);
77
+ if (!stored)
78
+ return;
79
+ if (stored.columnWidths && Object.keys(stored.columnWidths).length > 0) {
80
+ resizableWidthsRef.value = Object.assign(Object.assign({}, resizableWidthsRef.value), stored.columnWidths);
81
+ }
82
+ if (props.pagination && stored.page != null) {
83
+ doUpdatePage(stored.page);
84
+ }
85
+ if (props.pagination && stored.pageSize != null) {
86
+ doUpdatePageSize(stored.pageSize);
87
+ }
88
+ if (stored.filters) {
89
+ filter(stored.filters);
90
+ }
91
+ const sortToRestore = restoreSortStateFromStored(stored.sortState, dataRelatedColsRef.value);
92
+ if (sortToRestore === null || sortToRestore === void 0 ? void 0 : sortToRestore.length) {
93
+ restoreSortState(sortToRestore);
94
+ }
95
+ if ((_a = stored.checkedRowKeys) === null || _a === void 0 ? void 0 : _a.length) {
96
+ doUpdateCheckedRowKeys(stored.checkedRowKeys, undefined, 'check');
97
+ }
98
+ if ((_b = stored.expandedRowKeys) === null || _b === void 0 ? void 0 : _b.length) {
99
+ doUpdateExpandedRowKeys(stored.expandedRowKeys);
100
+ }
101
+ });
102
+ watch(() => {
103
+ var _a, _b;
104
+ return props.localStorageKey
105
+ ? {
106
+ key: props.localStorageKey,
107
+ columnWidths: resizableWidthsRef.value,
108
+ page: (_a = mergedPaginationRef.value) === null || _a === void 0 ? void 0 : _a.page,
109
+ pageSize: (_b = mergedPaginationRef.value) === null || _b === void 0 ? void 0 : _b.pageSize,
110
+ filters: mergedFilterStateRef.value,
111
+ sortState: mergedSortStateRef.value.map((s) => ({
112
+ columnKey: s.columnKey,
113
+ order: s.order
114
+ })),
115
+ checkedRowKeys: mergedCheckedRowKeysRef.value,
116
+ expandedRowKeys: mergedExpandedRowKeysRef.value
117
+ }
118
+ : null;
119
+ }, (state) => {
120
+ var _a, _b;
121
+ if (!(state === null || state === void 0 ? void 0 : state.key))
122
+ return;
123
+ saveTableState(state.key, {
124
+ columnWidths: state.columnWidths,
125
+ page: state.page,
126
+ pageSize: state.pageSize,
127
+ filters: state.filters,
128
+ sortState: state.sortState.length ? state.sortState : undefined,
129
+ checkedRowKeys: ((_a = state.checkedRowKeys) === null || _a === void 0 ? void 0 : _a.length)
130
+ ? state.checkedRowKeys
131
+ : undefined,
132
+ expandedRowKeys: ((_b = state.expandedRowKeys) === null || _b === void 0 ? void 0 : _b.length)
133
+ ? state.expandedRowKeys
134
+ : undefined
135
+ });
136
+ }, { deep: true });
70
137
  const { localeRef } = useLocale('DataTable');
71
138
  const mergedTableLayoutRef = computed(() => {
72
139
  // Layout