diff --git a/package.json b/package.json index 854012eb..c056b178 100644 --- a/package.json +++ b/package.json @@ -96,6 +96,7 @@ "packageManager": "pnpm@12.15.0", "dependencies": { "@fontsource-variable/geist": "^5.3.0", - "@fontsource-variable/geist-mono": "^5.3.0" + "@fontsource-variable/geist-mono": "^5.3.0", + "@hybr1d-tech/groudon": "^1.0.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d521801c..5a4d0ea3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -198,6 +198,9 @@ importers: '@fontsource-variable/geist-mono': specifier: ^5.3.0 version: 5.3.0 + '@hybr1d-tech/groudon': + specifier: ^1.0.0 + version: 1.0.0 '@popperjs/core': specifier: ^2.11.8 version: 2.11.8 @@ -702,6 +705,10 @@ packages: '@fontsource-variable/geist@5.3.0': resolution: {integrity: sha512-j0m+vLQuG5XAYoHtGCVu0spvlGreR3EzpECUVzkFmI1mTVnAO38l/NEPDCFgZ177JxzYJCLSmTQibIiYPilGrA==} + '@hybr1d-tech/groudon@1.0.0': + resolution: {integrity: sha512-xPdquf3qfyQaVix9Qan13kTa2CECDGjR2t7UmGTBxWjbYHUd7XpbbM5hBbpod4E3kBNzGAg0bw1C6+I7pOguyw==} + engines: {node: '>=24'} + '@jridgewell/gen-mapping@0.3.13': resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} @@ -3006,6 +3013,8 @@ snapshots: '@fontsource-variable/geist@5.3.0': {} + '@hybr1d-tech/groudon@1.0.0': {} + '@jridgewell/gen-mapping@0.3.13': dependencies: '@jridgewell/sourcemap-codec': 1.5.5 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index e8505dab..681f3f74 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -39,3 +39,4 @@ minimumReleaseAgeExclude: - '@rushstack/ts-command-line@5.3.13' - '@vitejs/plugin-react@6.1.0' - happy-dom@20.11.6 + - '@hybr1d-tech/groudon@1.0.0' diff --git a/src/components/styles/_typography.css b/src/components/styles/_typography.css deleted file mode 100644 index 842a23f7..00000000 --- a/src/components/styles/_typography.css +++ /dev/null @@ -1,179 +0,0 @@ -:root { - font-feature-settings: - 'clig' off, - 'liga' off; - font-family: var(--font-sans); - --letter-spacing: 0.2px; - - --line-height-142: 20px; - --line-height-145: 16px; - --line-height-150: 18px; - --line-height-166: 20px; - --line-height-171: 24px; - - --link-color: var(--link-l-50, #0f72ee); -} - -/* Hero Styles */ -.zap-hero-medium, -.zap-hero-semibold, -.zap-hero-bold { - font-size: 20px; - font-style: normal; - line-height: 28px; - letter-spacing: var(--letter-spacing); -} -.zap-hero-medium { - font-weight: 500; -} -.zap-hero-semibold { - font-weight: 600; -} -.zap-hero-bold { - font-weight: 700; -} - -/* Lead Styles */ -.zap-lead-medium, -.zap-lead-semibold, -.zap-lead-bold { - font-size: 18px; - font-style: normal; - line-height: 24px; - letter-spacing: var(--letter-spacing); -} -.zap-lead-medium { - font-weight: 500; -} -.zap-lead-semibold { - font-weight: 600; -} -.zap-lead-bold { - font-weight: 700; -} - -/* Heading Styles */ -.zap-heading-medium, -.zap-heading-semibold, -.zap-heading-bold { - font-size: 16px; - font-style: normal; - line-height: 20px; - letter-spacing: var(--letter-spacing); -} -.zap-heading-medium { - font-weight: 500; -} -.zap-heading-semibold { - font-weight: 600; -} -.zap-heading-bold { - font-weight: 700; -} - -/* Content Styles */ -.zap-content-regular, -.zap-content-medium, -.zap-content-semibold { - font-size: 14px; - font-style: normal; - line-height: var(--line-height-142); - letter-spacing: var(--letter-spacing); -} -.zap-content-regular { - font-weight: 400; -} -.zap-content-medium { - font-weight: 500; -} -.zap-content-semibold { - font-weight: 600; -} - -/* Sub Content Styles */ -.zap-subcontent-regular, -.zap-subcontent-medium, -.zap-subcontent-semibold { - font-size: 12px; - font-style: normal; - line-height: var(--line-height-150); - letter-spacing: var(--letter-spacing); -} -.zap-subcontent-regular { - font-weight: 400; -} -.zap-subcontent-medium { - font-weight: 500; -} -.zap-subcontent-semibold { - font-weight: 600; -} - -/* Caption Styles */ -.zap-caption-regular, -.zap-caption-medium, -.zap-caption-semibold { - font-size: 11px; - font-style: normal; - line-height: var(--line-height-145); -} -.zap-caption-regular { - font-weight: 400; -} -.zap-caption-medium { - font-weight: 500; -} -.zap-caption-semibold { - font-weight: 600; -} - -/* Button Styles */ -.zap-button { - font-size: 14px; - font-style: normal; - font-weight: 600; - line-height: var(--line-height-171); - letter-spacing: var(--letter-spacing); -} -.zap-button-small { - font-size: 12px !important; - font-style: normal !important; - font-weight: 600 !important; - line-height: var(--line-height-166) !important; - letter-spacing: var(--letter-spacing) !important; -} - -/* Link Styles */ -.zap-link, -.zap-link-small { - color: var(--link-color); - font-style: normal; - font-weight: 600; - text-decoration-line: underline; - letter-spacing: var(--letter-spacing); -} -.zap-link { - font-size: 14px; - line-height: var(--line-height-142); -} -.zap-link-small { - font-size: 12px; - line-height: var(--line-height-150); -} - -/* Internal Link Styles */ -.zap-internallink, -.zap-internallink-small { - color: var(--link-color); - font-style: normal; - font-weight: 500; - letter-spacing: var(--letter-spacing); -} -.zap-internallink { - font-size: 14px; - line-height: var(--line-height-142); -} -.zap-internallink-small { - font-size: 12px; - line-height: var(--line-height-150); -} diff --git a/src/components/styles/charizard.css b/src/components/styles/charizard.css index f103a3a8..e9402eac 100644 --- a/src/components/styles/charizard.css +++ b/src/components/styles/charizard.css @@ -3,7 +3,8 @@ (Separate JS imports get injected in unspecified order by libInjectCss.) */ @import '@fontsource-variable/geist'; @import '@fontsource-variable/geist-mono'; -@import './_typography.css'; +/* the type scale (tokens + zap-* classes) comes from groudon, the shared typography package */ +@import '@hybr1d-tech/groudon'; @import './_variables.css'; @import './global.css'; @import '../toasts/styles/main.css'; diff --git a/src/components/styles/global.css b/src/components/styles/global.css index ce98e9f9..0e1f50d2 100644 --- a/src/components/styles/global.css +++ b/src/components/styles/global.css @@ -100,6 +100,16 @@ h6 { appearance: none; } +/* Table filter chips rely on this beating their module styles; it was !important in the + library's old typography copy, which every app loaded, so keep that behaviour here. */ +.zap-button-small { + font-size: var(--zap-text-button-small-size) !important; + font-style: normal !important; + font-weight: var(--zap-weight-semibold) !important; + line-height: var(--zap-text-button-small-line-height) !important; + letter-spacing: var(--zap-letter-spacing) !important; +} + .zap-error-msg { font-weight: 400; font-size: 1rem;