ece-docs-components 1.0.100 → 1.0.101

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.
@@ -0,0 +1,73 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var material = require('@mui/material');
5
+ var iconsMaterial = require('@mui/icons-material');
6
+ var ThemeProvider = require('../ThemeProvider.js');
7
+ var Input = require('./Input.js');
8
+
9
+ const AutocompleteWrapper = material.styled("div")({
10
+ width: "100%",
11
+ });
12
+ function AutocompleteSelect({ id, label, error, helperText, placeholder, fullWidth = false, disabled = false, options, value, onChange, className = "", sx, }) {
13
+ const theme = ThemeProvider.useTheme();
14
+ const selectId = id || `auto-select-${Math.random().toString(36).substr(2, 9)}`;
15
+ return (jsxRuntime.jsxs(AutocompleteWrapper, { className: className, sx: [
16
+ { ...(!fullWidth && { width: "auto" }) },
17
+ ...(Array.isArray(sx) ? sx : [sx]),
18
+ ], children: [label && (jsxRuntime.jsx(Input.StyledLabel, { htmlFor: selectId, shrink: false, children: label })), jsxRuntime.jsx(material.Autocomplete, { id: selectId, options: options, value: value, disabled: disabled, disablePortal: true, getOptionLabel: (option) => option?.label || "", isOptionEqualToValue: (option, val) => option?.value === val?.value, onChange: (_event, newValue) => onChange(newValue), popupIcon: jsxRuntime.jsx(iconsMaterial.ExpandMoreRounded, { sx: { color: `${theme.palette.dark.main}66` } }), slotProps: {
19
+ paper: {
20
+ sx: {
21
+ borderRadius: 2,
22
+ boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
23
+ maxHeight: "min(22rem, calc(100vh - 6rem))",
24
+ overflow: "hidden",
25
+ backgroundColor: theme.palette.light.main,
26
+ mt: 0.5,
27
+ },
28
+ },
29
+ }, sx: {
30
+ "& .MuiOutlinedInput-root": {
31
+ padding: "0 9px !important",
32
+ height: 48,
33
+ display: "flex",
34
+ alignItems: "center",
35
+ },
36
+ "& .MuiAutocomplete-input": {
37
+ padding: "0 !important",
38
+ },
39
+ "& + .MuiAutocomplete-popper .MuiAutocomplete-option": {
40
+ fontSize: "1rem",
41
+ color: theme.palette.dark.main,
42
+ '&[aria-selected="true"]': {
43
+ backgroundColor: "transparent",
44
+ },
45
+ '&[aria-selected="true"].Mui-focused, &:hover, &.Mui-focused': {
46
+ backgroundColor: `${theme.palette.primary.main}1A !important`,
47
+ },
48
+ },
49
+ }, renderInput: (params) => {
50
+ // 1. Separate structural configurations from direct props
51
+ const { InputProps, inputProps, ...restParams } = params;
52
+ return (jsxRuntime.jsx(Input.Input, { ...restParams,
53
+ // 2. Safely spread native input elements
54
+ inputProps: inputProps,
55
+ // 3. Bind MUI's dynamic layout objects (adornments, ref) into the slot configuration
56
+ InputProps: {
57
+ ...InputProps,
58
+ }, error: error, placeholder: placeholder, fullWidth: true,
59
+ // Explicitly empty string avoids passing a raw error object down to helperText slots
60
+ helperText: "" }));
61
+ } }), error && (jsxRuntime.jsx(material.FormHelperText, { sx: {
62
+ mt: 0.75,
63
+ fontSize: "0.875rem",
64
+ color: theme.palette.error.main,
65
+ }, children: error })), helperText && !error && (jsxRuntime.jsx(material.FormHelperText, { sx: {
66
+ mt: 0.75,
67
+ fontSize: "0.875rem",
68
+ color: `${theme.palette.dark.main}99`,
69
+ }, children: helperText }))] }));
70
+ }
71
+
72
+ exports.AutocompleteSelect = AutocompleteSelect;
73
+ //# sourceMappingURL=AutocompleteSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutocompleteSelect.js","sources":["../../../../src/components/AutocompleteSelect.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Autocomplete as MuiAutocomplete,\n FormHelperText,\n styled,\n} from \"@mui/material\";\nimport { ExpandMoreRounded } from \"@mui/icons-material\";\nimport { useTheme } from \"../ThemeProvider\"; // Adjust pathway according to project layout\nimport { Input, StyledLabel } from \"./Input\";\n\ninterface AutocompleteOption {\n value: string;\n label: string;\n}\n\ninterface AutocompleteSelectProps {\n id?: string;\n label?: string;\n error?: string;\n helperText?: string;\n placeholder?: string;\n fullWidth?: boolean;\n disabled?: boolean;\n options: AutocompleteOption[];\n value: AutocompleteOption | null;\n onChange: (value: AutocompleteOption | null) => void;\n className?: string;\n sx?: any;\n}\n\nconst AutocompleteWrapper = styled(\"div\")({\n width: \"100%\",\n});\n\nexport function AutocompleteSelect({\n id,\n label,\n error,\n helperText,\n placeholder,\n fullWidth = false,\n disabled = false,\n options,\n value,\n onChange,\n className = \"\",\n sx,\n}: AutocompleteSelectProps): React.JSX.Element {\n const theme = useTheme();\n const selectId =\n id || `auto-select-${Math.random().toString(36).substr(2, 9)}`;\n\n return (\n <AutocompleteWrapper\n className={className}\n sx={[\n { ...(!fullWidth && { width: \"auto\" }) },\n ...(Array.isArray(sx) ? sx : [sx]),\n ]}\n >\n {label && (\n <StyledLabel htmlFor={selectId} shrink={false}>\n {label}\n </StyledLabel>\n )}\n\n <MuiAutocomplete\n id={selectId}\n options={options}\n value={value}\n disabled={disabled}\n disablePortal\n getOptionLabel={(option: { label: string; value: string }) =>\n option?.label || \"\"\n }\n isOptionEqualToValue={(\n option: AutocompleteOption,\n val: AutocompleteOption,\n ) => option?.value === val?.value}\n onChange={(_event: Event, newValue: AutocompleteOption) =>\n onChange(newValue)\n }\n popupIcon={\n <ExpandMoreRounded sx={{ color: `${theme.palette.dark.main}66` }} />\n }\n slotProps={{\n paper: {\n sx: {\n borderRadius: 2,\n boxShadow:\n \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\n maxHeight: \"min(22rem, calc(100vh - 6rem))\",\n overflow: \"hidden\",\n backgroundColor: theme.palette.light.main,\n mt: 0.5,\n },\n },\n }}\n sx={{\n \"& .MuiOutlinedInput-root\": {\n padding: \"0 9px !important\",\n height: 48,\n display: \"flex\",\n alignItems: \"center\",\n },\n \"& .MuiAutocomplete-input\": {\n padding: \"0 !important\",\n },\n \"& + .MuiAutocomplete-popper .MuiAutocomplete-option\": {\n fontSize: \"1rem\",\n color: theme.palette.dark.main,\n '&[aria-selected=\"true\"]': {\n backgroundColor: \"transparent\",\n },\n '&[aria-selected=\"true\"].Mui-focused, &:hover, &.Mui-focused': {\n backgroundColor: `${theme.palette.primary.main}1A !important`,\n },\n },\n }}\n renderInput={(params: any) => {\n // 1. Separate structural configurations from direct props\n const { InputProps, inputProps, ...restParams } = params;\n\n return (\n <Input\n {...restParams}\n // 2. Safely spread native input elements\n inputProps={inputProps}\n // 3. Bind MUI's dynamic layout objects (adornments, ref) into the slot configuration\n InputProps={{\n ...InputProps,\n }}\n error={error}\n placeholder={placeholder}\n fullWidth\n // Explicitly empty string avoids passing a raw error object down to helperText slots\n helperText=\"\"\n />\n );\n }}\n />\n\n {error && (\n <FormHelperText\n sx={{\n mt: 0.75,\n fontSize: \"0.875rem\",\n color: theme.palette.error.main,\n }}\n >\n {error}\n </FormHelperText>\n )}\n\n {helperText && !error && (\n <FormHelperText\n sx={{\n mt: 0.75,\n fontSize: \"0.875rem\",\n color: `${theme.palette.dark.main}99`,\n }}\n >\n {helperText}\n </FormHelperText>\n )}\n </AutocompleteWrapper>\n );\n}\n"],"names":["styled","useTheme","_jsxs","_jsx","StyledLabel","MuiAutocomplete","ExpandMoreRounded","Input","FormHelperText"],"mappings":";;;;;;;;AA8BA,MAAM,mBAAmB,GAAGA,eAAM,CAAC,KAAK,CAAC,CAAC;AACxC,IAAA,KAAK,EAAE,MAAM;AACd,CAAA,CAAC;AAEI,SAAU,kBAAkB,CAAC,EACjC,EAAE,EACF,KAAK,EACL,KAAK,EACL,UAAU,EACV,WAAW,EACX,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,EAAE,GACsB,EAAA;AACxB,IAAA,MAAM,KAAK,GAAGC,sBAAQ,EAAE;IACxB,MAAM,QAAQ,GACZ,EAAE,IAA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AAE;AACF,oBAAA,EAAE,EAAE,IAAI;AACR,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI;AAChC,iBAAA,EAAA,QAAA,EAEA,KAAK,EAAA,CACS,CAClB,EAEA,UAAU,IAAI,CAAC,KAAK,KACnBL,cAAA,CAACK,uBAAc,EAAA,EACb,EAAE,EAAE;AACF,oBAAA,EAAE,EAAE,IAAI;AACR,oBAAA,QAAQ,EAAE,UAAU;oBACpB,KAAK,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,EAAA,CAAI;AACtC,iBAAA,EAAA,QAAA,EAEA,UAAU,EAAA,CACI,CAClB,CAAA,EAAA,CACmB;AAE1B;;;;"}
package/dist/cjs/index.js CHANGED
@@ -30,6 +30,7 @@ var AcknowledgementBox = require('./components/AcknowledgementBox.js');
30
30
  var RichTextArea = require('./components/RichTextArea.js');
31
31
  var FileUploadButton = require('./components/FileUploadButton.js');
32
32
  var Footer = require('./components/Footer.js');
33
+ var AutocompleteSelect = require('./components/AutocompleteSelect.js');
33
34
 
34
35
 
35
36
 
@@ -66,4 +67,5 @@ exports.AcknowledgementBox = AcknowledgementBox.AcknowledgementBox;
66
67
  exports.RichTextArea = RichTextArea.RichTextArea;
67
68
  exports.FileUploadButton = FileUploadButton.FileUploadButton;
68
69
  exports.Footer = Footer.Footer;
70
+ exports.AutocompleteSelect = AutocompleteSelect.AutocompleteSelect;
69
71
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('../../../_virtual/index4.js');
3
+ var index = require('../../../_virtual/index3.js');
4
4
  var index$1 = require('../../domelementtype/lib/index.js');
5
5
  var node = require('./node.js');
6
6
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('../../../_virtual/index3.js');
3
+ var index = require('../../../_virtual/index4.js');
4
4
  var htmlToDom = require('./server/html-to-dom.js');
5
5
  var types = require('./types.js');
6
6
 
@@ -6,5 +6,5 @@ export declare const ThemeProvider: React.FC<{
6
6
  children: React.ReactNode;
7
7
  theme?: ThemeType;
8
8
  }>;
9
- export declare const useTheme: () => import("@mui/material").Theme;
9
+ export declare const useTheme: () => any;
10
10
  export {};
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ interface AutocompleteOption {
3
+ value: string;
4
+ label: string;
5
+ }
6
+ interface AutocompleteSelectProps {
7
+ id?: string;
8
+ label?: string;
9
+ error?: string;
10
+ helperText?: string;
11
+ placeholder?: string;
12
+ fullWidth?: boolean;
13
+ disabled?: boolean;
14
+ options: AutocompleteOption[];
15
+ value: AutocompleteOption | null;
16
+ onChange: (value: AutocompleteOption | null) => void;
17
+ className?: string;
18
+ sx?: any;
19
+ }
20
+ export declare function AutocompleteSelect({ id, label, error, helperText, placeholder, fullWidth, disabled, options, value, onChange, className, sx, }: AutocompleteSelectProps): React.JSX.Element;
21
+ export {};
@@ -0,0 +1,71 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { styled, Autocomplete, FormHelperText } from '@mui/material';
3
+ import { ExpandMoreRounded } from '@mui/icons-material';
4
+ import { useTheme } from '../ThemeProvider.js';
5
+ import { StyledLabel, Input } from './Input.js';
6
+
7
+ const AutocompleteWrapper = styled("div")({
8
+ width: "100%",
9
+ });
10
+ function AutocompleteSelect({ id, label, error, helperText, placeholder, fullWidth = false, disabled = false, options, value, onChange, className = "", sx, }) {
11
+ const theme = useTheme();
12
+ const selectId = id || `auto-select-${Math.random().toString(36).substr(2, 9)}`;
13
+ return (jsxs(AutocompleteWrapper, { className: className, sx: [
14
+ { ...(!fullWidth && { width: "auto" }) },
15
+ ...(Array.isArray(sx) ? sx : [sx]),
16
+ ], children: [label && (jsx(StyledLabel, { htmlFor: selectId, shrink: false, children: label })), jsx(Autocomplete, { id: selectId, options: options, value: value, disabled: disabled, disablePortal: true, getOptionLabel: (option) => option?.label || "", isOptionEqualToValue: (option, val) => option?.value === val?.value, onChange: (_event, newValue) => onChange(newValue), popupIcon: jsx(ExpandMoreRounded, { sx: { color: `${theme.palette.dark.main}66` } }), slotProps: {
17
+ paper: {
18
+ sx: {
19
+ borderRadius: 2,
20
+ boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
21
+ maxHeight: "min(22rem, calc(100vh - 6rem))",
22
+ overflow: "hidden",
23
+ backgroundColor: theme.palette.light.main,
24
+ mt: 0.5,
25
+ },
26
+ },
27
+ }, sx: {
28
+ "& .MuiOutlinedInput-root": {
29
+ padding: "0 9px !important",
30
+ height: 48,
31
+ display: "flex",
32
+ alignItems: "center",
33
+ },
34
+ "& .MuiAutocomplete-input": {
35
+ padding: "0 !important",
36
+ },
37
+ "& + .MuiAutocomplete-popper .MuiAutocomplete-option": {
38
+ fontSize: "1rem",
39
+ color: theme.palette.dark.main,
40
+ '&[aria-selected="true"]': {
41
+ backgroundColor: "transparent",
42
+ },
43
+ '&[aria-selected="true"].Mui-focused, &:hover, &.Mui-focused': {
44
+ backgroundColor: `${theme.palette.primary.main}1A !important`,
45
+ },
46
+ },
47
+ }, renderInput: (params) => {
48
+ // 1. Separate structural configurations from direct props
49
+ const { InputProps, inputProps, ...restParams } = params;
50
+ return (jsx(Input, { ...restParams,
51
+ // 2. Safely spread native input elements
52
+ inputProps: inputProps,
53
+ // 3. Bind MUI's dynamic layout objects (adornments, ref) into the slot configuration
54
+ InputProps: {
55
+ ...InputProps,
56
+ }, error: error, placeholder: placeholder, fullWidth: true,
57
+ // Explicitly empty string avoids passing a raw error object down to helperText slots
58
+ helperText: "" }));
59
+ } }), error && (jsx(FormHelperText, { sx: {
60
+ mt: 0.75,
61
+ fontSize: "0.875rem",
62
+ color: theme.palette.error.main,
63
+ }, children: error })), helperText && !error && (jsx(FormHelperText, { sx: {
64
+ mt: 0.75,
65
+ fontSize: "0.875rem",
66
+ color: `${theme.palette.dark.main}99`,
67
+ }, children: helperText }))] }));
68
+ }
69
+
70
+ export { AutocompleteSelect };
71
+ //# sourceMappingURL=AutocompleteSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutocompleteSelect.js","sources":["../../../../src/components/AutocompleteSelect.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Autocomplete as MuiAutocomplete,\n FormHelperText,\n styled,\n} from \"@mui/material\";\nimport { ExpandMoreRounded } from \"@mui/icons-material\";\nimport { useTheme } from \"../ThemeProvider\"; // Adjust pathway according to project layout\nimport { Input, StyledLabel } from \"./Input\";\n\ninterface AutocompleteOption {\n value: string;\n label: string;\n}\n\ninterface AutocompleteSelectProps {\n id?: string;\n label?: string;\n error?: string;\n helperText?: string;\n placeholder?: string;\n fullWidth?: boolean;\n disabled?: boolean;\n options: AutocompleteOption[];\n value: AutocompleteOption | null;\n onChange: (value: AutocompleteOption | null) => void;\n className?: string;\n sx?: any;\n}\n\nconst AutocompleteWrapper = styled(\"div\")({\n width: \"100%\",\n});\n\nexport function AutocompleteSelect({\n id,\n label,\n error,\n helperText,\n placeholder,\n fullWidth = false,\n disabled = false,\n options,\n value,\n onChange,\n className = \"\",\n sx,\n}: AutocompleteSelectProps): React.JSX.Element {\n const theme = useTheme();\n const selectId =\n id || `auto-select-${Math.random().toString(36).substr(2, 9)}`;\n\n return (\n <AutocompleteWrapper\n className={className}\n sx={[\n { ...(!fullWidth && { width: \"auto\" }) },\n ...(Array.isArray(sx) ? sx : [sx]),\n ]}\n >\n {label && (\n <StyledLabel htmlFor={selectId} shrink={false}>\n {label}\n </StyledLabel>\n )}\n\n <MuiAutocomplete\n id={selectId}\n options={options}\n value={value}\n disabled={disabled}\n disablePortal\n getOptionLabel={(option: { label: string; value: string }) =>\n option?.label || \"\"\n }\n isOptionEqualToValue={(\n option: AutocompleteOption,\n val: AutocompleteOption,\n ) => option?.value === val?.value}\n onChange={(_event: Event, newValue: AutocompleteOption) =>\n onChange(newValue)\n }\n popupIcon={\n <ExpandMoreRounded sx={{ color: `${theme.palette.dark.main}66` }} />\n }\n slotProps={{\n paper: {\n sx: {\n borderRadius: 2,\n boxShadow:\n \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\n maxHeight: \"min(22rem, calc(100vh - 6rem))\",\n overflow: \"hidden\",\n backgroundColor: theme.palette.light.main,\n mt: 0.5,\n },\n },\n }}\n sx={{\n \"& .MuiOutlinedInput-root\": {\n padding: \"0 9px !important\",\n height: 48,\n display: \"flex\",\n alignItems: \"center\",\n },\n \"& .MuiAutocomplete-input\": {\n padding: \"0 !important\",\n },\n \"& + .MuiAutocomplete-popper .MuiAutocomplete-option\": {\n fontSize: \"1rem\",\n color: theme.palette.dark.main,\n '&[aria-selected=\"true\"]': {\n backgroundColor: \"transparent\",\n },\n '&[aria-selected=\"true\"].Mui-focused, &:hover, &.Mui-focused': {\n backgroundColor: `${theme.palette.primary.main}1A !important`,\n },\n },\n }}\n renderInput={(params: any) => {\n // 1. Separate structural configurations from direct props\n const { InputProps, inputProps, ...restParams } = params;\n\n return (\n <Input\n {...restParams}\n // 2. Safely spread native input elements\n inputProps={inputProps}\n // 3. Bind MUI's dynamic layout objects (adornments, ref) into the slot configuration\n InputProps={{\n ...InputProps,\n }}\n error={error}\n placeholder={placeholder}\n fullWidth\n // Explicitly empty string avoids passing a raw error object down to helperText slots\n helperText=\"\"\n />\n );\n }}\n />\n\n {error && (\n <FormHelperText\n sx={{\n mt: 0.75,\n fontSize: \"0.875rem\",\n color: theme.palette.error.main,\n }}\n >\n {error}\n </FormHelperText>\n )}\n\n {helperText && !error && (\n <FormHelperText\n sx={{\n mt: 0.75,\n fontSize: \"0.875rem\",\n color: `${theme.palette.dark.main}99`,\n }}\n >\n {helperText}\n </FormHelperText>\n )}\n </AutocompleteWrapper>\n );\n}\n"],"names":["_jsxs","_jsx","MuiAutocomplete"],"mappings":";;;;;;AA8BA,MAAM,mBAAmB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AACxC,IAAA,KAAK,EAAE,MAAM;AACd,CAAA,CAAC;AAEI,SAAU,kBAAkB,CAAC,EACjC,EAAE,EACF,KAAK,EACL,KAAK,EACL,UAAU,EACV,WAAW,EACX,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,EAAE,GACsB,EAAA;AACxB,IAAA,MAAM,KAAK,GAAG,QAAQ,EAAE;IACxB,MAAM,QAAQ,GACZ,EAAE,IAAI,eAAe,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA,CAAE;IAEhE,QACEA,KAAC,mBAAmB,EAAA,EAClB,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE;YACF,EAAE,IAAI,CAAC,SAAS,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE;AACxC,YAAA,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;SACnC,EAAA,QAAA,EAAA,CAEA,KAAK,KACJC,GAAA,CAAC,WAAW,EAAA,EAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAA,QAAA,EAC1C,KAAK,EAAA,CACM,CACf,EAEDA,IAACC,YAAe,EAAA,EACd,EAAE,EAAE,QAAQ,EACZ,OAAO,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
  error?: string;
5
5
  }
6
- export declare const StyledLabel: import("@emotion/styled").StyledComponent<import("@mui/material").InputLabelOwnProps & Pick<import("@mui/material").FormLabelOwnProps, "color" | "filled"> & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "style" | "color" | "margin" | "children" | "sx" | "className" | "classes" | "variant" | "disabled" | "size" | "error" | "filled" | "focused" | "required" | "disableAnimation" | "shrink"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
6
+ export declare const StyledLabel: any;
7
7
  export declare const Input: React.FC<InputProps>;
8
8
  export {};
@@ -27,3 +27,4 @@ export { RichTextArea } from "./RichTextArea";
27
27
  export { FileUploadButton } from "./FileUploadButton";
28
28
  export { HeaderSearchResult } from "./Header";
29
29
  export { Footer } from "./Footer";
30
+ export { AutocompleteSelect } from "./AutocompleteSelect";
@@ -29,3 +29,4 @@ export { RichTextArea } from "./components/RichTextArea";
29
29
  export { FileUploadButton } from "./components/FileUploadButton";
30
30
  export { HeaderSearchResult } from "./components/Header";
31
31
  export { Footer } from "./components/Footer";
32
+ export { AutocompleteSelect } from "./components/AutocompleteSelect";
package/dist/esm/index.js CHANGED
@@ -28,4 +28,5 @@ export { AcknowledgementBox } from './components/AcknowledgementBox.js';
28
28
  export { RichTextArea } from './components/RichTextArea.js';
29
29
  export { FileUploadButton } from './components/FileUploadButton.js';
30
30
  export { Footer } from './components/Footer.js';
31
+ export { AutocompleteSelect } from './components/AutocompleteSelect.js';
31
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- declare const ECETheme: import("@mui/material").Theme;
1
+ declare const ECETheme: any;
2
2
  export default ECETheme;
@@ -1,2 +1,2 @@
1
- declare const GPTheme: import("@mui/material").Theme;
1
+ declare const GPTheme: any;
2
2
  export default GPTheme;
@@ -1,2 +1,2 @@
1
- declare const LightnTheme: import("@mui/material").Theme;
1
+ declare const LightnTheme: any;
2
2
  export default LightnTheme;
@@ -1,2 +1,2 @@
1
- declare const SchoolTheme: import("@mui/material").Theme;
1
+ declare const SchoolTheme: any;
2
2
  export default SchoolTheme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ece-docs-components",
3
- "version": "1.0.100",
3
+ "version": "1.0.101",
4
4
  "type": "module",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",