@aglyn/shared-ui-theme 1.0.0-beta.143
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/LICENSE +201 -0
- package/README.md +7 -0
- package/package.json +51 -0
- package/src/index.d.ts +34 -0
- package/src/index.js +50 -0
- package/src/index.js.map +1 -0
- package/src/lib/components/host-theme-provider.d.ts +84 -0
- package/src/lib/components/host-theme-provider.js +146 -0
- package/src/lib/components/host-theme-provider.js.map +1 -0
- package/src/lib/components/theme-css-var-provider.d.ts +44 -0
- package/src/lib/components/theme-css-var-provider.js +79 -0
- package/src/lib/components/theme-css-var-provider.js.map +1 -0
- package/src/lib/console.theme.d.ts +34 -0
- package/src/lib/console.theme.js +598 -0
- package/src/lib/console.theme.js.map +1 -0
- package/src/lib/constants.d.ts +72 -0
- package/src/lib/constants.js +85 -0
- package/src/lib/constants.js.map +1 -0
- package/src/lib/hocs/create-with-emotion-client-cache.d.ts +30 -0
- package/src/lib/hocs/create-with-emotion-client-cache.js +53 -0
- package/src/lib/hocs/create-with-emotion-client-cache.js.map +1 -0
- package/src/lib/hocs/create-with-theme-provider.d.ts +86 -0
- package/src/lib/hocs/create-with-theme-provider.js +231 -0
- package/src/lib/hocs/create-with-theme-provider.js.map +1 -0
- package/src/lib/tenant.theme.d.ts +58 -0
- package/src/lib/tenant.theme.js +282 -0
- package/src/lib/tenant.theme.js.map +1 -0
- package/src/lib/theme.types.d.ts +26 -0
- package/src/lib/theme.types.js +18 -0
- package/src/lib/theme.types.js.map +1 -0
- package/src/lib/util/accent-text.d.ts +187 -0
- package/src/lib/util/accent-text.js +277 -0
- package/src/lib/util/accent-text.js.map +1 -0
- package/src/lib/util/accessible-shade.d.ts +61 -0
- package/src/lib/util/accessible-shade.js +117 -0
- package/src/lib/util/accessible-shade.js.map +1 -0
- package/src/lib/util/color-scheme-hint.d.ts +68 -0
- package/src/lib/util/color-scheme-hint.js +69 -0
- package/src/lib/util/color-scheme-hint.js.map +1 -0
- package/src/lib/util/create-responsive-theme.d.ts +71 -0
- package/src/lib/util/create-responsive-theme.js +287 -0
- package/src/lib/util/create-responsive-theme.js.map +1 -0
- package/src/lib/util/emotion-cache.d.ts +81 -0
- package/src/lib/util/emotion-cache.js +79 -0
- package/src/lib/util/emotion-cache.js.map +1 -0
- package/src/lib/util/generate-component-class-keys.d.ts +41 -0
- package/src/lib/util/generate-component-class-keys.js +53 -0
- package/src/lib/util/generate-component-class-keys.js.map +1 -0
- package/src/lib/util/host-theme.d.ts +92 -0
- package/src/lib/util/host-theme.js +340 -0
- package/src/lib/util/host-theme.js.map +1 -0
- package/src/lib/util/layered-emotion-cache.d.ts +78 -0
- package/src/lib/util/layered-emotion-cache.js +90 -0
- package/src/lib/util/layered-emotion-cache.js.map +1 -0
- package/src/lib/util/merge-sx-props.d.ts +22 -0
- package/src/lib/util/merge-sx-props.js +27 -0
- package/src/lib/util/merge-sx-props.js.map +1 -0
- package/src/lib/util/scheme-route-segment.d.ts +95 -0
- package/src/lib/util/scheme-route-segment.js +101 -0
- package/src/lib/util/scheme-route-segment.js.map +1 -0
- package/src/lib/util/theme-editor-defaults.d.ts +41 -0
- package/src/lib/util/theme-editor-defaults.js +49 -0
- package/src/lib/util/theme-editor-defaults.js.map +1 -0
- package/src/lib/util/theme-editor-fields.d.ts +315 -0
- package/src/lib/util/theme-editor-fields.js +714 -0
- package/src/lib/util/theme-editor-fields.js.map +1 -0
- package/src/lib/util/theme-mode-cookie.d.ts +48 -0
- package/src/lib/util/theme-mode-cookie.js +48 -0
- package/src/lib/util/theme-mode-cookie.js.map +1 -0
- package/src/vendor/emotion.d.ts +18 -0
- package/src/vendor/emotion.js +22 -0
- package/src/vendor/emotion.js.map +1 -0
- package/src/vendor/jss.d.ts +18 -0
- package/src/vendor/jss.js +20 -0
- package/src/vendor/jss.js.map +1 -0
- package/src/vendor/mui.d.ts +282 -0
- package/src/vendor/mui.js +20 -0
- package/src/vendor/mui.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/shared/ui/theme/src/lib/console.theme.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2023 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { lightBlue } from '@mui/material/colors'\nimport type { PaletteOptions, Theme, ThemeOptions } from '../vendor/mui'\nimport { buildFontFamilyList } from './constants'\nimport { accentTextColor } from './util/accent-text'\nimport createResponsiveTheme, {\n createResponsiveCssVarTheme,\n} from './util/create-responsive-theme'\n\nexport type ColorVariant = 'light' | 'dark'\nexport type BackgroundRecord = PaletteOptions['background']\nexport type OrdinalIdentifier<K extends string = ''> =\n 'primary' | 'secondary' | 'tertiary'\nexport type OrdinalRecord<T extends OrdinalIdentifier = OrdinalIdentifier> =\n Pick<PaletteOptions, T>\nexport type PrimaryRecord = OrdinalRecord<'primary'>['primary']\nexport type SecondaryRecord = OrdinalRecord<'secondary'>['secondary']\nexport type TertiaryRecord = OrdinalRecord<'tertiary'>['tertiary']\nexport type ActionIdentifier = 'svgBackground' | 'svgFilled' | 'svgStroke'\nexport type ActionRecord = Pick<PaletteOptions, ActionIdentifier>\n\nconst colorScheme = {\n light: {\n // Palette rotated 2026-08-03 (AGL-1186): the blue accent that every\n // component was already opting into is now `primary`, so nothing has to\n // opt out of a primary that was really a surface tone. Whole colour\n // objects moved, so each keeps the contrastText it shipped with.\n primary: {\n main: '#00b0ff',\n // The accent rendered AS TEXT — `ACCENT_TEXT_SHADE` in\n // `util/accent-text.ts`. Links and the labels of text and outlined\n // buttons read this slot; `main` keeps painting fills, borders and\n // indicators, which owe 3:1 rather than 4.5:1. The brand blue is\n // 2.43:1 on white, so as normal-size text it needs the deeper shade:\n // this one measures 4.95:1 on paper and 4.54:1 on the page.\n dark: '#0077ad',\n contrastText: '#FFFFFF',\n },\n secondary: {\n main: '#e040fb',\n // Same slot, same role. Authored rather than left to derivation so the\n // value every link resolves to is readable in this file: 6.11:1 on\n // paper, 5.61:1 on the page.\n dark: '#9d2db0',\n contrastText: '#FFFFFF',\n },\n tertiary: {\n main: '#404C5C',\n contrastText: '#FFFFFF',\n },\n surface: {\n main: `#F8F9FA`,\n contrastText: '#000000',\n },\n // Pale accent washes used as tile/panel FILLS (AGL-1244). Each member is\n // named after the accent whose icon sits on it — the mega-menu's blue\n // tiles pair `tint.primary` with a `primary.dark` glyph — so the pairing\n // is legible from the token names alone. These were the last raw hexes on\n // the marketing nav; they are not `primary.light` (`#33BFFF`) and never\n // were, which is why the slot had to be named rather than borrowed.\n tint: {\n primary: '#E6F5FF',\n secondary: '#FBE6FE',\n tertiary: '#EEF0F2',\n },\n // MUI's own outlined-input border weight, promoted to a token so a field\n // drawn outside MUI can match one drawn by it (see `PaletteOptions`).\n inputOutline: 'rgba(0, 0, 0, 0.23)',\n background: {\n default: '#F5F5F5',\n paper: '#FFFFFF',\n },\n info: {\n // The deepest blue of this hue that still carries a WHITE label at the\n // 4.5:1 AA text bar (4.56:1). A lighter info takes every filled\n // variant sub-AA, and flipping its ink to dark makes an informational\n // surface read as a warning.\n main: '#1878cd',\n contrastText: '#FFFFFF',\n },\n error: {\n // The deepest red of this hue that keeps a white label at AA (4.51:1).\n // An error surface is a destructive-action affordance, so the fill\n // carries the contrast and the ink stays white.\n main: '#e32c27',\n contrastText: '#FFFFFF',\n },\n success: {\n main: '#4CAF50',\n contrastText: '#000000DE',\n },\n warning: {\n main: '#FFAB40',\n contrastText: '#000000DE',\n },\n grey: {\n 50: '#FAFAFA',\n 100: '#F5F5F5',\n 200: '#EEEEEE',\n 300: '#E0E0E0',\n 400: '#BDBDBD',\n 500: '#9E9E9E',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#D5D5D5',\n A200: '#AAAAAA',\n A400: '#303030',\n A700: '#616161',\n },\n svgBackground: {\n main: '#FAFAFA',\n hover: '#FAFAFA',\n active: '#FAFAFA',\n focus: '#FAFAFA',\n },\n svgFilled: {\n main: '#9E9E9E',\n hover: lightBlue['400'],\n active: lightBlue['400'],\n focus: lightBlue['400'],\n },\n svgStroke: {\n main: '#FFFFFF',\n hover: '#FFFFFF',\n active: '#FFFFFF',\n focus: '#FFFFFF',\n },\n },\n dark: {\n primary: {\n main: '#00b0ff',\n // The accent-as-text slot, LIGHTER than `main` here and deliberately\n // so. MUI derives `dark` as `darken(main, 0.3)` in both schemes — it\n // cannot see that the ground flipped — which lands `#007bb2` at 3.67:1\n // on this page. Every `dark` shade in this scheme is therefore\n // authored, and each is the value `ensureAccessibleShades` computes by\n // walking the accent LIGHTER until it clears 4.5:1 against both\n // `background.default` and `background.paper`. 9.02:1 / 6.62:1.\n dark: '#4dc8ff',\n contrastText: '#FFFFFF',\n },\n secondary: {\n main: '#e040fb',\n // 7.04:1 on the page, 5.17:1 on a raised panel. The brand magenta\n // itself is 3.78:1 on paper, so it cannot be the text shade here.\n dark: '#e979fc',\n contrastText: '#FFFFFF',\n },\n // Dark takes a LIFTED slate, not the brand `#404C5C`: that scores 1.38\n // against this scheme's page and would just move the old invisibility\n // bug from primary to tertiary. `#7C8CA3` measures 5.02 vs page and\n // 3.63 vs a raised panel, and needs dark ink rather than white (6.14\n // against black, 3.42 against white).\n tertiary: {\n main: '#7C8CA3',\n // 7.73:1 / 5.68:1 — `main` itself is 2.78:1 on the page.\n dark: '#a3afbf',\n contrastText: '#000000DE',\n },\n surface: {\n // Held at 1.17:1 from the page even though that is flat for an\n // elevation step. This token is also the panel the besigner draws its\n // hierarchy depth cues on, and lifting it toward the page pushes the\n // active guide — `secondary.main` on this fill — from 4.41:1 down to\n // 3.89:1. Trading a legible cue for a slightly clearer edge is the\n // wrong way round; the depth cues are what someone actually reads.\n main: `#202934`,\n contrastText: '#FFFFFF',\n },\n // The hand-curated dark counterparts the 15 tinted tiles carried in their\n // `@scheme dark` slices before the token existed (AGL-1244). Carrying the\n // exact values here is what lets those slices be DELETED without dark mode\n // shifting: a literal needs a slice, a token flips on its own.\n tint: {\n // Tile FILLS, so the bar is separation from the page rather than a\n // WCAG text ratio: below ~1.5:1 a tinted tile has no visible edge. The\n // originals sat at 1.13–1.25:1 and disappeared. White ink clears 11:1\n // on all three.\n primary: '#193d55',\n // Magenta cannot reach 1.5:1 without turning purple-grey, so this one\n // stops at 1.44:1 and the tile carries an `inputOutline` border in\n // dark instead of pushing the hue further.\n secondary: '#571e61',\n tertiary: '#333b44',\n },\n inputOutline: 'rgba(255, 255, 255, 0.23)',\n background: {\n default: '#161c21',\n paper: '#2a3440',\n },\n info: {\n main: '#1878cd',\n // 6.22:1 / 4.57:1.\n dark: '#5da1dc',\n contrastText: '#FFFFFF',\n },\n error: {\n main: '#e32c27',\n // 6.18:1 / 4.54:1.\n dark: '#ed7876',\n contrastText: '#FFFFFF',\n },\n success: {\n main: '#4CAF50',\n // 8.56:1 / 6.29:1.\n dark: '#82c785',\n contrastText: '#000000DE',\n },\n warning: {\n main: '#FFAB40',\n // 10.98:1 / 8.07:1.\n dark: '#ffc479',\n contrastText: '#000000DE',\n },\n grey: {\n 50: '#FAFAFA',\n 100: '#F5F5F5',\n 200: '#EEEEEE',\n 300: '#E0E0E0',\n 400: '#BDBDBD',\n 500: '#9E9E9E',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#D5D5D5',\n A200: '#AAAAAA',\n A400: '#303030',\n A700: '#616161',\n },\n svgBackground: {\n main: '#FAFAFA',\n hover: '#FAFAFA',\n active: '#FAFAFA',\n focus: '#FAFAFA',\n },\n svgFilled: {\n main: '#9E9E9E',\n hover: lightBlue['A100'],\n active: lightBlue['A100'],\n focus: lightBlue['A100'],\n },\n svgStroke: {\n main: '#FFFFFF',\n hover: '#FFFFFF',\n active: '#FFFFFF',\n focus: '#FFFFFF',\n },\n },\n}\n\nconst shadowKeyUmbraOpacity = 0.2\nconst shadowKeyPenumbraOpacity = 0.14\nconst shadowAmbientShadowOpacity = 0.12\n\nfunction createShadowInset(...px: number[]) {\n return [\n `inset ${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`,\n `inset ${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`,\n `inset ${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`,\n ].join(',')\n}\n\nconst baseOptions: ThemeOptions = {\n components: {\n MuiAppBar: {\n defaultProps: {\n enableColorOnDark: true,\n },\n },\n MuiAvatar: {\n styleOverrides: {\n root: {\n width: 32,\n height: 32,\n },\n },\n },\n MuiButton: {\n defaultProps: {\n color: 'primary',\n },\n styleOverrides: {\n // MUI's own variants set `--variant-textColor` and\n // `--variant-outlinedColor` to `palette[color].main`, which paints\n // the brand color as normal-size text — `#00b0ff` at 2.43:1 on\n // white. Both vars move to the accent-text shade\n // (`palette[color].dark`, scheme-aware). `--variant-outlinedBorder`\n // and `--variant-containedBg` are left on `main`: a border and a\n // fill owe 3:1, and the brand belongs there.\n //\n // Resolved per instance rather than baked, because `components` are\n // evaluated ONCE against the root theme — a literal read here would\n // freeze the light-scheme hex into dark mode.\n root: ({ theme, ownerState }) => {\n const accent = accentTextColor(theme, ownerState?.color)\n return {\n '&a[disabled], &.disabled': {\n pointerEvents: 'none',\n textDecoration: 'none',\n filter: 'grayscale(1) opacity(0.65)',\n },\n ...(accent && {\n '--variant-textColor': accent,\n '--variant-outlinedColor': accent,\n }),\n }\n },\n },\n },\n /**\n * Room for a floated label at the top of a dialog (AGL-703).\n *\n * MUI zeroes a DialogContent's top padding when it follows a DialogTitle\n * — `.MuiDialogTitle-root + .MuiDialogContent-root` — and the content box\n * scrolls (`overflow-y: auto`). So the first field's shrunk outlined\n * label, which sits ABOVE its own border, is clipped by the scroll\n * container. It shows on any dialog whose first control has a value on\n * open: the New author dialog's `Type` select had its label shaved in\n * half.\n *\n * Twenty-seven dialogs tried to fix this themselves with\n * `sx={{ pt: 1 }}`, and NONE of them worked: MUI's rule is two classes\n * and `sx` is one, so the adjacent-sibling selector wins on specificity\n * every time. Matching that selector here is what makes the fix apply —\n * which is why it belongs in the theme rather than at any call site.\n *\n * 12px: the shrunk label rises ~9px above the input's top edge, plus a\n * little air so it does not sit ON the dialog title.\n */\n MuiDialogContent: {\n styleOverrides: {\n root: ({ theme }: any) => ({\n '.MuiDialogTitle-root + &': {\n paddingTop: theme.spacing(1.5),\n },\n }),\n },\n },\n MuiFab: {\n defaultProps: {\n color: 'primary',\n },\n },\n MuiIconButton: {\n defaultProps: {\n color: 'primary',\n },\n // color: 'inherit', // Default color to inherit\n styleOverrides: {\n root: ({ theme }) => ({\n padding: theme.spacing(1),\n }),\n },\n variants: [\n {\n props: { variant: 'outlined' } as any, // @TODO ⚠️ fix typing\n style: ({ theme }) => ({\n border: `1px solid`,\n borderColor: `inherit`,\n }),\n },\n ],\n },\n MuiLink: {\n defaultProps: {\n color: 'primary',\n },\n styleOverrides: {\n // A Link is text by definition, so `color=\"primary\"` resolving to\n // `palette.primary.main` is always measured against the wrong bar.\n // Only the PaletteColor keys are rewritten — `inherit`,\n // `textPrimary`, `textSecondary` and `textDisabled` return undefined\n // from `accentTextColor` and keep MUI's own resolution.\n root: ({ theme, ownerState }) => {\n const accent = accentTextColor(theme, ownerState?.color)\n return {\n '&[disabled], &.disabled': {\n pointerEvents: 'none',\n textDecoration: 'none',\n filter: 'grayscale(1) opacity(0.65)',\n },\n ...(accent && { color: accent }),\n }\n },\n },\n },\n // MuiMenu: {},\n // No accent defaults live here any more (AGL-1186). Tabs, checkboxes,\n // radios, switches, sliders, progress and badges each briefly carried\n // `color: 'secondary'` to escape a `primary` that was a surface tone.\n // Now that `primary` IS the accent they render correctly on MUI's own\n // default, and a per-component default is exactly what the rotation\n // exists to remove.\n //\n // That includes the `MuiTabs` default AGL-1181 records as its fix: it\n // was removed here deliberately, not reverted. The rotation fixed the\n // root cause the default was papering over, so a reader who finds\n // nothing at that issue's write-up is looking at the right file.\n MuiToolbar: {\n styleOverrides: {\n // Honour `disableGutters` (AGL-1230). This override targets the ROOT\n // slot, and `disableGutters` only drops the `gutters` slot — so the\n // padding survived the prop, app-wide, and the prop silently did\n // nothing at ≥sm. It cost the marketing nav a 24px offset against the\n // page container at every width below the container's clamp.\n root: ({ theme, ownerState }) =>\n ownerState?.disableGutters\n ? {}\n : {\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n },\n },\n },\n MuiTooltip: {\n defaultProps: {\n arrow: true,\n },\n },\n },\n // mixins: {},\n shadowsInset: [\n 'none',\n createShadowInset(0, 2, 1, -1, 0, 1, 1, -0, 0, 1, 3, -0),\n createShadowInset(0, 3, 1, -2, 0, 2, 2, -0, 0, 1, 5, -0),\n createShadowInset(0, 3, 3, -2, 0, 3, 4, -0, 0, 1, 8, -0),\n createShadowInset(0, 2, 4, -1, 0, 4, 5, -0, 0, 1, 10, -0),\n createShadowInset(0, 3, 5, -1, 0, 5, 8, -0, 0, 1, 14, -0),\n createShadowInset(0, 3, 5, -1, 0, 6, 10, -0, 0, 1, 18, -0),\n createShadowInset(0, 4, 5, -2, 0, 7, 10, -1, 0, 2, 16, -1),\n createShadowInset(0, 5, 5, -3, 0, 8, 10, -1, 0, 3, 14, -2),\n createShadowInset(0, 5, 6, -3, 0, 9, 12, -1, 0, 3, 16, -2),\n createShadowInset(0, 6, 6, -3, 0, 10, 14, -1, 0, 4, 18, -3),\n createShadowInset(0, 6, 7, -4, 0, 11, 15, -1, 0, 4, 20, -3),\n createShadowInset(0, 7, 8, -4, 0, 12, 17, -2, 0, 5, 22, -4),\n createShadowInset(0, 7, 8, -4, 0, 13, 19, -2, 0, 5, 24, -4),\n createShadowInset(0, 7, 9, -4, 0, 14, 21, -2, 0, 5, 26, -4),\n createShadowInset(0, 8, 9, -5, 0, 15, 22, -2, 0, 6, 28, -5),\n createShadowInset(0, 8, 10, -5, 0, 16, 24, -2, 0, 6, 30, -5),\n createShadowInset(0, 8, 11, -5, 0, 17, 26, -2, 0, 6, 32, -5),\n createShadowInset(0, 9, 11, -5, 0, 18, 28, -2, 0, 7, 34, -6),\n createShadowInset(0, 9, 12, -6, 0, 19, 29, -2, 0, 7, 36, -6),\n createShadowInset(0, 10, 13, -6, 0, 20, 31, -3, 0, 8, 38, -7),\n createShadowInset(0, 10, 13, -6, 0, 21, 33, -3, 0, 8, 40, -7),\n createShadowInset(0, 10, 14, -6, 0, 22, 35, -3, 0, 8, 42, -7),\n createShadowInset(0, 11, 14, -7, 0, 23, 36, -3, 0, 9, 44, -8),\n createShadowInset(0, 11, 15, -7, 0, 24, 38, -3, 0, 9, 46, -8),\n ],\n shape: {\n borderRadius: 4,\n appIconBorderRadius: `17.544%`,\n },\n spacing: 8,\n typography: {\n fontFamily: buildFontFamilyList().join(','),\n // The brand's named weights, beyond MUI's four.\n //\n // MUI ships Light 300 / Regular 400 / Medium 500 / Bold 700, and the\n // brand type ramp uses three more: Black for heroes, ExtraBold for H2,\n // SemiBold below Bold. Without these tokens, reaching 600/800/900 means\n // typing a raw number, which pins an element to a weight instead of to\n // the brand and leaves it behind when the ramp moves.\n //\n // They are ADDITIVE — `createTypography` deep-merges unknown keys\n // through its `...other`, so nothing MUI defines changes. And they are\n // reachable the same way the built-ins are: `@mui/system`'s `style()`\n // retries a miss as `${prop}${capitalize(value)}`, so `fontWeight:\n // 'extraBold'` resolves to `typography.fontWeightExtraBold`. The\n // besigner's weight picker discovers them off the theme rather than\n // from a list, so they appear in the panel without another edit.\n //\n // Roboto Flex is a variable face covering 100–1000, so every rung here\n // renders as a real weight rather than a synthesised one.\n fontWeightSemiBold: 600,\n fontWeightExtraBold: 800,\n fontWeightBlack: 900,\n // The brand's display ramp, so `variant=\"h1\"` / `\"h2\"` MEANS the brand.\n // MUI's defaults are Light 300 at 96px/60px — a display face for a\n // Material app, and nothing like the brand's Black heroes and ExtraBold\n // H2. Left at the defaults, every heading on a built page needs a\n // hand-written `fontSize` and `fontWeight` to look right, and the ones\n // that miss render as a Material display face nobody chose while the\n // markup still says Heading 2.\n //\n // Scoped deliberately to h1 and h2. They have ZERO `variant=\"hN\"` usages\n // in the console and one in the tenant app, so this restyles no product\n // surface — it only changes what a SITE gets when it asks for a heading,\n // which is exactly the thing that should follow the brand. h3–h6 carry\n // 95 usages between them and are left on MUI's scale; `overline` has 19\n // and is left alone for the same reason.\n //\n // `responsiveFontSizes` runs over these afterwards (xs→xl), so these are\n // the DESKTOP end of a ramp that scales itself down — 56px/40px here\n // land near the 34px/30px the mobile frames show.\n // The rung ABOVE h1. h1 is the brand's 56px display size and\n // stays that; a hero drawn at 72px had nothing to ask for, so every one\n // hand-wrote `fontSize: '72px'` — and that literal then LOST to h1's own\n // `responsiveFontSizes` ramp on wide viewports, silently rendering 56px.\n // Listed in `RAMPED_DISPLAY_VARIANTS` so it scales down like the rest of\n // the ramp rather than staying 72px on a phone.\n displayXl: {\n fontSize: '4.5rem',\n fontWeight: 900,\n lineHeight: 1.04,\n letterSpacing: '-0.028em',\n },\n h1: {\n fontSize: '3.5rem',\n fontWeight: 900,\n lineHeight: 1.05,\n letterSpacing: '-0.025em',\n },\n h2: {\n fontSize: '2.5rem',\n fontWeight: 800,\n lineHeight: 1.15,\n letterSpacing: '-0.02em',\n },\n // h3 has to come DOWN with them, or the ramp inverts. Retuning h1/h2 to\n // the brand (56/40px) while h3 kept MUI's 48px left a Heading 3 LARGER\n // than a Heading 2 — visible the moment the theme preview listed the\n // variants in size order. h3 carries zero `variant=\"h3\"` usages, the same\n // as h1 and h2, so this restyles no product surface; h4-h6 keep MUI's\n // scale because 95 usages ride on them.\n h3: {\n fontSize: '2.25rem',\n fontWeight: 700,\n lineHeight: 1.2,\n letterSpacing: '-0.015em',\n },\n // The three text rungs the brand uses that MUI's scale has no name for.\n // MUI runs 16 / 14 / 12 (`body1` / `body2` / `caption`); the brand's\n // pages want 17, 13 and 11, and with no token to ask for they write the\n // pixels instead. One marketing page alone can carry 286 such literals —\n // 165 of them the same 11px metadata line — each pinned to a size rather\n // than to the scale.\n //\n // Full variant objects rather than bare sizes, so one pick brings the\n // line height with it: `variant=\"micro\"` or, where the element's own\n // variant must stay, `fontSize: 'micro.fontSize'` — the token path the\n // Font Size picker already offers for `h4.fontSize`.\n //\n // Named for the job, not the number, so the name survives a retune: a\n // lede stays the lede if the brand moves it to 18px.\n lede: {\n fontSize: '1.0625rem',\n fontWeight: 400,\n lineHeight: 1.6,\n },\n bodyCompact: {\n fontSize: '0.8125rem',\n fontWeight: 400,\n lineHeight: 1.5,\n },\n micro: {\n fontSize: '0.6875rem',\n fontWeight: 400,\n lineHeight: 1.6,\n },\n },\n zIndex: {\n max: 2147483647,\n min: -2147483648,\n },\n}\n\nexport const consoleOptions: ThemeOptions = {\n ...baseOptions,\n palette: {\n mode: 'light',\n ...colorScheme.light,\n },\n}\nexport const consoleOptionsDark: ThemeOptions = {\n ...baseOptions,\n palette: {\n mode: 'dark',\n ...colorScheme.dark,\n },\n}\n\nexport const consoleThemeLight: Theme = createResponsiveTheme({\n themeOptions: { ...consoleOptions },\n})\nexport const consoleThemeDark: Theme = createResponsiveTheme({\n themeOptions: { ...consoleOptionsDark },\n})\n\nexport const consoleThemeCssVar = createResponsiveCssVarTheme(\n consoleThemeLight,\n consoleThemeDark,\n)\n\nexport const getConsoleTheme = (mode: 'light' | 'dark' = 'light') => {\n const theme = {\n light: consoleThemeLight,\n dark: consoleThemeDark,\n }\n return theme[mode]\n}\nexport const getConsoleMetaThemeColor = (mode: 'light' | 'dark' = 'light') => {\n const themeColor = {\n light: consoleThemeLight.palette.secondary.main,\n dark: consoleThemeDark.palette.primary.main,\n }\n return themeColor[mode]\n}\nexport default consoleThemeLight\n"],"names":["lightBlue","buildFontFamilyList","accentTextColor","createResponsiveTheme","createResponsiveCssVarTheme","colorScheme","light","primary","main","dark","contrastText","secondary","tertiary","surface","tint","inputOutline","background","default","paper","info","error","success","warning","grey","A100","A200","A400","A700","svgBackground","hover","active","focus","svgFilled","svgStroke","shadowKeyUmbraOpacity","shadowKeyPenumbraOpacity","shadowAmbientShadowOpacity","createShadowInset","px","join","baseOptions","components","MuiAppBar","defaultProps","enableColorOnDark","MuiAvatar","styleOverrides","root","width","height","MuiButton","color","theme","ownerState","accent","pointerEvents","textDecoration","filter","MuiDialogContent","paddingTop","spacing","MuiFab","MuiIconButton","padding","variants","props","variant","style","border","borderColor","MuiLink","MuiToolbar","disableGutters","breakpoints","up","paddingLeft","paddingRight","MuiTooltip","arrow","shadowsInset","shape","borderRadius","appIconBorderRadius","typography","fontFamily","fontWeightSemiBold","fontWeightExtraBold","fontWeightBlack","displayXl","fontSize","fontWeight","lineHeight","letterSpacing","h1","h2","h3","lede","bodyCompact","micro","zIndex","max","min","consoleOptions","palette","mode","consoleOptionsDark","consoleThemeLight","themeOptions","consoleThemeDark","consoleThemeCssVar","getConsoleTheme","getConsoleMetaThemeColor","themeColor"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,SAAS,QAAQ,uBAAsB;AAEhD,SAASC,mBAAmB,QAAQ,iBAAa;AACjD,SAASC,eAAe,QAAQ,wBAAoB;AACpD,OAAOC,yBACLC,2BAA2B,QACtB,oCAAgC;AAcvC,MAAMC,cAAc;IAClBC,OAAO;QACL,oEAAoE;QACpE,wEAAwE;QACxE,oEAAoE;QACpE,iEAAiE;QACjEC,SAAS;YACPC,MAAM;YACN,uDAAuD;YACvD,mEAAmE;YACnE,mEAAmE;YACnE,iEAAiE;YACjE,qEAAqE;YACrE,4DAA4D;YAC5DC,MAAM;YACNC,cAAc;QAChB;QACAC,WAAW;YACTH,MAAM;YACN,uEAAuE;YACvE,m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;IAC5DwG,cAAc,aAAKL;AACrB,GAAE;AACF,OAAO,MAAMM,mBAA0BzG,sBAAsB;IAC3DwG,cAAc,aAAKF;AACrB,GAAE;AAEF,OAAO,MAAMI,qBAAqBzG,4BAChCsG,mBACAE,kBACD;AAED,OAAO,MAAME,kBAAkB,CAACN,OAAyB,OAAO;IAC9D,MAAMpD,QAAQ;QACZ9C,OAAOoG;QACPjG,MAAMmG;IACR;IACA,OAAOxD,KAAK,CAACoD,KAAK;AACpB,EAAC;AACD,OAAO,MAAMO,2BAA2B,CAACP,OAAyB,OAAO;IACvE,MAAMQ,aAAa;QACjB1G,OAAOoG,kBAAkBH,OAAO,CAAC5F,SAAS,CAACH,IAAI;QAC/CC,MAAMmG,iBAAiBL,OAAO,CAAChG,OAAO,CAACC,IAAI;IAC7C;IACA,OAAOwG,UAAU,CAACR,KAAK;AACzB,EAAC;AACD,eAAeE,kBAAiB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export declare enum FontFamily {
|
|
18
|
+
ADOBE_ARABIC = "\"Adobe Arabic\"",
|
|
19
|
+
APPLE_COLOR_EMOJI = "\"Apple Color Emoji\"",
|
|
20
|
+
APPLE_GOTHIC = "AppleGothic",
|
|
21
|
+
APPLE_SYMBOLS = "\"Apple Symbols\"",
|
|
22
|
+
APPLE_SYSTEM = "-apple-system",
|
|
23
|
+
ARIAL = "Arial",
|
|
24
|
+
ARIAL_BLACK = "\"Arial Black\"",
|
|
25
|
+
ARIAL_HEBREW = "\"Arial Hebrew\"",
|
|
26
|
+
ARIAL_NARRWOW = "\"Arial Narrow\"",
|
|
27
|
+
ARIAL_UNICODE_MS = "\"Arial Unicode MS\"",
|
|
28
|
+
BLINK_MAC_SYSTEM_FONT = "BlinkMacSystemFont",
|
|
29
|
+
CENTURY_GOTHIC = "\"Century Gothic\"",
|
|
30
|
+
CHALKBOARD = "Chalkboard",
|
|
31
|
+
CHALKBOARD_SE = "\"Chalkboard SE\"",
|
|
32
|
+
COURIER = "Courier",
|
|
33
|
+
COURIER_NEW = "\"Courier New\"",
|
|
34
|
+
DAMASCUS = "Damascus",
|
|
35
|
+
DARLESTON = "Darleston",
|
|
36
|
+
ELIANTO = "Elianto",
|
|
37
|
+
FIRA_CODE = "\"Fira Code\"",
|
|
38
|
+
FONT_AWESOME = "FontAwesome",
|
|
39
|
+
FONT_AWESOME_5_BRANDS = "\"Font Awesome 5 Brands\"",
|
|
40
|
+
FONT_AWESOME_5_FREE = "\"Font Awesome 5 Free\"",
|
|
41
|
+
FRUTIGER_NEUE_LT = "\"Frutiger Neue LT\"",
|
|
42
|
+
FRUTIGER_NEUE_LT_PRO = "\"Frutiger Neue LT Pro\"",
|
|
43
|
+
FUTURA = "Futura",
|
|
44
|
+
HELVETICA = "Helvetica",
|
|
45
|
+
HELVETICA_NEUE = "\"Helvetica Neue\"",
|
|
46
|
+
MONOSPACED = "Monospaced",
|
|
47
|
+
MYRIAD_ARABIC = "\"Myriad Arabic\"",
|
|
48
|
+
MYRIAD_HEBREW = "\"Myriad Hebrew\"",
|
|
49
|
+
MYRIAD_PRO = "\"Myriad Pro\"",
|
|
50
|
+
PT_MONO = "\"PT Mono\"",
|
|
51
|
+
PT_SANS = "\"PT Sans\"",
|
|
52
|
+
PT_SANS_CAPTION = "\"PT Sans Caption\"",
|
|
53
|
+
PT_SANS_NARROW = "\"PT Sans Narrown\"",
|
|
54
|
+
PT_SERIF = "\"PT Serif\"",
|
|
55
|
+
PT_SERIF_CAPTION = "\"PT Serif Caption\"",
|
|
56
|
+
RALEWAY = "Raleway",
|
|
57
|
+
ROBOTO = "Roboto",
|
|
58
|
+
ROBOTO_FLEX = "\"Roboto Flex\"",
|
|
59
|
+
ROBOTO_CONDENSED = "\"Roboto Condensed\"",
|
|
60
|
+
ROCKWELL = "Rockwell",
|
|
61
|
+
SANS_SERIF = "sans-serif",
|
|
62
|
+
SEGOE_UI = "\"Segoe UI\"",
|
|
63
|
+
SEGOE_UI_EMOJI = "\"Segoe UI Emoji\"",
|
|
64
|
+
SEGOE_UI_SYMBOL = "\"Segoe UI Symbol\"",
|
|
65
|
+
SF_PRO = "\"SF Pro\"",
|
|
66
|
+
SF_PRO_DISPLAY = "\"SF Pro Display\"",
|
|
67
|
+
SF_PRO_TEXT = "\"SF Pro Text\"",
|
|
68
|
+
SOURCE_SANS_PRO = "\"Source Sans Pro\"",
|
|
69
|
+
TIMES_NEW_ROMAN = "\"Times New Roman\"",
|
|
70
|
+
VERDANA = "Verdana"
|
|
71
|
+
}
|
|
72
|
+
export declare const buildFontFamilyList: (fontFamily?: FontFamily) => FontFamily[];
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ export var FontFamily = /*#__PURE__*/ function(FontFamily) {
|
|
17
|
+
FontFamily["ADOBE_ARABIC"] = '"Adobe Arabic"';
|
|
18
|
+
FontFamily["APPLE_COLOR_EMOJI"] = '"Apple Color Emoji"';
|
|
19
|
+
FontFamily["APPLE_GOTHIC"] = "AppleGothic";
|
|
20
|
+
FontFamily["APPLE_SYMBOLS"] = '"Apple Symbols"';
|
|
21
|
+
FontFamily["APPLE_SYSTEM"] = "-apple-system";
|
|
22
|
+
FontFamily["ARIAL"] = "Arial";
|
|
23
|
+
FontFamily["ARIAL_BLACK"] = '"Arial Black"';
|
|
24
|
+
FontFamily["ARIAL_HEBREW"] = '"Arial Hebrew"';
|
|
25
|
+
FontFamily["ARIAL_NARRWOW"] = '"Arial Narrow"';
|
|
26
|
+
FontFamily["ARIAL_UNICODE_MS"] = '"Arial Unicode MS"';
|
|
27
|
+
FontFamily["BLINK_MAC_SYSTEM_FONT"] = "BlinkMacSystemFont";
|
|
28
|
+
FontFamily["CENTURY_GOTHIC"] = '"Century Gothic"';
|
|
29
|
+
FontFamily["CHALKBOARD"] = "Chalkboard";
|
|
30
|
+
FontFamily["CHALKBOARD_SE"] = '"Chalkboard SE"';
|
|
31
|
+
FontFamily["COURIER"] = "Courier";
|
|
32
|
+
FontFamily["COURIER_NEW"] = '"Courier New"';
|
|
33
|
+
FontFamily["DAMASCUS"] = "Damascus";
|
|
34
|
+
FontFamily["DARLESTON"] = "Darleston";
|
|
35
|
+
FontFamily["ELIANTO"] = "Elianto";
|
|
36
|
+
FontFamily["FIRA_CODE"] = '"Fira Code"';
|
|
37
|
+
FontFamily["FONT_AWESOME"] = "FontAwesome";
|
|
38
|
+
FontFamily["FONT_AWESOME_5_BRANDS"] = '"Font Awesome 5 Brands"';
|
|
39
|
+
FontFamily["FONT_AWESOME_5_FREE"] = '"Font Awesome 5 Free"';
|
|
40
|
+
FontFamily["FRUTIGER_NEUE_LT"] = '"Frutiger Neue LT"';
|
|
41
|
+
FontFamily["FRUTIGER_NEUE_LT_PRO"] = '"Frutiger Neue LT Pro"';
|
|
42
|
+
FontFamily["FUTURA"] = "Futura";
|
|
43
|
+
FontFamily["HELVETICA"] = "Helvetica";
|
|
44
|
+
FontFamily["HELVETICA_NEUE"] = '"Helvetica Neue"';
|
|
45
|
+
FontFamily["MONOSPACED"] = "Monospaced";
|
|
46
|
+
FontFamily["MYRIAD_ARABIC"] = '"Myriad Arabic"';
|
|
47
|
+
FontFamily["MYRIAD_HEBREW"] = '"Myriad Hebrew"';
|
|
48
|
+
FontFamily["MYRIAD_PRO"] = '"Myriad Pro"';
|
|
49
|
+
FontFamily["PT_MONO"] = '"PT Mono"';
|
|
50
|
+
FontFamily["PT_SANS"] = '"PT Sans"';
|
|
51
|
+
FontFamily["PT_SANS_CAPTION"] = '"PT Sans Caption"';
|
|
52
|
+
FontFamily["PT_SANS_NARROW"] = '"PT Sans Narrown"';
|
|
53
|
+
FontFamily["PT_SERIF"] = '"PT Serif"';
|
|
54
|
+
FontFamily["PT_SERIF_CAPTION"] = '"PT Serif Caption"';
|
|
55
|
+
FontFamily["RALEWAY"] = "Raleway";
|
|
56
|
+
FontFamily["ROBOTO"] = "Roboto";
|
|
57
|
+
FontFamily["ROBOTO_FLEX"] = '"Roboto Flex"';
|
|
58
|
+
FontFamily["ROBOTO_CONDENSED"] = '"Roboto Condensed"';
|
|
59
|
+
FontFamily["ROCKWELL"] = "Rockwell";
|
|
60
|
+
FontFamily["SANS_SERIF"] = "sans-serif";
|
|
61
|
+
FontFamily["SEGOE_UI"] = '"Segoe UI"';
|
|
62
|
+
FontFamily["SEGOE_UI_EMOJI"] = '"Segoe UI Emoji"';
|
|
63
|
+
FontFamily["SEGOE_UI_SYMBOL"] = '"Segoe UI Symbol"';
|
|
64
|
+
FontFamily["SF_PRO"] = '"SF Pro"';
|
|
65
|
+
FontFamily["SF_PRO_DISPLAY"] = '"SF Pro Display"';
|
|
66
|
+
FontFamily["SF_PRO_TEXT"] = '"SF Pro Text"';
|
|
67
|
+
FontFamily["SOURCE_SANS_PRO"] = '"Source Sans Pro"';
|
|
68
|
+
FontFamily["TIMES_NEW_ROMAN"] = '"Times New Roman"';
|
|
69
|
+
FontFamily["VERDANA"] = "Verdana";
|
|
70
|
+
return FontFamily;
|
|
71
|
+
}({});
|
|
72
|
+
export const buildFontFamilyList = (fontFamily = '"Roboto Flex"')=>[
|
|
73
|
+
fontFamily,
|
|
74
|
+
"-apple-system",
|
|
75
|
+
"BlinkMacSystemFont",
|
|
76
|
+
'"Segoe UI"',
|
|
77
|
+
'"Helvetica Neue"',
|
|
78
|
+
"Arial",
|
|
79
|
+
"sans-serif",
|
|
80
|
+
'"Apple Color Emoji"',
|
|
81
|
+
'"Segoe UI Emoji"',
|
|
82
|
+
'"Segoe UI Symbol"'
|
|
83
|
+
].filter(Boolean);
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/shared/ui/theme/src/lib/constants.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum FontFamily {\n ADOBE_ARABIC = '\"Adobe Arabic\"',\n APPLE_COLOR_EMOJI = '\"Apple Color Emoji\"',\n APPLE_GOTHIC = 'AppleGothic',\n APPLE_SYMBOLS = '\"Apple Symbols\"',\n APPLE_SYSTEM = '-apple-system',\n ARIAL = 'Arial',\n ARIAL_BLACK = '\"Arial Black\"',\n ARIAL_HEBREW = '\"Arial Hebrew\"',\n ARIAL_NARRWOW = '\"Arial Narrow\"',\n ARIAL_UNICODE_MS = '\"Arial Unicode MS\"',\n BLINK_MAC_SYSTEM_FONT = 'BlinkMacSystemFont',\n CENTURY_GOTHIC = '\"Century Gothic\"',\n CHALKBOARD = 'Chalkboard',\n CHALKBOARD_SE = '\"Chalkboard SE\"',\n COURIER = 'Courier',\n COURIER_NEW = '\"Courier New\"',\n DAMASCUS = 'Damascus',\n DARLESTON = 'Darleston',\n ELIANTO = 'Elianto',\n FIRA_CODE = '\"Fira Code\"',\n FONT_AWESOME = 'FontAwesome',\n FONT_AWESOME_5_BRANDS = '\"Font Awesome 5 Brands\"',\n FONT_AWESOME_5_FREE = '\"Font Awesome 5 Free\"',\n FRUTIGER_NEUE_LT = '\"Frutiger Neue LT\"',\n FRUTIGER_NEUE_LT_PRO = '\"Frutiger Neue LT Pro\"',\n FUTURA = 'Futura',\n HELVETICA = 'Helvetica',\n HELVETICA_NEUE = '\"Helvetica Neue\"',\n MONOSPACED = 'Monospaced',\n MYRIAD_ARABIC = '\"Myriad Arabic\"',\n MYRIAD_HEBREW = '\"Myriad Hebrew\"',\n MYRIAD_PRO = '\"Myriad Pro\"',\n PT_MONO = '\"PT Mono\"',\n PT_SANS = '\"PT Sans\"',\n PT_SANS_CAPTION = '\"PT Sans Caption\"',\n PT_SANS_NARROW = '\"PT Sans Narrown\"',\n PT_SERIF = '\"PT Serif\"',\n PT_SERIF_CAPTION = '\"PT Serif Caption\"',\n RALEWAY = 'Raleway',\n ROBOTO = 'Roboto',\n ROBOTO_FLEX = '\"Roboto Flex\"',\n ROBOTO_CONDENSED = '\"Roboto Condensed\"',\n ROCKWELL = 'Rockwell',\n SANS_SERIF = 'sans-serif',\n SEGOE_UI = '\"Segoe UI\"',\n SEGOE_UI_EMOJI = '\"Segoe UI Emoji\"',\n SEGOE_UI_SYMBOL = '\"Segoe UI Symbol\"',\n SF_PRO = '\"SF Pro\"',\n SF_PRO_DISPLAY = '\"SF Pro Display\"',\n SF_PRO_TEXT = '\"SF Pro Text\"',\n SOURCE_SANS_PRO = '\"Source Sans Pro\"',\n TIMES_NEW_ROMAN = '\"Times New Roman\"',\n VERDANA = 'Verdana',\n}\n\nexport const buildFontFamilyList = (fontFamily = FontFamily.ROBOTO_FLEX) =>\n [\n fontFamily,\n FontFamily.APPLE_SYSTEM,\n FontFamily.BLINK_MAC_SYSTEM_FONT,\n FontFamily.SEGOE_UI,\n FontFamily.HELVETICA_NEUE,\n FontFamily.ARIAL,\n FontFamily.SANS_SERIF,\n FontFamily.APPLE_COLOR_EMOJI,\n FontFamily.SEGOE_UI_EMOJI,\n FontFamily.SEGOE_UI_SYMBOL,\n ].filter(Boolean)\n"],"names":["FontFamily","buildFontFamilyList","fontFamily","filter","Boolean"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,OAAO,IAAA,AAAKA,oCAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAAA;MAsDX;AAED,OAAO,MAAMC,sBAAsB,CAACC,4BAAmC,GACrE;QACEA;;;;;;;;;;KAUD,CAACC,MAAM,CAACC,SAAQ"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import type { ComponentType } from 'react';
|
|
18
|
+
import { type CreateEmotionCacheOptions, type EmotionCache } from '../../vendor/emotion';
|
|
19
|
+
export type InjectedEmotionCacheProps = {
|
|
20
|
+
emotionCache?: EmotionCache;
|
|
21
|
+
};
|
|
22
|
+
export type WithEmotionClientCacheOptions = {
|
|
23
|
+
emotionCache?: EmotionCache;
|
|
24
|
+
emotionCacheOptions?: CreateEmotionCacheOptions;
|
|
25
|
+
};
|
|
26
|
+
export declare function createWithEmotionClientCache(options: WithEmotionClientCacheOptions): <P>(WrappedComponent: ComponentType<P>) => {
|
|
27
|
+
(props: InjectedEmotionCacheProps & P): import("react").JSX.Element;
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
export default createWithEmotionClientCache;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2022 Aglyn LLC
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/ import { getDisplayName } from "@aglyn/shared-util-tools";
|
|
20
|
+
import { hoistNonReactStatics } from "@aglyn/shared-util-vendor";
|
|
21
|
+
import { CacheProvider, createEmotionCache } from "../../vendor/emotion.js";
|
|
22
|
+
export function createWithEmotionClientCache(options) {
|
|
23
|
+
const { emotionCache, emotionCacheOptions } = options;
|
|
24
|
+
const defaultEmotionCache = emotionCache || createEmotionCache(emotionCacheOptions);
|
|
25
|
+
return function withEmotionClientCache(WrappedComponent) {
|
|
26
|
+
const displayName = getDisplayName(WrappedComponent);
|
|
27
|
+
function WithEmotionClientCache(props) {
|
|
28
|
+
const { emotionCache } = props, rest = _object_without_properties_loose(props, [
|
|
29
|
+
"emotionCache"
|
|
30
|
+
]);
|
|
31
|
+
const cache = emotionCache || defaultEmotionCache;
|
|
32
|
+
return /*#__PURE__*/ _jsx(CacheProvider, {
|
|
33
|
+
value: cache,
|
|
34
|
+
children: /*#__PURE__*/ _jsx(WrappedComponent, _extends({}, rest))
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
WithEmotionClientCache.name = `WithEmotionClientCache(${displayName})`;
|
|
38
|
+
hoistNonReactStatics(WithEmotionClientCache, WrappedComponent);
|
|
39
|
+
return WithEmotionClientCache;
|
|
40
|
+
// return class WithEmotionStylesCacheClient extends Component<P &
|
|
41
|
+
// InjectedEmotionCacheProps> { public static displayName: string = displayName public static
|
|
42
|
+
// WrappedComponent: ComponentType<P> = WrappedComponent public static defaultEmotionCache:
|
|
43
|
+
// EmotionCache = defaultEmotionCache public injectedEmotionCache?: EmotionCache = null
|
|
44
|
+
// constructor(props) { super(props) this.injectedEmotionCache = props.emotionCache || null }
|
|
45
|
+
// public render() { const {emotionCache, ...rest} = this.props const cache = emotionCache ||
|
|
46
|
+
// WithEmotionStylesCacheClient.defaultEmotionCache const WrappedComponent =
|
|
47
|
+
// WithEmotionStylesCacheClient.WrappedComponent return ( <CacheProvider value={cache}>
|
|
48
|
+
// <WrappedComponent {...(rest as P)} /> </CacheProvider> ) } }
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export default createWithEmotionClientCache;
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=create-with-emotion-client-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/ui/theme/src/lib/hocs/create-with-emotion-client-cache.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getDisplayName } from '@aglyn/shared-util-tools'\nimport { hoistNonReactStatics } from '@aglyn/shared-util-vendor'\nimport type { ComponentType } from 'react'\nimport {\n CacheProvider,\n createEmotionCache,\n type CreateEmotionCacheOptions,\n type EmotionCache,\n} from '../../vendor/emotion'\n\nexport type InjectedEmotionCacheProps = {\n emotionCache?: EmotionCache\n}\n\nexport type WithEmotionClientCacheOptions = {\n emotionCache?: EmotionCache\n emotionCacheOptions?: CreateEmotionCacheOptions\n}\n\nexport function createWithEmotionClientCache(\n options: WithEmotionClientCacheOptions,\n) {\n const { emotionCache, emotionCacheOptions } = options\n const defaultEmotionCache =\n emotionCache || createEmotionCache(emotionCacheOptions)\n\n return function withEmotionClientCache<P>(\n WrappedComponent: ComponentType<P>,\n ) {\n const displayName = getDisplayName(WrappedComponent)\n\n function WithEmotionClientCache(props: InjectedEmotionCacheProps & P) {\n const { emotionCache, ...rest } = props\n const cache = emotionCache || defaultEmotionCache\n\n return (\n <CacheProvider value={cache}>\n <WrappedComponent {...(rest as P)} />\n </CacheProvider>\n )\n }\n WithEmotionClientCache.name = `WithEmotionClientCache(${displayName})`\n hoistNonReactStatics(WithEmotionClientCache, WrappedComponent)\n\n return WithEmotionClientCache\n\n // return class WithEmotionStylesCacheClient extends Component<P &\n // InjectedEmotionCacheProps> { public static displayName: string = displayName public static\n // WrappedComponent: ComponentType<P> = WrappedComponent public static defaultEmotionCache:\n // EmotionCache = defaultEmotionCache public injectedEmotionCache?: EmotionCache = null\n // constructor(props) { super(props) this.injectedEmotionCache = props.emotionCache || null }\n // public render() { const {emotionCache, ...rest} = this.props const cache = emotionCache ||\n // WithEmotionStylesCacheClient.defaultEmotionCache const WrappedComponent =\n // WithEmotionStylesCacheClient.WrappedComponent return ( <CacheProvider value={cache}>\n // <WrappedComponent {...(rest as P)} /> </CacheProvider> ) } }\n }\n}\nexport default createWithEmotionClientCache\n"],"names":["getDisplayName","hoistNonReactStatics","CacheProvider","createEmotionCache","createWithEmotionClientCache","options","emotionCache","emotionCacheOptions","defaultEmotionCache","withEmotionClientCache","WrappedComponent","displayName","WithEmotionClientCache","props","rest","cache","value","name"],"mappings":";;;AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,cAAc,QAAQ,2BAA0B;AACzD,SAASC,oBAAoB,QAAQ,4BAA2B;AAEhE,SACEC,aAAa,EACbC,kBAAkB,QAGb,0BAAsB;AAW7B,OAAO,SAASC,6BACdC,OAAsC;IAEtC,MAAM,EAAEC,YAAY,EAAEC,mBAAmB,EAAE,GAAGF;IAC9C,MAAMG,sBACJF,gBAAgBH,mBAAmBI;IAErC,OAAO,SAASE,uBACdC,gBAAkC;QAElC,MAAMC,cAAcX,eAAeU;QAEnC,SAASE,uBAAuBC,KAAoC;YAClE,MAAM,EAAEP,YAAY,EAAW,GAAGO,OAATC,wCAASD;;;YAClC,MAAME,QAAQT,gBAAgBE;YAE9B,qBACE,KAACN;gBAAcc,OAAOD;0BACpB,cAAA,KAACL,+BAAsBI;;QAG7B;QACAF,uBAAuBK,IAAI,GAAG,CAAC,uBAAuB,EAAEN,YAAY,CAAC,CAAC;QACtEV,qBAAqBW,wBAAwBF;QAE7C,OAAOE;IAEP,oEAAoE;IACpE,6FAA6F;IAC7F,2FAA2F;IAC3F,uFAAuF;IACvF,6FAA6F;IAC7F,6FAA6F;IAC7F,4EAA4E;IAC5E,wFAAwF;IACxF,+DAA+D;IACjE;AACF;AACA,eAAeR,6BAA4B"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { type SyntheticEvent } from 'react';
|
|
18
|
+
import { type Theme } from '../../vendor/mui';
|
|
19
|
+
export type ThemeMode = 'light' | 'dark' | 'system' | null;
|
|
20
|
+
export type ThemeModeType = 'user' | 'system';
|
|
21
|
+
export type ThemeModeResult = [ThemeModeType, ThemeMode];
|
|
22
|
+
export type UseThemeMode = [
|
|
23
|
+
mode: ThemeModeResult,
|
|
24
|
+
toggleThemeMode: (event: SyntheticEvent<any>, to?: ThemeMode) => void,
|
|
25
|
+
cookieMode: ThemeMode,
|
|
26
|
+
/**
|
|
27
|
+
* False when the surface renders light whatever the visitor asks for — a
|
|
28
|
+
* site whose theme has no authored dark scheme (AGL-1292). Absent means
|
|
29
|
+
* the surface can go dark; the console's own provider never sets it.
|
|
30
|
+
*/
|
|
31
|
+
canGoDark?: boolean
|
|
32
|
+
];
|
|
33
|
+
export declare const THEME_DISPLAY_NAME: Record<ThemeMode, string>;
|
|
34
|
+
export declare const getThemeModeDisplayName: (theme: ThemeMode) => string;
|
|
35
|
+
/**
|
|
36
|
+
* The cookie the visitor's choice is persisted in, spelled out as a type so
|
|
37
|
+
* the name has one definition across the browser reader here and the
|
|
38
|
+
* server-side one in `util/theme-mode-cookie`: the annotation fails to compile
|
|
39
|
+
* if the two ever name different cookies.
|
|
40
|
+
*/
|
|
41
|
+
export declare const COOKIE_THEME_KEY: 'theme-color-mode';
|
|
42
|
+
export declare const ThemeContextDispatch: import("react").Context<UseThemeMode>;
|
|
43
|
+
export declare function useThemeMode(): UseThemeMode;
|
|
44
|
+
/**
|
|
45
|
+
* The visitor's stored light/dark choice, and a setter that persists it.
|
|
46
|
+
*
|
|
47
|
+
* `initialMode` is the mode the surface's server render resolved from the
|
|
48
|
+
* request's cookies — `null` when the request carried no choice. Supplying it
|
|
49
|
+
* is what makes the FIRST render right: the state starts at the visitor's
|
|
50
|
+
* choice on the server and at the identical value through hydration, rather
|
|
51
|
+
* than starting empty and being corrected by the effect below once React has
|
|
52
|
+
* hydrated the whole page. Omit it on a surface that only ever renders in a
|
|
53
|
+
* browser, and the cookie is read directly.
|
|
54
|
+
*/
|
|
55
|
+
export declare function useCookieThemeMode(initialMode?: ThemeMode): [ThemeMode, (mode: ThemeMode) => void];
|
|
56
|
+
/**
|
|
57
|
+
* The resolved theme mode, in two layers with the visitor's own choice on top.
|
|
58
|
+
*
|
|
59
|
+
* An EXPLICIT choice comes from the cookie, which a server render can read
|
|
60
|
+
* from the request — pass it as `initialMode` and the surface paints that
|
|
61
|
+
* scheme in its first byte. It outranks the device: a visitor who asked for
|
|
62
|
+
* light gets light on a dark laptop, and the ordering below is the only thing
|
|
63
|
+
* that decides it, so the two layers are kept as separate inputs rather than
|
|
64
|
+
* collapsed into one seed by the caller.
|
|
65
|
+
*
|
|
66
|
+
* DEVICE DEFAULT is the other layer. `prefers-color-scheme` is a media
|
|
67
|
+
* feature, so a server has nothing to evaluate it against and `useMediaQuery`
|
|
68
|
+
* answers light for every server render. `initialDeviceMode` supplies that
|
|
69
|
+
* answer from the request instead — the `Sec-CH-Prefers-Color-Scheme` client
|
|
70
|
+
* hint, where the browser sends one.
|
|
71
|
+
*
|
|
72
|
+
* It is fed in as `defaultMatches` rather than substituted for the media query
|
|
73
|
+
* because that is the value React reads for BOTH the server render and the
|
|
74
|
+
* hydration render: `useMediaQuery` publishes `defaultMatches` as its server
|
|
75
|
+
* snapshot and only switches to the live `matchMedia` result once hydration is
|
|
76
|
+
* complete. Seeding any earlier layer instead leaves the media query answering
|
|
77
|
+
* light for the hydration commit, and the tree repaints light before the real
|
|
78
|
+
* snapshot arrives — the flash this exists to remove, moved one frame later.
|
|
79
|
+
*/
|
|
80
|
+
export declare function useThemeModeState(initialMode?: ThemeMode, initialDeviceMode?: ThemeMode): UseThemeMode;
|
|
81
|
+
export type WithThemeProviderOptions = {
|
|
82
|
+
theme: Theme | [lightTheme: Theme, darkTheme: Theme];
|
|
83
|
+
disableCssBaseline?: boolean;
|
|
84
|
+
};
|
|
85
|
+
export declare function createWithThemeProvider(options: WithThemeProviderOptions): <P>(WrappedComponent: JSX.ComponentType<P>) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<P> & import("react").RefAttributes<any>>;
|
|
86
|
+
export default createWithThemeProvider;
|