@salutejs/plasma-new-hope 0.330.0-canary.1655.16198986399.0 → 0.330.0-canary.2009.16162480074.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/Drawer/Drawer.css +5 -7
- package/cjs/components/Drawer/Drawer.js +1 -1
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/Modal/Modal.css +6 -9
- package/cjs/components/Modal/Modal.js +3 -7
- package/cjs/components/Modal/Modal.js.map +1 -1
- package/cjs/components/Modal/Modal.styles.js +4 -6
- package/cjs/components/Modal/Modal.styles.js.map +1 -1
- package/cjs/components/Modal/{Modal.styles_1obtvtw.css → Modal.styles_1gt0sfn.css} +3 -4
- package/cjs/components/Notification/NotificationsProvider.css +3 -7
- package/cjs/components/Popup/Popup.js +3 -65
- package/cjs/components/Popup/Popup.js.map +1 -1
- package/cjs/components/Popup/Popup.styles.js +19 -31
- package/cjs/components/Popup/Popup.styles.js.map +1 -1
- package/cjs/components/Popup/Popup.styles_gq4luz.css +4 -0
- package/cjs/components/Popup/Popup.tokens.js +1 -10
- package/cjs/components/Popup/Popup.tokens.js.map +1 -1
- package/cjs/components/Popup/PopupContext.css +3 -7
- package/cjs/components/Popup/utils/index.js.map +1 -1
- package/cjs/components/TextArea/TextArea.js +8 -22
- package/cjs/components/TextArea/TextArea.js.map +1 -1
- package/cjs/components/TextArea/TextArea.styles.js +64 -101
- package/cjs/components/TextArea/TextArea.styles.js.map +1 -1
- package/cjs/components/TextArea/TextArea.styles_1r7xix5.css +20 -0
- package/cjs/components/TextArea/TextArea.tokens.js +1 -3
- package/cjs/components/TextArea/TextArea.tokens.js.map +1 -1
- package/cjs/components/TextArea/TextArea_e0xkpd.css +1 -0
- package/cjs/components/TextArea/ui/Hint/Hint.css +18 -22
- package/cjs/components/TextArea/variations/_clear/base.js +1 -1
- package/cjs/components/TextArea/variations/_clear/base_16hm89e.css +1 -0
- package/cjs/components/TextArea/variations/_disabled/base.js +1 -1
- package/cjs/components/TextArea/variations/_disabled/base_1bn0zc9.css +1 -0
- package/cjs/components/TextArea/variations/_read-only/base.js +1 -1
- package/cjs/components/TextArea/variations/_read-only/{base_vk912g.css → base_1v0syh0.css} +1 -1
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/index.css +29 -36
- package/emotion/cjs/components/Drawer/Drawer.js +2 -3
- package/emotion/cjs/components/Modal/Modal.js +4 -8
- package/emotion/cjs/components/Modal/Modal.styles.js +6 -11
- package/emotion/cjs/components/Popup/Popup.js +4 -68
- package/emotion/cjs/components/Popup/Popup.styles.js +8 -22
- package/emotion/cjs/components/Popup/Popup.tokens.js +1 -10
- package/emotion/cjs/components/Popup/utils/index.js +0 -16
- package/emotion/cjs/components/TextArea/TextArea.js +8 -20
- package/emotion/cjs/components/TextArea/TextArea.styles.js +41 -78
- package/emotion/cjs/components/TextArea/TextArea.tokens.js +1 -3
- package/emotion/cjs/components/TextArea/mixins/applyDynamicLabel.js +2 -2
- package/emotion/cjs/components/TextField/TextField.js +1 -1
- package/emotion/cjs/components/_Icon/index.js +0 -4
- package/emotion/es/components/Drawer/Drawer.js +2 -3
- package/emotion/es/components/Modal/Modal.js +5 -9
- package/emotion/es/components/Modal/Modal.styles.js +6 -8
- package/emotion/es/components/Popup/Popup.js +5 -64
- package/emotion/es/components/Popup/Popup.styles.js +8 -16
- package/emotion/es/components/Popup/Popup.tokens.js +1 -10
- package/emotion/es/components/Popup/utils/index.js +0 -3
- package/emotion/es/components/TextArea/TextArea.js +9 -21
- package/emotion/es/components/TextArea/TextArea.styles.js +41 -66
- package/emotion/es/components/TextArea/TextArea.tokens.js +1 -3
- package/emotion/es/components/TextArea/mixins/applyDynamicLabel.js +2 -2
- package/emotion/es/components/TextField/TextField.js +1 -1
- package/emotion/es/components/_Icon/index.js +0 -1
- package/es/components/Drawer/Drawer.css +5 -7
- package/es/components/Drawer/Drawer.js +1 -1
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/Modal/Modal.css +6 -9
- package/es/components/Modal/Modal.js +6 -10
- package/es/components/Modal/Modal.js.map +1 -1
- package/es/components/Modal/Modal.styles.js +5 -6
- package/es/components/Modal/Modal.styles.js.map +1 -1
- package/es/components/Modal/{Modal.styles_1obtvtw.css → Modal.styles_1gt0sfn.css} +3 -4
- package/es/components/Notification/NotificationsProvider.css +3 -7
- package/es/components/Popup/Popup.js +4 -65
- package/es/components/Popup/Popup.js.map +1 -1
- package/es/components/Popup/Popup.styles.js +20 -30
- package/es/components/Popup/Popup.styles.js.map +1 -1
- package/es/components/Popup/Popup.styles_gq4luz.css +4 -0
- package/es/components/Popup/Popup.tokens.js +1 -10
- package/es/components/Popup/Popup.tokens.js.map +1 -1
- package/es/components/Popup/PopupContext.css +3 -7
- package/es/components/Popup/utils/index.js.map +1 -1
- package/es/components/TextArea/TextArea.js +9 -23
- package/es/components/TextArea/TextArea.js.map +1 -1
- package/es/components/TextArea/TextArea.styles.js +65 -100
- package/es/components/TextArea/TextArea.styles.js.map +1 -1
- package/es/components/TextArea/TextArea.styles_1r7xix5.css +20 -0
- package/es/components/TextArea/TextArea.tokens.js +1 -3
- package/es/components/TextArea/TextArea.tokens.js.map +1 -1
- package/es/components/TextArea/TextArea_e0xkpd.css +1 -0
- package/es/components/TextArea/ui/Hint/Hint.css +18 -22
- package/es/components/TextArea/variations/_clear/base.js +1 -1
- package/es/components/TextArea/variations/_clear/base_16hm89e.css +1 -0
- package/es/components/TextArea/variations/_disabled/base.js +1 -1
- package/es/components/TextArea/variations/_disabled/base_1bn0zc9.css +1 -0
- package/es/components/TextArea/variations/_read-only/base.js +1 -1
- package/es/components/TextArea/variations/_read-only/{base_vk912g.css → base_1v0syh0.css} +1 -1
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/index.css +29 -36
- package/package.json +4 -5
- package/styled-components/cjs/components/Drawer/Drawer.js +2 -3
- package/styled-components/cjs/components/Modal/Modal.js +4 -8
- package/styled-components/cjs/components/Modal/Modal.styles.js +8 -50
- package/styled-components/cjs/components/Popup/Popup.js +4 -68
- package/styled-components/cjs/components/Popup/Popup.styles.js +8 -68
- package/styled-components/cjs/components/Popup/Popup.tokens.js +1 -10
- package/styled-components/cjs/components/Popup/utils/index.js +0 -16
- package/styled-components/cjs/components/TextArea/TextArea.js +7 -19
- package/styled-components/cjs/components/TextArea/TextArea.styles.js +28 -76
- package/styled-components/cjs/components/TextArea/TextArea.tokens.js +1 -3
- package/styled-components/cjs/components/TextArea/mixins/applyDynamicLabel.js +2 -2
- package/styled-components/cjs/components/_Icon/index.js +0 -4
- package/styled-components/es/components/Drawer/Drawer.js +2 -3
- package/styled-components/es/components/Modal/Modal.js +5 -9
- package/styled-components/es/components/Modal/Modal.styles.js +4 -8
- package/styled-components/es/components/Popup/Popup.js +5 -64
- package/styled-components/es/components/Popup/Popup.styles.js +4 -23
- package/styled-components/es/components/Popup/Popup.tokens.js +1 -10
- package/styled-components/es/components/Popup/utils/index.js +0 -3
- package/styled-components/es/components/TextArea/TextArea.js +8 -20
- package/styled-components/es/components/TextArea/TextArea.styles.js +28 -64
- package/styled-components/es/components/TextArea/TextArea.tokens.js +1 -3
- package/styled-components/es/components/TextArea/mixins/applyDynamicLabel.js +2 -2
- package/styled-components/es/components/_Icon/index.js +0 -1
- package/types/components/Breadcrumbs/utils/index.d.ts +1 -1
- package/types/components/Carousel/CarouselOld/Carousel.d.ts +2 -2
- package/types/components/Combobox/ComboboxNew/utils/sizeToIconSize.d.ts +1 -1
- package/types/components/Drawer/Drawer.d.ts +2 -2
- package/types/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.types.d.ts +1 -1
- package/types/components/Drawer/Drawer.types.d.ts.map +1 -1
- package/types/components/Modal/Modal.d.ts +1 -1
- package/types/components/Modal/Modal.d.ts.map +1 -1
- package/types/components/Modal/Modal.styles.d.ts +0 -1
- package/types/components/Modal/Modal.styles.d.ts.map +1 -1
- package/types/components/Popup/Popup.d.ts +1 -1
- package/types/components/Popup/Popup.d.ts.map +1 -1
- package/types/components/Popup/Popup.styles.d.ts +0 -2
- package/types/components/Popup/Popup.styles.d.ts.map +1 -1
- package/types/components/Popup/Popup.tokens.d.ts +0 -9
- package/types/components/Popup/Popup.tokens.d.ts.map +1 -1
- package/types/components/Popup/Popup.types.d.ts +0 -52
- package/types/components/Popup/Popup.types.d.ts.map +1 -1
- package/types/components/Popup/utils/index.d.ts +0 -3
- package/types/components/Popup/utils/index.d.ts.map +1 -1
- package/types/components/Select/utils/sizeToIconSize.d.ts +1 -1
- package/types/components/Table/ui/HeadCell/HeadCell.d.ts +1 -1
- package/types/components/TextArea/TextArea.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.styles.d.ts +1 -10
- package/types/components/TextArea/TextArea.styles.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.tokens.d.ts +0 -2
- package/types/components/TextArea/TextArea.tokens.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.types.d.ts +0 -5
- package/types/components/TextArea/TextArea.types.d.ts.map +1 -1
- package/types/components/TextArea/mixins/applyDynamicLabel.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/Tree/utils/sizeToIconSize.d.ts +1 -1
- package/types/components/_Icon/index.d.ts +0 -1
- package/types/components/_Icon/index.d.ts.map +1 -1
- package/cjs/components/Popup/Popup.styles_kpf3dd.css +0 -6
- package/cjs/components/Popup/utils/getHandleStyles.js +0 -58
- package/cjs/components/Popup/utils/getHandleStyles.js.map +0 -1
- package/cjs/components/Popup/utils/getRatioBasedOnPlacement.js +0 -36
- package/cjs/components/Popup/utils/getRatioBasedOnPlacement.js.map +0 -1
- package/cjs/components/Popup/utils/getResizeDirections.js +0 -73
- package/cjs/components/Popup/utils/getResizeDirections.js.map +0 -1
- package/cjs/components/TextArea/TextArea.styles_exqsyh.css +0 -24
- package/cjs/components/TextArea/TextArea_c31ipk.css +0 -1
- package/cjs/components/TextArea/variations/_clear/base_1vo4ba5.css +0 -1
- package/cjs/components/TextArea/variations/_disabled/base_s6ttw.css +0 -1
- package/cjs/components/_Icon/Icon.assets/ResizeDiagonal.js +0 -30
- package/cjs/components/_Icon/Icon.assets/ResizeDiagonal.js.map +0 -1
- package/cjs/components/_Icon/Icons/IconResizeDiagonal.js +0 -30
- package/cjs/components/_Icon/Icons/IconResizeDiagonal.js.map +0 -1
- package/emotion/cjs/components/Popup/utils/getHandleStyles.js +0 -61
- package/emotion/cjs/components/Popup/utils/getRatioBasedOnPlacement.js +0 -54
- package/emotion/cjs/components/Popup/utils/getResizeDirections.js +0 -82
- package/emotion/cjs/components/_Icon/Icon.assets/ResizeDiagonal.js +0 -83
- package/emotion/cjs/components/_Icon/Icons/IconResizeDiagonal.js +0 -86
- package/emotion/es/components/Popup/utils/getHandleStyles.js +0 -51
- package/emotion/es/components/Popup/utils/getRatioBasedOnPlacement.js +0 -44
- package/emotion/es/components/Popup/utils/getResizeDirections.js +0 -72
- package/emotion/es/components/_Icon/Icon.assets/ResizeDiagonal.js +0 -68
- package/emotion/es/components/_Icon/Icons/IconResizeDiagonal.js +0 -71
- package/es/components/Popup/Popup.styles_kpf3dd.css +0 -6
- package/es/components/Popup/utils/getHandleStyles.js +0 -54
- package/es/components/Popup/utils/getHandleStyles.js.map +0 -1
- package/es/components/Popup/utils/getRatioBasedOnPlacement.js +0 -32
- package/es/components/Popup/utils/getRatioBasedOnPlacement.js.map +0 -1
- package/es/components/Popup/utils/getResizeDirections.js +0 -69
- package/es/components/Popup/utils/getResizeDirections.js.map +0 -1
- package/es/components/TextArea/TextArea.styles_exqsyh.css +0 -24
- package/es/components/TextArea/TextArea_c31ipk.css +0 -1
- package/es/components/TextArea/variations/_clear/base_1vo4ba5.css +0 -1
- package/es/components/TextArea/variations/_disabled/base_s6ttw.css +0 -1
- package/es/components/_Icon/Icon.assets/ResizeDiagonal.js +0 -22
- package/es/components/_Icon/Icon.assets/ResizeDiagonal.js.map +0 -1
- package/es/components/_Icon/Icons/IconResizeDiagonal.js +0 -22
- package/es/components/_Icon/Icons/IconResizeDiagonal.js.map +0 -1
- package/styled-components/cjs/components/Popup/utils/getHandleStyles.js +0 -61
- package/styled-components/cjs/components/Popup/utils/getRatioBasedOnPlacement.js +0 -54
- package/styled-components/cjs/components/Popup/utils/getResizeDirections.js +0 -82
- package/styled-components/cjs/components/_Icon/Icon.assets/ResizeDiagonal.js +0 -83
- package/styled-components/cjs/components/_Icon/Icons/IconResizeDiagonal.js +0 -86
- package/styled-components/es/components/Popup/utils/getHandleStyles.js +0 -51
- package/styled-components/es/components/Popup/utils/getRatioBasedOnPlacement.js +0 -44
- package/styled-components/es/components/Popup/utils/getResizeDirections.js +0 -72
- package/styled-components/es/components/_Icon/Icon.assets/ResizeDiagonal.js +0 -68
- package/styled-components/es/components/_Icon/Icons/IconResizeDiagonal.js +0 -71
- package/types/components/Popup/utils/getHandleStyles.d.ts +0 -29
- package/types/components/Popup/utils/getHandleStyles.d.ts.map +0 -1
- package/types/components/Popup/utils/getRatioBasedOnPlacement.d.ts +0 -3
- package/types/components/Popup/utils/getRatioBasedOnPlacement.d.ts.map +0 -1
- package/types/components/Popup/utils/getResizeDirections.d.ts +0 -14
- package/types/components/Popup/utils/getResizeDirections.d.ts.map +0 -1
- package/types/components/_Icon/Icon.assets/ResizeDiagonal.d.ts +0 -4
- package/types/components/_Icon/Icon.assets/ResizeDiagonal.d.ts.map +0 -1
- package/types/components/_Icon/Icons/IconResizeDiagonal.d.ts +0 -4
- package/types/components/_Icon/Icons/IconResizeDiagonal.d.ts.map +0 -1
@@ -9,12 +9,6 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
get Divider () {
|
13
|
-
return Divider;
|
14
|
-
},
|
15
|
-
get DividerWrapper () {
|
16
|
-
return DividerWrapper;
|
17
|
-
},
|
18
12
|
get Hint () {
|
19
13
|
return Hint;
|
20
14
|
},
|
@@ -33,12 +27,6 @@ _export(exports, {
|
|
33
27
|
get StyledContent () {
|
34
28
|
return StyledContent;
|
35
29
|
},
|
36
|
-
get StyledContentWrapper () {
|
37
|
-
return StyledContentWrapper;
|
38
|
-
},
|
39
|
-
get StyledHeaderSlot () {
|
40
|
-
return StyledHeaderSlot;
|
41
|
-
},
|
42
30
|
get StyledHelpers () {
|
43
31
|
return StyledHelpers;
|
44
32
|
},
|
@@ -96,13 +84,13 @@ var mergedConfig = (0, _engines.mergeConfig)(_Tooltip.tooltipConfig);
|
|
96
84
|
var Tooltip = (0, _engines.component)(mergedConfig);
|
97
85
|
var Hint = (0, _styledcomponents.default)(Tooltip).withConfig({
|
98
86
|
displayName: "TextArea.styles__Hint",
|
99
|
-
componentId: "sc-
|
87
|
+
componentId: "sc-2ff414ff-0"
|
100
88
|
})([
|
101
89
|
""
|
102
90
|
]);
|
103
91
|
var OuterLabelWrapper = _styledcomponents.default.div.withConfig({
|
104
92
|
displayName: "TextArea.styles__OuterLabelWrapper",
|
105
|
-
componentId: "sc-
|
93
|
+
componentId: "sc-2ff414ff-1"
|
106
94
|
})([
|
107
95
|
"display:flex;align-items:center;max-width:",
|
108
96
|
";margin-bottom:",
|
@@ -116,7 +104,7 @@ var OuterLabelWrapper = _styledcomponents.default.div.withConfig({
|
|
116
104
|
});
|
117
105
|
var StyledLabel = _styledcomponents.default.div.withConfig({
|
118
106
|
displayName: "TextArea.styles__StyledLabel",
|
119
|
-
componentId: "sc-
|
107
|
+
componentId: "sc-2ff414ff-2"
|
120
108
|
})([
|
121
109
|
"position:relative;display:inline-flex;color:var(",
|
122
110
|
",var(",
|
@@ -136,7 +124,7 @@ var StyledLabel = _styledcomponents.default.div.withConfig({
|
|
136
124
|
], _TextAreatokens.tokens.labelOuterColor, _TextAreatokens.tokens.inputColor, _TextAreatokens.tokens.labelOuterFontFamily, _TextAreatokens.tokens.inputFontFamily, _TextAreatokens.tokens.labelOuterFontSize, _TextAreatokens.tokens.inputFontSize, _TextAreatokens.tokens.labelOuterFontStyle, _TextAreatokens.tokens.inputFontStyle, _TextAreatokens.tokens.labelOuterFontWeight, _TextAreatokens.tokens.inputFontWeight, _TextAreatokens.tokens.labelOuterLetterSpacing, _TextAreatokens.tokens.inputLetterSpacing, _TextAreatokens.tokens.labelOuterLineHeight, _TextAreatokens.tokens.inputLineHeight);
|
137
125
|
var TitleCaption = _styledcomponents.default.div.withConfig({
|
138
126
|
displayName: "TextArea.styles__TitleCaption",
|
139
|
-
componentId: "sc-
|
127
|
+
componentId: "sc-2ff414ff-3"
|
140
128
|
})([
|
141
129
|
"display:inline-block;margin-left:auto;font-family:var(",
|
142
130
|
");font-size:var(",
|
@@ -148,13 +136,13 @@ var TitleCaption = _styledcomponents.default.div.withConfig({
|
|
148
136
|
], _TextAreatokens.tokens.titleCaptionFontFamily, _TextAreatokens.tokens.titleCaptionFontSize, _TextAreatokens.tokens.titleCaptionFontStyle, _TextAreatokens.tokens.titleCaptionFontWeight, _TextAreatokens.tokens.titleCaptionLetterSpacing, _TextAreatokens.tokens.titleCaptionLineHeight);
|
149
137
|
var StyledIndicatorWrapper = _styledcomponents.default.div.withConfig({
|
150
138
|
displayName: "TextArea.styles__StyledIndicatorWrapper",
|
151
|
-
componentId: "sc-
|
139
|
+
componentId: "sc-2ff414ff-4"
|
152
140
|
})([
|
153
141
|
"position:relative;display:inline-flex;align-items:center;"
|
154
142
|
]);
|
155
143
|
var StyledOptionalText = _styledcomponents.default.span.withConfig({
|
156
144
|
displayName: "TextArea.styles__StyledOptionalText",
|
157
|
-
componentId: "sc-
|
145
|
+
componentId: "sc-2ff414ff-5"
|
158
146
|
})([
|
159
147
|
"color:var(",
|
160
148
|
");font-family:",
|
@@ -185,7 +173,7 @@ var StyledOptionalText = _styledcomponents.default.span.withConfig({
|
|
185
173
|
});
|
186
174
|
var StyledHintWrapper = _styledcomponents.default.div.withConfig({
|
187
175
|
displayName: "TextArea.styles__StyledHintWrapper",
|
188
|
-
componentId: "sc-
|
176
|
+
componentId: "sc-2ff414ff-6"
|
189
177
|
})([
|
190
178
|
"display:inline-flex;line-height:0;margin:var(",
|
191
179
|
");&.",
|
@@ -194,7 +182,7 @@ var StyledHintWrapper = _styledcomponents.default.div.withConfig({
|
|
194
182
|
], _TextAreatokens.tokens.hintMargin, _TextAreatokens.classes.innerLabelPlacement, _TextAreatokens.tokens.hintInnerLabelPlacementOffset);
|
195
183
|
var HintTargetWrapper = _styledcomponents.default.div.withConfig({
|
196
184
|
displayName: "TextArea.styles__HintTargetWrapper",
|
197
|
-
componentId: "sc-
|
185
|
+
componentId: "sc-2ff414ff-7"
|
198
186
|
})([
|
199
187
|
"color:var(",
|
200
188
|
");width:var(",
|
@@ -203,76 +191,40 @@ var HintTargetWrapper = _styledcomponents.default.div.withConfig({
|
|
203
191
|
], _TextAreatokens.tokens.hintIconColor, _TextAreatokens.tokens.hintTargetSize, _TextAreatokens.tokens.hintTargetSize);
|
204
192
|
var HintIconWrapper = _styledcomponents.default.div.withConfig({
|
205
193
|
displayName: "TextArea.styles__HintIconWrapper",
|
206
|
-
componentId: "sc-
|
194
|
+
componentId: "sc-2ff414ff-8"
|
207
195
|
})([
|
208
196
|
""
|
209
197
|
]);
|
210
198
|
var StyledTextAreaWrapper = _styledcomponents.default.div.withConfig({
|
211
199
|
displayName: "TextArea.styles__StyledTextAreaWrapper",
|
212
|
-
componentId: "sc-
|
200
|
+
componentId: "sc-2ff414ff-9"
|
213
201
|
})([
|
214
|
-
"
|
215
|
-
");padding-top:",
|
216
|
-
";padding-bottom:",
|
202
|
+
"background-color:var(",
|
203
|
+
");padding-top:var(",
|
204
|
+
");padding-bottom:",
|
217
205
|
";border-radius:",
|
218
206
|
";"
|
219
|
-
], _TextAreatokens.tokens.inputBackgroundColor, function(param) {
|
220
|
-
var hasHeader = param.hasHeader;
|
221
|
-
return hasHeader ? 'unset' : "var(".concat(_TextAreatokens.tokens.inputPaddingTop, ")");
|
222
|
-
}, function(param) {
|
207
|
+
], _TextAreatokens.tokens.inputBackgroundColor, _TextAreatokens.tokens.inputPaddingTop, function(param) {
|
223
208
|
var hasHelper = param.hasHelper;
|
224
209
|
return hasHelper ? "var(".concat(_TextAreatokens.tokens.inputPaddingBottomWithHelpers, ")") : "var(".concat(_TextAreatokens.tokens.inputPaddingBottom, ")");
|
225
210
|
}, function(param) {
|
226
211
|
var hasHelper = param.hasHelper;
|
227
212
|
return hasHelper ? "var(".concat(_TextAreatokens.tokens.borderRadiusWithHelpers, ")") : "var(".concat(_TextAreatokens.tokens.borderRadius, ")");
|
228
213
|
});
|
229
|
-
var StyledContentWrapper = _styledcomponents.default.div.withConfig({
|
230
|
-
displayName: "TextArea.styles__StyledContentWrapper",
|
231
|
-
componentId: "sc-5fcd62a1-10"
|
232
|
-
})([
|
233
|
-
"position:relative;width:100%;height:0;padding-top:",
|
234
|
-
";"
|
235
|
-
], function(param) {
|
236
|
-
var hasHeader = param.hasHeader;
|
237
|
-
return hasHeader ? "var(".concat(_TextAreatokens.tokens.inputPaddingTop, ")") : 'unset';
|
238
|
-
});
|
239
214
|
var StyledContent = _styledcomponents.default.div.withConfig({
|
240
215
|
displayName: "TextArea.styles__StyledContent",
|
241
|
-
componentId: "sc-
|
216
|
+
componentId: "sc-2ff414ff-10"
|
242
217
|
})([
|
243
|
-
"position:absolute;display:flex;align-items:center;z-index:1;color:var(",
|
218
|
+
"position:absolute;display:flex;align-items:center;bottom:0;z-index:1;color:var(",
|
244
219
|
",var(",
|
245
|
-
"));top:",
|
246
|
-
";right:var(",
|
220
|
+
"));top:var(",
|
221
|
+
");right:var(",
|
247
222
|
");height:var(",
|
248
223
|
");"
|
249
|
-
], _TextAreatokens.tokens.rightContentColor, _TextAreatokens.tokens.inputColor,
|
250
|
-
var hasHeader = param.hasHeader;
|
251
|
-
return hasHeader ? "var(".concat(_TextAreatokens.tokens.inputPaddingTop, ")") : "var(".concat(_TextAreatokens.tokens.rightContentTop, ")");
|
252
|
-
}, _TextAreatokens.tokens.rightContentRight, _TextAreatokens.tokens.rightContentHeight);
|
253
|
-
var StyledHeaderSlot = _styledcomponents.default.div.withConfig({
|
254
|
-
displayName: "TextArea.styles__StyledHeaderSlot",
|
255
|
-
componentId: "sc-5fcd62a1-12"
|
256
|
-
})([
|
257
|
-
"display:flex;flex-direction:column;"
|
258
|
-
]);
|
259
|
-
var DividerWrapper = _styledcomponents.default.div.withConfig({
|
260
|
-
displayName: "TextArea.styles__DividerWrapper",
|
261
|
-
componentId: "sc-5fcd62a1-13"
|
262
|
-
})([
|
263
|
-
"background:var(",
|
264
|
-
");"
|
265
|
-
], _TextAreatokens.tokens.backgroundColor);
|
266
|
-
var Divider = _styledcomponents.default.div.withConfig({
|
267
|
-
displayName: "TextArea.styles__Divider",
|
268
|
-
componentId: "sc-5fcd62a1-14"
|
269
|
-
})([
|
270
|
-
"height:0.0625rem;background:var(",
|
271
|
-
");"
|
272
|
-
], _TextAreatokens.tokens.dividerColor);
|
224
|
+
], _TextAreatokens.tokens.rightContentColor, _TextAreatokens.tokens.inputColor, _TextAreatokens.tokens.rightContentTop, _TextAreatokens.tokens.rightContentRight, _TextAreatokens.tokens.rightContentHeight);
|
273
225
|
var StyledContainer = _styledcomponents.default.div.withConfig({
|
274
226
|
displayName: "TextArea.styles__StyledContainer",
|
275
|
-
componentId: "sc-
|
227
|
+
componentId: "sc-2ff414ff-11"
|
276
228
|
})([
|
277
229
|
"display:inline-flex;flex-direction:column;width:",
|
278
230
|
";position:relative;"
|
@@ -282,7 +234,7 @@ var StyledContainer = _styledcomponents.default.div.withConfig({
|
|
282
234
|
});
|
283
235
|
var StyledTextArea = _styledcomponents.default.textarea.withConfig({
|
284
236
|
displayName: "TextArea.styles__StyledTextArea",
|
285
|
-
componentId: "sc-
|
237
|
+
componentId: "sc-2ff414ff-12"
|
286
238
|
})([
|
287
239
|
"display:block;box-sizing:border-box;outline:none;border:none;-webkit-appearance:none;background-color:transparent;color:var(",
|
288
240
|
");caret-color:var(",
|
@@ -345,7 +297,7 @@ var StyledTextArea = _styledcomponents.default.textarea.withConfig({
|
|
345
297
|
}, _TextAreatokens.tokens.inputFontFamily, _TextAreatokens.tokens.inputFontSize, _TextAreatokens.tokens.inputFontStyle, _TextAreatokens.tokens.inputFontWeight, _TextAreatokens.tokens.inputLetterSpacing, _TextAreatokens.tokens.inputLineHeight, _TextAreatokens.tokens.inputColorFocus, _TextAreatokens.tokens.scrollbarWidth, _TextAreatokens.tokens.scrollbarThumbBackgroundColor, _TextAreatokens.tokens.scrollbarBorderWidth, _TextAreatokens.tokens.scrollbarTrackBackgroundColor, _TextAreatokens.tokens.scrollbarBorderWidth);
|
346
298
|
var StyledHiddenTextArea = _styledcomponents.default.textarea.withConfig({
|
347
299
|
displayName: "TextArea.styles__StyledHiddenTextArea",
|
348
|
-
componentId: "sc-
|
300
|
+
componentId: "sc-2ff414ff-13"
|
349
301
|
})([
|
350
302
|
"max-height:none !important;min-height:var(",
|
351
303
|
") !important;visibility:hidden !important;overflow:hidden !important;position:absolute !important;z-index:-1000 !important;top:0 !important;left:0 !important;right:0.0625rem !important;border-width:0;padding-right:",
|
@@ -363,7 +315,7 @@ var StyledHiddenTextArea = _styledcomponents.default.textarea.withConfig({
|
|
363
315
|
}, _TextAreatokens.tokens.inputPaddingLeft, _TextAreatokens.tokens.inputFontFamily, _TextAreatokens.tokens.inputFontSize, _TextAreatokens.tokens.inputFontStyle, _TextAreatokens.tokens.inputFontWeight, _TextAreatokens.tokens.inputLetterSpacing, _TextAreatokens.tokens.inputLineHeight);
|
364
316
|
var StyledHelpers = _styledcomponents.default.div.withConfig({
|
365
317
|
displayName: "TextArea.styles__StyledHelpers",
|
366
|
-
componentId: "sc-
|
318
|
+
componentId: "sc-2ff414ff-14"
|
367
319
|
})([
|
368
320
|
"box-sizing:border-box;display:flex;justify-content:space-between;transition:background-color 0.1s ease-in-out;background-color:var(",
|
369
321
|
");padding-top:var(",
|
@@ -376,14 +328,14 @@ var StyledHelpers = _styledcomponents.default.div.withConfig({
|
|
376
328
|
], _TextAreatokens.tokens.helpersBackgroundColor, _TextAreatokens.tokens.helpersPaddingTop, _TextAreatokens.tokens.helpersPaddingRight, _TextAreatokens.tokens.helpersPaddingBottom, _TextAreatokens.tokens.helpersPaddingLeft, _TextAreatokens.tokens.borderRadius, _TextAreatokens.tokens.borderRadius);
|
377
329
|
var StyledOutsideHelpersWrapper = _styledcomponents.default.div.withConfig({
|
378
330
|
displayName: "TextArea.styles__StyledOutsideHelpersWrapper",
|
379
|
-
componentId: "sc-
|
331
|
+
componentId: "sc-2ff414ff-15"
|
380
332
|
})([
|
381
333
|
"box-sizing:border-box;display:flex;justify-content:space-between;padding-top:var(",
|
382
334
|
");"
|
383
335
|
], _TextAreatokens.tokens.clearHelpersPaddingTop);
|
384
336
|
var StyledLeftHelper = _styledcomponents.default.span.withConfig({
|
385
337
|
displayName: "TextArea.styles__StyledLeftHelper",
|
386
|
-
componentId: "sc-
|
338
|
+
componentId: "sc-2ff414ff-16"
|
387
339
|
})([
|
388
340
|
"",
|
389
341
|
";display:block;font-family:var(",
|
@@ -397,14 +349,14 @@ var StyledLeftHelper = _styledcomponents.default.span.withConfig({
|
|
397
349
|
], (0, _mixins.applyEllipsis)(), _TextAreatokens.tokens.helpersFontFamily, _TextAreatokens.tokens.helpersFontSize, _TextAreatokens.tokens.helpersFontStyle, _TextAreatokens.tokens.helpersFontWeight, _TextAreatokens.tokens.helpersLetterSpacing, _TextAreatokens.tokens.helpersLineHeight, _TextAreatokens.tokens.leftHelperColor);
|
398
350
|
var StyledRightHelper = (0, _styledcomponents.default)(StyledLeftHelper).withConfig({
|
399
351
|
displayName: "TextArea.styles__StyledRightHelper",
|
400
|
-
componentId: "sc-
|
352
|
+
componentId: "sc-2ff414ff-17"
|
401
353
|
})([
|
402
354
|
"color:var(",
|
403
355
|
");margin-left:auto;"
|
404
356
|
], _TextAreatokens.tokens.rightHelperColor);
|
405
357
|
var StyledPlaceholder = _styledcomponents.default.label.withConfig({
|
406
358
|
displayName: "TextArea.styles__StyledPlaceholder",
|
407
|
-
componentId: "sc-
|
359
|
+
componentId: "sc-2ff414ff-18"
|
408
360
|
})([
|
409
361
|
"box-sizing:border-box;position:absolute;pointer-events:none;display:inline-flex;align-items:center;transition:all 0.1s ease-in-out;transform-origin:top left;color:var(",
|
410
362
|
");width:100%;height:auto;top:var(",
|
@@ -423,7 +375,7 @@ var StyledPlaceholder = _styledcomponents.default.label.withConfig({
|
|
423
375
|
}, _TextAreatokens.tokens.inputFontFamily, _TextAreatokens.tokens.inputFontSize, _TextAreatokens.tokens.inputFontStyle, _TextAreatokens.tokens.inputFontWeight, _TextAreatokens.tokens.inputLetterSpacing, _TextAreatokens.tokens.inputLineHeight);
|
424
376
|
var StyledIndicator = _styledcomponents.default.div.withConfig({
|
425
377
|
displayName: "TextArea.styles__StyledIndicator",
|
426
|
-
componentId: "sc-
|
378
|
+
componentId: "sc-2ff414ff-19"
|
427
379
|
})([
|
428
380
|
"position:absolute;border-radius:50%;background-color:var(",
|
429
381
|
");&.",
|
@@ -32,9 +32,7 @@ var classes = {
|
|
32
32
|
hasHint: 'textarea-has-hint',
|
33
33
|
hasRightContent: 'textarea-has-right-content',
|
34
34
|
hasDivider: 'textarea-has-divider',
|
35
|
-
requiredAlignRight: 'required-align-right'
|
36
|
-
hasHeaderSlot: 'textarea-has-header-slot',
|
37
|
-
styledContentWrapper: 'textarea-content-wrapper'
|
35
|
+
requiredAlignRight: 'required-align-right'
|
38
36
|
};
|
39
37
|
var tokens = {
|
40
38
|
/** Цвет фона для всего компонента */ backgroundColor: '--plasma-textarea-background-color',
|
@@ -9,5 +9,5 @@ Object.defineProperty(exports, "applyDynamicLabel", {
|
|
9
9
|
}
|
10
10
|
});
|
11
11
|
var _TextAreatokens = require("../TextArea.tokens");
|
12
|
-
var innerPlaceholderUp = _TextAreatokens.classes.innerPlaceholderUp, hidePlaceHolder = _TextAreatokens.classes.hidePlaceHolder, focusedOuterPlaceholderColor = _TextAreatokens.classes.focusedOuterPlaceholderColor, styledTextArea = _TextAreatokens.classes.styledTextArea, styledTextAreaWrapper = _TextAreatokens.classes.styledTextAreaWrapper, styledPlaceholder = _TextAreatokens.classes.styledPlaceholder
|
13
|
-
var applyDynamicLabel = "\n .".concat(innerPlaceholderUp, " {\n .").concat(styledTextArea, " {\n height: calc(var(--plasma_private-textarea-input-actual-height) - var(").concat(_TextAreatokens.tokens.labelInnerTop, ") - var(").concat(_TextAreatokens.tokens.labelInnerTopHelper, ", 0px));\n }\n\n .").concat(styledTextAreaWrapper, " {\n padding-top: calc(calc(var(").concat(_TextAreatokens.tokens.labelInnerTop, ") + var(").concat(_TextAreatokens.tokens.labelInnerFontSize, ")) + var(").concat(_TextAreatokens.tokens.labelInnerMarginBottom, "));\n }\n
|
12
|
+
var innerPlaceholderUp = _TextAreatokens.classes.innerPlaceholderUp, hidePlaceHolder = _TextAreatokens.classes.hidePlaceHolder, focusedOuterPlaceholderColor = _TextAreatokens.classes.focusedOuterPlaceholderColor, styledTextArea = _TextAreatokens.classes.styledTextArea, styledTextAreaWrapper = _TextAreatokens.classes.styledTextAreaWrapper, styledPlaceholder = _TextAreatokens.classes.styledPlaceholder;
|
13
|
+
var applyDynamicLabel = "\n .".concat(innerPlaceholderUp, " {\n .").concat(styledTextArea, " {\n height: calc(var(--plasma_private-textarea-input-actual-height) - var(").concat(_TextAreatokens.tokens.labelInnerTop, ") - var(").concat(_TextAreatokens.tokens.labelInnerTopHelper, ", 0px));\n }\n\n .").concat(styledTextAreaWrapper, " {\n padding-top: calc(calc(var(").concat(_TextAreatokens.tokens.labelInnerTop, ") + var(").concat(_TextAreatokens.tokens.labelInnerFontSize, ")) + var(").concat(_TextAreatokens.tokens.labelInnerMarginBottom, "));\n }\n\n .").concat(styledPlaceholder, " {\n font-family: var(").concat(_TextAreatokens.tokens.labelInnerFontFamily, ");\n font-size: var(").concat(_TextAreatokens.tokens.labelInnerFontSize, ");\n font-style: var(").concat(_TextAreatokens.tokens.labelInnerFontStyle, ");\n font-weight: var(").concat(_TextAreatokens.tokens.labelInnerFontWeight, ");\n letter-spacing: var(").concat(_TextAreatokens.tokens.labelInnerLetterSpacing, ");\n line-height: var(").concat(_TextAreatokens.tokens.labelInnerLineHeight, ");\n top: var(").concat(_TextAreatokens.tokens.labelInnerTop, ");\n }\n }\n\n .").concat(hidePlaceHolder, " .").concat(styledPlaceholder, " {\n display: none;\n }\n\n .").concat(focusedOuterPlaceholderColor, " .").concat(styledPlaceholder, " {\n color: var(").concat(_TextAreatokens.tokens.placeholderColorFocus, ");\n }\n");
|
@@ -123,9 +123,6 @@ _export(exports, {
|
|
123
123
|
get IconResetOutline () {
|
124
124
|
return _IconResetOutline.IconResetOutline;
|
125
125
|
},
|
126
|
-
get IconResizeDiagonal () {
|
127
|
-
return _IconResizeDiagonal.IconResizeDiagonal;
|
128
|
-
},
|
129
126
|
get IconSaluteOutline16 () {
|
130
127
|
return _IconSaluteOutline.IconSaluteOutline16;
|
131
128
|
},
|
@@ -213,4 +210,3 @@ var _IconEditOutline = require("./Icons/IconEditOutline");
|
|
213
210
|
var _IconResetOutline = require("./Icons/IconResetOutline");
|
214
211
|
var _IconDoneCircleOutline = require("./Icons/IconDoneCircleOutline");
|
215
212
|
var _IconTrash = require("./Icons/IconTrash");
|
216
|
-
var _IconResizeDiagonal = require("./Icons/IconResizeDiagonal");
|
@@ -70,7 +70,7 @@ import { useDrawer } from "./hooks";
|
|
70
70
|
// issue #823
|
71
71
|
export var drawerRoot = function(Root) {
|
72
72
|
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,
|
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, rest = _object_without_properties(_param, [
|
74
74
|
"id",
|
75
75
|
"zIndex",
|
76
76
|
"popupInfo",
|
@@ -96,8 +96,7 @@ export var drawerRoot = function(Root) {
|
|
96
96
|
"placement",
|
97
97
|
"closeOnEsc",
|
98
98
|
"closeOnOverlayClick",
|
99
|
-
"asModal"
|
100
|
-
"draggable"
|
99
|
+
"asModal"
|
101
100
|
]);
|
102
101
|
var innerIsOpen = Boolean(isOpen || opened);
|
103
102
|
var trapRef = useFocusTrap(true, initialFocusRef, focusAfterRef);
|
@@ -66,7 +66,7 @@ import { classes, tokens } from "./Modal.tokens";
|
|
66
66
|
import { useModal } from "./hooks";
|
67
67
|
import { base as viewCSS } from "./variations/_view/base";
|
68
68
|
import { getIdLastModal } from "./ModalContext";
|
69
|
-
import { CloseButton, ModalBody, ModalContent
|
69
|
+
import { CloseButton, ModalBody, ModalContent } from "./Modal.styles";
|
70
70
|
// issue #823
|
71
71
|
var Popup = component(popupConfig);
|
72
72
|
/**
|
@@ -74,7 +74,7 @@ var Popup = component(popupConfig);
|
|
74
74
|
* Управляет показом/скрытием, подложкой и анимацией визуальной части модального окна.
|
75
75
|
*/ export var modalRoot = function(Root) {
|
76
76
|
return /*#__PURE__*/ forwardRef(function(_param, outerRootRef) {
|
77
|
-
var id = _param.id, withAnimation = _param.withAnimation, onClose = _param.onClose, onOverlayClick = _param.onOverlayClick, onEscKeyDown = _param.onEscKeyDown, _param_closeOnEsc = _param.closeOnEsc, closeOnEsc = _param_closeOnEsc === void 0 ? true : _param_closeOnEsc, _param_closeOnOverlayClick = _param.closeOnOverlayClick, closeOnOverlayClick = _param_closeOnOverlayClick === void 0 ? true : _param_closeOnOverlayClick, withBlur = _param.withBlur, initialFocusRef = _param.initialFocusRef, focusAfterRef = _param.focusAfterRef, zIndex = _param.zIndex, popupInfo = _param.popupInfo, children = _param.children, view = _param.view, opened = _param.opened, isOpen = _param.isOpen, hasBody = _param.hasBody, hasClose = _param.hasClose,
|
77
|
+
var id = _param.id, withAnimation = _param.withAnimation, onClose = _param.onClose, onOverlayClick = _param.onOverlayClick, onEscKeyDown = _param.onEscKeyDown, _param_closeOnEsc = _param.closeOnEsc, closeOnEsc = _param_closeOnEsc === void 0 ? true : _param_closeOnEsc, _param_closeOnOverlayClick = _param.closeOnOverlayClick, closeOnOverlayClick = _param_closeOnOverlayClick === void 0 ? true : _param_closeOnOverlayClick, withBlur = _param.withBlur, initialFocusRef = _param.initialFocusRef, focusAfterRef = _param.focusAfterRef, zIndex = _param.zIndex, popupInfo = _param.popupInfo, children = _param.children, view = _param.view, opened = _param.opened, isOpen = _param.isOpen, hasBody = _param.hasBody, hasClose = _param.hasClose, rest = _object_without_properties(_param, [
|
78
78
|
"id",
|
79
79
|
"withAnimation",
|
80
80
|
"onClose",
|
@@ -92,9 +92,7 @@ var Popup = component(popupConfig);
|
|
92
92
|
"opened",
|
93
93
|
"isOpen",
|
94
94
|
"hasBody",
|
95
|
-
"hasClose"
|
96
|
-
"resizable",
|
97
|
-
"draggable"
|
95
|
+
"hasClose"
|
98
96
|
]);
|
99
97
|
var innerIsOpen = Boolean(isOpen || opened);
|
100
98
|
var innerHasClose = hasClose === undefined && hasBody || hasClose;
|
@@ -149,9 +147,7 @@ var Popup = component(popupConfig);
|
|
149
147
|
zIndex: zIndex,
|
150
148
|
overlay: hasBody ? overlayNode : /*#__PURE__*/ React.createElement(Root, {
|
151
149
|
view: view
|
152
|
-
}, overlayNode)
|
153
|
-
draggable: draggable,
|
154
|
-
resizable: resizable
|
150
|
+
}, overlayNode)
|
155
151
|
}, rest), hasBody ? /*#__PURE__*/ React.createElement(Root, {
|
156
152
|
view: view
|
157
153
|
}, /*#__PURE__*/ React.createElement(ModalBody, null, /*#__PURE__*/ React.createElement(ModalContent, null, innerHasClose && /*#__PURE__*/ React.createElement(CloseButton, {
|
@@ -167,7 +163,7 @@ export var modalConfig = {
|
|
167
163
|
name: 'Modal',
|
168
164
|
tag: 'div',
|
169
165
|
layout: modalRoot,
|
170
|
-
base:
|
166
|
+
base: '',
|
171
167
|
variations: {
|
172
168
|
view: {
|
173
169
|
css: viewCSS
|
@@ -1,29 +1,25 @@
|
|
1
1
|
import styled from "styled-components";
|
2
|
-
import { css } from "styled-components";
|
3
2
|
import { addFocus } from "../../mixins";
|
4
3
|
import { tokens } from "./Modal.tokens";
|
5
|
-
export var base = css([
|
6
|
-
"height:100%;"
|
7
|
-
]);
|
8
4
|
export var ModalBody = styled.div.withConfig({
|
9
5
|
displayName: "Modal.styles__ModalBody",
|
10
|
-
componentId: "sc-
|
6
|
+
componentId: "sc-65f5e73a-0"
|
11
7
|
})([
|
12
|
-
"
|
8
|
+
"border-radius:var(",
|
13
9
|
");padding:var(",
|
14
10
|
");background:var(",
|
15
11
|
");box-shadow:var(--shadow-down-soft-l);"
|
16
12
|
], tokens.modalBodyBorderRadius, tokens.modalBodyPadding, tokens.modalBodyBackground);
|
17
13
|
export var ModalContent = styled.div.withConfig({
|
18
14
|
displayName: "Modal.styles__ModalContent",
|
19
|
-
componentId: "sc-
|
15
|
+
componentId: "sc-65f5e73a-1"
|
20
16
|
})([
|
21
17
|
"position:relative;padding:var(",
|
22
18
|
");"
|
23
19
|
], tokens.modalContentPadding);
|
24
20
|
export var CloseButton = styled.button.withConfig({
|
25
21
|
displayName: "Modal.styles__CloseButton",
|
26
|
-
componentId: "sc-
|
22
|
+
componentId: "sc-65f5e73a-2"
|
27
23
|
})([
|
28
24
|
"top:0;right:0;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(",
|
29
25
|
");padding:0;margin:0;outline:none;cursor:pointer;background:transparent;",
|
@@ -101,15 +101,12 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
101
101
|
}
|
102
102
|
import React, { forwardRef, useRef } from "react";
|
103
103
|
import { useForkRef } from "@salutejs/plasma-core";
|
104
|
-
import Draggable from "react-draggable";
|
105
|
-
import { Resizable } from "re-resizable";
|
106
104
|
import { canUseDOM, cx, safeUseId } from "../../utils";
|
107
105
|
import { Portal } from "../Portal";
|
108
|
-
import { getRatioBasedOnPlacement, getResizeDirections, getHandleStyles } from "./utils";
|
109
106
|
import { PopupRoot } from "./PopupRoot";
|
110
107
|
import { usePopup } from "./hooks";
|
111
108
|
import { classes } from "./Popup.tokens";
|
112
|
-
import { StyledPortalContainer
|
109
|
+
import { StyledPortalContainer } from "./Popup.styles";
|
113
110
|
export var handlePosition = function(placement, offset) {
|
114
111
|
var x = '0rem';
|
115
112
|
var y = '0rem';
|
@@ -173,7 +170,7 @@ export var handlePosition = function(placement, offset) {
|
|
173
170
|
0,
|
174
171
|
0
|
175
172
|
] : _param_offset, _param_frame = _param.frame, frame = _param_frame === void 0 ? 'document' : _param_frame, children = _param.children, overlay = _param.overlay, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
176
|
-
role = _param.role, zIndex = _param.zIndex, popupInfo = _param.popupInfo, _param_withAnimation = _param.withAnimation, withAnimation = _param_withAnimation === void 0 ? false : _param_withAnimation, className = _param.className,
|
173
|
+
role = _param.role, zIndex = _param.zIndex, popupInfo = _param.popupInfo, _param_withAnimation = _param.withAnimation, withAnimation = _param_withAnimation === void 0 ? false : _param_withAnimation, className = _param.className, rest = _object_without_properties(_param, [
|
177
174
|
"id",
|
178
175
|
"isOpen",
|
179
176
|
"opened",
|
@@ -186,15 +183,9 @@ export var handlePosition = function(placement, offset) {
|
|
186
183
|
"zIndex",
|
187
184
|
"popupInfo",
|
188
185
|
"withAnimation",
|
189
|
-
"className"
|
190
|
-
"draggable",
|
191
|
-
"resizable"
|
186
|
+
"className"
|
192
187
|
]);
|
193
|
-
var _resizable_hiddenIcons, _resizable_hiddenIcons1, _resizable_hiddenIcons2, _resizable_hiddenIcons3;
|
194
188
|
var innerIsOpen = isOpen || opened;
|
195
|
-
var resizable = typeof outerResizable === 'boolean' ? {
|
196
|
-
disabled: !outerResizable
|
197
|
-
} : outerResizable;
|
198
189
|
var uniqId = safeUseId();
|
199
190
|
var innerId = id || uniqId;
|
200
191
|
var _usePopup = usePopup({
|
@@ -205,7 +196,6 @@ export var handlePosition = function(placement, offset) {
|
|
205
196
|
}), isVisible = _usePopup.isVisible, animationInfo = _usePopup.animationInfo, setVisible = _usePopup.setVisible, rootId = _usePopup.rootId;
|
206
197
|
var portalRef = useRef(null);
|
207
198
|
var contentRef = useRef(null);
|
208
|
-
var resizableContainer = useRef(null);
|
209
199
|
var innerRef = useForkRef(contentRef, outerRootRef);
|
210
200
|
if (!isVisible && !innerIsOpen) {
|
211
201
|
return null;
|
@@ -221,56 +211,7 @@ export var handlePosition = function(placement, offset) {
|
|
221
211
|
frame: frame,
|
222
212
|
animationInfo: animationInfo,
|
223
213
|
setVisible: setVisible
|
224
|
-
}, rest),
|
225
|
-
defaultClassName: draggable ? classes.draggablePopupWrapper : undefined,
|
226
|
-
defaultClassNameDragging: draggable ? classes.draggingPopupWrapper : undefined,
|
227
|
-
disabled: !draggable,
|
228
|
-
cancel: ".".concat(classes.resizableHandleWrapper)
|
229
|
-
}, /*#__PURE__*/ React.createElement(Resizable, {
|
230
|
-
ref: resizableContainer,
|
231
|
-
enable: resizable && !resizable.disabled ? getResizeDirections(resizable.directions) : false,
|
232
|
-
resizeRatio: getRatioBasedOnPlacement(placement),
|
233
|
-
defaultSize: resizable === null || resizable === void 0 ? void 0 : resizable.defaultSize,
|
234
|
-
minWidth: resizable === null || resizable === void 0 ? void 0 : resizable.minWidth,
|
235
|
-
minHeight: resizable === null || resizable === void 0 ? void 0 : resizable.minHeight,
|
236
|
-
maxWidth: resizable === null || resizable === void 0 ? void 0 : resizable.maxWidth,
|
237
|
-
maxHeight: resizable === null || resizable === void 0 ? void 0 : resizable.maxHeight,
|
238
|
-
onResizeStart: function() {
|
239
|
-
if ((resizableContainer === null || resizableContainer === void 0 ? void 0 : resizableContainer.current) && resizableContainer.current.resizable) {
|
240
|
-
resizableContainer.current.resizable.classList.toggle(classes.resizableContainerNoSelect);
|
241
|
-
}
|
242
|
-
},
|
243
|
-
onResizeStop: function() {
|
244
|
-
if ((resizableContainer === null || resizableContainer === void 0 ? void 0 : resizableContainer.current) && resizableContainer.current.resizable) {
|
245
|
-
resizableContainer.current.resizable.classList.toggle(classes.resizableContainerNoSelect);
|
246
|
-
}
|
247
|
-
},
|
248
|
-
handleComponent: {
|
249
|
-
topRight: (resizable === null || resizable === void 0 ? void 0 : (_resizable_hiddenIcons = resizable.hiddenIcons) === null || _resizable_hiddenIcons === void 0 ? void 0 : _resizable_hiddenIcons.includes('top-right')) ? undefined : /*#__PURE__*/ React.createElement(IconResizeDiagonalStyled, {
|
250
|
-
className: classes.resizableTopRightIcon,
|
251
|
-
color: "inherit",
|
252
|
-
size: resizable === null || resizable === void 0 ? void 0 : resizable.iconSize
|
253
|
-
}),
|
254
|
-
bottomRight: (resizable === null || resizable === void 0 ? void 0 : (_resizable_hiddenIcons1 = resizable.hiddenIcons) === null || _resizable_hiddenIcons1 === void 0 ? void 0 : _resizable_hiddenIcons1.includes('bottom-right')) ? undefined : /*#__PURE__*/ React.createElement(IconResizeDiagonalStyled, {
|
255
|
-
className: classes.resizableBottomRightIcon,
|
256
|
-
color: "inherit",
|
257
|
-
size: resizable === null || resizable === void 0 ? void 0 : resizable.iconSize
|
258
|
-
}),
|
259
|
-
bottomLeft: (resizable === null || resizable === void 0 ? void 0 : (_resizable_hiddenIcons2 = resizable.hiddenIcons) === null || _resizable_hiddenIcons2 === void 0 ? void 0 : _resizable_hiddenIcons2.includes('bottom-left')) ? undefined : /*#__PURE__*/ React.createElement(IconResizeDiagonalStyled, {
|
260
|
-
className: classes.resizableBottomLeftIcon,
|
261
|
-
color: "inherit",
|
262
|
-
size: resizable === null || resizable === void 0 ? void 0 : resizable.iconSize
|
263
|
-
}),
|
264
|
-
topLeft: (resizable === null || resizable === void 0 ? void 0 : (_resizable_hiddenIcons3 = resizable.hiddenIcons) === null || _resizable_hiddenIcons3 === void 0 ? void 0 : _resizable_hiddenIcons3.includes('top-left')) ? undefined : /*#__PURE__*/ React.createElement(IconResizeDiagonalStyled, {
|
265
|
-
className: classes.resizableTopLeftIcon,
|
266
|
-
color: "inherit",
|
267
|
-
size: resizable === null || resizable === void 0 ? void 0 : resizable.iconSize
|
268
|
-
})
|
269
|
-
},
|
270
|
-
className: classes.resizableContainer,
|
271
|
-
handleStyles: getHandleStyles(resizable === null || resizable === void 0 ? void 0 : resizable.iconSize),
|
272
|
-
handleWrapperClass: classes.resizableHandleWrapper
|
273
|
-
}, children))));
|
214
|
+
}, rest), children));
|
274
215
|
if (typeof frame !== 'string' && frame && frame.current && canUseDOM) {
|
275
216
|
return /*#__PURE__*/ React.createElement(Portal, {
|
276
217
|
container: frame.current
|
@@ -297,7 +238,7 @@ export var popupConfig = {
|
|
297
238
|
name: 'Popup',
|
298
239
|
tag: 'div',
|
299
240
|
layout: popupRoot,
|
300
|
-
base:
|
241
|
+
base: '',
|
301
242
|
variations: {},
|
302
243
|
defaults: {}
|
303
244
|
};
|
@@ -1,35 +1,26 @@
|
|
1
1
|
import styled from "styled-components";
|
2
|
-
import { css } from "styled-components";
|
3
|
-
import { IconResizeDiagonal } from "../_Icon";
|
4
|
-
import { classes } from "./Popup.tokens";
|
5
2
|
import { DEFAULT_Z_INDEX } from "./utils";
|
6
|
-
export var base = css([
|
7
|
-
".",
|
8
|
-
"{cursor:grab;}.",
|
9
|
-
"{cursor:grabbing;}.",
|
10
|
-
"{user-select:none;-webkit-user-select:none;}"
|
11
|
-
], classes.draggablePopupWrapper, classes.draggingPopupWrapper, classes.resizableContainerNoSelect);
|
12
3
|
export var StyledPortal = styled.div.withConfig({
|
13
4
|
displayName: "Popup.styles__StyledPortal",
|
14
|
-
componentId: "sc-
|
5
|
+
componentId: "sc-9d33eb36-0"
|
15
6
|
})([
|
16
7
|
""
|
17
8
|
]);
|
18
9
|
export var StyledPortalContainer = styled.div.withConfig({
|
19
10
|
displayName: "Popup.styles__StyledPortalContainer",
|
20
|
-
componentId: "sc-
|
11
|
+
componentId: "sc-9d33eb36-1"
|
21
12
|
})([
|
22
13
|
"width:0;"
|
23
14
|
]);
|
24
15
|
export var PopupView = styled.div.withConfig({
|
25
16
|
displayName: "Popup.styles__PopupView",
|
26
|
-
componentId: "sc-
|
17
|
+
componentId: "sc-9d33eb36-2"
|
27
18
|
})([
|
28
19
|
"position:relative;max-width:100%;pointer-events:all;"
|
29
20
|
]);
|
30
21
|
export var PopupRootContainer = styled.div.withConfig({
|
31
22
|
displayName: "Popup.styles__PopupRootContainer",
|
32
|
-
componentId: "sc-
|
23
|
+
componentId: "sc-9d33eb36-3"
|
33
24
|
})([
|
34
25
|
"position:",
|
35
26
|
";z-index:",
|
@@ -61,13 +52,3 @@ export var PopupRootContainer = styled.div.withConfig({
|
|
61
52
|
var position = param.position;
|
62
53
|
return position.transform || '';
|
63
54
|
});
|
64
|
-
export var IconResizeDiagonalStyled = styled(IconResizeDiagonal).withConfig({
|
65
|
-
displayName: "Popup.styles__IconResizeDiagonalStyled",
|
66
|
-
componentId: "sc-e8036c4-4"
|
67
|
-
})([
|
68
|
-
"color:var(--text-secondary);&:hover{color:var(--text-secondary-hover);}&:active{color:var(--text-secondary-active);}&.",
|
69
|
-
"{transform:rotate(-90deg);}&.",
|
70
|
-
"{transform:rotate(0);}&.",
|
71
|
-
"{transform:rotate(90deg);}&.",
|
72
|
-
"{transform:rotate(180deg);}"
|
73
|
-
], classes.resizableTopRightIcon, classes.resizableBottomRightIcon, classes.resizableBottomLeftIcon, classes.resizableTopLeftIcon);
|
@@ -3,14 +3,5 @@ export var classes = {
|
|
3
3
|
* Класс корневого компонента PopupRoot: `popup-base-root`
|
4
4
|
*/ root: 'popup-base-root',
|
5
5
|
endAnimation: 'popup-end-animation',
|
6
|
-
endTransition: 'popup-end-transition'
|
7
|
-
resizableContainer: 'resizable-container',
|
8
|
-
resizableTopRightIcon: 'resizable-top-right-icon',
|
9
|
-
resizableBottomRightIcon: 'resizable-bottom-right-icon',
|
10
|
-
resizableBottomLeftIcon: 'resizable-bottom-left-icon',
|
11
|
-
resizableTopLeftIcon: 'resizable-top-left-icon',
|
12
|
-
resizableHandleWrapper: 'resizable-handle-wrapper',
|
13
|
-
resizableContainerNoSelect: 'resizable-container-no-select',
|
14
|
-
draggablePopupWrapper: 'draggable-popup-wrapper',
|
15
|
-
draggingPopupWrapper: 'dragging-popup-wrapper'
|
6
|
+
endTransition: 'popup-end-transition'
|
16
7
|
};
|