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