@flipdish/portal-library 6.0.2 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/Badge/index.cjs.js +1 -1
- package/dist/components/atoms/Badge/index.cjs.js.map +1 -1
- package/dist/components/atoms/Badge/index.d.ts +8 -6
- package/dist/components/atoms/Badge/index.js +1 -1
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/Card/index.cjs.js +1 -1
- package/dist/components/atoms/Card/index.cjs.js.map +1 -1
- package/dist/components/atoms/Card/index.js +1 -1
- package/dist/components/atoms/Card/index.js.map +1 -1
- package/dist/components/atoms/Checkbox/index.cjs.js +1 -1
- package/dist/components/atoms/Checkbox/index.cjs.js.map +1 -1
- package/dist/components/atoms/Checkbox/index.d.ts +1 -1
- package/dist/components/atoms/Checkbox/index.js +1 -1
- package/dist/components/atoms/Checkbox/index.js.map +1 -1
- package/dist/components/atoms/MenuItem/index.cjs.js +1 -1
- package/dist/components/atoms/MenuItem/index.cjs.js.map +1 -1
- package/dist/components/atoms/MenuItem/index.js +1 -1
- package/dist/components/atoms/MenuItem/index.js.map +1 -1
- package/dist/components/atoms/Select/index.cjs.js +1 -1
- package/dist/components/atoms/Select/index.cjs.js.map +1 -1
- package/dist/components/atoms/Select/index.js +1 -1
- package/dist/components/atoms/Select/index.js.map +1 -1
- package/dist/components/atoms/Switch/index.cjs.js +2 -0
- package/dist/components/atoms/Switch/index.cjs.js.map +1 -0
- package/dist/components/atoms/Switch/index.d.ts +24 -0
- package/dist/components/atoms/Switch/index.js +2 -0
- package/dist/components/atoms/Switch/index.js.map +1 -0
- package/dist/components/atoms/TextField/index.cjs.js +1 -1
- package/dist/components/atoms/TextField/index.cjs.js.map +1 -1
- package/dist/components/atoms/TextField/index.js +1 -1
- package/dist/components/atoms/TextField/index.js.map +1 -1
- package/dist/components/molecules/Autocomplete/hooks/useDynamicLimitTags.cjs.js +2 -0
- package/dist/components/molecules/Autocomplete/hooks/useDynamicLimitTags.cjs.js.map +1 -0
- package/dist/components/molecules/Autocomplete/hooks/useDynamicLimitTags.d.ts +14 -0
- package/dist/components/molecules/Autocomplete/hooks/useDynamicLimitTags.js +2 -0
- package/dist/components/molecules/Autocomplete/hooks/useDynamicLimitTags.js.map +1 -0
- package/dist/components/molecules/Autocomplete/index.cjs.js +1 -1
- package/dist/components/molecules/Autocomplete/index.cjs.js.map +1 -1
- package/dist/components/molecules/Autocomplete/index.d.ts +55 -2
- package/dist/components/molecules/Autocomplete/index.js +1 -1
- package/dist/components/molecules/Autocomplete/index.js.map +1 -1
- package/dist/components/molecules/CheckboxGroup/index.cjs.js +1 -1
- package/dist/components/molecules/CheckboxGroup/index.cjs.js.map +1 -1
- package/dist/components/molecules/CheckboxGroup/index.d.ts +1 -1
- package/dist/components/molecules/CheckboxGroup/index.js +1 -1
- package/dist/components/molecules/CheckboxGroup/index.js.map +1 -1
- package/dist/themes/flipdishPublicTheme.cjs.js +1 -1
- package/dist/themes/flipdishPublicTheme.cjs.js.map +1 -1
- package/dist/themes/flipdishPublicTheme.js +1 -1
- package/dist/themes/flipdishPublicTheme.js.map +1 -1
- package/dist/themes/overrides/autocompleteOverrides.cjs.js +2 -0
- package/dist/themes/overrides/autocompleteOverrides.cjs.js.map +1 -0
- package/dist/themes/overrides/autocompleteOverrides.d.ts +5 -0
- package/dist/themes/overrides/autocompleteOverrides.js +2 -0
- package/dist/themes/overrides/autocompleteOverrides.js.map +1 -0
- package/dist/themes/overrides/inputBaseOverrides.cjs.js +1 -1
- package/dist/themes/overrides/inputBaseOverrides.cjs.js.map +1 -1
- package/dist/themes/overrides/inputBaseOverrides.js +1 -1
- package/dist/themes/overrides/inputBaseOverrides.js.map +1 -1
- package/dist/themes/overrides/menuItemOverrides.cjs.js +1 -1
- package/dist/themes/overrides/menuItemOverrides.cjs.js.map +1 -1
- package/dist/themes/overrides/menuItemOverrides.js +1 -1
- package/dist/themes/overrides/menuItemOverrides.js.map +1 -1
- package/dist/themes/overrides/menuOverrides.cjs.js +1 -1
- package/dist/themes/overrides/menuOverrides.cjs.js.map +1 -1
- package/dist/themes/overrides/menuOverrides.js +1 -1
- package/dist/themes/overrides/menuOverrides.js.map +1 -1
- package/dist/themes/overrides/selectOverrides.cjs.js +1 -1
- package/dist/themes/overrides/selectOverrides.cjs.js.map +1 -1
- package/dist/themes/overrides/selectOverrides.js +1 -1
- package/dist/themes/overrides/selectOverrides.js.map +1 -1
- package/dist/utilities/stringUtilities.cjs.js +2 -0
- package/dist/utilities/stringUtilities.cjs.js.map +1 -0
- package/dist/utilities/stringUtilities.d.ts +7 -0
- package/dist/utilities/stringUtilities.js +2 -0
- package/dist/utilities/stringUtilities.js.map +1 -0
- package/package.json +1 -1
- package/dist/components/Switch/index.cjs.js +0 -2
- package/dist/components/Switch/index.cjs.js.map +0 -1
- package/dist/components/Switch/index.d.ts +0 -17
- package/dist/components/Switch/index.js +0 -2
- package/dist/components/Switch/index.js.map +0 -1
|
@@ -1,2 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { AutocompleteProps as AutocompleteProps$1 } from '@mui/material/Autocomplete';
|
|
2
|
+
import { TextFieldProps } from '../../atoms/TextField/index.js';
|
|
3
|
+
|
|
4
|
+
type MuiCustomAutocompleteProps<M extends boolean = boolean, // Multiple
|
|
5
|
+
DC extends boolean = boolean, // DisableClearable
|
|
6
|
+
FS extends boolean = boolean> = AutocompleteProps$1<AutocompleteOption, M, DC, FS>;
|
|
7
|
+
/**
|
|
8
|
+
* Represents an option in the Autocomplete dropdown.
|
|
9
|
+
*/
|
|
10
|
+
interface AutocompleteOption {
|
|
11
|
+
label: string;
|
|
12
|
+
value: number | string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Props for the Autocomplete component.
|
|
16
|
+
* Supports both single and multiple selection modes with optional search functionality.
|
|
17
|
+
*/
|
|
18
|
+
interface AutocompleteProps extends Omit<TextFieldProps, 'endAdornment' | 'multiline' | 'onChange' | 'options' | 'startAdornment'> {
|
|
19
|
+
/** Shows a loading indicator inside the input (e.g., while fetching). */
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
/** Enables selection of multiple options and shows checkboxes and tags for selected values. */
|
|
22
|
+
multiple?: MuiCustomAutocompleteProps['multiple'];
|
|
23
|
+
/** Called when the selected value(s) change. */
|
|
24
|
+
onChange: MuiCustomAutocompleteProps['onChange'];
|
|
25
|
+
/** Called when the input text changes (typing or programmatic updates). */
|
|
26
|
+
onInputChange?: MuiCustomAutocompleteProps['onInputChange'];
|
|
27
|
+
/** Options to display in the dropdown list. */
|
|
28
|
+
options: AutocompleteOption[];
|
|
29
|
+
/** UI and accessibility labels used by the component. */
|
|
30
|
+
translations: {
|
|
31
|
+
/** Aria-label for the clear button. */
|
|
32
|
+
clearTextAriaLabel: string;
|
|
33
|
+
/** Text shown while loading options. */
|
|
34
|
+
loadingText: string;
|
|
35
|
+
/** Text shown when there are no options to display. */
|
|
36
|
+
noOptionsText: string;
|
|
37
|
+
/** Aria-label for the popup indicator button. */
|
|
38
|
+
openPopupAriaLabel: string;
|
|
39
|
+
};
|
|
40
|
+
/** Visual behavior: 'search' shows a leading search icon; 'combobox' shows a popup button. */
|
|
41
|
+
type?: 'combobox' | 'search';
|
|
42
|
+
/** Controlled value (single option, array for multiple, or null). */
|
|
43
|
+
value: MuiCustomAutocompleteProps['value'];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A customizable Autocomplete component supporting search and combobox modes.
|
|
47
|
+
* Supports single and multiple selection with dynamic tag rendering and optional loading states.
|
|
48
|
+
*
|
|
49
|
+
* @param props - The component props
|
|
50
|
+
* @returns The rendered Autocomplete component
|
|
51
|
+
*/
|
|
52
|
+
declare const Autocomplete: ({ disabled, errorText, fdKey, fullWidth, helperText, label, loading, multiple, placeholder, onChange, onInputChange, options, required, translations, type, value, }: AutocompleteProps) => JSX.Element;
|
|
53
|
+
|
|
54
|
+
export { Autocomplete, Autocomplete as default };
|
|
55
|
+
export type { AutocompleteOption, AutocompleteProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{useState as e,useEffect as t,createElement as i}from"react";import{jsx as n,jsxs as l,Fragment as o}from"react/jsx-runtime";import r from"@mui/material/Autocomplete";import a from"@mui/material/Box";import{styled as s}from"@mui/material/styles";import d from"@mui/material/Tooltip";import p from"../../../icons/ArrowDown01/index.js";import m from"../../../icons/ArrowUp01/index.js";import c from"../../../icons/Cancel/index.js";import u from"../../../icons/Search/index.js";import{truncateWithEllipsis as g}from"../../../utilities/stringUtilities.js";import{Badge as h}from"../../atoms/Badge/index.js";import{CircularProgress as f}from"../../atoms/CircularProgress/index.js";import{MenuItem as x}from"../../atoms/MenuItem/index.js";import{TextField as b}from"../../atoms/TextField/index.js";import{useDynamicLimitTags as y}from"./hooks/useDynamicLimitTags.js";const T=s(r,{shouldForwardProp:e=>"fullWidth"!==e})((({fullWidth:e=!1})=>({width:e?"100%":"min(364px, 100%)"}))),C=s(a,{shouldForwardProp:e=>!["clickable","disabled","placement"].includes(e)})((({theme:e,clickable:t=!1,disabled:i=!1,placement:n})=>({alignItems:"center",cursor:t?i?"not-allowed":"pointer":"default",display:"flex",justifyContent:"center",padding:0,pointerEvents:t?"auto":"none",..."start"===n&&{paddingRight:e.spacing(1)},..."middle"===n&&{padding:e.spacing(0,1)},"& svg":{color:i?e.palette.semantic.icon["icon-disabled"]:e.palette.semantic.icon["icon-strong"]}}))),I=s(a,{shouldForwardProp:e=>"placement"!==e})((({theme:e,placement:t})=>({alignItems:"center",display:"flex",justifyContent:"center",padding:0,..."start"===t&&{paddingRight:e.spacing(1)},..."middle"===t&&{padding:e.spacing(0,1)}}))),P=({disabled:r=!1,errorText:a,fdKey:s,fullWidth:P=!1,helperText:k,label:j,loading:A=!1,multiple:v=!1,placeholder:w,onChange:O,onInputChange:W,options:D=[],required:L=!1,translations:S,type:F="search",value:q})=>{const[z,E]=e(!1),K="search"===F,R="combobox"===F,{rootRef:B,limitTags:M}=y({chipMax:130,gap:4,horizontalPadding:32,reservedPx:K?120:90});t((()=>{r&&E(!1)}),[r]);const U=e=>{r||E(void 0===e?e=>!e:e)};return n(T,{ref:B,clearIcon:n(c,{size:"md"}),clearText:S.clearTextAriaLabel,disableClearable:r||A,disableCloseOnSelect:v,disabled:r,filterOptions:K?e=>e:void 0,forcePopupIcon:R,freeSolo:K,fullWidth:P,getOptionKey:e=>"string"==typeof e?e:String(e.value),getOptionLabel:e=>"string"==typeof e?e:e.label,isOptionEqualToValue:(e,t)=>null!=t&&("string"==typeof t?e.label===t||String(e.value)===t:e.value===t.value),limitTags:M,loading:A,loadingText:S.loadingText,multiple:v,noOptionsText:S.noOptionsText,onChange:(e,t,i,n)=>{O&&O(e,t,i,n)},onClose:()=>U(!1),onInputChange:(e,t,i)=>{W&&W(e,t,i)},onOpen:()=>U(!0),open:z,openText:S.openPopupAriaLabel,options:D,popupIcon:K?null:n(C,{clickable:!0,disabled:r,placement:"end",children:n(z?m:p,{})}),renderInput:e=>n(b,{disabled:r,errorText:a,fdKey:s,fullWidth:P,helperText:k,label:j,placeholder:w,required:L,slotProps:{input:{...e.InputProps,endAdornment:l(o,{children:[A?n(I,{placement:K?"end":"middle",children:n(f,{size:"small"})}):null,e.InputProps.endAdornment]}),startAdornment:l(o,{children:[K?n(C,{disabled:r,placement:"start",children:n(u,{"aria-hidden":"true"})}):null,e.InputProps.startAdornment]})},htmlInput:{...e.inputProps}}}),renderOption:(e,t,n)=>{const{key:l,onClick:o,...r}=e;return i(x,v?{...r,key:l,checked:n.selected,label:t.label,onCheckedChange:(e,t)=>{o?.(t)},type:"checkbox"}:{...r,key:l,label:t.label,onClick:o,selected:n.selected,type:"text"})},renderTags:(e,t)=>e.map(((e,i)=>{const{key:l,onDelete:o,...r}=t({index:i}),a="string"==typeof e?e:e.label,s=g(a,13,{includeEllipsisInLimit:!0}),p=s.endsWith("..."),m=l??`tag-${"string"==typeof e?e:e.value}`;return p?n(d,{arrow:!0,placement:"top",title:a,children:n("span",{...r,children:n(h,{label:s,onDismiss:o})})},m):n("span",{...r,children:n(h,{label:s,onDismiss:o})},m)})),slotProps:{popupIndicator:{onClick:e=>{r||(e.stopPropagation(),U())}}},value:v?Array.isArray(q)?q:null==q?[]:[q]:Array.isArray(q)?q.length>0?q[0]:null:q??null})};export{P as Autocomplete,P as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/Autocomplete/index.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport MuiAutocomplete, {\n type AutocompleteChangeDetails,\n type AutocompleteChangeReason,\n type AutocompleteInputChangeReason,\n type AutocompleteProps as MuiAutocompleteProps,\n type AutocompleteRenderGetTagProps,\n type AutocompleteRenderInputParams,\n type AutocompleteRenderOptionState,\n type AutocompleteValue,\n} from '@mui/material/Autocomplete';\nimport Box from '@mui/material/Box';\nimport { styled } from '@mui/material/styles';\n// TODO: Replace with our own Tooltip component\nimport MuiTooltip from '@mui/material/Tooltip';\n\nimport ArrowDown01Icon from '@fd/icons/ArrowDown01';\nimport ArrowUp01Icon from '@fd/icons/ArrowUp01';\nimport CancelIcon from '@fd/icons/Cancel';\nimport SearchIcon from '@fd/icons/Search';\nimport { truncateWithEllipsis } from '@fd/utilities/stringUtilities';\n\n// TODO: Replace with our own Tag component\nimport Badge from '../../atoms/Badge';\nimport CircularProgress from '../../atoms/CircularProgress';\nimport MenuItem from '../../atoms/MenuItem';\nimport TextField, { type TextFieldProps } from '../../atoms/TextField';\nimport { useDynamicLimitTags } from './hooks/useDynamicLimitTags';\n\n// Bind flags to MuiAutocomplete\ntype MuiCustomAutocompleteProps<\n M extends boolean = boolean, // Multiple\n DC extends boolean = boolean, // DisableClearable\n FS extends boolean = boolean, // FreeSolo\n> = MuiAutocompleteProps<AutocompleteOption, M, DC, FS>;\n\n/**\n * Represents an option in the Autocomplete dropdown.\n */\nexport interface AutocompleteOption {\n label: string;\n value: number | string;\n}\n\n/**\n * Props for the Autocomplete component.\n * Supports both single and multiple selection modes with optional search functionality.\n */\nexport interface AutocompleteProps\n extends Omit<TextFieldProps, 'endAdornment' | 'multiline' | 'onChange' | 'options' | 'startAdornment'> {\n /** Shows a loading indicator inside the input (e.g., while fetching). */\n loading?: boolean;\n /** Enables selection of multiple options and shows checkboxes and tags for selected values. */\n multiple?: MuiCustomAutocompleteProps['multiple'];\n /** Called when the selected value(s) change. */\n onChange: MuiCustomAutocompleteProps['onChange'];\n /** Called when the input text changes (typing or programmatic updates). */\n onInputChange?: MuiCustomAutocompleteProps['onInputChange'];\n /** Options to display in the dropdown list. */\n options: AutocompleteOption[];\n /** UI and accessibility labels used by the component. */\n translations: {\n /** Aria-label for the clear button. */\n clearTextAriaLabel: string;\n /** Text shown while loading options. */\n loadingText: string;\n /** Text shown when there are no options to display. */\n noOptionsText: string;\n /** Aria-label for the popup indicator button. */\n openPopupAriaLabel: string;\n };\n /** Visual behavior: 'search' shows a leading search icon; 'combobox' shows a popup button. */\n type?: 'combobox' | 'search';\n /** Controlled value (single option, array for multiple, or null). */\n value: MuiCustomAutocompleteProps['value'];\n}\n\n// Bind flags to MuiAutocomplete, see MuiCustomAutocompleteProps for more details\nconst MuiCustomAutocomplete = MuiAutocomplete<AutocompleteOption, boolean, boolean, boolean>;\nconst StyledAutocomplete = styled(MuiCustomAutocomplete, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ fullWidth = false }) => ({\n width: fullWidth ? '100%' : 'min(364px, 100%)',\n}));\n\nconst StyledAdornment = styled(Box, {\n shouldForwardProp: (prop) => !['clickable', 'disabled', 'placement'].includes(prop as string),\n})<{ clickable?: boolean; error?: boolean; disabled?: boolean; placement: 'end' | 'middle' | 'start' }>(\n ({ theme, clickable = false, disabled = false, placement }) => ({\n alignItems: 'center',\n cursor: clickable ? (disabled ? 'not-allowed' : 'pointer') : 'default',\n display: 'flex',\n justifyContent: 'center',\n padding: 0,\n pointerEvents: clickable ? 'auto' : 'none',\n\n ...(placement === 'start' && { paddingRight: theme.spacing(1) }),\n ...(placement === 'middle' && { padding: theme.spacing(0, 1) }),\n\n '& svg': {\n color: disabled\n ? theme.palette.semantic.icon['icon-disabled']\n : theme.palette.semantic.icon['icon-strong'],\n },\n }),\n);\n\nconst StyledLoadingSpinnerContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'placement',\n})<{ placement?: 'end' | 'middle' | 'start' }>(({ theme, placement }) => ({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'center',\n padding: 0,\n\n ...(placement === 'start' && { paddingRight: theme.spacing(1) }),\n ...(placement === 'middle' && { padding: theme.spacing(0, 1) }),\n}));\n\n/**\n * A customizable Autocomplete component supporting search and combobox modes.\n * Supports single and multiple selection with dynamic tag rendering and optional loading states.\n *\n * @param props - The component props\n * @returns The rendered Autocomplete component\n */\nexport const Autocomplete = ({\n disabled = false,\n errorText,\n fdKey,\n fullWidth = false,\n helperText,\n label,\n loading = false,\n multiple = false,\n placeholder,\n onChange,\n onInputChange,\n options = [],\n required = false,\n translations,\n type = 'search',\n value,\n}: AutocompleteProps): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n\n const isSearch = type === 'search';\n const isCombobox = type === 'combobox';\n\n const { rootRef, limitTags } = useDynamicLimitTags({\n chipMax: 130,\n gap: 4,\n horizontalPadding: 32,\n reservedPx: isSearch ? 120 : 90,\n });\n\n // Close the dropdown (if open) when the component is dynamically disabled\n useEffect(() => {\n if (disabled) {\n setIsOpen(false);\n }\n }, [disabled]);\n\n /**\n * Toggles or sets the dropdown open state.\n * Does nothing when the component is disabled.\n *\n * @param open - Optional boolean to explicitly set open state; if undefined, toggles current state\n */\n const toggleOpen = (open?: boolean): void => {\n if (disabled) {\n return;\n }\n\n if (open !== undefined) {\n setIsOpen(open);\n return;\n }\n\n setIsOpen((prevOpen) => !prevOpen);\n };\n\n const renderSearchIcon = (): JSX.Element => {\n return (\n <StyledAdornment disabled={disabled} placement=\"start\">\n <SearchIcon aria-hidden=\"true\" />\n </StyledAdornment>\n );\n };\n\n const renderPopupIcon = (): JSX.Element => {\n return (\n <StyledAdornment clickable disabled={disabled} placement=\"end\">\n {isOpen ? <ArrowUp01Icon /> : <ArrowDown01Icon />}\n </StyledAdornment>\n );\n };\n\n const renderLoadingSpinner = (): JSX.Element => {\n return (\n <StyledLoadingSpinnerContainer placement={isSearch ? 'end' : 'middle'}>\n <CircularProgress size=\"small\" />\n </StyledLoadingSpinnerContainer>\n );\n };\n\n const renderInputField = (params: AutocompleteRenderInputParams): JSX.Element => (\n <TextField\n disabled={disabled}\n errorText={errorText}\n fdKey={fdKey}\n fullWidth={fullWidth}\n helperText={helperText}\n label={label}\n placeholder={placeholder}\n required={required}\n slotProps={{\n input: {\n ...params.InputProps,\n endAdornment: (\n <>\n {loading ? renderLoadingSpinner() : null}\n {params.InputProps.endAdornment}\n </>\n ),\n startAdornment: (\n <>\n {isSearch ? renderSearchIcon() : null}\n {params.InputProps.startAdornment}\n </>\n ),\n },\n htmlInput: {\n ...params.inputProps,\n },\n }}\n />\n );\n\n const renderMenuOption = (\n optionProps: React.HTMLAttributes<HTMLLIElement> & { key: React.Key },\n option: AutocompleteOption,\n state: AutocompleteRenderOptionState,\n ): JSX.Element => {\n const { key, onClick, ...rest } = optionProps;\n\n if (multiple) {\n return (\n <MenuItem\n {...rest}\n key={key}\n checked={state.selected}\n label={option.label}\n onCheckedChange={(_checked, e) => {\n onClick?.(e as React.MouseEvent<HTMLLIElement, MouseEvent>);\n }}\n type=\"checkbox\"\n />\n );\n }\n\n return (\n <MenuItem\n {...rest}\n key={key}\n label={option.label}\n onClick={onClick}\n selected={state.selected}\n type=\"text\"\n />\n );\n };\n\n const renderSelectedTags = (\n selected: AutocompleteOption[],\n getTagProps: AutocompleteRenderGetTagProps,\n ): React.ReactNode =>\n selected.map((tag, index) => {\n const { key, onDelete, ...tagProps } = getTagProps({ index });\n const rawLabel = typeof tag === 'string' ? tag : tag.label;\n const label = truncateWithEllipsis(rawLabel, 13, { includeEllipsisInLimit: true });\n const isTruncated = label.endsWith('...');\n const tagKey = key ?? `tag-${typeof tag === 'string' ? tag : tag.value}`;\n\n if (isTruncated) {\n return (\n <MuiTooltip key={tagKey} arrow placement=\"top\" title={rawLabel}>\n <span {...tagProps}>\n <Badge label={label} onDismiss={onDelete} />\n </span>\n </MuiTooltip>\n );\n }\n\n return (\n <span key={tagKey} {...tagProps}>\n <Badge label={label} onDismiss={onDelete} />\n </span>\n );\n });\n\n const handlePopupIndicatorClick = (event: React.MouseEvent): void => {\n if (disabled) {\n return;\n }\n\n event.stopPropagation();\n toggleOpen();\n };\n\n const handleChange = (\n event: React.SyntheticEvent,\n value: AutocompleteValue<AutocompleteOption, boolean, boolean, boolean>,\n reason: AutocompleteChangeReason,\n details?: AutocompleteChangeDetails<AutocompleteOption>,\n ): void => {\n if (!onChange) {\n return;\n }\n onChange(event, value, reason, details);\n };\n\n const handleInputChange = (\n event: React.SyntheticEvent,\n value: string,\n reason: AutocompleteInputChangeReason,\n ): void => {\n if (!onInputChange) {\n return;\n }\n onInputChange(event, value, reason);\n };\n\n /**\n * Returns all options without filtering for search mode.\n * Disables MUI's built-in client-side filtering when type is 'search'.\n */\n const disableClientFilter = (opts: AutocompleteOption[]): AutocompleteOption[] => opts;\n\n /**\n * Extracts the display label from an option.\n * Supports both object options and freeSolo string values.\n */\n const getOptionLabel = (option: AutocompleteOption | string): string => {\n return typeof option === 'string' ? option : option.label;\n };\n\n /**\n * Provides a stable unique key for each option to optimize DOM reconciliation.\n */\n const getOptionKey = (option: AutocompleteOption | string): string => {\n return typeof option === 'string' ? option : String(option.value);\n };\n\n /**\n * Determines equality between an option and the current value.\n * Handles both freeSolo string values and object options to prevent selection glitches.\n */\n const getIsOptionEqualToValue = (a: AutocompleteOption, b: AutocompleteOption): boolean => {\n if (b === null || b === undefined) {\n return false;\n }\n return typeof b === 'string' ? a.label === b || String(a.value) === b : a.value === b.value;\n };\n\n /**\n * Normalizes the value prop for MUI Autocomplete.\n * Handles both single and multiple selection modes, ensuring the value\n * format matches the mode (array for multiple, single value/null for single).\n *\n * @returns Normalized value compatible with MUI Autocomplete\n */\n const getValue = (): AutocompleteProps['value'] => {\n // Multiple value selection\n if (multiple) {\n if (Array.isArray(value)) return value;\n if (value === null || value === undefined) return [];\n return [value as AutocompleteOption];\n }\n\n // Single value selection\n if (Array.isArray(value)) return value.length > 0 ? value[0] : null;\n return value ?? null;\n };\n\n return (\n <StyledAutocomplete\n ref={rootRef}\n clearIcon={<CancelIcon size=\"md\" />}\n clearText={translations.clearTextAriaLabel}\n disableClearable={disabled || loading}\n disableCloseOnSelect={multiple}\n disabled={disabled}\n filterOptions={isSearch ? disableClientFilter : undefined}\n forcePopupIcon={isCombobox}\n freeSolo={isSearch}\n fullWidth={fullWidth}\n getOptionKey={getOptionKey}\n getOptionLabel={getOptionLabel}\n isOptionEqualToValue={getIsOptionEqualToValue}\n limitTags={limitTags}\n loading={loading}\n loadingText={translations.loadingText}\n multiple={multiple}\n noOptionsText={translations.noOptionsText}\n onChange={handleChange}\n onClose={() => toggleOpen(false)}\n onInputChange={handleInputChange}\n onOpen={() => toggleOpen(true)}\n open={isOpen}\n openText={translations.openPopupAriaLabel}\n options={options}\n popupIcon={isSearch ? null : renderPopupIcon()}\n renderInput={renderInputField}\n renderOption={renderMenuOption}\n renderTags={renderSelectedTags}\n slotProps={{\n popupIndicator: {\n onClick: handlePopupIndicatorClick,\n },\n }}\n value={getValue()}\n />\n );\n};\n\nexport default Autocomplete;\n"],"names":["StyledAutocomplete","styled","shouldForwardProp","prop","fullWidth","width","StyledAdornment","Box","includes","theme","clickable","disabled","placement","alignItems","cursor","display","justifyContent","padding","pointerEvents","paddingRight","spacing","color","palette","semantic","icon","StyledLoadingSpinnerContainer","Autocomplete","errorText","fdKey","helperText","label","loading","multiple","placeholder","onChange","onInputChange","options","required","translations","type","value","isOpen","setIsOpen","useState","isSearch","isCombobox","rootRef","limitTags","useDynamicLimitTags","chipMax","gap","horizontalPadding","reservedPx","useEffect","toggleOpen","open","undefined","prevOpen","_jsx","ref","clearIcon","CancelIcon","size","clearText","clearTextAriaLabel","disableClearable","disableCloseOnSelect","filterOptions","opts","forcePopupIcon","freeSolo","getOptionKey","option","String","getOptionLabel","isOptionEqualToValue","a","b","loadingText","noOptionsText","event","reason","details","onClose","onOpen","openText","openPopupAriaLabel","popupIcon","children","ArrowUp01Icon","ArrowDown01Icon","renderInput","params","TextField","slotProps","input","InputProps","endAdornment","_jsxs","_Fragment","CircularProgress","startAdornment","SearchIcon","htmlInput","inputProps","renderOption","optionProps","state","key","onClick","rest","_createElement","MenuItem","checked","selected","onCheckedChange","_checked","e","renderTags","getTagProps","map","tag","index","onDelete","tagProps","rawLabel","truncateWithEllipsis","includeEllipsisInLimit","isTruncated","endsWith","tagKey","MuiTooltip","arrow","title","Badge","onDismiss","popupIndicator","stopPropagation","Array","isArray","length"],"mappings":"m2BA+EA,MACMA,EAAqBC,EADA,EAC8B,CACvDC,kBAAoBC,GAAkB,cAATA,GADJF,EAEC,EAAGG,aAAY,MAAO,CAChDC,MAAOD,EAAY,OAAS,uBAGxBE,EAAkBL,EAAOM,EAAK,CAClCL,kBAAoBC,IAAU,CAAC,YAAa,WAAY,aAAaK,SAASL,IADxDF,EAGtB,EAAGQ,QAAOC,aAAY,EAAOC,YAAW,EAAOC,gBAAW,CACxDC,WAAY,SACZC,OAAQJ,EAAaC,EAAW,cAAgB,UAAa,UAC7DI,QAAS,OACTC,eAAgB,SAChBC,QAAS,EACTC,cAAeR,EAAY,OAAS,UAElB,UAAdE,GAAyB,CAAEO,aAAcV,EAAMW,QAAQ,OACzC,WAAdR,GAA0B,CAAEK,QAASR,EAAMW,QAAQ,EAAG,IAE1D,QAAS,CACPC,MAAOV,EACHF,EAAMa,QAAQC,SAASC,KAAK,iBAC5Bf,EAAMa,QAAQC,SAASC,KAAK,oBAKhCC,EAAgCxB,EAAOM,EAAK,CAChDL,kBAAoBC,GAAkB,cAATA,GADOF,EAES,EAAGQ,QAAOG,gBAAW,CAClEC,WAAY,SACZE,QAAS,OACTC,eAAgB,SAChBC,QAAS,KAES,UAAdL,GAAyB,CAAEO,aAAcV,EAAMW,QAAQ,OACzC,WAAdR,GAA0B,CAAEK,QAASR,EAAMW,QAAQ,EAAG,QAU/CM,EAAe,EAC1Bf,YAAW,EACXgB,YACAC,QACAxB,aAAY,EACZyB,aACAC,QACAC,WAAU,EACVC,YAAW,EACXC,cACAC,WACAC,gBACAC,UAAU,GACVC,YAAW,EACXC,eACAC,OAAO,SACPC,YAEA,MAAOC,EAAQC,GAAaC,GAAkB,GAExCC,EAAoB,WAATL,EACXM,EAAsB,aAATN,GAEbO,QAAEA,EAAOC,UAAEA,GAAcC,EAAoB,CACjDC,QAAS,IACTC,IAAK,EACLC,kBAAmB,GACnBC,WAAYR,EAAW,IAAM,KAI/BS,GAAU,KACJ1C,GACF+B,GAAU,KAEX,CAAC/B,IAQJ,MAAM2C,EAAcC,IACd5C,GASJ+B,OALac,IAATD,EAKOE,IAAcA,EAJbF,IAkNd,OACEG,EAAC1D,EAAkB,CACjB2D,IAAKb,EACLc,UAAWF,EAACG,EAAU,CAACC,KAAK,OAC5BC,UAAWzB,EAAa0B,mBACxBC,iBAAkBtD,GAAYoB,EAC9BmC,qBAAsBlC,EACtBrB,SAAUA,EACVwD,cAAevB,EAxDUwB,GAAqDA,OAwD9BZ,EAChDa,eAAgBxB,EAChByB,SAAU1B,EACVxC,UAAWA,EACXmE,aA/CkBC,GACK,iBAAXA,EAAsBA,EAASC,OAAOD,EAAOhC,OA+CzDkC,eAvDoBF,GACG,iBAAXA,EAAsBA,EAASA,EAAO1C,MAuDlD6C,qBAzC4B,CAACC,EAAuBC,IAClDA,UAGgB,iBAANA,EAAiBD,EAAE9C,QAAU+C,GAAKJ,OAAOG,EAAEpC,SAAWqC,EAAID,EAAEpC,QAAUqC,EAAErC,OAsCpFO,UAAWA,EACXhB,QAASA,EACT+C,YAAaxC,EAAawC,YAC1B9C,SAAUA,EACV+C,cAAezC,EAAayC,cAC5B7C,SA/FiB,CACnB8C,EACAxC,EACAyC,EACAC,KAEKhD,GAGLA,EAAS8C,EAAOxC,EAAOyC,EAAQC,IAuF7BC,QAAS,IAAM7B,GAAW,GAC1BnB,cArFsB,CACxB6C,EACAxC,EACAyC,KAEK9C,GAGLA,EAAc6C,EAAOxC,EAAOyC,IA8E1BG,OAAQ,IAAM9B,GAAW,GACzBC,KAAMd,EACN4C,SAAU/C,EAAagD,mBACvBlD,QAASA,EACTmD,UAAW3C,EAAW,KA5NtBc,EAACpD,EAAe,CAACI,WAAS,EAACC,SAAUA,EAAUC,UAAU,MAAK4E,SAClD9B,EAATjB,EAAUgD,EAAoBC,EAAP,CAAA,KA4N1BC,YA/MsBC,GACxBlC,EAACmC,GACClF,SAAUA,EACVgB,UAAWA,EACXC,MAAOA,EACPxB,UAAWA,EACXyB,WAAYA,EACZC,MAAOA,EACPG,YAAaA,EACbI,SAAUA,EACVyD,UAAW,CACTC,MAAO,IACFH,EAAOI,WACVC,aACEC,EAAAC,EAAA,CAAAX,SAAA,CACGzD,EArBT2B,EAACjC,EAA6B,CAACb,UAAWgC,EAAW,MAAQ,SAAQ4C,SACnE9B,EAAC0C,EAAgB,CAACtC,KAAK,YAoBmB,KACnC8B,EAAOI,WAAWC,gBAGvBI,eACEH,EAAAC,EAAA,CAAAX,SAAA,CACG5C,EA3CTc,EAACpD,GAAgBK,SAAUA,EAAUC,UAAU,QAAO4E,SACpD9B,EAAC4C,EAAU,CAAA,cAAa,WA0Ce,KAChCV,EAAOI,WAAWK,mBAIzBE,UAAW,IACNX,EAAOY,eAqLdC,aA/KqB,CACvBC,EACAlC,EACAmC,KAEA,MAAMC,IAAEA,EAAGC,QAAEA,KAAYC,GAASJ,EAElC,OAEIK,EAACC,EAFDhF,EAES,IACH8E,EACJF,IAAKA,EACLK,QAASN,EAAMO,SACfpF,MAAO0C,EAAO1C,MACdqF,gBAAiB,CAACC,EAAUC,KAC1BR,IAAUQ,IAEZ9E,KAAK,YAMA,IACHuE,EACJF,IAAKA,EACL9E,MAAO0C,EAAO1C,MACd+E,QAASA,EACTK,SAAUP,EAAMO,SAChB3E,KAAK,UAmJP+E,WA9IuB,CACzBJ,EACAK,IAEAL,EAASM,KAAI,CAACC,EAAKC,KACjB,MAAMd,IAAEA,EAAGe,SAAEA,KAAaC,GAAaL,EAAY,CAAEG,UAC/CG,EAA0B,iBAARJ,EAAmBA,EAAMA,EAAI3F,MAC/CA,EAAQgG,EAAqBD,EAAU,GAAI,CAAEE,wBAAwB,IACrEC,EAAclG,EAAMmG,SAAS,OAC7BC,EAAStB,GAAO,OAAsB,iBAARa,EAAmBA,EAAMA,EAAIjF,QAEjE,OAAIwF,EAEAtE,EAACyE,EAAU,CAAcC,OAAK,EAACxH,UAAU,MAAMyH,MAAOR,WACpDnE,EAAA,OAAA,IAAUkE,EAAQpC,SAChB9B,EAAC4E,EAAK,CAACxG,MAAOA,EAAOyG,UAAWZ,OAFnBO,GASnBxE,EAAA,OAAA,IAAuBkE,WACrBlE,EAAC4E,GAAMxG,MAAOA,EAAOyG,UAAWZ,KADvBO,MAyHbpC,UAAW,CACT0C,eAAgB,CACd3B,QArH2B7B,IAC7BrE,IAIJqE,EAAMyD,kBACNnF,QAkHEd,MA/CER,EACE0G,MAAMC,QAAQnG,GAAeA,EAC7BA,QAA8C,GAC3C,CAACA,GAINkG,MAAMC,QAAQnG,GAAeA,EAAMoG,OAAS,EAAIpG,EAAM,GAAK,KACxDA,GAAS"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("@mui/material/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),i=require("@mui/material/Box"),a=require("@mui/material/FormControl"),t=require("@mui/material/FormGroup"),l=require("@mui/material/FormHelperText"),s=require("@mui/material/FormLabel"),n=require("@mui/material/styles"),d=require("../../atoms/Checkbox/index.cjs.js"),c=require("../../../icons/CancelCircle/index.cjs.js");const o=n.styled(a)((({theme:e})=>({display:"flex",flexDirection:"column",gap:e.spacing(.5)}))),u=n.styled(t)((({theme:e})=>({display:"flex",flexDirection:"column",gap:e.spacing(2),paddingTop:e.spacing(2)}))),m=({fdKey:a,options:t,value:n,size:m="medium",label:x,hintText:p,errorText:h,valid:j=!0,required:f=!1,onChange:q})=>{const[b,g]=r.useState([]),y=n??b,C=e=>{const{name:r,checked:i}=e.target,a=i?[...y,r]:y.filter((e=>e!==r));void 0===n&&g(a),q&&q(e,a)},v=!j&&!!h;return e.jsxs(o,{"data-fd":a,children:[e.jsxs(i,{children:[e.jsx(s,{"data-fd":`${a}-label`,required:f,children:x}),p&&e.jsx(l,{"data-fd":`${a}-hint`,children:p})]}),v&&e.jsxs(l,{error:!0,children:[e.jsx(c,{}),h]}),e.jsx(u,{"data-fd":`${a}-checkboxes`,children:t.map((r=>{const i=y.includes(r.name);return e.jsx(d,{checked:i,disabled:r.disabled,fdKey:`${a}-${r.name}`,label:r.label,name:r.name,onChange:C,size:m,valid:j},r.name)}))})]})};exports.CheckboxGroup=m,exports.default=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../../src/components/molecules/CheckboxGroup/index.tsx"],"sourcesContent":["import { type ChangeEvent,useState } from 'react';\n\nimport MuiFormControl from '@mui/material/FormControl';\nimport MuiFormGroup from '@mui/material/FormGroup';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiFormLabel from '@mui/material/FormLabel';\
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../../src/components/molecules/CheckboxGroup/index.tsx"],"sourcesContent":["import { type ChangeEvent, useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormControl from '@mui/material/FormControl';\nimport MuiFormGroup from '@mui/material/FormGroup';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiFormLabel from '@mui/material/FormLabel';\nimport { styled } from '@mui/material/styles';\n\nimport Checkbox from '@fd/components/atoms/Checkbox';\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\n\nexport interface CheckboxOption {\n name: string;\n label: string;\n disabled?: boolean;\n}\n\ninterface CheckboxGroupProps {\n fdKey: string;\n options: CheckboxOption[];\n label: string;\n /**\n * The selected values. When provided, the component is controlled.\n * When omitted, the component is uncontrolled and manages its own state.\n */\n value?: string[];\n size?: 'medium' | 'small';\n hintText?: string;\n errorText?: string;\n valid?: boolean;\n required?: boolean;\n onChange?: (event: ChangeEvent<HTMLInputElement>, checkedOptions: string[]) => void;\n}\n\nconst StyledFormControl = styled(MuiFormControl)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n}));\n\nconst StyledFormGroup = styled(MuiFormGroup)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(2),\n paddingTop: theme.spacing(2),\n}));\n\nexport const CheckboxGroup = ({\n fdKey,\n options,\n value,\n size = 'medium',\n label,\n hintText,\n errorText,\n valid = true,\n required = false,\n onChange,\n}: CheckboxGroupProps): JSX.Element => {\n const [internalValue, setInternalValue] = useState<string[]>([]);\n\n const resolvedValue = value ?? internalValue;\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>): void => {\n const { name: optionName, checked } = event.target;\n\n const newValue = checked\n ? [...resolvedValue, optionName]\n : resolvedValue.filter((name) => name !== optionName);\n\n // If value is undefined, we're in uncontrolled mode - update internal state\n if (value === undefined) {\n setInternalValue(newValue);\n }\n\n if (onChange) {\n onChange(event, newValue);\n }\n };\n\n const isError = !valid && !!errorText;\n\n return (\n <StyledFormControl data-fd={fdKey}>\n <Box>\n <MuiFormLabel data-fd={`${fdKey}-label`} required={required}>\n {label}\n </MuiFormLabel>\n\n {hintText && <MuiFormHelperText data-fd={`${fdKey}-hint`}>{hintText}</MuiFormHelperText>}\n </Box>\n\n {isError && (\n <MuiFormHelperText error>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledFormGroup data-fd={`${fdKey}-checkboxes`}>\n {options.map((option) => {\n const isChecked = resolvedValue.includes(option.name);\n\n return (\n <Checkbox\n key={option.name}\n checked={isChecked}\n disabled={option.disabled}\n fdKey={`${fdKey}-${option.name}`}\n label={option.label}\n name={option.name}\n onChange={handleChange}\n size={size}\n valid={valid}\n />\n );\n })}\n </StyledFormGroup>\n </StyledFormControl>\n );\n};\n\nexport default CheckboxGroup;\n"],"names":["StyledFormControl","styled","MuiFormControl","theme","display","flexDirection","gap","spacing","StyledFormGroup","MuiFormGroup","paddingTop","CheckboxGroup","fdKey","options","value","size","label","hintText","errorText","valid","required","onChange","internalValue","setInternalValue","useState","resolvedValue","handleChange","event","name","optionName","checked","target","newValue","filter","undefined","isError","_jsxs","children","Box","_jsx","MuiFormLabel","MuiFormHelperText","error","CancelCircleIcon","map","option","isChecked","includes","Checkbox","disabled"],"mappings":"2bAmCA,MAAMA,EAAoBC,EAAAA,OAAOC,EAAPD,EAAuB,EAAGE,YAAO,CACzDC,QAAS,OACTC,cAAe,SACfC,IAAKH,EAAMI,QAAQ,QAGfC,EAAkBP,EAAAA,OAAOQ,EAAPR,EAAqB,EAAGE,YAAO,CACrDC,QAAS,OACTC,cAAe,SACfC,IAAKH,EAAMI,QAAQ,GACnBG,WAAYP,EAAMI,QAAQ,OAGfI,EAAgB,EAC3BC,QACAC,UACAC,QACAC,OAAO,SACPC,QACAC,WACAC,YACAC,SAAQ,EACRC,YAAW,EACXC,eAEA,MAAOC,EAAeC,GAAoBC,EAAAA,SAAmB,IAEvDC,EAAgBX,GAASQ,EAEzBI,EAAgBC,IACpB,MAAQC,KAAMC,EAAUC,QAAEA,GAAYH,EAAMI,OAEtCC,EAAWF,EACb,IAAIL,EAAeI,GACnBJ,EAAcQ,QAAQL,GAASA,IAASC,SAG9BK,IAAVpB,GACFS,EAAiBS,GAGfX,GACFA,EAASM,EAAOK,IAIdG,GAAWhB,KAAWD,EAE5B,OACEkB,EAAAA,KAACpC,EAAiB,CAAA,UAAUY,EAAKyB,SAAA,CAC/BD,OAACE,EAAG,CAAAD,SAAA,CACFE,EAAAA,IAACC,EAAY,CAAA,UAAU,GAAG5B,UAAeQ,SAAUA,EAAQiB,SACxDrB,IAGFC,GAAYsB,EAAAA,IAACE,EAAiB,CAAA,UAAU,GAAG7B,SAAYyB,SAAGpB,OAG5DkB,GACCC,EAAAA,KAACK,EAAiB,CAACC,OAAK,EAAAL,SAAA,CACtBE,EAAAA,IAACI,EAAgB,CAAA,GAEhBzB,KAILqB,EAAAA,IAAC/B,EAAe,CAAA,UAAU,GAAGI,eAAkByB,SAC5CxB,EAAQ+B,KAAKC,IACZ,MAAMC,EAAYrB,EAAcsB,SAASF,EAAOjB,MAEhD,OACEW,EAAAA,IAACS,EAAQ,CAEPlB,QAASgB,EACTG,SAAUJ,EAAOI,SACjBrC,MAAO,GAAGA,KAASiC,EAAOjB,OAC1BZ,MAAO6B,EAAO7B,MACdY,KAAMiB,EAAOjB,KACbP,SAAUK,EACVX,KAAMA,EACNI,MAAOA,GARF0B,EAAOjB"}
|
|
@@ -23,5 +23,5 @@ interface CheckboxGroupProps {
|
|
|
23
23
|
}
|
|
24
24
|
declare const CheckboxGroup: ({ fdKey, options, value, size, label, hintText, errorText, valid, required, onChange, }: CheckboxGroupProps) => JSX.Element;
|
|
25
25
|
|
|
26
|
-
export { CheckboxGroup as default };
|
|
26
|
+
export { CheckboxGroup, CheckboxGroup as default };
|
|
27
27
|
export type { CheckboxOption };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useState as
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useState as i}from"react";import a from"@mui/material/Box";import m from"@mui/material/FormControl";import o from"@mui/material/FormGroup";import t from"@mui/material/FormHelperText";import l from"@mui/material/FormLabel";import{styled as n}from"@mui/material/styles";import d from"../../atoms/Checkbox/index.js";import c from"../../../icons/CancelCircle/index.js";const p=n(m)((({theme:e})=>({display:"flex",flexDirection:"column",gap:e.spacing(.5)}))),s=n(o)((({theme:e})=>({display:"flex",flexDirection:"column",gap:e.spacing(2),paddingTop:e.spacing(2)}))),f=({fdKey:m,options:o,value:n,size:f="medium",label:u,hintText:h,errorText:x,valid:b=!0,required:g=!1,onChange:C})=>{const[y,$]=i([]),k=n??y,v=e=>{const{name:r,checked:i}=e.target,a=i?[...k,r]:k.filter((e=>e!==r));void 0===n&&$(a),C&&C(e,a)},F=!b&&!!x;return e(p,{"data-fd":m,children:[e(a,{children:[r(l,{"data-fd":`${m}-label`,required:g,children:u}),h&&r(t,{"data-fd":`${m}-hint`,children:h})]}),F&&e(t,{error:!0,children:[r(c,{}),x]}),r(s,{"data-fd":`${m}-checkboxes`,children:o.map((e=>{const i=k.includes(e.name);return r(d,{checked:i,disabled:e.disabled,fdKey:`${m}-${e.name}`,label:e.label,name:e.name,onChange:v,size:f,valid:b},e.name)}))})]})};export{f as CheckboxGroup,f as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/CheckboxGroup/index.tsx"],"sourcesContent":["import { type ChangeEvent,useState } from 'react';\n\nimport MuiFormControl from '@mui/material/FormControl';\nimport MuiFormGroup from '@mui/material/FormGroup';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiFormLabel from '@mui/material/FormLabel';\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/CheckboxGroup/index.tsx"],"sourcesContent":["import { type ChangeEvent, useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormControl from '@mui/material/FormControl';\nimport MuiFormGroup from '@mui/material/FormGroup';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiFormLabel from '@mui/material/FormLabel';\nimport { styled } from '@mui/material/styles';\n\nimport Checkbox from '@fd/components/atoms/Checkbox';\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\n\nexport interface CheckboxOption {\n name: string;\n label: string;\n disabled?: boolean;\n}\n\ninterface CheckboxGroupProps {\n fdKey: string;\n options: CheckboxOption[];\n label: string;\n /**\n * The selected values. When provided, the component is controlled.\n * When omitted, the component is uncontrolled and manages its own state.\n */\n value?: string[];\n size?: 'medium' | 'small';\n hintText?: string;\n errorText?: string;\n valid?: boolean;\n required?: boolean;\n onChange?: (event: ChangeEvent<HTMLInputElement>, checkedOptions: string[]) => void;\n}\n\nconst StyledFormControl = styled(MuiFormControl)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n}));\n\nconst StyledFormGroup = styled(MuiFormGroup)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(2),\n paddingTop: theme.spacing(2),\n}));\n\nexport const CheckboxGroup = ({\n fdKey,\n options,\n value,\n size = 'medium',\n label,\n hintText,\n errorText,\n valid = true,\n required = false,\n onChange,\n}: CheckboxGroupProps): JSX.Element => {\n const [internalValue, setInternalValue] = useState<string[]>([]);\n\n const resolvedValue = value ?? internalValue;\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>): void => {\n const { name: optionName, checked } = event.target;\n\n const newValue = checked\n ? [...resolvedValue, optionName]\n : resolvedValue.filter((name) => name !== optionName);\n\n // If value is undefined, we're in uncontrolled mode - update internal state\n if (value === undefined) {\n setInternalValue(newValue);\n }\n\n if (onChange) {\n onChange(event, newValue);\n }\n };\n\n const isError = !valid && !!errorText;\n\n return (\n <StyledFormControl data-fd={fdKey}>\n <Box>\n <MuiFormLabel data-fd={`${fdKey}-label`} required={required}>\n {label}\n </MuiFormLabel>\n\n {hintText && <MuiFormHelperText data-fd={`${fdKey}-hint`}>{hintText}</MuiFormHelperText>}\n </Box>\n\n {isError && (\n <MuiFormHelperText error>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledFormGroup data-fd={`${fdKey}-checkboxes`}>\n {options.map((option) => {\n const isChecked = resolvedValue.includes(option.name);\n\n return (\n <Checkbox\n key={option.name}\n checked={isChecked}\n disabled={option.disabled}\n fdKey={`${fdKey}-${option.name}`}\n label={option.label}\n name={option.name}\n onChange={handleChange}\n size={size}\n valid={valid}\n />\n );\n })}\n </StyledFormGroup>\n </StyledFormControl>\n );\n};\n\nexport default CheckboxGroup;\n"],"names":["StyledFormControl","styled","MuiFormControl","theme","display","flexDirection","gap","spacing","StyledFormGroup","MuiFormGroup","paddingTop","CheckboxGroup","fdKey","options","value","size","label","hintText","errorText","valid","required","onChange","internalValue","setInternalValue","useState","resolvedValue","handleChange","event","name","optionName","checked","target","newValue","filter","undefined","isError","_jsxs","children","Box","_jsx","MuiFormLabel","MuiFormHelperText","error","CancelCircleIcon","map","option","isChecked","includes","Checkbox","disabled"],"mappings":"saAmCA,MAAMA,EAAoBC,EAAOC,EAAPD,EAAuB,EAAGE,YAAO,CACzDC,QAAS,OACTC,cAAe,SACfC,IAAKH,EAAMI,QAAQ,QAGfC,EAAkBP,EAAOQ,EAAPR,EAAqB,EAAGE,YAAO,CACrDC,QAAS,OACTC,cAAe,SACfC,IAAKH,EAAMI,QAAQ,GACnBG,WAAYP,EAAMI,QAAQ,OAGfI,EAAgB,EAC3BC,QACAC,UACAC,QACAC,OAAO,SACPC,QACAC,WACAC,YACAC,SAAQ,EACRC,YAAW,EACXC,eAEA,MAAOC,EAAeC,GAAoBC,EAAmB,IAEvDC,EAAgBX,GAASQ,EAEzBI,EAAgBC,IACpB,MAAQC,KAAMC,EAAUC,QAAEA,GAAYH,EAAMI,OAEtCC,EAAWF,EACb,IAAIL,EAAeI,GACnBJ,EAAcQ,QAAQL,GAASA,IAASC,SAG9BK,IAAVpB,GACFS,EAAiBS,GAGfX,GACFA,EAASM,EAAOK,IAIdG,GAAWhB,KAAWD,EAE5B,OACEkB,EAACpC,EAAiB,CAAA,UAAUY,EAAKyB,SAAA,CAC/BD,EAACE,EAAG,CAAAD,SAAA,CACFE,EAACC,EAAY,CAAA,UAAU,GAAG5B,UAAeQ,SAAUA,EAAQiB,SACxDrB,IAGFC,GAAYsB,EAACE,EAAiB,CAAA,UAAU,GAAG7B,SAAYyB,SAAGpB,OAG5DkB,GACCC,EAACK,EAAiB,CAACC,OAAK,EAAAL,SAAA,CACtBE,EAACI,EAAgB,CAAA,GAEhBzB,KAILqB,EAAC/B,EAAe,CAAA,UAAU,GAAGI,eAAkByB,SAC5CxB,EAAQ+B,KAAKC,IACZ,MAAMC,EAAYrB,EAAcsB,SAASF,EAAOjB,MAEhD,OACEW,EAACS,EAAQ,CAEPlB,QAASgB,EACTG,SAAUJ,EAAOI,SACjBrC,MAAO,GAAGA,KAASiC,EAAOjB,OAC1BZ,MAAO6B,EAAO7B,MACdY,KAAMiB,EAAOjB,KACbP,SAAUK,EACVX,KAAMA,EACNI,MAAOA,GARF0B,EAAOjB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("@mui/material/styles/createTheme"),r=require("../components/atoms/Button/buttonThemeOverrides.cjs.js"),s=require("../components/atoms/IconButton/iconButtonThemeOverrides.cjs.js"),i=require("../icons/Cancel/index.cjs.js"),t=require("./overrides/
|
|
1
|
+
"use strict";var e=require("@mui/material/styles/createTheme"),r=require("../components/atoms/Button/buttonThemeOverrides.cjs.js"),s=require("../components/atoms/IconButton/iconButtonThemeOverrides.cjs.js"),i=require("../icons/Cancel/index.cjs.js"),t=require("./overrides/autocompleteOverrides.cjs.js"),o=require("./overrides/checkboxOverrides.cjs.js"),a=require("./overrides/formControlLabelOverrides.cjs.js"),d=require("./overrides/formHelperTextOverrides.cjs.js"),u=require("./overrides/formLabelOverrides.cjs.js"),n=require("./overrides/inputBaseOverrides.cjs.js"),p=require("./overrides/inputLabelOverrides.cjs.js"),l=require("./overrides/listItemTextOverrides.cjs.js"),c=require("./overrides/menuItemOverrides.cjs.js"),v=require("./overrides/menuOverrides.cjs.js"),m=require("./overrides/selectOverrides.cjs.js"),j=require("./overrides/textFieldOverrides.cjs.js"),h=require("./tokens/breakpoints/breakpoints.cjs.js"),b=require("./tokens/colours/semantic.cjs.js"),y=require("./tokens/radius/radius.cjs.js"),O=require("./tokens/shadows/shadows.cjs.js"),g=require("./tokens/typography/variant-mapping.cjs.js"),M=require("./typography.cjs.js");const x=x=>{const k={typography:M.typography,palette:"light"===x?b.lightColours:b.darkColours,radius:y.radius,breakpoints:{values:h.breakpointValues},customShadows:{...O.shadows}},q=e(k);return Object.keys(M.typography).forEach((e=>{const r=e.split(/(?=[A-Z])/)[0],s=e;q.typography[s]={...q.typography[s],[q.breakpoints.down("tablet")]:{...M.getMobileTextStyle(r)}}})),e({...k,typography:q.typography,shape:{borderRadius:4},customShadows:q.customShadows,components:{MuiAlert:{defaultProps:{components:{CloseIcon:i}},styleOverrides:{root:{borderRadius:"8px",padding:"24px"},icon:{marginRight:"12px",padding:0},action:{padding:0,"& button":{marginTop:"-5px"}},message:{padding:0}}},MuiButton:r.buttonStyleOverrides(q),MuiIconButton:s.iconButtonStyleOverrides(),MuiCard:{styleOverrides:{root:{boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:q.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold",paddingLeft:"6px",paddingRight:"6px"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:q.palette.semantic.fill["fill-primary-weak"]},"&:not(:last-child)":{borderBottom:`1px solid ${q.palette.semantic.stroke["stroke-weak"]}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:q.palette.semantic.fill["fill-secondary"],cursor:"pointer"}}}},MuiTypography:{defaultProps:{variantMapping:g.typographyVariantMapping}},MuiAutocomplete:t.autocompleteOverrides(q),MuiCheckbox:o.checkboxOverrides(q),MuiFormControlLabel:a.formControlLabelOverrides(q),MuiFormHelperText:d.formHelperTextOverrides(q),MuiFormLabel:u.formLabelOverrides(q),MuiInputBase:n.inputBaseOverrides(q),MuiInputLabel:p.inputLabelOverrides(q),MuiListItemText:l.listItemTextOverrides(q),MuiMenu:v.menuOverrides(q),MuiMenuItem:c.menuItemOverrides(q),MuiSelect:m.selectOverrides(q),MuiTextField:j.textFieldOverrides(q)}})},k=x("light"),q=x("dark");exports.darkTheme=q,exports.lightTheme=k;
|
|
2
2
|
//# sourceMappingURL=flipdishPublicTheme.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flipdishPublicTheme.cjs.js","sources":["../../src/themes/flipdishPublicTheme.ts"],"sourcesContent":["import createTheme, { type Theme, type ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport { buttonStyleOverrides } from '../components/atoms/Button/buttonThemeOverrides';\nimport { iconButtonStyleOverrides } from '../components/atoms/IconButton/iconButtonThemeOverrides';\nimport CancelIcon from '../icons/Cancel';\nimport { checkboxOverrides } from './overrides/checkboxOverrides';\nimport { formControlLabelOverrides } from './overrides/formControlLabelOverrides';\nimport { formHelperTextOverrides } from './overrides/formHelperTextOverrides';\nimport { formLabelOverrides } from './overrides/formLabelOverrides';\nimport { inputBaseOverrides } from './overrides/inputBaseOverrides';\nimport { inputLabelOverrides } from './overrides/inputLabelOverrides';\nimport { listItemTextOverrides } from './overrides/listItemTextOverrides';\nimport { menuItemOverrides } from './overrides/menuItemOverrides';\nimport { menuOverrides } from './overrides/menuOverrides';\nimport { selectOverrides } from './overrides/selectOverrides';\nimport { textFieldOverrides } from './overrides/textFieldOverrides';\nimport { breakpointValues } from './tokens/breakpoints/breakpoints';\nimport { darkColours, lightColours } from './tokens/colours/semantic';\nimport { radius } from './tokens/radius/radius';\nimport { shadows } from './tokens/shadows/shadows';\nimport { fontSize } from './tokens/typography/font-size';\nimport { typographyVariantMapping } from './tokens/typography/variant-mapping';\nimport { getMobileTextStyle, typography } from './typography';\n\nconst createFlipdishThemeFactory = (mode: 'dark' | 'light'): Theme => {\n const themeOptions: ThemeOptions = {\n typography,\n palette: mode === 'light' ? lightColours : darkColours,\n radius,\n breakpoints: {\n values: breakpointValues,\n },\n customShadows: {\n ...shadows,\n },\n };\n const baseTheme = createTheme(themeOptions);\n\n /*\n Add mobile text styles to typography\n Has to be done using media queries, otherwise it isn't responsive :(\n https://mui.com/material-ui/customization/typography/#responsive-font-sizes\n */\n Object.keys(typography).forEach((key) => {\n // only key before the suffix split by capital letter (h1Strong -> h1)\n const keyWithoutVariantSuffix = key.split(/(?=[A-Z])/)[0];\n const typographyKey = key as keyof typeof typography;\n baseTheme.typography[typographyKey] = {\n ...baseTheme.typography[typographyKey],\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(keyWithoutVariantSuffix as keyof (typeof fontSize)['mobile']),\n },\n };\n });\n\n // Create final theme with component overrides and additional configurations\n return createTheme({\n ...themeOptions,\n typography: baseTheme.typography,\n shape: {\n borderRadius: 4,\n },\n customShadows: baseTheme.customShadows,\n components: {\n MuiAlert: {\n defaultProps: {\n components: {\n CloseIcon: CancelIcon,\n },\n },\n styleOverrides: {\n root: {\n // TODO: Replace with borderRadius from tokens when implemented\n borderRadius: '8px',\n // TODO: Replace with spacing from tokens when implemented\n padding: '24px',\n },\n icon: {\n // TODO: Replace with spacing from tokens when implemented\n marginRight: '12px',\n padding: 0,\n },\n action: {\n padding: 0,\n '& button': {\n marginTop: '-5px',\n },\n },\n message: {\n padding: 0,\n },\n },\n },\n MuiButton: buttonStyleOverrides(baseTheme),\n MuiIconButton: iconButtonStyleOverrides(),\n MuiCard: {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: baseTheme.palette.divider,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n fontWeight: 'bold',\n paddingLeft: '6px',\n paddingRight: '6px',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-primary-weak'],\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${baseTheme.palette.semantic.stroke['stroke-weak']}`,\n },\n },\n },\n },\n MuiTableRow: {\n styleOverrides: {\n root: {\n '&.MuiTableRow-hover:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-secondary'],\n cursor: 'pointer',\n },\n },\n },\n },\n MuiTypography: {\n defaultProps: {\n variantMapping: typographyVariantMapping,\n },\n },\n
|
|
1
|
+
{"version":3,"file":"flipdishPublicTheme.cjs.js","sources":["../../src/themes/flipdishPublicTheme.ts"],"sourcesContent":["import createTheme, { type Theme, type ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport { buttonStyleOverrides } from '../components/atoms/Button/buttonThemeOverrides';\nimport { iconButtonStyleOverrides } from '../components/atoms/IconButton/iconButtonThemeOverrides';\nimport CancelIcon from '../icons/Cancel';\nimport { autocompleteOverrides } from './overrides/autocompleteOverrides';\nimport { checkboxOverrides } from './overrides/checkboxOverrides';\nimport { formControlLabelOverrides } from './overrides/formControlLabelOverrides';\nimport { formHelperTextOverrides } from './overrides/formHelperTextOverrides';\nimport { formLabelOverrides } from './overrides/formLabelOverrides';\nimport { inputBaseOverrides } from './overrides/inputBaseOverrides';\nimport { inputLabelOverrides } from './overrides/inputLabelOverrides';\nimport { listItemTextOverrides } from './overrides/listItemTextOverrides';\nimport { menuItemOverrides } from './overrides/menuItemOverrides';\nimport { menuOverrides } from './overrides/menuOverrides';\nimport { selectOverrides } from './overrides/selectOverrides';\nimport { textFieldOverrides } from './overrides/textFieldOverrides';\nimport { breakpointValues } from './tokens/breakpoints/breakpoints';\nimport { darkColours, lightColours } from './tokens/colours/semantic';\nimport { radius } from './tokens/radius/radius';\nimport { shadows } from './tokens/shadows/shadows';\nimport { fontSize } from './tokens/typography/font-size';\nimport { typographyVariantMapping } from './tokens/typography/variant-mapping';\nimport { getMobileTextStyle, typography } from './typography';\n\nconst createFlipdishThemeFactory = (mode: 'dark' | 'light'): Theme => {\n const themeOptions: ThemeOptions = {\n typography,\n palette: mode === 'light' ? lightColours : darkColours,\n radius,\n breakpoints: {\n values: breakpointValues,\n },\n customShadows: {\n ...shadows,\n },\n };\n const baseTheme = createTheme(themeOptions);\n\n /*\n Add mobile text styles to typography\n Has to be done using media queries, otherwise it isn't responsive :(\n https://mui.com/material-ui/customization/typography/#responsive-font-sizes\n */\n Object.keys(typography).forEach((key) => {\n // only key before the suffix split by capital letter (h1Strong -> h1)\n const keyWithoutVariantSuffix = key.split(/(?=[A-Z])/)[0];\n const typographyKey = key as keyof typeof typography;\n baseTheme.typography[typographyKey] = {\n ...baseTheme.typography[typographyKey],\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(keyWithoutVariantSuffix as keyof (typeof fontSize)['mobile']),\n },\n };\n });\n\n // Create final theme with component overrides and additional configurations\n return createTheme({\n ...themeOptions,\n typography: baseTheme.typography,\n shape: {\n borderRadius: 4,\n },\n customShadows: baseTheme.customShadows,\n components: {\n MuiAlert: {\n defaultProps: {\n components: {\n CloseIcon: CancelIcon,\n },\n },\n styleOverrides: {\n root: {\n // TODO: Replace with borderRadius from tokens when implemented\n borderRadius: '8px',\n // TODO: Replace with spacing from tokens when implemented\n padding: '24px',\n },\n icon: {\n // TODO: Replace with spacing from tokens when implemented\n marginRight: '12px',\n padding: 0,\n },\n action: {\n padding: 0,\n '& button': {\n marginTop: '-5px',\n },\n },\n message: {\n padding: 0,\n },\n },\n },\n MuiButton: buttonStyleOverrides(baseTheme),\n MuiIconButton: iconButtonStyleOverrides(),\n MuiCard: {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: baseTheme.palette.divider,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n fontWeight: 'bold',\n paddingLeft: '6px',\n paddingRight: '6px',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-primary-weak'],\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${baseTheme.palette.semantic.stroke['stroke-weak']}`,\n },\n },\n },\n },\n MuiTableRow: {\n styleOverrides: {\n root: {\n '&.MuiTableRow-hover:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-secondary'],\n cursor: 'pointer',\n },\n },\n },\n },\n MuiTypography: {\n defaultProps: {\n variantMapping: typographyVariantMapping,\n },\n },\n MuiAutocomplete: autocompleteOverrides(baseTheme),\n MuiCheckbox: checkboxOverrides(baseTheme),\n MuiFormControlLabel: formControlLabelOverrides(baseTheme),\n MuiFormHelperText: formHelperTextOverrides(baseTheme),\n MuiFormLabel: formLabelOverrides(baseTheme),\n MuiInputBase: inputBaseOverrides(baseTheme),\n MuiInputLabel: inputLabelOverrides(baseTheme),\n MuiListItemText: listItemTextOverrides(baseTheme),\n MuiMenu: menuOverrides(baseTheme),\n MuiMenuItem: menuItemOverrides(baseTheme),\n MuiSelect: selectOverrides(baseTheme),\n MuiTextField: textFieldOverrides(baseTheme),\n },\n });\n};\n\nexport const lightTheme = createFlipdishThemeFactory('light');\nexport const darkTheme = createFlipdishThemeFactory('dark');\n"],"names":["createFlipdishThemeFactory","mode","themeOptions","typography","palette","lightColours","darkColours","radius","breakpoints","values","breakpointValues","customShadows","shadows","baseTheme","createTheme","Object","keys","forEach","key","keyWithoutVariantSuffix","split","typographyKey","down","getMobileTextStyle","shape","borderRadius","components","MuiAlert","defaultProps","CloseIcon","CancelIcon","styleOverrides","root","padding","icon","marginRight","action","marginTop","message","MuiButton","buttonStyleOverrides","MuiIconButton","iconButtonStyleOverrides","MuiCard","boxShadow","borderWidth","borderStyle","borderColor","divider","MuiChip","fontWeight","paddingLeft","paddingRight","MuiListItemButton","backgroundColor","semantic","fill","borderBottom","stroke","MuiTableRow","cursor","MuiTypography","variantMapping","typographyVariantMapping","MuiAutocomplete","autocompleteOverrides","MuiCheckbox","checkboxOverrides","MuiFormControlLabel","formControlLabelOverrides","MuiFormHelperText","formHelperTextOverrides","MuiFormLabel","formLabelOverrides","MuiInputBase","inputBaseOverrides","MuiInputLabel","inputLabelOverrides","MuiListItemText","listItemTextOverrides","MuiMenu","menuOverrides","MuiMenuItem","menuItemOverrides","MuiSelect","selectOverrides","MuiTextField","textFieldOverrides","lightTheme","darkTheme"],"mappings":"0nCAyBA,MAAMA,EAA8BC,IAClC,MAAMC,EAA6B,YACjCC,EAAAA,WACAC,QAAkB,UAATH,EAAmBI,EAAAA,aAAeC,EAAAA,mBAC3CC,EAAAA,OACAC,YAAa,CACXC,OAAQC,EAAAA,kBAEVC,cAAe,IACVC,EAAAA,UAGDC,EAAYC,EAAYZ,GAoB9B,OAbAa,OAAOC,KAAKb,EAAAA,YAAYc,SAASC,IAE/B,MAAMC,EAA0BD,EAAIE,MAAM,aAAa,GACjDC,EAAgBH,EACtBL,EAAUV,WAAWkB,GAAiB,IACjCR,EAAUV,WAAWkB,GACxB,CAACR,EAAUL,YAAYc,KAAK,WAAY,IACnCC,EAAAA,mBAAmBJ,QAMrBL,EAAY,IACdZ,EACHC,WAAYU,EAAUV,WACtBqB,MAAO,CACLC,aAAc,GAEhBd,cAAeE,EAAUF,cACzBe,WAAY,CACVC,SAAU,CACRC,aAAc,CACZF,WAAY,CACVG,UAAWC,IAGfC,eAAgB,CACdC,KAAM,CAEJP,aAAc,MAEdQ,QAAS,QAEXC,KAAM,CAEJC,YAAa,OACbF,QAAS,GAEXG,OAAQ,CACNH,QAAS,EACT,WAAY,CACVI,UAAW,SAGfC,QAAS,CACPL,QAAS,KAIfM,UAAWC,EAAAA,qBAAqB3B,GAChC4B,cAAeC,EAAAA,2BACfC,QAAS,CACPZ,eAAgB,CACdC,KAAM,CACJY,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,YAAalC,EAAUT,QAAQ4C,WAIrCC,QAAS,CACPlB,eAAgB,CACdC,KAAM,CACJkB,WAAY,OACZC,YAAa,MACbC,aAAc,SAIpBC,kBAAmB,CACjBtB,eAAgB,CACdC,KAAM,CACJ,UAAW,CACTsB,gBAAiBzC,EAAUT,QAAQmD,SAASC,KAAK,sBAEnD,qBAAsB,CACpBC,aAAc,aAAa5C,EAAUT,QAAQmD,SAASG,OAAO,qBAKrEC,YAAa,CACX5B,eAAgB,CACdC,KAAM,CACJ,4BAA6B,CAC3BsB,gBAAiBzC,EAAUT,QAAQmD,SAASC,KAAK,kBACjDI,OAAQ,cAKhBC,cAAe,CACbjC,aAAc,CACZkC,eAAgBC,EAAAA,2BAGpBC,gBAAiBC,EAAAA,sBAAsBpD,GACvCqD,YAAaC,EAAAA,kBAAkBtD,GAC/BuD,oBAAqBC,EAAAA,0BAA0BxD,GAC/CyD,kBAAmBC,EAAAA,wBAAwB1D,GAC3C2D,aAAcC,EAAAA,mBAAmB5D,GACjC6D,aAAcC,EAAAA,mBAAmB9D,GACjC+D,cAAeC,EAAAA,oBAAoBhE,GACnCiE,gBAAiBC,EAAAA,sBAAsBlE,GACvCmE,QAASC,EAAAA,cAAcpE,GACvBqE,YAAaC,EAAAA,kBAAkBtE,GAC/BuE,UAAWC,EAAAA,gBAAgBxE,GAC3ByE,aAAcC,EAAAA,mBAAmB1E,OAK1B2E,EAAaxF,EAA2B,SACxCyF,EAAYzF,EAA2B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"@mui/material/styles/createTheme";import{buttonStyleOverrides as e}from"../components/atoms/Button/buttonThemeOverrides.js";import{iconButtonStyleOverrides as o}from"../components/atoms/IconButton/iconButtonThemeOverrides.js";import t from"../icons/Cancel/index.js";import{
|
|
1
|
+
import r from"@mui/material/styles/createTheme";import{buttonStyleOverrides as e}from"../components/atoms/Button/buttonThemeOverrides.js";import{iconButtonStyleOverrides as o}from"../components/atoms/IconButton/iconButtonThemeOverrides.js";import t from"../icons/Cancel/index.js";import{autocompleteOverrides as i}from"./overrides/autocompleteOverrides.js";import{checkboxOverrides as s}from"./overrides/checkboxOverrides.js";import{formControlLabelOverrides as p}from"./overrides/formControlLabelOverrides.js";import{formHelperTextOverrides as m}from"./overrides/formHelperTextOverrides.js";import{formLabelOverrides as a}from"./overrides/formLabelOverrides.js";import{inputBaseOverrides as d}from"./overrides/inputBaseOverrides.js";import{inputLabelOverrides as n}from"./overrides/inputLabelOverrides.js";import{listItemTextOverrides as l}from"./overrides/listItemTextOverrides.js";import{menuItemOverrides as u}from"./overrides/menuItemOverrides.js";import{menuOverrides as c}from"./overrides/menuOverrides.js";import{selectOverrides as v}from"./overrides/selectOverrides.js";import{textFieldOverrides as f}from"./overrides/textFieldOverrides.js";import{breakpointValues as h}from"./tokens/breakpoints/breakpoints.js";import{lightColours as b,darkColours as g}from"./tokens/colours/semantic.js";import{radius as y}from"./tokens/radius/radius.js";import{shadows as M}from"./tokens/shadows/shadows.js";import{typographyVariantMapping as j}from"./tokens/typography/variant-mapping.js";import{typography as O,getMobileTextStyle as k}from"./typography.js";const x=x=>{const T={typography:O,palette:"light"===x?b:g,radius:y,breakpoints:{values:h},customShadows:{...M}},w=r(T);return Object.keys(O).forEach((r=>{const e=r.split(/(?=[A-Z])/)[0],o=r;w.typography[o]={...w.typography[o],[w.breakpoints.down("tablet")]:{...k(e)}}})),r({...T,typography:w.typography,shape:{borderRadius:4},customShadows:w.customShadows,components:{MuiAlert:{defaultProps:{components:{CloseIcon:t}},styleOverrides:{root:{borderRadius:"8px",padding:"24px"},icon:{marginRight:"12px",padding:0},action:{padding:0,"& button":{marginTop:"-5px"}},message:{padding:0}}},MuiButton:e(w),MuiIconButton:o(),MuiCard:{styleOverrides:{root:{boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:w.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold",paddingLeft:"6px",paddingRight:"6px"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:w.palette.semantic.fill["fill-primary-weak"]},"&:not(:last-child)":{borderBottom:`1px solid ${w.palette.semantic.stroke["stroke-weak"]}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:w.palette.semantic.fill["fill-secondary"],cursor:"pointer"}}}},MuiTypography:{defaultProps:{variantMapping:j}},MuiAutocomplete:i(w),MuiCheckbox:s(w),MuiFormControlLabel:p(w),MuiFormHelperText:m(w),MuiFormLabel:a(w),MuiInputBase:d(w),MuiInputLabel:n(w),MuiListItemText:l(w),MuiMenu:c(w),MuiMenuItem:u(w),MuiSelect:v(w),MuiTextField:f(w)}})},T=x("light"),w=x("dark");export{w as darkTheme,T as lightTheme};
|
|
2
2
|
//# sourceMappingURL=flipdishPublicTheme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flipdishPublicTheme.js","sources":["../../src/themes/flipdishPublicTheme.ts"],"sourcesContent":["import createTheme, { type Theme, type ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport { buttonStyleOverrides } from '../components/atoms/Button/buttonThemeOverrides';\nimport { iconButtonStyleOverrides } from '../components/atoms/IconButton/iconButtonThemeOverrides';\nimport CancelIcon from '../icons/Cancel';\nimport { checkboxOverrides } from './overrides/checkboxOverrides';\nimport { formControlLabelOverrides } from './overrides/formControlLabelOverrides';\nimport { formHelperTextOverrides } from './overrides/formHelperTextOverrides';\nimport { formLabelOverrides } from './overrides/formLabelOverrides';\nimport { inputBaseOverrides } from './overrides/inputBaseOverrides';\nimport { inputLabelOverrides } from './overrides/inputLabelOverrides';\nimport { listItemTextOverrides } from './overrides/listItemTextOverrides';\nimport { menuItemOverrides } from './overrides/menuItemOverrides';\nimport { menuOverrides } from './overrides/menuOverrides';\nimport { selectOverrides } from './overrides/selectOverrides';\nimport { textFieldOverrides } from './overrides/textFieldOverrides';\nimport { breakpointValues } from './tokens/breakpoints/breakpoints';\nimport { darkColours, lightColours } from './tokens/colours/semantic';\nimport { radius } from './tokens/radius/radius';\nimport { shadows } from './tokens/shadows/shadows';\nimport { fontSize } from './tokens/typography/font-size';\nimport { typographyVariantMapping } from './tokens/typography/variant-mapping';\nimport { getMobileTextStyle, typography } from './typography';\n\nconst createFlipdishThemeFactory = (mode: 'dark' | 'light'): Theme => {\n const themeOptions: ThemeOptions = {\n typography,\n palette: mode === 'light' ? lightColours : darkColours,\n radius,\n breakpoints: {\n values: breakpointValues,\n },\n customShadows: {\n ...shadows,\n },\n };\n const baseTheme = createTheme(themeOptions);\n\n /*\n Add mobile text styles to typography\n Has to be done using media queries, otherwise it isn't responsive :(\n https://mui.com/material-ui/customization/typography/#responsive-font-sizes\n */\n Object.keys(typography).forEach((key) => {\n // only key before the suffix split by capital letter (h1Strong -> h1)\n const keyWithoutVariantSuffix = key.split(/(?=[A-Z])/)[0];\n const typographyKey = key as keyof typeof typography;\n baseTheme.typography[typographyKey] = {\n ...baseTheme.typography[typographyKey],\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(keyWithoutVariantSuffix as keyof (typeof fontSize)['mobile']),\n },\n };\n });\n\n // Create final theme with component overrides and additional configurations\n return createTheme({\n ...themeOptions,\n typography: baseTheme.typography,\n shape: {\n borderRadius: 4,\n },\n customShadows: baseTheme.customShadows,\n components: {\n MuiAlert: {\n defaultProps: {\n components: {\n CloseIcon: CancelIcon,\n },\n },\n styleOverrides: {\n root: {\n // TODO: Replace with borderRadius from tokens when implemented\n borderRadius: '8px',\n // TODO: Replace with spacing from tokens when implemented\n padding: '24px',\n },\n icon: {\n // TODO: Replace with spacing from tokens when implemented\n marginRight: '12px',\n padding: 0,\n },\n action: {\n padding: 0,\n '& button': {\n marginTop: '-5px',\n },\n },\n message: {\n padding: 0,\n },\n },\n },\n MuiButton: buttonStyleOverrides(baseTheme),\n MuiIconButton: iconButtonStyleOverrides(),\n MuiCard: {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: baseTheme.palette.divider,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n fontWeight: 'bold',\n paddingLeft: '6px',\n paddingRight: '6px',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-primary-weak'],\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${baseTheme.palette.semantic.stroke['stroke-weak']}`,\n },\n },\n },\n },\n MuiTableRow: {\n styleOverrides: {\n root: {\n '&.MuiTableRow-hover:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-secondary'],\n cursor: 'pointer',\n },\n },\n },\n },\n MuiTypography: {\n defaultProps: {\n variantMapping: typographyVariantMapping,\n },\n },\n
|
|
1
|
+
{"version":3,"file":"flipdishPublicTheme.js","sources":["../../src/themes/flipdishPublicTheme.ts"],"sourcesContent":["import createTheme, { type Theme, type ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport { buttonStyleOverrides } from '../components/atoms/Button/buttonThemeOverrides';\nimport { iconButtonStyleOverrides } from '../components/atoms/IconButton/iconButtonThemeOverrides';\nimport CancelIcon from '../icons/Cancel';\nimport { autocompleteOverrides } from './overrides/autocompleteOverrides';\nimport { checkboxOverrides } from './overrides/checkboxOverrides';\nimport { formControlLabelOverrides } from './overrides/formControlLabelOverrides';\nimport { formHelperTextOverrides } from './overrides/formHelperTextOverrides';\nimport { formLabelOverrides } from './overrides/formLabelOverrides';\nimport { inputBaseOverrides } from './overrides/inputBaseOverrides';\nimport { inputLabelOverrides } from './overrides/inputLabelOverrides';\nimport { listItemTextOverrides } from './overrides/listItemTextOverrides';\nimport { menuItemOverrides } from './overrides/menuItemOverrides';\nimport { menuOverrides } from './overrides/menuOverrides';\nimport { selectOverrides } from './overrides/selectOverrides';\nimport { textFieldOverrides } from './overrides/textFieldOverrides';\nimport { breakpointValues } from './tokens/breakpoints/breakpoints';\nimport { darkColours, lightColours } from './tokens/colours/semantic';\nimport { radius } from './tokens/radius/radius';\nimport { shadows } from './tokens/shadows/shadows';\nimport { fontSize } from './tokens/typography/font-size';\nimport { typographyVariantMapping } from './tokens/typography/variant-mapping';\nimport { getMobileTextStyle, typography } from './typography';\n\nconst createFlipdishThemeFactory = (mode: 'dark' | 'light'): Theme => {\n const themeOptions: ThemeOptions = {\n typography,\n palette: mode === 'light' ? lightColours : darkColours,\n radius,\n breakpoints: {\n values: breakpointValues,\n },\n customShadows: {\n ...shadows,\n },\n };\n const baseTheme = createTheme(themeOptions);\n\n /*\n Add mobile text styles to typography\n Has to be done using media queries, otherwise it isn't responsive :(\n https://mui.com/material-ui/customization/typography/#responsive-font-sizes\n */\n Object.keys(typography).forEach((key) => {\n // only key before the suffix split by capital letter (h1Strong -> h1)\n const keyWithoutVariantSuffix = key.split(/(?=[A-Z])/)[0];\n const typographyKey = key as keyof typeof typography;\n baseTheme.typography[typographyKey] = {\n ...baseTheme.typography[typographyKey],\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(keyWithoutVariantSuffix as keyof (typeof fontSize)['mobile']),\n },\n };\n });\n\n // Create final theme with component overrides and additional configurations\n return createTheme({\n ...themeOptions,\n typography: baseTheme.typography,\n shape: {\n borderRadius: 4,\n },\n customShadows: baseTheme.customShadows,\n components: {\n MuiAlert: {\n defaultProps: {\n components: {\n CloseIcon: CancelIcon,\n },\n },\n styleOverrides: {\n root: {\n // TODO: Replace with borderRadius from tokens when implemented\n borderRadius: '8px',\n // TODO: Replace with spacing from tokens when implemented\n padding: '24px',\n },\n icon: {\n // TODO: Replace with spacing from tokens when implemented\n marginRight: '12px',\n padding: 0,\n },\n action: {\n padding: 0,\n '& button': {\n marginTop: '-5px',\n },\n },\n message: {\n padding: 0,\n },\n },\n },\n MuiButton: buttonStyleOverrides(baseTheme),\n MuiIconButton: iconButtonStyleOverrides(),\n MuiCard: {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: baseTheme.palette.divider,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n fontWeight: 'bold',\n paddingLeft: '6px',\n paddingRight: '6px',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-primary-weak'],\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${baseTheme.palette.semantic.stroke['stroke-weak']}`,\n },\n },\n },\n },\n MuiTableRow: {\n styleOverrides: {\n root: {\n '&.MuiTableRow-hover:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-secondary'],\n cursor: 'pointer',\n },\n },\n },\n },\n MuiTypography: {\n defaultProps: {\n variantMapping: typographyVariantMapping,\n },\n },\n MuiAutocomplete: autocompleteOverrides(baseTheme),\n MuiCheckbox: checkboxOverrides(baseTheme),\n MuiFormControlLabel: formControlLabelOverrides(baseTheme),\n MuiFormHelperText: formHelperTextOverrides(baseTheme),\n MuiFormLabel: formLabelOverrides(baseTheme),\n MuiInputBase: inputBaseOverrides(baseTheme),\n MuiInputLabel: inputLabelOverrides(baseTheme),\n MuiListItemText: listItemTextOverrides(baseTheme),\n MuiMenu: menuOverrides(baseTheme),\n MuiMenuItem: menuItemOverrides(baseTheme),\n MuiSelect: selectOverrides(baseTheme),\n MuiTextField: textFieldOverrides(baseTheme),\n },\n });\n};\n\nexport const lightTheme = createFlipdishThemeFactory('light');\nexport const darkTheme = createFlipdishThemeFactory('dark');\n"],"names":["createFlipdishThemeFactory","mode","themeOptions","typography","palette","lightColours","darkColours","radius","breakpoints","values","breakpointValues","customShadows","shadows","baseTheme","createTheme","Object","keys","forEach","key","keyWithoutVariantSuffix","split","typographyKey","down","getMobileTextStyle","shape","borderRadius","components","MuiAlert","defaultProps","CloseIcon","CancelIcon","styleOverrides","root","padding","icon","marginRight","action","marginTop","message","MuiButton","buttonStyleOverrides","MuiIconButton","iconButtonStyleOverrides","MuiCard","boxShadow","borderWidth","borderStyle","borderColor","divider","MuiChip","fontWeight","paddingLeft","paddingRight","MuiListItemButton","backgroundColor","semantic","fill","borderBottom","stroke","MuiTableRow","cursor","MuiTypography","variantMapping","typographyVariantMapping","MuiAutocomplete","autocompleteOverrides","MuiCheckbox","checkboxOverrides","MuiFormControlLabel","formControlLabelOverrides","MuiFormHelperText","formHelperTextOverrides","MuiFormLabel","formLabelOverrides","MuiInputBase","inputBaseOverrides","MuiInputLabel","inputLabelOverrides","MuiListItemText","listItemTextOverrides","MuiMenu","menuOverrides","MuiMenuItem","menuItemOverrides","MuiSelect","selectOverrides","MuiTextField","textFieldOverrides","lightTheme","darkTheme"],"mappings":"khDAyBA,MAAMA,EAA8BC,IAClC,MAAMC,EAA6B,CACjCC,aACAC,QAAkB,UAATH,EAAmBI,EAAeC,EAC3CC,SACAC,YAAa,CACXC,OAAQC,GAEVC,cAAe,IACVC,IAGDC,EAAYC,EAAYZ,GAoB9B,OAbAa,OAAOC,KAAKb,GAAYc,SAASC,IAE/B,MAAMC,EAA0BD,EAAIE,MAAM,aAAa,GACjDC,EAAgBH,EACtBL,EAAUV,WAAWkB,GAAiB,IACjCR,EAAUV,WAAWkB,GACxB,CAACR,EAAUL,YAAYc,KAAK,WAAY,IACnCC,EAAmBJ,QAMrBL,EAAY,IACdZ,EACHC,WAAYU,EAAUV,WACtBqB,MAAO,CACLC,aAAc,GAEhBd,cAAeE,EAAUF,cACzBe,WAAY,CACVC,SAAU,CACRC,aAAc,CACZF,WAAY,CACVG,UAAWC,IAGfC,eAAgB,CACdC,KAAM,CAEJP,aAAc,MAEdQ,QAAS,QAEXC,KAAM,CAEJC,YAAa,OACbF,QAAS,GAEXG,OAAQ,CACNH,QAAS,EACT,WAAY,CACVI,UAAW,SAGfC,QAAS,CACPL,QAAS,KAIfM,UAAWC,EAAqB3B,GAChC4B,cAAeC,IACfC,QAAS,CACPZ,eAAgB,CACdC,KAAM,CACJY,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,YAAalC,EAAUT,QAAQ4C,WAIrCC,QAAS,CACPlB,eAAgB,CACdC,KAAM,CACJkB,WAAY,OACZC,YAAa,MACbC,aAAc,SAIpBC,kBAAmB,CACjBtB,eAAgB,CACdC,KAAM,CACJ,UAAW,CACTsB,gBAAiBzC,EAAUT,QAAQmD,SAASC,KAAK,sBAEnD,qBAAsB,CACpBC,aAAc,aAAa5C,EAAUT,QAAQmD,SAASG,OAAO,qBAKrEC,YAAa,CACX5B,eAAgB,CACdC,KAAM,CACJ,4BAA6B,CAC3BsB,gBAAiBzC,EAAUT,QAAQmD,SAASC,KAAK,kBACjDI,OAAQ,cAKhBC,cAAe,CACbjC,aAAc,CACZkC,eAAgBC,IAGpBC,gBAAiBC,EAAsBpD,GACvCqD,YAAaC,EAAkBtD,GAC/BuD,oBAAqBC,EAA0BxD,GAC/CyD,kBAAmBC,EAAwB1D,GAC3C2D,aAAcC,EAAmB5D,GACjC6D,aAAcC,EAAmB9D,GACjC+D,cAAeC,EAAoBhE,GACnCiE,gBAAiBC,EAAsBlE,GACvCmE,QAASC,EAAcpE,GACvBqE,YAAaC,EAAkBtE,GAC/BuE,UAAWC,EAAgBxE,GAC3ByE,aAAcC,EAAmB1E,OAK1B2E,EAAaxF,EAA2B,SACxCyF,EAAYzF,EAA2B"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");var e=require("../typography.cjs.js");const t=t=>({defaultProps:{slotProps:{clearIndicator:{disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0},popupIndicator:{disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0},paper:{elevation:0,sx:e=>({backgroundColor:e.palette.semantic.background["background-overlay"],border:"1px solid",borderColor:e.palette.semantic.stroke["stroke-weak"],borderRadius:e.radius["radius-8"],boxShadow:e.customShadows.overlay,m:e.spacing(.5,0)})},listbox:{sx:e=>({p:e.spacing(1,0)})}}},styleOverrides:{root:{"& .MuiOutlinedInput-root .MuiInputBase-input.MuiAutocomplete-input":{padding:0}},inputRoot:{alignItems:"center",display:"flex",gap:t.spacing(.5),padding:t.spacing(.5,2)},input:{alignSelf:"center",lineHeight:t.typography.body2.lineHeight,padding:0},endAdornment:{alignItems:"center",display:"flex",gap:t.spacing(1),justifyContent:"center",padding:t.spacing(0,.5)},clearIndicator:{height:24,margin:0,padding:0,width:24},popupIndicator:{height:24,margin:0,padding:0,width:24},popupIndicatorOpen:{transform:"none"},tag:{margin:0,maxWidth:"100%"},noOptions:{...e.typography.b1Weak,color:t.palette.semantic.text["text-weak"],[t.breakpoints.down("tablet")]:{...e.getMobileTextStyle("b1")}},loading:{...e.typography.b1Weak,color:t.palette.semantic.text["text-weak"],[t.breakpoints.down("tablet")]:{...e.getMobileTextStyle("b1")}}}});exports.autocompleteOverrides=t,exports.default=t;
|
|
2
|
+
//# sourceMappingURL=autocompleteOverrides.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocompleteOverrides.cjs.js","sources":["../../../src/themes/overrides/autocompleteOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const autocompleteOverrides = (theme: Theme): Components<Theme>['MuiAutocomplete'] => ({\n defaultProps: {\n slotProps: {\n clearIndicator: {\n disableRipple: true,\n disableFocusRipple: true,\n disableTouchRipple: true,\n },\n popupIndicator: {\n disableRipple: true,\n disableFocusRipple: true,\n disableTouchRipple: true,\n },\n paper: {\n elevation: 0,\n sx: (theme) => ({\n backgroundColor: theme.palette.semantic.background['background-overlay'],\n border: '1px solid',\n borderColor: theme.palette.semantic.stroke['stroke-weak'],\n borderRadius: theme.radius['radius-8'],\n boxShadow: theme.customShadows.overlay,\n m: theme.spacing(0.5, 0),\n }),\n },\n listbox: {\n sx: (theme) => ({ p: theme.spacing(1, 0) }),\n },\n },\n },\n styleOverrides: {\n root: {\n '& .MuiOutlinedInput-root .MuiInputBase-input.MuiAutocomplete-input': {\n padding: 0,\n },\n },\n inputRoot: {\n alignItems: 'center',\n display: 'flex',\n gap: theme.spacing(0.5),\n padding: theme.spacing(0.5, 2),\n },\n input: {\n alignSelf: 'center',\n lineHeight: theme.typography.body2.lineHeight, // align text with tags\n padding: 0,\n },\n endAdornment: {\n alignItems: 'center',\n display: 'flex',\n gap: theme.spacing(1),\n justifyContent: 'center',\n padding: theme.spacing(0, 0.5),\n },\n clearIndicator: {\n height: 24,\n margin: 0,\n padding: 0,\n width: 24,\n },\n popupIndicator: {\n height: 24,\n margin: 0,\n padding: 0,\n width: 24,\n },\n popupIndicatorOpen: {\n transform: 'none',\n },\n tag: {\n margin: 0,\n maxWidth: '100%',\n },\n noOptions: {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-weak'],\n\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('b1'),\n },\n },\n loading: {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-weak'],\n\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('b1'),\n },\n },\n },\n});\n\nexport default autocompleteOverrides;\n"],"names":["autocompleteOverrides","theme","defaultProps","slotProps","clearIndicator","disableRipple","disableFocusRipple","disableTouchRipple","popupIndicator","paper","elevation","sx","backgroundColor","palette","semantic","background","border","borderColor","stroke","borderRadius","radius","boxShadow","customShadows","overlay","m","spacing","listbox","p","styleOverrides","root","padding","inputRoot","alignItems","display","gap","input","alignSelf","lineHeight","typography","body2","endAdornment","justifyContent","height","margin","width","popupIndicatorOpen","transform","tag","maxWidth","noOptions","b1Weak","color","text","breakpoints","down","getMobileTextStyle","loading"],"mappings":"gJAIaA,EAAyBC,IAAY,CAChDC,aAAc,CACZC,UAAW,CACTC,eAAgB,CACdC,eAAe,EACfC,oBAAoB,EACpBC,oBAAoB,GAEtBC,eAAgB,CACdH,eAAe,EACfC,oBAAoB,EACpBC,oBAAoB,GAEtBE,MAAO,CACLC,UAAW,EACXC,GAAKV,IAAK,CACRW,gBAAiBX,EAAMY,QAAQC,SAASC,WAAW,sBACnDC,OAAQ,YACRC,YAAahB,EAAMY,QAAQC,SAASI,OAAO,eAC3CC,aAAclB,EAAMmB,OAAO,YAC3BC,UAAWpB,EAAMqB,cAAcC,QAC/BC,EAAGvB,EAAMwB,QAAQ,GAAK,MAG1BC,QAAS,CACPf,GAAKV,IAAK,CAAQ0B,EAAG1B,EAAMwB,QAAQ,EAAG,QAI5CG,eAAgB,CACdC,KAAM,CACJ,qEAAsE,CACpEC,QAAS,IAGbC,UAAW,CACTC,WAAY,SACZC,QAAS,OACTC,IAAKjC,EAAMwB,QAAQ,IACnBK,QAAS7B,EAAMwB,QAAQ,GAAK,IAE9BU,MAAO,CACLC,UAAW,SACXC,WAAYpC,EAAMqC,WAAWC,MAAMF,WACnCP,QAAS,GAEXU,aAAc,CACZR,WAAY,SACZC,QAAS,OACTC,IAAKjC,EAAMwB,QAAQ,GACnBgB,eAAgB,SAChBX,QAAS7B,EAAMwB,QAAQ,EAAG,KAE5BrB,eAAgB,CACdsC,OAAQ,GACRC,OAAQ,EACRb,QAAS,EACTc,MAAO,IAETpC,eAAgB,CACdkC,OAAQ,GACRC,OAAQ,EACRb,QAAS,EACTc,MAAO,IAETC,mBAAoB,CAClBC,UAAW,QAEbC,IAAK,CACHJ,OAAQ,EACRK,SAAU,QAEZC,UAAW,IACNX,EAAAA,WAAWY,OACdC,MAAOlD,EAAMY,QAAQC,SAASsC,KAAK,aAEnC,CAACnD,EAAMoD,YAAYC,KAAK,WAAY,IAC/BC,EAAAA,mBAAmB,QAG1BC,QAAS,IACJlB,EAAAA,WAAWY,OACdC,MAAOlD,EAAMY,QAAQC,SAASsC,KAAK,aAEnC,CAACnD,EAAMoD,YAAYC,KAAK,WAAY,IAC/BC,EAAAA,mBAAmB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"@mui/material/styles";import{getMobileTextStyle as e,typography as t}from"../typography.js";const a=a=>({defaultProps:{slotProps:{clearIndicator:{disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0},popupIndicator:{disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0},paper:{elevation:0,sx:e=>({backgroundColor:e.palette.semantic.background["background-overlay"],border:"1px solid",borderColor:e.palette.semantic.stroke["stroke-weak"],borderRadius:e.radius["radius-8"],boxShadow:e.customShadows.overlay,m:e.spacing(.5,0)})},listbox:{sx:e=>({p:e.spacing(1,0)})}}},styleOverrides:{root:{"& .MuiOutlinedInput-root .MuiInputBase-input.MuiAutocomplete-input":{padding:0}},inputRoot:{alignItems:"center",display:"flex",gap:a.spacing(.5),padding:a.spacing(.5,2)},input:{alignSelf:"center",lineHeight:a.typography.body2.lineHeight,padding:0},endAdornment:{alignItems:"center",display:"flex",gap:a.spacing(1),justifyContent:"center",padding:a.spacing(0,.5)},clearIndicator:{height:24,margin:0,padding:0,width:24},popupIndicator:{height:24,margin:0,padding:0,width:24},popupIndicatorOpen:{transform:"none"},tag:{margin:0,maxWidth:"100%"},noOptions:{...t.b1Weak,color:a.palette.semantic.text["text-weak"],[a.breakpoints.down("tablet")]:{...e("b1")}},loading:{...t.b1Weak,color:a.palette.semantic.text["text-weak"],[a.breakpoints.down("tablet")]:{...e("b1")}}}});export{a as autocompleteOverrides,a as default};
|
|
2
|
+
//# sourceMappingURL=autocompleteOverrides.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocompleteOverrides.js","sources":["../../../src/themes/overrides/autocompleteOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const autocompleteOverrides = (theme: Theme): Components<Theme>['MuiAutocomplete'] => ({\n defaultProps: {\n slotProps: {\n clearIndicator: {\n disableRipple: true,\n disableFocusRipple: true,\n disableTouchRipple: true,\n },\n popupIndicator: {\n disableRipple: true,\n disableFocusRipple: true,\n disableTouchRipple: true,\n },\n paper: {\n elevation: 0,\n sx: (theme) => ({\n backgroundColor: theme.palette.semantic.background['background-overlay'],\n border: '1px solid',\n borderColor: theme.palette.semantic.stroke['stroke-weak'],\n borderRadius: theme.radius['radius-8'],\n boxShadow: theme.customShadows.overlay,\n m: theme.spacing(0.5, 0),\n }),\n },\n listbox: {\n sx: (theme) => ({ p: theme.spacing(1, 0) }),\n },\n },\n },\n styleOverrides: {\n root: {\n '& .MuiOutlinedInput-root .MuiInputBase-input.MuiAutocomplete-input': {\n padding: 0,\n },\n },\n inputRoot: {\n alignItems: 'center',\n display: 'flex',\n gap: theme.spacing(0.5),\n padding: theme.spacing(0.5, 2),\n },\n input: {\n alignSelf: 'center',\n lineHeight: theme.typography.body2.lineHeight, // align text with tags\n padding: 0,\n },\n endAdornment: {\n alignItems: 'center',\n display: 'flex',\n gap: theme.spacing(1),\n justifyContent: 'center',\n padding: theme.spacing(0, 0.5),\n },\n clearIndicator: {\n height: 24,\n margin: 0,\n padding: 0,\n width: 24,\n },\n popupIndicator: {\n height: 24,\n margin: 0,\n padding: 0,\n width: 24,\n },\n popupIndicatorOpen: {\n transform: 'none',\n },\n tag: {\n margin: 0,\n maxWidth: '100%',\n },\n noOptions: {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-weak'],\n\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('b1'),\n },\n },\n loading: {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-weak'],\n\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('b1'),\n },\n },\n },\n});\n\nexport default autocompleteOverrides;\n"],"names":["autocompleteOverrides","theme","defaultProps","slotProps","clearIndicator","disableRipple","disableFocusRipple","disableTouchRipple","popupIndicator","paper","elevation","sx","backgroundColor","palette","semantic","background","border","borderColor","stroke","borderRadius","radius","boxShadow","customShadows","overlay","m","spacing","listbox","p","styleOverrides","root","padding","inputRoot","alignItems","display","gap","input","alignSelf","lineHeight","typography","body2","endAdornment","justifyContent","height","margin","width","popupIndicatorOpen","transform","tag","maxWidth","noOptions","b1Weak","color","text","breakpoints","down","getMobileTextStyle","loading"],"mappings":"yGAIaA,EAAyBC,IAAY,CAChDC,aAAc,CACZC,UAAW,CACTC,eAAgB,CACdC,eAAe,EACfC,oBAAoB,EACpBC,oBAAoB,GAEtBC,eAAgB,CACdH,eAAe,EACfC,oBAAoB,EACpBC,oBAAoB,GAEtBE,MAAO,CACLC,UAAW,EACXC,GAAKV,IAAK,CACRW,gBAAiBX,EAAMY,QAAQC,SAASC,WAAW,sBACnDC,OAAQ,YACRC,YAAahB,EAAMY,QAAQC,SAASI,OAAO,eAC3CC,aAAclB,EAAMmB,OAAO,YAC3BC,UAAWpB,EAAMqB,cAAcC,QAC/BC,EAAGvB,EAAMwB,QAAQ,GAAK,MAG1BC,QAAS,CACPf,GAAKV,IAAK,CAAQ0B,EAAG1B,EAAMwB,QAAQ,EAAG,QAI5CG,eAAgB,CACdC,KAAM,CACJ,qEAAsE,CACpEC,QAAS,IAGbC,UAAW,CACTC,WAAY,SACZC,QAAS,OACTC,IAAKjC,EAAMwB,QAAQ,IACnBK,QAAS7B,EAAMwB,QAAQ,GAAK,IAE9BU,MAAO,CACLC,UAAW,SACXC,WAAYpC,EAAMqC,WAAWC,MAAMF,WACnCP,QAAS,GAEXU,aAAc,CACZR,WAAY,SACZC,QAAS,OACTC,IAAKjC,EAAMwB,QAAQ,GACnBgB,eAAgB,SAChBX,QAAS7B,EAAMwB,QAAQ,EAAG,KAE5BrB,eAAgB,CACdsC,OAAQ,GACRC,OAAQ,EACRb,QAAS,EACTc,MAAO,IAETpC,eAAgB,CACdkC,OAAQ,GACRC,OAAQ,EACRb,QAAS,EACTc,MAAO,IAETC,mBAAoB,CAClBC,UAAW,QAEbC,IAAK,CACHJ,OAAQ,EACRK,SAAU,QAEZC,UAAW,IACNX,EAAWY,OACdC,MAAOlD,EAAMY,QAAQC,SAASsC,KAAK,aAEnC,CAACnD,EAAMoD,YAAYC,KAAK,WAAY,IAC/BC,EAAmB,QAG1BC,QAAS,IACJlB,EAAWY,OACdC,MAAOlD,EAAMY,QAAQC,SAASsC,KAAK,aAEnC,CAACnD,EAAMoD,YAAYC,KAAK,WAAY,IAC/BC,EAAmB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");var e=require("../typography.cjs.js");const t=t=>({styleOverrides:{root:{backgroundColor:t.palette.semantic.fill["fill-inverse-strong"],backgroundImage:"none",border:"1px solid",borderColor:t.palette.semantic.stroke["stroke-strong"],borderRadius:t.radius["radius-8"],boxSizing:"border-box",minHeight:48,padding:t.spacing(0,2),"&.Mui-disabled":{borderColor:t.palette.semantic.stroke["stroke-disabled"],cursor:"not-allowed",opacity:1,pointerEvents:"auto"},"&.Mui-error":{backgroundColor:t.palette.semantic.fill["fill-error-weak"],border:"2px solid",borderColor:t.palette.semantic.stroke["stroke-error-strong"]},"&.MuiInputBase-multiline":{padding:t.spacing(1.5,2)},"&.Mui-focused:not(.Mui-disabled), &:focus:not(.Mui-disabled)":{outline:`2px solid ${t.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"},"&:hover:not(.Mui-disabled)":{backgroundImage:`linear-gradient(${t.palette.semantic.fill["fill-hover"]}, ${t.palette.semantic.fill["fill-hover"]})`},"&:active:not(.Mui-disabled)":{backgroundImage:`linear-gradient(${t.palette.semantic.fill["fill-press"]}, ${t.palette.semantic.fill["fill-press"]})`}},input:{...e.typography.b1Weak,color:t.palette.semantic.text["text-strong"],"&.MuiOutlinedInput-input":{padding:0},"&::placeholder":{...e.typography.b1Weak,color:t.palette.semantic.text["text-weak"],opacity:1},"&.Mui-disabled":{color:t.palette.semantic.text["text-disabled"],cursor:"not-allowed",pointerEvents:"auto",
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");var e=require("../typography.cjs.js");const t=t=>({styleOverrides:{root:{backgroundColor:t.palette.semantic.fill["fill-inverse-strong"],backgroundImage:"none",border:"1px solid",borderColor:t.palette.semantic.stroke["stroke-strong"],borderRadius:t.radius["radius-8"],boxSizing:"border-box",minHeight:48,padding:t.spacing(0,2),"&.Mui-disabled":{borderColor:t.palette.semantic.stroke["stroke-disabled"],cursor:"not-allowed",opacity:1,pointerEvents:"auto"},"&.Mui-error":{backgroundColor:t.palette.semantic.fill["fill-error-weak"],border:"2px solid",borderColor:t.palette.semantic.stroke["stroke-error-strong"]},"&.MuiInputBase-multiline":{padding:t.spacing(1.5,2)},"&.Mui-focused:not(.Mui-disabled), &:focus:not(.Mui-disabled)":{outline:`2px solid ${t.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"},"&:hover:not(.Mui-disabled)":{backgroundImage:`linear-gradient(${t.palette.semantic.fill["fill-hover"]}, ${t.palette.semantic.fill["fill-hover"]})`},"&:active:not(.Mui-disabled)":{backgroundImage:`linear-gradient(${t.palette.semantic.fill["fill-press"]}, ${t.palette.semantic.fill["fill-press"]})`}},input:{...e.typography.b1Weak,color:t.palette.semantic.text["text-strong"],"&.MuiOutlinedInput-input":{padding:0},"&::placeholder":{...e.typography.b1Weak,color:t.palette.semantic.text["text-weak"],opacity:1},"&.Mui-disabled":{color:t.palette.semantic.text["text-disabled"],cursor:"not-allowed",pointerEvents:"auto",WebkitTextFillColor:t.palette.semantic.text["text-disabled"],"&::placeholder":{color:t.palette.semantic.text["text-disabled"],WebkitTextFillColor:t.palette.semantic.text["text-disabled"]}},[t.breakpoints.down("tablet")]:{...e.getMobileTextStyle("b1"),"&::placeholder":{...e.getMobileTextStyle("b1")}}}}});exports.default=t,exports.inputBaseOverrides=t;
|
|
2
2
|
//# sourceMappingURL=inputBaseOverrides.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputBaseOverrides.cjs.js","sources":["../../../src/themes/overrides/inputBaseOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const inputBaseOverrides = (theme: Theme): Components<Theme>['MuiInputBase'] => ({\n styleOverrides: {\n root: {\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n backgroundImage: 'none',\n border: '1px solid',\n borderColor: theme.palette.semantic.stroke['stroke-strong'],\n borderRadius: theme.radius['radius-8'],\n boxSizing: 'border-box',\n minHeight: 48,\n padding: theme.spacing(0, 2),\n\n '&.Mui-disabled': {\n borderColor: theme.palette.semantic.stroke['stroke-disabled'],\n cursor: 'not-allowed',\n opacity: 1, // Override default MUI opacity\n pointerEvents: 'auto',\n },\n '&.Mui-error': {\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n border: '2px solid',\n borderColor: theme.palette.semantic.stroke['stroke-error-strong'],\n },\n '&.MuiInputBase-multiline': {\n padding: theme.spacing(1.5, 2),\n },\n '&.Mui-focused:not(.Mui-disabled), &:focus:not(.Mui-disabled)': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n '&:hover:not(.Mui-disabled)': {\n backgroundImage: `linear-gradient(${theme.palette.semantic.fill['fill-hover']}, ${theme.palette.semantic.fill['fill-hover']})`,\n },\n '&:active:not(.Mui-disabled)': {\n backgroundImage: `linear-gradient(${theme.palette.semantic.fill['fill-press']}, ${theme.palette.semantic.fill['fill-press']})`,\n },\n },\n input: {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-strong'],\n\n '&.MuiOutlinedInput-input': {\n padding: 0,\n },\n '&::placeholder': {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-weak'],\n opacity: 1,\n },\n '&.Mui-disabled': {\n color: theme.palette.semantic.text['text-disabled'],\n cursor: 'not-allowed',\n pointerEvents: 'auto',\n
|
|
1
|
+
{"version":3,"file":"inputBaseOverrides.cjs.js","sources":["../../../src/themes/overrides/inputBaseOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const inputBaseOverrides = (theme: Theme): Components<Theme>['MuiInputBase'] => ({\n styleOverrides: {\n root: {\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n backgroundImage: 'none',\n border: '1px solid',\n borderColor: theme.palette.semantic.stroke['stroke-strong'],\n borderRadius: theme.radius['radius-8'],\n boxSizing: 'border-box',\n minHeight: 48,\n padding: theme.spacing(0, 2),\n\n '&.Mui-disabled': {\n borderColor: theme.palette.semantic.stroke['stroke-disabled'],\n cursor: 'not-allowed',\n opacity: 1, // Override default MUI opacity\n pointerEvents: 'auto',\n },\n '&.Mui-error': {\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n border: '2px solid',\n borderColor: theme.palette.semantic.stroke['stroke-error-strong'],\n },\n '&.MuiInputBase-multiline': {\n padding: theme.spacing(1.5, 2),\n },\n '&.Mui-focused:not(.Mui-disabled), &:focus:not(.Mui-disabled)': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n '&:hover:not(.Mui-disabled)': {\n backgroundImage: `linear-gradient(${theme.palette.semantic.fill['fill-hover']}, ${theme.palette.semantic.fill['fill-hover']})`,\n },\n '&:active:not(.Mui-disabled)': {\n backgroundImage: `linear-gradient(${theme.palette.semantic.fill['fill-press']}, ${theme.palette.semantic.fill['fill-press']})`,\n },\n },\n input: {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-strong'],\n\n '&.MuiOutlinedInput-input': {\n padding: 0,\n },\n '&::placeholder': {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-weak'],\n opacity: 1,\n },\n '&.Mui-disabled': {\n color: theme.palette.semantic.text['text-disabled'],\n cursor: 'not-allowed',\n pointerEvents: 'auto',\n WebkitTextFillColor: theme.palette.semantic.text['text-disabled'],\n\n '&::placeholder': {\n color: theme.palette.semantic.text['text-disabled'],\n WebkitTextFillColor: theme.palette.semantic.text['text-disabled'],\n },\n },\n\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('b1'),\n\n '&::placeholder': {\n ...getMobileTextStyle('b1'),\n },\n },\n },\n },\n});\n\nexport default inputBaseOverrides;\n"],"names":["inputBaseOverrides","theme","styleOverrides","root","backgroundColor","palette","semantic","fill","backgroundImage","border","borderColor","stroke","borderRadius","radius","boxSizing","minHeight","padding","spacing","cursor","opacity","pointerEvents","outline","outlineOffset","input","typography","b1Weak","color","text","WebkitTextFillColor","breakpoints","down","getMobileTextStyle"],"mappings":"gJAIaA,EAAsBC,IAAY,CAC7CC,eAAgB,CACdC,KAAM,CACJC,gBAAiBH,EAAMI,QAAQC,SAASC,KAAK,uBAC7CC,gBAAiB,OACjBC,OAAQ,YACRC,YAAaT,EAAMI,QAAQC,SAASK,OAAO,iBAC3CC,aAAcX,EAAMY,OAAO,YAC3BC,UAAW,aACXC,UAAW,GACXC,QAASf,EAAMgB,QAAQ,EAAG,GAE1B,iBAAkB,CAChBP,YAAaT,EAAMI,QAAQC,SAASK,OAAO,mBAC3CO,OAAQ,cACRC,QAAS,EACTC,cAAe,QAEjB,cAAe,CACbhB,gBAAiBH,EAAMI,QAAQC,SAASC,KAAK,mBAC7CE,OAAQ,YACRC,YAAaT,EAAMI,QAAQC,SAASK,OAAO,wBAE7C,2BAA4B,CAC1BK,QAASf,EAAMgB,QAAQ,IAAK,IAE9B,+DAAgE,CAC9DI,QAAS,aAAapB,EAAMI,QAAQC,SAASK,OAAO,kBACpDW,cAAe,OAEjB,6BAA8B,CAC5Bd,gBAAiB,mBAAmBP,EAAMI,QAAQC,SAASC,KAAK,kBAAkBN,EAAMI,QAAQC,SAASC,KAAK,kBAEhH,8BAA+B,CAC7BC,gBAAiB,mBAAmBP,EAAMI,QAAQC,SAASC,KAAK,kBAAkBN,EAAMI,QAAQC,SAASC,KAAK,mBAGlHgB,MAAO,IACFC,EAAAA,WAAWC,OACdC,MAAOzB,EAAMI,QAAQC,SAASqB,KAAK,eAEnC,2BAA4B,CAC1BX,QAAS,GAEX,iBAAkB,IACbQ,EAAAA,WAAWC,OACdC,MAAOzB,EAAMI,QAAQC,SAASqB,KAAK,aACnCR,QAAS,GAEX,iBAAkB,CAChBO,MAAOzB,EAAMI,QAAQC,SAASqB,KAAK,iBACnCT,OAAQ,cACRE,cAAe,OACfQ,oBAAqB3B,EAAMI,QAAQC,SAASqB,KAAK,iBAEjD,iBAAkB,CAChBD,MAAOzB,EAAMI,QAAQC,SAASqB,KAAK,iBACnCC,oBAAqB3B,EAAMI,QAAQC,SAASqB,KAAK,mBAIrD,CAAC1B,EAAM4B,YAAYC,KAAK,WAAY,IAC/BC,EAAAA,mBAAmB,MAEtB,iBAAkB,IACbA,EAAAA,mBAAmB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"@mui/material/styles";import{getMobileTextStyle as e,typography as t}from"../typography.js";const o=o=>({styleOverrides:{root:{backgroundColor:o.palette.semantic.fill["fill-inverse-strong"],backgroundImage:"none",border:"1px solid",borderColor:o.palette.semantic.stroke["stroke-strong"],borderRadius:o.radius["radius-8"],boxSizing:"border-box",minHeight:48,padding:o.spacing(0,2),"&.Mui-disabled":{borderColor:o.palette.semantic.stroke["stroke-disabled"],cursor:"not-allowed",opacity:1,pointerEvents:"auto"},"&.Mui-error":{backgroundColor:o.palette.semantic.fill["fill-error-weak"],border:"2px solid",borderColor:o.palette.semantic.stroke["stroke-error-strong"]},"&.MuiInputBase-multiline":{padding:o.spacing(1.5,2)},"&.Mui-focused:not(.Mui-disabled), &:focus:not(.Mui-disabled)":{outline:`2px solid ${o.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"},"&:hover:not(.Mui-disabled)":{backgroundImage:`linear-gradient(${o.palette.semantic.fill["fill-hover"]}, ${o.palette.semantic.fill["fill-hover"]})`},"&:active:not(.Mui-disabled)":{backgroundImage:`linear-gradient(${o.palette.semantic.fill["fill-press"]}, ${o.palette.semantic.fill["fill-press"]})`}},input:{...t.b1Weak,color:o.palette.semantic.text["text-strong"],"&.MuiOutlinedInput-input":{padding:0},"&::placeholder":{...t.b1Weak,color:o.palette.semantic.text["text-weak"],opacity:1},"&.Mui-disabled":{color:o.palette.semantic.text["text-disabled"],cursor:"not-allowed",pointerEvents:"auto",
|
|
1
|
+
import"@mui/material/styles";import{getMobileTextStyle as e,typography as t}from"../typography.js";const o=o=>({styleOverrides:{root:{backgroundColor:o.palette.semantic.fill["fill-inverse-strong"],backgroundImage:"none",border:"1px solid",borderColor:o.palette.semantic.stroke["stroke-strong"],borderRadius:o.radius["radius-8"],boxSizing:"border-box",minHeight:48,padding:o.spacing(0,2),"&.Mui-disabled":{borderColor:o.palette.semantic.stroke["stroke-disabled"],cursor:"not-allowed",opacity:1,pointerEvents:"auto"},"&.Mui-error":{backgroundColor:o.palette.semantic.fill["fill-error-weak"],border:"2px solid",borderColor:o.palette.semantic.stroke["stroke-error-strong"]},"&.MuiInputBase-multiline":{padding:o.spacing(1.5,2)},"&.Mui-focused:not(.Mui-disabled), &:focus:not(.Mui-disabled)":{outline:`2px solid ${o.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"},"&:hover:not(.Mui-disabled)":{backgroundImage:`linear-gradient(${o.palette.semantic.fill["fill-hover"]}, ${o.palette.semantic.fill["fill-hover"]})`},"&:active:not(.Mui-disabled)":{backgroundImage:`linear-gradient(${o.palette.semantic.fill["fill-press"]}, ${o.palette.semantic.fill["fill-press"]})`}},input:{...t.b1Weak,color:o.palette.semantic.text["text-strong"],"&.MuiOutlinedInput-input":{padding:0},"&::placeholder":{...t.b1Weak,color:o.palette.semantic.text["text-weak"],opacity:1},"&.Mui-disabled":{color:o.palette.semantic.text["text-disabled"],cursor:"not-allowed",pointerEvents:"auto",WebkitTextFillColor:o.palette.semantic.text["text-disabled"],"&::placeholder":{color:o.palette.semantic.text["text-disabled"],WebkitTextFillColor:o.palette.semantic.text["text-disabled"]}},[o.breakpoints.down("tablet")]:{...e("b1"),"&::placeholder":{...e("b1")}}}}});export{o as default,o as inputBaseOverrides};
|
|
2
2
|
//# sourceMappingURL=inputBaseOverrides.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputBaseOverrides.js","sources":["../../../src/themes/overrides/inputBaseOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const inputBaseOverrides = (theme: Theme): Components<Theme>['MuiInputBase'] => ({\n styleOverrides: {\n root: {\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n backgroundImage: 'none',\n border: '1px solid',\n borderColor: theme.palette.semantic.stroke['stroke-strong'],\n borderRadius: theme.radius['radius-8'],\n boxSizing: 'border-box',\n minHeight: 48,\n padding: theme.spacing(0, 2),\n\n '&.Mui-disabled': {\n borderColor: theme.palette.semantic.stroke['stroke-disabled'],\n cursor: 'not-allowed',\n opacity: 1, // Override default MUI opacity\n pointerEvents: 'auto',\n },\n '&.Mui-error': {\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n border: '2px solid',\n borderColor: theme.palette.semantic.stroke['stroke-error-strong'],\n },\n '&.MuiInputBase-multiline': {\n padding: theme.spacing(1.5, 2),\n },\n '&.Mui-focused:not(.Mui-disabled), &:focus:not(.Mui-disabled)': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n '&:hover:not(.Mui-disabled)': {\n backgroundImage: `linear-gradient(${theme.palette.semantic.fill['fill-hover']}, ${theme.palette.semantic.fill['fill-hover']})`,\n },\n '&:active:not(.Mui-disabled)': {\n backgroundImage: `linear-gradient(${theme.palette.semantic.fill['fill-press']}, ${theme.palette.semantic.fill['fill-press']})`,\n },\n },\n input: {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-strong'],\n\n '&.MuiOutlinedInput-input': {\n padding: 0,\n },\n '&::placeholder': {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-weak'],\n opacity: 1,\n },\n '&.Mui-disabled': {\n color: theme.palette.semantic.text['text-disabled'],\n cursor: 'not-allowed',\n pointerEvents: 'auto',\n
|
|
1
|
+
{"version":3,"file":"inputBaseOverrides.js","sources":["../../../src/themes/overrides/inputBaseOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const inputBaseOverrides = (theme: Theme): Components<Theme>['MuiInputBase'] => ({\n styleOverrides: {\n root: {\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n backgroundImage: 'none',\n border: '1px solid',\n borderColor: theme.palette.semantic.stroke['stroke-strong'],\n borderRadius: theme.radius['radius-8'],\n boxSizing: 'border-box',\n minHeight: 48,\n padding: theme.spacing(0, 2),\n\n '&.Mui-disabled': {\n borderColor: theme.palette.semantic.stroke['stroke-disabled'],\n cursor: 'not-allowed',\n opacity: 1, // Override default MUI opacity\n pointerEvents: 'auto',\n },\n '&.Mui-error': {\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n border: '2px solid',\n borderColor: theme.palette.semantic.stroke['stroke-error-strong'],\n },\n '&.MuiInputBase-multiline': {\n padding: theme.spacing(1.5, 2),\n },\n '&.Mui-focused:not(.Mui-disabled), &:focus:not(.Mui-disabled)': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n '&:hover:not(.Mui-disabled)': {\n backgroundImage: `linear-gradient(${theme.palette.semantic.fill['fill-hover']}, ${theme.palette.semantic.fill['fill-hover']})`,\n },\n '&:active:not(.Mui-disabled)': {\n backgroundImage: `linear-gradient(${theme.palette.semantic.fill['fill-press']}, ${theme.palette.semantic.fill['fill-press']})`,\n },\n },\n input: {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-strong'],\n\n '&.MuiOutlinedInput-input': {\n padding: 0,\n },\n '&::placeholder': {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-weak'],\n opacity: 1,\n },\n '&.Mui-disabled': {\n color: theme.palette.semantic.text['text-disabled'],\n cursor: 'not-allowed',\n pointerEvents: 'auto',\n WebkitTextFillColor: theme.palette.semantic.text['text-disabled'],\n\n '&::placeholder': {\n color: theme.palette.semantic.text['text-disabled'],\n WebkitTextFillColor: theme.palette.semantic.text['text-disabled'],\n },\n },\n\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('b1'),\n\n '&::placeholder': {\n ...getMobileTextStyle('b1'),\n },\n },\n },\n },\n});\n\nexport default inputBaseOverrides;\n"],"names":["inputBaseOverrides","theme","styleOverrides","root","backgroundColor","palette","semantic","fill","backgroundImage","border","borderColor","stroke","borderRadius","radius","boxSizing","minHeight","padding","spacing","cursor","opacity","pointerEvents","outline","outlineOffset","input","typography","b1Weak","color","text","WebkitTextFillColor","breakpoints","down","getMobileTextStyle"],"mappings":"yGAIaA,EAAsBC,IAAY,CAC7CC,eAAgB,CACdC,KAAM,CACJC,gBAAiBH,EAAMI,QAAQC,SAASC,KAAK,uBAC7CC,gBAAiB,OACjBC,OAAQ,YACRC,YAAaT,EAAMI,QAAQC,SAASK,OAAO,iBAC3CC,aAAcX,EAAMY,OAAO,YAC3BC,UAAW,aACXC,UAAW,GACXC,QAASf,EAAMgB,QAAQ,EAAG,GAE1B,iBAAkB,CAChBP,YAAaT,EAAMI,QAAQC,SAASK,OAAO,mBAC3CO,OAAQ,cACRC,QAAS,EACTC,cAAe,QAEjB,cAAe,CACbhB,gBAAiBH,EAAMI,QAAQC,SAASC,KAAK,mBAC7CE,OAAQ,YACRC,YAAaT,EAAMI,QAAQC,SAASK,OAAO,wBAE7C,2BAA4B,CAC1BK,QAASf,EAAMgB,QAAQ,IAAK,IAE9B,+DAAgE,CAC9DI,QAAS,aAAapB,EAAMI,QAAQC,SAASK,OAAO,kBACpDW,cAAe,OAEjB,6BAA8B,CAC5Bd,gBAAiB,mBAAmBP,EAAMI,QAAQC,SAASC,KAAK,kBAAkBN,EAAMI,QAAQC,SAASC,KAAK,kBAEhH,8BAA+B,CAC7BC,gBAAiB,mBAAmBP,EAAMI,QAAQC,SAASC,KAAK,kBAAkBN,EAAMI,QAAQC,SAASC,KAAK,mBAGlHgB,MAAO,IACFC,EAAWC,OACdC,MAAOzB,EAAMI,QAAQC,SAASqB,KAAK,eAEnC,2BAA4B,CAC1BX,QAAS,GAEX,iBAAkB,IACbQ,EAAWC,OACdC,MAAOzB,EAAMI,QAAQC,SAASqB,KAAK,aACnCR,QAAS,GAEX,iBAAkB,CAChBO,MAAOzB,EAAMI,QAAQC,SAASqB,KAAK,iBACnCT,OAAQ,cACRE,cAAe,OACfQ,oBAAqB3B,EAAMI,QAAQC,SAASqB,KAAK,iBAEjD,iBAAkB,CAChBD,MAAOzB,EAAMI,QAAQC,SAASqB,KAAK,iBACnCC,oBAAqB3B,EAAMI,QAAQC,SAASqB,KAAK,mBAIrD,CAAC1B,EAAM4B,YAAYC,KAAK,WAAY,IAC/BC,EAAmB,MAEtB,iBAAkB,IACbA,EAAmB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");var e=require("../typography.cjs.js");const t=t=>({styleOverrides:{root:{...e.typography.b1Weak,alignItems:"center",backgroundColor:t.palette.semantic.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");var e=require("../typography.cjs.js");const t=t=>({defaultProps:{autoFocus:!1,disableRipple:!0,disableTouchRipple:!0,focusRipple:!1},styleOverrides:{root:{...e.typography.b1Weak,alignItems:"center",backgroundColor:t.palette.semantic.background["background-overlay"],color:t.palette.semantic.text["text-strong"],display:"flex",gap:t.spacing(1.5),justifyContent:"flex-start",padding:t.spacing(1.5,2),"& svg":{color:t.palette.semantic.icon["icon-strong"]},"&.Mui-disabled":{color:t.palette.semantic.text["text-disabled"],cursor:"not-allowed",opacity:1,pointerEvents:"auto","& .MuiListItemText-primary":{color:t.palette.semantic.text["text-disabled"]},"& .MuiListItemText-secondary":{color:t.palette.semantic.text["text-disabled"]},"& svg":{color:t.palette.semantic.icon["icon-disabled"]},"&:hover":{backgroundColor:t.palette.semantic.background["background-overlay"],color:t.palette.semantic.text["text-disabled"]}},"&&.Mui-selected":{backgroundColor:`${t.palette.semantic.fill["fill-weak"]} !important`,color:t.palette.semantic.text["text-primary"],"& .MuiListItemText-primary":{color:t.palette.semantic.text["text-primary"]},"& svg":{color:t.palette.semantic.icon["icon-primary"]},"&:hover":{backgroundColor:`${t.palette.semantic.fill["fill-hover"]} !important`,color:t.palette.semantic.text["text-primary"]},"&:focus-visible, &.Mui-focusVisible":{backgroundColor:t.palette.semantic.fill["fill-weak"]}},"&:hover:not(.Mui-disabled):not(.Mui-selected)":{backgroundColor:t.palette.semantic.fill["fill-hover"],color:t.palette.semantic.text["text-strong"]},"&:active:not(.Mui-disabled):not(.Mui-selected)":{backgroundColor:t.palette.semantic.fill["fill-press"],color:t.palette.semantic.text["text-strong"]},"&&:focus-visible, &&.Mui-focusVisible":{backgroundColor:t.palette.semantic.background["background-overlay"],outline:`2px solid ${t.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"-2px"},[t.breakpoints.down("tablet")]:{...e.getMobileTextStyle("b1")}}}});exports.default=t,exports.menuItemOverrides=t;
|
|
2
2
|
//# sourceMappingURL=menuItemOverrides.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menuItemOverrides.cjs.js","sources":["../../../src/themes/overrides/menuItemOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const menuItemOverrides = (theme: Theme): Components<Theme>['MuiMenuItem'] => ({\n styleOverrides: {\n root: {\n ...typography.b1Weak,\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.
|
|
1
|
+
{"version":3,"file":"menuItemOverrides.cjs.js","sources":["../../../src/themes/overrides/menuItemOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const menuItemOverrides = (theme: Theme): Components<Theme>['MuiMenuItem'] => ({\n defaultProps: {\n autoFocus: false,\n disableRipple: true,\n disableTouchRipple: true,\n focusRipple: false,\n },\n styleOverrides: {\n root: {\n ...typography.b1Weak,\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-overlay'],\n color: theme.palette.semantic.text['text-strong'],\n display: 'flex',\n gap: theme.spacing(1.5),\n justifyContent: 'flex-start',\n padding: theme.spacing(1.5, 2),\n\n '& svg': {\n color: theme.palette.semantic.icon['icon-strong'],\n },\n '&.Mui-disabled': {\n color: theme.palette.semantic.text['text-disabled'],\n cursor: 'not-allowed',\n opacity: 1, // Override default MUI opacity\n pointerEvents: 'auto',\n\n '& .MuiListItemText-primary': {\n color: theme.palette.semantic.text['text-disabled'],\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.semantic.text['text-disabled'],\n },\n '& svg': {\n color: theme.palette.semantic.icon['icon-disabled'],\n },\n '&:hover': {\n backgroundColor: theme.palette.semantic.background['background-overlay'],\n color: theme.palette.semantic.text['text-disabled'],\n },\n },\n '&&.Mui-selected': {\n backgroundColor: `${theme.palette.semantic.fill['fill-weak']} !important`,\n color: theme.palette.semantic.text['text-primary'],\n\n '& .MuiListItemText-primary': {\n color: theme.palette.semantic.text['text-primary'],\n },\n '& svg': {\n color: theme.palette.semantic.icon['icon-primary'],\n },\n '&:hover': {\n backgroundColor: `${theme.palette.semantic.fill['fill-hover']} !important`,\n color: theme.palette.semantic.text['text-primary'],\n },\n '&:focus-visible, &.Mui-focusVisible': {\n backgroundColor: theme.palette.semantic.fill['fill-weak'],\n },\n },\n '&:hover:not(.Mui-disabled):not(.Mui-selected)': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n color: theme.palette.semantic.text['text-strong'],\n },\n '&:active:not(.Mui-disabled):not(.Mui-selected)': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n color: theme.palette.semantic.text['text-strong'],\n },\n '&&:focus-visible, &&.Mui-focusVisible': {\n backgroundColor: theme.palette.semantic.background['background-overlay'],\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '-2px',\n },\n\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('b1'),\n },\n },\n },\n});\n\nexport default menuItemOverrides;\n"],"names":["menuItemOverrides","theme","defaultProps","autoFocus","disableRipple","disableTouchRipple","focusRipple","styleOverrides","root","typography","b1Weak","alignItems","backgroundColor","palette","semantic","background","color","text","display","gap","spacing","justifyContent","padding","icon","cursor","opacity","pointerEvents","fill","outline","stroke","outlineOffset","breakpoints","down","getMobileTextStyle"],"mappings":"gJAIaA,EAAqBC,IAAY,CAC5CC,aAAc,CACZC,WAAW,EACXC,eAAe,EACfC,oBAAoB,EACpBC,aAAa,GAEfC,eAAgB,CACdC,KAAM,IACDC,EAAAA,WAAWC,OACdC,WAAY,SACZC,gBAAiBX,EAAMY,QAAQC,SAASC,WAAW,sBACnDC,MAAOf,EAAMY,QAAQC,SAASG,KAAK,eACnCC,QAAS,OACTC,IAAKlB,EAAMmB,QAAQ,KACnBC,eAAgB,aAChBC,QAASrB,EAAMmB,QAAQ,IAAK,GAE5B,QAAS,CACPJ,MAAOf,EAAMY,QAAQC,SAASS,KAAK,gBAErC,iBAAkB,CAChBP,MAAOf,EAAMY,QAAQC,SAASG,KAAK,iBACnCO,OAAQ,cACRC,QAAS,EACTC,cAAe,OAEf,6BAA8B,CAC5BV,MAAOf,EAAMY,QAAQC,SAASG,KAAK,kBAErC,+BAAgC,CAC9BD,MAAOf,EAAMY,QAAQC,SAASG,KAAK,kBAErC,QAAS,CACPD,MAAOf,EAAMY,QAAQC,SAASS,KAAK,kBAErC,UAAW,CACTX,gBAAiBX,EAAMY,QAAQC,SAASC,WAAW,sBACnDC,MAAOf,EAAMY,QAAQC,SAASG,KAAK,mBAGvC,kBAAmB,CACjBL,gBAAiB,GAAGX,EAAMY,QAAQC,SAASa,KAAK,0BAChDX,MAAOf,EAAMY,QAAQC,SAASG,KAAK,gBAEnC,6BAA8B,CAC5BD,MAAOf,EAAMY,QAAQC,SAASG,KAAK,iBAErC,QAAS,CACPD,MAAOf,EAAMY,QAAQC,SAASS,KAAK,iBAErC,UAAW,CACTX,gBAAiB,GAAGX,EAAMY,QAAQC,SAASa,KAAK,2BAChDX,MAAOf,EAAMY,QAAQC,SAASG,KAAK,iBAErC,sCAAuC,CACrCL,gBAAiBX,EAAMY,QAAQC,SAASa,KAAK,eAGjD,gDAAiD,CAC/Cf,gBAAiBX,EAAMY,QAAQC,SAASa,KAAK,cAC7CX,MAAOf,EAAMY,QAAQC,SAASG,KAAK,gBAErC,iDAAkD,CAChDL,gBAAiBX,EAAMY,QAAQC,SAASa,KAAK,cAC7CX,MAAOf,EAAMY,QAAQC,SAASG,KAAK,gBAErC,wCAAyC,CACvCL,gBAAiBX,EAAMY,QAAQC,SAASC,WAAW,sBACnDa,QAAS,aAAa3B,EAAMY,QAAQC,SAASe,OAAO,kBACpDC,cAAe,QAGjB,CAAC7B,EAAM8B,YAAYC,KAAK,WAAY,IAC/BC,EAAAA,mBAAmB"}
|