@uzum-tech/ui 1.11.2 → 1.12.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 (279) hide show
  1. package/dist/index.js +10829 -6652
  2. package/dist/index.prod.js +4 -4
  3. package/es/_internal/icons/BurgerMenuIcon.d.ts +2 -0
  4. package/es/_internal/icons/BurgerMenuIcon.js +4 -0
  5. package/es/_internal/icons/Logout.d.ts +2 -0
  6. package/es/_internal/icons/Logout.js +4 -0
  7. package/es/_internal/icons/OzbekFlag.d.ts +2 -0
  8. package/es/_internal/icons/OzbekFlag.js +15 -0
  9. package/es/_internal/icons/RussiaFlag.d.ts +2 -0
  10. package/es/_internal/icons/RussiaFlag.js +11 -0
  11. package/es/_internal/icons/SendFilled.d.ts +2 -0
  12. package/es/_internal/icons/SendFilled.js +9 -0
  13. package/es/_internal/icons/index.d.ts +5 -0
  14. package/es/_internal/icons/index.js +5 -0
  15. package/es/_styles/common/dark.js +1 -1
  16. package/es/_styles/common/light.d.ts +1 -0
  17. package/es/_styles/common/light.js +1 -1
  18. package/es/chat/src/Chat.d.ts +464 -83
  19. package/es/chat/src/Chat.js +17 -2
  20. package/es/chat/src/ChatListItems.d.ts +497 -94
  21. package/es/chat/src/ChatListItems.js +1 -1
  22. package/es/chat/src/ChatMessages.d.ts +501 -94
  23. package/es/chat/src/ChatMessages.js +115 -22
  24. package/es/chat/src/ChatParts/MainArea.d.ts +7 -3
  25. package/es/chat/src/ChatParts/MainArea.js +110 -14
  26. package/es/chat/src/ChatParts/Sidebar.d.ts +64 -11
  27. package/es/chat/src/interface.d.ts +18 -0
  28. package/es/chat/src/interface.js +6 -0
  29. package/es/chat/src/styles/index.cssr.js +22 -1
  30. package/es/chat/styles/dark.d.ts +41 -8
  31. package/es/chat/styles/dark.js +6 -2
  32. package/es/chat/styles/light.d.ts +42 -8
  33. package/es/chat/styles/light.js +7 -2
  34. package/es/components.d.ts +3 -0
  35. package/es/components.js +3 -0
  36. package/es/config-provider/src/internal-interface.d.ts +17 -0
  37. package/es/dialog/src/DialogProvider.d.ts +2 -0
  38. package/es/form/src/FormItemCol.d.ts +2 -2
  39. package/es/form/src/FormItemGridItem.d.ts +2 -2
  40. package/es/form/src/FormItemRow.d.ts +1 -1
  41. package/es/grid/src/Grid.d.ts +1 -1
  42. package/es/grid/src/GridItem.d.ts +2 -2
  43. package/es/header/demos/mock.d.ts +2 -0
  44. package/es/header/demos/mock.js +235 -0
  45. package/es/header/index.d.ts +12 -0
  46. package/es/header/index.js +10 -0
  47. package/es/header/src/Header.d.ts +604 -0
  48. package/es/header/src/Header.js +320 -0
  49. package/es/header/src/HeaderActions.d.ts +120 -0
  50. package/es/header/src/HeaderActions.js +166 -0
  51. package/es/header/src/HeaderDesktopLayout.d.ts +25 -0
  52. package/es/header/src/HeaderDesktopLayout.js +24 -0
  53. package/es/header/src/HeaderMobileLayout.d.ts +25 -0
  54. package/es/header/src/HeaderMobileLayout.js +21 -0
  55. package/es/header/src/HeaderNavigation.d.ts +128 -0
  56. package/es/header/src/HeaderNavigation.js +172 -0
  57. package/es/header/src/HeaderSearchDesktop.d.ts +79 -0
  58. package/es/header/src/HeaderSearchDesktop.js +77 -0
  59. package/es/header/src/HeaderSearchMobile.d.ts +73 -0
  60. package/es/header/src/HeaderSearchMobile.js +126 -0
  61. package/es/header/src/HeaderSearchResults.d.ts +81 -0
  62. package/es/header/src/HeaderSearchResults.js +74 -0
  63. package/es/header/src/constants.d.ts +1 -0
  64. package/es/header/src/constants.js +1 -0
  65. package/es/header/src/interface.d.ts +58 -0
  66. package/es/header/src/interface.js +1 -0
  67. package/es/header/src/mobile/HeaderMobile.d.ts +218 -0
  68. package/es/header/src/mobile/HeaderMobile.js +241 -0
  69. package/es/header/src/styles/index.cssr.d.ts +6 -0
  70. package/es/header/src/styles/index.cssr.js +519 -0
  71. package/es/header/src/utils.d.ts +12 -0
  72. package/es/header/src/utils.js +47 -0
  73. package/es/header/styles/dark.d.ts +36 -0
  74. package/es/header/styles/dark.js +9 -0
  75. package/es/header/styles/index.d.ts +3 -0
  76. package/es/header/styles/index.js +2 -0
  77. package/es/header/styles/light.d.ts +72 -0
  78. package/es/header/styles/light.js +45 -0
  79. package/es/icon/src/Icon.d.ts +3 -0
  80. package/es/icon/src/Icon.js +3 -2
  81. package/es/icon-bar/index.d.ts +4 -0
  82. package/es/icon-bar/index.js +2 -0
  83. package/es/icon-bar/src/IconBar.d.ts +175 -0
  84. package/es/icon-bar/src/IconBar.js +57 -0
  85. package/es/icon-bar/src/IconBarItem.d.ts +163 -0
  86. package/es/icon-bar/src/IconBarItem.js +50 -0
  87. package/es/icon-bar/src/styles/index.cssr.d.ts +2 -0
  88. package/es/icon-bar/src/styles/index.cssr.js +62 -0
  89. package/es/icon-bar/styles/dark.d.ts +3 -0
  90. package/es/icon-bar/styles/dark.js +8 -0
  91. package/es/icon-bar/styles/index.d.ts +3 -0
  92. package/es/icon-bar/styles/index.js +2 -0
  93. package/es/icon-bar/styles/light.d.ts +19 -0
  94. package/es/icon-bar/styles/light.js +23 -0
  95. package/es/locales/common/arDZ.js +11 -1
  96. package/es/locales/common/deDE.js +11 -1
  97. package/es/locales/common/enGB.js +11 -1
  98. package/es/locales/common/enUS.d.ts +10 -0
  99. package/es/locales/common/enUS.js +11 -1
  100. package/es/locales/common/eo.js +11 -1
  101. package/es/locales/common/esAR.js +11 -1
  102. package/es/locales/common/faIR.js +11 -1
  103. package/es/locales/common/frFR.js +11 -1
  104. package/es/locales/common/idID.js +11 -1
  105. package/es/locales/common/itIT.js +11 -1
  106. package/es/locales/common/jaJP.js +11 -1
  107. package/es/locales/common/koKR.js +11 -1
  108. package/es/locales/common/nbNO.js +11 -1
  109. package/es/locales/common/nlNL.js +11 -1
  110. package/es/locales/common/plPL.js +11 -1
  111. package/es/locales/common/ptBR.js +11 -1
  112. package/es/locales/common/ruRU.js +11 -1
  113. package/es/locales/common/skSK.js +11 -1
  114. package/es/locales/common/svSE.js +11 -1
  115. package/es/locales/common/thTH.js +11 -1
  116. package/es/locales/common/trTR.js +11 -1
  117. package/es/locales/common/ukUA.js +11 -1
  118. package/es/locales/common/viVN.js +11 -1
  119. package/es/locales/common/zhCN.js +11 -1
  120. package/es/locales/common/zhTW.js +11 -1
  121. package/es/qr-code/index.d.ts +2 -0
  122. package/es/qr-code/index.js +1 -0
  123. package/es/qr-code/src/QrCode.d.ts +171 -0
  124. package/es/qr-code/src/QrCode.js +229 -0
  125. package/es/qr-code/src/qrcodegen.d.ts +95 -0
  126. package/es/qr-code/src/qrcodegen.js +949 -0
  127. package/es/qr-code/src/styles/index.cssr.d.ts +2 -0
  128. package/es/qr-code/src/styles/index.cssr.js +8 -0
  129. package/es/qr-code/styles/dark.d.ts +3 -0
  130. package/es/qr-code/styles/dark.js +11 -0
  131. package/es/qr-code/styles/index.d.ts +3 -0
  132. package/es/qr-code/styles/index.js +2 -0
  133. package/es/qr-code/styles/light.d.ts +9 -0
  134. package/es/qr-code/styles/light.js +12 -0
  135. package/es/theme-editor/src/ThemeEditor.d.ts +1 -0
  136. package/es/themes/dark.js +7 -1
  137. package/es/themes/light.js +7 -1
  138. package/es/version.d.ts +1 -1
  139. package/es/version.js +1 -1
  140. package/lib/_internal/icons/BurgerMenuIcon.d.ts +2 -0
  141. package/lib/_internal/icons/BurgerMenuIcon.js +6 -0
  142. package/lib/_internal/icons/Logout.d.ts +2 -0
  143. package/lib/_internal/icons/Logout.js +6 -0
  144. package/lib/_internal/icons/OzbekFlag.d.ts +2 -0
  145. package/lib/_internal/icons/OzbekFlag.js +17 -0
  146. package/lib/_internal/icons/RussiaFlag.d.ts +2 -0
  147. package/lib/_internal/icons/RussiaFlag.js +13 -0
  148. package/lib/_internal/icons/SendFilled.d.ts +2 -0
  149. package/lib/_internal/icons/SendFilled.js +11 -0
  150. package/lib/_internal/icons/index.d.ts +5 -0
  151. package/lib/_internal/icons/index.js +11 -1
  152. package/lib/_styles/common/dark.js +1 -1
  153. package/lib/_styles/common/light.d.ts +1 -0
  154. package/lib/_styles/common/light.js +1 -1
  155. package/lib/chat/src/Chat.d.ts +464 -83
  156. package/lib/chat/src/Chat.js +17 -2
  157. package/lib/chat/src/ChatListItems.d.ts +497 -94
  158. package/lib/chat/src/ChatListItems.js +1 -1
  159. package/lib/chat/src/ChatMessages.d.ts +501 -94
  160. package/lib/chat/src/ChatMessages.js +113 -20
  161. package/lib/chat/src/ChatParts/MainArea.d.ts +7 -3
  162. package/lib/chat/src/ChatParts/MainArea.js +108 -12
  163. package/lib/chat/src/ChatParts/Sidebar.d.ts +64 -11
  164. package/lib/chat/src/interface.d.ts +18 -0
  165. package/lib/chat/src/interface.js +7 -1
  166. package/lib/chat/src/styles/index.cssr.js +22 -1
  167. package/lib/chat/styles/dark.d.ts +41 -8
  168. package/lib/chat/styles/dark.js +6 -2
  169. package/lib/chat/styles/light.d.ts +42 -8
  170. package/lib/chat/styles/light.js +7 -2
  171. package/lib/components.d.ts +3 -0
  172. package/lib/components.js +3 -0
  173. package/lib/config-provider/src/internal-interface.d.ts +17 -0
  174. package/lib/dialog/src/DialogProvider.d.ts +2 -0
  175. package/lib/form/src/FormItemCol.d.ts +2 -2
  176. package/lib/form/src/FormItemGridItem.d.ts +2 -2
  177. package/lib/form/src/FormItemRow.d.ts +1 -1
  178. package/lib/grid/src/Grid.d.ts +1 -1
  179. package/lib/grid/src/GridItem.d.ts +2 -2
  180. package/lib/header/demos/mock.d.ts +2 -0
  181. package/lib/header/demos/mock.js +238 -0
  182. package/lib/header/index.d.ts +12 -0
  183. package/lib/header/index.js +48 -0
  184. package/lib/header/src/Header.d.ts +604 -0
  185. package/lib/header/src/Header.js +349 -0
  186. package/lib/header/src/HeaderActions.d.ts +120 -0
  187. package/lib/header/src/HeaderActions.js +172 -0
  188. package/lib/header/src/HeaderDesktopLayout.d.ts +25 -0
  189. package/lib/header/src/HeaderDesktopLayout.js +27 -0
  190. package/lib/header/src/HeaderMobileLayout.d.ts +25 -0
  191. package/lib/header/src/HeaderMobileLayout.js +24 -0
  192. package/lib/header/src/HeaderNavigation.d.ts +128 -0
  193. package/lib/header/src/HeaderNavigation.js +175 -0
  194. package/lib/header/src/HeaderSearchDesktop.d.ts +79 -0
  195. package/lib/header/src/HeaderSearchDesktop.js +83 -0
  196. package/lib/header/src/HeaderSearchMobile.d.ts +73 -0
  197. package/lib/header/src/HeaderSearchMobile.js +132 -0
  198. package/lib/header/src/HeaderSearchResults.d.ts +81 -0
  199. package/lib/header/src/HeaderSearchResults.js +77 -0
  200. package/lib/header/src/constants.d.ts +1 -0
  201. package/lib/header/src/constants.js +4 -0
  202. package/lib/header/src/interface.d.ts +58 -0
  203. package/lib/header/src/interface.js +2 -0
  204. package/lib/header/src/mobile/HeaderMobile.d.ts +218 -0
  205. package/lib/header/src/mobile/HeaderMobile.js +244 -0
  206. package/lib/header/src/styles/index.cssr.d.ts +6 -0
  207. package/lib/header/src/styles/index.cssr.js +525 -0
  208. package/lib/header/src/utils.d.ts +12 -0
  209. package/lib/header/src/utils.js +58 -0
  210. package/lib/header/styles/dark.d.ts +36 -0
  211. package/lib/header/styles/dark.js +11 -0
  212. package/lib/header/styles/index.d.ts +3 -0
  213. package/lib/header/styles/index.js +10 -0
  214. package/lib/header/styles/light.d.ts +72 -0
  215. package/lib/header/styles/light.js +49 -0
  216. package/lib/icon/src/Icon.d.ts +3 -0
  217. package/lib/icon/src/Icon.js +3 -2
  218. package/lib/icon-bar/index.d.ts +4 -0
  219. package/lib/icon-bar/index.js +12 -0
  220. package/lib/icon-bar/src/IconBar.d.ts +175 -0
  221. package/lib/icon-bar/src/IconBar.js +63 -0
  222. package/lib/icon-bar/src/IconBarItem.d.ts +163 -0
  223. package/lib/icon-bar/src/IconBarItem.js +56 -0
  224. package/lib/icon-bar/src/styles/index.cssr.d.ts +2 -0
  225. package/lib/icon-bar/src/styles/index.cssr.js +67 -0
  226. package/lib/icon-bar/styles/dark.d.ts +3 -0
  227. package/lib/icon-bar/styles/dark.js +10 -0
  228. package/lib/icon-bar/styles/index.d.ts +3 -0
  229. package/lib/icon-bar/styles/index.js +10 -0
  230. package/lib/icon-bar/styles/light.d.ts +19 -0
  231. package/lib/icon-bar/styles/light.js +27 -0
  232. package/lib/locales/common/arDZ.js +11 -1
  233. package/lib/locales/common/deDE.js +11 -1
  234. package/lib/locales/common/enGB.js +11 -1
  235. package/lib/locales/common/enUS.d.ts +10 -0
  236. package/lib/locales/common/enUS.js +11 -1
  237. package/lib/locales/common/eo.js +11 -1
  238. package/lib/locales/common/esAR.js +11 -1
  239. package/lib/locales/common/faIR.js +11 -1
  240. package/lib/locales/common/frFR.js +11 -1
  241. package/lib/locales/common/idID.js +11 -1
  242. package/lib/locales/common/itIT.js +11 -1
  243. package/lib/locales/common/jaJP.js +11 -1
  244. package/lib/locales/common/koKR.js +11 -1
  245. package/lib/locales/common/nbNO.js +11 -1
  246. package/lib/locales/common/nlNL.js +11 -1
  247. package/lib/locales/common/plPL.js +11 -1
  248. package/lib/locales/common/ptBR.js +11 -1
  249. package/lib/locales/common/ruRU.js +11 -1
  250. package/lib/locales/common/skSK.js +11 -1
  251. package/lib/locales/common/svSE.js +11 -1
  252. package/lib/locales/common/thTH.js +11 -1
  253. package/lib/locales/common/trTR.js +11 -1
  254. package/lib/locales/common/ukUA.js +11 -1
  255. package/lib/locales/common/viVN.js +11 -1
  256. package/lib/locales/common/zhCN.js +11 -1
  257. package/lib/locales/common/zhTW.js +11 -1
  258. package/lib/qr-code/index.d.ts +2 -0
  259. package/lib/qr-code/index.js +9 -0
  260. package/lib/qr-code/src/QrCode.d.ts +171 -0
  261. package/lib/qr-code/src/QrCode.js +235 -0
  262. package/lib/qr-code/src/qrcodegen.d.ts +95 -0
  263. package/lib/qr-code/src/qrcodegen.js +950 -0
  264. package/lib/qr-code/src/styles/index.cssr.d.ts +2 -0
  265. package/lib/qr-code/src/styles/index.cssr.js +13 -0
  266. package/lib/qr-code/styles/dark.d.ts +3 -0
  267. package/lib/qr-code/styles/dark.js +13 -0
  268. package/lib/qr-code/styles/index.d.ts +3 -0
  269. package/lib/qr-code/styles/index.js +10 -0
  270. package/lib/qr-code/styles/light.d.ts +9 -0
  271. package/lib/qr-code/styles/light.js +14 -0
  272. package/lib/theme-editor/src/ThemeEditor.d.ts +1 -0
  273. package/lib/themes/dark.js +7 -1
  274. package/lib/themes/light.js +7 -1
  275. package/lib/version.d.ts +1 -1
  276. package/lib/version.js +1 -1
  277. package/package.json +1 -1
  278. package/volar.d.ts +166 -153
  279. package/web-types.json +854 -2
@@ -0,0 +1,244 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.headerMobileProps = void 0;
4
+ const vue_1 = require("vue");
5
+ const button_1 = require("../../../button");
6
+ const icon_1 = require("../../../icon");
7
+ const drawer_1 = require("../../../drawer");
8
+ const dropdown_1 = require("../../../dropdown");
9
+ const icons_1 = require("../../../_internal/icons");
10
+ const flex_1 = require("../../../flex");
11
+ const utils_1 = require("../utils");
12
+ const _mixins_1 = require("../../../_mixins");
13
+ exports.headerMobileProps = {
14
+ visible: {
15
+ type: Boolean,
16
+ default: false
17
+ },
18
+ menuOptions: {
19
+ type: Array,
20
+ default: () => []
21
+ },
22
+ activeMenuValue: [String, Number],
23
+ langOptions: {
24
+ type: Array,
25
+ required: true
26
+ },
27
+ currentLang: {
28
+ type: Object,
29
+ required: true
30
+ },
31
+ mergedClsPrefix: {
32
+ type: String,
33
+ required: true
34
+ },
35
+ cssVars: Object,
36
+ menuType: {
37
+ type: String,
38
+ default: 'drawer'
39
+ },
40
+ drawerPlacement: {
41
+ type: String,
42
+ default: 'right'
43
+ },
44
+ drawerWidth: {
45
+ type: String,
46
+ default: '84%'
47
+ },
48
+ showFooterActions: {
49
+ type: Boolean,
50
+ default: true
51
+ },
52
+ primaryActionText: {
53
+ type: String,
54
+ default: undefined
55
+ },
56
+ secondaryActionText: {
57
+ type: String,
58
+ default: undefined
59
+ },
60
+ showHeaderActions: {
61
+ type: Boolean,
62
+ default: true
63
+ },
64
+ onToggle: Function,
65
+ onClose: Function,
66
+ onMenuItemClick: Function,
67
+ onLanguageSelect: Function,
68
+ onPrimaryAction: Function,
69
+ onSecondaryAction: Function,
70
+ onSearchClick: Function,
71
+ onSearch: Function,
72
+ onSearchResultSelect: Function,
73
+ onPreview: Function,
74
+ onLogout: Function
75
+ };
76
+ exports.default = (0, vue_1.defineComponent)({
77
+ name: 'HeaderMobile',
78
+ props: exports.headerMobileProps,
79
+ setup(props) {
80
+ const { localeRef } = (0, _mixins_1.useLocale)('Header');
81
+ const blockClassRef = (0, vue_1.computed)(() => `${props.mergedClsPrefix}-header`);
82
+ const mobileMenuClassRef = (0, vue_1.computed)(() => `${props.mergedClsPrefix}-header-mobile-menu`);
83
+ const expandedKeysRef = (0, vue_1.ref)(new Set());
84
+ const toggleExpand = (key) => {
85
+ const newSet = new Set(expandedKeysRef.value);
86
+ if (newSet.has(key)) {
87
+ newSet.delete(key);
88
+ }
89
+ else {
90
+ newSet.add(key);
91
+ }
92
+ expandedKeysRef.value = newSet;
93
+ };
94
+ const normalizeMobileMenuOptions = (0, vue_1.computed)(() => {
95
+ return props.menuOptions.map((item) => {
96
+ const option = item.option;
97
+ if (!option.children || !Array.isArray(option.children)) {
98
+ return item;
99
+ }
100
+ const hasColumns = option.children.some((child) => child.type === 'column');
101
+ if (!hasColumns) {
102
+ return item;
103
+ }
104
+ const flattenedChildren = [];
105
+ option.children.forEach((child) => {
106
+ if (child.type === 'column' && Array.isArray(child.children)) {
107
+ flattenedChildren.push(...child.children);
108
+ }
109
+ else {
110
+ flattenedChildren.push(child);
111
+ }
112
+ });
113
+ return Object.assign(Object.assign({}, item), { option: Object.assign(Object.assign({}, option), { children: flattenedChildren }) });
114
+ });
115
+ });
116
+ const primaryActionTextRef = (0, vue_1.computed)(() => { var _a; return (_a = props.primaryActionText) !== null && _a !== void 0 ? _a : localeRef.value.primaryActionText; });
117
+ const secondaryActionTextRef = (0, vue_1.computed)(() => { var _a; return (_a = props.secondaryActionText) !== null && _a !== void 0 ? _a : localeRef.value.secondaryActionText; });
118
+ return {
119
+ blockClass: blockClassRef,
120
+ mobileMenuClass: mobileMenuClassRef,
121
+ expandedKeys: expandedKeysRef,
122
+ normalizeMobileMenuOptions,
123
+ primaryActionTextRef,
124
+ secondaryActionTextRef,
125
+ toggleExpand
126
+ };
127
+ },
128
+ render() {
129
+ const blockClass = this.blockClass;
130
+ const mobileMenuClass = this.mobileMenuClass;
131
+ const renderGroupItem = (child, parentKey, index) => {
132
+ const childKey = typeof child.key === 'string' || typeof child.key === 'number'
133
+ ? child.key
134
+ : `${parentKey}-child-${index}`;
135
+ const isGroup = child.type === 'group';
136
+ const hasGroupChildren = isGroup && Array.isArray(child.children) && child.children.length > 0;
137
+ if (isGroup && hasGroupChildren && child.children) {
138
+ return ((0, vue_1.h)("div", { key: childKey, class: `${mobileMenuClass}__group` },
139
+ (0, vue_1.h)("div", { class: `${mobileMenuClass}__group-title` }, (0, utils_1.renderOptionLabel)(child)),
140
+ (0, vue_1.h)("div", { class: `${mobileMenuClass}__group-items` }, child.children.map((groupChild, groupIndex) => {
141
+ const groupChildKey = typeof groupChild.key === 'string' ||
142
+ typeof groupChild.key === 'number'
143
+ ? groupChild.key
144
+ : `${childKey}-item-${groupIndex}`;
145
+ return ((0, vue_1.h)("div", { key: groupChildKey, class: [
146
+ `${mobileMenuClass}__group-item`,
147
+ this.activeMenuValue === groupChild.key &&
148
+ `${mobileMenuClass}__group-item--active`
149
+ ], onClick: () => {
150
+ var _a;
151
+ if (!groupChild.disabled) {
152
+ (_a = this.onMenuItemClick) === null || _a === void 0 ? void 0 : _a.call(this, groupChild);
153
+ }
154
+ } },
155
+ (0, vue_1.h)("span", { class: `${mobileMenuClass}__group-item-label` }, (0, utils_1.renderOptionLabel)(groupChild)),
156
+ (0, utils_1.renderBadge)(groupChild, `${blockClass}__badge`)));
157
+ }))));
158
+ }
159
+ return ((0, vue_1.h)("div", { key: childKey, class: [
160
+ `${mobileMenuClass}__child-item`,
161
+ this.activeMenuValue === child.key &&
162
+ `${mobileMenuClass}__child-item--active`
163
+ ], onClick: () => {
164
+ var _a;
165
+ if (!child.disabled) {
166
+ (_a = this.onMenuItemClick) === null || _a === void 0 ? void 0 : _a.call(this, child);
167
+ }
168
+ } },
169
+ (0, vue_1.h)("span", { class: `${mobileMenuClass}__child-item-label` }, (0, utils_1.renderOptionLabel)(child)),
170
+ (0, utils_1.renderBadge)(child, `${blockClass}__badge`)));
171
+ };
172
+ const renderMobileMenuItem = (item) => {
173
+ const option = item.option;
174
+ const isExpandable = (0, utils_1.hasChildren)(option);
175
+ const isExpanded = this.expandedKeys.has(item.key);
176
+ const handleClick = () => {
177
+ var _a;
178
+ if (option.disabled)
179
+ return;
180
+ if (isExpandable) {
181
+ this.toggleExpand(item.key);
182
+ }
183
+ else {
184
+ (_a = this.onMenuItemClick) === null || _a === void 0 ? void 0 : _a.call(this, option);
185
+ }
186
+ };
187
+ return ((0, vue_1.h)("div", { key: item.key },
188
+ (0, vue_1.h)("div", { class: [
189
+ `${mobileMenuClass}__item`,
190
+ isExpandable && `${mobileMenuClass}__item--expandable`,
191
+ isExpanded && `${mobileMenuClass}__item--expanded`,
192
+ this.activeMenuValue === item.key &&
193
+ `${mobileMenuClass}__item--active`,
194
+ option.disabled && `${mobileMenuClass}__item--disabled`
195
+ ], onClick: handleClick },
196
+ option.icon ? ((0, vue_1.h)("span", { class: `${mobileMenuClass}__item-icon` }, typeof option.icon === 'function'
197
+ ? option.icon()
198
+ : option.icon)) : null,
199
+ (0, vue_1.h)("span", { class: `${mobileMenuClass}__item-label` }, (0, utils_1.renderOptionLabel)(option)),
200
+ (0, utils_1.renderBadge)(option, `${blockClass}__badge`)),
201
+ isExpandable && isExpanded && option.children && ((0, vue_1.h)("div", { class: `${mobileMenuClass}__children` }, option.children.map((child, index) => renderGroupItem(child, item.key, index))))));
202
+ };
203
+ const mobileMenuContent = ((0, vue_1.h)("div", { class: mobileMenuClass, style: this.cssVars },
204
+ (0, vue_1.h)("div", { class: `${mobileMenuClass}__header` },
205
+ this.$slots.actions ? ((0, vue_1.h)("div", { class: `${mobileMenuClass}__actions` }, this.$slots.actions())) : this.showHeaderActions ? ((0, vue_1.h)("div", { class: `${mobileMenuClass}__actions` },
206
+ (0, vue_1.h)(dropdown_1.UDropdown, { trigger: "click", options: this.langOptions, onSelect: this.onLanguageSelect }, {
207
+ default: () => ((0, vue_1.h)(button_1.UButton, { text: true, size: "small", renderIcon: () => ((0, vue_1.h)(icon_1.UIcon, { size: 24 }, () => (0, vue_1.h)(icons_1.ChevronDownIcon, null))), iconPlacement: "right" }, {
208
+ default: () => ((0, vue_1.h)(flex_1.UFlex, { size: 14, align: "center", class: `${mobileMenuClass}__lang-content` }, {
209
+ default: () => {
210
+ var _a, _b;
211
+ return ((_a = this.currentLang) === null || _a === void 0 ? void 0 : _a.icon) ? ((0, vue_1.h)(vue_1.Fragment, null,
212
+ (0, vue_1.h)(flex_1.UFlex, null, {
213
+ default: () => { var _a, _b; return (_b = (_a = this.currentLang) === null || _a === void 0 ? void 0 : _a.icon) === null || _b === void 0 ? void 0 : _b.call(_a); }
214
+ }),
215
+ (0, vue_1.h)("span", null, (_b = this.currentLang) === null || _b === void 0 ? void 0 : _b.label))) : null;
216
+ }
217
+ }))
218
+ }))
219
+ }),
220
+ (0, vue_1.h)(flex_1.UFlex, { size: 24 }, {
221
+ default: () => ((0, vue_1.h)(vue_1.Fragment, null,
222
+ (0, vue_1.h)(button_1.UButton, { text: true, onClick: this.onSearchClick }, () => (0, vue_1.h)(icon_1.UIcon, { size: 24 }, () => (0, vue_1.h)(icons_1.SearchIcon, null))),
223
+ (0, vue_1.h)(button_1.UButton, { text: true, onClick: this.onPreview }, () => (0, vue_1.h)(icon_1.UIcon, { size: 24 }, () => (0, vue_1.h)(icons_1.EyeIcon, null))),
224
+ (0, vue_1.h)(button_1.UButton, { text: true, onClick: this.onLogout }, () => (0, vue_1.h)(icon_1.UIcon, { size: 24 }, () => (0, vue_1.h)(icons_1.LogoutIcon, null)))))
225
+ }))) : null,
226
+ (0, vue_1.h)(button_1.UButton, { text: true, class: `${mobileMenuClass}__close`, onClick: this.onClose }, () => (0, vue_1.h)(icon_1.UIcon, { size: 24 }, () => (0, vue_1.h)(icons_1.CloseIcon, null)))),
227
+ (0, vue_1.h)("div", { class: `${mobileMenuClass}__body` },
228
+ (0, vue_1.h)("div", { class: `${mobileMenuClass}__list` }, this.normalizeMobileMenuOptions.map(renderMobileMenuItem))),
229
+ this.$slots.footer ? ((0, vue_1.h)("div", { class: `${mobileMenuClass}__footer` }, this.$slots.footer())) : this.showFooterActions ? ((0, vue_1.h)("div", { class: `${mobileMenuClass}__footer` },
230
+ (0, vue_1.h)(button_1.UButton, { type: "primary", size: "large", block: true, round: true, onClick: this.onPrimaryAction }, () => this.primaryActionTextRef),
231
+ (0, vue_1.h)(button_1.UButton, { size: "large", block: true, round: true, onClick: this.onSecondaryAction }, () => this.secondaryActionTextRef))) : null));
232
+ const burgerButton = ((0, vue_1.h)(button_1.UButton, { text: true, class: `${blockClass}__burger`, onClick: this.onToggle }, () => (0, vue_1.h)(icon_1.UIcon, { size: 24 }, () => (0, vue_1.h)(icons_1.BurgerMenuIcon, null))));
233
+ return ((0, vue_1.h)(flex_1.UFlex, null, {
234
+ default: () => ((0, vue_1.h)(vue_1.Fragment, null,
235
+ burgerButton,
236
+ this.menuType === 'drawer' ? ((0, vue_1.h)(drawer_1.UDrawer, { show: this.visible, width: this.drawerWidth, placement: this.drawerPlacement, "auto-focus": false, onUpdateShow: (show) => {
237
+ var _a;
238
+ if (!show) {
239
+ (_a = this.onClose) === null || _a === void 0 ? void 0 : _a.call(this);
240
+ }
241
+ } }, () => mobileMenuContent)) : null))
242
+ }));
243
+ }
244
+ });
@@ -0,0 +1,6 @@
1
+ declare const _default: import("css-render").CNode;
2
+ export default _default;
3
+ export declare const headerMobileMenuStyle: import("css-render").CNode;
4
+ export declare const headerSearchMobileStyle: import("css-render").CNode;
5
+ export declare const headerSearchDesktopStyle: import("css-render").CNode;
6
+ export declare const headerSearchResultsStyle: import("css-render").CNode;