@salutejs/plasma-new-hope 0.146.0-dev.0 → 0.147.0-canary.1437.10892194926.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) 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.template-doc.mdx +46 -0
  38. package/emotion/cjs/components/Attach/Attach.tokens.js +81 -0
  39. package/emotion/cjs/components/Attach/Attach.types.js +5 -0
  40. package/emotion/cjs/components/Attach/index.js +25 -0
  41. package/emotion/cjs/components/Attach/ui/Button/Button.js +12 -0
  42. package/emotion/cjs/components/Attach/ui/Button/Button.styles.js +17 -0
  43. package/emotion/cjs/components/Attach/ui/Cell/Cell.js +12 -0
  44. package/emotion/cjs/components/Attach/ui/Cell/Cell.styles.js +17 -0
  45. package/emotion/cjs/components/Attach/ui/iconButton/IconButton.js +12 -0
  46. package/emotion/cjs/components/Attach/ui/iconButton/IconButton.styles.js +17 -0
  47. package/emotion/cjs/components/Attach/utils/extractExtension.js +9 -0
  48. package/emotion/cjs/components/Attach/utils/getFileicon.js +26 -0
  49. package/emotion/cjs/components/Attach/utils/index.js +26 -0
  50. package/emotion/cjs/components/Attach/utils/truncateFilename.js +15 -0
  51. package/emotion/cjs/components/Attach/variations/_size/base.js +9 -0
  52. package/emotion/cjs/components/Attach/variations/_view/base.js +9 -0
  53. package/emotion/cjs/components/Cell/Cell.js +3 -2
  54. package/emotion/cjs/examples/plasma_b2c/components/Attach/Attach.config.js +25 -0
  55. package/emotion/cjs/examples/plasma_b2c/components/Attach/Attach.js +11 -0
  56. package/emotion/cjs/examples/plasma_b2c/components/Attach/Attach.stories.tsx +61 -0
  57. package/emotion/cjs/examples/plasma_web/components/Attach/Attach.config.js +25 -0
  58. package/emotion/cjs/examples/plasma_web/components/Attach/Attach.js +11 -0
  59. package/emotion/cjs/examples/plasma_web/components/Attach/Attach.stories.tsx +61 -0
  60. package/emotion/cjs/index.js +11 -0
  61. package/emotion/es/components/Attach/Attach.js +171 -0
  62. package/emotion/es/components/Attach/Attach.styles.js +29 -0
  63. package/emotion/es/components/Attach/Attach.template-doc.mdx +46 -0
  64. package/emotion/es/components/Attach/Attach.tokens.js +75 -0
  65. package/emotion/es/components/Attach/Attach.types.js +1 -0
  66. package/emotion/es/components/Attach/index.js +2 -0
  67. package/emotion/es/components/Attach/ui/Button/Button.js +1 -0
  68. package/emotion/es/components/Attach/ui/Button/Button.styles.js +10 -0
  69. package/emotion/es/components/Attach/ui/Cell/Cell.js +1 -0
  70. package/emotion/es/components/Attach/ui/Cell/Cell.styles.js +10 -0
  71. package/emotion/es/components/Attach/ui/iconButton/IconButton.js +1 -0
  72. package/emotion/es/components/Attach/ui/iconButton/IconButton.styles.js +10 -0
  73. package/emotion/es/components/Attach/utils/extractExtension.js +3 -0
  74. package/emotion/es/components/Attach/utils/getFileicon.js +19 -0
  75. package/emotion/es/components/Attach/utils/index.js +3 -0
  76. package/emotion/es/components/Attach/utils/truncateFilename.js +9 -0
  77. package/emotion/es/components/Attach/variations/_size/base.js +3 -0
  78. package/emotion/es/components/Attach/variations/_view/base.js +3 -0
  79. package/emotion/es/components/Cell/Cell.js +3 -2
  80. package/emotion/es/examples/plasma_b2c/components/Attach/Attach.config.js +19 -0
  81. package/emotion/es/examples/plasma_b2c/components/Attach/Attach.js +5 -0
  82. package/emotion/es/examples/plasma_b2c/components/Attach/Attach.stories.tsx +61 -0
  83. package/emotion/es/examples/plasma_web/components/Attach/Attach.config.js +19 -0
  84. package/emotion/es/examples/plasma_web/components/Attach/Attach.js +5 -0
  85. package/emotion/es/examples/plasma_web/components/Attach/Attach.stories.tsx +61 -0
  86. package/emotion/es/index.js +2 -1
  87. package/es/components/Attach/Attach.css +45 -0
  88. package/es/components/Attach/Attach.js +169 -0
  89. package/es/components/Attach/Attach.js.map +1 -0
  90. package/es/components/Attach/Attach.styles.js +17 -0
  91. package/es/components/Attach/Attach.styles.js.map +1 -0
  92. package/es/components/Attach/Attach.styles_17fejif.css +3 -0
  93. package/es/components/Attach/Attach.tokens.js +78 -0
  94. package/es/components/Attach/Attach.tokens.js.map +1 -0
  95. package/es/components/Attach/ui/Button/Button.styles.js +19 -0
  96. package/es/components/Attach/ui/Button/Button.styles.js.map +1 -0
  97. package/es/components/Attach/ui/Button/Button.styles_oi6jxf.css +1 -0
  98. package/es/components/Attach/ui/Cell/Cell.styles.js +21 -0
  99. package/es/components/Attach/ui/Cell/Cell.styles.js.map +1 -0
  100. package/es/components/Attach/ui/Cell/Cell.styles_1dlvsak.css +1 -0
  101. package/es/components/Attach/ui/iconButton/IconButton.styles.js +19 -0
  102. package/es/components/Attach/ui/iconButton/IconButton.styles.js.map +1 -0
  103. package/es/components/Attach/ui/iconButton/IconButton.styles_14dty7n.css +1 -0
  104. package/es/components/Attach/utils/extractExtension.js +6 -0
  105. package/es/components/Attach/utils/extractExtension.js.map +1 -0
  106. package/es/components/Attach/utils/getFileicon.js +23 -0
  107. package/es/components/Attach/utils/getFileicon.js.map +1 -0
  108. package/es/components/Attach/utils/truncateFilename.js +12 -0
  109. package/es/components/Attach/utils/truncateFilename.js.map +1 -0
  110. package/es/components/Attach/variations/_size/base.js +5 -0
  111. package/es/components/Attach/variations/_size/base.js.map +1 -0
  112. package/es/components/Attach/variations/_size/base_eax0b8.css +1 -0
  113. package/es/components/Attach/variations/_view/base.js +5 -0
  114. package/es/components/Attach/variations/_view/base.js.map +1 -0
  115. package/es/components/Attach/variations/_view/base_1nvsg1b.css +1 -0
  116. package/es/components/Cell/Cell.js +3 -2
  117. package/es/components/Cell/Cell.js.map +1 -1
  118. package/es/index.css +14 -0
  119. package/es/index.js +2 -0
  120. package/es/index.js.map +1 -1
  121. package/package.json +3 -2
  122. package/styled-components/cjs/components/Attach/Attach.js +180 -0
  123. package/styled-components/cjs/components/Attach/Attach.styles.js +18 -0
  124. package/styled-components/cjs/components/Attach/Attach.template-doc.mdx +46 -0
  125. package/styled-components/cjs/components/Attach/Attach.tokens.js +81 -0
  126. package/styled-components/cjs/components/Attach/Attach.types.js +5 -0
  127. package/styled-components/cjs/components/Attach/index.js +25 -0
  128. package/styled-components/cjs/components/Attach/ui/Button/Button.js +12 -0
  129. package/styled-components/cjs/components/Attach/ui/Button/Button.styles.js +16 -0
  130. package/styled-components/cjs/components/Attach/ui/Cell/Cell.js +12 -0
  131. package/styled-components/cjs/components/Attach/ui/Cell/Cell.styles.js +16 -0
  132. package/styled-components/cjs/components/Attach/ui/iconButton/IconButton.js +12 -0
  133. package/styled-components/cjs/components/Attach/ui/iconButton/IconButton.styles.js +16 -0
  134. package/styled-components/cjs/components/Attach/utils/extractExtension.js +9 -0
  135. package/styled-components/cjs/components/Attach/utils/getFileicon.js +26 -0
  136. package/styled-components/cjs/components/Attach/utils/index.js +26 -0
  137. package/styled-components/cjs/components/Attach/utils/truncateFilename.js +15 -0
  138. package/styled-components/cjs/components/Attach/variations/_size/base.js +9 -0
  139. package/styled-components/cjs/components/Attach/variations/_view/base.js +9 -0
  140. package/styled-components/cjs/components/Cell/Cell.js +3 -2
  141. package/styled-components/cjs/examples/plasma_b2c/components/Attach/Attach.config.js +25 -0
  142. package/styled-components/cjs/examples/plasma_b2c/components/Attach/Attach.js +11 -0
  143. package/styled-components/cjs/examples/plasma_b2c/components/Attach/Attach.stories.tsx +61 -0
  144. package/styled-components/cjs/examples/plasma_web/components/Attach/Attach.config.js +25 -0
  145. package/styled-components/cjs/examples/plasma_web/components/Attach/Attach.js +11 -0
  146. package/styled-components/cjs/examples/plasma_web/components/Attach/Attach.stories.tsx +61 -0
  147. package/styled-components/cjs/index.js +11 -0
  148. package/styled-components/es/components/Attach/Attach.js +171 -0
  149. package/styled-components/es/components/Attach/Attach.styles.js +10 -0
  150. package/styled-components/es/components/Attach/Attach.template-doc.mdx +46 -0
  151. package/styled-components/es/components/Attach/Attach.tokens.js +75 -0
  152. package/styled-components/es/components/Attach/Attach.types.js +1 -0
  153. package/styled-components/es/components/Attach/index.js +2 -0
  154. package/styled-components/es/components/Attach/ui/Button/Button.js +1 -0
  155. package/styled-components/es/components/Attach/ui/Button/Button.styles.js +9 -0
  156. package/styled-components/es/components/Attach/ui/Cell/Cell.js +1 -0
  157. package/styled-components/es/components/Attach/ui/Cell/Cell.styles.js +9 -0
  158. package/styled-components/es/components/Attach/ui/iconButton/IconButton.js +1 -0
  159. package/styled-components/es/components/Attach/ui/iconButton/IconButton.styles.js +9 -0
  160. package/styled-components/es/components/Attach/utils/extractExtension.js +3 -0
  161. package/styled-components/es/components/Attach/utils/getFileicon.js +19 -0
  162. package/styled-components/es/components/Attach/utils/index.js +3 -0
  163. package/styled-components/es/components/Attach/utils/truncateFilename.js +9 -0
  164. package/styled-components/es/components/Attach/variations/_size/base.js +3 -0
  165. package/styled-components/es/components/Attach/variations/_view/base.js +3 -0
  166. package/styled-components/es/components/Cell/Cell.js +3 -2
  167. package/styled-components/es/examples/plasma_b2c/components/Attach/Attach.config.js +19 -0
  168. package/styled-components/es/examples/plasma_b2c/components/Attach/Attach.js +5 -0
  169. package/styled-components/es/examples/plasma_b2c/components/Attach/Attach.stories.tsx +61 -0
  170. package/styled-components/es/examples/plasma_web/components/Attach/Attach.config.js +19 -0
  171. package/styled-components/es/examples/plasma_web/components/Attach/Attach.js +5 -0
  172. package/styled-components/es/examples/plasma_web/components/Attach/Attach.stories.tsx +61 -0
  173. package/styled-components/es/index.js +2 -1
  174. package/types/components/Attach/Attach.d.ts +23 -0
  175. package/types/components/Attach/Attach.d.ts.map +1 -0
  176. package/types/components/Attach/Attach.styles.d.ts +5 -0
  177. package/types/components/Attach/Attach.styles.d.ts.map +1 -0
  178. package/types/components/Attach/Attach.tokens.d.ts +73 -0
  179. package/types/components/Attach/Attach.tokens.d.ts.map +1 -0
  180. package/types/components/Attach/Attach.types.d.ts +33 -0
  181. package/types/components/Attach/Attach.types.d.ts.map +1 -0
  182. package/types/components/Attach/index.d.ts +4 -0
  183. package/types/components/Attach/index.d.ts.map +1 -0
  184. package/types/components/Attach/ui/Button/Button.d.ts +2 -0
  185. package/types/components/Attach/ui/Button/Button.d.ts.map +1 -0
  186. package/types/components/Attach/ui/Button/Button.styles.d.ts +45 -0
  187. package/types/components/Attach/ui/Button/Button.styles.d.ts.map +1 -0
  188. package/types/components/Attach/ui/Cell/Cell.d.ts +2 -0
  189. package/types/components/Attach/ui/Cell/Cell.d.ts.map +1 -0
  190. package/types/components/Attach/ui/Cell/Cell.styles.d.ts +33 -0
  191. package/types/components/Attach/ui/Cell/Cell.styles.d.ts.map +1 -0
  192. package/types/components/Attach/ui/iconButton/IconButton.d.ts +2 -0
  193. package/types/components/Attach/ui/iconButton/IconButton.d.ts.map +1 -0
  194. package/types/components/Attach/ui/iconButton/IconButton.styles.d.ts +45 -0
  195. package/types/components/Attach/ui/iconButton/IconButton.styles.d.ts.map +1 -0
  196. package/types/components/Attach/utils/extractExtension.d.ts +2 -0
  197. package/types/components/Attach/utils/extractExtension.d.ts.map +1 -0
  198. package/types/components/Attach/utils/getFileicon.d.ts +3 -0
  199. package/types/components/Attach/utils/getFileicon.d.ts.map +1 -0
  200. package/types/components/Attach/utils/index.d.ts +4 -0
  201. package/types/components/Attach/utils/index.d.ts.map +1 -0
  202. package/types/components/Attach/utils/truncateFilename.d.ts +2 -0
  203. package/types/components/Attach/utils/truncateFilename.d.ts.map +1 -0
  204. package/types/components/Attach/variations/_size/base.d.ts +2 -0
  205. package/types/components/Attach/variations/_size/base.d.ts.map +1 -0
  206. package/types/components/Attach/variations/_view/base.d.ts +2 -0
  207. package/types/components/Attach/variations/_view/base.d.ts.map +1 -0
  208. package/types/components/Cell/Cell.d.ts.map +1 -1
  209. package/types/components/Cell/Cell.types.d.ts +1 -1
  210. package/types/components/Cell/Cell.types.d.ts.map +1 -1
  211. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.d.ts +2 -2
  212. package/types/examples/plasma_b2c/components/Attach/Attach.config.d.ts +18 -0
  213. package/types/examples/plasma_b2c/components/Attach/Attach.config.d.ts.map +1 -0
  214. package/types/examples/plasma_b2c/components/Attach/Attach.d.ts +13 -0
  215. package/types/examples/plasma_b2c/components/Attach/Attach.d.ts.map +1 -0
  216. package/types/examples/plasma_b2c/components/Cell/Cell.d.ts +2 -2
  217. package/types/examples/plasma_web/components/Attach/Attach.config.d.ts +18 -0
  218. package/types/examples/plasma_web/components/Attach/Attach.config.d.ts.map +1 -0
  219. package/types/examples/plasma_web/components/Attach/Attach.d.ts +13 -0
  220. package/types/examples/plasma_web/components/Attach/Attach.d.ts.map +1 -0
  221. package/types/examples/plasma_web/components/Cell/Cell.d.ts +2 -2
  222. package/types/index.d.ts +1 -0
  223. package/types/index.d.ts.map +1 -1
@@ -0,0 +1,169 @@
1
+ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React, { forwardRef, useRef, useState, useEffect } from 'react';
3
+ import { IconCloseCircleOutline } from '@salutejs/plasma-icons';
4
+ import { useForkRef, useResizeObserver } from '@salutejs/plasma-core';
5
+ import { cx } from '../../utils/index.js';
6
+ import { base as base$2 } from './variations/_size/base.js';
7
+ import { base as base$1 } from './variations/_view/base.js';
8
+ import { StyledHiddenInput, StyledHiddenInputHelper, base } from './Attach.styles.js';
9
+ import { StyledButton } from './ui/Button/Button.styles.js';
10
+ import { StyledCell } from './ui/Cell/Cell.styles.js';
11
+ import { StyledIconButton } from './ui/iconButton/IconButton.styles.js';
12
+ import { extractExtension } from './utils/extractExtension.js';
13
+ import { getFileicon } from './utils/getFileicon.js';
14
+ import { truncateFilename } from './utils/truncateFilename.js';
15
+ import { classes } from './Attach.tokens.js';
16
+
17
+ var _IconCloseCircleOutli;
18
+ var _excluded = ["flow", "text", "hasAttachment", "acceptedFileFormats", "size", "view", "className"];
19
+ var attachRoot = function attachRoot(Root) {
20
+ return /*#__PURE__*/forwardRef(function (props, outerRef) {
21
+ var _props$flow = props.flow,
22
+ flow = _props$flow === void 0 ? 'auto' : _props$flow,
23
+ _props$text = props.text,
24
+ text = _props$text === void 0 ? 'Загрузить файл' : _props$text,
25
+ _props$hasAttachment = props.hasAttachment,
26
+ hasAttachment = _props$hasAttachment === void 0 ? true : _props$hasAttachment,
27
+ acceptedFileFormats = props.acceptedFileFormats,
28
+ size = props.size,
29
+ view = props.view,
30
+ className = props.className,
31
+ rest = _objectWithoutProperties(props, _excluded);
32
+ var inputRef = useRef(null);
33
+ var inputHelperRef = useRef(null);
34
+ var cellRef = useRef(null);
35
+ var innerRef = useRef(null);
36
+ var ref = useForkRef(outerRef, innerRef);
37
+ var _useState = useState(null),
38
+ _useState2 = _slicedToArray(_useState, 2),
39
+ containerWidth = _useState2[0],
40
+ setContainerWidth = _useState2[1];
41
+ var _useState3 = useState(null),
42
+ _useState4 = _slicedToArray(_useState3, 2),
43
+ origFilename = _useState4[0],
44
+ setOrigFilename = _useState4[1];
45
+ var _useState5 = useState(null),
46
+ _useState6 = _slicedToArray(_useState5, 2),
47
+ filename = _useState6[0],
48
+ setFilename = _useState6[1];
49
+ var _useState7 = useState(false),
50
+ _useState8 = _slicedToArray(_useState7, 2),
51
+ shouldUpdateFilename = _useState8[0],
52
+ setShouldUpdateFilename = _useState8[1];
53
+ var horizontalClass = flow === 'horizontal' ? classes.horizontal : undefined;
54
+ var verticalClass = flow === 'vertical' ? classes.vertical : undefined;
55
+ var autoClass = flow === 'auto' ? classes.auto : undefined;
56
+ var cellHiddenClass = shouldUpdateFilename ? classes.cellHidden : undefined;
57
+ var accept = acceptedFileFormats === null || acceptedFileFormats === void 0 ? void 0 : acceptedFileFormats.join(',');
58
+ var extension = filename ? extractExtension(filename) : null;
59
+ var contentLeft = extension ? getFileicon(extension) : null;
60
+ var handleClick = function handleClick() {
61
+ if (!inputRef.current) {
62
+ return;
63
+ }
64
+ inputRef.current.click();
65
+ };
66
+ var handleChange = function handleChange() {
67
+ if (!inputRef.current || !inputRef.current.files) {
68
+ return;
69
+ }
70
+ setOrigFilename(inputRef.current.files[0].name);
71
+ };
72
+ var handleClear = function handleClear() {
73
+ if (!inputRef.current) {
74
+ return;
75
+ }
76
+ inputRef.current.value = '';
77
+ setOrigFilename(null);
78
+ };
79
+ useResizeObserver(innerRef, function (container) {
80
+ setContainerWidth(container.offsetWidth);
81
+ });
82
+ useEffect(function () {
83
+ setFilename(origFilename);
84
+ setShouldUpdateFilename(true);
85
+ }, [size, view, flow, origFilename, containerWidth]);
86
+ useEffect(function () {
87
+ if (!cellRef.current || !cellRef.current.parentElement || !inputHelperRef.current || !inputHelperRef.current.textContent || !origFilename || !shouldUpdateFilename) {
88
+ setShouldUpdateFilename(false);
89
+ return;
90
+ }
91
+ var textWidth = inputHelperRef.current.offsetWidth;
92
+ var _cellRef$current$getB = cellRef.current.getBoundingClientRect(),
93
+ cellWidth = _cellRef$current$getB.width,
94
+ cellLeft = _cellRef$current$getB.left;
95
+ var _cellRef$current$pare = cellRef.current.parentElement.getBoundingClientRect(),
96
+ parentWidth = _cellRef$current$pare.width,
97
+ parentLeft = _cellRef$current$pare.left;
98
+ var cellLeftRightContentWidth = cellWidth - textWidth;
99
+ var leftDiff = cellLeft - parentLeft;
100
+ var index = origFilename.length - 1;
101
+ var currentTextWidth = textWidth;
102
+ var resultFilename = origFilename;
103
+ while (currentTextWidth + cellLeftRightContentWidth + leftDiff > parentWidth && index >= 1) {
104
+ var truncatedFilename = truncateFilename(inputHelperRef.current.textContent, index);
105
+ inputHelperRef.current.textContent = truncatedFilename;
106
+ resultFilename = truncatedFilename;
107
+ currentTextWidth = inputHelperRef.current.offsetWidth;
108
+ index -= 1;
109
+ }
110
+ inputHelperRef.current.textContent = origFilename;
111
+ setFilename(resultFilename);
112
+ setShouldUpdateFilename(false);
113
+ }, [shouldUpdateFilename]);
114
+ return /*#__PURE__*/React.createElement(Root, _extends({
115
+ className: cx(horizontalClass, verticalClass, autoClass, className),
116
+ size: size,
117
+ view: view,
118
+ ref: ref
119
+ }, rest), /*#__PURE__*/React.createElement(StyledHiddenInput, {
120
+ ref: inputRef,
121
+ accept: accept,
122
+ type: "file",
123
+ id: "attachHiddenInput",
124
+ name: "attachHiddenInput",
125
+ onChange: handleChange
126
+ }), /*#__PURE__*/React.createElement(StyledHiddenInputHelper, {
127
+ ref: inputHelperRef,
128
+ id: "attachHiddenInputHelper"
129
+ }, origFilename), /*#__PURE__*/React.createElement(StyledButton, {
130
+ size: size,
131
+ view: view,
132
+ onClick: handleClick,
133
+ text: text
134
+ }), hasAttachment && filename && /*#__PURE__*/React.createElement(StyledCell, {
135
+ className: cellHiddenClass,
136
+ ref: cellRef,
137
+ size: size,
138
+ view: view,
139
+ title: filename,
140
+ contentLeft: contentLeft,
141
+ contentRight: /*#__PURE__*/React.createElement(StyledIconButton, {
142
+ onClick: handleClear
143
+ }, _IconCloseCircleOutli || (_IconCloseCircleOutli = /*#__PURE__*/React.createElement(IconCloseCircleOutline, {
144
+ size: "xs"
145
+ })))
146
+ }));
147
+ });
148
+ };
149
+ var attachConfig = {
150
+ name: 'Attach',
151
+ tag: 'div',
152
+ layout: attachRoot,
153
+ base: base,
154
+ variations: {
155
+ view: {
156
+ css: base$1
157
+ },
158
+ size: {
159
+ css: base$2
160
+ }
161
+ },
162
+ defaults: {
163
+ view: 'default',
164
+ size: 'm'
165
+ }
166
+ };
167
+
168
+ export { attachConfig, attachRoot };
169
+ //# 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":";;;;;;;;;;;;;;;;;;IAiBaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,UAAU,CAA8B,UAACC,KAAK,EAAEC,QAAQ,EAAK;AACzD,IAAA,IAAAC,WAAA,GASIF,KAAK,CARLG,IAAI;AAAJA,MAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,WAAA;MAAAE,WAAA,GAQbJ,KAAK,CAPLK,IAAI;AAAJA,MAAAA,IAAI,GAAA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AAC3B5B,MAAAA,GAAG,EAAEF,OAAQ;AACbT,MAAAA,IAAI,EAAEA,IAAK;AACXC,MAAAA,IAAI,EAAEA,IAAK;AACX0F,MAAAA,KAAK,EAAElE,QAAS;AAChBoB,MAAAA,WAAW,EAAEA,WAAY;AACzB+C,MAAAA,YAAY,eACRb,KAAA,CAAAC,aAAA,CAACa,gBAAgB,EAAA;AAACJ,QAAAA,OAAO,EAAEpC,WAAAA;OAAYyC,EAAAA,qBAAA,KAAAA,qBAAA,gBACnCf,KAAA,CAAAC,aAAA,CAACe,sBAAsB,EAAA;AAAC/F,QAAAA,IAAI,EAAC,IAAA;AAAI,OAAE,CAAC,CACtB,CAAA;AACrB,KACJ,CAEH,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMgG,YAAY,GAAG;AACxB5C,EAAAA,IAAI,EAAE,QAAQ;AACd6C,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE9G,UAAU;AAClB+G,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACRnG,IAAAA,IAAI,EAAE;AACFoG,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDtG,IAAAA,IAAI,EAAE;AACFqG,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNvG,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
@@ -0,0 +1,17 @@
1
+ import './Attach.styles_17fejif.css';
2
+ import { styled } from '@linaria/react';
3
+
4
+ var base = "by826kf";
5
+ var StyledHiddenInput = /*#__PURE__*/styled('input')({
6
+ name: "StyledHiddenInput",
7
+ "class": "sw7vb9c",
8
+ propsAsIs: false
9
+ });
10
+ var StyledHiddenInputHelper = /*#__PURE__*/styled('div')({
11
+ name: "StyledHiddenInputHelper",
12
+ "class": "suojwhg",
13
+ propsAsIs: false
14
+ });
15
+
16
+ export { StyledHiddenInput, StyledHiddenInputHelper, base };
17
+ //# 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,MAAM,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,MAAM,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,78 @@
1
+ var classes = {
2
+ auto: 'auto',
3
+ horizontal: 'horizontal',
4
+ vertical: 'vertical',
5
+ cellHidden: 'cell-hidden'
6
+ };
7
+ var tokens = {
8
+ horizontalGap: '--plasma-attach-horizontal-gap',
9
+ verticalGap: '--plasma-attach-vertical-gap',
10
+ // Токены для Button
11
+ buttonColor: '--plasma-attach-button-color',
12
+ buttonBackgroundColor: '--plasma-attach-button-background-color',
13
+ buttonColorHover: '--plasma-attach-button-color-hover',
14
+ buttonBackgroundColorHover: '--plasma-attach-button-background-color-hover',
15
+ buttonColorActive: '--plasma-attach-button-color-active',
16
+ buttonBackgroundColorActive: '--plasma-attach-button-background-color-active',
17
+ buttonHeight: '--plasma-attach-button-height',
18
+ buttonWidth: '--plasma-attach-button-width',
19
+ buttonPadding: '--plasma-attach-button-padding',
20
+ buttonRadius: '--plasma-attach-button-radius',
21
+ buttonFontFamily: '--plasma-attach-button-font-family',
22
+ buttonFontSize: '--plasma-attach-button-font-size',
23
+ buttonFontStyle: '--plasma-attach-button-font-style',
24
+ buttonFontWeight: '--plasma-attach-button-font-weight',
25
+ buttonLetterSpacing: '--plasma-attach-button-letter-spacing',
26
+ buttonLineHeight: '--plasma-attach-button-line-height',
27
+ // Токены для Cell
28
+ cellColor: '--plasma-attach-cell-color',
29
+ cellLabelColor: '--plasma-attach-cell-label-color',
30
+ cellTitleColor: '--plasma-attach-cell-title-color',
31
+ cellSubtitleColor: '--plasma-attach-cell-subtitle-color',
32
+ cellBackgroundColor: '--plasma-attach-cell-background-color',
33
+ cellWidth: '--plasma-attach-cell-width',
34
+ cellPadding: '--plasma-attach-cell-padding',
35
+ cellPaddingLeftContent: '--plasma-attach-cell-padding-left-content',
36
+ cellPaddingContent: '--plasma-attach-cell-padding-content',
37
+ cellPaddingRightContent: '--plasma-attach-cell-padding-right-content',
38
+ cellTextboxGap: '--plasma-attach-cell-textbox-gap',
39
+ cellGap: '--plasma-attach-cell-gap',
40
+ cellLabelFontFamily: '--plasma-attach-cell-label-font-family',
41
+ cellLabelFontSize: '--plasma-attach-cell-label-font-size',
42
+ cellLabelFontStyle: '--plasma-attach-cell-label-font-style',
43
+ cellLabelFontWeight: '--plasma-attach-cell-label-font-weight',
44
+ cellLabelLetterSpacing: '--plasma-attach-cell-label-letter-spacing',
45
+ cellLabelLineHeight: '--plasma-attach-cell-label-line-height',
46
+ cellTitleFontFamily: '--plasma-attach-cell-title-font-family',
47
+ cellTitleFontSize: '--plasma-attach-cell-title-font-size',
48
+ cellTitleFontStyle: '--plasma-attach-cell-title-font-style',
49
+ cellTitleFontWeight: '--plasma-attach-cell-title-font-weight',
50
+ cellTitleLetterSpacing: '--plasma-attach-cell-title-letter-spacing',
51
+ cellTitleLineHeight: '--plasma-attach-cell-title-line-height',
52
+ cellSubtitleFontFamily: '--plasma-attach-cell-subtitle-font-family',
53
+ cellSubtitleFontSize: '--plasma-attach-cell-subtitle-font-size',
54
+ cellSubtitleFontStyle: '--plasma-attach-cell-subtitle-font-style',
55
+ cellSubtitleFontWeight: '--plasma-attach-cell-subtitle-font-weight',
56
+ cellSubtitleLetterSpacing: '--plasma-attach-cell-subtitle-letter-spacing',
57
+ cellSubtitleLineHeight: '--plasma-attach-cell-subtitle-line-height',
58
+ // Токены для IconButton
59
+ iconButtonColor: '--plasma-attach-icon-button-color',
60
+ iconButtonBackgroundColor: '--plasma-attach-icon-button-background-color',
61
+ iconButtonColorHover: '--plasma-attach-icon-button-color-hover',
62
+ iconButtonBackgroundColorHover: '--plasma-attach-icon-button-background-color-hover',
63
+ iconButtonColorActive: '--plasma-attach-icon-button-color-active',
64
+ iconButtonBackgroundColorActive: '--plasma-attach-icon-button-background-color-active',
65
+ iconButtonHeight: '--plasma-attach-icon-button-height',
66
+ iconButtonWidth: '--plasma-attach-icon-button-width',
67
+ iconButtonPadding: '--plasma-attach-icon-button-padding',
68
+ iconButtonRadius: '--plasma-attach-icon-button-radius',
69
+ iconButtonFontFamily: '--plasma-attach-icon-button-font-family',
70
+ iconButtonFontSize: '--plasma-attach-icon-button-font-size',
71
+ iconButtonFontStyle: '--plasma-attach-icon-button-font-style',
72
+ iconButtonFontWeight: '--plasma-attach-icon-button-font-weight',
73
+ iconButtonLetterSpacing: '--plasma-attach-icon-button-letter-spacing',
74
+ iconButtonLineHeight: '--plasma-attach-icon-button-line-height'
75
+ };
76
+
77
+ export { classes, tokens };
78
+ //# 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,YAAY,EAAE,+BAA+B;AAC7CC,EAAAA,WAAW,EAAE,8BAA8B;AAC3CC,EAAAA,aAAa,EAAE,gCAAgC;AAC/CC,EAAAA,YAAY,EAAE,+BAA+B;AAE7CC,EAAAA,gBAAgB,EAAE,oCAAoC;AACtDC,EAAAA,cAAc,EAAE,kCAAkC;AAClDC,EAAAA,eAAe,EAAE,mCAAmC;AACpDC,EAAAA,gBAAgB,EAAE,oCAAoC;AACtDC,EAAAA,mBAAmB,EAAE,uCAAuC;AAC5DC,EAAAA,gBAAgB,EAAE,oCAAoC;AAEtD;AACAC,EAAAA,SAAS,EAAE,4BAA4B;AACvCC,EAAAA,cAAc,EAAE,kCAAkC;AAClDC,EAAAA,cAAc,EAAE,kCAAkC;AAClDC,EAAAA,iBAAiB,EAAE,qCAAqC;AACxDC,EAAAA,mBAAmB,EAAE,uCAAuC;AAE5DC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;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,19 @@
1
+ import './Button.styles_oi6jxf.css';
2
+ import { styled } from '@linaria/react';
3
+ import '@linaria/core';
4
+ import { component, mergeConfig } from '../../../../engines/common.js';
5
+ import { buttonConfig } from '../../../Button/Button.js';
6
+
7
+ var mergedConfig = /*#__PURE__*/mergeConfig(buttonConfig);
8
+ var Button = /*#__PURE__*/component(mergedConfig);
9
+ var _exp = function _exp() {
10
+ return Button;
11
+ };
12
+ var StyledButton = /*#__PURE__*/styled(_exp())({
13
+ name: "StyledButton",
14
+ "class": "sfplb1t",
15
+ propsAsIs: true
16
+ });
17
+
18
+ export { StyledButton };
19
+ //# 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,WAAW,CAACC,YAAY,CAAC,CAAA;AAC9C,IAAMC,MAAM,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANrBA,SAMqBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,MAAM,CAAA;AAAA,CAAA,CAAA;AAAlC,IAAMG,YAAY,gBAAGC,MAAM,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,21 @@
1
+ import './Cell.styles_1dlvsak.css';
2
+ import { styled } from '@linaria/react';
3
+ import '@linaria/core';
4
+ import { component, mergeConfig } from '../../../../engines/common.js';
5
+ import 'react';
6
+ import 'styled-components';
7
+ import { cellConfig } from '../../../Cell/Cell.js';
8
+
9
+ var mergedConfig = /*#__PURE__*/mergeConfig(cellConfig);
10
+ var Cell = /*#__PURE__*/component(mergedConfig);
11
+ var _exp = function _exp() {
12
+ return Cell;
13
+ };
14
+ var StyledCell = /*#__PURE__*/styled(_exp())({
15
+ name: "StyledCell",
16
+ "class": "si1k6gv",
17
+ propsAsIs: true
18
+ });
19
+
20
+ export { StyledCell };
21
+ //# 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,WAAW,CAACC,UAAU,CAAC,CAAA;AAC5C,IAAMC,IAAI,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANnBA,SAMmBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,IAAI,CAAA;AAAA,CAAA,CAAA;AAA9B,IAAMG,UAAU,gBAAGC,MAAM,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,19 @@
1
+ import './IconButton.styles_14dty7n.css';
2
+ import { styled } from '@linaria/react';
3
+ import '@linaria/core';
4
+ import { component, mergeConfig } from '../../../../engines/common.js';
5
+ import { iconButtonConfig } from '../../../IconButton/IconButton.js';
6
+
7
+ var mergedConfig = /*#__PURE__*/mergeConfig(iconButtonConfig);
8
+ var IconButton = /*#__PURE__*/component(mergedConfig);
9
+ var _exp = function _exp() {
10
+ return IconButton;
11
+ };
12
+ var StyledIconButton = /*#__PURE__*/styled(_exp())({
13
+ name: "StyledIconButton",
14
+ "class": "sdel9u5",
15
+ propsAsIs: true
16
+ });
17
+
18
+ export { StyledIconButton };
19
+ //# 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,WAAW,CAACC,gBAAgB,CAAC,CAAA;AAClD,IAAMC,UAAU,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANzBA,SAMyBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,UAAU,CAAA;AAAA,CAAA,CAAA;AAA1C,IAAMG,gBAAgB,gBAAGC,MAAM,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,6 @@
1
+ var extractExtension = function extractExtension(filename) {
2
+ return filename.split('.').pop();
3
+ };
4
+
5
+ export { extractExtension };
6
+ //# 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,23 @@
1
+ import React from 'react';
2
+ import { IconBlankOutline, IconBlankCsvOutline, IconBlankTxtOutline, IconBlankXlsOutline, IconBlankDocOutline, IconBlankPdfOutline } from '@salutejs/plasma-icons';
3
+
4
+ var _IconBlankPdfOutline, _IconBlankDocOutline, _IconBlankXlsOutline, _IconBlankTxtOutline, _IconBlankCsvOutline, _IconBlankOutline;
5
+ var getFileicon = function getFileicon(extension) {
6
+ switch (extension) {
7
+ case 'pdf':
8
+ return _IconBlankPdfOutline || (_IconBlankPdfOutline = /*#__PURE__*/React.createElement(IconBlankPdfOutline, null));
9
+ case 'doc':
10
+ return _IconBlankDocOutline || (_IconBlankDocOutline = /*#__PURE__*/React.createElement(IconBlankDocOutline, null));
11
+ case 'xls':
12
+ return _IconBlankXlsOutline || (_IconBlankXlsOutline = /*#__PURE__*/React.createElement(IconBlankXlsOutline, null));
13
+ case 'txt':
14
+ return _IconBlankTxtOutline || (_IconBlankTxtOutline = /*#__PURE__*/React.createElement(IconBlankTxtOutline, null));
15
+ case 'csv':
16
+ return _IconBlankCsvOutline || (_IconBlankCsvOutline = /*#__PURE__*/React.createElement(IconBlankCsvOutline, null));
17
+ default:
18
+ return _IconBlankOutline || (_IconBlankOutline = /*#__PURE__*/React.createElement(IconBlankOutline, null));
19
+ }
20
+ };
21
+
22
+ export { getFileicon };
23
+ //# 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,mBAAmB,EAAA,IAAE,CAAC,CAAA,CAAA;AAClC,IAAA,KAAK,KAAK;MACN,OAAAC,oBAAA,KAAAA,oBAAA,gBAAOH,KAAA,CAAAC,aAAA,CAACG,mBAAmB,EAAA,IAAE,CAAC,CAAA,CAAA;AAClC,IAAA,KAAK,KAAK;MACN,OAAAC,oBAAA,KAAAA,oBAAA,gBAAOL,KAAA,CAAAC,aAAA,CAACK,mBAAmB,EAAA,IAAE,CAAC,CAAA,CAAA;AAClC,IAAA,KAAK,KAAK;MACN,OAAAC,oBAAA,KAAAA,oBAAA,gBAAOP,KAAA,CAAAC,aAAA,CAACO,mBAAmB,EAAA,IAAE,CAAC,CAAA,CAAA;AAClC,IAAA,KAAK,KAAK;MACN,OAAAC,oBAAA,KAAAA,oBAAA,gBAAOT,KAAA,CAAAC,aAAA,CAACS,mBAAmB,EAAA,IAAE,CAAC,CAAA,CAAA;AAClC,IAAA;MACI,OAAAC,iBAAA,KAAAA,iBAAA,gBAAOX,KAAA,CAAAC,aAAA,CAACW,gBAAgB,EAAA,IAAE,CAAC,CAAA,CAAA;AACnC,GAAA;AACJ;;;;"}
@@ -0,0 +1,12 @@
1
+ var truncateFilename = function truncateFilename(filename, startTruncationIndex) {
2
+ var separator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '...';
3
+ var strings = filename.split('.');
4
+ var extension = strings.length > 1 ? strings[strings.length - 1] : null;
5
+ var left = strings.length > 1 ? strings.slice(0, -1).join('.') : strings[0];
6
+ var lastFilenameLetter = left[left.length - 1];
7
+ var truncatedFilename = "".concat(left.substring(0, startTruncationIndex)).concat(separator).concat(lastFilenameLetter);
8
+ return extension ? "".concat(truncatedFilename, ".").concat(extension) : truncatedFilename;
9
+ };
10
+
11
+ export { truncateFilename };
12
+ //# sourceMappingURL=truncateFilename.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"truncateFilename.js","sources":["../../../../src/components/Attach/utils/truncateFilename.ts"],"sourcesContent":["export const truncateFilename = (filename: string, startTruncationIndex: number, separator = '...') => {\n const strings = filename.split('.');\n\n const extension = strings.length > 1 ? strings[strings.length - 1] : null;\n const left = strings.length > 1 ? strings.slice(0, -1).join('.') : strings[0];\n\n const lastFilenameLetter = left[left.length - 1];\n const truncatedFilename = `${left.substring(0, startTruncationIndex)}${separator}${lastFilenameLetter}`;\n\n return extension ? `${truncatedFilename}.${extension}` : truncatedFilename;\n};\n"],"names":["truncateFilename","filename","startTruncationIndex","separator","arguments","length","undefined","strings","split","extension","left","slice","join","lastFilenameLetter","truncatedFilename","concat","substring"],"mappings":"AAAO,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,QAAgB,EAAEC,oBAA4B,EAAwB;AAAA,EAAA,IAAtBC,SAAS,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,KAAK,CAAA;AAC9F,EAAA,IAAMG,OAAO,GAAGN,QAAQ,CAACO,KAAK,CAAC,GAAG,CAAC,CAAA;AAEnC,EAAA,IAAMC,SAAS,GAAGF,OAAO,CAACF,MAAM,GAAG,CAAC,GAAGE,OAAO,CAACA,OAAO,CAACF,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI,CAAA;EACzE,IAAMK,IAAI,GAAGH,OAAO,CAACF,MAAM,GAAG,CAAC,GAAGE,OAAO,CAACI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,GAAGL,OAAO,CAAC,CAAC,CAAC,CAAA;EAE7E,IAAMM,kBAAkB,GAAGH,IAAI,CAACA,IAAI,CAACL,MAAM,GAAG,CAAC,CAAC,CAAA;EAChD,IAAMS,iBAAiB,MAAAC,MAAA,CAAML,IAAI,CAACM,SAAS,CAAC,CAAC,EAAEd,oBAAoB,CAAC,CAAA,CAAAa,MAAA,CAAGZ,SAAS,EAAAY,MAAA,CAAGF,kBAAkB,CAAE,CAAA;EAEvG,OAAOJ,SAAS,GAAAM,EAAAA,CAAAA,MAAA,CAAMD,iBAAiB,OAAAC,MAAA,CAAIN,SAAS,CAAA,GAAKK,iBAAiB,CAAA;AAC9E;;;;"}
@@ -0,0 +1,5 @@
1
+ import './base_eax0b8.css';
2
+ var base = "b1pj1390";
3
+
4
+ export { base };
5
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Attach/variations/_size/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens, classes } from '../../Attach.tokens';\n\nexport const base = css`\n &.${classes.horizontal} {\n column-gap: var(${tokens.horizontalGap});\n }\n\n &.${classes.vertical} {\n row-gap: var(${tokens.verticalGap});\n }\n\n &.${classes.auto} {\n row-gap: var(${tokens.verticalGap});\n column-gap: var(${tokens.horizontalGap});\n }\n}\n`;\n"],"names":["base"],"mappings":"AAIO,IAAMA,IAAI,GAchB;;;;"}
@@ -0,0 +1 @@
1
+ .b1pj1390.horizontal{-webkit-column-gap:var(--plasma-attach-horizontal-gap);column-gap:var(--plasma-attach-horizontal-gap);}.b1pj1390.vertical{row-gap:var(--plasma-attach-vertical-gap);}.b1pj1390.auto{row-gap:var(--plasma-attach-vertical-gap);-webkit-column-gap:var(--plasma-attach-horizontal-gap);column-gap:var(--plasma-attach-horizontal-gap);}
@@ -0,0 +1,5 @@
1
+ import './base_1nvsg1b.css';
2
+ var base = "b438e2d";
3
+
4
+ export { base };
5
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Attach/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes } from '../../Attach.tokens';\n\nexport const base = css`\n &.${classes.horizontal} {\n flex-direction: row;\n }\n\n &.${classes.vertical} {\n flex-direction: column;\n }\n\n &.${classes.auto} {\n flex-wrap: wrap;\n }\n`;\n"],"names":["base"],"mappings":"AAIO,IAAMA,IAAI,GAYhB;;;;"}
@@ -0,0 +1 @@
1
+ .b438e2d.horizontal{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.b438e2d.vertical{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.b438e2d.auto{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;}
@@ -23,7 +23,8 @@ var cellRoot = function cellRoot(Root) {
23
23
  description = _ref.description,
24
24
  content = _ref.content,
25
25
  _ref$stretching = _ref.stretching,
26
- stretching = _ref$stretching === void 0 ? 'filled' : _ref$stretching;
26
+ stretching = _ref$stretching === void 0 ? 'filled' : _ref$stretching,
27
+ className = _ref.className;
27
28
  var stretchingClass = classes["".concat(stretching, "Stretching")];
28
29
 
29
30
  // Импорт старых свойств
@@ -33,7 +34,7 @@ var cellRoot = function cellRoot(Root) {
33
34
  ref: outerRootRef,
34
35
  size: size,
35
36
  view: view,
36
- className: cx(stretchingClass, classes.cellRoot)
37
+ className: cx(stretchingClass, classes.cellRoot, className)
37
38
  }, contentLeftDeprecated && /*#__PURE__*/React.createElement(CellLeft, {
38
39
  align: alignContentLeft
39
40
  }, contentLeftDeprecated), /*#__PURE__*/React.createElement(CellContentWrapper, null, /*#__PURE__*/React.createElement(CellContent, null, titleText || subtitle || label ? /*#__PURE__*/React.createElement(CellTextbox, {
@@ -1 +1 @@
1
- {"version":3,"file":"Cell.js","sources":["../../../src/components/Cell/Cell.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport type { CellProps } from './Cell.types';\nimport { base, CellLeft, CellRight, CellContentWrapper, CellContent } from './Cell.styles';\nimport { classes } from './Cell.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { CellTextbox } from './ui/CellTextbox/CellTextbox';\n\nexport const cellRoot = (Root: RootProps<HTMLDivElement, CellProps>) =>\n forwardRef<HTMLDivElement, CellProps>(\n (\n {\n size,\n view,\n contentLeft,\n contentRight,\n alignContentLeft = 'center',\n alignContentRight = 'center',\n children,\n title,\n subtitle,\n label,\n description,\n content,\n stretching = 'filled',\n },\n outerRootRef,\n ) => {\n const stretchingClass = classes[`${stretching}Stretching` as keyof typeof classes];\n\n // Импорт старых свойств\n const titleText = title || description;\n const contentLeftDeprecated = contentLeft || content;\n\n return (\n <Root ref={outerRootRef} size={size} view={view} className={cx(stretchingClass, classes.cellRoot)}>\n {contentLeftDeprecated && <CellLeft align={alignContentLeft}>{contentLeftDeprecated}</CellLeft>}\n <CellContentWrapper>\n <CellContent>\n {titleText || subtitle || label ? (\n <CellTextbox label={label} title={titleText} subtitle={subtitle} />\n ) : (\n children\n )}\n </CellContent>\n {contentRight && <CellRight align={alignContentRight}>{contentRight}</CellRight>}\n </CellContentWrapper>\n </Root>\n );\n },\n );\n\nexport const cellConfig = {\n name: 'Cell',\n tag: 'div',\n layout: cellRoot,\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":["cellRoot","Root","forwardRef","_ref","outerRootRef","size","view","contentLeft","contentRight","_ref$alignContentLeft","alignContentLeft","_ref$alignContentRigh","alignContentRight","children","title","subtitle","label","description","content","_ref$stretching","stretching","stretchingClass","classes","concat","titleText","contentLeftDeprecated","React","createElement","ref","className","cx","CellLeft","align","CellContentWrapper","CellContent","CellTextbox","CellRight","cellConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;IAYaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,IAA0C,EAAA;AAAA,EAAA,oBAC/DC,UAAU,CACN,UAAAC,IAAA,EAgBIC,YAAY,EACX;AAAA,IAAA,IAfGC,IAAI,GAAAF,IAAA,CAAJE,IAAI;MACJC,IAAI,GAAAH,IAAA,CAAJG,IAAI;MACJC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;MACXC,YAAY,GAAAL,IAAA,CAAZK,YAAY;MAAAC,qBAAA,GAAAN,IAAA,CACZO,gBAAgB;AAAhBA,MAAAA,gBAAgB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,qBAAA;MAAAE,qBAAA,GAAAR,IAAA,CAC3BS,iBAAiB;AAAjBA,MAAAA,iBAAiB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,qBAAA;MAC5BE,QAAQ,GAAAV,IAAA,CAARU,QAAQ;MACRC,KAAK,GAAAX,IAAA,CAALW,KAAK;MACLC,QAAQ,GAAAZ,IAAA,CAARY,QAAQ;MACRC,KAAK,GAAAb,IAAA,CAALa,KAAK;MACLC,WAAW,GAAAd,IAAA,CAAXc,WAAW;MACXC,OAAO,GAAAf,IAAA,CAAPe,OAAO;MAAAC,eAAA,GAAAhB,IAAA,CACPiB,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AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAExC,QAAQ;AAChByC,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACRpC,IAAAA,IAAI,EAAE;AACFqC,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDvC,IAAAA,IAAI,EAAE;AACFsC,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNxC,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Cell.js","sources":["../../../src/components/Cell/Cell.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport type { CellProps } from './Cell.types';\nimport { base, CellLeft, CellRight, CellContentWrapper, CellContent } from './Cell.styles';\nimport { classes } from './Cell.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { CellTextbox } from './ui/CellTextbox/CellTextbox';\n\nexport const cellRoot = (Root: RootProps<HTMLDivElement, CellProps>) =>\n forwardRef<HTMLDivElement, CellProps>(\n (\n {\n size,\n view,\n contentLeft,\n contentRight,\n alignContentLeft = 'center',\n alignContentRight = 'center',\n children,\n title,\n subtitle,\n label,\n description,\n content,\n stretching = 'filled',\n className,\n },\n outerRootRef,\n ) => {\n const stretchingClass = classes[`${stretching}Stretching` as keyof typeof classes];\n\n // Импорт старых свойств\n const titleText = title || description;\n const contentLeftDeprecated = contentLeft || content;\n\n return (\n <Root\n ref={outerRootRef}\n size={size}\n view={view}\n className={cx(stretchingClass, classes.cellRoot, className)}\n >\n {contentLeftDeprecated && <CellLeft align={alignContentLeft}>{contentLeftDeprecated}</CellLeft>}\n <CellContentWrapper>\n <CellContent>\n {titleText || subtitle || label ? (\n <CellTextbox label={label} title={titleText} subtitle={subtitle} />\n ) : (\n children\n )}\n </CellContent>\n {contentRight && <CellRight align={alignContentRight}>{contentRight}</CellRight>}\n </CellContentWrapper>\n </Root>\n );\n },\n );\n\nexport const cellConfig = {\n name: 'Cell',\n tag: 'div',\n layout: cellRoot,\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":["cellRoot","Root","forwardRef","_ref","outerRootRef","size","view","contentLeft","contentRight","_ref$alignContentLeft","alignContentLeft","_ref$alignContentRigh","alignContentRight","children","title","subtitle","label","description","content","_ref$stretching","stretching","className","stretchingClass","classes","concat","titleText","contentLeftDeprecated","React","createElement","ref","cx","CellLeft","align","CellContentWrapper","CellContent","CellTextbox","CellRight","cellConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;IAYaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,IAA0C,EAAA;AAAA,EAAA,oBAC/DC,UAAU,CACN,UAAAC,IAAA,EAiBIC,YAAY,EACX;AAAA,IAAA,IAhBGC,IAAI,GAAAF,IAAA,CAAJE,IAAI;MACJC,IAAI,GAAAH,IAAA,CAAJG,IAAI;MACJC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;MACXC,YAAY,GAAAL,IAAA,CAAZK,YAAY;MAAAC,qBAAA,GAAAN,IAAA,CACZO,gBAAgB;AAAhBA,MAAAA,gBAAgB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,qBAAA;MAAAE,qBAAA,GAAAR,IAAA,CAC3BS,iBAAiB;AAAjBA,MAAAA,iBAAiB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,qBAAA;MAC5BE,QAAQ,GAAAV,IAAA,CAARU,QAAQ;MACRC,KAAK,GAAAX,IAAA,CAALW,KAAK;MACLC,QAAQ,GAAAZ,IAAA,CAARY,QAAQ;M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