@salutejs/plasma-new-hope 0.336.0-canary.2238.17818313113.0 → 0.336.0-canary.2239.17794430722.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/Attach/Attach.css +7 -9
- package/cjs/components/Attach/Attach.js +59 -13
- package/cjs/components/Attach/Attach.js.map +1 -1
- package/cjs/components/Attach/Attach.styles.js +9 -21
- package/cjs/components/Attach/Attach.styles.js.map +1 -1
- package/cjs/components/Attach/Attach.styles_1w3ga58.css +5 -0
- package/cjs/components/Attach/Attach.tokens.js +0 -1
- package/cjs/components/Attach/Attach.tokens.js.map +1 -1
- package/cjs/components/Attach/utils/addSeparator.js +18 -0
- package/cjs/components/Attach/utils/addSeparator.js.map +1 -0
- package/cjs/components/Attach/utils/getFileicon.js +2 -2
- package/cjs/components/Attach/utils/getFileicon.js.map +1 -1
- package/cjs/components/Attach/utils/index.js +8 -0
- package/cjs/components/Attach/utils/index.js.map +1 -0
- package/cjs/components/Attach/variations/_helperTextView/base.js +1 -1
- package/cjs/components/Attach/variations/_helperTextView/base_1vgke1p.css +1 -0
- package/cjs/components/Attach/variations/_size/base.js +1 -1
- package/cjs/components/Attach/variations/_size/base.js.map +1 -1
- package/{es/components/Attach/variations/_size/base_kpo9at.css → cjs/components/Attach/variations/_size/base_a4eelx.css} +1 -1
- package/cjs/components/Drawer/Drawer.css +2 -2
- package/cjs/components/Drawer/Drawer.js +7 -10
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/Drawer/Drawer.styles.js +2 -17
- package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
- package/{es/components/Drawer/Drawer.styles_1gcp61n.css → cjs/components/Drawer/Drawer.styles_h5od79.css} +1 -1
- package/cjs/components/Drawer/Drawer.tokens.js +0 -10
- package/cjs/components/Drawer/Drawer.tokens.js.map +1 -1
- package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.css +1 -1
- package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +4 -10
- package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
- package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +1 -2
- package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.styles.js.map +1 -1
- package/cjs/components/Skeleton/LineSkeleton/variations/_size/base.js +1 -1
- package/cjs/components/Skeleton/LineSkeleton/variations/_size/base.js.map +1 -1
- package/cjs/components/Skeleton/LineSkeleton/variations/_size/base_1wf7n5i.css +1 -0
- package/cjs/components/Skeleton/TextSkeleton/TextSkeleton.js +1 -4
- package/cjs/components/Skeleton/TextSkeleton/TextSkeleton.js.map +1 -1
- package/cjs/components/Skeleton/tokens.js +1 -2
- package/cjs/components/Skeleton/tokens.js.map +1 -1
- package/cjs/index.css +10 -12
- package/emotion/cjs/components/Attach/Attach.js +51 -12
- package/emotion/cjs/components/Attach/Attach.styles.js +13 -28
- package/emotion/cjs/components/Attach/Attach.tokens.js +0 -1
- package/emotion/cjs/components/Attach/utils/addSeparator.js +20 -0
- package/emotion/cjs/components/Attach/utils/getFileicon.js +3 -3
- package/emotion/cjs/components/Attach/utils/index.js +10 -2
- package/emotion/cjs/components/Attach/variations/_size/base.js +1 -1
- package/emotion/cjs/components/Drawer/Drawer.js +4 -13
- package/emotion/cjs/components/Drawer/Drawer.styles.js +4 -10
- package/emotion/cjs/components/Drawer/Drawer.tokens.js +0 -12
- package/emotion/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +5 -11
- package/emotion/cjs/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +4 -5
- package/emotion/cjs/components/Skeleton/LineSkeleton/variations/_size/base.js +3 -1
- package/emotion/cjs/components/Skeleton/TextSkeleton/TextSkeleton.js +2 -4
- package/emotion/cjs/components/Skeleton/tokens.js +1 -2
- package/emotion/cjs/examples/components/Attach/Attach.config.js +18 -18
- package/emotion/cjs/examples/components/Combobox/Combobox.js +0 -15
- package/emotion/cjs/examples/components/Skeleton/LineSkeleton.config.js +18 -23
- package/emotion/es/components/Attach/Attach.js +55 -16
- package/emotion/es/components/Attach/Attach.styles.js +11 -20
- package/emotion/es/components/Attach/Attach.tokens.js +0 -1
- package/emotion/es/components/Attach/utils/addSeparator.js +10 -0
- package/emotion/es/components/Attach/utils/getFileicon.js +1 -1
- package/emotion/es/components/Attach/utils/index.js +3 -1
- package/emotion/es/components/Attach/variations/_size/base.js +2 -2
- package/emotion/es/components/Drawer/Drawer.js +5 -9
- package/emotion/es/components/Drawer/Drawer.styles.js +5 -11
- package/emotion/es/components/Drawer/Drawer.tokens.js +0 -9
- package/emotion/es/components/Skeleton/LineSkeleton/LineSkeleton.js +5 -11
- package/emotion/es/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +4 -5
- package/emotion/es/components/Skeleton/LineSkeleton/variations/_size/base.js +3 -1
- package/emotion/es/components/Skeleton/TextSkeleton/TextSkeleton.js +2 -4
- package/emotion/es/components/Skeleton/tokens.js +1 -2
- package/emotion/es/examples/components/Attach/Attach.config.js +18 -18
- package/emotion/es/examples/components/Skeleton/LineSkeleton.config.js +18 -23
- package/es/components/Attach/Attach.css +7 -9
- package/es/components/Attach/Attach.js +63 -17
- package/es/components/Attach/Attach.js.map +1 -1
- package/es/components/Attach/Attach.styles.js +9 -19
- package/es/components/Attach/Attach.styles.js.map +1 -1
- package/es/components/Attach/Attach.styles_1w3ga58.css +5 -0
- package/es/components/Attach/Attach.tokens.js +0 -1
- package/es/components/Attach/Attach.tokens.js.map +1 -1
- package/es/components/Attach/utils/addSeparator.js +14 -0
- package/es/components/Attach/utils/addSeparator.js.map +1 -0
- package/es/components/Attach/utils/getFileicon.js +2 -2
- package/es/components/Attach/utils/getFileicon.js.map +1 -1
- package/es/components/Attach/utils/index.js +4 -0
- package/es/components/Attach/utils/index.js.map +1 -0
- package/es/components/Attach/variations/_helperTextView/base.js +1 -1
- package/es/components/Attach/variations/_helperTextView/base_1vgke1p.css +1 -0
- package/es/components/Attach/variations/_size/base.js +1 -1
- package/es/components/Attach/variations/_size/base.js.map +1 -1
- package/{cjs/components/Attach/variations/_size/base_kpo9at.css → es/components/Attach/variations/_size/base_a4eelx.css} +1 -1
- package/es/components/Drawer/Drawer.css +2 -2
- package/es/components/Drawer/Drawer.js +6 -8
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/Drawer/Drawer.styles.js +2 -17
- package/es/components/Drawer/Drawer.styles.js.map +1 -1
- package/{cjs/components/Drawer/Drawer.styles_1gcp61n.css → es/components/Drawer/Drawer.styles_h5od79.css} +1 -1
- package/es/components/Drawer/Drawer.tokens.js +1 -10
- package/es/components/Drawer/Drawer.tokens.js.map +1 -1
- package/es/components/Skeleton/LineSkeleton/LineSkeleton.css +1 -1
- package/es/components/Skeleton/LineSkeleton/LineSkeleton.js +4 -10
- package/es/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
- package/es/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +1 -2
- package/es/components/Skeleton/LineSkeleton/LineSkeleton.styles.js.map +1 -1
- package/es/components/Skeleton/LineSkeleton/variations/_size/base.js +1 -1
- package/es/components/Skeleton/LineSkeleton/variations/_size/base.js.map +1 -1
- package/es/components/Skeleton/LineSkeleton/variations/_size/base_1wf7n5i.css +1 -0
- package/es/components/Skeleton/TextSkeleton/TextSkeleton.js +1 -4
- package/es/components/Skeleton/TextSkeleton/TextSkeleton.js.map +1 -1
- package/es/components/Skeleton/tokens.js +1 -2
- package/es/components/Skeleton/tokens.js.map +1 -1
- package/es/index.css +10 -12
- package/package.json +5 -5
- package/styled-components/cjs/components/Attach/Attach.js +51 -12
- package/styled-components/cjs/components/Attach/Attach.styles.js +11 -31
- package/styled-components/cjs/components/Attach/Attach.tokens.js +0 -1
- package/styled-components/cjs/components/Attach/utils/addSeparator.js +20 -0
- package/styled-components/cjs/components/Attach/utils/getFileicon.js +3 -3
- package/styled-components/cjs/components/Attach/utils/index.js +10 -2
- package/styled-components/cjs/components/Attach/variations/_size/base.js +1 -2
- package/styled-components/cjs/components/Drawer/Drawer.js +4 -13
- package/styled-components/cjs/components/Drawer/Drawer.styles.js +4 -17
- package/styled-components/cjs/components/Drawer/Drawer.tokens.js +0 -12
- package/styled-components/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +5 -11
- package/styled-components/cjs/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +2 -3
- package/styled-components/cjs/components/Skeleton/LineSkeleton/variations/_size/base.js +7 -2
- package/styled-components/cjs/components/Skeleton/TextSkeleton/TextSkeleton.js +2 -4
- package/styled-components/cjs/components/Skeleton/tokens.js +1 -2
- package/styled-components/cjs/examples/components/Attach/Attach.config.js +4 -8
- package/styled-components/cjs/examples/components/Skeleton/LineSkeleton.config.js +1 -12
- package/styled-components/es/components/Attach/Attach.js +55 -16
- package/styled-components/es/components/Attach/Attach.styles.js +9 -23
- package/styled-components/es/components/Attach/Attach.tokens.js +0 -1
- package/styled-components/es/components/Attach/utils/addSeparator.js +10 -0
- package/styled-components/es/components/Attach/utils/getFileicon.js +1 -1
- package/styled-components/es/components/Attach/utils/index.js +3 -1
- package/styled-components/es/components/Attach/variations/_size/base.js +2 -3
- package/styled-components/es/components/Drawer/Drawer.js +5 -9
- package/styled-components/es/components/Drawer/Drawer.styles.js +5 -18
- package/styled-components/es/components/Drawer/Drawer.tokens.js +0 -9
- package/styled-components/es/components/Skeleton/LineSkeleton/LineSkeleton.js +5 -11
- package/styled-components/es/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +2 -3
- package/styled-components/es/components/Skeleton/LineSkeleton/variations/_size/base.js +7 -2
- package/styled-components/es/components/Skeleton/TextSkeleton/TextSkeleton.js +2 -4
- package/styled-components/es/components/Skeleton/tokens.js +1 -2
- package/styled-components/es/examples/components/Attach/Attach.config.js +4 -8
- package/styled-components/es/examples/components/Combobox/Combobox.js +0 -7
- package/styled-components/es/examples/components/Skeleton/LineSkeleton.config.js +1 -12
- package/types/components/Attach/Attach.d.ts.map +1 -1
- package/types/components/Attach/Attach.styles.d.ts +1 -3
- package/types/components/Attach/Attach.styles.d.ts.map +1 -1
- package/types/components/Attach/Attach.tokens.d.ts +0 -1
- package/types/components/Attach/Attach.tokens.d.ts.map +1 -1
- package/types/components/Attach/Attach.types.d.ts +0 -7
- package/types/components/Attach/Attach.types.d.ts.map +1 -1
- package/types/components/Attach/utils/addSeparator.d.ts +2 -0
- package/types/components/Attach/utils/addSeparator.d.ts.map +1 -0
- package/types/components/Attach/utils/getFileicon.d.ts +1 -1
- package/types/components/Attach/utils/index.d.ts +3 -1
- package/types/components/Attach/utils/index.d.ts.map +1 -1
- package/types/components/Attach/variations/_size/base.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.d.ts +0 -2
- package/types/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.styles.d.ts +1 -2
- package/types/components/Drawer/Drawer.styles.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.tokens.d.ts +0 -9
- package/types/components/Drawer/Drawer.tokens.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.types.d.ts +0 -16
- package/types/components/Drawer/Drawer.types.d.ts.map +1 -1
- package/types/components/Skeleton/LineSkeleton/LineSkeleton.d.ts +0 -3
- package/types/components/Skeleton/LineSkeleton/LineSkeleton.d.ts.map +1 -1
- package/types/components/Skeleton/LineSkeleton/LineSkeleton.styles.d.ts.map +1 -1
- package/types/components/Skeleton/LineSkeleton/LineSkeleton.types.d.ts +1 -1
- package/types/components/Skeleton/LineSkeleton/LineSkeleton.types.d.ts.map +1 -1
- package/types/components/Skeleton/LineSkeleton/variations/_size/base.d.ts.map +1 -1
- package/types/components/Skeleton/Skeleton.types.d.ts +0 -1
- package/types/components/Skeleton/Skeleton.types.d.ts.map +1 -1
- package/types/components/Skeleton/TextSkeleton/TextSkeleton.d.ts.map +1 -1
- package/types/components/Skeleton/tokens.d.ts +0 -1
- package/types/components/Skeleton/tokens.d.ts.map +1 -1
- package/types/examples/components/Attach/Attach.config.d.ts.map +1 -1
- package/types/examples/components/Attach/Attach.d.ts.map +1 -1
- package/types/examples/components/Drawer/Drawer.d.ts +0 -1
- package/types/examples/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/examples/components/Skeleton/LineSkeleton.config.d.ts +0 -5
- package/types/examples/components/Skeleton/LineSkeleton.config.d.ts.map +1 -1
- package/types/examples/components/Skeleton/Skeleton.d.ts +0 -8
- package/types/examples/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/cjs/components/Attach/Attach.styles_pso18d.css +0 -7
- package/cjs/components/Attach/variations/_helperTextView/base_1tgnvl9.css +0 -1
- package/cjs/components/Skeleton/LineSkeleton/variations/_size/base_x642ct.css +0 -1
- package/cjs/components/Skeleton/LineSkeleton/variations/_view/base.js +0 -9
- package/cjs/components/Skeleton/LineSkeleton/variations/_view/base.js.map +0 -1
- package/cjs/components/Skeleton/LineSkeleton/variations/_view/base_1it9pjr.css +0 -1
- package/emotion/cjs/components/Skeleton/LineSkeleton/variations/_view/base.js +0 -14
- package/emotion/es/components/Skeleton/LineSkeleton/variations/_view/base.js +0 -4
- package/es/components/Attach/Attach.styles_pso18d.css +0 -7
- package/es/components/Attach/variations/_helperTextView/base_1tgnvl9.css +0 -1
- package/es/components/Skeleton/LineSkeleton/variations/_size/base_x642ct.css +0 -1
- package/es/components/Skeleton/LineSkeleton/variations/_view/base.js +0 -5
- package/es/components/Skeleton/LineSkeleton/variations/_view/base.js.map +0 -1
- package/es/components/Skeleton/LineSkeleton/variations/_view/base_1it9pjr.css +0 -1
- package/styled-components/cjs/components/Skeleton/LineSkeleton/variations/_view/base.js +0 -19
- package/styled-components/es/components/Skeleton/LineSkeleton/variations/_view/base.js +0 -9
- package/types/components/Skeleton/LineSkeleton/variations/_view/base.d.ts +0 -2
- package/types/components/Skeleton/LineSkeleton/variations/_view/base.d.ts.map +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React, { forwardRef, useRef, useState } from 'react';
|
|
3
|
-
import { useForkRef } from '@salutejs/plasma-core';
|
|
2
|
+
import React, { forwardRef, useRef, useState, useEffect } from 'react';
|
|
3
|
+
import { useForkRef, useIsomorphicLayoutEffect } from '@salutejs/plasma-core';
|
|
4
4
|
import { cx } from '../../utils/index.js';
|
|
5
5
|
import { base as base$3 } from './variations/_size/base.js';
|
|
6
6
|
import { base as base$1 } from './variations/_view/base.js';
|
|
7
7
|
import { base as base$2 } from './variations/_helperTextView/base.js';
|
|
8
|
-
import { StyledHiddenInput, StyledAttachButtonWrapper, StyledHelperText,
|
|
8
|
+
import { StyledHiddenInput, StyledHiddenInputHelper, StyledAttachButtonWrapper, StyledHelperText, base } from './Attach.styles.js';
|
|
9
|
+
import { separator } from './utils/index.js';
|
|
9
10
|
import { classes } from './Attach.tokens.js';
|
|
10
11
|
import { StyledIconButtonCancel } from './ui/IconButton/IconButton.styles.js';
|
|
11
12
|
import { extractExtension } from './utils/extractExtension.js';
|
|
13
|
+
import { addSeparator } from './utils/addSeparator.js';
|
|
12
14
|
import { AttachButton } from './components/AttachButton/AttachButton.js';
|
|
13
15
|
import { StyledCell } from './ui/Cell/Cell.styles.js';
|
|
14
16
|
import { IconCloseCircleOutline } from '../_Icon/Icons/IconCloseCircleOutline.js';
|
|
15
|
-
import {
|
|
17
|
+
import { getFileicon } from './utils/getFileicon.js';
|
|
16
18
|
|
|
17
19
|
var _IconCloseCircleOutli;
|
|
18
|
-
var _excluded = ["flow", "buttonType", "
|
|
20
|
+
var _excluded = ["flow", "buttonType", "hasAttachment", "acceptedFileFormats", "helperText", "size", "view", "helperTextView", "className", "style", "isLoading", "disabled", "id", "name", "customIcon", "onChange", "onClear"];
|
|
19
21
|
var attachRoot = function attachRoot(Root) {
|
|
20
22
|
return /*#__PURE__*/forwardRef(function (props, outerRef) {
|
|
21
23
|
var _props$flow = props.flow,
|
|
22
24
|
flow = _props$flow === void 0 ? 'auto' : _props$flow,
|
|
23
25
|
_props$buttonType = props.buttonType,
|
|
24
26
|
buttonType = _props$buttonType === void 0 ? 'button' : _props$buttonType,
|
|
25
|
-
_props$hideButtonOnAt = props.hideButtonOnAttach,
|
|
26
|
-
hideButtonOnAttach = _props$hideButtonOnAt === void 0 ? false : _props$hideButtonOnAt,
|
|
27
27
|
_props$hasAttachment = props.hasAttachment,
|
|
28
28
|
hasAttachment = _props$hasAttachment === void 0 ? true : _props$hasAttachment,
|
|
29
29
|
acceptedFileFormats = props.acceptedFileFormats,
|
|
@@ -38,33 +38,74 @@ var attachRoot = function attachRoot(Root) {
|
|
|
38
38
|
id = props.id,
|
|
39
39
|
name = props.name,
|
|
40
40
|
customIcon = props.customIcon,
|
|
41
|
-
onClick = props.onClick,
|
|
42
41
|
onChange = props.onChange,
|
|
43
42
|
onClear = props.onClear,
|
|
44
43
|
rest = _objectWithoutProperties(props, _excluded);
|
|
45
44
|
var innerRef = useRef(null);
|
|
46
45
|
var ref = useForkRef(outerRef, innerRef);
|
|
47
46
|
var inputRef = useRef(null);
|
|
47
|
+
var inputHelperRef = useRef(null);
|
|
48
48
|
var cellRef = useRef(null);
|
|
49
49
|
var buttonRef = useRef(null);
|
|
50
|
+
var emptyTextCellWidth = useRef(null);
|
|
50
51
|
var _useState = useState(''),
|
|
51
52
|
_useState2 = _slicedToArray(_useState, 2),
|
|
52
53
|
filename = _useState2[0],
|
|
53
54
|
setFilename = _useState2[1];
|
|
55
|
+
var _useState3 = useState(''),
|
|
56
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
57
|
+
truncatedFilename = _useState4[0],
|
|
58
|
+
setTruncatedFilename = _useState4[1];
|
|
54
59
|
var horizontalClass = flow === 'horizontal' ? classes.horizontal : undefined;
|
|
55
60
|
var verticalClass = flow === 'vertical' ? classes.vertical : undefined;
|
|
56
61
|
var withHelperTextClass = helperText ? classes.withHelperText : undefined;
|
|
57
62
|
var autoClass = flow === 'auto' ? classes.auto : undefined;
|
|
63
|
+
var cellHiddenClass = truncatedFilename.length === 0 ? classes.cellHidden : undefined;
|
|
58
64
|
var accept = acceptedFileFormats === null || acceptedFileFormats === void 0 ? void 0 : acceptedFileFormats.join(',');
|
|
59
65
|
var extension = extractExtension(filename);
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
66
|
+
var cellContentLeft = customIcon || getFileicon(extension, size);
|
|
67
|
+
useEffect(function () {
|
|
68
|
+
var _cellRef$current;
|
|
69
|
+
emptyTextCellWidth.current = ((_cellRef$current = cellRef.current) === null || _cellRef$current === void 0 ? void 0 : _cellRef$current.offsetWidth) || 0;
|
|
70
|
+
}, []);
|
|
71
|
+
useIsomorphicLayoutEffect(function () {
|
|
72
|
+
if (!cellRef.current || !cellRef.current.parentElement || !inputHelperRef.current || !inputHelperRef.current.textContent || !emptyTextCellWidth.current || !buttonRef.current) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
var textWidth = inputHelperRef.current.offsetWidth;
|
|
76
|
+
var buttonWidth = buttonRef.current.offsetWidth;
|
|
77
|
+
var _cellRef$current$pare = cellRef.current.parentElement.getBoundingClientRect(),
|
|
78
|
+
parentWidth = _cellRef$current$pare.width,
|
|
79
|
+
parentLeft = _cellRef$current$pare.left;
|
|
80
|
+
var _cellRef$current$getB = cellRef.current.getBoundingClientRect(),
|
|
81
|
+
cellLeft = _cellRef$current$getB.left;
|
|
82
|
+
var leftDiff = cellLeft - parentLeft;
|
|
83
|
+
var currentTextWidth = textWidth;
|
|
84
|
+
if (currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth || currentTextWidth + emptyTextCellWidth.current < buttonWidth) {
|
|
85
|
+
setTruncatedFilename(filename);
|
|
64
86
|
return;
|
|
65
87
|
}
|
|
66
|
-
|
|
67
|
-
|
|
88
|
+
var currFilename = addSeparator(filename, separator);
|
|
89
|
+
for (var i = currFilename.indexOf(separator) - 1; i > 0; i -= 1) {
|
|
90
|
+
if (currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth) {
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
var left = currFilename.slice(0, i);
|
|
94
|
+
var right = currFilename.slice(i + 1);
|
|
95
|
+
var newFilename = "".concat(left).concat(right);
|
|
96
|
+
inputHelperRef.current.textContent = newFilename;
|
|
97
|
+
currentTextWidth = inputHelperRef.current.offsetWidth;
|
|
98
|
+
if (currentTextWidth + emptyTextCellWidth.current < buttonWidth) {
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
currFilename = newFilename;
|
|
102
|
+
}
|
|
103
|
+
inputHelperRef.current.textContent = filename;
|
|
104
|
+
setTruncatedFilename(currFilename);
|
|
105
|
+
});
|
|
106
|
+
var handleClick = function handleClick() {
|
|
107
|
+
if (!inputRef.current) {
|
|
108
|
+
return;
|
|
68
109
|
}
|
|
69
110
|
inputRef.current.click();
|
|
70
111
|
};
|
|
@@ -86,6 +127,7 @@ var attachRoot = function attachRoot(Root) {
|
|
|
86
127
|
}
|
|
87
128
|
inputRef.current.value = '';
|
|
88
129
|
setFilename('');
|
|
130
|
+
setTruncatedFilename('');
|
|
89
131
|
};
|
|
90
132
|
return /*#__PURE__*/React.createElement(Root, {
|
|
91
133
|
className: cx(horizontalClass, verticalClass, autoClass, withHelperTextClass, className),
|
|
@@ -101,16 +143,20 @@ var attachRoot = function attachRoot(Root) {
|
|
|
101
143
|
id: id,
|
|
102
144
|
name: name,
|
|
103
145
|
onChange: handleChange
|
|
104
|
-
}),
|
|
146
|
+
}), /*#__PURE__*/React.createElement(StyledHiddenInputHelper, {
|
|
147
|
+
ref: inputHelperRef
|
|
148
|
+
}, filename), /*#__PURE__*/React.createElement(StyledAttachButtonWrapper, null, /*#__PURE__*/React.createElement(AttachButton, _extends({
|
|
105
149
|
ref: buttonRef,
|
|
106
150
|
buttonType: buttonType,
|
|
107
151
|
isLoading: isLoading,
|
|
108
152
|
disabled: disabled,
|
|
109
153
|
onClick: handleClick
|
|
110
|
-
}, rest)), helperText && /*#__PURE__*/React.createElement(StyledHelperText, null, helperText)),
|
|
154
|
+
}, rest)), helperText && /*#__PURE__*/React.createElement(StyledHelperText, null, helperText)), hasAttachment && /*#__PURE__*/React.createElement(StyledCell, {
|
|
111
155
|
stretching: "fixed",
|
|
156
|
+
className: cellHiddenClass,
|
|
112
157
|
ref: cellRef,
|
|
113
158
|
size: size,
|
|
159
|
+
title: truncatedFilename,
|
|
114
160
|
contentLeft: cellContentLeft,
|
|
115
161
|
contentRight: /*#__PURE__*/React.createElement(StyledIconButtonCancel, {
|
|
116
162
|
onClick: handleClear
|
|
@@ -118,7 +164,7 @@ var attachRoot = function attachRoot(Root) {
|
|
|
118
164
|
size: "xs",
|
|
119
165
|
color: "inherit"
|
|
120
166
|
})))
|
|
121
|
-
}
|
|
167
|
+
}));
|
|
122
168
|
});
|
|
123
169
|
};
|
|
124
170
|
var attachConfig = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Attach.js","sources":["../../../src/components/Attach/Attach.tsx"],"sourcesContent":["import React, { forwardRef, useRef, useState } from 'react';\nimport type { ChangeEvent, MouseEvent } from 'react';\nimport { useForkRef } from '@salutejs/plasma-core';\nimport { RootProps } from 'src/engines';\nimport { cx } from 'src/utils';\n\nimport { IconCloseCircleOutline } from '../_Icon';\n\nimport { AttachProps } from './Attach.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as helperTextViewCSS } from './variations/_helperTextView/base';\nimport {\n base,\n StyledHelperText,\n StyledHiddenInput,\n StyledAttachButtonWrapper,\n FilenameWrapper,\n TruncatedFilenamePart,\n FilenameExtensionPart,\n} from './Attach.styles';\nimport { StyledCell } from './ui/Cell/Cell';\nimport { extractExtension, getFileIcon } from './utils';\nimport { classes } from './Attach.tokens';\nimport { AttachButton } from './components/AttachButton';\nimport { StyledIconButtonCancel } from './ui/IconButton/IconButton.styles';\n\nexport const attachRoot = (Root: RootProps<HTMLDivElement, AttachProps>) =>\n forwardRef<HTMLDivElement, AttachProps>((props, outerRef) => {\n const {\n flow = 'auto',\n buttonType = 'button',\n hideButtonOnAttach = false,\n hasAttachment = true,\n acceptedFileFormats,\n helperText,\n size,\n view,\n helperTextView,\n className,\n style,\n isLoading,\n disabled,\n id,\n name,\n customIcon,\n onClick,\n onChange,\n onClear,\n ...rest\n } = props;\n\n const innerRef = useRef<HTMLDivElement>(null);\n const ref = useForkRef(outerRef, innerRef);\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const cellRef = useRef<HTMLDivElement | null>(null);\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n\n const [filename, setFilename] = useState<string>('');\n\n const horizontalClass = flow === 'horizontal' ? classes.horizontal : undefined;\n const verticalClass = flow === 'vertical' ? classes.vertical : undefined;\n const withHelperTextClass = helperText ? classes.withHelperText : undefined;\n const autoClass = flow === 'auto' ? classes.auto : undefined;\n\n const accept = acceptedFileFormats?.join(',');\n const extension = extractExtension(filename);\n const filenameWithoutExtension = filename.slice(0, -1 - (extension?.length || 0));\n const cellContentLeft = customIcon || getFileIcon(extension, size);\n\n const handleClick = (e: MouseEvent<HTMLButtonElement>) => {\n if (!inputRef.current) {\n return;\n }\n\n if (onClick) {\n onClick(e);\n }\n\n inputRef.current.click();\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n if (!e.target.files) {\n return;\n }\n\n if (onChange) {\n onChange(e);\n }\n\n setFilename(e.target.files[0].name);\n };\n\n const handleClear = () => {\n if (!inputRef.current) {\n return;\n }\n\n if (onClear) {\n onClear();\n }\n\n inputRef.current.value = '';\n setFilename('');\n };\n\n return (\n <Root\n className={cx(horizontalClass, verticalClass, autoClass, withHelperTextClass, className)}\n style={style}\n size={size}\n view={view}\n helperTextView={helperTextView}\n ref={ref}\n >\n <StyledHiddenInput\n ref={inputRef}\n accept={accept}\n type=\"file\"\n id={id}\n name={name}\n onChange={handleChange}\n />\n\n {(!hideButtonOnAttach || !filename) && (\n <StyledAttachButtonWrapper>\n <AttachButton\n ref={buttonRef}\n buttonType={buttonType}\n isLoading={isLoading}\n disabled={disabled}\n onClick={handleClick}\n {...rest}\n />\n\n {helperText && <StyledHelperText>{helperText}</StyledHelperText>}\n </StyledAttachButtonWrapper>\n )}\n\n {(hasAttachment || hideButtonOnAttach) && filename && (\n <StyledCell\n stretching=\"fixed\"\n ref={cellRef}\n size={size}\n contentLeft={cellContentLeft}\n contentRight={\n <StyledIconButtonCancel onClick={handleClear}>\n <IconCloseCircleOutline size=\"xs\" color=\"inherit\" />\n </StyledIconButtonCancel>\n }\n >\n <FilenameWrapper>\n <TruncatedFilenamePart>{filenameWithoutExtension.slice(0, -1)}</TruncatedFilenamePart>\n <FilenameExtensionPart>\n {filenameWithoutExtension.at(-1)}.{extension}\n </FilenameExtensionPart>\n </FilenameWrapper>\n </StyledCell>\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 helperTextView: {\n css: helperTextViewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n helperTextView: 'default',\n size: 'm',\n },\n};\n"],"names":["attachRoot","Root","forwardRef","props","outerRef","_props$flow","flow","_props$buttonType","buttonType","_props$hideButtonOnAt","hideButtonOnAttach","_props$hasAttachment","hasAttachment","acceptedFileFormats","helperText","size","view","helperTextView","className","style","isLoading","disabled","id","name","customIcon","onClick","onChange","onClear","rest","_objectWithoutProperties","_excluded","innerRef","useRef","ref","useForkRef","inputRef","cellRef","buttonRef","_useState","useState","_useState2","_slicedToArray","filename","setFilename","horizontalClass","classes","horizontal","undefined","verticalClass","vertical","withHelperTextClass","withHelperText","autoClass","auto","accept","join","extension","extractExtension","filenameWithoutExtension","slice","length","cellContentLeft","getFileIcon","handleClick","e","current","click","handleChange","target","files","handleClear","value","React","createElement","cx","StyledHiddenInput","type","StyledAttachButtonWrapper","AttachButton","_extends","StyledHelperText","StyledCell","stretching","contentLeft","contentRight","StyledIconButtonCancel","_IconCloseCircleOutli","IconCloseCircleOutline","color","FilenameWrapper","TruncatedFilenamePart","FilenameExtensionPart","at","attachConfig","tag","layout","base","variations","css","viewCSS","helperTextViewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;IA2BaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,UAAU,CAA8B,UAACC,KAAK,EAAEC,QAAQ,EAAK;AACzD,IAAA,IAAAC,WAAA,GAqBIF,KAAK,CApBLG,IAAI;AAAJA,MAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,WAAA;MAAAE,iBAAA,GAoBbJ,KAAK,CAnBLK,UAAU;AAAVA,MAAAA,UAAU,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,iBAAA;MAAAE,qBAAA,GAmBrBN,KAAK,CAlBLO,kBAAkB;AAAlBA,MAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,qBAAA;MAAAE,oBAAA,GAkB1BR,KAAK,CAjBLS,aAAa;AAAbA,MAAAA,aAAa,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,oBAAA;MACpBE,mBAAmB,GAgBnBV,KAAK,CAhBLU,mBAAmB;MACnBC,UAAU,GAeVX,KAAK,CAfLW,UAAU;MACVC,IAAI,GAcJZ,KAAK,CAdLY,IAAI;MACJC,IAAI,GAaJb,KAAK,CAbLa,IAAI;MACJC,cAAc,GAYdd,KAAK,CAZLc,cAAc;MACdC,SAAS,GAWTf,KAAK,CAXLe,SAAS;MACTC,KAAK,GAULhB,KAAK,CAVLgB,KAAK;MACLC,SAAS,GASTjB,KAAK,CATLiB,SAAS;MACTC,QAAQ,GAQRlB,KAAK,CARLkB,QAAQ;MACRC,EAAE,GAOFnB,KAAK,CA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AACRjF,IAAAA,IAAI,EAAE;AACFkF,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDlF,IAAAA,cAAc,EAAE;AACZiF,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDrF,IAAAA,IAAI,EAAE;AACFmF,MAAAA,GAAG,EAAEG,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNtF,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,cAAc,EAAE,SAAS;AACzBF,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"Attach.js","sources":["../../../src/components/Attach/Attach.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { ChangeEvent } from 'react';\nimport { useForkRef, useIsomorphicLayoutEffect } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { IconCloseCircleOutline } from '../_Icon';\n\nimport { AttachProps } from './Attach.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as helperTextViewCSS } from './variations/_helperTextView/base';\nimport {\n base,\n StyledHelperText,\n StyledHiddenInput,\n StyledHiddenInputHelper,\n StyledAttachButtonWrapper,\n} from './Attach.styles';\nimport { StyledCell } from './ui/Cell/Cell';\nimport { extractExtension, getFileicon, addSeparator, separator } from './utils';\nimport { classes } from './Attach.tokens';\nimport { AttachButton } from './components/AttachButton';\nimport { StyledIconButtonCancel } from './ui/IconButton/IconButton.styles';\n\nexport const attachRoot = (Root: RootProps<HTMLDivElement, AttachProps>) =>\n forwardRef<HTMLDivElement, AttachProps>((props, outerRef) => {\n const {\n flow = 'auto',\n buttonType = 'button',\n hasAttachment = true,\n acceptedFileFormats,\n helperText,\n size,\n view,\n helperTextView,\n className,\n style,\n isLoading,\n disabled,\n id,\n name,\n customIcon,\n onChange,\n onClear,\n ...rest\n } = props;\n\n const innerRef = useRef<HTMLDivElement>(null);\n const ref = useForkRef(outerRef, innerRef);\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const inputHelperRef = useRef<HTMLDivElement | null>(null);\n const cellRef = useRef<HTMLDivElement | null>(null);\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n\n const emptyTextCellWidth = useRef<number | null>(null);\n\n const [filename, setFilename] = useState<string>('');\n const [truncatedFilename, setTruncatedFilename] = useState<string>('');\n\n const horizontalClass = flow === 'horizontal' ? classes.horizontal : undefined;\n const verticalClass = flow === 'vertical' ? classes.vertical : undefined;\n const withHelperTextClass = helperText ? classes.withHelperText : undefined;\n const autoClass = flow === 'auto' ? classes.auto : undefined;\n const cellHiddenClass = truncatedFilename.length === 0 ? classes.cellHidden : undefined;\n\n const accept = acceptedFileFormats?.join(',');\n const extension = extractExtension(filename);\n const cellContentLeft = customIcon || getFileicon(extension, size);\n\n useEffect(() => {\n emptyTextCellWidth.current = cellRef.current?.offsetWidth || 0;\n }, []);\n\n useIsomorphicLayoutEffect(() => {\n if (\n !cellRef.current ||\n !cellRef.current.parentElement ||\n !inputHelperRef.current ||\n !inputHelperRef.current.textContent ||\n !emptyTextCellWidth.current ||\n !buttonRef.current\n ) {\n return;\n }\n\n const { offsetWidth: textWidth } = inputHelperRef.current;\n const { offsetWidth: buttonWidth } = buttonRef.current;\n const { width: parentWidth, left: parentLeft } = cellRef.current.parentElement.getBoundingClientRect();\n const { left: cellLeft } = cellRef.current.getBoundingClientRect();\n const leftDiff = cellLeft - parentLeft;\n let currentTextWidth = textWidth;\n\n if (\n currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth ||\n currentTextWidth + emptyTextCellWidth.current < buttonWidth\n ) {\n setTruncatedFilename(filename);\n return;\n }\n\n let currFilename = addSeparator(filename, separator);\n for (let i = currFilename.indexOf(separator) - 1; i > 0; i -= 1) {\n if (currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth) {\n break;\n }\n\n const left = currFilename.slice(0, i);\n const right = currFilename.slice(i + 1);\n const newFilename = `${left}${right}`;\n inputHelperRef.current.textContent = newFilename;\n currentTextWidth = inputHelperRef.current.offsetWidth;\n\n if (currentTextWidth + emptyTextCellWidth.current < buttonWidth) {\n break;\n }\n\n currFilename = newFilename;\n }\n\n inputHelperRef.current.textContent = filename;\n setTruncatedFilename(currFilename);\n });\n\n const handleClick = () => {\n if (!inputRef.current) {\n return;\n }\n\n inputRef.current.click();\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n if (!e.target.files) {\n return;\n }\n\n if (onChange) {\n onChange(e);\n }\n\n setFilename(e.target.files[0].name);\n };\n\n const handleClear = () => {\n if (!inputRef.current) {\n return;\n }\n\n if (onClear) {\n onClear();\n }\n\n inputRef.current.value = '';\n setFilename('');\n setTruncatedFilename('');\n };\n\n return (\n <Root\n className={cx(horizontalClass, verticalClass, autoClass, withHelperTextClass, className)}\n style={style}\n size={size}\n view={view}\n helperTextView={helperTextView}\n ref={ref}\n >\n <StyledHiddenInput\n ref={inputRef}\n accept={accept}\n type=\"file\"\n id={id}\n name={name}\n onChange={handleChange}\n />\n <StyledHiddenInputHelper ref={inputHelperRef}>{filename}</StyledHiddenInputHelper>\n\n <StyledAttachButtonWrapper>\n <AttachButton\n ref={buttonRef}\n buttonType={buttonType}\n isLoading={isLoading}\n disabled={disabled}\n onClick={handleClick}\n {...rest}\n />\n\n {helperText && <StyledHelperText>{helperText}</StyledHelperText>}\n </StyledAttachButtonWrapper>\n\n {hasAttachment && (\n <StyledCell\n stretching=\"fixed\"\n className={cellHiddenClass}\n ref={cellRef}\n size={size}\n title={truncatedFilename}\n contentLeft={cellContentLeft}\n contentRight={\n <StyledIconButtonCancel onClick={handleClear}>\n <IconCloseCircleOutline size=\"xs\" color=\"inherit\" />\n </StyledIconButtonCancel>\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 helperTextView: {\n css: helperTextViewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n helperTextView: 'default',\n size: 'm',\n },\n};\n"],"names":["attachRoot","Root","forwardRef","props","outerRef","_props$flow","flow","_props$buttonType","buttonType","_props$hasAttachment","hasAttachment","acceptedFileFormats","helperText","size","view","helperTextView","className","style","isLoading","disabled","id","name","customIcon","onChange","onClear","rest","_objectWithoutProperties","_excluded","innerRef","useRef","ref","useForkRef","inputRef","inputHelperRef","cellRef","buttonRef","emptyTextCellWidth","_useState","useState","_useState2","_slicedToArray","filename","setFilename","_useState3","_useState4","truncatedFilename","setTruncatedFilename","horizontalClass","classes","horizontal","undefined","verticalClass","vertical","withHelperTextClass","withHelperText","autoClass","auto","cellHiddenClass","length","cellHidden","accept","join","extension","extractExtension","cellContentLeft","getFileicon","useEffect","_cellRef$current","current","offsetWidth","useIsomorphicLayoutEffect","parentElement","textContent","textWidth","buttonWidth","_cellRef$current$pare","getBoundingClientRect","parentWidth","width","parentLeft","left","_cellRef$current$getB","cellLeft","leftDiff","currentTextWidth","currFilename","addSeparator","separator","i","indexOf","slice","right","newFilename","concat","handleClick","click","handleChange","e","target","files","handleClear","value","React","createElement","cx","StyledHiddenInput","type","StyledHiddenInputHelper","StyledAttachButtonWrapper","AttachButton","_extends","onClick","StyledHelperText","StyledCell","stretching","title","contentLeft","contentRight","StyledIconButtonCancel","_IconCloseCircleOutli","IconCloseCircleOutline","color","attachConfig","tag","layout","base","variations","css","viewCSS","helperTextViewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;IAyBaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,UAAU,CAA8B,UAACC,KAAK,EAAEC,QAAQ,EAAK;AACzD,IAAA,IAAAC,WAAA,GAmBIF,KAAK,CAlBLG,IAAI;AAAJA,MAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,WA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AA,CAAAC,aAAA,CAACe,sBAAsB,EAAA;AAACP,QAAAA,OAAO,EAAEX,WAAAA;OAAYmB,EAAAA,qBAAA,KAAAA,qBAAA,gBACzCjB,KAAA,CAAAC,aAAA,CAACiB,sBAAsB,EAAA;AAAC3G,QAAAA,IAAI,EAAC,IAAI;AAAC4G,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAChC,CAAA;AAC3B,KACJ,CAEH,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMC,YAAY,GAAG;AACxBrG,EAAAA,IAAI,EAAE,QAAQ;AACdsG,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE5H,UAAU;AAClB6H,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACRhH,IAAAA,IAAI,EAAE;AACFiH,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDjH,IAAAA,cAAc,EAAE;AACZgH,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDpH,IAAAA,IAAI,EAAE;AACFkH,MAAAA,GAAG,EAAEG,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrH,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,cAAc,EAAE,SAAS;AACzBF,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './Attach.
|
|
1
|
+
import './Attach.styles_1w3ga58.css';
|
|
2
2
|
import { styled } from '@linaria/react';
|
|
3
3
|
|
|
4
4
|
var base = "by826kf";
|
|
@@ -7,31 +7,21 @@ var StyledHiddenInput = /*#__PURE__*/styled('input')({
|
|
|
7
7
|
"class": "sw7vb9c",
|
|
8
8
|
propsAsIs: false
|
|
9
9
|
});
|
|
10
|
-
var
|
|
11
|
-
name: "
|
|
10
|
+
var StyledHiddenInputHelper = /*#__PURE__*/styled('div')({
|
|
11
|
+
name: "StyledHiddenInputHelper",
|
|
12
12
|
"class": "suojwhg",
|
|
13
13
|
propsAsIs: false
|
|
14
14
|
});
|
|
15
|
-
var
|
|
16
|
-
name: "
|
|
15
|
+
var StyledAttachButtonWrapper = /*#__PURE__*/styled('div')({
|
|
16
|
+
name: "StyledAttachButtonWrapper",
|
|
17
17
|
"class": "sjp429d",
|
|
18
18
|
propsAsIs: false
|
|
19
19
|
});
|
|
20
|
-
var
|
|
21
|
-
name: "
|
|
22
|
-
"class": "
|
|
23
|
-
propsAsIs: false
|
|
24
|
-
});
|
|
25
|
-
var TruncatedFilenamePart = /*#__PURE__*/styled('span')({
|
|
26
|
-
name: "TruncatedFilenamePart",
|
|
27
|
-
"class": "t1531dv",
|
|
28
|
-
propsAsIs: false
|
|
29
|
-
});
|
|
30
|
-
var FilenameExtensionPart = /*#__PURE__*/styled('span')({
|
|
31
|
-
name: "FilenameExtensionPart",
|
|
32
|
-
"class": "f7plw5t",
|
|
20
|
+
var StyledHelperText = /*#__PURE__*/styled('div')({
|
|
21
|
+
name: "StyledHelperText",
|
|
22
|
+
"class": "sssye98",
|
|
33
23
|
propsAsIs: false
|
|
34
24
|
});
|
|
35
25
|
|
|
36
|
-
export {
|
|
26
|
+
export { StyledAttachButtonWrapper, StyledHelperText, StyledHiddenInput, StyledHiddenInputHelper, base };
|
|
37
27
|
//# sourceMappingURL=Attach.styles.js.map
|
|
@@ -1 +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';\
|
|
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\nexport const base = css`\n position: relative;\n display: flex;\n`;\n\nexport const StyledHiddenInput = styled.input`\n display: none;\n`;\n\nexport const StyledHiddenInputHelper = styled.div`\n position: absolute;\n visibility: hidden;\n white-space: nowrap;\n`;\n\nexport const StyledAttachButtonWrapper = styled.div`\n position: relative;\n`;\n\nexport const StyledHelperText = styled.div`\n position: absolute;\n margin-top: 0.25rem;\n`;\n"],"names":["base","StyledHiddenInput","styled","name","class","propsAsIs","StyledHiddenInputHelper","StyledAttachButtonWrapper","StyledHelperText"],"mappings":";;AAGO,IAAMA,IAAI,GAGhB,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,CAI5C,EAAA;AAEM,IAAME,yBAAyB,gBAAGL,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,2BAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE9C,EAAA;AAEM,IAAMG,gBAAgB,gBAAGN,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGrC;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
.by826kf{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}
|
|
2
|
+
.sw7vb9c{display:none;}
|
|
3
|
+
.suojwhg{position:absolute;visibility:hidden;white-space:nowrap;}
|
|
4
|
+
.sjp429d{position:relative;}
|
|
5
|
+
.sssye98{position:absolute;margin-top:0.25rem;}
|
|
@@ -9,7 +9,6 @@ var tokens = {
|
|
|
9
9
|
horizontalGap: '--plasma-attach-horizontal-gap',
|
|
10
10
|
verticalGap: '--plasma-attach-vertical-gap',
|
|
11
11
|
verticalGapWithHelperText: '--plasma-attach-vertical-gap-with-helper-text',
|
|
12
|
-
filenameWrapperHeight: '--plasma-attach-filename-wrapper-height',
|
|
13
12
|
helperTextColor: '--plasma-attach-helper-text-color',
|
|
14
13
|
// Токены для Button
|
|
15
14
|
buttonColor: '--plasma-attach-button-color',
|
|
@@ -1 +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 withHelperText: 'with-helper-text',\n cellHidden: 'cell-hidden',\n};\n\nexport const tokens = {\n horizontalGap: '--plasma-attach-horizontal-gap',\n verticalGap: '--plasma-attach-vertical-gap',\n verticalGapWithHelperText: '--plasma-attach-vertical-gap-with-helper-text',\n filenameWrapperHeight: '--plasma-attach-filename-wrapper-height',\n\n helperTextColor: '--plasma-attach-helper-text-color',\n\n // Токены для Button\n buttonColor: '--plasma-attach-button-color',\n buttonValueColor: '--plasma-attach-button-value-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 buttonLoadingBackgroundColor: '--plasma-attach-button-loading-background-color',\n\n buttonScaleHover: '--plasma-attach-button-scale-hover',\n buttonScaleActive: '---plasma-attach-button-scale-active',\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 buttonRadiusCircle: '--plasma-attach-button-radius-circle',\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 buttonLeftContentMargin: '--plasma-attach-button-left-content-margin',\n buttonLeftContentAlignSelf: '--plasma-attach-button-left-content-align-self',\n buttonRightContentMargin: '--plasma-attach-button-right-content-margin',\n buttonRightContentAlignSelf: '--plasma-attach-button-right-content-align-self',\n buttonValueMargin: '--plasma-attach-button-value-margin',\n\n buttonDisabledOpacity: '--plasma-attach-button-disabled-opacity',\n buttonFocusColor: '--plasma-attach-button-focus-color',\n\n buttonSpinnerColor: '--plasma-attach-button-spinner-color',\n buttonSpinnerSize: '--plasma-attach-button-spinner-size',\n\n // Токены для Cell\n cellColor: '--plasma-attach-cell-color',\n cellBackgroundColor: '--plasma-attach-cell-background-color',\n\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 cellWidth: '--plasma-attach-cell-width',\n\n cellLabelColor: '--plasma-attach-cell-label-color',\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 cellTitleColor: '--plasma-attach-cell-title-color',\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 cellSubtitleColor: '--plasma-attach-cell-subtitle-color',\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 iconButtonLoadingBackgroundColor: '--plasma-attach-icon-button-loading-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 iconButtonScaleHover: '--plasma-attach-icon-button-scale-hover',\n iconButtonScaleActive: '---plasma-attach-icon-button-scale-active',\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 iconButtonRadiusCircle: '--plasma-attach-icon-button-radius-circle',\n\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 iconButtonDisabledOpacity: '--plasma-attach-icon-button-disabled-opacity',\n iconButtonFocusColor: '--plasma-attach-icon-button-focus-color',\n\n iconButtonSpinnerColor: '--plasma-attach-icon-button-spinner-color',\n iconButtonSpinnerSize: '--plasma-attach-icon-button-spinner-size',\n\n // Токены для IconButtonCancel\n iconButtonCancelColor: '--plasma-attach-icon-button-cancel-color',\n iconButtonCancelBackgroundColor: '--plasma-attach-icon-button-cancel-background-color',\n iconButtonCancelLoadingBackgroundColor: '--plasma-attach-icon-button-cancel-loading-background-color',\n iconButtonCancelColorHover: '--plasma-attach-icon-button-cancel-color-hover',\n iconButtonCancelBackgroundColorHover: '--plasma-attach-icon-button-cancel-background-color-hover',\n iconButtonCancelColorActive: '--plasma-attach-icon-button-cancel-color-active',\n iconButtonCancelBackgroundColorActive: '--plasma-attach-icon-button-cancel-background-color-active',\n\n iconButtonCancelScaleHover: '--plasma-attach-icon-button-cancel-scale-hover',\n iconButtonCancelScaleActive: '---plasma-attach-icon-button-cancel-scale-active',\n iconButtonCancelHeight: '--plasma-attach-icon-button-cancel-height',\n iconButtonCancelWidth: '--plasma-attach-icon-button-cancel-width',\n iconButtonCancelPadding: '--plasma-attach-icon-button-cancel-padding',\n iconButtonCancelRadius: '--plasma-attach-icon-button-cancel-radius',\n iconButtonCancelRadiusCircle: '--plasma-attach-icon-button-cancel-radius-circle',\n\n iconButtonCancelFontFamily: '--plasma-attach-icon-button-cancel-font-family',\n iconButtonCancelFontSize: '--plasma-attach-icon-button-cancel-font-size',\n iconButtonCancelFontStyle: '--plasma-attach-icon-button-cancel-font-style',\n iconButtonCancelFontWeight: '--plasma-attach-icon-button-cancel-font-weight',\n iconButtonCancelLetterSpacing: '--plasma-attach-icon-button-cancel-letter-spacing',\n iconButtonCancelLineHeight: '--plasma-attach-icon-button-cancel-line-height',\n\n iconButtonCancelDisabledOpacity: '--plasma-attach-icon-button-cancel-disabled-opacity',\n iconButtonCancelFocusColor: '--plasma-attach-icon-button-cancel-focus-color',\n\n iconButtonCancelSpinnerColor: '--plasma-attach-icon-button-cancel-spinner-color',\n iconButtonCancelSpinnerSize: '--plasma-attach-icon-button-cancel-spinner-size',\n};\n"],"names":["classes","auto","horizontal","vertical","withHelperText","cellHidden","tokens","horizontalGap","verticalGap","verticalGapWithHelperText","filenameWrapperHeight","helperTextColor","buttonColor","buttonValueColor","buttonBackgroundColor","buttonColorHover","buttonBackgroundColorHover","buttonColorActive","buttonBackgroundColorActive","buttonLoadingBackgroundColor","buttonScaleHover","buttonScaleActive","buttonHeight","buttonWidth","buttonPadding","buttonRadius","buttonRadiusCircle","buttonFontFamily","buttonFontSize","buttonFontStyle","buttonFontWeight","buttonLetterSpacing","buttonLineHeight","buttonLeftContentMargin","buttonLeftContentAlignSelf","buttonRightContentMargin","buttonRightContentAlignSelf","buttonValueMargin","buttonDisabledOpacity","buttonFocusColor","buttonSpinnerColor","buttonSpinnerSize","cellColor","cellBackgroundColor","cellPadding","cellPaddingLeftContent","cellPaddingContent","cellPaddingRightContent","cellTextboxGap","cellGap","cellWidth","cellLabelColor","cellLabelFontFamily","cellLabelFontSize","cellLabelFontStyle","cellLabelFontWeight","cellLabelLetterSpacing","cellLabelLineHeight","cellTitleColor","cellTitleFontFamily","cellTitleFontSize","cellTitleFontStyle","cellTitleFontWeight","cellTitleLetterSpacing","cellTitleLineHeight","cellSubtitleColor","cellSubtitleFontFamily","cellSubtitleFontSize","cellSubtitleFontStyle","cellSubtitleFontWeight","cellSubtitleLetterSpacing","cellSubtitleLineHeight","iconButtonColor","iconButtonBackgroundColor","iconButtonLoadingBackgroundColor","iconButtonColorHover","iconButtonBackgroundColorHover","iconButtonColorActive","iconButtonBackgroundColorActive","iconButtonScaleHover","iconButtonScaleActive","iconButtonHeight","iconButtonWidth","iconButtonPadding","iconButtonRadius","iconButtonRadiusCircle","iconButtonFontFamily","iconButtonFontSize","iconButtonFontStyle","iconButtonFontWeight","iconButtonLetterSpacing","iconButtonLineHeight","iconButtonDisabledOpacity","iconButtonFocusColor","iconButtonSpinnerColor","iconButtonSpinnerSize","iconButtonCancelColor","iconButtonCancelBackgroundColor","iconButtonCancelLoadingBackgroundColor","iconButtonCancelColorHover","iconButtonCancelBackgroundColorHover","iconButtonCancelColorActive","iconButtonCancelBackgroundColorActive","iconButtonCancelScaleHover","iconButtonCancelScaleActive","iconButtonCancelHeight","iconButtonCancelWidth","iconButtonCancelPadding","iconButtonCancelRadius","iconButtonCancelRadiusCircle","iconButtonCancelFontFamily","iconButtonCancelFontSize","iconButtonCancelFontStyle","iconButtonCancelFontWeight","iconButtonCancelLetterSpacing","iconButtonCancelLineHeight","iconButtonCancelDisabledOpacity","iconButtonCancelFocusColor","iconButtonCancelSpinnerColor","iconButtonCancelSpinnerSize"],"mappings":"AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,cAAc,EAAE,kBAAkB;AAClCC,EAAAA,UAAU,EAAE,aAAA;AAChB,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,aAAa,EAAE,gCAAgC;AAC/CC,EAAAA,WAAW,EAAE,8BAA8B;AAC3CC,EAAAA,yBAAyB,EAAE,+CAA+C;AAC1EC,EAAAA,qBAAqB,EAAE,yCAAyC;AAEhEC,EAAAA,eAAe,EAAE,mCAAmC;AAEpD;AACAC,EAAAA,WAAW,EAAE,8BAA8B;AAC3CC,EAAAA,gBAAgB,EAAE,oCAAoC;AACtDC,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;AAC7EC,EAAAA,4BAA4B,EAAE,iDAAiD;AAE/EC,EAAAA,gBAAgB,EAAE,oCAAoC;AACtDC,EAAAA,iBAAiB,EAAE,sCAAsC;AACzDC,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|
|
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 withHelperText: 'with-helper-text',\n cellHidden: 'cell-hidden',\n};\n\nexport const tokens = {\n horizontalGap: '--plasma-attach-horizontal-gap',\n verticalGap: '--plasma-attach-vertical-gap',\n verticalGapWithHelperText: '--plasma-attach-vertical-gap-with-helper-text',\n\n helperTextColor: '--plasma-attach-helper-text-color',\n\n // Токены для Button\n buttonColor: '--plasma-attach-button-color',\n buttonValueColor: '--plasma-attach-button-value-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 buttonLoadingBackgroundColor: '--plasma-attach-button-loading-background-color',\n\n buttonScaleHover: '--plasma-attach-button-scale-hover',\n buttonScaleActive: '---plasma-attach-button-scale-active',\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 buttonRadiusCircle: '--plasma-attach-button-radius-circle',\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 buttonLeftContentMargin: '--plasma-attach-button-left-content-margin',\n buttonLeftContentAlignSelf: '--plasma-attach-button-left-content-align-self',\n buttonRightContentMargin: '--plasma-attach-button-right-content-margin',\n buttonRightContentAlignSelf: '--plasma-attach-button-right-content-align-self',\n buttonValueMargin: '--plasma-attach-button-value-margin',\n\n buttonDisabledOpacity: '--plasma-attach-button-disabled-opacity',\n buttonFocusColor: '--plasma-attach-button-focus-color',\n\n buttonSpinnerColor: '--plasma-attach-button-spinner-color',\n buttonSpinnerSize: '--plasma-attach-button-spinner-size',\n\n // Токены для Cell\n cellColor: '--plasma-attach-cell-color',\n cellBackgroundColor: '--plasma-attach-cell-background-color',\n\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 cellWidth: '--plasma-attach-cell-width',\n\n cellLabelColor: '--plasma-attach-cell-label-color',\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 cellTitleColor: '--plasma-attach-cell-title-color',\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 cellSubtitleColor: '--plasma-attach-cell-subtitle-color',\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 iconButtonLoadingBackgroundColor: '--plasma-attach-icon-button-loading-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 iconButtonScaleHover: '--plasma-attach-icon-button-scale-hover',\n iconButtonScaleActive: '---plasma-attach-icon-button-scale-active',\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 iconButtonRadiusCircle: '--plasma-attach-icon-button-radius-circle',\n\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 iconButtonDisabledOpacity: '--plasma-attach-icon-button-disabled-opacity',\n iconButtonFocusColor: '--plasma-attach-icon-button-focus-color',\n\n iconButtonSpinnerColor: '--plasma-attach-icon-button-spinner-color',\n iconButtonSpinnerSize: '--plasma-attach-icon-button-spinner-size',\n\n // Токены для IconButtonCancel\n iconButtonCancelColor: '--plasma-attach-icon-button-cancel-color',\n iconButtonCancelBackgroundColor: '--plasma-attach-icon-button-cancel-background-color',\n iconButtonCancelLoadingBackgroundColor: '--plasma-attach-icon-button-cancel-loading-background-color',\n iconButtonCancelColorHover: '--plasma-attach-icon-button-cancel-color-hover',\n iconButtonCancelBackgroundColorHover: '--plasma-attach-icon-button-cancel-background-color-hover',\n iconButtonCancelColorActive: '--plasma-attach-icon-button-cancel-color-active',\n iconButtonCancelBackgroundColorActive: '--plasma-attach-icon-button-cancel-background-color-active',\n\n iconButtonCancelScaleHover: '--plasma-attach-icon-button-cancel-scale-hover',\n iconButtonCancelScaleActive: '---plasma-attach-icon-button-cancel-scale-active',\n iconButtonCancelHeight: '--plasma-attach-icon-button-cancel-height',\n iconButtonCancelWidth: '--plasma-attach-icon-button-cancel-width',\n iconButtonCancelPadding: '--plasma-attach-icon-button-cancel-padding',\n iconButtonCancelRadius: '--plasma-attach-icon-button-cancel-radius',\n iconButtonCancelRadiusCircle: '--plasma-attach-icon-button-cancel-radius-circle',\n\n iconButtonCancelFontFamily: '--plasma-attach-icon-button-cancel-font-family',\n iconButtonCancelFontSize: '--plasma-attach-icon-button-cancel-font-size',\n iconButtonCancelFontStyle: '--plasma-attach-icon-button-cancel-font-style',\n iconButtonCancelFontWeight: '--plasma-attach-icon-button-cancel-font-weight',\n iconButtonCancelLetterSpacing: '--plasma-attach-icon-button-cancel-letter-spacing',\n iconButtonCancelLineHeight: '--plasma-attach-icon-button-cancel-line-height',\n\n iconButtonCancelDisabledOpacity: '--plasma-attach-icon-button-cancel-disabled-opacity',\n iconButtonCancelFocusColor: '--plasma-attach-icon-button-cancel-focus-color',\n\n iconButtonCancelSpinnerColor: '--plasma-attach-icon-button-cancel-spinner-color',\n iconButtonCancelSpinnerSize: '--plasma-attach-icon-button-cancel-spinner-size',\n};\n"],"names":["classes","auto","horizontal","vertical","withHelperText","cellHidden","tokens","horizontalGap","verticalGap","verticalGapWithHelperText","helperTextColor","buttonColor","buttonValueColor","buttonBackgroundColor","buttonColorHover","buttonBackgroundColorHover","buttonColorActive","buttonBackgroundColorActive","buttonLoadingBackgroundColor","buttonScaleHover","buttonScaleActive","buttonHeight","buttonWidth","buttonPadding","buttonRadius","buttonRadiusCircle","buttonFontFamily","buttonFontSize","buttonFontStyle","buttonFontWeight","buttonLetterSpacing","buttonLineHeight","buttonLeftContentMargin","buttonLeftContentAlignSelf","buttonRightContentMargin","buttonRightContentAlignSelf","buttonValueMargin","buttonDisabledOpacity","buttonFocusColor","buttonSpinnerColor","buttonSpinnerSize","cellColor","cellBackgroundColor","cellPadding","cellPaddingLeftContent","cellPaddingContent","cellPaddingRightContent","cellTextboxGap","cellGap","cellWidth","cellLabelColor","cellLabelFontFamily","cellLabelFontSize","cellLabelFontStyle","cellLabelFontWeight","cellLabelLetterSpacing","cellLabelLineHeight","cellTitleColor","cellTitleFontFamily","cellTitleFontSize","cellTitleFontStyle","cellTitleFontWeight","cellTitleLetterSpacing","cellTitleLineHeight","cellSubtitleColor","cellSubtitleFontFamily","cellSubtitleFontSize","cellSubtitleFontStyle","cellSubtitleFontWeight","cellSubtitleLetterSpacing","cellSubtitleLineHeight","iconButtonColor","iconButtonBackgroundColor","iconButtonLoadingBackgroundColor","iconButtonColorHover","iconButtonBackgroundColorHover","iconButtonColorActive","iconButtonBackgroundColorActive","iconButtonScaleHover","iconButtonScaleActive","iconButtonHeight","iconButtonWidth","iconButtonPadding","iconButtonRadius","iconButtonRadiusCircle","iconButtonFontFamily","iconButtonFontSize","iconButtonFontStyle","iconButtonFontWeight","iconButtonLetterSpacing","iconButtonLineHeight","iconButtonDisabledOpacity","iconButtonFocusColor","iconButtonSpinnerColor","iconButtonSpinnerSize","iconButtonCancelColor","iconButtonCancelBackgroundColor","iconButtonCancelLoadingBackgroundColor","iconButtonCancelColorHover","iconButtonCancelBackgroundColorHover","iconButtonCancelColorActive","iconButtonCancelBackgroundColorActive","iconButtonCancelScaleHover","iconButtonCancelScaleActive","iconButtonCancelHeight","iconButtonCancelWidth","iconButtonCancelPadding","iconButtonCancelRadius","iconButtonCancelRadiusCircle","iconButtonCancelFontFamily","iconButtonCancelFontSize","iconButtonCancelFontStyle","iconButtonCancelFontWeight","iconButtonCancelLetterSpacing","iconButtonCancelLineHeight","iconButtonCancelDisabledOpacity","iconButtonCanc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6DAA6D;AACrGC,EAAAA,0BAA0B,EAAE,gDAAgD;AAC5EC,EAAAA,oCAAoC,EAAE,2DAA2D;AACjGC,EAAAA,2BAA2B,EAAE,iDAAiD;AAC9EC,EAAAA,qCAAqC,EAAE,4DAA4D;AAEnGC,EAAAA,0BAA0B,EAAE,gDAAgD;AAC5EC,EAAAA,2BAA2B,EAAE,kDAAkD;AAC/EC,EAAAA,sBAAsB,EAAE,2CAA2C;AACnEC,EAAAA,qBAAqB,EAAE,0CAA0C;AACjEC,EAAAA,uBAAuB,EAAE,4CAA4C;AACrEC,EAAAA,sBAAsB,EAAE,2CAA2C;AACnEC,EAAAA,4BAA4B,EAAE,kDAAkD;AAEhFC,EAAAA,0BAA0B,EAAE,gDAAgD;AAC5EC,EAAAA,wBAAwB,EAAE,8CAA8C;AACxEC,EAAAA,yBAAyB,EAAE,+CAA+C;AAC1EC,EAAAA,0BAA0B,EAAE,gDAAgD;AAC5EC,EAAAA,6BAA6B,EAAE,mDAAmD;AAClFC,EAAAA,0BAA0B,EAAE,gDAAgD;AAE5EC,EAAAA,+BAA+B,EAAE,qDAAqD;AACtFC,EAAAA,0BAA0B,EAAE,gDAAgD;AAE5EC,EAAAA,4BAA4B,EAAE,kDAAkD;AAChFC,EAAAA,2BAA2B,EAAE,iDAAA;AACjC;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { extractExtension } from './extractExtension.js';
|
|
2
|
+
|
|
3
|
+
var addSeparator = function addSeparator(filename, separator) {
|
|
4
|
+
var extension = extractExtension(filename);
|
|
5
|
+
var strings = filename.split('.');
|
|
6
|
+
var name = strings.length > 1 ? strings.slice(0, -1).join('.') : strings[0];
|
|
7
|
+
var lastChar = name[name.length - 1];
|
|
8
|
+
var dotChar = '.';
|
|
9
|
+
var nameWithSeparator = "".concat(name.slice(0, -1)).concat(separator).concat(lastChar);
|
|
10
|
+
return extension === name ? "".concat(nameWithSeparator) : "".concat(nameWithSeparator).concat(dotChar).concat(extension);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { addSeparator };
|
|
14
|
+
//# sourceMappingURL=addSeparator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addSeparator.js","sources":["../../../../src/components/Attach/utils/addSeparator.ts"],"sourcesContent":["import { extractExtension } from './extractExtension';\n\nexport const addSeparator = (filename: string, separator: string) => {\n const extension = extractExtension(filename);\n\n const strings = filename.split('.');\n const name = strings.length > 1 ? strings.slice(0, -1).join('.') : strings[0];\n const lastChar = name[name.length - 1];\n const dotChar = '.';\n\n const nameWithSeparator = `${name.slice(0, -1)}${separator}${lastChar}`;\n\n return extension === name ? `${nameWithSeparator}` : `${nameWithSeparator}${dotChar}${extension}`;\n};\n"],"names":["addSeparator","filename","separator","extension","extractExtension","strings","split","name","length","slice","join","lastChar","dotChar","nameWithSeparator","concat"],"mappings":";;AAEO,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,QAAgB,EAAEC,SAAiB,EAAK;AACjE,EAAA,IAAMC,SAAS,GAAGC,gBAAgB,CAACH,QAAQ,CAAC,CAAA;AAE5C,EAAA,IAAMI,OAAO,GAAGJ,QAAQ,CAACK,KAAK,CAAC,GAAG,CAAC,CAAA;EACnC,IAAMC,IAAI,GAAGF,OAAO,CAACG,MAAM,GAAG,CAAC,GAAGH,OAAO,CAACI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,GAAGL,OAAO,CAAC,CAAC,CAAC,CAAA;EAC7E,IAAMM,QAAQ,GAAGJ,IAAI,CAACA,IAAI,CAACC,MAAM,GAAG,CAAC,CAAC,CAAA;EACtC,IAAMI,OAAO,GAAG,GAAG,CAAA;EAEnB,IAAMC,iBAAiB,MAAAC,MAAA,CAAMP,IAAI,CAACE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAAK,MAAA,CAAGZ,SAAS,CAAAY,CAAAA,MAAA,CAAGH,QAAQ,CAAE,CAAA;AAEvE,EAAA,OAAOR,SAAS,KAAKI,IAAI,MAAAO,MAAA,CAAMD,iBAAiB,CAAAC,GAAAA,EAAAA,CAAAA,MAAA,CAAQD,iBAAiB,CAAA,CAAAC,MAAA,CAAGF,OAAO,EAAAE,MAAA,CAAGX,SAAS,CAAE,CAAA;AACrG;;;;"}
|
|
@@ -6,7 +6,7 @@ import { IconBlankXlsOutline } from '../../_Icon/Icons/IconBlankXlsOutline.js';
|
|
|
6
6
|
import { IconBlankDocOutline } from '../../_Icon/Icons/IconBlankDocOutline.js';
|
|
7
7
|
import { IconBlankPdfOutline } from '../../_Icon/Icons/IconBlankPdfOutline.js';
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var getFileicon = function getFileicon(extension, size) {
|
|
10
10
|
var iconSize = size === 'xs' ? 'xs' : 's';
|
|
11
11
|
switch (extension) {
|
|
12
12
|
case 'pdf':
|
|
@@ -52,5 +52,5 @@ var getFileIcon = function getFileIcon(extension, size) {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
export {
|
|
55
|
+
export { getFileicon };
|
|
56
56
|
//# sourceMappingURL=getFileicon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFileicon.js","sources":["../../../../src/components/Attach/utils/getFileicon.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n IconBlankCsvOutline,\n IconBlankDocOutline,\n IconBlankOutline,\n IconBlankPdfOutline,\n IconBlankTxtOutline,\n IconBlankXlsOutline,\n} from '../../_Icon';\n\nexport const
|
|
1
|
+
{"version":3,"file":"getFileicon.js","sources":["../../../../src/components/Attach/utils/getFileicon.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n IconBlankCsvOutline,\n IconBlankDocOutline,\n IconBlankOutline,\n IconBlankPdfOutline,\n IconBlankTxtOutline,\n IconBlankXlsOutline,\n} from '../../_Icon';\n\nexport const getFileicon = (extension?: string, size?: string) => {\n const iconSize = size === 'xs' ? 'xs' : 's';\n\n switch (extension) {\n case 'pdf':\n return <IconBlankPdfOutline size={iconSize} color=\"inherit\" />;\n case 'doc':\n return <IconBlankDocOutline size={iconSize} color=\"inherit\" />;\n case 'docx':\n return <IconBlankDocOutline size={iconSize} color=\"inherit\" />;\n case 'xls':\n return <IconBlankXlsOutline size={iconSize} color=\"inherit\" />;\n case 'xlsx':\n return <IconBlankXlsOutline size={iconSize} color=\"inherit\" />;\n case 'txt':\n return <IconBlankTxtOutline size={iconSize} color=\"inherit\" />;\n case 'csv':\n return <IconBlankCsvOutline size={iconSize} color=\"inherit\" />;\n default:\n return <IconBlankOutline size={iconSize} color=\"inherit\" />;\n }\n};\n"],"names":["getFileicon","extension","size","iconSize","React","createElement","IconBlankPdfOutline","color","IconBlankDocOutline","IconBlankXlsOutline","IconBlankTxtOutline","IconBlankCsvOutline","IconBlankOutline"],"mappings":";;;;;;;;AAWO,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,SAAkB,EAAEC,IAAa,EAAK;EAC9D,IAAMC,QAAQ,GAAGD,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,GAAG,CAAA;AAE3C,EAAA,QAAQD,SAAS;AACb,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACC,mBAAmB,EAAA;AAACJ,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACG,mBAAmB,EAAA;AAACN,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,MAAM;AACP,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACG,mBAAmB,EAAA;AAACN,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACI,mBAAmB,EAAA;AAACP,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,MAAM;AACP,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACI,mBAAmB,EAAA;AAACP,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACK,mBAAmB,EAAA;AAACR,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACM,mBAAmB,EAAA;AAACT,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA;AACI,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACO,gBAAgB,EAAA;AAACV,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AACnE,GAAA;AACJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Attach/utils/index.ts"],"sourcesContent":["export { extractExtension } from './extractExtension';\nexport { getFileicon } from './getFileicon';\nexport { addSeparator } from './addSeparator';\n\nexport const separator = '...';\n"],"names":["separator"],"mappings":"AAIO,IAAMA,SAAS,GAAG;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.b1psfq3i .sssye98{color:var(--plasma-attach-helper-text-color);}
|
|
@@ -1 +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';\nimport {
|
|
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';\nimport { StyledHelperText, StyledHiddenInputHelper } from '../../Attach.styles';\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 &.${classes.withHelperText} {\n row-gap: var(${tokens.verticalGapWithHelperText});\n }\n\n ${StyledHiddenInputHelper} {\n font-family: var(${tokens.cellTitleFontFamily});\n font-size: var(${tokens.cellTitleFontSize});\n font-style: var(${tokens.cellTitleFontStyle});\n font-weight: var(${tokens.cellTitleFontWeight});\n letter-spacing: var(${tokens.cellTitleLetterSpacing});\n line-height: var(${tokens.cellTitleLineHeight});\n }\n\n ${StyledHelperText} {\n font-family: var(--plasma-typo-body-xs-font-family);\n font-size: var(--plasma-typo-body-xs-font-size);\n font-style: var(--plasma-typo-body-xs-font-style);\n font-weight: var(--plasma-typo-body-xs-font-weight);\n letter-spacing: var(--plasma-typo-body-xs-letter-spacing);\n line-height: var(--plasma-typo-body-xs-line-height);\n }\n}\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GAoChB;;;;"}
|
|
@@ -1 +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);}.b1pj1390.with-helper-text{row-gap:var(--plasma-attach-vertical-gap-with-helper-text);}.b1pj1390 .
|
|
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);}.b1pj1390.with-helper-text{row-gap:var(--plasma-attach-vertical-gap-with-helper-text);}.b1pj1390 .suojwhg{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);}.b1pj1390 .sssye98{font-family:var(--plasma-typo-body-xs-font-family);font-size:var(--plasma-typo-body-xs-font-size);font-style:var(--plasma-typo-body-xs-font-style);font-weight:var(--plasma-typo-body-xs-font-weight);-webkit-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-moz-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-ms-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);letter-spacing:var(--plasma-typo-body-xs-letter-spacing);line-height:var(--plasma-typo-body-xs-line-height);}
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
|
|
61
61
|
.base_fbxbaa_b37w9ja__9aed17a1{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1{position:absolute;width:100%;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1 .base_fbxbaa_b5xb1jq__9aed17a1{background:transparent;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1.base_fbxbaa_panelRightCloseButton__9aed17a1{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;}
|
|
62
62
|
|
|
63
|
-
.
|
|
64
|
-
.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerOverlay__fe71c4d5{-webkit-animation:Drawer_styles_1gcp61n_fadeInSv7q57r__fe71c4d5 0.2s forwards;animation:Drawer_styles_1gcp61n_fadeInSv7q57r__fe71c4d5 0.2s forwards;-webkit-scrollbar-gutter:stable;-moz-scrollbar-gutter:stable;-ms-scrollbar-gutter:stable;scrollbar-gutter:stable;}.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_popupEndAnimation__fe71c4d5 .Drawer_styles_1gcp61n_drawerOverlay__fe71c4d5{-webkit-animation:Drawer_styles_1gcp61n_fadeOutSv7q57r__fe71c4d5 0.2s forwards;animation:Drawer_styles_1gcp61n_fadeOutSv7q57r__fe71c4d5 0.2s forwards;}@-webkit-keyframes Drawer_styles_1gcp61n_fadeInSv7q57r__fe71c4d5{from{opacity:0;}to{opacity:1;}}@keyframes Drawer_styles_1gcp61n_fadeInSv7q57r__fe71c4d5{from{opacity:0;}to{opacity:1;}}@-webkit-keyframes Drawer_styles_1gcp61n_fadeOutSv7q57r__fe71c4d5{from{opacity:1;}to{opacity:0;}}@keyframes Drawer_styles_1gcp61n_fadeOutSv7q57r__fe71c4d5{from{opacity:1;}to{opacity:0;}}.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5 .Drawer_styles_1gcp61n_popupBaseRoot__fe71c4d5,.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5 .Drawer_styles_1gcp61n_popupBaseRoot__fe71c4d5 > div{width:var(--sv7q57r-0);height:var(--sv7q57r-1);}.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerRightPlacement__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerRightPlacement__fe71c4d5 .Drawer_styles_1gcp61n_popupBaseRoot__fe71c4d5{-webkit-animation:Drawer_styles_1gcp61n_rightShowAnimationSv7q57r__fe71c4d5 0.2s forwards;animation:Drawer_styles_1gcp61n_rightShowAnimationSv7q57r__fe71c4d5 0.2s forwards;}.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerRightPlacement__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerRightPlacement__fe71c4d5.Drawer_styles_1gcp61n_popupEndAnimation__fe71c4d5 .Drawer_styles_1gcp61n_popupBaseRoot__fe71c4d5{-webkit-animation:Drawer_styles_1gcp61n_rightHideAnimationSv7q57r__fe71c4d5 0.2s forwards;animation:Drawer_styles_1gcp61n_rightHideAnimationSv7q57r__fe71c4d5 0.2s forwards;}@-webkit-keyframes Drawer_styles_1gcp61n_rightShowAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(100%,-50%);-ms-transform:translate(100%,-50%);transform:translate(100%,-50%);opacity:0;}100%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}}@keyframes Drawer_styles_1gcp61n_rightShowAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(100%,-50%);-ms-transform:translate(100%,-50%);transform:translate(100%,-50%);opacity:0;}100%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}}@-webkit-keyframes Drawer_styles_1gcp61n_rightHideAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}100%{-webkit-transform:translate(100%,-50%);-ms-transform:translate(100%,-50%);transform:translate(100%,-50%);opacity:0;}}@keyframes Drawer_styles_1gcp61n_rightHideAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}100%{-webkit-transform:translate(100%,-50%);-ms-transform:translate(100%,-50%);transform:translate(100%,-50%);opacity:0;}}.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerBottomPlacement__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerBottomPlacement__fe71c4d5 .Drawer_styles_1gcp61n_popupBaseRoot__fe71c4d5{-webkit-animation:Drawer_styles_1gcp61n_bottomShowAnimationSv7q57r__fe71c4d5 0.2s forwards;animation:Drawer_styles_1gcp61n_bottomShowAnimationSv7q57r__fe71c4d5 0.2s forwards;}.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerBottomPlacement__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerBottomPlacement__fe71c4d5.Drawer_styles_1gcp61n_popupEndAnimation__fe71c4d5 .Drawer_styles_1gcp61n_popupBaseRoot__fe71c4d5{-webkit-animation:Drawer_styles_1gcp61n_bottomHideAnimationSv7q57r__fe71c4d5 0.2s forwards;animation:Drawer_styles_1gcp61n_bottomHideAnimationSv7q57r__fe71c4d5 0.2s forwards;}@-webkit-keyframes Drawer_styles_1gcp61n_bottomShowAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(-50%,100%);-ms-transform:translate(-50%,100%);transform:translate(-50%,100%);opacity:0;}100%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}}@keyframes Drawer_styles_1gcp61n_bottomShowAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(-50%,100%);-ms-transform:translate(-50%,100%);transform:translate(-50%,100%);opacity:0;}100%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}}@-webkit-keyframes Drawer_styles_1gcp61n_bottomHideAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}100%{-webkit-transform:translate(-50%,100%);-ms-transform:translate(-50%,100%);transform:translate(-50%,100%);opacity:0;}}@keyframes Drawer_styles_1gcp61n_bottomHideAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}100%{-webkit-transform:translate(-50%,100%);-ms-transform:translate(-50%,100%);transform:translate(-50%,100%);opacity:0;}}.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerLeftPlacement__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerLeftPlacement__fe71c4d5 .Drawer_styles_1gcp61n_popupBaseRoot__fe71c4d5{-webkit-animation:Drawer_styles_1gcp61n_leftShowAnimationSv7q57r__fe71c4d5 0.2s forwards;animation:Drawer_styles_1gcp61n_leftShowAnimationSv7q57r__fe71c4d5 0.2s forwards;}.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerLeftPlacement__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerLeftPlacement__fe71c4d5.Drawer_styles_1gcp61n_popupEndAnimation__fe71c4d5 .Drawer_styles_1gcp61n_popupBaseRoot__fe71c4d5{-webkit-animation:Drawer_styles_1gcp61n_leftHideAnimationSv7q57r__fe71c4d5 0.2s forwards;animation:Drawer_styles_1gcp61n_leftHideAnimationSv7q57r__fe71c4d5 0.2s forwards;}@-webkit-keyframes Drawer_styles_1gcp61n_leftShowAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(-100%,-50%);-ms-transform:translate(-100%,-50%);transform:translate(-100%,-50%);opacity:0;}100%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}}@keyframes Drawer_styles_1gcp61n_leftShowAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(-100%,-50%);-ms-transform:translate(-100%,-50%);transform:translate(-100%,-50%);opacity:0;}100%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}}@-webkit-keyframes Drawer_styles_1gcp61n_leftHideAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}100%{-webkit-transform:translate(-100%,-50%);-ms-transform:translate(-100%,-50%);transform:translate(-100%,-50%);opacity:0;}}@keyframes Drawer_styles_1gcp61n_leftHideAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}100%{-webkit-transform:translate(-100%,-50%);-ms-transform:translate(-100%,-50%);transform:translate(-100%,-50%);opacity:0;}}.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerTopPlacement__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerTopPlacement__fe71c4d5 .Drawer_styles_1gcp61n_popupBaseRoot__fe71c4d5{-webkit-animation:Drawer_styles_1gcp61n_topShowAnimationSv7q57r__fe71c4d5 0.2s forwards;animation:Drawer_styles_1gcp61n_topShowAnimationSv7q57r__fe71c4d5 0.2s forwards;}.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerTopPlacement__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerTopPlacement__fe71c4d5.Drawer_styles_1gcp61n_popupEndAnimation__fe71c4d5 .Drawer_styles_1gcp61n_popupBaseRoot__fe71c4d5{-webkit-animation:Drawer_styles_1gcp61n_topHideAnimationSv7q57r__fe71c4d5 0.2s forwards;animation:Drawer_styles_1gcp61n_topHideAnimationSv7q57r__fe71c4d5 0.2s forwards;}@-webkit-keyframes Drawer_styles_1gcp61n_topShowAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(-50%,-100%);-ms-transform:translate(-50%,-100%);transform:translate(-50%,-100%);opacity:0;}100%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}}@keyframes Drawer_styles_1gcp61n_topShowAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(-50%,-100%);-ms-transform:translate(-50%,-100%);transform:translate(-50%,-100%);opacity:0;}100%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}}@-webkit-keyframes Drawer_styles_1gcp61n_topHideAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}100%{-webkit-transform:translate(-50%,-100%);-ms-transform:translate(-50%,-100%);transform:translate(-50%,-100%);opacity:0;}}@keyframes Drawer_styles_1gcp61n_topHideAnimationSv7q57r__fe71c4d5{0%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}100%{-webkit-transform:translate(-50%,-100%);-ms-transform:translate(-50%,-100%);transform:translate(-50%,-100%);opacity:0;}}.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerEnterCustomAnimation__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerEnterCustomAnimation__fe71c4d5 .Drawer_styles_1gcp61n_popupBaseRoot__fe71c4d5{-webkit-animation:var(--sv7q57r-2);animation:var(--sv7q57r-2);}.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerExitCustomAnimation__fe71c4d5.Drawer_styles_1gcp61n_sv7q57r__fe71c4d5.Drawer_styles_1gcp61n_drawerExitCustomAnimation__fe71c4d5.Drawer_styles_1gcp61n_popupEndAnimation__fe71c4d5 .Drawer_styles_1gcp61n_popupBaseRoot__fe71c4d5{-webkit-animation:var(--sv7q57r-3);animation:var(--sv7q57r-3);}
|
|
63
|
+
.Drawer_styles_h5od79_s1ewnow2__f99f45af{--plasma-panel-close-color:var(--plasma-drawer-close-icon-color);}
|
|
64
|
+
.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerOverlay__f99f45af{-webkit-animation:Drawer_styles_h5od79_fadeInSv7q57r__f99f45af 0.2s forwards;animation:Drawer_styles_h5od79_fadeInSv7q57r__f99f45af 0.2s forwards;-webkit-scrollbar-gutter:stable;-moz-scrollbar-gutter:stable;-ms-scrollbar-gutter:stable;scrollbar-gutter:stable;}.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_popupEndAnimation__f99f45af .Drawer_styles_h5od79_drawerOverlay__f99f45af{-webkit-animation:Drawer_styles_h5od79_fadeOutSv7q57r__f99f45af 0.2s forwards;animation:Drawer_styles_h5od79_fadeOutSv7q57r__f99f45af 0.2s forwards;}@-webkit-keyframes Drawer_styles_h5od79_fadeInSv7q57r__f99f45af{from{opacity:0;}to{opacity:1;}}@keyframes Drawer_styles_h5od79_fadeInSv7q57r__f99f45af{from{opacity:0;}to{opacity:1;}}@-webkit-keyframes Drawer_styles_h5od79_fadeOutSv7q57r__f99f45af{from{opacity:1;}to{opacity:0;}}@keyframes Drawer_styles_h5od79_fadeOutSv7q57r__f99f45af{from{opacity:1;}to{opacity:0;}}.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_sv7q57r__f99f45af .Drawer_styles_h5od79_popupBaseRoot__f99f45af,.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_sv7q57r__f99f45af .Drawer_styles_h5od79_popupBaseRoot__f99f45af > div{width:var(--sv7q57r-0);height:var(--sv7q57r-1);}.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerRightPlacement__f99f45af.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerRightPlacement__f99f45af .Drawer_styles_h5od79_popupBaseRoot__f99f45af{-webkit-animation:Drawer_styles_h5od79_rightShowAnimationSv7q57r__f99f45af 0.2s forwards;animation:Drawer_styles_h5od79_rightShowAnimationSv7q57r__f99f45af 0.2s forwards;}.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerRightPlacement__f99f45af.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerRightPlacement__f99f45af.Drawer_styles_h5od79_popupEndAnimation__f99f45af .Drawer_styles_h5od79_popupBaseRoot__f99f45af{-webkit-animation:Drawer_styles_h5od79_rightHideAnimationSv7q57r__f99f45af 0.2s forwards;animation:Drawer_styles_h5od79_rightHideAnimationSv7q57r__f99f45af 0.2s forwards;}@-webkit-keyframes Drawer_styles_h5od79_rightShowAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(100%,-50%);-ms-transform:translate(100%,-50%);transform:translate(100%,-50%);opacity:0;}100%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}}@keyframes Drawer_styles_h5od79_rightShowAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(100%,-50%);-ms-transform:translate(100%,-50%);transform:translate(100%,-50%);opacity:0;}100%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}}@-webkit-keyframes Drawer_styles_h5od79_rightHideAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}100%{-webkit-transform:translate(100%,-50%);-ms-transform:translate(100%,-50%);transform:translate(100%,-50%);opacity:0;}}@keyframes Drawer_styles_h5od79_rightHideAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}100%{-webkit-transform:translate(100%,-50%);-ms-transform:translate(100%,-50%);transform:translate(100%,-50%);opacity:0;}}.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerBottomPlacement__f99f45af.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerBottomPlacement__f99f45af .Drawer_styles_h5od79_popupBaseRoot__f99f45af{-webkit-animation:Drawer_styles_h5od79_bottomShowAnimationSv7q57r__f99f45af 0.2s forwards;animation:Drawer_styles_h5od79_bottomShowAnimationSv7q57r__f99f45af 0.2s forwards;}.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerBottomPlacement__f99f45af.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerBottomPlacement__f99f45af.Drawer_styles_h5od79_popupEndAnimation__f99f45af .Drawer_styles_h5od79_popupBaseRoot__f99f45af{-webkit-animation:Drawer_styles_h5od79_bottomHideAnimationSv7q57r__f99f45af 0.2s forwards;animation:Drawer_styles_h5od79_bottomHideAnimationSv7q57r__f99f45af 0.2s forwards;}@-webkit-keyframes Drawer_styles_h5od79_bottomShowAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(-50%,100%);-ms-transform:translate(-50%,100%);transform:translate(-50%,100%);opacity:0;}100%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}}@keyframes Drawer_styles_h5od79_bottomShowAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(-50%,100%);-ms-transform:translate(-50%,100%);transform:translate(-50%,100%);opacity:0;}100%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}}@-webkit-keyframes Drawer_styles_h5od79_bottomHideAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}100%{-webkit-transform:translate(-50%,100%);-ms-transform:translate(-50%,100%);transform:translate(-50%,100%);opacity:0;}}@keyframes Drawer_styles_h5od79_bottomHideAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}100%{-webkit-transform:translate(-50%,100%);-ms-transform:translate(-50%,100%);transform:translate(-50%,100%);opacity:0;}}.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerLeftPlacement__f99f45af.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerLeftPlacement__f99f45af .Drawer_styles_h5od79_popupBaseRoot__f99f45af{-webkit-animation:Drawer_styles_h5od79_leftShowAnimationSv7q57r__f99f45af 0.2s forwards;animation:Drawer_styles_h5od79_leftShowAnimationSv7q57r__f99f45af 0.2s forwards;}.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerLeftPlacement__f99f45af.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerLeftPlacement__f99f45af.Drawer_styles_h5od79_popupEndAnimation__f99f45af .Drawer_styles_h5od79_popupBaseRoot__f99f45af{-webkit-animation:Drawer_styles_h5od79_leftHideAnimationSv7q57r__f99f45af 0.2s forwards;animation:Drawer_styles_h5od79_leftHideAnimationSv7q57r__f99f45af 0.2s forwards;}@-webkit-keyframes Drawer_styles_h5od79_leftShowAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(-100%,-50%);-ms-transform:translate(-100%,-50%);transform:translate(-100%,-50%);opacity:0;}100%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}}@keyframes Drawer_styles_h5od79_leftShowAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(-100%,-50%);-ms-transform:translate(-100%,-50%);transform:translate(-100%,-50%);opacity:0;}100%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}}@-webkit-keyframes Drawer_styles_h5od79_leftHideAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}100%{-webkit-transform:translate(-100%,-50%);-ms-transform:translate(-100%,-50%);transform:translate(-100%,-50%);opacity:0;}}@keyframes Drawer_styles_h5od79_leftHideAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:1;}100%{-webkit-transform:translate(-100%,-50%);-ms-transform:translate(-100%,-50%);transform:translate(-100%,-50%);opacity:0;}}.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerTopPlacement__f99f45af.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerTopPlacement__f99f45af .Drawer_styles_h5od79_popupBaseRoot__f99f45af{-webkit-animation:Drawer_styles_h5od79_topShowAnimationSv7q57r__f99f45af 0.2s forwards;animation:Drawer_styles_h5od79_topShowAnimationSv7q57r__f99f45af 0.2s forwards;}.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerTopPlacement__f99f45af.Drawer_styles_h5od79_sv7q57r__f99f45af.Drawer_styles_h5od79_drawerTopPlacement__f99f45af.Drawer_styles_h5od79_popupEndAnimation__f99f45af .Drawer_styles_h5od79_popupBaseRoot__f99f45af{-webkit-animation:Drawer_styles_h5od79_topHideAnimationSv7q57r__f99f45af 0.2s forwards;animation:Drawer_styles_h5od79_topHideAnimationSv7q57r__f99f45af 0.2s forwards;}@-webkit-keyframes Drawer_styles_h5od79_topShowAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(-50%,-100%);-ms-transform:translate(-50%,-100%);transform:translate(-50%,-100%);opacity:0;}100%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}}@keyframes Drawer_styles_h5od79_topShowAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(-50%,-100%);-ms-transform:translate(-50%,-100%);transform:translate(-50%,-100%);opacity:0;}100%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}}@-webkit-keyframes Drawer_styles_h5od79_topHideAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}100%{-webkit-transform:translate(-50%,-100%);-ms-transform:translate(-50%,-100%);transform:translate(-50%,-100%);opacity:0;}}@keyframes Drawer_styles_h5od79_topHideAnimationSv7q57r__f99f45af{0%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:1;}100%{-webkit-transform:translate(-50%,-100%);-ms-transform:translate(-50%,-100%);transform:translate(-50%,-100%);opacity:0;}}
|