@consta/uikit 3.7.0 → 3.8.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 (329) hide show
  1. package/Attach/package.json +1 -1
  2. package/Attachment/package.json +1 -1
  3. package/Avatar/package.json +1 -1
  4. package/Badge/package.json +1 -1
  5. package/BasicSelectDeprecated/package.json +1 -1
  6. package/Breadcrumbs/package.json +1 -1
  7. package/Button/package.json +1 -1
  8. package/CHANGELOG.md +16 -11
  9. package/Calendar/package.json +1 -1
  10. package/Card/package.json +1 -1
  11. package/Checkbox/package.json +1 -1
  12. package/CheckboxGroup/package.json +1 -1
  13. package/ChoiceGroup/package.json +1 -1
  14. package/Collapse/package.json +1 -1
  15. package/CollapseGroup/package.json +1 -1
  16. package/Combobox/package.json +1 -1
  17. package/ComboboxDeprecated/package.json +1 -1
  18. package/ContextMenu/package.json +1 -1
  19. package/DatePickerCanary/package.json +1 -1
  20. package/DateTimeCanary/package.json +1 -1
  21. package/DragNDropField/package.json +1 -1
  22. package/EventInterceptor/package.json +1 -1
  23. package/FieldCaption/package.json +1 -1
  24. package/FieldLabel/package.json +1 -1
  25. package/File/package.json +1 -1
  26. package/FileField/package.json +1 -1
  27. package/FileIcon/package.json +1 -1
  28. package/FileIconAvi/package.json +1 -1
  29. package/FileIconBmp/package.json +1 -1
  30. package/FileIconCsv/package.json +1 -1
  31. package/FileIconDoc/package.json +1 -1
  32. package/FileIconExe/package.json +1 -1
  33. package/FileIconGif/package.json +1 -1
  34. package/FileIconJpg/package.json +1 -1
  35. package/FileIconJson/package.json +1 -1
  36. package/FileIconLoading/package.json +1 -1
  37. package/FileIconMov/package.json +1 -1
  38. package/FileIconMp3/package.json +1 -1
  39. package/FileIconMp4/package.json +1 -1
  40. package/FileIconPdf/package.json +1 -1
  41. package/FileIconPng/package.json +1 -1
  42. package/FileIconPtt/package.json +1 -1
  43. package/FileIconRar/package.json +1 -1
  44. package/FileIconRtf/package.json +1 -1
  45. package/FileIconTiff/package.json +1 -1
  46. package/FileIconTxt/package.json +1 -1
  47. package/FileIconUndefined/package.json +1 -1
  48. package/FileIconWav/package.json +1 -1
  49. package/FileIconXls/package.json +1 -1
  50. package/FileIconZip/package.json +1 -1
  51. package/Grid/package.json +1 -1
  52. package/Header/package.json +1 -1
  53. package/Icon/package.json +1 -1
  54. package/IconAdd/package.json +1 -1
  55. package/IconAddToComparison/package.json +1 -1
  56. package/IconAlert/package.json +1 -1
  57. package/IconAlignBlocksLeft/package.json +1 -1
  58. package/IconAlignBlocksRight/package.json +1 -1
  59. package/IconAlignCenter/package.json +1 -1
  60. package/IconAlignJustify/package.json +1 -1
  61. package/IconAlignLeft/package.json +1 -1
  62. package/IconAlignRight/package.json +1 -1
  63. package/IconAllDone/package.json +1 -1
  64. package/IconArrowDown/package.json +1 -1
  65. package/IconArrowLeft/package.json +1 -1
  66. package/IconArrowRight/package.json +1 -1
  67. package/IconArrowUp/package.json +1 -1
  68. package/IconArtBrush/package.json +1 -1
  69. package/IconAttach/package.json +1 -1
  70. package/IconBackward/package.json +1 -1
  71. package/IconBag/package.json +1 -1
  72. package/IconBarrier/package.json +1 -1
  73. package/IconBento/package.json +1 -1
  74. package/IconBold/package.json +1 -1
  75. package/IconBook/package.json +1 -1
  76. package/IconBookmarkFilled/package.json +1 -1
  77. package/IconBookmarkStroked/package.json +1 -1
  78. package/IconCalculator/package.json +1 -1
  79. package/IconCalendar/package.json +1 -1
  80. package/IconCamera/package.json +1 -1
  81. package/IconCancel/package.json +1 -1
  82. package/IconCards/package.json +1 -1
  83. package/IconChat/package.json +1 -1
  84. package/IconCheck/package.json +1 -1
  85. package/IconClose/package.json +1 -1
  86. package/IconCollapse/package.json +1 -1
  87. package/IconColorFill/package.json +1 -1
  88. package/IconColorText/package.json +1 -1
  89. package/IconColumns/package.json +1 -1
  90. package/IconComment/package.json +1 -1
  91. package/IconConnection/package.json +1 -1
  92. package/IconCopy/package.json +1 -1
  93. package/IconCrown/package.json +1 -1
  94. package/IconCursorMouse/package.json +1 -1
  95. package/IconDataNull/package.json +1 -1
  96. package/IconDiamond/package.json +1 -1
  97. package/IconDinosaur/package.json +1 -1
  98. package/IconDisconnection/package.json +1 -1
  99. package/IconDocAdd/package.json +1 -1
  100. package/IconDocBlank/package.json +1 -1
  101. package/IconDocDelete/package.json +1 -1
  102. package/IconDocExport/package.json +1 -1
  103. package/IconDocFilled/package.json +1 -1
  104. package/IconDown/package.json +1 -1
  105. package/IconDownload/package.json +1 -1
  106. package/IconDrag/package.json +1 -1
  107. package/IconDraggable/package.json +1 -1
  108. package/IconDrillingRig/package.json +1 -1
  109. package/IconDrop/package.json +1 -1
  110. package/IconEdit/package.json +1 -1
  111. package/IconExit/package.json +1 -1
  112. package/IconExpand/package.json +1 -1
  113. package/IconEye/package.json +1 -1
  114. package/IconEyeClose/package.json +1 -1
  115. package/IconFavorite/package.json +1 -1
  116. package/IconFilter/package.json +1 -1
  117. package/IconFitToDefault/package.json +1 -1
  118. package/IconFlagFilled/package.json +1 -1
  119. package/IconFlagStroked/package.json +1 -1
  120. package/IconFolders/package.json +1 -1
  121. package/IconForward/package.json +1 -1
  122. package/IconFunnel/package.json +1 -1
  123. package/IconGas/package.json +1 -1
  124. package/IconGeo/package.json +1 -1
  125. package/IconGrouping/package.json +1 -1
  126. package/IconHamburger/package.json +1 -1
  127. package/IconHand/package.json +1 -1
  128. package/IconHealth/package.json +1 -1
  129. package/IconInComparison/package.json +1 -1
  130. package/IconInfo/package.json +1 -1
  131. package/IconIntroduction/package.json +1 -1
  132. package/IconIpad/package.json +1 -1
  133. package/IconItalic/package.json +1 -1
  134. package/IconKebab/package.json +1 -1
  135. package/IconLaptop/package.json +1 -1
  136. package/IconLayers/package.json +1 -1
  137. package/IconLeaf/package.json +1 -1
  138. package/IconLightningBolt/package.json +1 -1
  139. package/IconLineAndBarChart/package.json +1 -1
  140. package/IconLink/package.json +1 -1
  141. package/IconList/package.json +1 -1
  142. package/IconListNumbered/package.json +1 -1
  143. package/IconLock/package.json +1 -1
  144. package/IconLogicalElement/package.json +1 -1
  145. package/IconMBU/package.json +1 -1
  146. package/IconMGRP/package.json +1 -1
  147. package/IconMLSP/package.json +1 -1
  148. package/IconMMP/package.json +1 -1
  149. package/IconMail/package.json +1 -1
  150. package/IconMap/package.json +1 -1
  151. package/IconMaxHeight/package.json +1 -1
  152. package/IconMaxWidth/package.json +1 -1
  153. package/IconMeatball/package.json +1 -1
  154. package/IconMic/package.json +1 -1
  155. package/IconMolecules/package.json +1 -1
  156. package/IconMoon/package.json +1 -1
  157. package/IconNodeEnd/package.json +1 -1
  158. package/IconNodeStart/package.json +1 -1
  159. package/IconNodeStep/package.json +1 -1
  160. package/IconNodes/package.json +1 -1
  161. package/IconOpenInNew/package.json +1 -1
  162. package/IconPanelBottom/package.json +1 -1
  163. package/IconPanelLeft/package.json +1 -1
  164. package/IconPanelRight/package.json +1 -1
  165. package/IconPanelTop/package.json +1 -1
  166. package/IconPaste/package.json +1 -1
  167. package/IconPause/package.json +1 -1
  168. package/IconPhone/package.json +1 -1
  169. package/IconPhoto/package.json +1 -1
  170. package/IconPlay/package.json +1 -1
  171. package/IconPressure/package.json +1 -1
  172. package/IconProcessing/package.json +1 -1
  173. package/IconQuestion/package.json +1 -1
  174. package/IconQuote/package.json +1 -1
  175. package/IconRUO/package.json +1 -1
  176. package/IconRUS/package.json +1 -1
  177. package/IconRecord/package.json +1 -1
  178. package/IconRemove/package.json +1 -1
  179. package/IconRemoveFromComparison/package.json +1 -1
  180. package/IconReply/package.json +1 -1
  181. package/IconResize/package.json +1 -1
  182. package/IconRestart/package.json +1 -1
  183. package/IconRevert/package.json +1 -1
  184. package/IconRing/package.json +1 -1
  185. package/IconRouble/package.json +1 -1
  186. package/IconRuler/package.json +1 -1
  187. package/IconScreen/package.json +1 -1
  188. package/IconSearch/package.json +1 -1
  189. package/IconSelect/package.json +1 -1
  190. package/IconSelectOpen/package.json +1 -1
  191. package/IconSettings/package.json +1 -1
  192. package/IconShape/package.json +1 -1
  193. package/IconShuffle/package.json +1 -1
  194. package/IconSmile/package.json +1 -1
  195. package/IconSortDown/package.json +1 -1
  196. package/IconSortDownCenter/package.json +1 -1
  197. package/IconSortUp/package.json +1 -1
  198. package/IconSortUpCenter/package.json +1 -1
  199. package/IconStop/package.json +1 -1
  200. package/IconStorage/package.json +1 -1
  201. package/IconStrikethrough/package.json +1 -1
  202. package/IconSun/package.json +1 -1
  203. package/IconTable/package.json +1 -1
  204. package/IconTarget/package.json +1 -1
  205. package/IconTeam/package.json +1 -1
  206. package/IconTest/package.json +1 -1
  207. package/IconThumbUp/package.json +1 -1
  208. package/IconTie/package.json +1 -1
  209. package/IconTop/package.json +1 -1
  210. package/IconTrash/package.json +1 -1
  211. package/IconType/package.json +1 -1
  212. package/IconUnderline/package.json +1 -1
  213. package/IconUnlock/package.json +1 -1
  214. package/IconUnsort/package.json +1 -1
  215. package/IconUnsortCenter/package.json +1 -1
  216. package/IconUpload/package.json +1 -1
  217. package/IconUser/package.json +1 -1
  218. package/IconVZD/package.json +1 -1
  219. package/IconVideo/package.json +1 -1
  220. package/IconWarning/package.json +1 -1
  221. package/IconWatch/package.json +1 -1
  222. package/IconWideScreen/package.json +1 -1
  223. package/IconWorld/package.json +1 -1
  224. package/Informer/package.json +1 -1
  225. package/LayoutCanary/package.json +1 -1
  226. package/Loader/package.json +1 -1
  227. package/MixCard/package.json +1 -1
  228. package/MixFocus/package.json +1 -1
  229. package/MixVisuallyHidden/package.json +1 -1
  230. package/Modal/package.json +1 -1
  231. package/MultiComboboxDeprecated/package.json +1 -1
  232. package/Pagination/package.json +1 -1
  233. package/Popover/package.json +1 -1
  234. package/PortalWithTheme/package.json +1 -1
  235. package/ProgressSpin/package.json +1 -1
  236. package/ProgressStepBarCanary/es.js +1 -0
  237. package/ProgressStepBarCanary/index.d.ts +1 -0
  238. package/ProgressStepBarCanary/index.js +4 -0
  239. package/ProgressStepBarCanary/package.json +9 -0
  240. package/Radio/package.json +1 -1
  241. package/RadioGroup/package.json +1 -1
  242. package/Responses/package.json +1 -1
  243. package/Responses403/package.json +1 -1
  244. package/Responses404/package.json +1 -1
  245. package/Responses500/package.json +1 -1
  246. package/Responses503/package.json +1 -1
  247. package/ResponsesConnectionError/package.json +1 -1
  248. package/ResponsesDeleted/package.json +1 -1
  249. package/ResponsesEmptyBox/package.json +1 -1
  250. package/ResponsesEmptyPockets/package.json +1 -1
  251. package/ResponsesImage/package.json +1 -1
  252. package/ResponsesImage403/package.json +1 -1
  253. package/ResponsesImage404/package.json +1 -1
  254. package/ResponsesImage500/package.json +1 -1
  255. package/ResponsesImage503/package.json +1 -1
  256. package/ResponsesImageConnectionError/package.json +1 -1
  257. package/ResponsesImageDeleted/package.json +1 -1
  258. package/ResponsesImageEmptyBox/package.json +1 -1
  259. package/ResponsesImageEmptyPockets/package.json +1 -1
  260. package/ResponsesImageNothingFound/package.json +1 -1
  261. package/ResponsesImageSuccess/package.json +1 -1
  262. package/ResponsesNothingFound/package.json +1 -1
  263. package/ResponsesSuccess/package.json +1 -1
  264. package/Select/package.json +1 -1
  265. package/Sidebar/package.json +1 -1
  266. package/Skeleton/package.json +1 -1
  267. package/SnackBar/package.json +1 -1
  268. package/Steps/package.json +1 -1
  269. package/Switch/package.json +1 -1
  270. package/SwitchGroup/package.json +1 -1
  271. package/Table/package.json +1 -1
  272. package/Tabs/package.json +1 -1
  273. package/Tag/package.json +1 -1
  274. package/TagBase/package.json +1 -1
  275. package/Text/package.json +1 -1
  276. package/TextField/package.json +1 -1
  277. package/Theme/package.json +1 -1
  278. package/ThemeToggler/package.json +1 -1
  279. package/Timer/package.json +1 -1
  280. package/Tooltip/package.json +1 -1
  281. package/User/package.json +1 -1
  282. package/UserSelect/package.json +1 -1
  283. package/UserSelectDeprecated/package.json +1 -1
  284. package/__internal__/cjs-src/components/Modal/Modal.css +5 -0
  285. package/__internal__/cjs-src/components/Modal/Modal.js +1 -1
  286. package/__internal__/cjs-src/components/ProgressStepBarCanary/ProgressStepBar.css +25 -0
  287. package/__internal__/cjs-src/components/ProgressStepBarCanary/ProgressStepBarCanary.d.ts +3 -0
  288. package/__internal__/cjs-src/components/ProgressStepBarCanary/ProgressStepBarCanary.js +72 -0
  289. package/__internal__/cjs-src/components/ProgressStepBarCanary/ProgressStepBarItem/ProgressStepBarItem.css +170 -0
  290. package/__internal__/cjs-src/components/ProgressStepBarCanary/ProgressStepBarItem/ProgressStepBarItem.d.ts +3 -0
  291. package/__internal__/cjs-src/components/ProgressStepBarCanary/ProgressStepBarItem/ProgressStepBarItem.js +67 -0
  292. package/__internal__/cjs-src/components/ProgressStepBarCanary/ProgressStepBarLine/ProgressStepBarLine.css +50 -0
  293. package/__internal__/cjs-src/components/ProgressStepBarCanary/ProgressStepBarLine/ProgressStepBarLine.d.ts +11 -0
  294. package/__internal__/cjs-src/components/ProgressStepBarCanary/ProgressStepBarLine/ProgressStepBarLine.js +45 -0
  295. package/__internal__/cjs-src/components/ProgressStepBarCanary/helpers.d.ts +106 -0
  296. package/__internal__/cjs-src/components/ProgressStepBarCanary/helpers.js +30 -0
  297. package/__internal__/src/components/Modal/Modal.css +5 -0
  298. package/__internal__/src/components/Modal/Modal.js +1 -1
  299. package/__internal__/src/components/ProgressStepBarCanary/ProgressStepBar.css +25 -0
  300. package/__internal__/src/components/ProgressStepBarCanary/ProgressStepBarCanary.d.ts +3 -0
  301. package/__internal__/src/components/ProgressStepBarCanary/ProgressStepBarCanary.js +69 -0
  302. package/__internal__/src/components/ProgressStepBarCanary/ProgressStepBarItem/ProgressStepBarItem.css +170 -0
  303. package/__internal__/src/components/ProgressStepBarCanary/ProgressStepBarItem/ProgressStepBarItem.d.ts +3 -0
  304. package/__internal__/src/components/ProgressStepBarCanary/ProgressStepBarItem/ProgressStepBarItem.js +64 -0
  305. package/__internal__/src/components/ProgressStepBarCanary/ProgressStepBarLine/ProgressStepBarLine.css +50 -0
  306. package/__internal__/src/components/ProgressStepBarCanary/ProgressStepBarLine/ProgressStepBarLine.d.ts +11 -0
  307. package/__internal__/src/components/ProgressStepBarCanary/ProgressStepBarLine/ProgressStepBarLine.js +42 -0
  308. package/__internal__/src/components/ProgressStepBarCanary/helpers.d.ts +106 -0
  309. package/__internal__/src/components/ProgressStepBarCanary/helpers.js +26 -0
  310. package/createIcon/package.json +1 -1
  311. package/createResponsesImage/package.json +1 -1
  312. package/package.json +2 -1
  313. package/useChoiceGroup/package.json +1 -1
  314. package/useChoiceGroupIndexed/package.json +1 -1
  315. package/useClickOutside/package.json +1 -1
  316. package/useComponentSize/package.json +1 -1
  317. package/useDebounce/package.json +1 -1
  318. package/useFlag/package.json +1 -1
  319. package/useForkRef/package.json +1 -1
  320. package/useGlobalKeys/package.json +1 -1
  321. package/useKeys/package.json +1 -1
  322. package/useMutableRef/package.json +1 -1
  323. package/usePrevious/package.json +1 -1
  324. package/useResizeObserved/package.json +1 -1
  325. package/useScrollPosition/package.json +1 -1
  326. package/useSelect/package.json +1 -1
  327. package/useThemeVars/package.json +1 -1
  328. package/useTimer/package.json +1 -1
  329. package/withTooltip/package.json +1 -1
package/Tabs/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/Tabs",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
package/Tag/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/Tag",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/TagBase",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
package/Text/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/Text",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/TextField",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/Theme",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/ThemeToggler",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/Timer",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/Tooltip",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
package/User/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/User",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/UserSelect",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/UserSelectDeprecated",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -13,6 +13,10 @@
13
13
  padding: var(--space-5xl);
14
14
  }
15
15
 
16
+ .Modal:not(.Modal_hasOverlay) {
17
+ pointer-events: none;
18
+ }
19
+
16
20
  .Modal-Window {
17
21
  z-index: 100;
18
22
  overflow: auto;
@@ -24,6 +28,7 @@
24
28
  border-radius: var(--control-radius);
25
29
  -webkit-box-shadow: var(--shadow-modal);
26
30
  box-shadow: var(--shadow-modal);
31
+ pointer-events: auto;
27
32
  }
28
33
 
29
34
  .Modal-Window_position_center {
@@ -48,7 +48,7 @@ exports.Modal = function (props) {
48
48
  Escape: function (e) { return isOpen && onEsc && onEsc(e); }
49
49
  });
50
50
  return (react_1["default"].createElement(react_transition_group_1.CSSTransition, { "in": isOpen, unmountOnExit: true, appear: true, classNames: cnForCssTransition_1.cnForCssTransition(cnModal), timeout: 200, nodeRef: portalRef },
51
- react_1["default"].createElement(PortalWithTheme_1.PortalWithTheme, { preset: theme, container: container, className: cnModal(null, [rootClassName]), ref: portalRef },
51
+ react_1["default"].createElement(PortalWithTheme_1.PortalWithTheme, { preset: theme, container: container, className: cnModal({ hasOverlay: hasOverlay }, [rootClassName]), ref: portalRef },
52
52
  hasOverlay && react_1["default"].createElement("div", { className: cnModal('Overlay'), "aria-label": "Overlay" }),
53
53
  react_1["default"].createElement("div", tslib_1.__assign({ className: cnModal('Window', { width: width, position: position }, [className]), ref: ref }, rest),
54
54
  react_1["default"].createElement(ContextConsumer, { onClickOutside: onClickOutside || onOverlayClick, ignoreClicksInsideRefs: tslib_1.__spread((refsForExcludeClickOutside || []), [ref]) }, children)))));
@@ -0,0 +1,25 @@
1
+ .ProgressStepBar {
2
+ position: relative;
3
+ display: -webkit-inline-box;
4
+ display: -ms-inline-flexbox;
5
+ display: inline-flex;
6
+ -webkit-box-pack: justify;
7
+ -ms-flex-pack: justify;
8
+ justify-content: space-between;
9
+ }
10
+
11
+ .ProgressStepBar_direction_horizontal {
12
+ -webkit-box-orient: horizontal;
13
+ -webkit-box-direction: normal;
14
+ -ms-flex-direction: row;
15
+ flex-direction: row;
16
+ width: 100%;
17
+ }
18
+
19
+ .ProgressStepBar_direction_vertical {
20
+ -webkit-box-orient: vertical;
21
+ -webkit-box-direction: normal;
22
+ -ms-flex-direction: column;
23
+ flex-direction: column;
24
+ height: 100%;
25
+ }
@@ -0,0 +1,3 @@
1
+ import './ProgressStepBar.css';
2
+ import { ProgressStepBarComponent } from './helpers';
3
+ export declare const ProgressStepBar: ProgressStepBarComponent;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.ProgressStepBar = void 0;
4
+ var tslib_1 = require("tslib");
5
+ require("./ProgressStepBar.css");
6
+ var react_1 = tslib_1.__importStar(require("react"));
7
+ var useComponentSize_1 = require("../../hooks/useComponentSize/useComponentSize");
8
+ var useForkRef_1 = require("../../hooks/useForkRef/useForkRef");
9
+ var ProgressStepBarItem_1 = require("./ProgressStepBarItem/ProgressStepBarItem");
10
+ var ProgressStepBarLine_1 = require("./ProgressStepBarLine/ProgressStepBarLine");
11
+ var helpers_1 = require("./helpers");
12
+ function ProgressStepBarRender(props, ref) {
13
+ var _a = helpers_1.withDefaultGetters(props), _b = _a.steps, steps = _b === void 0 ? [] : _b, _c = _a.direction, direction = _c === void 0 ? helpers_1.propDirectionDefault : _c, _d = _a.size, size = _d === void 0 ? helpers_1.propSizeDefault : _d, className = _a.className, activeStepIndex = _a.activeStepIndex, onClick = _a.onClick, getItemContent = _a.getItemContent, getItemLabel = _a.getItemLabel, getItemPoint = _a.getItemPoint, getItemProgress = _a.getItemProgress, getItemStatus = _a.getItemStatus, getItemTooltipContent = _a.getItemTooltipContent, getItemLineStatus = _a.getItemLineStatus, otherProps = tslib_1.__rest(_a, ["steps", "direction", "size", "className", "activeStepIndex", "onClick", "getItemContent", "getItemLabel", "getItemPoint", "getItemProgress", "getItemStatus", "getItemTooltipContent", "getItemLineStatus"]);
14
+ var _e = tslib_1.__read(react_1.useState([]), 2), lines = _e[0], setLines = _e[1];
15
+ var containerRef = react_1.useRef(null);
16
+ var _f = useComponentSize_1.useComponentSize(containerRef), width = _f.width, height = _f.height;
17
+ react_1.useEffect(function () {
18
+ if (steps.length > 0) {
19
+ var linesArray_1 = [];
20
+ steps.forEach(function (step, index) {
21
+ if (index !== steps.length - 1)
22
+ linesArray_1.push({
23
+ status: getItemLineStatus(step) || 'normal',
24
+ size: getLineSize(containerRef, stepsRef[index + 1])
25
+ });
26
+ });
27
+ setLines(linesArray_1);
28
+ }
29
+ }, [activeStepIndex, steps, direction, size, width, height]);
30
+ var stepsRef = react_1.useMemo(function () { return new Array(steps.length).fill(null).map(function () { return react_1.createRef(); }); }, [steps.length]);
31
+ var getLineSize = function (container, activeElement) {
32
+ var size = 0;
33
+ if (container && container.current && activeElement && activeElement.current) {
34
+ var containerPosition = container.current.getBoundingClientRect();
35
+ var activeElementPosition = activeElement.current.getBoundingClientRect();
36
+ if (direction === 'vertical')
37
+ size = activeElementPosition.y - containerPosition.y + activeElementPosition.height;
38
+ else
39
+ size = activeElementPosition.x - containerPosition.x;
40
+ }
41
+ return size;
42
+ };
43
+ var getStepItem = function (item, index) {
44
+ var position = 'center';
45
+ if (index === steps.length - 1)
46
+ position = 'end';
47
+ if (index === 0)
48
+ position = 'start';
49
+ return {
50
+ content: getItemContent(item),
51
+ label: getItemLabel(item),
52
+ point: getItemPoint(item),
53
+ progress: getItemProgress(item),
54
+ status: typeof activeStepIndex === 'number' && activeStepIndex >= index
55
+ ? getItemStatus(item)
56
+ : 'system',
57
+ tooltipContent: getItemTooltipContent(item),
58
+ size: size,
59
+ position: position,
60
+ pointRef: stepsRef[index],
61
+ direction: direction,
62
+ onClick: function (e) { return onClick === null || onClick === void 0 ? void 0 : onClick(e, item, index); }
63
+ };
64
+ };
65
+ return (react_1["default"].createElement("div", tslib_1.__assign({ ref: useForkRef_1.useForkRef([ref, containerRef]) }, otherProps, { className: helpers_1.cnProgressStepBar({ direction: direction }, [className]) }),
66
+ react_1["default"].createElement(ProgressStepBarLine_1.ProgressStepBarLine, { lines: lines, size: size, direction: direction, activeStepIndex: activeStepIndex }),
67
+ steps.map(function (step, index) {
68
+ var item = getStepItem(step, index);
69
+ return react_1["default"].createElement(ProgressStepBarItem_1.ProgressStepBarItem, tslib_1.__assign({}, item));
70
+ })));
71
+ }
72
+ exports.ProgressStepBar = react_1.forwardRef(ProgressStepBarRender);
@@ -0,0 +1,170 @@
1
+ .ProgressStepBarItem {
2
+ position: relative;
3
+ display: -webkit-inline-box;
4
+ display: -ms-inline-flexbox;
5
+ display: inline-flex;
6
+ -webkit-box-align: start;
7
+ -ms-flex-align: start;
8
+ align-items: flex-start;
9
+ width: 100%;
10
+ height: 100%;
11
+ }
12
+
13
+ .ProgressStepBarItem_direction_horizontal {
14
+ -webkit-box-orient: vertical;
15
+ -webkit-box-direction: normal;
16
+ -ms-flex-direction: column;
17
+ flex-direction: column;
18
+ }
19
+
20
+ .ProgressStepBarItem_direction_horizontal .ProgressStepBarItem-Point_size_xs {
21
+ margin-bottom: var(--space-2xs);
22
+ }
23
+
24
+ .ProgressStepBarItem_direction_horizontal .ProgressStepBarItem-Point_size_s,
25
+ .ProgressStepBarItem_direction_horizontal .ProgressStepBarItem-Point_size_m {
26
+ margin-bottom: var(--space-xs);
27
+ }
28
+
29
+ .ProgressStepBarItem_direction_vertical {
30
+ -webkit-box-orient: horizontal;
31
+ -webkit-box-direction: normal;
32
+ -ms-flex-direction: row;
33
+ flex-direction: row;
34
+ }
35
+
36
+ .ProgressStepBarItem_direction_vertical .ProgressStepBarItem-Point {
37
+ margin-right: var(--space-xs);
38
+ }
39
+
40
+ .ProgressStepBarItem_direction_vertical .ProgressStepBarItem-Content_size_xs {
41
+ margin-top: -4px;
42
+ }
43
+
44
+ .ProgressStepBarItem_size_xs {
45
+ --progress-step-bar-item-point-size: var(--space-xs);
46
+ --progress-step-bar-item-label-margin: var(--space-2xs);
47
+ }
48
+
49
+ .ProgressStepBarItem_size_s {
50
+ --progress-step-bar-item-point-size: var(--space-m);
51
+ --progress-step-bar-item-label-margin: var(--space-xs);
52
+ }
53
+
54
+ .ProgressStepBarItem_size_m {
55
+ --progress-step-bar-item-point-size: var(--space-xl);
56
+ --progress-step-bar-item-label-margin: var(--space-xs);
57
+ }
58
+
59
+ .ProgressStepBarItem_position_start {
60
+ -webkit-box-flex: 1;
61
+ -ms-flex: 1;
62
+ flex: 1;
63
+ }
64
+
65
+ .ProgressStepBarItem_position_start.ProgressStepBarItem_direction_horizontal,
66
+ .ProgressStepBarItem_position_start .ProgressStepBarItem-Content {
67
+ -webkit-box-align: start;
68
+ -ms-flex-align: start;
69
+ align-items: flex-start;
70
+ text-align: left;
71
+ }
72
+
73
+ .ProgressStepBarItem_position_center {
74
+ -webkit-box-flex: 2;
75
+ -ms-flex: 2;
76
+ flex: 2;
77
+ }
78
+
79
+ .ProgressStepBarItem_position_center.ProgressStepBarItem_direction_horizontal,
80
+ .ProgressStepBarItem_position_center .ProgressStepBarItemr-Content {
81
+ -webkit-box-align: center;
82
+ -ms-flex-align: center;
83
+ align-items: center;
84
+ text-align: center;
85
+ }
86
+
87
+ .ProgressStepBarItem_position_end {
88
+ -webkit-box-flex: 1;
89
+ -ms-flex: 1;
90
+ flex: 1;
91
+ }
92
+
93
+ .ProgressStepBarItem_position_end.ProgressStepBarItem_direction_horizontal,
94
+ .ProgressStepBarItem_position_end .ProgressStepBarItem-Content {
95
+ -webkit-box-align: end;
96
+ -ms-flex-align: end;
97
+ align-items: flex-end;
98
+ text-align: right;
99
+ }
100
+
101
+ .ProgressStepBarItem_status_system {
102
+ --progress-step-bar-item-point-background: var(--color-bg-system);
103
+ --progress-step-bar-item-point-content-color: var(--color-typo-secondary);
104
+ }
105
+
106
+ .ProgressStepBarItem_status_normal {
107
+ --progress-step-bar-item-point-background: var(--color-bg-normal);
108
+ --progress-step-bar-item-point-content-color: var(--color-bg-default);
109
+ }
110
+
111
+ .ProgressStepBarItem_status_success {
112
+ --progress-step-bar-item-point-background: var(--color-bg-success);
113
+ --progress-step-bar-item-point-content-color: var(--color-bg-default);
114
+ }
115
+
116
+ .ProgressStepBarItem_status_warning {
117
+ --progress-step-bar-item-point-background: var(--color-bg-warning);
118
+ --progress-step-bar-item-point-content-color: var(--color-bg-default);
119
+ }
120
+
121
+ .ProgressStepBarItem_status_alert {
122
+ --progress-step-bar-item-point-background: var(--color-bg-alert);
123
+ --progress-step-bar-item-point-content-color: var(--color-bg-default);
124
+ }
125
+
126
+ .ProgressStepBarItem .ProgressStepBarItem-PointText,
127
+ .ProgressStepBarItem .Icon {
128
+ color: var(--progress-step-bar-item-point-content-color);
129
+ }
130
+
131
+ .ProgressStepBarItem .ProgressSpin {
132
+ stroke: var(--progress-step-bar-item-point-content-color);
133
+ }
134
+
135
+ .ProgressStepBarItem-Point {
136
+ display: -webkit-box;
137
+ display: -ms-flexbox;
138
+ display: flex;
139
+ -webkit-box-pack: center;
140
+ -ms-flex-pack: center;
141
+ justify-content: center;
142
+ -webkit-box-align: center;
143
+ -ms-flex-align: center;
144
+ align-items: center;
145
+ min-width: var(--progress-step-bar-item-point-size);
146
+ min-height: var(--progress-step-bar-item-point-size);
147
+ margin: 0;
148
+ padding: 0;
149
+ color: var(--color-bg-default);
150
+ background-color: var(--progress-step-bar-item-point-background);
151
+ border: none;
152
+ border-radius: calc(var(--progress-step-bar-item-point-size) * 0.5);
153
+ cursor: pointer;
154
+ -webkit-transition: background-color 0.3s;
155
+ transition: background-color 0.3s;
156
+ }
157
+
158
+ .ProgressStepBarItem-PointText {
159
+ color: var(--color-typo-secondary);
160
+ -webkit-transition: color 0.3s;
161
+ transition: color 0.3s;
162
+ }
163
+
164
+ .ProgressStepBarItem-Label {
165
+ margin-bottom: var(--progress-step-bar-item-label-margin);
166
+ }
167
+
168
+ .ProgressStepBarItem-Content_bottomOffset {
169
+ margin-bottom: var(--progress-step-bar-item-label-margin);
170
+ }
@@ -0,0 +1,3 @@
1
+ import './ProgressStepBarItem.css';
2
+ import { ProgressStepBarItemComponent } from '../helpers';
3
+ export declare const ProgressStepBarItem: ProgressStepBarItemComponent;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.ProgressStepBarItem = void 0;
4
+ var tslib_1 = require("tslib");
5
+ require("./ProgressStepBarItem.css");
6
+ var react_1 = tslib_1.__importStar(require("react"));
7
+ var MixFocus_1 = require("../../../mixs/MixFocus/MixFocus");
8
+ var bem_1 = require("../../../utils/bem");
9
+ var ProgressSpin_1 = require("../../ProgressSpin/ProgressSpin");
10
+ var Text_1 = require("../../Text/Text");
11
+ var Tooltip_1 = require("../../Tooltip/Tooltip");
12
+ var helpers_1 = require("../helpers");
13
+ var cnProgressStepBarItem = bem_1.cn('ProgressStepBarItem');
14
+ var possibleVerticalDirections = [
15
+ 'leftCenter',
16
+ 'rightCenter',
17
+ 'rightUp',
18
+ 'downCenter',
19
+ ];
20
+ var possibleHorizontalDirections = [
21
+ 'downCenter',
22
+ 'upCenter',
23
+ 'downStartLeft',
24
+ 'downStartRight',
25
+ ];
26
+ var renderPointContent = function (point, size, progress) {
27
+ if (!point)
28
+ return null;
29
+ if (progress)
30
+ return react_1["default"].createElement(ProgressSpin_1.ProgressSpin, { size: size });
31
+ if (typeof point === 'number' || !point)
32
+ return (react_1["default"].createElement(Text_1.Text, { className: cnProgressStepBarItem('PointText'), size: size === 's' ? '2xs' : 'xs', weight: "bold" }, point));
33
+ var Icon = point;
34
+ return react_1["default"].createElement(Icon, { size: "xs" });
35
+ };
36
+ exports.ProgressStepBarItem = function (props) {
37
+ var content = props.content, tooltipContent = props.tooltipContent, label = props.label, point = props.point, status = props.status, progress = props.progress, direction = props.direction, size = props.size, pointRef = props.pointRef, onClick = props.onClick, _a = props.position, position = _a === void 0 ? helpers_1.propPositionDefault : _a, otherProps = tslib_1.__rest(props, ["content", "tooltipContent", "label", "point", "status", "progress", "direction", "size", "pointRef", "onClick", "position"]);
38
+ var _b = tslib_1.__read(react_1.useState(true), 2), isTooltipHidden = _b[0], setIsTooltipHidden = _b[1];
39
+ var anchorRef = react_1.useRef(null);
40
+ var pointProps = {
41
+ onMouseEnter: function () { return setIsTooltipHidden(false); },
42
+ onMouseLeave: function () { return setIsTooltipHidden(true); },
43
+ className: cnProgressStepBarItem('Point', {
44
+ size: size
45
+ }, [MixFocus_1.cnMixFocus()]),
46
+ children: size !== 'xs' && renderPointContent(point, size, progress)
47
+ };
48
+ var pointButtonProps = {
49
+ ref: pointRef,
50
+ onClick: function (e) { return onClick === null || onClick === void 0 ? void 0 : onClick(e); }
51
+ };
52
+ var pointDivButton = {
53
+ ref: pointRef
54
+ };
55
+ return (react_1["default"].createElement(react_1["default"].Fragment, null,
56
+ react_1["default"].createElement("div", tslib_1.__assign({ className: cnProgressStepBarItem({
57
+ direction: direction,
58
+ position: position,
59
+ status: status || helpers_1.propStatusDefault,
60
+ size: size
61
+ }) }, otherProps),
62
+ onClick ? (react_1["default"].createElement("button", tslib_1.__assign({ type: "button" }, pointButtonProps, pointProps))) : (react_1["default"].createElement("div", tslib_1.__assign({}, pointProps, pointDivButton))),
63
+ react_1["default"].createElement("div", { className: cnProgressStepBarItem('Content', { bottomOffset: !!content }) },
64
+ react_1["default"].createElement(Text_1.Text, { className: cnProgressStepBarItem('Label'), ref: anchorRef, size: size, onMouseEnter: function () { return setIsTooltipHidden(false); }, onMouseLeave: function () { return setIsTooltipHidden(true); }, lineHeight: size === 's' ? 'xs' : size, view: "primary" }, label),
65
+ content)),
66
+ tooltipContent && !isTooltipHidden && (react_1["default"].createElement(Tooltip_1.Tooltip, { anchorRef: anchorRef, className: cnProgressStepBarItem('Tooltip'), direction: direction === 'horizontal' ? 'downCenter' : 'leftUp', possibleDirections: direction === 'horizontal' ? possibleHorizontalDirections : possibleVerticalDirections }, tooltipContent))));
67
+ };
@@ -0,0 +1,50 @@
1
+ .ProgressStepBarLine {
2
+ position: absolute;
3
+ top: var(--progress-step-bar-line-top);
4
+ left: var(--progress-step-bar-line-left);
5
+ overflow: hidden;
6
+ width: var(--progress-step-bar-line-width);
7
+ height: var(--progress-step-bar-line-height);
8
+ background: var(--line-background);
9
+ }
10
+
11
+ .ProgressStepBarLine_direction_horizontal {
12
+ --progress-step-bar-line-top: var(--progress-step-bar-line-padding);
13
+ --progress-step-bar-line-left: 0;
14
+ --progress-step-bar-line-width: var(--line-size);
15
+ --progress-step-bar-line-height: var(--progress-step-bar-line-size);
16
+ }
17
+
18
+ .ProgressStepBarLine_direction_vertical {
19
+ --progress-step-bar-line-top: 0;
20
+ --progress-step-bar-line-left: var(--progress-step-bar-line-padding);
21
+ --progress-step-bar-line-width: var(--progress-step-bar-line-size);
22
+ --progress-step-bar-line-height: var(--line-size);
23
+ }
24
+
25
+ .ProgressStepBarLine_size_xs {
26
+ --progress-step-bar-line-size: var(--space-3xs);
27
+ --progress-step-bar-line-padding: calc((var(--space-xs) - var(--space-3xs)) * 0.5);
28
+ }
29
+
30
+ .ProgressStepBarLine_size_s {
31
+ --progress-step-bar-line-size: var(--space-2xs);
32
+ --progress-step-bar-line-padding: calc((var(--space-m) - var(--space-2xs)) * 0.5);
33
+ }
34
+
35
+ .ProgressStepBarLine_size_m {
36
+ --progress-step-bar-line-size: var(--space-2xs);
37
+ --progress-step-bar-line-padding: calc((var(--space-xl) - var(--space-2xs)) * 0.5);
38
+ }
39
+
40
+ .ProgressStepBarLine::after {
41
+ content: '';
42
+ position: absolute;
43
+ top: 0;
44
+ right: 0;
45
+ left: var(--line-active-size);
46
+ bottom: 0;
47
+ background: var(--color-bg-system);
48
+ -webkit-transition: left 0.3s;
49
+ transition: left 0.3s;
50
+ }
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import './ProgressStepBarLine.css';
3
+ import { Line, PropDirection, PropSize } from '../helpers';
4
+ declare type ProgressStepBarLineProps = {
5
+ lines: Line[];
6
+ size: PropSize;
7
+ direction: PropDirection;
8
+ activeStepIndex?: number;
9
+ };
10
+ export declare const ProgressStepBarLine: (props: ProgressStepBarLineProps) => JSX.Element;
11
+ export {};
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.ProgressStepBarLine = void 0;
4
+ var tslib_1 = require("tslib");
5
+ require("./ProgressStepBarLine.css");
6
+ var react_1 = tslib_1.__importDefault(require("react"));
7
+ var bem_1 = require("../../../utils/bem");
8
+ var getSizeByMap_1 = require("../../../utils/getSizeByMap");
9
+ var cnProgressStepBarLine = bem_1.cn('ProgressStepBarLine');
10
+ var mapVarsByStatus = {
11
+ normal: 'var(--color-bg-normal)',
12
+ success: 'var(--color-bg-success)',
13
+ warning: 'var(--color-bg-warning)',
14
+ alert: 'var(--color-bg-alert)'
15
+ };
16
+ var backgroundGenerate = function (lines, direction) {
17
+ var background = "linear-gradient(" + (direction === 'horizontal' ? '90' : '180') + "deg, ";
18
+ var length = lines.length;
19
+ for (var index = 0; index < length; index++) {
20
+ var line = lines[index];
21
+ var color = getSizeByMap_1.getSizeByMap(mapVarsByStatus, line.status || 'normal');
22
+ var from = lines[index - 1] ? lines[index - 1].size : 0;
23
+ var to = line.size;
24
+ background += color + " " + from + "px, " + color + " " + to + "px" + (index < length - 1 ? ', ' : ')');
25
+ }
26
+ return background;
27
+ };
28
+ var getActiveLineSize = function (activeStepIndex, lines, lineSize) {
29
+ if (typeof activeStepIndex !== 'number') {
30
+ return 0;
31
+ }
32
+ return lines[activeStepIndex] ? lines[activeStepIndex].size : lineSize;
33
+ };
34
+ exports.ProgressStepBarLine = function (props) {
35
+ var _a;
36
+ var lines = props.lines, activeStepIndex = props.activeStepIndex, size = props.size, direction = props.direction, otherProps = tslib_1.__rest(props, ["lines", "activeStepIndex", "size", "direction"]);
37
+ var background = backgroundGenerate(lines, direction);
38
+ var lineSize = lines.length > 0 ? lines[lines.length - 1].size : 0;
39
+ var activeLineSize = getActiveLineSize(activeStepIndex, lines, lineSize);
40
+ return (react_1["default"].createElement("div", tslib_1.__assign({}, otherProps, { className: cnProgressStepBarLine({ size: size, direction: direction }), style: (_a = {},
41
+ _a['--line-size'] = lineSize + "px",
42
+ _a['--line-background'] = background,
43
+ _a['--line-active-size'] = activeLineSize + "px",
44
+ _a) })));
45
+ };