@salutejs/plasma-new-hope 0.134.0-canary.1392.10603131302.0 → 0.134.0-canary.1404.10612716409.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (255) hide show
  1. package/cjs/components/DatePicker/RangeDate/RangeDate.js +12 -1
  2. package/cjs/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
  3. package/cjs/components/DatePicker/SingleDate/SingleDate.js +12 -4
  4. package/cjs/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
  5. package/cjs/components/DatePicker/hooks/useDatePicker.js +7 -5
  6. package/cjs/components/DatePicker/hooks/useDatePicker.js.map +1 -1
  7. package/cjs/components/DatePicker/utils/dateHelper.js +15 -13
  8. package/cjs/components/DatePicker/utils/dateHelper.js.map +1 -1
  9. package/cjs/components/Segment/tokens.js +1 -14
  10. package/cjs/components/Segment/tokens.js.map +1 -1
  11. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.css +4 -10
  12. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +83 -160
  13. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  14. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.styles.js +1 -37
  15. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.styles.js.map +1 -1
  16. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.styles_m9i9p0.css +4 -0
  17. package/cjs/components/Segment/ui/SegmentItem/SegmentItem.css +3 -7
  18. package/cjs/components/Segment/ui/SegmentItem/SegmentItem.js +2 -4
  19. package/cjs/components/Segment/ui/SegmentItem/SegmentItem.js.map +1 -1
  20. package/cjs/components/Segment/ui/SegmentItem/SegmentItem.styles.js +2 -31
  21. package/cjs/components/Segment/ui/SegmentItem/SegmentItem.styles.js.map +1 -1
  22. package/cjs/components/Segment/ui/SegmentItem/SegmentItem.styles_18h1p52.css +2 -0
  23. package/cjs/components/Segment/ui/SegmentItem/variations/_view/base.js +1 -1
  24. package/cjs/components/Segment/ui/SegmentItem/variations/_view/base.js.map +1 -1
  25. package/cjs/components/Segment/ui/SegmentItem/variations/_view/base_1m1u2ys.css +1 -0
  26. package/cjs/components/Tabs/ui/Tabs/Tabs.js +2 -2
  27. package/cjs/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
  28. package/cjs/index.css +7 -17
  29. package/cjs/utils/datejs.js +1 -0
  30. package/cjs/utils/datejs.js.map +1 -1
  31. package/emotion/cjs/components/DatePicker/RangeDate/RangeDate.js +12 -1
  32. package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.js +12 -4
  33. package/emotion/cjs/components/DatePicker/hooks/useDatePicker.js +7 -5
  34. package/emotion/cjs/components/DatePicker/utils/dateHelper.js +15 -13
  35. package/emotion/cjs/components/Segment/tokens.js +1 -14
  36. package/emotion/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +82 -156
  37. package/emotion/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.styles.js +17 -25
  38. package/emotion/cjs/components/Segment/ui/SegmentItem/SegmentItem.js +2 -4
  39. package/emotion/cjs/components/Segment/ui/SegmentItem/SegmentItem.styles.js +6 -28
  40. package/emotion/cjs/components/Segment/ui/SegmentItem/variations/_view/base.js +1 -2
  41. package/emotion/cjs/components/Tabs/ui/Tabs/Tabs.js +2 -2
  42. package/emotion/cjs/components/_Icon/index.js +0 -14
  43. package/emotion/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +34 -1
  44. package/emotion/cjs/examples/plasma_b2c/components/Segment/Segment.stories.tsx +1 -6
  45. package/emotion/cjs/examples/plasma_b2c/components/Segment/SegmentGroup.config.js +10 -13
  46. package/emotion/cjs/examples/plasma_b2c/components/Segment/SegmentItem.config.js +9 -9
  47. package/emotion/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +35 -1
  48. package/emotion/cjs/examples/plasma_web/components/Segment/Segment.stories.tsx +2 -142
  49. package/emotion/cjs/examples/plasma_web/components/Segment/SegmentGroup.config.js +9 -15
  50. package/emotion/cjs/examples/plasma_web/components/Segment/SegmentItem.config.js +9 -9
  51. package/emotion/cjs/examples/sds_engineer/components/Segment/Segment.stories.tsx +1 -6
  52. package/emotion/cjs/utils/datejs.js +1 -0
  53. package/emotion/es/components/DatePicker/RangeDate/RangeDate.js +12 -1
  54. package/emotion/es/components/DatePicker/SingleDate/SingleDate.js +12 -4
  55. package/emotion/es/components/DatePicker/hooks/useDatePicker.js +7 -5
  56. package/emotion/es/components/DatePicker/utils/dateHelper.js +15 -13
  57. package/emotion/es/components/Segment/tokens.js +1 -14
  58. package/emotion/es/components/Segment/ui/SegmentGroup/SegmentGroup.js +85 -159
  59. package/emotion/es/components/Segment/ui/SegmentGroup/SegmentGroup.styles.js +17 -25
  60. package/emotion/es/components/Segment/ui/SegmentItem/SegmentItem.js +3 -5
  61. package/emotion/es/components/Segment/ui/SegmentItem/SegmentItem.styles.js +5 -27
  62. package/emotion/es/components/Segment/ui/SegmentItem/variations/_view/base.js +1 -2
  63. package/emotion/es/components/Tabs/ui/Tabs/Tabs.js +2 -2
  64. package/emotion/es/components/_Icon/index.js +0 -2
  65. package/emotion/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +34 -1
  66. package/emotion/es/examples/plasma_b2c/components/Segment/Segment.stories.tsx +1 -6
  67. package/emotion/es/examples/plasma_b2c/components/Segment/SegmentGroup.config.js +10 -13
  68. package/emotion/es/examples/plasma_b2c/components/Segment/SegmentItem.config.js +9 -9
  69. package/emotion/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +35 -1
  70. package/emotion/es/examples/plasma_web/components/Segment/Segment.stories.tsx +2 -142
  71. package/emotion/es/examples/plasma_web/components/Segment/SegmentGroup.config.js +9 -15
  72. package/emotion/es/examples/plasma_web/components/Segment/SegmentItem.config.js +9 -9
  73. package/emotion/es/examples/sds_engineer/components/Segment/Segment.stories.tsx +1 -6
  74. package/emotion/es/utils/datejs.js +1 -0
  75. package/es/components/DatePicker/RangeDate/RangeDate.js +12 -1
  76. package/es/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
  77. package/es/components/DatePicker/SingleDate/SingleDate.js +12 -4
  78. package/es/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
  79. package/es/components/DatePicker/hooks/useDatePicker.js +7 -5
  80. package/es/components/DatePicker/hooks/useDatePicker.js.map +1 -1
  81. package/es/components/DatePicker/utils/dateHelper.js +15 -13
  82. package/es/components/DatePicker/utils/dateHelper.js.map +1 -1
  83. package/es/components/Segment/tokens.js +1 -14
  84. package/es/components/Segment/tokens.js.map +1 -1
  85. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.css +4 -10
  86. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js +87 -163
  87. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  88. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.styles.js +2 -34
  89. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.styles.js.map +1 -1
  90. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.styles_m9i9p0.css +4 -0
  91. package/es/components/Segment/ui/SegmentItem/SegmentItem.css +3 -7
  92. package/es/components/Segment/ui/SegmentItem/SegmentItem.js +3 -5
  93. package/es/components/Segment/ui/SegmentItem/SegmentItem.js.map +1 -1
  94. package/es/components/Segment/ui/SegmentItem/SegmentItem.styles.js +3 -30
  95. package/es/components/Segment/ui/SegmentItem/SegmentItem.styles.js.map +1 -1
  96. package/es/components/Segment/ui/SegmentItem/SegmentItem.styles_18h1p52.css +2 -0
  97. package/es/components/Segment/ui/SegmentItem/variations/_view/base.js +1 -1
  98. package/es/components/Segment/ui/SegmentItem/variations/_view/base.js.map +1 -1
  99. package/es/components/Segment/ui/SegmentItem/variations/_view/base_1m1u2ys.css +1 -0
  100. package/es/components/Tabs/ui/Tabs/Tabs.js +2 -2
  101. package/es/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
  102. package/es/index.css +7 -17
  103. package/es/utils/datejs.js +1 -0
  104. package/es/utils/datejs.js.map +1 -1
  105. package/package.json +2 -2
  106. package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.js +12 -1
  107. package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.js +12 -4
  108. package/styled-components/cjs/components/DatePicker/hooks/useDatePicker.js +7 -5
  109. package/styled-components/cjs/components/DatePicker/utils/dateHelper.js +15 -13
  110. package/styled-components/cjs/components/Segment/tokens.js +1 -14
  111. package/styled-components/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +82 -156
  112. package/styled-components/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.styles.js +4 -16
  113. package/styled-components/cjs/components/Segment/ui/SegmentItem/SegmentItem.js +2 -4
  114. package/styled-components/cjs/components/Segment/ui/SegmentItem/SegmentItem.styles.js +5 -23
  115. package/styled-components/cjs/components/Segment/ui/SegmentItem/variations/_view/base.js +1 -2
  116. package/styled-components/cjs/components/Tabs/ui/Tabs/Tabs.js +2 -2
  117. package/styled-components/cjs/components/_Icon/index.js +0 -14
  118. package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +34 -1
  119. package/styled-components/cjs/examples/plasma_b2c/components/Segment/Segment.stories.tsx +1 -6
  120. package/styled-components/cjs/examples/plasma_b2c/components/Segment/SegmentGroup.config.js +4 -7
  121. package/styled-components/cjs/examples/plasma_b2c/components/Segment/SegmentItem.config.js +8 -8
  122. package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +35 -1
  123. package/styled-components/cjs/examples/plasma_web/components/Segment/Segment.stories.tsx +2 -142
  124. package/styled-components/cjs/examples/plasma_web/components/Segment/SegmentGroup.config.js +4 -10
  125. package/styled-components/cjs/examples/plasma_web/components/Segment/SegmentItem.config.js +8 -8
  126. package/styled-components/cjs/examples/sds_engineer/components/Segment/Segment.stories.tsx +1 -6
  127. package/styled-components/cjs/utils/datejs.js +1 -0
  128. package/styled-components/es/components/DatePicker/RangeDate/RangeDate.js +12 -1
  129. package/styled-components/es/components/DatePicker/SingleDate/SingleDate.js +12 -4
  130. package/styled-components/es/components/DatePicker/hooks/useDatePicker.js +7 -5
  131. package/styled-components/es/components/DatePicker/utils/dateHelper.js +15 -13
  132. package/styled-components/es/components/Segment/tokens.js +1 -14
  133. package/styled-components/es/components/Segment/ui/SegmentGroup/SegmentGroup.js +85 -159
  134. package/styled-components/es/components/Segment/ui/SegmentGroup/SegmentGroup.styles.js +4 -16
  135. package/styled-components/es/components/Segment/ui/SegmentItem/SegmentItem.js +3 -5
  136. package/styled-components/es/components/Segment/ui/SegmentItem/SegmentItem.styles.js +4 -22
  137. package/styled-components/es/components/Segment/ui/SegmentItem/variations/_view/base.js +1 -2
  138. package/styled-components/es/components/Tabs/ui/Tabs/Tabs.js +2 -2
  139. package/styled-components/es/components/_Icon/index.js +0 -2
  140. package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +34 -1
  141. package/styled-components/es/examples/plasma_b2c/components/Segment/Segment.stories.tsx +1 -6
  142. package/styled-components/es/examples/plasma_b2c/components/Segment/SegmentGroup.config.js +4 -7
  143. package/styled-components/es/examples/plasma_b2c/components/Segment/SegmentItem.config.js +8 -8
  144. package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +35 -1
  145. package/styled-components/es/examples/plasma_web/components/Segment/Segment.stories.tsx +2 -142
  146. package/styled-components/es/examples/plasma_web/components/Segment/SegmentGroup.config.js +4 -10
  147. package/styled-components/es/examples/plasma_web/components/Segment/SegmentItem.config.js +8 -8
  148. package/styled-components/es/examples/sds_engineer/components/Segment/Segment.stories.tsx +1 -6
  149. package/styled-components/es/utils/datejs.js +1 -0
  150. package/types/components/DatePicker/DatePickerBase.types.d.ts +6 -0
  151. package/types/components/DatePicker/DatePickerBase.types.d.ts.map +1 -1
  152. package/types/components/DatePicker/RangeDate/RangeDate.d.ts.map +1 -1
  153. package/types/components/DatePicker/SingleDate/SingleDate.d.ts.map +1 -1
  154. package/types/components/DatePicker/hooks/useDatePicker.d.ts +1 -1
  155. package/types/components/DatePicker/hooks/useDatePicker.d.ts.map +1 -1
  156. package/types/components/DatePicker/utils/dateHelper.d.ts +6 -3
  157. package/types/components/DatePicker/utils/dateHelper.d.ts.map +1 -1
  158. package/types/components/Segment/tokens.d.ts +0 -13
  159. package/types/components/Segment/tokens.d.ts.map +1 -1
  160. package/types/components/Segment/ui/SegmentGroup/SegmentGroup.d.ts +0 -7
  161. package/types/components/Segment/ui/SegmentGroup/SegmentGroup.d.ts.map +1 -1
  162. package/types/components/Segment/ui/SegmentGroup/SegmentGroup.styles.d.ts +0 -12
  163. package/types/components/Segment/ui/SegmentGroup/SegmentGroup.styles.d.ts.map +1 -1
  164. package/types/components/Segment/ui/SegmentGroup/SegmentGroup.types.d.ts +1 -5
  165. package/types/components/Segment/ui/SegmentGroup/SegmentGroup.types.d.ts.map +1 -1
  166. package/types/components/Segment/ui/SegmentItem/SegmentItem.d.ts +0 -4
  167. package/types/components/Segment/ui/SegmentItem/SegmentItem.d.ts.map +1 -1
  168. package/types/components/Segment/ui/SegmentItem/SegmentItem.styles.d.ts +1 -9
  169. package/types/components/Segment/ui/SegmentItem/SegmentItem.styles.d.ts.map +1 -1
  170. package/types/components/Segment/ui/SegmentItem/SegmentItem.types.d.ts +0 -8
  171. package/types/components/Segment/ui/SegmentItem/SegmentItem.types.d.ts.map +1 -1
  172. package/types/components/Segment/ui/SegmentItem/variations/_view/base.d.ts.map +1 -1
  173. package/types/components/Tabs/ui/Tabs/Tabs.d.ts.map +1 -1
  174. package/types/components/_Icon/index.d.ts +0 -2
  175. package/types/components/_Icon/index.d.ts.map +1 -1
  176. package/types/examples/plasma_b2c/components/Segment/Segment.d.ts +0 -6
  177. package/types/examples/plasma_b2c/components/Segment/Segment.d.ts.map +1 -1
  178. package/types/examples/plasma_b2c/components/Segment/SegmentGroup.config.d.ts +0 -3
  179. package/types/examples/plasma_b2c/components/Segment/SegmentGroup.config.d.ts.map +1 -1
  180. package/types/examples/plasma_b2c/components/Segment/SegmentItem.config.d.ts.map +1 -1
  181. package/types/examples/plasma_web/components/Segment/Segment.d.ts +0 -9
  182. package/types/examples/plasma_web/components/Segment/Segment.d.ts.map +1 -1
  183. package/types/examples/plasma_web/components/Segment/SegmentGroup.config.d.ts +0 -6
  184. package/types/examples/plasma_web/components/Segment/SegmentGroup.config.d.ts.map +1 -1
  185. package/types/examples/plasma_web/components/Segment/SegmentItem.config.d.ts.map +1 -1
  186. package/types/examples/sds_engineer/components/Segment/Segment.d.ts +0 -3
  187. package/types/examples/sds_engineer/components/Segment/Segment.d.ts.map +1 -1
  188. package/types/utils/datejs.d.ts +1 -0
  189. package/types/utils/datejs.d.ts.map +1 -1
  190. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.styles_1rr47x4.css +0 -8
  191. package/cjs/components/Segment/ui/SegmentGroup/variations/_vertical/base.js +0 -9
  192. package/cjs/components/Segment/ui/SegmentGroup/variations/_vertical/base.js.map +0 -1
  193. package/cjs/components/Segment/ui/SegmentGroup/variations/_vertical/base_11agnr.css +0 -1
  194. package/cjs/components/Segment/ui/SegmentItem/SegmentItem.styles_f1jpip.css +0 -6
  195. package/cjs/components/Segment/ui/SegmentItem/variations/_view/base_168a47w.css +0 -1
  196. package/cjs/components/_Icon/Icon.assets/DisclosureDown.js +0 -22
  197. package/cjs/components/_Icon/Icon.assets/DisclosureDown.js.map +0 -1
  198. package/cjs/components/_Icon/Icon.assets/DisclosureUp.js +0 -22
  199. package/cjs/components/_Icon/Icon.assets/DisclosureUp.js.map +0 -1
  200. package/cjs/components/_Icon/Icons/IconDisclosureDown.js +0 -23
  201. package/cjs/components/_Icon/Icons/IconDisclosureDown.js.map +0 -1
  202. package/cjs/components/_Icon/Icons/IconDisclosureUp.js +0 -23
  203. package/cjs/components/_Icon/Icons/IconDisclosureUp.js.map +0 -1
  204. package/emotion/cjs/components/Segment/README.md +0 -61
  205. package/emotion/cjs/components/Segment/ui/SegmentGroup/variations/_vertical/base.js +0 -10
  206. package/emotion/cjs/components/Segment/ui/SegmentGroup/variations/_vertical/tokens.json +0 -1
  207. package/emotion/cjs/components/_Icon/Icon.assets/DisclosureDown.js +0 -21
  208. package/emotion/cjs/components/_Icon/Icon.assets/DisclosureUp.js +0 -21
  209. package/emotion/cjs/components/_Icon/Icons/IconDisclosureDown.js +0 -22
  210. package/emotion/cjs/components/_Icon/Icons/IconDisclosureUp.js +0 -22
  211. package/emotion/es/components/Segment/README.md +0 -61
  212. package/emotion/es/components/Segment/ui/SegmentGroup/variations/_vertical/base.js +0 -4
  213. package/emotion/es/components/Segment/ui/SegmentGroup/variations/_vertical/tokens.json +0 -1
  214. package/emotion/es/components/_Icon/Icon.assets/DisclosureDown.js +0 -14
  215. package/emotion/es/components/_Icon/Icon.assets/DisclosureUp.js +0 -14
  216. package/emotion/es/components/_Icon/Icons/IconDisclosureDown.js +0 -15
  217. package/emotion/es/components/_Icon/Icons/IconDisclosureUp.js +0 -15
  218. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.styles_1rr47x4.css +0 -8
  219. package/es/components/Segment/ui/SegmentGroup/variations/_vertical/base.js +0 -5
  220. package/es/components/Segment/ui/SegmentGroup/variations/_vertical/base.js.map +0 -1
  221. package/es/components/Segment/ui/SegmentGroup/variations/_vertical/base_11agnr.css +0 -1
  222. package/es/components/Segment/ui/SegmentItem/SegmentItem.styles_f1jpip.css +0 -6
  223. package/es/components/Segment/ui/SegmentItem/variations/_view/base_168a47w.css +0 -1
  224. package/es/components/_Icon/Icon.assets/DisclosureDown.js +0 -18
  225. package/es/components/_Icon/Icon.assets/DisclosureDown.js.map +0 -1
  226. package/es/components/_Icon/Icon.assets/DisclosureUp.js +0 -18
  227. package/es/components/_Icon/Icon.assets/DisclosureUp.js.map +0 -1
  228. package/es/components/_Icon/Icons/IconDisclosureDown.js +0 -19
  229. package/es/components/_Icon/Icons/IconDisclosureDown.js.map +0 -1
  230. package/es/components/_Icon/Icons/IconDisclosureUp.js +0 -19
  231. package/es/components/_Icon/Icons/IconDisclosureUp.js.map +0 -1
  232. package/styled-components/cjs/components/Segment/README.md +0 -61
  233. package/styled-components/cjs/components/Segment/ui/SegmentGroup/variations/_vertical/base.js +0 -10
  234. package/styled-components/cjs/components/Segment/ui/SegmentGroup/variations/_vertical/tokens.json +0 -1
  235. package/styled-components/cjs/components/_Icon/Icon.assets/DisclosureDown.js +0 -21
  236. package/styled-components/cjs/components/_Icon/Icon.assets/DisclosureUp.js +0 -21
  237. package/styled-components/cjs/components/_Icon/Icons/IconDisclosureDown.js +0 -22
  238. package/styled-components/cjs/components/_Icon/Icons/IconDisclosureUp.js +0 -22
  239. package/styled-components/es/components/Segment/README.md +0 -61
  240. package/styled-components/es/components/Segment/ui/SegmentGroup/variations/_vertical/base.js +0 -4
  241. package/styled-components/es/components/Segment/ui/SegmentGroup/variations/_vertical/tokens.json +0 -1
  242. package/styled-components/es/components/_Icon/Icon.assets/DisclosureDown.js +0 -14
  243. package/styled-components/es/components/_Icon/Icon.assets/DisclosureUp.js +0 -14
  244. package/styled-components/es/components/_Icon/Icons/IconDisclosureDown.js +0 -15
  245. package/styled-components/es/components/_Icon/Icons/IconDisclosureUp.js +0 -15
  246. package/types/components/Segment/ui/SegmentGroup/variations/_vertical/base.d.ts +0 -2
  247. package/types/components/Segment/ui/SegmentGroup/variations/_vertical/base.d.ts.map +0 -1
  248. package/types/components/_Icon/Icon.assets/DisclosureDown.d.ts +0 -4
  249. package/types/components/_Icon/Icon.assets/DisclosureDown.d.ts.map +0 -1
  250. package/types/components/_Icon/Icon.assets/DisclosureUp.d.ts +0 -4
  251. package/types/components/_Icon/Icon.assets/DisclosureUp.d.ts.map +0 -1
  252. package/types/components/_Icon/Icons/IconDisclosureDown.d.ts +0 -4
  253. package/types/components/_Icon/Icons/IconDisclosureDown.d.ts.map +0 -1
  254. package/types/components/_Icon/Icons/IconDisclosureUp.d.ts +0 -4
  255. package/types/components/_Icon/Icons/IconDisclosureUp.d.ts.map +0 -1
@@ -15,7 +15,7 @@ var base$3 = require('./variations/_pilled/base.js');
15
15
  var SegmentItem_styles = require('./SegmentItem.styles.js');
16
16
  var extractTextFrom = require('../../../../utils/extractTextFrom.js');
17
17
 
18
- var _excluded = ["size", "view", "id", "label", "value", "pilled", "contentLeft", "contentRight", "customHandleSelect", "aria-label"];
18
+ var _excluded = ["size", "view", "id", "label", "value", "pilled", "customHandleSelect", "aria-label"];
19
19
  var segmentItemRoot = function segmentItemRoot(Root) {
20
20
  return /*#__PURE__*/React.forwardRef(function (props, outerRef) {
21
21
  var size = props.size,
@@ -24,8 +24,6 @@ var segmentItemRoot = function segmentItemRoot(Root) {
24
24
  label = props.label,
25
25
  value = props.value,
26
26
  pilled = props.pilled,
27
- contentLeft = props.contentLeft,
28
- contentRight = props.contentRight,
29
27
  customHandleSelect = props.customHandleSelect,
30
28
  ariaLabelExternal = props['aria-label'],
31
29
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(props, _excluded);
@@ -62,7 +60,7 @@ var segmentItemRoot = function segmentItemRoot(Root) {
62
60
  onClick: handleSelectSegment,
63
61
  tabIndex: disabledGroup ? -1 : 0,
64
62
  disabled: disabledGroup
65
- }, rest), contentLeft && /*#__PURE__*/React.createElement(SegmentItem_styles.LeftContent, null, contentLeft), /*#__PURE__*/React.createElement(SegmentItem_styles.StyledContent, null, label || value), contentRight && /*#__PURE__*/React.createElement(SegmentItem_styles.RightContent, null, contentRight));
63
+ }, rest), /*#__PURE__*/React.createElement(SegmentItem_styles.StyledContent, null, label || value));
66
64
  });
67
65
  };
68
66
  var segmentItemConfig = {
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentItem.js","sources":["../../../../../src/components/Segment/ui/SegmentItem/SegmentItem.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\nimport type { MouseEvent } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../../../engines/types';\nimport { cx, extractTextFrom } from '../../../../utils';\nimport { classes } from '../../tokens';\nimport { useSegmentInner } from '../../SegmentProvider/SegmentProvider';\n\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport type { SegmentItemProps } from './SegmentItem.types';\nimport { StyledContent, base, LeftContent, RightContent } from './SegmentItem.styles';\n\nexport const segmentItemRoot = (Root: RootProps<HTMLLabelElement, SegmentItemProps>) =>\n forwardRef<HTMLLabelElement, SegmentItemProps>((props, outerRef) => {\n const {\n size,\n view,\n id,\n label,\n value,\n pilled,\n contentLeft,\n contentRight,\n customHandleSelect,\n 'aria-label': ariaLabelExternal,\n ...rest\n } = props;\n const { selectionMode, disabledGroup, handleSelect, selectedSegmentItems } = useSegmentInner();\n\n const uniqId = safeUseId();\n const segmentId = id || `label-${uniqId}`;\n\n const ariaLabelDefault = useMemo(() => extractTextFrom(label), [label]);\n const pilledAttr = view !== 'clear' && pilled;\n const pilledClass = pilledAttr ? classes.segmentPilled : undefined;\n\n const isSelected = selectedSegmentItems?.includes(value || ariaLabelDefault);\n const selectedClass = isSelected ? classes.selectedSegmentItem : undefined;\n\n const handleSelectSegment = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n if (disabledGroup) {\n return;\n }\n\n customHandleSelect?.(event);\n handleSelect?.(value || ariaLabelDefault);\n },\n [selectionMode],\n );\n\n return (\n <Root\n view={view}\n size={size}\n id={segmentId}\n ref={outerRef}\n aria-label={ariaLabelExternal || ariaLabelDefault}\n value={value}\n pilled={pilledAttr}\n className={cx(selectedClass, pilledClass)}\n onClick={handleSelectSegment}\n tabIndex={disabledGroup ? -1 : 0}\n disabled={disabledGroup}\n {...rest}\n >\n {contentLeft && <LeftContent>{contentLeft}</LeftContent>}\n <StyledContent>{label || value}</StyledContent>\n {contentRight && <RightContent>{contentRight}</RightContent>}\n </Root>\n );\n });\n\nexport const segmentItemConfig = {\n name: 'SegmentItem',\n tag: 'button',\n layout: segmentItemRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n pilled: {\n css: pilledCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'clear',\n size: 'xs',\n },\n};\n"],"names":["segmentItemRoot","Root","forwardRef","props","outerRef","size","view","id","label","value","pilled","contentLeft","contentRight","customHandleSelect","ariaLabelExternal","rest","_objectWithoutProperties","_excluded","_useSegmentInner","useSegmentInner","selectionMode","disabledGroup","handleSelect","selectedSegmentItems","uniqId","safeUseId","segmentId","concat","ariaLabelDefault","useMemo","extractTextFrom","pilledAttr","pilledClass","classes","segmentPilled","undefined","isSelected","includes","selectedClass","selectedSegmentItem","handleSelectSegment","useCallback","event","React","createElement","_extends","ref","className","cx","onClick","tabIndex","disabled","LeftContent","StyledContent","RightContent","segmentItemConfig","name","tag","layout","base","variations","css","sizeCSS","viewCSS","disabledCSS","attrs","pilledCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;IAgBaA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,IAAmD,EAAA;AAAA,EAAA,oBAC/EC,gBAAU,CAAqC,UAACC,KAAK,EAAEC,QAAQ,EAAK;AAChE,IAAA,IACIC,IAAI,GAWJF,KAAK,CAXLE,IAAI;MACJC,IAAI,GAUJH,KAAK,CAVLG,IAAI;MACJC,EAAE,GASFJ,KAAK,CATLI,EAAE;MACFC,KAAK,GAQLL,KAAK,CARLK,KAAK;MACLC,KAAK,GAOLN,KAAK,CAPLM,KAAK;MACLC,MAAM,GAMNP,KAAK,CANLO,MAAM;MACNC,WAAW,GAKXR,KAAK,CALLQ,WAAW;MACXC,YAAY,GAIZT,KAAK,CAJLS,YAAY;MACZC,kBAAkB,GAGlBV,KAAK,CAHLU,kBAAkB;MACJC,iBAAiB,GAE/BX,KAAK,CAFL,YAAY,CAAA;AACTY,MAAAA,IAAI,GAAAC,iDAAA,CACPb,KAAK,EAAAc,SAAA,CAAA,CAAA;AACT,IAAA,IAAAC,gBAA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ACR;AACDZ,IAAAA,QAAQ,EAAE;AACNU,MAAAA,GAAG,EAAEG,WAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDvD,IAAAA,MAAM,EAAE;AACJmD,MAAAA,GAAG,EAAEK,WAAS;AACdD,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDE,EAAAA,QAAQ,EAAE;AACN7D,IAAAA,IAAI,EAAE,OAAO;AACbD,IAAAA,IAAI,EAAE,IAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"SegmentItem.js","sources":["../../../../../src/components/Segment/ui/SegmentItem/SegmentItem.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\nimport type { MouseEvent } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../../../engines/types';\nimport { cx, extractTextFrom } from '../../../../utils';\nimport { classes } from '../../tokens';\nimport { useSegmentInner } from '../../SegmentProvider/SegmentProvider';\n\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport type { SegmentItemProps } from './SegmentItem.types';\nimport { StyledContent, base } from './SegmentItem.styles';\n\nexport const segmentItemRoot = (Root: RootProps<HTMLLabelElement, SegmentItemProps>) =>\n forwardRef<HTMLLabelElement, SegmentItemProps>((props, outerRef) => {\n const {\n size,\n view,\n id,\n label,\n value,\n pilled,\n customHandleSelect,\n 'aria-label': ariaLabelExternal,\n ...rest\n } = props;\n const { selectionMode, disabledGroup, handleSelect, selectedSegmentItems } = useSegmentInner();\n\n const uniqId = safeUseId();\n const segmentId = id || `label-${uniqId}`;\n\n const ariaLabelDefault = useMemo(() => extractTextFrom(label), [label]);\n const pilledAttr = view !== 'clear' && pilled;\n const pilledClass = pilledAttr ? classes.segmentPilled : undefined;\n\n const isSelected = selectedSegmentItems?.includes(value || ariaLabelDefault);\n const selectedClass = isSelected ? classes.selectedSegmentItem : undefined;\n\n const handleSelectSegment = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n if (disabledGroup) {\n return;\n }\n\n customHandleSelect?.(event);\n handleSelect?.(value || ariaLabelDefault);\n },\n [selectionMode],\n );\n\n return (\n <Root\n view={view}\n size={size}\n id={segmentId}\n ref={outerRef}\n aria-label={ariaLabelExternal || ariaLabelDefault}\n value={value}\n pilled={pilledAttr}\n className={cx(selectedClass, pilledClass)}\n onClick={handleSelectSegment}\n tabIndex={disabledGroup ? -1 : 0}\n disabled={disabledGroup}\n {...rest}\n >\n <StyledContent>{label || value}</StyledContent>\n </Root>\n );\n });\n\nexport const segmentItemConfig = {\n name: 'SegmentItem',\n tag: 'button',\n layout: segmentItemRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n pilled: {\n css: pilledCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'clear',\n size: 'xs',\n },\n};\n"],"names":["segmentItemRoot","Root","forwardRef","props","outerRef","size","view","id","label","value","pilled","customHandleSelect","ariaLabelExternal","rest","_objectWithoutProperties","_excluded","_useSegmentInner","useSegmentInner","selectionMode","disabledGroup","handleSelect","selectedSegmentItems","uniqId","safeUseId","segmentId","concat","ariaLabelDefault","useMemo","extractTextFrom","pilledAttr","pilledClass","classes","segmentPilled","undefined","isSelected","includes","selectedClass","selectedSegmentItem","handleSelectSegment","useCallback","event","React","createElement","_extends","ref","className","cx","onClick","tabIndex","disabled","StyledContent","segmentItemConfig","name","tag","layout","base","variations","css","sizeCSS","viewCSS","disabledCSS","attrs","pilledCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;IAgBaA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,IAAmD,EAAA;AAAA,EAAA,oBAC/EC,gBAAU,CAAqC,UAACC,KAAK,EAAEC,QAAQ,EAAK;AAChE,IAAA,IACIC,IAAI,GASJF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;AACbC,EAAAA,MAAM,EAAEtD,eAAe;AACvBuD,EAAAA,IAAI,EAAJA,uBAAI;AACJC,EAAAA,UAAU,EAAE;AACRnD,IAAAA,IAAI,EAAE;AACFoD,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDpD,IAAAA,IAAI,EAAE;AACFmD,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDV,IAAAA,QAAQ,EAAE;AACNQ,MAAAA,GAAG,EAAEG,WAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDnD,IAAAA,MAAM,EAAE;AACJ+C,MAAAA,GAAG,EAAEK,WAAS;AACdD,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDE,EAAAA,QAAQ,EAAE;AACNzD,IAAAA,IAAI,EAAE,OAAO;AACbD,IAAAA,IAAI,EAAE,IAAA;AACV,GAAA;AACJ;;;;;"}
@@ -1,46 +1,17 @@
1
- import './SegmentItem.styles_f1jpip.css';
1
+ import './SegmentItem.styles_18h1p52.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var react = require('@linaria/react');
7
- var tokens = require('../../tokens.js');
8
7
 
9
8
  var base = "bxcdyja";
10
- var _exp7 = function _exp7() {
11
- return function (_ref) {
12
- var hasRightMargin = _ref.hasRightMargin;
13
- return hasRightMargin ? "var(".concat(tokens.tokens.itemIconMargin, ")") : '0';
14
- };
15
- };
16
- var _exp8 = function _exp8() {
17
- return function (_ref2) {
18
- var hasLeftMargin = _ref2.hasLeftMargin;
19
- return hasLeftMargin ? "var(".concat(tokens.tokens.itemIconMargin, ")") : '0';
20
- };
21
- };
22
9
  var StyledContent = /*#__PURE__*/react.styled('div')({
23
10
  name: "StyledContent",
24
- "class": "sctm1j9",
25
- propsAsIs: false,
26
- vars: {
27
- "sctm1j9-0": [/*#__PURE__*/_exp7()],
28
- "sctm1j9-1": [/*#__PURE__*/_exp8()]
29
- }
30
- });
31
- var RightContent = /*#__PURE__*/react.styled('div')({
32
- name: "RightContent",
33
- "class": "rgzn5ju",
34
- propsAsIs: false
35
- });
36
- var LeftContent = /*#__PURE__*/react.styled('div')({
37
- name: "LeftContent",
38
- "class": "l1sp2ipp",
11
+ "class": "sxjfe87",
39
12
  propsAsIs: false
40
13
  });
41
14
 
42
- exports.LeftContent = LeftContent;
43
- exports.RightContent = RightContent;
44
15
  exports.StyledContent = StyledContent;
45
16
  exports.base = base;
46
17
  //# sourceMappingURL=SegmentItem.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentItem.styles.js","sources":["../../../../../src/components/Segment/ui/SegmentItem/SegmentItem.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { addFocus, applyEllipsis } from '../../../../mixins';\nimport { tokens } from '../../tokens';\n\nexport const base = css`\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n\n appearance: none;\n border: none;\n outline: none;\n cursor: pointer;\n margin-left: var(${tokens.itemMarginLeft});\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n &:first-child {\n margin-left: 0;\n }\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '0.063rem',\n outlineColor: `var(${tokens.outlineFocusColor})`,\n outlineRadius: 'calc(var(--plasma_private-outline-radius) + 0.063rem)',\n customFocusRules: `\n &.focus-visible:focus,\n &[data-focus-visible-added] {\n &::before {\n z-index: 1;\n outline: none;\n box-shadow: 0 0 0 0.063rem var(${tokens.outlineFocusColor});\n }\n }\n `,\n })};\n`;\n\nexport const StyledLeftIcon = styled.div`\n margin-right: var(${tokens.itemIconMargin});\n`;\n\nexport const StyledRightIcon = styled.div`\n margin-left: var(${tokens.itemIconMargin});\n`;\n\nexport const StyledContent = styled.div<{\n hasRightMargin?: boolean;\n hasLeftMargin?: boolean;\n isSecondary?: boolean;\n}>`\n display: inline-block;\n width: fit-content;\n padding: var(${tokens.itemContentPadding});\n ${applyEllipsis()};\n\n margin-right: ${({ hasRightMargin }) => (hasRightMargin ? `var(${tokens.itemIconMargin})` : '0')};\n margin-left: ${({ hasLeftMargin }) => (hasLeftMargin ? `var(${tokens.itemIconMargin})` : '0')};\n`;\n\nexport const RightContent = styled.div`\n display: flex;\n margin-left: var(${tokens.itemIconMargin});\n\n color: var(${tokens.itemAdditionalColor});\n`;\n\nexport const LeftContent = styled.div`\n display: flex;\n margin-right: var(${tokens.itemIconMargin});\n\n color: inherit;\n`;\n"],"names":["base","_exp7","_ref","hasRightMargin","concat","tokens","itemIconMargin","_exp8","_ref2","hasLeftMargin","StyledContent","styled","name","class","propsAsIs","vars","RightContent","LeftContent"],"mappings":";;;;;;;AAMO,IAAMA,IAAI,GAkChB,UAAA;AAQC,IAAAC,KAAA,GA/CgBA,SA+ChBA,KAAAA,GAAA;AAAA,EAAA,OAYkB,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,cAAAA,GAAAA,IAAAA,CAAAA,cAAAA,CAAAA;IAAAA,OAAsBA,cAAc,UAAAC,MAAA,CAAUC,aAAM,CAACC,cAAe,SAAK,GAAI,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GA3DlFA,SA2DkFA,KAAAA,GAAA;AAAA,EAAA,OACjF,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,aAAAA,GAAAA,KAAAA,CAAAA,aAAAA,CAAAA;IAAAA,OAAqBA,aAAa,UAAAL,MAAA,CAAUC,aAAM,CAACC,cAAe,SAAK,GAAI,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAX1F,IAAMI,aAAa,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAC,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAUfd,KAAgF,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cACjFM,KAA8E,EAAA,CAAA;AAAA,GAAA;AAAA,CAChG,EAAA;AAEM,IAAMS,YAAY,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKjC,EAAA;AAEM,IAAMG,WAAW,gBAAGN,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKhC;;;;;;;"}
1
+ {"version":3,"file":"SegmentItem.styles.js","sources":["../../../../../src/components/Segment/ui/SegmentItem/SegmentItem.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { addFocus, applyEllipsis } from '../../../../mixins';\nimport { tokens } from '../../tokens';\n\nexport const base = css`\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n align-items: center;\n\n appearance: none;\n border: none;\n outline: none;\n cursor: pointer;\n margin-left: var(${tokens.itemMarginLeft});\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n &:first-child {\n margin-left: 0;\n }\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.outlineFocusColor})`,\n outlineRadius: 'calc(var(--plasma_private-outline-radius) + 0.063rem)',\n customFocusRules: `\n &.focus-visible:focus,\n &[data-focus-visible-added] {\n &::before {\n z-index: 1;\n outline: none;\n box-shadow: 0 0 0 0.063rem var(${tokens.outlineFocusColor});\n }\n }\n `,\n })};\n`;\n\nexport const StyledContent = styled.div`\n display: inline-block;\n width: fit-content;\n ${applyEllipsis()};\n`;\n"],"names":["base","StyledContent","styled","name","class","propsAsIs"],"mappings":";;;;;;AAMO,IAAMA,IAAI,GAmChB,UAAA;AAEM,IAAMC,aAAa,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAIlC;;;;;"}
@@ -0,0 +1,2 @@
1
+ .bxcdyja{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;box-sizing:border-box;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;outline:none;cursor:pointer;margin-left:var(--plasma-segment-item-margin-left);-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;}.bxcdyja:first-child{margin-left:0;}.bxcdyja::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma_private-outline-radius) + 0.063rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.bxcdyja.focus-visible:focus::before,.bxcdyja[data-focus-visible-added]::before{z-index:1;outline:none;box-shadow:0 0 0 0.063rem var(--plasma-segment-outline-focus-color);}
2
+ .sxjfe87{display:inline-block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@@ -1,4 +1,4 @@
1
- import './base_168a47w.css';
1
+ import './base_1m1u2ys.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../../../../src/components/Segment/ui/SegmentItem/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../../../tokens';\nimport { RightContent } from '../../SegmentItem.styles';\n\nexport const base = css`\n color: var(${tokens.itemColor});\n background-color: var(${tokens.itemBackgroundColor});\n\n &:hover {\n color: var(${tokens.itemColorHover});\n background-color: var(${tokens.itemBackgroundColorHover});\n\n ${RightContent} {\n color: var(${tokens.itemAdditionalColorHover});\n }\n }\n\n &.${String(classes.selectedSegmentItem)} {\n color: var(${tokens.itemSelectedColor});\n background-color: var(${tokens.itemSelectedBackgroundColor});\n\n ${RightContent} {\n color: var(${tokens.itemSelectedAdditionalColor});\n }\n\n &:hover {\n color: var(${tokens.itemSelectedColorHover});\n background-color: var(${tokens.itemSelectedBackgroundColorHover});\n\n ${RightContent} {\n color: var(${tokens.itemSelectedAdditionalColorHover});\n }\n }\n }\n`;\n"],"names":["base"],"mappings":";;;;AAKO,IAAMA,IAAI,GA8BhB;;;;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../../../../src/components/Segment/ui/SegmentItem/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../../../tokens';\n\nexport const base = css`\n color: var(${tokens.itemColor});\n background-color: var(${tokens.itemBackgroundColor});\n\n &:hover {\n color: var(${tokens.itemColorHover});\n background-color: var(${tokens.itemBackgroundColorHover});\n }\n\n &.${String(classes.selectedSegmentItem)} {\n color: var(${tokens.itemSelectedColor});\n background-color: var(${tokens.itemSelectedBackgroundColor});\n\n &:hover {\n color: var(${tokens.itemSelectedColorHover});\n background-color: var(${tokens.itemSelectedBackgroundColorHover});\n }\n }\n`;\n"],"names":["base"],"mappings":";;;;AAIO,IAAMA,IAAI,GAkBhB;;;;"}
@@ -0,0 +1 @@
1
+ .b1tykljf{color:var(--plasma-segment-item-color);background-color:var(--plasma-segment-item-background-color);}.b1tykljf:hover{color:var(--plasma-segment-item-color-hover);background-color:var(--plasma-segment-item-background-color-hover);}.b1tykljf.selected-segment-item{color:var(--plasma-segment-item-selected-color);background-color:var(--plasma-segment-item-selected-background-color);}.b1tykljf.selected-segment-item:hover{color:var(--plasma-segment-item-selected-color-hover);background-color:var(--plasma-segment-item-selected-background-color-hover);}
@@ -135,7 +135,7 @@ var tabsRoot = function tabsRoot(Root) {
135
135
  var scrollLeft = Math.round(event.currentTarget.scrollLeft);
136
136
  setFirstItemVisible(scrollLeft <= 0);
137
137
  setLastItemVisible(scrollLeft >= maxScrollLeft);
138
- }, []);
138
+ }, [setFirstItemVisible, setLastItemVisible]);
139
139
  var onKeyDown = React.useCallback(function (event) {
140
140
  if (index$1 === undefined) {
141
141
  return;
@@ -183,7 +183,7 @@ var tabsRoot = function tabsRoot(Root) {
183
183
  scrollRef.current.scrollTo({
184
184
  left: Math.round(scrollRef.current.scrollLeft + leftArrowRef.current.clientWidth)
185
185
  });
186
- }, [firstItemVisible]);
186
+ }, [firstItemVisible, scrollRef, leftArrowRef]);
187
187
  return /*#__PURE__*/React.createElement(TabsContext.TabsContext.Provider, {
188
188
  value: refs
189
189
  }, /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","sources":["../../../../../src/components/Tabs/ui/Tabs/Tabs.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo, useState, useEffect, useRef, KeyboardEvent } from 'react';\nimport type { MutableRefObject } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../../../engines/types';\nimport { IconDisclosureLeft, IconDisclosureRight } from '../../../_Icon';\nimport { classes, tokens } from '../../tokens';\nimport { cx } from '../../../../utils';\nimport { TabItemRefs, TabsContext } from '../../TabsContext';\n\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport { base as stretchCSS } from './variations/_stretch/base';\nimport { StyledArrow, StyledContent, StyledContentWrapper, base } from './Tabs.styles';\nimport type { TabsProps } from './Tabs.types';\n\nenum Keys {\n end = 35,\n home = 36,\n left = 37,\n right = 39,\n}\n\nexport const tabsRoot = (Root: RootProps<HTMLDivElement, TabsProps>) =>\n forwardRef<HTMLDivElement, TabsProps>((props, outerRef) => {\n const {\n id,\n stretch = false,\n disabled = false,\n clip = 'scroll',\n size,\n view,\n children,\n pilled = false,\n index,\n className,\n ...rest\n } = props;\n const [firstItemVisible, setFirstItemVisible] = useState(true);\n const [lastItemVisible, setLastItemVisible] = useState(true);\n\n const refs = useMemo(() => new TabItemRefs(index), []);\n\n const uniqId = safeUseId();\n const tabsId = id || uniqId;\n\n const isFilled = view === 'filled'; // outer padding is only for filled view\n const pilledAttr = view !== 'clear' && pilled;\n const pilledClass = pilledAttr ? classes.tabsPilled : undefined;\n\n const stretchClass = firstItemVisible && lastItemVisible && stretch ? classes.tabsStretch : undefined;\n const hasLeftArrowClass = !firstItemVisible ? classes.tabsHasLeftArrow : undefined;\n const hasRightArrowClass = !lastItemVisible ? classes.tabsHasRightArrow : undefined;\n const clipScrollClass = clip === 'scroll' ? classes.tabsClipScroll : undefined;\n const clipShowAllClass = clip === 'showAll' ? classes.tabsClipShowAll : undefined;\n\n const scrollRef = useRef<HTMLElement | null>(null);\n const trackRef = useRef<HTMLElement | null>(null);\n const leftArrowRef = useRef<HTMLButtonElement | null>(null);\n\n const onPrev = useCallback(() => {\n if (disabled || !scrollRef.current) {\n return;\n }\n\n const scrollLeft = Math.round(scrollRef.current.scrollLeft);\n const firstOverflowingTab = refs.items\n .slice()\n .reverse()\n .find((item: MutableRefObject<HTMLElement | null>) => {\n if (!item.current || item.current.offsetLeft === undefined) {\n return;\n }\n const tabStartX = item.current.offsetLeft;\n\n return tabStartX < scrollLeft;\n });\n\n firstOverflowingTab?.current?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n }, [disabled, scrollRef, refs]);\n\n const onNext = useCallback(() => {\n if (disabled || !scrollRef.current) {\n return;\n }\n\n const scrollRight = Math.round(scrollRef.current.scrollLeft + scrollRef.current.clientWidth);\n const lastOverflowingTab = refs.items.find((item: MutableRefObject<HTMLElement | null>) => {\n if (!item.current || item.current.offsetLeft === undefined) {\n return;\n }\n const tabEndX = item.current.offsetLeft + item.current.offsetWidth;\n\n return tabEndX > scrollRight;\n });\n\n lastOverflowingTab?.current?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n }, [disabled, scrollRef, refs]);\n\n const PreviousButton = useMemo(\n () => (\n <StyledArrow\n type=\"button\"\n aria-label=\"Предыдущий таб\"\n onClick={onPrev}\n tabIndex={disabled ? -1 : 0}\n disabled={disabled}\n isFilled={isFilled}\n ref={leftArrowRef}\n isLeftArrow\n >\n <IconDisclosureLeft color={`var(${tokens.arrowColor})`} />\n </StyledArrow>\n ),\n [onPrev, disabled, isFilled],\n );\n\n const NextButton = useMemo(\n () => (\n <StyledArrow\n type=\"button\"\n aria-label=\"Следующий таб\"\n onClick={onNext}\n tabIndex={disabled ? -1 : 0}\n disabled={disabled}\n isFilled={isFilled}\n >\n <IconDisclosureRight color={`var(${tokens.arrowColor})`} />\n </StyledArrow>\n ),\n [onNext, disabled, isFilled],\n );\n\n const handleScroll = useCallback((event: React.UIEvent<HTMLElement>): void => {\n event.stopPropagation();\n const maxScrollLeft = event.currentTarget.scrollWidth - event.currentTarget.clientWidth;\n const scrollLeft = Math.round(event.currentTarget.scrollLeft);\n\n setFirstItemVisible(scrollLeft <= 0);\n setLastItemVisible(scrollLeft >= maxScrollLeft);\n }, []);\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (index === undefined) {\n return;\n }\n\n const minIndex = 0;\n const maxIndex = refs.items.length - 1;\n let nextIndex: number;\n\n switch (event.keyCode) {\n case Keys.end:\n nextIndex = maxIndex;\n break;\n case Keys.left:\n nextIndex = index > minIndex ? index - 1 : index;\n break;\n case Keys.right:\n nextIndex = index < maxIndex ? index + 1 : index;\n break;\n case Keys.home:\n nextIndex = minIndex;\n break;\n default:\n return;\n }\n\n if (nextIndex !== index) {\n event.preventDefault();\n refs.items[nextIndex].current?.focus();\n refs.items[nextIndex].current?.scrollIntoView({\n block: 'center',\n inline: 'center',\n behavior: 'smooth',\n });\n }\n },\n [index],\n );\n\n useEffect(() => {\n setLastItemVisible(scrollRef.current?.scrollWidth === scrollRef.current?.clientWidth);\n }, []);\n\n // Этот хук компенсирует появление левой стрелки при прокрутке\n useEffect(() => {\n if (firstItemVisible || !scrollRef.current || !leftArrowRef.current) {\n return;\n }\n\n scrollRef.current.scrollTo({\n left: Math.round(scrollRef.current.scrollLeft + leftArrowRef.current.clientWidth),\n });\n }, [firstItemVisible]);\n\n return (\n <TabsContext.Provider value={refs}>\n <Root\n view={view}\n role=\"tablist\"\n size={size}\n pilled={pilled}\n id={tabsId}\n ref={outerRef}\n disabled={disabled}\n className={cx(pilledClass, stretchClass, hasLeftArrowClass, hasRightArrowClass, className)}\n onKeyDown={onKeyDown}\n {...rest}\n >\n {!firstItemVisible && PreviousButton}\n <StyledContentWrapper\n className={cx(clipScrollClass, clipShowAllClass)}\n ref={scrollRef as MutableRefObject<HTMLDivElement | null>}\n onScroll={handleScroll}\n >\n <StyledContent ref={trackRef as MutableRefObject<HTMLDivElement | null>}>\n {children}\n </StyledContent>\n </StyledContentWrapper>\n {!lastItemVisible && NextButton}\n </Root>\n </TabsContext.Provider>\n );\n });\n\nexport const tabsConfig = {\n name: 'Tabs',\n tag: 'div',\n layout: tabsRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n stretch: {\n css: stretchCSS,\n attrs: true,\n },\n pilled: {\n css: pilledCSS,\n },\n },\n defaults: {\n view: 'clear',\n size: 'xs',\n },\n};\n"],"names":["Keys","tabsRoot","Root","forwardRef","props","outerRef","id","_props$stretch","stretch","_props$disabled","disabled","_props$clip","clip","size","view","children","_props$pilled","pilled","index","className","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","firstItemVisible","setFirstItemVisible","_useState3","_useState4","lastItemVisible","setLastItemVisible","refs","useMemo","TabItemRefs","uniqId","safeUseId","tabsId","isFilled","pilledAttr","pilledClass","classes","tabsPilled","undefined","stretchClass","tabsStretch","hasLeftArrowClass","tabsHasLeftArrow","hasRightArrowClass","tabsHasRightArrow","clipScrollClass","tabsClipScroll","clipShowAllClass","tabsClipShowAll","scrollRef","useRef","trackRef","leftArrowRef","onPrev","useCallback","_firstOverflowingTab$","current","scrollLeft","Math","round","firstOverflowingTab","items","slice","reverse","find","item","offsetLeft","tabStartX","scrollIntoView","block","inline","onNext","_lastOverflowingTab$c","scrollRight","clientWidth","lastOverflowingTab","tabEndX","offsetWidth","PreviousButton","React","createElement","StyledArrow","type","onClick","tabIndex","ref","isLeftArrow","IconDisclosureLeft","color","concat","tokens","arrowColor","NextButton","IconDisclosureRight","handleScroll","event","stopPropagation","maxScrollLeft","currentTarget","scrollWidth","onKeyDown","minIndex","maxIndex","length","nextIndex","keyCode","end","left","right","home","_refs$items$nextIndex","_refs$items$nextIndex2","preventDefault","focus","behavior","useEffect","_scrollRef$current","_scrollRef$current2","scrollTo","TabsContext","Provider","value","_extends","role","cx","StyledContentWrapper","onScroll","StyledContent","tabsConfig","name","tag","layout","base","variations","css","sizeCSS","viewCSS","disabledCSS","attrs","stretchCSS","pilledCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAeuF,IAGlFA,IAAI,0BAAJA,IAAI,EAAA;AAAJA,EAAAA,IAAI,CAAJA,IAAI,CAAA,KAAA,CAAA,GAAA,EAAA,CAAA,GAAA,KAAA,CAAA;AAAJA,EAAAA,IAAI,CAAJA,IAAI,CAAA,MAAA,CAAA,GAAA,EAAA,CAAA,GAAA,MAAA,CAAA;AAAJA,EAAAA,IAAI,CAAJA,IAAI,CAAA,MAAA,CAAA,GAAA,EAAA,CAAA,GAAA,MAAA,CAAA;AAAJA,EAAAA,IAAI,CAAJA,IAAI,CAAA,OAAA,CAAA,GAA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AAU,GAAG;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAExI,QAAQ;AAChByI,EAAAA,IAAI,EAAJA,gBAAI;AACJC,EAAAA,UAAU,EAAE;AACR9H,IAAAA,IAAI,EAAE;AACF+H,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD/H,IAAAA,IAAI,EAAE;AACF8H,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDpI,IAAAA,QAAQ,EAAE;AACNkI,MAAAA,GAAG,EAAEG,WAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDxI,IAAAA,OAAO,EAAE;AACLoI,MAAAA,GAAG,EAAEK,WAAU;AACfD,MAAAA,KAAK,EAAE,IAAA;KACV;AACD/H,IAAAA,MAAM,EAAE;AACJ2H,MAAAA,GAAG,EAAEM,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrI,IAAAA,IAAI,EAAE,OAAO;AACbD,IAAAA,IAAI,EAAE,IAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"Tabs.js","sources":["../../../../../src/components/Tabs/ui/Tabs/Tabs.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo, useState, useEffect, useRef, KeyboardEvent } from 'react';\nimport type { MutableRefObject } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../../../engines/types';\nimport { IconDisclosureLeft, IconDisclosureRight } from '../../../_Icon';\nimport { classes, tokens } from '../../tokens';\nimport { cx } from '../../../../utils';\nimport { TabItemRefs, TabsContext } from '../../TabsContext';\n\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport { base as stretchCSS } from './variations/_stretch/base';\nimport { StyledArrow, StyledContent, StyledContentWrapper, base } from './Tabs.styles';\nimport type { TabsProps } from './Tabs.types';\n\nenum Keys {\n end = 35,\n home = 36,\n left = 37,\n right = 39,\n}\n\nexport const tabsRoot = (Root: RootProps<HTMLDivElement, TabsProps>) =>\n forwardRef<HTMLDivElement, TabsProps>((props, outerRef) => {\n const {\n id,\n stretch = false,\n disabled = false,\n clip = 'scroll',\n size,\n view,\n children,\n pilled = false,\n index,\n className,\n ...rest\n } = props;\n const [firstItemVisible, setFirstItemVisible] = useState(true);\n const [lastItemVisible, setLastItemVisible] = useState(true);\n\n const refs = useMemo(() => new TabItemRefs(index), []);\n\n const uniqId = safeUseId();\n const tabsId = id || uniqId;\n\n const isFilled = view === 'filled'; // outer padding is only for filled view\n const pilledAttr = view !== 'clear' && pilled;\n const pilledClass = pilledAttr ? classes.tabsPilled : undefined;\n\n const stretchClass = firstItemVisible && lastItemVisible && stretch ? classes.tabsStretch : undefined;\n const hasLeftArrowClass = !firstItemVisible ? classes.tabsHasLeftArrow : undefined;\n const hasRightArrowClass = !lastItemVisible ? classes.tabsHasRightArrow : undefined;\n const clipScrollClass = clip === 'scroll' ? classes.tabsClipScroll : undefined;\n const clipShowAllClass = clip === 'showAll' ? classes.tabsClipShowAll : undefined;\n\n const scrollRef = useRef<HTMLElement | null>(null);\n const trackRef = useRef<HTMLElement | null>(null);\n const leftArrowRef = useRef<HTMLButtonElement | null>(null);\n\n const onPrev = useCallback(() => {\n if (disabled || !scrollRef.current) {\n return;\n }\n\n const scrollLeft = Math.round(scrollRef.current.scrollLeft);\n const firstOverflowingTab = refs.items\n .slice()\n .reverse()\n .find((item: MutableRefObject<HTMLElement | null>) => {\n if (!item.current || item.current.offsetLeft === undefined) {\n return;\n }\n const tabStartX = item.current.offsetLeft;\n\n return tabStartX < scrollLeft;\n });\n\n firstOverflowingTab?.current?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n }, [disabled, scrollRef, refs]);\n\n const onNext = useCallback(() => {\n if (disabled || !scrollRef.current) {\n return;\n }\n\n const scrollRight = Math.round(scrollRef.current.scrollLeft + scrollRef.current.clientWidth);\n const lastOverflowingTab = refs.items.find((item: MutableRefObject<HTMLElement | null>) => {\n if (!item.current || item.current.offsetLeft === undefined) {\n return;\n }\n const tabEndX = item.current.offsetLeft + item.current.offsetWidth;\n\n return tabEndX > scrollRight;\n });\n\n lastOverflowingTab?.current?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n }, [disabled, scrollRef, refs]);\n\n const PreviousButton = useMemo(\n () => (\n <StyledArrow\n type=\"button\"\n aria-label=\"Предыдущий таб\"\n onClick={onPrev}\n tabIndex={disabled ? -1 : 0}\n disabled={disabled}\n isFilled={isFilled}\n ref={leftArrowRef}\n isLeftArrow\n >\n <IconDisclosureLeft color={`var(${tokens.arrowColor})`} />\n </StyledArrow>\n ),\n [onPrev, disabled, isFilled],\n );\n\n const NextButton = useMemo(\n () => (\n <StyledArrow\n type=\"button\"\n aria-label=\"Следующий таб\"\n onClick={onNext}\n tabIndex={disabled ? -1 : 0}\n disabled={disabled}\n isFilled={isFilled}\n >\n <IconDisclosureRight color={`var(${tokens.arrowColor})`} />\n </StyledArrow>\n ),\n [onNext, disabled, isFilled],\n );\n\n const handleScroll = useCallback(\n (event: React.UIEvent<HTMLElement>): void => {\n event.stopPropagation();\n const maxScrollLeft = event.currentTarget.scrollWidth - event.currentTarget.clientWidth;\n const scrollLeft = Math.round(event.currentTarget.scrollLeft);\n\n setFirstItemVisible(scrollLeft <= 0);\n setLastItemVisible(scrollLeft >= maxScrollLeft);\n },\n [setFirstItemVisible, setLastItemVisible],\n );\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (index === undefined) {\n return;\n }\n\n const minIndex = 0;\n const maxIndex = refs.items.length - 1;\n let nextIndex: number;\n\n switch (event.keyCode) {\n case Keys.end:\n nextIndex = maxIndex;\n break;\n case Keys.left:\n nextIndex = index > minIndex ? index - 1 : index;\n break;\n case Keys.right:\n nextIndex = index < maxIndex ? index + 1 : index;\n break;\n case Keys.home:\n nextIndex = minIndex;\n break;\n default:\n return;\n }\n\n if (nextIndex !== index) {\n event.preventDefault();\n refs.items[nextIndex].current?.focus();\n refs.items[nextIndex].current?.scrollIntoView({\n block: 'center',\n inline: 'center',\n behavior: 'smooth',\n });\n }\n },\n [index],\n );\n\n useEffect(() => {\n setLastItemVisible(scrollRef.current?.scrollWidth === scrollRef.current?.clientWidth);\n }, []);\n\n // Этот хук компенсирует появление левой стрелки при прокрутке\n useEffect(() => {\n if (firstItemVisible || !scrollRef.current || !leftArrowRef.current) {\n return;\n }\n\n scrollRef.current.scrollTo({\n left: Math.round(scrollRef.current.scrollLeft + leftArrowRef.current.clientWidth),\n });\n }, [firstItemVisible, scrollRef, leftArrowRef]);\n\n return (\n <TabsContext.Provider value={refs}>\n <Root\n view={view}\n role=\"tablist\"\n size={size}\n pilled={pilled}\n id={tabsId}\n ref={outerRef}\n disabled={disabled}\n className={cx(pilledClass, stretchClass, hasLeftArrowClass, hasRightArrowClass, className)}\n onKeyDown={onKeyDown}\n {...rest}\n >\n {!firstItemVisible && PreviousButton}\n <StyledContentWrapper\n className={cx(clipScrollClass, clipShowAllClass)}\n ref={scrollRef as MutableRefObject<HTMLDivElement | null>}\n onScroll={handleScroll}\n >\n <StyledContent ref={trackRef as MutableRefObject<HTMLDivElement | null>}>\n {children}\n </StyledContent>\n </StyledContentWrapper>\n {!lastItemVisible && NextButton}\n </Root>\n </TabsContext.Provider>\n );\n });\n\nexport const tabsConfig = {\n name: 'Tabs',\n tag: 'div',\n layout: tabsRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n stretch: {\n css: stretchCSS,\n attrs: true,\n },\n pilled: {\n css: pilledCSS,\n },\n },\n defaults: {\n view: 'clear',\n size: 'xs',\n },\n};\n"],"names":["Keys","tabsRoot","Root","forwardRef","props","outerRef","id","_props$stretch","stretch","_props$disabled","disabled","_props$clip","clip","size","view","children","_props$pilled","pilled","index","className","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","firstItemVisible","setFirstItemVisible","_useState3","_useState4","lastItemVisible","setLastItemVisible","refs","useMemo","TabItemRefs","uniqId","safeUseId","tabsId","isFilled","pilledAttr","pilledClass","classes","tabsPilled","undefined","stretchClass","tabsStretch","hasLeftArrowClass","tabsHasLeftArrow","hasRightArrowClass","tabsHasRightArrow","clipScrollClass","tabsClipScroll","clipShowAllClass","tabsClipShowAll","scrollRef","useRef","trackRef","leftArrowRef","onPrev","useCallback","_firstOverflowingTab$","current","scrollLeft","Math","round","firstOverflowingTab","items","slice","reverse","find","item","offsetLeft","tabStartX","scrollIntoView","block","inline","onNext","_lastOverflowingTab$c","scrollRight","clientWidth","lastOverflowingTab","tabEndX","offsetWidth","PreviousButton","React","createElement","StyledArrow","type","onClick","tabIndex","ref","isLeftArrow","IconDisclosureLeft","color","concat","tokens","arrowColor","NextButton","IconDisclosureRight","handleScroll","event","stopPropagation","maxScrollLeft","currentTarget","scrollWidth","onKeyDown","minIndex","maxIndex","length","nextIndex","keyCode","end","left","right","home","_refs$items$nextIndex","_refs$items$nextIndex2","preventDefault","focus","behavior","useEffect","_scrollRef$current","_scrollRef$current2","scrollTo","TabsContext","Provider","value","_extends","role","cx","StyledContentWrapper","onScroll","StyledContent","tabsConfig","name","tag","layout","base","variations","css","sizeCSS","viewCSS","disabledCSS","attrs","stretchCSS","pilledCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAeuF,IAGlFA,IAAI,0BAAJA,IAAI,EAAA;AAAJA,EAAAA,IAAI,CAAJA,IAAI,CAAA,KAAA,CAAA,GAAA,EAAA,CAAA,GAAA,KAAA,CAAA;AAAJA,EAAAA,IAAI,CAAJA,IAAI,CAAA,MAAA,CAAA,GAAA,EAAA,CAAA,GAAA,MAAA,CAAA;AAAJA,EAAAA,IAAI,CAAJA,IAAI,CAAA,MAAA,CAAA,GAAA,EAAA,CAAA,GAAA,MAAA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AAA,QACU,CACG,CAAC,EACtB,CAACgB,eAAe,IAAImE,UACnB,CACY,CAAC,CAAA;AAE/B,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMoC,UAAU,GAAG;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAExI,QAAQ;AAChByI,EAAAA,IAAI,EAAJA,gBAAI;AACJC,EAAAA,UAAU,EAAE;AACR9H,IAAAA,IAAI,EAAE;AACF+H,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD/H,IAAAA,IAAI,EAAE;AACF8H,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDpI,IAAAA,QAAQ,EAAE;AACNkI,MAAAA,GAAG,EAAEG,WAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDxI,IAAAA,OAAO,EAAE;AACLoI,MAAAA,GAAG,EAAEK,WAAU;AACfD,MAAAA,KAAK,EAAE,IAAA;KACV;AACD/H,IAAAA,MAAM,EAAE;AACJ2H,MAAAA,GAAG,EAAEM,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrI,IAAAA,IAAI,EAAE,OAAO;AACbD,IAAAA,IAAI,EAAE,IAAA;AACV,GAAA;AACJ;;;;;"}
package/cjs/index.css CHANGED
@@ -329,31 +329,21 @@
329
329
 
330
330
  .base_74wj10_b1bb2stb__3b76a172.base_74wj10_segmentStretched__3b76a172{width:100%;}.base_74wj10_b1bb2stb__3b76a172.base_74wj10_segmentStretched__3b76a172 .base_74wj10_spuzt9m__3b76a172,.base_74wj10_b1bb2stb__3b76a172.base_74wj10_segmentStretched__3b76a172 .base_74wj10_sin9wo2__3b76a172,.base_74wj10_b1bb2stb__3b76a172.base_74wj10_segmentStretched__3b76a172 .base_74wj10_sin9wo2__3b76a172 > button{width:100%;}
331
331
 
332
- .base_11agnr_bg914h8__2b2e1bdf.base_11agnr_segmentVertical__2b2e1bdf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;max-height:var(--plasma-segment-group-vertical-height);}.base_11agnr_bg914h8__2b2e1bdf.base_11agnr_segmentVertical__2b2e1bdf .base_11agnr_spuzt9m__2b2e1bdf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.base_11agnr_bg914h8__2b2e1bdf.base_11agnr_segmentVertical__2b2e1bdf .base_11agnr_sin9wo2__2b2e1bdf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
333
-
334
- .SegmentGroup_styles_1rr47x4_b2sori2__31ddf97a{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
335
- .SegmentGroup_styles_1rr47x4_sin9wo2__31ddf97a{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
336
- .SegmentGroup_styles_1rr47x4_spuzt9m__31ddf97a{margin:-0.125rem;padding:0.125rem;box-sizing:content-box;position:relative;height:100%;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.SegmentGroup_styles_1rr47x4_spuzt9m__31ddf97a.SegmentGroup_styles_1rr47x4_segmentGroupClipScroll__31ddf97a{overflow:scroll;-webkit-scroll-padding:0.25rem;-moz-scroll-padding:0.25rem;-ms-scroll-padding:0.25rem;scroll-padding:0.25rem;overscroll-behavior:contain;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;}.SegmentGroup_styles_1rr47x4_spuzt9m__31ddf97a.SegmentGroup_styles_1rr47x4_segmentGroupClipScroll__31ddf97a::-webkit-scrollbar{display:none;}.SegmentGroup_styles_1rr47x4_spuzt9m__31ddf97a.SegmentGroup_styles_1rr47x4_segmentGroupClipShowAll__31ddf97a{overflow:visible;}
337
- .SegmentGroup_styles_1rr47x4_s1qf4oye__31ddf97a{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;border:none;background-color:transparent;outline:none;position:relative;}.SegmentGroup_styles_1rr47x4_s1qf4oye__31ddf97a::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma_private-outline-radius) - 0.063rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.SegmentGroup_styles_1rr47x4_s1qf4oye__31ddf97a.SegmentGroup_styles_1rr47x4_focusVisible__31ddf97a:focus::before,.SegmentGroup_styles_1rr47x4_s1qf4oye__31ddf97a[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-segment-outline-focus-color);}.SegmentGroup_styles_1rr47x4_s1qf4oye__31ddf97a[disabled]{cursor:not-allowed;}
338
- .SegmentGroup_styles_1rr47x4_s3pgccr__31ddf97a.SegmentGroup_styles_1rr47x4_s1qf4oye__31ddf97a{padding:var(--plasma-segment-group-arrow-padding);padding-right:0;margin-right:0.1875rem;}
339
- .SegmentGroup_styles_1rr47x4_sax6mvm__31ddf97a.SegmentGroup_styles_1rr47x4_s1qf4oye__31ddf97a{padding:var(--plasma-segment-group-arrow-padding);padding-left:0;margin-left:0.1875rem;}
340
- .SegmentGroup_styles_1rr47x4_s1n81rr8__31ddf97a.SegmentGroup_styles_1rr47x4_s1qf4oye__31ddf97a{padding:var(--plasma-segment-group-vertical-arrow-padding);padding-bottom:0;margin-bottom:0.1875rem;}
341
- .SegmentGroup_styles_1rr47x4_s7ukuvj__31ddf97a.SegmentGroup_styles_1rr47x4_s1qf4oye__31ddf97a{padding:var(--plasma-segment-group-vertical-arrow-padding);padding-top:0;margin-top:0.1875rem;}
332
+ .SegmentGroup_styles_m9i9p0_b2sori2__a29c0677{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
333
+ .SegmentGroup_styles_m9i9p0_sin9wo2__a29c0677{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
334
+ .SegmentGroup_styles_m9i9p0_spuzt9m__a29c0677{position:relative;height:100%;margin:0;padding:0.25rem;overflow-x:auto;overflow-y:hidden;-webkit-scroll-behavior:smooth;-moz-scroll-behavior:smooth;-ms-scroll-behavior:smooth;scroll-behavior:smooth;-webkit-scroll-snap-type:x mandatory;-moz-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;}.SegmentGroup_styles_m9i9p0_spuzt9m__a29c0677::-webkit-scrollbar{display:none;}
335
+ .SegmentGroup_styles_m9i9p0_s1qf4oye__a29c0677{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;border:none;background-color:transparent;padding:0;outline:none;position:relative;}.SegmentGroup_styles_m9i9p0_s1qf4oye__a29c0677::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma_private-outline-radius) - 0.063rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.SegmentGroup_styles_m9i9p0_s1qf4oye__a29c0677.SegmentGroup_styles_m9i9p0_focusVisible__a29c0677:focus::before,.SegmentGroup_styles_m9i9p0_s1qf4oye__a29c0677[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-segment-outline-focus-color);}.SegmentGroup_styles_m9i9p0_s1qf4oye__a29c0677[disabled]{cursor:not-allowed;}
342
336
 
343
337
  .base_7kjuok_b1kyapt7__5060a19f{font-family:var(--plasma-segment-item-font-family);font-size:var(--plasma-segment-item-font-size);font-style:var(--plasma-segment-item-font-style);font-weight:var(--plasma-segment-item-font-weight);-webkit-letter-spacing:var(--plasma-segment-item-letter-spacing);-moz-letter-spacing:var(--plasma-segment-item-letter-spacing);-ms-letter-spacing:var(--plasma-segment-item-letter-spacing);letter-spacing:var(--plasma-segment-item-letter-spacing);line-height:var(--plasma-segment-item-lineheight);--plasma_private-outline-radius:var(--plasma-segment-item-border-radius);border-radius:var(--plasma-segment-item-border-radius);width:var(--plasma-segment-item-width);height:var(--plasma-segment-item-height);padding:var(--plasma-segment-item-padding);}
344
338
 
345
- .base_168a47w_b1tykljf__d270d938{color:var(--plasma-segment-item-color);background-color:var(--plasma-segment-item-background-color);}.base_168a47w_b1tykljf__d270d938:hover{color:var(--plasma-segment-item-color-hover);background-color:var(--plasma-segment-item-background-color-hover);}.base_168a47w_b1tykljf__d270d938:hover .base_168a47w_rgzn5ju__d270d938{color:var(--plasma-segment-item-additional-color-hover);}.base_168a47w_b1tykljf__d270d938.base_168a47w_selectedSegmentItem__d270d938{color:var(--plasma-segment-item-selected-color);background-color:var(--plasma-segment-item-selected-background-color);}.base_168a47w_b1tykljf__d270d938.base_168a47w_selectedSegmentItem__d270d938 .base_168a47w_rgzn5ju__d270d938{color:var(--plasma-segment-item-selected-additional-color);}.base_168a47w_b1tykljf__d270d938.base_168a47w_selectedSegmentItem__d270d938:hover{color:var(--plasma-segment-item-selected-color-hover);background-color:var(--plasma-segment-item-selected-background-color-hover);}.base_168a47w_b1tykljf__d270d938.base_168a47w_selectedSegmentItem__d270d938:hover .base_168a47w_rgzn5ju__d270d938{color:var(--plasma-segment-item-selected-additional-color-hover);}
339
+ .base_1m1u2ys_b1tykljf__1c5eb012{color:var(--plasma-segment-item-color);background-color:var(--plasma-segment-item-background-color);}.base_1m1u2ys_b1tykljf__1c5eb012:hover{color:var(--plasma-segment-item-color-hover);background-color:var(--plasma-segment-item-background-color-hover);}.base_1m1u2ys_b1tykljf__1c5eb012.base_1m1u2ys_selectedSegmentItem__1c5eb012{color:var(--plasma-segment-item-selected-color);background-color:var(--plasma-segment-item-selected-background-color);}.base_1m1u2ys_b1tykljf__1c5eb012.base_1m1u2ys_selectedSegmentItem__1c5eb012:hover{color:var(--plasma-segment-item-selected-color-hover);background-color:var(--plasma-segment-item-selected-background-color-hover);}
346
340
 
347
341
  .base_y6af8r_bwprat9__353907e1[disabled]{cursor:not-allowed;}.base_y6af8r_bwprat9__353907e1[disabled]:hover{color:var(--plasma-segment-item-color);background-color:var(--plasma-segment-item-background-color);}.base_y6af8r_bwprat9__353907e1[disabled].base_y6af8r_selectedSegmentItem__353907e1:hover{color:var(--plasma-segment-item-selected-color);background-color:var(--plasma-segment-item-selected-background-color);}
348
342
 
349
343
  .base_15s0fel_b795lc7__4501241a.base_15s0fel_segmentPilled__4501241a{--plasma_private-outline-radius:var(--plasma-segment-item-pilled-border-radius);border-radius:var(--plasma-segment-item-pilled-border-radius);}
350
344
 
351
- .SegmentItem_styles_f1jpip_bxcdyja__cfc991ac{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;outline:none;cursor:pointer;margin-left:var(--plasma-segment-item-margin-left);-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;}.SegmentItem_styles_f1jpip_bxcdyja__cfc991ac:first-child{margin-left:0;}.SegmentItem_styles_f1jpip_bxcdyja__cfc991ac::before{content:'';position:absolute;top:0.063rem;left:0.063rem;right:0.063rem;bottom:0.063rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma_private-outline-radius) + 0.063rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.SegmentItem_styles_f1jpip_bxcdyja__cfc991ac.SegmentItem_styles_f1jpip_focusVisible__cfc991ac:focus::before,.SegmentItem_styles_f1jpip_bxcdyja__cfc991ac[data-focus-visible-added]::before{z-index:1;outline:none;box-shadow:0 0 0 0.063rem var(--plasma-segment-outline-focus-color);}
352
- .SegmentItem_styles_f1jpip_sxjfe87__cfc991ac{margin-right:var(--plasma-segment-item-content-icon-margin);}
353
- .SegmentItem_styles_f1jpip_s1gg7fed__cfc991ac{margin-left:var(--plasma-segment-item-content-icon-margin);}
354
- .SegmentItem_styles_f1jpip_sctm1j9__cfc991ac{display:inline-block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:var(--plasma-segment-item-content-padding);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:var(--sctm1j9-0);margin-left:var(--sctm1j9-1);}
355
- .SegmentItem_styles_f1jpip_rgzn5ju__cfc991ac{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-segment-item-content-icon-margin);color:var(--plasma-segment-item-additional-color);}
356
- .SegmentItem_styles_f1jpip_l1sp2ipp__cfc991ac{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:var(--plasma-segment-item-content-icon-margin);color:inherit;}
345
+ .SegmentItem_styles_18h1p52_bxcdyja__b7ac762c{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;box-sizing:border-box;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;outline:none;cursor:pointer;margin-left:var(--plasma-segment-item-margin-left);-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;}.SegmentItem_styles_18h1p52_bxcdyja__b7ac762c:first-child{margin-left:0;}.SegmentItem_styles_18h1p52_bxcdyja__b7ac762c::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma_private-outline-radius) + 0.063rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.SegmentItem_styles_18h1p52_bxcdyja__b7ac762c.SegmentItem_styles_18h1p52_focusVisible__b7ac762c:focus::before,.SegmentItem_styles_18h1p52_bxcdyja__b7ac762c[data-focus-visible-added]::before{z-index:1;outline:none;box-shadow:0 0 0 0.063rem var(--plasma-segment-outline-focus-color);}
346
+ .SegmentItem_styles_18h1p52_sxjfe87__b7ac762c{display:inline-block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
357
347
 
358
348
  .base_1wf7n5i_b1x66a6y__80fc5ddb{height:var(--plasma-skeleton-line-height);}.base_1wf7n5i_b1x66a6y__80fc5ddb .base_1wf7n5i_sn3du7u__80fc5ddb{height:var(--plasma-skeleton-visible-line-height);}
359
349
 
@@ -6,6 +6,7 @@ var dayjs = require('dayjs');
6
6
  var customParseFormat = require('dayjs/plugin/customParseFormat');
7
7
  var quarterOfYear = require('dayjs/plugin/quarterOfYear');
8
8
  var advancedFormat = require('dayjs/plugin/advancedFormat');
9
+ require('dayjs/locale/ru');
9
10
 
10
11
  dayjs.extend(customParseFormat);
11
12
  dayjs.extend(quarterOfYear);
@@ -1 +1 @@
1
- {"version":3,"file":"datejs.js","sources":["../../src/utils/datejs.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport quarterOfYear from 'dayjs/plugin/quarterOfYear';\nimport advancedFormat from 'dayjs/plugin/advancedFormat';\n\ndayjs.extend(customParseFormat);\ndayjs.extend(quarterOfYear);\ndayjs.extend(advancedFormat);\n\nexport const customDayjs = dayjs;\n"],"names":["dayjs","extend","customParseFormat","quarterOfYear","advancedFormat","customDayjs"],"mappings":";;;;;;;;;AAKAA,KAAK,CAACC,MAAM,CAACC,iBAAiB,CAAC,CAAA;AAC/BF,KAAK,CAACC,MAAM,CAACE,aAAa,CAAC,CAAA;AAC3BH,KAAK,CAACC,MAAM,CAACG,cAAc,CAAC,CAAA;AAErB,IAAMC,WAAW,GAAGL;;;;"}
1
+ {"version":3,"file":"datejs.js","sources":["../../src/utils/datejs.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport quarterOfYear from 'dayjs/plugin/quarterOfYear';\nimport advancedFormat from 'dayjs/plugin/advancedFormat';\n\nimport 'dayjs/locale/ru';\n\ndayjs.extend(customParseFormat);\ndayjs.extend(quarterOfYear);\ndayjs.extend(advancedFormat);\n\nexport const customDayjs = dayjs;\n"],"names":["dayjs","extend","customParseFormat","quarterOfYear","advancedFormat","customDayjs"],"mappings":";;;;;;;;;;AAOAA,KAAK,CAACC,MAAM,CAACC,iBAAiB,CAAC,CAAA;AAC/BF,KAAK,CAACC,MAAM,CAACE,aAAa,CAAC,CAAA;AAC3BH,KAAK,CAACC,MAAM,CAACG,cAAc,CAAC,CAAA;AAErB,IAAMC,WAAW,GAAGL;;;;"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.datePickerRangeRoot = exports.datePickerRangeConfig = void 0;
8
8
  var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
9
+ var _hooks = /*#__PURE__*/require("../../../hooks");
9
10
  var _utils = /*#__PURE__*/require("../../../utils");
10
11
  var _dateHelper = /*#__PURE__*/require("../utils/dateHelper");
11
12
  var _useDatePicker3 = /*#__PURE__*/require("../hooks/useDatePicker");
@@ -17,7 +18,7 @@ var _base3 = /*#__PURE__*/require("./variations/_disabled/base");
17
18
  var _base4 = /*#__PURE__*/require("./variations/_readonly/base");
18
19
  var _RangeDate = /*#__PURE__*/require("./RangeDate.styles");
19
20
  var _RangeDatePopover = /*#__PURE__*/require("./RangeDatePopover/RangeDatePopover");
20
- var _excluded = ["className", "isDoubleCalendar", "opened", "label", "leftHelper", "contentLeft", "contentRight", "view", "size", "readOnly", "disabled", "dividerVariant", "dividerIcon", "defaultFirstDate", "defaultSecondDate", "firstValueError", "secondValueError", "firstValueSuccess", "secondValueSuccess", "firstPlaceholder", "secondPlaceholder", "firstTextfieldContentLeft", "firstTextfieldContentRight", "secondTextfieldContentLeft", "secondTextfieldContentRight", "firstTextfieldTextBefore", "secondTextfieldTextBefore", "firstTextfieldTextAfter", "secondTextfieldTextAfter", "format", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "type", "placement", "closeOnOverlayClick", "closeOnEsc", "offset", "onToggle", "onChangeFirstValue", "onChangeSecondValue", "onCommitFirstDate", "onCommitSecondDate", "onFocusFirstTextfield", "onFocusSecondTextfield", "onBlurFirstTextfield", "onBlurSecondTextfield"];
21
+ var _excluded = ["className", "isDoubleCalendar", "opened", "label", "leftHelper", "contentLeft", "contentRight", "view", "size", "readOnly", "disabled", "dividerVariant", "dividerIcon", "defaultFirstDate", "defaultSecondDate", "firstValueError", "secondValueError", "firstValueSuccess", "secondValueSuccess", "firstPlaceholder", "secondPlaceholder", "firstTextfieldContentLeft", "firstTextfieldContentRight", "secondTextfieldContentLeft", "secondTextfieldContentRight", "firstTextfieldTextBefore", "secondTextfieldTextBefore", "firstTextfieldTextAfter", "secondTextfieldTextAfter", "format", "lang", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "type", "placement", "closeOnOverlayClick", "closeOnEsc", "offset", "onToggle", "onChangeFirstValue", "onChangeSecondValue", "onCommitFirstDate", "onCommitSecondDate", "onFocusFirstTextfield", "onFocusSecondTextfield", "onBlurFirstTextfield", "onBlurSecondTextfield"];
21
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
23
24
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -70,6 +71,8 @@ var datePickerRangeRoot = exports.datePickerRangeRoot = function datePickerRange
70
71
  secondTextfieldTextAfter = _ref.secondTextfieldTextAfter,
71
72
  _ref$format = _ref.format,
72
73
  format = _ref$format === void 0 ? 'DD.MM.YYYY' : _ref$format,
74
+ _ref$lang = _ref.lang,
75
+ lang = _ref$lang === void 0 ? 'ru' : _ref$lang,
73
76
  maskWithFormat = _ref.maskWithFormat,
74
77
  min = _ref.min,
75
78
  max = _ref.max,
@@ -142,6 +145,7 @@ var datePickerRangeRoot = exports.datePickerRangeRoot = function datePickerRange
142
145
  setIsInnerOpen: setIsInnerOpen,
143
146
  dateFormatDelimiter: dateFormatDelimiter,
144
147
  format: format,
148
+ lang: lang,
145
149
  disabled: disabled,
146
150
  readOnly: readOnly,
147
151
  maskWithFormat: maskWithFormat,
@@ -160,6 +164,7 @@ var datePickerRangeRoot = exports.datePickerRangeRoot = function datePickerRange
160
164
  setIsInnerOpen: setIsInnerOpen,
161
165
  dateFormatDelimiter: dateFormatDelimiter,
162
166
  format: format,
167
+ lang: lang,
163
168
  disabled: disabled,
164
169
  readOnly: readOnly,
165
170
  maskWithFormat: maskWithFormat,
@@ -251,6 +256,12 @@ var datePickerRangeRoot = exports.datePickerRangeRoot = function datePickerRange
251
256
  setCalendarSecondValue((0, _dateHelper.formatCalendarValue)(defaultSecondDate, format));
252
257
  setInputSecondValue((0, _dateHelper.formatInputValue)(defaultSecondDate, format));
253
258
  }, [defaultSecondDate]);
259
+ (0, _hooks.useDidMountEffect)(function () {
260
+ setCalendarFirstValue((0, _dateHelper.formatCalendarValue)(defaultFirstDate, format, lang));
261
+ setInputFirstValue((0, _dateHelper.formatInputValue)(defaultFirstDate, format, lang));
262
+ setCalendarSecondValue((0, _dateHelper.formatCalendarValue)(defaultSecondDate, format, lang));
263
+ setInputSecondValue((0, _dateHelper.formatInputValue)(defaultSecondDate, format, lang));
264
+ }, [format, lang]);
254
265
  return /*#__PURE__*/_react["default"].createElement(Root, _extends({
255
266
  ref: rootRef,
256
267
  view: view,
@@ -12,12 +12,13 @@ var _useDatePicker2 = /*#__PURE__*/require("../hooks/useDatePicker");
12
12
  var _DatePicker = /*#__PURE__*/require("../DatePicker.tokens");
13
13
  var _DatePickerBase = /*#__PURE__*/require("../DatePickerBase.styles");
14
14
  var _useKeyboardNavigation = /*#__PURE__*/require("../hooks/useKeyboardNavigation");
15
+ var _hooks = /*#__PURE__*/require("../../../hooks");
15
16
  var _base = /*#__PURE__*/require("./variations/_size/base");
16
17
  var _base2 = /*#__PURE__*/require("./variations/_view/base");
17
18
  var _base3 = /*#__PURE__*/require("./variations/_disabled/base");
18
19
  var _base4 = /*#__PURE__*/require("./variations/_readonly/base");
19
20
  var _SingleDate = /*#__PURE__*/require("./SingleDate.styles");
20
- var _excluded = ["className", "opened", "label", "labelPlacement", "placeholder", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "view", "size", "readOnly", "disabled", "defaultDate", "valueError", "valueSuccess", "format", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "type", "placement", "closeOnOverlayClick", "offset", "onChangeValue", "onCommitDate", "onToggle", "onFocus", "onBlur"];
21
+ var _excluded = ["className", "opened", "label", "labelPlacement", "placeholder", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "view", "size", "readOnly", "disabled", "defaultDate", "valueError", "valueSuccess", "format", "lang", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "type", "placement", "closeOnOverlayClick", "offset", "onChangeValue", "onCommitDate", "onToggle", "onFocus", "onBlur"];
21
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
23
24
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -55,6 +56,8 @@ var datePickerRoot = exports.datePickerRoot = function datePickerRoot(Root) {
55
56
  valueSuccess = _ref.valueSuccess,
56
57
  _ref$format = _ref.format,
57
58
  format = _ref$format === void 0 ? 'DD.MM.YYYY' : _ref$format,
59
+ _ref$lang = _ref.lang,
60
+ lang = _ref$lang === void 0 ? 'ru' : _ref$lang,
58
61
  maskWithFormat = _ref.maskWithFormat,
59
62
  min = _ref.min,
60
63
  max = _ref.max,
@@ -86,11 +89,11 @@ var datePickerRoot = exports.datePickerRoot = function datePickerRoot(Root) {
86
89
  _useState2 = _slicedToArray(_useState, 2),
87
90
  isInnerOpen = _useState2[0],
88
91
  setIsInnerOpen = _useState2[1];
89
- var _useState3 = (0, _react.useState)((0, _dateHelper.formatCalendarValue)(defaultDate, format)),
92
+ var _useState3 = (0, _react.useState)((0, _dateHelper.formatCalendarValue)(defaultDate, format, lang)),
90
93
  _useState4 = _slicedToArray(_useState3, 2),
91
94
  calendarValue = _useState4[0],
92
95
  setCalendarValue = _useState4[1];
93
- var _useState5 = (0, _react.useState)((0, _dateHelper.formatInputValue)(defaultDate, format)),
96
+ var _useState5 = (0, _react.useState)((0, _dateHelper.formatInputValue)(defaultDate, format, lang)),
94
97
  _useState6 = _slicedToArray(_useState5, 2),
95
98
  inputValue = _useState6[0],
96
99
  setInputValue = _useState6[1];
@@ -105,6 +108,7 @@ var datePickerRoot = exports.datePickerRoot = function datePickerRoot(Root) {
105
108
  setIsInnerOpen: setIsInnerOpen,
106
109
  dateFormatDelimiter: dateFormatDelimiter,
107
110
  format: format,
111
+ lang: lang,
108
112
  disabled: disabled,
109
113
  readOnly: readOnly,
110
114
  maskWithFormat: maskWithFormat,
@@ -155,8 +159,12 @@ var datePickerRoot = exports.datePickerRoot = function datePickerRoot(Root) {
155
159
  }, [opened]);
156
160
  (0, _react.useEffect)(function () {
157
161
  setCalendarValue((0, _dateHelper.formatCalendarValue)(defaultDate, format));
158
- setInputValue((0, _dateHelper.formatInputValue)(defaultDate, format));
162
+ setInputValue((0, _dateHelper.formatInputValue)(defaultDate, format, lang));
159
163
  }, [defaultDate]);
164
+ (0, _hooks.useDidMountEffect)(function () {
165
+ setCalendarValue((0, _dateHelper.formatCalendarValue)(defaultDate, format, lang));
166
+ setInputValue((0, _dateHelper.formatInputValue)(defaultDate, format, lang));
167
+ }, [format, lang]);
160
168
  return /*#__PURE__*/_react["default"].createElement(Root, _extends({
161
169
  view: view,
162
170
  size: size,
@@ -13,6 +13,8 @@ var useDatePicker = exports.useDatePicker = function useDatePicker(_ref) {
13
13
  setIsInnerOpen = _ref.setIsInnerOpen,
14
14
  dateFormatDelimiter = _ref.dateFormatDelimiter,
15
15
  format = _ref.format,
16
+ _ref$lang = _ref.lang,
17
+ lang = _ref$lang === void 0 ? 'ru' : _ref$lang,
16
18
  disabled = _ref.disabled,
17
19
  readOnly = _ref.readOnly,
18
20
  maskWithFormat = _ref.maskWithFormat,
@@ -45,7 +47,7 @@ var useDatePicker = exports.useDatePicker = function useDatePicker(_ref) {
45
47
  } else if ((newValue === null || newValue === void 0 ? void 0 : newValue.length) === format.length) {
46
48
  setCalendarValue((0, _dateHelper.formatCalendarValue)(newValue, format));
47
49
  }
48
- setInputValue((0, _dateHelper.formatInputValue)(newValue, format));
50
+ setInputValue((0, _dateHelper.formatInputValue)(newValue, format, lang));
49
51
  onChangeValue === null || onChangeValue === void 0 || onChangeValue(event, newValue);
50
52
  };
51
53
  var handleCommitDate = function handleCommitDate(date, applyFormat, isCalendarValue, dateInfo) {
@@ -58,8 +60,8 @@ var useDatePicker = exports.useDatePicker = function useDatePicker(_ref) {
58
60
  return onCommitDate === null || onCommitDate === void 0 ? void 0 : onCommitDate('', false, true);
59
61
  }
60
62
  if (isCalendarValue) {
61
- setCalendarValue((0, _dateHelper.formatCalendarValue)(date, format));
62
- setInputValue((0, _dateHelper.formatInputValue)(date, format));
63
+ setCalendarValue((0, _dateHelper.formatCalendarValue)(date, format, lang));
64
+ setInputValue((0, _dateHelper.formatInputValue)(date, format, lang));
63
65
  return onCommitDate === null || onCommitDate === void 0 ? void 0 : onCommitDate(date, false, true, dateInfo);
64
66
  }
65
67
  var formatString = applyFormat ? format : undefined;
@@ -67,8 +69,8 @@ var useDatePicker = exports.useDatePicker = function useDatePicker(_ref) {
67
69
  newDate = _getDateFromFormat.value,
68
70
  isError = _getDateFromFormat.isError,
69
71
  isSuccess = _getDateFromFormat.isSuccess;
70
- setCalendarValue((0, _dateHelper.formatCalendarValue)(newDate, format));
71
- setInputValue((0, _dateHelper.formatInputValue)(newDate, format));
72
+ setCalendarValue((0, _dateHelper.formatCalendarValue)(newDate, format, lang));
73
+ setInputValue((0, _dateHelper.formatInputValue)(newDate, format, lang));
72
74
  onCommitDate === null || onCommitDate === void 0 || onCommitDate(newDate, isError, isSuccess);
73
75
  };
74
76
  return {
@@ -5,41 +5,43 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getMaskedDateOnInput = exports.getDateFromFormat = exports.getDateFormatDelimiter = exports.formatInputValue = exports.formatCalendarValue = void 0;
7
7
  var _datejs = /*#__PURE__*/require("../../../utils/datejs");
8
- var formatInputValue = exports.formatInputValue = function formatInputValue(value, format) {
9
- if (!value) {
8
+ require("dayjs/locale/ru");
9
+ require("dayjs/locale/en");
10
+ var formatInputValue = exports.formatInputValue = function formatInputValue(value, format, lang) {
11
+ if (!value || !lang) {
10
12
  return '';
11
13
  }
12
14
  if (format && (0, _datejs.customDayjs)(value, format, true).isValid()) {
13
- return (0, _datejs.customDayjs)(value, format).format(format);
15
+ return (0, _datejs.customDayjs)(value, format).locale(lang).format(format);
14
16
  }
15
17
  if (format && String(value).length >= 10 && String(new Date(value)) !== 'Invalid Date') {
16
- return (0, _datejs.customDayjs)(value).format(format);
18
+ return (0, _datejs.customDayjs)(value).locale(lang).format(format);
17
19
  }
18
20
  return String(value);
19
21
  };
20
- var formatCalendarValue = exports.formatCalendarValue = function formatCalendarValue(value, format) {
21
- if (!value) {
22
+ var formatCalendarValue = exports.formatCalendarValue = function formatCalendarValue(value, format, lang) {
23
+ if (!value || !lang) {
22
24
  return undefined;
23
25
  }
24
26
  if (format && (0, _datejs.customDayjs)(value, format, true).isValid()) {
25
- return (0, _datejs.customDayjs)(value, format, true).toDate();
27
+ return (0, _datejs.customDayjs)(value, format, true).locale(lang).toDate();
26
28
  }
27
29
  if (String(new Date(value)) !== 'Invalid Date') {
28
- return (0, _datejs.customDayjs)(value).toDate();
30
+ return (0, _datejs.customDayjs)(value).locale(lang).toDate();
29
31
  }
30
32
  return undefined;
31
33
  };
32
- var getDateFromFormat = exports.getDateFromFormat = function getDateFromFormat(value, format) {
33
- if (format && (0, _datejs.customDayjs)(value, format, true).isValid()) {
34
+ var getDateFromFormat = exports.getDateFromFormat = function getDateFromFormat(value, format, lang) {
35
+ if (format && (0, _datejs.customDayjs)(value, format, true).isValid() && lang) {
34
36
  return {
35
- value: (0, _datejs.customDayjs)(value, format, true).toDate(),
37
+ value: (0, _datejs.customDayjs)(value, format, true).locale(lang).toDate(),
36
38
  isError: false,
37
39
  isSuccess: true
38
40
  };
39
41
  }
40
- if (!format && String(new Date(value)) !== 'Invalid Date') {
42
+ if (!format && String(new Date(value)) !== 'Invalid Date' && lang) {
41
43
  return {
42
- value: (0, _datejs.customDayjs)(value).toDate(),
44
+ value: (0, _datejs.customDayjs)(value).locale(lang).toDate(),
43
45
  isError: false,
44
46
  isSuccess: true
45
47
  };