@kbgarcia8/react-dynamic-form 2.0.1 → 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.
Files changed (33) hide show
  1. package/dist/components/atoms/Button/Button.d.ts +1 -1
  2. package/dist/components/atoms/Button/Button.d.ts.map +1 -1
  3. package/dist/components/atoms/Button/Button.styles.d.ts +32 -4
  4. package/dist/components/atoms/Button/Button.styles.d.ts.map +1 -1
  5. package/dist/components/atoms/Label/Label.d.ts +1 -1
  6. package/dist/components/atoms/Label/Label.d.ts.map +1 -1
  7. package/dist/components/molecules/FormActionButtons/FormActionButtons.d.ts +1 -1
  8. package/dist/components/molecules/FormActionButtons/FormActionButtons.d.ts.map +1 -1
  9. package/dist/components/molecules/FormActionButtons/FormActionButtons.styles.d.ts.map +1 -1
  10. package/dist/components/molecules/LabeledInput/LabeledInput.d.ts.map +1 -1
  11. package/dist/components/molecules/NestedEditableOption/NestedEditableOption.d.ts +1 -1
  12. package/dist/components/molecules/NestedEditableOption/NestedEditableOption.d.ts.map +1 -1
  13. package/dist/components/organisms/DynamicForm/DynamicForm.d.ts +1 -1
  14. package/dist/components/organisms/DynamicForm/DynamicForm.d.ts.map +1 -1
  15. package/dist/react-dynamic-form.cjs.js +183 -82
  16. package/dist/react-dynamic-form.es.js +684 -438
  17. package/dist/styles/theme.d.ts +16 -0
  18. package/dist/styles/theme.d.ts.map +1 -1
  19. package/dist/styles/variables.d.ts +69 -2
  20. package/dist/styles/variables.d.ts.map +1 -1
  21. package/dist/testcase/App.d.ts +4 -0
  22. package/dist/testcase/App.d.ts.map +1 -0
  23. package/dist/testcase/DynamicForm.styles.d.ts +2 -0
  24. package/dist/testcase/DynamicForm.styles.d.ts.map +1 -0
  25. package/dist/testcase/main.d.ts +2 -0
  26. package/dist/testcase/main.d.ts.map +1 -0
  27. package/dist/type/constantTypes.d.ts +9 -24
  28. package/dist/type/constantTypes.d.ts.map +1 -1
  29. package/dist/type/propTypes.d.ts +44 -16
  30. package/dist/type/propTypes.d.ts.map +1 -1
  31. package/dist/utils/utils.d.ts +4 -0
  32. package/dist/utils/utils.d.ts.map +1 -1
  33. package/package.json +4 -1
@@ -1,4 +1,4 @@
1
1
  import type { ButtonProps } from "../../../type/propTypes";
2
- declare const Button: ({ onClick, id, buttonType, source, svg, alt, text, className, dataAttributes }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
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,gFAUd,WAAW,4CA+BZ,CAAA;AAED,eAAe,MAAM,CAAC"}
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 DefaultButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
2
- export declare const ButtonTextAndIconSpace: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
- export declare const ButtonIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
4
- export declare const ButtonText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
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":"AAGA,eAAO,MAAM,aAAa,yOA0BzB,CAAC;AAEF,eAAO,MAAM,sBAAsB,6NAMlC,CAAC;AAEF,eAAO,MAAM,UAAU,oOAEtB,CAAC;AAEF,eAAO,MAAM,UAAU,+NAOtB,CAAC"}
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,5 +1,5 @@
1
1
  import React from "react";
2
2
  import type { LabelProps } from "../../../type/propTypes";
3
- declare const Label: ({ htmlFor, textLabel, additionalInfo, $labelFlexDirection, source, svg, className, children }: React.PropsWithChildren<LabelProps>) => import("react/jsx-runtime").JSX.Element;
3
+ declare const Label: ({ htmlFor, textLabel, additionalInfo, $labelFlexDirection, startIcon, endIcon, className, children }: React.PropsWithChildren<LabelProps>) => import("react/jsx-runtime").JSX.Element;
4
4
  export default Label;
5
5
  //# sourceMappingURL=Label.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,QAAA,MAAM,KAAK,GAAI,+FASZ,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,4CAarC,CAAA;AAED,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,QAAA,MAAM,KAAK,GAAI,sGASZ,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,4CAgBrC,CAAA;AAED,eAAe,KAAK,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { FormActionButtonsProps } from "../../../type/propTypes";
2
- declare const FormActionButtons: ({ id, submitText, hasReset, resetText, handleReset, hasCancel, cancelText, 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,4FASzB,sBAAsB,4CAQvB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
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,6NAI3B,CAAC"}
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;AAErG,QAAA,MAAM,YAAY,GAAI,OAAM,KAAK,CAAC,iBAAiB,CAAC,sBAAsB,GAAG,eAAe,CAAC,4CA8F5F,CAAA;AAED,eAAe,YAAY,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,uIAS5B,yBAAyB,4CA8B1B,CAAA;AAED,eAAe,oBAAoB,CAAC"}
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, hasReset, resetText, handleReset, hasCancel, cancelText, 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,0RAqBnB,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,4CAiJ1C,CAAA;AAGD,eAAe,WAAW,CAAC"}
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 e=require("react/jsx-runtime"),v=require("react"),d=require("styled-components"),t={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,medium:500,bold:700,bolder:900},fontSize:{xsmall:"0.75rem"},spacing:{xxxsmall:"0.25rem",xxsmall:"0.375rem",xsmall:"0.5rem",small:"0.75rem",medium:"1.25rem"},borderRadius:{xsmall:"0.125rem",small:"0.25rem",xlarge:"2rem"},borderThickness:{thin:"0.0625rem",light:"0.125rem"}},L=d.button`
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
- background-color: ${({theme:a})=>a.colors.blue||"blue"};
6
- color: ${({theme:a})=>a.colors.bg||"white"};
7
- border: ${t.borderThickness.light} solid ${({theme:a})=>a.colors.text||"black"};
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
- &:hover {
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
- `,R=d.div`
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: center;
33
- `,B=d.img`
34
- maxwidth: 100%;
35
- `,P=d.span`
36
- font-size: ${t.fontSize.xsmall};
37
- font-weight: ${t.fontWeight.medium};
38
- font-family: ${t.fonts.tertiary}, ${t.fonts.fallback};
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
- `,$=({onClick:a,id:i,buttonType:n,source:o,svg:m,alt:c="alt-button-icon",text:r="",className:x="",dataAttributes:h={}})=>n==="submit"?e.jsx(L,{id:i,type:n,className:x,...h,children:e.jsxs(R,{className:"button-icon-text-space",children:[o?e.jsx(B,{src:o,alt:c}):m||"",r&&e.jsx(P,{id:i,children:r})]})}):e.jsx(L,{onClick:a,id:i,type:n,className:x,...h,children:e.jsxs(R,{className:"button-icon-text-space",children:[o?e.jsx(B,{src:o,alt:c}):m||"",r&&e.jsx(P,{id:i,children:r})]})}),X=d.div`
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: ${t.spacing.small};
48
- `,Y=d.div`
144
+ margin-bottom: ${o.spacing.small};
145
+ `,ne=a.div`
49
146
  display: flex;
50
- gap: ${t.spacing.xsmall};
147
+ gap: ${o.spacing.xsmall};
51
148
  width: auto;
52
149
  height: auto;
53
- `,Z=d.label`
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: ${a=>a.$labelFlexDirection||"column"};
59
- font-family: ${t.fonts.secondary}, ${t.fonts.fallback};
60
- font-size: ${t.fontSize.xsmall};
61
- font-weight: ${t.fontWeight.bold};
62
- gap: ${t.spacing.xxsmall};
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
- `,_=d.div`
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: ${t.spacing.xxxsmall};
76
- `,I=d.span`
77
- font-weight: ${t.fontWeight.bolder};
78
- `,ee=d.div`
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
- `,te=d.span`
83
- font-weight: ${t.fontWeight.light};
84
- `,W=({htmlFor:a,textLabel:i,additionalInfo:n,$labelFlexDirection:o,source:m,svg:c,className:r,children:x})=>e.jsxs(Z,{htmlFor:a,className:r,$labelFlexDirection:o,children:[(m||c)&&e.jsx(ee,{className:"label-icon-container",children:m?e.jsx("img",{src:m,alt:`${a}-label-icon`}):c||""}),e.jsxs(_,{className:"label-text-container",children:[e.jsx(I,{className:"main-label",children:i}),n&&e.jsx(te,{className:"additional-info",children:n})]}),x]}),M=d.input`
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: ${t.fonts.secondary}, ${t.fonts.fallback};
88
- font-size: ${t.fontSize.xsmall};
184
+ font-family: ${o.fonts.secondary}, ${o.fonts.fallback};
185
+ font-size: ${o.fontSize.xsmall};
89
186
  line-height: 1.75;
90
- padding: ${t.spacing.xxxsmall} ${t.spacing.xsmall};
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: ${t.borderThickness.thin} solid #000000;
96
- border-radius: ${t.borderRadius.xsmall};
192
+ border: ${o.borderThickness.thin} solid #000000;
193
+ border-radius: ${o.borderRadius.xsmall};
97
194
 
98
195
  &:focus{
99
- border: ${t.borderThickness.thin} solid ${({theme:a})=>a.colors.teal};
196
+ border: ${o.borderThickness.thin} solid ${({theme:e})=>e.colors.teal};
100
197
  }
101
- `,ae=d.textarea`
198
+ `,be=a.textarea`
102
199
  display: flex;
103
200
  place-content: center;
104
- border: ${t.borderThickness.light} solid ${({theme:a})=>a.colors.text};
105
- border-radius: ${t.borderRadius.small};
201
+ border: ${o.borderThickness.light} solid ${({theme:e})=>e.colors.text};
202
+ border-radius: ${o.borderRadius.small};
106
203
  outline: none;
107
- line-height: ${t.spacing.small};
108
- padding: ${t.spacing.xxxsmall};
109
- font-family: ${t.fonts.secondary}, ${t.fonts.fallback};
110
- font-size: ${t.fontSize.xsmall};
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
- `,D=v.forwardRef((a,i)=>{const{type:n,id:o,onChange:m,isRequired:c,dataAttributes:r={},disabled:x,className:h,name:u}=a;if(n==="textarea"){const{rows:C=5,cols:w=30,value:T,...A}=a;return e.jsx(ae,{ref:i,value:T,rows:C,cols:w,id:o,onChange:m,required:c,disabled:x,...r,className:h,name:u})}if(n==="radio"||n==="checkbox"){const{checked:C,...w}=a;return e.jsx(M,{ref:i,type:n,checked:C,id:o,onChange:m,required:c,...r,disabled:x,className:h,name:u})}const p=a,{value:y,pattern:j,placeholderText:k,...N}=p;return e.jsx(M,{ref:i,type:n,value:y,pattern:j,placeholder:k,id:o,onChange:m,required:c,...r,disabled:x,className:h,name:u})}),E=a=>{const{className:i,type:n,id:o,textLabel:m,additionalInfo:c,$labelFlexDirection:r,svg:x,labelClass:h,onChange:u,isRequired:p,dataAttributes:y,inputClass:j,ref:k,disabled:N,isEditable:C,editIcon:w,onClickEdit:T,deleteIcon:A,onClickDelete:S,idx:s,children:g}=a;return e.jsxs(X,{className:`${i} ${o.replace("#","")}-label-input-container`,children:[n!=="radio"&&n!=="checkbox"&&e.jsx(W,{htmlFor:o,textLabel:m,additionalInfo:c,$labelFlexDirection:r,svg:x,className:h}),n!=="radio"&&n!=="checkbox"&&n==="textarea"&&(()=>{const{rows:l=5,cols:f=30,value:F,...z}=a;return e.jsx(D,{id:o,name:o,type:"textarea",isRequired:p,onChange:u,value:F,rows:l,cols:f,dataAttributes:y,className:j,ref:k,disabled:N})})(),n!=="radio"&&n!=="checkbox"&&n!=="textarea"&&(()=>{const l=a,{value:f,pattern:F,placeholderText:z,...ge}=l;return e.jsx(D,{id:o,name:o,placeholderText:z,onChange:u,value:f,type:n,isRequired:p,dataAttributes:y,className:j,ref:k,disabled:N,pattern:F})})(),(n==="radio"||n==="checkbox")&&(()=>{const{checked:l,...f}=a;return e.jsxs(e.Fragment,{children:[e.jsx(D,{ref:k,type:n,name:o,id:o,isRequired:p,checked:l,onChange:u,disabled:N,className:j,dataAttributes:y}),e.jsx(W,{htmlFor:o,textLabel:m,additionalInfo:c,$labelFlexDirection:r,svg:x,className:h})]})})(),C&&e.jsxs(Y,{className:"input-edit-buttons",children:[e.jsx($,{id:`editable-${o}-edit-btn`,svg:w,buttonType:"button",onClick:T,className:`edit-radio-${s}`,dataAttributes:y}),e.jsx($,{id:`editable-${o}-delete-btn`,svg:A,buttonType:"button",onClick:S,className:`delete-radio-${s}`,dataAttributes:y})]}),g]})},ne=d.fieldset`
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
- `,se=d.legend`
119
- font-size: ${t.spacing.medium};
215
+ `,he=a.legend`
216
+ font-size: ${o.spacing.medium};
120
217
  font-weight: 500;
121
- margin: 0 auto ${t.spacing.small} auto;
218
+ margin: 0 auto ${o.spacing.small} auto;
122
219
  text-align: center;
123
- font-family: ${t.fonts.secondary}, ${t.fonts.fallback};
124
- `,oe=d.div`
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: ${t.spacing.small};
130
- `,ie=d.div`
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
- `,U=({legend:a,fieldsetIndex:i,idx:n,editableInformation:o,onChangeOfEditableOption:m,onClickSaveEdit:c,onClickCancelEdit:r,onClickDeleteEntry:x})=>e.jsxs(ne,{className:"editable-option-fieldset",children:[e.jsx(se,{children:`${a} ${n+1}`}),o?.map((h,u)=>e.jsx(oe,{className:"editable-option-container",children:e.jsx(D,{id:`editable-option-${u}`,name:`editable-option-${u}`,placeholderText:h.name.charAt(0).toUpperCase()+h.name.slice(1),onChange:m,value:h.info,type:h.type,isRequired:!0,className:"editable-option",dataAttributes:{"data-index":u,"data-fieldsetindex":i,"data-key":h.info}})},`${h.name}-${u}`)),e.jsxs(ie,{className:"editable-option-button-space",children:[e.jsx($,{id:`editable-option-${n}-submit`,buttonType:"button",text:"Save",onClick:c,className:"editable-option-btn",dataAttributes:{"data-index":n,"data-fieldsetindex":i}}),e.jsx($,{id:`editable-option-${n}-cancel`,buttonType:"button",text:"Cancel",onClick:r,className:"editable-option-btn",dataAttributes:{"data-index":n,"data-fieldsetindex":i}}),e.jsx($,{id:`editable-option-${n}-delete`,buttonType:"button",text:"Delete",onClick:x,className:"editable-option-btn",dataAttributes:{"data-index":n,"data-fieldsetindex":i}})]})]}),le=d.div`
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-between;
233
+ justify-content: space-around;
234
+ align-content: center;
137
235
  max-width: 100%;
138
- `,ce=({id:a,submitText:i,hasReset:n,resetText:o,handleReset:m,hasCancel:c,cancelText:r,handleCancel:x})=>e.jsxs(le,{className:"form-main-button-container",children:[e.jsx($,{id:`form-${a}-submit`,buttonType:"submit",text:i??"Submit",className:"submit-form-btn"}),n&&e.jsx($,{id:`form-${a}-edit`,buttonType:"button",text:o??"Reset",onClick:m,className:"reset-form-btn"}),c&&e.jsx($,{id:`form-${a}-cancel`,buttonType:"button",text:r??"Cancel",onClick:x,className:"cancel-form-btn"})]}),O=d.legend`
139
- font-size: ${t.spacing.medium};
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: ${t.spacing.small};
242
+ margin-bottom: ${o.spacing.small};
142
243
  width: auto;
143
244
  text-align: center;
144
- font-family: ${t.fonts.secondary}, ${t.fonts.fallback};
145
- `,H=d.fieldset`
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
- `,G=d.div`
150
- padding: ${t.spacing.small};
250
+ `,X=a.div`
251
+ padding: ${o.spacing.small};
151
252
  height: auto;
152
253
  width: 100%;
153
- `,J=d.div`
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: ${t.fonts.tertiary}, ${t.fonts.fallback};
160
- font-size: ${t.fontSize.xsmall};
161
- font-weight: ${t.fontWeight.bold};
162
- `,re=d.form`
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
- `,K=d.div`
268
+ `,_=a.div`
168
269
  display: flex;
169
270
  justify-content: space-between;
170
271
  width: 100%;
171
- `,de=d.div`
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
- `,me=({fieldsets:a=null,legendText:i,isExpandable:n,id:o,formInputs:m,labelAndInputContainerClass:c,labelClass:r,inputClass:x,onChangeOfEditableOption:h,handleAddingInputEntry:u,submitText:p,hasReset:y=!1,resetText:j,handleReset:k,hasCancel:N=!1,cancelText:C,handleCancel:w,handleSubmitForm:T,className:A,children:S})=>e.jsxs(re,{id:`${o}-form`,className:A,onSubmit:T,children:[a?a.map((s,g)=>e.jsxs(G,{className:`${o}-fieldset-wrapper`,children:[e.jsxs(H,{id:`${o}-form-fieldset-${g}`,className:`${s.legend}-fieldset`,children:[s.legend&&e.jsx(O,{className:`${s.legend}-legend`,children:s.legend}),s.inputs.length!==0?s.inputs.map((l,f)=>e.jsxs(v.Fragment,{children:[l.type==="textarea"&&e.jsx(E,{...l,id:l.id??`${s.legend}-input`,labelClass:r,inputClass:x,idx:f,className:`${c} ${l?.uniqueClass}`}),l.type!=="textarea"&&l.type!=="radio"&&l.type!=="checkbox"&&e.jsx(E,{...l,id:l.id??`${s.legend}-input`,labelClass:r,inputClass:x,idx:f,className:`${c} ${l?.uniqueClass}`}),(l.type==="radio"||l.type==="checkbox")&&e.jsxs(e.Fragment,{children:[e.jsx(E,{...l,id:l.id??`${s.legend}-input`,labelClass:r,inputClass:x,idx:f,className:`${c} ${l?.uniqueClass}`}),l.editing&&l.isEditable&&e.jsx(U,{legend:`${s.legend}`,fieldsetIndex:g,idx:f,editableInformation:l?.editableInformation||[],onChangeOfEditableOption:h,onClickSaveEdit:l?.onClickSave||(F=>{}),onClickCancelEdit:l?.onClickCancel||(F=>{}),onClickDeleteEntry:l?.onClickDelete||(F=>{})})]})]},`form-${o}-${f}`)):s.isExpandable?e.jsx(J,{children:`No entry yet on ${s.legend}. Click "+" button to add entry.`}):""]}),s.isExpandable&&e.jsx(K,{className:"add-input-button-space",children:e.jsx($,{id:`expand-${s.legend}-inputs`,buttonType:"button",text:"+",onClick:u,className:"add-input-entry",dataAttributes:{"data-fieldsetindex":g}})})]},`${s.legend}-${g}`)):e.jsxs(G,{className:`${o}-fieldset-wrapper`,children:[e.jsxs(H,{id:`${o}-form-fieldset`,className:`${i}-fieldset`,children:[i&&e.jsx(O,{className:`${i}-legend`,children:i}),!a&&m&&m.length!==0?m.map((s,g)=>e.jsxs(v.Fragment,{children:[s.type==="textarea"&&e.jsx(E,{...s,id:s.id??`${i}-input`,labelClass:r,inputClass:x,idx:g,className:`${c} ${s?.uniqueClass}`}),s.type!=="textarea"&&s.type!=="radio"&&s.type!=="checkbox"&&e.jsx(E,{...s,id:s.id??`${i}-input`,labelClass:r,inputClass:x,idx:g,className:`${c} ${s?.uniqueClass}`}),(s.type==="radio"||s.type==="checkbox")&&e.jsxs(e.Fragment,{children:[e.jsx(E,{...s,id:s.id??`${i}-input`,labelClass:r,inputClass:x,idx:g,className:`${c} ${s?.uniqueClass}`}),s.editing&&s.isEditable&&e.jsx(U,{legend:`${i}`,idx:g,editableInformation:s?.editableInformation,onChangeOfEditableOption:h,onClickSaveEdit:s?.onClickSave||(l=>{}),onClickCancelEdit:s?.onClickCancel||(l=>{}),onClickDeleteEntry:s?.onClickDelete||(l=>{})})]})]},`form-${o}-${g}`)):n?e.jsx(J,{children:`No entry yet on ${i}. Please click "+" button to add`}):""]}),n&&e.jsx(K,{className:"add-input-button-space",children:e.jsx($,{id:`expand-${i}-inputs`,buttonType:"button",text:"+",onClick:u,className:"add-input-entry"})})]}),e.jsx(ce,{id:o,submitText:p,hasReset:y,resetText:j,handleReset:k,hasCancel:N,cancelText:C,handleCancel:w}),e.jsx(de,{className:"children-container",children:S})]}),xe=a=>{const i=/^#([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*\)$/;return i.test(a)||n.test(a)||CSS.supports("color",a)},b=a=>{if(!xe(a))throw new Error(`Invalid color: ${a}`);return a},be={mobile:"320px",tablet:"768px",desktop:"992px",largeDesktop:"1200px",largerDesktop:"1400px"},Q={name:"light",colors:{text:b("#333446"),bg:b("#EEEEEE"),blue:b("#7F8CAA"),blue2:b("#80A6FF"),teal:b("#5b8280ff"),teal2:b("#AEEAE7"),gray:b("#AEAEAE"),information:b("#202234"),success:b("#123524"),warning:b("#F2C265"),error:b("#990000")}},V={name:"dark",colors:{bg:b("#333446"),text:b("#EEEEEE"),blue:b("#80A6FF"),blue2:b("#7F8CAA"),teal:b("#AEEAE7"),teal2:b("#5b8280ff"),gray:b("#D0D0DD"),information:b("#C9E6F0"),success:b("#9EDF9C"),warning:b("#FCFFC1"),error:b("#FAD4D4")}},q=v.createContext({}),he=({children:a,initialTheme:i=Q,secondTheme:n=V})=>{const[o,m]=v.useState(i),c=()=>{m(r=>r===i?n:i)};return e.jsx(q.Provider,{value:{currentTheme:o,toggleTheme:c},children:e.jsx(d.ThemeProvider,{theme:o,children:a})})},ue=()=>v.useContext(q);exports.DynamicForm=me;exports.ThemeContext=q;exports.ThemeContextProvider=he;exports.breakpoints=be;exports.darkTheme=V;exports.lightTheme=Q;exports.useTheme=ue;
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;