@zydon/common 2.8.31 → 2.8.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ import { a as a$1 } from './chunk-RPO7AI5K.js';
2
+ import { memo, forwardRef } from 'react';
3
+ import d from '@mui/material/Link';
4
+ import k from '@mui/material/Typography';
5
+ import { useTheme } from '@mui/material/styles';
6
+ import { jsx } from 'react/jsx-runtime';
7
+
8
+ function c(o){return Math.round(parseFloat(o)*16)}function y(o){let e=useTheme(),t=a$1(),p=e.breakpoints.up(t==="xl"?"lg":t),h=(o==="h1"||o==="h2"||o==="h3"||o==="h4"||o==="h5"||o==="h6")&&e.typography[o][p]?e.typography[o][p]:e.typography[o],r=c(h.fontSize),i=Number(e.typography[o].lineHeight)*r,{fontWeight:m,letterSpacing:n}=e.typography[o];return {fontSize:r,lineHeight:i,fontWeight:m,letterSpacing:n}}var a=memo(forwardRef(({asLink:o,variant:e="body1",line:t=2,persistent:p=!1,children:s,sx:h,...r},i)=>{let{lineHeight:m}=y(e),n={overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:t,WebkitBoxOrient:"vertical",wordBreak:"break-all",...p&&{height:m*t},...h};return o?jsx(d,{color:"inherit",ref:i,variant:e,sx:{...n},...r,children:s}):jsx(k,{ref:i,variant:e,sx:{...n},...r,children:s})}));a.displayName="TextMaxLine";var P=a;
9
+
10
+ export { P as a };
11
+ //# sourceMappingURL=out.js.map
12
+ //# sourceMappingURL=chunk-O7SN6FIA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/TextMaxLine/index.tsx","../src/components/TextMaxLine/useTypography.ts"],"names":["forwardRef","memo","Link","Typography","useTheme","remToPx","value","useTypography_default","variant","theme","breakpoints","useWidth","key","getFont","fontSize","lineHeight","fontWeight","letterSpacing","jsx","TextMaxLine","asLink","line","persistent","children","sx","other","ref","styles","TextMaxLine_default"],"mappings":"wCAAA,O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AAO,EACf,GAAGF,EAEH,SAAAF,EACH,EAKFL,EAACf,EAAA,CAAW,IAAKuB,EAAK,QAASlB,EAAS,GAAI,CAAE,GAAGmB,CAAO,EAAI,GAAGF,EAC5D,SAAAF,EACH,CAEJ,CACF,CACF,EAEAJ,EAAY,YAAc,cAE1B,IAAOS,EAAQT","sourcesContent":["import { forwardRef, memo } from 'react';\nimport Link from '@mui/material/Link';\nimport Typography from '@mui/material/Typography';\n\nimport { TextMaxLineProps } from './props';\nimport useTypography from './useTypography';\n\nconst TextMaxLine = memo(\n forwardRef<HTMLAnchorElement, TextMaxLineProps>(\n (\n {\n asLink,\n variant = 'body1',\n line = 2,\n persistent = false,\n children,\n sx,\n ...other\n },\n ref,\n ) => {\n const { lineHeight } = useTypography(variant);\n\n const styles = {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: '-webkit-box',\n WebkitLineClamp: line,\n WebkitBoxOrient: 'vertical',\n wordBreak: 'break-all',\n ...(persistent && {\n height: lineHeight * line,\n }),\n ...sx,\n } as const;\n\n if (asLink) {\n return (\n <Link\n color=\"inherit\"\n ref={ref}\n variant={variant}\n sx={{ ...styles }}\n {...other}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <Typography ref={ref} variant={variant} sx={{ ...styles }} {...other}>\n {children}\n </Typography>\n );\n },\n ),\n);\n\nTextMaxLine.displayName = 'TextMaxLine';\n\nexport default TextMaxLine;\n","import { useTheme } from '@mui/material/styles';\nimport { Variant } from '@mui/material/styles/createTypography';\n\nimport { useWidth } from 'hooks/useResponsive';\n\n// ----------------------------------------------------------------------\n\nfunction remToPx(value: string) {\n return Math.round(parseFloat(value) * 16);\n}\n\nexport default function (variant: Variant) {\n const theme = useTheme();\n\n const breakpoints = useWidth();\n\n const key = theme.breakpoints.up(breakpoints === 'xl' ? 'lg' : breakpoints);\n\n const hasResponsive =\n variant === 'h1' ||\n variant === 'h2' ||\n variant === 'h3' ||\n variant === 'h4' ||\n variant === 'h5' ||\n variant === 'h6';\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const getFont: any =\n hasResponsive && theme.typography[variant][key]\n ? theme.typography[variant][key]\n : theme.typography[variant];\n\n const fontSize = remToPx(getFont.fontSize);\n\n const lineHeight = Number(theme.typography[variant].lineHeight) * fontSize;\n\n const { fontWeight, letterSpacing } = theme.typography[variant];\n\n return { fontSize, lineHeight, fontWeight, letterSpacing };\n}\n"]}
@@ -11,7 +11,7 @@ interface ImageContainerProps {
11
11
 
12
12
  declare const Avatar: react.MemoExoticComponent<react.ForwardRefExoticComponent<Omit<PropsWithChildren<ImageContainerProps & _mui_material_Avatar.AvatarOwnProps & _mui_material_Avatar.AvatarSlotsAndSlotProps & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
13
13
  ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
14
- }, "children" | "className" | "style" | "classes" | "sx" | "variant" | "slots" | "slotProps" | "sizes" | "alt" | "src" | "srcSet" | "imgProps"> & {
14
+ }, "children" | "className" | "style" | "classes" | "sx" | "variant" | "slots" | "slotProps" | "alt" | "src" | "sizes" | "srcSet" | "imgProps"> & {
15
15
  component?: react.ElementType<any, keyof react.JSX.IntrinsicElements> | undefined;
16
16
  }>, "ref"> & react.RefAttributes<HTMLDivElement>>>;
17
17
 
@@ -1,4 +1,4 @@
1
- import { a as a$1 } from '../../chunk-VJZTUPZB.js';
1
+ import { a as a$1 } from '../../chunk-O7SN6FIA.js';
2
2
  import { a } from '../../chunk-ET6H3IRG.js';
3
3
  import '../../chunk-ICEDOBLM.js';
4
4
  import '../../chunk-RPO7AI5K.js';
@@ -1,4 +1,4 @@
1
- export { a as default } from '../../chunk-VJZTUPZB.js';
1
+ export { a as default } from '../../chunk-O7SN6FIA.js';
2
2
  import '../../chunk-RPO7AI5K.js';
3
3
  //# sourceMappingURL=out.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  import { useState, useMemo, useCallback } from 'react';
2
2
  import { debounce } from '@mui/material/utils';
3
3
 
4
- var b=f=>{let[i,s]=useState(!1),[u,d]=useState(),[p,o]=useState(),m=useMemo(()=>debounce(e=>{d(e),s(!1);},500),[]),O=useCallback(e=>{e&&s(!0),m(e);},[m]),l=useCallback(()=>{s(!1),d(void 0);},[]),S=useCallback((e=[],r=!1)=>{let t=p||f;if(!t||u!==void 0)return e.filter(n=>n.value!==null&&n.value!==void 0);if(i||r)return [];let A=[...Array.isArray(t)?t:[t],...e];return Array.from(new Set(A.map(n=>n.value))).map(n=>A.find(v=>v.value===n)).filter(n=>n.value!==null&&n.value!==void 0)},[p,f,u,i]),h=useCallback((e=[],r)=>{if(!r||Array.isArray(r)&&r.length===0){o(void 0);return}Array.isArray(r)?o(e.filter(t=>r.includes(t.value))):o(e.find(t=>t.value===r)),l();},[l]);return {search:u,searching:i,buildOptions:S,onSearch:O,onSelectValue:h,finishSearch:l}},x=b;
4
+ var k=c=>{let[i,u]=useState(!1),[s,d]=useState(),[p,l]=useState(),m=useMemo(()=>debounce(n=>{d(n),u(!1);},500),[]),S=useCallback(n=>{n&&u(!0),m(n);},[m]),o=useCallback(()=>{u(!1),d(void 0);},[]),h=useCallback((n=[],r=!1)=>{let t=p||c;if(!t||s!==void 0)return n.filter(e=>e.value!==null&&e.value!==void 0);let v=Array.isArray(t)?t:[t];if(i||r)return v.filter(e=>e?.value!==null&&e?.value!==void 0);let O=[...v,...n];return Array.from(new Set(O.map(e=>e.value))).map(e=>O.find(y=>y.value===e)).filter(e=>e.value!==null&&e.value!==void 0)},[p,c,s,i]),A=useCallback((n=[],r)=>{if(!r||Array.isArray(r)&&r.length===0){l(void 0);return}Array.isArray(r)?l(n.filter(t=>r.includes(t.value))):l(n.find(t=>t.value===r)),o();},[o]);return {search:s,searching:i,buildOptions:h,onSearch:S,onSelectValue:A,finishSearch:o}},x=k;
5
5
 
6
6
  export { x as default };
7
7
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useAutocomplete.ts"],"names":["useCallback","useMemo","useState","debounce","useAutocomplete","initialValue","searching","setSearching","search","setSearch","selectedValue","setSelectedValue","debouncedSetSearch","searchTerm","onSearch","term","finishSearch","buildOptions","options","fetching","value","opt","combinedOptions","uniqueValue","onSelectValue","selected","useAutocomplete_default"],"mappings":"AAAA,OAAS,eAAAA,EAAa,WAAAC,EAAS,YAAAC,MAAgB,QAC/C,OAAS,YAAAC,MAAgB,sBAIzB,IAAMC,EAAmBC,GAAqC,CAC5D,GAAM,CAACC,EAAWC,CAAY,EAAIL,EAAS,EAAK,EAC1C,CAACM,EAAQC,CAAS,EAAIP,EAAiB,EACvC,CAACQ,EAAeC,CAAgB,EAAIT,EAA4B,EAEhEU,EAAqBX,EACzB,IACEE,EAAUU,GAAwB,CAChCJ,EAAUI,CAAU,EACpBN,EAAa,EAAK,CACpB,EAAG,GAAG,EACR,CAAC,CACH,EAEMO,EAAWd,EACde,GAAkB,CACbA,GAAMR,EAAa,EAAI,EAC3BK,EAAmBG,CAAI,CACzB,EACA,CAACH,CAAkB,CACrB,EAEMI,EAAehB,EAAY,IAAM,CACrCO,EAAa,EAAK,EAClBE,EAAU,MAAS,CACrB,EAAG,CAAC,CAAC,EAECQ,EAAejB,EACnB,CAACkB,EAAoB,CAAC,EAAGC,EAAW,KAAU,CAC5C,IAAMC,EAAQV,GAAiBL,EAE/B,GAAI,CAACe,GAASZ,IAAW,OACvB,OAAOU,EAAQ,OACbG,GAAOA,EAAI,QAAU,MAAQA,EAAI,QAAU,MAC7C,EAEF,GAAIf,GAAaa,EAAU,MAAO,CAAC,EAGnC,IAAMG,EAAkB,CAAC,GADH,MAAM,QAAQF,CAAK,EAAIA,EAAQ,CAACA,CAAK,EAChB,GAAGF,CAAO,EAErD,OACE,MAAM,KAAK,IAAI,IAAII,EAAgB,IAAID,GAAOA,EAAI,KAAK,CAAC,CAAC,EAAE,IACzDE,GAAeD,EAAgB,KAAKD,GAAOA,EAAI,QAAUE,CAAW,CACtE,EACA,OAAOF,GAAOA,EAAI,QAAU,MAAQA,EAAI,QAAU,MAAS,CAC/D,EACA,CAACX,EAAeL,EAAcG,EAAQF,CAAS,CACjD,EAEMkB,EAAgBxB,EACpB,CAACkB,EAAoB,CAAC,EAAGO,IAAsB,CAC7C,GAAI,CAACA,GAAa,MAAM,QAAQA,CAAQ,GAAKA,EAAS,SAAW,EAAI,CACnEd,EAAiB,MAAS,EAC1B,OAGE,MAAM,QAAQc,CAAQ,EACxBd,EACEO,EAAQ,OAAOG,GAAOI,EAAS,SAASJ,EAAI,KAAe,CAAC,CAC9D,EAEAV,EAAiBO,EAAQ,KAAKG,GAAOA,EAAI,QAAUI,CAAQ,CAAC,EAG9DT,EAAa,CACf,EACA,CAACA,CAAY,CACf,EAEA,MAAO,CACL,OAAAR,EACA,UAAAF,EACA,aAAAW,EACA,SAAAH,EACA,cAAAU,EACA,aAAAR,CACF,CACF,EAEOU,EAAQtB","sourcesContent":["import { useCallback, useMemo, useState } from 'react';\nimport { debounce } from '@mui/material/utils';\n\nimport { Option } from 'types/option';\n\nconst useAutocomplete = (initialValue?: Option | Option[]) => {\n const [searching, setSearching] = useState(false);\n const [search, setSearch] = useState<string>();\n const [selectedValue, setSelectedValue] = useState<Option | Option[]>();\n\n const debouncedSetSearch = useMemo(\n () =>\n debounce((searchTerm?: string) => {\n setSearch(searchTerm);\n setSearching(false);\n }, 500),\n [],\n );\n\n const onSearch = useCallback(\n (term?: string) => {\n if (term) setSearching(true);\n debouncedSetSearch(term);\n },\n [debouncedSetSearch],\n );\n\n const finishSearch = useCallback(() => {\n setSearching(false);\n setSearch(undefined);\n }, []);\n\n const buildOptions = useCallback(\n (options: Option[] = [], fetching = false) => {\n const value = selectedValue || initialValue;\n\n if (!value || search !== undefined)\n return options.filter(\n opt => opt.value !== null && opt.value !== undefined,\n );\n\n if (searching || fetching) return [];\n\n const selectedArray = Array.isArray(value) ? value : [value];\n const combinedOptions = [...selectedArray, ...options];\n\n return (\n Array.from(new Set(combinedOptions.map(opt => opt.value))).map(\n uniqueValue => combinedOptions.find(opt => opt.value === uniqueValue),\n ) as Option[]\n ).filter(opt => opt.value !== null && opt.value !== undefined);\n },\n [selectedValue, initialValue, search, searching],\n );\n\n const onSelectValue = useCallback(\n (options: Option[] = [], selected: unknown) => {\n if (!selected || (Array.isArray(selected) && selected.length === 0)) {\n setSelectedValue(undefined);\n return;\n }\n\n if (Array.isArray(selected)) {\n setSelectedValue(\n options.filter(opt => selected.includes(opt.value as string)),\n );\n } else {\n setSelectedValue(options.find(opt => opt.value === selected));\n }\n\n finishSearch();\n },\n [finishSearch],\n );\n\n return {\n search,\n searching,\n buildOptions,\n onSearch,\n onSelectValue,\n finishSearch,\n };\n};\n\nexport default useAutocomplete;\n"]}
1
+ {"version":3,"sources":["../../src/hooks/useAutocomplete.ts"],"names":["useCallback","useMemo","useState","debounce","useAutocomplete","initialValue","searching","setSearching","search","setSearch","selectedValue","setSelectedValue","debouncedSetSearch","searchTerm","onSearch","term","finishSearch","buildOptions","options","fetching","value","opt","selectedArray","combinedOptions","uniqueValue","onSelectValue","selected","useAutocomplete_default"],"mappings":"AAAA,OAAS,eAAAA,EAAa,WAAAC,EAAS,YAAAC,MAAgB,QAC/C,OAAS,YAAAC,MAAgB,sBAIzB,IAAMC,EAAmBC,GAAqC,CAC5D,GAAM,CAACC,EAAWC,CAAY,EAAIL,EAAS,EAAK,EAC1C,CAACM,EAAQC,CAAS,EAAIP,EAAiB,EACvC,CAACQ,EAAeC,CAAgB,EAAIT,EAA4B,EAEhEU,EAAqBX,EACzB,IACEE,EAAUU,GAAwB,CAChCJ,EAAUI,CAAU,EACpBN,EAAa,EAAK,CACpB,EAAG,GAAG,EACR,CAAC,CACH,EAEMO,EAAWd,EACde,GAAkB,CACbA,GAAMR,EAAa,EAAI,EAC3BK,EAAmBG,CAAI,CACzB,EACA,CAACH,CAAkB,CACr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ent":["import { useCallback, useMemo, useState } from 'react';\nimport { debounce } from '@mui/material/utils';\n\nimport { Option } from 'types/option';\n\nconst useAutocomplete = (initialValue?: Option | Option[]) => {\n const [searching, setSearching] = useState(false);\n const [search, setSearch] = useState<string>();\n const [selectedValue, setSelectedValue] = useState<Option | Option[]>();\n\n const debouncedSetSearch = useMemo(\n () =>\n debounce((searchTerm?: string) => {\n setSearch(searchTerm);\n setSearching(false);\n }, 500),\n [],\n );\n\n const onSearch = useCallback(\n (term?: string) => {\n if (term) setSearching(true);\n debouncedSetSearch(term);\n },\n [debouncedSetSearch],\n );\n\n const finishSearch = useCallback(() => {\n setSearching(false);\n setSearch(undefined);\n }, []);\n\n const buildOptions = useCallback(\n (options: Option[] = [], fetching = false) => {\n const value = selectedValue || initialValue;\n\n if (!value || search !== undefined) {\n return options.filter(\n opt => opt.value !== null && opt.value !== undefined,\n );\n }\n\n const selectedArray = Array.isArray(value) ? value : [value];\n\n if (searching || fetching) {\n return selectedArray.filter(\n opt => opt?.value !== null && opt?.value !== undefined,\n );\n }\n\n const combinedOptions = [...selectedArray, ...options];\n\n return (\n Array.from(new Set(combinedOptions.map(opt => opt.value))).map(\n uniqueValue => combinedOptions.find(opt => opt.value === uniqueValue),\n ) as Option[]\n ).filter(opt => opt.value !== null && opt.value !== undefined);\n },\n [selectedValue, initialValue, search, searching],\n );\n\n const onSelectValue = useCallback(\n (options: Option[] = [], selected: unknown) => {\n if (!selected || (Array.isArray(selected) && selected.length === 0)) {\n setSelectedValue(undefined);\n return;\n }\n\n if (Array.isArray(selected)) {\n setSelectedValue(\n options.filter(opt => selected.includes(opt.value as string)),\n );\n } else {\n setSelectedValue(options.find(opt => opt.value === selected));\n }\n\n finishSearch();\n },\n [finishSearch],\n );\n\n return {\n search,\n searching,\n buildOptions,\n onSearch,\n onSelectValue,\n finishSearch,\n };\n};\n\nexport default useAutocomplete;\n"]}
@@ -12,6 +12,7 @@ declare const useSnackbar: () => {
12
12
  custom: (jsx: (id: string | number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>, data?: ExternalToast | undefined) => string | number;
13
13
  message: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
14
14
  promise: <ToastData>(promise: Promise<ToastData> | (() => Promise<ToastData>), data?: ({
15
+ cancel?: ReactNode | sonner.Action;
15
16
  className?: string | undefined;
16
17
  style?: react.CSSProperties | undefined;
17
18
  position?: ("top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right") | undefined;
@@ -20,7 +21,6 @@ declare const useSnackbar: () => {
20
21
  icon?: ReactNode;
21
22
  duration?: number | undefined;
22
23
  onDismiss?: ((toast: sonner.ToastT) => void) | undefined;
23
- cancel?: ReactNode | sonner.Action;
24
24
  richColors?: boolean | undefined;
25
25
  invert?: boolean | undefined;
26
26
  closeButton?: boolean | undefined;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CustomShadows } from './index-5a5e5dc8.js';
2
- export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-5a5e5dc8.js';
1
+ import { C as CustomShadows } from './index-c8f1e6e7.js';
2
+ export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-c8f1e6e7.js';
3
3
  export { S as SettingsContextValue, _ as SettingsProvider, T as ThemeProviderProps, u as useSettingsContext } from './settings-provider-38d09283.js';
4
4
  export { THEME_CONFIG, default as ThemeProvider } from './theme/theme-provider.js';
5
5
  import { S as SettingsState } from './settings-583c107c.js';
@@ -1,4 +1,4 @@
1
- export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from '../../index-5a5e5dc8.js';
1
+ export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from '../../index-c8f1e6e7.js';
2
2
  import '@mui/lab/TimelineConnector';
3
3
  import '@mui/system';
4
4
  import '@mui/lab/TimelineDot';
@@ -173,7 +173,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
173
173
  float?: csstype.Property.Float | readonly NonNullable<csstype.Property.Float | undefined>[] | readonly csstype.Property.Float[] | undefined;
174
174
  floodColor?: readonly string[] | csstype.Property.FloodColor | readonly csstype.Property.FloodColor[] | undefined;
175
175
  floodOpacity?: readonly ((string & {}) | csstype.Globals)[] | csstype.Property.FloodOpacity | readonly NonNullable<csstype.Property.FloodOpacity | undefined>[] | undefined;
176
- fontFamily?: csstype.Property.FontFamily | readonly string[] | readonly csstype.Property.FontFamily[] | undefined;
176
+ fontFamily?: readonly string[] | csstype.Property.FontFamily | readonly csstype.Property.FontFamily[] | undefined;
177
177
  fontFeatureSettings?: readonly string[] | csstype.Property.FontFeatureSettings | readonly csstype.Property.FontFeatureSettings[] | undefined;
178
178
  fontKerning?: csstype.Property.FontKerning | readonly NonNullable<csstype.Property.FontKerning | undefined>[] | readonly csstype.Property.FontKerning[] | undefined;
179
179
  fontLanguageOverride?: readonly string[] | csstype.Property.FontLanguageOverride | readonly csstype.Property.FontLanguageOverride[] | undefined;
@@ -197,7 +197,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
197
197
  fontVariantNumeric?: readonly string[] | csstype.Property.FontVariantNumeric | readonly csstype.Property.FontVariantNumeric[] | undefined;
198
198
  fontVariantPosition?: csstype.Property.FontVariantPosition | readonly NonNullable<csstype.Property.FontVariantPosition | undefined>[] | readonly csstype.Property.FontVariantPosition[] | undefined;
199
199
  fontVariationSettings?: readonly string[] | csstype.Property.FontVariationSettings | readonly csstype.Property.FontVariationSettings[] | undefined;
200
- fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ((string & {}) | csstype.Globals | "bold" | "normal" | "bolder" | "lighter")[] | undefined;
200
+ fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ("bold" | (string & {}) | csstype.Globals | "normal" | "bolder" | "lighter")[] | undefined;
201
201
  fontWidth?: readonly string[] | csstype.Property.FontWidth | readonly csstype.Property.FontWidth[] | undefined;
202
202
  forcedColorAdjust?: csstype.Property.ForcedColorAdjust | readonly NonNullable<csstype.Property.ForcedColorAdjust | undefined>[] | readonly csstype.Property.ForcedColorAdjust[] | undefined;
203
203
  gridAutoColumns?: readonly (string | (string & {}))[] | csstype.Property.GridAutoColumns<string | number> | readonly NonNullable<csstype.Property.GridAutoColumns<string | number> | undefined>[] | undefined;
@@ -460,9 +460,9 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
460
460
  x?: readonly (string | (string & {}))[] | csstype.Property.X<string | number> | readonly NonNullable<csstype.Property.X<string | number> | undefined>[] | undefined;
461
461
  y?: readonly (string | (string & {}))[] | csstype.Property.Y<string | number> | readonly NonNullable<csstype.Property.Y<string | number> | undefined>[] | undefined;
462
462
  zIndex?: readonly ((string & {}) | csstype.Globals | "auto")[] | csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | undefined;
463
- zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
463
+ zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ("reset" | (string & {}) | csstype.Globals | "normal")[] | undefined;
464
464
  all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
465
- animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
465
+ animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
466
466
  animationRange?: readonly (string | (string & {}))[] | csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | undefined;
467
467
  background?: readonly (string | (string & {}))[] | csstype.Property.Background<string | number> | readonly NonNullable<csstype.Property.Background<string | number> | undefined>[] | undefined;
468
468
  border?: readonly (string | (string & {}))[] | csstype.Property.Border<string | number> | readonly NonNullable<csstype.Property.Border<string | number> | undefined>[] | undefined;
@@ -474,7 +474,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
474
474
  borderBlockWidth?: readonly (string | (string & {}))[] | csstype.Property.BorderBlockWidth<string | number> | readonly NonNullable<csstype.Property.BorderBlockWidth<string | number> | undefined>[] | undefined;
475
475
  borderBottom?: readonly (string | (string & {}))[] | csstype.Property.BorderBottom<string | number> | readonly NonNullable<csstype.Property.BorderBottom<string | number> | undefined>[] | undefined;
476
476
  borderColor?: readonly string[] | csstype.Property.BorderColor | readonly csstype.Property.BorderColor[] | undefined;
477
- borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
477
+ borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
478
478
  borderInline?: readonly (string | (string & {}))[] | csstype.Property.BorderInline<string | number> | readonly NonNullable<csstype.Property.BorderInline<string | number> | undefined>[] | undefined;
479
479
  borderInlineColor?: readonly string[] | csstype.Property.BorderInlineColor | readonly csstype.Property.BorderInlineColor[] | undefined;
480
480
  borderInlineEnd?: readonly (string | (string & {}))[] | csstype.Property.BorderInlineEnd<string | number> | readonly NonNullable<csstype.Property.BorderInlineEnd<string | number> | undefined>[] | undefined;
@@ -509,7 +509,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
509
509
  marginBlock?: readonly (string | (string & {}))[] | csstype.Property.MarginBlock<string | number> | readonly NonNullable<csstype.Property.MarginBlock<string | number> | undefined>[] | undefined;
510
510
  marginInline?: readonly (string | (string & {}))[] | csstype.Property.MarginInline<string | number> | readonly NonNullable<csstype.Property.MarginInline<string | number> | undefined>[] | undefined;
511
511
  mask?: readonly (string | (string & {}))[] | csstype.Property.Mask<string | number> | readonly NonNullable<csstype.Property.Mask<string | number> | undefined>[] | undefined;
512
- maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
512
+ maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
513
513
  motion?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
514
514
  offset?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
515
515
  outline?: readonly (string | (string & {}))[] | csstype.Property.Outline<string | number> | readonly NonNullable<csstype.Property.Outline<string | number> | undefined>[] | undefined;
@@ -758,8 +758,8 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
758
758
  WebkitUserModify?: csstype.Property.WebkitUserModify | readonly NonNullable<csstype.Property.WebkitUserModify | undefined>[] | readonly csstype.Property.WebkitUserModify[] | undefined;
759
759
  WebkitUserSelect?: csstype.Property.WebkitUserSelect | readonly NonNullable<csstype.Property.WebkitUserSelect | undefined>[] | readonly csstype.Property.WebkitUserSelect[] | undefined;
760
760
  WebkitWritingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
761
- MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
762
- MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
761
+ MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
762
+ MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
763
763
  MozColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
764
764
  MozColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
765
765
  MozOutlineRadius?: readonly (string | (string & {}))[] | csstype.Property.MozOutlineRadius<string | number> | readonly NonNullable<csstype.Property.MozOutlineRadius<string | number> | undefined>[] | undefined;
@@ -771,16 +771,16 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
771
771
  msScrollSnapX?: readonly string[] | csstype.Property.MsScrollSnapX | readonly csstype.Property.MsScrollSnapX[] | undefined;
772
772
  msScrollSnapY?: readonly string[] | csstype.Property.MsScrollSnapY | readonly csstype.Property.MsScrollSnapY[] | undefined;
773
773
  msTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
774
- WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
774
+ WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
775
775
  WebkitBorderBefore?: readonly (string | (string & {}))[] | csstype.Property.WebkitBorderBefore<string | number> | readonly NonNullable<csstype.Property.WebkitBorderBefore<string | number> | undefined>[] | undefined;
776
- WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
776
+ WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
777
777
  WebkitBorderRadius?: readonly (string | (string & {}))[] | csstype.Property.BorderRadius<string | number> | readonly NonNullable<csstype.Property.BorderRadius<string | number> | undefined>[] | undefined;
778
778
  WebkitColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
779
779
  WebkitColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
780
780
  WebkitFlex?: readonly (string | (string & {}))[] | csstype.Property.Flex<string | number> | readonly NonNullable<csstype.Property.Flex<string | number> | undefined>[] | undefined;
781
781
  WebkitFlexFlow?: readonly string[] | csstype.Property.FlexFlow | readonly csstype.Property.FlexFlow[] | undefined;
782
782
  WebkitMask?: readonly (string | (string & {}))[] | csstype.Property.WebkitMask<string | number> | readonly NonNullable<csstype.Property.WebkitMask<string | number> | undefined>[] | undefined;
783
- WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
783
+ WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
784
784
  WebkitTextEmphasis?: readonly string[] | csstype.Property.TextEmphasis | readonly csstype.Property.TextEmphasis[] | undefined;
785
785
  WebkitTextStroke?: readonly (string | (string & {}))[] | csstype.Property.WebkitTextStroke<string | number> | readonly NonNullable<csstype.Property.WebkitTextStroke<string | number> | undefined>[] | undefined;
786
786
  WebkitTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
@@ -861,7 +861,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
861
861
  MozUserFocus?: csstype.Property.MozUserFocus | readonly NonNullable<csstype.Property.MozUserFocus | undefined>[] | readonly csstype.Property.MozUserFocus[] | undefined;
862
862
  MozUserInput?: csstype.Property.MozUserInput | readonly NonNullable<csstype.Property.MozUserInput | undefined>[] | readonly csstype.Property.MozUserInput[] | undefined;
863
863
  msImeMode?: csstype.Property.ImeMode | readonly NonNullable<csstype.Property.ImeMode | undefined>[] | readonly csstype.Property.ImeMode[] | undefined;
864
- OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
864
+ OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
865
865
  OAnimationDelay?: readonly string[] | csstype.Property.AnimationDelay<string & {}> | readonly csstype.Property.AnimationDelay<string & {}>[] | undefined;
866
866
  OAnimationDirection?: readonly string[] | csstype.Property.AnimationDirection | readonly csstype.Property.AnimationDirection[] | undefined;
867
867
  OAnimationDuration?: readonly string[] | csstype.Property.AnimationDuration<string & {}> | readonly csstype.Property.AnimationDuration<string & {}>[] | undefined;
@@ -871,7 +871,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
871
871
  OAnimationPlayState?: readonly string[] | csstype.Property.AnimationPlayState | readonly csstype.Property.AnimationPlayState[] | undefined;
872
872
  OAnimationTimingFunction?: readonly string[] | csstype.Property.AnimationTimingFunction | readonly csstype.Property.AnimationTimingFunction[] | undefined;
873
873
  OBackgroundSize?: readonly (string | (string & {}))[] | csstype.Property.BackgroundSize<string | number> | readonly NonNullable<csstype.Property.BackgroundSize<string | number> | undefined>[] | undefined;
874
- OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
874
+ OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
875
875
  OObjectFit?: csstype.Property.ObjectFit | readonly NonNullable<csstype.Property.ObjectFit | undefined>[] | readonly csstype.Property.ObjectFit[] | undefined;
876
876
  OObjectPosition?: readonly (string | (string & {}))[] | csstype.Property.ObjectPosition<string | number> | readonly NonNullable<csstype.Property.ObjectPosition<string | number> | undefined>[] | undefined;
877
877
  OTabSize?: readonly (string | (string & {}))[] | csstype.Property.TabSize<string | number> | readonly NonNullable<csstype.Property.TabSize<string | number> | undefined>[] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.8.31",
3
+ "version": "2.8.33",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -1,12 +0,0 @@
1
- import { a } from './chunk-RPO7AI5K.js';
2
- import { memo, forwardRef } from 'react';
3
- import T from '@mui/material/Link';
4
- import d from '@mui/material/Typography';
5
- import { useTheme } from '@mui/material/styles';
6
- import { jsx } from 'react/jsx-runtime';
7
-
8
- function x(o){return Math.round(parseFloat(o)*16)}function y(o){let e=useTheme(),t=a(),p=e.breakpoints.up(t==="xl"?"lg":t),h=(o==="h1"||o==="h2"||o==="h3"||o==="h4"||o==="h5"||o==="h6")&&e.typography[o][p]?e.typography[o][p]:e.typography[o],r=x(h.fontSize),i=Number(e.typography[o].lineHeight)*r,{fontWeight:m,letterSpacing:n}=e.typography[o];return {fontSize:r,lineHeight:i,fontWeight:m,letterSpacing:n}}var g=memo(forwardRef(({asLink:o,variant:e="body1",line:t=2,persistent:p=!1,children:s,sx:h,...r},i)=>{let{lineHeight:m}=y(e),n={overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:t,WebkitBoxOrient:"vertical",...p&&{height:m*t},...h};return o?jsx(T,{color:"inherit",ref:i,variant:e,sx:{...n},...r,children:s}):jsx(d,{ref:i,variant:e,sx:{...n},...r,children:s})}));g.displayName="TextMaxLine";var P=g;
9
-
10
- export { P as a };
11
- //# sourceMappingURL=out.js.map
12
- //# sourceMappingURL=chunk-VJZTUPZB.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/TextMaxLine/index.tsx","../src/components/TextMaxLine/useTypography.ts"],"names":["forwardRef","memo","Link","Typography","useTheme","remToPx","value","useTypography_default","variant","theme","breakpoints","useWidth","key","getFont","fontSize","lineHeight","fontWeight","letterSpacing","jsx","TextMaxLine","asLink","line","persistent","children","sx","other","ref","styles","TextMaxLine_default"],"mappings":"wCAAA,OAAS,cAAAA,EAAY,QAAAC,MAAY,QACjC,OAAOC,MAAU,qBACjB,OAAOC,MAAgB,2BCFvB,OAAS,YAAAC,MAAgB,uBAOzB,SAASC,EAAQC,EAAe,CAC9B,OAAO,KAAK,MAAM,WAAWA,CAAK,EAAI,EAAE,CAC1C,CAEe,SAARC,EAAkBC,EAAkB,CACzC,IAAMC,E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Link from '@mui/material/Link';\nimport Typography from '@mui/material/Typography';\n\nimport { TextMaxLineProps } from './props';\nimport useTypography from './useTypography';\n\nconst TextMaxLine = memo(\n forwardRef<HTMLAnchorElement, TextMaxLineProps>(\n (\n {\n asLink,\n variant = 'body1',\n line = 2,\n persistent = false,\n children,\n sx,\n ...other\n },\n ref,\n ) => {\n const { lineHeight } = useTypography(variant);\n\n const styles = {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: '-webkit-box',\n WebkitLineClamp: line,\n WebkitBoxOrient: 'vertical',\n ...(persistent && {\n height: lineHeight * line,\n }),\n ...sx,\n } as const;\n\n if (asLink) {\n return (\n <Link\n color=\"inherit\"\n ref={ref}\n variant={variant}\n sx={{ ...styles }}\n {...other}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <Typography ref={ref} variant={variant} sx={{ ...styles }} {...other}>\n {children}\n </Typography>\n );\n },\n ),\n);\n\nTextMaxLine.displayName = 'TextMaxLine';\n\nexport default TextMaxLine;\n","import { useTheme } from '@mui/material/styles';\nimport { Variant } from '@mui/material/styles/createTypography';\n\nimport { useWidth } from 'hooks/useResponsive';\n\n// ----------------------------------------------------------------------\n\nfunction remToPx(value: string) {\n return Math.round(parseFloat(value) * 16);\n}\n\nexport default function (variant: Variant) {\n const theme = useTheme();\n\n const breakpoints = useWidth();\n\n const key = theme.breakpoints.up(breakpoints === 'xl' ? 'lg' : breakpoints);\n\n const hasResponsive =\n variant === 'h1' ||\n variant === 'h2' ||\n variant === 'h3' ||\n variant === 'h4' ||\n variant === 'h5' ||\n variant === 'h6';\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const getFont: any =\n hasResponsive && theme.typography[variant][key]\n ? theme.typography[variant][key]\n : theme.typography[variant];\n\n const fontSize = remToPx(getFont.fontSize);\n\n const lineHeight = Number(theme.typography[variant].lineHeight) * fontSize;\n\n const { fontWeight, letterSpacing } = theme.typography[variant];\n\n return { fontSize, lineHeight, fontWeight, letterSpacing };\n}\n"]}
@@ -286,10 +286,13 @@ declare const components: {
286
286
  MuiTimelineDot: {
287
287
  defaultProps?: Partial<_mui_lab_TimelineDot.TimelineDotProps> | undefined;
288
288
  styleOverrides?: Partial<_mui_material_styles_overrides.OverridesStyleRules<keyof _mui_lab_TimelineDot.TimelineDotClasses, "MuiTimelineDot", {
289
- transitions: _mui_material.Transitions;
289
+ cssVarPrefix: string;
290
+ zIndex: _mui_material.ZIndex;
291
+ direction: _mui_system.Direction;
292
+ opacity: _mui_material.Opacity;
293
+ typography: _mui_material.TypographyVariants;
290
294
  palette: _mui_material.Palette;
291
295
  colorSchemes: Record<_mui_material.SupportedColorScheme, _mui_material.ColorSystem>;
292
- cssVarPrefix: string;
293
296
  vars: _mui_material.ThemeVars;
294
297
  getCssVar: (field: _mui_material.ThemeCssVar, ...vars: _mui_material.ThemeCssVar[]) => string;
295
298
  getColorSchemeSelector: (colorScheme: _mui_material.SupportedColorScheme) => string;
@@ -300,16 +303,13 @@ declare const components: {
300
303
  spacing: _mui_system.Spacing;
301
304
  breakpoints: _mui_system.Breakpoints;
302
305
  shape: _mui_system.Shape;
303
- typography: _mui_material.TypographyVariants;
306
+ transitions: _mui_material.Transitions;
304
307
  shadows: _mui_material.Shadows;
305
308
  mixins: _mui_material.Mixins;
306
- zIndex: _mui_material.ZIndex;
307
- direction: _mui_system.Direction;
308
309
  shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
309
310
  unstable_sxConfig: _mui_system.SxConfig;
310
311
  unstable_sx: (props: _mui_system.SxProps<_mui_material.Theme>) => _mui_styled_engine.CSSObject;
311
312
  applyStyles: _mui_system.ApplyStyles<"light" | "dark">;
312
- opacity: _mui_material.Opacity;
313
313
  overlays: _mui_material.Overlays;
314
314
  customShadows: CustomShadows;
315
315
  unstable_strictMode?: boolean | undefined;
@@ -326,10 +326,13 @@ declare const components: {
326
326
  MuiTimelineConnector: {
327
327
  defaultProps?: Partial<_mui_lab_TimelineConnector.TimelineConnectorProps> | undefined;
328
328
  styleOverrides?: Partial<_mui_material_styles_overrides.OverridesStyleRules<"root", "MuiTimelineConnector", {
329
- transitions: _mui_material.Transitions;
329
+ cssVarPrefix: string;
330
+ zIndex: _mui_material.ZIndex;
331
+ direction: _mui_system.Direction;
332
+ opacity: _mui_material.Opacity;
333
+ typography: _mui_material.TypographyVariants;
330
334
  palette: _mui_material.Palette;
331
335
  colorSchemes: Record<_mui_material.SupportedColorScheme, _mui_material.ColorSystem>;
332
- cssVarPrefix: string;
333
336
  vars: _mui_material.ThemeVars;
334
337
  getCssVar: (field: _mui_material.ThemeCssVar, ...vars: _mui_material.ThemeCssVar[]) => string;
335
338
  getColorSchemeSelector: (colorScheme: _mui_material.SupportedColorScheme) => string;
@@ -340,16 +343,13 @@ declare const components: {
340
343
  spacing: _mui_system.Spacing;
341
344
  breakpoints: _mui_system.Breakpoints;
342
345
  shape: _mui_system.Shape;
343
- typography: _mui_material.TypographyVariants;
346
+ transitions: _mui_material.Transitions;
344
347
  shadows: _mui_material.Shadows;
345
348
  mixins: _mui_material.Mixins;
346
- zIndex: _mui_material.ZIndex;
347
- direction: _mui_system.Direction;
348
349
  shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
349
350
  unstable_sxConfig: _mui_system.SxConfig;
350
351
  unstable_sx: (props: _mui_system.SxProps<_mui_material.Theme>) => _mui_styled_engine.CSSObject;
351
352
  applyStyles: _mui_system.ApplyStyles<"light" | "dark">;
352
- opacity: _mui_material.Opacity;
353
353
  overlays: _mui_material.Overlays;
354
354
  customShadows: CustomShadows;
355
355
  unstable_strictMode?: boolean | undefined;