siam-ui-utils 3.1.4 → 3.2.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/dist/CustomBootstrap.js +9 -2
- package/dist/CustomBootstrap.js.map +1 -1
- package/dist/copy-link/index.js +3 -3
- package/dist/copy-link/index.js.map +1 -1
- package/dist/custom-input/CustomInputCheckbox.js +30 -12
- package/dist/custom-input/CustomInputCheckbox.js.map +1 -1
- package/dist/custom-input/CustomInputCurrency.js +1 -1
- package/dist/custom-input/CustomInputCurrency.js.map +1 -1
- package/dist/custom-input/CustomInputFile.js +28 -19
- package/dist/custom-input/CustomInputFile.js.map +1 -1
- package/dist/custom-input/CustomInputRadio.js +31 -47
- package/dist/custom-input/CustomInputRadio.js.map +1 -1
- package/dist/custom-input/index.css +25 -167
- package/dist/drag-and-dropzone/config.js +52 -51
- package/dist/drag-and-dropzone/config.js.map +1 -1
- package/dist/drag-and-dropzone/index.css +271 -276
- package/dist/drag-and-dropzone/index.js +30 -16
- package/dist/drag-and-dropzone/index.js.map +1 -1
- package/dist/dropzone-uploader/styled/index.css +165 -348
- package/dist/dropzone-uploader/styled/index.js +71 -60
- package/dist/dropzone-uploader/styled/index.js.map +1 -1
- package/dist/react-notifications/NotificationManager.js +14 -0
- package/dist/react-notifications/NotificationManager.js.map +1 -0
- package/dist/react-notifications/index.js +2 -1
- package/dist/react-notifications/index.js.map +1 -1
- package/dist/select/custom-select/index.js +53 -1
- package/dist/select/custom-select/index.js.map +1 -1
- package/dist/select/multi-select/index.js +6 -3
- package/dist/select/multi-select/index.js.map +1 -1
- package/dist/select/multi-select/styled-component.js +1 -1
- package/dist/select/multi-select/styled-component.js.map +1 -1
- package/dist/tomar-foto/index.js +1 -1
- package/dist/tomar-foto/index.js.map +1 -1
- package/package.json +5 -4
- package/dist/_virtual/_commonjsHelpers.js +0 -7
- package/dist/_virtual/_commonjsHelpers.js.map +0 -1
- package/dist/_virtual/index.js +0 -8
- package/dist/_virtual/index.js.map +0 -1
- package/dist/_virtual/index2.js +0 -5
- package/dist/_virtual/index2.js.map +0 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Badge.js +0 -77
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Badge.js.map +0 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Button.js +0 -111
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Button.js.map +0 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/CloseButton.js +0 -106
- package/dist/node_modules/@neolution-ch/reactstrap/esm/CloseButton.js.map +0 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Col.js +0 -125
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Col.js.map +0 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/FormGroup.js +0 -75
- package/dist/node_modules/@neolution-ch/reactstrap/esm/FormGroup.js.map +0 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Input.js +0 -225
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Input.js.map +0 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Label.js +0 -122
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Label.js.map +0 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Row.js +0 -83
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Row.js.map +0 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/utils.js +0 -68
- package/dist/node_modules/@neolution-ch/reactstrap/esm/utils.js.map +0 -1
- package/dist/node_modules/classnames/index.js +0 -62
- package/dist/node_modules/classnames/index.js.map +0 -1
|
@@ -1,276 +1,271 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
.dropzone.dz-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
.
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
.
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
border-radius:
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
width:
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
.dropzone .dz-preview {
|
|
275
|
-
margin: 0;
|
|
276
|
-
}
|
|
1
|
+
/* ── Drop zone container ─────────────────────────────────────────── */
|
|
2
|
+
.filepicker.dropzone {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: stretch;
|
|
6
|
+
min-height: 120px;
|
|
7
|
+
padding: 12px;
|
|
8
|
+
border: 1px solid var(--dz-border, #D6D6D6);
|
|
9
|
+
border-radius: 12px;
|
|
10
|
+
background-color: #fff;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
transition: border-color 0.2s ease, background-color 0.2s ease,
|
|
13
|
+
box-shadow 0.2s ease;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
position: relative;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.filepicker.dropzone.dz-clickable:hover {
|
|
20
|
+
border-color: var(--dz-primary, #016E6C);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.filepicker.dropzone.dz-drag-hover {
|
|
24
|
+
border-color: var(--dz-primary, #016E6C);
|
|
25
|
+
border-style: dashed;
|
|
26
|
+
background-color: var(--dz-active-bg, #E6F1F1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.filepicker.dropzone.dz-disabled-zone {
|
|
30
|
+
opacity: 0.5;
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
cursor: not-allowed;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* ── Default message (empty state) ──────────────────────────────── */
|
|
36
|
+
.filepicker.dropzone .dz-message {
|
|
37
|
+
flex: 1;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
gap: 8px;
|
|
43
|
+
min-height: 96px;
|
|
44
|
+
color: var(--dz-primary, #016E6C);
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Upload icon — circle bubble with upload arrow centered */
|
|
49
|
+
.filepicker.dropzone .dz-message::before {
|
|
50
|
+
content: '';
|
|
51
|
+
display: block;
|
|
52
|
+
width: 40px;
|
|
53
|
+
height: 40px;
|
|
54
|
+
flex-shrink: 0;
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
background-color: var(--dz-active-bg, #E6F1F1);
|
|
57
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23016E6C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
|
|
58
|
+
background-repeat: no-repeat;
|
|
59
|
+
background-position: center;
|
|
60
|
+
background-size: 20px 20px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.filepicker.dropzone .dz-message .dz-button {
|
|
64
|
+
background: none;
|
|
65
|
+
border: none;
|
|
66
|
+
padding: 0;
|
|
67
|
+
font-size: 12px;
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
color: var(--dz-primary, #016E6C);
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.filepicker.dropzone .dz-message .dz-button::after {
|
|
74
|
+
content: 'Arrastrá archivos aquí o hacé clic para seleccionar';
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.filepicker.dropzone.dz-started .dz-message {
|
|
78
|
+
display: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* ── Preview list ────────────────────────────────────────────────── */
|
|
82
|
+
.filepicker.dropzone .dz-preview {
|
|
83
|
+
width: 100%;
|
|
84
|
+
animation: dz-slide-in 0.18s ease;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.filepicker.dropzone .dz-preview + .dz-preview {
|
|
88
|
+
margin-top: 6px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@keyframes dz-slide-in {
|
|
92
|
+
from { opacity: 0; transform: translateY(6px); }
|
|
93
|
+
to { opacity: 1; transform: translateY(0); }
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* ── Preview row ─────────────────────────────────────────────────── */
|
|
97
|
+
.dz-preview-inner {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
gap: 10px;
|
|
101
|
+
padding: 8px 10px;
|
|
102
|
+
border: 1px solid var(--dz-border, #D6D6D6);
|
|
103
|
+
border-radius: 8px;
|
|
104
|
+
background: #fff;
|
|
105
|
+
position: relative;
|
|
106
|
+
transition: border-color 0.15s ease;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.dz-preview.dz-error .dz-preview-inner {
|
|
110
|
+
border-color: var(--dz-error, #FE4727);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* ── Thumbnail ───────────────────────────────────────────────────── */
|
|
114
|
+
.dz-preview-thumb {
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
width: 44px;
|
|
117
|
+
height: 44px;
|
|
118
|
+
border-radius: 8px;
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
background-color: var(--dz-active-bg, #E6F1F1);
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
justify-content: center;
|
|
124
|
+
position: relative;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dz-preview-thumb img[data-dz-thumbnail] {
|
|
128
|
+
width: 44px;
|
|
129
|
+
height: 44px;
|
|
130
|
+
object-fit: cover;
|
|
131
|
+
display: none;
|
|
132
|
+
border-radius: 8px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.dz-image-preview .dz-preview-thumb img[data-dz-thumbnail] {
|
|
136
|
+
display: block;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.dz-image-preview .dz-preview-thumb .dz-file-icon {
|
|
140
|
+
display: none;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* File icon via mask so it respects --dz-primary */
|
|
144
|
+
.dz-file-icon {
|
|
145
|
+
width: 44px;
|
|
146
|
+
height: 44px;
|
|
147
|
+
background-color: var(--dz-primary, #016E6C);
|
|
148
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
|
|
149
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
|
|
150
|
+
-webkit-mask-size: 18px 18px;
|
|
151
|
+
mask-size: 18px 18px;
|
|
152
|
+
-webkit-mask-repeat: no-repeat;
|
|
153
|
+
mask-repeat: no-repeat;
|
|
154
|
+
-webkit-mask-position: center;
|
|
155
|
+
mask-position: center;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* ── Success / error mark overlays ──────────────────────────────── */
|
|
159
|
+
.dz-success-mark,
|
|
160
|
+
.dz-error-mark {
|
|
161
|
+
position: absolute;
|
|
162
|
+
inset: 0;
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
justify-content: center;
|
|
166
|
+
border-radius: 8px;
|
|
167
|
+
opacity: 0;
|
|
168
|
+
pointer-events: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.dz-success-mark { background: rgba(1, 110, 108, 0.80); }
|
|
172
|
+
.dz-error-mark { background: rgba(254, 71, 39, 0.80); }
|
|
173
|
+
|
|
174
|
+
.dz-success-mark svg,
|
|
175
|
+
.dz-error-mark svg {
|
|
176
|
+
width: 18px;
|
|
177
|
+
height: 18px;
|
|
178
|
+
color: #fff;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.dz-preview.dz-success .dz-success-mark {
|
|
182
|
+
opacity: 1;
|
|
183
|
+
animation: dz-fade-out 2s ease 0.5s forwards;
|
|
184
|
+
}
|
|
185
|
+
.dz-preview.dz-error .dz-error-mark {
|
|
186
|
+
opacity: 1;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@keyframes dz-fade-out {
|
|
190
|
+
to { opacity: 0; }
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* ── File info ───────────────────────────────────────────────────── */
|
|
194
|
+
.dz-preview-info {
|
|
195
|
+
flex: 1;
|
|
196
|
+
min-width: 0;
|
|
197
|
+
display: flex;
|
|
198
|
+
flex-direction: column;
|
|
199
|
+
gap: 1px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.dz-filename {
|
|
203
|
+
font-size: 12px;
|
|
204
|
+
font-weight: 500;
|
|
205
|
+
color: #545454;
|
|
206
|
+
white-space: nowrap;
|
|
207
|
+
overflow: hidden;
|
|
208
|
+
text-overflow: ellipsis;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.dz-filesize {
|
|
212
|
+
font-size: 11px;
|
|
213
|
+
color: #A9A9A9;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* ── Progress bar ────────────────────────────────────────────────── */
|
|
217
|
+
.dz-progress {
|
|
218
|
+
height: 3px;
|
|
219
|
+
border-radius: 2px;
|
|
220
|
+
background: var(--dz-border, #D6D6D6);
|
|
221
|
+
overflow: hidden;
|
|
222
|
+
margin-top: 4px;
|
|
223
|
+
display: none;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.dz-preview.dz-processing .dz-progress { display: block; }
|
|
227
|
+
|
|
228
|
+
.dz-upload {
|
|
229
|
+
display: block;
|
|
230
|
+
height: 100%;
|
|
231
|
+
background: var(--dz-primary, #016E6C);
|
|
232
|
+
border-radius: 2px;
|
|
233
|
+
width: 0;
|
|
234
|
+
transition: width 300ms ease;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* ── Error message ───────────────────────────────────────────────── */
|
|
238
|
+
.dz-error-message {
|
|
239
|
+
display: none;
|
|
240
|
+
font-size: 11px;
|
|
241
|
+
color: var(--dz-error, #FE4727);
|
|
242
|
+
margin-top: 2px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.dz-preview.dz-error .dz-error-message { display: block; }
|
|
246
|
+
|
|
247
|
+
/* ── Remove button ───────────────────────────────────────────────── */
|
|
248
|
+
.dz-remove-btn {
|
|
249
|
+
flex-shrink: 0;
|
|
250
|
+
display: flex;
|
|
251
|
+
align-items: center;
|
|
252
|
+
justify-content: center;
|
|
253
|
+
width: 28px;
|
|
254
|
+
height: 28px;
|
|
255
|
+
border: none;
|
|
256
|
+
border-radius: 8px;
|
|
257
|
+
background: transparent;
|
|
258
|
+
color: var(--dz-error, #FE4727);
|
|
259
|
+
cursor: pointer;
|
|
260
|
+
transition: background-color 0.15s ease;
|
|
261
|
+
padding: 0;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.dz-remove-btn:hover {
|
|
265
|
+
background-color: rgba(254, 71, 39, 0.08);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.dz-remove-btn svg {
|
|
269
|
+
width: 13px;
|
|
270
|
+
height: 13px;
|
|
271
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from "styled-components";
|
|
2
3
|
import DropzoneComponent from "./DropzoneComponent.js";
|
|
3
|
-
import {
|
|
4
|
+
import { dropzoneComponentConfig, buildDropzoneConfig } from "./config.js";
|
|
4
5
|
import "./index.css";
|
|
5
6
|
const DragAndDropZone = ({
|
|
6
7
|
files = [],
|
|
@@ -12,24 +13,37 @@ const DragAndDropZone = ({
|
|
|
12
13
|
},
|
|
13
14
|
className = ""
|
|
14
15
|
}) => {
|
|
15
|
-
const
|
|
16
|
+
const theme = useTheme();
|
|
17
|
+
const primaryColor = theme?.colors?.primary?.base ?? "#016E6C";
|
|
18
|
+
const borderColor = theme?.colors?.neutral?.borderLight ?? "#D6D6D6";
|
|
19
|
+
const surfaceHover = theme?.colors?.primary?.surfaceHover ?? "#E6F1F1";
|
|
20
|
+
const errorColor = theme?.colors?.error?.base ?? "#FE4727";
|
|
21
|
+
const stateClass = disableUpload ? "dz-disabled-zone" : "";
|
|
22
|
+
const combinedClass = [className, stateClass].filter(Boolean).join(" ");
|
|
16
23
|
return /* @__PURE__ */ jsx(
|
|
17
|
-
|
|
24
|
+
"div",
|
|
18
25
|
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
style: {
|
|
27
|
+
"--dz-primary": primaryColor,
|
|
28
|
+
"--dz-border": borderColor,
|
|
29
|
+
"--dz-active-bg": surfaceHover,
|
|
30
|
+
"--dz-error": errorColor
|
|
31
|
+
},
|
|
32
|
+
children: /* @__PURE__ */ jsx(
|
|
33
|
+
DropzoneComponent,
|
|
34
|
+
{
|
|
35
|
+
config: dropzoneComponentConfig,
|
|
36
|
+
initialFiles: [files],
|
|
37
|
+
className: combinedClass,
|
|
38
|
+
djsConfig: buildDropzoneConfig({ disabled: disableUpload }),
|
|
39
|
+
eventHandlers: {
|
|
40
|
+
removedfile: (file) => onDeleteFile(file),
|
|
41
|
+
addedfile: (file) => onInsertFile(file)
|
|
42
|
+
}
|
|
26
43
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
keyDc
|
|
44
|
+
keyDc
|
|
45
|
+
)
|
|
46
|
+
}
|
|
33
47
|
);
|
|
34
48
|
};
|
|
35
49
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/drag-and-dropzone/index.jsx"],"sourcesContent":["import DropzoneComponent from './DropzoneComponent';\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/drag-and-dropzone/index.jsx"],"sourcesContent":["import { useTheme } from 'styled-components';\nimport DropzoneComponent from './DropzoneComponent';\nimport { dropzoneComponentConfig, buildDropzoneConfig } from './config';\nimport './index.css';\n\nexport const DragAndDropZone = ({\n files = [],\n keyDc = null,\n disableUpload = false,\n onDeleteFile = () => {},\n onInsertFile = () => {},\n className = '',\n}) => {\n const theme = useTheme();\n const primaryColor = theme?.colors?.primary?.base ?? '#016E6C';\n const borderColor = theme?.colors?.neutral?.borderLight ?? '#D6D6D6';\n const surfaceHover = theme?.colors?.primary?.surfaceHover ?? '#E6F1F1';\n const errorColor = theme?.colors?.error?.base ?? '#FE4727';\n\n const stateClass = disableUpload ? 'dz-disabled-zone' : '';\n const combinedClass = [className, stateClass].filter(Boolean).join(' ');\n\n return (\n <div\n style={{\n '--dz-primary': primaryColor,\n '--dz-border': borderColor,\n '--dz-active-bg': surfaceHover,\n '--dz-error': errorColor,\n }}\n >\n <DropzoneComponent\n key={keyDc}\n config={dropzoneComponentConfig}\n initialFiles={[files]}\n className={combinedClass}\n djsConfig={buildDropzoneConfig({ disabled: disableUpload })}\n eventHandlers={{\n removedfile: (file) => onDeleteFile(file),\n addedfile: (file) => onInsertFile(file),\n }}\n />\n </div>\n );\n};\n\nexport default DragAndDropZone;\n"],"names":[],"mappings":";;;;;AAKO,MAAM,kBAAkB,CAAC;AAAA,EAC9B,QAAQ,CAAA;AAAA,EACR,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,eAAe,MAAM;AAAA,EAAC;AAAA,EACtB,eAAe,MAAM;AAAA,EAAC;AAAA,EACtB,YAAY;AACd,MAAM;AACJ,QAAM,QAAQ,SAAA;AACd,QAAM,eAAe,OAAO,QAAQ,SAAS,QAAQ;AACrD,QAAM,cAAc,OAAO,QAAQ,SAAS,eAAe;AAC3D,QAAM,eAAe,OAAO,QAAQ,SAAS,gBAAgB;AAC7D,QAAM,aAAa,OAAO,QAAQ,OAAO,QAAQ;AAEjD,QAAM,aAAa,gBAAgB,qBAAqB;AACxD,QAAM,gBAAgB,CAAC,WAAW,UAAU,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAEtE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,gBAAgB;AAAA,QAChB,eAAe;AAAA,QACf,kBAAkB;AAAA,QAClB,cAAc;AAAA,MAAA;AAAA,MAGhB,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UAEC,QAAQ;AAAA,UACR,cAAc,CAAC,KAAK;AAAA,UACpB,WAAW;AAAA,UACX,WAAW,oBAAoB,EAAE,UAAU,eAAe;AAAA,UAC1D,eAAe;AAAA,YACb,aAAa,CAAC,SAAS,aAAa,IAAI;AAAA,YACxC,WAAW,CAAC,SAAS,aAAa,IAAI;AAAA,UAAA;AAAA,QACxC;AAAA,QARK;AAAA,MAAA;AAAA,IASP;AAAA,EAAA;AAGN;"}
|