@cloud-ru/ds-uikit-product-widget 1.0.19-preview-d90ac2be.0 → 1.0.19
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/CHANGELOG.md +8 -0
- package/dist/cjs/components/Widget/Widget.js +4 -2
- package/dist/cjs/components/Widget/styles.module.css +87 -64
- package/dist/cjs/helperComponents/Actions/Actions.js +1 -1
- package/dist/cjs/helperComponents/Actions/styles.module.css +10 -29
- package/dist/cjs/helperComponents/Content/Content.js +1 -1
- package/dist/cjs/helperComponents/Content/styles.module.css +4 -0
- package/dist/cjs/helperComponents/ControlBlock/ControlBlock.js +3 -2
- package/dist/cjs/helperComponents/ControlBlock/styles.module.css +4 -0
- package/dist/cjs/style.css +102 -90
- package/dist/esm/components/Widget/Widget.js +4 -2
- package/dist/esm/components/Widget/styles.module.css +87 -64
- package/dist/esm/helperComponents/Actions/Actions.js +2 -2
- package/dist/esm/helperComponents/Actions/styles.module.css +10 -29
- package/dist/esm/helperComponents/Content/Content.js +1 -1
- package/dist/esm/helperComponents/Content/styles.module.css +4 -0
- package/dist/esm/helperComponents/ControlBlock/ControlBlock.js +3 -2
- package/dist/esm/helperComponents/ControlBlock/styles.module.css +4 -0
- package/dist/esm/style.css +102 -90
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/src/components/Widget/Widget.tsx +9 -8
- package/src/components/Widget/styles.module.scss +34 -7
- package/src/helperComponents/Actions/Actions.tsx +2 -13
- package/src/helperComponents/Actions/styles.module.scss +13 -34
- package/src/helperComponents/Content/Content.tsx +1 -1
- package/src/helperComponents/Content/styles.module.scss +5 -0
- package/src/helperComponents/ControlBlock/ControlBlock.tsx +3 -2
- package/src/helperComponents/ControlBlock/styles.module.scss +5 -0
package/dist/cjs/style.css
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
+
.acrylic{
|
|
3
|
+
pointer-events:none;
|
|
4
|
+
position:absolute;
|
|
5
|
+
z-index:-1;
|
|
6
|
+
inset:0;
|
|
7
|
+
border-radius:inherit;
|
|
8
|
+
}
|
|
9
|
+
|
|
2
10
|
.widget{
|
|
11
|
+
isolation:isolate;
|
|
3
12
|
position:relative;
|
|
4
13
|
display:flex;
|
|
5
14
|
flex-direction:column;
|
|
@@ -7,209 +16,208 @@
|
|
|
7
16
|
box-sizing:border-box;
|
|
8
17
|
width:100%;
|
|
9
18
|
min-width:0;
|
|
10
|
-
padding:var(--sn-primitive-dimension-
|
|
19
|
+
padding:var(--sn-density-spacing-interval-m, var(--sn-platform-comfort-spacing-interval-m, var(--sn-primitive-dimension-24, 24px)));
|
|
11
20
|
border-radius:var(--sn-card-anatomy-radius-l-container-borderRadius, var(--sn-brand-anatomy-radius-card-l, var(--sn-primitive-dimension-4, 4px)));
|
|
12
21
|
color:var(--sn-theme-color-available-version-textMain, var(--sn-brand-color-text-version-main, #41424e));
|
|
13
|
-
background:var(--sn-theme-color-neutral-background1Level, var(--sn-brand-color-neutral-95, var(--sn-primitive-color-gray-95, #fdfdfd)));
|
|
14
22
|
}
|
|
15
23
|
.widget[data-acrylic-appearance=primary][data-acrylic-level=default]{
|
|
16
|
-
backdrop-filter:
|
|
24
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter, none);
|
|
17
25
|
}
|
|
18
26
|
.widget[data-acrylic-appearance=primary][data-acrylic-level=default] .acrylic{
|
|
19
27
|
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
20
|
-
background:var(--sn-theme-color-primary-background, var(--sn-brand-color-primary-90,
|
|
28
|
+
background:var(--sn-theme-color-primary-background, var(--sn-brand-color-primary-90, #edf7f1));
|
|
21
29
|
}
|
|
22
30
|
.widget[data-acrylic-appearance=primary][data-acrylic-level="1Level"]{
|
|
23
|
-
backdrop-filter:
|
|
31
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter1Level, none);
|
|
24
32
|
}
|
|
25
33
|
.widget[data-acrylic-appearance=primary][data-acrylic-level="1Level"] .acrylic{
|
|
26
34
|
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
27
|
-
background:var(--sn-theme-color-primary-background1Level, var(--sn-brand-color-primary-95,
|
|
35
|
+
background:var(--sn-theme-color-primary-background1Level, var(--sn-brand-color-primary-95, #f5fdf8));
|
|
28
36
|
}
|
|
29
37
|
.widget[data-acrylic-appearance=primary][data-acrylic-level="2Level"]{
|
|
30
|
-
backdrop-filter:
|
|
38
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter2Level, none);
|
|
31
39
|
}
|
|
32
40
|
.widget[data-acrylic-appearance=primary][data-acrylic-level="2Level"] .acrylic{
|
|
33
41
|
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
34
|
-
background:var(--sn-theme-color-primary-background2Level, var(--sn-brand-color-primary-99,
|
|
42
|
+
background:var(--sn-theme-color-primary-background2Level, var(--sn-brand-color-primary-99, #fbfffc));
|
|
35
43
|
}
|
|
36
44
|
.widget[data-acrylic-appearance=neutral][data-acrylic-level=default]{
|
|
37
|
-
backdrop-filter:
|
|
45
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter, none);
|
|
38
46
|
}
|
|
39
47
|
.widget[data-acrylic-appearance=neutral][data-acrylic-level=default] .acrylic{
|
|
40
48
|
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
41
|
-
background:var(--sn-theme-color-neutral-background, var(--sn-brand-color-neutral-90, var(--sn-
|
|
49
|
+
background:var(--sn-theme-color-neutral-background, var(--sn-brand-color-neutral-90, var(--sn-brand-palette-gray-90, #eeeff3)));
|
|
42
50
|
}
|
|
43
51
|
.widget[data-acrylic-appearance=neutral][data-acrylic-level="1Level"]{
|
|
44
|
-
backdrop-filter:
|
|
52
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter1Level, none);
|
|
45
53
|
}
|
|
46
54
|
.widget[data-acrylic-appearance=neutral][data-acrylic-level="1Level"] .acrylic{
|
|
47
55
|
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
48
|
-
background:var(--sn-theme-color-neutral-background1Level, var(--sn-brand-color-neutral-95, var(--sn-
|
|
56
|
+
background:var(--sn-theme-color-neutral-background1Level, var(--sn-brand-color-neutral-95, var(--sn-brand-palette-gray-95, #fdfdfd)));
|
|
49
57
|
}
|
|
50
58
|
.widget[data-acrylic-appearance=neutral][data-acrylic-level="2Level"]{
|
|
51
|
-
backdrop-filter:
|
|
59
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter2Level, none);
|
|
52
60
|
}
|
|
53
61
|
.widget[data-acrylic-appearance=neutral][data-acrylic-level="2Level"] .acrylic{
|
|
54
62
|
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
55
|
-
background:var(--sn-theme-color-neutral-background2Level, var(--sn-brand-color-neutral-99, var(--sn-
|
|
63
|
+
background:var(--sn-theme-color-neutral-background2Level, var(--sn-brand-color-neutral-99, var(--sn-brand-palette-gray-99, #ffffff)));
|
|
56
64
|
}
|
|
57
65
|
.widget[data-acrylic-appearance=red][data-acrylic-level=default]{
|
|
58
|
-
backdrop-filter:
|
|
66
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter, none);
|
|
59
67
|
}
|
|
60
68
|
.widget[data-acrylic-appearance=red][data-acrylic-level=default] .acrylic{
|
|
61
69
|
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
62
|
-
background:var(--sn-theme-color-red-background, var(--sn-
|
|
70
|
+
background:var(--sn-theme-color-red-background, var(--sn-brand-palette-red-90, #fee8e5));
|
|
63
71
|
}
|
|
64
72
|
.widget[data-acrylic-appearance=red][data-acrylic-level="1Level"]{
|
|
65
|
-
backdrop-filter:
|
|
73
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter1Level, none);
|
|
66
74
|
}
|
|
67
75
|
.widget[data-acrylic-appearance=red][data-acrylic-level="1Level"] .acrylic{
|
|
68
76
|
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
69
|
-
background:var(--sn-theme-color-red-background1Level, var(--sn-
|
|
77
|
+
background:var(--sn-theme-color-red-background1Level, var(--sn-brand-palette-red-95, #fef5f1));
|
|
70
78
|
}
|
|
71
79
|
.widget[data-acrylic-appearance=red][data-acrylic-level="2Level"]{
|
|
72
|
-
backdrop-filter:
|
|
80
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter2Level, none);
|
|
73
81
|
}
|
|
74
82
|
.widget[data-acrylic-appearance=red][data-acrylic-level="2Level"] .acrylic{
|
|
75
83
|
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
76
|
-
background:var(--sn-theme-color-red-background2Level, var(--sn-
|
|
84
|
+
background:var(--sn-theme-color-red-background2Level, var(--sn-brand-palette-red-99, #fffaf7));
|
|
77
85
|
}
|
|
78
86
|
.widget[data-acrylic-appearance=orange][data-acrylic-level=default]{
|
|
79
|
-
backdrop-filter:
|
|
87
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter, none);
|
|
80
88
|
}
|
|
81
89
|
.widget[data-acrylic-appearance=orange][data-acrylic-level=default] .acrylic{
|
|
82
90
|
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
83
|
-
background:var(--sn-theme-color-orange-background, var(--sn-
|
|
91
|
+
background:var(--sn-theme-color-orange-background, var(--sn-brand-palette-orange-90, #ffedcf));
|
|
84
92
|
}
|
|
85
93
|
.widget[data-acrylic-appearance=orange][data-acrylic-level="1Level"]{
|
|
86
|
-
backdrop-filter:
|
|
94
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter1Level, none);
|
|
87
95
|
}
|
|
88
96
|
.widget[data-acrylic-appearance=orange][data-acrylic-level="1Level"] .acrylic{
|
|
89
97
|
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
90
|
-
background:var(--sn-theme-color-orange-background1Level, var(--sn-
|
|
98
|
+
background:var(--sn-theme-color-orange-background1Level, var(--sn-brand-palette-orange-95, #fff6e5));
|
|
91
99
|
}
|
|
92
100
|
.widget[data-acrylic-appearance=orange][data-acrylic-level="2Level"]{
|
|
93
|
-
backdrop-filter:
|
|
101
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter2Level, none);
|
|
94
102
|
}
|
|
95
103
|
.widget[data-acrylic-appearance=orange][data-acrylic-level="2Level"] .acrylic{
|
|
96
104
|
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
97
|
-
background:var(--sn-theme-color-orange-background2Level, var(--sn-
|
|
105
|
+
background:var(--sn-theme-color-orange-background2Level, var(--sn-brand-palette-orange-99, #fffcf4));
|
|
98
106
|
}
|
|
99
107
|
.widget[data-acrylic-appearance=yellow][data-acrylic-level=default]{
|
|
100
|
-
backdrop-filter:
|
|
108
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter, none);
|
|
101
109
|
}
|
|
102
110
|
.widget[data-acrylic-appearance=yellow][data-acrylic-level=default] .acrylic{
|
|
103
111
|
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
104
|
-
background:var(--sn-theme-color-yellow-background, var(--sn-
|
|
112
|
+
background:var(--sn-theme-color-yellow-background, var(--sn-brand-palette-yellow-90, #fdf4cc));
|
|
105
113
|
}
|
|
106
114
|
.widget[data-acrylic-appearance=yellow][data-acrylic-level="1Level"]{
|
|
107
|
-
backdrop-filter:
|
|
115
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter1Level, none);
|
|
108
116
|
}
|
|
109
117
|
.widget[data-acrylic-appearance=yellow][data-acrylic-level="1Level"] .acrylic{
|
|
110
118
|
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
111
|
-
background:var(--sn-theme-color-yellow-background1Level, var(--sn-
|
|
119
|
+
background:var(--sn-theme-color-yellow-background1Level, var(--sn-brand-palette-yellow-95, #fffbe6));
|
|
112
120
|
}
|
|
113
121
|
.widget[data-acrylic-appearance=yellow][data-acrylic-level="2Level"]{
|
|
114
|
-
backdrop-filter:
|
|
122
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter2Level, none);
|
|
115
123
|
}
|
|
116
124
|
.widget[data-acrylic-appearance=yellow][data-acrylic-level="2Level"] .acrylic{
|
|
117
125
|
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
118
|
-
background:var(--sn-theme-color-yellow-background2Level, var(--sn-
|
|
126
|
+
background:var(--sn-theme-color-yellow-background2Level, var(--sn-brand-palette-yellow-99, #fffef6));
|
|
119
127
|
}
|
|
120
128
|
.widget[data-acrylic-appearance=green][data-acrylic-level=default]{
|
|
121
|
-
backdrop-filter:
|
|
129
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter, none);
|
|
122
130
|
}
|
|
123
131
|
.widget[data-acrylic-appearance=green][data-acrylic-level=default] .acrylic{
|
|
124
132
|
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
125
|
-
background:var(--sn-theme-color-green-background, var(--sn-
|
|
133
|
+
background:var(--sn-theme-color-green-background, var(--sn-brand-palette-green-90, #e4f5df));
|
|
126
134
|
}
|
|
127
135
|
.widget[data-acrylic-appearance=green][data-acrylic-level="1Level"]{
|
|
128
|
-
backdrop-filter:
|
|
136
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter1Level, none);
|
|
129
137
|
}
|
|
130
138
|
.widget[data-acrylic-appearance=green][data-acrylic-level="1Level"] .acrylic{
|
|
131
139
|
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
132
|
-
background:var(--sn-theme-color-green-background1Level, var(--sn-
|
|
140
|
+
background:var(--sn-theme-color-green-background1Level, var(--sn-brand-palette-green-95, #f1faed));
|
|
133
141
|
}
|
|
134
142
|
.widget[data-acrylic-appearance=green][data-acrylic-level="2Level"]{
|
|
135
|
-
backdrop-filter:
|
|
143
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter2Level, none);
|
|
136
144
|
}
|
|
137
145
|
.widget[data-acrylic-appearance=green][data-acrylic-level="2Level"] .acrylic{
|
|
138
146
|
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
139
|
-
background:var(--sn-theme-color-green-background2Level, var(--sn-
|
|
147
|
+
background:var(--sn-theme-color-green-background2Level, var(--sn-brand-palette-green-99, #fcfefa));
|
|
140
148
|
}
|
|
141
149
|
.widget[data-acrylic-appearance=blue][data-acrylic-level=default]{
|
|
142
|
-
backdrop-filter:
|
|
150
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter, none);
|
|
143
151
|
}
|
|
144
152
|
.widget[data-acrylic-appearance=blue][data-acrylic-level=default] .acrylic{
|
|
145
153
|
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
146
|
-
background:var(--sn-theme-color-blue-background, var(--sn-
|
|
154
|
+
background:var(--sn-theme-color-blue-background, var(--sn-brand-palette-blue-90, #e6f4fd));
|
|
147
155
|
}
|
|
148
156
|
.widget[data-acrylic-appearance=blue][data-acrylic-level="1Level"]{
|
|
149
|
-
backdrop-filter:
|
|
157
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter1Level, none);
|
|
150
158
|
}
|
|
151
159
|
.widget[data-acrylic-appearance=blue][data-acrylic-level="1Level"] .acrylic{
|
|
152
160
|
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
153
|
-
background:var(--sn-theme-color-blue-background1Level, var(--sn-
|
|
161
|
+
background:var(--sn-theme-color-blue-background1Level, var(--sn-brand-palette-blue-95, #f2f9ff));
|
|
154
162
|
}
|
|
155
163
|
.widget[data-acrylic-appearance=blue][data-acrylic-level="2Level"]{
|
|
156
|
-
backdrop-filter:
|
|
164
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter2Level, none);
|
|
157
165
|
}
|
|
158
166
|
.widget[data-acrylic-appearance=blue][data-acrylic-level="2Level"] .acrylic{
|
|
159
167
|
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
160
|
-
background:var(--sn-theme-color-blue-background2Level, var(--sn-
|
|
168
|
+
background:var(--sn-theme-color-blue-background2Level, var(--sn-brand-palette-blue-99, #fdfeff));
|
|
161
169
|
}
|
|
162
170
|
.widget[data-acrylic-appearance=violet][data-acrylic-level=default]{
|
|
163
|
-
backdrop-filter:
|
|
171
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter, none);
|
|
164
172
|
}
|
|
165
173
|
.widget[data-acrylic-appearance=violet][data-acrylic-level=default] .acrylic{
|
|
166
174
|
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
167
|
-
background:var(--sn-theme-color-violet-background, var(--sn-
|
|
175
|
+
background:var(--sn-theme-color-violet-background, var(--sn-brand-palette-violet-90, #f3edfc));
|
|
168
176
|
}
|
|
169
177
|
.widget[data-acrylic-appearance=violet][data-acrylic-level="1Level"]{
|
|
170
|
-
backdrop-filter:
|
|
178
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter1Level, none);
|
|
171
179
|
}
|
|
172
180
|
.widget[data-acrylic-appearance=violet][data-acrylic-level="1Level"] .acrylic{
|
|
173
181
|
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
174
|
-
background:var(--sn-theme-color-violet-background1Level, var(--sn-
|
|
182
|
+
background:var(--sn-theme-color-violet-background1Level, var(--sn-brand-palette-violet-95, #f9f5ff));
|
|
175
183
|
}
|
|
176
184
|
.widget[data-acrylic-appearance=violet][data-acrylic-level="2Level"]{
|
|
177
|
-
backdrop-filter:
|
|
185
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter2Level, none);
|
|
178
186
|
}
|
|
179
187
|
.widget[data-acrylic-appearance=violet][data-acrylic-level="2Level"] .acrylic{
|
|
180
188
|
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
181
|
-
background:var(--sn-theme-color-violet-background2Level, var(--sn-
|
|
189
|
+
background:var(--sn-theme-color-violet-background2Level, var(--sn-brand-palette-violet-99, #fdfdfd));
|
|
182
190
|
}
|
|
183
191
|
.widget[data-acrylic-appearance=pink][data-acrylic-level=default]{
|
|
184
|
-
backdrop-filter:
|
|
192
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter, none);
|
|
185
193
|
}
|
|
186
194
|
.widget[data-acrylic-appearance=pink][data-acrylic-level=default] .acrylic{
|
|
187
195
|
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
188
|
-
background:var(--sn-theme-color-pink-background, var(--sn-
|
|
196
|
+
background:var(--sn-theme-color-pink-background, var(--sn-brand-palette-pink-90, #fceaf0));
|
|
189
197
|
}
|
|
190
198
|
.widget[data-acrylic-appearance=pink][data-acrylic-level="1Level"]{
|
|
191
|
-
backdrop-filter:
|
|
199
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter1Level, none);
|
|
192
200
|
}
|
|
193
201
|
.widget[data-acrylic-appearance=pink][data-acrylic-level="1Level"] .acrylic{
|
|
194
202
|
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
195
|
-
background:var(--sn-theme-color-pink-background1Level, var(--sn-
|
|
203
|
+
background:var(--sn-theme-color-pink-background1Level, var(--sn-brand-palette-pink-95, #fff5f7));
|
|
196
204
|
}
|
|
197
205
|
.widget[data-acrylic-appearance=pink][data-acrylic-level="2Level"]{
|
|
198
|
-
backdrop-filter:
|
|
206
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter2Level, none);
|
|
199
207
|
}
|
|
200
208
|
.widget[data-acrylic-appearance=pink][data-acrylic-level="2Level"] .acrylic{
|
|
201
209
|
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
202
|
-
background:var(--sn-theme-color-pink-background2Level, var(--sn-
|
|
210
|
+
background:var(--sn-theme-color-pink-background2Level, var(--sn-brand-palette-pink-99, #fdfcfc));
|
|
203
211
|
}
|
|
204
212
|
.widget[data-acrylic-appearance=transparent]{
|
|
205
|
-
backdrop-filter:
|
|
213
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter1Level, none);
|
|
206
214
|
}
|
|
207
215
|
.widget[data-acrylic-appearance=transparent] .acrylic{
|
|
208
216
|
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
209
217
|
background:transparent;
|
|
210
218
|
}
|
|
211
219
|
.widget[data-acrylic-appearance=decorTransparent]{
|
|
212
|
-
backdrop-filter:
|
|
220
|
+
backdrop-filter:var(--sn-acrylic-backdropFilter1Level, none);
|
|
213
221
|
}
|
|
214
222
|
.widget[data-acrylic-appearance=decorTransparent] .acrylic{
|
|
215
223
|
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
@@ -228,10 +236,8 @@
|
|
|
228
236
|
}
|
|
229
237
|
.widgetHeader[data-mobile]{
|
|
230
238
|
flex-direction:column;
|
|
231
|
-
align-items:flex-start;
|
|
232
|
-
}
|
|
233
|
-
.widgetHeader[data-loading]{
|
|
234
239
|
gap:var(--sn-primitive-dimension-12, 12px);
|
|
240
|
+
align-items:flex-start;
|
|
235
241
|
}
|
|
236
242
|
|
|
237
243
|
.headerMain{
|
|
@@ -255,12 +261,15 @@
|
|
|
255
261
|
}
|
|
256
262
|
|
|
257
263
|
.widgetContent{
|
|
264
|
+
display:flex;
|
|
265
|
+
flex-direction:column;
|
|
266
|
+
gap:var(--sn-primitive-dimension-12, 12px);
|
|
258
267
|
min-height:0;
|
|
259
268
|
color:var(--sn-theme-color-available-version-textMain, var(--sn-brand-color-text-version-main, #41424e));
|
|
260
|
-
font-family:var(--sn-regular-body-s-fontFamily, var(--sn-brand-font-fontFamily-regular-body,
|
|
269
|
+
font-family:var(--sn-regular-body-s-fontFamily, var(--sn-brand-font-fontFamily-regular-body, SB Sans Interface));
|
|
261
270
|
font-weight:var(--sn-regular-body-s-fontWeight, var(--sn-theme-typography-fontWeight-regular-body-s, var(--sn-brand-font-fontWeight-light-regular-body-s, var(--sn-primitive-font-fontWeightValue-400, 400))));
|
|
262
|
-
line-height:var(--sn-regular-body-s-lineHeight, var(--sn-density-typography-roleBody-lineHeightS, var(--sn-primitive-font-lineHeight-
|
|
263
|
-
font-size:var(--sn-regular-body-s-fontSize, var(--sn-density-typography-roleBody-fontSizeS, var(--sn-primitive-font-fontSize-14, 14px)));
|
|
271
|
+
line-height:var(--sn-regular-body-s-lineHeight, var(--sn-density-typography-roleBody-lineHeightS, var(--sn-platform-comfort-typography-roleBody-lineHeightS, var(--sn-primitive-font-lineHeight-20, 20px))));
|
|
272
|
+
font-size:var(--sn-regular-body-s-fontSize, var(--sn-density-typography-roleBody-fontSizeS, var(--sn-platform-comfort-typography-roleBody-fontSizeS, var(--sn-primitive-font-fontSize-14, 14px))));
|
|
264
273
|
letter-spacing:var(--sn-regular-body-s-letterSpacing, var(--sn-primitive-font-letterSpacing-m, 0.1px));
|
|
265
274
|
paragraph-spacing:var(--sn-regular-body-s-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize12, 6px));
|
|
266
275
|
}
|
|
@@ -270,29 +279,19 @@
|
|
|
270
279
|
width:100%;
|
|
271
280
|
min-width:0;
|
|
272
281
|
}
|
|
273
|
-
|
|
274
|
-
.button{
|
|
275
|
-
white-space:nowrap;
|
|
276
|
-
}
|
|
277
|
-
.button[data-full-width]:not([data-variant=icon-only]){
|
|
278
|
-
flex-shrink:0;
|
|
279
|
-
width:auto;
|
|
280
|
-
}
|
|
281
|
-
.button[data-variant=icon-only]{
|
|
282
|
-
flex-grow:0;
|
|
283
|
-
flex-shrink:0;
|
|
284
|
-
}
|
|
285
|
-
.mobileActionsWrapper{
|
|
286
|
-
scrollbar-width:none;
|
|
287
|
-
overflow-y:auto;
|
|
288
|
-
display:flex;
|
|
289
|
-
flex-shrink:0;
|
|
290
|
-
gap:var(--sn-primitive-dimension-8, 8px);
|
|
291
|
-
justify-content:stretch;
|
|
282
|
+
.skeletonHeader .skeletonTitle{
|
|
292
283
|
width:100%;
|
|
284
|
+
height:var(--sn-primitive-dimension-24, 24px);
|
|
285
|
+
border-radius:var(--sn-density-radius-2xs, var(--sn-platform-comfort-radius-2xs, var(--sn-primitive-dimension-4, 4px)));
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.widget[data-wide] .skeletonTitle{
|
|
289
|
+
width:var(--sn-primitive-dimension-96, 96px);
|
|
293
290
|
}
|
|
294
|
-
|
|
295
|
-
|
|
291
|
+
|
|
292
|
+
.widget .skeletonButton{
|
|
293
|
+
height:var(--sn-primitive-dimension-32, 32px);
|
|
294
|
+
border-radius:var(--sn-density-radius-2xs, var(--sn-platform-comfort-radius-2xs, var(--sn-primitive-dimension-4, 4px)));
|
|
296
295
|
}
|
|
297
296
|
|
|
298
297
|
.button{
|
|
@@ -306,7 +305,6 @@
|
|
|
306
305
|
flex-grow:0;
|
|
307
306
|
flex-shrink:0;
|
|
308
307
|
}
|
|
309
|
-
|
|
310
308
|
.actionsWrapper{
|
|
311
309
|
display:flex;
|
|
312
310
|
flex-shrink:0;
|
|
@@ -323,10 +321,16 @@
|
|
|
323
321
|
align-items:center;
|
|
324
322
|
width:100%;
|
|
325
323
|
}
|
|
326
|
-
|
|
327
|
-
.
|
|
328
|
-
|
|
329
|
-
|
|
324
|
+
.skeletonActions .skeletonAction,
|
|
325
|
+
.skeletonActions .skeletonIconAction{
|
|
326
|
+
height:var(--sn-primitive-dimension-32, 32px);
|
|
327
|
+
border-radius:var(--sn-density-radius-2xs, var(--sn-platform-comfort-radius-2xs, var(--sn-primitive-dimension-4, 4px)));
|
|
328
|
+
}
|
|
329
|
+
.skeletonActions .skeletonAction{
|
|
330
|
+
width:var(--sn-primitive-dimension-96, 96px);
|
|
331
|
+
}
|
|
332
|
+
.skeletonActions .skeletonIconAction{
|
|
333
|
+
width:var(--sn-primitive-dimension-32, 32px);
|
|
330
334
|
}
|
|
331
335
|
.trigger{
|
|
332
336
|
display:inline-flex;
|
|
@@ -343,6 +347,10 @@
|
|
|
343
347
|
flex-direction:column;
|
|
344
348
|
gap:var(--sn-primitive-dimension-4, 4px);
|
|
345
349
|
}
|
|
350
|
+
.skeletonContent .skeleton{
|
|
351
|
+
height:var(--sn-primitive-dimension-80, 80px);
|
|
352
|
+
border-radius:var(--sn-density-radius-2xs, var(--sn-platform-comfort-radius-2xs, var(--sn-primitive-dimension-4, 4px)));
|
|
353
|
+
}
|
|
346
354
|
|
|
347
355
|
.errorWrapper{
|
|
348
356
|
display:flex;
|
|
@@ -366,6 +374,10 @@
|
|
|
366
374
|
gap:var(--sn-primitive-dimension-8, 8px);
|
|
367
375
|
align-items:center;
|
|
368
376
|
}
|
|
377
|
+
.controlWrapper .skeletonControl{
|
|
378
|
+
height:var(--sn-primitive-dimension-32, 32px);
|
|
379
|
+
border-radius:var(--sn-density-radius-2xs, var(--sn-platform-comfort-radius-2xs, var(--sn-primitive-dimension-4, 4px)));
|
|
380
|
+
}
|
|
369
381
|
.controlWrapper[data-mobile]{
|
|
370
382
|
width:100%;
|
|
371
383
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createElement as _createElement } from "react";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { isMobileLayout, useAdaptiveLayout } from '@cloud-ru/ds-adaptive';
|
|
4
|
+
import { BACKGROUND_PREDEFINED_FILL, backgroundPredefinedFillToAcrylic } from '@cloud-ru/ds-materials';
|
|
4
5
|
import { Skeleton } from '@cloud-ru/ds-skeleton';
|
|
5
6
|
import { TitleClickable } from '@cloud-ru/ds-uikit-product-title-clickable';
|
|
6
7
|
import { extractSupportProps, useDynamicList } from '@cloud-ru/ds-utils';
|
|
@@ -9,6 +10,7 @@ import { memo, useMemo, useRef } from 'react';
|
|
|
9
10
|
import { BUTTON_TYPE, TEST_IDS, WIDGET_STATE } from '../../constants.js';
|
|
10
11
|
import { Actions, ActionView, Content, ControlBlock, isVisibleAction } from '../../helperComponents/index.js';
|
|
11
12
|
import styles from './styles.module.css';
|
|
13
|
+
const ACRYLIC = backgroundPredefinedFillToAcrylic(BACKGROUND_PREDEFINED_FILL.NeutralBackground1Level);
|
|
12
14
|
function WidgetComponent({ header, children, actions = [], wide: wideProp = false, state = WIDGET_STATE.Default, loadingState, errorState, className, actionsChildren, segmentControl, ...rest }) {
|
|
13
15
|
const { layoutType: contextLayoutType } = useAdaptiveLayout();
|
|
14
16
|
const isMobile = isMobileLayout(contextLayoutType);
|
|
@@ -25,9 +27,9 @@ function WidgetComponent({ header, children, actions = [], wide: wideProp = fals
|
|
|
25
27
|
const withKebab = hiddenItems.concat(visibleItems.filter(item => item.variant === BUTTON_TYPE.Kebab));
|
|
26
28
|
return [withoutKebab, withKebab];
|
|
27
29
|
}, [visibleItems, hiddenItems]);
|
|
28
|
-
return (_jsxs("div", { className: cn(styles.widget, className), "data-state": state, ref: containerRef, "data-wide": wide || undefined, ...extractSupportProps(rest), children: [
|
|
30
|
+
return (_jsxs("div", { className: cn(styles.widget, className), "data-state": state, ref: containerRef, "data-wide": wide || undefined, "data-acrylic-appearance": ACRYLIC.appearance, "data-acrylic-level": ACRYLIC.level, ...extractSupportProps(rest), children: [_jsx("span", { className: styles.acrylic, "aria-hidden": true }), _jsxs("div", { className: styles.widgetHeader, "data-mobile": !wide || undefined, "data-test-id": TEST_IDS.header, children: [_jsxs("div", { className: styles.headerMain, children: [state === WIDGET_STATE.Loading ? (_jsx("div", { className: styles.skeletonHeader, children: _jsx(Skeleton, { loading: true, className: styles.skeletonTitle }) })) : (_jsx(TitleClickable, { ...header, className: cn(styles.titleClickable, header.className) })), !wide && (_jsx(Actions, { actions: state === WIDGET_STATE.Error ? actions : hiddenItemsWithKebab, actionsChildren: actionsChildren, wide: wide, state: state }))] }), _jsx(ControlBlock, { actions: actions, actionsChildren: actionsChildren, segmentControl: segmentControl, wide: wide, state: state })] }), _jsx("div", { className: styles.widgetContent, "data-test-id": TEST_IDS.content, children: _jsx(Content, { state: state, wide: wide, loadingState: loadingState, errorState: errorState, children: children }) }), !wide &&
|
|
29
31
|
state !== WIDGET_STATE.Error &&
|
|
30
|
-
visibleItemsWithoutKebab.map((action, index) => state === WIDGET_STATE.Loading ? (_jsx(Skeleton, { loading: true,
|
|
32
|
+
visibleItemsWithoutKebab.map((action, index) => state === WIDGET_STATE.Loading ? (_jsx(Skeleton, { loading: true, className: styles.skeletonButton }, index)) : (_createElement(ActionView, { ...action, key: index, commonProps: {
|
|
31
33
|
className: styles.button,
|
|
32
34
|
size: 'm',
|
|
33
35
|
fullWidth: true,
|