@flipdish/portal-library 1.0.67 → 1.0.68

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.
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material"),t=require("formik");require("react");var l=require("../../custom-hooks/useRenderValidText.cjs.js"),i=require("./FormItemLayout.cjs.js");module.exports=({label:o,fieldName:a,options:n,placeholder:s,getOptionLabel:d,validation:u,onChange:p,onInputChange:m,isOptionEqualToValue:c,onScroll:h,layout:g="horizontal",variant:x="outlined",disabled:v=!1,loading:j=!1,required:b=!1,multiple:q=!1,limitTags:f})=>{const T=()=>e.jsx(t.Field,{name:a,validate:u,children:({field:t,form:i})=>{const{errors:u,touched:T,isSubmitting:y}=i,F=u[t.name],I=!!F&&T[t.name],P=l({fieldError:F,showError:I,touched:!!T[t.name],value:t.value});return e.jsx(r.Autocomplete,{options:n,getOptionLabel:d,isOptionEqualToValue:c,onChange:(e,r)=>{i.setFieldValue(a,r),p&&p(e,r)},onInputChange:m,disabled:y||v,fullWidth:!0,value:t.value||(q?[]:null),loading:j,renderInput:t=>e.jsx(r.TextField,{...t,label:"standard"===x?void 0:o,variant:x,"data-testid":`text-field-${a}`,fullWidth:!0,style:{paddingRight:"horizontal"===g?16:0},placeholder:s||void 0,required:b,error:I,helperText:P,slotProps:{input:{...t.InputProps,endAdornment:e.jsxs(e.Fragment,{children:[j&&e.jsx(r.CircularProgress,{color:"inherit",size:25}),t.InputProps.endAdornment]})},formHelperText:{children:" ",style:{textAlign:"right"}}}}),multiple:q,limitTags:q?f??2:void 0,slotProps:{listbox:{onScroll:h}}})}});return"vertical"===g?e.jsxs(e.Fragment,{children:["standard"===x&&e.jsx(r.Typography,{variant:"subtitle1",component:"h3",color:"textPrimary",children:o}),T()]}):e.jsx(i,{label:o,children:T()})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/Autocomplete"),i=require("@mui/material/CircularProgress"),t=require("@mui/material/TextField"),l=require("@mui/material/Typography"),a=require("formik");require("react");var o=require("../../custom-hooks/useRenderValidText.cjs.js"),n=require("./FormItemLayout.cjs.js");module.exports=({label:s,fieldName:u,options:d,placeholder:m,getOptionLabel:p,validation:c,onChange:h,onInputChange:g,isOptionEqualToValue:x,onScroll:v,layout:j="horizontal",variant:q="outlined",disabled:b=!1,loading:f=!1,required:T=!1,multiple:y=!1,limitTags:F})=>{const I=()=>e.jsx(a.Field,{name:u,validate:c,children:({field:l,form:a})=>{const{errors:n,touched:c,isSubmitting:I}=a,P=n[l.name],C=!!P&&c[l.name],A=o({fieldError:P,showError:C,touched:!!c[l.name],value:l.value});return e.jsx(r,{options:d,getOptionLabel:p,isOptionEqualToValue:x,onChange:(e,r)=>{a.setFieldValue(u,r),h&&h(e,r)},onInputChange:g,disabled:I||b,fullWidth:!0,value:l.value||(y?[]:null),loading:f,renderInput:r=>e.jsx(t,{...r,label:"standard"===q?void 0:s,variant:q,"data-testid":`text-field-${u}`,fullWidth:!0,style:{paddingRight:"horizontal"===j?16:0},placeholder:m||void 0,required:T,error:C,helperText:A,slotProps:{input:{...r.InputProps,endAdornment:e.jsxs(e.Fragment,{children:[f&&e.jsx(i,{color:"inherit",size:25}),r.InputProps.endAdornment]})},formHelperText:{children:" ",style:{textAlign:"right"}}}}),multiple:y,limitTags:y?F??2:void 0,slotProps:{listbox:{onScroll:v}}})}});return"vertical"===j?e.jsxs(e.Fragment,{children:["standard"===q&&e.jsx(l,{variant:"subtitle1",component:"h3",color:"textPrimary",children:s}),I()]}):e.jsx(n,{label:s,children:I()})};
2
2
  //# sourceMappingURL=GenericAutocompleteField.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenericAutocompleteField.cjs.js","sources":["../../../../src/components/ui/Form/GenericAutocompleteField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { type TextFieldProps, Autocomplete, TextField, Typography, CircularProgress } from '@mui/material';\nimport { Field, type FieldProps } from 'formik';\nimport { type SyntheticEvent } from 'react';\nimport useRenderValidText from '../../custom-hooks/useRenderValidText';\nimport FormItemLayout from './FormItemLayout';\n\nexport type Props<T> = {\n label: string;\n fieldName: string;\n options: T[];\n placeholder?: string;\n getOptionLabel?: (option: T) => string;\n validation?: (value: T | T[]) => string | undefined;\n onChange?: (e: SyntheticEvent, value: T | T[]) => void;\n onInputChange?: (e: SyntheticEvent, value: string) => void;\n isOptionEqualToValue?: (option: T, value: T) => boolean;\n onScroll?: (e: React.UIEvent<HTMLUListElement, UIEvent>) => void;\n layout?: 'horizontal' | 'vertical';\n variant?: TextFieldProps['variant'];\n disabled?: boolean;\n loading?: boolean;\n required?: boolean;\n multiple?: boolean;\n limitTags?: number;\n};\n\nconst GenericAutocompleteField = <T,>({\n label,\n fieldName,\n options,\n placeholder,\n getOptionLabel,\n validation,\n onChange,\n onInputChange,\n isOptionEqualToValue,\n onScroll,\n layout = 'horizontal',\n variant = 'outlined',\n disabled = false,\n loading = false,\n required = false,\n multiple = false,\n limitTags = undefined,\n}: Props<T>) => {\n const renderField = () => {\n return (\n <Field name={fieldName} validate={validation}>\n {({ field, form }: FieldProps) => {\n const { errors, touched, isSubmitting } = form;\n const fieldError = errors[field.name] as string | undefined;\n const showError = !!fieldError && (touched[field.name] as boolean | undefined);\n const helperText = useRenderValidText({\n fieldError,\n showError,\n touched: !!touched[field.name],\n value: field.value,\n });\n\n return (\n <Autocomplete\n options={options}\n getOptionLabel={getOptionLabel}\n isOptionEqualToValue={isOptionEqualToValue}\n onChange={(e: SyntheticEvent, value: T[]) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n form.setFieldValue(fieldName, value);\n if (onChange) {\n onChange(e, value);\n }\n }}\n onInputChange={onInputChange}\n disabled={isSubmitting || disabled}\n fullWidth\n value={field.value || (multiple ? [] : null)}\n loading={loading}\n renderInput={(params) => (\n <TextField\n {...params}\n label={variant === 'standard' ? undefined : label}\n variant={variant}\n data-testid={`text-field-${fieldName}`}\n fullWidth\n style={{ paddingRight: layout === 'horizontal' ? 16 : 0 }}\n placeholder={placeholder ? placeholder : undefined}\n required={required}\n error={showError}\n helperText={helperText}\n slotProps={{\n input: {\n ...params.InputProps,\n endAdornment: (\n <>\n {loading && <CircularProgress color=\"inherit\" size={25} />}\n {params.InputProps.endAdornment}\n </>\n ),\n },\n\n formHelperText: {\n children: ' ', // reserves line height for error message\n style: { textAlign: 'right' },\n },\n }}\n />\n )}\n multiple={multiple}\n limitTags={multiple ? (limitTags ?? 2) : undefined}\n slotProps={{\n listbox: {\n onScroll,\n },\n }}\n />\n );\n }}\n </Field>\n );\n };\n\n if (layout === 'vertical') {\n return (\n <>\n {variant === 'standard' && (\n <Typography variant=\"subtitle1\" component=\"h3\" color=\"textPrimary\">\n {label}\n </Typography>\n )}\n {renderField()}\n </>\n );\n }\n\n return <FormItemLayout label={label}>{renderField()}</FormItemLayout>;\n};\n\nexport default GenericAutocompleteField;\n"],"names":["label","fieldName","options","placeholder","getOptionLabel","validation","onChange","onInputChange","isOptionEqualToValue","onScroll","layout","variant","disabled","loading","required","multiple","limitTags","renderField","_jsx","Field","name","validate","children","field","form","errors","touched","isSubmitting","fieldError","showError","helperText","useRenderValidText","value","Autocomplete","e","setFieldValue","fullWidth","renderInput","params","jsx","TextField","undefined","style","paddingRight","error","slotProps","input","InputProps","endAdornment","_jsxs","jsxs","_Fragment","CircularProgress","color","size","formHelperText","textAlign","listbox","Typography","component","FormItemLayout"],"mappings":"kOA2BiC,EAC7BA,QACAC,YACAC,UACAC,cACAC,iBACAC,aACAC,WACAC,gBACAC,uBACAC,WACAC,SAAS,aACTC,UAAU,WACVC,YAAW,EACXC,WAAU,EACVC,YAAW,EACXC,YAAW,EACXC,gBAEA,MAAMC,EAAc,IAEZC,MAACC,EAAAA,OAAMC,KAAMnB,EAAWoB,SAAUhB,EAAUiB,SACvC,EAAGC,QAAOC,WACP,MAAMC,OAAEA,EAAMC,QAAEA,EAAOC,aAAEA,GAAiBH,EACp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1
+ {"version":3,"file":"GenericAutocompleteField.cjs.js","sources":["../../../../src/components/ui/Form/GenericAutocompleteField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport Autocomplete from '@mui/material/Autocomplete';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport TextField, { type TextFieldProps } from '@mui/material/TextField';\nimport Typography from '@mui/material/Typography';\nimport { Field, type FieldProps } from 'formik';\nimport { type SyntheticEvent } from 'react';\nimport useRenderValidText from '../../custom-hooks/useRenderValidText';\nimport FormItemLayout from './FormItemLayout';\n\nexport type Props<T> = {\n label: string;\n fieldName: string;\n options: T[];\n placeholder?: string;\n getOptionLabel?: (option: T) => string;\n validation?: (value: T | T[]) => string | undefined;\n onChange?: (e: SyntheticEvent, value: T | T[]) => void;\n onInputChange?: (e: SyntheticEvent, value: string) => void;\n isOptionEqualToValue?: (option: T, value: T) => boolean;\n onScroll?: (e: React.UIEvent<HTMLUListElement, UIEvent>) => void;\n layout?: 'horizontal' | 'vertical';\n variant?: TextFieldProps['variant'];\n disabled?: boolean;\n loading?: boolean;\n required?: boolean;\n multiple?: boolean;\n limitTags?: number;\n};\n\nconst GenericAutocompleteField = <T,>({\n label,\n fieldName,\n options,\n placeholder,\n getOptionLabel,\n validation,\n onChange,\n onInputChange,\n isOptionEqualToValue,\n onScroll,\n layout = 'horizontal',\n variant = 'outlined',\n disabled = false,\n loading = false,\n required = false,\n multiple = false,\n limitTags = undefined,\n}: Props<T>) => {\n const renderField = () => {\n return (\n <Field name={fieldName} validate={validation}>\n {({ field, form }: FieldProps) => {\n const { errors, touched, isSubmitting } = form;\n const fieldError = errors[field.name] as string | undefined;\n const showError = !!fieldError && (touched[field.name] as boolean | undefined);\n const helperText = useRenderValidText({\n fieldError,\n showError,\n touched: !!touched[field.name],\n value: field.value,\n });\n\n return (\n <Autocomplete\n options={options}\n getOptionLabel={getOptionLabel}\n isOptionEqualToValue={isOptionEqualToValue}\n onChange={(e: SyntheticEvent, value: T[]) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n form.setFieldValue(fieldName, value);\n if (onChange) {\n onChange(e, value);\n }\n }}\n onInputChange={onInputChange}\n disabled={isSubmitting || disabled}\n fullWidth\n value={field.value || (multiple ? [] : null)}\n loading={loading}\n renderInput={(params) => (\n <TextField\n {...params}\n label={variant === 'standard' ? undefined : label}\n variant={variant}\n data-testid={`text-field-${fieldName}`}\n fullWidth\n style={{ paddingRight: layout === 'horizontal' ? 16 : 0 }}\n placeholder={placeholder ? placeholder : undefined}\n required={required}\n error={showError}\n helperText={helperText}\n slotProps={{\n input: {\n ...params.InputProps,\n endAdornment: (\n <>\n {loading && <CircularProgress color=\"inherit\" size={25} />}\n {params.InputProps.endAdornment}\n </>\n ),\n },\n\n formHelperText: {\n children: ' ', // reserves line height for error message\n style: { textAlign: 'right' },\n },\n }}\n />\n )}\n multiple={multiple}\n limitTags={multiple ? (limitTags ?? 2) : undefined}\n slotProps={{\n listbox: {\n onScroll,\n },\n }}\n />\n );\n }}\n </Field>\n );\n };\n\n if (layout === 'vertical') {\n return (\n <>\n {variant === 'standard' && (\n <Typography variant=\"subtitle1\" component=\"h3\" color=\"textPrimary\">\n {label}\n </Typography>\n )}\n {renderField()}\n </>\n );\n }\n\n return <FormItemLayout label={label}>{renderField()}</FormItemLayout>;\n};\n\nexport default GenericAutocompleteField;\n"],"names":["label","fieldName","options","placeholder","getOptionLabel","validation","onChange","onInputChange","isOptionEqualToValue","onScroll","layout","variant","disabled","loading","required","multiple","limitTags","renderField","_jsx","Field","name","validate","children","field","form","errors","touched","isSubmitting","fieldError","showError","helperText","useRenderValidText","value","Autocomplete","e","setFieldValue","fullWidth","renderInput","params","jsx","TextField","undefined","style","paddingRight","error","slotProps","input","InputProps","endAdornment","_jsxs","jsxs","_Fragment","CircularProgress","color","size","formHelperText","textAlign","listbox","Typography","component","FormItemLayout"],"mappings":"sWA8BiC,EAC7BA,QACAC,YACAC,UACAC,cACAC,iBACAC,aACAC,WACAC,g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Id,IAMlB,MAAe,aAAXC,EAEIuC,EAAAC,KAAAC,WAAA,CAAA7B,SAAA,CACiB,aAAZX,GACGO,EAAAqB,IAACmB,EAAU,CAAC/C,QAAQ,YAAYgD,UAAU,KAAKN,MAAM,cAChD/B,SAAAtB,IAGRiB,OAKNC,EAAAqB,IAACqB,EAAc,CAAC5D,MAAOA,EAAQsB,SAAAL,KAA+B"}
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { TextFieldProps } from '@mui/material';
2
+ import { TextFieldProps } from '@mui/material/TextField';
3
3
  import { SyntheticEvent } from 'react';
4
4
 
5
5
  type Props<T> = {
@@ -1,2 +1,2 @@
1
- import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{Typography as r,Autocomplete as l,TextField as i,CircularProgress as n}from"@mui/material";import{Field as a}from"formik";import"react";import d from"../../custom-hooks/useRenderValidText.js";import s from"./FormItemLayout.js";const u=({label:u,fieldName:m,options:p,placeholder:h,getOptionLabel:c,validation:f,onChange:g,onInputChange:v,isOptionEqualToValue:b,onScroll:x,layout:T="horizontal",variant:I="outlined",disabled:y=!1,loading:P=!1,required:q=!1,multiple:C=!1,limitTags:E})=>{const O=()=>o(a,{name:m,validate:f,children:({field:r,form:a})=>{const{errors:s,touched:f,isSubmitting:O}=a,V=s[r.name],j=!!V&&f[r.name],z=d({fieldError:V,showError:j,touched:!!f[r.name],value:r.value});return o(l,{options:p,getOptionLabel:c,isOptionEqualToValue:b,onChange:(e,t)=>{a.setFieldValue(m,t),g&&g(e,t)},onInputChange:v,disabled:O||y,fullWidth:!0,value:r.value||(C?[]:null),loading:P,renderInput:r=>o(i,{...r,label:"standard"===I?void 0:u,variant:I,"data-testid":`text-field-${m}`,fullWidth:!0,style:{paddingRight:"horizontal"===T?16:0},placeholder:h||void 0,required:q,error:j,helperText:z,slotProps:{input:{...r.InputProps,endAdornment:e(t,{children:[P&&o(n,{color:"inherit",size:25}),r.InputProps.endAdornment]})},formHelperText:{children:" ",style:{textAlign:"right"}}}}),multiple:C,limitTags:C?E??2:void 0,slotProps:{listbox:{onScroll:x}}})}});return"vertical"===T?e(t,{children:["standard"===I&&o(r,{variant:"subtitle1",component:"h3",color:"textPrimary",children:u}),O()]}):o(s,{label:u,children:O()})};export{u as default};
1
+ import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import o from"@mui/material/Autocomplete";import i from"@mui/material/CircularProgress";import l from"@mui/material/TextField";import a from"@mui/material/Typography";import{Field as n}from"formik";import"react";import d from"../../custom-hooks/useRenderValidText.js";import m from"./FormItemLayout.js";const u=({label:u,fieldName:s,options:p,placeholder:h,getOptionLabel:c,validation:f,onChange:g,onInputChange:v,isOptionEqualToValue:b,onScroll:x,layout:T="horizontal",variant:y="outlined",disabled:I=!1,loading:P=!1,required:C=!1,multiple:q=!1,limitTags:A})=>{const E=()=>r(n,{name:s,validate:f,children:({field:a,form:n})=>{const{errors:m,touched:f,isSubmitting:E}=n,O=m[a.name],V=!!O&&f[a.name],j=d({fieldError:O,showError:V,touched:!!f[a.name],value:a.value});return r(o,{options:p,getOptionLabel:c,isOptionEqualToValue:b,onChange:(e,t)=>{n.setFieldValue(s,t),g&&g(e,t)},onInputChange:v,disabled:E||I,fullWidth:!0,value:a.value||(q?[]:null),loading:P,renderInput:o=>r(l,{...o,label:"standard"===y?void 0:u,variant:y,"data-testid":`text-field-${s}`,fullWidth:!0,style:{paddingRight:"horizontal"===T?16:0},placeholder:h||void 0,required:C,error:V,helperText:j,slotProps:{input:{...o.InputProps,endAdornment:e(t,{children:[P&&r(i,{color:"inherit",size:25}),o.InputProps.endAdornment]})},formHelperText:{children:" ",style:{textAlign:"right"}}}}),multiple:q,limitTags:q?A??2:void 0,slotProps:{listbox:{onScroll:x}}})}});return"vertical"===T?e(t,{children:["standard"===y&&r(a,{variant:"subtitle1",component:"h3",color:"textPrimary",children:u}),E()]}):r(m,{label:u,children:E()})};export{u as default};
2
2
  //# sourceMappingURL=GenericAutocompleteField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenericAutocompleteField.js","sources":["../../../../src/components/ui/Form/GenericAutocompleteField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { type TextFieldProps, Autocomplete, TextField, Typography, CircularProgress } from '@mui/material';\nimport { Field, type FieldProps } from 'formik';\nimport { type SyntheticEvent } from 'react';\nimport useRenderValidText from '../../custom-hooks/useRenderValidText';\nimport FormItemLayout from './FormItemLayout';\n\nexport type Props<T> = {\n label: string;\n fieldName: string;\n options: T[];\n placeholder?: string;\n getOptionLabel?: (option: T) => string;\n validation?: (value: T | T[]) => string | undefined;\n onChange?: (e: SyntheticEvent, value: T | T[]) => void;\n onInputChange?: (e: SyntheticEvent, value: string) => void;\n isOptionEqualToValue?: (option: T, value: T) => boolean;\n onScroll?: (e: React.UIEvent<HTMLUListElement, UIEvent>) => void;\n layout?: 'horizontal' | 'vertical';\n variant?: TextFieldProps['variant'];\n disabled?: boolean;\n loading?: boolean;\n required?: boolean;\n multiple?: boolean;\n limitTags?: number;\n};\n\nconst GenericAutocompleteField = <T,>({\n label,\n fieldName,\n options,\n placeholder,\n getOptionLabel,\n validation,\n onChange,\n onInputChange,\n isOptionEqualToValue,\n onScroll,\n layout = 'horizontal',\n variant = 'outlined',\n disabled = false,\n loading = false,\n required = false,\n multiple = false,\n limitTags = undefined,\n}: Props<T>) => {\n const renderField = () => {\n return (\n <Field name={fieldName} validate={validation}>\n {({ field, form }: FieldProps) => {\n const { errors, touched, isSubmitting } = form;\n const fieldError = errors[field.name] as string | undefined;\n const showError = !!fieldError && (touched[field.name] as boolean | undefined);\n const helperText = useRenderValidText({\n fieldError,\n showError,\n touched: !!touched[field.name],\n value: field.value,\n });\n\n return (\n <Autocomplete\n options={options}\n getOptionLabel={getOptionLabel}\n isOptionEqualToValue={isOptionEqualToValue}\n onChange={(e: SyntheticEvent, value: T[]) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n form.setFieldValue(fieldName, value);\n if (onChange) {\n onChange(e, value);\n }\n }}\n onInputChange={onInputChange}\n disabled={isSubmitting || disabled}\n fullWidth\n value={field.value || (multiple ? [] : null)}\n loading={loading}\n renderInput={(params) => (\n <TextField\n {...params}\n label={variant === 'standard' ? undefined : label}\n variant={variant}\n data-testid={`text-field-${fieldName}`}\n fullWidth\n style={{ paddingRight: layout === 'horizontal' ? 16 : 0 }}\n placeholder={placeholder ? placeholder : undefined}\n required={required}\n error={showError}\n helperText={helperText}\n slotProps={{\n input: {\n ...params.InputProps,\n endAdornment: (\n <>\n {loading && <CircularProgress color=\"inherit\" size={25} />}\n {params.InputProps.endAdornment}\n </>\n ),\n },\n\n formHelperText: {\n children: ' ', // reserves line height for error message\n style: { textAlign: 'right' },\n },\n }}\n />\n )}\n multiple={multiple}\n limitTags={multiple ? (limitTags ?? 2) : undefined}\n slotProps={{\n listbox: {\n onScroll,\n },\n }}\n />\n );\n }}\n </Field>\n );\n };\n\n if (layout === 'vertical') {\n return (\n <>\n {variant === 'standard' && (\n <Typography variant=\"subtitle1\" component=\"h3\" color=\"textPrimary\">\n {label}\n </Typography>\n )}\n {renderField()}\n </>\n );\n }\n\n return <FormItemLayout label={label}>{renderField()}</FormItemLayout>;\n};\n\nexport default GenericAutocompleteField;\n"],"names":["GenericAutocompleteField","label","fieldName","options","placeholder","getOptionLabel","validation","onChange","onInputChange","isOptionEqualToValue","onScroll","layout","variant","disabled","loading","required","multiple","limitTags","renderField","_jsx","Field","name","validate","children","field","form","errors","touched","isSubmitting","fieldError","showError","helperText","useRenderValidText","value","Autocomplete","e","setFieldValue","fullWidth","renderInput","params","TextField","undefined","style","paddingRight","error","slotProps","input","InputProps","endAdornment","_jsxs","_Fragment","CircularProgress","color","size","formHelperText","textAlign","listbox","Typography","component","FormItemLayout"],"mappings":"0SA2BM,MAAAA,EAA2B,EAC7BC,QACAC,YACAC,UACAC,cACAC,iBACAC,aACAC,WACAC,gBACAC,uBACAC,WACAC,SAAS,aACTC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A,CACiB,aAAZX,GACGO,EAACsC,EAAU,CAAC7C,QAAQ,YAAY8C,UAAU,KAAKN,MAAM,cAChD7B,SAAAtB,IAGRiB,OAKNC,EAACwC,EAAc,CAAC1D,MAAOA,EAAQsB,SAAAL,KAA+B"}
1
+ {"version":3,"file":"GenericAutocompleteField.js","sources":["../../../../src/components/ui/Form/GenericAutocompleteField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport Autocomplete from '@mui/material/Autocomplete';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport TextField, { type TextFieldProps } from '@mui/material/TextField';\nimport Typography from '@mui/material/Typography';\nimport { Field, type FieldProps } from 'formik';\nimport { type SyntheticEvent } from 'react';\nimport useRenderValidText from '../../custom-hooks/useRenderValidText';\nimport FormItemLayout from './FormItemLayout';\n\nexport type Props<T> = {\n label: string;\n fieldName: string;\n options: T[];\n placeholder?: string;\n getOptionLabel?: (option: T) => string;\n validation?: (value: T | T[]) => string | undefined;\n onChange?: (e: SyntheticEvent, value: T | T[]) => void;\n onInputChange?: (e: SyntheticEvent, value: string) => void;\n isOptionEqualToValue?: (option: T, value: T) => boolean;\n onScroll?: (e: React.UIEvent<HTMLUListElement, UIEvent>) => void;\n layout?: 'horizontal' | 'vertical';\n variant?: TextFieldProps['variant'];\n disabled?: boolean;\n loading?: boolean;\n required?: boolean;\n multiple?: boolean;\n limitTags?: number;\n};\n\nconst GenericAutocompleteField = <T,>({\n label,\n fieldName,\n options,\n placeholder,\n getOptionLabel,\n validation,\n onChange,\n onInputChange,\n isOptionEqualToValue,\n onScroll,\n layout = 'horizontal',\n variant = 'outlined',\n disabled = false,\n loading = false,\n required = false,\n multiple = false,\n limitTags = undefined,\n}: Props<T>) => {\n const renderField = () => {\n return (\n <Field name={fieldName} validate={validation}>\n {({ field, form }: FieldProps) => {\n const { errors, touched, isSubmitting } = form;\n const fieldError = errors[field.name] as string | undefined;\n const showError = !!fieldError && (touched[field.name] as boolean | undefined);\n const helperText = useRenderValidText({\n fieldError,\n showError,\n touched: !!touched[field.name],\n value: field.value,\n });\n\n return (\n <Autocomplete\n options={options}\n getOptionLabel={getOptionLabel}\n isOptionEqualToValue={isOptionEqualToValue}\n onChange={(e: SyntheticEvent, value: T[]) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n form.setFieldValue(fieldName, value);\n if (onChange) {\n onChange(e, value);\n }\n }}\n onInputChange={onInputChange}\n disabled={isSubmitting || disabled}\n fullWidth\n value={field.value || (multiple ? [] : null)}\n loading={loading}\n renderInput={(params) => (\n <TextField\n {...params}\n label={variant === 'standard' ? undefined : label}\n variant={variant}\n data-testid={`text-field-${fieldName}`}\n fullWidth\n style={{ paddingRight: layout === 'horizontal' ? 16 : 0 }}\n placeholder={placeholder ? placeholder : undefined}\n required={required}\n error={showError}\n helperText={helperText}\n slotProps={{\n input: {\n ...params.InputProps,\n endAdornment: (\n <>\n {loading && <CircularProgress color=\"inherit\" size={25} />}\n {params.InputProps.endAdornment}\n </>\n ),\n },\n\n formHelperText: {\n children: ' ', // reserves line height for error message\n style: { textAlign: 'right' },\n },\n }}\n />\n )}\n multiple={multiple}\n limitTags={multiple ? (limitTags ?? 2) : undefined}\n slotProps={{\n listbox: {\n onScroll,\n },\n }}\n />\n );\n }}\n </Field>\n );\n };\n\n if (layout === 'vertical') {\n return (\n <>\n {variant === 'standard' && (\n <Typography variant=\"subtitle1\" component=\"h3\" color=\"textPrimary\">\n {label}\n </Typography>\n )}\n {renderField()}\n </>\n );\n }\n\n return <FormItemLayout label={label}>{renderField()}</FormItemLayout>;\n};\n\nexport default GenericAutocompleteField;\n"],"names":["GenericAutocompleteField","label","fieldName","options","placeholder","getOptionLabel","validation","onChange","onInputChange","isOptionEqualToValue","onScroll","layout","variant","disabled","loading","required","multiple","limitTags","renderField","_jsx","Field","name","validate","children","field","form","errors","touched","isSubmitting","fieldError","showError","helperText","useRenderValidText","value","Autocomplete","e","setFieldValue","fullWidth","renderInput","params","TextField","undefined","style","paddingRight","error","slotProps","input","InputProps","endAdornment","_jsxs","_Fragment","CircularProgress","color","size","formHelperText","textAlign","listbox","Typography","component","FormItemLayout"],"mappings":"+WA8BM,MAAAA,EAA2B,EAC7BC,QACAC,YACAC,UACAC,cACAC,iBACAC,aACAC,WACAC,gBACAC,uBACAC,WACAC,SAAS,aACTC,UAAU,WACVC,YAAW,EACXC,WAAU,EACVC,YAAW,EACXC,YAAW,EACXC,gBAEA,MAAMC,EAAc,IAEZC,EAACC,GAAMC,KAAMnB,EAAWoB,SAAUhB,EAAUiB,SACvC,EAAGC,QAAOC,WACP,MAAMC,OAAEA,EAAMC,QAAEA,EAAOC,aAAEA,GAAiBH,EACpCI,EAAaH,EAAOF,EAAMH,MAC1BS,IAAcD,GAAeF,EAAQH,EAAMH,MAC3CU,EAAaC,EAAmB,CAClCH,aACAC,YACAH,UAAWA,EAAQH,EAAMH,MACzBY,MAAOT,EAAMS,QAGjB,OACId,EAACe,EAAY,CACT/B,QAASA,EACTE,eAAgBA,EAChBI,qBAAsBA,EACtBF,SAAU,CAAC4B,EAAmBF,KAE1BR,EAAKW,cAAclC,EAAW+B,GAC1B1B,GACAA,EAAS4B,EAAGF,EACf,EAELzB,cAAeA,EACfK,SAAUe,GAAgBf,EAC1BwB,aACAJ,MAAOT,EAAMS,QAAUjB,EAAW,GAAK,MACvCF,QAASA,EACTwB,YAAcC,GACVpB,EAACqB,EACO,IAAAD,EACJtC,MAAmB,aAAZW,OAAyB6B,EAAYxC,EAC5CW,QAASA,EAAO,cACH,cAAcV,IAC3BmC,WAAS,EACTK,MAAO,CAAEC,aAAyB,eAAXhC,EAA0B,GAAK,GACtDP,YAAaA,QAA4BqC,EACzC1B,SAAUA,EACV6B,MAAOd,EACPC,WAAYA,EACZc,UAAW,CACPC,MAAO,IACAP,EAAOQ,WACVC,aACIC,EACKC,EAAA,CAAA3B,SAAA,CAAAT,GAAWK,EAACgC,EAAiB,CAAAC,MAAM,UAAUC,KAAM,KACnDd,EAAOQ,WAAWC,iBAK/BM,eAAgB,CACZ/B,SAAU,IACVmB,MAAO,CAAEa,UAAW,aAKpCvC,SAAUA,EACVC,UAAWD,EAAYC,GAAa,OAAKwB,EACzCI,UAAW,CACPW,QAAS,CACL9C,cAId,IAMlB,MAAe,aAAXC,EAEIsC,EAAAC,EAAA,CAAA3B,SAAA,CACiB,aAAZX,GACGO,EAACsC,EAAU,CAAC7C,QAAQ,YAAY8C,UAAU,KAAKN,MAAM,cAChD7B,SAAAtB,IAGRiB,OAKNC,EAACwC,EAAc,CAAC1D,MAAOA,EAAQsB,SAAAL,KAA+B"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("@mui/icons-material"),i=require("@mui/material"),r=require("../ListItemLink/ListItemLink.cjs.js");const o=i.styled(r,{shouldForwardProp:e=>!["borderBottom"].includes(e)&&!["disabled"].includes(e)&&!["selected"].includes(e)})((({theme:e,borderBottom:t,selected:i})=>({borderBottom:t??"1px solid #cecece",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:e.palette.text.primary,textDecoration:"none",backgroundColor:i?"#eaf2ff":"inherit"}))),n=i.styled(i.ListItemIcon,{shouldForwardProp:e=>!["iconMargin"].includes(e)})((({iconMargin:e})=>({margin:e||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),s=i.styled(i.ListItemText)((({theme:e})=>({"& .MuiListItemText-primary":{color:e.palette.text.primary},"& .MuiListItemText-secondary":{color:e.palette.text.secondary}}))),d=({borderBottom:r,customTitle:d,customSubtitle:a,disabled:c=!1,onClick:l,title:u,subtitle:m,icon:p,iconMargin:x,hideIcon:b=!1,link:g,isLast:f,customButton:h,iconComponent:y,dataFd:L="",isSelected:k=!1})=>{const j=i.useTheme(),I=i.useMediaQuery(j.breakpoints.down("md")),M=!f||I,B=d||u,C=a||m;return e.jsxs(o,{borderBottom:M?r:"none",divider:M,button:!0,fdKey:L||`link-button-${u}`,to:g,onClick:l,disabled:c,selected:k,children:[p&&e.jsx(n,{iconMargin:x,children:e.jsx("img",{src:p,alt:""})}),y&&e.jsx(n,{iconMargin:x,children:y}),e.jsx(s,{primary:B,secondary:C,sx:{pr:"60px"}}),!b&&(h||e.jsx(i.IconButton,{"aria-label":`link-button-${u}`,children:e.jsx(t.KeyboardArrowRight,{})}))]})};exports.ListItemLinkButton=d,exports.default=d;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("@mui/icons-material"),i=require("@mui/material/IconButton"),r=require("@mui/material/ListItemIcon"),o=require("@mui/material/ListItemText"),n=require("@mui/material/styles/useTheme"),a=require("@mui/material/useMediaQuery"),s=require("@mui/material/styles/styled");const d=s(require("../ListItemLink/ListItemLink.cjs.js"),{shouldForwardProp:e=>!["borderBottom"].includes(e)&&!["disabled"].includes(e)&&!["selected"].includes(e)})((({theme:e,borderBottom:t,selected:i})=>({borderBottom:t??"1px solid #cecece",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:e.palette.text.primary,textDecoration:"none",backgroundColor:i?"#eaf2ff":"inherit"}))),c=s(r,{shouldForwardProp:e=>!["iconMargin"].includes(e)})((({iconMargin:e})=>({margin:e||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),l=s(o)((({theme:e})=>({"& .MuiListItemText-primary":{color:e.palette.text.primary},"& .MuiListItemText-secondary":{color:e.palette.text.secondary}}))),u=({borderBottom:r,customTitle:o,customSubtitle:s,disabled:u=!1,onClick:m,title:p,subtitle:x,icon:b,iconMargin:g,hideIcon:f=!1,link:h,isLast:y,customButton:L,iconComponent:k,dataFd:j="",isSelected:q=!1})=>{const I=n(),M=a(I.breakpoints.down("md")),B=!y||M,C=o||p,v=s||x;return e.jsxs(d,{borderBottom:B?r:"none",divider:B,button:!0,fdKey:j||`link-button-${p}`,to:h,onClick:m,disabled:u,selected:q,children:[b&&e.jsx(c,{iconMargin:g,children:e.jsx("img",{src:b,alt:""})}),k&&e.jsx(c,{iconMargin:g,children:k}),e.jsx(l,{primary:C,secondary:v,sx:{pr:"60px"}}),!f&&(L||e.jsx(i,{"aria-label":`link-button-${p}`,children:e.jsx(t.KeyboardArrowRight,{})}))]})};exports.ListItemLinkButton=u,exports.default=u;
2
2
  //# sourceMappingURL=ListItemLinkButton.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemLinkButton.cjs.js","sources":["../../../../src/components/ui/ListItemLinkButton/ListItemLinkButton.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardArrowRight } from '@mui/icons-material';\nimport { IconButton, ListItemIcon, ListItemText, useTheme, useMediaQuery, styled } from '@mui/material';\nimport { ListItemLink } from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","ListItemLink","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"yOAQA,MAAMA,EAAqBC,EAAMA,OAACC,EAAc,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,SAASD,KAAoB,CAAC,YAAYC,SAASD,KAAoB,CAAC,YAAYC,SAASD,IAF5FH,EAG0C,EAAGK,QAAOC,eAAcC,eAAgB,CACzGD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACPE,gBAAiB,WAErB,UAAW,CACPA,gBAAiB,WAGrBC,MAAOP,EAAMQ,QAAQC,KAAKC,QAC1BC,eAAgB,OAChBL,gBAAiBJ,EAAW,UAAY,cAGtCU,EAAqBjB,EAAMA,OAACkB,eAAc,CAC5ChB,kBAAoBC,IAAU,CAAC,cAAcC,SAASD,IAD/BH,EAEK,EAAGmB,iBAAkB,CACjDC,OAAQD,GAAc,OACtBE,WAAY,IACZC,QAAS,MACTC,SAAU,QAGRC,EAAqBxB,EAAAA,OAAOyB,EAAAA,aAAPzB,EAAqB,EAAGK,YAAa,CAC5D,6BAA8B,CAC1BO,MAAOP,EAAMQ,QAAQC,KAAKC,SAE9B,+BAAgC,CAC5BH,MAAOP,EAAMQ,QAAQC,KAAKY,eAuBrBC,EAAqB,EAC9BrB,eACAsB,cACAC,iBACAC,YAAW,EACXC,UACAC,QACAC,WACAC,OACAf,aACAgB,YAAW,EACXC,OACAC,SACAC,eACAC,gBACAC,SAAS,GACTC,cAAa,MAEb,MAAMpC,EAAQqC,EAAAA,WACRC,EAAWC,EAAAA,cAAcvC,EAAMwC,YAAYC,KAAK,OAChDC,GAAcV,GAAUM,EAExBK,EAAYpB,GAAeI,EAC3BiB,EAAepB,GAAkBI,EAEvC,OACIiB,EAAAA,KAACnD,EAAkB,CACfO,aAAcyC,EAAazC,EAAe,OAC1C6C,QAASJ,EACTK,QAAM,EACNC,MAAOb,GAAU,eAAeR,IAChCsB,GAAIlB,EACJL,QAASA,EACTD,SAAUA,EACVvB,SAAUkC,EAAUc,SAAA,CAEnBrB,GACGsB,EAAAC,IAACxC,EAAmB,CAAAE,WAAYA,EAAUoC,SACtCC,EAAAA,WAAKE,IAAKxB,EAAMyB,IAAI,OAI3BpB,GAAiBiB,EAAAA,IAACvC,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAACC,IAAAjC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcW,GAAI,CAAEC,GAAI,WAEzE1B,IACGG,GACGkB,MAACM,EAAUA,WAAA,CAAA,aAAa,eAAe9B,IACnCuB,SAAAC,EAAAA,IAACO,EAAAA,mBAAqB,CAAA,QAIxC"}
1
+ {"version":3,"file":"ListItemLinkButton.cjs.js","sources":["../../../../src/components/ui/ListItemLinkButton/ListItemLinkButton.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardArrowRight } from '@mui/icons-material';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport useTheme from '@mui/material/styles/useTheme';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport styled from '@mui/material/styles/styled';\nimport { ListItemLink } from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"gZAaA,MAAMA,EAAqBC,iDAAqB,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,SAASD,KAAoB,CAAC,YAAYC,SAASD,KAAoB,CAAC,YAAYC,SAASD,IAF5FF,EAG0C,EAAGI,QAAOC,eAAcC,eAAgB,CACzGD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACPE,gBAAiB,WAErB,UAAW,CACPA,gBAAiB,WAGrBC,MAAOP,EAAMQ,QAAQC,KAAKC,QAC1BC,eAAgB,OAChBL,gBAAiBJ,EAAW,UAAY,cAGtCU,EAAqBhB,EAAOiB,EAAc,CAC5ChB,kBAAoBC,IAAU,CAAC,cAAcC,SAASD,IAD/BF,EAEK,EAAGkB,iBAAkB,CACjDC,OAAQD,GAAc,OACtBE,WAAY,IACZC,QAAS,MACTC,SAAU,QAGRC,EAAqBvB,EAAOwB,EAAPxB,EAAqB,EAAGI,YAAa,CAC5D,6BAA8B,CAC1BO,MAAOP,EAAMQ,QAAQC,KAAKC,SAE9B,+BAAgC,CAC5BH,MAAOP,EAAMQ,QAAQC,KAAKY,eAuBrBC,EAAqB,EAC9BrB,eACAsB,cACAC,iBACAC,YAAW,EACXC,UACAC,QACAC,WACAC,OACAf,aACAgB,YAAW,EACXC,OACAC,SACAC,eACAC,gBACAC,SAAS,GACTC,cAAa,MAEb,MAAMpC,EAAQqC,IACRC,EAAWC,EAAcvC,EAAMwC,YAAYC,KAAK,OAChDC,GAAcV,GAAUM,EAExBK,EAAYpB,GAAeI,EAC3BiB,EAAepB,GAAkBI,EAEvC,OACIiB,EAAAA,KAAClD,EAAkB,CACfM,aAAcyC,EAAazC,EAAe,OAC1C6C,QAASJ,EACTK,QAAM,EACNC,MAAOb,GAAU,eAAeR,IAChCsB,GAAIlB,EACJL,QAASA,EACTD,SAAUA,EACVvB,SAAUkC,EAAUc,SAAA,CAEnBrB,GACGsB,EAAAC,IAACxC,EAAmB,CAAAE,WAAYA,EAAUoC,SACtCC,EAAAA,WAAKE,IAAKxB,EAAMyB,IAAI,OAI3BpB,GAAiBiB,EAAAA,IAACvC,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAACC,IAAAjC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcW,GAAI,CAAEC,GAAI,WAEzE1B,IACGG,GACGkB,MAACM,EAAU,CAAA,aAAa,eAAe9B,IACnCuB,SAAAC,EAAAA,IAACO,EAAAA,mBAAqB,CAAA,QAIxC"}
@@ -1,2 +1,2 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import"react";import{KeyboardArrowRight as o}from"@mui/icons-material";import{styled as i,ListItemIcon as r,ListItemText as n,useTheme as a,useMediaQuery as d,IconButton as c}from"@mui/material";import l from"../ListItemLink/ListItemLink.js";const s=i(l,{shouldForwardProp:t=>!["borderBottom"].includes(t)&&!["disabled"].includes(t)&&!["selected"].includes(t)})((({theme:t,borderBottom:e,selected:o})=>({borderBottom:e??"1px solid #cecece",paddingLeft:t.spacing(4),paddingRight:t.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:t.palette.text.primary,textDecoration:"none",backgroundColor:o?"#eaf2ff":"inherit"}))),m=i(r,{shouldForwardProp:t=>!["iconMargin"].includes(t)})((({iconMargin:t})=>({margin:t||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),p=i(n)((({theme:t})=>({"& .MuiListItemText-primary":{color:t.palette.text.primary},"& .MuiListItemText-secondary":{color:t.palette.text.secondary}}))),u=({borderBottom:i,customTitle:r,customSubtitle:n,disabled:l=!1,onClick:u,title:b,subtitle:f,icon:g,iconMargin:h,hideIcon:x=!1,link:k,isLast:L,customButton:y,iconComponent:M,dataFd:B="",isSelected:C=!1})=>{const I=a(),w=d(I.breakpoints.down("md")),F=!L||w,T=r||b,j=n||f;return t(s,{borderBottom:F?i:"none",divider:F,button:!0,fdKey:B||`link-button-${b}`,to:k,onClick:u,disabled:l,selected:C,children:[g&&e(m,{iconMargin:h,children:e("img",{src:g,alt:""})}),M&&e(m,{iconMargin:h,children:M}),e(p,{primary:T,secondary:j,sx:{pr:"60px"}}),!x&&(y||e(c,{"aria-label":`link-button-${b}`,children:e(o,{})}))]})};export{u as ListItemLinkButton,u as default};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import"react";import{KeyboardArrowRight as i}from"@mui/icons-material";import o from"@mui/material/IconButton";import r from"@mui/material/ListItemIcon";import n from"@mui/material/ListItemText";import a from"@mui/material/styles/useTheme";import m from"@mui/material/useMediaQuery";import d from"@mui/material/styles/styled";import l from"../ListItemLink/ListItemLink.js";const c=d(l,{shouldForwardProp:t=>!["borderBottom"].includes(t)&&!["disabled"].includes(t)&&!["selected"].includes(t)})((({theme:t,borderBottom:e,selected:i})=>({borderBottom:e??"1px solid #cecece",paddingLeft:t.spacing(4),paddingRight:t.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:t.palette.text.primary,textDecoration:"none",backgroundColor:i?"#eaf2ff":"inherit"}))),s=d(r,{shouldForwardProp:t=>!["iconMargin"].includes(t)})((({iconMargin:t})=>({margin:t||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),u=d(n)((({theme:t})=>({"& .MuiListItemText-primary":{color:t.palette.text.primary},"& .MuiListItemText-secondary":{color:t.palette.text.secondary}}))),p=({borderBottom:r,customTitle:n,customSubtitle:d,disabled:l=!1,onClick:p,title:f,subtitle:b,icon:g,iconMargin:h,hideIcon:x=!1,link:y,isLast:k,customButton:L,iconComponent:I,dataFd:M="",isSelected:B=!1})=>{const C=a(),T=m(C.breakpoints.down("md")),w=!k||T,F=n||f,j=d||b;return t(c,{borderBottom:w?r:"none",divider:w,button:!0,fdKey:M||`link-button-${f}`,to:y,onClick:p,disabled:l,selected:B,children:[g&&e(s,{iconMargin:h,children:e("img",{src:g,alt:""})}),I&&e(s,{iconMargin:h,children:I}),e(u,{primary:F,secondary:j,sx:{pr:"60px"}}),!x&&(L||e(o,{"aria-label":`link-button-${f}`,children:e(i,{})}))]})};export{p as ListItemLinkButton,p as default};
2
2
  //# sourceMappingURL=ListItemLinkButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemLinkButton.js","sources":["../../../../src/components/ui/ListItemLinkButton/ListItemLinkButton.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardArrowRight } from '@mui/icons-material';\nimport { IconButton, ListItemIcon, ListItemText, useTheme, useMediaQuery, styled } from '@mui/material';\nimport { ListItemLink } from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","ListItemLink","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"oSAQA,MAAMA,EAAqBC,EAAOC,EAAc,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,SAASD,KAAoB,CAAC,YAAYC,SAASD,KAAoB,CAAC,YAAYC,SAASD,IAF5FH,EAG0C,EAAGK,QAAOC,eAAcC,eAAgB,CACzGD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACPE,gBAAiB,WAErB,UAAW,CACPA,gBAAiB,WAGrBC,MAAOP,EAAMQ,QAAQC,KAAKC,QAC1BC,eAAgB,OAChBL,gBAAiBJ,EAAW,UAAY,cAGtCU,EAAqBjB,EAAOkB,EAAc,CAC5ChB,kBAAoBC,IAAU,CAAC,cAAcC,SAASD,IAD/BH,EAEK,EAAGmB,iBAAkB,CACjDC,OAAQD,GAAc,OACtBE,WAAY,IACZC,QAAS,MACTC,SAAU,QAGRC,EAAqBxB,EAAOyB,EAAPzB,EAAqB,EAAGK,YAAa,CAC5D,6BAA8B,CAC1BO,MAAOP,EAAMQ,QAAQC,KAAKC,SAE9B,+BAAgC,CAC5BH,MAAOP,EAAMQ,QAAQC,KAAKY,eAuBrBC,EAAqB,EAC9BrB,eACAsB,cACAC,iBACAC,YAAW,EACXC,UACAC,QACAC,WACAC,OACAf,aACAgB,YAAW,EACXC,OACAC,SACAC,eACAC,gBACAC,SAAS,GACTC,cAAa,MAEb,MAAMpC,EAAQqC,IACRC,EAAWC,EAAcvC,EAAMwC,YAAYC,KAAK,OAChDC,GAAcV,GAAUM,EAExBK,EAAYpB,GAAeI,EAC3BiB,EAAepB,GAAkBI,EAEvC,OACIiB,EAACnD,EAAkB,CACfO,aAAcyC,EAAazC,EAAe,OAC1C6C,QAASJ,EACTK,QAAM,EACNC,MAAOb,GAAU,eAAeR,IAChCsB,GAAIlB,EACJL,QAASA,EACTD,SAAUA,EACVvB,SAAUkC,EAAUc,SAAA,CAEnBrB,GACGsB,EAACvC,EAAmB,CAAAE,WAAYA,EAAUoC,SACtCC,SAAKC,IAAKvB,EAAMwB,IAAI,OAI3BnB,GAAiBiB,EAACvC,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAAChC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcU,GAAI,CAAEC,GAAI,WAEzEzB,IACGG,GACGkB,EAACK,EAAU,CAAA,aAAa,eAAe7B,IACnCuB,SAAAC,EAACM,EAAqB,CAAA,QAIxC"}
1
+ {"version":3,"file":"ListItemLinkButton.js","sources":["../../../../src/components/ui/ListItemLinkButton/ListItemLinkButton.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardArrowRight } from '@mui/icons-material';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport useTheme from '@mui/material/styles/useTheme';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport styled from '@mui/material/styles/styled';\nimport { ListItemLink } from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","ListItemLink","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"uaAaA,MAAMA,EAAqBC,EAAOC,EAAc,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,SAASD,KAAoB,CAAC,YAAYC,SAASD,KAAoB,CAAC,YAAYC,SAASD,IAF5FH,EAG0C,EAAGK,QAAOC,eAAcC,eAAgB,CACzGD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACPE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C"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/styles"),t=require("@mui/material");const i=r.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"65px",color:e.palette.text.primary,borderBottom:`2px solid ${e.palette.grey[400]}`}))),o=r.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"100%",color:e.palette.text.primary}))),l=198;module.exports=({children:s,loadedFromPortal:n})=>{const a=r.useTheme();if(n)return e.jsx(e.Fragment,{children:s});const x=e.jsx(o,{children:e.jsx(t.Typography,{sx:{fontWeight:"bold"},children:"Sidebar"})});return e.jsxs(t.Box,{sx:{display:"flex"},children:[e.jsx(t.CssBaseline,{}),e.jsx(t.AppBar,{position:"fixed",sx:{width:{sm:"calc(100% - 198px)"},ml:{sm:"198px"},boxShadow:"none"},children:e.jsx(i,{children:e.jsx(t.Typography,{sx:{fontWeight:"bold"},children:"Header"})})}),e.jsx(t.Box,{component:"nav",sx:{width:{sm:l},flexShrink:{sm:0}},"aria-label":"mailbox folders",children:e.jsx(t.Drawer,{variant:"permanent",sx:{display:{xs:"none",sm:"block"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:l,borderColor:a.palette.grey[400],borderWidth:"2px"}},open:!0,children:x})}),e.jsx(t.Box,{component:"main",sx:{flexGrow:1,width:{sm:"calc(100% - 198px)",marginTop:"65px"}},children:s})]})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/styles"),i=require("@mui/material/AppBar"),t=require("@mui/material/Box"),l=require("@mui/material/CssBaseline"),a=require("@mui/material/Drawer"),o=require("@mui/material/Typography");const s=r.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"65px",color:e.palette.text.primary,borderBottom:`2px solid ${e.palette.grey[400]}`}))),n=r.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"100%",color:e.palette.text.primary}))),d=198;module.exports=({children:x,loadedFromPortal:m})=>{const p=r.useTheme();if(m)return e.jsx(e.Fragment,{children:x});const c=e.jsx(n,{children:e.jsx(o,{sx:{fontWeight:"bold"},children:"Sidebar"})});return e.jsxs(t,{sx:{display:"flex"},children:[e.jsx(l,{}),e.jsx(i,{position:"fixed",sx:{width:{sm:"calc(100% - 198px)"},ml:{sm:"198px"},boxShadow:"none"},children:e.jsx(s,{children:e.jsx(o,{sx:{fontWeight:"bold"},children:"Header"})})}),e.jsx(t,{component:"nav",sx:{width:{sm:d},flexShrink:{sm:0}},"aria-label":"mailbox folders",children:e.jsx(a,{variant:"permanent",sx:{display:{xs:"none",sm:"block"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:d,borderColor:p.palette.grey[400],borderWidth:"2px"}},open:!0,children:c})}),e.jsx(t,{component:"main",sx:{flexGrow:1,width:{sm:"calc(100% - 198px)",marginTop:"65px"}},children:x})]})};
2
2
  //# sourceMappingURL=PortalMock.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PortalMock.cjs.js","sources":["../../../../src/components/ui/PortalMock/PortalMock.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\nimport { AppBar, Box, CssBaseline, Drawer, Typography } from '@mui/material';\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.grey[300],\n height: '65px',\n color: theme.palette.text.primary,\n borderBottom: `2px solid ${theme.palette.grey[400]}`,\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.grey[300],\n height: '100%',\n color: theme.palette.text.primary,\n}));\n\ntype Props = {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n};\nconst drawerWidth = 198;\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n const theme = useTheme();\n\n if (loadedFromPortal) {\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <Typography sx={{ fontWeight: 'bold' }}>Sidebar</Typography>\n </StyledSidebar>\n );\n\n return (\n <Box sx={{ display: 'flex' }}>\n <CssBaseline />\n <AppBar\n position=\"fixed\"\n sx={{\n width: { sm: `calc(100% - ${drawerWidth}px)` },\n ml: { sm: `${drawerWidth}px` },\n boxShadow: 'none',\n }}\n >\n <StyledHeader>\n <Typography sx={{ fontWeight: 'bold' }}>Header</Typography>\n </StyledHeader>\n </AppBar>\n <Box component=\"nav\" sx={{ width: { sm: drawerWidth }, flexShrink: { sm: 0 } }} aria-label=\"mailbox folders\">\n <Drawer\n variant=\"permanent\"\n sx={{\n display: { xs: 'none', sm: 'block' },\n '& .MuiDrawer-paper': {\n boxSizing: 'border-box',\n width: drawerWidth,\n borderColor: theme.palette.grey[400],\n borderWidth: '2px',\n },\n }}\n open\n >\n {drawer}\n </Drawer>\n </Box>\n <Box component=\"main\" sx={{ flexGrow: 1, width: { sm: `calc(100% - ${drawerWidth}px)`, marginTop: '65px' } }}>\n {children}\n </Box>\n </Box>\n );\n};\n\nexport default PortalMock;\n"],"names":["StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","grey","height","color","text","primary","borderBottom","StyledSidebar","drawerWidth","children","loadedFromPortal","useTheme","_jsx","jsx","_Fragment","Fragment","drawer","Typography","sx","fontWeight","_jsxs","Box","CssBaseline","AppBar","position","width","sm","ml","boxShadow","component","flexShrink","Drawer","variant","xs","boxSizing","borderColor","borderWidth","open","flexGrow","marginTop"],"mappings":"6GAGA,MAAMA,EAAeC,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAa,CAC/CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,QAC1BC,aAAc,aAAaX,EAAMK,QAAQC,KAAK,WA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9B,SACvGA,MAGX"}
1
+ {"version":3,"file":"PortalMock.cjs.js","sources":["../../../../src/components/ui/PortalMock/PortalMock.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\nimport AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport Drawer from '@mui/material/Drawer';\nimport Typography from '@mui/material/Typography';\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.grey[300],\n height: '65px',\n color: theme.palette.text.primary,\n borderBottom: `2px solid ${theme.palette.grey[400]}`,\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.grey[300],\n height: '100%',\n color: theme.palette.text.primary,\n}));\n\ntype Props = {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n};\nconst drawerWidth = 198;\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n const theme = useTheme();\n\n if (loadedFromPortal) {\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <Typography sx={{ fontWeight: 'bold' }}>Sidebar</Typography>\n </StyledSidebar>\n );\n\n return (\n <Box sx={{ display: 'flex' }}>\n <CssBaseline />\n <AppBar\n position=\"fixed\"\n sx={{\n width: { sm: `calc(100% - ${drawerWidth}px)` },\n ml: { sm: `${drawerWidth}px` },\n boxShadow: 'none',\n }}\n >\n <StyledHeader>\n <Typography sx={{ fontWeight: 'bold' }}>Header</Typography>\n </StyledHeader>\n </AppBar>\n <Box component=\"nav\" sx={{ width: { sm: drawerWidth }, flexShrink: { sm: 0 } }} aria-label=\"mailbox folders\">\n <Drawer\n variant=\"permanent\"\n sx={{\n display: { xs: 'none', sm: 'block' },\n '& .MuiDrawer-paper': {\n boxSizing: 'border-box',\n width: drawerWidth,\n borderColor: theme.palette.grey[400],\n borderWidth: '2px',\n },\n }}\n open\n >\n {drawer}\n </Drawer>\n </Box>\n <Box component=\"main\" sx={{ flexGrow: 1, width: { sm: `calc(100% - ${drawerWidth}px)`, marginTop: '65px' } }}>\n {children}\n </Box>\n </Box>\n );\n};\n\nexport default PortalMock;\n"],"names":["StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","grey","height","color","text","primary","borderBottom","StyledSidebar","drawerWidth","children","loadedFromPortal","useTheme","_jsx","jsx","_Fragment","Fragment","drawer","Typography","sx","fontWeight","_jsxs","Box","CssBaseline","AppBar","position","width","sm","ml","boxShadow","component","flexShrink","Drawer","variant","xs","boxSizing","borderColor","borderWidth","open","flexGrow","marginTop"],"mappings":"kQAOA,MAAMA,EAAeC,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAa,CAC/CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,QAC1BC,aAAc,aAAaX,EAAMK,QAAQC,KAAK,WAG5CM,EAAgBb,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAa,CAChDC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,YAOxBG,EAAc,mBAED,EAAGC,WAAUC,uBAC5B,MAAMf,EAAQgB,EAAAA,WAEd,GAAID,EACA,OAAOE,EAAAC,IAAAC,EAAAC,SAAA,CAAAN,SAAGA,IAGd,MAAMO,EACFJ,EAAAA,IAACL,EAAa,CAAAE,SACVG,MAACK,EAAU,CAACC,GAAI,CAAEC,WAAY,QAA8BV,SAAA,cAIpE,OACIW,EAAAA,KAACC,EAAI,CAAAH,GAAI,CAAEtB,QAAS,QAAQa,SAAA,CACxBG,MAACU,EAAW,CAAA,GACZV,EAAAC,IAACU,EAAM,CACHC,SAAS,QACTN,GAAI,CACAO,MAAO,CAAEC,GAAI,sBACbC,GAAI,CAAED,GAAI,SACVE,UAAW,QAGfnB,SAAAG,EAAAC,IAACpB,EAAY,CAAAgB,SACTG,MAACK,GAAWC,GAAI,CAAEC,WAAY,QAA6BV,SAAA,eAGnEG,MAACS,EAAI,CAAAQ,UAAU,MAAMX,GAAI,CAAEO,MAAO,CAAEC,GAAIlB,GAAesB,WAAY,CAAEJ,GAAI,IAAK,aAAa,kBAAiBjB,SACxGG,EAAAA,IAACmB,EACG,CAAAC,QAAQ,YACRd,GAAI,CACAtB,QAAS,CAAEqC,GAAI,OAAQP,GAAI,SAC3B,qBAAsB,CAClBQ,UAAW,aACXT,MAAOjB,EACP2B,YAAaxC,EAAMK,QAAQC,KAAK,KAChCmC,YAAa,QAGrBC,MAEC,EAAA5B,SAAAO,MAGTJ,MAACS,EAAI,CAAAQ,UAAU,OAAOX,GAAI,CAAEoB,SAAU,EAAGb,MAAO,CAAEC,GAAI,qBAAiCa,UAAW,SAAU9B,SACvGA,MAGX"}
@@ -1,2 +1,2 @@
1
- import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import{styled as o,useTheme as i}from"@mui/material/styles";import{Typography as l,Box as n,CssBaseline as a,AppBar as d,Drawer as m}from"@mui/material";const s=o("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"65px",color:e.palette.text.primary,borderBottom:`2px solid ${e.palette.grey[400]}`}))),p=o("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"100%",color:e.palette.text.primary}))),c=198,x=({children:o,loadedFromPortal:x})=>{const h=i();if(x)return e(r,{children:o});const f=e(p,{children:e(l,{sx:{fontWeight:"bold"},children:"Sidebar"})});return t(n,{sx:{display:"flex"},children:[e(a,{}),e(d,{position:"fixed",sx:{width:{sm:"calc(100% - 198px)"},ml:{sm:"198px"},boxShadow:"none"},children:e(s,{children:e(l,{sx:{fontWeight:"bold"},children:"Header"})})}),e(n,{component:"nav",sx:{width:{sm:c},flexShrink:{sm:0}},"aria-label":"mailbox folders",children:e(m,{variant:"permanent",sx:{display:{xs:"none",sm:"block"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:c,borderColor:h.palette.grey[400],borderWidth:"2px"}},open:!0,children:f})}),e(n,{component:"main",sx:{flexGrow:1,width:{sm:"calc(100% - 198px)",marginTop:"65px"}},children:o})]})};export{x as default};
1
+ import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import{styled as i,useTheme as o}from"@mui/material/styles";import l from"@mui/material/AppBar";import a from"@mui/material/Box";import n from"@mui/material/CssBaseline";import m from"@mui/material/Drawer";import d from"@mui/material/Typography";const p=i("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"65px",color:e.palette.text.primary,borderBottom:`2px solid ${e.palette.grey[400]}`}))),s=i("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"100%",color:e.palette.text.primary}))),c=198,x=({children:i,loadedFromPortal:x})=>{const h=o();if(x)return e(r,{children:i});const f=e(s,{children:e(d,{sx:{fontWeight:"bold"},children:"Sidebar"})});return t(a,{sx:{display:"flex"},children:[e(n,{}),e(l,{position:"fixed",sx:{width:{sm:"calc(100% - 198px)"},ml:{sm:"198px"},boxShadow:"none"},children:e(p,{children:e(d,{sx:{fontWeight:"bold"},children:"Header"})})}),e(a,{component:"nav",sx:{width:{sm:c},flexShrink:{sm:0}},"aria-label":"mailbox folders",children:e(m,{variant:"permanent",sx:{display:{xs:"none",sm:"block"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:c,borderColor:h.palette.grey[400],borderWidth:"2px"}},open:!0,children:f})}),e(a,{component:"main",sx:{flexGrow:1,width:{sm:"calc(100% - 198px)",marginTop:"65px"}},children:i})]})};export{x as default};
2
2
  //# sourceMappingURL=PortalMock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PortalMock.js","sources":["../../../../src/components/ui/PortalMock/PortalMock.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\nimport { AppBar, Box, CssBaseline, Drawer, Typography } from '@mui/material';\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.grey[300],\n height: '65px',\n color: theme.palette.text.primary,\n borderBottom: `2px solid ${theme.palette.grey[400]}`,\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.grey[300],\n height: '100%',\n color: theme.palette.text.primary,\n}));\n\ntype Props = {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n};\nconst drawerWidth = 198;\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n const theme = useTheme();\n\n if (loadedFromPortal) {\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <Typography sx={{ fontWeight: 'bold' }}>Sidebar</Typography>\n </StyledSidebar>\n );\n\n return (\n <Box sx={{ display: 'flex' }}>\n <CssBaseline />\n <AppBar\n position=\"fixed\"\n sx={{\n width: { sm: `calc(100% - ${drawerWidth}px)` },\n ml: { sm: `${drawerWidth}px` },\n boxShadow: 'none',\n }}\n >\n <StyledHeader>\n <Typography sx={{ fontWeight: 'bold' }}>Header</Typography>\n </StyledHeader>\n </AppBar>\n <Box component=\"nav\" sx={{ width: { sm: drawerWidth }, flexShrink: { sm: 0 } }} aria-label=\"mailbox folders\">\n <Drawer\n variant=\"permanent\"\n sx={{\n display: { xs: 'none', sm: 'block' },\n '& .MuiDrawer-paper': {\n boxSizing: 'border-box',\n width: drawerWidth,\n borderColor: theme.palette.grey[400],\n borderWidth: '2px',\n },\n }}\n open\n >\n {drawer}\n </Drawer>\n </Box>\n <Box component=\"main\" sx={{ flexGrow: 1, width: { sm: `calc(100% - ${drawerWidth}px)`, marginTop: '65px' } }}>\n {children}\n </Box>\n </Box>\n );\n};\n\nexport default PortalMock;\n"],"names":["StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","grey","height","color","text","primary","borderBottom","StyledSidebar","drawerWidth","PortalMock","children","loadedFromPortal","useTheme","_jsx","_Fragment","drawer","Typography","sx","fontWeight","_jsxs","Box","CssBaseline","AppBar","position","width","sm","ml","boxShadow","component","flexShrink","Drawer","variant","xs","boxSizing","borderColor","borderWidth","open","flexGrow","marginTop"],"mappings":"yNAGA,MAAMA,EAAeC,EAAO,MAAPA,EAAc,EAAGC,YAAa,CAC/CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,QAC1BC,aAAc,aAAaX,EAAMK,QAAQC,KAAK,WAG5CM,EAAgBb,EAAO,MAAPA,EAAc,EAAGC,YAAa,CAChDC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,YAOxBG,EAAc,IAEdC,EAAa,EAAGC,WAAUC,uBAC5B,MAAMhB,EAAQiB,IAEd,GAAID,EACA,OAAOE,EAAAC,EAAA,CAAAJ,SAAGA,IAGd,MAAMK,EACFF,EAACN,EAAa,CAAAG,SACVG,EAACG,EAAU,CAACC,GAAI,CAAEC,WAAY,QAA8BR,SAAA,cAIpE,OACIS,EAACC,EAAI,CAAAH,GAAI,CAAErB,QAAS,QAAQc,SAAA,CACxBG,EAACQ,EAAW,CAAA,GACZR,EAACS,EAAM,CACHC,SAAS,QACTN,GAAI,CACAO,MAAO,CAAEC,GAAI,sBACbC,GAAI,CAAED,GAAI,SACVE,UAAW,QAGfjB,SAAAG,EAACpB,EAAY,CAAAiB,SACTG,EAACG,GAAWC,GAAI,CAAEC,WAAY,QAA6BR,SAAA,eAGnEG,EAACO,EAAI,CAAAQ,UAAU,MAAMX,GAAI,CAAEO,MAAO,CAAEC,GAAIjB,GAAeqB,WAAY,CAAEJ,GAAI,IAAK,aAAa,kBAAiBf,SACxGG,EAACiB,EACG,CAAAC,QAAQ,YACRd,GAAI,CACArB,QAAS,CAAEoC,GAAI,OAAQP,GAAI,SAC3B,qBAAsB,CAClBQ,UAAW,aACXT,MAAOhB,EACP0B,YAAavC,EAAMK,QAAQC,KAAK,KAChCkC,YAAa,QAGrBC,MAEC,EAAA1B,SAAAK,MAGTF,EAACO,EAAI,CAAAQ,UAAU,OAAOX,GAAI,CAAEoB,SAAU,EAAGb,MAAO,CAAEC,GAAI,qBAAiCa,UAAW,SAAU5B,SACvGA,MAGX"}
1
+ {"version":3,"file":"PortalMock.js","sources":["../../../../src/components/ui/PortalMock/PortalMock.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\nimport AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport Drawer from '@mui/material/Drawer';\nimport Typography from '@mui/material/Typography';\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.grey[300],\n height: '65px',\n color: theme.palette.text.primary,\n borderBottom: `2px solid ${theme.palette.grey[400]}`,\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.grey[300],\n height: '100%',\n color: theme.palette.text.primary,\n}));\n\ntype Props = {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n};\nconst drawerWidth = 198;\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n const theme = useTheme();\n\n if (loadedFromPortal) {\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <Typography sx={{ fontWeight: 'bold' }}>Sidebar</Typography>\n </StyledSidebar>\n );\n\n return (\n <Box sx={{ display: 'flex' }}>\n <CssBaseline />\n <AppBar\n position=\"fixed\"\n sx={{\n width: { sm: `calc(100% - ${drawerWidth}px)` },\n ml: { sm: `${drawerWidth}px` },\n boxShadow: 'none',\n }}\n >\n <StyledHeader>\n <Typography sx={{ fontWeight: 'bold' }}>Header</Typography>\n </StyledHeader>\n </AppBar>\n <Box component=\"nav\" sx={{ width: { sm: drawerWidth }, flexShrink: { sm: 0 } }} aria-label=\"mailbox folders\">\n <Drawer\n variant=\"permanent\"\n sx={{\n display: { xs: 'none', sm: 'block' },\n '& .MuiDrawer-paper': {\n boxSizing: 'border-box',\n width: drawerWidth,\n borderColor: theme.palette.grey[400],\n borderWidth: '2px',\n },\n }}\n open\n >\n {drawer}\n </Drawer>\n </Box>\n <Box component=\"main\" sx={{ flexGrow: 1, width: { sm: `calc(100% - ${drawerWidth}px)`, marginTop: '65px' } }}>\n {children}\n </Box>\n </Box>\n );\n};\n\nexport default PortalMock;\n"],"names":["StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","grey","height","color","text","primary","borderBottom","StyledSidebar","drawerWidth","PortalMock","children","loadedFromPortal","useTheme","_jsx","_Fragment","drawer","Typography","sx","fontWeight","_jsxs","Box","CssBaseline","AppBar","position","width","sm","ml","boxShadow","component","flexShrink","Drawer","variant","xs","boxSizing","borderColor","borderWidth","open","flexGrow","marginTop"],"mappings":"sTAOA,MAAMA,EAAeC,EAAO,MAAPA,EAAc,EAAGC,YAAa,CAC/CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,QAC1BC,aAAc,aAAaX,EAAMK,QAAQC,KAAK,WAG5CM,EAAgBb,EAAO,MAAPA,EAAc,EAAGC,YAAa,CAChDC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,YAOxBG,EAAc,IAEdC,EAAa,EAAGC,WAAUC,uBAC5B,MAAMhB,EAAQiB,IAEd,GAAID,EACA,OAAOE,EAAAC,EAAA,CAAAJ,SAAGA,IAGd,MAAMK,EACFF,EAACN,EAAa,CAAAG,SACVG,EAACG,EAAU,CAACC,GAAI,CAAEC,WAAY,QAA8BR,SAAA,cAIpE,OACIS,EAACC,EAAI,CAAAH,GAAI,CAAErB,QAAS,QAAQc,SAAA,CACxBG,EAACQ,EAAW,CAAA,GACZR,EAACS,EAAM,CACHC,SAAS,QACTN,GAAI,CACAO,MAAO,CAAEC,GAAI,sBACbC,GAAI,CAAED,GAAI,SACVE,UAAW,QAGfjB,SAAAG,EAACpB,EAAY,CAAAiB,SACTG,EAACG,GAAWC,GAAI,CAAEC,WAAY,QAA6BR,SAAA,eAGnEG,EAACO,EAAI,CAAAQ,UAAU,MAAMX,GAAI,CAAEO,MAAO,CAAEC,GAAIjB,GAAeqB,WAAY,CAAEJ,GAAI,IAAK,aAAa,kBAAiBf,SACxGG,EAACiB,EACG,CAAAC,QAAQ,YACRd,GAAI,CACArB,QAAS,CAAEoC,GAAI,OAAQP,GAAI,SAC3B,qBAAsB,CAClBQ,UAAW,aACXT,MAAOhB,EACP0B,YAAavC,EAAMK,QAAQC,KAAK,KAChCkC,YAAa,QAGrBC,MAEC,EAAA1B,SAAAK,MAGTF,EAACO,EAAI,CAAAQ,UAAU,OAAOX,GAAI,CAAEoB,SAAU,EAAGb,MAAO,CAAEC,GAAI,qBAAiCa,UAAW,SAAU5B,SACvGA,MAGX"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),a=require("@mui/material"),r=require("@mui/material/Switch");module.exports=({label:l,checked:t,onChange:i,labelPlacement:m="start",size:s="medium",disabled:c=!1,testId:d})=>e.jsx(a.FormControlLabel,{label:l,labelPlacement:m,control:e.jsx(r,{checked:t,onChange:i,color:"primary",size:s,disabled:c,"data-fd":d})});
1
+ "use strict";var e=require("react/jsx-runtime"),a=require("@mui/material/FormControlLabel"),r=require("@mui/material/Switch");module.exports=({label:l,checked:t,onChange:i,labelPlacement:m="start",size:s="medium",disabled:c=!1,testId:d})=>e.jsx(a,{label:l,labelPlacement:m,control:e.jsx(r,{checked:t,onChange:i,color:"primary",size:s,disabled:c,"data-fd":d})});
2
2
  //# sourceMappingURL=Switch.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.cjs.js","sources":["../../../../src/components/ui/Switch/Switch.tsx"],"sourcesContent":["import { FormControlLabel, type FormControlLabelProps } from '@mui/material';\nimport MuiSwitch, { type SwitchProps as MuiSwitchProps } from '@mui/material/Switch';\n\nexport type SwitchProps = {\n label: string;\n labelPlacement?: FormControlLabelProps['labelPlacement'];\n checked?: boolean;\n onChange?: MuiSwitchProps['onChange'];\n size?: MuiSwitchProps['size'];\n disabled?: boolean;\n testId?: string;\n};\n\nconst Switch = ({ label, checked, onChange, labelPlacement = 'start', size = 'medium', disabled = false, testId = undefined }: SwitchProps) => {\n return (\n <FormControlLabel\n label={label}\n labelPlacement={labelPlacement}\n control={<MuiSwitch checked={checked} onChange={onChange} color=\"primary\" size={size} disabled={disabled} data-fd={testId} />}\n />\n );\n};\n\nexport default Switch;\n"],"names":["label","checked","onChange","labelPlacement","size","disabled","testId","_jsx","FormControlLabel","control","MuiSwitch","color"],"mappings":"4HAae,EAAGA,QAAOC,UAASC,WAAUC,iBAAiB,QAASC,OAAO,SAAUC,YAAW,EAAOC,YAEjGC,MAACC,EAAAA,kBACGR,MAAOA,EACPG,eAAgBA,EAChBM,QAASF,EAAAA,IAACG,EAAS,CAACT,QAASA,EAASC,SAAUA,EAAUS,MAAM,UAAUP,KAAMA,EAAMC,SAAUA,EAAQ,UAAWC"}
1
+ {"version":3,"file":"Switch.cjs.js","sources":["../../../../src/components/ui/Switch/Switch.tsx"],"sourcesContent":["import FormControlLabel, { type FormControlLabelProps } from '@mui/material/FormControlLabel';\nimport MuiSwitch, { type SwitchProps as MuiSwitchProps } from '@mui/material/Switch';\n\nexport type SwitchProps = {\n label: string;\n labelPlacement?: FormControlLabelProps['labelPlacement'];\n checked?: boolean;\n onChange?: MuiSwitchProps['onChange'];\n size?: MuiSwitchProps['size'];\n disabled?: boolean;\n testId?: string;\n};\n\nconst Switch = ({ label, checked, onChange, labelPlacement = 'start', size = 'medium', disabled = false, testId = undefined }: SwitchProps) => {\n return (\n <FormControlLabel\n label={label}\n labelPlacement={labelPlacement}\n control={<MuiSwitch checked={checked} onChange={onChange} color=\"primary\" size={size} disabled={disabled} data-fd={testId} />}\n />\n );\n};\n\nexport default Switch;\n"],"names":["label","checked","onChange","labelPlacement","size","disabled","testId","_jsx","FormControlLabel","control","MuiSwitch","color"],"mappings":"6IAae,EAAGA,QAAOC,UAASC,WAAUC,iBAAiB,QAASC,OAAO,SAAUC,YAAW,EAAOC,YAEjGC,MAACC,GACGR,MAAOA,EACPG,eAAgBA,EAChBM,QAASF,EAAAA,IAACG,EAAS,CAACT,QAASA,EAASC,SAAUA,EAAUS,MAAM,UAAUP,KAAMA,EAAMC,SAAUA,EAAQ,UAAWC"}
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { FormControlLabelProps } from '@mui/material';
2
+ import { FormControlLabelProps } from '@mui/material/FormControlLabel';
3
3
  import { SwitchProps as SwitchProps$1 } from '@mui/material/Switch';
4
4
 
5
5
  type SwitchProps = {
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import{FormControlLabel as a}from"@mui/material";import t from"@mui/material/Switch";const l=({label:l,checked:m,onChange:r,labelPlacement:i="start",size:o="medium",disabled:c=!1,testId:d})=>e(a,{label:l,labelPlacement:i,control:e(t,{checked:m,onChange:r,color:"primary",size:o,disabled:c,"data-fd":d})});export{l as default};
1
+ import{jsx as e}from"react/jsx-runtime";import a from"@mui/material/FormControlLabel";import t from"@mui/material/Switch";const l=({label:l,checked:r,onChange:m,labelPlacement:o="start",size:i="medium",disabled:c=!1,testId:d})=>e(a,{label:l,labelPlacement:o,control:e(t,{checked:r,onChange:m,color:"primary",size:i,disabled:c,"data-fd":d})});export{l as default};
2
2
  //# sourceMappingURL=Switch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.js","sources":["../../../../src/components/ui/Switch/Switch.tsx"],"sourcesContent":["import { FormControlLabel, type FormControlLabelProps } from '@mui/material';\nimport MuiSwitch, { type SwitchProps as MuiSwitchProps } from '@mui/material/Switch';\n\nexport type SwitchProps = {\n label: string;\n labelPlacement?: FormControlLabelProps['labelPlacement'];\n checked?: boolean;\n onChange?: MuiSwitchProps['onChange'];\n size?: MuiSwitchProps['size'];\n disabled?: boolean;\n testId?: string;\n};\n\nconst Switch = ({ label, checked, onChange, labelPlacement = 'start', size = 'medium', disabled = false, testId = undefined }: SwitchProps) => {\n return (\n <FormControlLabel\n label={label}\n labelPlacement={labelPlacement}\n control={<MuiSwitch checked={checked} onChange={onChange} color=\"primary\" size={size} disabled={disabled} data-fd={testId} />}\n />\n );\n};\n\nexport default Switch;\n"],"names":["Switch","label","checked","onChange","labelPlacement","size","disabled","testId","_jsx","FormControlLabel","control","MuiSwitch","color"],"mappings":"6HAaM,MAAAA,EAAS,EAAGC,QAAOC,UAASC,WAAUC,iBAAiB,QAASC,OAAO,SAAUC,YAAW,EAAOC,YAEjGC,EAACC,GACGR,MAAOA,EACPG,eAAgBA,EAChBM,QAASF,EAACG,EAAS,CAACT,QAASA,EAASC,SAAUA,EAAUS,MAAM,UAAUP,KAAMA,EAAMC,SAAUA,EAAQ,UAAWC"}
1
+ {"version":3,"file":"Switch.js","sources":["../../../../src/components/ui/Switch/Switch.tsx"],"sourcesContent":["import FormControlLabel, { type FormControlLabelProps } from '@mui/material/FormControlLabel';\nimport MuiSwitch, { type SwitchProps as MuiSwitchProps } from '@mui/material/Switch';\n\nexport type SwitchProps = {\n label: string;\n labelPlacement?: FormControlLabelProps['labelPlacement'];\n checked?: boolean;\n onChange?: MuiSwitchProps['onChange'];\n size?: MuiSwitchProps['size'];\n disabled?: boolean;\n testId?: string;\n};\n\nconst Switch = ({ label, checked, onChange, labelPlacement = 'start', size = 'medium', disabled = false, testId = undefined }: SwitchProps) => {\n return (\n <FormControlLabel\n label={label}\n labelPlacement={labelPlacement}\n control={<MuiSwitch checked={checked} onChange={onChange} color=\"primary\" size={size} disabled={disabled} data-fd={testId} />}\n />\n );\n};\n\nexport default Switch;\n"],"names":["Switch","label","checked","onChange","labelPlacement","size","disabled","testId","_jsx","FormControlLabel","control","MuiSwitch","color"],"mappings":"0HAaM,MAAAA,EAAS,EAAGC,QAAOC,UAASC,WAAUC,iBAAiB,QAASC,OAAO,SAAUC,YAAW,EAAOC,YAEjGC,EAACC,GACGR,MAAOA,EACPG,eAAgBA,EAChBM,QAASF,EAACG,EAAS,CAACT,QAASA,EAASC,SAAUA,EAAUS,MAAM,UAAUP,KAAMA,EAAMC,SAAUA,EAAQ,UAAWC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/portal-library",
3
- "version": "1.0.67",
3
+ "version": "1.0.68",
4
4
  "files": [
5
5
  "dist"
6
6
  ],