siam-ui-utils 3.1.5 → 3.2.1

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.
Files changed (60) hide show
  1. package/dist/CustomBootstrap.js +2 -2
  2. package/dist/CustomBootstrap.js.map +1 -1
  3. package/dist/copy-link/index.js +3 -3
  4. package/dist/copy-link/index.js.map +1 -1
  5. package/dist/custom-input/CustomInputCheckbox.js +30 -12
  6. package/dist/custom-input/CustomInputCheckbox.js.map +1 -1
  7. package/dist/custom-input/CustomInputCurrency.js +1 -1
  8. package/dist/custom-input/CustomInputCurrency.js.map +1 -1
  9. package/dist/custom-input/CustomInputFile.js +28 -19
  10. package/dist/custom-input/CustomInputFile.js.map +1 -1
  11. package/dist/custom-input/CustomInputRadio.js +31 -47
  12. package/dist/custom-input/CustomInputRadio.js.map +1 -1
  13. package/dist/custom-input/index.css +25 -167
  14. package/dist/drag-and-dropzone/config.js +52 -51
  15. package/dist/drag-and-dropzone/config.js.map +1 -1
  16. package/dist/drag-and-dropzone/index.css +271 -276
  17. package/dist/drag-and-dropzone/index.js +30 -16
  18. package/dist/drag-and-dropzone/index.js.map +1 -1
  19. package/dist/dropzone-uploader/styled/index.css +165 -348
  20. package/dist/dropzone-uploader/styled/index.js +71 -60
  21. package/dist/dropzone-uploader/styled/index.js.map +1 -1
  22. package/dist/react-notifications/NotificationManager.js +14 -0
  23. package/dist/react-notifications/NotificationManager.js.map +1 -0
  24. package/dist/react-notifications/index.js +2 -1
  25. package/dist/react-notifications/index.js.map +1 -1
  26. package/dist/select/custom-select/index.js +59 -10
  27. package/dist/select/custom-select/index.js.map +1 -1
  28. package/dist/select/multi-select/index.js +6 -3
  29. package/dist/select/multi-select/index.js.map +1 -1
  30. package/dist/select/multi-select/styled-component.js +1 -1
  31. package/dist/select/multi-select/styled-component.js.map +1 -1
  32. package/dist/tomar-foto/index.js +1 -1
  33. package/dist/tomar-foto/index.js.map +1 -1
  34. package/package.json +3 -3
  35. package/dist/_virtual/_commonjsHelpers.js +0 -7
  36. package/dist/_virtual/_commonjsHelpers.js.map +0 -1
  37. package/dist/_virtual/index.js +0 -8
  38. package/dist/_virtual/index.js.map +0 -1
  39. package/dist/_virtual/index2.js +0 -5
  40. package/dist/_virtual/index2.js.map +0 -1
  41. package/dist/node_modules/@neolution-ch/reactstrap/esm/Badge.js +0 -77
  42. package/dist/node_modules/@neolution-ch/reactstrap/esm/Badge.js.map +0 -1
  43. package/dist/node_modules/@neolution-ch/reactstrap/esm/Button.js +0 -111
  44. package/dist/node_modules/@neolution-ch/reactstrap/esm/Button.js.map +0 -1
  45. package/dist/node_modules/@neolution-ch/reactstrap/esm/CloseButton.js +0 -106
  46. package/dist/node_modules/@neolution-ch/reactstrap/esm/CloseButton.js.map +0 -1
  47. package/dist/node_modules/@neolution-ch/reactstrap/esm/Col.js +0 -125
  48. package/dist/node_modules/@neolution-ch/reactstrap/esm/Col.js.map +0 -1
  49. package/dist/node_modules/@neolution-ch/reactstrap/esm/FormGroup.js +0 -75
  50. package/dist/node_modules/@neolution-ch/reactstrap/esm/FormGroup.js.map +0 -1
  51. package/dist/node_modules/@neolution-ch/reactstrap/esm/Input.js +0 -225
  52. package/dist/node_modules/@neolution-ch/reactstrap/esm/Input.js.map +0 -1
  53. package/dist/node_modules/@neolution-ch/reactstrap/esm/Label.js +0 -122
  54. package/dist/node_modules/@neolution-ch/reactstrap/esm/Label.js.map +0 -1
  55. package/dist/node_modules/@neolution-ch/reactstrap/esm/Row.js +0 -83
  56. package/dist/node_modules/@neolution-ch/reactstrap/esm/Row.js.map +0 -1
  57. package/dist/node_modules/@neolution-ch/reactstrap/esm/utils.js +0 -68
  58. package/dist/node_modules/@neolution-ch/reactstrap/esm/utils.js.map +0 -1
  59. package/dist/node_modules/classnames/index.js +0 -62
  60. package/dist/node_modules/classnames/index.js.map +0 -1
@@ -1,348 +1,165 @@
1
- .dzu-dropzone {
2
- display: flex;
3
- flex-direction: column;
4
- align-items: center;
5
- width: 100%;
6
- min-height: 120px;
7
- overflow: scroll;
8
- margin: 0 auto;
9
- position: relative;
10
- box-sizing: border-box;
11
- transition: all .15s linear;
12
- border: 2px solid #d9d9d9;
13
- border-radius: 4px;
14
- }
15
-
16
- .dzu-dropzoneActive {
17
- background-color: #DEEBFF;
18
- border-color: #2484FF;
19
- }
20
-
21
- .dzu-dropzoneDisabled {
22
- opacity: 0.5;
23
- }
24
-
25
- .dzu-dropzoneDisabled *:hover {
26
- cursor: unset;
27
- }
28
-
29
- .dzu-input {
30
- display: none;
31
- }
32
-
33
- .dzu-inputLabel {
34
- display: flex;
35
- justify-content: center;
36
- align-items: center;
37
- position: absolute;
38
- top: 0;
39
- bottom: 0;
40
- left: 0;
41
- right: 0;
42
- font-family: 'Helvetica', sans-serif;
43
- font-size: 20px;
44
- font-weight: 600;
45
- color: #2484FF;
46
- -moz-osx-font-smoothing: grayscale;
47
- -webkit-font-smoothing: antialiased;
48
- cursor: pointer;
49
- }
50
-
51
- .dzu-inputLabelWithFiles {
52
- display: flex;
53
- justify-content: center;
54
- align-items: center;
55
- align-self: flex-start;
56
- padding: 0 14px;
57
- min-height: 32px;
58
- background-color: #E6E6E6;
59
- color: #2484FF;
60
- border: none;
61
- font-family: 'Helvetica', sans-serif;
62
- border-radius: 4px;
63
- font-size: 14px;
64
- font-weight: 600;
65
- margin-top: 20px;
66
- margin-left: 3%;
67
- -moz-osx-font-smoothing: grayscale;
68
- -webkit-font-smoothing: antialiased;
69
- cursor: pointer;
70
- }
71
-
72
- .dzu-previewContainer {
73
- padding: 40px 3%;
74
- display: flex;
75
- flex-direction: row;
76
- align-items: center;
77
- justify-content: space-between;
78
- position: relative;
79
- width: 100%;
80
- min-height: 60px;
81
- z-index: 1;
82
- border-bottom: 1px solid #ECECEC;
83
- box-sizing: border-box;
84
- }
85
-
86
- .dzu-previewStatusContainer {
87
- display: flex;
88
- align-items: center;
89
- }
90
-
91
- .dzu-previewFileName {
92
- font-family: 'Helvetica', sans-serif;
93
- font-size: 14px;
94
- font-weight: 400;
95
- color: #333333;
96
- }
97
-
98
- .dzu-previewImage {
99
- width: auto;
100
- max-height: 40px;
101
- max-width: 140px;
102
- border-radius: 4px;
103
- }
104
-
105
- .dzu-previewButton {
106
- background-size: 14px 14px;
107
- background-position: center;
108
- background-repeat: no-repeat;
109
- width: 14px;
110
- height: 14px;
111
- cursor: pointer;
112
- opacity: 0.9;
113
- margin: 0 0 2px 10px;
114
- }
115
-
116
- .dzu-submitButtonContainer {
117
- margin: 24px 0;
118
- z-index: 1;
119
- }
120
-
121
- .dzu-submitButton {
122
- padding: 0 14px;
123
- min-height: 32px;
124
- background-color: #2484FF;
125
- border: none;
126
- border-radius: 4px;
127
- font-family: 'Helvetica', sans-serif;
128
- font-size: 14px;
129
- font-weight: 600;
130
- color: #FFF;
131
- -moz-osx-font-smoothing: grayscale;
132
- -webkit-font-smoothing: antialiased;
133
- cursor: pointer;
134
- }
135
-
136
- .dzu-submitButton:disabled {
137
- background-color: #E6E6E6;
138
- color: #333333;
139
- cursor: unset;
140
- }
141
-
142
- .dropzone-upload-button {
143
- padding: 25;
144
- border-radius: 5px !important;
145
- cursor: pointer;
146
- color: #fff;
147
- width: 10rem !important;
148
- height: 2rem !important;
149
- line-height: 1.5 !important;
150
- font-size: 13px;
151
- text-align: center;
152
- vertical-align: middle !important;
153
- border: none;
154
- padding-top: 0.5rem;
155
- margin-top: 0.5rem;
156
- background-color: #af251b;
157
- &:hover {
158
- background-color: rgb(108, 31, 1);
159
- }
160
- }
161
- .dropzone-upload-frame {
162
- border: 0px !important;
163
- overflow: 'none' !important;
164
- }
165
- .dropzone-upload-previewContainer {
166
- display: flex;
167
- flex-direction: row;
168
- align-items: center;
169
- justify-content: space-between;
170
- position: relative;
171
- width: 100px;
172
- min-height: 60px;
173
- z-index: 1;
174
- border-bottom: 1px solid #ececec;
175
- box-sizing: border-box;
176
- }
177
-
178
- .dropzone-upload-previewImage {
179
- width: 60rem;
180
- max-height: 60px;
181
- max-width: 10rem;
182
- border-radius: 4px;
183
- padding-right: 1rem;
184
- }
185
-
186
- .dropzone-upload-delete-btn {
187
- width: 2rem;
188
- line-height: 1.5;
189
- border: 0;
190
- color: #ff0000;
191
- background-color: #f8f8f8;
192
- padding-right: 1rem;
193
- }
194
-
195
- .dropzone-upload-file-name-container {
196
- position: relative;
197
- display: inline-block;
198
- max-width: 150px; /* Ajusta este valor para aumentar el ancho */
199
- }
200
-
201
- .dropzone-upload-file-name {
202
- padding-right: 1rem;
203
- white-space: nowrap;
204
- overflow: hidden;
205
- text-overflow: ellipsis;
206
- max-width: 150px; /* Ajusta este valor para aumentar el ancho */
207
- }
208
-
209
- .dzu-dropzone {
210
- display: flex;
211
- flex-direction: column;
212
- align-items: center;
213
- width: 100%;
214
- min-height: 120px;
215
- overflow: scroll;
216
- margin: 0 auto;
217
- position: relative;
218
- box-sizing: border-box;
219
- transition: all 0.15s linear;
220
- border: 2px solid #d9d9d9;
221
- border-radius: 4px;
222
- }
223
-
224
- .dzu-dropzoneActive {
225
- background-color: #deebff;
226
- border-color: #2484ff;
227
- }
228
-
229
- .dzu-dropzoneDisabled {
230
- opacity: 0.5;
231
- }
232
-
233
- .dzu-dropzoneDisabled *:hover {
234
- cursor: unset;
235
- }
236
-
237
- .dzu-input {
238
- display: none;
239
- }
240
-
241
- .dzu-inputLabel {
242
- display: flex;
243
- justify-content: center;
244
- align-items: center;
245
- position: absolute;
246
- top: 0;
247
- bottom: 0;
248
- left: 0;
249
- right: 0;
250
- font-family: 'Helvetica', sans-serif;
251
- font-size: 20px;
252
- font-weight: 600;
253
- color: #2484ff;
254
- -moz-osx-font-smoothing: grayscale;
255
- -webkit-font-smoothing: antialiased;
256
- cursor: pointer;
257
- }
258
-
259
- .dzu-inputLabelWithFiles {
260
- display: flex;
261
- justify-content: center;
262
- align-items: center;
263
- align-self: flex-start;
264
- padding: 0 14px;
265
- min-height: 32px;
266
- background-color: #e6e6e6;
267
- color: #2484ff;
268
- border: none;
269
- font-family: 'Helvetica', sans-serif;
270
- border-radius: 4px;
271
- font-size: 14px;
272
- font-weight: 600;
273
- margin-top: 20px;
274
- margin-left: 3%;
275
- -moz-osx-font-smoothing: grayscale;
276
- -webkit-font-smoothing: antialiased;
277
- cursor: pointer;
278
- }
279
-
280
- .dzu-previewContainer {
281
- padding: 40px 3%;
282
- display: flex;
283
- flex-direction: row;
284
- align-items: center;
285
- justify-content: space-between;
286
- position: relative;
287
- width: 100%;
288
- min-height: 60px;
289
- z-index: 1;
290
- border-bottom: 1px solid #ececec;
291
- box-sizing: border-box;
292
- }
293
-
294
- .dzu-previewStatusContainer {
295
- display: flex;
296
- align-items: center;
297
- }
298
-
299
- .dzu-previewFileName {
300
- font-family: 'Helvetica', sans-serif;
301
- font-size: 14px;
302
- font-weight: 400;
303
- color: #333333;
304
- }
305
-
306
- .dzu-previewImage {
307
- width: auto;
308
- max-height: 40px;
309
- max-width: 140px;
310
- border-radius: 4px;
311
- }
312
-
313
- .dzu-previewButton {
314
- background-size: 14px 14px;
315
- background-position: center;
316
- background-repeat: no-repeat;
317
- width: 14px;
318
- height: 14px;
319
- cursor: pointer;
320
- opacity: 0.9;
321
- margin: 0 0 2px 10px;
322
- }
323
-
324
- .dzu-submitButtonContainer {
325
- margin: 24px 0;
326
- z-index: 1;
327
- }
328
-
329
- .dzu-submitButton {
330
- padding: 0 14px;
331
- min-height: 32px;
332
- background-color: #2484ff;
333
- border: none;
334
- border-radius: 4px;
335
- font-family: 'Helvetica', sans-serif;
336
- font-size: 14px;
337
- font-weight: 600;
338
- color: #fff;
339
- -moz-osx-font-smoothing: grayscale;
340
- -webkit-font-smoothing: antialiased;
341
- cursor: pointer;
342
- }
343
-
344
- .dzu-submitButton:disabled {
345
- background-color: #e6e6e6;
346
- color: #333333;
347
- cursor: unset;
348
- }
1
+ .dzu-dropzone {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ width: 100%;
6
+ min-height: 120px;
7
+ overflow: scroll;
8
+ margin: 0 auto;
9
+ position: relative;
10
+ box-sizing: border-box;
11
+ transition: all 0.15s linear;
12
+ border: 2px solid var(--dropzone-border, #D6D6D6);
13
+ border-radius: 4px;
14
+ }
15
+
16
+ .dzu-dropzoneActive {
17
+ background-color: var(--dropzone-active-bg, #E6F1F1);
18
+ border-color: var(--dropzone-primary, #016E6C);
19
+ }
20
+
21
+ .dzu-dropzoneDisabled {
22
+ opacity: 0.5;
23
+ }
24
+
25
+ .dzu-dropzoneDisabled *:hover {
26
+ cursor: unset;
27
+ }
28
+
29
+ .dzu-input {
30
+ display: none;
31
+ }
32
+
33
+ .dzu-inputLabel {
34
+ display: flex;
35
+ justify-content: center;
36
+ align-items: center;
37
+ position: absolute;
38
+ top: 0; bottom: 0; left: 0; right: 0;
39
+ font-size: 20px;
40
+ font-weight: 600;
41
+ color: var(--dropzone-primary, #016E6C);
42
+ cursor: pointer;
43
+ }
44
+
45
+ .dzu-inputLabelWithFiles {
46
+ display: flex;
47
+ justify-content: center;
48
+ align-items: center;
49
+ align-self: flex-start;
50
+ padding: 0 14px;
51
+ min-height: 32px;
52
+ background-color: #E6E6E6;
53
+ color: var(--dropzone-primary, #016E6C);
54
+ border: none;
55
+ border-radius: 4px;
56
+ font-size: 14px;
57
+ font-weight: 600;
58
+ margin-top: 20px;
59
+ margin-left: 3%;
60
+ cursor: pointer;
61
+ }
62
+
63
+ .dzu-previewContainer {
64
+ padding: 40px 3%;
65
+ display: flex;
66
+ flex-direction: row;
67
+ align-items: center;
68
+ justify-content: space-between;
69
+ position: relative;
70
+ width: 100%;
71
+ min-height: 60px;
72
+ z-index: 1;
73
+ border-bottom: 1px solid #ECECEC;
74
+ box-sizing: border-box;
75
+ }
76
+
77
+ .dzu-previewStatusContainer {
78
+ display: flex;
79
+ align-items: center;
80
+ }
81
+
82
+ .dzu-previewFileName {
83
+ font-size: 14px;
84
+ font-weight: 400;
85
+ color: #333333;
86
+ }
87
+
88
+ .dzu-previewImage {
89
+ width: auto;
90
+ max-height: 40px;
91
+ max-width: 140px;
92
+ border-radius: 4px;
93
+ }
94
+
95
+ .dzu-previewButton {
96
+ background-size: 14px 14px;
97
+ background-position: center;
98
+ background-repeat: no-repeat;
99
+ width: 14px;
100
+ height: 14px;
101
+ cursor: pointer;
102
+ opacity: 0.9;
103
+ margin: 0 0 2px 10px;
104
+ }
105
+
106
+ .dzu-submitButtonContainer {
107
+ margin: 24px 0;
108
+ z-index: 1;
109
+ }
110
+
111
+ .dzu-submitButton {
112
+ padding: 0 14px;
113
+ min-height: 32px;
114
+ background-color: var(--dropzone-primary, #016E6C);
115
+ border: none;
116
+ border-radius: 4px;
117
+ font-size: 14px;
118
+ font-weight: 600;
119
+ color: #FFF;
120
+ cursor: pointer;
121
+ }
122
+
123
+ .dzu-submitButton:disabled {
124
+ background-color: #E6E6E6;
125
+ color: #333333;
126
+ cursor: unset;
127
+ }
128
+
129
+ .dropzone-upload-frame {
130
+ border: 0 !important;
131
+ }
132
+
133
+ .dropzone-upload-previewContainer {
134
+ display: flex;
135
+ flex-direction: row;
136
+ align-items: center;
137
+ justify-content: space-between;
138
+ position: relative;
139
+ width: 100px;
140
+ min-height: 60px;
141
+ z-index: 1;
142
+ border-bottom: 1px solid #ECECEC;
143
+ box-sizing: border-box;
144
+ }
145
+
146
+ .dropzone-upload-previewImage {
147
+ max-height: 60px;
148
+ max-width: 10rem;
149
+ border-radius: 4px;
150
+ padding-right: 1rem;
151
+ }
152
+
153
+ .dropzone-upload-file-name-container {
154
+ position: relative;
155
+ display: inline-block;
156
+ max-width: 150px;
157
+ }
158
+
159
+ .dropzone-upload-file-name {
160
+ padding-right: 1rem;
161
+ white-space: nowrap;
162
+ overflow: hidden;
163
+ text-overflow: ellipsis;
164
+ max-width: 150px;
165
+ }
@@ -1,7 +1,8 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { getDroppedOrSelectedFiles } from "html5-file-selector";
3
- import { useState } from "react";
4
- import Button from "../../node_modules/@neolution-ch/reactstrap/esm/Button.js";
3
+ import { useState, useRef } from "react";
4
+ import { useTheme } from "styled-components";
5
+ import { Button } from "siam-ui";
5
6
  import { Dropzone } from "../../dropzone/index.js";
6
7
  import "./index.css";
7
8
  import { IconButtonSvg as _t } from "../../iconos/icon-button-svg.js";
@@ -18,19 +19,18 @@ const DropzoneUploaderStyled = ({
18
19
  alert("El archivo supera el tamaño máximo");
19
20
  }
20
21
  }) => {
22
+ const theme = useTheme();
23
+ const primaryColor = theme?.colors?.primary?.base ?? "#016E6C";
24
+ const borderColor = theme?.colors?.neutral?.borderLight ?? "#D6D6D6";
25
+ const surfaceHover = theme?.colors?.primary?.surfaceHover ?? "#E6F1F1";
21
26
  const [files, setFiles] = useState([]);
22
27
  const handleChangeStatus = ({ file }, status) => {
23
28
  if (status === "done") {
24
- const filesTemp = files;
25
- filesTemp.push(file);
29
+ const filesTemp = [...files, file];
26
30
  setFiles(filesTemp);
27
31
  onChangeFiles(filesTemp);
28
32
  } else if (status === "removed") {
29
- const filesTemp = files;
30
- const index = filesTemp.indexOf(file);
31
- if (index > -1) {
32
- filesTemp.splice(index, 1);
33
- }
33
+ const filesTemp = files.filter((f) => f !== file);
34
34
  setFiles(filesTemp);
35
35
  onChangeFiles(filesTemp);
36
36
  }
@@ -74,74 +74,85 @@ const DropzoneUploaderStyled = ({
74
74
  className: "dropzone-upload-previewImage mt-1",
75
75
  src: meta.previewUrl,
76
76
  alt: meta.name,
77
- style: {
78
- width: "110px",
79
- height: "110px",
80
- objectFit: "cover",
81
- marginRight: "0.5rem"
82
- }
77
+ style: { width: "110px", height: "110px", objectFit: "cover", marginRight: "0.5rem" }
83
78
  }
84
79
  ),
85
80
  /* @__PURE__ */ jsx("div", { className: "dropzone-upload-file-name-container", children: /* @__PURE__ */ jsx("p", { className: "dropzone-upload-file-name", title: meta.name, children: meta.name }) })
86
81
  ] }),
87
82
  /* @__PURE__ */ jsx(
88
- "button",
83
+ Button,
89
84
  {
90
- style: { marginTop: "0rem" },
85
+ $variant: "transparent",
86
+ $size: "small",
91
87
  onClick: remove,
92
- className: "dropzone-upload-delete-btn simple-icon-trash"
88
+ style: { color: theme?.colors?.error?.base ?? "#FE4727", padding: "0 4px" },
89
+ children: /* @__PURE__ */ jsx(TrashIcon, { color: theme?.colors?.error?.base ?? "#FE4727" })
93
90
  }
94
91
  )
95
92
  ]
96
93
  }
97
94
  );
98
95
  };
99
- const Input = ({ accept: accept2, onFiles, getFilesFromEvent: getFilesFromEvent2 }) => {
100
- const text = totalFiles > 0 ? `${maxFiles - totalFiles} archivos más` : `${label}`;
101
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
102
- Button,
103
- {
104
- outline: true,
105
- block: true,
106
- size: "xs",
107
- className: "mt-5 ml-5",
108
- onClick: () => document.getElementById("fileInput").click(),
109
- children: [
110
- text,
111
- /* @__PURE__ */ jsx(
112
- "input",
113
- {
114
- id: "fileInput",
115
- style: { display: "none" },
116
- type: "file",
117
- accept: accept2,
118
- multiple: true,
119
- onChange: (e) => {
120
- getFilesFromEvent2(e).then((chosenFiles) => {
121
- onFiles(chosenFiles);
122
- });
123
- }
124
- }
125
- )
126
- ]
127
- }
128
- ) });
96
+ const fileInputRef = useRef(null);
97
+ const InputComponent = ({ accept: accept2, onFiles, getFilesFromEvent: getFilesFromEvent2 }) => {
98
+ const text = totalFiles > 0 ? `${maxFiles - totalFiles} archivos más` : label;
99
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
100
+ /* @__PURE__ */ jsx(
101
+ Button,
102
+ {
103
+ $variant: "outline",
104
+ style: { width: "100%" },
105
+ onClick: () => fileInputRef.current?.click(),
106
+ children: text
107
+ }
108
+ ),
109
+ /* @__PURE__ */ jsx(
110
+ "input",
111
+ {
112
+ ref: fileInputRef,
113
+ style: { display: "none" },
114
+ type: "file",
115
+ accept: accept2,
116
+ multiple: true,
117
+ onChange: (e) => {
118
+ getFilesFromEvent2(e).then((chosenFiles) => onFiles(chosenFiles));
119
+ }
120
+ }
121
+ )
122
+ ] });
129
123
  };
130
- return /* @__PURE__ */ jsx("div", { className: classNames, children: /* @__PURE__ */ jsx(
131
- Dropzone,
124
+ return /* @__PURE__ */ jsx(
125
+ "div",
132
126
  {
133
- disableUpload: false,
134
- maxFiles: totalFiles < maxFiles ? maxFiles : 0,
135
- maxSize,
136
- InputComponent: Input,
137
- PreviewComponent: CustomPreview,
138
- classNames: { dropzone: "dropzone-upload-frame" },
139
- onChangeStatus: handleChangeStatus,
140
- getFilesFromEvent,
141
- accept
127
+ className: classNames,
128
+ style: {
129
+ "--dropzone-primary": primaryColor,
130
+ "--dropzone-border": borderColor,
131
+ "--dropzone-active-bg": surfaceHover
132
+ },
133
+ children: /* @__PURE__ */ jsx(
134
+ Dropzone,
135
+ {
136
+ disableUpload: false,
137
+ maxFiles: totalFiles < maxFiles ? maxFiles : 0,
138
+ maxSize,
139
+ InputComponent,
140
+ PreviewComponent: CustomPreview,
141
+ classNames: { dropzone: "dropzone-upload-frame" },
142
+ onChangeStatus: handleChangeStatus,
143
+ getFilesFromEvent,
144
+ accept
145
+ }
146
+ )
142
147
  }
143
- ) });
148
+ );
144
149
  };
150
+ const TrashIcon = ({ color }) => /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
151
+ /* @__PURE__ */ jsx("polyline", { points: "3 6 5 6 21 6" }),
152
+ /* @__PURE__ */ jsx("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }),
153
+ /* @__PURE__ */ jsx("path", { d: "M10 11v6M14 11v6" }),
154
+ /* @__PURE__ */ jsx("path", { d: "M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2" })
155
+ ] });
145
156
  export {
146
157
  DropzoneUploaderStyled
147
158
  };