@duro-app/tokens 0.3.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/themes/high-contrast.css.d.ts +1 -0
- package/dist/themes/high-contrast.css.d.ts.map +1 -1
- package/dist/themes/light.css.d.ts +1 -0
- package/dist/themes/light.css.d.ts.map +1 -1
- package/dist/tokens/colors.css.d.ts +1 -0
- package/dist/tokens/colors.css.d.ts.map +1 -1
- package/dist/tokens/typography.css.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/index.ts +11 -0
- package/src/themes/high-contrast.css.ts +39 -0
- package/src/themes/light.css.ts +39 -0
- package/src/tokens/colors.css.ts +46 -0
- package/src/tokens/layout-spacing.css.ts +21 -0
- package/src/tokens/shadows.css.ts +7 -0
- package/src/tokens/spacing.css.ts +19 -0
- package/src/tokens/type-presets.css.ts +111 -0
- package/src/tokens/typography.css.ts +52 -0
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ const e = {
|
|
|
22
22
|
warningBg: "var(--warningBg-xtnxqss)",
|
|
23
23
|
warningBorder: "var(--warningBorder-x1ev2mr5)",
|
|
24
24
|
warningText: "var(--warningText-x1lgjghx)",
|
|
25
|
+
info: "var(--info-x97ho0r)",
|
|
25
26
|
infoBg: "var(--infoBg-xho8jir)",
|
|
26
27
|
infoBorder: "var(--infoBorder-xnevk3x)",
|
|
27
28
|
infoText: "var(--infoText-x19pseus)",
|
|
@@ -217,13 +218,13 @@ const e = {
|
|
|
217
218
|
lg: "var(--lg-x1mxd62i)",
|
|
218
219
|
__varGroupHash__: "x13v825q"
|
|
219
220
|
}, x = {
|
|
220
|
-
xjvd03b: "
|
|
221
|
+
xjvd03b: "xrtwk39 xjvd03b",
|
|
221
222
|
$$css: !0
|
|
222
223
|
}, l = {
|
|
223
224
|
x13v825q: "xv9ibj0 x13v825q",
|
|
224
225
|
$$css: !0
|
|
225
226
|
}, g = {
|
|
226
|
-
xjvd03b: "
|
|
227
|
+
xjvd03b: "xaveibd xjvd03b",
|
|
227
228
|
$$css: !0
|
|
228
229
|
}, c = {
|
|
229
230
|
x13v825q: "x15e39jv x13v825q",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/tokens/colors.css.ts","../src/tokens/spacing.css.ts","../src/tokens/layout-spacing.css.ts","../src/tokens/typography.css.ts","../src/tokens/type-presets.css.ts","../src/tokens/shadows.css.ts","../src/themes/light.css.ts","../src/themes/high-contrast.css.ts"],"sourcesContent":["import {css} from 'react-strict-dom'\n\nexport const colors = css.defineVars({\n // Backgrounds\n bg: '#0f0f0f',\n bgCard: '#1a1a1a',\n bgCardHover: '#242424',\n\n // Text\n text: '#e5e5e5',\n textMuted: '#b0b0b0',\n\n // Accent\n accent: '#6aaffc',\n accentHover: '#93c5fd',\n accentContrast: '#000000',\n\n // Border\n border: '#333333',\n\n // Semantic — Error\n error: '#f87171',\n errorHover: '#fca5a5',\n errorBg: 'rgba(248, 113, 113, 0.1)',\n errorBorder: 'rgba(248, 113, 113, 0.3)',\n errorText: '#fca5a5',\n errorContrast: '#000000',\n\n // Semantic — Success\n success: '#22c55e',\n successBg: 'rgba(34, 197, 94, 0.1)',\n successBorder: 'rgba(34, 197, 94, 0.3)',\n successText: '#86efac',\n\n // Semantic — Warning\n warning: '#fbbf24',\n warningBg: 'rgba(251, 191, 36, 0.1)',\n warningBorder: 'rgba(251, 191, 36, 0.3)',\n warningText: '#fde68a',\n\n // Semantic — Info (uses accent)\n infoBg: 'rgba(106, 175, 252, 0.1)',\n infoBorder: 'rgba(106, 175, 252, 0.3)',\n infoText: '#93c5fd',\n})\n","import {css} from 'react-strict-dom'\n\nexport const spacing = css.defineVars({\n xs: '4px',\n sm: '8px',\n ms: '12px',\n md: '16px',\n lg: '24px',\n xl: '32px',\n xxl: '48px',\n xxxl: '64px',\n})\n\nexport const radii = css.defineVars({\n sm: '8px',\n md: '12px',\n lg: '16px',\n full: '9999px',\n})\n","import {css} from 'react-strict-dom'\n\nexport const layoutSpacing = css.defineVars({\n // Vertical rhythm (stack gaps)\n stackXs: '4px',\n stackSm: '8px',\n stackMd: '16px',\n stackLg: '24px',\n stackXl: '48px',\n\n // Horizontal rhythm (inline gaps)\n inlineXs: '4px',\n inlineSm: '8px',\n inlineMd: '16px',\n inlineLg: '24px',\n\n // Container insets\n containerSm: '16px',\n containerMd: '24px',\n containerLg: '32px',\n})\n","import {css} from 'react-strict-dom'\n\nexport const typography = css.defineVars({\n fontFamily:\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif',\n fontFamilyMono:\n '\"SF Mono\", \"Fira Code\", \"Fira Mono\", \"Roboto Mono\", \"Courier New\", monospace',\n fontSizeXs: '0.75rem',\n fontSizeSm: '0.875rem',\n fontSizeMd: '1rem',\n fontSizeLg: '1.125rem',\n fontSizeXl: '1.25rem',\n fontSizeHeading: '1.5rem',\n fontWeightNormal: '400',\n fontWeightMedium: '500',\n fontWeightSemibold: '600',\n fontWeightBold: '700',\n lineHeight: '1.5',\n})\n\nexport const typeScale = css.defineVars({\n // 9-step font size scale\n fontSize1: '0.75rem', // 12px — captions, badges\n fontSize2: '0.8125rem', // 13px — small UI\n fontSize3: '0.875rem', // 14px — default UI (buttons, inputs)\n fontSize4: '1rem', // 16px — body text\n fontSize5: '1.125rem', // 18px — body-lg\n fontSize6: '1.25rem', // 20px — subheading\n fontSize7: '1.5rem', // 24px — heading-sm\n fontSize8: '1.875rem', // 30px — heading-md\n fontSize9: '2.25rem', // 36px — heading-lg\n\n // Matched line-heights\n lineHeight1: '1rem', // 16px\n lineHeight2: '1.25rem', // 20px\n lineHeight3: '1.25rem', // 20px\n lineHeight4: '1.5rem', // 24px\n lineHeight5: '1.5rem', // 24px\n lineHeight6: '1.75rem', // 28px\n lineHeight7: '2rem', // 32px\n lineHeight8: '2.25rem', // 36px\n lineHeight9: '2.75rem', // 44px\n\n // Fluid display sizes\n displaySm: 'clamp(2.25rem, 1.5rem + 2vw, 3rem)', // 36–48px\n displayMd: 'clamp(2.75rem, 1.75rem + 2.5vw, 3.75rem)', // 44–60px\n displayLg: 'clamp(3.5rem, 2rem + 3.5vw, 4.5rem)', // 56–72px\n\n // Letter-spacing\n letterSpacingTight: '-0.02em',\n letterSpacingNormal: '0',\n letterSpacingWide: '0.04em',\n})\n","import {css} from 'react-strict-dom'\nimport {typography, typeScale} from './typography.css'\n\nexport const typePresets = css.create({\n // Body\n bodySm: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize3,\n lineHeight: typeScale.lineHeight3,\n fontWeight: typography.fontWeightNormal,\n letterSpacing: typeScale.letterSpacingNormal,\n },\n bodyMd: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize4,\n lineHeight: typeScale.lineHeight4,\n fontWeight: typography.fontWeightNormal,\n letterSpacing: typeScale.letterSpacingNormal,\n },\n bodyLg: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize5,\n lineHeight: typeScale.lineHeight5,\n fontWeight: typography.fontWeightNormal,\n letterSpacing: typeScale.letterSpacingNormal,\n },\n\n // UI\n caption: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize1,\n lineHeight: typeScale.lineHeight1,\n fontWeight: typography.fontWeightNormal,\n letterSpacing: typeScale.letterSpacingWide,\n },\n label: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize3,\n lineHeight: typeScale.lineHeight3,\n fontWeight: typography.fontWeightMedium,\n letterSpacing: typeScale.letterSpacingNormal,\n },\n code: {\n fontFamily: typography.fontFamilyMono,\n fontSize: typeScale.fontSize3,\n lineHeight: typeScale.lineHeight3,\n fontWeight: typography.fontWeightNormal,\n letterSpacing: typeScale.letterSpacingNormal,\n },\n overline: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize1,\n lineHeight: typeScale.lineHeight1,\n fontWeight: typography.fontWeightSemibold,\n letterSpacing: typeScale.letterSpacingWide,\n textTransform: 'uppercase' as const,\n },\n\n // Heading\n headingSm: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize6,\n lineHeight: typeScale.lineHeight6,\n fontWeight: typography.fontWeightSemibold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n headingMd: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize7,\n lineHeight: typeScale.lineHeight7,\n fontWeight: typography.fontWeightSemibold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n headingLg: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize8,\n lineHeight: typeScale.lineHeight8,\n fontWeight: typography.fontWeightBold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n headingXl: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize9,\n lineHeight: typeScale.lineHeight9,\n fontWeight: typography.fontWeightBold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n\n // Display (fluid)\n displaySm: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.displaySm,\n lineHeight: 1.2,\n fontWeight: typography.fontWeightBold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n displayMd: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.displayMd,\n lineHeight: 1.15,\n fontWeight: typography.fontWeightBold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n displayLg: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.displayLg,\n lineHeight: 1.1,\n fontWeight: typography.fontWeightBold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n})\n","import {css} from 'react-strict-dom'\n\nexport const shadows = css.defineVars({\n sm: '0 2px 4px rgba(0, 0, 0, 0.3)',\n md: '0 4px 12px rgba(0, 0, 0, 0.4)',\n lg: '0 8px 24px rgba(0, 0, 0, 0.5)',\n})\n","import {css} from 'react-strict-dom'\nimport {colors} from '../tokens/colors.css'\nimport {shadows} from '../tokens/shadows.css'\n\nexport const lightTheme = css.createTheme(colors, {\n bg: '#ffffff',\n bgCard: '#f5f5f5',\n bgCardHover: '#ebebeb',\n text: '#1a1a1a',\n textMuted: '#4a4a4a',\n accent: '#1e40af',\n accentHover: '#1a3799',\n accentContrast: '#ffffff',\n border: '#d4d4d4',\n error: '#991b1b',\n errorHover: '#7f1d1d',\n errorBg: 'rgba(153, 27, 27, 0.08)',\n errorBorder: 'rgba(153, 27, 27, 0.3)',\n errorText: '#7f1d1d',\n errorContrast: '#ffffff',\n success: '#166534',\n successBg: 'rgba(22, 101, 52, 0.08)',\n successBorder: 'rgba(22, 101, 52, 0.3)',\n successText: '#14532d',\n warning: '#92400e',\n warningBg: 'rgba(146, 64, 14, 0.08)',\n warningBorder: 'rgba(146, 64, 14, 0.3)',\n warningText: '#78350f',\n infoBg: 'rgba(30, 64, 175, 0.08)',\n infoBorder: 'rgba(30, 64, 175, 0.3)',\n infoText: '#1e40af',\n})\n\nexport const lightShadows = css.createTheme(shadows, {\n sm: '0 2px 4px rgba(0, 0, 0, 0.08)',\n md: '0 4px 12px rgba(0, 0, 0, 0.12)',\n lg: '0 8px 24px rgba(0, 0, 0, 0.16)',\n})\n","import {css} from 'react-strict-dom'\nimport {colors} from '../tokens/colors.css'\nimport {shadows} from '../tokens/shadows.css'\n\nexport const highContrastTheme = css.createTheme(colors, {\n bg: '#000000',\n bgCard: '#111111',\n bgCardHover: '#1a1a1a',\n text: '#ffffff',\n textMuted: '#b0b0b0',\n accent: '#60a5fa',\n accentHover: '#93c5fd',\n accentContrast: '#000000',\n border: '#555555',\n error: '#f87171',\n errorHover: '#fca5a5',\n errorBg: 'rgba(248, 113, 113, 0.15)',\n errorBorder: 'rgba(248, 113, 113, 0.5)',\n errorText: '#fca5a5',\n errorContrast: '#000000',\n success: '#4ade80',\n successBg: 'rgba(74, 222, 128, 0.15)',\n successBorder: 'rgba(74, 222, 128, 0.5)',\n successText: '#86efac',\n warning: '#fcd34d',\n warningBg: 'rgba(252, 211, 77, 0.15)',\n warningBorder: 'rgba(252, 211, 77, 0.5)',\n warningText: '#fef08a',\n infoBg: 'rgba(96, 165, 250, 0.15)',\n infoBorder: 'rgba(96, 165, 250, 0.5)',\n infoText: '#bfdbfe',\n})\n\nexport const highContrastShadows = css.createTheme(shadows, {\n sm: '0 2px 4px rgba(0, 0, 0, 0.6)',\n md: '0 4px 12px rgba(0, 0, 0, 0.7)',\n lg: '0 8px 24px rgba(0, 0, 0, 0.8)',\n})\n"],"names":["colors","spacing","radii","layoutSpacing","typography","typeScale","typePresets","shadows","lightTheme","lightShadows","highContrastTheme","highContrastShadows"],"mappings":"AAEO,MAAMA,IAAS;AAAA,EACpB,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,MAAM;AAAA,EACN,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,aAAa;AAAA,EACb,WAAW;AAAA,EACX,eAAe;AAAA,EACf,SAAS;AAAA,EACT,WAAW;AAAA,EACX,eAAe;AAAA,EACf,aAAa;AAAA,EACb,SAAS;AAAA,EACT,WAAW;AAAA,EACX,eAAe;AAAA,EACf,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,kBAAkB;AACpB,GC5BaC,IAAU;AAAA,EACrB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,MAAM;AAAA,EACN,kBAAkB;AACpB,GACaC,IAAQ;AAAA,EACnB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,kBAAkB;AACpB,GCjBaC,IAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAA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,IACT,qBAAqB;AAAA,IACrB,mBAAmB;AAAA,IACnB,qBAAqB;AAAA,IACrB,qBAAqB;AAAA,IACrB,wBAAwB;AAAA,IACxB,OAAO;AAAA,EAAA;AAAA,EAET,WAAW;AAAA,IACT,qBAAqB;AAAA,IACrB,mBAAmB;AAAA,IACnB,qBAAqB;AAAA,IACrB,qBAAqB;AAAA,IACrB,wBAAwB;AAAA,IACxB,OAAO;AAAA,EAAA;AAAA,EAET,WAAW;AAAA,IACT,qBAAqB;AAAA,IACrB,mBAAmB;AAAA,IACnB,qBAAqB;AAAA,IACrB,qBAAqB;AAAA,IACrB,wBAAwB;AAAA,IACxB,OAAO;AAAA,EAAA;AAAA,EAET,WAAW;AAAA,IACT,qBAAqB;AAAA,IACrB,mBAAmB;AAAA,IACnB,qBAAqB;AAAA,IACrB,qBAAqB;AAAA,IACrB,wBAAwB;AAAA,IACxB,OAAO;AAAA,EAAA;AAEX,GCnHaC,IAAU;AAAA,EACrB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,kBAAkB;AACpB,GCHaC,IAAa;AAAA,EACxB,SAAS;AAAA,EACT,OAAO;AACT,GACaC,IAAe;AAAA,EAC1B,UAAU;AAAA,EACV,OAAO;AACT,GCPaC,IAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,OAAO;AACT,GACaC,IAAsB;AAAA,EACjC,UAAU;AAAA,EACV,OAAO;AACT;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/tokens/colors.css.ts","../src/tokens/spacing.css.ts","../src/tokens/layout-spacing.css.ts","../src/tokens/typography.css.ts","../src/tokens/type-presets.css.ts","../src/tokens/shadows.css.ts","../src/themes/light.css.ts","../src/themes/high-contrast.css.ts"],"sourcesContent":["import {css} from 'react-strict-dom'\n\nexport const colors = css.defineVars({\n // Backgrounds\n bg: '#0f0f0f',\n bgCard: '#1a1a1a',\n bgCardHover: '#242424',\n\n // Text\n text: '#e5e5e5',\n textMuted: '#b0b0b0',\n\n // Accent\n accent: '#6aaffc',\n accentHover: '#93c5fd',\n accentContrast: '#000000',\n\n // Border\n border: '#333333',\n\n // Semantic — Error\n error: '#f87171',\n errorHover: '#fca5a5',\n errorBg: 'rgba(248, 113, 113, 0.1)',\n errorBorder: 'rgba(248, 113, 113, 0.3)',\n errorText: '#fca5a5',\n errorContrast: '#000000',\n\n // Semantic — Success\n success: '#22c55e',\n successBg: 'rgba(34, 197, 94, 0.1)',\n successBorder: 'rgba(34, 197, 94, 0.3)',\n successText: '#86efac',\n\n // Semantic — Warning\n warning: '#fbbf24',\n warningBg: 'rgba(251, 191, 36, 0.1)',\n warningBorder: 'rgba(251, 191, 36, 0.3)',\n warningText: '#fde68a',\n\n // Semantic — Info (uses accent)\n info: '#6aaffc',\n infoBg: 'rgba(106, 175, 252, 0.1)',\n infoBorder: 'rgba(106, 175, 252, 0.3)',\n infoText: '#93c5fd',\n})\n","import {css} from 'react-strict-dom'\n\nexport const spacing = css.defineVars({\n xs: '4px',\n sm: '8px',\n ms: '12px',\n md: '16px',\n lg: '24px',\n xl: '32px',\n xxl: '48px',\n xxxl: '64px',\n})\n\nexport const radii = css.defineVars({\n sm: '8px',\n md: '12px',\n lg: '16px',\n full: '9999px',\n})\n","import {css} from 'react-strict-dom'\n\nexport const layoutSpacing = css.defineVars({\n // Vertical rhythm (stack gaps)\n stackXs: '4px',\n stackSm: '8px',\n stackMd: '16px',\n stackLg: '24px',\n stackXl: '48px',\n\n // Horizontal rhythm (inline gaps)\n inlineXs: '4px',\n inlineSm: '8px',\n inlineMd: '16px',\n inlineLg: '24px',\n\n // Container insets\n containerSm: '16px',\n containerMd: '24px',\n containerLg: '32px',\n})\n","import {css} from 'react-strict-dom'\n\nexport const typography = css.defineVars({\n fontFamily:\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif',\n fontFamilyMono: '\"SF Mono\", \"Fira Code\", \"Fira Mono\", \"Roboto Mono\", \"Courier New\", monospace',\n fontSizeXs: '0.75rem',\n fontSizeSm: '0.875rem',\n fontSizeMd: '1rem',\n fontSizeLg: '1.125rem',\n fontSizeXl: '1.25rem',\n fontSizeHeading: '1.5rem',\n fontWeightNormal: '400',\n fontWeightMedium: '500',\n fontWeightSemibold: '600',\n fontWeightBold: '700',\n lineHeight: '1.5',\n})\n\nexport const typeScale = css.defineVars({\n // 9-step font size scale\n fontSize1: '0.75rem', // 12px — captions, badges\n fontSize2: '0.8125rem', // 13px — small UI\n fontSize3: '0.875rem', // 14px — default UI (buttons, inputs)\n fontSize4: '1rem', // 16px — body text\n fontSize5: '1.125rem', // 18px — body-lg\n fontSize6: '1.25rem', // 20px — subheading\n fontSize7: '1.5rem', // 24px — heading-sm\n fontSize8: '1.875rem', // 30px — heading-md\n fontSize9: '2.25rem', // 36px — heading-lg\n\n // Matched line-heights\n lineHeight1: '1rem', // 16px\n lineHeight2: '1.25rem', // 20px\n lineHeight3: '1.25rem', // 20px\n lineHeight4: '1.5rem', // 24px\n lineHeight5: '1.5rem', // 24px\n lineHeight6: '1.75rem', // 28px\n lineHeight7: '2rem', // 32px\n lineHeight8: '2.25rem', // 36px\n lineHeight9: '2.75rem', // 44px\n\n // Fluid display sizes\n displaySm: 'clamp(2.25rem, 1.5rem + 2vw, 3rem)', // 36–48px\n displayMd: 'clamp(2.75rem, 1.75rem + 2.5vw, 3.75rem)', // 44–60px\n displayLg: 'clamp(3.5rem, 2rem + 3.5vw, 4.5rem)', // 56–72px\n\n // Letter-spacing\n letterSpacingTight: '-0.02em',\n letterSpacingNormal: '0',\n letterSpacingWide: '0.04em',\n})\n","import {css} from 'react-strict-dom'\nimport {typography, typeScale} from './typography.css'\n\nexport const typePresets = css.create({\n // Body\n bodySm: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize3,\n lineHeight: typeScale.lineHeight3,\n fontWeight: typography.fontWeightNormal,\n letterSpacing: typeScale.letterSpacingNormal,\n },\n bodyMd: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize4,\n lineHeight: typeScale.lineHeight4,\n fontWeight: typography.fontWeightNormal,\n letterSpacing: typeScale.letterSpacingNormal,\n },\n bodyLg: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize5,\n lineHeight: typeScale.lineHeight5,\n fontWeight: typography.fontWeightNormal,\n letterSpacing: typeScale.letterSpacingNormal,\n },\n\n // UI\n caption: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize1,\n lineHeight: typeScale.lineHeight1,\n fontWeight: typography.fontWeightNormal,\n letterSpacing: typeScale.letterSpacingWide,\n },\n label: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize3,\n lineHeight: typeScale.lineHeight3,\n fontWeight: typography.fontWeightMedium,\n letterSpacing: typeScale.letterSpacingNormal,\n },\n code: {\n fontFamily: typography.fontFamilyMono,\n fontSize: typeScale.fontSize3,\n lineHeight: typeScale.lineHeight3,\n fontWeight: typography.fontWeightNormal,\n letterSpacing: typeScale.letterSpacingNormal,\n },\n overline: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize1,\n lineHeight: typeScale.lineHeight1,\n fontWeight: typography.fontWeightSemibold,\n letterSpacing: typeScale.letterSpacingWide,\n textTransform: 'uppercase' as const,\n },\n\n // Heading\n headingSm: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize6,\n lineHeight: typeScale.lineHeight6,\n fontWeight: typography.fontWeightSemibold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n headingMd: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize7,\n lineHeight: typeScale.lineHeight7,\n fontWeight: typography.fontWeightSemibold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n headingLg: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize8,\n lineHeight: typeScale.lineHeight8,\n fontWeight: typography.fontWeightBold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n headingXl: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.fontSize9,\n lineHeight: typeScale.lineHeight9,\n fontWeight: typography.fontWeightBold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n\n // Display (fluid)\n displaySm: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.displaySm,\n lineHeight: 1.2,\n fontWeight: typography.fontWeightBold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n displayMd: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.displayMd,\n lineHeight: 1.15,\n fontWeight: typography.fontWeightBold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n displayLg: {\n fontFamily: typography.fontFamily,\n fontSize: typeScale.displayLg,\n lineHeight: 1.1,\n fontWeight: typography.fontWeightBold,\n letterSpacing: typeScale.letterSpacingTight,\n },\n})\n","import {css} from 'react-strict-dom'\n\nexport const shadows = css.defineVars({\n sm: '0 2px 4px rgba(0, 0, 0, 0.3)',\n md: '0 4px 12px rgba(0, 0, 0, 0.4)',\n lg: '0 8px 24px rgba(0, 0, 0, 0.5)',\n})\n","import {css} from 'react-strict-dom'\nimport {colors} from '../tokens/colors.css'\nimport {shadows} from '../tokens/shadows.css'\n\nexport const lightTheme = css.createTheme(colors, {\n bg: '#ffffff',\n bgCard: '#f5f5f5',\n bgCardHover: '#ebebeb',\n text: '#1a1a1a',\n textMuted: '#4a4a4a',\n accent: '#1e40af',\n accentHover: '#1a3799',\n accentContrast: '#ffffff',\n border: '#d4d4d4',\n error: '#991b1b',\n errorHover: '#7f1d1d',\n errorBg: 'rgba(153, 27, 27, 0.08)',\n errorBorder: 'rgba(153, 27, 27, 0.3)',\n errorText: '#7f1d1d',\n errorContrast: '#ffffff',\n success: '#166534',\n successBg: 'rgba(22, 101, 52, 0.08)',\n successBorder: 'rgba(22, 101, 52, 0.3)',\n successText: '#14532d',\n warning: '#92400e',\n warningBg: 'rgba(146, 64, 14, 0.08)',\n warningBorder: 'rgba(146, 64, 14, 0.3)',\n warningText: '#78350f',\n info: '#1e40af',\n infoBg: 'rgba(30, 64, 175, 0.08)',\n infoBorder: 'rgba(30, 64, 175, 0.3)',\n infoText: '#1e40af',\n})\n\nexport const lightShadows = css.createTheme(shadows, {\n sm: '0 2px 4px rgba(0, 0, 0, 0.08)',\n md: '0 4px 12px rgba(0, 0, 0, 0.12)',\n lg: '0 8px 24px rgba(0, 0, 0, 0.16)',\n})\n","import {css} from 'react-strict-dom'\nimport {colors} from '../tokens/colors.css'\nimport {shadows} from '../tokens/shadows.css'\n\nexport const highContrastTheme = css.createTheme(colors, {\n bg: '#000000',\n bgCard: '#111111',\n bgCardHover: '#1a1a1a',\n text: '#ffffff',\n textMuted: '#b0b0b0',\n accent: '#60a5fa',\n accentHover: '#93c5fd',\n accentContrast: '#000000',\n border: '#555555',\n error: '#f87171',\n errorHover: '#fca5a5',\n errorBg: 'rgba(248, 113, 113, 0.15)',\n errorBorder: 'rgba(248, 113, 113, 0.5)',\n errorText: '#fca5a5',\n errorContrast: '#000000',\n success: '#4ade80',\n successBg: 'rgba(74, 222, 128, 0.15)',\n successBorder: 'rgba(74, 222, 128, 0.5)',\n successText: '#86efac',\n warning: '#fcd34d',\n warningBg: 'rgba(252, 211, 77, 0.15)',\n warningBorder: 'rgba(252, 211, 77, 0.5)',\n warningText: '#fef08a',\n info: '#60a5fa',\n infoBg: 'rgba(96, 165, 250, 0.15)',\n infoBorder: 'rgba(96, 165, 250, 0.5)',\n infoText: '#bfdbfe',\n})\n\nexport const highContrastShadows = css.createTheme(shadows, {\n sm: '0 2px 4px rgba(0, 0, 0, 0.6)',\n md: '0 4px 12px rgba(0, 0, 0, 0.7)',\n lg: '0 8px 24px rgba(0, 0, 0, 0.8)',\n})\n"],"names":["colors","spacing","radii","layoutSpacing","typography","typeScale","typePresets","shadows","lightTheme","lightShadows","highContrastTheme","highContrastShadows"],"mappings":"AAEO,MAAMA,IAAS;AAAA,EACpB,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,MAAM;AAAA,EACN,WAAW;AAAA,EACX,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;AAAA,IACnB,qBAAqB;AAAA,IACrB,qBAAqB;AAAA,IACrB,wBAAwB;AAAA,IACxB,OAAO;AAAA,EAAA;AAEX,GCnHaC,IAAU;AAAA,EACrB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,kBAAkB;AACpB,GCHaC,IAAa;AAAA,EACxB,SAAS;AAAA,EACT,OAAO;AACT,GACaC,IAAe;AAAA,EAC1B,UAAU;AAAA,EACV,OAAO;AACT,GCPaC,IAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,OAAO;AACT,GACaC,IAAsB;AAAA,EACjC,UAAU;AAAA,EACV,OAAO;AACT;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"high-contrast.css.d.ts","sourceRoot":"","sources":["../../src/themes/high-contrast.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAIpC,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"high-contrast.css.d.ts","sourceRoot":"","sources":["../../src/themes/high-contrast.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAIpC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA4B5B,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;oBAI9B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"light.css.d.ts","sourceRoot":"","sources":["../../src/themes/light.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAIpC,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"light.css.d.ts","sourceRoot":"","sources":["../../src/themes/light.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAIpC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA4BrB,CAAA;AAEF,eAAO,MAAM,YAAY;;;;oBAIvB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.css.d.ts","sourceRoot":"","sources":["../../src/tokens/colors.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAEpC,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"colors.css.d.ts","sourceRoot":"","sources":["../../src/tokens/colors.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAEpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA2CjB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.css.d.ts","sourceRoot":"","sources":["../../src/tokens/typography.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAEpC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"typography.css.d.ts","sourceRoot":"","sources":["../../src/tokens/typography.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAEpC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;WAerB,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;WAgCpB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duro-app/tokens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -16,13 +16,15 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
|
-
"dist"
|
|
19
|
+
"dist",
|
|
20
|
+
"src"
|
|
20
21
|
],
|
|
21
22
|
"main": "dist/index.js",
|
|
22
23
|
"module": "dist/index.js",
|
|
23
24
|
"types": "dist/index.d.ts",
|
|
24
25
|
"exports": {
|
|
25
26
|
".": {
|
|
27
|
+
"source": "./src/index.ts",
|
|
26
28
|
"import": "./dist/index.js",
|
|
27
29
|
"types": "./dist/index.d.ts",
|
|
28
30
|
"default": "./dist/index.js"
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Tokens
|
|
2
|
+
export {colors} from './tokens/colors.css'
|
|
3
|
+
export {spacing, radii} from './tokens/spacing.css'
|
|
4
|
+
export {layoutSpacing} from './tokens/layout-spacing.css'
|
|
5
|
+
export {typography, typeScale} from './tokens/typography.css'
|
|
6
|
+
export {typePresets} from './tokens/type-presets.css'
|
|
7
|
+
export {shadows} from './tokens/shadows.css'
|
|
8
|
+
|
|
9
|
+
// Themes
|
|
10
|
+
export {lightTheme, lightShadows} from './themes/light.css'
|
|
11
|
+
export {highContrastTheme, highContrastShadows} from './themes/high-contrast.css'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {css} from 'react-strict-dom'
|
|
2
|
+
import {colors} from '../tokens/colors.css'
|
|
3
|
+
import {shadows} from '../tokens/shadows.css'
|
|
4
|
+
|
|
5
|
+
export const highContrastTheme = css.createTheme(colors, {
|
|
6
|
+
bg: '#000000',
|
|
7
|
+
bgCard: '#111111',
|
|
8
|
+
bgCardHover: '#1a1a1a',
|
|
9
|
+
text: '#ffffff',
|
|
10
|
+
textMuted: '#b0b0b0',
|
|
11
|
+
accent: '#60a5fa',
|
|
12
|
+
accentHover: '#93c5fd',
|
|
13
|
+
accentContrast: '#000000',
|
|
14
|
+
border: '#555555',
|
|
15
|
+
error: '#f87171',
|
|
16
|
+
errorHover: '#fca5a5',
|
|
17
|
+
errorBg: 'rgba(248, 113, 113, 0.15)',
|
|
18
|
+
errorBorder: 'rgba(248, 113, 113, 0.5)',
|
|
19
|
+
errorText: '#fca5a5',
|
|
20
|
+
errorContrast: '#000000',
|
|
21
|
+
success: '#4ade80',
|
|
22
|
+
successBg: 'rgba(74, 222, 128, 0.15)',
|
|
23
|
+
successBorder: 'rgba(74, 222, 128, 0.5)',
|
|
24
|
+
successText: '#86efac',
|
|
25
|
+
warning: '#fcd34d',
|
|
26
|
+
warningBg: 'rgba(252, 211, 77, 0.15)',
|
|
27
|
+
warningBorder: 'rgba(252, 211, 77, 0.5)',
|
|
28
|
+
warningText: '#fef08a',
|
|
29
|
+
info: '#60a5fa',
|
|
30
|
+
infoBg: 'rgba(96, 165, 250, 0.15)',
|
|
31
|
+
infoBorder: 'rgba(96, 165, 250, 0.5)',
|
|
32
|
+
infoText: '#bfdbfe',
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
export const highContrastShadows = css.createTheme(shadows, {
|
|
36
|
+
sm: '0 2px 4px rgba(0, 0, 0, 0.6)',
|
|
37
|
+
md: '0 4px 12px rgba(0, 0, 0, 0.7)',
|
|
38
|
+
lg: '0 8px 24px rgba(0, 0, 0, 0.8)',
|
|
39
|
+
})
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {css} from 'react-strict-dom'
|
|
2
|
+
import {colors} from '../tokens/colors.css'
|
|
3
|
+
import {shadows} from '../tokens/shadows.css'
|
|
4
|
+
|
|
5
|
+
export const lightTheme = css.createTheme(colors, {
|
|
6
|
+
bg: '#ffffff',
|
|
7
|
+
bgCard: '#f5f5f5',
|
|
8
|
+
bgCardHover: '#ebebeb',
|
|
9
|
+
text: '#1a1a1a',
|
|
10
|
+
textMuted: '#4a4a4a',
|
|
11
|
+
accent: '#1e40af',
|
|
12
|
+
accentHover: '#1a3799',
|
|
13
|
+
accentContrast: '#ffffff',
|
|
14
|
+
border: '#d4d4d4',
|
|
15
|
+
error: '#991b1b',
|
|
16
|
+
errorHover: '#7f1d1d',
|
|
17
|
+
errorBg: 'rgba(153, 27, 27, 0.08)',
|
|
18
|
+
errorBorder: 'rgba(153, 27, 27, 0.3)',
|
|
19
|
+
errorText: '#7f1d1d',
|
|
20
|
+
errorContrast: '#ffffff',
|
|
21
|
+
success: '#166534',
|
|
22
|
+
successBg: 'rgba(22, 101, 52, 0.08)',
|
|
23
|
+
successBorder: 'rgba(22, 101, 52, 0.3)',
|
|
24
|
+
successText: '#14532d',
|
|
25
|
+
warning: '#92400e',
|
|
26
|
+
warningBg: 'rgba(146, 64, 14, 0.08)',
|
|
27
|
+
warningBorder: 'rgba(146, 64, 14, 0.3)',
|
|
28
|
+
warningText: '#78350f',
|
|
29
|
+
info: '#1e40af',
|
|
30
|
+
infoBg: 'rgba(30, 64, 175, 0.08)',
|
|
31
|
+
infoBorder: 'rgba(30, 64, 175, 0.3)',
|
|
32
|
+
infoText: '#1e40af',
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
export const lightShadows = css.createTheme(shadows, {
|
|
36
|
+
sm: '0 2px 4px rgba(0, 0, 0, 0.08)',
|
|
37
|
+
md: '0 4px 12px rgba(0, 0, 0, 0.12)',
|
|
38
|
+
lg: '0 8px 24px rgba(0, 0, 0, 0.16)',
|
|
39
|
+
})
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {css} from 'react-strict-dom'
|
|
2
|
+
|
|
3
|
+
export const colors = css.defineVars({
|
|
4
|
+
// Backgrounds
|
|
5
|
+
bg: '#0f0f0f',
|
|
6
|
+
bgCard: '#1a1a1a',
|
|
7
|
+
bgCardHover: '#242424',
|
|
8
|
+
|
|
9
|
+
// Text
|
|
10
|
+
text: '#e5e5e5',
|
|
11
|
+
textMuted: '#b0b0b0',
|
|
12
|
+
|
|
13
|
+
// Accent
|
|
14
|
+
accent: '#6aaffc',
|
|
15
|
+
accentHover: '#93c5fd',
|
|
16
|
+
accentContrast: '#000000',
|
|
17
|
+
|
|
18
|
+
// Border
|
|
19
|
+
border: '#333333',
|
|
20
|
+
|
|
21
|
+
// Semantic — Error
|
|
22
|
+
error: '#f87171',
|
|
23
|
+
errorHover: '#fca5a5',
|
|
24
|
+
errorBg: 'rgba(248, 113, 113, 0.1)',
|
|
25
|
+
errorBorder: 'rgba(248, 113, 113, 0.3)',
|
|
26
|
+
errorText: '#fca5a5',
|
|
27
|
+
errorContrast: '#000000',
|
|
28
|
+
|
|
29
|
+
// Semantic — Success
|
|
30
|
+
success: '#22c55e',
|
|
31
|
+
successBg: 'rgba(34, 197, 94, 0.1)',
|
|
32
|
+
successBorder: 'rgba(34, 197, 94, 0.3)',
|
|
33
|
+
successText: '#86efac',
|
|
34
|
+
|
|
35
|
+
// Semantic — Warning
|
|
36
|
+
warning: '#fbbf24',
|
|
37
|
+
warningBg: 'rgba(251, 191, 36, 0.1)',
|
|
38
|
+
warningBorder: 'rgba(251, 191, 36, 0.3)',
|
|
39
|
+
warningText: '#fde68a',
|
|
40
|
+
|
|
41
|
+
// Semantic — Info (uses accent)
|
|
42
|
+
info: '#6aaffc',
|
|
43
|
+
infoBg: 'rgba(106, 175, 252, 0.1)',
|
|
44
|
+
infoBorder: 'rgba(106, 175, 252, 0.3)',
|
|
45
|
+
infoText: '#93c5fd',
|
|
46
|
+
})
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {css} from 'react-strict-dom'
|
|
2
|
+
|
|
3
|
+
export const layoutSpacing = css.defineVars({
|
|
4
|
+
// Vertical rhythm (stack gaps)
|
|
5
|
+
stackXs: '4px',
|
|
6
|
+
stackSm: '8px',
|
|
7
|
+
stackMd: '16px',
|
|
8
|
+
stackLg: '24px',
|
|
9
|
+
stackXl: '48px',
|
|
10
|
+
|
|
11
|
+
// Horizontal rhythm (inline gaps)
|
|
12
|
+
inlineXs: '4px',
|
|
13
|
+
inlineSm: '8px',
|
|
14
|
+
inlineMd: '16px',
|
|
15
|
+
inlineLg: '24px',
|
|
16
|
+
|
|
17
|
+
// Container insets
|
|
18
|
+
containerSm: '16px',
|
|
19
|
+
containerMd: '24px',
|
|
20
|
+
containerLg: '32px',
|
|
21
|
+
})
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {css} from 'react-strict-dom'
|
|
2
|
+
|
|
3
|
+
export const spacing = css.defineVars({
|
|
4
|
+
xs: '4px',
|
|
5
|
+
sm: '8px',
|
|
6
|
+
ms: '12px',
|
|
7
|
+
md: '16px',
|
|
8
|
+
lg: '24px',
|
|
9
|
+
xl: '32px',
|
|
10
|
+
xxl: '48px',
|
|
11
|
+
xxxl: '64px',
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
export const radii = css.defineVars({
|
|
15
|
+
sm: '8px',
|
|
16
|
+
md: '12px',
|
|
17
|
+
lg: '16px',
|
|
18
|
+
full: '9999px',
|
|
19
|
+
})
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import {css} from 'react-strict-dom'
|
|
2
|
+
import {typography, typeScale} from './typography.css'
|
|
3
|
+
|
|
4
|
+
export const typePresets = css.create({
|
|
5
|
+
// Body
|
|
6
|
+
bodySm: {
|
|
7
|
+
fontFamily: typography.fontFamily,
|
|
8
|
+
fontSize: typeScale.fontSize3,
|
|
9
|
+
lineHeight: typeScale.lineHeight3,
|
|
10
|
+
fontWeight: typography.fontWeightNormal,
|
|
11
|
+
letterSpacing: typeScale.letterSpacingNormal,
|
|
12
|
+
},
|
|
13
|
+
bodyMd: {
|
|
14
|
+
fontFamily: typography.fontFamily,
|
|
15
|
+
fontSize: typeScale.fontSize4,
|
|
16
|
+
lineHeight: typeScale.lineHeight4,
|
|
17
|
+
fontWeight: typography.fontWeightNormal,
|
|
18
|
+
letterSpacing: typeScale.letterSpacingNormal,
|
|
19
|
+
},
|
|
20
|
+
bodyLg: {
|
|
21
|
+
fontFamily: typography.fontFamily,
|
|
22
|
+
fontSize: typeScale.fontSize5,
|
|
23
|
+
lineHeight: typeScale.lineHeight5,
|
|
24
|
+
fontWeight: typography.fontWeightNormal,
|
|
25
|
+
letterSpacing: typeScale.letterSpacingNormal,
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
// UI
|
|
29
|
+
caption: {
|
|
30
|
+
fontFamily: typography.fontFamily,
|
|
31
|
+
fontSize: typeScale.fontSize1,
|
|
32
|
+
lineHeight: typeScale.lineHeight1,
|
|
33
|
+
fontWeight: typography.fontWeightNormal,
|
|
34
|
+
letterSpacing: typeScale.letterSpacingWide,
|
|
35
|
+
},
|
|
36
|
+
label: {
|
|
37
|
+
fontFamily: typography.fontFamily,
|
|
38
|
+
fontSize: typeScale.fontSize3,
|
|
39
|
+
lineHeight: typeScale.lineHeight3,
|
|
40
|
+
fontWeight: typography.fontWeightMedium,
|
|
41
|
+
letterSpacing: typeScale.letterSpacingNormal,
|
|
42
|
+
},
|
|
43
|
+
code: {
|
|
44
|
+
fontFamily: typography.fontFamilyMono,
|
|
45
|
+
fontSize: typeScale.fontSize3,
|
|
46
|
+
lineHeight: typeScale.lineHeight3,
|
|
47
|
+
fontWeight: typography.fontWeightNormal,
|
|
48
|
+
letterSpacing: typeScale.letterSpacingNormal,
|
|
49
|
+
},
|
|
50
|
+
overline: {
|
|
51
|
+
fontFamily: typography.fontFamily,
|
|
52
|
+
fontSize: typeScale.fontSize1,
|
|
53
|
+
lineHeight: typeScale.lineHeight1,
|
|
54
|
+
fontWeight: typography.fontWeightSemibold,
|
|
55
|
+
letterSpacing: typeScale.letterSpacingWide,
|
|
56
|
+
textTransform: 'uppercase' as const,
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
// Heading
|
|
60
|
+
headingSm: {
|
|
61
|
+
fontFamily: typography.fontFamily,
|
|
62
|
+
fontSize: typeScale.fontSize6,
|
|
63
|
+
lineHeight: typeScale.lineHeight6,
|
|
64
|
+
fontWeight: typography.fontWeightSemibold,
|
|
65
|
+
letterSpacing: typeScale.letterSpacingTight,
|
|
66
|
+
},
|
|
67
|
+
headingMd: {
|
|
68
|
+
fontFamily: typography.fontFamily,
|
|
69
|
+
fontSize: typeScale.fontSize7,
|
|
70
|
+
lineHeight: typeScale.lineHeight7,
|
|
71
|
+
fontWeight: typography.fontWeightSemibold,
|
|
72
|
+
letterSpacing: typeScale.letterSpacingTight,
|
|
73
|
+
},
|
|
74
|
+
headingLg: {
|
|
75
|
+
fontFamily: typography.fontFamily,
|
|
76
|
+
fontSize: typeScale.fontSize8,
|
|
77
|
+
lineHeight: typeScale.lineHeight8,
|
|
78
|
+
fontWeight: typography.fontWeightBold,
|
|
79
|
+
letterSpacing: typeScale.letterSpacingTight,
|
|
80
|
+
},
|
|
81
|
+
headingXl: {
|
|
82
|
+
fontFamily: typography.fontFamily,
|
|
83
|
+
fontSize: typeScale.fontSize9,
|
|
84
|
+
lineHeight: typeScale.lineHeight9,
|
|
85
|
+
fontWeight: typography.fontWeightBold,
|
|
86
|
+
letterSpacing: typeScale.letterSpacingTight,
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
// Display (fluid)
|
|
90
|
+
displaySm: {
|
|
91
|
+
fontFamily: typography.fontFamily,
|
|
92
|
+
fontSize: typeScale.displaySm,
|
|
93
|
+
lineHeight: 1.2,
|
|
94
|
+
fontWeight: typography.fontWeightBold,
|
|
95
|
+
letterSpacing: typeScale.letterSpacingTight,
|
|
96
|
+
},
|
|
97
|
+
displayMd: {
|
|
98
|
+
fontFamily: typography.fontFamily,
|
|
99
|
+
fontSize: typeScale.displayMd,
|
|
100
|
+
lineHeight: 1.15,
|
|
101
|
+
fontWeight: typography.fontWeightBold,
|
|
102
|
+
letterSpacing: typeScale.letterSpacingTight,
|
|
103
|
+
},
|
|
104
|
+
displayLg: {
|
|
105
|
+
fontFamily: typography.fontFamily,
|
|
106
|
+
fontSize: typeScale.displayLg,
|
|
107
|
+
lineHeight: 1.1,
|
|
108
|
+
fontWeight: typography.fontWeightBold,
|
|
109
|
+
letterSpacing: typeScale.letterSpacingTight,
|
|
110
|
+
},
|
|
111
|
+
})
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {css} from 'react-strict-dom'
|
|
2
|
+
|
|
3
|
+
export const typography = css.defineVars({
|
|
4
|
+
fontFamily:
|
|
5
|
+
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif',
|
|
6
|
+
fontFamilyMono: '"SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", "Courier New", monospace',
|
|
7
|
+
fontSizeXs: '0.75rem',
|
|
8
|
+
fontSizeSm: '0.875rem',
|
|
9
|
+
fontSizeMd: '1rem',
|
|
10
|
+
fontSizeLg: '1.125rem',
|
|
11
|
+
fontSizeXl: '1.25rem',
|
|
12
|
+
fontSizeHeading: '1.5rem',
|
|
13
|
+
fontWeightNormal: '400',
|
|
14
|
+
fontWeightMedium: '500',
|
|
15
|
+
fontWeightSemibold: '600',
|
|
16
|
+
fontWeightBold: '700',
|
|
17
|
+
lineHeight: '1.5',
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
export const typeScale = css.defineVars({
|
|
21
|
+
// 9-step font size scale
|
|
22
|
+
fontSize1: '0.75rem', // 12px — captions, badges
|
|
23
|
+
fontSize2: '0.8125rem', // 13px — small UI
|
|
24
|
+
fontSize3: '0.875rem', // 14px — default UI (buttons, inputs)
|
|
25
|
+
fontSize4: '1rem', // 16px — body text
|
|
26
|
+
fontSize5: '1.125rem', // 18px — body-lg
|
|
27
|
+
fontSize6: '1.25rem', // 20px — subheading
|
|
28
|
+
fontSize7: '1.5rem', // 24px — heading-sm
|
|
29
|
+
fontSize8: '1.875rem', // 30px — heading-md
|
|
30
|
+
fontSize9: '2.25rem', // 36px — heading-lg
|
|
31
|
+
|
|
32
|
+
// Matched line-heights
|
|
33
|
+
lineHeight1: '1rem', // 16px
|
|
34
|
+
lineHeight2: '1.25rem', // 20px
|
|
35
|
+
lineHeight3: '1.25rem', // 20px
|
|
36
|
+
lineHeight4: '1.5rem', // 24px
|
|
37
|
+
lineHeight5: '1.5rem', // 24px
|
|
38
|
+
lineHeight6: '1.75rem', // 28px
|
|
39
|
+
lineHeight7: '2rem', // 32px
|
|
40
|
+
lineHeight8: '2.25rem', // 36px
|
|
41
|
+
lineHeight9: '2.75rem', // 44px
|
|
42
|
+
|
|
43
|
+
// Fluid display sizes
|
|
44
|
+
displaySm: 'clamp(2.25rem, 1.5rem + 2vw, 3rem)', // 36–48px
|
|
45
|
+
displayMd: 'clamp(2.75rem, 1.75rem + 2.5vw, 3.75rem)', // 44–60px
|
|
46
|
+
displayLg: 'clamp(3.5rem, 2rem + 3.5vw, 4.5rem)', // 56–72px
|
|
47
|
+
|
|
48
|
+
// Letter-spacing
|
|
49
|
+
letterSpacingTight: '-0.02em',
|
|
50
|
+
letterSpacingNormal: '0',
|
|
51
|
+
letterSpacingWide: '0.04em',
|
|
52
|
+
})
|