@salutejs/plasma-new-hope 0.146.0-canary.1436.10882554984.0 → 0.147.0-canary.1437.10886798256.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. package/cjs/components/Attach/Attach.css +45 -0
  2. package/cjs/components/Attach/Attach.js +174 -0
  3. package/cjs/components/Attach/Attach.js.map +1 -0
  4. package/cjs/components/Attach/Attach.styles.js +23 -0
  5. package/cjs/components/Attach/Attach.styles.js.map +1 -0
  6. package/cjs/components/Attach/Attach.styles_17fejif.css +3 -0
  7. package/cjs/components/Attach/Attach.tokens.js +83 -0
  8. package/cjs/components/Attach/Attach.tokens.js.map +1 -0
  9. package/cjs/components/Attach/ui/Button/Button.styles.js +23 -0
  10. package/cjs/components/Attach/ui/Button/Button.styles.js.map +1 -0
  11. package/cjs/components/Attach/ui/Button/Button.styles_oi6jxf.css +1 -0
  12. package/cjs/components/Attach/ui/Cell/Cell.styles.js +25 -0
  13. package/cjs/components/Attach/ui/Cell/Cell.styles.js.map +1 -0
  14. package/cjs/components/Attach/ui/Cell/Cell.styles_1dlvsak.css +1 -0
  15. package/cjs/components/Attach/ui/iconButton/IconButton.styles.js +23 -0
  16. package/cjs/components/Attach/ui/iconButton/IconButton.styles.js.map +1 -0
  17. package/cjs/components/Attach/ui/iconButton/IconButton.styles_14dty7n.css +1 -0
  18. package/cjs/components/Attach/utils/extractExtension.js +10 -0
  19. package/cjs/components/Attach/utils/extractExtension.js.map +1 -0
  20. package/cjs/components/Attach/utils/getFileicon.js +27 -0
  21. package/cjs/components/Attach/utils/getFileicon.js.map +1 -0
  22. package/cjs/components/Attach/utils/truncateFilename.js +16 -0
  23. package/cjs/components/Attach/utils/truncateFilename.js.map +1 -0
  24. package/cjs/components/Attach/variations/_size/base.js +9 -0
  25. package/cjs/components/Attach/variations/_size/base.js.map +1 -0
  26. package/cjs/components/Attach/variations/_size/base_eax0b8.css +1 -0
  27. package/cjs/components/Attach/variations/_view/base.js +9 -0
  28. package/cjs/components/Attach/variations/_view/base.js.map +1 -0
  29. package/cjs/components/Attach/variations/_view/base_1nvsg1b.css +1 -0
  30. package/cjs/components/Cell/Cell.js +3 -2
  31. package/cjs/components/Cell/Cell.js.map +1 -1
  32. package/cjs/index.css +14 -0
  33. package/cjs/index.js +5 -0
  34. package/cjs/index.js.map +1 -1
  35. package/emotion/cjs/components/Attach/Attach.js +180 -0
  36. package/emotion/cjs/components/Attach/Attach.styles.js +36 -0
  37. package/emotion/cjs/components/Attach/Attach.tokens.js +81 -0
  38. package/emotion/cjs/components/Attach/Attach.types.js +5 -0
  39. package/emotion/cjs/components/Attach/index.js +25 -0
  40. package/emotion/cjs/components/Attach/ui/Button/Button.js +12 -0
  41. package/emotion/cjs/components/Attach/ui/Button/Button.styles.js +17 -0
  42. package/emotion/cjs/components/Attach/ui/Cell/Cell.js +12 -0
  43. package/emotion/cjs/components/Attach/ui/Cell/Cell.styles.js +17 -0
  44. package/emotion/cjs/components/Attach/ui/iconButton/IconButton.js +12 -0
  45. package/emotion/cjs/components/Attach/ui/iconButton/IconButton.styles.js +17 -0
  46. package/emotion/cjs/components/Attach/utils/extractExtension.js +9 -0
  47. package/emotion/cjs/components/Attach/utils/getFileicon.js +26 -0
  48. package/emotion/cjs/components/Attach/utils/index.js +26 -0
  49. package/emotion/cjs/components/Attach/utils/truncateFilename.js +15 -0
  50. package/emotion/cjs/components/Attach/variations/_size/base.js +9 -0
  51. package/emotion/cjs/components/Attach/variations/_view/base.js +9 -0
  52. package/emotion/cjs/components/Cell/Cell.js +3 -2
  53. package/emotion/cjs/examples/plasma_b2c/components/Attach/Attach.config.js +25 -0
  54. package/emotion/cjs/examples/plasma_b2c/components/Attach/Attach.js +11 -0
  55. package/emotion/cjs/examples/plasma_b2c/components/Attach/Attach.stories.tsx +61 -0
  56. package/emotion/cjs/examples/plasma_web/components/Attach/Attach.config.js +25 -0
  57. package/emotion/cjs/examples/plasma_web/components/Attach/Attach.js +11 -0
  58. package/emotion/cjs/examples/plasma_web/components/Attach/Attach.stories.tsx +61 -0
  59. package/emotion/cjs/index.js +11 -0
  60. package/emotion/es/components/Attach/Attach.js +171 -0
  61. package/emotion/es/components/Attach/Attach.styles.js +29 -0
  62. package/emotion/es/components/Attach/Attach.tokens.js +75 -0
  63. package/emotion/es/components/Attach/Attach.types.js +1 -0
  64. package/emotion/es/components/Attach/index.js +2 -0
  65. package/emotion/es/components/Attach/ui/Button/Button.js +1 -0
  66. package/emotion/es/components/Attach/ui/Button/Button.styles.js +10 -0
  67. package/emotion/es/components/Attach/ui/Cell/Cell.js +1 -0
  68. package/emotion/es/components/Attach/ui/Cell/Cell.styles.js +10 -0
  69. package/emotion/es/components/Attach/ui/iconButton/IconButton.js +1 -0
  70. package/emotion/es/components/Attach/ui/iconButton/IconButton.styles.js +10 -0
  71. package/emotion/es/components/Attach/utils/extractExtension.js +3 -0
  72. package/emotion/es/components/Attach/utils/getFileicon.js +19 -0
  73. package/emotion/es/components/Attach/utils/index.js +3 -0
  74. package/emotion/es/components/Attach/utils/truncateFilename.js +9 -0
  75. package/emotion/es/components/Attach/variations/_size/base.js +3 -0
  76. package/emotion/es/components/Attach/variations/_view/base.js +3 -0
  77. package/emotion/es/components/Cell/Cell.js +3 -2
  78. package/emotion/es/examples/plasma_b2c/components/Attach/Attach.config.js +19 -0
  79. package/emotion/es/examples/plasma_b2c/components/Attach/Attach.js +5 -0
  80. package/emotion/es/examples/plasma_b2c/components/Attach/Attach.stories.tsx +61 -0
  81. package/emotion/es/examples/plasma_web/components/Attach/Attach.config.js +19 -0
  82. package/emotion/es/examples/plasma_web/components/Attach/Attach.js +5 -0
  83. package/emotion/es/examples/plasma_web/components/Attach/Attach.stories.tsx +61 -0
  84. package/emotion/es/index.js +2 -1
  85. package/es/components/Attach/Attach.css +45 -0
  86. package/es/components/Attach/Attach.js +169 -0
  87. package/es/components/Attach/Attach.js.map +1 -0
  88. package/es/components/Attach/Attach.styles.js +17 -0
  89. package/es/components/Attach/Attach.styles.js.map +1 -0
  90. package/es/components/Attach/Attach.styles_17fejif.css +3 -0
  91. package/es/components/Attach/Attach.tokens.js +78 -0
  92. package/es/components/Attach/Attach.tokens.js.map +1 -0
  93. package/es/components/Attach/ui/Button/Button.styles.js +19 -0
  94. package/es/components/Attach/ui/Button/Button.styles.js.map +1 -0
  95. package/es/components/Attach/ui/Button/Button.styles_oi6jxf.css +1 -0
  96. package/es/components/Attach/ui/Cell/Cell.styles.js +21 -0
  97. package/es/components/Attach/ui/Cell/Cell.styles.js.map +1 -0
  98. package/es/components/Attach/ui/Cell/Cell.styles_1dlvsak.css +1 -0
  99. package/es/components/Attach/ui/iconButton/IconButton.styles.js +19 -0
  100. package/es/components/Attach/ui/iconButton/IconButton.styles.js.map +1 -0
  101. package/es/components/Attach/ui/iconButton/IconButton.styles_14dty7n.css +1 -0
  102. package/es/components/Attach/utils/extractExtension.js +6 -0
  103. package/es/components/Attach/utils/extractExtension.js.map +1 -0
  104. package/es/components/Attach/utils/getFileicon.js +23 -0
  105. package/es/components/Attach/utils/getFileicon.js.map +1 -0
  106. package/es/components/Attach/utils/truncateFilename.js +12 -0
  107. package/es/components/Attach/utils/truncateFilename.js.map +1 -0
  108. package/es/components/Attach/variations/_size/base.js +5 -0
  109. package/es/components/Attach/variations/_size/base.js.map +1 -0
  110. package/es/components/Attach/variations/_size/base_eax0b8.css +1 -0
  111. package/es/components/Attach/variations/_view/base.js +5 -0
  112. package/es/components/Attach/variations/_view/base.js.map +1 -0
  113. package/es/components/Attach/variations/_view/base_1nvsg1b.css +1 -0
  114. package/es/components/Cell/Cell.js +3 -2
  115. package/es/components/Cell/Cell.js.map +1 -1
  116. package/es/index.css +14 -0
  117. package/es/index.js +2 -0
  118. package/es/index.js.map +1 -1
  119. package/package.json +3 -2
  120. package/styled-components/cjs/components/Attach/Attach.js +180 -0
  121. package/styled-components/cjs/components/Attach/Attach.styles.js +18 -0
  122. package/styled-components/cjs/components/Attach/Attach.tokens.js +81 -0
  123. package/styled-components/cjs/components/Attach/Attach.types.js +5 -0
  124. package/styled-components/cjs/components/Attach/index.js +25 -0
  125. package/styled-components/cjs/components/Attach/ui/Button/Button.js +12 -0
  126. package/styled-components/cjs/components/Attach/ui/Button/Button.styles.js +16 -0
  127. package/styled-components/cjs/components/Attach/ui/Cell/Cell.js +12 -0
  128. package/styled-components/cjs/components/Attach/ui/Cell/Cell.styles.js +16 -0
  129. package/styled-components/cjs/components/Attach/ui/iconButton/IconButton.js +12 -0
  130. package/styled-components/cjs/components/Attach/ui/iconButton/IconButton.styles.js +16 -0
  131. package/styled-components/cjs/components/Attach/utils/extractExtension.js +9 -0
  132. package/styled-components/cjs/components/Attach/utils/getFileicon.js +26 -0
  133. package/styled-components/cjs/components/Attach/utils/index.js +26 -0
  134. package/styled-components/cjs/components/Attach/utils/truncateFilename.js +15 -0
  135. package/styled-components/cjs/components/Attach/variations/_size/base.js +9 -0
  136. package/styled-components/cjs/components/Attach/variations/_view/base.js +9 -0
  137. package/styled-components/cjs/components/Cell/Cell.js +3 -2
  138. package/styled-components/cjs/examples/plasma_b2c/components/Attach/Attach.config.js +25 -0
  139. package/styled-components/cjs/examples/plasma_b2c/components/Attach/Attach.js +11 -0
  140. package/styled-components/cjs/examples/plasma_b2c/components/Attach/Attach.stories.tsx +61 -0
  141. package/styled-components/cjs/examples/plasma_web/components/Attach/Attach.config.js +25 -0
  142. package/styled-components/cjs/examples/plasma_web/components/Attach/Attach.js +11 -0
  143. package/styled-components/cjs/examples/plasma_web/components/Attach/Attach.stories.tsx +61 -0
  144. package/styled-components/cjs/index.js +11 -0
  145. package/styled-components/es/components/Attach/Attach.js +171 -0
  146. package/styled-components/es/components/Attach/Attach.styles.js +10 -0
  147. package/styled-components/es/components/Attach/Attach.tokens.js +75 -0
  148. package/styled-components/es/components/Attach/Attach.types.js +1 -0
  149. package/styled-components/es/components/Attach/index.js +2 -0
  150. package/styled-components/es/components/Attach/ui/Button/Button.js +1 -0
  151. package/styled-components/es/components/Attach/ui/Button/Button.styles.js +9 -0
  152. package/styled-components/es/components/Attach/ui/Cell/Cell.js +1 -0
  153. package/styled-components/es/components/Attach/ui/Cell/Cell.styles.js +9 -0
  154. package/styled-components/es/components/Attach/ui/iconButton/IconButton.js +1 -0
  155. package/styled-components/es/components/Attach/ui/iconButton/IconButton.styles.js +9 -0
  156. package/styled-components/es/components/Attach/utils/extractExtension.js +3 -0
  157. package/styled-components/es/components/Attach/utils/getFileicon.js +19 -0
  158. package/styled-components/es/components/Attach/utils/index.js +3 -0
  159. package/styled-components/es/components/Attach/utils/truncateFilename.js +9 -0
  160. package/styled-components/es/components/Attach/variations/_size/base.js +3 -0
  161. package/styled-components/es/components/Attach/variations/_view/base.js +3 -0
  162. package/styled-components/es/components/Cell/Cell.js +3 -2
  163. package/styled-components/es/examples/plasma_b2c/components/Attach/Attach.config.js +19 -0
  164. package/styled-components/es/examples/plasma_b2c/components/Attach/Attach.js +5 -0
  165. package/styled-components/es/examples/plasma_b2c/components/Attach/Attach.stories.tsx +61 -0
  166. package/styled-components/es/examples/plasma_web/components/Attach/Attach.config.js +19 -0
  167. package/styled-components/es/examples/plasma_web/components/Attach/Attach.js +5 -0
  168. package/styled-components/es/examples/plasma_web/components/Attach/Attach.stories.tsx +61 -0
  169. package/styled-components/es/index.js +2 -1
  170. package/types/components/Attach/Attach.d.ts +23 -0
  171. package/types/components/Attach/Attach.d.ts.map +1 -0
  172. package/types/components/Attach/Attach.styles.d.ts +5 -0
  173. package/types/components/Attach/Attach.styles.d.ts.map +1 -0
  174. package/types/components/Attach/Attach.tokens.d.ts +73 -0
  175. package/types/components/Attach/Attach.tokens.d.ts.map +1 -0
  176. package/types/components/Attach/Attach.types.d.ts +33 -0
  177. package/types/components/Attach/Attach.types.d.ts.map +1 -0
  178. package/types/components/Attach/index.d.ts +4 -0
  179. package/types/components/Attach/index.d.ts.map +1 -0
  180. package/types/components/Attach/ui/Button/Button.d.ts +2 -0
  181. package/types/components/Attach/ui/Button/Button.d.ts.map +1 -0
  182. package/types/components/Attach/ui/Button/Button.styles.d.ts +45 -0
  183. package/types/components/Attach/ui/Button/Button.styles.d.ts.map +1 -0
  184. package/types/components/Attach/ui/Cell/Cell.d.ts +2 -0
  185. package/types/components/Attach/ui/Cell/Cell.d.ts.map +1 -0
  186. package/types/components/Attach/ui/Cell/Cell.styles.d.ts +33 -0
  187. package/types/components/Attach/ui/Cell/Cell.styles.d.ts.map +1 -0
  188. package/types/components/Attach/ui/iconButton/IconButton.d.ts +2 -0
  189. package/types/components/Attach/ui/iconButton/IconButton.d.ts.map +1 -0
  190. package/types/components/Attach/ui/iconButton/IconButton.styles.d.ts +45 -0
  191. package/types/components/Attach/ui/iconButton/IconButton.styles.d.ts.map +1 -0
  192. package/types/components/Attach/utils/extractExtension.d.ts +2 -0
  193. package/types/components/Attach/utils/extractExtension.d.ts.map +1 -0
  194. package/types/components/Attach/utils/getFileicon.d.ts +3 -0
  195. package/types/components/Attach/utils/getFileicon.d.ts.map +1 -0
  196. package/types/components/Attach/utils/index.d.ts +4 -0
  197. package/types/components/Attach/utils/index.d.ts.map +1 -0
  198. package/types/components/Attach/utils/truncateFilename.d.ts +2 -0
  199. package/types/components/Attach/utils/truncateFilename.d.ts.map +1 -0
  200. package/types/components/Attach/variations/_size/base.d.ts +2 -0
  201. package/types/components/Attach/variations/_size/base.d.ts.map +1 -0
  202. package/types/components/Attach/variations/_view/base.d.ts +2 -0
  203. package/types/components/Attach/variations/_view/base.d.ts.map +1 -0
  204. package/types/components/Cell/Cell.d.ts.map +1 -1
  205. package/types/components/Cell/Cell.types.d.ts +1 -1
  206. package/types/components/Cell/Cell.types.d.ts.map +1 -1
  207. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.d.ts +2 -2
  208. package/types/examples/plasma_b2c/components/Attach/Attach.config.d.ts +18 -0
  209. package/types/examples/plasma_b2c/components/Attach/Attach.config.d.ts.map +1 -0
  210. package/types/examples/plasma_b2c/components/Attach/Attach.d.ts +13 -0
  211. package/types/examples/plasma_b2c/components/Attach/Attach.d.ts.map +1 -0
  212. package/types/examples/plasma_b2c/components/Cell/Cell.d.ts +2 -2
  213. package/types/examples/plasma_web/components/Attach/Attach.config.d.ts +18 -0
  214. package/types/examples/plasma_web/components/Attach/Attach.config.d.ts.map +1 -0
  215. package/types/examples/plasma_web/components/Attach/Attach.d.ts +13 -0
  216. package/types/examples/plasma_web/components/Attach/Attach.d.ts.map +1 -0
  217. package/types/examples/plasma_web/components/Cell/Cell.d.ts +2 -2
  218. package/types/index.d.ts +1 -0
  219. package/types/index.d.ts.map +1 -1
@@ -0,0 +1,45 @@
1
+ .base_eax0b8_b1pj1390__bf96e72c.base_eax0b8_horizontal__bf96e72c{-webkit-column-gap:var(--plasma-attach-horizontal-gap);column-gap:var(--plasma-attach-horizontal-gap);}.base_eax0b8_b1pj1390__bf96e72c.base_eax0b8_vertical__bf96e72c{row-gap:var(--plasma-attach-vertical-gap);}.base_eax0b8_b1pj1390__bf96e72c.base_eax0b8_auto__bf96e72c{row-gap:var(--plasma-attach-vertical-gap);-webkit-column-gap:var(--plasma-attach-horizontal-gap);column-gap:var(--plasma-attach-horizontal-gap);}
2
+
3
+ .base_1nvsg1b_b438e2d__83d45116.base_1nvsg1b_horizontal__83d45116{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.base_1nvsg1b_b438e2d__83d45116.base_1nvsg1b_vertical__83d45116{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.base_1nvsg1b_b438e2d__83d45116.base_1nvsg1b_auto__83d45116{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;}
4
+
5
+ .Attach_styles_17fejif_by826kf__b001d2f6{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}
6
+ .Attach_styles_17fejif_sw7vb9c__b001d2f6{display:none;}
7
+ .Attach_styles_17fejif_suojwhg__b001d2f6{position:absolute;visibility:hidden;font-family:var(--plasma-attach-cell-title-font-family);font-size:var(--plasma-attach-cell-title-font-size);font-style:var(--plasma-attach-cell-title-font-style);font-weight:var(--plasma-attach-cell-title-font-weight);-webkit-letter-spacing:var(--plasma-attach-cell-title-letter-spacing);-moz-letter-spacing:var(--plasma-attach-cell-title-letter-spacing);-ms-letter-spacing:var(--plasma-attach-cell-title-letter-spacing);letter-spacing:var(--plasma-attach-cell-title-letter-spacing);line-height:var(--plasma-attach-cell-title-line-height);}
8
+
9
+ .base_1x0spnh_b1ty39ru__fb659d61{color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.base_1x0spnh_b1ty39ru__fb659d61.base_1x0spnh_buttonLoading__fb659d61{background-color:var(--plasma-button-loading-background-color);}.base_1x0spnh_b1ty39ru__fb659d61:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.base_1x0spnh_b1ty39ru__fb659d61:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}
10
+
11
+ .base_1alzrso_be0ha5g__cdc67255{height:var(--plasma-button-height);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);-webkit-letter-spacing:var(--plasma-button-letter-spacing);-moz-letter-spacing:var(--plasma-button-letter-spacing);-ms-letter-spacing:var(--plasma-button-letter-spacing);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--plasma_private-btn-outline-size:var(--plasma-button-outline-size,0.0625rem);}
12
+
13
+ .base_1t3ywu_b169l30m__aba40ddd[disabled]{opacity:var(--plasma-button-disabled-opacity);cursor:not-allowed;}.base_1t3ywu_b169l30m__aba40ddd[disabled]:hover,.base_1t3ywu_b169l30m__aba40ddd[disabled]:active{scale:none;color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}
14
+
15
+ .base_1kq737e_b187cmzt__d829f64a{position:relative;}.base_1kq737e_b187cmzt__d829f64a:focus{outline:none;}.base_1kq737e_b187cmzt__d829f64a::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:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1kq737e_b187cmzt__d829f64a.base_1kq737e_focusVisible__d829f64a:focus::before,.base_1kq737e_b187cmzt__d829f64a[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}
16
+
17
+ .base_hy8dc_bdz31nb__bd4ad37e.base_hy8dc_buttonStretchingFixed__bd4ad37e{width:var(--plasma-button-width);}.base_hy8dc_bdz31nb__bd4ad37e.base_hy8dc_buttonStretchingFilled__bd4ad37e{width:100%;}.base_hy8dc_bdz31nb__bd4ad37e.base_hy8dc_buttonStretchingAuto__bd4ad37e{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}
18
+
19
+ .base_1gusher_b1chvyq8__76b641f5{color:var(--plasma-spinner-color);}
20
+
21
+ .base_ova69f_bw56nfh__55225c7f{width:var(--plasma-spinner-size);height:var(--plasma-spinner-size);}
22
+
23
+ .Spinner_styles_13q7ndk_b1hp2dsz__af962114{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;box-sizing:border-box;}
24
+ .Spinner_styles_13q7ndk_s122r4cn__af962114{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:var(--s122r4cn-0);height:var(--s122r4cn-1);-webkit-animation:Spinner_styles_13q7ndk_rotateS122r4cn__af962114 1s linear infinite;animation:Spinner_styles_13q7ndk_rotateS122r4cn__af962114 1s linear infinite;}@-webkit-keyframes Spinner_styles_13q7ndk_rotateS122r4cn__af962114{from{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}@keyframes Spinner_styles_13q7ndk_rotateS122r4cn__af962114{from{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}
25
+
26
+ .Button_styles_1sopr3d_bzw1898__8219590b{min-width:4ch;-webkit-flex-shrink:2;-ms-flex-negative:2;flex-shrink:2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.Button_styles_1sopr3d_bzw1898__8219590b.Button_styles_1sopr3d_buttonContentRelaxed__8219590b{text-align:start;-webkit-box-flex:2;-webkit-flex-grow:2;-ms-flex-positive:2;flex-grow:2;}
27
+ .Button_styles_1sopr3d_bdfuqwe__8219590b{color:var(--plasma-button-value-color);margin:var(--plasma-button-value-margin);min-width:4ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
28
+ .Button_styles_1sopr3d_l9ypozh__8219590b{opacity:var(--l9ypozh-0);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:inherit;-webkit-box-align:inherit;-ms-flex-align:inherit;align-items:inherit;-webkit-box-pack:var(--l9ypozh-1);-webkit-justify-content:var(--l9ypozh-1);-ms-flex-pack:var(--l9ypozh-1);justify-content:var(--l9ypozh-1);height:100%;width:100%;}
29
+ .Button_styles_1sopr3d_l4dfhbg__8219590b{position:absolute;}
30
+ .Button_styles_1sopr3d_srdlazt__8219590b{--plasma-spinner-size:var(--plasma-button-spinner-size);--plasma-spinner-color:var(--plasma-button-spinner-color);}
31
+ .Button_styles_1sopr3d_s7rggv0__8219590b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:var(--plasma-button-left-content-margin);-webkit-align-self:var(--plasma-button-left-content-align-self);-ms-flex-item-align:var(--plasma-button-left-content-align);align-self:var(--plasma-button-left-content-align-self);}
32
+ .Button_styles_1sopr3d_s1rjh7ra__8219590b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:var(--plasma-button-right-content-margin);-webkit-align-self:var(--plasma-button-right-content-align-self);-ms-flex-item-align:var(--plasma-button-right-content-align);align-self:var(--plasma-button-right-content-align-self);}
33
+ .Button_styles_1sopr3d_b9ga1dj__8219590b{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;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_1sopr3d_b9ga1dj__8219590b{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_1sopr3d_b9ga1dj__8219590b.Button_styles_1sopr3d_b9ga1dj__8219590b.Button_styles_1sopr3d_buttonSquare__8219590b{width:var(--plasma-button-height);padding:0;}
34
+
35
+ .Button_styles_oi6jxf_sfplb1t__92f1711d{--plasma-button-color:var(--plasma-attach-button-color);--plasma-button-background-color:var(--plasma-attach-button-background-color);--plasma-button-color-hover:var(--plasma-attach-button-color-hover);--plasma-button-background-color-hover:var(--plasma-attach-button-background-color-hover);--plasma-button-color-active:var(--plasma-attach-button-color-active);--plasma-button-background-color-active:var(--plasma-attach-button-background-color-active);--plasma-button-height:var(--plasma-attach-button-height);--plasma-button-width:var(--plasma-attach-button-width);--plasma-button-padding:var(--plasma-attach-button-padding);--plasma-button-radius:var(--plasma-attach-button-radius);--plasma-button-font-family:var(--plasma-attach-button-font-family);--plasma-button-font-size:var(--plasma-attach-button-font-size);--plasma-button-font-style:var(--plasma-attach-button-font-style);--plasma-button-font-weight:var(--plasma-attach-button-font-weight);--plasma-button-letter-spacing:var(--plasma-attach-button-letter-spacing);--plasma-button-line-height:var(--plasma-attach-button-line-height);}
36
+
37
+ .Cell_styles_ygfo1w_b1wikybr__e668c908.Cell_styles_ygfo1w_b1wikybr__e668c908.Cell_styles_ygfo1w_cellStretchingFixed__e668c908{width:var(--plasma-cell-width);}.Cell_styles_ygfo1w_b1wikybr__e668c908.Cell_styles_ygfo1w_b1wikybr__e668c908.Cell_styles_ygfo1w_cellStretchingFilled__e668c908{width:100%;}.Cell_styles_ygfo1w_b1wikybr__e668c908.Cell_styles_ygfo1w_b1wikybr__e668c908.Cell_styles_ygfo1w_cellStretchingAuto__e668c908{width:auto;}
38
+
39
+ .base_pir0qf_b1sr9i7l__baa3f156{color:var(--plasma-cell-color);background-color:var(--plasma-cell-background-color);width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;gap:var(--plasma-cell-gap);}.base_pir0qf_b1sr9i7l__baa3f156:focus{outline:0 none;}
40
+
41
+ .Cell_styles_1dlvsak_si1k6gv__6095305f{--plasma-cell-label-color:var(--plasma-attach-cell-label-color);--plasma-cell-title-color:var(--plasma-attach-cell-title-color);--plasma-cell-subtitle-color:var(--plasma-attach-cell-subtitle-color);--plasma-cell-background-color:var(--plasma-attach-cell-background-color);--plasma-cell-width:var(--plasma-attach-cell-width);--plasma-cell-padding:var(--plasma-attach-cell-padding);--plasma-cell-padding-left-content:var(--plasma-attach-cell-padding-left-content);--plasma-cell-padding-content:var(--plasma-attach-cell-padding-content);--plasma-cell-padding-right-content:var(--plasma-attach-cell-padding-right-content);--plasma-cell-textbox-gap:var(--plasma-attach-cell-textbox-gap);--plasma-cell-gap:var(--plasma-attach-cell-gap);--plasma-cell-label-font-family:var(--plasma-attach-cell-label-font-family);--plasma-cell-label-font-size:var(--plasma-attach-cell-label-font-size);--plasma-cell-label-font-style:var(--plasma-attach-cell-label-font-style);--plasma-cell-label-font-weight:var(--plasma-attach-cell-label-font-weight);--plasma-cell-label-letter-spacing:var(--plasma-attach-cell-label-letter-spacing);--plasma-cell-label-line-height:var(--plasma-attach-cell-label-line-height);--plasma-cell-title-font-family:var(--plasma-attach-cell-title-font-family);--plasma-cell-title-font-size:var(--plasma-attach-cell-title-font-size);--plasma-cell-title-font-style:var(--plasma-attach-cell-title-font-style);--plasma-cell-title-font-weight:var(--plasma-attach-cell-title-font-weight);--plasma-cell-title-letter-spacing:var(--plasma-attach-cell-title-letter-spacing);--plasma-cell-title-line-height:var(--plasma-attach-cell-title-line-height);--plasma-cell-subtitle-font-family:var(--plasma-attach-cell-subtitle-font-family);--plasma-cell-subtitle-font-size:var(--plasma-attach-cell-subtitle-font-size);--plasma-cell-subtitle-font-style:var(--plasma-attach-cell-subtitle-font-style);--plasma-cell-subtitle-font-weight:var(--plasma-attach-cell-subtitle-font-weight);--plasma-cell-subtitle-letter-spacing:var(--plasma-attach-cell-subtitle-letter-spacing);--plasma-cell-subtitle-line-height:var(--plasma-attach-cell-subtitle-line-height);width:-webkit-fit-content !important;width:-moz-fit-content !important;width:fit-content !important;}.Cell_styles_1dlvsak_si1k6gv__6095305f.Cell_styles_1dlvsak_cellHidden__6095305f{visibility:hidden;}
42
+
43
+ .IconButton_styles_sttslf_b1ua728l__193d7826{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;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);height:var(--plasma-button-height);width:var(--plasma-button-width);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);-webkit-letter-spacing:var(--plasma-button-letter-spacing);-moz-letter-spacing:var(--plasma-button-letter-spacing);-ms-letter-spacing:var(--plasma-button-letter-spacing);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--plasma_private-btn-outline-size:var(--plasma-button-outline-size,0.0625rem);position:relative;--plasma-button-padding:0;--plasma-button-color:var(--plasma-icon-button-color);--plasma-button-background-color:var(--plasma-icon-button-background-color);--plasma-button-color-hover:var(--plasma-icon-button-color-hover);--plasma-button-background-color-hover:var(--plasma-icon-button-background-color-hover);--plasma-button-color-active:var(--plasma-icon-button-color-active);--plasma-button-background-color-active:var(--plasma-icon-button-background-color-active);--plasma-button-loading-background-color:var(--plasma-icon-button-loading-background-color);--plasma-button-font-family:var(--plasma-icon-button-font-family);--plasma-button-font-size:var(--plasma-icon-button-font-size);--plasma-button-font-style:var(--plasma-icon-button-font-style);--plasma-button-font-weight:var(--plasma-icon-button-font-weight);--plasma-button-letter-spacing:var(--plasma-icon-button-letter-spacing);--plasma-button-line-height:var(--plasma-icon-button-line-height);--plasma-button-width:var(--plasma-icon-button-width);--plasma-button-height:var(--plasma-icon-button-height);--plasma-button-radius:var(--plasma-icon-button-radius);--plasma-button-disabled-opacity:var(--plasma-icon-button-disabled-opacity);--plasma-button-focus-color:var(--plasma-icon-button-focus-color);--plasma-button-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-button-spinner-color:var(--plasma-icon-button-spinner-color);}a.IconButton_styles_sttslf_b1ua728l__193d7826{-webkit-text-decoration:none;text-decoration:none;}.IconButton_styles_sttslf_b1ua728l__193d7826.IconButton_styles_sttslf_b1ua728l__193d7826.IconButton_styles_sttslf_buttonSquare__193d7826{width:var(--plasma-button-height);padding:0;}.IconButton_styles_sttslf_b1ua728l__193d7826:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.IconButton_styles_sttslf_b1ua728l__193d7826:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}.IconButton_styles_sttslf_b1ua728l__193d7826:focus{outline:none;}.IconButton_styles_sttslf_b1ua728l__193d7826::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:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.IconButton_styles_sttslf_b1ua728l__193d7826.IconButton_styles_sttslf_focusVisible__193d7826:focus::before,.IconButton_styles_sttslf_b1ua728l__193d7826[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}.IconButton_styles_sttslf_b1ua728l__193d7826[disabled]{opacity:var(--plasma-button-disabled-opacity);cursor:not-allowed;}.IconButton_styles_sttslf_b1ua728l__193d7826[disabled]:hover,.IconButton_styles_sttslf_b1ua728l__193d7826[disabled]:active{scale:none;color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.IconButton_styles_sttslf_b1ua728l__193d7826.IconButton_styles_sttslf_buttonStretchingFixed__193d7826{width:var(--plasma-button-width);}.IconButton_styles_sttslf_b1ua728l__193d7826.IconButton_styles_sttslf_buttonStretchingFilled__193d7826{width:100%;}.IconButton_styles_sttslf_b1ua728l__193d7826.IconButton_styles_sttslf_buttonStretchingAuto__193d7826{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}
44
+
45
+ .IconButton_styles_14dty7n_sdel9u5__d56017d3{--plasma-icon-button-color:var(--plasma-attach-icon-button-color);--plasma-icon-button-background-color:var(--plasma-attach-icon-button-background-color);--plasma-icon-button-color-hover:var(--plasma-attach-icon-button-color-hover);--plasma-icon-button-background-color-hover:var(--plasma-attach-icon-button-background-color-hover);--plasma-icon-button-color-active:var(--plasma-attach-icon-button-color-active);--plasma-icon-button-background-color-active:var(--plasma-attach-icon-button-background-color-active);--plasma-icon-button-height:var(--plasma-attach-icon-button-height);--plasma-icon-button-width:var(--plasma-attach-icon-button-width);--plasma-icon-button-padding:var(--plasma-attach-icon-button-padding);--plasma-icon-button-radius:var(--plasma-attach-icon-button-radius);--plasma-icon-button-font-family:var(--plasma-attach-icon-button-font-family);--plasma-icon-button-font-size:var(--plasma-attach-icon-button-font-size);--plasma-icon-button-font-style:var(--plasma-attach-icon-button-font-style);--plasma-icon-button-font-weight:var(--plasma-attach-icon-button-font-weight);--plasma-icon-button-letter-spacing:var(--plasma-attach-icon-button-letter-spacing);--plasma-icon-button-line-height:var(--plasma-attach-icon-button-line-height);}
@@ -0,0 +1,174 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
6
+ var React = require('react');
7
+ var plasmaIcons = require('@salutejs/plasma-icons');
8
+ var plasmaCore = require('@salutejs/plasma-core');
9
+ var index = require('../../utils/index.js');
10
+ var base$1 = require('./variations/_size/base.js');
11
+ var base = require('./variations/_view/base.js');
12
+ var Attach_styles = require('./Attach.styles.js');
13
+ var Button_styles = require('./ui/Button/Button.styles.js');
14
+ var Cell_styles = require('./ui/Cell/Cell.styles.js');
15
+ var IconButton_styles = require('./ui/iconButton/IconButton.styles.js');
16
+ var extractExtension = require('./utils/extractExtension.js');
17
+ var getFileicon = require('./utils/getFileicon.js');
18
+ var truncateFilename = require('./utils/truncateFilename.js');
19
+ var Attach_tokens = require('./Attach.tokens.js');
20
+
21
+ var _IconCloseCircleOutli;
22
+ var _excluded = ["flow", "text", "hasAttachment", "acceptedFileFormats", "size", "view", "className"];
23
+ var attachRoot = function attachRoot(Root) {
24
+ return /*#__PURE__*/React.forwardRef(function (props, outerRef) {
25
+ var _props$flow = props.flow,
26
+ flow = _props$flow === void 0 ? 'auto' : _props$flow,
27
+ _props$text = props.text,
28
+ text = _props$text === void 0 ? 'Загрузить файл' : _props$text,
29
+ _props$hasAttachment = props.hasAttachment,
30
+ hasAttachment = _props$hasAttachment === void 0 ? true : _props$hasAttachment,
31
+ acceptedFileFormats = props.acceptedFileFormats,
32
+ size = props.size,
33
+ view = props.view,
34
+ className = props.className,
35
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(props, _excluded);
36
+ var inputRef = React.useRef(null);
37
+ var inputHelperRef = React.useRef(null);
38
+ var cellRef = React.useRef(null);
39
+ var innerRef = React.useRef(null);
40
+ var ref = plasmaCore.useForkRef(outerRef, innerRef);
41
+ var _useState = React.useState(null),
42
+ _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
43
+ containerWidth = _useState2[0],
44
+ setContainerWidth = _useState2[1];
45
+ var _useState3 = React.useState(null),
46
+ _useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
47
+ origFilename = _useState4[0],
48
+ setOrigFilename = _useState4[1];
49
+ var _useState5 = React.useState(null),
50
+ _useState6 = _rollupPluginBabelHelpers.slicedToArray(_useState5, 2),
51
+ filename = _useState6[0],
52
+ setFilename = _useState6[1];
53
+ var _useState7 = React.useState(false),
54
+ _useState8 = _rollupPluginBabelHelpers.slicedToArray(_useState7, 2),
55
+ shouldUpdateFilename = _useState8[0],
56
+ setShouldUpdateFilename = _useState8[1];
57
+ var horizontalClass = flow === 'horizontal' ? Attach_tokens.classes.horizontal : undefined;
58
+ var verticalClass = flow === 'vertical' ? Attach_tokens.classes.vertical : undefined;
59
+ var autoClass = flow === 'auto' ? Attach_tokens.classes.auto : undefined;
60
+ var cellHiddenClass = shouldUpdateFilename ? Attach_tokens.classes.cellHidden : undefined;
61
+ var accept = acceptedFileFormats === null || acceptedFileFormats === void 0 ? void 0 : acceptedFileFormats.join(',');
62
+ var extension = filename ? extractExtension.extractExtension(filename) : null;
63
+ var contentLeft = extension ? getFileicon.getFileicon(extension) : null;
64
+ var handleClick = function handleClick() {
65
+ if (!inputRef.current) {
66
+ return;
67
+ }
68
+ inputRef.current.click();
69
+ };
70
+ var handleChange = function handleChange() {
71
+ if (!inputRef.current || !inputRef.current.files) {
72
+ return;
73
+ }
74
+ setOrigFilename(inputRef.current.files[0].name);
75
+ };
76
+ var handleClear = function handleClear() {
77
+ if (!inputRef.current) {
78
+ return;
79
+ }
80
+ inputRef.current.value = '';
81
+ setOrigFilename(null);
82
+ };
83
+ plasmaCore.useResizeObserver(innerRef, function (container) {
84
+ setContainerWidth(container.offsetWidth);
85
+ });
86
+ React.useEffect(function () {
87
+ setFilename(origFilename);
88
+ setShouldUpdateFilename(true);
89
+ }, [size, view, flow, origFilename, containerWidth]);
90
+ React.useEffect(function () {
91
+ if (!cellRef.current || !cellRef.current.parentElement || !inputHelperRef.current || !inputHelperRef.current.textContent || !origFilename || !shouldUpdateFilename) {
92
+ setShouldUpdateFilename(false);
93
+ return;
94
+ }
95
+ var textWidth = inputHelperRef.current.offsetWidth;
96
+ var _cellRef$current$getB = cellRef.current.getBoundingClientRect(),
97
+ cellWidth = _cellRef$current$getB.width,
98
+ cellLeft = _cellRef$current$getB.left;
99
+ var _cellRef$current$pare = cellRef.current.parentElement.getBoundingClientRect(),
100
+ parentWidth = _cellRef$current$pare.width,
101
+ parentLeft = _cellRef$current$pare.left;
102
+ var cellLeftRightContentWidth = cellWidth - textWidth;
103
+ var leftDiff = cellLeft - parentLeft;
104
+ var index = origFilename.length - 1;
105
+ var currentTextWidth = textWidth;
106
+ var resultFilename = origFilename;
107
+ while (currentTextWidth + cellLeftRightContentWidth + leftDiff > parentWidth && index >= 1) {
108
+ var truncatedFilename = truncateFilename.truncateFilename(inputHelperRef.current.textContent, index);
109
+ inputHelperRef.current.textContent = truncatedFilename;
110
+ resultFilename = truncatedFilename;
111
+ currentTextWidth = inputHelperRef.current.offsetWidth;
112
+ index -= 1;
113
+ }
114
+ inputHelperRef.current.textContent = origFilename;
115
+ setFilename(resultFilename);
116
+ setShouldUpdateFilename(false);
117
+ }, [shouldUpdateFilename]);
118
+ return /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
119
+ className: index.cx(horizontalClass, verticalClass, autoClass, className),
120
+ size: size,
121
+ view: view,
122
+ ref: ref
123
+ }, rest), /*#__PURE__*/React.createElement(Attach_styles.StyledHiddenInput, {
124
+ ref: inputRef,
125
+ accept: accept,
126
+ type: "file",
127
+ id: "attachHiddenInput",
128
+ name: "attachHiddenInput",
129
+ onChange: handleChange
130
+ }), /*#__PURE__*/React.createElement(Attach_styles.StyledHiddenInputHelper, {
131
+ ref: inputHelperRef,
132
+ id: "attachHiddenInputHelper"
133
+ }, origFilename), /*#__PURE__*/React.createElement(Button_styles.StyledButton, {
134
+ size: size,
135
+ view: view,
136
+ onClick: handleClick,
137
+ text: text
138
+ }), hasAttachment && filename && /*#__PURE__*/React.createElement(Cell_styles.StyledCell, {
139
+ className: cellHiddenClass,
140
+ ref: cellRef,
141
+ size: size,
142
+ view: view,
143
+ title: filename,
144
+ contentLeft: contentLeft,
145
+ contentRight: /*#__PURE__*/React.createElement(IconButton_styles.StyledIconButton, {
146
+ onClick: handleClear
147
+ }, _IconCloseCircleOutli || (_IconCloseCircleOutli = /*#__PURE__*/React.createElement(plasmaIcons.IconCloseCircleOutline, {
148
+ size: "xs"
149
+ })))
150
+ }));
151
+ });
152
+ };
153
+ var attachConfig = {
154
+ name: 'Attach',
155
+ tag: 'div',
156
+ layout: attachRoot,
157
+ base: Attach_styles.base,
158
+ variations: {
159
+ view: {
160
+ css: base.base
161
+ },
162
+ size: {
163
+ css: base$1.base
164
+ }
165
+ },
166
+ defaults: {
167
+ view: 'default',
168
+ size: 'm'
169
+ }
170
+ };
171
+
172
+ exports.attachConfig = attachConfig;
173
+ exports.attachRoot = attachRoot;
174
+ //# sourceMappingURL=Attach.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Attach.js","sources":["../../../src/components/Attach/Attach.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport { IconCloseCircleOutline } from '@salutejs/plasma-icons';\nimport { useForkRef, useResizeObserver } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport { AttachProps } from './Attach.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base, StyledHiddenInput, StyledHiddenInputHelper } from './Attach.styles';\nimport { StyledButton } from './ui/Button/Button';\nimport { StyledCell } from './ui/Cell/Cell';\nimport { StyledIconButton } from './ui/iconButton/IconButton';\nimport { extractExtension, getFileicon, truncateFilename } from './utils';\nimport { classes } from './Attach.tokens';\n\nexport const attachRoot = (Root: RootProps<HTMLDivElement, AttachProps>) =>\n forwardRef<HTMLDivElement, AttachProps>((props, outerRef) => {\n const {\n flow = 'auto',\n text = 'Загрузить файл',\n hasAttachment = true,\n acceptedFileFormats,\n size,\n view,\n className,\n ...rest\n } = props;\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const inputHelperRef = useRef<HTMLDivElement | null>(null);\n const cellRef = useRef<HTMLDivElement | null>(null);\n\n const innerRef = useRef<HTMLDivElement>(null);\n const ref = useForkRef(outerRef, innerRef);\n\n const [containerWidth, setContainerWidth] = useState<number | null>(null);\n\n const [origFilename, setOrigFilename] = useState<string | null>(null);\n const [filename, setFilename] = useState<string | null>(null);\n const [shouldUpdateFilename, setShouldUpdateFilename] = useState<boolean>(false);\n\n const horizontalClass = flow === 'horizontal' ? classes.horizontal : undefined;\n const verticalClass = flow === 'vertical' ? classes.vertical : undefined;\n const autoClass = flow === 'auto' ? classes.auto : undefined;\n const cellHiddenClass = shouldUpdateFilename ? classes.cellHidden : undefined;\n\n const accept = acceptedFileFormats?.join(',');\n const extension = filename ? extractExtension(filename) : null;\n const contentLeft = extension ? getFileicon(extension) : null;\n\n const handleClick = () => {\n if (!inputRef.current) {\n return;\n }\n\n inputRef.current.click();\n };\n\n const handleChange = () => {\n if (!inputRef.current || !inputRef.current.files) {\n return;\n }\n\n setOrigFilename(inputRef.current.files[0].name);\n };\n\n const handleClear = () => {\n if (!inputRef.current) {\n return;\n }\n\n inputRef.current.value = '';\n setOrigFilename(null);\n };\n\n useResizeObserver(innerRef, (container) => {\n setContainerWidth(container.offsetWidth);\n });\n\n useEffect(() => {\n setFilename(origFilename);\n setShouldUpdateFilename(true);\n }, [size, view, flow, origFilename, containerWidth]);\n\n useEffect(() => {\n if (\n !cellRef.current ||\n !cellRef.current.parentElement ||\n !inputHelperRef.current ||\n !inputHelperRef.current.textContent ||\n !origFilename ||\n !shouldUpdateFilename\n ) {\n setShouldUpdateFilename(false);\n return;\n }\n\n const { offsetWidth: textWidth } = inputHelperRef.current;\n const { width: cellWidth, left: cellLeft } = cellRef.current.getBoundingClientRect();\n const { width: parentWidth, left: parentLeft } = cellRef.current.parentElement.getBoundingClientRect();\n\n const cellLeftRightContentWidth = cellWidth - textWidth;\n const leftDiff = cellLeft - parentLeft;\n\n let index = origFilename.length - 1;\n let currentTextWidth = textWidth;\n let resultFilename = origFilename;\n\n while (currentTextWidth + cellLeftRightContentWidth + leftDiff > parentWidth && index >= 1) {\n const truncatedFilename = truncateFilename(inputHelperRef.current.textContent, index);\n inputHelperRef.current.textContent = truncatedFilename;\n\n resultFilename = truncatedFilename;\n currentTextWidth = inputHelperRef.current.offsetWidth;\n index -= 1;\n }\n\n inputHelperRef.current.textContent = origFilename;\n\n setFilename(resultFilename);\n setShouldUpdateFilename(false);\n }, [shouldUpdateFilename]);\n\n return (\n <Root\n className={cx(horizontalClass, verticalClass, autoClass, className)}\n size={size}\n view={view}\n ref={ref}\n {...rest}\n >\n <StyledHiddenInput\n ref={inputRef}\n accept={accept}\n type=\"file\"\n id=\"attachHiddenInput\"\n name=\"attachHiddenInput\"\n onChange={handleChange}\n />\n <StyledHiddenInputHelper ref={inputHelperRef} id=\"attachHiddenInputHelper\">\n {origFilename}\n </StyledHiddenInputHelper>\n\n <StyledButton size={size} view={view} onClick={handleClick} text={text} />\n {hasAttachment && filename && (\n <StyledCell\n className={cellHiddenClass}\n ref={cellRef}\n size={size}\n view={view}\n title={filename}\n contentLeft={contentLeft}\n contentRight={\n <StyledIconButton onClick={handleClear}>\n <IconCloseCircleOutline size=\"xs\" />\n </StyledIconButton>\n }\n />\n )}\n </Root>\n );\n });\n\nexport const attachConfig = {\n name: 'Attach',\n tag: 'div',\n layout: attachRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["attachRoot","Root","forwardRef","props","outerRef","_props$flow","flow","_props$text","text","_props$hasAttachment","hasAttachment","acceptedFileFormats","size","view","className","rest","_objectWithoutProperties","_excluded","inputRef","useRef","inputHelperRef","cellRef","innerRef","ref","useForkRef","_useState","useState","_useState2","_slicedToArray","containerWidth","setContainerWidth","_useState3","_useState4","origFilename","setOrigFilename","_useState5","_useState6","filename","setFilename","_useState7","_useState8","shouldUpdateFilename","setShouldUpdateFilename","horizontalClass","classes","horizontal","undefined","verticalClass","vertical","autoClass","auto","cellHiddenClass","cellHidden","accept","join","extension","extractExtension","contentLeft","getFileicon","handleClick","current","click","handleChange","files","name","handleClear","value","useResizeObserver","container","offsetWidth","useEffect","parentElement","textContent","textWidth","_cellRef$current$getB","getBoundingClientRect","cellWidth","width","cellLeft","left","_cellRef$current$pare","parentWidth","parentLeft","cellLeftRightContentWidth","leftDiff","index","length","currentTextWidth","resultFilename","truncatedFilename","truncateFilename","React","createElement","_extends","cx","StyledHiddenInput","type","id","onChange","StyledHiddenInputHelper","StyledButton","onClick","StyledCell","title","contentRight","StyledIconButton","_IconCloseCircleOutli","IconCloseCircleOutline","attachConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;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AAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
@@ -0,0 +1,23 @@
1
+ import './Attach.styles_17fejif.css';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var react = require('@linaria/react');
7
+
8
+ var base = "by826kf";
9
+ var StyledHiddenInput = /*#__PURE__*/react.styled('input')({
10
+ name: "StyledHiddenInput",
11
+ "class": "sw7vb9c",
12
+ propsAsIs: false
13
+ });
14
+ var StyledHiddenInputHelper = /*#__PURE__*/react.styled('div')({
15
+ name: "StyledHiddenInputHelper",
16
+ "class": "suojwhg",
17
+ propsAsIs: false
18
+ });
19
+
20
+ exports.StyledHiddenInput = StyledHiddenInput;
21
+ exports.StyledHiddenInputHelper = StyledHiddenInputHelper;
22
+ exports.base = base;
23
+ //# sourceMappingURL=Attach.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Attach.styles.js","sources":["../../../src/components/Attach/Attach.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { tokens as attachTokens } from './Attach.tokens';\n\nexport const base = css`\n position: relative;\n display: flex;\n width: fit-content;\n`;\n\nexport const StyledHiddenInput = styled.input`\n display: none;\n`;\n\nexport const StyledHiddenInputHelper = styled.div`\n position: absolute;\n visibility: hidden;\n\n font-family: var(${attachTokens.cellTitleFontFamily});\n font-size: var(${attachTokens.cellTitleFontSize});\n font-style: var(${attachTokens.cellTitleFontStyle});\n font-weight: var(${attachTokens.cellTitleFontWeight});\n letter-spacing: var(${attachTokens.cellTitleLetterSpacing});\n line-height: var(${attachTokens.cellTitleLineHeight});\n`;\n"],"names":["base","StyledHiddenInput","styled","name","class","propsAsIs","StyledHiddenInputHelper"],"mappings":";;;;;;AAKO,IAAMA,IAAI,GAIhB,UAAA;AAEM,IAAMC,iBAAiB,gBAAGC,YAAM,CAAA,OAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,mBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAEtC,EAAA;AAEM,IAAMC,uBAAuB,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,yBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAU5C;;;;;;"}
@@ -0,0 +1,3 @@
1
+ .by826kf{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}
2
+ .sw7vb9c{display:none;}
3
+ .suojwhg{position:absolute;visibility:hidden;font-family:var(--plasma-attach-cell-title-font-family);font-size:var(--plasma-attach-cell-title-font-size);font-style:var(--plasma-attach-cell-title-font-style);font-weight:var(--plasma-attach-cell-title-font-weight);-webkit-letter-spacing:var(--plasma-attach-cell-title-letter-spacing);-moz-letter-spacing:var(--plasma-attach-cell-title-letter-spacing);-ms-letter-spacing:var(--plasma-attach-cell-title-letter-spacing);letter-spacing:var(--plasma-attach-cell-title-letter-spacing);line-height:var(--plasma-attach-cell-title-line-height);}
@@ -0,0 +1,83 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var classes = {
6
+ auto: 'auto',
7
+ horizontal: 'horizontal',
8
+ vertical: 'vertical',
9
+ cellHidden: 'cell-hidden'
10
+ };
11
+ var tokens = {
12
+ horizontalGap: '--plasma-attach-horizontal-gap',
13
+ verticalGap: '--plasma-attach-vertical-gap',
14
+ // Токены для Button
15
+ buttonColor: '--plasma-attach-button-color',
16
+ buttonBackgroundColor: '--plasma-attach-button-background-color',
17
+ buttonColorHover: '--plasma-attach-button-color-hover',
18
+ buttonBackgroundColorHover: '--plasma-attach-button-background-color-hover',
19
+ buttonColorActive: '--plasma-attach-button-color-active',
20
+ buttonBackgroundColorActive: '--plasma-attach-button-background-color-active',
21
+ buttonHeight: '--plasma-attach-button-height',
22
+ buttonWidth: '--plasma-attach-button-width',
23
+ buttonPadding: '--plasma-attach-button-padding',
24
+ buttonRadius: '--plasma-attach-button-radius',
25
+ buttonFontFamily: '--plasma-attach-button-font-family',
26
+ buttonFontSize: '--plasma-attach-button-font-size',
27
+ buttonFontStyle: '--plasma-attach-button-font-style',
28
+ buttonFontWeight: '--plasma-attach-button-font-weight',
29
+ buttonLetterSpacing: '--plasma-attach-button-letter-spacing',
30
+ buttonLineHeight: '--plasma-attach-button-line-height',
31
+ // Токены для Cell
32
+ cellColor: '--plasma-attach-cell-color',
33
+ cellLabelColor: '--plasma-attach-cell-label-color',
34
+ cellTitleColor: '--plasma-attach-cell-title-color',
35
+ cellSubtitleColor: '--plasma-attach-cell-subtitle-color',
36
+ cellBackgroundColor: '--plasma-attach-cell-background-color',
37
+ cellWidth: '--plasma-attach-cell-width',
38
+ cellPadding: '--plasma-attach-cell-padding',
39
+ cellPaddingLeftContent: '--plasma-attach-cell-padding-left-content',
40
+ cellPaddingContent: '--plasma-attach-cell-padding-content',
41
+ cellPaddingRightContent: '--plasma-attach-cell-padding-right-content',
42
+ cellTextboxGap: '--plasma-attach-cell-textbox-gap',
43
+ cellGap: '--plasma-attach-cell-gap',
44
+ cellLabelFontFamily: '--plasma-attach-cell-label-font-family',
45
+ cellLabelFontSize: '--plasma-attach-cell-label-font-size',
46
+ cellLabelFontStyle: '--plasma-attach-cell-label-font-style',
47
+ cellLabelFontWeight: '--plasma-attach-cell-label-font-weight',
48
+ cellLabelLetterSpacing: '--plasma-attach-cell-label-letter-spacing',
49
+ cellLabelLineHeight: '--plasma-attach-cell-label-line-height',
50
+ cellTitleFontFamily: '--plasma-attach-cell-title-font-family',
51
+ cellTitleFontSize: '--plasma-attach-cell-title-font-size',
52
+ cellTitleFontStyle: '--plasma-attach-cell-title-font-style',
53
+ cellTitleFontWeight: '--plasma-attach-cell-title-font-weight',
54
+ cellTitleLetterSpacing: '--plasma-attach-cell-title-letter-spacing',
55
+ cellTitleLineHeight: '--plasma-attach-cell-title-line-height',
56
+ cellSubtitleFontFamily: '--plasma-attach-cell-subtitle-font-family',
57
+ cellSubtitleFontSize: '--plasma-attach-cell-subtitle-font-size',
58
+ cellSubtitleFontStyle: '--plasma-attach-cell-subtitle-font-style',
59
+ cellSubtitleFontWeight: '--plasma-attach-cell-subtitle-font-weight',
60
+ cellSubtitleLetterSpacing: '--plasma-attach-cell-subtitle-letter-spacing',
61
+ cellSubtitleLineHeight: '--plasma-attach-cell-subtitle-line-height',
62
+ // Токены для IconButton
63
+ iconButtonColor: '--plasma-attach-icon-button-color',
64
+ iconButtonBackgroundColor: '--plasma-attach-icon-button-background-color',
65
+ iconButtonColorHover: '--plasma-attach-icon-button-color-hover',
66
+ iconButtonBackgroundColorHover: '--plasma-attach-icon-button-background-color-hover',
67
+ iconButtonColorActive: '--plasma-attach-icon-button-color-active',
68
+ iconButtonBackgroundColorActive: '--plasma-attach-icon-button-background-color-active',
69
+ iconButtonHeight: '--plasma-attach-icon-button-height',
70
+ iconButtonWidth: '--plasma-attach-icon-button-width',
71
+ iconButtonPadding: '--plasma-attach-icon-button-padding',
72
+ iconButtonRadius: '--plasma-attach-icon-button-radius',
73
+ iconButtonFontFamily: '--plasma-attach-icon-button-font-family',
74
+ iconButtonFontSize: '--plasma-attach-icon-button-font-size',
75
+ iconButtonFontStyle: '--plasma-attach-icon-button-font-style',
76
+ iconButtonFontWeight: '--plasma-attach-icon-button-font-weight',
77
+ iconButtonLetterSpacing: '--plasma-attach-icon-button-letter-spacing',
78
+ iconButtonLineHeight: '--plasma-attach-icon-button-line-height'
79
+ };
80
+
81
+ exports.classes = classes;
82
+ exports.tokens = tokens;
83
+ //# sourceMappingURL=Attach.tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Attach.tokens.js","sources":["../../../src/components/Attach/Attach.tokens.ts"],"sourcesContent":["export const classes = {\n auto: 'auto',\n horizontal: 'horizontal',\n vertical: 'vertical',\n cellHidden: 'cell-hidden',\n};\n\nexport const tokens = {\n horizontalGap: '--plasma-attach-horizontal-gap',\n verticalGap: '--plasma-attach-vertical-gap',\n\n // Токены для Button\n buttonColor: '--plasma-attach-button-color',\n buttonBackgroundColor: '--plasma-attach-button-background-color',\n buttonColorHover: '--plasma-attach-button-color-hover',\n buttonBackgroundColorHover: '--plasma-attach-button-background-color-hover',\n buttonColorActive: '--plasma-attach-button-color-active',\n buttonBackgroundColorActive: '--plasma-attach-button-background-color-active',\n\n buttonHeight: '--plasma-attach-button-height',\n buttonWidth: '--plasma-attach-button-width',\n buttonPadding: '--plasma-attach-button-padding',\n buttonRadius: '--plasma-attach-button-radius',\n\n buttonFontFamily: '--plasma-attach-button-font-family',\n buttonFontSize: '--plasma-attach-button-font-size',\n buttonFontStyle: '--plasma-attach-button-font-style',\n buttonFontWeight: '--plasma-attach-button-font-weight',\n buttonLetterSpacing: '--plasma-attach-button-letter-spacing',\n buttonLineHeight: '--plasma-attach-button-line-height',\n\n // Токены для Cell\n cellColor: '--plasma-attach-cell-color',\n cellLabelColor: '--plasma-attach-cell-label-color',\n cellTitleColor: '--plasma-attach-cell-title-color',\n cellSubtitleColor: '--plasma-attach-cell-subtitle-color',\n cellBackgroundColor: '--plasma-attach-cell-background-color',\n\n cellWidth: '--plasma-attach-cell-width',\n cellPadding: '--plasma-attach-cell-padding',\n cellPaddingLeftContent: '--plasma-attach-cell-padding-left-content',\n cellPaddingContent: '--plasma-attach-cell-padding-content',\n cellPaddingRightContent: '--plasma-attach-cell-padding-right-content',\n\n cellTextboxGap: '--plasma-attach-cell-textbox-gap',\n cellGap: '--plasma-attach-cell-gap',\n\n cellLabelFontFamily: '--plasma-attach-cell-label-font-family',\n cellLabelFontSize: '--plasma-attach-cell-label-font-size',\n cellLabelFontStyle: '--plasma-attach-cell-label-font-style',\n cellLabelFontWeight: '--plasma-attach-cell-label-font-weight',\n cellLabelLetterSpacing: '--plasma-attach-cell-label-letter-spacing',\n cellLabelLineHeight: '--plasma-attach-cell-label-line-height',\n\n cellTitleFontFamily: '--plasma-attach-cell-title-font-family',\n cellTitleFontSize: '--plasma-attach-cell-title-font-size',\n cellTitleFontStyle: '--plasma-attach-cell-title-font-style',\n cellTitleFontWeight: '--plasma-attach-cell-title-font-weight',\n cellTitleLetterSpacing: '--plasma-attach-cell-title-letter-spacing',\n cellTitleLineHeight: '--plasma-attach-cell-title-line-height',\n\n cellSubtitleFontFamily: '--plasma-attach-cell-subtitle-font-family',\n cellSubtitleFontSize: '--plasma-attach-cell-subtitle-font-size',\n cellSubtitleFontStyle: '--plasma-attach-cell-subtitle-font-style',\n cellSubtitleFontWeight: '--plasma-attach-cell-subtitle-font-weight',\n cellSubtitleLetterSpacing: '--plasma-attach-cell-subtitle-letter-spacing',\n cellSubtitleLineHeight: '--plasma-attach-cell-subtitle-line-height',\n\n // Токены для IconButton\n iconButtonColor: '--plasma-attach-icon-button-color',\n iconButtonBackgroundColor: '--plasma-attach-icon-button-background-color',\n iconButtonColorHover: '--plasma-attach-icon-button-color-hover',\n iconButtonBackgroundColorHover: '--plasma-attach-icon-button-background-color-hover',\n iconButtonColorActive: '--plasma-attach-icon-button-color-active',\n iconButtonBackgroundColorActive: '--plasma-attach-icon-button-background-color-active',\n\n iconButtonHeight: '--plasma-attach-icon-button-height',\n iconButtonWidth: '--plasma-attach-icon-button-width',\n iconButtonPadding: '--plasma-attach-icon-button-padding',\n iconButtonRadius: '--plasma-attach-icon-button-radius',\n iconButtonFontFamily: '--plasma-attach-icon-button-font-family',\n iconButtonFontSize: '--plasma-attach-icon-button-font-size',\n iconButtonFontStyle: '--plasma-attach-icon-button-font-style',\n iconButtonFontWeight: '--plasma-attach-icon-button-font-weight',\n iconButtonLetterSpacing: '--plasma-attach-icon-button-letter-spacing',\n iconButtonLineHeight: '--plasma-attach-icon-button-line-height',\n};\n"],"names":["classes","auto","horizontal","vertical","cellHidden","tokens","horizontalGap","verticalGap","buttonColor","buttonBackgroundColor","buttonColorHover","buttonBackgroundColorHover","buttonColorActive","buttonBackgroundColorActive","buttonHeight","buttonWidth","buttonPadding","buttonRadius","buttonFontFamily","buttonFontSize","buttonFontStyle","buttonFontWeight","buttonLetterSpacing","buttonLineHeight","cellColor","cellLabelColor","cellTitleColor","cellSubtitleColor","cellBackgroundColor","cellWidth","cellPadding","cellPaddingLeftContent","cellPaddingContent","cellPaddingRightContent","cellTextboxGap","cellGap","cellLabelFontFamily","cellLabelFontSize","cellLabelFontStyle","cellLabelFontWeight","cellLabelLetterSpacing","cellLabelLineHeight","cellTitleFontFamily","cellTitleFontSize","cellTitleFontStyle","cellTitleFontWeight","cellTitleLetterSpacing","cellTitleLineHeight","cellSubtitleFontFamily","cellSubtitleFontSize","cellSubtitleFontStyle","cellSubtitleFontWeight","cellSubtitleLetterSpacing","cellSubtitleLineHeight","iconButtonColor","iconButtonBackgroundColor","iconButtonColorHover","iconButtonBackgroundColorHover","iconButtonColorActive","iconButtonBackgroundColorActive","iconButtonHeight","iconButtonWidth","iconButtonPadding","iconButtonRadius","iconButtonFontFamily","iconButtonFontSize","iconButtonFontStyle","iconButtonFontWeight","iconButtonLetterSpacing","iconButtonLineHeight"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,UAAU,EAAE,aAAA;AAChB,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,aAAa,EAAE,gCAAgC;AAC/CC,EAAAA,WAAW,EAAE,8BAA8B;AAE3C;AACAC,EAAAA,WAAW,EAAE,8BAA8B;AAC3CC,EAAAA,qBAAqB,EAAE,yCAAyC;AAChEC,EAAAA,gBAAgB,EAAE,oCAAoC;AACtDC,EAAAA,0BAA0B,EAAE,+CAA+C;AAC3EC,EAAAA,iBAAiB,EAAE,qCAAqC;AACxDC,EAAAA,2BAA2B,EAAE,gDAAgD;AAE7EC,EAAAA,Y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EAAE,wCAAwC;AAE7DC,EAAAA,sBAAsB,EAAE,2CAA2C;AACnEC,EAAAA,oBAAoB,EAAE,yCAAyC;AAC/DC,EAAAA,qBAAqB,EAAE,0CAA0C;AACjEC,EAAAA,sBAAsB,EAAE,2CAA2C;AACnEC,EAAAA,yBAAyB,EAAE,8CAA8C;AACzEC,EAAAA,sBAAsB,EAAE,2CAA2C;AAEnE;AACAC,EAAAA,eAAe,EAAE,mCAAmC;AACpDC,EAAAA,yBAAyB,EAAE,8CAA8C;AACzEC,EAAAA,oBAAoB,EAAE,yCAAyC;AAC/DC,EAAAA,8BAA8B,EAAE,oDAAoD;AACpFC,EAAAA,qBAAqB,EAAE,0CAA0C;AACjEC,EAAAA,+BAA+B,EAAE,qDAAqD;AAEtFC,EAAAA,gBAAgB,EAAE,oCAAoC;AACtDC,EAAAA,eAAe,EAAE,mCAAmC;AACpDC,EAAAA,iBAAiB,EAAE,qCAAqC;AACxDC,EAAAA,gBAAgB,EAAE,oCAAoC;AACtDC,EAAAA,oBAAoB,EAAE,yCAAyC;AAC/DC,EAAAA,kBAAkB,EAAE,uCAAuC;AAC3DC,EAAAA,mBAAmB,EAAE,wCAAwC;AAC7DC,EAAAA,oBAAoB,EAAE,yCAAyC;AAC/DC,EAAAA,uBAAuB,EAAE,4CAA4C;AACrEC,EAAAA,oBAAoB,EAAE,yCAAA;AAC1B;;;;;"}
@@ -0,0 +1,23 @@
1
+ import './Button.styles_oi6jxf.css';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var react = require('@linaria/react');
7
+ require('@linaria/core');
8
+ var common = require('../../../../engines/common.js');
9
+ var Button$1 = require('../../../Button/Button.js');
10
+
11
+ var mergedConfig = /*#__PURE__*/common.mergeConfig(Button$1.buttonConfig);
12
+ var Button = /*#__PURE__*/common.component(mergedConfig);
13
+ var _exp = function _exp() {
14
+ return Button;
15
+ };
16
+ var StyledButton = /*#__PURE__*/react.styled(_exp())({
17
+ name: "StyledButton",
18
+ "class": "sfplb1t",
19
+ propsAsIs: true
20
+ });
21
+
22
+ exports.StyledButton = StyledButton;
23
+ //# sourceMappingURL=Button.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.styles.js","sources":["../../../../../src/components/Attach/ui/Button/Button.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { buttonConfig, buttonTokens } from '../../../Button';\nimport { tokens as attachTokens } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedConfig);\n\nexport const StyledButton = styled(Button)`\n ${buttonTokens.buttonColor}: var(${attachTokens.buttonColor});\n ${buttonTokens.buttonBackgroundColor}: var(${attachTokens.buttonBackgroundColor});\n ${buttonTokens.buttonColorHover}: var(${attachTokens.buttonColorHover});\n ${buttonTokens.buttonBackgroundColorHover}: var(${attachTokens.buttonBackgroundColorHover});\n ${buttonTokens.buttonColorActive}: var(${attachTokens.buttonColorActive});\n ${buttonTokens.buttonBackgroundColorActive}: var(${attachTokens.buttonBackgroundColorActive});\n\n ${buttonTokens.buttonHeight}: var(${attachTokens.buttonHeight});\n ${buttonTokens.buttonWidth}: var(${attachTokens.buttonWidth});\n ${buttonTokens.buttonPadding}: var(${attachTokens.buttonPadding});\n ${buttonTokens.buttonRadius}: var(${attachTokens.buttonRadius});\n\n ${buttonTokens.buttonFontFamily}: var(${attachTokens.buttonFontFamily});\n ${buttonTokens.buttonFontSize}: var(${attachTokens.buttonFontSize});\n ${buttonTokens.buttonFontStyle}: var(${attachTokens.buttonFontStyle});\n ${buttonTokens.buttonFontWeight}: var(${attachTokens.buttonFontWeight});\n ${buttonTokens.buttonLetterSpacing}: var(${attachTokens.buttonLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${attachTokens.buttonLineHeight});\n`;\n"],"names":["mergedConfig","mergeConfig","buttonConfig","Button","component","_exp","StyledButton","styled","name","class","propsAsIs"],"mappings":";;;;;;;;;AAMA,IAAMA,YAAY,gBAAGC,kBAAW,CAACC,qBAAY,CAAC,CAAA;AAC9C,IAAMC,MAAM,gBAAGC,gBAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANrBA,SAMqBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,MAAM,CAAA;AAAA,CAAA,CAAA;AAAlC,IAAMG,YAAY,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAmBjC;;;;"}
@@ -0,0 +1 @@
1
+ .sfplb1t{--plasma-button-color:var(--plasma-attach-button-color);--plasma-button-background-color:var(--plasma-attach-button-background-color);--plasma-button-color-hover:var(--plasma-attach-button-color-hover);--plasma-button-background-color-hover:var(--plasma-attach-button-background-color-hover);--plasma-button-color-active:var(--plasma-attach-button-color-active);--plasma-button-background-color-active:var(--plasma-attach-button-background-color-active);--plasma-button-height:var(--plasma-attach-button-height);--plasma-button-width:var(--plasma-attach-button-width);--plasma-button-padding:var(--plasma-attach-button-padding);--plasma-button-radius:var(--plasma-attach-button-radius);--plasma-button-font-family:var(--plasma-attach-button-font-family);--plasma-button-font-size:var(--plasma-attach-button-font-size);--plasma-button-font-style:var(--plasma-attach-button-font-style);--plasma-button-font-weight:var(--plasma-attach-button-font-weight);--plasma-button-letter-spacing:var(--plasma-attach-button-letter-spacing);--plasma-button-line-height:var(--plasma-attach-button-line-height);}
@@ -0,0 +1,25 @@
1
+ import './Cell.styles_1dlvsak.css';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var react = require('@linaria/react');
7
+ require('@linaria/core');
8
+ var common = require('../../../../engines/common.js');
9
+ require('react');
10
+ require('styled-components');
11
+ var Cell$1 = require('../../../Cell/Cell.js');
12
+
13
+ var mergedConfig = /*#__PURE__*/common.mergeConfig(Cell$1.cellConfig);
14
+ var Cell = /*#__PURE__*/common.component(mergedConfig);
15
+ var _exp = function _exp() {
16
+ return Cell;
17
+ };
18
+ var StyledCell = /*#__PURE__*/react.styled(_exp())({
19
+ name: "StyledCell",
20
+ "class": "si1k6gv",
21
+ propsAsIs: true
22
+ });
23
+
24
+ exports.StyledCell = StyledCell;
25
+ //# sourceMappingURL=Cell.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cell.styles.js","sources":["../../../../../src/components/Attach/ui/Cell/Cell.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { cellConfig, cellTokens } from '../../../Cell';\nimport { tokens as attachTokens, classes } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(cellConfig);\nconst Cell = component(mergedConfig);\n\nexport const StyledCell = styled(Cell)`\n ${cellTokens.cellLabelColor}: var(${attachTokens.cellLabelColor});\n ${cellTokens.cellTitleColor}: var(${attachTokens.cellTitleColor});\n ${cellTokens.cellSubtitleColor}: var(${attachTokens.cellSubtitleColor});\n ${cellTokens.cellBackgroundColor}: var(${attachTokens.cellBackgroundColor});\n\n ${cellTokens.cellWidth}: var(${attachTokens.cellWidth});\n ${cellTokens.cellPadding}: var(${attachTokens.cellPadding});\n ${cellTokens.cellPaddingLeftContent}: var(${attachTokens.cellPaddingLeftContent});\n ${cellTokens.cellPaddingContent}: var(${attachTokens.cellPaddingContent});\n ${cellTokens.cellPaddingRightContent}: var(${attachTokens.cellPaddingRightContent});\n\n ${cellTokens.cellTextboxGap}: var(${attachTokens.cellTextboxGap});\n ${cellTokens.cellGap}: var(${attachTokens.cellGap});\n\n ${cellTokens.cellLabelFontFamily}: var(${attachTokens.cellLabelFontFamily});\n ${cellTokens.cellLabelFontSize}: var(${attachTokens.cellLabelFontSize});\n ${cellTokens.cellLabelFontStyle}: var(${attachTokens.cellLabelFontStyle});\n ${cellTokens.cellLabelFontWeight}: var(${attachTokens.cellLabelFontWeight});\n ${cellTokens.cellLabelLetterSpacing}: var(${attachTokens.cellLabelLetterSpacing});\n ${cellTokens.cellLabelLineHeight}: var(${attachTokens.cellLabelLineHeight});\n\n ${cellTokens.cellTitleFontFamily}: var(${attachTokens.cellTitleFontFamily});\n ${cellTokens.cellTitleFontSize}: var(${attachTokens.cellTitleFontSize});\n ${cellTokens.cellTitleFontStyle}: var(${attachTokens.cellTitleFontStyle});\n ${cellTokens.cellTitleFontWeight}: var(${attachTokens.cellTitleFontWeight});\n ${cellTokens.cellTitleLetterSpacing}: var(${attachTokens.cellTitleLetterSpacing});\n ${cellTokens.cellTitleLineHeight}: var(${attachTokens.cellTitleLineHeight});\n\n ${cellTokens.cellSubtitleFontFamily}: var(${attachTokens.cellSubtitleFontFamily});\n ${cellTokens.cellSubtitleFontSize}: var(${attachTokens.cellSubtitleFontSize});\n ${cellTokens.cellSubtitleFontStyle}: var(${attachTokens.cellSubtitleFontStyle});\n ${cellTokens.cellSubtitleFontWeight}: var(${attachTokens.cellSubtitleFontWeight});\n ${cellTokens.cellSubtitleLetterSpacing}: var(${attachTokens.cellSubtitleLetterSpacing});\n ${cellTokens.cellSubtitleLineHeight}: var(${attachTokens.cellSubtitleLineHeight});\n\n width: fit-content !important;\n\n &.${classes.cellHidden} {\n visibility: hidden;\n }\n`;\n"],"names":["mergedConfig","mergeConfig","cellConfig","Cell","component","_exp","StyledCell","styled","name","class","propsAsIs"],"mappings":";;;;;;;;;;;AAMA,IAAMA,YAAY,gBAAGC,kBAAW,CAACC,iBAAU,CAAC,CAAA;AAC5C,IAAMC,IAAI,gBAAGC,gBAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANnBA,SAMmBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,IAAI,CAAA;AAAA,CAAA,CAAA;AAA9B,IAAMG,UAAU,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAyC/B;;;;"}
@@ -0,0 +1 @@
1
+ .si1k6gv{--plasma-cell-label-color:var(--plasma-attach-cell-label-color);--plasma-cell-title-color:var(--plasma-attach-cell-title-color);--plasma-cell-subtitle-color:var(--plasma-attach-cell-subtitle-color);--plasma-cell-background-color:var(--plasma-attach-cell-background-color);--plasma-cell-width:var(--plasma-attach-cell-width);--plasma-cell-padding:var(--plasma-attach-cell-padding);--plasma-cell-padding-left-content:var(--plasma-attach-cell-padding-left-content);--plasma-cell-padding-content:var(--plasma-attach-cell-padding-content);--plasma-cell-padding-right-content:var(--plasma-attach-cell-padding-right-content);--plasma-cell-textbox-gap:var(--plasma-attach-cell-textbox-gap);--plasma-cell-gap:var(--plasma-attach-cell-gap);--plasma-cell-label-font-family:var(--plasma-attach-cell-label-font-family);--plasma-cell-label-font-size:var(--plasma-attach-cell-label-font-size);--plasma-cell-label-font-style:var(--plasma-attach-cell-label-font-style);--plasma-cell-label-font-weight:var(--plasma-attach-cell-label-font-weight);--plasma-cell-label-letter-spacing:var(--plasma-attach-cell-label-letter-spacing);--plasma-cell-label-line-height:var(--plasma-attach-cell-label-line-height);--plasma-cell-title-font-family:var(--plasma-attach-cell-title-font-family);--plasma-cell-title-font-size:var(--plasma-attach-cell-title-font-size);--plasma-cell-title-font-style:var(--plasma-attach-cell-title-font-style);--plasma-cell-title-font-weight:var(--plasma-attach-cell-title-font-weight);--plasma-cell-title-letter-spacing:var(--plasma-attach-cell-title-letter-spacing);--plasma-cell-title-line-height:var(--plasma-attach-cell-title-line-height);--plasma-cell-subtitle-font-family:var(--plasma-attach-cell-subtitle-font-family);--plasma-cell-subtitle-font-size:var(--plasma-attach-cell-subtitle-font-size);--plasma-cell-subtitle-font-style:var(--plasma-attach-cell-subtitle-font-style);--plasma-cell-subtitle-font-weight:var(--plasma-attach-cell-subtitle-font-weight);--plasma-cell-subtitle-letter-spacing:var(--plasma-attach-cell-subtitle-letter-spacing);--plasma-cell-subtitle-line-height:var(--plasma-attach-cell-subtitle-line-height);width:-webkit-fit-content !important;width:-moz-fit-content !important;width:fit-content !important;}.si1k6gv.cell-hidden{visibility:hidden;}
@@ -0,0 +1,23 @@
1
+ import './IconButton.styles_14dty7n.css';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var react = require('@linaria/react');
7
+ require('@linaria/core');
8
+ var common = require('../../../../engines/common.js');
9
+ var IconButton$1 = require('../../../IconButton/IconButton.js');
10
+
11
+ var mergedConfig = /*#__PURE__*/common.mergeConfig(IconButton$1.iconButtonConfig);
12
+ var IconButton = /*#__PURE__*/common.component(mergedConfig);
13
+ var _exp = function _exp() {
14
+ return IconButton;
15
+ };
16
+ var StyledIconButton = /*#__PURE__*/react.styled(_exp())({
17
+ name: "StyledIconButton",
18
+ "class": "sdel9u5",
19
+ propsAsIs: true
20
+ });
21
+
22
+ exports.StyledIconButton = StyledIconButton;
23
+ //# sourceMappingURL=IconButton.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.styles.js","sources":["../../../../../src/components/Attach/ui/iconButton/IconButton.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { iconButtonConfig, iconButtonTokens } from '../../../IconButton';\nimport { tokens as attachTokens } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(iconButtonConfig);\nconst IconButton = component(mergedConfig);\n\nexport const StyledIconButton = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${attachTokens.iconButtonColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${attachTokens.iconButtonBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${attachTokens.iconButtonColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${attachTokens.iconButtonBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${attachTokens.iconButtonColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${attachTokens.iconButtonBackgroundColorActive});\n\n ${iconButtonTokens.iconButtonHeight}: var(${attachTokens.iconButtonHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${attachTokens.iconButtonWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${attachTokens.iconButtonPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${attachTokens.iconButtonRadius});\n ${iconButtonTokens.iconButtonFontFamily}: var(${attachTokens.iconButtonFontFamily});\n ${iconButtonTokens.iconButtonFontSize}: var(${attachTokens.iconButtonFontSize});\n ${iconButtonTokens.iconButtonFontStyle}: var(${attachTokens.iconButtonFontStyle});\n ${iconButtonTokens.iconButtonFontWeight}: var(${attachTokens.iconButtonFontWeight});\n ${iconButtonTokens.iconButtonLetterSpacing}: var(${attachTokens.iconButtonLetterSpacing});\n ${iconButtonTokens.iconButtonLineHeight}: var(${attachTokens.iconButtonLineHeight});\n`;\n"],"names":["mergedConfig","mergeConfig","iconButtonConfig","IconButton","component","_exp","StyledIconButton","styled","name","class","propsAsIs"],"mappings":";;;;;;;;;AAMA,IAAMA,YAAY,gBAAGC,kBAAW,CAACC,6BAAgB,CAAC,CAAA;AAClD,IAAMC,UAAU,gBAAGC,gBAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANzBA,SAMyBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,UAAU,CAAA;AAAA,CAAA,CAAA;AAA1C,IAAMG,gBAAgB,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAkBrC;;;;"}
@@ -0,0 +1 @@
1
+ .sdel9u5{--plasma-icon-button-color:var(--plasma-attach-icon-button-color);--plasma-icon-button-background-color:var(--plasma-attach-icon-button-background-color);--plasma-icon-button-color-hover:var(--plasma-attach-icon-button-color-hover);--plasma-icon-button-background-color-hover:var(--plasma-attach-icon-button-background-color-hover);--plasma-icon-button-color-active:var(--plasma-attach-icon-button-color-active);--plasma-icon-button-background-color-active:var(--plasma-attach-icon-button-background-color-active);--plasma-icon-button-height:var(--plasma-attach-icon-button-height);--plasma-icon-button-width:var(--plasma-attach-icon-button-width);--plasma-icon-button-padding:var(--plasma-attach-icon-button-padding);--plasma-icon-button-radius:var(--plasma-attach-icon-button-radius);--plasma-icon-button-font-family:var(--plasma-attach-icon-button-font-family);--plasma-icon-button-font-size:var(--plasma-attach-icon-button-font-size);--plasma-icon-button-font-style:var(--plasma-attach-icon-button-font-style);--plasma-icon-button-font-weight:var(--plasma-attach-icon-button-font-weight);--plasma-icon-button-letter-spacing:var(--plasma-attach-icon-button-letter-spacing);--plasma-icon-button-line-height:var(--plasma-attach-icon-button-line-height);}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var extractExtension = function extractExtension(filename) {
6
+ return filename.split('.').pop();
7
+ };
8
+
9
+ exports.extractExtension = extractExtension;
10
+ //# sourceMappingURL=extractExtension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractExtension.js","sources":["../../../../src/components/Attach/utils/extractExtension.ts"],"sourcesContent":["export const extractExtension = (filename: string) => filename.split('.').pop();\n"],"names":["extractExtension","filename","split","pop"],"mappings":";;;;IAAaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,QAAgB,EAAA;EAAA,OAAKA,QAAQ,CAACC,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,EAAE,CAAA;AAAA;;;;"}
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var plasmaIcons = require('@salutejs/plasma-icons');
7
+
8
+ var _IconBlankPdfOutline, _IconBlankDocOutline, _IconBlankXlsOutline, _IconBlankTxtOutline, _IconBlankCsvOutline, _IconBlankOutline;
9
+ var getFileicon = function getFileicon(extension) {
10
+ switch (extension) {
11
+ case 'pdf':
12
+ return _IconBlankPdfOutline || (_IconBlankPdfOutline = /*#__PURE__*/React.createElement(plasmaIcons.IconBlankPdfOutline, null));
13
+ case 'doc':
14
+ return _IconBlankDocOutline || (_IconBlankDocOutline = /*#__PURE__*/React.createElement(plasmaIcons.IconBlankDocOutline, null));
15
+ case 'xls':
16
+ return _IconBlankXlsOutline || (_IconBlankXlsOutline = /*#__PURE__*/React.createElement(plasmaIcons.IconBlankXlsOutline, null));
17
+ case 'txt':
18
+ return _IconBlankTxtOutline || (_IconBlankTxtOutline = /*#__PURE__*/React.createElement(plasmaIcons.IconBlankTxtOutline, null));
19
+ case 'csv':
20
+ return _IconBlankCsvOutline || (_IconBlankCsvOutline = /*#__PURE__*/React.createElement(plasmaIcons.IconBlankCsvOutline, null));
21
+ default:
22
+ return _IconBlankOutline || (_IconBlankOutline = /*#__PURE__*/React.createElement(plasmaIcons.IconBlankOutline, null));
23
+ }
24
+ };
25
+
26
+ exports.getFileicon = getFileicon;
27
+ //# sourceMappingURL=getFileicon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFileicon.js","sources":["../../../../src/components/Attach/utils/getFileicon.tsx"],"sourcesContent":["import React from 'react';\nimport {\n IconBlankCsvOutline,\n IconBlankDocOutline,\n IconBlankOutline,\n IconBlankPdfOutline,\n IconBlankTxtOutline,\n IconBlankXlsOutline,\n} from '@salutejs/plasma-icons';\n\nexport const getFileicon = (extension: string) => {\n switch (extension) {\n case 'pdf':\n return <IconBlankPdfOutline />;\n case 'doc':\n return <IconBlankDocOutline />;\n case 'xls':\n return <IconBlankXlsOutline />;\n case 'txt':\n return <IconBlankTxtOutline />;\n case 'csv':\n return <IconBlankCsvOutline />;\n default:\n return <IconBlankOutline />;\n }\n};\n"],"names":["getFileicon","extension","_IconBlankPdfOutline","React","createElement","IconBlankPdfOutline","_IconBlankDocOutline","IconBlankDocOutline","_IconBlankXlsOutline","IconBlankXlsOutline","_IconBlankTxtOutline","IconBlankTxtOutline","_IconBlankCsvOutline","IconBlankCsvOutline","_IconBlankOutline","IconBlankOutline"],"mappings":";;;;;;;;IAUaA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,SAAiB,EAAK;AAC9C,EAAA,QAAQA,SAAS;AACb,IAAA,KAAK,KAAK;MACN,OAAAC,oBAAA,KAAAA,oBAAA,gBAAOC,KAAA,CAAAC,aAAA,CAACC,+BAAmB,EAAA,IAAE,CAAC,CAAA,CAAA;AAClC,IAAA,KAAK,KAAK;MACN,OAAAC,oBAAA,KAAAA,oBAAA,gBAAOH,KAAA,CAAAC,aAAA,CAACG,+BAAmB,EAAA,IAAE,CAAC,CAAA,CAAA;AAClC,IAAA,KAAK,KAAK;MACN,OAAAC,oBAAA,KAAAA,oBAAA,gBAAOL,KAAA,CAAAC,aAAA,CAACK,+BAAmB,EAAA,IAAE,CAAC,CAAA,CAAA;AAClC,IAAA,KAAK,KAAK;MACN,OAAAC,oBAAA,KAAAA,oBAAA,gBAAOP,KAAA,CAAAC,aAAA,CAACO,+BAAmB,EAAA,IAAE,CAAC,CAAA,CAAA;AAClC,IAAA,KAAK,KAAK;MACN,OAAAC,oBAAA,KAAAA,oBAAA,gBAAOT,KAAA,CAAAC,aAAA,CAACS,+BAAmB,EAAA,IAAE,CAAC,CAAA,CAAA;AAClC,IAAA;MACI,OAAAC,iBAAA,KAAAA,iBAAA,gBAAOX,KAAA,CAAAC,aAAA,CAACW,4BAAgB,EAAA,IAAE,CAAC,CAAA,CAAA;AACnC,GAAA;AACJ;;;;"}
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var truncateFilename = function truncateFilename(filename, startTruncationIndex) {
6
+ var separator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '...';
7
+ var strings = filename.split('.');
8
+ var extension = strings.length > 1 ? strings[strings.length - 1] : null;
9
+ var left = strings.length > 1 ? strings.slice(0, -1).join('.') : strings[0];
10
+ var lastFilenameLetter = left[left.length - 1];
11
+ var truncatedFilename = "".concat(left.substring(0, startTruncationIndex)).concat(separator).concat(lastFilenameLetter);
12
+ return extension ? "".concat(truncatedFilename, ".").concat(extension) : truncatedFilename;
13
+ };
14
+
15
+ exports.truncateFilename = truncateFilename;
16
+ //# sourceMappingURL=truncateFilename.js.map