@ozen-ui/kit 0.39.0 → 0.41.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/__inner__/cjs/components/ButtonNext/Button.css +32 -25
- package/__inner__/cjs/components/FieldControl/FieldControl.css +25 -19
- package/__inner__/cjs/components/FieldLabel/FieldLabel.css +6 -6
- package/__inner__/cjs/components/Fieldset/Fieldset.css +1 -1
- package/__inner__/cjs/components/FilePicker/FilePicker.css +38 -98
- package/__inner__/cjs/components/FilePicker/FilePicker.d.ts +69 -1
- package/__inner__/cjs/components/FilePicker/FilePicker.js +26 -25
- package/__inner__/cjs/components/FilePicker/types.d.ts +16 -7
- package/__inner__/cjs/components/IconButtonNext/IconButton.css +14 -1
- package/__inner__/cjs/components/Input/Input.css +2 -2
- package/__inner__/cjs/components/InputNumber/InputNumber.css +2 -2
- package/__inner__/cjs/components/Select/Select.css +2 -2
- package/__inner__/cjs/components/Textarea/Textarea.css +2 -2
- package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_bBusinessDark.css +25 -25
- package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_bBusinessDefault.css +30 -30
- package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_ozenDark.css +25 -25
- package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_ozenDefault.css +25 -25
- package/__inner__/esm/components/ButtonNext/Button.css +32 -25
- package/__inner__/esm/components/FieldControl/FieldControl.css +25 -19
- package/__inner__/esm/components/FieldLabel/FieldLabel.css +6 -6
- package/__inner__/esm/components/Fieldset/Fieldset.css +1 -1
- package/__inner__/esm/components/FilePicker/FilePicker.css +38 -98
- package/__inner__/esm/components/FilePicker/FilePicker.d.ts +69 -1
- package/__inner__/esm/components/FilePicker/FilePicker.js +26 -25
- package/__inner__/esm/components/FilePicker/types.d.ts +16 -7
- package/__inner__/esm/components/IconButtonNext/IconButton.css +14 -1
- package/__inner__/esm/components/Input/Input.css +2 -2
- package/__inner__/esm/components/InputNumber/InputNumber.css +2 -2
- package/__inner__/esm/components/Select/Select.css +2 -2
- package/__inner__/esm/components/Textarea/Textarea.css +2 -2
- package/__inner__/esm/components/ThemeProvider/_color/Theme_color_bBusinessDark.css +25 -25
- package/__inner__/esm/components/ThemeProvider/_color/Theme_color_bBusinessDefault.css +30 -30
- package/__inner__/esm/components/ThemeProvider/_color/Theme_color_ozenDark.css +25 -25
- package/__inner__/esm/components/ThemeProvider/_color/Theme_color_ozenDefault.css +25 -25
- package/package.json +4 -4
|
@@ -80,11 +80,12 @@
|
|
|
80
80
|
|
|
81
81
|
text-transform: var(--typography-text-l-text_transform, none);
|
|
82
82
|
}
|
|
83
|
+
/** contained */
|
|
83
84
|
.ButtonNext_variant_contained.ButtonNext_color_primary {
|
|
84
85
|
--button-bg-color: var(--color-background-action);
|
|
85
86
|
--button-bg-color-hover: var(--color-background-action-hover);
|
|
86
87
|
--button-bg-color-active: var(--color-background-action-pressed);
|
|
87
|
-
--button-bg-color-focus: var(--color-background-action);
|
|
88
|
+
--button-bg-color-focus: var(--color-background-action-hover);
|
|
88
89
|
--button-font-color: var(--color-content-action-on);
|
|
89
90
|
--button-font-color-hover: var(--color-content-action-on);
|
|
90
91
|
--button-font-color-active: var(--color-content-action-on);
|
|
@@ -94,7 +95,7 @@
|
|
|
94
95
|
--button-bg-color: var(--color-background-action-secondary);
|
|
95
96
|
--button-bg-color-hover: var(--color-background-action-secondary-hover);
|
|
96
97
|
--button-bg-color-active: var(--color-background-action-secondary-pressed);
|
|
97
|
-
--button-bg-color-focus: var(--color-background-action-secondary);
|
|
98
|
+
--button-bg-color-focus: var(--color-background-action-secondary-hover);
|
|
98
99
|
--button-font-color: var(--color-content-action-on);
|
|
99
100
|
--button-font-color-hover: var(--color-content-action-on);
|
|
100
101
|
--button-font-color-active: var(--color-content-action-on);
|
|
@@ -104,7 +105,7 @@
|
|
|
104
105
|
--button-bg-color: var(--color-background-tertiary);
|
|
105
106
|
--button-bg-color-hover: var(--color-background-tertiary-hover);
|
|
106
107
|
--button-bg-color-active: var(--color-background-tertiary-pressed);
|
|
107
|
-
--button-bg-color-focus: var(--color-background-tertiary);
|
|
108
|
+
--button-bg-color-focus: var(--color-background-tertiary-hover);
|
|
108
109
|
--button-font-color: var(--color-content-primary);
|
|
109
110
|
--button-font-color-hover: var(--color-content-primary);
|
|
110
111
|
--button-font-color-active: var(--color-content-primary);
|
|
@@ -114,17 +115,18 @@
|
|
|
114
115
|
--button-bg-color: var(--color-background-error);
|
|
115
116
|
--button-bg-color-hover: var(--color-background-error-hover);
|
|
116
117
|
--button-bg-color-active: var(--color-background-error-pressed);
|
|
117
|
-
--button-bg-color-focus: var(--color-background-error);
|
|
118
|
+
--button-bg-color-focus: var(--color-background-error-hover);
|
|
118
119
|
--button-font-color: var(--color-content-action-on);
|
|
119
120
|
--button-font-color-hover: var(--color-content-action-on);
|
|
120
121
|
--button-font-color-active: var(--color-content-action-on);
|
|
121
122
|
--button-font-color-focus: var(--color-content-action-on);
|
|
122
123
|
}
|
|
124
|
+
/** contained-additional */
|
|
123
125
|
.ButtonNext_variant_contained-additional.ButtonNext_color_primary {
|
|
124
126
|
--button-bg-color: var(--color-background-action-light);
|
|
125
127
|
--button-bg-color-hover: var(--color-background-action-light-hover);
|
|
126
128
|
--button-bg-color-active: var(--color-background-action-light-pressed);
|
|
127
|
-
--button-bg-color-focus:
|
|
129
|
+
--button-bg-color-focus: var(--color-background-action-light-hover);
|
|
128
130
|
--button-font-color: var(--color-content-action);
|
|
129
131
|
--button-font-color-hover: var(--color-content-action);
|
|
130
132
|
--button-font-color-active: var(--color-content-action);
|
|
@@ -134,7 +136,7 @@
|
|
|
134
136
|
--button-bg-color: var(--color-background-secondary);
|
|
135
137
|
--button-bg-color-hover: var(--color-background-secondary-hover);
|
|
136
138
|
--button-bg-color-active: var(--color-background-secondary-pressed);
|
|
137
|
-
--button-bg-color-focus:
|
|
139
|
+
--button-bg-color-focus: var(--color-background-secondary-hover);
|
|
138
140
|
--button-font-color: var(--color-content-primary);
|
|
139
141
|
--button-font-color-hover: var(--color-content-primary);
|
|
140
142
|
--button-font-color-active: var(--color-content-primary);
|
|
@@ -144,7 +146,7 @@
|
|
|
144
146
|
--button-bg-color: var(--color-background-primary);
|
|
145
147
|
--button-bg-color-hover: var(--color-background-primary-hover);
|
|
146
148
|
--button-bg-color-active: var(--color-background-primary-pressed);
|
|
147
|
-
--button-bg-color-focus:
|
|
149
|
+
--button-bg-color-focus: var(--color-background-primary-hover);
|
|
148
150
|
--button-font-color: var(--color-content-secondary);
|
|
149
151
|
--button-font-color-hover: var(--color-content-secondary);
|
|
150
152
|
--button-font-color-active: var(--color-content-secondary);
|
|
@@ -154,52 +156,54 @@
|
|
|
154
156
|
--button-bg-color: var(--color-background-error-light);
|
|
155
157
|
--button-bg-color-hover: var(--color-background-error-light-hover);
|
|
156
158
|
--button-bg-color-active: var(--color-background-error-light-pressed);
|
|
157
|
-
--button-bg-color-focus:
|
|
159
|
+
--button-bg-color-focus: var(--color-background-error-light-hover);
|
|
158
160
|
--button-font-color: var(--color-content-error);
|
|
159
161
|
--button-font-color-hover: var(--color-content-error);
|
|
160
162
|
--button-font-color-active: var(--color-content-error);
|
|
161
163
|
--button-font-color-focus: var(--color-content-error);
|
|
162
164
|
}
|
|
165
|
+
/** ghost */
|
|
163
166
|
.ButtonNext_variant_ghost.ButtonNext_color_primary {
|
|
164
|
-
--button-bg-color:
|
|
165
|
-
--button-bg-color-hover: var(--color-background-
|
|
166
|
-
--button-bg-color-active: var(--color-background-
|
|
167
|
-
--button-bg-color-focus:
|
|
167
|
+
--button-bg-color: transparent;
|
|
168
|
+
--button-bg-color-hover: var(--color-background-action-light-hover);
|
|
169
|
+
--button-bg-color-active: var(--color-background-action-light-pressed);
|
|
170
|
+
--button-bg-color-focus: var(--color-background-action-light-hover);
|
|
168
171
|
--button-font-color: var(--color-content-action);
|
|
169
172
|
--button-font-color-hover: var(--color-content-action);
|
|
170
173
|
--button-font-color-active: var(--color-content-action);
|
|
171
174
|
--button-font-color-focus: var(--color-content-action);
|
|
172
175
|
}
|
|
173
176
|
.ButtonNext_variant_ghost.ButtonNext_color_secondary {
|
|
174
|
-
--button-bg-color:
|
|
177
|
+
--button-bg-color: transparent;
|
|
175
178
|
--button-bg-color-hover: var(--color-background-secondary-hover);
|
|
176
179
|
--button-bg-color-active: var(--color-background-secondary-pressed);
|
|
177
|
-
--button-bg-color-focus:
|
|
180
|
+
--button-bg-color-focus: var(--color-background-secondary-hover);
|
|
178
181
|
--button-font-color: var(--color-content-primary);
|
|
179
182
|
--button-font-color-hover: var(--color-content-primary);
|
|
180
183
|
--button-font-color-active: var(--color-content-primary);
|
|
181
184
|
--button-font-color-focus: var(--color-content-primary);
|
|
182
185
|
}
|
|
183
186
|
.ButtonNext_variant_ghost.ButtonNext_color_tertiary {
|
|
184
|
-
--button-bg-color:
|
|
187
|
+
--button-bg-color: transparent;
|
|
185
188
|
--button-bg-color-hover: var(--color-background-primary-hover);
|
|
186
189
|
--button-bg-color-active: var(--color-background-primary-pressed);
|
|
187
|
-
--button-bg-color-focus:
|
|
190
|
+
--button-bg-color-focus: var(--color-background-primary-hover);
|
|
188
191
|
--button-font-color: var(--color-content-secondary);
|
|
189
192
|
--button-font-color-hover: var(--color-content-secondary);
|
|
190
193
|
--button-font-color-active: var(--color-content-secondary);
|
|
191
194
|
--button-font-color-focus: var(--color-content-secondary);
|
|
192
195
|
}
|
|
193
196
|
.ButtonNext_variant_ghost.ButtonNext_color_error {
|
|
194
|
-
--button-bg-color:
|
|
197
|
+
--button-bg-color: transparent;
|
|
195
198
|
--button-bg-color-hover: var(--color-background-error-light-hover);
|
|
196
199
|
--button-bg-color-active: var(--color-background-error-light-pressed);
|
|
197
|
-
--button-bg-color-focus:
|
|
200
|
+
--button-bg-color-focus: var(--color-background-error-light-hover);
|
|
198
201
|
--button-font-color: var(--color-content-error);
|
|
199
202
|
--button-font-color-hover: var(--color-content-error);
|
|
200
203
|
--button-font-color-active: var(--color-content-error);
|
|
201
204
|
--button-font-color-focus: var(--color-content-error);
|
|
202
205
|
}
|
|
206
|
+
/** function */
|
|
203
207
|
.ButtonNext_variant_function {
|
|
204
208
|
--button-height: auto;
|
|
205
209
|
--button-min-width: auto;
|
|
@@ -209,10 +213,10 @@
|
|
|
209
213
|
.ButtonNext_variant_function.ButtonNext_color_secondary,
|
|
210
214
|
.ButtonNext_variant_function.ButtonNext_color_tertiary,
|
|
211
215
|
.ButtonNext_variant_function.ButtonNext_color_error {
|
|
212
|
-
--button-bg-color:
|
|
213
|
-
--button-bg-color-hover:
|
|
214
|
-
--button-bg-color-active:
|
|
215
|
-
--button-bg-color-focus:
|
|
216
|
+
--button-bg-color: transparent;
|
|
217
|
+
--button-bg-color-hover: transparent;
|
|
218
|
+
--button-bg-color-active: transparent;
|
|
219
|
+
--button-bg-color-focus: transparent;
|
|
216
220
|
}
|
|
217
221
|
.ButtonNext_variant_function.ButtonNext_color_primary {
|
|
218
222
|
--button-font-color: var(--color-content-action);
|
|
@@ -238,6 +242,7 @@
|
|
|
238
242
|
--button-font-color-active: var(--color-content-error-pressed);
|
|
239
243
|
--button-font-color-focus: var(--color-content-error-pressed);
|
|
240
244
|
}
|
|
245
|
+
/** disabled & loading */
|
|
241
246
|
.ButtonNext_variant_contained.ButtonNext_disabled,
|
|
242
247
|
.ButtonNext_variant_contained.ButtonNext_loading,
|
|
243
248
|
.ButtonNext_variant_contained-additional.ButtonNext_disabled,
|
|
@@ -260,13 +265,15 @@
|
|
|
260
265
|
.ButtonNext_variant_ghost.ButtonNext_loading,
|
|
261
266
|
.ButtonNext_variant_function.ButtonNext_disabled,
|
|
262
267
|
.ButtonNext_variant_function.ButtonNext_loading {
|
|
263
|
-
--button-bg-color:
|
|
264
|
-
--button-bg-color-hover:
|
|
265
|
-
--button-bg-color-active:
|
|
268
|
+
--button-bg-color: transparent;
|
|
269
|
+
--button-bg-color-hover: transparent;
|
|
270
|
+
--button-bg-color-active: transparent;
|
|
266
271
|
}
|
|
272
|
+
/** focus */
|
|
267
273
|
.ButtonNext:focus:not(:focus-visible, :active, :hover) {
|
|
268
274
|
box-shadow: none;
|
|
269
275
|
color: var(--button-font-color);
|
|
276
|
+
background-color: var(--button-bg-color);
|
|
270
277
|
}
|
|
271
278
|
.ButtonNext:focus:not(:focus-visible) {
|
|
272
279
|
box-shadow: none;
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
/* stylelint-disable */
|
|
2
2
|
.FieldControl {
|
|
3
3
|
--textfield-color: var(--color-content-primary);
|
|
4
|
-
--textfield-background-color: var(--color-background-primary);
|
|
5
4
|
--textfield-border-width: var(--border-width-s);
|
|
6
5
|
--textfield-border-color: var(--color-border-main);
|
|
6
|
+
--textfield-placeholder-color: var(--color-content-tertiary);
|
|
7
|
+
--textfield-background-color: var(--color-background-primary);
|
|
7
8
|
cursor: text;
|
|
8
|
-
display: inline-flex;
|
|
9
9
|
vertical-align: top;
|
|
10
|
+
display: inline-flex;
|
|
10
11
|
flex-direction: column;
|
|
11
12
|
}
|
|
12
13
|
.FieldControl > * {
|
|
13
14
|
cursor: text;
|
|
14
15
|
}
|
|
15
16
|
.FieldControl_size_2xs {
|
|
16
|
-
--textfield-gutter-x: 12px;
|
|
17
|
-
--textfield-input-height: 32px;
|
|
18
17
|
--textfield-input-padding: 8px 0;
|
|
19
18
|
--textfield-input-gap: var(--spacing-2xs);
|
|
19
|
+
--textfield-gutter-x: var(--control-padding-xs);
|
|
20
|
+
--textfield-border-radius: var(--border-radius-xs);
|
|
21
|
+
--textfield-input-height: var(--control-height-2xs);
|
|
20
22
|
|
|
21
23
|
font: var(--typography-text-2xs-font);
|
|
22
24
|
|
|
@@ -25,10 +27,11 @@
|
|
|
25
27
|
text-transform: var(--typography-text-2xs-text_transform, none);
|
|
26
28
|
}
|
|
27
29
|
.FieldControl_size_xs {
|
|
28
|
-
--textfield-gutter-x: 12px;
|
|
29
|
-
--textfield-input-height: 40px;
|
|
30
30
|
--textfield-input-padding: 12px 0;
|
|
31
31
|
--textfield-input-gap: var(--spacing-2xs);
|
|
32
|
+
--textfield-gutter-x: var(--control-padding-xs);
|
|
33
|
+
--textfield-border-radius: var(--border-radius-xs);
|
|
34
|
+
--textfield-input-height: var(--control-height-xs);
|
|
32
35
|
|
|
33
36
|
font: var(--typography-text-xs-font);
|
|
34
37
|
|
|
@@ -37,10 +40,11 @@
|
|
|
37
40
|
text-transform: var(--typography-text-xs-text_transform, none);
|
|
38
41
|
}
|
|
39
42
|
.FieldControl_size_s {
|
|
40
|
-
--textfield-gutter-x: 16px;
|
|
41
|
-
--textfield-input-height: 48px;
|
|
42
43
|
--textfield-input-padding: 14px 0;
|
|
43
44
|
--textfield-input-gap: var(--spacing-xs);
|
|
45
|
+
--textfield-gutter-x: var(--control-padding-s);
|
|
46
|
+
--textfield-border-radius: var(--border-radius-xs);
|
|
47
|
+
--textfield-input-height: var(--control-height-s);
|
|
44
48
|
|
|
45
49
|
font: var(--typography-text-s-font);
|
|
46
50
|
|
|
@@ -49,10 +53,11 @@
|
|
|
49
53
|
text-transform: var(--typography-text-s-text_transform, none);
|
|
50
54
|
}
|
|
51
55
|
.FieldControl_size_m {
|
|
52
|
-
--textfield-gutter-x: 20px;
|
|
53
|
-
--textfield-input-height: 56px;
|
|
54
56
|
--textfield-input-padding: 16px 0;
|
|
55
57
|
--textfield-input-gap: var(--spacing-xs);
|
|
58
|
+
--textfield-gutter-x: var(--control-padding-m);
|
|
59
|
+
--textfield-border-radius: var(--border-radius-xs);
|
|
60
|
+
--textfield-input-height: var(--control-height-m);
|
|
56
61
|
|
|
57
62
|
font: var(--typography-text-m-font);
|
|
58
63
|
|
|
@@ -61,10 +66,11 @@
|
|
|
61
66
|
text-transform: var(--typography-text-m-text_transform, none);
|
|
62
67
|
}
|
|
63
68
|
.FieldControl_size_l {
|
|
64
|
-
--textfield-gutter-x: 24px;
|
|
65
|
-
--textfield-input-height: 64px;
|
|
66
69
|
--textfield-input-padding: 18px 0;
|
|
67
70
|
--textfield-input-gap: var(--spacing-s);
|
|
71
|
+
--textfield-gutter-x: var(--control-padding-l);
|
|
72
|
+
--textfield-border-radius: var(--border-radius-xs);
|
|
73
|
+
--textfield-input-height: var(--control-height-l);
|
|
68
74
|
|
|
69
75
|
font: var(--typography-text-l-font);
|
|
70
76
|
|
|
@@ -76,16 +82,16 @@
|
|
|
76
82
|
--textfield-input-padding: 8px 0 8px;
|
|
77
83
|
}
|
|
78
84
|
.FieldControl_hasLabel.FieldControl_size_xs {
|
|
79
|
-
--textfield-input-padding:
|
|
85
|
+
--textfield-input-padding: 20px 0 4px;
|
|
80
86
|
}
|
|
81
87
|
.FieldControl_hasLabel.FieldControl_size_s {
|
|
82
|
-
--textfield-input-padding:
|
|
88
|
+
--textfield-input-padding: 22px 0 6px;
|
|
83
89
|
}
|
|
84
90
|
.FieldControl_hasLabel.FieldControl_size_m {
|
|
85
|
-
--textfield-input-padding: 24px 0
|
|
91
|
+
--textfield-input-padding: 24px 0 8px;
|
|
86
92
|
}
|
|
87
93
|
.FieldControl_hasLabel.FieldControl_size_l {
|
|
88
|
-
--textfield-input-padding:
|
|
94
|
+
--textfield-input-padding: 28px 0 8px;
|
|
89
95
|
}
|
|
90
96
|
.FieldControl_hasLabel .FieldInput::placeholder {
|
|
91
97
|
opacity: 0;
|
|
@@ -102,8 +108,8 @@
|
|
|
102
108
|
.FieldControl_focused,
|
|
103
109
|
.FieldControl_focused:hover {
|
|
104
110
|
--textfield-border-width: var(--border-width-m);
|
|
105
|
-
--textfield-background-color: var(--color-background-main);
|
|
106
111
|
--textfield-border-color: var(--color-border-action);
|
|
112
|
+
--textfield-background-color: var(--color-background-main);
|
|
107
113
|
}
|
|
108
114
|
.FieldControl_error,
|
|
109
115
|
.FieldControl_error.FieldControl:hover,
|
|
@@ -112,9 +118,9 @@
|
|
|
112
118
|
--textfield-border-color: var(--color-border-error);
|
|
113
119
|
}
|
|
114
120
|
.FieldControl_disabled {
|
|
121
|
+
--textfield-color: var(--color-content-secondary);
|
|
115
122
|
--textfield-border-color: var(--color-border-disabled);
|
|
116
123
|
--textfield-background-color: var(--color-background-disabled);
|
|
117
|
-
--textfield-color: var(--color-content-secondary);
|
|
118
|
-
pointer-events: none;
|
|
119
124
|
cursor: default;
|
|
125
|
+
pointer-events: none;
|
|
120
126
|
}
|
|
@@ -48,22 +48,22 @@
|
|
|
48
48
|
.FieldLabel_size_s {
|
|
49
49
|
--field-label-font: var(--typography-text-s-font);
|
|
50
50
|
--field-label-scaled: var(--typography-text-3xs-font);
|
|
51
|
-
--field-label-translate_y: -
|
|
51
|
+
--field-label-translate_y: -8px;
|
|
52
52
|
--field-label-top: 14px;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.FieldLabel_size_m {
|
|
56
56
|
--field-label-font: var(--typography-text-m-font);
|
|
57
|
-
--field-label-scaled: var(--typography-text-
|
|
58
|
-
--field-label-translate_y: -
|
|
59
|
-
--field-label-top:
|
|
57
|
+
--field-label-scaled: var(--typography-text-xs-font);
|
|
58
|
+
--field-label-translate_y: -8px;
|
|
59
|
+
--field-label-top: 16px;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.FieldLabel_size_l {
|
|
63
63
|
--field-label-font: var(--typography-text-l-font);
|
|
64
64
|
--field-label-scaled: var(--typography-text-s-font);
|
|
65
|
-
--field-label-translate_y: -
|
|
66
|
-
--field-label-top:
|
|
65
|
+
--field-label-translate_y: -10px;
|
|
66
|
+
--field-label-top: 18px;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.FieldLabel_disabled {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
margin: 0;
|
|
5
5
|
padding: 0;
|
|
6
6
|
pointer-events: none;
|
|
7
|
-
border-radius: var(--border-radius
|
|
7
|
+
border-radius: var(--textfield-border-radius);
|
|
8
8
|
border: var(--textfield-border-width) solid var(--textfield-border-color);
|
|
9
9
|
transition: border var(--transition-default);
|
|
10
10
|
}
|
|
@@ -1,130 +1,70 @@
|
|
|
1
|
-
/* stylelint-disable */
|
|
2
|
-
.FilePicker {
|
|
3
|
-
--textfield-color: var(--color-content-tertiary);
|
|
4
|
-
--textfield-background-color: var(--color-background-primary);
|
|
5
|
-
--textfield-border-width: var(--border-width-s);
|
|
6
|
-
--textfield-border-color: var(--color-border-main);
|
|
7
|
-
font: var(--textfield-input-font);
|
|
8
|
-
display: inline-flex;
|
|
9
|
-
vertical-align: top;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
}
|
|
12
1
|
.FilePicker-Body {
|
|
13
|
-
position: relative;
|
|
14
2
|
display: flex;
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
position: relative;
|
|
17
5
|
align-items: center;
|
|
18
6
|
box-sizing: border-box;
|
|
7
|
+
color: var(--textfield-color);
|
|
19
8
|
padding: 0 var(--textfield-gutter-x);
|
|
9
|
+
-moz-column-gap: var(--textfield-input-gap);
|
|
10
|
+
column-gap: var(--textfield-input-gap);
|
|
11
|
+
border-radius: var(--textfield-border-radius);
|
|
20
12
|
background-color: var(--textfield-background-color);
|
|
21
13
|
transition: background-color var(--transition-slow);
|
|
22
|
-
color: var(--textfield-color);
|
|
23
|
-
border-radius: var(--border-radius-xs);
|
|
24
|
-
cursor: pointer;
|
|
25
14
|
}
|
|
26
|
-
.FilePicker-FieldContainer {
|
|
15
|
+
.FilePicker-FieldContainer {
|
|
16
|
+
overflow: hidden;
|
|
27
17
|
inline-size: 100%;
|
|
28
18
|
min-inline-size: 0;
|
|
29
19
|
position: relative;
|
|
30
|
-
overflow: hidden;
|
|
31
20
|
}
|
|
32
|
-
.FilePicker-FileName,
|
|
21
|
+
.FilePicker-FileName,
|
|
33
22
|
.FilePicker-Placeholder {
|
|
34
|
-
|
|
35
|
-
white-space: nowrap;
|
|
36
|
-
overflow: hidden;
|
|
23
|
+
padding: 0;
|
|
37
24
|
border: none;
|
|
38
|
-
outline: none;
|
|
39
|
-
position: relative;
|
|
40
25
|
display: flex;
|
|
41
|
-
|
|
26
|
+
outline: none;
|
|
27
|
+
overflow: hidden;
|
|
42
28
|
inline-size: 100%;
|
|
43
|
-
padding: 0;
|
|
44
29
|
background: none;
|
|
30
|
+
position: relative;
|
|
31
|
+
align-items: center;
|
|
32
|
+
white-space: nowrap;
|
|
45
33
|
box-sizing: border-box;
|
|
46
|
-
|
|
34
|
+
text-overflow: ellipsis;
|
|
47
35
|
block-size: var(--textfield-input-height);
|
|
48
36
|
}
|
|
49
|
-
.FilePicker-
|
|
37
|
+
.FilePicker-Placeholder {
|
|
38
|
+
color: var(--textfield-placeholder-color);
|
|
39
|
+
}
|
|
40
|
+
.FilePicker-Input {
|
|
41
|
+
opacity: 0;
|
|
42
|
+
inline-size: 100%;
|
|
50
43
|
inset-block-end: 0;
|
|
51
|
-
inset-inline-start: 0;
|
|
52
44
|
position: absolute;
|
|
53
|
-
opacity: 0;
|
|
54
45
|
pointer-events: none;
|
|
55
|
-
inline-
|
|
46
|
+
inset-inline-start: 0;
|
|
56
47
|
}
|
|
57
|
-
.FilePicker-Input:focus + .FilePicker-Placeholder {
|
|
48
|
+
.FilePicker-Input:focus + .FilePicker-Placeholder {
|
|
58
49
|
opacity: 1;
|
|
59
50
|
}
|
|
60
|
-
.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
--textfield-input-font: var(--typography-text-2xs-font);
|
|
64
|
-
--textfield-input-padding: 8px 0 8px;
|
|
65
|
-
--textfield-input-gap: var(--spacing-2xs);
|
|
66
|
-
}
|
|
67
|
-
.FilePicker_size_xs {
|
|
68
|
-
--textfield-gutter-x: 12px;
|
|
69
|
-
--textfield-input-height: 40px;
|
|
70
|
-
--textfield-input-font: var(--typography-text-xs-font);
|
|
71
|
-
--textfield-input-padding: 19px 0 4px;
|
|
72
|
-
--textfield-input-gap: var(--spacing-2xs);
|
|
73
|
-
}
|
|
74
|
-
.FilePicker_size_s {
|
|
75
|
-
--textfield-gutter-x: 16px;
|
|
76
|
-
--textfield-input-height: 48px;
|
|
77
|
-
--textfield-input-font: var(--typography-text-s-font);
|
|
78
|
-
--textfield-input-padding: 21px 0 6px;
|
|
79
|
-
--textfield-input-gap: var(--spacing-xs);
|
|
80
|
-
}
|
|
81
|
-
.FilePicker_size_m {
|
|
82
|
-
--textfield-gutter-x: 20px;
|
|
83
|
-
--textfield-input-height: 56px;
|
|
84
|
-
--textfield-input-font: var(--typography-text-m-font);
|
|
85
|
-
--textfield-input-padding: 24px 0 6px;
|
|
86
|
-
--textfield-input-gap: var(--spacing-xs);
|
|
87
|
-
}
|
|
88
|
-
.FilePicker_size_l {
|
|
89
|
-
--textfield-gutter-x: 24px;
|
|
90
|
-
--textfield-input-height: 64px;
|
|
91
|
-
--textfield-input-font: var(--typography-text-l-font);
|
|
92
|
-
--textfield-input-padding: 26px 0 6px;
|
|
93
|
-
--textfield-input-gap: var(--spacing-s);
|
|
94
|
-
}
|
|
95
|
-
.FilePicker_fullWidth {
|
|
96
|
-
inline-size: 100%;
|
|
51
|
+
.FilePicker-ClearButton {
|
|
52
|
+
visibility: hidden;
|
|
53
|
+
transition: visibility var(--transition-default);
|
|
97
54
|
}
|
|
98
|
-
.
|
|
99
|
-
|
|
55
|
+
.FilePicker-ClearButton_visibility {
|
|
56
|
+
visibility: visible;
|
|
57
|
+
}
|
|
58
|
+
.FilePicker-RenderRight {
|
|
59
|
+
display: flex;
|
|
60
|
+
gap: var(--spacing-2xs);
|
|
100
61
|
}
|
|
101
|
-
|
|
62
|
+
|
|
63
|
+
.FieldControl_hasLabel .FilePicker-Placeholder {
|
|
102
64
|
opacity: 0;
|
|
103
65
|
}
|
|
104
|
-
|
|
105
|
-
|
|
66
|
+
|
|
67
|
+
.FieldControl_hasLabel .FilePicker-FileName,
|
|
68
|
+
.FieldControl_hasLabel .FilePicker-Placeholder {
|
|
106
69
|
padding: var(--textfield-input-padding);
|
|
107
|
-
font: var(--textfield-input-font);
|
|
108
70
|
}
|
|
109
|
-
.FilePicker:hover {
|
|
110
|
-
--textfield-border-color: var(--color-border-main-hover);
|
|
111
|
-
}
|
|
112
|
-
.FilePicker_focused,
|
|
113
|
-
.FilePicker_focused:hover {
|
|
114
|
-
--textfield-border-width: var(--border-width-m);
|
|
115
|
-
--textfield-background-color: var(--color-background-main);
|
|
116
|
-
--textfield-border-color: var(--color-border-action);
|
|
117
|
-
}
|
|
118
|
-
.FilePicker_error,
|
|
119
|
-
.FilePicker_error.FilePicker:hover,
|
|
120
|
-
.FilePicker_error.FilePicker_focused,
|
|
121
|
-
.FilePicker_error.FilePicker_focused:hover {
|
|
122
|
-
--textfield-border-color: var(--color-border-error);
|
|
123
|
-
}
|
|
124
|
-
.FilePicker_disabled {
|
|
125
|
-
--textfield-border-color: var(--color-border-disabled);
|
|
126
|
-
--textfield-background-color: var(--color-background-disabled);
|
|
127
|
-
--textfield-color: var(--color-content-secondary);
|
|
128
|
-
pointer-events: none;
|
|
129
|
-
cursor: default;
|
|
130
|
-
}
|
|
@@ -1,4 +1,72 @@
|
|
|
1
1
|
import './FilePicker.css';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const cnFilePicker: import("@bem-react/classname").ClassNameFormatter;
|
|
4
|
-
export declare const FilePicker: React.ForwardRefExoticComponent<
|
|
4
|
+
export declare const FilePicker: React.ForwardRefExoticComponent<{
|
|
5
|
+
id?: string | undefined;
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
size?: "s" | "m" | "l" | "2xs" | "xs" | undefined;
|
|
8
|
+
label?: string | undefined;
|
|
9
|
+
accept?: string | undefined;
|
|
10
|
+
placeholder?: string | undefined;
|
|
11
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
12
|
+
multiple?: boolean | undefined;
|
|
13
|
+
fileList?: File[] | undefined;
|
|
14
|
+
fullWidth?: boolean | undefined;
|
|
15
|
+
autoFocus?: boolean | undefined;
|
|
16
|
+
inputProps?: (Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
17
|
+
ref?: ((instance: HTMLInputElement | null) => void) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
18
|
+
} & {
|
|
19
|
+
'data-testid'?: string | undefined;
|
|
20
|
+
}) | undefined;
|
|
21
|
+
disableTruncate?: boolean | undefined;
|
|
22
|
+
required?: boolean | undefined;
|
|
23
|
+
renderLeft?: string | number | React.FC<React.SVGProps<SVGSVGElement> & {
|
|
24
|
+
color?: string | undefined;
|
|
25
|
+
ref?: React.Ref<SVGSVGElement> | undefined;
|
|
26
|
+
} & {
|
|
27
|
+
size?: import("@ozen-ui/icons").IconSize | undefined;
|
|
28
|
+
}> | React.ReactElement<React.SVGProps<SVGSVGElement> & {
|
|
29
|
+
color?: string | undefined;
|
|
30
|
+
ref?: React.Ref<SVGSVGElement> | undefined;
|
|
31
|
+
} & {
|
|
32
|
+
size?: import("@ozen-ui/icons").IconSize | undefined;
|
|
33
|
+
}, string | React.JSXElementConstructor<any>> | (() => React.ReactElement<React.SVGProps<SVGSVGElement> & {
|
|
34
|
+
color?: string | undefined;
|
|
35
|
+
ref?: React.Ref<SVGSVGElement> | undefined;
|
|
36
|
+
} & {
|
|
37
|
+
size?: import("@ozen-ui/icons").IconSize | undefined;
|
|
38
|
+
}, string | React.JSXElementConstructor<any>>) | undefined;
|
|
39
|
+
renderRight?: string | number | React.FC<React.SVGProps<SVGSVGElement> & {
|
|
40
|
+
color?: string | undefined;
|
|
41
|
+
ref?: React.Ref<SVGSVGElement> | undefined;
|
|
42
|
+
} & {
|
|
43
|
+
size?: import("@ozen-ui/icons").IconSize | undefined;
|
|
44
|
+
}> | React.ReactElement<React.SVGProps<SVGSVGElement> & {
|
|
45
|
+
color?: string | undefined;
|
|
46
|
+
ref?: React.Ref<SVGSVGElement> | undefined;
|
|
47
|
+
} & {
|
|
48
|
+
size?: import("@ozen-ui/icons").IconSize | undefined;
|
|
49
|
+
}, string | React.JSXElementConstructor<any>> | (() => React.ReactElement<React.SVGProps<SVGSVGElement> & {
|
|
50
|
+
color?: string | undefined;
|
|
51
|
+
ref?: React.Ref<SVGSVGElement> | undefined;
|
|
52
|
+
} & {
|
|
53
|
+
size?: import("@ozen-ui/icons").IconSize | undefined;
|
|
54
|
+
}, string | React.JSXElementConstructor<any>>) | undefined;
|
|
55
|
+
hint?: string | null | undefined;
|
|
56
|
+
error?: boolean | undefined;
|
|
57
|
+
disabled?: boolean | undefined;
|
|
58
|
+
labelProps?: import("../FieldLabel").FieldLabelProps | undefined;
|
|
59
|
+
renderValue?: import("./types").FilePickerRenderValue | undefined;
|
|
60
|
+
clearText?: string | undefined;
|
|
61
|
+
onClear?: ((e: React.KeyboardEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, globalThis.MouseEvent>, payload: {
|
|
62
|
+
name?: string | undefined;
|
|
63
|
+
}) => void) | undefined;
|
|
64
|
+
className?: string | undefined;
|
|
65
|
+
'data-testid'?: string | undefined;
|
|
66
|
+
} & {
|
|
67
|
+
labelRef?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
68
|
+
inputRef?: React.Ref<HTMLInputElement> | undefined;
|
|
69
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "name" | "label" | "className" | "id" | "onChange" | "autoFocus" | "disabled" | "accept" | "multiple" | "placeholder" | "required" | "size" | "error" | "fullWidth" | "labelProps" | "data-testid" | "hint" | "renderLeft" | "renderRight" | "inputProps" | "clearText" | "onClear" | "fileList" | "disableTruncate" | "renderValue" | keyof {
|
|
70
|
+
labelRef?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
71
|
+
inputRef?: React.Ref<HTMLInputElement> | undefined;
|
|
72
|
+
}> & React.RefAttributes<HTMLDivElement>>;
|