@kbgarcia8/react-dynamic-form 1.1.39 → 2.0.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/README.md +17 -2
- package/dist/components/atoms/Button/Button.d.ts +1 -1
- package/dist/components/atoms/Button/Button.d.ts.map +1 -1
- package/dist/components/atoms/Input/Input.d.ts.map +1 -1
- package/dist/components/molecules/FormActionButtons/FormActionButtons.d.ts +1 -1
- package/dist/components/molecules/FormActionButtons/FormActionButtons.d.ts.map +1 -1
- package/dist/components/organisms/DynamicForm/DynamicForm.d.ts +1 -1
- package/dist/components/organisms/DynamicForm/DynamicForm.d.ts.map +1 -1
- package/dist/react-dynamic-form.cjs.js +26 -26
- package/dist/react-dynamic-form.es.js +423 -407
- package/dist/type/propTypes.d.ts +18 -10
- package/dist/type/propTypes.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as u, Fragment as j } from "react/jsx-runtime";
|
|
2
|
+
import q, { forwardRef as X, createContext as Y, useState as Z, useContext as _ } from "react";
|
|
3
|
+
import m, { ThemeProvider as I } from "styled-components";
|
|
4
|
+
const t = {
|
|
5
5
|
fonts: {
|
|
6
6
|
secondary: "Raleway",
|
|
7
7
|
tertiary: "Lato",
|
|
@@ -32,15 +32,15 @@ const e = {
|
|
|
32
32
|
thin: "0.0625rem",
|
|
33
33
|
light: "0.125rem"
|
|
34
34
|
}
|
|
35
|
-
},
|
|
35
|
+
}, R = m.button`
|
|
36
36
|
display: flex;
|
|
37
37
|
align-items: center;
|
|
38
38
|
justify-content: center;
|
|
39
|
-
background-color: ${({ theme:
|
|
40
|
-
color: ${({ theme:
|
|
41
|
-
border: ${
|
|
42
|
-
border-radius: ${
|
|
43
|
-
padding: ${
|
|
39
|
+
background-color: ${({ theme: a }) => a.colors.blue || "blue"};
|
|
40
|
+
color: ${({ theme: a }) => a.colors.bg || "white"};
|
|
41
|
+
border: ${t.borderThickness.light} solid ${({ theme: a }) => a.colors.text || "black"};
|
|
42
|
+
border-radius: ${t.borderRadius.xlarge};
|
|
43
|
+
padding: ${t.spacing.xxxsmall} ${t.spacing.small};
|
|
44
44
|
margin: 0.125rem;
|
|
45
45
|
width: auto;
|
|
46
46
|
cursor: pointer;
|
|
@@ -48,7 +48,7 @@ const e = {
|
|
|
48
48
|
|
|
49
49
|
&:hover {
|
|
50
50
|
background-color: lightblue;
|
|
51
|
-
border: ${
|
|
51
|
+
border: ${t.borderThickness.light} solid gray;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
& .button-icon-text-space {
|
|
@@ -58,65 +58,82 @@ const e = {
|
|
|
58
58
|
& .button-icon-text-space svg {
|
|
59
59
|
max-width: 100%;
|
|
60
60
|
}
|
|
61
|
-
`,
|
|
61
|
+
`, B = m.div`
|
|
62
62
|
width: 100%;
|
|
63
63
|
display: flex;
|
|
64
64
|
flex-direction: row;
|
|
65
65
|
align-items: center;
|
|
66
66
|
justify-content: center;
|
|
67
|
-
`,
|
|
67
|
+
`, W = m.img`
|
|
68
68
|
maxwidth: 100%;
|
|
69
|
-
`,
|
|
70
|
-
font-size: ${
|
|
71
|
-
font-weight: ${
|
|
72
|
-
font-family: ${
|
|
69
|
+
`, P = m.span`
|
|
70
|
+
font-size: ${t.fontSize.xsmall};
|
|
71
|
+
font-weight: ${t.fontWeight.medium};
|
|
72
|
+
font-family: ${t.fonts.tertiary}, ${t.fonts.fallback};
|
|
73
73
|
display: flex;
|
|
74
74
|
align-items: center;
|
|
75
75
|
justify-content: center;
|
|
76
|
-
`,
|
|
77
|
-
onClick:
|
|
78
|
-
id:
|
|
79
|
-
buttonType:
|
|
80
|
-
source:
|
|
81
|
-
svg:
|
|
76
|
+
`, p = ({
|
|
77
|
+
onClick: a,
|
|
78
|
+
id: l,
|
|
79
|
+
buttonType: n,
|
|
80
|
+
source: i,
|
|
81
|
+
svg: d,
|
|
82
82
|
alt: c = "alt-button-icon",
|
|
83
|
-
text:
|
|
84
|
-
className:
|
|
85
|
-
dataAttributes:
|
|
86
|
-
}) =>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
)
|
|
83
|
+
text: r = "",
|
|
84
|
+
className: b = "",
|
|
85
|
+
dataAttributes: f = {}
|
|
86
|
+
}) => {
|
|
87
|
+
if (n === "button")
|
|
88
|
+
return /* @__PURE__ */ e(
|
|
89
|
+
R,
|
|
90
|
+
{
|
|
91
|
+
onClick: a,
|
|
92
|
+
id: l,
|
|
93
|
+
type: n,
|
|
94
|
+
className: b,
|
|
95
|
+
...f,
|
|
96
|
+
children: /* @__PURE__ */ u(B, { className: "button-icon-text-space", children: [
|
|
97
|
+
i ? /* @__PURE__ */ e(W, { src: i, alt: c }) : d || "",
|
|
98
|
+
r && /* @__PURE__ */ e(P, { id: l, children: r })
|
|
99
|
+
] })
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
if (n === "submit")
|
|
103
|
+
return /* @__PURE__ */ e(
|
|
104
|
+
R,
|
|
105
|
+
{
|
|
106
|
+
id: l,
|
|
107
|
+
type: n,
|
|
108
|
+
className: b,
|
|
109
|
+
...f,
|
|
110
|
+
children: /* @__PURE__ */ u(B, { className: "button-icon-text-space", children: [
|
|
111
|
+
i ? /* @__PURE__ */ e(W, { src: i, alt: c }) : d || "",
|
|
112
|
+
r && /* @__PURE__ */ e(P, { id: l, children: r })
|
|
113
|
+
] })
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}, ee = m.div`
|
|
100
117
|
display: flex;
|
|
101
118
|
flex-direction: column;
|
|
102
119
|
align-items: left;
|
|
103
120
|
width: 100%;
|
|
104
|
-
margin-bottom: ${
|
|
105
|
-
`,
|
|
121
|
+
margin-bottom: ${t.spacing.small};
|
|
122
|
+
`, te = m.div`
|
|
106
123
|
display: flex;
|
|
107
|
-
gap: ${
|
|
124
|
+
gap: ${t.spacing.xsmall};
|
|
108
125
|
width: auto;
|
|
109
126
|
height: auto;
|
|
110
|
-
`,
|
|
127
|
+
`, ae = m.label`
|
|
111
128
|
display: flex;
|
|
112
129
|
align-items: center;
|
|
113
130
|
justify-content:center;
|
|
114
131
|
height: auto;
|
|
115
|
-
flex-direction: ${(
|
|
116
|
-
font-family: ${
|
|
117
|
-
font-size: ${
|
|
118
|
-
font-weight: ${
|
|
119
|
-
gap: ${
|
|
132
|
+
flex-direction: ${(a) => a.$labelFlexDirection || "column"};
|
|
133
|
+
font-family: ${t.fonts.secondary}, ${t.fonts.fallback};
|
|
134
|
+
font-size: ${t.fontSize.xsmall};
|
|
135
|
+
font-weight: ${t.fontWeight.bold};
|
|
136
|
+
gap: ${t.spacing.xxsmall};
|
|
120
137
|
|
|
121
138
|
& .label-icon-container img,
|
|
122
139
|
& .label-icon-container svg {
|
|
@@ -124,485 +141,484 @@ const e = {
|
|
|
124
141
|
height: auto;
|
|
125
142
|
object-fit: contain;
|
|
126
143
|
}
|
|
127
|
-
`,
|
|
144
|
+
`, ne = m.div`
|
|
128
145
|
display: flex;
|
|
129
146
|
flex-direction: column;
|
|
130
147
|
align-items: center;
|
|
131
148
|
justify-content: center;
|
|
132
|
-
gap: ${
|
|
133
|
-
`,
|
|
134
|
-
font-weight: ${
|
|
135
|
-
`,
|
|
149
|
+
gap: ${t.spacing.xxxsmall};
|
|
150
|
+
`, oe = m.span`
|
|
151
|
+
font-weight: ${t.fontWeight.bolder};
|
|
152
|
+
`, ie = m.div`
|
|
136
153
|
max-width: 100%;
|
|
137
154
|
display: flex;
|
|
138
155
|
align-items: center;
|
|
139
|
-
`,
|
|
140
|
-
font-weight: ${
|
|
141
|
-
`,
|
|
142
|
-
htmlFor:
|
|
143
|
-
textLabel:
|
|
144
|
-
additionalInfo:
|
|
145
|
-
$labelFlexDirection:
|
|
146
|
-
source:
|
|
156
|
+
`, le = m.span`
|
|
157
|
+
font-weight: ${t.fontWeight.light};
|
|
158
|
+
`, M = ({
|
|
159
|
+
htmlFor: a,
|
|
160
|
+
textLabel: l,
|
|
161
|
+
additionalInfo: n,
|
|
162
|
+
$labelFlexDirection: i,
|
|
163
|
+
source: d,
|
|
147
164
|
svg: c,
|
|
148
|
-
className:
|
|
149
|
-
children:
|
|
150
|
-
}) => /* @__PURE__ */
|
|
151
|
-
(
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
|
|
165
|
+
className: r,
|
|
166
|
+
children: b
|
|
167
|
+
}) => /* @__PURE__ */ u(ae, { htmlFor: a, className: r, $labelFlexDirection: i, children: [
|
|
168
|
+
(d || c) && /* @__PURE__ */ e(ie, { className: "label-icon-container", children: d ? /* @__PURE__ */ e("img", { src: d, alt: `${a}-label-icon` }) : c || "" }),
|
|
169
|
+
/* @__PURE__ */ u(ne, { className: "label-text-container", children: [
|
|
170
|
+
/* @__PURE__ */ e(oe, { className: "main-label", children: l }),
|
|
171
|
+
n && /* @__PURE__ */ e(le, { className: "additional-info", children: n })
|
|
155
172
|
] }),
|
|
156
|
-
|
|
157
|
-
] }),
|
|
173
|
+
b
|
|
174
|
+
] }), U = m.input`
|
|
158
175
|
display: flex;
|
|
159
176
|
place-content: center;
|
|
160
|
-
font-family: ${
|
|
161
|
-
font-size: ${
|
|
177
|
+
font-family: ${t.fonts.secondary}, ${t.fonts.fallback};
|
|
178
|
+
font-size: ${t.fontSize.xsmall};
|
|
162
179
|
line-height: 1.75;
|
|
163
|
-
padding: ${
|
|
180
|
+
padding: ${t.spacing.xxxsmall} ${t.spacing.xsmall};
|
|
164
181
|
max-width: 100%;
|
|
165
182
|
height: auto;
|
|
166
183
|
background-color: #FFFFFF;
|
|
167
184
|
outline: none;
|
|
168
|
-
border: ${
|
|
169
|
-
border-radius: ${
|
|
185
|
+
border: ${t.borderThickness.thin} solid #000000;
|
|
186
|
+
border-radius: ${t.borderRadius.xsmall};
|
|
170
187
|
|
|
171
188
|
&:focus{
|
|
172
|
-
border: ${
|
|
189
|
+
border: ${t.borderThickness.thin} solid ${({ theme: a }) => a.colors.teal};
|
|
173
190
|
}
|
|
174
|
-
`,
|
|
191
|
+
`, se = m.textarea`
|
|
175
192
|
display: flex;
|
|
176
193
|
place-content: center;
|
|
177
|
-
border: ${
|
|
178
|
-
border-radius: ${
|
|
194
|
+
border: ${t.borderThickness.light} solid ${({ theme: a }) => a.colors.text};
|
|
195
|
+
border-radius: ${t.borderRadius.small};
|
|
179
196
|
outline: none;
|
|
180
|
-
line-height: ${
|
|
181
|
-
padding: ${
|
|
182
|
-
font-family: ${
|
|
183
|
-
font-size: ${
|
|
197
|
+
line-height: ${t.spacing.small};
|
|
198
|
+
padding: ${t.spacing.xxxsmall};
|
|
199
|
+
font-family: ${t.fonts.secondary}, ${t.fonts.fallback};
|
|
200
|
+
font-size: ${t.fontSize.xsmall};
|
|
184
201
|
max-width: 100%;
|
|
185
202
|
resize: none;
|
|
186
203
|
overflow-y: auto;
|
|
187
|
-
`,
|
|
188
|
-
const { type:
|
|
189
|
-
if (
|
|
190
|
-
const { rows:
|
|
191
|
-
return /* @__PURE__ */
|
|
192
|
-
|
|
204
|
+
`, T = X((a, l) => {
|
|
205
|
+
const { type: n, id: i, onChange: d, isRequired: c, dataAttributes: r = {}, disabled: b, className: f, name: $ } = a;
|
|
206
|
+
if (n === "textarea") {
|
|
207
|
+
const { rows: w = 5, cols: E = 30, value: D, ...S } = a;
|
|
208
|
+
return /* @__PURE__ */ e(
|
|
209
|
+
se,
|
|
193
210
|
{
|
|
194
|
-
|
|
195
|
-
value:
|
|
196
|
-
rows:
|
|
197
|
-
cols:
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
disabled: h,
|
|
211
|
+
ref: l,
|
|
212
|
+
value: D,
|
|
213
|
+
rows: w,
|
|
214
|
+
cols: E,
|
|
215
|
+
id: i,
|
|
216
|
+
onChange: d,
|
|
201
217
|
required: c,
|
|
202
|
-
|
|
203
|
-
...
|
|
218
|
+
disabled: b,
|
|
219
|
+
...r,
|
|
220
|
+
className: f,
|
|
221
|
+
name: $
|
|
204
222
|
}
|
|
205
223
|
);
|
|
206
224
|
}
|
|
207
|
-
if (
|
|
208
|
-
const { checked:
|
|
209
|
-
return /* @__PURE__ */
|
|
210
|
-
|
|
225
|
+
if (n === "radio" || n === "checkbox") {
|
|
226
|
+
const { checked: w, ...E } = a;
|
|
227
|
+
return /* @__PURE__ */ e(
|
|
228
|
+
U,
|
|
211
229
|
{
|
|
212
|
-
ref:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
230
|
+
ref: l,
|
|
231
|
+
type: n,
|
|
232
|
+
checked: w,
|
|
233
|
+
id: i,
|
|
234
|
+
onChange: d,
|
|
217
235
|
required: c,
|
|
218
|
-
...
|
|
219
|
-
|
|
236
|
+
...r,
|
|
237
|
+
disabled: b,
|
|
238
|
+
className: f,
|
|
239
|
+
name: $
|
|
220
240
|
}
|
|
221
241
|
);
|
|
222
242
|
}
|
|
223
|
-
const
|
|
224
|
-
return /* @__PURE__ */
|
|
225
|
-
|
|
243
|
+
const k = a, { value: y, pattern: N, placeholderText: C, ...F } = k;
|
|
244
|
+
return /* @__PURE__ */ e(
|
|
245
|
+
U,
|
|
226
246
|
{
|
|
247
|
+
ref: l,
|
|
248
|
+
type: n,
|
|
249
|
+
value: y,
|
|
250
|
+
pattern: N,
|
|
227
251
|
placeholder: C,
|
|
228
|
-
|
|
229
|
-
|
|
252
|
+
id: i,
|
|
253
|
+
onChange: d,
|
|
230
254
|
required: c,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
...w,
|
|
236
|
-
...d
|
|
255
|
+
...r,
|
|
256
|
+
disabled: b,
|
|
257
|
+
className: f,
|
|
258
|
+
name: $
|
|
237
259
|
}
|
|
238
260
|
);
|
|
239
|
-
}),
|
|
261
|
+
}), A = (a) => {
|
|
240
262
|
const {
|
|
241
|
-
className:
|
|
242
|
-
type:
|
|
243
|
-
id:
|
|
244
|
-
textLabel:
|
|
263
|
+
className: l,
|
|
264
|
+
type: n,
|
|
265
|
+
id: i,
|
|
266
|
+
textLabel: d,
|
|
245
267
|
additionalInfo: c,
|
|
246
|
-
$labelFlexDirection:
|
|
247
|
-
svg:
|
|
248
|
-
labelClass:
|
|
249
|
-
onChange:
|
|
250
|
-
isRequired:
|
|
251
|
-
dataAttributes:
|
|
252
|
-
inputClass:
|
|
253
|
-
ref:
|
|
254
|
-
disabled:
|
|
255
|
-
isEditable:
|
|
256
|
-
editIcon:
|
|
257
|
-
onClickEdit:
|
|
268
|
+
$labelFlexDirection: r,
|
|
269
|
+
svg: b,
|
|
270
|
+
labelClass: f,
|
|
271
|
+
onChange: $,
|
|
272
|
+
isRequired: k,
|
|
273
|
+
dataAttributes: y,
|
|
274
|
+
inputClass: N,
|
|
275
|
+
ref: C,
|
|
276
|
+
disabled: F,
|
|
277
|
+
isEditable: w,
|
|
278
|
+
editIcon: E,
|
|
279
|
+
onClickEdit: D,
|
|
258
280
|
deleteIcon: S,
|
|
259
281
|
onClickDelete: z,
|
|
260
|
-
idx:
|
|
261
|
-
children:
|
|
262
|
-
} =
|
|
263
|
-
return /* @__PURE__ */
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
const { rows:
|
|
267
|
-
return /* @__PURE__ */
|
|
268
|
-
|
|
282
|
+
idx: o,
|
|
283
|
+
children: g
|
|
284
|
+
} = a;
|
|
285
|
+
return /* @__PURE__ */ u(ee, { className: `${l} ${i.replace("#", "")}-label-input-container`, children: [
|
|
286
|
+
n !== "radio" && n !== "checkbox" && /* @__PURE__ */ e(M, { htmlFor: i, textLabel: d, additionalInfo: c, $labelFlexDirection: r, svg: b, className: f }),
|
|
287
|
+
n !== "radio" && n !== "checkbox" && n === "textarea" && (() => {
|
|
288
|
+
const { rows: s = 5, cols: x = 30, value: v, ...L } = a;
|
|
289
|
+
return /* @__PURE__ */ e(
|
|
290
|
+
T,
|
|
269
291
|
{
|
|
270
|
-
id:
|
|
271
|
-
name:
|
|
292
|
+
id: i,
|
|
293
|
+
name: i,
|
|
272
294
|
type: "textarea",
|
|
273
|
-
isRequired:
|
|
274
|
-
onChange:
|
|
275
|
-
value:
|
|
276
|
-
rows:
|
|
277
|
-
cols:
|
|
278
|
-
dataAttributes:
|
|
279
|
-
className:
|
|
280
|
-
ref:
|
|
281
|
-
disabled:
|
|
295
|
+
isRequired: k,
|
|
296
|
+
onChange: $,
|
|
297
|
+
value: v,
|
|
298
|
+
rows: s,
|
|
299
|
+
cols: x,
|
|
300
|
+
dataAttributes: y,
|
|
301
|
+
className: N,
|
|
302
|
+
ref: C,
|
|
303
|
+
disabled: F
|
|
282
304
|
}
|
|
283
305
|
);
|
|
284
306
|
})(),
|
|
285
|
-
|
|
286
|
-
const
|
|
287
|
-
return /* @__PURE__ */
|
|
288
|
-
|
|
307
|
+
n !== "radio" && n !== "checkbox" && n !== "textarea" && (() => {
|
|
308
|
+
const s = a, { value: x, pattern: v, placeholderText: L, ...pe } = s;
|
|
309
|
+
return /* @__PURE__ */ e(
|
|
310
|
+
T,
|
|
289
311
|
{
|
|
290
|
-
id:
|
|
291
|
-
name:
|
|
292
|
-
placeholderText:
|
|
293
|
-
onChange:
|
|
294
|
-
value:
|
|
295
|
-
type:
|
|
296
|
-
isRequired:
|
|
297
|
-
dataAttributes:
|
|
298
|
-
className:
|
|
299
|
-
ref:
|
|
300
|
-
disabled:
|
|
301
|
-
pattern:
|
|
312
|
+
id: i,
|
|
313
|
+
name: i,
|
|
314
|
+
placeholderText: L,
|
|
315
|
+
onChange: $,
|
|
316
|
+
value: x,
|
|
317
|
+
type: n,
|
|
318
|
+
isRequired: k,
|
|
319
|
+
dataAttributes: y,
|
|
320
|
+
className: N,
|
|
321
|
+
ref: C,
|
|
322
|
+
disabled: F,
|
|
323
|
+
pattern: v
|
|
302
324
|
}
|
|
303
325
|
);
|
|
304
326
|
})(),
|
|
305
|
-
(
|
|
306
|
-
const { checked:
|
|
307
|
-
return /* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
|
|
327
|
+
(n === "radio" || n === "checkbox") && (() => {
|
|
328
|
+
const { checked: s, ...x } = a;
|
|
329
|
+
return /* @__PURE__ */ u(j, { children: [
|
|
330
|
+
/* @__PURE__ */ e(
|
|
331
|
+
T,
|
|
310
332
|
{
|
|
311
|
-
ref:
|
|
312
|
-
type:
|
|
313
|
-
name:
|
|
314
|
-
id:
|
|
315
|
-
isRequired:
|
|
316
|
-
checked:
|
|
317
|
-
onChange:
|
|
318
|
-
disabled:
|
|
319
|
-
className:
|
|
320
|
-
dataAttributes:
|
|
333
|
+
ref: C,
|
|
334
|
+
type: n,
|
|
335
|
+
name: i,
|
|
336
|
+
id: i,
|
|
337
|
+
isRequired: k,
|
|
338
|
+
checked: s,
|
|
339
|
+
onChange: $,
|
|
340
|
+
disabled: F,
|
|
341
|
+
className: N,
|
|
342
|
+
dataAttributes: y
|
|
321
343
|
}
|
|
322
344
|
),
|
|
323
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ e(M, { htmlFor: i, textLabel: d, additionalInfo: c, $labelFlexDirection: r, svg: b, className: f })
|
|
324
346
|
] });
|
|
325
347
|
})(),
|
|
326
|
-
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
/* @__PURE__ */
|
|
348
|
+
w && /* @__PURE__ */ u(te, { className: "input-edit-buttons", children: [
|
|
349
|
+
/* @__PURE__ */ e(p, { id: `editable-${i}-edit-btn`, svg: E, buttonType: "button", onClick: D, className: `edit-radio-${o}`, dataAttributes: y }),
|
|
350
|
+
/* @__PURE__ */ e(p, { id: `editable-${i}-delete-btn`, svg: S, buttonType: "button", onClick: z, className: `delete-radio-${o}`, dataAttributes: y })
|
|
329
351
|
] }),
|
|
330
|
-
|
|
352
|
+
g
|
|
331
353
|
] });
|
|
332
|
-
},
|
|
354
|
+
}, ce = m.fieldset`
|
|
333
355
|
padding: 0;
|
|
334
356
|
height: auto;
|
|
335
357
|
width: 100%;
|
|
336
|
-
`,
|
|
337
|
-
font-size: ${
|
|
358
|
+
`, re = m.legend`
|
|
359
|
+
font-size: ${t.spacing.medium};
|
|
338
360
|
font-weight: 500;
|
|
339
|
-
margin: 0 auto ${
|
|
361
|
+
margin: 0 auto ${t.spacing.small} auto;
|
|
340
362
|
text-align: center;
|
|
341
|
-
font-family: ${
|
|
342
|
-
`,
|
|
363
|
+
font-family: ${t.fonts.secondary}, ${t.fonts.fallback};
|
|
364
|
+
`, de = m.div`
|
|
343
365
|
display: flex;
|
|
344
366
|
flex-direction: column;
|
|
345
367
|
align-items: flex-start;
|
|
346
368
|
width: 100%;
|
|
347
|
-
margin-bottom: ${
|
|
348
|
-
`,
|
|
369
|
+
margin-bottom: ${t.spacing.small};
|
|
370
|
+
`, me = m.div`
|
|
349
371
|
display: flex;
|
|
350
372
|
justify-content: space-between;
|
|
351
373
|
width: 100%;
|
|
352
|
-
`,
|
|
353
|
-
legend:
|
|
354
|
-
fieldsetIndex:
|
|
355
|
-
idx:
|
|
356
|
-
editableInformation:
|
|
357
|
-
onChangeOfEditableOption:
|
|
374
|
+
`, H = ({
|
|
375
|
+
legend: a,
|
|
376
|
+
fieldsetIndex: l,
|
|
377
|
+
idx: n,
|
|
378
|
+
editableInformation: i,
|
|
379
|
+
onChangeOfEditableOption: d,
|
|
358
380
|
onClickSaveEdit: c,
|
|
359
|
-
onClickCancelEdit:
|
|
360
|
-
onClickDeleteEntry:
|
|
361
|
-
}) => /* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
|
|
364
|
-
|
|
381
|
+
onClickCancelEdit: r,
|
|
382
|
+
onClickDeleteEntry: b
|
|
383
|
+
}) => /* @__PURE__ */ u(ce, { className: "editable-option-fieldset", children: [
|
|
384
|
+
/* @__PURE__ */ e(re, { children: `${a} ${n + 1}` }),
|
|
385
|
+
i?.map((f, $) => /* @__PURE__ */ e(de, { className: "editable-option-container", children: /* @__PURE__ */ e(
|
|
386
|
+
T,
|
|
365
387
|
{
|
|
366
|
-
id: `editable-option-${
|
|
367
|
-
name: `editable-option-${
|
|
368
|
-
placeholderText:
|
|
369
|
-
onChange:
|
|
370
|
-
value:
|
|
371
|
-
type:
|
|
388
|
+
id: `editable-option-${$}`,
|
|
389
|
+
name: `editable-option-${$}`,
|
|
390
|
+
placeholderText: f.name.charAt(0).toUpperCase() + f.name.slice(1),
|
|
391
|
+
onChange: d,
|
|
392
|
+
value: f.info,
|
|
393
|
+
type: f.type,
|
|
372
394
|
isRequired: !0,
|
|
373
395
|
className: "editable-option",
|
|
374
396
|
dataAttributes: {
|
|
375
|
-
"data-index":
|
|
376
|
-
"data-fieldsetindex":
|
|
377
|
-
"data-key":
|
|
397
|
+
"data-index": $,
|
|
398
|
+
"data-fieldsetindex": l,
|
|
399
|
+
"data-key": f.info
|
|
378
400
|
}
|
|
379
401
|
}
|
|
380
|
-
) }, `${
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */
|
|
402
|
+
) }, `${f.name}-${$}`)),
|
|
403
|
+
/* @__PURE__ */ u(me, { className: "editable-option-button-space", children: [
|
|
404
|
+
/* @__PURE__ */ e(p, { id: `editable-option-${n}-submit`, buttonType: "button", text: "Save", onClick: c, className: "editable-option-btn", dataAttributes: { "data-index": n, "data-fieldsetindex": l } }),
|
|
405
|
+
/* @__PURE__ */ e(p, { id: `editable-option-${n}-cancel`, buttonType: "button", text: "Cancel", onClick: r, className: "editable-option-btn", dataAttributes: { "data-index": n, "data-fieldsetindex": l } }),
|
|
406
|
+
/* @__PURE__ */ e(p, { id: `editable-option-${n}-delete`, buttonType: "button", text: "Delete", onClick: b, className: "editable-option-btn", dataAttributes: { "data-index": n, "data-fieldsetindex": l } })
|
|
385
407
|
] })
|
|
386
|
-
] }),
|
|
408
|
+
] }), be = m.div`
|
|
387
409
|
display: flex;
|
|
388
410
|
justify-content: space-between;
|
|
389
411
|
max-width: 100%;
|
|
390
|
-
`,
|
|
391
|
-
id:
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
hasReset: m,
|
|
396
|
-
resetText: c,
|
|
412
|
+
`, he = ({
|
|
413
|
+
id: a,
|
|
414
|
+
submitText: l,
|
|
415
|
+
hasReset: n,
|
|
416
|
+
resetText: i,
|
|
397
417
|
handleReset: d,
|
|
398
|
-
hasCancel:
|
|
399
|
-
cancelText:
|
|
400
|
-
handleCancel:
|
|
401
|
-
}) => /* @__PURE__ */
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
] }),
|
|
406
|
-
font-size: ${
|
|
418
|
+
hasCancel: c,
|
|
419
|
+
cancelText: r,
|
|
420
|
+
handleCancel: b
|
|
421
|
+
}) => /* @__PURE__ */ u(be, { className: "form-main-button-container", children: [
|
|
422
|
+
/* @__PURE__ */ e(p, { id: `form-${a}-submit`, buttonType: "submit", text: l ?? "Submit", className: "submit-form-btn" }),
|
|
423
|
+
n && /* @__PURE__ */ e(p, { id: `form-${a}-edit`, buttonType: "button", text: i ?? "Reset", onClick: d, className: "reset-form-btn" }),
|
|
424
|
+
c && /* @__PURE__ */ e(p, { id: `form-${a}-cancel`, buttonType: "button", text: r ?? "Cancel", onClick: b, className: "cancel-form-btn" })
|
|
425
|
+
] }), O = m.legend`
|
|
426
|
+
font-size: ${t.spacing.medium};
|
|
407
427
|
font-weight: 500;
|
|
408
|
-
margin-bottom: ${
|
|
428
|
+
margin-bottom: ${t.spacing.small};
|
|
409
429
|
width: auto;
|
|
410
430
|
text-align: center;
|
|
411
|
-
font-family: ${
|
|
412
|
-
`,
|
|
431
|
+
font-family: ${t.fonts.secondary}, ${t.fonts.fallback};
|
|
432
|
+
`, G = m.fieldset`
|
|
413
433
|
padding: 0;
|
|
414
434
|
height: auto;
|
|
415
435
|
width: 100%;
|
|
416
|
-
`,
|
|
417
|
-
padding: ${
|
|
436
|
+
`, J = m.div`
|
|
437
|
+
padding: ${t.spacing.small};
|
|
418
438
|
height: auto;
|
|
419
439
|
width: 100%;
|
|
420
|
-
`,
|
|
440
|
+
`, K = m.div`
|
|
421
441
|
display: flex;
|
|
422
442
|
justify-content: center;
|
|
423
443
|
align-items: center;
|
|
424
444
|
width: 100%;
|
|
425
445
|
height: auto;
|
|
426
|
-
font-family: ${
|
|
427
|
-
font-size: ${
|
|
428
|
-
font-weight: ${
|
|
429
|
-
`, fe =
|
|
446
|
+
font-family: ${t.fonts.tertiary}, ${t.fonts.fallback};
|
|
447
|
+
font-size: ${t.fontSize.xsmall};
|
|
448
|
+
font-weight: ${t.fontWeight.bold};
|
|
449
|
+
`, fe = m.form`
|
|
430
450
|
display: flex;
|
|
431
451
|
flex-direction: column;
|
|
432
452
|
align-items: center;
|
|
433
453
|
width: 100%;
|
|
434
|
-
`,
|
|
454
|
+
`, Q = m.div`
|
|
435
455
|
display: flex;
|
|
436
456
|
justify-content: space-between;
|
|
437
457
|
width: 100%;
|
|
438
|
-
`,
|
|
458
|
+
`, ue = m.div`
|
|
439
459
|
width: 100%;
|
|
440
460
|
display: flex;
|
|
441
461
|
flex-direction: column;
|
|
442
462
|
align-items: center;
|
|
443
463
|
justify-content: center;
|
|
444
464
|
`, Ce = ({
|
|
445
|
-
fieldsets:
|
|
446
|
-
legendText:
|
|
447
|
-
isExpandable:
|
|
448
|
-
id:
|
|
449
|
-
formInputs:
|
|
465
|
+
fieldsets: a = null,
|
|
466
|
+
legendText: l,
|
|
467
|
+
isExpandable: n,
|
|
468
|
+
id: i,
|
|
469
|
+
formInputs: d,
|
|
450
470
|
labelAndInputContainerClass: c,
|
|
451
|
-
labelClass:
|
|
452
|
-
inputClass:
|
|
453
|
-
onChangeOfEditableOption:
|
|
454
|
-
handleAddingInputEntry:
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
children:
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
s.type === "textarea" && /* @__PURE__ */ a(
|
|
473
|
-
E,
|
|
471
|
+
labelClass: r,
|
|
472
|
+
inputClass: b,
|
|
473
|
+
onChangeOfEditableOption: f,
|
|
474
|
+
handleAddingInputEntry: $,
|
|
475
|
+
submitText: k,
|
|
476
|
+
hasReset: y = !1,
|
|
477
|
+
resetText: N,
|
|
478
|
+
handleReset: C,
|
|
479
|
+
hasCancel: F = !1,
|
|
480
|
+
cancelText: w,
|
|
481
|
+
handleCancel: E,
|
|
482
|
+
handleSubmitForm: D,
|
|
483
|
+
className: S,
|
|
484
|
+
children: z
|
|
485
|
+
}) => /* @__PURE__ */ u(fe, { id: `${i}-form`, className: S, onSubmit: D, children: [
|
|
486
|
+
a ? a.map((o, g) => /* @__PURE__ */ u(J, { className: `${i}-fieldset-wrapper`, children: [
|
|
487
|
+
/* @__PURE__ */ u(G, { id: `${i}-form-fieldset-${g}`, className: `${o.legend}-fieldset`, children: [
|
|
488
|
+
o.legend && /* @__PURE__ */ e(O, { className: `${o.legend}-legend`, children: o.legend }),
|
|
489
|
+
o.inputs.length !== 0 ? o.inputs.map((s, x) => /* @__PURE__ */ u(q.Fragment, { children: [
|
|
490
|
+
s.type === "textarea" && /* @__PURE__ */ e(
|
|
491
|
+
A,
|
|
474
492
|
{
|
|
475
493
|
...s,
|
|
476
|
-
id: s.id ?? `${
|
|
477
|
-
labelClass:
|
|
478
|
-
inputClass:
|
|
479
|
-
idx:
|
|
494
|
+
id: s.id ?? `${o.legend}-input`,
|
|
495
|
+
labelClass: r,
|
|
496
|
+
inputClass: b,
|
|
497
|
+
idx: x,
|
|
480
498
|
className: `${c} ${s?.uniqueClass}`
|
|
481
499
|
}
|
|
482
500
|
),
|
|
483
|
-
s.type !== "textarea" && s.type !== "radio" && s.type !== "checkbox" && /* @__PURE__ */
|
|
484
|
-
|
|
501
|
+
s.type !== "textarea" && s.type !== "radio" && s.type !== "checkbox" && /* @__PURE__ */ e(
|
|
502
|
+
A,
|
|
485
503
|
{
|
|
486
504
|
...s,
|
|
487
|
-
id: s.id ?? `${
|
|
488
|
-
labelClass:
|
|
489
|
-
inputClass:
|
|
490
|
-
idx:
|
|
505
|
+
id: s.id ?? `${o.legend}-input`,
|
|
506
|
+
labelClass: r,
|
|
507
|
+
inputClass: b,
|
|
508
|
+
idx: x,
|
|
491
509
|
className: `${c} ${s?.uniqueClass}`
|
|
492
510
|
}
|
|
493
511
|
),
|
|
494
|
-
(s.type === "radio" || s.type === "checkbox") && /* @__PURE__ */
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
-
|
|
512
|
+
(s.type === "radio" || s.type === "checkbox") && /* @__PURE__ */ u(j, { children: [
|
|
513
|
+
/* @__PURE__ */ e(
|
|
514
|
+
A,
|
|
497
515
|
{
|
|
498
516
|
...s,
|
|
499
|
-
id: s.id ?? `${
|
|
500
|
-
labelClass:
|
|
501
|
-
inputClass:
|
|
502
|
-
idx:
|
|
517
|
+
id: s.id ?? `${o.legend}-input`,
|
|
518
|
+
labelClass: r,
|
|
519
|
+
inputClass: b,
|
|
520
|
+
idx: x,
|
|
503
521
|
className: `${c} ${s?.uniqueClass}`
|
|
504
522
|
}
|
|
505
523
|
),
|
|
506
|
-
s.editing && s.isEditable && /* @__PURE__ */
|
|
507
|
-
|
|
524
|
+
s.editing && s.isEditable && /* @__PURE__ */ e(
|
|
525
|
+
H,
|
|
508
526
|
{
|
|
509
|
-
legend: `${
|
|
510
|
-
fieldsetIndex:
|
|
511
|
-
idx:
|
|
527
|
+
legend: `${o.legend}`,
|
|
528
|
+
fieldsetIndex: g,
|
|
529
|
+
idx: x,
|
|
512
530
|
editableInformation: s?.editableInformation || [],
|
|
513
|
-
onChangeOfEditableOption:
|
|
514
|
-
onClickSaveEdit: s?.onClickSave || ((
|
|
531
|
+
onChangeOfEditableOption: f,
|
|
532
|
+
onClickSaveEdit: s?.onClickSave || ((v) => {
|
|
515
533
|
}),
|
|
516
|
-
onClickCancelEdit: s?.onClickCancel || ((
|
|
534
|
+
onClickCancelEdit: s?.onClickCancel || ((v) => {
|
|
517
535
|
}),
|
|
518
|
-
onClickDeleteEntry: s?.onClickDelete || ((
|
|
536
|
+
onClickDeleteEntry: s?.onClickDelete || ((v) => {
|
|
519
537
|
})
|
|
520
538
|
}
|
|
521
539
|
)
|
|
522
540
|
] })
|
|
523
|
-
] }, `form-${
|
|
541
|
+
] }, `form-${i}-${x}`)) : o.isExpandable ? /* @__PURE__ */ e(K, { children: `No entry yet on ${o.legend}. Click "+" button to add entry.` }) : ""
|
|
524
542
|
] }),
|
|
525
|
-
|
|
526
|
-
] }, `${
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
-
|
|
529
|
-
!
|
|
530
|
-
|
|
531
|
-
|
|
543
|
+
o.isExpandable && /* @__PURE__ */ e(Q, { className: "add-input-button-space", children: /* @__PURE__ */ e(p, { id: `expand-${o.legend}-inputs`, buttonType: "button", text: "+", onClick: $, className: "add-input-entry", dataAttributes: { "data-fieldsetindex": g } }) })
|
|
544
|
+
] }, `${o.legend}-${g}`)) : /* @__PURE__ */ u(J, { className: `${i}-fieldset-wrapper`, children: [
|
|
545
|
+
/* @__PURE__ */ u(G, { id: `${i}-form-fieldset`, className: `${l}-fieldset`, children: [
|
|
546
|
+
l && /* @__PURE__ */ e(O, { className: `${l}-legend`, children: l }),
|
|
547
|
+
!a && d && d.length !== 0 ? d.map((o, g) => /* @__PURE__ */ u(q.Fragment, { children: [
|
|
548
|
+
o.type === "textarea" && /* @__PURE__ */ e(
|
|
549
|
+
A,
|
|
532
550
|
{
|
|
533
|
-
...
|
|
534
|
-
id:
|
|
535
|
-
labelClass:
|
|
536
|
-
inputClass:
|
|
537
|
-
idx:
|
|
538
|
-
className: `${c} ${
|
|
551
|
+
...o,
|
|
552
|
+
id: o.id ?? `${l}-input`,
|
|
553
|
+
labelClass: r,
|
|
554
|
+
inputClass: b,
|
|
555
|
+
idx: g,
|
|
556
|
+
className: `${c} ${o?.uniqueClass}`
|
|
539
557
|
}
|
|
540
558
|
),
|
|
541
|
-
|
|
542
|
-
|
|
559
|
+
o.type !== "textarea" && o.type !== "radio" && o.type !== "checkbox" && /* @__PURE__ */ e(
|
|
560
|
+
A,
|
|
543
561
|
{
|
|
544
|
-
...
|
|
545
|
-
id:
|
|
546
|
-
labelClass:
|
|
547
|
-
inputClass:
|
|
548
|
-
idx:
|
|
549
|
-
className: `${c} ${
|
|
562
|
+
...o,
|
|
563
|
+
id: o.id ?? `${l}-input`,
|
|
564
|
+
labelClass: r,
|
|
565
|
+
inputClass: b,
|
|
566
|
+
idx: g,
|
|
567
|
+
className: `${c} ${o?.uniqueClass}`
|
|
550
568
|
}
|
|
551
569
|
),
|
|
552
|
-
(
|
|
553
|
-
/* @__PURE__ */
|
|
554
|
-
|
|
570
|
+
(o.type === "radio" || o.type === "checkbox") && /* @__PURE__ */ u(j, { children: [
|
|
571
|
+
/* @__PURE__ */ e(
|
|
572
|
+
A,
|
|
555
573
|
{
|
|
556
|
-
...
|
|
557
|
-
id:
|
|
558
|
-
labelClass:
|
|
559
|
-
inputClass:
|
|
560
|
-
idx:
|
|
561
|
-
className: `${c} ${
|
|
574
|
+
...o,
|
|
575
|
+
id: o.id ?? `${l}-input`,
|
|
576
|
+
labelClass: r,
|
|
577
|
+
inputClass: b,
|
|
578
|
+
idx: g,
|
|
579
|
+
className: `${c} ${o?.uniqueClass}`
|
|
562
580
|
}
|
|
563
581
|
),
|
|
564
|
-
|
|
565
|
-
|
|
582
|
+
o.editing && o.isEditable && /* @__PURE__ */ e(
|
|
583
|
+
H,
|
|
566
584
|
{
|
|
567
|
-
legend: `${
|
|
568
|
-
idx:
|
|
569
|
-
editableInformation:
|
|
570
|
-
onChangeOfEditableOption:
|
|
571
|
-
onClickSaveEdit:
|
|
585
|
+
legend: `${l}`,
|
|
586
|
+
idx: g,
|
|
587
|
+
editableInformation: o?.editableInformation,
|
|
588
|
+
onChangeOfEditableOption: f,
|
|
589
|
+
onClickSaveEdit: o?.onClickSave || ((s) => {
|
|
572
590
|
}),
|
|
573
|
-
onClickCancelEdit:
|
|
591
|
+
onClickCancelEdit: o?.onClickCancel || ((s) => {
|
|
574
592
|
}),
|
|
575
|
-
onClickDeleteEntry:
|
|
593
|
+
onClickDeleteEntry: o?.onClickDelete || ((s) => {
|
|
576
594
|
})
|
|
577
595
|
}
|
|
578
596
|
)
|
|
579
597
|
] })
|
|
580
|
-
] }, `form-${
|
|
598
|
+
] }, `form-${i}-${g}`)) : n ? /* @__PURE__ */ e(K, { children: `No entry yet on ${l}. Please click "+" button to add` }) : ""
|
|
581
599
|
] }),
|
|
582
|
-
|
|
600
|
+
n && /* @__PURE__ */ e(Q, { className: "add-input-button-space", children: /* @__PURE__ */ e(p, { id: `expand-${l}-inputs`, buttonType: "button", text: "+", onClick: $, className: "add-input-entry" }) })
|
|
583
601
|
] }),
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
|
|
602
|
+
/* @__PURE__ */ e(
|
|
603
|
+
he,
|
|
586
604
|
{
|
|
587
|
-
id:
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
cancelText: A,
|
|
596
|
-
handleCancel: S
|
|
605
|
+
id: i,
|
|
606
|
+
submitText: k,
|
|
607
|
+
hasReset: y,
|
|
608
|
+
resetText: N,
|
|
609
|
+
handleReset: C,
|
|
610
|
+
hasCancel: F,
|
|
611
|
+
cancelText: w,
|
|
612
|
+
handleCancel: E
|
|
597
613
|
}
|
|
598
614
|
),
|
|
599
|
-
/* @__PURE__ */
|
|
600
|
-
] }), $e = (
|
|
601
|
-
const
|
|
602
|
-
return
|
|
603
|
-
},
|
|
604
|
-
if (!$e(
|
|
605
|
-
return
|
|
615
|
+
/* @__PURE__ */ e(ue, { className: "children-container", children: z })
|
|
616
|
+
] }), $e = (a) => {
|
|
617
|
+
const l = /^#([0-9A-Fa-f]{3}){1,2}$/, n = /^rgb(a)?\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}(?:\s*,\s*(0|1|0?\.\d+))?\s*\)$/;
|
|
618
|
+
return l.test(a) || n.test(a) || CSS.supports("color", a);
|
|
619
|
+
}, h = (a) => {
|
|
620
|
+
if (!$e(a)) throw new Error(`Invalid color: ${a}`);
|
|
621
|
+
return a;
|
|
606
622
|
}, we = {
|
|
607
623
|
mobile: "320px",
|
|
608
624
|
//Small iPhone SE & Medium: iPhone 12-15
|
|
@@ -612,52 +628,52 @@ const e = {
|
|
|
612
628
|
//Macbook 13" (1280x800)
|
|
613
629
|
largeDesktop: "1200px",
|
|
614
630
|
largerDesktop: "1400px"
|
|
615
|
-
},
|
|
631
|
+
}, ge = {
|
|
616
632
|
name: "light",
|
|
617
633
|
colors: {
|
|
618
|
-
text:
|
|
619
|
-
bg:
|
|
620
|
-
blue:
|
|
621
|
-
blue2:
|
|
622
|
-
teal:
|
|
623
|
-
teal2:
|
|
624
|
-
gray:
|
|
625
|
-
information:
|
|
626
|
-
success:
|
|
627
|
-
warning:
|
|
628
|
-
error:
|
|
634
|
+
text: h("#333446"),
|
|
635
|
+
bg: h("#EEEEEE"),
|
|
636
|
+
blue: h("#7F8CAA"),
|
|
637
|
+
blue2: h("#80A6FF"),
|
|
638
|
+
teal: h("#5b8280ff"),
|
|
639
|
+
teal2: h("#AEEAE7"),
|
|
640
|
+
gray: h("#AEAEAE"),
|
|
641
|
+
information: h("#202234"),
|
|
642
|
+
success: h("#123524"),
|
|
643
|
+
warning: h("#F2C265"),
|
|
644
|
+
error: h("#990000")
|
|
629
645
|
}
|
|
630
|
-
},
|
|
646
|
+
}, xe = {
|
|
631
647
|
name: "dark",
|
|
632
648
|
colors: {
|
|
633
|
-
bg:
|
|
634
|
-
text:
|
|
635
|
-
blue:
|
|
636
|
-
blue2:
|
|
637
|
-
teal:
|
|
638
|
-
teal2:
|
|
639
|
-
gray:
|
|
640
|
-
information:
|
|
641
|
-
success:
|
|
642
|
-
warning:
|
|
643
|
-
error:
|
|
649
|
+
bg: h("#333446"),
|
|
650
|
+
text: h("#EEEEEE"),
|
|
651
|
+
blue: h("#80A6FF"),
|
|
652
|
+
blue2: h("#7F8CAA"),
|
|
653
|
+
teal: h("#AEEAE7"),
|
|
654
|
+
teal2: h("#5b8280ff"),
|
|
655
|
+
gray: h("#D0D0DD"),
|
|
656
|
+
information: h("#C9E6F0"),
|
|
657
|
+
success: h("#9EDF9C"),
|
|
658
|
+
warning: h("#FCFFC1"),
|
|
659
|
+
error: h("#FAD4D4")
|
|
644
660
|
}
|
|
645
|
-
},
|
|
646
|
-
children:
|
|
647
|
-
initialTheme:
|
|
648
|
-
secondTheme:
|
|
661
|
+
}, V = Y({}), Fe = ({
|
|
662
|
+
children: a,
|
|
663
|
+
initialTheme: l = ge,
|
|
664
|
+
secondTheme: n = xe
|
|
649
665
|
}) => {
|
|
650
|
-
const [
|
|
651
|
-
|
|
666
|
+
const [i, d] = Z(l), c = () => {
|
|
667
|
+
d((r) => r === l ? n : l);
|
|
652
668
|
};
|
|
653
|
-
return /* @__PURE__ */
|
|
654
|
-
}, Ee = () =>
|
|
669
|
+
return /* @__PURE__ */ e(V.Provider, { value: { currentTheme: i, toggleTheme: c }, children: /* @__PURE__ */ e(I, { theme: i, children: a }) });
|
|
670
|
+
}, Ee = () => _(V);
|
|
655
671
|
export {
|
|
656
672
|
Ce as DynamicForm,
|
|
657
|
-
|
|
673
|
+
V as ThemeContext,
|
|
658
674
|
Fe as ThemeContextProvider,
|
|
659
675
|
we as breakpoints,
|
|
660
|
-
|
|
661
|
-
|
|
676
|
+
xe as darkTheme,
|
|
677
|
+
ge as lightTheme,
|
|
662
678
|
Ee as useTheme
|
|
663
679
|
};
|