@flipdish/portal-library 2.1.3 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/Typography/index.cjs.js +2 -0
- package/dist/components/atoms/Typography/index.cjs.js.map +1 -0
- package/dist/components/atoms/Typography/index.d.ts +2 -0
- package/dist/components/atoms/Typography/index.js +2 -0
- package/dist/components/atoms/Typography/index.js.map +1 -0
- package/dist/themes/ThemeProvider.cjs.js +1 -1
- package/dist/themes/ThemeProvider.cjs.js.map +1 -1
- package/dist/themes/ThemeProvider.d.ts +1 -1
- package/dist/themes/ThemeProvider.js +1 -1
- package/dist/themes/ThemeProvider.js.map +1 -1
- package/dist/themes/flipdishPublicTheme.cjs.js +1 -1
- package/dist/themes/flipdishPublicTheme.cjs.js.map +1 -1
- package/dist/themes/flipdishPublicTheme.d.ts +3 -3
- package/dist/themes/flipdishPublicTheme.js +1 -1
- package/dist/themes/flipdishPublicTheme.js.map +1 -1
- package/dist/themes/tokens/radius/radius.cjs.js +2 -0
- package/dist/themes/tokens/radius/radius.cjs.js.map +1 -0
- package/dist/themes/tokens/radius/radius.d.ts +17 -0
- package/dist/themes/tokens/radius/radius.js +2 -0
- package/dist/themes/tokens/radius/radius.js.map +1 -0
- package/dist/themes/tokens/spacing/spacing.cjs.js +2 -0
- package/dist/themes/tokens/spacing/spacing.cjs.js.map +1 -0
- package/dist/themes/tokens/spacing/spacing.d.ts +22 -0
- package/dist/themes/tokens/spacing/spacing.js +2 -0
- package/dist/themes/tokens/spacing/spacing.js.map +1 -0
- package/dist/themes/tokens/typography/font-family.cjs.js +2 -0
- package/dist/themes/tokens/typography/font-family.cjs.js.map +1 -0
- package/dist/themes/tokens/typography/font-family.d.ts +14 -0
- package/dist/themes/tokens/typography/font-family.js +2 -0
- package/dist/themes/tokens/typography/font-family.js.map +1 -0
- package/dist/themes/tokens/typography/font-size.cjs.js +2 -0
- package/dist/themes/tokens/typography/font-size.cjs.js.map +1 -0
- package/dist/themes/tokens/typography/font-size.d.ts +28 -0
- package/dist/themes/tokens/typography/font-size.js +2 -0
- package/dist/themes/tokens/typography/font-size.js.map +1 -0
- package/dist/themes/tokens/typography/letter-spacing.cjs.js +2 -0
- package/dist/themes/tokens/typography/letter-spacing.cjs.js.map +1 -0
- package/dist/themes/tokens/typography/letter-spacing.d.ts +28 -0
- package/dist/themes/tokens/typography/letter-spacing.js +2 -0
- package/dist/themes/tokens/typography/letter-spacing.js.map +1 -0
- package/dist/themes/tokens/typography/line-height.cjs.js +2 -0
- package/dist/themes/tokens/typography/line-height.cjs.js.map +1 -0
- package/dist/themes/tokens/typography/line-height.d.ts +28 -0
- package/dist/themes/tokens/typography/line-height.js +2 -0
- package/dist/themes/tokens/typography/line-height.js.map +1 -0
- package/dist/themes/tokens/typography/variant-mapping.cjs.js +2 -0
- package/dist/themes/tokens/typography/variant-mapping.cjs.js.map +1 -0
- package/dist/themes/tokens/typography/variant-mapping.d.ts +32 -0
- package/dist/themes/tokens/typography/variant-mapping.js +2 -0
- package/dist/themes/tokens/typography/variant-mapping.js.map +1 -0
- package/dist/themes/typography.cjs.js +1 -1
- package/dist/themes/typography.cjs.js.map +1 -1
- package/dist/themes/typography.d.ts +3 -1
- package/dist/themes/typography.js +1 -1
- package/dist/themes/typography.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/CssBaseline"),i=require("@mui/material/styles"),s=require("./flipdishPublicTheme.cjs.js");module.exports=({children:t,themeModeOverride:m})=>{const u="dark"===m?s.darkTheme:s.lightTheme;return e.jsxs(i.ThemeProvider,{theme:u,children:[e.jsx(r,{}),t]})};
|
|
2
2
|
//# sourceMappingURL=ThemeProvider.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.cjs.js","sources":["../../src/themes/ThemeProvider.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"ThemeProvider.cjs.js","sources":["../../src/themes/ThemeProvider.tsx"],"sourcesContent":["import CssBaseline from '@mui/material/CssBaseline';\nimport { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';\n\nimport { darkTheme, lightTheme } from './flipdishPublicTheme';\n\ninterface ThemeProviderProps {\n children: React.ReactNode;\n themeModeOverride?: 'dark' | 'light';\n}\n\nconst ThemeProvider = ({ children, themeModeOverride }: ThemeProviderProps) => {\n const theme = themeModeOverride === 'dark' ? darkTheme : lightTheme;\n\n return (\n <MuiThemeProvider theme={theme}>\n <CssBaseline />\n {children}\n </MuiThemeProvider>\n );\n};\n\nexport default ThemeProvider;\n"],"names":["children","themeModeOverride","theme","darkTheme","lightTheme","_jsxs","MuiThemeProvider","_jsx","CssBaseline"],"mappings":"kLAUsB,EAAGA,WAAUC,wBACjC,MAAMC,EAA8B,SAAtBD,EAA+BE,EAASA,UAAGC,EAAUA,WAEnE,OACEC,OAACC,EAAAA,cAAgB,CAACJ,MAAOA,EACvBF,SAAA,CAAAO,EAAAA,IAACC,EAAc,CAAA,GACdR,IACgB"}
|
|
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
|
|
3
3
|
interface ThemeProviderProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
-
themeModeOverride?: '
|
|
5
|
+
themeModeOverride?: 'dark' | 'light';
|
|
6
6
|
}
|
|
7
7
|
declare const ThemeProvider: ({ children, themeModeOverride }: ThemeProviderProps) => react_jsx_runtime.JSX.Element;
|
|
8
8
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import i from"@mui/material/CssBaseline";import{ThemeProvider as m}from"@mui/material/styles";import{darkTheme as t,lightTheme as o}from"./flipdishPublicTheme.js";const s=({children:s,themeModeOverride:a})=>e(m,{theme:"dark"===a?t:o,children:[r(i,{}),s]});export{s as default};
|
|
2
2
|
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","sources":["../../src/themes/ThemeProvider.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","sources":["../../src/themes/ThemeProvider.tsx"],"sourcesContent":["import CssBaseline from '@mui/material/CssBaseline';\nimport { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';\n\nimport { darkTheme, lightTheme } from './flipdishPublicTheme';\n\ninterface ThemeProviderProps {\n children: React.ReactNode;\n themeModeOverride?: 'dark' | 'light';\n}\n\nconst ThemeProvider = ({ children, themeModeOverride }: ThemeProviderProps) => {\n const theme = themeModeOverride === 'dark' ? darkTheme : lightTheme;\n\n return (\n <MuiThemeProvider theme={theme}>\n <CssBaseline />\n {children}\n </MuiThemeProvider>\n );\n};\n\nexport default ThemeProvider;\n"],"names":["ThemeProvider","children","themeModeOverride","_jsxs","MuiThemeProvider","theme","darkTheme","lightTheme","_jsx","CssBaseline"],"mappings":"qNAUM,MAAAA,EAAgB,EAAGC,WAAUC,uBAI/BC,EAACC,EAAgB,CAACC,MAHgB,SAAtBH,EAA+BI,EAAYC,EAIrDN,SAAA,CAAAO,EAACC,EAAc,CAAA,GACdR"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("@mui/material/styles/createTheme"),r=require("../icons/Cancel/index.cjs.js");require("./tokens/colours/primitives.cjs.js");var o=require("./tokens/colours/semantic.cjs.js"),t=require("./typography.cjs.js");const
|
|
1
|
+
"use strict";var e=require("@mui/material/styles/createTheme"),r=require("../icons/Cancel/index.cjs.js");require("./tokens/colours/primitives.cjs.js");var o=require("./tokens/colours/semantic.cjs.js"),t=require("./tokens/radius/radius.cjs.js"),i=require("./tokens/typography/variant-mapping.cjs.js"),s=require("./typography.cjs.js");const a=a=>{const p=e({typography:s.typography,palette:"light"===a?o.lightColours:o.darkColours,radius:t.radius});return Object.keys(s.typography).forEach((e=>{const r=e.split(/(?=[A-Z])/)[0];p.typography[e]={...p.typography[e],[p.breakpoints.down("md")]:{...s.getMobileTextStyle(r)}}})),e(p,{shape:{borderRadius:"4px"},components:{MuiAlert:{defaultProps:{components:{CloseIcon:r}},styleOverrides:{root:{borderRadius:"8px",padding:"24px"},icon:{marginRight:"12px",padding:0},action:{padding:0,"& button":{marginTop:"-5px"}},message:{padding:0}}},MuiButton:{styleOverrides:{root:{padding:"12px 24px",textTransform:"none"}}},MuiCard:{styleOverrides:{root:{boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:p.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold",paddingLeft:"6px",paddingRight:"6px"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:p.palette.semantic.fill["fill-primary-weak"]},"&:not(:last-child)":{borderBottom:`1px solid ${p.palette.semantic.stroke["stroke-weak"]}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:p.palette.semantic.fill["fill-secondary"],cursor:"pointer"}}}},MuiTypography:{defaultProps:{variantMapping:i.typographyVariantMapping}}}})},p=a("light"),n=a("dark");exports.darkTheme=n,exports.lightTheme=p;
|
|
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 ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport CancelIcon from '../icons/Cancel';\nimport { darkColours, lightColours } from './tokens/colours';\nimport { typography } from './typography';\n\nconst createFlipdishThemeFactory = (mode: 'dark' | 'light') => {\n const baseTheme = createTheme({\n typography,\n palette: mode === 'light' ? lightColours : darkColours,\n });\n\n // Create final theme with component overrides and additional configurations\n return createTheme(baseTheme as ThemeOptions, {\n shape: {\n borderRadius: '4px',\n },\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: {\n styleOverrides: {\n root: {\n padding: '12px 24px',\n textTransform: 'none',\n },\n },\n },\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 },\n });\n};\n\nexport const lightTheme = createFlipdishThemeFactory('light');\nexport const darkTheme = createFlipdishThemeFactory('dark');\n"],"names":["createFlipdishThemeFactory","mode","baseTheme","createTheme","typography","palette","lightColours","darkColours","shape","borderRadius","components","MuiAlert","defaultProps","CloseIcon","CancelIcon","styleOverrides","root","padding","icon","marginRight","action","marginTop","message","MuiButton","textTransform","MuiCard","boxShadow","borderWidth","borderStyle","borderColor","divider","MuiChip","fontWeight","paddingLeft","paddingRight","MuiListItemButton","backgroundColor","semantic","fill","borderBottom","stroke","MuiTableRow","cursor","lightTheme","darkTheme"],"mappings":"
|
|
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 CancelIcon from '../icons/Cancel';\nimport { darkColours, lightColours } from './tokens/colours';\nimport { radius } from './tokens/radius/radius';\nimport type { 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 baseTheme = createTheme({\n typography,\n palette: mode === 'light' ? lightColours : darkColours,\n radius,\n });\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 baseTheme.typography[key] = {\n ...baseTheme.typography[key],\n [baseTheme.breakpoints.down('md')]: {\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(baseTheme as ThemeOptions, {\n shape: {\n borderRadius: '4px',\n },\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: {\n styleOverrides: {\n root: {\n padding: '12px 24px',\n textTransform: 'none',\n },\n },\n },\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 },\n });\n};\n\nexport const lightTheme = createFlipdishThemeFactory('light');\nexport const darkTheme = createFlipdishThemeFactory('dark');\n"],"names":["createFlipdishThemeFactory","mode","baseTheme","createTheme","typography","palette","lightColours","darkColours","radius","Object","keys","forEach","key","keyWithoutVariantSuffix","split","breakpoints","down","getMobileTextStyle","shape","borderRadius","components","MuiAlert","defaultProps","CloseIcon","CancelIcon","styleOverrides","root","padding","icon","marginRight","action","marginTop","message","MuiButton","textTransform","MuiCard","boxShadow","borderWidth","borderStyle","borderColor","divider","MuiChip","fontWeight","paddingLeft","paddingRight","MuiListItemButton","backgroundColor","semantic","fill","borderBottom","stroke","MuiTableRow","cursor","MuiTypography","variantMapping","typographyVariantMapping","lightTheme","darkTheme"],"mappings":"6UASA,MAAMA,EAA8BC,IAClC,MAAMC,EAAYC,EAAY,YAC5BC,EAAUA,WACVC,QAAkB,UAATJ,EAAmBK,EAAAA,aAAeC,EAAWA,mBACtDC,EAAMA,SAoBR,OAZAC,OAAOC,KAAKN,EAAAA,YAAYO,SAASC,IAE/B,MAAMC,EAA0BD,EAAIE,MAAM,aAAa,GACvDZ,EAAUE,WAAWQ,GAAO,IACvBV,EAAUE,WAAWQ,GACxB,CAACV,EAAUa,YAAYC,KAAK,OAAQ,IAC/BC,EAAAA,mBAAmBJ,IAEzB,IAIIV,EAAYD,EAA2B,CAC5CgB,MAAO,CACLC,aAAc,OAEhBC,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,UAAW,CACTR,eAAgB,CACdC,KAAM,CACJC,QAAS,YACTO,cAAe,UAIrBC,QAAS,CACPV,eAAgB,CACdC,KAAM,CACJU,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,YAAarC,EAAUG,QAAQmC,WAIrCC,QAAS,CACPhB,eAAgB,CACdC,KAAM,CACJgB,WAAY,OACZC,YAAa,MACbC,aAAc,SAIpBC,kBAAmB,CACjBpB,eAAgB,CACdC,KAAM,CACJ,UAAW,CACToB,gBAAiB5C,EAAUG,QAAQ0C,SAASC,KAAK,sBAEnD,qBAAsB,CACpBC,aAAc,aAAa/C,EAAUG,QAAQ0C,SAASG,OAAO,qBAKrEC,YAAa,CACX1B,eAAgB,CACdC,KAAM,CACJ,4BAA6B,CAC3BoB,gBAAiB5C,EAAUG,QAAQ0C,SAASC,KAAK,kBACjDI,OAAQ,cAKhBC,cAAe,CACb/B,aAAc,CACZgC,eAAgBC,EAAwBA,6BAI9C,EAGSC,EAAaxD,EAA2B,SACxCyD,EAAYzD,EAA2B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Theme } from '@mui/material/styles/createTheme';
|
|
2
2
|
|
|
3
|
-
declare const lightTheme:
|
|
4
|
-
declare const darkTheme:
|
|
3
|
+
declare const lightTheme: Theme;
|
|
4
|
+
declare const darkTheme: Theme;
|
|
5
5
|
|
|
6
6
|
export { darkTheme, lightTheme };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"@mui/material/styles/createTheme";import
|
|
1
|
+
import o from"@mui/material/styles/createTheme";import r from"../icons/Cancel/index.js";import"./tokens/colours/primitives.js";import{lightColours as t,darkColours as e}from"./tokens/colours/semantic.js";import{radius as i}from"./tokens/radius/radius.js";import{typographyVariantMapping as s}from"./tokens/typography/variant-mapping.js";import{typography as a,getMobileTextStyle as p}from"./typography.js";const n=n=>{const d=o({typography:a,palette:"light"===n?t:e,radius:i});return Object.keys(a).forEach((o=>{const r=o.split(/(?=[A-Z])/)[0];d.typography[o]={...d.typography[o],[d.breakpoints.down("md")]:{...p(r)}}})),o(d,{shape:{borderRadius:"4px"},components:{MuiAlert:{defaultProps:{components:{CloseIcon:r}},styleOverrides:{root:{borderRadius:"8px",padding:"24px"},icon:{marginRight:"12px",padding:0},action:{padding:0,"& button":{marginTop:"-5px"}},message:{padding:0}}},MuiButton:{styleOverrides:{root:{padding:"12px 24px",textTransform:"none"}}},MuiCard:{styleOverrides:{root:{boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:d.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold",paddingLeft:"6px",paddingRight:"6px"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:d.palette.semantic.fill["fill-primary-weak"]},"&:not(:last-child)":{borderBottom:`1px solid ${d.palette.semantic.stroke["stroke-weak"]}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:d.palette.semantic.fill["fill-secondary"],cursor:"pointer"}}}},MuiTypography:{defaultProps:{variantMapping:s}}}})},d=n("light"),l=n("dark");export{l as darkTheme,d 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 ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport CancelIcon from '../icons/Cancel';\nimport { darkColours, lightColours } from './tokens/colours';\nimport { typography } from './typography';\n\nconst createFlipdishThemeFactory = (mode: 'dark' | 'light') => {\n const baseTheme = createTheme({\n typography,\n palette: mode === 'light' ? lightColours : darkColours,\n });\n\n // Create final theme with component overrides and additional configurations\n return createTheme(baseTheme as ThemeOptions, {\n shape: {\n borderRadius: '4px',\n },\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: {\n styleOverrides: {\n root: {\n padding: '12px 24px',\n textTransform: 'none',\n },\n },\n },\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 },\n });\n};\n\nexport const lightTheme = createFlipdishThemeFactory('light');\nexport const darkTheme = createFlipdishThemeFactory('dark');\n"],"names":["createFlipdishThemeFactory","mode","baseTheme","createTheme","typography","palette","lightColours","darkColours","shape","borderRadius","components","MuiAlert","defaultProps","CloseIcon","CancelIcon","styleOverrides","root","padding","icon","marginRight","action","marginTop","message","MuiButton","textTransform","MuiCard","boxShadow","borderWidth","borderStyle","borderColor","divider","MuiChip","fontWeight","paddingLeft","paddingRight","MuiListItemButton","backgroundColor","semantic","fill","borderBottom","stroke","MuiTableRow","cursor","lightTheme","darkTheme"],"mappings":"
|
|
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 CancelIcon from '../icons/Cancel';\nimport { darkColours, lightColours } from './tokens/colours';\nimport { radius } from './tokens/radius/radius';\nimport type { 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 baseTheme = createTheme({\n typography,\n palette: mode === 'light' ? lightColours : darkColours,\n radius,\n });\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 baseTheme.typography[key] = {\n ...baseTheme.typography[key],\n [baseTheme.breakpoints.down('md')]: {\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(baseTheme as ThemeOptions, {\n shape: {\n borderRadius: '4px',\n },\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: {\n styleOverrides: {\n root: {\n padding: '12px 24px',\n textTransform: 'none',\n },\n },\n },\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 },\n });\n};\n\nexport const lightTheme = createFlipdishThemeFactory('light');\nexport const darkTheme = createFlipdishThemeFactory('dark');\n"],"names":["createFlipdishThemeFactory","mode","baseTheme","createTheme","typography","palette","lightColours","darkColours","radius","Object","keys","forEach","key","keyWithoutVariantSuffix","split","breakpoints","down","getMobileTextStyle","shape","borderRadius","components","MuiAlert","defaultProps","CloseIcon","CancelIcon","styleOverrides","root","padding","icon","marginRight","action","marginTop","message","MuiButton","textTransform","MuiCard","boxShadow","borderWidth","borderStyle","borderColor","divider","MuiChip","fontWeight","paddingLeft","paddingRight","MuiListItemButton","backgroundColor","semantic","fill","borderBottom","stroke","MuiTableRow","cursor","MuiTypography","variantMapping","typographyVariantMapping","lightTheme","darkTheme"],"mappings":"sZASA,MAAMA,EAA8BC,IAClC,MAAMC,EAAYC,EAAY,CAC5BC,aACAC,QAAkB,UAATJ,EAAmBK,EAAeC,EAC3CC,WAoBF,OAZAC,OAAOC,KAAKN,GAAYO,SAASC,IAE/B,MAAMC,EAA0BD,EAAIE,MAAM,aAAa,GACvDZ,EAAUE,WAAWQ,GAAO,IACvBV,EAAUE,WAAWQ,GACxB,CAACV,EAAUa,YAAYC,KAAK,OAAQ,IAC/BC,EAAmBJ,IAEzB,IAIIV,EAAYD,EAA2B,CAC5CgB,MAAO,CACLC,aAAc,OAEhBC,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,UAAW,CACTR,eAAgB,CACdC,KAAM,CACJC,QAAS,YACTO,cAAe,UAIrBC,QAAS,CACPV,eAAgB,CACdC,KAAM,CACJU,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,YAAarC,EAAUG,QAAQmC,WAIrCC,QAAS,CACPhB,eAAgB,CACdC,KAAM,CACJgB,WAAY,OACZC,YAAa,MACbC,aAAc,SAIpBC,kBAAmB,CACjBpB,eAAgB,CACdC,KAAM,CACJ,UAAW,CACToB,gBAAiB5C,EAAUG,QAAQ0C,SAASC,KAAK,sBAEnD,qBAAsB,CACpBC,aAAc,aAAa/C,EAAUG,QAAQ0C,SAASG,OAAO,qBAKrEC,YAAa,CACX1B,eAAgB,CACdC,KAAM,CACJ,4BAA6B,CAC3BoB,gBAAiB5C,EAAUG,QAAQ0C,SAASC,KAAK,kBACjDI,OAAQ,cAKhBC,cAAe,CACb/B,aAAc,CACZgC,eAAgBC,MAItB,EAGSC,EAAaxD,EAA2B,SACxCyD,EAAYzD,EAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radius.cjs.js","sources":["../../../../src/themes/tokens/radius/radius.ts"],"sourcesContent":["export const radius = {\n 'radius-4': '4px',\n 'radius-8': '8px',\n 'radius-12': '12px',\n 'radius-16': '16px',\n 'radius-20': '20px',\n 'radius-24': '24px',\n 'radius-32': '32px',\n 'radius-40': '40px',\n 'radius-48': '48px',\n 'radius-56': '56px',\n 'radius-64': '64px',\n} as const;\n\nexport type RadiusToken = keyof typeof radius;\n"],"names":[],"mappings":"4BAAsB,CACpB,WAAY,MACZ,WAAY,MACZ,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const radius: {
|
|
2
|
+
readonly 'radius-4': "4px";
|
|
3
|
+
readonly 'radius-8': "8px";
|
|
4
|
+
readonly 'radius-12': "12px";
|
|
5
|
+
readonly 'radius-16': "16px";
|
|
6
|
+
readonly 'radius-20': "20px";
|
|
7
|
+
readonly 'radius-24': "24px";
|
|
8
|
+
readonly 'radius-32': "32px";
|
|
9
|
+
readonly 'radius-40': "40px";
|
|
10
|
+
readonly 'radius-48': "48px";
|
|
11
|
+
readonly 'radius-56': "56px";
|
|
12
|
+
readonly 'radius-64': "64px";
|
|
13
|
+
};
|
|
14
|
+
type RadiusToken = keyof typeof radius;
|
|
15
|
+
|
|
16
|
+
export { radius };
|
|
17
|
+
export type { RadiusToken };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radius.js","sources":["../../../../src/themes/tokens/radius/radius.ts"],"sourcesContent":["export const radius = {\n 'radius-4': '4px',\n 'radius-8': '8px',\n 'radius-12': '12px',\n 'radius-16': '16px',\n 'radius-20': '20px',\n 'radius-24': '24px',\n 'radius-32': '32px',\n 'radius-40': '40px',\n 'radius-48': '48px',\n 'radius-56': '56px',\n 'radius-64': '64px',\n} as const;\n\nexport type RadiusToken = keyof typeof radius;\n"],"names":["radius"],"mappings":"AAAa,MAAAA,EAAS,CACpB,WAAY,MACZ,WAAY,MACZ,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa,OACb,YAAa"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";exports.spacing={"spacing-0":"0px","spacing-4":"4px","spacing-8":"8px","spacing-12":"12px","spacing-16":"16px","spacing-20":"20px","spacing-24":"24px","spacing-32":"32px","spacing-40":"40px","spacing-48":"48px","spacing-56":"56px","spacing-64":"64px","spacing-96":"96px","spacing-128":"128px","spacing-192":"192px","spacing-256":"256px"};
|
|
2
|
+
//# sourceMappingURL=spacing.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spacing.cjs.js","sources":["../../../../src/themes/tokens/spacing/spacing.ts"],"sourcesContent":["export const spacing = {\n 'spacing-0': '0px',\n 'spacing-4': '4px',\n 'spacing-8': '8px',\n 'spacing-12': '12px',\n 'spacing-16': '16px',\n 'spacing-20': '20px',\n 'spacing-24': '24px',\n 'spacing-32': '32px',\n 'spacing-40': '40px',\n 'spacing-48': '48px',\n 'spacing-56': '56px',\n 'spacing-64': '64px',\n 'spacing-96': '96px',\n 'spacing-128': '128px',\n 'spacing-192': '192px',\n 'spacing-256': '256px',\n} as const;\n\nexport type SpacingToken = keyof typeof spacing;\n"],"names":[],"mappings":"6BAAuB,CACrB,YAAa,MACb,YAAa,MACb,YAAa,MACb,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,cAAe,QACf,cAAe,QACf,cAAe"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const spacing: {
|
|
2
|
+
readonly 'spacing-0': "0px";
|
|
3
|
+
readonly 'spacing-4': "4px";
|
|
4
|
+
readonly 'spacing-8': "8px";
|
|
5
|
+
readonly 'spacing-12': "12px";
|
|
6
|
+
readonly 'spacing-16': "16px";
|
|
7
|
+
readonly 'spacing-20': "20px";
|
|
8
|
+
readonly 'spacing-24': "24px";
|
|
9
|
+
readonly 'spacing-32': "32px";
|
|
10
|
+
readonly 'spacing-40': "40px";
|
|
11
|
+
readonly 'spacing-48': "48px";
|
|
12
|
+
readonly 'spacing-56': "56px";
|
|
13
|
+
readonly 'spacing-64': "64px";
|
|
14
|
+
readonly 'spacing-96': "96px";
|
|
15
|
+
readonly 'spacing-128': "128px";
|
|
16
|
+
readonly 'spacing-192': "192px";
|
|
17
|
+
readonly 'spacing-256': "256px";
|
|
18
|
+
};
|
|
19
|
+
type SpacingToken = keyof typeof spacing;
|
|
20
|
+
|
|
21
|
+
export { spacing };
|
|
22
|
+
export type { SpacingToken };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const p={"spacing-0":"0px","spacing-4":"4px","spacing-8":"8px","spacing-12":"12px","spacing-16":"16px","spacing-20":"20px","spacing-24":"24px","spacing-32":"32px","spacing-40":"40px","spacing-48":"48px","spacing-56":"56px","spacing-64":"64px","spacing-96":"96px","spacing-128":"128px","spacing-192":"192px","spacing-256":"256px"};export{p as spacing};
|
|
2
|
+
//# sourceMappingURL=spacing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spacing.js","sources":["../../../../src/themes/tokens/spacing/spacing.ts"],"sourcesContent":["export const spacing = {\n 'spacing-0': '0px',\n 'spacing-4': '4px',\n 'spacing-8': '8px',\n 'spacing-12': '12px',\n 'spacing-16': '16px',\n 'spacing-20': '20px',\n 'spacing-24': '24px',\n 'spacing-32': '32px',\n 'spacing-40': '40px',\n 'spacing-48': '48px',\n 'spacing-56': '56px',\n 'spacing-64': '64px',\n 'spacing-96': '96px',\n 'spacing-128': '128px',\n 'spacing-192': '192px',\n 'spacing-256': '256px',\n} as const;\n\nexport type SpacingToken = keyof typeof spacing;\n"],"names":["spacing"],"mappings":"AAAa,MAAAA,EAAU,CACrB,YAAa,MACb,YAAa,MACb,YAAa,MACb,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,aAAc,OACd,cAAe,QACf,cAAe,QACf,cAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-family.cjs.js","sources":["../../../../src/themes/tokens/typography/font-family.ts"],"sourcesContent":["export const fontFamily = {\n desktop: {\n heading: \"'Roboto', sans-serif\",\n body: \"'Roboto', sans-serif\",\n alternate: 'Domine, serif',\n },\n mobile: {\n heading: \"'Roboto', sans-serif\",\n body: \"'Roboto', sans-serif\",\n alternate: 'Domine, serif',\n },\n};\n"],"names":["desktop","heading","body","alternate","mobile"],"mappings":"gCAA0B,CACxBA,QAAS,CACPC,QAAS,uBACTC,KAAM,uBACNC,UAAW,iBAEbC,OAAQ,CACNH,QAAS,uBACTC,KAAM,uBACNC,UAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-family.js","sources":["../../../../src/themes/tokens/typography/font-family.ts"],"sourcesContent":["export const fontFamily = {\n desktop: {\n heading: \"'Roboto', sans-serif\",\n body: \"'Roboto', sans-serif\",\n alternate: 'Domine, serif',\n },\n mobile: {\n heading: \"'Roboto', sans-serif\",\n body: \"'Roboto', sans-serif\",\n alternate: 'Domine, serif',\n },\n};\n"],"names":["fontFamily","desktop","heading","body","alternate","mobile"],"mappings":"AAAa,MAAAA,EAAa,CACxBC,QAAS,CACPC,QAAS,uBACTC,KAAM,uBACNC,UAAW,iBAEbC,OAAQ,CACNH,QAAS,uBACTC,KAAM,uBACNC,UAAW"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";exports.fontSize={desktop:{d1:"128px",d2:"96px",d3:"64px",d4:"56px",h1:"40px",h2:"32px",h3:"24px",h4:"20px",b1:"16px",caption:"14px"},mobile:{d1:"64px",d2:"64px",d3:"64px",d4:"40px",h1:"36px",h2:"28px",h3:"24px",h4:"20px",b1:"16px",caption:"14px"}};
|
|
2
|
+
//# sourceMappingURL=font-size.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-size.cjs.js","sources":["../../../../src/themes/tokens/typography/font-size.ts"],"sourcesContent":["export const fontSize = {\n desktop: {\n d1: '128px',\n d2: '96px',\n d3: '64px',\n d4: '56px',\n h1: '40px',\n h2: '32px',\n h3: '24px',\n h4: '20px',\n b1: '16px',\n caption: '14px',\n },\n mobile: {\n // d1-d3 are for kiosk only so defaulting to 64px just in case it's used on mobile\n d1: '64px',\n d2: '64px',\n d3: '64px',\n d4: '40px',\n h1: '36px',\n h2: '28px',\n h3: '24px',\n h4: '20px',\n b1: '16px',\n caption: '14px',\n },\n};\n"],"names":["desktop","d1","d2","d3","d4","h1","h2","h3","h4","b1","caption","mobile"],"mappings":"8BAAwB,CACtBA,QAAS,CACPC,GAAI,QACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,QAAS,QAEXC,OAAQ,CAENV,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,QAAS"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const fontSize: {
|
|
2
|
+
desktop: {
|
|
3
|
+
d1: string;
|
|
4
|
+
d2: string;
|
|
5
|
+
d3: string;
|
|
6
|
+
d4: string;
|
|
7
|
+
h1: string;
|
|
8
|
+
h2: string;
|
|
9
|
+
h3: string;
|
|
10
|
+
h4: string;
|
|
11
|
+
b1: string;
|
|
12
|
+
caption: string;
|
|
13
|
+
};
|
|
14
|
+
mobile: {
|
|
15
|
+
d1: string;
|
|
16
|
+
d2: string;
|
|
17
|
+
d3: string;
|
|
18
|
+
d4: string;
|
|
19
|
+
h1: string;
|
|
20
|
+
h2: string;
|
|
21
|
+
h3: string;
|
|
22
|
+
h4: string;
|
|
23
|
+
b1: string;
|
|
24
|
+
caption: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { fontSize };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const p={desktop:{d1:"128px",d2:"96px",d3:"64px",d4:"56px",h1:"40px",h2:"32px",h3:"24px",h4:"20px",b1:"16px",caption:"14px"},mobile:{d1:"64px",d2:"64px",d3:"64px",d4:"40px",h1:"36px",h2:"28px",h3:"24px",h4:"20px",b1:"16px",caption:"14px"}};export{p as fontSize};
|
|
2
|
+
//# sourceMappingURL=font-size.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-size.js","sources":["../../../../src/themes/tokens/typography/font-size.ts"],"sourcesContent":["export const fontSize = {\n desktop: {\n d1: '128px',\n d2: '96px',\n d3: '64px',\n d4: '56px',\n h1: '40px',\n h2: '32px',\n h3: '24px',\n h4: '20px',\n b1: '16px',\n caption: '14px',\n },\n mobile: {\n // d1-d3 are for kiosk only so defaulting to 64px just in case it's used on mobile\n d1: '64px',\n d2: '64px',\n d3: '64px',\n d4: '40px',\n h1: '36px',\n h2: '28px',\n h3: '24px',\n h4: '20px',\n b1: '16px',\n caption: '14px',\n },\n};\n"],"names":["fontSize","desktop","d1","d2","d3","d4","h1","h2","h3","h4","b1","caption","mobile"],"mappings":"AAAa,MAAAA,EAAW,CACtBC,QAAS,CACPC,GAAI,QACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,QAAS,QAEXC,OAAQ,CAENV,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,QAAS"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";exports.letterSpacing={desktop:{d1:"-2.56px",d2:"-1.92px",d3:"-1.28px",d4:"-1.12px",h1:"-0.8px",h2:"0px",h3:"0px",h4:"0px",b1:"0px",caption:"0px"},mobile:{d1:"-2.56px",d2:"-1.92px",d3:"-1.28px",d4:"-0.8px",h1:"-0.72px",h2:"0px",h3:"0px",h4:"0px",b1:"0px",caption:"0px"}};
|
|
2
|
+
//# sourceMappingURL=letter-spacing.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"letter-spacing.cjs.js","sources":["../../../../src/themes/tokens/typography/letter-spacing.ts"],"sourcesContent":["export const letterSpacing = {\n desktop: {\n d1: '-2.56px',\n d2: '-1.92px',\n d3: '-1.28px',\n d4: '-1.12px',\n h1: '-0.8px',\n h2: '0px',\n h3: '0px',\n h4: '0px',\n b1: '0px',\n caption: '0px',\n },\n mobile: {\n d1: '-2.56px',\n d2: '-1.92px',\n d3: '-1.28px',\n d4: '-0.8px',\n h1: '-0.72px',\n h2: '0px',\n h3: '0px',\n h4: '0px',\n b1: '0px',\n caption: '0px',\n },\n};\n"],"names":["desktop","d1","d2","d3","d4","h1","h2","h3","h4","b1","caption","mobile"],"mappings":"mCAA6B,CAC3BA,QAAS,CACPC,GAAI,UACJC,GAAI,UACJC,GAAI,UACJC,GAAI,UACJC,GAAI,SACJC,GAAI,MACJC,GAAI,MACJC,GAAI,MACJC,GAAI,MACJC,QAAS,OAEXC,OAAQ,CACNV,GAAI,UACJC,GAAI,UACJC,GAAI,UACJC,GAAI,SACJC,GAAI,UACJC,GAAI,MACJC,GAAI,MACJC,GAAI,MACJC,GAAI,MACJC,QAAS"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const letterSpacing: {
|
|
2
|
+
desktop: {
|
|
3
|
+
d1: string;
|
|
4
|
+
d2: string;
|
|
5
|
+
d3: string;
|
|
6
|
+
d4: string;
|
|
7
|
+
h1: string;
|
|
8
|
+
h2: string;
|
|
9
|
+
h3: string;
|
|
10
|
+
h4: string;
|
|
11
|
+
b1: string;
|
|
12
|
+
caption: string;
|
|
13
|
+
};
|
|
14
|
+
mobile: {
|
|
15
|
+
d1: string;
|
|
16
|
+
d2: string;
|
|
17
|
+
d3: string;
|
|
18
|
+
d4: string;
|
|
19
|
+
h1: string;
|
|
20
|
+
h2: string;
|
|
21
|
+
h3: string;
|
|
22
|
+
h4: string;
|
|
23
|
+
b1: string;
|
|
24
|
+
caption: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { letterSpacing };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const p={desktop:{d1:"-2.56px",d2:"-1.92px",d3:"-1.28px",d4:"-1.12px",h1:"-0.8px",h2:"0px",h3:"0px",h4:"0px",b1:"0px",caption:"0px"},mobile:{d1:"-2.56px",d2:"-1.92px",d3:"-1.28px",d4:"-0.8px",h1:"-0.72px",h2:"0px",h3:"0px",h4:"0px",b1:"0px",caption:"0px"}};export{p as letterSpacing};
|
|
2
|
+
//# sourceMappingURL=letter-spacing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"letter-spacing.js","sources":["../../../../src/themes/tokens/typography/letter-spacing.ts"],"sourcesContent":["export const letterSpacing = {\n desktop: {\n d1: '-2.56px',\n d2: '-1.92px',\n d3: '-1.28px',\n d4: '-1.12px',\n h1: '-0.8px',\n h2: '0px',\n h3: '0px',\n h4: '0px',\n b1: '0px',\n caption: '0px',\n },\n mobile: {\n d1: '-2.56px',\n d2: '-1.92px',\n d3: '-1.28px',\n d4: '-0.8px',\n h1: '-0.72px',\n h2: '0px',\n h3: '0px',\n h4: '0px',\n b1: '0px',\n caption: '0px',\n },\n};\n"],"names":["letterSpacing","desktop","d1","d2","d3","d4","h1","h2","h3","h4","b1","caption","mobile"],"mappings":"AAAa,MAAAA,EAAgB,CAC3BC,QAAS,CACPC,GAAI,UACJC,GAAI,UACJC,GAAI,UACJC,GAAI,UACJC,GAAI,SACJC,GAAI,MACJC,GAAI,MACJC,GAAI,MACJC,GAAI,MACJC,QAAS,OAEXC,OAAQ,CACNV,GAAI,UACJC,GAAI,UACJC,GAAI,UACJC,GAAI,SACJC,GAAI,UACJC,GAAI,MACJC,GAAI,MACJC,GAAI,MACJC,GAAI,MACJC,QAAS"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";exports.lineHeight={desktop:{d1:"136px",d2:"104px",d3:"72px",d4:"64px",h1:"48px",h2:"40px",h3:"32px",h4:"28px",b1:"24px",caption:"20px"},mobile:{d1:"64px",d2:"64px",d3:"64px",d4:"48px",h1:"44px",h2:"36px",h3:"28px",h4:"28px",b1:"24px",caption:"20px"}};
|
|
2
|
+
//# sourceMappingURL=line-height.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-height.cjs.js","sources":["../../../../src/themes/tokens/typography/line-height.ts"],"sourcesContent":["export const lineHeight = {\n desktop: {\n d1: '136px',\n d2: '104px',\n d3: '72px',\n d4: '64px',\n h1: '48px',\n h2: '40px',\n h3: '32px',\n h4: '28px',\n b1: '24px',\n caption: '20px',\n },\n mobile: {\n d1: '64px',\n d2: '64px',\n d3: '64px',\n d4: '48px',\n h1: '44px',\n h2: '36px',\n h3: '28px',\n h4: '28px',\n b1: '24px',\n caption: '20px',\n },\n};\n"],"names":["desktop","d1","d2","d3","d4","h1","h2","h3","h4","b1","caption","mobile"],"mappings":"gCAA0B,CACxBA,QAAS,CACPC,GAAI,QACJC,GAAI,QACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,QAAS,QAEXC,OAAQ,CACNV,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,QAAS"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const lineHeight: {
|
|
2
|
+
desktop: {
|
|
3
|
+
d1: string;
|
|
4
|
+
d2: string;
|
|
5
|
+
d3: string;
|
|
6
|
+
d4: string;
|
|
7
|
+
h1: string;
|
|
8
|
+
h2: string;
|
|
9
|
+
h3: string;
|
|
10
|
+
h4: string;
|
|
11
|
+
b1: string;
|
|
12
|
+
caption: string;
|
|
13
|
+
};
|
|
14
|
+
mobile: {
|
|
15
|
+
d1: string;
|
|
16
|
+
d2: string;
|
|
17
|
+
d3: string;
|
|
18
|
+
d4: string;
|
|
19
|
+
h1: string;
|
|
20
|
+
h2: string;
|
|
21
|
+
h3: string;
|
|
22
|
+
h4: string;
|
|
23
|
+
b1: string;
|
|
24
|
+
caption: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { lineHeight };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const p={desktop:{d1:"136px",d2:"104px",d3:"72px",d4:"64px",h1:"48px",h2:"40px",h3:"32px",h4:"28px",b1:"24px",caption:"20px"},mobile:{d1:"64px",d2:"64px",d3:"64px",d4:"48px",h1:"44px",h2:"36px",h3:"28px",h4:"28px",b1:"24px",caption:"20px"}};export{p as lineHeight};
|
|
2
|
+
//# sourceMappingURL=line-height.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-height.js","sources":["../../../../src/themes/tokens/typography/line-height.ts"],"sourcesContent":["export const lineHeight = {\n desktop: {\n d1: '136px',\n d2: '104px',\n d3: '72px',\n d4: '64px',\n h1: '48px',\n h2: '40px',\n h3: '32px',\n h4: '28px',\n b1: '24px',\n caption: '20px',\n },\n mobile: {\n d1: '64px',\n d2: '64px',\n d3: '64px',\n d4: '48px',\n h1: '44px',\n h2: '36px',\n h3: '28px',\n h4: '28px',\n b1: '24px',\n caption: '20px',\n },\n};\n"],"names":["lineHeight","desktop","d1","d2","d3","d4","h1","h2","h3","h4","b1","caption","mobile"],"mappings":"AAAa,MAAAA,EAAa,CACxBC,QAAS,CACPC,GAAI,QACJC,GAAI,QACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,QAAS,QAEXC,OAAQ,CACNV,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,QAAS"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";exports.typographyVariantMapping={d1Strong:"h1",d1Weak:"h1",d2Strong:"h1",d2Weak:"h1",d3Strong:"h3",d3Weak:"h3",d3WeakAlternate:"h3",d4Strong:"h4",d4Weak:"h4",d4WeakAlternate:"h4",h1Strong:"h1",h1Weak:"h1",h1WeakAlternate:"h1",h2Strong:"h2",h2Weak:"h2",h3Strong:"h3",h3Weak:"h3",h4Strong:"h4",h4Weak:"h4",h4StrongUnderlined:"h4",b1Strong:"p",b1Weak:"p",b1StrongUnderlined:"p",b1WeakUnderlined:"p",captionStrong:"span",captionWeak:"span",captionStrongUnderlined:"span",captionWeakUnderlined:"span"};
|
|
2
|
+
//# sourceMappingURL=variant-mapping.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variant-mapping.cjs.js","sources":["../../../../src/themes/tokens/typography/variant-mapping.ts"],"sourcesContent":["export const typographyVariantMapping = {\n d1Strong: 'h1',\n d1Weak: 'h1',\n d2Strong: 'h1',\n d2Weak: 'h1',\n d3Strong: 'h3',\n d3Weak: 'h3',\n d3WeakAlternate: 'h3',\n d4Strong: 'h4',\n d4Weak: 'h4',\n d4WeakAlternate: 'h4',\n h1Strong: 'h1',\n h1Weak: 'h1',\n h1WeakAlternate: 'h1',\n h2Strong: 'h2',\n h2Weak: 'h2',\n h3Strong: 'h3',\n h3Weak: 'h3',\n h4Strong: 'h4',\n h4Weak: 'h4',\n h4StrongUnderlined: 'h4',\n b1Strong: 'p',\n b1Weak: 'p',\n b1StrongUnderlined: 'p',\n b1WeakUnderlined: 'p',\n captionStrong: 'span',\n captionWeak: 'span',\n captionStrongUnderlined: 'span',\n captionWeakUnderlined: 'span',\n};\n"],"names":["d1Strong","d1Weak","d2Strong","d2Weak","d3Strong","d3Weak","d3WeakAlternate","d4Strong","d4Weak","d4WeakAlternate","h1Strong","h1Weak","h1WeakAlternate","h2Strong","h2Weak","h3Strong","h3Weak","h4Strong","h4Weak","h4StrongUnderlined","b1Strong","b1Weak","b1StrongUnderlined","b1WeakUnderlined","captionStrong","captionWeak","captionStrongUnderlined","captionWeakUnderlined"],"mappings":"8CAAwC,CACtCA,SAAU,KACVC,OAAQ,KACRC,SAAU,KACVC,OAAQ,KACRC,SAAU,KACVC,OAAQ,KACRC,gBAAiB,KACjBC,SAAU,KACVC,OAAQ,KACRC,gBAAiB,KACjBC,SAAU,KACVC,OAAQ,KACRC,gBAAiB,KACjBC,SAAU,KACVC,OAAQ,KACRC,SAAU,KACVC,OAAQ,KACRC,SAAU,KACVC,OAAQ,KACRC,mBAAoB,KACpBC,SAAU,IACVC,OAAQ,IACRC,mBAAoB,IACpBC,iBAAkB,IAClBC,cAAe,OACfC,YAAa,OACbC,wBAAyB,OACzBC,sBAAuB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare const typographyVariantMapping: {
|
|
2
|
+
d1Strong: string;
|
|
3
|
+
d1Weak: string;
|
|
4
|
+
d2Strong: string;
|
|
5
|
+
d2Weak: string;
|
|
6
|
+
d3Strong: string;
|
|
7
|
+
d3Weak: string;
|
|
8
|
+
d3WeakAlternate: string;
|
|
9
|
+
d4Strong: string;
|
|
10
|
+
d4Weak: string;
|
|
11
|
+
d4WeakAlternate: string;
|
|
12
|
+
h1Strong: string;
|
|
13
|
+
h1Weak: string;
|
|
14
|
+
h1WeakAlternate: string;
|
|
15
|
+
h2Strong: string;
|
|
16
|
+
h2Weak: string;
|
|
17
|
+
h3Strong: string;
|
|
18
|
+
h3Weak: string;
|
|
19
|
+
h4Strong: string;
|
|
20
|
+
h4Weak: string;
|
|
21
|
+
h4StrongUnderlined: string;
|
|
22
|
+
b1Strong: string;
|
|
23
|
+
b1Weak: string;
|
|
24
|
+
b1StrongUnderlined: string;
|
|
25
|
+
b1WeakUnderlined: string;
|
|
26
|
+
captionStrong: string;
|
|
27
|
+
captionWeak: string;
|
|
28
|
+
captionStrongUnderlined: string;
|
|
29
|
+
captionWeakUnderlined: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { typographyVariantMapping };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const n={d1Strong:"h1",d1Weak:"h1",d2Strong:"h1",d2Weak:"h1",d3Strong:"h3",d3Weak:"h3",d3WeakAlternate:"h3",d4Strong:"h4",d4Weak:"h4",d4WeakAlternate:"h4",h1Strong:"h1",h1Weak:"h1",h1WeakAlternate:"h1",h2Strong:"h2",h2Weak:"h2",h3Strong:"h3",h3Weak:"h3",h4Strong:"h4",h4Weak:"h4",h4StrongUnderlined:"h4",b1Strong:"p",b1Weak:"p",b1StrongUnderlined:"p",b1WeakUnderlined:"p",captionStrong:"span",captionWeak:"span",captionStrongUnderlined:"span",captionWeakUnderlined:"span"};export{n as typographyVariantMapping};
|
|
2
|
+
//# sourceMappingURL=variant-mapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variant-mapping.js","sources":["../../../../src/themes/tokens/typography/variant-mapping.ts"],"sourcesContent":["export const typographyVariantMapping = {\n d1Strong: 'h1',\n d1Weak: 'h1',\n d2Strong: 'h1',\n d2Weak: 'h1',\n d3Strong: 'h3',\n d3Weak: 'h3',\n d3WeakAlternate: 'h3',\n d4Strong: 'h4',\n d4Weak: 'h4',\n d4WeakAlternate: 'h4',\n h1Strong: 'h1',\n h1Weak: 'h1',\n h1WeakAlternate: 'h1',\n h2Strong: 'h2',\n h2Weak: 'h2',\n h3Strong: 'h3',\n h3Weak: 'h3',\n h4Strong: 'h4',\n h4Weak: 'h4',\n h4StrongUnderlined: 'h4',\n b1Strong: 'p',\n b1Weak: 'p',\n b1StrongUnderlined: 'p',\n b1WeakUnderlined: 'p',\n captionStrong: 'span',\n captionWeak: 'span',\n captionStrongUnderlined: 'span',\n captionWeakUnderlined: 'span',\n};\n"],"names":["typographyVariantMapping","d1Strong","d1Weak","d2Strong","d2Weak","d3Strong","d3Weak","d3WeakAlternate","d4Strong","d4Weak","d4WeakAlternate","h1Strong","h1Weak","h1WeakAlternate","h2Strong","h2Weak","h3Strong","h3Weak","h4Strong","h4Weak","h4StrongUnderlined","b1Strong","b1Weak","b1StrongUnderlined","b1WeakUnderlined","captionStrong","captionWeak","captionStrongUnderlined","captionWeakUnderlined"],"mappings":"AAAa,MAAAA,EAA2B,CACtCC,SAAU,KACVC,OAAQ,KACRC,SAAU,KACVC,OAAQ,KACRC,SAAU,KACVC,OAAQ,KACRC,gBAAiB,KACjBC,SAAU,KACVC,OAAQ,KACRC,gBAAiB,KACjBC,SAAU,KACVC,OAAQ,KACRC,gBAAiB,KACjBC,SAAU,KACVC,OAAQ,KACRC,SAAU,KACVC,OAAQ,KACRC,SAAU,KACVC,OAAQ,KACRC,mBAAoB,KACpBC,SAAU,IACVC,OAAQ,IACRC,mBAAoB,IACpBC,iBAAkB,IAClBC,cAAe,OACfC,YAAa,OACbC,wBAAyB,OACzBC,sBAAuB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("./tokens/typography/font-family.cjs.js"),t=require("./tokens/typography/font-size.cjs.js"),n=require("./tokens/typography/letter-spacing.cjs.js"),o=require("./tokens/typography/line-height.cjs.js");const i={textDecorationLine:"underline",textDecorationStyle:"solid",textDecorationSkipInk:"auto",textDecorationThickness:"2px",textUnderlineOffset:"25%",textUnderlinePosition:"from-font"},d=(d,a,r,h=!1)=>({fontFamily:e.fontFamily.desktop[a],fontSize:t.fontSize.desktop[r],fontStyle:"normal",fontWeight:d,lineHeight:o.lineHeight.desktop[r],letterSpacing:n.letterSpacing.desktop[r],...h?i:{}}),a={d1Strong:d(600,"heading","d1"),d1Weak:d(400,"body","d1"),d2Strong:d(600,"heading","d2"),d2Weak:d(400,"body","d2"),d3Strong:d(600,"heading","d3"),d3Weak:d(400,"body","d3"),d3WeakAlternate:d(400,"alternate","d3"),d4Strong:d(600,"heading","d4"),d4Weak:d(400,"body","d4"),d4WeakAlternate:d(400,"alternate","d4"),h1Strong:d(600,"heading","h1"),h1Weak:d(400,"body","h1"),h1WeakAlternate:d(400,"alternate","h1"),h2Strong:d(600,"heading","h2"),h2Weak:d(400,"body","h2"),h3Strong:d(600,"heading","h3"),h3Weak:d(400,"body","h3"),h4Strong:d(600,"heading","h4"),h4Weak:d(400,"body","h4"),h4StrongUnderlined:d(600,"heading","h4",!0),b1Strong:d(600,"body","b1"),b1Weak:d(400,"body","b1"),b1StrongUnderlined:d(600,"body","b1",!0),b1WeakUnderlined:d(400,"body","b1",!0),captionStrong:d(600,"body","caption"),captionWeak:d(400,"body","caption"),captionStrongUnderlined:d(600,"body","caption",!0),captionWeakUnderlined:d(400,"body","caption",!0)};exports.getMobileTextStyle=e=>({fontSize:t.fontSize.mobile[e],lineHeight:o.lineHeight.mobile[e],letterSpacing:n.letterSpacing.mobile[e]}),exports.typography=a;
|
|
2
2
|
//# sourceMappingURL=typography.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.cjs.js","sources":["../../src/themes/typography.ts"],"sourcesContent":["import type { ThemeOptions } from '@mui/material/styles/createTheme';\n\
|
|
1
|
+
{"version":3,"file":"typography.cjs.js","sources":["../../src/themes/typography.ts"],"sourcesContent":["import type { ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport { fontFamily } from './tokens/typography/font-family';\nimport { fontSize } from './tokens/typography/font-size';\nimport { letterSpacing } from './tokens/typography/letter-spacing';\nimport { lineHeight } from './tokens/typography/line-height';\n\nconst underlineStyles: React.CSSProperties = {\n textDecorationLine: 'underline',\n textDecorationStyle: 'solid',\n textDecorationSkipInk: 'auto',\n textDecorationThickness: '2px', // Ensure a valid value\n textUnderlineOffset: '25%',\n textUnderlinePosition: 'from-font',\n};\n\nconst createTextStyle = (\n weight: number,\n type: 'alternate' | 'body' | 'heading',\n sizeKey: keyof (typeof fontSize)['desktop'],\n underline = false,\n): React.CSSProperties => ({\n fontFamily: fontFamily['desktop'][type],\n fontSize: fontSize['desktop'][sizeKey],\n fontStyle: 'normal',\n fontWeight: weight,\n lineHeight: lineHeight['desktop'][sizeKey],\n letterSpacing: letterSpacing['desktop'][sizeKey],\n ...(underline ? underlineStyles : {}),\n});\n\n// has to be done using media queries, otherwise it isn't responsive\nexport const getMobileTextStyle = (sizeKey: keyof (typeof fontSize)['mobile']): React.CSSProperties => ({\n fontSize: fontSize['mobile'][sizeKey],\n lineHeight: lineHeight['mobile'][sizeKey],\n letterSpacing: letterSpacing['mobile'][sizeKey],\n});\n\nexport const typography: ThemeOptions['typography'] = {\n d1Strong: createTextStyle(600, 'heading', 'd1'),\n d1Weak: createTextStyle(400, 'body', 'd1'),\n d2Strong: createTextStyle(600, 'heading', 'd2'),\n d2Weak: createTextStyle(400, 'body', 'd2'),\n d3Strong: createTextStyle(600, 'heading', 'd3'),\n d3Weak: createTextStyle(400, 'body', 'd3'),\n d3WeakAlternate: createTextStyle(400, 'alternate', 'd3'),\n d4Strong: createTextStyle(600, 'heading', 'd4'),\n d4Weak: createTextStyle(400, 'body', 'd4'),\n d4WeakAlternate: createTextStyle(400, 'alternate', 'd4'),\n h1Strong: createTextStyle(600, 'heading', 'h1'),\n h1Weak: createTextStyle(400, 'body', 'h1'),\n h1WeakAlternate: createTextStyle(400, 'alternate', 'h1'),\n h2Strong: createTextStyle(600, 'heading', 'h2'),\n h2Weak: createTextStyle(400, 'body', 'h2'),\n h3Strong: createTextStyle(600, 'heading', 'h3'),\n h3Weak: createTextStyle(400, 'body', 'h3'),\n h4Strong: createTextStyle(600, 'heading', 'h4'),\n h4Weak: createTextStyle(400, 'body', 'h4'),\n h4StrongUnderlined: createTextStyle(600, 'heading', 'h4', true),\n b1Strong: createTextStyle(600, 'body', 'b1'),\n b1Weak: createTextStyle(400, 'body', 'b1'),\n b1StrongUnderlined: createTextStyle(600, 'body', 'b1', true),\n b1WeakUnderlined: createTextStyle(400, 'body', 'b1', true),\n captionStrong: createTextStyle(600, 'body', 'caption'),\n captionWeak: createTextStyle(400, 'body', 'caption'),\n captionStrongUnderlined: createTextStyle(600, 'body', 'caption', true),\n captionWeakUnderlined: createTextStyle(400, 'body', 'caption', true),\n};\n"],"names":["underlineStyles","textDecorationLine","textDecorationStyle","textDecorationSkipInk","textDecorationThickness","textUnderlineOffset","textUnderlinePosition","createTextStyle","weight","type","sizeKey","underline","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","letterSpacing","typography","d1Strong","d1Weak","d2Strong","d2Weak","d3Strong","d3Weak","d3WeakAlternate","d4Strong","d4Weak","d4WeakAlternate","h1Strong","h1Weak","h1WeakAlternate","h2Strong","h2Weak","h3Strong","h3Weak","h4Strong","h4Weak","h4StrongUnderlined","b1Strong","b1Weak","b1StrongUnderlined","b1WeakUnderlined","captionStrong","captionWeak","captionStrongUnderlined","captionWeakUnderlined"],"mappings":"kOAOA,MAAMA,EAAuC,CAC3CC,mBAAoB,YACpBC,oBAAqB,QACrBC,sBAAuB,OACvBC,wBAAyB,MACzBC,oBAAqB,MACrBC,sBAAuB,aAGnBC,EAAkB,CACtBC,EACAC,EACAC,EACAC,GAAY,KACa,CACzBC,WAAYA,EAAUA,WAAU,QAAEH,GAClCI,SAAUA,EAAQA,SAAU,QAAEH,GAC9BI,UAAW,SACXC,WAAYP,EACZQ,WAAYA,EAAUA,WAAU,QAAEN,GAClCO,cAAeA,EAAaA,cAAU,QAAEP,MACpCC,EAAYX,EAAkB,KAUvBkB,EAAyC,CACpDC,SAAUZ,EAAgB,IAAK,UAAW,MAC1Ca,OAAQb,EAAgB,IAAK,OAAQ,MACrCc,SAAUd,EAAgB,IAAK,UAAW,MAC1Ce,OAAQf,EAAgB,IAAK,OAAQ,MACrCgB,SAAUhB,EAAgB,IAAK,UAAW,MAC1CiB,OAAQjB,EAAgB,IAAK,OAAQ,MACrCkB,gBAAiBlB,EAAgB,IAAK,YAAa,MACnDmB,SAAUnB,EAAgB,IAAK,UAAW,MAC1CoB,OAAQpB,EAAgB,IAAK,OAAQ,MACrCqB,gBAAiBrB,EAAgB,IAAK,YAAa,MACnDsB,SAAUtB,EAAgB,IAAK,UAAW,MAC1CuB,OAAQvB,EAAgB,IAAK,OAAQ,MACrCwB,gBAAiBxB,EAAgB,IAAK,YAAa,MACnDyB,SAAUzB,EAAgB,IAAK,UAAW,MAC1C0B,OAAQ1B,EAAgB,IAAK,OAAQ,MACrC2B,SAAU3B,EAAgB,IAAK,UAAW,MAC1C4B,OAAQ5B,EAAgB,IAAK,OAAQ,MACrC6B,SAAU7B,EAAgB,IAAK,UAAW,MAC1C8B,OAAQ9B,EAAgB,IAAK,OAAQ,MACrC+B,mBAAoB/B,EAAgB,IAAK,UAAW,MAAM,GAC1DgC,SAAUhC,EAAgB,IAAK,OAAQ,MACvCiC,OAAQjC,EAAgB,IAAK,OAAQ,MACrCkC,mBAAoBlC,EAAgB,IAAK,OAAQ,MAAM,GACvDmC,iBAAkBnC,EAAgB,IAAK,OAAQ,MAAM,GACrDoC,cAAepC,EAAgB,IAAK,OAAQ,WAC5CqC,YAAarC,EAAgB,IAAK,OAAQ,WAC1CsC,wBAAyBtC,EAAgB,IAAK,OAAQ,WAAW,GACjEuC,sBAAuBvC,EAAgB,IAAK,OAAQ,WAAW,+BAlC9BG,IAAqE,CACtGG,SAAUA,EAAQA,SAAS,OAAEH,GAC7BM,WAAYA,EAAUA,WAAS,OAAEN,GACjCO,cAAeA,EAAaA,cAAS,OAAEP"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ThemeOptions } from '@mui/material/styles/createTheme';
|
|
2
|
+
import { fontSize } from './tokens/typography/font-size.js';
|
|
2
3
|
|
|
4
|
+
declare const getMobileTextStyle: (sizeKey: keyof (typeof fontSize)['mobile']) => React.CSSProperties;
|
|
3
5
|
declare const typography: ThemeOptions['typography'];
|
|
4
6
|
|
|
5
|
-
export { typography };
|
|
7
|
+
export { getMobileTextStyle, typography };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{fontFamily as e}from"./tokens/typography/font-family.js";import{fontSize as t}from"./tokens/typography/font-size.js";import{letterSpacing as o}from"./tokens/typography/letter-spacing.js";import{lineHeight as n}from"./tokens/typography/line-height.js";const d={textDecorationLine:"underline",textDecorationStyle:"solid",textDecorationSkipInk:"auto",textDecorationThickness:"2px",textUnderlineOffset:"25%",textUnderlinePosition:"from-font"},i=(i,a,r,h=!1)=>({fontFamily:e.desktop[a],fontSize:t.desktop[r],fontStyle:"normal",fontWeight:i,lineHeight:n.desktop[r],letterSpacing:o.desktop[r],...h?d:{}}),a=e=>({fontSize:t.mobile[e],lineHeight:n.mobile[e],letterSpacing:o.mobile[e]}),r={d1Strong:i(600,"heading","d1"),d1Weak:i(400,"body","d1"),d2Strong:i(600,"heading","d2"),d2Weak:i(400,"body","d2"),d3Strong:i(600,"heading","d3"),d3Weak:i(400,"body","d3"),d3WeakAlternate:i(400,"alternate","d3"),d4Strong:i(600,"heading","d4"),d4Weak:i(400,"body","d4"),d4WeakAlternate:i(400,"alternate","d4"),h1Strong:i(600,"heading","h1"),h1Weak:i(400,"body","h1"),h1WeakAlternate:i(400,"alternate","h1"),h2Strong:i(600,"heading","h2"),h2Weak:i(400,"body","h2"),h3Strong:i(600,"heading","h3"),h3Weak:i(400,"body","h3"),h4Strong:i(600,"heading","h4"),h4Weak:i(400,"body","h4"),h4StrongUnderlined:i(600,"heading","h4",!0),b1Strong:i(600,"body","b1"),b1Weak:i(400,"body","b1"),b1StrongUnderlined:i(600,"body","b1",!0),b1WeakUnderlined:i(400,"body","b1",!0),captionStrong:i(600,"body","caption"),captionWeak:i(400,"body","caption"),captionStrongUnderlined:i(600,"body","caption",!0),captionWeakUnderlined:i(400,"body","caption",!0)};export{a as getMobileTextStyle,r as typography};
|
|
2
2
|
//# sourceMappingURL=typography.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.js","sources":["../../src/themes/typography.ts"],"sourcesContent":["import type { ThemeOptions } from '@mui/material/styles/createTheme';\n\
|
|
1
|
+
{"version":3,"file":"typography.js","sources":["../../src/themes/typography.ts"],"sourcesContent":["import type { ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport { fontFamily } from './tokens/typography/font-family';\nimport { fontSize } from './tokens/typography/font-size';\nimport { letterSpacing } from './tokens/typography/letter-spacing';\nimport { lineHeight } from './tokens/typography/line-height';\n\nconst underlineStyles: React.CSSProperties = {\n textDecorationLine: 'underline',\n textDecorationStyle: 'solid',\n textDecorationSkipInk: 'auto',\n textDecorationThickness: '2px', // Ensure a valid value\n textUnderlineOffset: '25%',\n textUnderlinePosition: 'from-font',\n};\n\nconst createTextStyle = (\n weight: number,\n type: 'alternate' | 'body' | 'heading',\n sizeKey: keyof (typeof fontSize)['desktop'],\n underline = false,\n): React.CSSProperties => ({\n fontFamily: fontFamily['desktop'][type],\n fontSize: fontSize['desktop'][sizeKey],\n fontStyle: 'normal',\n fontWeight: weight,\n lineHeight: lineHeight['desktop'][sizeKey],\n letterSpacing: letterSpacing['desktop'][sizeKey],\n ...(underline ? underlineStyles : {}),\n});\n\n// has to be done using media queries, otherwise it isn't responsive\nexport const getMobileTextStyle = (sizeKey: keyof (typeof fontSize)['mobile']): React.CSSProperties => ({\n fontSize: fontSize['mobile'][sizeKey],\n lineHeight: lineHeight['mobile'][sizeKey],\n letterSpacing: letterSpacing['mobile'][sizeKey],\n});\n\nexport const typography: ThemeOptions['typography'] = {\n d1Strong: createTextStyle(600, 'heading', 'd1'),\n d1Weak: createTextStyle(400, 'body', 'd1'),\n d2Strong: createTextStyle(600, 'heading', 'd2'),\n d2Weak: createTextStyle(400, 'body', 'd2'),\n d3Strong: createTextStyle(600, 'heading', 'd3'),\n d3Weak: createTextStyle(400, 'body', 'd3'),\n d3WeakAlternate: createTextStyle(400, 'alternate', 'd3'),\n d4Strong: createTextStyle(600, 'heading', 'd4'),\n d4Weak: createTextStyle(400, 'body', 'd4'),\n d4WeakAlternate: createTextStyle(400, 'alternate', 'd4'),\n h1Strong: createTextStyle(600, 'heading', 'h1'),\n h1Weak: createTextStyle(400, 'body', 'h1'),\n h1WeakAlternate: createTextStyle(400, 'alternate', 'h1'),\n h2Strong: createTextStyle(600, 'heading', 'h2'),\n h2Weak: createTextStyle(400, 'body', 'h2'),\n h3Strong: createTextStyle(600, 'heading', 'h3'),\n h3Weak: createTextStyle(400, 'body', 'h3'),\n h4Strong: createTextStyle(600, 'heading', 'h4'),\n h4Weak: createTextStyle(400, 'body', 'h4'),\n h4StrongUnderlined: createTextStyle(600, 'heading', 'h4', true),\n b1Strong: createTextStyle(600, 'body', 'b1'),\n b1Weak: createTextStyle(400, 'body', 'b1'),\n b1StrongUnderlined: createTextStyle(600, 'body', 'b1', true),\n b1WeakUnderlined: createTextStyle(400, 'body', 'b1', true),\n captionStrong: createTextStyle(600, 'body', 'caption'),\n captionWeak: createTextStyle(400, 'body', 'caption'),\n captionStrongUnderlined: createTextStyle(600, 'body', 'caption', true),\n captionWeakUnderlined: createTextStyle(400, 'body', 'caption', true),\n};\n"],"names":["underlineStyles","textDecorationLine","textDecorationStyle","textDecorationSkipInk","textDecorationThickness","textUnderlineOffset","textUnderlinePosition","createTextStyle","weight","type","sizeKey","underline","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","letterSpacing","getMobileTextStyle","typography","d1Strong","d1Weak","d2Strong","d2Weak","d3Strong","d3Weak","d3WeakAlternate","d4Strong","d4Weak","d4WeakAlternate","h1Strong","h1Weak","h1WeakAlternate","h2Strong","h2Weak","h3Strong","h3Weak","h4Strong","h4Weak","h4StrongUnderlined","b1Strong","b1Weak","b1StrongUnderlined","b1WeakUnderlined","captionStrong","captionWeak","captionStrongUnderlined","captionWeakUnderlined"],"mappings":"kQAOA,MAAMA,EAAuC,CAC3CC,mBAAoB,YACpBC,oBAAqB,QACrBC,sBAAuB,OACvBC,wBAAyB,MACzBC,oBAAqB,MACrBC,sBAAuB,aAGnBC,EAAkB,CACtBC,EACAC,EACAC,EACAC,GAAY,KACa,CACzBC,WAAYA,EAAoB,QAAEH,GAClCI,SAAUA,EAAkB,QAAEH,GAC9BI,UAAW,SACXC,WAAYP,EACZQ,WAAYA,EAAoB,QAAEN,GAClCO,cAAeA,EAAuB,QAAEP,MACpCC,EAAYX,EAAkB,KAIvBkB,EAAsBR,IAAqE,CACtGG,SAAUA,EAAiB,OAAEH,GAC7BM,WAAYA,EAAmB,OAAEN,GACjCO,cAAeA,EAAsB,OAAEP,KAG5BS,EAAyC,CACpDC,SAAUb,EAAgB,IAAK,UAAW,MAC1Cc,OAAQd,EAAgB,IAAK,OAAQ,MACrCe,SAAUf,EAAgB,IAAK,UAAW,MAC1CgB,OAAQhB,EAAgB,IAAK,OAAQ,MACrCiB,SAAUjB,EAAgB,IAAK,UAAW,MAC1CkB,OAAQlB,EAAgB,IAAK,OAAQ,MACrCmB,gBAAiBnB,EAAgB,IAAK,YAAa,MACnDoB,SAAUpB,EAAgB,IAAK,UAAW,MAC1CqB,OAAQrB,EAAgB,IAAK,OAAQ,MACrCsB,gBAAiBtB,EAAgB,IAAK,YAAa,MACnDuB,SAAUvB,EAAgB,IAAK,UAAW,MAC1CwB,OAAQxB,EAAgB,IAAK,OAAQ,MACrCyB,gBAAiBzB,EAAgB,IAAK,YAAa,MACnD0B,SAAU1B,EAAgB,IAAK,UAAW,MAC1C2B,OAAQ3B,EAAgB,IAAK,OAAQ,MACrC4B,SAAU5B,EAAgB,IAAK,UAAW,MAC1C6B,OAAQ7B,EAAgB,IAAK,OAAQ,MACrC8B,SAAU9B,EAAgB,IAAK,UAAW,MAC1C+B,OAAQ/B,EAAgB,IAAK,OAAQ,MACrCgC,mBAAoBhC,EAAgB,IAAK,UAAW,MAAM,GAC1DiC,SAAUjC,EAAgB,IAAK,OAAQ,MACvCkC,OAAQlC,EAAgB,IAAK,OAAQ,MACrCmC,mBAAoBnC,EAAgB,IAAK,OAAQ,MAAM,GACvDoC,iBAAkBpC,EAAgB,IAAK,OAAQ,MAAM,GACrDqC,cAAerC,EAAgB,IAAK,OAAQ,WAC5CsC,YAAatC,EAAgB,IAAK,OAAQ,WAC1CuC,wBAAyBvC,EAAgB,IAAK,OAAQ,WAAW,GACjEwC,sBAAuBxC,EAAgB,IAAK,OAAQ,WAAW"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flipdish/portal-library",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@testing-library/jest-dom": "6.6.3",
|
|
80
80
|
"@testing-library/react": "15.0.7",
|
|
81
81
|
"@types/react": "18.3.20",
|
|
82
|
-
"@types/react-dom": "18.3.
|
|
82
|
+
"@types/react-dom": "18.3.6",
|
|
83
83
|
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
84
84
|
"@typescript-eslint/parser": "7.18.0",
|
|
85
85
|
"@vitejs/plugin-react-swc": "3.8.1",
|