@kbgarcia8/react-dynamic-form 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/Button/Button.d.ts +1 -1
- package/dist/components/atoms/Button/Button.d.ts.map +1 -1
- package/dist/components/atoms/Button/Button.styles.d.ts +32 -4
- package/dist/components/atoms/Button/Button.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/FormActionButtons/FormActionButtons.styles.d.ts.map +1 -1
- package/dist/components/molecules/LabeledInput/LabeledInput.d.ts.map +1 -1
- package/dist/components/molecules/NestedEditableOption/NestedEditableOption.d.ts +1 -1
- package/dist/components/molecules/NestedEditableOption/NestedEditableOption.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 +183 -82
- package/dist/react-dynamic-form.es.js +685 -459
- package/dist/styles/theme.d.ts +16 -0
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/styles/variables.d.ts +69 -2
- package/dist/styles/variables.d.ts.map +1 -1
- package/dist/testcase/App.d.ts +4 -0
- package/dist/testcase/App.d.ts.map +1 -0
- package/dist/testcase/DynamicForm.styles.d.ts +2 -0
- package/dist/testcase/DynamicForm.styles.d.ts.map +1 -0
- package/dist/testcase/main.d.ts +2 -0
- package/dist/testcase/main.d.ts.map +1 -0
- package/dist/type/constantTypes.d.ts +9 -24
- package/dist/type/constantTypes.d.ts.map +1 -1
- package/dist/type/propTypes.d.ts +38 -13
- package/dist/type/propTypes.d.ts.map +1 -1
- package/dist/utils/utils.d.ts +4 -0
- package/dist/utils/utils.d.ts.map +1 -1
- package/package.json +4 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ButtonProps } from "../../../type/propTypes";
|
|
2
|
-
declare const Button: ({ onClick, id, buttonType, startIcon, endIcon,
|
|
2
|
+
declare const Button: ({ onClick, id, buttonType, startIcon, endIcon, text, className, dataAttributes, color, radius, size }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Button;
|
|
4
4
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,QAAA,MAAM,MAAM,GAAI,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,QAAA,MAAM,MAAM,GAAI,uGAYd,WAAW,4CAqCZ,CAAA;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -1,5 +1,33 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare const COLORS: {
|
|
2
|
+
primary: import("styled-components").RuleSet<object>;
|
|
3
|
+
secondary: import("styled-components").RuleSet<object>;
|
|
4
|
+
ghost: import("styled-components").RuleSet<object>;
|
|
5
|
+
bnw: import("styled-components").RuleSet<object>;
|
|
6
|
+
};
|
|
7
|
+
export declare const SIZES: {
|
|
8
|
+
smallest: import("styled-components").RuleSet<object>;
|
|
9
|
+
smaller: import("styled-components").RuleSet<object>;
|
|
10
|
+
small: import("styled-components").RuleSet<object>;
|
|
11
|
+
medium: import("styled-components").RuleSet<object>;
|
|
12
|
+
large: import("styled-components").RuleSet<object>;
|
|
13
|
+
larger: import("styled-components").RuleSet<object>;
|
|
14
|
+
};
|
|
15
|
+
export declare const RADIUS: {
|
|
16
|
+
square: import("styled-components").RuleSet<object>;
|
|
17
|
+
roundedsquare: import("styled-components").RuleSet<object>;
|
|
18
|
+
squircle: import("styled-components").RuleSet<object>;
|
|
19
|
+
pill: import("styled-components").RuleSet<object>;
|
|
20
|
+
circle: import("styled-components").RuleSet<object>;
|
|
21
|
+
};
|
|
22
|
+
export declare const DefaultButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
23
|
+
$color?: keyof typeof COLORS;
|
|
24
|
+
$radius?: keyof typeof RADIUS;
|
|
25
|
+
}>> & string;
|
|
26
|
+
export declare const ButtonTextAndIconSpace: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
27
|
+
$hasIcon: boolean;
|
|
28
|
+
$hasText: boolean;
|
|
29
|
+
}>> & string;
|
|
30
|
+
export declare const ButtonText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
31
|
+
$size?: keyof typeof SIZES;
|
|
32
|
+
}>> & string;
|
|
5
33
|
//# sourceMappingURL=Button.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/Button.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/Button.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;CAkElB,CAAC;AAEF,eAAO,MAAO,KAAK;;;;;;;CAqClB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC;AAGF,eAAO,MAAM,aAAa;aACT,MAAM,OAAO,MAAM;cAClB,MAAM,OAAO,MAAM;YAwBpC,CAAC;AAEF,eAAO,MAAM,sBAAsB;cAA0B,OAAO;cAAY,OAAO;YAetF,CAAC;AAEF,eAAO,MAAM,UAAU;YAAyB,MAAM,OAAO,KAAK;YAQjE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { FormActionButtonsProps } from "../../../type/propTypes";
|
|
2
|
-
declare const FormActionButtons: ({ id, submitText, submitIcon, hasReset, resetText, resetIcon, handleReset, hasCancel, cancelText, cancelIcon, handleCancel, }: FormActionButtonsProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const FormActionButtons: ({ id, formActionButtonSize, formActionButtonColor, formActionButtonRadius, submitText, submitIcon, hasReset, resetText, resetIcon, handleReset, hasCancel, cancelText, cancelIcon, handleCancel, }: FormActionButtonsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default FormActionButtons;
|
|
4
4
|
//# sourceMappingURL=FormActionButtons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormActionButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/FormActionButtons/FormActionButtons.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEtE,QAAA,MAAM,iBAAiB,GAAI
|
|
1
|
+
{"version":3,"file":"FormActionButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/FormActionButtons/FormActionButtons.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEtE,QAAA,MAAM,iBAAiB,GAAI,oMAezB,sBAAsB,4CAQvB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormActionButtons.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/FormActionButtons/FormActionButtons.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"FormActionButtons.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/FormActionButtons/FormActionButtons.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,6NAQ3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledInput.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LabeledInput/LabeledInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,eAAe,EAAgB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"LabeledInput.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LabeledInput/LabeledInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,eAAe,EAAgB,MAAM,yBAAyB,CAAC;AAErG,QAAA,MAAM,YAAY,GAAI,OAAM,KAAK,CAAC,iBAAiB,CAAC,sBAAsB,GAAG,eAAe,CAAC,4CA+F5F,CAAA;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { NestedEditableOptionProps } from "../../../type/propTypes";
|
|
2
|
-
declare const NestedEditableOption: ({ legend, fieldsetIndex, idx, editableInformation, onChangeOfEditableOption, onClickSaveEdit, onClickCancelEdit, onClickDeleteEntry }: NestedEditableOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const NestedEditableOption: ({ editableButtonSize, editableButtonColor, editableButtonRadius, legend, fieldsetIndex, idx, editableInformation, saveText, saveButtonStartIcon, saveButtonEndIcon, cancelText, cancelButtonStartIcon, cancelButtonEndIcon, deleteText, deleteButtonStartIcon, deleteButtonEndIcon, onChangeOfEditableOption, onClickSaveEdit, onClickCancelEdit, onClickDeleteEntry }: NestedEditableOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default NestedEditableOption;
|
|
4
4
|
//# sourceMappingURL=NestedEditableOption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestedEditableOption.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/NestedEditableOption/NestedEditableOption.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAGzE,QAAA,MAAM,oBAAoB,GAAI,
|
|
1
|
+
{"version":3,"file":"NestedEditableOption.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/NestedEditableOption/NestedEditableOption.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAGzE,QAAA,MAAM,oBAAoB,GAAI,wWAqB5B,yBAAyB,4CA8B1B,CAAA;AAED,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { DynamicFormProps } from "../../../type/propTypes";
|
|
3
|
-
declare const DynamicForm: ({ fieldsets, legendText, isExpandable, id, formInputs, labelAndInputContainerClass, labelClass, inputClass, onChangeOfEditableOption, handleAddingInputEntry, submitText, submitIcon, hasReset, resetText, resetIcon, handleReset, hasCancel, cancelText, cancelIcon, handleCancel, handleSubmitForm, className, children }: React.PropsWithChildren<DynamicFormProps>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const DynamicForm: ({ fieldsets, legendText, isExpandable, id, formInputs, labelAndInputContainerClass, labelClass, inputClass, onChangeOfEditableOption, handleAddingInputEntry, formActionButtonSize, formActionButtonColor, formActionButtonRadius, submitText, submitIcon, hasReset, resetText, resetIcon, handleReset, hasCancel, cancelText, cancelIcon, handleCancel, handleSubmitForm, className, children }: React.PropsWithChildren<DynamicFormProps>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default DynamicForm;
|
|
5
5
|
//# sourceMappingURL=DynamicForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicForm.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/DynamicForm/DynamicForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAgB,gBAAgB,EAA+D,MAAM,yBAAyB,CAAC;AAE3I,QAAA,MAAM,WAAW,GAAI,
|
|
1
|
+
{"version":3,"file":"DynamicForm.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/DynamicForm/DynamicForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAgB,gBAAgB,EAA+D,MAAM,yBAAyB,CAAC;AAE3I,QAAA,MAAM,WAAW,GAAI,kYA2BnB,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,4CA6J1C,CAAA;AAGD,eAAe,WAAW,CAAC"}
|
|
@@ -1,65 +1,162 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),E=require("react"),a=require("styled-components"),o={fonts:{secondary:"Raleway",tertiary:"Lato",fallback:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif"},fontWeight:{light:300,regular:400,medium:500,bold:700,bolder:900},fontSize:{xxsmall:"0.55rem",xsmall:"0.75rem",small:"1rem",medium:"1.25rem",large:"1.5rem",xlarge:"1.75rem"},spacing:{xxxsmall:"0.25rem",xxsmall:"0.375rem",xsmall:"0.5rem",small:"0.75rem",medium:"1.25rem"},borderRadius:{xsmall:"0.125rem",small:"0.25rem",medium:"0.5rem",large:"1rem",xlarge:"2rem",circle:"50%"},borderThickness:{thin:"0.0625rem",light:"0.125rem"},breakpoints:{mobile:"320px",tablet:"768px",laptop:"1024px",desktop:"1440px",largeDesktop:"1920px"}},te=e=>{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*\)$/;return n.test(e)||l.test(e)||CSS.supports("color",e)},m=e=>{if(!te(e))throw new Error(`Invalid color: ${e}`);return e},B=Object.keys(o.breakpoints).reduce((e,n)=>{const l=n;return e[l]=(...r)=>a.css`
|
|
2
|
+
@media (min-width: ${o.breakpoints[l]}) {
|
|
3
|
+
${a.css(...r)}
|
|
4
|
+
}
|
|
5
|
+
`,e},{}),re={primary:a.css`
|
|
6
|
+
background-color: ${({theme:e})=>e.colors.backgroundColor1};
|
|
7
|
+
color: ${({theme:e})=>e.colors.textColor3};
|
|
8
|
+
border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.borderColor2};
|
|
9
|
+
|
|
10
|
+
&:hover {
|
|
11
|
+
background-color: ${({theme:e})=>e.colors.backgroundColor2};
|
|
12
|
+
border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.textColor3};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:disabled{
|
|
16
|
+
background-color: ${({theme:e})=>e.notificationPalette.infoText};
|
|
17
|
+
color: ${({theme:e})=>e.colors.shadow};
|
|
18
|
+
border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.shadow};
|
|
19
|
+
cursor: not-allowed;
|
|
20
|
+
}
|
|
21
|
+
`,secondary:a.css`
|
|
22
|
+
background-color: ${({theme:e})=>e.colors.backgroundColor4};
|
|
23
|
+
color: ${({theme:e})=>e.colors.textColor1};
|
|
24
|
+
border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.borderColor1};
|
|
25
|
+
|
|
26
|
+
&:hover {
|
|
27
|
+
background-color: ${({theme:e})=>e.colors.backgroundColor4};
|
|
28
|
+
border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.borderColor2};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:disabled{
|
|
32
|
+
background-color: ${({theme:e})=>e.notificationPalette.warningText};
|
|
33
|
+
color: ${({theme:e})=>e.colors.shadow};
|
|
34
|
+
border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.shadow};
|
|
35
|
+
}
|
|
36
|
+
`,ghost:a.css`
|
|
37
|
+
background-color: transparent;
|
|
38
|
+
color: ${({theme:e})=>e.colors.textColor3};
|
|
39
|
+
border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.textColor3};
|
|
40
|
+
|
|
41
|
+
&:hover {
|
|
42
|
+
background-color: ${({theme:e})=>e.colors.textColor2};
|
|
43
|
+
border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.backgroundColor3};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:disabled{
|
|
47
|
+
background-color: ${({theme:e})=>e.notificationPalette.shadow};
|
|
48
|
+
color: ${({theme:e})=>e.colors.shadow};
|
|
49
|
+
border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.shadow};
|
|
50
|
+
}
|
|
51
|
+
`,bnw:a.css`
|
|
52
|
+
background-color: ${({theme:e})=>e.colors.borderColor1};
|
|
53
|
+
color: ${({theme:e})=>e.colors.borderColor2};
|
|
54
|
+
border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.borderColor2};
|
|
55
|
+
|
|
56
|
+
&:hover {
|
|
57
|
+
background-color: ${({theme:e})=>e.colors.textColor2};
|
|
58
|
+
border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.textColor1};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:disabled{
|
|
62
|
+
background-color: ${({theme:e})=>e.notificationPalette.shadow};
|
|
63
|
+
color: ${({theme:e})=>e.colors.shadow};
|
|
64
|
+
border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.shadow};
|
|
65
|
+
}
|
|
66
|
+
`},ae={smallest:a.css`
|
|
67
|
+
${B.mobile`
|
|
68
|
+
font-size: ${o.fontSize.xxsmall};
|
|
69
|
+
font-weight: ${o.fontWeight.regular};
|
|
70
|
+
`}
|
|
71
|
+
`,smaller:a.css`
|
|
72
|
+
${B.mobile`
|
|
73
|
+
font-size: ${o.fontSize.xsmall};
|
|
74
|
+
font-weight: ${o.fontWeight.regular};
|
|
75
|
+
`}
|
|
76
|
+
`,small:a.css`
|
|
77
|
+
${B.mobile`
|
|
78
|
+
font-size: ${o.fontSize.small};
|
|
79
|
+
font-weight: ${o.fontWeight.medium};
|
|
80
|
+
`}
|
|
81
|
+
`,medium:a.css`
|
|
82
|
+
${B.mobile`
|
|
83
|
+
font-size: ${o.fontSize.medium};
|
|
84
|
+
font-weight: ${o.fontWeight.bold};
|
|
85
|
+
`}
|
|
86
|
+
`,large:a.css`
|
|
87
|
+
${B.mobile`
|
|
88
|
+
font-size: ${o.fontSize.large};
|
|
89
|
+
font-weight: ${o.fontWeight.bolder};
|
|
90
|
+
`}
|
|
91
|
+
`,larger:a.css`
|
|
92
|
+
${B.mobile`
|
|
93
|
+
font-size: ${o.fontSize.xlarge};
|
|
94
|
+
font-weight: ${o.fontWeight.bolder};
|
|
95
|
+
`}
|
|
96
|
+
`},se={square:a.css`border-radius: ${o.borderRadius.xsmall};`,roundedsquare:a.css`border-radius: ${o.borderRadius.medium};`,squircle:a.css`border-radius: ${o.borderRadius.large};`,pill:a.css`border-radius: ${o.borderRadius.xlarge};`,circle:a.css`border-radius: ${o.borderRadius.circle};`},U=a.button`
|
|
97
|
+
width: 100%;
|
|
2
98
|
display: flex;
|
|
3
99
|
align-items: center;
|
|
4
100
|
justify-content: center;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
border-radius: ${t.borderRadius.xlarge};
|
|
9
|
-
padding: ${t.spacing.xxxsmall} ${t.spacing.small};
|
|
10
|
-
margin: 0.125rem;
|
|
11
|
-
width: auto;
|
|
101
|
+
padding: ${o.spacing.xxxsmall} ${o.spacing.xxsmall};
|
|
102
|
+
flex: 1;
|
|
103
|
+
margin: 0;
|
|
12
104
|
cursor: pointer;
|
|
13
105
|
transition: background-color 0.2s ease, border-color 0.2s ease;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
background-color: lightblue;
|
|
17
|
-
border: ${t.borderThickness.light} solid gray;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
& .button-icon-text-space {
|
|
21
|
-
max-width: 100%;
|
|
22
|
-
}
|
|
106
|
+
${({$color:e})=>re[e||"primary"]}
|
|
107
|
+
${({$radius:e})=>se[e||"square"]}
|
|
23
108
|
|
|
24
109
|
& .button-icon-text-space svg {
|
|
110
|
+
height: auto;
|
|
111
|
+
max-height: 100%;
|
|
25
112
|
max-width: 100%;
|
|
26
113
|
}
|
|
27
|
-
|
|
114
|
+
|
|
115
|
+
&:disabled {
|
|
116
|
+
cursor: not-allowed;
|
|
117
|
+
opacity: 0.6;
|
|
118
|
+
}
|
|
119
|
+
`,H=a.div`
|
|
28
120
|
width: 100%;
|
|
29
121
|
display: flex;
|
|
30
122
|
flex-direction: row;
|
|
31
123
|
align-items: center;
|
|
32
|
-
justify-content:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
124
|
+
justify-content: space-around;
|
|
125
|
+
|
|
126
|
+
${({$hasIcon:e,$hasText:n})=>e&&n?a.css``:a.css`
|
|
127
|
+
& > * {
|
|
128
|
+
flex: 1;
|
|
129
|
+
}
|
|
130
|
+
`}
|
|
131
|
+
`,Z=a.span`
|
|
132
|
+
flex: 2;
|
|
133
|
+
${({$size:e})=>ae[e||"small"]}
|
|
134
|
+
font-family: ${o.fonts.tertiary}, ${o.fonts.fallback};
|
|
39
135
|
display: flex;
|
|
40
136
|
align-items: center;
|
|
41
137
|
justify-content: center;
|
|
42
|
-
|
|
138
|
+
max-width: 80%;
|
|
139
|
+
`,w=({onClick:e,id:n,buttonType:l="button",startIcon:r,endIcon:d,text:c="",className:u="",dataAttributes:h={},color:x,radius:$,size:g})=>l==="submit"?t.jsx(U,{id:n,type:"submit",className:u,...h,$color:x||"primary",$radius:$||"squircle",children:t.jsxs(H,{className:"button-icon-text-space",$hasIcon:!!(r||d),$hasText:!!c,children:[r||"",c&&t.jsx(Z,{$size:g||"small",id:n,children:c}),d||""]})}):t.jsx(U,{onClick:e,id:n,type:l,className:u,...h,$color:x||"primary",$radius:$||"squircle",children:t.jsxs(H,{className:"button-icon-text-space",$hasIcon:!!(r||d),$hasText:!!c,children:[r||"",c&&t.jsx(Z,{$size:g||"small",id:n,children:c}),d||""]})}),le=a.div`
|
|
43
140
|
display: flex;
|
|
44
141
|
flex-direction: column;
|
|
45
142
|
align-items: left;
|
|
46
143
|
width: 100%;
|
|
47
|
-
margin-bottom: ${
|
|
48
|
-
`,
|
|
144
|
+
margin-bottom: ${o.spacing.small};
|
|
145
|
+
`,ne=a.div`
|
|
49
146
|
display: flex;
|
|
50
|
-
gap: ${
|
|
147
|
+
gap: ${o.spacing.xsmall};
|
|
51
148
|
width: auto;
|
|
52
149
|
height: auto;
|
|
53
|
-
`,
|
|
150
|
+
`,ie=a.label`
|
|
54
151
|
display: flex;
|
|
55
152
|
align-items: center;
|
|
56
|
-
justify-content:center;
|
|
153
|
+
justify-content: center;
|
|
57
154
|
height: auto;
|
|
58
|
-
flex-direction: ${
|
|
59
|
-
font-family: ${
|
|
60
|
-
font-size: ${
|
|
61
|
-
font-weight: ${
|
|
62
|
-
gap: ${
|
|
155
|
+
flex-direction: ${e=>e.$labelFlexDirection||"column"};
|
|
156
|
+
font-family: ${o.fonts.secondary}, ${o.fonts.fallback};
|
|
157
|
+
font-size: ${o.fontSize.xsmall};
|
|
158
|
+
font-weight: ${o.fontWeight.bold};
|
|
159
|
+
gap: ${o.spacing.xxsmall};
|
|
63
160
|
|
|
64
161
|
& .label-icon-container img,
|
|
65
162
|
& .label-icon-container svg {
|
|
@@ -67,111 +164,115 @@
|
|
|
67
164
|
height: auto;
|
|
68
165
|
object-fit: contain;
|
|
69
166
|
}
|
|
70
|
-
`,
|
|
167
|
+
`,ce=a.div`
|
|
71
168
|
display: flex;
|
|
72
169
|
flex-direction: column;
|
|
73
170
|
align-items: center;
|
|
74
171
|
justify-content: center;
|
|
75
|
-
gap: ${
|
|
76
|
-
`,
|
|
77
|
-
font-weight: ${
|
|
78
|
-
`,
|
|
172
|
+
gap: ${o.spacing.xxxsmall};
|
|
173
|
+
`,de=a.span`
|
|
174
|
+
font-weight: ${o.fontWeight.bolder};
|
|
175
|
+
`,G=a.div`
|
|
79
176
|
max-width: 100%;
|
|
80
177
|
display: flex;
|
|
81
178
|
align-items: center;
|
|
82
|
-
`,
|
|
83
|
-
font-weight: ${
|
|
84
|
-
`,
|
|
179
|
+
`,me=a.span`
|
|
180
|
+
font-weight: ${o.fontWeight.light};
|
|
181
|
+
`,I=({htmlFor:e,textLabel:n,additionalInfo:l,$labelFlexDirection:r,startIcon:d,endIcon:c,className:u,children:h})=>t.jsxs(ie,{htmlFor:e,className:u,$labelFlexDirection:r,children:[d&&t.jsx(G,{className:"label-icon-container",children:d}),t.jsxs(ce,{className:"label-text-container",children:[t.jsx(de,{className:"main-label",children:n}),l&&t.jsx(me,{className:"additional-info",children:l})]}),c&&t.jsx(G,{className:"label-icon-container",children:c}),h]}),J=a.input`
|
|
85
182
|
display: flex;
|
|
86
183
|
place-content: center;
|
|
87
|
-
font-family: ${
|
|
88
|
-
font-size: ${
|
|
184
|
+
font-family: ${o.fonts.secondary}, ${o.fonts.fallback};
|
|
185
|
+
font-size: ${o.fontSize.xsmall};
|
|
89
186
|
line-height: 1.75;
|
|
90
|
-
padding: ${
|
|
187
|
+
padding: ${o.spacing.xxxsmall} ${o.spacing.xsmall};
|
|
91
188
|
max-width: 100%;
|
|
92
189
|
height: auto;
|
|
93
190
|
background-color: #FFFFFF;
|
|
94
191
|
outline: none;
|
|
95
|
-
border: ${
|
|
96
|
-
border-radius: ${
|
|
192
|
+
border: ${o.borderThickness.thin} solid #000000;
|
|
193
|
+
border-radius: ${o.borderRadius.xsmall};
|
|
97
194
|
|
|
98
195
|
&:focus{
|
|
99
|
-
border: ${
|
|
196
|
+
border: ${o.borderThickness.thin} solid ${({theme:e})=>e.colors.teal};
|
|
100
197
|
}
|
|
101
|
-
`,
|
|
198
|
+
`,be=a.textarea`
|
|
102
199
|
display: flex;
|
|
103
200
|
place-content: center;
|
|
104
|
-
border: ${
|
|
105
|
-
border-radius: ${
|
|
201
|
+
border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.text};
|
|
202
|
+
border-radius: ${o.borderRadius.small};
|
|
106
203
|
outline: none;
|
|
107
|
-
line-height: ${
|
|
108
|
-
padding: ${
|
|
109
|
-
font-family: ${
|
|
110
|
-
font-size: ${
|
|
204
|
+
line-height: ${o.spacing.small};
|
|
205
|
+
padding: ${o.spacing.xxxsmall};
|
|
206
|
+
font-family: ${o.fonts.secondary}, ${o.fonts.fallback};
|
|
207
|
+
font-size: ${o.fontSize.xsmall};
|
|
111
208
|
max-width: 100%;
|
|
112
209
|
resize: none;
|
|
113
210
|
overflow-y: auto;
|
|
114
|
-
`,
|
|
211
|
+
`,W=E.forwardRef((e,n)=>{const{type:l,id:r,onChange:d,isRequired:c,dataAttributes:u={},disabled:h,className:x,name:$}=e;if(l==="textarea"){const{rows:k=5,cols:N=30,value:v,...S}=e;return t.jsx(be,{ref:n,value:v,rows:k,cols:N,id:r,onChange:d,required:c,disabled:h,...u,className:x,name:$})}if(l==="radio"||l==="checkbox"){const{checked:k,...N}=e;return t.jsx(J,{ref:n,type:l,checked:k,id:r,onChange:d,required:c,...u,disabled:h,className:x,name:$})}const g=e,{value:y,pattern:f,placeholderText:p,...T}=g;return t.jsx(J,{ref:n,type:l,value:y,pattern:f,placeholder:p,id:r,onChange:d,required:c,...u,disabled:h,className:x,name:$})}),D=e=>{const{className:n,type:l,id:r,textLabel:d,additionalInfo:c,$labelFlexDirection:u,startIcon:h,endIcon:x,labelClass:$="",onChange:g,isRequired:y,dataAttributes:f,inputClass:p="",ref:T,disabled:k,isEditable:N,editIcon:v,onClickEdit:S,deleteIcon:R,onClickDelete:j,idx:F,children:A}=e;return t.jsxs(le,{className:`${n} ${r.replace("#","")}-label-input-container`,children:[l!=="radio"&&l!=="checkbox"&&t.jsx(I,{startIcon:h,endIcon:x,htmlFor:r,textLabel:d,additionalInfo:c,$labelFlexDirection:u,className:$}),l!=="radio"&&l!=="checkbox"&&l==="textarea"&&(()=>{const{rows:z=5,cols:q=30,value:L,...s}=e;return t.jsx(W,{id:r,name:r,type:"textarea",isRequired:y,onChange:g,value:L,rows:z,cols:q,dataAttributes:f,className:p,ref:T,disabled:k})})(),l!=="radio"&&l!=="checkbox"&&l!=="textarea"&&(()=>{const z=e,{value:q,pattern:L,placeholderText:s,...C}=z;return t.jsx(W,{id:r,name:r,placeholderText:s,onChange:g,value:q,type:l,isRequired:y,dataAttributes:f,className:p,ref:T,disabled:k,pattern:L})})(),(l==="radio"||l==="checkbox")&&(()=>{const{checked:z,...q}=e;return t.jsxs(t.Fragment,{children:[t.jsx(W,{ref:T,type:l,name:r,id:r,isRequired:y,checked:z,onChange:g,disabled:k,className:p,dataAttributes:f}),t.jsx(I,{startIcon:h,endIcon:x,htmlFor:r,textLabel:d,additionalInfo:c,$labelFlexDirection:u,className:$})]})})(),N&&t.jsxs(ne,{className:"input-edit-buttons",children:[t.jsx(w,{id:`editable-${r}-edit-btn`,startIcon:v,buttonType:"button",onClick:S,className:`edit-radio-${F}`,dataAttributes:f}),t.jsx(w,{id:`editable-${r}-delete-btn`,startIcon:R,buttonType:"button",onClick:j,className:`delete-radio-${F}`,dataAttributes:f})]}),A]})},ue=a.fieldset`
|
|
115
212
|
padding: 0;
|
|
116
213
|
height: auto;
|
|
117
214
|
width: 100%;
|
|
118
|
-
`,
|
|
119
|
-
font-size: ${
|
|
215
|
+
`,he=a.legend`
|
|
216
|
+
font-size: ${o.spacing.medium};
|
|
120
217
|
font-weight: 500;
|
|
121
|
-
margin: 0 auto ${
|
|
218
|
+
margin: 0 auto ${o.spacing.small} auto;
|
|
122
219
|
text-align: center;
|
|
123
|
-
font-family: ${
|
|
124
|
-
`,
|
|
220
|
+
font-family: ${o.fonts.secondary}, ${o.fonts.fallback};
|
|
221
|
+
`,xe=a.div`
|
|
125
222
|
display: flex;
|
|
126
223
|
flex-direction: column;
|
|
127
224
|
align-items: flex-start;
|
|
128
225
|
width: 100%;
|
|
129
|
-
margin-bottom: ${
|
|
130
|
-
|
|
226
|
+
margin-bottom: ${o.spacing.small};
|
|
227
|
+
`,$e=a.div`
|
|
131
228
|
display: flex;
|
|
132
229
|
justify-content: space-between;
|
|
133
230
|
width: 100%;
|
|
134
|
-
`,
|
|
231
|
+
`,K=({editableButtonSize:e,editableButtonColor:n,editableButtonRadius:l,legend:r,fieldsetIndex:d,idx:c,editableInformation:u,saveText:h,saveButtonStartIcon:x,saveButtonEndIcon:$,cancelText:g,cancelButtonStartIcon:y,cancelButtonEndIcon:f,deleteText:p,deleteButtonStartIcon:T,deleteButtonEndIcon:k,onChangeOfEditableOption:N,onClickSaveEdit:v,onClickCancelEdit:S,onClickDeleteEntry:R})=>t.jsxs(ue,{className:"editable-option-fieldset",children:[t.jsx(he,{children:`${r} ${c+1}`}),u?.map((j,F)=>t.jsx(xe,{className:"editable-option-container",children:t.jsx(W,{id:`editable-option-${F}`,name:`editable-option-${F}`,placeholderText:j.name.charAt(0).toUpperCase()+j.name.slice(1),onChange:N,value:j.info,type:j.type,isRequired:!0,className:"editable-option",dataAttributes:{"data-index":F,"data-fieldsetindex":d,"data-key":j.info}})},`${j.name}-${F}`)),t.jsxs($e,{className:"editable-option-button-space",children:[t.jsx(w,{startIcon:x,endIcon:$,size:e||"small",color:n||"primary",radius:l||"squircle",id:`editable-option-${c}-submit`,buttonType:"button",text:h||"Save",onClick:v,className:"editable-option-btn",dataAttributes:{"data-index":c,"data-fieldsetindex":d}}),t.jsx(w,{startIcon:y,endIcon:f,size:e||"small",color:n||"primary",radius:l||"squircle",id:`editable-option-${c}-cancel`,buttonType:"button",text:g||"Cancel",onClick:S,className:"editable-option-btn",dataAttributes:{"data-index":c,"data-fieldsetindex":d}}),t.jsx(w,{startIcon:T,endIcon:k,size:e||"small",color:n||"primary",radius:l||"squircle",id:`editable-option-${c}-delete`,buttonType:"button",text:p||"Delete",onClick:R,className:"editable-option-btn",dataAttributes:{"data-index":c,"data-fieldsetindex":d}})]})]}),ge=a.div`
|
|
135
232
|
display: flex;
|
|
136
|
-
justify-content: space-
|
|
233
|
+
justify-content: space-around;
|
|
234
|
+
align-content: center;
|
|
137
235
|
max-width: 100%;
|
|
138
|
-
|
|
139
|
-
|
|
236
|
+
& button {
|
|
237
|
+
margin-inline: 0.25rem;
|
|
238
|
+
}
|
|
239
|
+
`,fe=({id:e,formActionButtonSize:n,formActionButtonColor:l,formActionButtonRadius:r,submitText:d,submitIcon:c,hasReset:u,resetText:h,resetIcon:x,handleReset:$,hasCancel:g,cancelText:y,cancelIcon:f,handleCancel:p})=>t.jsxs(ge,{className:"form-main-button-container",children:[t.jsx(w,{id:`form-${e}-submit`,size:n||"small",color:l||"primary",radius:r||"squircle",startIcon:c,buttonType:"submit",text:d??"Submit",className:"submit-form-btn"}),u&&t.jsx(w,{id:`form-${e}-edit`,size:n||"small",color:l||"primary",radius:r||"squircle",startIcon:x,buttonType:"button",text:h??"Reset",onClick:$,className:"reset-form-btn"}),g&&t.jsx(w,{id:`form-${e}-cancel`,size:n||"small",color:l||"primary",radius:r||"squircle",startIcon:f,buttonType:"button",text:y??"Cancel",onClick:p,className:"cancel-form-btn"})]}),Q=a.legend`
|
|
240
|
+
font-size: ${o.spacing.medium};
|
|
140
241
|
font-weight: 500;
|
|
141
|
-
margin-bottom: ${
|
|
242
|
+
margin-bottom: ${o.spacing.small};
|
|
142
243
|
width: auto;
|
|
143
244
|
text-align: center;
|
|
144
|
-
font-family: ${
|
|
145
|
-
`,
|
|
245
|
+
font-family: ${o.fonts.secondary}, ${o.fonts.fallback};
|
|
246
|
+
`,V=a.fieldset`
|
|
146
247
|
padding: 0;
|
|
147
248
|
height: auto;
|
|
148
249
|
width: 100%;
|
|
149
|
-
`,
|
|
150
|
-
padding: ${
|
|
250
|
+
`,X=a.div`
|
|
251
|
+
padding: ${o.spacing.small};
|
|
151
252
|
height: auto;
|
|
152
253
|
width: 100%;
|
|
153
|
-
`,
|
|
254
|
+
`,Y=a.div`
|
|
154
255
|
display: flex;
|
|
155
256
|
justify-content: center;
|
|
156
257
|
align-items: center;
|
|
157
258
|
width: 100%;
|
|
158
259
|
height: auto;
|
|
159
|
-
font-family: ${
|
|
160
|
-
font-size: ${
|
|
161
|
-
font-weight: ${
|
|
162
|
-
`,
|
|
260
|
+
font-family: ${o.fonts.tertiary}, ${o.fonts.fallback};
|
|
261
|
+
font-size: ${o.fontSize.xsmall};
|
|
262
|
+
font-weight: ${o.fontWeight.bold};
|
|
263
|
+
`,ye=a.form`
|
|
163
264
|
display: flex;
|
|
164
265
|
flex-direction: column;
|
|
165
266
|
align-items: center;
|
|
166
267
|
width: 100%;
|
|
167
|
-
`,
|
|
268
|
+
`,_=a.div`
|
|
168
269
|
display: flex;
|
|
169
270
|
justify-content: space-between;
|
|
170
271
|
width: 100%;
|
|
171
|
-
`,
|
|
272
|
+
`,pe=a.div`
|
|
172
273
|
width: 100%;
|
|
173
274
|
display: flex;
|
|
174
275
|
flex-direction: column;
|
|
175
276
|
align-items: center;
|
|
176
277
|
justify-content: center;
|
|
177
|
-
`,
|
|
278
|
+
`,ke=({fieldsets:e=null,legendText:n,isExpandable:l,id:r,formInputs:d,labelAndInputContainerClass:c,labelClass:u,inputClass:h,onChangeOfEditableOption:x,handleAddingInputEntry:$,formActionButtonSize:g,formActionButtonColor:y,formActionButtonRadius:f,submitText:p,submitIcon:T,hasReset:k=!1,resetText:N,resetIcon:v,handleReset:S,hasCancel:R=!1,cancelText:j,cancelIcon:F,handleCancel:A,handleSubmitForm:z,className:q,children:L})=>t.jsxs(ye,{id:`${r}-form`,className:q,onSubmit:z,children:[e?e.map((s,C)=>t.jsxs(X,{className:`${r}-fieldset-wrapper`,children:[t.jsxs(V,{id:`${r}-form-fieldset-${C}`,className:`${s.legend}-fieldset`,children:[s.legend&&t.jsx(Q,{className:`${s.legend}-legend`,children:s.legend}),s.inputs.length!==0?s.inputs.map((b,P)=>t.jsxs(E.Fragment,{children:[b.type==="textarea"&&t.jsx(D,{...b,id:b.id??`${s.legend}-input`,labelClass:u,inputClass:h,idx:P,className:`${c} ${b?.uniqueClass}`}),b.type!=="textarea"&&b.type!=="radio"&&b.type!=="checkbox"&&t.jsx(D,{...b,id:b.id??`${s.legend}-input`,labelClass:u,inputClass:h,idx:P,className:`${c} ${b?.uniqueClass}`}),(b.type==="radio"||b.type==="checkbox")&&t.jsxs(t.Fragment,{children:[t.jsx(D,{...b,id:b.id??`${s.legend}-input`,labelClass:u,inputClass:h,idx:P,className:`${c} ${b?.uniqueClass}`}),b.editing&&b.isEditable&&t.jsx(K,{editableButtonSize:b.editableButtonSize,editableButtonColor:b.editableButtonColor,editableButtonRadius:b.editableButtonRadius,legend:`${s.legend}`,fieldsetIndex:C,idx:P,editableInformation:b?.editableInformation||[],onChangeOfEditableOption:x,onClickSaveEdit:b?.onClickSave||(M=>{}),onClickCancelEdit:b?.onClickCancel||(M=>{}),onClickDeleteEntry:b?.onClickDelete||(M=>{})})]})]},`form-${r}-${P}`)):s.isExpandable?t.jsx(Y,{children:`No entry yet on ${s.legend}. Click "+" button to add entry.`}):""]}),s.isExpandable&&t.jsx(_,{className:"add-input-button-space",children:t.jsx(w,{id:`expand-${s.legend}-inputs`,buttonType:"button",text:"+",onClick:$,className:"add-input-entry",dataAttributes:{"data-fieldsetindex":C}})})]},`${s.legend}-${C}`)):t.jsxs(X,{className:`${r}-fieldset-wrapper`,children:[t.jsxs(V,{id:`${r}-form-fieldset`,className:`${n}-fieldset`,children:[n&&t.jsx(Q,{className:`${n}-legend`,children:n}),!e&&d&&d.length!==0?d.map((s,C)=>t.jsxs(E.Fragment,{children:[s.type==="textarea"&&t.jsx(D,{...s,id:s.id??`${n}-input`,labelClass:u,inputClass:h,idx:C,className:`${c} ${s?.uniqueClass}`}),s.type!=="textarea"&&s.type!=="radio"&&s.type!=="checkbox"&&t.jsx(D,{...s,id:s.id??`${n}-input`,labelClass:u,inputClass:h,idx:C,className:`${c} ${s?.uniqueClass}`}),(s.type==="radio"||s.type==="checkbox")&&t.jsxs(t.Fragment,{children:[t.jsx(D,{...s,id:s.id??`${n}-input`,labelClass:u,inputClass:h,idx:C,className:`${c} ${s?.uniqueClass}`}),s.editing&&s.isEditable&&t.jsx(K,{editableButtonSize:s.editableButtonSize,editableButtonColor:s.editableButtonColor,editableButtonRadius:s.editableButtonRadius,legend:`${n}`,idx:C,editableInformation:s?.editableInformation,onChangeOfEditableOption:x,onClickSaveEdit:s?.onClickSave||(b=>{}),onClickCancelEdit:s?.onClickCancel||(b=>{}),onClickDeleteEntry:s?.onClickDelete||(b=>{})})]})]},`form-${r}-${C}`)):l?t.jsx(Y,{children:`No entry yet on ${n}. Please click "+" button to add`}):""]}),l&&t.jsx(_,{className:"add-input-button-space",children:t.jsx(w,{id:`expand-${n}-inputs`,buttonType:"button",text:"+",onClick:$,className:"add-input-entry"})})]}),t.jsx(fe,{id:r,formActionButtonSize:g,formActionButtonColor:y,formActionButtonRadius:f,submitText:p,submitIcon:T,hasReset:k,resetText:N,resetIcon:v,handleReset:S,hasCancel:R,cancelText:j,cancelIcon:F,handleCancel:A}),t.jsx(pe,{className:"children-container",children:L})]}),Ce={mobile:"320px",tablet:"768px",desktop:"992px",largeDesktop:"1200px",largerDesktop:"1400px"},i={primary1:m("#202234"),primary2:m("#3C5E83"),primary3:m("#0F60B6"),secondary1:m("#C67E10"),secondary2:m("#F6C46D"),neutral1:m("#FFFFFF"),neutral2:m("#F2F2F2"),neutral3:m("#ABABAB"),neutral4:m("#373A40"),neutral5:m("#000000"),accent:m("#E1D3B7"),shadow1:m("rgb(88, 88, 88)"),shadow2:m("rgba(255, 255, 255, 0.50)")},ee={name:"light",colors:{screenColor:i.neutral2,backgroundColor1:i.primary1,backgroundColor2:i.primary2,backgroundColor3:i.secondary2,backgroundColor4:i.secondary1,borderColor1:i.neutral5,borderColor2:i.neutral3,textColor1:i.neutral5,textColor2:i.neutral4,textColor3:i.accent,shadow:i.shadow1},anchorTheme:{visited:i.neutral5,hover:i.primary2,active:i.secondary2},footerTheme:{backgroundColor:i.neutral5,textColor:i.secondary1,shadowColor:i.shadow1},notificationPalette:{infoText:m("#C9E6F0"),infoBackground:m("#202234"),warningText:m("#FCFFC1"),warningBackground:m("#F2C265"),successText:m("#9EDF9C"),successBackground:m("#123524"),errorText:m("#FAD4D4"),errorBackground:m("#990000")}},oe={name:"dark",colors:{screenColor:i.neutral5,backgroundColor1:i.primary2,backgroundColor2:i.primary3,backgroundColor3:i.secondary1,backgroundColor4:i.secondary2,borderColor1:i.neutral2,borderColor2:i.neutral3,textColor1:i.neutral1,textColor2:i.accent,textColor3:i.neutral2,shadow:i.shadow2},anchorTheme:{link:i.neutral1,visited:i.neutral1,hover:i.primary3,active:i.secondary1},footerTheme:{backgroundColor:i.accent,textColor:i.primary1,shadowColor:i.shadow2},notificationPalette:{infoText:m("#202234"),infoBackground:m("#C9E6F0"),warningText:m("#F2C265"),warningBackground:m("#FCFFC1"),successText:m("#123524"),successBackground:m("#9EDF9C"),errorBackground:m("#FAD4D4"),errorText:m("#990000")}},O=E.createContext({}),je=({children:e,initialTheme:n=ee,secondTheme:l=oe})=>{const[r,d]=E.useState(n),c=()=>{d(u=>u===n?l:n)};return t.jsx(O.Provider,{value:{currentTheme:r,toggleTheme:c},children:t.jsx(a.ThemeProvider,{theme:r,children:e})})},we=()=>E.useContext(O);exports.DynamicForm=ke;exports.ThemeContext=O;exports.ThemeContextProvider=je;exports.breakpoints=Ce;exports.darkTheme=oe;exports.lightTheme=ee;exports.palette=i;exports.useTheme=we;
|