@flipdish/portal-library 7.0.0 → 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.
Files changed (72) hide show
  1. package/dist/components/atoms/Badge/index.cjs.js +1 -1
  2. package/dist/components/atoms/Badge/index.cjs.js.map +1 -1
  3. package/dist/components/atoms/Badge/index.d.ts +8 -6
  4. package/dist/components/atoms/Badge/index.js +1 -1
  5. package/dist/components/atoms/Badge/index.js.map +1 -1
  6. package/dist/components/atoms/Card/index.cjs.js +1 -1
  7. package/dist/components/atoms/Card/index.cjs.js.map +1 -1
  8. package/dist/components/atoms/Card/index.js +1 -1
  9. package/dist/components/atoms/Card/index.js.map +1 -1
  10. package/dist/components/atoms/Checkbox/index.cjs.js +1 -1
  11. package/dist/components/atoms/Checkbox/index.cjs.js.map +1 -1
  12. package/dist/components/atoms/Checkbox/index.d.ts +1 -1
  13. package/dist/components/atoms/Checkbox/index.js +1 -1
  14. package/dist/components/atoms/Checkbox/index.js.map +1 -1
  15. package/dist/components/atoms/MenuItem/index.cjs.js +1 -1
  16. package/dist/components/atoms/MenuItem/index.cjs.js.map +1 -1
  17. package/dist/components/atoms/MenuItem/index.js +1 -1
  18. package/dist/components/atoms/MenuItem/index.js.map +1 -1
  19. package/dist/components/atoms/Select/index.cjs.js +1 -1
  20. package/dist/components/atoms/Select/index.cjs.js.map +1 -1
  21. package/dist/components/atoms/Select/index.js +1 -1
  22. package/dist/components/atoms/Select/index.js.map +1 -1
  23. package/dist/components/atoms/TextField/index.cjs.js +1 -1
  24. package/dist/components/atoms/TextField/index.cjs.js.map +1 -1
  25. package/dist/components/atoms/TextField/index.js +1 -1
  26. package/dist/components/atoms/TextField/index.js.map +1 -1
  27. package/dist/components/molecules/Autocomplete/hooks/useDynamicLimitTags.cjs.js +2 -0
  28. package/dist/components/molecules/Autocomplete/hooks/useDynamicLimitTags.cjs.js.map +1 -0
  29. package/dist/components/molecules/Autocomplete/hooks/useDynamicLimitTags.d.ts +14 -0
  30. package/dist/components/molecules/Autocomplete/hooks/useDynamicLimitTags.js +2 -0
  31. package/dist/components/molecules/Autocomplete/hooks/useDynamicLimitTags.js.map +1 -0
  32. package/dist/components/molecules/Autocomplete/index.cjs.js +1 -1
  33. package/dist/components/molecules/Autocomplete/index.cjs.js.map +1 -1
  34. package/dist/components/molecules/Autocomplete/index.d.ts +55 -2
  35. package/dist/components/molecules/Autocomplete/index.js +1 -1
  36. package/dist/components/molecules/Autocomplete/index.js.map +1 -1
  37. package/dist/components/molecules/CheckboxGroup/index.cjs.js +1 -1
  38. package/dist/components/molecules/CheckboxGroup/index.cjs.js.map +1 -1
  39. package/dist/components/molecules/CheckboxGroup/index.d.ts +1 -1
  40. package/dist/components/molecules/CheckboxGroup/index.js +1 -1
  41. package/dist/components/molecules/CheckboxGroup/index.js.map +1 -1
  42. package/dist/themes/flipdishPublicTheme.cjs.js +1 -1
  43. package/dist/themes/flipdishPublicTheme.cjs.js.map +1 -1
  44. package/dist/themes/flipdishPublicTheme.js +1 -1
  45. package/dist/themes/flipdishPublicTheme.js.map +1 -1
  46. package/dist/themes/overrides/autocompleteOverrides.cjs.js +2 -0
  47. package/dist/themes/overrides/autocompleteOverrides.cjs.js.map +1 -0
  48. package/dist/themes/overrides/autocompleteOverrides.d.ts +5 -0
  49. package/dist/themes/overrides/autocompleteOverrides.js +2 -0
  50. package/dist/themes/overrides/autocompleteOverrides.js.map +1 -0
  51. package/dist/themes/overrides/inputBaseOverrides.cjs.js +1 -1
  52. package/dist/themes/overrides/inputBaseOverrides.cjs.js.map +1 -1
  53. package/dist/themes/overrides/inputBaseOverrides.js +1 -1
  54. package/dist/themes/overrides/inputBaseOverrides.js.map +1 -1
  55. package/dist/themes/overrides/menuItemOverrides.cjs.js +1 -1
  56. package/dist/themes/overrides/menuItemOverrides.cjs.js.map +1 -1
  57. package/dist/themes/overrides/menuItemOverrides.js +1 -1
  58. package/dist/themes/overrides/menuItemOverrides.js.map +1 -1
  59. package/dist/themes/overrides/menuOverrides.cjs.js +1 -1
  60. package/dist/themes/overrides/menuOverrides.cjs.js.map +1 -1
  61. package/dist/themes/overrides/menuOverrides.js +1 -1
  62. package/dist/themes/overrides/menuOverrides.js.map +1 -1
  63. package/dist/themes/overrides/selectOverrides.cjs.js +1 -1
  64. package/dist/themes/overrides/selectOverrides.cjs.js.map +1 -1
  65. package/dist/themes/overrides/selectOverrides.js +1 -1
  66. package/dist/themes/overrides/selectOverrides.js.map +1 -1
  67. package/dist/utilities/stringUtilities.cjs.js +2 -0
  68. package/dist/utilities/stringUtilities.cjs.js.map +1 -0
  69. package/dist/utilities/stringUtilities.d.ts +7 -0
  70. package/dist/utilities/stringUtilities.js +2 -0
  71. package/dist/utilities/stringUtilities.js.map +1 -0
  72. package/package.json +1 -1
@@ -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/FormControl"),a=require("@mui/material/FormGroup"),s=require("@mui/material/FormHelperText"),t=require("@mui/material/FormLabel"),n=require("../../atoms/Checkbox/index.cjs.js"),d=require("../../Spacer/index.cjs.js"),l=require("../../../icons/CancelCircle/index.cjs.js");module.exports=({fdKey:o,options:c,value:u,size:m="medium",label:x,hintText:j,errorText:h,valid:q=!0,required:b=!1,onChange:f})=>{const[v,p]=r.useState([]),z=u??v,C=e=>{const{name:r,checked:i}=e.target,a=i?[...z,r]:z.filter((e=>e!==r));void 0===u&&p(a),f&&f(e,a)},$=!q&&!!h;return e.jsxs(i,{"data-fd":o,children:[e.jsx(t,{"data-fd":`${o}-label`,required:b,children:x}),j&&e.jsx(s,{"data-fd":`${o}-hint`,children:j}),e.jsx(d,{size:4,variant:"horizontal"}),$&&e.jsxs(s,{error:!0,children:[e.jsx(l,{}),h]}),e.jsx(d,{size:8,variant:"horizontal"}),e.jsx(a,{"data-fd":`${o}-checkboxes`,children:c.map((r=>{const i=z.includes(r.name);return e.jsx(n,{checked:i,disabled:r.disabled,fdKey:`${o}-${r.name}`,label:r.label,name:r.name,onChange:C,size:m,valid:q},r.name)}))})]})};
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';\n\nimport Checkbox from '@fd/components/atoms/Checkbox';\nimport Spacer from '@fd/components/Spacer';\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 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 <MuiFormControl data-fd={fdKey}>\n <MuiFormLabel data-fd={`${fdKey}-label`} required={required}>\n {label}\n </MuiFormLabel>\n\n {hintText && (\n <MuiFormHelperText data-fd={`${fdKey}-hint`}>\n {hintText}\n </MuiFormHelperText>\n )}\n\n <Spacer size={4} variant=\"horizontal\" />\n\n {isError && (\n <MuiFormHelperText error>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <Spacer size={8} variant=\"horizontal\" />\n\n <MuiFormGroup 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 </MuiFormGroup>\n </MuiFormControl>\n );\n};\n\nexport default CheckboxGroup;\n"],"names":["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","MuiFormControl","children","_jsx","MuiFormLabel","MuiFormHelperText","Spacer","variant","error","CancelCircleIcon","MuiFormGroup","map","option","isChecked","includes","Checkbox","disabled"],"mappings":"yXAkCsB,EACpBA,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,KAACC,aAAwBzB,EAAK0B,SAAA,CAC5BC,EAAAA,IAACC,EAAY,CAAA,UAAU,GAAG5B,UAAeQ,SAAUA,EAAQkB,SACxDtB,IAGFC,GACCsB,MAACE,EAAiB,CAAA,UAAU,GAAG7B,kBAC5BK,IAILsB,EAAAA,IAACG,EAAM,CAAC3B,KAAM,EAAG4B,QAAQ,eAExBR,GACCC,EAAAA,KAACK,EAAiB,CAACG,OAAK,EAAAN,SAAA,CACtBC,EAAAA,IAACM,EAAgB,IAEhB3B,KAILqB,MAACG,GAAO3B,KAAM,EAAG4B,QAAQ,eAEzBJ,EAAAA,IAACO,EAAY,CAAA,UAAU,GAAGlC,eAAkB0B,SACzCzB,EAAQkC,KAAKC,IACZ,MAAMC,EAAYxB,EAAcyB,SAASF,EAAOpB,MAEhD,OACEW,EAAAA,IAACY,EAAQ,CAEPrB,QAASmB,EACTG,SAAUJ,EAAOI,SACjBxC,MAAO,GAAGA,KAASoC,EAAOpB,OAC1BZ,MAAOgC,EAAOhC,MACdY,KAAMoB,EAAOpB,KACbP,SAAUK,EACVX,KAAMA,EACNI,MAAOA,GARF6B,EAAOpB"}
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 a}from"react";import i from"@mui/material/FormControl";import o from"@mui/material/FormGroup";import t from"@mui/material/FormHelperText";import m from"@mui/material/FormLabel";import n from"../../atoms/Checkbox/index.js";import d from"../../Spacer/index.js";import l from"../../../icons/CancelCircle/index.js";const c=({fdKey:c,options:s,value:f,size:h="medium",label:p,hintText:u,errorText:x,valid:b=!0,required:v=!1,onChange:z})=>{const[C,$]=a([]),j=f??C,k=e=>{const{name:r,checked:a}=e.target,i=a?[...j,r]:j.filter((e=>e!==r));void 0===f&&$(i),z&&z(e,i)},F=!b&&!!x;return e(i,{"data-fd":c,children:[r(m,{"data-fd":`${c}-label`,required:v,children:p}),u&&r(t,{"data-fd":`${c}-hint`,children:u}),r(d,{size:4,variant:"horizontal"}),F&&e(t,{error:!0,children:[r(l,{}),x]}),r(d,{size:8,variant:"horizontal"}),r(o,{"data-fd":`${c}-checkboxes`,children:s.map((e=>{const a=j.includes(e.name);return r(n,{checked:a,disabled:e.disabled,fdKey:`${c}-${e.name}`,label:e.label,name:e.name,onChange:k,size:h,valid:b},e.name)}))})]})};export{c as default};
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';\n\nimport Checkbox from '@fd/components/atoms/Checkbox';\nimport Spacer from '@fd/components/Spacer';\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 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 <MuiFormControl data-fd={fdKey}>\n <MuiFormLabel data-fd={`${fdKey}-label`} required={required}>\n {label}\n </MuiFormLabel>\n\n {hintText && (\n <MuiFormHelperText data-fd={`${fdKey}-hint`}>\n {hintText}\n </MuiFormHelperText>\n )}\n\n <Spacer size={4} variant=\"horizontal\" />\n\n {isError && (\n <MuiFormHelperText error>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <Spacer size={8} variant=\"horizontal\" />\n\n <MuiFormGroup 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 </MuiFormGroup>\n </MuiFormControl>\n );\n};\n\nexport default CheckboxGroup;\n"],"names":["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","MuiFormControl","children","_jsx","MuiFormLabel","MuiFormHelperText","Spacer","variant","error","CancelCircleIcon","MuiFormGroup","map","option","isChecked","includes","Checkbox","disabled"],"mappings":"4XAkCA,MAAMA,EAAgB,EACpBC,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,EAACC,aAAwBzB,EAAK0B,SAAA,CAC5BC,EAACC,EAAY,CAAA,UAAU,GAAG5B,UAAeQ,SAAUA,EAAQkB,SACxDtB,IAGFC,GACCsB,EAACE,EAAiB,CAAA,UAAU,GAAG7B,kBAC5BK,IAILsB,EAACG,EAAM,CAAC3B,KAAM,EAAG4B,QAAQ,eAExBR,GACCC,EAACK,EAAiB,CAACG,OAAK,EAAAN,SAAA,CACtBC,EAACM,EAAgB,IAEhB3B,KAILqB,EAACG,GAAO3B,KAAM,EAAG4B,QAAQ,eAEzBJ,EAACO,EAAY,CAAA,UAAU,GAAGlC,eAAkB0B,SACzCzB,EAAQkC,KAAKC,IACZ,MAAMC,EAAYxB,EAAcyB,SAASF,EAAOpB,MAEhD,OACEW,EAACY,EAAQ,CAEPrB,QAASmB,EACTG,SAAUJ,EAAOI,SACjBxC,MAAO,GAAGA,KAASoC,EAAOpB,OAC1BZ,MAAOgC,EAAOhC,MACdY,KAAMoB,EAAOpB,KACbP,SAAUK,EACVX,KAAMA,EACNI,MAAOA,GARF6B,EAAOpB"}
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/checkboxOverrides.cjs.js"),o=require("./overrides/formControlLabelOverrides.cjs.js"),a=require("./overrides/formHelperTextOverrides.cjs.js"),d=require("./overrides/formLabelOverrides.cjs.js"),u=require("./overrides/inputBaseOverrides.cjs.js"),n=require("./overrides/inputLabelOverrides.cjs.js"),p=require("./overrides/listItemTextOverrides.cjs.js"),l=require("./overrides/menuItemOverrides.cjs.js"),c=require("./overrides/menuOverrides.cjs.js"),v=require("./overrides/selectOverrides.cjs.js"),m=require("./overrides/textFieldOverrides.cjs.js"),h=require("./tokens/breakpoints/breakpoints.cjs.js"),j=require("./tokens/colours/semantic.cjs.js"),b=require("./tokens/radius/radius.cjs.js"),y=require("./tokens/shadows/shadows.cjs.js"),g=require("./tokens/typography/variant-mapping.cjs.js"),O=require("./typography.cjs.js");const x=x=>{const M={typography:O.typography,palette:"light"===x?j.lightColours:j.darkColours,radius:b.radius,breakpoints:{values:h.breakpointValues},customShadows:{...y.shadows}},k=e(M);return Object.keys(O.typography).forEach((e=>{const r=e.split(/(?=[A-Z])/)[0],s=e;k.typography[s]={...k.typography[s],[k.breakpoints.down("tablet")]:{...O.getMobileTextStyle(r)}}})),e({...M,typography:k.typography,shape:{borderRadius:4},customShadows:k.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(k),MuiIconButton:s.iconButtonStyleOverrides(),MuiCard:{styleOverrides:{root:{boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:k.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold",paddingLeft:"6px",paddingRight:"6px"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:k.palette.semantic.fill["fill-primary-weak"]},"&:not(:last-child)":{borderBottom:`1px solid ${k.palette.semantic.stroke["stroke-weak"]}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:k.palette.semantic.fill["fill-secondary"],cursor:"pointer"}}}},MuiTypography:{defaultProps:{variantMapping:g.typographyVariantMapping}},MuiFormHelperText:a.formHelperTextOverrides(k),MuiInputBase:u.inputBaseOverrides(k),MuiInputLabel:n.inputLabelOverrides(k),MuiListItemText:p.listItemTextOverrides(k),MuiMenu:c.menuOverrides(k),MuiMenuItem:l.menuItemOverrides(k),MuiSelect:v.selectOverrides(k),MuiTextField:m.textFieldOverrides(k),MuiFormControlLabel:o.formControlLabelOverrides(k),MuiFormLabel:d.formLabelOverrides(k),MuiCheckbox:t.checkboxOverrides(k)}})},M=x("light"),k=x("dark");exports.darkTheme=k,exports.lightTheme=M;
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 MuiFormHelperText: formHelperTextOverrides(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 MuiFormControlLabel: formControlLabelOverrides(baseTheme),\n MuiFormLabel: formLabelOverrides(baseTheme),\n MuiCheckbox: checkboxOverrides(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","MuiFormHelperText","formHelperTextOverrides","MuiInputBase","inputBaseOverrides","MuiInputLabel","inputLabelOverrides","MuiListItemText","listItemTextOverrides","MuiMenu","menuOverrides","MuiMenuItem","menuItemOverrides","MuiSelect","selectOverrides","MuiTextField","textFieldOverrides","MuiFormControlLabel","formControlLabelOverrides","MuiFormLabel","formLabelOverrides","MuiCheckbox","checkboxOverrides","lightTheme","darkTheme"],"mappings":"okCAwBA,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,kBAAmBC,EAAAA,wBAAwBpD,GAC3CqD,aAAcC,EAAAA,mBAAmBtD,GACjCuD,cAAeC,EAAAA,oBAAoBxD,GACnCyD,gBAAiBC,EAAAA,sBAAsB1D,GACvC2D,QAASC,EAAAA,cAAc5D,GACvB6D,YAAaC,EAAAA,kBAAkB9D,GAC/B+D,UAAWC,EAAAA,gBAAgBhE,GAC3BiE,aAAcC,EAAAA,mBAAmBlE,GACjCmE,oBAAqBC,EAAAA,0BAA0BpE,GAC/CqE,aAAcC,EAAAA,mBAAmBtE,GACjCuE,YAAaC,EAAAA,kBAAkBxE,OAKxByE,EAAatF,EAA2B,SACxCuF,EAAYvF,EAA2B"}
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{checkboxOverrides as i}from"./overrides/checkboxOverrides.js";import{formControlLabelOverrides as s}from"./overrides/formControlLabelOverrides.js";import{formHelperTextOverrides as p}from"./overrides/formHelperTextOverrides.js";import{formLabelOverrides as a}from"./overrides/formLabelOverrides.js";import{inputBaseOverrides as m}from"./overrides/inputBaseOverrides.js";import{inputLabelOverrides as d}from"./overrides/inputLabelOverrides.js";import{listItemTextOverrides as n}from"./overrides/listItemTextOverrides.js";import{menuItemOverrides as l}from"./overrides/menuItemOverrides.js";import{menuOverrides as u}from"./overrides/menuOverrides.js";import{selectOverrides as c}from"./overrides/selectOverrides.js";import{textFieldOverrides as v}from"./overrides/textFieldOverrides.js";import{breakpointValues as f}from"./tokens/breakpoints/breakpoints.js";import{lightColours as h,darkColours as b}from"./tokens/colours/semantic.js";import{radius as g}from"./tokens/radius/radius.js";import{shadows as y}from"./tokens/shadows/shadows.js";import{typographyVariantMapping as M}from"./tokens/typography/variant-mapping.js";import{typography as j,getMobileTextStyle as k}from"./typography.js";const x=x=>{const O={typography:j,palette:"light"===x?h:b,radius:g,breakpoints:{values:f},customShadows:{...y}},T=r(O);return Object.keys(j).forEach((r=>{const e=r.split(/(?=[A-Z])/)[0],o=r;T.typography[o]={...T.typography[o],[T.breakpoints.down("tablet")]:{...k(e)}}})),r({...O,typography:T.typography,shape:{borderRadius:4},customShadows:T.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(T),MuiIconButton:o(),MuiCard:{styleOverrides:{root:{boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:T.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold",paddingLeft:"6px",paddingRight:"6px"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:T.palette.semantic.fill["fill-primary-weak"]},"&:not(:last-child)":{borderBottom:`1px solid ${T.palette.semantic.stroke["stroke-weak"]}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:T.palette.semantic.fill["fill-secondary"],cursor:"pointer"}}}},MuiTypography:{defaultProps:{variantMapping:M}},MuiFormHelperText:p(T),MuiInputBase:m(T),MuiInputLabel:d(T),MuiListItemText:n(T),MuiMenu:u(T),MuiMenuItem:l(T),MuiSelect:c(T),MuiTextField:v(T),MuiFormControlLabel:s(T),MuiFormLabel:a(T),MuiCheckbox:i(T)}})},O=x("light"),T=x("dark");export{T as darkTheme,O as lightTheme};
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 MuiFormHelperText: formHelperTextOverrides(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 MuiFormControlLabel: formControlLabelOverrides(baseTheme),\n MuiFormLabel: formLabelOverrides(baseTheme),\n MuiCheckbox: checkboxOverrides(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","MuiFormHelperText","formHelperTextOverrides","MuiInputBase","inputBaseOverrides","MuiInputLabel","inputLabelOverrides","MuiListItemText","listItemTextOverrides","MuiMenu","menuOverrides","MuiMenuItem","menuItemOverrides","MuiSelect","selectOverrides","MuiTextField","textFieldOverrides","MuiFormControlLabel","formControlLabelOverrides","MuiFormLabel","formLabelOverrides","MuiCheckbox","checkboxOverrides","lightTheme","darkTheme"],"mappings":"q8CAwBA,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,kBAAmBC,EAAwBpD,GAC3CqD,aAAcC,EAAmBtD,GACjCuD,cAAeC,EAAoBxD,GACnCyD,gBAAiBC,EAAsB1D,GACvC2D,QAASC,EAAc5D,GACvB6D,YAAaC,EAAkB9D,GAC/B+D,UAAWC,EAAgBhE,GAC3BiE,aAAcC,EAAmBlE,GACjCmE,oBAAqBC,EAA0BpE,GAC/CqE,aAAcC,EAAmBtE,GACjCuE,YAAaC,EAAkBxE,OAKxByE,EAAatF,EAA2B,SACxCuF,EAAYvF,EAA2B"}
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,5 @@
1
+ import { Theme, Components } from '@mui/material/styles';
2
+
3
+ declare const autocompleteOverrides: (theme: Theme) => Components<Theme>['MuiAutocomplete'];
4
+
5
+ export { autocompleteOverrides, autocompleteOverrides as default };
@@ -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","-webkit-text-fill-color":t.palette.semantic.text["text-disabled"],"&::placeholder":{color:t.palette.semantic.text["text-disabled"],"-webkit-text-fill-color":t.palette.semantic.text["text-disabled"]}},[t.breakpoints.down("tablet")]:{...e.getMobileTextStyle("b1"),"&::placeholder":{...e.getMobileTextStyle("b1")}}}}});exports.default=t,exports.inputBaseOverrides=t;
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 '-webkit-text-fill-color': theme.palette.semantic.text['text-disabled'],\n\n '&::placeholder': {\n color: theme.palette.semantic.text['text-disabled'],\n '-webkit-text-fill-color': 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","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,OACf,0BAA2BnB,EAAMI,QAAQC,SAASqB,KAAK,iBAEvD,iBAAkB,CAChBD,MAAOzB,EAAMI,QAAQC,SAASqB,KAAK,iBACnC,0BAA2B1B,EAAMI,QAAQC,SAASqB,KAAK,mBAI3D,CAAC1B,EAAM2B,YAAYC,KAAK,WAAY,IAC/BC,EAAAA,mBAAmB,MAEtB,iBAAkB,IACbA,EAAAA,mBAAmB"}
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","-webkit-text-fill-color":o.palette.semantic.text["text-disabled"],"&::placeholder":{color:o.palette.semantic.text["text-disabled"],"-webkit-text-fill-color":o.palette.semantic.text["text-disabled"]}},[o.breakpoints.down("tablet")]:{...e("b1"),"&::placeholder":{...e("b1")}}}}});export{o as default,o as inputBaseOverrides};
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 '-webkit-text-fill-color': theme.palette.semantic.text['text-disabled'],\n\n '&::placeholder': {\n color: theme.palette.semantic.text['text-disabled'],\n '-webkit-text-fill-color': 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","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,OACf,0BAA2BnB,EAAMI,QAAQC,SAASqB,KAAK,iBAEvD,iBAAkB,CAChBD,MAAOzB,EAAMI,QAAQC,SAASqB,KAAK,iBACnC,0BAA2B1B,EAAMI,QAAQC,SAASqB,KAAK,mBAI3D,CAAC1B,EAAM2B,YAAYC,KAAK,WAAY,IAC/BC,EAAmB,MAEtB,iBAAkB,IACbA,EAAmB"}
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.fill["fill-inverse-strong"],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.fill["fill-inverse-strong"],color:t.palette.semantic.text["text-disabled"]}},"&.Mui-selected":{backgroundColor:t.palette.semantic.fill["fill-weak"],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-weak"],color:t.palette.semantic.text["text-primary"]}},"&: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":{outline:`2px solid ${t.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"-2px"},[t.breakpoints.down("tablet")]:{...e.getMobileTextStyle("b1")}}}});exports.default=t,exports.menuItemOverrides=t;
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.fill['fill-inverse-strong'],\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.fill['fill-inverse-strong'],\n color: theme.palette.semantic.text['text-disabled'],\n },\n },\n '&.Mui-selected': {\n backgroundColor: theme.palette.semantic.fill['fill-weak'],\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-weak'],\n color: theme.palette.semantic.text['text-primary'],\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 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","styleOverrides","root","typography","b1Weak","alignItems","backgroundColor","palette","semantic","fill","color","text","display","gap","spacing","justifyContent","padding","icon","cursor","opacity","pointerEvents","outline","stroke","outlineOffset","breakpoints","down","getMobileTextStyle"],"mappings":"gJAIaA,EAAqBC,IAAY,CAC5CC,eAAgB,CACdC,KAAM,IACDC,EAAAA,WAAWC,OACdC,WAAY,SACZC,gBAAiBN,EAAMO,QAAQC,SAASC,KAAK,uBAC7CC,MAAOV,EAAMO,QAAQC,SAASG,KAAK,eACnCC,QAAS,OACTC,IAAKb,EAAMc,QAAQ,KACnBC,eAAgB,aAChBC,QAAShB,EAAMc,QAAQ,IAAK,GAE5B,QAAS,CACPJ,MAAOV,EAAMO,QAAQC,SAASS,KAAK,gBAErC,iBAAkB,CAChBP,MAAOV,EAAMO,QAAQC,SAASG,KAAK,iBACnCO,OAAQ,cACRC,QAAS,EACTC,cAAe,OAEf,6BAA8B,CAC5BV,MAAOV,EAAMO,QAAQC,SAASG,KAAK,kBAErC,+BAAgC,CAC9BD,MAAOV,EAAMO,QAAQC,SAASG,KAAK,kBAErC,QAAS,CACPD,MAAOV,EAAMO,QAAQC,SAASS,KAAK,kBAErC,UAAW,CACTX,gBAAiBN,EAAMO,QAAQC,SAASC,KAAK,uBAC7CC,MAAOV,EAAMO,QAAQC,SAASG,KAAK,mBAGvC,iBAAkB,CAChBL,gBAAiBN,EAAMO,QAAQC,SAASC,KAAK,aAC7CC,MAAOV,EAAMO,QAAQC,SAASG,KAAK,gBAEnC,6BAA8B,CAC5BD,MAAOV,EAAMO,QAAQC,SAASG,KAAK,iBAErC,QAAS,CACPD,MAAOV,EAAMO,QAAQC,SAASS,KAAK,iBAErC,UAAW,CACTX,gBAAiBN,EAAMO,QAAQC,SAASC,KAAK,aAC7CC,MAAOV,EAAMO,QAAQC,SAASG,KAAK,kBAGvC,gDAAiD,CAC/CL,gBAAiBN,EAAMO,QAAQC,SAASC,KAAK,cAC7CC,MAAOV,EAAMO,QAAQC,SAASG,KAAK,gBAErC,iDAAkD,CAChDL,gBAAiBN,EAAMO,QAAQC,SAASC,KAAK,cAC7CC,MAAOV,EAAMO,QAAQC,SAASG,KAAK,gBAErC,sCAAuC,CACrCU,QAAS,aAAarB,EAAMO,QAAQC,SAASc,OAAO,kBACpDC,cAAe,QAGjB,CAACvB,EAAMwB,YAAYC,KAAK,WAAY,IAC/BC,EAAAA,mBAAmB"}
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"}
@@ -1,2 +1,2 @@
1
- import"@mui/material/styles";import{getMobileTextStyle as t,typography as e}from"../typography.js";const l=l=>({styleOverrides:{root:{...e.b1Weak,alignItems:"center",backgroundColor:l.palette.semantic.fill["fill-inverse-strong"],color:l.palette.semantic.text["text-strong"],display:"flex",gap:l.spacing(1.5),justifyContent:"flex-start",padding:l.spacing(1.5,2),"& svg":{color:l.palette.semantic.icon["icon-strong"]},"&.Mui-disabled":{color:l.palette.semantic.text["text-disabled"],cursor:"not-allowed",opacity:1,pointerEvents:"auto","& .MuiListItemText-primary":{color:l.palette.semantic.text["text-disabled"]},"& .MuiListItemText-secondary":{color:l.palette.semantic.text["text-disabled"]},"& svg":{color:l.palette.semantic.icon["icon-disabled"]},"&:hover":{backgroundColor:l.palette.semantic.fill["fill-inverse-strong"],color:l.palette.semantic.text["text-disabled"]}},"&.Mui-selected":{backgroundColor:l.palette.semantic.fill["fill-weak"],color:l.palette.semantic.text["text-primary"],"& .MuiListItemText-primary":{color:l.palette.semantic.text["text-primary"]},"& svg":{color:l.palette.semantic.icon["icon-primary"]},"&:hover":{backgroundColor:l.palette.semantic.fill["fill-weak"],color:l.palette.semantic.text["text-primary"]}},"&:hover:not(.Mui-disabled):not(.Mui-selected)":{backgroundColor:l.palette.semantic.fill["fill-hover"],color:l.palette.semantic.text["text-strong"]},"&:active:not(.Mui-disabled):not(.Mui-selected)":{backgroundColor:l.palette.semantic.fill["fill-press"],color:l.palette.semantic.text["text-strong"]},"&:focus-visible, &.Mui-focusVisible":{outline:`2px solid ${l.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"-2px"},[l.breakpoints.down("tablet")]:{...t("b1")}}}});export{l as default,l as menuItemOverrides};
1
+ import"@mui/material/styles";import{getMobileTextStyle as t,typography as e}from"../typography.js";const o=o=>({defaultProps:{autoFocus:!1,disableRipple:!0,disableTouchRipple:!0,focusRipple:!1},styleOverrides:{root:{...e.b1Weak,alignItems:"center",backgroundColor:o.palette.semantic.background["background-overlay"],color:o.palette.semantic.text["text-strong"],display:"flex",gap:o.spacing(1.5),justifyContent:"flex-start",padding:o.spacing(1.5,2),"& svg":{color:o.palette.semantic.icon["icon-strong"]},"&.Mui-disabled":{color:o.palette.semantic.text["text-disabled"],cursor:"not-allowed",opacity:1,pointerEvents:"auto","& .MuiListItemText-primary":{color:o.palette.semantic.text["text-disabled"]},"& .MuiListItemText-secondary":{color:o.palette.semantic.text["text-disabled"]},"& svg":{color:o.palette.semantic.icon["icon-disabled"]},"&:hover":{backgroundColor:o.palette.semantic.background["background-overlay"],color:o.palette.semantic.text["text-disabled"]}},"&&.Mui-selected":{backgroundColor:`${o.palette.semantic.fill["fill-weak"]} !important`,color:o.palette.semantic.text["text-primary"],"& .MuiListItemText-primary":{color:o.palette.semantic.text["text-primary"]},"& svg":{color:o.palette.semantic.icon["icon-primary"]},"&:hover":{backgroundColor:`${o.palette.semantic.fill["fill-hover"]} !important`,color:o.palette.semantic.text["text-primary"]},"&:focus-visible, &.Mui-focusVisible":{backgroundColor:o.palette.semantic.fill["fill-weak"]}},"&:hover:not(.Mui-disabled):not(.Mui-selected)":{backgroundColor:o.palette.semantic.fill["fill-hover"],color:o.palette.semantic.text["text-strong"]},"&:active:not(.Mui-disabled):not(.Mui-selected)":{backgroundColor:o.palette.semantic.fill["fill-press"],color:o.palette.semantic.text["text-strong"]},"&&:focus-visible, &&.Mui-focusVisible":{backgroundColor:o.palette.semantic.background["background-overlay"],outline:`2px solid ${o.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"-2px"},[o.breakpoints.down("tablet")]:{...t("b1")}}}});export{o as default,o as menuItemOverrides};
2
2
  //# sourceMappingURL=menuItemOverrides.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menuItemOverrides.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.fill['fill-inverse-strong'],\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.fill['fill-inverse-strong'],\n color: theme.palette.semantic.text['text-disabled'],\n },\n },\n '&.Mui-selected': {\n backgroundColor: theme.palette.semantic.fill['fill-weak'],\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-weak'],\n color: theme.palette.semantic.text['text-primary'],\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 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","styleOverrides","root","typography","b1Weak","alignItems","backgroundColor","palette","semantic","fill","color","text","display","gap","spacing","justifyContent","padding","icon","cursor","opacity","pointerEvents","outline","stroke","outlineOffset","breakpoints","down","getMobileTextStyle"],"mappings":"yGAIaA,EAAqBC,IAAY,CAC5CC,eAAgB,CACdC,KAAM,IACDC,EAAWC,OACdC,WAAY,SACZC,gBAAiBN,EAAMO,QAAQC,SAASC,KAAK,uBAC7CC,MAAOV,EAAMO,QAAQC,SAASG,KAAK,eACnCC,QAAS,OACTC,IAAKb,EAAMc,QAAQ,KACnBC,eAAgB,aAChBC,QAAShB,EAAMc,QAAQ,IAAK,GAE5B,QAAS,CACPJ,MAAOV,EAAMO,QAAQC,SAASS,KAAK,gBAErC,iBAAkB,CAChBP,MAAOV,EAAMO,QAAQC,SAASG,KAAK,iBACnCO,OAAQ,cACRC,QAAS,EACTC,cAAe,OAEf,6BAA8B,CAC5BV,MAAOV,EAAMO,QAAQC,SAASG,KAAK,kBAErC,+BAAgC,CAC9BD,MAAOV,EAAMO,QAAQC,SAASG,KAAK,kBAErC,QAAS,CACPD,MAAOV,EAAMO,QAAQC,SAASS,KAAK,kBAErC,UAAW,CACTX,gBAAiBN,EAAMO,QAAQC,SAASC,KAAK,uBAC7CC,MAAOV,EAAMO,QAAQC,SAASG,KAAK,mBAGvC,iBAAkB,CAChBL,gBAAiBN,EAAMO,QAAQC,SAASC,KAAK,aAC7CC,MAAOV,EAAMO,QAAQC,SAASG,KAAK,gBAEnC,6BAA8B,CAC5BD,MAAOV,EAAMO,QAAQC,SAASG,KAAK,iBAErC,QAAS,CACPD,MAAOV,EAAMO,QAAQC,SAASS,KAAK,iBAErC,UAAW,CACTX,gBAAiBN,EAAMO,QAAQC,SAASC,KAAK,aAC7CC,MAAOV,EAAMO,QAAQC,SAASG,KAAK,kBAGvC,gDAAiD,CAC/CL,gBAAiBN,EAAMO,QAAQC,SAASC,KAAK,cAC7CC,MAAOV,EAAMO,QAAQC,SAASG,KAAK,gBAErC,iDAAkD,CAChDL,gBAAiBN,EAAMO,QAAQC,SAASC,KAAK,cAC7CC,MAAOV,EAAMO,QAAQC,SAASG,KAAK,gBAErC,sCAAuC,CACrCU,QAAS,aAAarB,EAAMO,QAAQC,SAASc,OAAO,kBACpDC,cAAe,QAGjB,CAACvB,EAAMwB,YAAYC,KAAK,WAAY,IAC/BC,EAAmB"}
1
+ {"version":3,"file":"menuItemOverrides.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":"yGAIaA,EAAqBC,IAAY,CAC5CC,aAAc,CACZC,WAAW,EACXC,eAAe,EACfC,oBAAoB,EACpBC,aAAa,GAEfC,eAAgB,CACdC,KAAM,IACDC,EAAWC,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,EAAmB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");const e=e=>({styleOverrides:{paper:{border:"1px solid",borderColor:e.palette.semantic.stroke["stroke-weak"],borderRadius:e.radius["radius-8"],boxShadow:e.customShadows.overlay,margin:e.spacing(.5,0)},list:{padding:e.spacing(1,0)}}});exports.default=e,exports.menuOverrides=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");const e=e=>({defaultProps:{autoFocus:!0,disableAutoFocusItem:!1},styleOverrides:{paper:{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,margin:e.spacing(.5,0)},list:{backgroundColor:e.palette.semantic.background["background-overlay"],padding:e.spacing(1,0)}}});exports.default=e,exports.menuOverrides=e;
2
2
  //# sourceMappingURL=menuOverrides.cjs.js.map