@salutejs/plasma-new-hope 0.336.0-canary.2239.17794430722.0 → 0.336.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 +9 -7
- package/cjs/components/Attach/Attach.js +13 -59
- package/cjs/components/Attach/Attach.js.map +1 -1
- package/cjs/components/Attach/Attach.styles.js +21 -9
- package/cjs/components/Attach/Attach.styles.js.map +1 -1
- package/cjs/components/Attach/Attach.styles_pso18d.css +7 -0
- package/cjs/components/Attach/Attach.tokens.js +1 -0
- package/cjs/components/Attach/Attach.tokens.js.map +1 -1
- package/cjs/components/Attach/utils/getFileicon.js +2 -2
- package/cjs/components/Attach/utils/getFileicon.js.map +1 -1
- package/cjs/components/Attach/variations/_helperTextView/base.js +1 -1
- package/cjs/components/Attach/variations/_helperTextView/base_1tgnvl9.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/cjs/components/Attach/variations/_size/{base_a4eelx.css → base_kpo9at.css} +1 -1
- package/cjs/components/Avatar/Avatar.js +9 -2
- package/cjs/components/Avatar/Avatar.js.map +1 -1
- package/cjs/components/Avatar/Avatar.styles.js +5 -5
- package/cjs/components/Avatar/Avatar.styles.js.map +1 -1
- package/cjs/components/Avatar/{Avatar.styles_131qvfx.css → Avatar.styles_1kvh8pj.css} +3 -3
- package/cjs/components/Avatar/Avatar.tokens.js +3 -0
- package/cjs/components/Avatar/Avatar.tokens.js.map +1 -1
- package/cjs/components/Avatar/variations/_shape/base.js +9 -0
- package/cjs/components/Avatar/variations/_shape/base.js.map +1 -0
- package/cjs/components/Avatar/variations/_shape/base_1qwucc7.css +1 -0
- package/cjs/components/Drawer/Drawer.css +2 -2
- package/cjs/components/Drawer/Drawer.js +10 -7
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/Drawer/Drawer.styles.js +17 -2
- package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
- package/cjs/components/Drawer/{Drawer.styles_h5od79.css → Drawer.styles_1gcp61n.css} +1 -1
- package/cjs/components/Drawer/Drawer.tokens.js +10 -0
- 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 +10 -4
- package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
- package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +2 -1
- 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_x642ct.css +1 -0
- package/cjs/components/Skeleton/LineSkeleton/variations/_view/base.js +9 -0
- package/cjs/components/Skeleton/LineSkeleton/variations/_view/base.js.map +1 -0
- package/cjs/components/Skeleton/LineSkeleton/variations/_view/base_1it9pjr.css +1 -0
- package/cjs/components/Skeleton/TextSkeleton/TextSkeleton.js +4 -1
- package/cjs/components/Skeleton/TextSkeleton/TextSkeleton.js.map +1 -1
- package/cjs/components/Skeleton/tokens.js +2 -1
- package/cjs/components/Skeleton/tokens.js.map +1 -1
- package/cjs/index.css +22 -18
- package/emotion/cjs/components/Attach/Attach.js +12 -51
- package/emotion/cjs/components/Attach/Attach.styles.js +28 -13
- package/emotion/cjs/components/Attach/Attach.tokens.js +1 -0
- package/emotion/cjs/components/Attach/utils/getFileicon.js +3 -3
- package/emotion/cjs/components/Attach/utils/index.js +2 -10
- package/emotion/cjs/components/Attach/variations/_size/base.js +1 -1
- package/emotion/cjs/components/Avatar/Avatar.js +11 -4
- package/emotion/cjs/components/Avatar/Avatar.styles.js +16 -16
- package/emotion/cjs/components/Avatar/Avatar.tokens.js +3 -0
- package/emotion/cjs/components/Avatar/variations/_shape/base.js +14 -0
- package/emotion/cjs/components/Drawer/Drawer.js +13 -4
- package/emotion/cjs/components/Drawer/Drawer.styles.js +10 -4
- package/emotion/cjs/components/Drawer/Drawer.tokens.js +12 -0
- package/emotion/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +11 -5
- package/emotion/cjs/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +5 -4
- package/emotion/cjs/components/Skeleton/LineSkeleton/variations/_size/base.js +1 -3
- package/emotion/cjs/components/Skeleton/LineSkeleton/variations/_view/base.js +14 -0
- package/emotion/cjs/components/Skeleton/TextSkeleton/TextSkeleton.js +4 -2
- package/emotion/cjs/components/Skeleton/tokens.js +2 -1
- package/emotion/cjs/examples/components/Attach/Attach.config.js +18 -18
- package/emotion/cjs/examples/components/Avatar/Avatar.config.js +27 -22
- package/emotion/cjs/examples/components/Combobox/Combobox.js +15 -0
- package/emotion/cjs/examples/components/Skeleton/LineSkeleton.config.js +23 -18
- package/emotion/es/components/Attach/Attach.js +16 -55
- package/emotion/es/components/Attach/Attach.styles.js +20 -11
- package/emotion/es/components/Attach/Attach.tokens.js +1 -0
- package/emotion/es/components/Attach/utils/getFileicon.js +1 -1
- package/emotion/es/components/Attach/utils/index.js +1 -3
- package/emotion/es/components/Attach/variations/_size/base.js +2 -2
- package/emotion/es/components/Avatar/Avatar.js +13 -6
- package/emotion/es/components/Avatar/Avatar.styles.js +16 -16
- package/emotion/es/components/Avatar/Avatar.tokens.js +3 -0
- package/emotion/es/components/Avatar/variations/_shape/base.js +4 -0
- package/emotion/es/components/Drawer/Drawer.js +9 -5
- package/emotion/es/components/Drawer/Drawer.styles.js +11 -5
- package/emotion/es/components/Drawer/Drawer.tokens.js +9 -0
- package/emotion/es/components/Skeleton/LineSkeleton/LineSkeleton.js +11 -5
- package/emotion/es/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +5 -4
- package/emotion/es/components/Skeleton/LineSkeleton/variations/_size/base.js +1 -3
- package/emotion/es/components/Skeleton/LineSkeleton/variations/_view/base.js +4 -0
- package/emotion/es/components/Skeleton/TextSkeleton/TextSkeleton.js +4 -2
- package/emotion/es/components/Skeleton/tokens.js +2 -1
- package/emotion/es/examples/components/Attach/Attach.config.js +18 -18
- package/emotion/es/examples/components/Avatar/Avatar.config.js +27 -22
- package/emotion/es/examples/components/Skeleton/LineSkeleton.config.js +23 -18
- package/es/components/Attach/Attach.css +9 -7
- package/es/components/Attach/Attach.js +17 -63
- package/es/components/Attach/Attach.js.map +1 -1
- package/es/components/Attach/Attach.styles.js +19 -9
- package/es/components/Attach/Attach.styles.js.map +1 -1
- package/es/components/Attach/Attach.styles_pso18d.css +7 -0
- package/es/components/Attach/Attach.tokens.js +1 -0
- package/es/components/Attach/Attach.tokens.js.map +1 -1
- package/es/components/Attach/utils/getFileicon.js +2 -2
- package/es/components/Attach/utils/getFileicon.js.map +1 -1
- package/es/components/Attach/variations/_helperTextView/base.js +1 -1
- package/es/components/Attach/variations/_helperTextView/base_1tgnvl9.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/es/components/Attach/variations/_size/{base_a4eelx.css → base_kpo9at.css} +1 -1
- package/es/components/Avatar/Avatar.js +9 -2
- package/es/components/Avatar/Avatar.js.map +1 -1
- package/es/components/Avatar/Avatar.styles.js +5 -5
- package/es/components/Avatar/Avatar.styles.js.map +1 -1
- package/es/components/Avatar/{Avatar.styles_131qvfx.css → Avatar.styles_1kvh8pj.css} +3 -3
- package/es/components/Avatar/Avatar.tokens.js +3 -0
- package/es/components/Avatar/Avatar.tokens.js.map +1 -1
- package/es/components/Avatar/variations/_shape/base.js +5 -0
- package/es/components/Avatar/variations/_shape/base.js.map +1 -0
- package/es/components/Avatar/variations/_shape/base_1qwucc7.css +1 -0
- package/es/components/Drawer/Drawer.css +2 -2
- package/es/components/Drawer/Drawer.js +8 -6
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/Drawer/Drawer.styles.js +17 -2
- package/es/components/Drawer/Drawer.styles.js.map +1 -1
- package/es/components/Drawer/{Drawer.styles_h5od79.css → Drawer.styles_1gcp61n.css} +1 -1
- package/es/components/Drawer/Drawer.tokens.js +10 -1
- 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 +10 -4
- package/es/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
- package/es/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +2 -1
- 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_x642ct.css +1 -0
- package/es/components/Skeleton/LineSkeleton/variations/_view/base.js +5 -0
- package/es/components/Skeleton/LineSkeleton/variations/_view/base.js.map +1 -0
- package/es/components/Skeleton/LineSkeleton/variations/_view/base_1it9pjr.css +1 -0
- package/es/components/Skeleton/TextSkeleton/TextSkeleton.js +4 -1
- package/es/components/Skeleton/TextSkeleton/TextSkeleton.js.map +1 -1
- package/es/components/Skeleton/tokens.js +2 -1
- package/es/components/Skeleton/tokens.js.map +1 -1
- package/es/index.css +22 -18
- package/package.json +5 -5
- package/styled-components/cjs/components/Attach/Attach.js +12 -51
- package/styled-components/cjs/components/Attach/Attach.styles.js +31 -11
- package/styled-components/cjs/components/Attach/Attach.tokens.js +1 -0
- package/styled-components/cjs/components/Attach/utils/getFileicon.js +3 -3
- package/styled-components/cjs/components/Attach/utils/index.js +2 -10
- package/styled-components/cjs/components/Attach/variations/_size/base.js +2 -1
- package/styled-components/cjs/components/Avatar/Avatar.js +10 -3
- package/styled-components/cjs/components/Avatar/Avatar.styles.js +11 -15
- package/styled-components/cjs/components/Avatar/Avatar.tokens.js +3 -0
- package/styled-components/cjs/components/Avatar/variations/_shape/base.js +23 -0
- package/styled-components/cjs/components/Drawer/Drawer.js +13 -4
- package/styled-components/cjs/components/Drawer/Drawer.styles.js +17 -4
- package/styled-components/cjs/components/Drawer/Drawer.tokens.js +12 -0
- package/styled-components/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +11 -5
- package/styled-components/cjs/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +3 -2
- package/styled-components/cjs/components/Skeleton/LineSkeleton/variations/_size/base.js +2 -7
- package/styled-components/cjs/components/Skeleton/LineSkeleton/variations/_view/base.js +19 -0
- package/styled-components/cjs/components/Skeleton/TextSkeleton/TextSkeleton.js +4 -2
- package/styled-components/cjs/components/Skeleton/tokens.js +2 -1
- package/styled-components/cjs/examples/components/Attach/Attach.config.js +8 -4
- package/styled-components/cjs/examples/components/Avatar/Avatar.config.js +34 -7
- package/styled-components/cjs/examples/components/Skeleton/LineSkeleton.config.js +12 -1
- package/styled-components/es/components/Attach/Attach.js +16 -55
- package/styled-components/es/components/Attach/Attach.styles.js +23 -9
- package/styled-components/es/components/Attach/Attach.tokens.js +1 -0
- package/styled-components/es/components/Attach/utils/getFileicon.js +1 -1
- package/styled-components/es/components/Attach/utils/index.js +1 -3
- package/styled-components/es/components/Attach/variations/_size/base.js +3 -2
- package/styled-components/es/components/Avatar/Avatar.js +12 -5
- package/styled-components/es/components/Avatar/Avatar.styles.js +11 -15
- package/styled-components/es/components/Avatar/Avatar.tokens.js +3 -0
- package/styled-components/es/components/Avatar/variations/_shape/base.js +13 -0
- package/styled-components/es/components/Drawer/Drawer.js +9 -5
- package/styled-components/es/components/Drawer/Drawer.styles.js +18 -5
- package/styled-components/es/components/Drawer/Drawer.tokens.js +9 -0
- package/styled-components/es/components/Skeleton/LineSkeleton/LineSkeleton.js +11 -5
- package/styled-components/es/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +3 -2
- package/styled-components/es/components/Skeleton/LineSkeleton/variations/_size/base.js +2 -7
- package/styled-components/es/components/Skeleton/LineSkeleton/variations/_view/base.js +9 -0
- package/styled-components/es/components/Skeleton/TextSkeleton/TextSkeleton.js +4 -2
- package/styled-components/es/components/Skeleton/tokens.js +2 -1
- package/styled-components/es/examples/components/Attach/Attach.config.js +8 -4
- package/styled-components/es/examples/components/Avatar/Avatar.config.js +34 -7
- package/styled-components/es/examples/components/Combobox/Combobox.js +7 -0
- package/styled-components/es/examples/components/Skeleton/LineSkeleton.config.js +12 -1
- package/types/components/Attach/Attach.d.ts.map +1 -1
- package/types/components/Attach/Attach.styles.d.ts +3 -1
- package/types/components/Attach/Attach.styles.d.ts.map +1 -1
- package/types/components/Attach/Attach.tokens.d.ts +1 -0
- package/types/components/Attach/Attach.tokens.d.ts.map +1 -1
- package/types/components/Attach/Attach.types.d.ts +7 -0
- package/types/components/Attach/Attach.types.d.ts.map +1 -1
- package/types/components/Attach/utils/getFileicon.d.ts +1 -1
- package/types/components/Attach/utils/index.d.ts +1 -3
- 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/Avatar/Avatar.d.ts +4 -0
- package/types/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/components/Avatar/Avatar.styles.d.ts.map +1 -1
- package/types/components/Avatar/Avatar.tokens.d.ts +3 -0
- package/types/components/Avatar/Avatar.tokens.d.ts.map +1 -1
- package/types/components/Avatar/Avatar.types.d.ts +1 -0
- package/types/components/Avatar/Avatar.types.d.ts.map +1 -1
- package/types/components/Avatar/variations/_shape/base.d.ts +2 -0
- package/types/components/Avatar/variations/_shape/base.d.ts.map +1 -0
- package/types/components/Drawer/Drawer.d.ts +2 -0
- package/types/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.styles.d.ts +2 -1
- package/types/components/Drawer/Drawer.styles.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.tokens.d.ts +9 -0
- package/types/components/Drawer/Drawer.tokens.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.types.d.ts +16 -0
- package/types/components/Drawer/Drawer.types.d.ts.map +1 -1
- package/types/components/Skeleton/LineSkeleton/LineSkeleton.d.ts +3 -0
- 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/LineSkeleton/variations/_view/base.d.ts +2 -0
- package/types/components/Skeleton/LineSkeleton/variations/_view/base.d.ts.map +1 -0
- package/types/components/Skeleton/Skeleton.types.d.ts +1 -0
- 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 +1 -0
- 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/Avatar/Avatar.config.d.ts +5 -0
- package/types/examples/components/Avatar/Avatar.config.d.ts.map +1 -1
- package/types/examples/components/Avatar/Avatar.d.ts +16 -0
- package/types/examples/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/examples/components/Drawer/Drawer.d.ts +1 -0
- package/types/examples/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/examples/components/Skeleton/LineSkeleton.config.d.ts +5 -0
- package/types/examples/components/Skeleton/LineSkeleton.config.d.ts.map +1 -1
- package/types/examples/components/Skeleton/Skeleton.d.ts +8 -0
- package/types/examples/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/cjs/components/Attach/Attach.styles_1w3ga58.css +0 -5
- package/cjs/components/Attach/utils/addSeparator.js +0 -18
- package/cjs/components/Attach/utils/addSeparator.js.map +0 -1
- package/cjs/components/Attach/utils/index.js +0 -8
- package/cjs/components/Attach/utils/index.js.map +0 -1
- package/cjs/components/Attach/variations/_helperTextView/base_1vgke1p.css +0 -1
- package/cjs/components/Skeleton/LineSkeleton/variations/_size/base_1wf7n5i.css +0 -1
- package/emotion/cjs/components/Attach/utils/addSeparator.js +0 -20
- package/emotion/es/components/Attach/utils/addSeparator.js +0 -10
- package/es/components/Attach/Attach.styles_1w3ga58.css +0 -5
- package/es/components/Attach/utils/addSeparator.js +0 -14
- package/es/components/Attach/utils/addSeparator.js.map +0 -1
- package/es/components/Attach/utils/index.js +0 -4
- package/es/components/Attach/utils/index.js.map +0 -1
- package/es/components/Attach/variations/_helperTextView/base_1vgke1p.css +0 -1
- package/es/components/Skeleton/LineSkeleton/variations/_size/base_1wf7n5i.css +0 -1
- package/styled-components/cjs/components/Attach/utils/addSeparator.js +0 -20
- package/styled-components/es/components/Attach/utils/addSeparator.js +0 -10
- package/types/components/Attach/utils/addSeparator.d.ts +0 -2
- package/types/components/Attach/utils/addSeparator.d.ts.map +0 -1
|
@@ -13,7 +13,8 @@ var _Avatartokens = require("../../../components/Avatar/Avatar.tokens");
|
|
|
13
13
|
var config = {
|
|
14
14
|
defaults: {
|
|
15
15
|
view: 'default',
|
|
16
|
-
size: 'xxl'
|
|
16
|
+
size: 'xxl',
|
|
17
|
+
shape: 'circled'
|
|
17
18
|
},
|
|
18
19
|
variations: {
|
|
19
20
|
view: {
|
|
@@ -34,6 +35,7 @@ var config = {
|
|
|
34
35
|
":600;",
|
|
35
36
|
":2rem;",
|
|
36
37
|
":0.75rem;",
|
|
38
|
+
":1.125rem;",
|
|
37
39
|
":0.5rem;",
|
|
38
40
|
":1.75rem;",
|
|
39
41
|
":0 0.6875rem;",
|
|
@@ -58,7 +60,7 @@ var config = {
|
|
|
58
60
|
":var(--plasma-typo-body-s-font-weight);",
|
|
59
61
|
":var(--plasma-typo-body-s-letter-spacing);",
|
|
60
62
|
":var(--plasma-typo-body-s-line-height);"
|
|
61
|
-
], _Avatartokens.tokens.avatarSize, _Avatartokens.tokens.fontSize, _Avatartokens.tokens.fontWeight, _Avatartokens.tokens.lineHeight, _Avatartokens.tokens.statusIconSize, _Avatartokens.tokens.badgeBorderRadius, _Avatartokens.tokens.badgeHeight, _Avatartokens.tokens.badgePadding, _Avatartokens.tokens.badgePaddingIconOnly, _Avatartokens.tokens.badgeFontFamily, _Avatartokens.tokens.badgeFontSize, _Avatartokens.tokens.badgeFontStyle, _Avatartokens.tokens.badgeFontWeight, _Avatartokens.tokens.badgeLetterSpacing, _Avatartokens.tokens.badgeLineHeight, _Avatartokens.tokens.badgeLeftContentMarginLeft, _Avatartokens.tokens.badgeLeftContentMarginRight, _Avatartokens.tokens.badgeRightContentMarginLeft, _Avatartokens.tokens.badgeRightContentMarginRight, _Avatartokens.tokens.badgePilledBorderRadius, _Avatartokens.tokens.counterBorderRadius, _Avatartokens.tokens.counterHeight, _Avatartokens.tokens.counterPadding, _Avatartokens.tokens.counterFontFamily, _Avatartokens.tokens.counterFontSize, _Avatartokens.tokens.counterFontStyle, _Avatartokens.tokens.counterFontWeight, _Avatartokens.tokens.counterLetterSpacing, _Avatartokens.tokens.counterLineHeight),
|
|
63
|
+
], _Avatartokens.tokens.avatarSize, _Avatartokens.tokens.fontSize, _Avatartokens.tokens.fontWeight, _Avatartokens.tokens.lineHeight, _Avatartokens.tokens.statusIconSize, _Avatartokens.tokens.borderRadius, _Avatartokens.tokens.badgeBorderRadius, _Avatartokens.tokens.badgeHeight, _Avatartokens.tokens.badgePadding, _Avatartokens.tokens.badgePaddingIconOnly, _Avatartokens.tokens.badgeFontFamily, _Avatartokens.tokens.badgeFontSize, _Avatartokens.tokens.badgeFontStyle, _Avatartokens.tokens.badgeFontWeight, _Avatartokens.tokens.badgeLetterSpacing, _Avatartokens.tokens.badgeLineHeight, _Avatartokens.tokens.badgeLeftContentMarginLeft, _Avatartokens.tokens.badgeLeftContentMarginRight, _Avatartokens.tokens.badgeRightContentMarginLeft, _Avatartokens.tokens.badgeRightContentMarginRight, _Avatartokens.tokens.badgePilledBorderRadius, _Avatartokens.tokens.counterBorderRadius, _Avatartokens.tokens.counterHeight, _Avatartokens.tokens.counterPadding, _Avatartokens.tokens.counterFontFamily, _Avatartokens.tokens.counterFontSize, _Avatartokens.tokens.counterFontStyle, _Avatartokens.tokens.counterFontWeight, _Avatartokens.tokens.counterLetterSpacing, _Avatartokens.tokens.counterLineHeight),
|
|
62
64
|
l: (0, _styledcomponents.css)([
|
|
63
65
|
"",
|
|
64
66
|
":3rem;",
|
|
@@ -66,6 +68,7 @@ var config = {
|
|
|
66
68
|
":600;",
|
|
67
69
|
":1.25rem;",
|
|
68
70
|
":0.5rem;",
|
|
71
|
+
":0.75rem;",
|
|
69
72
|
":2;",
|
|
70
73
|
":0.375rem;",
|
|
71
74
|
":1.25rem;",
|
|
@@ -91,7 +94,7 @@ var config = {
|
|
|
91
94
|
":var(--plasma-typo-body-xxs-font-weight);",
|
|
92
95
|
":var(--plasma-typo-body-xxs-letter-spacing);",
|
|
93
96
|
":var(--plasma-typo-body-xxs-line-height);"
|
|
94
|
-
], _Avatartokens.tokens.avatarSize, _Avatartokens.tokens.fontSize, _Avatartokens.tokens.fontWeight, _Avatartokens.tokens.lineHeight, _Avatartokens.tokens.statusIconSize, _Avatartokens.tokens.extraPlacementFactor, _Avatartokens.tokens.badgeBorderRadius, _Avatartokens.tokens.badgeHeight, _Avatartokens.tokens.badgePadding, _Avatartokens.tokens.badgePaddingIconOnly, _Avatartokens.tokens.badgeFontFamily, _Avatartokens.tokens.badgeFontSize, _Avatartokens.tokens.badgeFontStyle, _Avatartokens.tokens.badgeFontWeight, _Avatartokens.tokens.badgeLetterSpacing, _Avatartokens.tokens.badgeLineHeight, _Avatartokens.tokens.badgeLeftContentMarginLeft, _Avatartokens.tokens.badgeLeftContentMarginRight, _Avatartokens.tokens.badgeRightContentMarginLeft, _Avatartokens.tokens.badgeRightContentMarginRight, _Avatartokens.tokens.badgePilledBorderRadius, _Avatartokens.tokens.counterBorderRadius, _Avatartokens.tokens.counterHeight, _Avatartokens.tokens.counterPadding, _Avatartokens.tokens.counterFontFamily, _Avatartokens.tokens.counterFontSize, _Avatartokens.tokens.counterFontStyle, _Avatartokens.tokens.counterFontWeight, _Avatartokens.tokens.counterLetterSpacing, _Avatartokens.tokens.counterLineHeight),
|
|
97
|
+
], _Avatartokens.tokens.avatarSize, _Avatartokens.tokens.fontSize, _Avatartokens.tokens.fontWeight, _Avatartokens.tokens.lineHeight, _Avatartokens.tokens.statusIconSize, _Avatartokens.tokens.borderRadius, _Avatartokens.tokens.extraPlacementFactor, _Avatartokens.tokens.badgeBorderRadius, _Avatartokens.tokens.badgeHeight, _Avatartokens.tokens.badgePadding, _Avatartokens.tokens.badgePaddingIconOnly, _Avatartokens.tokens.badgeFontFamily, _Avatartokens.tokens.badgeFontSize, _Avatartokens.tokens.badgeFontStyle, _Avatartokens.tokens.badgeFontWeight, _Avatartokens.tokens.badgeLetterSpacing, _Avatartokens.tokens.badgeLineHeight, _Avatartokens.tokens.badgeLeftContentMarginLeft, _Avatartokens.tokens.badgeLeftContentMarginRight, _Avatartokens.tokens.badgeRightContentMarginLeft, _Avatartokens.tokens.badgeRightContentMarginRight, _Avatartokens.tokens.badgePilledBorderRadius, _Avatartokens.tokens.counterBorderRadius, _Avatartokens.tokens.counterHeight, _Avatartokens.tokens.counterPadding, _Avatartokens.tokens.counterFontFamily, _Avatartokens.tokens.counterFontSize, _Avatartokens.tokens.counterFontStyle, _Avatartokens.tokens.counterFontWeight, _Avatartokens.tokens.counterLetterSpacing, _Avatartokens.tokens.counterLineHeight),
|
|
95
98
|
m: (0, _styledcomponents.css)([
|
|
96
99
|
"",
|
|
97
100
|
":2.25rem;",
|
|
@@ -99,6 +102,7 @@ var config = {
|
|
|
99
102
|
":600;",
|
|
100
103
|
":0.875rem;",
|
|
101
104
|
":0.5rem;",
|
|
105
|
+
":0.625rem;",
|
|
102
106
|
":2;",
|
|
103
107
|
":0.25rem;",
|
|
104
108
|
":1rem;",
|
|
@@ -124,7 +128,7 @@ var config = {
|
|
|
124
128
|
":var(--plasma-typo-body-xxs-font-weight);",
|
|
125
129
|
":var(--plasma-typo-body-xxs-letter-spacing);",
|
|
126
130
|
":var(--plasma-typo-body-xxs-line-height);"
|
|
127
|
-
], _Avatartokens.tokens.avatarSize, _Avatartokens.tokens.fontSize, _Avatartokens.tokens.fontWeight, _Avatartokens.tokens.lineHeight, _Avatartokens.tokens.statusIconSize, _Avatartokens.tokens.extraPlacementFactor, _Avatartokens.tokens.badgeBorderRadius, _Avatartokens.tokens.badgeHeight, _Avatartokens.tokens.badgePadding, _Avatartokens.tokens.badgePaddingIconOnly, _Avatartokens.tokens.badgeFontFamily, _Avatartokens.tokens.badgeFontSize, _Avatartokens.tokens.badgeFontStyle, _Avatartokens.tokens.badgeFontWeight, _Avatartokens.tokens.badgeLetterSpacing, _Avatartokens.tokens.badgeLineHeight, _Avatartokens.tokens.badgeLeftContentMarginLeft, _Avatartokens.tokens.badgeLeftContentMarginRight, _Avatartokens.tokens.badgeRightContentMarginLeft, _Avatartokens.tokens.badgeRightContentMarginRight, _Avatartokens.tokens.badgePilledBorderRadius, _Avatartokens.tokens.counterBorderRadius, _Avatartokens.tokens.counterHeight, _Avatartokens.tokens.counterPadding, _Avatartokens.tokens.counterFontFamily, _Avatartokens.tokens.counterFontSize, _Avatartokens.tokens.counterFontStyle, _Avatartokens.tokens.counterFontWeight, _Avatartokens.tokens.counterLetterSpacing, _Avatartokens.tokens.counterLineHeight),
|
|
131
|
+
], _Avatartokens.tokens.avatarSize, _Avatartokens.tokens.fontSize, _Avatartokens.tokens.fontWeight, _Avatartokens.tokens.lineHeight, _Avatartokens.tokens.statusIconSize, _Avatartokens.tokens.borderRadius, _Avatartokens.tokens.extraPlacementFactor, _Avatartokens.tokens.badgeBorderRadius, _Avatartokens.tokens.badgeHeight, _Avatartokens.tokens.badgePadding, _Avatartokens.tokens.badgePaddingIconOnly, _Avatartokens.tokens.badgeFontFamily, _Avatartokens.tokens.badgeFontSize, _Avatartokens.tokens.badgeFontStyle, _Avatartokens.tokens.badgeFontWeight, _Avatartokens.tokens.badgeLetterSpacing, _Avatartokens.tokens.badgeLineHeight, _Avatartokens.tokens.badgeLeftContentMarginLeft, _Avatartokens.tokens.badgeLeftContentMarginRight, _Avatartokens.tokens.badgeRightContentMarginLeft, _Avatartokens.tokens.badgeRightContentMarginRight, _Avatartokens.tokens.badgePilledBorderRadius, _Avatartokens.tokens.counterBorderRadius, _Avatartokens.tokens.counterHeight, _Avatartokens.tokens.counterPadding, _Avatartokens.tokens.counterFontFamily, _Avatartokens.tokens.counterFontSize, _Avatartokens.tokens.counterFontStyle, _Avatartokens.tokens.counterFontWeight, _Avatartokens.tokens.counterLetterSpacing, _Avatartokens.tokens.counterLineHeight),
|
|
128
132
|
s: (0, _styledcomponents.css)([
|
|
129
133
|
"",
|
|
130
134
|
":1.5rem;",
|
|
@@ -132,6 +136,7 @@ var config = {
|
|
|
132
136
|
":600;",
|
|
133
137
|
":0.5rem;",
|
|
134
138
|
":0.375rem;",
|
|
139
|
+
":0.5rem;",
|
|
135
140
|
":1;",
|
|
136
141
|
":1rem;",
|
|
137
142
|
":0.75rem;",
|
|
@@ -142,15 +147,16 @@ var config = {
|
|
|
142
147
|
":var(--plasma-typo-body-xxs-font-weight);",
|
|
143
148
|
":var(--plasma-typo-body-xxs-letter-spacing);",
|
|
144
149
|
":var(--plasma-typo-body-xxs-line-height);"
|
|
145
|
-
], _Avatartokens.tokens.avatarSize, _Avatartokens.tokens.fontSize, _Avatartokens.tokens.fontWeight, _Avatartokens.tokens.lineHeight, _Avatartokens.tokens.statusIconSize, _Avatartokens.tokens.extraPlacementFactor, _Avatartokens.tokens.counterBorderRadius, _Avatartokens.tokens.counterHeight, _Avatartokens.tokens.counterPadding, _Avatartokens.tokens.counterFontFamily, _Avatartokens.tokens.counterFontSize, _Avatartokens.tokens.counterFontStyle, _Avatartokens.tokens.counterFontWeight, _Avatartokens.tokens.counterLetterSpacing, _Avatartokens.tokens.counterLineHeight),
|
|
150
|
+
], _Avatartokens.tokens.avatarSize, _Avatartokens.tokens.fontSize, _Avatartokens.tokens.fontWeight, _Avatartokens.tokens.lineHeight, _Avatartokens.tokens.statusIconSize, _Avatartokens.tokens.borderRadius, _Avatartokens.tokens.extraPlacementFactor, _Avatartokens.tokens.counterBorderRadius, _Avatartokens.tokens.counterHeight, _Avatartokens.tokens.counterPadding, _Avatartokens.tokens.counterFontFamily, _Avatartokens.tokens.counterFontSize, _Avatartokens.tokens.counterFontStyle, _Avatartokens.tokens.counterFontWeight, _Avatartokens.tokens.counterLetterSpacing, _Avatartokens.tokens.counterLineHeight),
|
|
146
151
|
fit: (0, _styledcomponents.css)([
|
|
147
152
|
"",
|
|
148
153
|
":100%;",
|
|
149
154
|
":0;",
|
|
150
155
|
":0;",
|
|
151
156
|
":0;",
|
|
152
|
-
":0;"
|
|
153
|
-
|
|
157
|
+
":0;",
|
|
158
|
+
":50%;"
|
|
159
|
+
], _Avatartokens.tokens.avatarSize, _Avatartokens.tokens.fontSize, _Avatartokens.tokens.fontWeight, _Avatartokens.tokens.lineHeight, _Avatartokens.tokens.statusIconSize, _Avatartokens.tokens.borderRadius)
|
|
154
160
|
},
|
|
155
161
|
focused: {
|
|
156
162
|
true: (0, _styledcomponents.css)([
|
|
@@ -160,6 +166,27 @@ var config = {
|
|
|
160
166
|
":var(--surface-accent);"
|
|
161
167
|
], _Avatartokens.tokens.outlineSize, _Avatartokens.tokens.outlineOffset, _Avatartokens.tokens.outlineColor)
|
|
162
168
|
},
|
|
169
|
+
shape: {
|
|
170
|
+
circled: (0, _styledcomponents.css)([
|
|
171
|
+
"",
|
|
172
|
+
":50%;",
|
|
173
|
+
":calc(0.867 * var(",
|
|
174
|
+
") - var(",
|
|
175
|
+
") / 2);",
|
|
176
|
+
":calc(0.867 * var(",
|
|
177
|
+
") - var(",
|
|
178
|
+
") / 2);"
|
|
179
|
+
], _Avatartokens.tokens.borderRadius, _Avatartokens.tokens.statusLeft, _Avatartokens.tokens.avatarSize, _Avatartokens.tokens.statusIconSize, _Avatartokens.tokens.statusTop, _Avatartokens.tokens.avatarSize, _Avatartokens.tokens.statusIconSize),
|
|
180
|
+
rounded: (0, _styledcomponents.css)([
|
|
181
|
+
"",
|
|
182
|
+
":calc(var(",
|
|
183
|
+
") - var(",
|
|
184
|
+
"));",
|
|
185
|
+
":calc(var(",
|
|
186
|
+
") - var(",
|
|
187
|
+
"));"
|
|
188
|
+
], _Avatartokens.tokens.statusLeft, _Avatartokens.tokens.avatarSize, _Avatartokens.tokens.statusIconSize, _Avatartokens.tokens.statusTop, _Avatartokens.tokens.avatarSize, _Avatartokens.tokens.statusIconSize)
|
|
189
|
+
},
|
|
163
190
|
badgeView: {
|
|
164
191
|
default: (0, _styledcomponents.css)([
|
|
165
192
|
"",
|
|
@@ -12,9 +12,20 @@ var _styledcomponents = require("styled-components");
|
|
|
12
12
|
var _Skeleton = require("../../../components/Skeleton");
|
|
13
13
|
var config = {
|
|
14
14
|
defaults: {
|
|
15
|
-
size: 'bodyM'
|
|
15
|
+
size: 'bodyM',
|
|
16
|
+
view: 'default'
|
|
16
17
|
},
|
|
17
18
|
variations: {
|
|
19
|
+
view: {
|
|
20
|
+
default: (0, _styledcomponents.css)([
|
|
21
|
+
"",
|
|
22
|
+
":var(--plasma-colors-skeleton-gradient,var(--surface-skeleton-gradient));"
|
|
23
|
+
], _Skeleton.skeletonTokens.gradientColor),
|
|
24
|
+
lighter: (0, _styledcomponents.css)([
|
|
25
|
+
"",
|
|
26
|
+
":var(--plasma-colors-skeleton-gradient-lighter,var(--surface-skeleton-deep-gradient));"
|
|
27
|
+
], _Skeleton.skeletonTokens.gradientColor)
|
|
28
|
+
},
|
|
18
29
|
size: {
|
|
19
30
|
bodyL: (0, _styledcomponents.css)([
|
|
20
31
|
"",
|
|
@@ -99,24 +99,25 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
99
99
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
100
100
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
101
101
|
}
|
|
102
|
-
import React, { forwardRef,
|
|
103
|
-
import { useForkRef
|
|
102
|
+
import React, { forwardRef, useRef, useState } from "react";
|
|
103
|
+
import { useForkRef } from "@salutejs/plasma-core";
|
|
104
104
|
import { cx } from "../../utils";
|
|
105
105
|
import { IconCloseCircleOutline } from "../_Icon";
|
|
106
106
|
import { base as sizeCSS } from "./variations/_size/base";
|
|
107
107
|
import { base as viewCSS } from "./variations/_view/base";
|
|
108
108
|
import { base as helperTextViewCSS } from "./variations/_helperTextView/base";
|
|
109
|
-
import { base, StyledHelperText, StyledHiddenInput,
|
|
109
|
+
import { base, StyledHelperText, StyledHiddenInput, StyledAttachButtonWrapper, FilenameWrapper, TruncatedFilenamePart, FilenameExtensionPart } from "./Attach.styles";
|
|
110
110
|
import { StyledCell } from "./ui/Cell/Cell";
|
|
111
|
-
import { extractExtension,
|
|
111
|
+
import { extractExtension, getFileIcon } from "./utils";
|
|
112
112
|
import { classes } from "./Attach.tokens";
|
|
113
113
|
import { AttachButton } from "./components/AttachButton";
|
|
114
114
|
import { StyledIconButtonCancel } from "./ui/IconButton/IconButton.styles";
|
|
115
115
|
export var attachRoot = function(Root) {
|
|
116
116
|
return /*#__PURE__*/ forwardRef(function(props, outerRef) {
|
|
117
|
-
var _props_flow = props.flow, flow = _props_flow === void 0 ? 'auto' : _props_flow, _props_buttonType = props.buttonType, buttonType = _props_buttonType === void 0 ? 'button' : _props_buttonType, _props_hasAttachment = props.hasAttachment, hasAttachment = _props_hasAttachment === void 0 ? true : _props_hasAttachment, acceptedFileFormats = props.acceptedFileFormats, helperText = props.helperText, size = props.size, view = props.view, helperTextView = props.helperTextView, className = props.className, style = props.style, isLoading = props.isLoading, disabled = props.disabled, id = props.id, name = props.name, customIcon = props.customIcon, onChange = props.onChange, onClear = props.onClear, rest = _object_without_properties(props, [
|
|
117
|
+
var _props_flow = props.flow, flow = _props_flow === void 0 ? 'auto' : _props_flow, _props_buttonType = props.buttonType, buttonType = _props_buttonType === void 0 ? 'button' : _props_buttonType, _props_hideButtonOnAttach = props.hideButtonOnAttach, hideButtonOnAttach = _props_hideButtonOnAttach === void 0 ? false : _props_hideButtonOnAttach, _props_hasAttachment = props.hasAttachment, hasAttachment = _props_hasAttachment === void 0 ? true : _props_hasAttachment, acceptedFileFormats = props.acceptedFileFormats, helperText = props.helperText, size = props.size, view = props.view, helperTextView = props.helperTextView, className = props.className, style = props.style, isLoading = props.isLoading, disabled = props.disabled, id = props.id, name = props.name, customIcon = props.customIcon, onClick = props.onClick, onChange = props.onChange, onClear = props.onClear, rest = _object_without_properties(props, [
|
|
118
118
|
"flow",
|
|
119
119
|
"buttonType",
|
|
120
|
+
"hideButtonOnAttach",
|
|
120
121
|
"hasAttachment",
|
|
121
122
|
"acceptedFileFormats",
|
|
122
123
|
"helperText",
|
|
@@ -130,66 +131,31 @@ export var attachRoot = function(Root) {
|
|
|
130
131
|
"id",
|
|
131
132
|
"name",
|
|
132
133
|
"customIcon",
|
|
134
|
+
"onClick",
|
|
133
135
|
"onChange",
|
|
134
136
|
"onClear"
|
|
135
137
|
]);
|
|
136
138
|
var innerRef = useRef(null);
|
|
137
139
|
var ref = useForkRef(outerRef, innerRef);
|
|
138
140
|
var inputRef = useRef(null);
|
|
139
|
-
var inputHelperRef = useRef(null);
|
|
140
141
|
var cellRef = useRef(null);
|
|
141
142
|
var buttonRef = useRef(null);
|
|
142
|
-
var emptyTextCellWidth = useRef(null);
|
|
143
143
|
var _useState = _sliced_to_array(useState(''), 2), filename = _useState[0], setFilename = _useState[1];
|
|
144
|
-
var _useState1 = _sliced_to_array(useState(''), 2), truncatedFilename = _useState1[0], setTruncatedFilename = _useState1[1];
|
|
145
144
|
var horizontalClass = flow === 'horizontal' ? classes.horizontal : undefined;
|
|
146
145
|
var verticalClass = flow === 'vertical' ? classes.vertical : undefined;
|
|
147
146
|
var withHelperTextClass = helperText ? classes.withHelperText : undefined;
|
|
148
147
|
var autoClass = flow === 'auto' ? classes.auto : undefined;
|
|
149
|
-
var cellHiddenClass = truncatedFilename.length === 0 ? classes.cellHidden : undefined;
|
|
150
148
|
var accept = acceptedFileFormats === null || acceptedFileFormats === void 0 ? void 0 : acceptedFileFormats.join(',');
|
|
151
149
|
var extension = extractExtension(filename);
|
|
152
|
-
var
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
emptyTextCellWidth.current = ((_cellRef_current = cellRef.current) === null || _cellRef_current === void 0 ? void 0 : _cellRef_current.offsetWidth) || 0;
|
|
156
|
-
}, []);
|
|
157
|
-
useIsomorphicLayoutEffect(function() {
|
|
158
|
-
if (!cellRef.current || !cellRef.current.parentElement || !inputHelperRef.current || !inputHelperRef.current.textContent || !emptyTextCellWidth.current || !buttonRef.current) {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
var _inputHelperRef_current = inputHelperRef.current, textWidth = _inputHelperRef_current.offsetWidth;
|
|
162
|
-
var _buttonRef_current = buttonRef.current, buttonWidth = _buttonRef_current.offsetWidth;
|
|
163
|
-
var _cellRef_current_parentElement_getBoundingClientRect = cellRef.current.parentElement.getBoundingClientRect(), parentWidth = _cellRef_current_parentElement_getBoundingClientRect.width, parentLeft = _cellRef_current_parentElement_getBoundingClientRect.left;
|
|
164
|
-
var _cellRef_current_getBoundingClientRect = cellRef.current.getBoundingClientRect(), cellLeft = _cellRef_current_getBoundingClientRect.left;
|
|
165
|
-
var leftDiff = cellLeft - parentLeft;
|
|
166
|
-
var currentTextWidth = textWidth;
|
|
167
|
-
if (currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth || currentTextWidth + emptyTextCellWidth.current < buttonWidth) {
|
|
168
|
-
setTruncatedFilename(filename);
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
var currFilename = addSeparator(filename, separator);
|
|
172
|
-
for(var i = currFilename.indexOf(separator) - 1; i > 0; i -= 1){
|
|
173
|
-
if (currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth) {
|
|
174
|
-
break;
|
|
175
|
-
}
|
|
176
|
-
var left = currFilename.slice(0, i);
|
|
177
|
-
var right = currFilename.slice(i + 1);
|
|
178
|
-
var newFilename = "".concat(left).concat(right);
|
|
179
|
-
inputHelperRef.current.textContent = newFilename;
|
|
180
|
-
currentTextWidth = inputHelperRef.current.offsetWidth;
|
|
181
|
-
if (currentTextWidth + emptyTextCellWidth.current < buttonWidth) {
|
|
182
|
-
break;
|
|
183
|
-
}
|
|
184
|
-
currFilename = newFilename;
|
|
185
|
-
}
|
|
186
|
-
inputHelperRef.current.textContent = filename;
|
|
187
|
-
setTruncatedFilename(currFilename);
|
|
188
|
-
});
|
|
189
|
-
var handleClick = function() {
|
|
150
|
+
var filenameWithoutExtension = filename.slice(0, -1 - ((extension === null || extension === void 0 ? void 0 : extension.length) || 0));
|
|
151
|
+
var cellContentLeft = customIcon || getFileIcon(extension, size);
|
|
152
|
+
var handleClick = function(e) {
|
|
190
153
|
if (!inputRef.current) {
|
|
191
154
|
return;
|
|
192
155
|
}
|
|
156
|
+
if (onClick) {
|
|
157
|
+
onClick(e);
|
|
158
|
+
}
|
|
193
159
|
inputRef.current.click();
|
|
194
160
|
};
|
|
195
161
|
var handleChange = function(e) {
|
|
@@ -210,7 +176,6 @@ export var attachRoot = function(Root) {
|
|
|
210
176
|
}
|
|
211
177
|
inputRef.current.value = '';
|
|
212
178
|
setFilename('');
|
|
213
|
-
setTruncatedFilename('');
|
|
214
179
|
};
|
|
215
180
|
return /*#__PURE__*/ React.createElement(Root, {
|
|
216
181
|
className: cx(horizontalClass, verticalClass, autoClass, withHelperTextClass, className),
|
|
@@ -226,20 +191,16 @@ export var attachRoot = function(Root) {
|
|
|
226
191
|
id: id,
|
|
227
192
|
name: name,
|
|
228
193
|
onChange: handleChange
|
|
229
|
-
}), /*#__PURE__*/ React.createElement(
|
|
230
|
-
ref: inputHelperRef
|
|
231
|
-
}, filename), /*#__PURE__*/ React.createElement(StyledAttachButtonWrapper, null, /*#__PURE__*/ React.createElement(AttachButton, _object_spread({
|
|
194
|
+
}), (!hideButtonOnAttach || !filename) && /*#__PURE__*/ React.createElement(StyledAttachButtonWrapper, null, /*#__PURE__*/ React.createElement(AttachButton, _object_spread({
|
|
232
195
|
ref: buttonRef,
|
|
233
196
|
buttonType: buttonType,
|
|
234
197
|
isLoading: isLoading,
|
|
235
198
|
disabled: disabled,
|
|
236
199
|
onClick: handleClick
|
|
237
|
-
}, rest)), helperText && /*#__PURE__*/ React.createElement(StyledHelperText, null, helperText)), hasAttachment && /*#__PURE__*/ React.createElement(StyledCell, {
|
|
200
|
+
}, rest)), helperText && /*#__PURE__*/ React.createElement(StyledHelperText, null, helperText)), (hasAttachment || hideButtonOnAttach) && filename && /*#__PURE__*/ React.createElement(StyledCell, {
|
|
238
201
|
stretching: "fixed",
|
|
239
|
-
className: cellHiddenClass,
|
|
240
202
|
ref: cellRef,
|
|
241
203
|
size: size,
|
|
242
|
-
title: truncatedFilename,
|
|
243
204
|
contentLeft: cellContentLeft,
|
|
244
205
|
contentRight: /*#__PURE__*/ React.createElement(StyledIconButtonCancel, {
|
|
245
206
|
onClick: handleClear
|
|
@@ -247,7 +208,7 @@ export var attachRoot = function(Root) {
|
|
|
247
208
|
size: "xs",
|
|
248
209
|
color: "inherit"
|
|
249
210
|
}))
|
|
250
|
-
}));
|
|
211
|
+
}, /*#__PURE__*/ React.createElement(FilenameWrapper, null, /*#__PURE__*/ React.createElement(TruncatedFilenamePart, null, filenameWithoutExtension.slice(0, -1)), /*#__PURE__*/ React.createElement(FilenameExtensionPart, null, filenameWithoutExtension.at(-1), ".", extension))));
|
|
251
212
|
});
|
|
252
213
|
};
|
|
253
214
|
export var attachConfig = {
|
|
@@ -1,29 +1,43 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import { css } from "styled-components";
|
|
3
|
+
import { applyEllipsis } from "../../mixins";
|
|
3
4
|
export var base = css([
|
|
4
5
|
"position:relative;display:flex;"
|
|
5
6
|
]);
|
|
6
7
|
export var StyledHiddenInput = styled.input.withConfig({
|
|
7
8
|
displayName: "Attach.styles__StyledHiddenInput",
|
|
8
|
-
componentId: "sc-
|
|
9
|
+
componentId: "sc-ebfa8a10-0"
|
|
9
10
|
})([
|
|
10
11
|
"display:none;"
|
|
11
12
|
]);
|
|
12
|
-
export var StyledHiddenInputHelper = styled.div.withConfig({
|
|
13
|
-
displayName: "Attach.styles__StyledHiddenInputHelper",
|
|
14
|
-
componentId: "sc-7ce14282-1"
|
|
15
|
-
})([
|
|
16
|
-
"position:absolute;visibility:hidden;white-space:nowrap;"
|
|
17
|
-
]);
|
|
18
13
|
export var StyledAttachButtonWrapper = styled.div.withConfig({
|
|
19
14
|
displayName: "Attach.styles__StyledAttachButtonWrapper",
|
|
20
|
-
componentId: "sc-
|
|
15
|
+
componentId: "sc-ebfa8a10-1"
|
|
21
16
|
})([
|
|
22
17
|
"position:relative;"
|
|
23
18
|
]);
|
|
24
19
|
export var StyledHelperText = styled.div.withConfig({
|
|
25
20
|
displayName: "Attach.styles__StyledHelperText",
|
|
26
|
-
componentId: "sc-
|
|
21
|
+
componentId: "sc-ebfa8a10-2"
|
|
27
22
|
})([
|
|
28
23
|
"position:absolute;margin-top:0.25rem;"
|
|
29
24
|
]);
|
|
25
|
+
export var FilenameWrapper = styled.div.withConfig({
|
|
26
|
+
displayName: "Attach.styles__FilenameWrapper",
|
|
27
|
+
componentId: "sc-ebfa8a10-3"
|
|
28
|
+
})([
|
|
29
|
+
"display:inline-grid;align-items:center;grid-template-columns:auto 1fr;min-width:8ch;"
|
|
30
|
+
]);
|
|
31
|
+
export var TruncatedFilenamePart = styled.span.withConfig({
|
|
32
|
+
displayName: "Attach.styles__TruncatedFilenamePart",
|
|
33
|
+
componentId: "sc-ebfa8a10-4"
|
|
34
|
+
})([
|
|
35
|
+
"",
|
|
36
|
+
""
|
|
37
|
+
], applyEllipsis());
|
|
38
|
+
export var FilenameExtensionPart = styled.span.withConfig({
|
|
39
|
+
displayName: "Attach.styles__FilenameExtensionPart",
|
|
40
|
+
componentId: "sc-ebfa8a10-5"
|
|
41
|
+
})([
|
|
42
|
+
""
|
|
43
|
+
]);
|
|
@@ -9,6 +9,7 @@ export 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',
|
|
12
13
|
helperTextColor: '--plasma-attach-helper-text-color',
|
|
13
14
|
// Токены для Button
|
|
14
15
|
buttonColor: '--plasma-attach-button-color',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IconBlankCsvOutline, IconBlankDocOutline, IconBlankOutline, IconBlankPdfOutline, IconBlankTxtOutline, IconBlankXlsOutline } from "../../_Icon";
|
|
3
|
-
export var
|
|
3
|
+
export var getFileIcon = function(extension, size) {
|
|
4
4
|
var iconSize = size === 'xs' ? 'xs' : 's';
|
|
5
5
|
switch(extension){
|
|
6
6
|
case 'pdf':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from "styled-components";
|
|
2
2
|
import { tokens, classes } from "../../Attach.tokens";
|
|
3
|
-
import {
|
|
3
|
+
import { FilenameWrapper, StyledHelperText } from "../../Attach.styles";
|
|
4
4
|
export var base = css([
|
|
5
5
|
"&.",
|
|
6
6
|
"{column-gap:var(",
|
|
@@ -18,6 +18,7 @@ export var base = css([
|
|
|
18
18
|
");font-weight:var(",
|
|
19
19
|
");letter-spacing:var(",
|
|
20
20
|
");line-height:var(",
|
|
21
|
+
");height:var(",
|
|
21
22
|
");}",
|
|
22
23
|
"{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);letter-spacing:var(--plasma-typo-body-xs-letter-spacing);line-height:var(--plasma-typo-body-xs-line-height);}}"
|
|
23
|
-
], classes.horizontal, tokens.horizontalGap, classes.vertical, tokens.verticalGap, classes.auto, tokens.verticalGap, tokens.horizontalGap, classes.withHelperText, tokens.verticalGapWithHelperText,
|
|
24
|
+
], classes.horizontal, tokens.horizontalGap, classes.vertical, tokens.verticalGap, classes.auto, tokens.verticalGap, tokens.horizontalGap, classes.withHelperText, tokens.verticalGapWithHelperText, FilenameWrapper, tokens.cellTitleFontFamily, tokens.cellTitleFontSize, tokens.cellTitleFontStyle, tokens.cellTitleFontWeight, tokens.cellTitleLetterSpacing, tokens.cellTitleLineHeight, tokens.filenameWrapperHeight, StyledHelperText);
|
|
@@ -84,8 +84,9 @@ import { cx } from "../../utils";
|
|
|
84
84
|
import { indicatorConfig, indicatorTokens } from "../Indicator";
|
|
85
85
|
import { classes, tokens } from "./Avatar.tokens";
|
|
86
86
|
import { base, Wrapper, Image, StatusIcon, Text, ExtraContent, ExtraCounter, ExtraBadge } from "./Avatar.styles";
|
|
87
|
-
import { base as
|
|
87
|
+
import { base as sizeCSS } from "./variations/_size/base";
|
|
88
88
|
import { base as focusedCSS } from "./variations/_focused/base";
|
|
89
|
+
import { base as shapeCSS } from "./variations/_shape/base";
|
|
89
90
|
import { extraPlacementMap, getInitialsForName } from "./utils";
|
|
90
91
|
var StatusLabelsDefault = {
|
|
91
92
|
active: 'Активен',
|
|
@@ -117,7 +118,7 @@ var mergedConfig = mergeConfig(indicatorConfig);
|
|
|
117
118
|
var Indicator = component(mergedConfig);
|
|
118
119
|
var StyledIndicator = styled(Indicator).withConfig({
|
|
119
120
|
displayName: "Avatar__StyledIndicator",
|
|
120
|
-
componentId: "sc-
|
|
121
|
+
componentId: "sc-76e2f30f-0"
|
|
121
122
|
})([
|
|
122
123
|
"",
|
|
123
124
|
":var(",
|
|
@@ -130,7 +131,7 @@ var StyledIndicator = styled(Indicator).withConfig({
|
|
|
130
131
|
});
|
|
131
132
|
export var avatarRoot = function(Root) {
|
|
132
133
|
return /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
133
|
-
var avatarSize = props.size, name = props.name, url = props.url, customText = props.customText, status = props.status, className = props.className, _props_focused = props.focused, focused = _props_focused === void 0 ? true : _props_focused, isScalable = props.isScalable, _props_statusLabels = props.statusLabels, statusLabels = _props_statusLabels === void 0 ? StatusLabelsDefault : _props_statusLabels, hasExtra = props.hasExtra, extraPlacement = props.extraPlacement, type = props.type, counterView = props.counterView, count = props.count, maxCount = props.maxCount, badgeView = props.badgeView, text = props.text, customColor = props.customColor, customBackgroundColor = props.customBackgroundColor, contentLeft = props.contentLeft, contentRight = props.contentRight, pilled = props.pilled, rest = _object_without_properties(props, [
|
|
134
|
+
var avatarSize = props.size, name = props.name, url = props.url, customText = props.customText, status = props.status, className = props.className, _props_focused = props.focused, focused = _props_focused === void 0 ? true : _props_focused, isScalable = props.isScalable, shape = props.shape, _props_statusLabels = props.statusLabels, statusLabels = _props_statusLabels === void 0 ? StatusLabelsDefault : _props_statusLabels, hasExtra = props.hasExtra, extraPlacement = props.extraPlacement, type = props.type, counterView = props.counterView, count = props.count, maxCount = props.maxCount, badgeView = props.badgeView, text = props.text, customColor = props.customColor, customBackgroundColor = props.customBackgroundColor, contentLeft = props.contentLeft, contentRight = props.contentRight, pilled = props.pilled, rest = _object_without_properties(props, [
|
|
134
135
|
"size",
|
|
135
136
|
"name",
|
|
136
137
|
"url",
|
|
@@ -139,6 +140,7 @@ export var avatarRoot = function(Root) {
|
|
|
139
140
|
"className",
|
|
140
141
|
"focused",
|
|
141
142
|
"isScalable",
|
|
143
|
+
"shape",
|
|
142
144
|
"statusLabels",
|
|
143
145
|
"hasExtra",
|
|
144
146
|
"extraPlacement",
|
|
@@ -171,6 +173,7 @@ export var avatarRoot = function(Root) {
|
|
|
171
173
|
return /*#__PURE__*/ React.createElement(Root, _object_spread({
|
|
172
174
|
ref: ref,
|
|
173
175
|
size: avatarSize,
|
|
176
|
+
shape: shape,
|
|
174
177
|
className: cx(classes.avatarItem, className),
|
|
175
178
|
"aria-label": ariaLabel,
|
|
176
179
|
focused: focused
|
|
@@ -211,13 +214,17 @@ export var avatarConfig = {
|
|
|
211
214
|
base: base,
|
|
212
215
|
variations: {
|
|
213
216
|
size: {
|
|
214
|
-
css:
|
|
217
|
+
css: sizeCSS
|
|
215
218
|
},
|
|
216
219
|
focused: {
|
|
217
220
|
css: focusedCSS
|
|
221
|
+
},
|
|
222
|
+
shape: {
|
|
223
|
+
css: shapeCSS
|
|
218
224
|
}
|
|
219
225
|
},
|
|
220
226
|
defaults: {
|
|
221
|
-
size: 'm'
|
|
227
|
+
size: 'm',
|
|
228
|
+
shape: 'circled'
|
|
222
229
|
}
|
|
223
230
|
};
|
|
@@ -13,9 +13,9 @@ export var base = css([
|
|
|
13
13
|
]);
|
|
14
14
|
export var Wrapper = styled.div.withConfig({
|
|
15
15
|
displayName: "Avatar.styles__Wrapper",
|
|
16
|
-
componentId: "sc-
|
|
16
|
+
componentId: "sc-86d30134-0"
|
|
17
17
|
})([
|
|
18
|
-
"display:flex;justify-content:center;align-items:center;width:100%;height:100%;
|
|
18
|
+
"display:flex;justify-content:center;align-items:center;width:100%;height:100%;background:var(",
|
|
19
19
|
");overflow:hidden;&:hover{scale:",
|
|
20
20
|
";cursor:",
|
|
21
21
|
";}"
|
|
@@ -28,23 +28,19 @@ export var Wrapper = styled.div.withConfig({
|
|
|
28
28
|
});
|
|
29
29
|
export var StatusIcon = styled.div.withConfig({
|
|
30
30
|
displayName: "Avatar.styles__StatusIcon",
|
|
31
|
-
componentId: "sc-
|
|
31
|
+
componentId: "sc-86d30134-1"
|
|
32
32
|
})([
|
|
33
|
-
"position:absolute;
|
|
34
|
-
|
|
35
|
-
") / 2);left:calc(1.02 * 0.85 * var(",
|
|
36
|
-
") - var(",
|
|
37
|
-
") / 2);"
|
|
38
|
-
], tokens.avatarSize, tokens.statusIconSize, tokens.avatarSize, tokens.statusIconSize);
|
|
33
|
+
"position:absolute;"
|
|
34
|
+
]);
|
|
39
35
|
export var Image = styled.img.withConfig({
|
|
40
36
|
displayName: "Avatar.styles__Image",
|
|
41
|
-
componentId: "sc-
|
|
37
|
+
componentId: "sc-86d30134-2"
|
|
42
38
|
})([
|
|
43
|
-
"width:100%;height:100%;
|
|
39
|
+
"width:100%;height:100%;"
|
|
44
40
|
]);
|
|
45
41
|
export var Text = styled.span.withConfig({
|
|
46
42
|
displayName: "Avatar.styles__Text",
|
|
47
|
-
componentId: "sc-
|
|
43
|
+
componentId: "sc-86d30134-3"
|
|
48
44
|
})([
|
|
49
45
|
"font-size:var(",
|
|
50
46
|
");font-family:var(",
|
|
@@ -56,7 +52,7 @@ export var Text = styled.span.withConfig({
|
|
|
56
52
|
], tokens.fontSize, tokens.fontFamily, tokens.fontWeight, tokens.lineHeight, tokens.color, tokens.color);
|
|
57
53
|
export var ExtraContent = styled.div.withConfig({
|
|
58
54
|
displayName: "Avatar.styles__ExtraContent",
|
|
59
|
-
componentId: "sc-
|
|
55
|
+
componentId: "sc-86d30134-4"
|
|
60
56
|
})([
|
|
61
57
|
"max-width:100%;display:flex;position:absolute;z-index:2;&.",
|
|
62
58
|
"{top:calc(-0.063rem * var(",
|
|
@@ -74,7 +70,7 @@ export var ExtraContent = styled.div.withConfig({
|
|
|
74
70
|
], classes.extraPlacementTopLeft, tokens.extraPlacementFactor, tokens.extraPlacementFactor, classes.extraPlacementTopRight, tokens.extraPlacementFactor, tokens.extraPlacementFactor, classes.extraPlacementBottomRight, tokens.extraPlacementFactor, tokens.extraPlacementFactor, classes.extraPlacementBottomLeft, tokens.extraPlacementFactor, tokens.extraPlacementFactor);
|
|
75
71
|
export var ExtraBadge = styled(Badge).withConfig({
|
|
76
72
|
displayName: "Avatar.styles__ExtraBadge",
|
|
77
|
-
componentId: "sc-
|
|
73
|
+
componentId: "sc-86d30134-5"
|
|
78
74
|
})([
|
|
79
75
|
"",
|
|
80
76
|
":var(",
|
|
@@ -122,7 +118,7 @@ export var ExtraBadge = styled(Badge).withConfig({
|
|
|
122
118
|
], badgeTokens.background, tokens.badgeBackground, badgeTokens.color, tokens.badgeColor, badgeTokens.backgroundTransparent, tokens.badgeBackgroundTransparent, badgeTokens.colorTransparent, tokens.badgeColorTransparent, badgeTokens.colorClear, tokens.badgeColorClear, badgeTokens.backgroundClear, tokens.badgeBackgroundClear, badgeTokens.borderRadius, tokens.badgeBorderRadius, badgeTokens.pilledBorderRadius, tokens.badgePilledBorderRadius, badgeTokens.height, tokens.badgeHeight, badgeTokens.padding, tokens.badgePadding, badgeTokens.paddingIconOnly, tokens.badgePaddingIconOnly, badgeTokens.fontFamily, tokens.badgeFontFamily, badgeTokens.fontSize, tokens.badgeFontSize, badgeTokens.fontStyle, tokens.badgeFontStyle, badgeTokens.fontWeight, tokens.badgeFontWeight, badgeTokens.letterSpacing, tokens.badgeLetterSpacing, badgeTokens.lineHeight, tokens.badgeLineHeight, badgeTokens.leftContentMarginLeft, tokens.badgeLeftContentMarginLeft, badgeTokens.leftContentMarginRight, tokens.badgeLeftContentMarginRight, badgeTokens.rightContentMarginLeft, tokens.badgeRightContentMarginLeft, badgeTokens.rightContentMarginRight, tokens.badgeRightContentMarginRight);
|
|
123
119
|
export var ExtraCounter = styled(Counter).withConfig({
|
|
124
120
|
displayName: "Avatar.styles__ExtraCounter",
|
|
125
|
-
componentId: "sc-
|
|
121
|
+
componentId: "sc-86d30134-6"
|
|
126
122
|
})([
|
|
127
123
|
"",
|
|
128
124
|
":var(",
|
|
@@ -21,6 +21,9 @@ export var tokens = {
|
|
|
21
21
|
outlineOffset: '--plasma-avatar-outline-offset',
|
|
22
22
|
scaleHover: '--plasma-avatar-scale-hover',
|
|
23
23
|
extraPlacementFactor: '--plasma-avatar-extra-placement-factor',
|
|
24
|
+
borderRadius: '--plasma-avatar-border-radius',
|
|
25
|
+
statusLeft: '--plasma-avatar-status-left',
|
|
26
|
+
statusTop: '--plasma-avatar-status-top',
|
|
24
27
|
// extra badge tokens
|
|
25
28
|
badgeBackground: '--plasma-avatar-extra-badge-background',
|
|
26
29
|
badgeColor: '--plasma-avatar-extra-badge-color',
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { css } from "styled-components";
|
|
2
|
+
import { tokens } from "../../Avatar.tokens";
|
|
3
|
+
import { Image, Wrapper, StatusIcon } from "../../Avatar.styles";
|
|
4
|
+
export var base = css([
|
|
5
|
+
"",
|
|
6
|
+
"{border-radius:var(",
|
|
7
|
+
");}",
|
|
8
|
+
"{border-radius:var(",
|
|
9
|
+
");}",
|
|
10
|
+
"{top:var(",
|
|
11
|
+
");left:var(",
|
|
12
|
+
");}"
|
|
13
|
+
], Image, tokens.borderRadius, Wrapper, tokens.borderRadius, StatusIcon, tokens.statusTop, tokens.statusLeft);
|
|
@@ -54,8 +54,9 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
54
54
|
return target;
|
|
55
55
|
}
|
|
56
56
|
import React, { forwardRef, useMemo } from "react";
|
|
57
|
+
import cls from "classnames";
|
|
57
58
|
import { useForkRef } from "@salutejs/plasma-core";
|
|
58
|
-
import {
|
|
59
|
+
import { getSizeValueFromProp, safeUseId } from "../../utils";
|
|
59
60
|
import { usePopupContext } from "../Popup";
|
|
60
61
|
import { Overlay } from "../Overlay";
|
|
61
62
|
import { DEFAULT_Z_INDEX } from "../Popup/utils";
|
|
@@ -70,7 +71,7 @@ import { useDrawer } from "./hooks";
|
|
|
70
71
|
// issue #823
|
|
71
72
|
export var drawerRoot = function(Root) {
|
|
72
73
|
return /*#__PURE__*/ forwardRef(function(_param, outerRef) {
|
|
73
|
-
var id = _param.id, zIndex = _param.zIndex, popupInfo = _param.popupInfo, withBlur = _param.withBlur, children = _param.children, view = _param.view, size = _param.size, width = _param.width, height = _param.height, isOpen = _param.isOpen, opened = _param.opened, initialFocusRef = _param.initialFocusRef, focusAfterRef = _param.focusAfterRef, className = _param.className, customBackgroundColor = _param.customBackgroundColor, customContentBackgroundColor = _param.customContentBackgroundColor, onClose = _param.onClose, onOverlayClick = _param.onOverlayClick, onEscKeyDown = _param.onEscKeyDown, offset = _param.offset, frame = _param.frame, _param_borderRadius = _param.borderRadius, borderRadius = _param_borderRadius === void 0 ? 'none' : _param_borderRadius, _param_placement = _param.placement, placement = _param_placement === void 0 ? 'right' : _param_placement, _param_closeOnEsc = _param.closeOnEsc, closeOnEsc = _param_closeOnEsc === void 0 ? true : _param_closeOnEsc, _param_closeOnOverlayClick = _param.closeOnOverlayClick, closeOnOverlayClick = _param_closeOnOverlayClick === void 0 ? true : _param_closeOnOverlayClick, _param_asModal = _param.asModal, asModal = _param_asModal === void 0 ? true : _param_asModal, draggable = _param.draggable, rest = _object_without_properties(_param, [
|
|
74
|
+
var id = _param.id, zIndex = _param.zIndex, popupInfo = _param.popupInfo, withBlur = _param.withBlur, children = _param.children, view = _param.view, size = _param.size, width = _param.width, height = _param.height, isOpen = _param.isOpen, opened = _param.opened, initialFocusRef = _param.initialFocusRef, focusAfterRef = _param.focusAfterRef, animationInfo = _param.animationInfo, className = _param.className, customBackgroundColor = _param.customBackgroundColor, customContentBackgroundColor = _param.customContentBackgroundColor, onClose = _param.onClose, onOverlayClick = _param.onOverlayClick, onEscKeyDown = _param.onEscKeyDown, offset = _param.offset, frame = _param.frame, _param_borderRadius = _param.borderRadius, borderRadius = _param_borderRadius === void 0 ? 'none' : _param_borderRadius, _param_placement = _param.placement, placement = _param_placement === void 0 ? 'right' : _param_placement, _param_closeOnEsc = _param.closeOnEsc, closeOnEsc = _param_closeOnEsc === void 0 ? true : _param_closeOnEsc, _param_closeOnOverlayClick = _param.closeOnOverlayClick, closeOnOverlayClick = _param_closeOnOverlayClick === void 0 ? true : _param_closeOnOverlayClick, _param_asModal = _param.asModal, asModal = _param_asModal === void 0 ? true : _param_asModal, draggable = _param.draggable, rest = _object_without_properties(_param, [
|
|
74
75
|
"id",
|
|
75
76
|
"zIndex",
|
|
76
77
|
"popupInfo",
|
|
@@ -84,6 +85,7 @@ export var drawerRoot = function(Root) {
|
|
|
84
85
|
"opened",
|
|
85
86
|
"initialFocusRef",
|
|
86
87
|
"focusAfterRef",
|
|
88
|
+
"animationInfo",
|
|
87
89
|
"className",
|
|
88
90
|
"customBackgroundColor",
|
|
89
91
|
"customContentBackgroundColor",
|
|
@@ -133,10 +135,11 @@ export var drawerRoot = function(Root) {
|
|
|
133
135
|
onClose();
|
|
134
136
|
}
|
|
135
137
|
};
|
|
138
|
+
var _obj;
|
|
136
139
|
return /*#__PURE__*/ React.createElement(StyledPopup, _object_spread({
|
|
137
140
|
id: innerId,
|
|
138
141
|
ref: asModal ? innerRef : outerRef,
|
|
139
|
-
className:
|
|
142
|
+
className: cls(placementClass, className, (_obj = {}, _define_property(_obj, classes.enterCustomAnimation, animationInfo === null || animationInfo === void 0 ? void 0 : animationInfo.enter), _define_property(_obj, classes.exitCustomAnimation, animationInfo === null || animationInfo === void 0 ? void 0 : animationInfo.exit), _obj)),
|
|
140
143
|
opened: innerIsOpen,
|
|
141
144
|
zIndex: zIndex,
|
|
142
145
|
placement: placement,
|
|
@@ -146,6 +149,7 @@ export var drawerRoot = function(Root) {
|
|
|
146
149
|
height: innerHeight,
|
|
147
150
|
offset: offset,
|
|
148
151
|
withAnimation: true,
|
|
152
|
+
drawerAnimationInfo: animationInfo,
|
|
149
153
|
overlay: asModal && /*#__PURE__*/ React.createElement(Root, {
|
|
150
154
|
view: view
|
|
151
155
|
}, /*#__PURE__*/ React.createElement(Overlay, {
|
|
@@ -158,6 +162,7 @@ export var drawerRoot = function(Root) {
|
|
|
158
162
|
onOverlayClick: onDrawerOverlayKeyDown
|
|
159
163
|
}))
|
|
160
164
|
}, rest), /*#__PURE__*/ React.createElement(Root, {
|
|
165
|
+
className: classes.panel,
|
|
161
166
|
view: view,
|
|
162
167
|
size: size,
|
|
163
168
|
style: {
|
|
@@ -169,8 +174,7 @@ export var drawerRoot = function(Root) {
|
|
|
169
174
|
width: innerWidth,
|
|
170
175
|
height: innerHeight,
|
|
171
176
|
customBackgroundColor: customBackgroundColor,
|
|
172
|
-
customContentBackgroundColor: customContentBackgroundColor
|
|
173
|
-
className: className
|
|
177
|
+
customContentBackgroundColor: customContentBackgroundColor
|
|
174
178
|
}, children)));
|
|
175
179
|
});
|
|
176
180
|
};
|