@kbgarcia8/react-dynamic-form 2.0.3 → 2.0.4
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/README.md +77 -8
- package/dist/components/organisms/DynamicForm/DynamicForm.d.ts.map +1 -1
- package/dist/react-dynamic-form.cjs.js +45 -45
- package/dist/react-dynamic-form.es.js +386 -368
- package/dist/type/propTypes.d.ts +27 -0
- package/dist/type/propTypes.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsx as r, jsxs as $, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import M, { forwardRef as re, createContext as ae, useState as le, useContext as ne } from "react";
|
|
3
|
+
import u, { css as g, ThemeProvider as se } from "styled-components";
|
|
4
4
|
const o = {
|
|
5
5
|
fonts: {
|
|
6
6
|
secondary: "Raleway",
|
|
@@ -51,18 +51,18 @@ const o = {
|
|
|
51
51
|
desktop: "1440px",
|
|
52
52
|
largeDesktop: "1920px"
|
|
53
53
|
}
|
|
54
|
-
},
|
|
54
|
+
}, ie = (e) => {
|
|
55
55
|
const n = /^#([0-9A-Fa-f]{3}){1,2}$/, l = /^rgb(a)?\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}(?:\s*,\s*(0|1|0?\.\d+))?\s*\)$/;
|
|
56
56
|
return n.test(e) || l.test(e) || CSS.supports("color", e);
|
|
57
|
-
},
|
|
58
|
-
if (!
|
|
57
|
+
}, m = (e) => {
|
|
58
|
+
if (!ie(e)) throw new Error(`Invalid color: ${e}`);
|
|
59
59
|
return e;
|
|
60
|
-
},
|
|
60
|
+
}, I = Object.keys(o.breakpoints).reduce(
|
|
61
61
|
(e, n) => {
|
|
62
62
|
const l = n;
|
|
63
|
-
return e[l] = (...
|
|
63
|
+
return e[l] = (...a) => g`
|
|
64
64
|
@media (min-width: ${o.breakpoints[l]}) {
|
|
65
|
-
${g(...
|
|
65
|
+
${g(...a)}
|
|
66
66
|
}
|
|
67
67
|
`, e;
|
|
68
68
|
},
|
|
@@ -135,37 +135,37 @@ const o = {
|
|
|
135
135
|
`
|
|
136
136
|
}, de = {
|
|
137
137
|
smallest: g`
|
|
138
|
-
${
|
|
138
|
+
${I.mobile`
|
|
139
139
|
font-size: ${o.fontSize.xxsmall};
|
|
140
140
|
font-weight: ${o.fontWeight.regular};
|
|
141
141
|
`}
|
|
142
142
|
`,
|
|
143
143
|
smaller: g`
|
|
144
|
-
${
|
|
144
|
+
${I.mobile`
|
|
145
145
|
font-size: ${o.fontSize.xsmall};
|
|
146
146
|
font-weight: ${o.fontWeight.regular};
|
|
147
147
|
`}
|
|
148
148
|
`,
|
|
149
149
|
small: g`
|
|
150
|
-
${
|
|
150
|
+
${I.mobile`
|
|
151
151
|
font-size: ${o.fontSize.small};
|
|
152
152
|
font-weight: ${o.fontWeight.medium};
|
|
153
153
|
`}
|
|
154
154
|
`,
|
|
155
155
|
medium: g`
|
|
156
|
-
${
|
|
156
|
+
${I.mobile`
|
|
157
157
|
font-size: ${o.fontSize.medium};
|
|
158
158
|
font-weight: ${o.fontWeight.bold};
|
|
159
159
|
`}
|
|
160
160
|
`,
|
|
161
161
|
large: g`
|
|
162
|
-
${
|
|
162
|
+
${I.mobile`
|
|
163
163
|
font-size: ${o.fontSize.large};
|
|
164
164
|
font-weight: ${o.fontWeight.bolder};
|
|
165
165
|
`}
|
|
166
166
|
`,
|
|
167
167
|
larger: g`
|
|
168
|
-
${
|
|
168
|
+
${I.mobile`
|
|
169
169
|
font-size: ${o.fontSize.xlarge};
|
|
170
170
|
font-weight: ${o.fontWeight.bolder};
|
|
171
171
|
`}
|
|
@@ -176,7 +176,7 @@ const o = {
|
|
|
176
176
|
squircle: g`border-radius: ${o.borderRadius.large};`,
|
|
177
177
|
pill: g`border-radius: ${o.borderRadius.xlarge};`,
|
|
178
178
|
circle: g`border-radius: ${o.borderRadius.circle};`
|
|
179
|
-
},
|
|
179
|
+
}, H = u.button`
|
|
180
180
|
width: 100%;
|
|
181
181
|
display: flex;
|
|
182
182
|
align-items: center;
|
|
@@ -199,7 +199,7 @@ const o = {
|
|
|
199
199
|
cursor: not-allowed;
|
|
200
200
|
opacity: 0.6;
|
|
201
201
|
}
|
|
202
|
-
`,
|
|
202
|
+
`, Z = u.div`
|
|
203
203
|
width: 100%;
|
|
204
204
|
display: flex;
|
|
205
205
|
flex-direction: row;
|
|
@@ -211,7 +211,7 @@ const o = {
|
|
|
211
211
|
flex: 1;
|
|
212
212
|
}
|
|
213
213
|
`}
|
|
214
|
-
`,
|
|
214
|
+
`, G = u.span`
|
|
215
215
|
flex: 2;
|
|
216
216
|
${({ $size: e }) => de[e || "small"]}
|
|
217
217
|
font-family: ${o.fonts.tertiary}, ${o.fonts.fallback};
|
|
@@ -219,61 +219,61 @@ const o = {
|
|
|
219
219
|
align-items: center;
|
|
220
220
|
justify-content: center;
|
|
221
221
|
max-width: 80%;
|
|
222
|
-
`,
|
|
222
|
+
`, B = ({
|
|
223
223
|
onClick: e,
|
|
224
224
|
id: n,
|
|
225
225
|
buttonType: l = "button",
|
|
226
|
-
startIcon:
|
|
227
|
-
endIcon:
|
|
226
|
+
startIcon: a,
|
|
227
|
+
endIcon: d,
|
|
228
228
|
text: i = "",
|
|
229
229
|
className: b = "",
|
|
230
|
-
dataAttributes:
|
|
230
|
+
dataAttributes: h = {},
|
|
231
231
|
color: x,
|
|
232
232
|
radius: f,
|
|
233
|
-
size:
|
|
234
|
-
}) => l === "submit" ? /* @__PURE__ */
|
|
235
|
-
|
|
233
|
+
size: y
|
|
234
|
+
}) => l === "submit" ? /* @__PURE__ */ r(
|
|
235
|
+
H,
|
|
236
236
|
{
|
|
237
237
|
id: n,
|
|
238
238
|
type: "submit",
|
|
239
239
|
className: b,
|
|
240
|
-
...
|
|
240
|
+
...h,
|
|
241
241
|
$color: x || "primary",
|
|
242
242
|
$radius: f || "squircle",
|
|
243
|
-
children: /* @__PURE__ */ $(
|
|
244
|
-
|
|
245
|
-
i && /* @__PURE__ */
|
|
246
|
-
|
|
243
|
+
children: /* @__PURE__ */ $(Z, { className: "button-icon-text-space", $hasIcon: !!(a || d), $hasText: !!i, children: [
|
|
244
|
+
a || "",
|
|
245
|
+
i && /* @__PURE__ */ r(G, { $size: y || "small", id: n, children: i }),
|
|
246
|
+
d || ""
|
|
247
247
|
] })
|
|
248
248
|
}
|
|
249
|
-
) : /* @__PURE__ */
|
|
250
|
-
|
|
249
|
+
) : /* @__PURE__ */ r(
|
|
250
|
+
H,
|
|
251
251
|
{
|
|
252
252
|
onClick: e,
|
|
253
253
|
id: n,
|
|
254
254
|
type: l,
|
|
255
255
|
className: b,
|
|
256
|
-
...
|
|
256
|
+
...h,
|
|
257
257
|
$color: x || "primary",
|
|
258
258
|
$radius: f || "squircle",
|
|
259
|
-
children: /* @__PURE__ */ $(
|
|
260
|
-
|
|
261
|
-
i && /* @__PURE__ */
|
|
262
|
-
|
|
259
|
+
children: /* @__PURE__ */ $(Z, { className: "button-icon-text-space", $hasIcon: !!(a || d), $hasText: !!i, children: [
|
|
260
|
+
a || "",
|
|
261
|
+
i && /* @__PURE__ */ r(G, { $size: y || "small", id: n, children: i }),
|
|
262
|
+
d || ""
|
|
263
263
|
] })
|
|
264
264
|
}
|
|
265
|
-
), be =
|
|
265
|
+
), be = u.div`
|
|
266
266
|
display: flex;
|
|
267
267
|
flex-direction: column;
|
|
268
268
|
align-items: left;
|
|
269
269
|
width: 100%;
|
|
270
270
|
margin-bottom: ${o.spacing.small};
|
|
271
|
-
`,
|
|
271
|
+
`, ue = u.div`
|
|
272
272
|
display: flex;
|
|
273
273
|
gap: ${o.spacing.xsmall};
|
|
274
274
|
width: auto;
|
|
275
275
|
height: auto;
|
|
276
|
-
`,
|
|
276
|
+
`, he = u.label`
|
|
277
277
|
display: flex;
|
|
278
278
|
align-items: center;
|
|
279
279
|
justify-content: center;
|
|
@@ -290,38 +290,38 @@ const o = {
|
|
|
290
290
|
height: auto;
|
|
291
291
|
object-fit: contain;
|
|
292
292
|
}
|
|
293
|
-
`, $e =
|
|
293
|
+
`, $e = u.div`
|
|
294
294
|
display: flex;
|
|
295
295
|
flex-direction: column;
|
|
296
296
|
align-items: center;
|
|
297
297
|
justify-content: center;
|
|
298
298
|
gap: ${o.spacing.xxxsmall};
|
|
299
|
-
`, ge =
|
|
299
|
+
`, ge = u.span`
|
|
300
300
|
font-weight: ${o.fontWeight.bolder};
|
|
301
|
-
`, J =
|
|
301
|
+
`, J = u.div`
|
|
302
302
|
max-width: 100%;
|
|
303
303
|
display: flex;
|
|
304
304
|
align-items: center;
|
|
305
|
-
`, xe =
|
|
305
|
+
`, xe = u.span`
|
|
306
306
|
font-weight: ${o.fontWeight.light};
|
|
307
307
|
`, K = ({
|
|
308
308
|
htmlFor: e,
|
|
309
309
|
textLabel: n,
|
|
310
310
|
additionalInfo: l,
|
|
311
|
-
$labelFlexDirection:
|
|
312
|
-
startIcon:
|
|
311
|
+
$labelFlexDirection: a,
|
|
312
|
+
startIcon: d,
|
|
313
313
|
endIcon: i,
|
|
314
314
|
className: b,
|
|
315
|
-
children:
|
|
316
|
-
}) => /* @__PURE__ */ $(
|
|
317
|
-
|
|
315
|
+
children: h
|
|
316
|
+
}) => /* @__PURE__ */ $(he, { htmlFor: e, className: b, $labelFlexDirection: a, children: [
|
|
317
|
+
d && /* @__PURE__ */ r(J, { className: "label-icon-container", children: d }),
|
|
318
318
|
/* @__PURE__ */ $($e, { className: "label-text-container", children: [
|
|
319
|
-
/* @__PURE__ */
|
|
320
|
-
l && /* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ r(ge, { className: "main-label", children: n }),
|
|
320
|
+
l && /* @__PURE__ */ r(xe, { className: "additional-info", children: l })
|
|
321
321
|
] }),
|
|
322
|
-
i && /* @__PURE__ */
|
|
323
|
-
|
|
324
|
-
] }), Q =
|
|
322
|
+
i && /* @__PURE__ */ r(J, { className: "label-icon-container", children: i }),
|
|
323
|
+
h
|
|
324
|
+
] }), Q = u.input`
|
|
325
325
|
display: flex;
|
|
326
326
|
place-content: center;
|
|
327
327
|
font-family: ${o.fonts.secondary}, ${o.fonts.fallback};
|
|
@@ -338,7 +338,7 @@ const o = {
|
|
|
338
338
|
&:focus{
|
|
339
339
|
border: ${o.borderThickness.thin} solid ${({ theme: e }) => e.colors.teal};
|
|
340
340
|
}
|
|
341
|
-
`, fe =
|
|
341
|
+
`, fe = u.textarea`
|
|
342
342
|
display: flex;
|
|
343
343
|
place-content: center;
|
|
344
344
|
border: ${o.borderThickness.light} solid ${({ theme: e }) => e.colors.text};
|
|
@@ -351,21 +351,21 @@ const o = {
|
|
|
351
351
|
max-width: 100%;
|
|
352
352
|
resize: none;
|
|
353
353
|
overflow-y: auto;
|
|
354
|
-
`,
|
|
355
|
-
const { type: l, id:
|
|
354
|
+
`, W = re((e, n) => {
|
|
355
|
+
const { type: l, id: a, onChange: d, isRequired: i, dataAttributes: b = {}, disabled: h, className: x, name: f } = e;
|
|
356
356
|
if (l === "textarea") {
|
|
357
|
-
const { rows: w = 5, cols: S = 30, value:
|
|
358
|
-
return /* @__PURE__ */
|
|
357
|
+
const { rows: w = 5, cols: S = 30, value: E, ...q } = e;
|
|
358
|
+
return /* @__PURE__ */ r(
|
|
359
359
|
fe,
|
|
360
360
|
{
|
|
361
361
|
ref: n,
|
|
362
|
-
value:
|
|
362
|
+
value: E,
|
|
363
363
|
rows: w,
|
|
364
364
|
cols: S,
|
|
365
|
-
id:
|
|
366
|
-
onChange:
|
|
365
|
+
id: a,
|
|
366
|
+
onChange: d,
|
|
367
367
|
required: i,
|
|
368
|
-
disabled:
|
|
368
|
+
disabled: h,
|
|
369
369
|
...b,
|
|
370
370
|
className: x,
|
|
371
371
|
name: f
|
|
@@ -374,151 +374,151 @@ const o = {
|
|
|
374
374
|
}
|
|
375
375
|
if (l === "radio" || l === "checkbox") {
|
|
376
376
|
const { checked: w, ...S } = e;
|
|
377
|
-
return /* @__PURE__ */
|
|
377
|
+
return /* @__PURE__ */ r(
|
|
378
378
|
Q,
|
|
379
379
|
{
|
|
380
380
|
ref: n,
|
|
381
381
|
type: l,
|
|
382
382
|
checked: w,
|
|
383
|
-
id:
|
|
384
|
-
onChange:
|
|
383
|
+
id: a,
|
|
384
|
+
onChange: d,
|
|
385
385
|
required: i,
|
|
386
386
|
...b,
|
|
387
|
-
disabled:
|
|
387
|
+
disabled: h,
|
|
388
388
|
className: x,
|
|
389
389
|
name: f
|
|
390
390
|
}
|
|
391
391
|
);
|
|
392
392
|
}
|
|
393
|
-
const
|
|
394
|
-
return /* @__PURE__ */
|
|
393
|
+
const y = e, { value: p, pattern: k, placeholderText: C, ...N } = y;
|
|
394
|
+
return /* @__PURE__ */ r(
|
|
395
395
|
Q,
|
|
396
396
|
{
|
|
397
397
|
ref: n,
|
|
398
398
|
type: l,
|
|
399
|
-
value:
|
|
400
|
-
pattern:
|
|
399
|
+
value: p,
|
|
400
|
+
pattern: k,
|
|
401
401
|
placeholder: C,
|
|
402
|
-
id:
|
|
403
|
-
onChange:
|
|
402
|
+
id: a,
|
|
403
|
+
onChange: d,
|
|
404
404
|
required: i,
|
|
405
405
|
...b,
|
|
406
|
-
disabled:
|
|
406
|
+
disabled: h,
|
|
407
407
|
className: x,
|
|
408
408
|
name: f
|
|
409
409
|
}
|
|
410
410
|
);
|
|
411
|
-
}),
|
|
411
|
+
}), R = (e) => {
|
|
412
412
|
const {
|
|
413
413
|
className: n,
|
|
414
414
|
type: l,
|
|
415
|
-
id:
|
|
416
|
-
textLabel:
|
|
415
|
+
id: a,
|
|
416
|
+
textLabel: d,
|
|
417
417
|
additionalInfo: i,
|
|
418
418
|
$labelFlexDirection: b,
|
|
419
|
-
startIcon:
|
|
419
|
+
startIcon: h,
|
|
420
420
|
endIcon: x,
|
|
421
421
|
labelClass: f = "",
|
|
422
|
-
onChange:
|
|
423
|
-
isRequired:
|
|
424
|
-
dataAttributes:
|
|
422
|
+
onChange: y,
|
|
423
|
+
isRequired: p,
|
|
424
|
+
dataAttributes: k,
|
|
425
425
|
inputClass: C = "",
|
|
426
|
-
ref:
|
|
426
|
+
ref: N,
|
|
427
427
|
disabled: w,
|
|
428
428
|
isEditable: S,
|
|
429
|
-
editIcon:
|
|
430
|
-
onClickEdit:
|
|
431
|
-
deleteIcon:
|
|
432
|
-
onClickDelete:
|
|
433
|
-
idx:
|
|
434
|
-
children:
|
|
429
|
+
editIcon: E,
|
|
430
|
+
onClickEdit: q,
|
|
431
|
+
deleteIcon: L,
|
|
432
|
+
onClickDelete: T,
|
|
433
|
+
idx: F,
|
|
434
|
+
children: A
|
|
435
435
|
} = e;
|
|
436
|
-
return /* @__PURE__ */ $(be, { className: `${n} ${
|
|
437
|
-
l !== "radio" && l !== "checkbox" && /* @__PURE__ */
|
|
436
|
+
return /* @__PURE__ */ $(be, { className: `${n} ${a.replace("#", "")}-label-input-container`, children: [
|
|
437
|
+
l !== "radio" && l !== "checkbox" && /* @__PURE__ */ r(K, { startIcon: h, endIcon: x, htmlFor: a, textLabel: d, additionalInfo: i, $labelFlexDirection: b, className: f }),
|
|
438
438
|
l !== "radio" && l !== "checkbox" && l === "textarea" && (() => {
|
|
439
|
-
const { rows:
|
|
440
|
-
return /* @__PURE__ */
|
|
441
|
-
|
|
439
|
+
const { rows: z = 5, cols: D = 30, value: j, ...t } = e;
|
|
440
|
+
return /* @__PURE__ */ r(
|
|
441
|
+
W,
|
|
442
442
|
{
|
|
443
|
-
id:
|
|
444
|
-
name:
|
|
443
|
+
id: a,
|
|
444
|
+
name: a,
|
|
445
445
|
type: "textarea",
|
|
446
|
-
isRequired:
|
|
447
|
-
onChange:
|
|
448
|
-
value:
|
|
449
|
-
rows:
|
|
450
|
-
cols:
|
|
451
|
-
dataAttributes:
|
|
446
|
+
isRequired: p,
|
|
447
|
+
onChange: y,
|
|
448
|
+
value: j,
|
|
449
|
+
rows: z,
|
|
450
|
+
cols: D,
|
|
451
|
+
dataAttributes: k,
|
|
452
452
|
className: C,
|
|
453
|
-
ref:
|
|
453
|
+
ref: N,
|
|
454
454
|
disabled: w
|
|
455
455
|
}
|
|
456
456
|
);
|
|
457
457
|
})(),
|
|
458
458
|
l !== "radio" && l !== "checkbox" && l !== "textarea" && (() => {
|
|
459
|
-
const
|
|
460
|
-
return /* @__PURE__ */
|
|
461
|
-
|
|
459
|
+
const z = e, { value: D, pattern: j, placeholderText: t, ...v } = z;
|
|
460
|
+
return /* @__PURE__ */ r(
|
|
461
|
+
W,
|
|
462
462
|
{
|
|
463
|
-
id:
|
|
464
|
-
name:
|
|
465
|
-
placeholderText:
|
|
466
|
-
onChange:
|
|
467
|
-
value:
|
|
463
|
+
id: a,
|
|
464
|
+
name: a,
|
|
465
|
+
placeholderText: t,
|
|
466
|
+
onChange: y,
|
|
467
|
+
value: D,
|
|
468
468
|
type: l,
|
|
469
|
-
isRequired:
|
|
470
|
-
dataAttributes:
|
|
469
|
+
isRequired: p,
|
|
470
|
+
dataAttributes: k,
|
|
471
471
|
className: C,
|
|
472
|
-
ref:
|
|
472
|
+
ref: N,
|
|
473
473
|
disabled: w,
|
|
474
|
-
pattern:
|
|
474
|
+
pattern: j
|
|
475
475
|
}
|
|
476
476
|
);
|
|
477
477
|
})(),
|
|
478
478
|
(l === "radio" || l === "checkbox") && (() => {
|
|
479
|
-
const { checked:
|
|
480
|
-
return /* @__PURE__ */ $(
|
|
481
|
-
/* @__PURE__ */
|
|
482
|
-
|
|
479
|
+
const { checked: z, ...D } = e;
|
|
480
|
+
return /* @__PURE__ */ $(O, { children: [
|
|
481
|
+
/* @__PURE__ */ r(
|
|
482
|
+
W,
|
|
483
483
|
{
|
|
484
|
-
ref:
|
|
484
|
+
ref: N,
|
|
485
485
|
type: l,
|
|
486
|
-
name:
|
|
487
|
-
id:
|
|
488
|
-
isRequired:
|
|
489
|
-
checked:
|
|
490
|
-
onChange:
|
|
486
|
+
name: a,
|
|
487
|
+
id: a,
|
|
488
|
+
isRequired: p,
|
|
489
|
+
checked: z,
|
|
490
|
+
onChange: y,
|
|
491
491
|
disabled: w,
|
|
492
492
|
className: C,
|
|
493
|
-
dataAttributes:
|
|
493
|
+
dataAttributes: k
|
|
494
494
|
}
|
|
495
495
|
),
|
|
496
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ r(K, { startIcon: h, endIcon: x, htmlFor: a, textLabel: d, additionalInfo: i, $labelFlexDirection: b, className: f })
|
|
497
497
|
] });
|
|
498
498
|
})(),
|
|
499
|
-
S && /* @__PURE__ */ $(
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
-
/* @__PURE__ */
|
|
499
|
+
S && /* @__PURE__ */ $(ue, { className: "input-edit-buttons", children: [
|
|
500
|
+
/* @__PURE__ */ r(B, { id: `editable-${a}-edit-btn`, startIcon: E, buttonType: "button", onClick: q, className: `edit-radio-${F}`, dataAttributes: k }),
|
|
501
|
+
/* @__PURE__ */ r(B, { id: `editable-${a}-delete-btn`, startIcon: L, buttonType: "button", onClick: T, className: `delete-radio-${F}`, dataAttributes: k })
|
|
502
502
|
] }),
|
|
503
|
-
|
|
503
|
+
A
|
|
504
504
|
] });
|
|
505
|
-
},
|
|
505
|
+
}, ye = u.fieldset`
|
|
506
506
|
padding: 0;
|
|
507
507
|
height: auto;
|
|
508
508
|
width: 100%;
|
|
509
|
-
`,
|
|
509
|
+
`, ke = u.legend`
|
|
510
510
|
font-size: ${o.spacing.medium};
|
|
511
511
|
font-weight: 500;
|
|
512
512
|
margin: 0 auto ${o.spacing.small} auto;
|
|
513
513
|
text-align: center;
|
|
514
514
|
font-family: ${o.fonts.secondary}, ${o.fonts.fallback};
|
|
515
|
-
`,
|
|
515
|
+
`, pe = u.div`
|
|
516
516
|
display: flex;
|
|
517
517
|
flex-direction: column;
|
|
518
518
|
align-items: flex-start;
|
|
519
519
|
width: 100%;
|
|
520
520
|
margin-bottom: ${o.spacing.small};
|
|
521
|
-
`, Ce =
|
|
521
|
+
`, Ce = u.div`
|
|
522
522
|
display: flex;
|
|
523
523
|
justify-content: space-between;
|
|
524
524
|
width: 100%;
|
|
@@ -526,49 +526,49 @@ const o = {
|
|
|
526
526
|
editableButtonSize: e,
|
|
527
527
|
editableButtonColor: n,
|
|
528
528
|
editableButtonRadius: l,
|
|
529
|
-
legend:
|
|
530
|
-
fieldsetIndex:
|
|
529
|
+
legend: a,
|
|
530
|
+
fieldsetIndex: d,
|
|
531
531
|
idx: i,
|
|
532
532
|
editableInformation: b,
|
|
533
|
-
saveText:
|
|
533
|
+
saveText: h,
|
|
534
534
|
saveButtonStartIcon: x,
|
|
535
535
|
saveButtonEndIcon: f,
|
|
536
|
-
cancelText:
|
|
537
|
-
cancelButtonStartIcon:
|
|
538
|
-
cancelButtonEndIcon:
|
|
536
|
+
cancelText: y,
|
|
537
|
+
cancelButtonStartIcon: p,
|
|
538
|
+
cancelButtonEndIcon: k,
|
|
539
539
|
deleteText: C,
|
|
540
|
-
deleteButtonStartIcon:
|
|
540
|
+
deleteButtonStartIcon: N,
|
|
541
541
|
deleteButtonEndIcon: w,
|
|
542
542
|
onChangeOfEditableOption: S,
|
|
543
|
-
onClickSaveEdit:
|
|
544
|
-
onClickCancelEdit:
|
|
545
|
-
onClickDeleteEntry:
|
|
546
|
-
}) => /* @__PURE__ */ $(
|
|
547
|
-
/* @__PURE__ */
|
|
548
|
-
b?.map((
|
|
549
|
-
|
|
543
|
+
onClickSaveEdit: E,
|
|
544
|
+
onClickCancelEdit: q,
|
|
545
|
+
onClickDeleteEntry: L
|
|
546
|
+
}) => /* @__PURE__ */ $(ye, { className: "editable-option-fieldset", children: [
|
|
547
|
+
/* @__PURE__ */ r(ke, { children: `${a} ${i + 1}` }),
|
|
548
|
+
b?.map((T, F) => /* @__PURE__ */ r(pe, { className: "editable-option-container", children: /* @__PURE__ */ r(
|
|
549
|
+
W,
|
|
550
550
|
{
|
|
551
|
-
id: `editable-option-${
|
|
552
|
-
name: `editable-option-${
|
|
553
|
-
placeholderText:
|
|
551
|
+
id: `editable-option-${F}`,
|
|
552
|
+
name: `editable-option-${F}`,
|
|
553
|
+
placeholderText: T.name.charAt(0).toUpperCase() + T.name.slice(1),
|
|
554
554
|
onChange: S,
|
|
555
|
-
value:
|
|
556
|
-
type:
|
|
555
|
+
value: T.info,
|
|
556
|
+
type: T.type,
|
|
557
557
|
isRequired: !0,
|
|
558
558
|
className: "editable-option",
|
|
559
559
|
dataAttributes: {
|
|
560
|
-
"data-index":
|
|
561
|
-
"data-fieldsetindex":
|
|
562
|
-
"data-key":
|
|
560
|
+
"data-index": F,
|
|
561
|
+
"data-fieldsetindex": d,
|
|
562
|
+
"data-key": T.info
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
-
) }, `${
|
|
565
|
+
) }, `${T.name}-${F}`)),
|
|
566
566
|
/* @__PURE__ */ $(Ce, { className: "editable-option-button-space", children: [
|
|
567
|
-
/* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ r(B, { startIcon: x, endIcon: f, size: e || "small", color: n || "primary", radius: l || "squircle", id: `editable-option-${i}-submit`, buttonType: "button", text: h || "Save", onClick: E, className: "editable-option-btn", dataAttributes: { "data-index": i, "data-fieldsetindex": d } }),
|
|
568
|
+
/* @__PURE__ */ r(B, { startIcon: p, endIcon: k, size: e || "small", color: n || "primary", radius: l || "squircle", id: `editable-option-${i}-cancel`, buttonType: "button", text: y || "Cancel", onClick: q, className: "editable-option-btn", dataAttributes: { "data-index": i, "data-fieldsetindex": d } }),
|
|
569
|
+
/* @__PURE__ */ r(B, { startIcon: N, endIcon: w, size: e || "small", color: n || "primary", radius: l || "squircle", id: `editable-option-${i}-delete`, buttonType: "button", text: C || "Delete", onClick: L, className: "editable-option-btn", dataAttributes: { "data-index": i, "data-fieldsetindex": d } })
|
|
570
570
|
] })
|
|
571
|
-
] }), we =
|
|
571
|
+
] }), we = u.div`
|
|
572
572
|
display: flex;
|
|
573
573
|
justify-content: space-around;
|
|
574
574
|
align-content: center;
|
|
@@ -576,41 +576,41 @@ const o = {
|
|
|
576
576
|
& button {
|
|
577
577
|
margin-inline: 0.25rem;
|
|
578
578
|
}
|
|
579
|
-
`,
|
|
579
|
+
`, ve = ({
|
|
580
580
|
id: e,
|
|
581
581
|
formActionButtonSize: n,
|
|
582
582
|
formActionButtonColor: l,
|
|
583
|
-
formActionButtonRadius:
|
|
584
|
-
submitText:
|
|
583
|
+
formActionButtonRadius: a,
|
|
584
|
+
submitText: d,
|
|
585
585
|
submitIcon: i,
|
|
586
586
|
hasReset: b,
|
|
587
|
-
resetText:
|
|
587
|
+
resetText: h,
|
|
588
588
|
resetIcon: x,
|
|
589
589
|
handleReset: f,
|
|
590
|
-
hasCancel:
|
|
591
|
-
cancelText:
|
|
592
|
-
cancelIcon:
|
|
590
|
+
hasCancel: y,
|
|
591
|
+
cancelText: p,
|
|
592
|
+
cancelIcon: k,
|
|
593
593
|
handleCancel: C
|
|
594
594
|
}) => /* @__PURE__ */ $(we, { className: "form-main-button-container", children: [
|
|
595
|
-
/* @__PURE__ */
|
|
596
|
-
b && /* @__PURE__ */
|
|
597
|
-
|
|
598
|
-
] }), X =
|
|
595
|
+
/* @__PURE__ */ r(B, { id: `form-${e}-submit`, size: n || "small", color: l || "primary", radius: a || "squircle", startIcon: i, buttonType: "submit", text: d ?? "Submit", className: "submit-form-btn" }),
|
|
596
|
+
b && /* @__PURE__ */ r(B, { id: `form-${e}-edit`, size: n || "small", color: l || "primary", radius: a || "squircle", startIcon: x, buttonType: "button", text: h ?? "Reset", onClick: f, className: "reset-form-btn" }),
|
|
597
|
+
y && /* @__PURE__ */ r(B, { id: `form-${e}-cancel`, size: n || "small", color: l || "primary", radius: a || "squircle", startIcon: k, buttonType: "button", text: p ?? "Cancel", onClick: C, className: "cancel-form-btn" })
|
|
598
|
+
] }), X = u.legend`
|
|
599
599
|
font-size: ${o.spacing.medium};
|
|
600
600
|
font-weight: 500;
|
|
601
601
|
margin-bottom: ${o.spacing.small};
|
|
602
602
|
width: auto;
|
|
603
603
|
text-align: center;
|
|
604
604
|
font-family: ${o.fonts.secondary}, ${o.fonts.fallback};
|
|
605
|
-
`, Y =
|
|
605
|
+
`, Y = u.fieldset`
|
|
606
606
|
padding: 0;
|
|
607
607
|
height: auto;
|
|
608
608
|
width: 100%;
|
|
609
|
-
`, _ =
|
|
609
|
+
`, _ = u.div`
|
|
610
610
|
padding: ${o.spacing.small};
|
|
611
611
|
height: auto;
|
|
612
612
|
width: 100%;
|
|
613
|
-
`, ee =
|
|
613
|
+
`, ee = u.div`
|
|
614
614
|
display: flex;
|
|
615
615
|
justify-content: center;
|
|
616
616
|
align-items: center;
|
|
@@ -619,192 +619,210 @@ const o = {
|
|
|
619
619
|
font-family: ${o.fonts.tertiary}, ${o.fonts.fallback};
|
|
620
620
|
font-size: ${o.fontSize.xsmall};
|
|
621
621
|
font-weight: ${o.fontWeight.bold};
|
|
622
|
-
`,
|
|
622
|
+
`, Te = u.form`
|
|
623
623
|
display: flex;
|
|
624
624
|
flex-direction: column;
|
|
625
625
|
align-items: center;
|
|
626
626
|
width: 100%;
|
|
627
|
-
`, oe =
|
|
627
|
+
`, oe = u.div`
|
|
628
628
|
display: flex;
|
|
629
629
|
justify-content: space-between;
|
|
630
630
|
width: 100%;
|
|
631
|
-
`,
|
|
631
|
+
`, Be = u.div`
|
|
632
632
|
width: 100%;
|
|
633
633
|
display: flex;
|
|
634
634
|
flex-direction: column;
|
|
635
635
|
align-items: center;
|
|
636
636
|
justify-content: center;
|
|
637
|
-
`,
|
|
637
|
+
`, qe = ({
|
|
638
638
|
fieldsets: e = null,
|
|
639
639
|
legendText: n,
|
|
640
640
|
isExpandable: l,
|
|
641
|
-
id:
|
|
642
|
-
formInputs:
|
|
641
|
+
id: a,
|
|
642
|
+
formInputs: d,
|
|
643
643
|
labelAndInputContainerClass: i,
|
|
644
644
|
labelClass: b,
|
|
645
|
-
inputClass:
|
|
645
|
+
inputClass: h,
|
|
646
646
|
onChangeOfEditableOption: x,
|
|
647
647
|
handleAddingInputEntry: f,
|
|
648
|
-
formActionButtonSize:
|
|
649
|
-
formActionButtonColor:
|
|
650
|
-
formActionButtonRadius:
|
|
648
|
+
formActionButtonSize: y,
|
|
649
|
+
formActionButtonColor: p,
|
|
650
|
+
formActionButtonRadius: k,
|
|
651
651
|
submitText: C,
|
|
652
|
-
submitIcon:
|
|
652
|
+
submitIcon: N,
|
|
653
653
|
hasReset: w = !1,
|
|
654
654
|
resetText: S,
|
|
655
|
-
resetIcon:
|
|
656
|
-
handleReset:
|
|
657
|
-
hasCancel:
|
|
658
|
-
cancelText:
|
|
659
|
-
cancelIcon:
|
|
660
|
-
handleCancel:
|
|
661
|
-
handleSubmitForm:
|
|
662
|
-
className:
|
|
663
|
-
children:
|
|
664
|
-
}) => /* @__PURE__ */ $(
|
|
665
|
-
e ? e.map((
|
|
666
|
-
/* @__PURE__ */ $(Y, { id: `${
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
655
|
+
resetIcon: E,
|
|
656
|
+
handleReset: q,
|
|
657
|
+
hasCancel: L = !1,
|
|
658
|
+
cancelText: T,
|
|
659
|
+
cancelIcon: F,
|
|
660
|
+
handleCancel: A,
|
|
661
|
+
handleSubmitForm: z,
|
|
662
|
+
className: D,
|
|
663
|
+
children: j
|
|
664
|
+
}) => /* @__PURE__ */ $(Te, { id: `${a}-form`, className: D, onSubmit: z, children: [
|
|
665
|
+
e ? e.map((t, v) => /* @__PURE__ */ $(_, { className: `${a}-fieldset-wrapper`, children: [
|
|
666
|
+
/* @__PURE__ */ $(Y, { id: `${a}-form-fieldset-${v}`, className: `${t.legend}-fieldset`, children: [
|
|
667
|
+
t.legend && /* @__PURE__ */ r(X, { className: `${t.legend}-legend`, children: t.legend }),
|
|
668
|
+
t.inputs.length !== 0 ? t.inputs.map((s, P) => /* @__PURE__ */ $(M.Fragment, { children: [
|
|
669
|
+
s.type === "textarea" && /* @__PURE__ */ r(
|
|
670
|
+
R,
|
|
671
671
|
{
|
|
672
|
-
...
|
|
673
|
-
id:
|
|
672
|
+
...s,
|
|
673
|
+
id: s.id ?? `${t.legend}-input`,
|
|
674
674
|
labelClass: b,
|
|
675
|
-
inputClass:
|
|
676
|
-
idx:
|
|
677
|
-
className: `${i} ${
|
|
675
|
+
inputClass: h,
|
|
676
|
+
idx: P,
|
|
677
|
+
className: `${i} ${s?.uniqueClass}`
|
|
678
678
|
}
|
|
679
679
|
),
|
|
680
|
-
|
|
681
|
-
|
|
680
|
+
s.type !== "textarea" && s.type !== "radio" && s.type !== "checkbox" && /* @__PURE__ */ r(
|
|
681
|
+
R,
|
|
682
682
|
{
|
|
683
|
-
...
|
|
684
|
-
id:
|
|
683
|
+
...s,
|
|
684
|
+
id: s.id ?? `${t.legend}-input`,
|
|
685
685
|
labelClass: b,
|
|
686
|
-
inputClass:
|
|
687
|
-
idx:
|
|
688
|
-
className: `${i} ${
|
|
686
|
+
inputClass: h,
|
|
687
|
+
idx: P,
|
|
688
|
+
className: `${i} ${s?.uniqueClass}`
|
|
689
689
|
}
|
|
690
690
|
),
|
|
691
|
-
(
|
|
692
|
-
/* @__PURE__ */
|
|
693
|
-
|
|
691
|
+
(s.type === "radio" || s.type === "checkbox") && /* @__PURE__ */ $(O, { children: [
|
|
692
|
+
/* @__PURE__ */ r(
|
|
693
|
+
R,
|
|
694
694
|
{
|
|
695
|
-
...
|
|
696
|
-
id:
|
|
695
|
+
...s,
|
|
696
|
+
id: s.id ?? `${t.legend}-input`,
|
|
697
697
|
labelClass: b,
|
|
698
|
-
inputClass:
|
|
699
|
-
idx:
|
|
700
|
-
className: `${i} ${
|
|
698
|
+
inputClass: h,
|
|
699
|
+
idx: P,
|
|
700
|
+
className: `${i} ${s?.uniqueClass}`
|
|
701
701
|
}
|
|
702
702
|
),
|
|
703
|
-
|
|
703
|
+
s.editing && s.isEditable && /* @__PURE__ */ r(
|
|
704
704
|
V,
|
|
705
705
|
{
|
|
706
|
-
editableButtonSize:
|
|
707
|
-
editableButtonColor:
|
|
708
|
-
editableButtonRadius:
|
|
709
|
-
legend: `${
|
|
710
|
-
fieldsetIndex:
|
|
711
|
-
idx:
|
|
712
|
-
|
|
706
|
+
editableButtonSize: s.editableButtonSize,
|
|
707
|
+
editableButtonColor: s.editableButtonColor,
|
|
708
|
+
editableButtonRadius: s.editableButtonRadius,
|
|
709
|
+
legend: `${t.legend}`,
|
|
710
|
+
fieldsetIndex: v,
|
|
711
|
+
idx: P,
|
|
712
|
+
saveText: s.saveText ?? void 0,
|
|
713
|
+
saveButtonStartIcon: s.saveButtonStartIcon ?? void 0,
|
|
714
|
+
saveButtonEndIcon: s.saveButtonEndIcon ?? void 0,
|
|
715
|
+
cancelText: s.cancelText ?? void 0,
|
|
716
|
+
cancelButtonStartIcon: s.cancelButtonStartIcon ?? void 0,
|
|
717
|
+
cancelButtonEndIcon: s.cancelButtonEndIcon ?? void 0,
|
|
718
|
+
deleteText: s.deleteText ?? void 0,
|
|
719
|
+
deleteButtonStartIcon: s.deleteButtonStartIcon ?? void 0,
|
|
720
|
+
deleteButtonEndIcon: s.deleteButtonEndIcon ?? void 0,
|
|
721
|
+
editableInformation: s?.editableInformation || [],
|
|
713
722
|
onChangeOfEditableOption: x,
|
|
714
|
-
onClickSaveEdit:
|
|
723
|
+
onClickSaveEdit: s?.onClickSave || ((U) => {
|
|
715
724
|
}),
|
|
716
|
-
onClickCancelEdit:
|
|
725
|
+
onClickCancelEdit: s?.onClickCancel || ((U) => {
|
|
717
726
|
}),
|
|
718
|
-
onClickDeleteEntry:
|
|
727
|
+
onClickDeleteEntry: s?.onClickDelete || ((U) => {
|
|
719
728
|
})
|
|
720
729
|
}
|
|
721
730
|
)
|
|
722
731
|
] })
|
|
723
|
-
] }, `form-${
|
|
732
|
+
] }, `form-${a}-${P}`)) : t.isExpandable ? /* @__PURE__ */ r(ee, { children: `No entry yet on ${t.legend}. Click "+" button to add entry.` }) : ""
|
|
724
733
|
] }),
|
|
725
|
-
|
|
726
|
-
] }, `${
|
|
727
|
-
/* @__PURE__ */ $(Y, { id: `${
|
|
728
|
-
n && /* @__PURE__ */
|
|
729
|
-
!e &&
|
|
730
|
-
|
|
731
|
-
|
|
734
|
+
t.isExpandable && /* @__PURE__ */ r(oe, { className: "add-input-button-space", children: /* @__PURE__ */ r(B, { id: `expand-${t.legend}-inputs`, buttonType: "button", text: "+", onClick: f, className: "add-input-entry", dataAttributes: { "data-fieldsetindex": v } }) })
|
|
735
|
+
] }, `${t.legend}-${v}`)) : /* @__PURE__ */ $(_, { className: `${a}-fieldset-wrapper`, children: [
|
|
736
|
+
/* @__PURE__ */ $(Y, { id: `${a}-form-fieldset`, className: `${n}-fieldset`, children: [
|
|
737
|
+
n && /* @__PURE__ */ r(X, { className: `${n}-legend`, children: n }),
|
|
738
|
+
!e && d && d.length !== 0 ? d.map((t, v) => /* @__PURE__ */ $(M.Fragment, { children: [
|
|
739
|
+
t.type === "textarea" && /* @__PURE__ */ r(
|
|
740
|
+
R,
|
|
732
741
|
{
|
|
733
|
-
...
|
|
734
|
-
id:
|
|
742
|
+
...t,
|
|
743
|
+
id: t.id ?? `${n}-input`,
|
|
735
744
|
labelClass: b,
|
|
736
|
-
inputClass:
|
|
737
|
-
idx:
|
|
738
|
-
className: `${i} ${
|
|
745
|
+
inputClass: h,
|
|
746
|
+
idx: v,
|
|
747
|
+
className: `${i} ${t?.uniqueClass}`
|
|
739
748
|
}
|
|
740
749
|
),
|
|
741
|
-
|
|
742
|
-
|
|
750
|
+
t.type !== "textarea" && t.type !== "radio" && t.type !== "checkbox" && /* @__PURE__ */ r(
|
|
751
|
+
R,
|
|
743
752
|
{
|
|
744
|
-
...
|
|
745
|
-
id:
|
|
753
|
+
...t,
|
|
754
|
+
id: t.id ?? `${n}-input`,
|
|
746
755
|
labelClass: b,
|
|
747
|
-
inputClass:
|
|
748
|
-
idx:
|
|
749
|
-
className: `${i} ${
|
|
756
|
+
inputClass: h,
|
|
757
|
+
idx: v,
|
|
758
|
+
className: `${i} ${t?.uniqueClass}`
|
|
750
759
|
}
|
|
751
760
|
),
|
|
752
|
-
(
|
|
753
|
-
/* @__PURE__ */
|
|
754
|
-
|
|
761
|
+
(t.type === "radio" || t.type === "checkbox") && /* @__PURE__ */ $(O, { children: [
|
|
762
|
+
/* @__PURE__ */ r(
|
|
763
|
+
R,
|
|
755
764
|
{
|
|
756
|
-
...
|
|
757
|
-
id:
|
|
765
|
+
...t,
|
|
766
|
+
id: t.id ?? `${n}-input`,
|
|
758
767
|
labelClass: b,
|
|
759
|
-
inputClass:
|
|
760
|
-
idx:
|
|
761
|
-
className: `${i} ${
|
|
768
|
+
inputClass: h,
|
|
769
|
+
idx: v,
|
|
770
|
+
className: `${i} ${t?.uniqueClass}`
|
|
762
771
|
}
|
|
763
772
|
),
|
|
764
|
-
|
|
773
|
+
t.editing && t.isEditable && /* @__PURE__ */ r(
|
|
765
774
|
V,
|
|
766
775
|
{
|
|
767
|
-
editableButtonSize:
|
|
768
|
-
editableButtonColor:
|
|
769
|
-
editableButtonRadius:
|
|
776
|
+
editableButtonSize: t.editableButtonSize,
|
|
777
|
+
editableButtonColor: t.editableButtonColor,
|
|
778
|
+
editableButtonRadius: t.editableButtonRadius,
|
|
770
779
|
legend: `${n}`,
|
|
771
|
-
idx:
|
|
772
|
-
|
|
780
|
+
idx: v,
|
|
781
|
+
saveText: t.saveText ?? void 0,
|
|
782
|
+
saveButtonStartIcon: t.saveButtonStartIcon ?? void 0,
|
|
783
|
+
saveButtonEndIcon: t.saveButtonEndIcon ?? void 0,
|
|
784
|
+
cancelText: t.cancelText ?? void 0,
|
|
785
|
+
cancelButtonStartIcon: t.cancelButtonStartIcon ?? void 0,
|
|
786
|
+
cancelButtonEndIcon: t.cancelButtonEndIcon ?? void 0,
|
|
787
|
+
deleteText: t.deleteText ?? void 0,
|
|
788
|
+
deleteButtonStartIcon: t.deleteButtonStartIcon ?? void 0,
|
|
789
|
+
deleteButtonEndIcon: t.deleteButtonEndIcon ?? void 0,
|
|
790
|
+
editableInformation: t?.editableInformation,
|
|
773
791
|
onChangeOfEditableOption: x,
|
|
774
|
-
onClickSaveEdit:
|
|
792
|
+
onClickSaveEdit: t?.onClickSave || ((s) => {
|
|
775
793
|
}),
|
|
776
|
-
onClickCancelEdit:
|
|
794
|
+
onClickCancelEdit: t?.onClickCancel || ((s) => {
|
|
777
795
|
}),
|
|
778
|
-
onClickDeleteEntry:
|
|
796
|
+
onClickDeleteEntry: t?.onClickDelete || ((s) => {
|
|
779
797
|
})
|
|
780
798
|
}
|
|
781
799
|
)
|
|
782
800
|
] })
|
|
783
|
-
] }, `form-${
|
|
801
|
+
] }, `form-${a}-${v}`)) : l ? /* @__PURE__ */ r(ee, { children: `No entry yet on ${n}. Please click "+" button to add` }) : ""
|
|
784
802
|
] }),
|
|
785
|
-
l && /* @__PURE__ */
|
|
803
|
+
l && /* @__PURE__ */ r(oe, { className: "add-input-button-space", children: /* @__PURE__ */ r(B, { id: `expand-${n}-inputs`, buttonType: "button", text: "+", onClick: f, className: "add-input-entry" }) })
|
|
786
804
|
] }),
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
|
|
805
|
+
/* @__PURE__ */ r(
|
|
806
|
+
ve,
|
|
789
807
|
{
|
|
790
|
-
id:
|
|
791
|
-
formActionButtonSize:
|
|
792
|
-
formActionButtonColor:
|
|
793
|
-
formActionButtonRadius:
|
|
808
|
+
id: a,
|
|
809
|
+
formActionButtonSize: y,
|
|
810
|
+
formActionButtonColor: p,
|
|
811
|
+
formActionButtonRadius: k,
|
|
794
812
|
submitText: C,
|
|
795
|
-
submitIcon:
|
|
813
|
+
submitIcon: N,
|
|
796
814
|
hasReset: w,
|
|
797
815
|
resetText: S,
|
|
798
|
-
resetIcon:
|
|
799
|
-
handleReset:
|
|
800
|
-
hasCancel:
|
|
801
|
-
cancelText:
|
|
802
|
-
cancelIcon:
|
|
803
|
-
handleCancel:
|
|
816
|
+
resetIcon: E,
|
|
817
|
+
handleReset: q,
|
|
818
|
+
hasCancel: L,
|
|
819
|
+
cancelText: T,
|
|
820
|
+
cancelIcon: F,
|
|
821
|
+
handleCancel: A
|
|
804
822
|
}
|
|
805
823
|
),
|
|
806
|
-
/* @__PURE__ */
|
|
807
|
-
] }),
|
|
824
|
+
/* @__PURE__ */ r(Be, { className: "children-container", children: j })
|
|
825
|
+
] }), De = {
|
|
808
826
|
mobile: "320px",
|
|
809
827
|
//Small iPhone SE & Medium: iPhone 12-15
|
|
810
828
|
tablet: "768px",
|
|
@@ -813,108 +831,108 @@ const o = {
|
|
|
813
831
|
//Macbook 13" (1280x800)
|
|
814
832
|
largeDesktop: "1200px",
|
|
815
833
|
largerDesktop: "1400px"
|
|
816
|
-
},
|
|
817
|
-
primary1:
|
|
818
|
-
primary2:
|
|
819
|
-
primary3:
|
|
820
|
-
secondary1:
|
|
821
|
-
secondary2:
|
|
822
|
-
neutral1:
|
|
823
|
-
neutral2:
|
|
824
|
-
neutral3:
|
|
825
|
-
neutral4:
|
|
826
|
-
neutral5:
|
|
827
|
-
accent:
|
|
828
|
-
shadow1:
|
|
829
|
-
shadow2:
|
|
830
|
-
},
|
|
834
|
+
}, c = {
|
|
835
|
+
primary1: m("#202234"),
|
|
836
|
+
primary2: m("#3C5E83"),
|
|
837
|
+
primary3: m("#0F60B6"),
|
|
838
|
+
secondary1: m("#C67E10"),
|
|
839
|
+
secondary2: m("#F6C46D"),
|
|
840
|
+
neutral1: m("#FFFFFF"),
|
|
841
|
+
neutral2: m("#F2F2F2"),
|
|
842
|
+
neutral3: m("#ABABAB"),
|
|
843
|
+
neutral4: m("#373A40"),
|
|
844
|
+
neutral5: m("#000000"),
|
|
845
|
+
accent: m("#E1D3B7"),
|
|
846
|
+
shadow1: m("rgb(88, 88, 88)"),
|
|
847
|
+
shadow2: m("rgba(255, 255, 255, 0.50)")
|
|
848
|
+
}, Fe = {
|
|
831
849
|
name: "light",
|
|
832
850
|
colors: {
|
|
833
|
-
screenColor:
|
|
834
|
-
backgroundColor1:
|
|
835
|
-
backgroundColor2:
|
|
836
|
-
backgroundColor3:
|
|
837
|
-
backgroundColor4:
|
|
838
|
-
borderColor1:
|
|
839
|
-
borderColor2:
|
|
840
|
-
textColor1:
|
|
841
|
-
textColor2:
|
|
842
|
-
textColor3:
|
|
843
|
-
shadow:
|
|
851
|
+
screenColor: c.neutral2,
|
|
852
|
+
backgroundColor1: c.primary1,
|
|
853
|
+
backgroundColor2: c.primary2,
|
|
854
|
+
backgroundColor3: c.secondary2,
|
|
855
|
+
backgroundColor4: c.secondary1,
|
|
856
|
+
borderColor1: c.neutral5,
|
|
857
|
+
borderColor2: c.neutral3,
|
|
858
|
+
textColor1: c.neutral5,
|
|
859
|
+
textColor2: c.neutral4,
|
|
860
|
+
textColor3: c.accent,
|
|
861
|
+
shadow: c.shadow1
|
|
844
862
|
},
|
|
845
863
|
anchorTheme: {
|
|
846
|
-
visited:
|
|
847
|
-
hover:
|
|
848
|
-
active:
|
|
864
|
+
visited: c.neutral5,
|
|
865
|
+
hover: c.primary2,
|
|
866
|
+
active: c.secondary2
|
|
849
867
|
},
|
|
850
868
|
footerTheme: {
|
|
851
|
-
backgroundColor:
|
|
852
|
-
textColor:
|
|
853
|
-
shadowColor:
|
|
869
|
+
backgroundColor: c.neutral5,
|
|
870
|
+
textColor: c.secondary1,
|
|
871
|
+
shadowColor: c.shadow1
|
|
854
872
|
},
|
|
855
873
|
notificationPalette: {
|
|
856
|
-
infoText:
|
|
857
|
-
infoBackground:
|
|
858
|
-
warningText:
|
|
859
|
-
warningBackground:
|
|
860
|
-
successText:
|
|
861
|
-
successBackground:
|
|
862
|
-
errorText:
|
|
863
|
-
errorBackground:
|
|
874
|
+
infoText: m("#C9E6F0"),
|
|
875
|
+
infoBackground: m("#202234"),
|
|
876
|
+
warningText: m("#FCFFC1"),
|
|
877
|
+
warningBackground: m("#F2C265"),
|
|
878
|
+
successText: m("#9EDF9C"),
|
|
879
|
+
successBackground: m("#123524"),
|
|
880
|
+
errorText: m("#FAD4D4"),
|
|
881
|
+
errorBackground: m("#990000")
|
|
864
882
|
}
|
|
865
|
-
},
|
|
883
|
+
}, Ne = {
|
|
866
884
|
name: "dark",
|
|
867
885
|
colors: {
|
|
868
|
-
screenColor:
|
|
869
|
-
backgroundColor1:
|
|
870
|
-
backgroundColor2:
|
|
871
|
-
backgroundColor3:
|
|
872
|
-
backgroundColor4:
|
|
873
|
-
borderColor1:
|
|
874
|
-
borderColor2:
|
|
875
|
-
textColor1:
|
|
876
|
-
textColor2:
|
|
877
|
-
textColor3:
|
|
878
|
-
shadow:
|
|
886
|
+
screenColor: c.neutral5,
|
|
887
|
+
backgroundColor1: c.primary2,
|
|
888
|
+
backgroundColor2: c.primary3,
|
|
889
|
+
backgroundColor3: c.secondary1,
|
|
890
|
+
backgroundColor4: c.secondary2,
|
|
891
|
+
borderColor1: c.neutral2,
|
|
892
|
+
borderColor2: c.neutral3,
|
|
893
|
+
textColor1: c.neutral1,
|
|
894
|
+
textColor2: c.accent,
|
|
895
|
+
textColor3: c.neutral2,
|
|
896
|
+
shadow: c.shadow2
|
|
879
897
|
},
|
|
880
898
|
anchorTheme: {
|
|
881
|
-
link:
|
|
882
|
-
visited:
|
|
883
|
-
hover:
|
|
884
|
-
active:
|
|
899
|
+
link: c.neutral1,
|
|
900
|
+
visited: c.neutral1,
|
|
901
|
+
hover: c.primary3,
|
|
902
|
+
active: c.secondary1
|
|
885
903
|
},
|
|
886
904
|
footerTheme: {
|
|
887
|
-
backgroundColor:
|
|
888
|
-
textColor:
|
|
889
|
-
shadowColor:
|
|
905
|
+
backgroundColor: c.accent,
|
|
906
|
+
textColor: c.primary1,
|
|
907
|
+
shadowColor: c.shadow2
|
|
890
908
|
},
|
|
891
909
|
notificationPalette: {
|
|
892
|
-
infoText:
|
|
893
|
-
infoBackground:
|
|
894
|
-
warningText:
|
|
895
|
-
warningBackground:
|
|
896
|
-
successText:
|
|
897
|
-
successBackground:
|
|
898
|
-
errorBackground:
|
|
899
|
-
errorText:
|
|
910
|
+
infoText: m("#202234"),
|
|
911
|
+
infoBackground: m("#C9E6F0"),
|
|
912
|
+
warningText: m("#F2C265"),
|
|
913
|
+
warningBackground: m("#FCFFC1"),
|
|
914
|
+
successText: m("#123524"),
|
|
915
|
+
successBackground: m("#9EDF9C"),
|
|
916
|
+
errorBackground: m("#FAD4D4"),
|
|
917
|
+
errorText: m("#990000")
|
|
900
918
|
}
|
|
901
|
-
}, te = ae({}),
|
|
919
|
+
}, te = ae({}), Ie = ({
|
|
902
920
|
children: e,
|
|
903
|
-
initialTheme: n =
|
|
904
|
-
secondTheme: l =
|
|
921
|
+
initialTheme: n = Fe,
|
|
922
|
+
secondTheme: l = Ne
|
|
905
923
|
}) => {
|
|
906
|
-
const [
|
|
907
|
-
|
|
924
|
+
const [a, d] = le(n), i = () => {
|
|
925
|
+
d((b) => b === n ? l : n);
|
|
908
926
|
};
|
|
909
|
-
return /* @__PURE__ */
|
|
910
|
-
},
|
|
927
|
+
return /* @__PURE__ */ r(te.Provider, { value: { currentTheme: a, toggleTheme: i }, children: /* @__PURE__ */ r(se, { theme: a, children: e }) });
|
|
928
|
+
}, Re = () => ne(te);
|
|
911
929
|
export {
|
|
912
|
-
|
|
930
|
+
qe as DynamicForm,
|
|
913
931
|
te as ThemeContext,
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
932
|
+
Ie as ThemeContextProvider,
|
|
933
|
+
De as breakpoints,
|
|
934
|
+
Ne as darkTheme,
|
|
935
|
+
Fe as lightTheme,
|
|
936
|
+
c as palette,
|
|
937
|
+
Re as useTheme
|
|
920
938
|
};
|