@nswds/tokens 3.1.0 → 3.3.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/css/typography/global.css +33 -0
- package/dist/css/typography/semantic.css +56 -0
- package/dist/index.cjs +499 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +365 -0
- package/dist/index.d.ts +365 -0
- package/dist/index.js +499 -65
- package/dist/index.js.map +1 -1
- package/dist/js/typography/global.js +43 -0
- package/dist/js/typography/semantic.js +72 -0
- package/dist/json/typography/global.json +43 -0
- package/dist/json/typography/semantic.json +65 -0
- package/dist/less/typography/global.less +31 -0
- package/dist/less/typography/semantic.less +45 -0
- package/dist/scss/typography/global.scss +31 -0
- package/dist/scss/typography/semantic.scss +45 -0
- package/dist/tailwind/typography/global.css +33 -0
- package/dist/tokens/global/typography/canonical.json +245 -0
- package/dist/tokens/semantic/typography/canonical.json +103 -0
- package/dist/tokens/typography.base.json +245 -0
- package/dist/ts/typography/global.ts +43 -0
- package/dist/ts/typography/semantic.ts +72 -0
- package/package.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--font-family-sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; /** Primary typeface — Public Sans (the NSW Government brand typeface) with system, Helvetica/Arial, and emoji fallbacks. Use for all UI and body text. */
|
|
3
|
+
--font-family-display: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; /** Display typeface — currently the same stack as sans; a separate token so display/heading type can diverge from body text later without a breaking change. */
|
|
4
|
+
--font-family-system: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; /** System typeface — currently the same stack as sans; a separate token for system-chrome contexts (toasts, native-feeling UI) that may diverge later. */
|
|
5
|
+
--font-family-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; /** Monospace stack — JetBrains Mono with ui-monospace and system fallbacks for code, tabular data, and technical content. */
|
|
6
|
+
--font-size-12: 0.75rem; /** Font size 12px (0.75rem) — the step name is the px value at the default root font size. */
|
|
7
|
+
--font-size-14: 0.875rem; /** Font size 14px (0.875rem) — the step name is the px value at the default root font size. */
|
|
8
|
+
--font-size-16: 1rem; /** Font size 16px (1rem) — the step name is the px value at the default root font size. */
|
|
9
|
+
--font-size-18: 1.125rem; /** Font size 18px (1.125rem) — the step name is the px value at the default root font size. */
|
|
10
|
+
--font-size-20: 1.25rem; /** Font size 20px (1.25rem) — the step name is the px value at the default root font size. */
|
|
11
|
+
--font-size-22: 1.375rem; /** Font size 22px (1.375rem) — the step name is the px value at the default root font size. */
|
|
12
|
+
--font-size-24: 1.5rem; /** Font size 24px (1.5rem) — the step name is the px value at the default root font size. */
|
|
13
|
+
--font-size-30: 1.875rem; /** Font size 30px (1.875rem) — the step name is the px value at the default root font size. */
|
|
14
|
+
--font-size-36: 2.25rem; /** Font size 36px (2.25rem) — the step name is the px value at the default root font size. */
|
|
15
|
+
--font-size-48: 3rem; /** Font size 48px (3rem) — the step name is the px value at the default root font size. */
|
|
16
|
+
--font-size-56: 3.5rem; /** Font size 56px (3.5rem) — the step name is the px value at the default root font size. */
|
|
17
|
+
--font-size-64: 4rem; /** Font size 64px (4rem) — the step name is the px value at the default root font size. */
|
|
18
|
+
--font-weight-light: 300; /** Light (300) — large display text only; avoid at body sizes for legibility. */
|
|
19
|
+
--font-weight-regular: 400; /** Regular (400) — default body text weight. */
|
|
20
|
+
--font-weight-medium: 500; /** Medium (500) — subtle emphasis, labels, and navigation. */
|
|
21
|
+
--font-weight-semibold: 600; /** Semibold (600) — headings and strong emphasis. */
|
|
22
|
+
--font-weight-bold: 700; /** Bold (700) — highest emphasis; key figures and primary headings. */
|
|
23
|
+
--font-weight-extrabold: 800; /** Extrabold (800) — hero/display headings (the prose scale uses 800 for h1). */
|
|
24
|
+
--line-height-none: 1; /** Solid (1) — display headings set at their own size (48/48, 56/56, 64/64 in the prose scale). */
|
|
25
|
+
--line-height-tight: 1.2; /** Tight (1.2) — large headings (36/30 in the prose scale). */
|
|
26
|
+
--line-height-snug: 1.3333333; /** Snug (1.3333333) — mid-size headings (32/24, 40/30 in the prose scale). */
|
|
27
|
+
--line-height-base: 1.5; /** Base (1.5) — default for UI text and dense content (24/16, 36/24 in the prose scale); meets WCAG 1.4.12 text-spacing. */
|
|
28
|
+
--line-height-relaxed: 1.6; /** Relaxed (1.6) — subheadings and lead text (32/20 in the prose scale). */
|
|
29
|
+
--line-height-loose: 1.75; /** Loose (1.75) — long-form body text (28/16 in the prose scale). */
|
|
30
|
+
--letter-spacing-tight: -0.0125em; /** Tight tracking (-0.0125em) — large display headings. Value is an em multiplier; string outputs render it with the em unit. */
|
|
31
|
+
--letter-spacing-normal: 0em; /** Normal tracking (0em) — default for body text. Value is an em multiplier; string outputs render it with the em unit. */
|
|
32
|
+
--letter-spacing-wide: 0.025em; /** Wide tracking (0.025em) — small caps, overlines, and small labels. Value is an em multiplier; string outputs render it with the em unit. */
|
|
33
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--typography-heading-1-font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
3
|
+
--typography-heading-1-font-size: 2.25rem;
|
|
4
|
+
--typography-heading-1-font-weight: 800;
|
|
5
|
+
--typography-heading-1-line-height: 1.2;
|
|
6
|
+
--typography-heading-1-letter-spacing: -0.0125em;
|
|
7
|
+
--typography-heading-1: 800 2.25rem/1.2 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
8
|
+
--typography-heading-2-font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
9
|
+
--typography-heading-2-font-size: 1.5rem;
|
|
10
|
+
--typography-heading-2-font-weight: 700;
|
|
11
|
+
--typography-heading-2-line-height: 1.3333333;
|
|
12
|
+
--typography-heading-2-letter-spacing: 0em;
|
|
13
|
+
--typography-heading-2: 700 1.5rem/1.3333333 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
14
|
+
--typography-heading-3-font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
15
|
+
--typography-heading-3-font-size: 1.25rem;
|
|
16
|
+
--typography-heading-3-font-weight: 600;
|
|
17
|
+
--typography-heading-3-line-height: 1.6;
|
|
18
|
+
--typography-heading-3-letter-spacing: 0em;
|
|
19
|
+
--typography-heading-3: 600 1.25rem/1.6 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
20
|
+
--typography-heading-4-font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
21
|
+
--typography-heading-4-font-size: 1rem;
|
|
22
|
+
--typography-heading-4-font-weight: 600;
|
|
23
|
+
--typography-heading-4-line-height: 1.5;
|
|
24
|
+
--typography-heading-4-letter-spacing: 0em;
|
|
25
|
+
--typography-heading-4: 600 1rem/1.5 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
26
|
+
--typography-body-font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
27
|
+
--typography-body-font-size: 1rem;
|
|
28
|
+
--typography-body-font-weight: 400;
|
|
29
|
+
--typography-body-line-height: 1.75;
|
|
30
|
+
--typography-body-letter-spacing: 0em;
|
|
31
|
+
--typography-body: 400 1rem/1.75 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
32
|
+
--typography-body-sm-font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
33
|
+
--typography-body-sm-font-size: 0.875rem;
|
|
34
|
+
--typography-body-sm-font-weight: 400;
|
|
35
|
+
--typography-body-sm-line-height: 1.75;
|
|
36
|
+
--typography-body-sm-letter-spacing: 0em;
|
|
37
|
+
--typography-body-sm: 400 0.875rem/1.75 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
38
|
+
--typography-lead-font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
39
|
+
--typography-lead-font-size: 1.25rem;
|
|
40
|
+
--typography-lead-font-weight: 400;
|
|
41
|
+
--typography-lead-line-height: 1.6;
|
|
42
|
+
--typography-lead-letter-spacing: 0em;
|
|
43
|
+
--typography-lead: 400 1.25rem/1.6 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
44
|
+
--typography-caption-font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
45
|
+
--typography-caption-font-size: 0.75rem;
|
|
46
|
+
--typography-caption-font-weight: 400;
|
|
47
|
+
--typography-caption-line-height: 1.5;
|
|
48
|
+
--typography-caption-letter-spacing: 0.025em;
|
|
49
|
+
--typography-caption: 400 0.75rem/1.5 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
50
|
+
--typography-code-font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
|
|
51
|
+
--typography-code-font-size: 0.875rem;
|
|
52
|
+
--typography-code-font-weight: 400;
|
|
53
|
+
--typography-code-line-height: 1.5;
|
|
54
|
+
--typography-code-letter-spacing: 0em;
|
|
55
|
+
--typography-code: 400 0.875rem/1.5 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
|
|
56
|
+
}
|