@insymetri/styleguide 0.1.88 → 0.1.89
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/IIBadge/IIBadge.svelte +3 -3
- package/dist/IIButton/IIButton.svelte +24 -18
- package/dist/IICard/IICard.svelte +6 -6
- package/dist/IICheckbox/IICheckbox.svelte +3 -5
- package/dist/IIInput/IIInput.svelte +5 -5
- package/dist/IIModal/IIModal.svelte +4 -4
- package/dist/IISegmentedControl/IISegmentedControl.svelte +7 -13
- package/dist/IISwitch/IISwitch.svelte +4 -9
- package/dist/IITable/IITable.svelte +63 -55
- package/dist/IITooltip/IITooltip.svelte +1 -1
- package/dist/icons.d.ts +19 -0
- package/dist/icons.js +26 -0
- package/dist/style/base.css +31 -8
- package/dist/style/colors.css +21 -0
- package/dist/style/dark.css +17 -0
- package/dist/style/tailwind/colors.d.ts +5 -0
- package/dist/style/tailwind/colors.js +10 -0
- package/dist/style/tailwind/preset.d.ts +83 -30
- package/dist/style/tailwind/preset.js +21 -0
- package/dist/style/tailwind/shadows.d.ts +3 -3
- package/dist/style/tailwind/shadows.js +27 -28
- package/dist/style/tailwind/typography.d.ts +64 -27
- package/dist/style/tailwind/typography.js +64 -38
- package/package.json +1 -1
|
@@ -1,41 +1,67 @@
|
|
|
1
|
-
// Semantic typography scale
|
|
1
|
+
// Semantic typography scale.
|
|
2
2
|
// With 62.5% base (1rem = 10px), rem values read as pixels: 2.4rem = 24px.
|
|
3
|
-
// TW4's extended fontSize format bundles size + lineHeight +
|
|
4
|
-
// into a single class — e.g. `text-h1` sets all
|
|
3
|
+
// TW4's extended fontSize format bundles size + lineHeight + weight + tracking
|
|
4
|
+
// into a single class — e.g. `text-h1` sets all four properties.
|
|
5
|
+
//
|
|
6
|
+
// Tuned to the artifact type system. Three things define that look, and they
|
|
7
|
+
// matter more than the raw sizes:
|
|
8
|
+
//
|
|
9
|
+
// 1. Tracking tightens as size grows — body sits at -0.005em, headings run
|
|
10
|
+
// to -0.03em. At these sizes an untracked heading sprawls; this pulls it
|
|
11
|
+
// together. Not tied to one typeface — it was first tuned against Geist,
|
|
12
|
+
// and Inter, which measures ~5% WIDER at the same size, wants it at least
|
|
13
|
+
// as much.
|
|
14
|
+
// 2. Headings are 600, never 700. Emphasis in running text is 500. The jump
|
|
15
|
+
// from 400 to 700 reads as shouting at these sizes.
|
|
16
|
+
// 3. Body line-height is 1.5 and headings are 1.15–1.3 — tight enough that a
|
|
17
|
+
// two-line title still reads as one object.
|
|
18
|
+
//
|
|
19
|
+
// The half-pixel sizes (1.05rem, 1.15rem, 1.25rem, 1.35rem) are deliberate:
|
|
20
|
+
// they are what the artifacts use for dense metadata, and at 62.5% base they
|
|
21
|
+
// land on exact half-pixels rather than rounding artifacts.
|
|
22
|
+
//
|
|
23
|
+
// The loosened body leading is the biggest change here, not the weights, which
|
|
24
|
+
// did not move: 13px text went from a 16px line box to 19.5px, and `tiny` from
|
|
25
|
+
// 12px to 15px. Headings tightened the other way so a two-line title reads as
|
|
26
|
+
// one object.
|
|
5
27
|
export const fontSize = {
|
|
6
|
-
// Headings — semibold (600)
|
|
7
|
-
h1: ['2.
|
|
8
|
-
h2: ['2.0rem', { lineHeight: '2.
|
|
9
|
-
h3: ['1.8rem', { lineHeight: '2.4rem', fontWeight: '600' }], // 18px
|
|
10
|
-
h4: ['1.
|
|
11
|
-
h5: ['1.4rem', { lineHeight: '
|
|
12
|
-
h6: ['1.3rem', { lineHeight: '1.
|
|
13
|
-
// Medium — light
|
|
14
|
-
m1: ['2.0rem', { lineHeight: '2.8rem', fontWeight: '300' }], // 20px
|
|
15
|
-
m2: ['1.6rem', { lineHeight: '2.4rem', fontWeight: '300' }], // 16px
|
|
16
|
-
'm2-emphasis': ['1.6rem', { lineHeight: '2.4rem', fontWeight: '500' }], // 16px
|
|
17
|
-
m3: ['1.4rem', { lineHeight: '2.0rem', fontWeight: '300' }], // 14px
|
|
18
|
-
'm3-emphasis': ['1.3rem', { lineHeight: '2.0rem', fontWeight: '500' }], // 13px
|
|
19
|
-
'm3-small': ['1.3rem', { lineHeight: '2.0rem', fontWeight: '400' }], // 13px
|
|
20
|
-
// Body — large (
|
|
21
|
-
large: ['1.
|
|
22
|
-
'large-emphasis': ['1.
|
|
23
|
-
// Body — default (13px)
|
|
24
|
-
default: ['1.3rem', { lineHeight: '1.
|
|
25
|
-
emphasis: ['1.3rem', { lineHeight: '1.
|
|
26
|
-
strong: ['1.3rem', { lineHeight: '1.
|
|
27
|
-
// Body — small (
|
|
28
|
-
small: ['1.
|
|
29
|
-
'small-emphasis': ['1.
|
|
30
|
-
'small-strong': ['1.
|
|
31
|
-
// Body — tiny (
|
|
32
|
-
tiny: ['1.
|
|
33
|
-
'tiny-emphasis': ['1.
|
|
34
|
-
'tiny-strong': ['1.
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
// Headings — semibold (600), tracking tightening with size
|
|
29
|
+
h1: ['2.6rem', { lineHeight: '3.0rem', fontWeight: '600', letterSpacing: '-0.02em' }], // 26px
|
|
30
|
+
h2: ['2.0rem', { lineHeight: '2.6rem', fontWeight: '600', letterSpacing: '-0.02em' }], // 20px
|
|
31
|
+
h3: ['1.8rem', { lineHeight: '2.4rem', fontWeight: '600', letterSpacing: '-0.02em' }], // 18px
|
|
32
|
+
h4: ['1.5rem', { lineHeight: '2.0rem', fontWeight: '600', letterSpacing: '-0.01em' }], // 15px
|
|
33
|
+
h5: ['1.4rem', { lineHeight: '1.9rem', fontWeight: '600', letterSpacing: '-0.01em' }], // 14px
|
|
34
|
+
h6: ['1.3rem', { lineHeight: '1.8rem', fontWeight: '600', letterSpacing: '-0.005em' }], // 13px
|
|
35
|
+
// Medium — light display text (300)
|
|
36
|
+
m1: ['2.0rem', { lineHeight: '2.8rem', fontWeight: '300', letterSpacing: '-0.02em' }], // 20px
|
|
37
|
+
m2: ['1.6rem', { lineHeight: '2.4rem', fontWeight: '300', letterSpacing: '-0.01em' }], // 16px
|
|
38
|
+
'm2-emphasis': ['1.6rem', { lineHeight: '2.4rem', fontWeight: '500', letterSpacing: '-0.01em' }], // 16px
|
|
39
|
+
m3: ['1.4rem', { lineHeight: '2.0rem', fontWeight: '300', letterSpacing: '-0.005em' }], // 14px
|
|
40
|
+
'm3-emphasis': ['1.3rem', { lineHeight: '2.0rem', fontWeight: '500', letterSpacing: '-0.005em' }], // 13px
|
|
41
|
+
'm3-small': ['1.3rem', { lineHeight: '2.0rem', fontWeight: '400', letterSpacing: '-0.005em' }], // 13px
|
|
42
|
+
// Body — large (15px). The artifacts' lead/description size.
|
|
43
|
+
large: ['1.5rem', { lineHeight: '2.2rem', fontWeight: '400', letterSpacing: '-0.01em' }],
|
|
44
|
+
'large-emphasis': ['1.5rem', { lineHeight: '2.2rem', fontWeight: '500', letterSpacing: '-0.01em' }],
|
|
45
|
+
// Body — default (13px), the base size the whole system is set in
|
|
46
|
+
default: ['1.3rem', { lineHeight: '1.95rem', fontWeight: '400', letterSpacing: '-0.005em' }],
|
|
47
|
+
emphasis: ['1.3rem', { lineHeight: '1.95rem', fontWeight: '500', letterSpacing: '-0.005em' }],
|
|
48
|
+
strong: ['1.3rem', { lineHeight: '1.95rem', fontWeight: '600', letterSpacing: '-0.005em' }],
|
|
49
|
+
// Body — small (12.5px), for secondary/meta lines beside body text
|
|
50
|
+
small: ['1.25rem', { lineHeight: '1.7rem', fontWeight: '400', letterSpacing: '0' }],
|
|
51
|
+
'small-emphasis': ['1.25rem', { lineHeight: '1.7rem', fontWeight: '500', letterSpacing: '0' }],
|
|
52
|
+
'small-strong': ['1.25rem', { lineHeight: '1.7rem', fontWeight: '600', letterSpacing: '0' }],
|
|
53
|
+
// Body — tiny (11.5px), for timestamps, hints and counts
|
|
54
|
+
tiny: ['1.15rem', { lineHeight: '1.5rem', fontWeight: '400', letterSpacing: '0' }],
|
|
55
|
+
'tiny-emphasis': ['1.15rem', { lineHeight: '1.5rem', fontWeight: '500', letterSpacing: '0' }],
|
|
56
|
+
'tiny-strong': ['1.15rem', { lineHeight: '1.5rem', fontWeight: '600', letterSpacing: '0' }],
|
|
57
|
+
// Micro (10.5px) — the uppercase section label. Pair with `tracking-label`
|
|
58
|
+
// and `uppercase`; the positive tracking is what keeps caps legible small.
|
|
59
|
+
micro: ['1.05rem', { lineHeight: '1.575rem', fontWeight: '500', letterSpacing: '0.06em' }], // 10.5px × 1.5
|
|
60
|
+
// Special — numeric. Pair with `font-mono` for tabular figures.
|
|
61
|
+
numeric: ['1.3rem', { lineHeight: '1.8rem', fontWeight: '400', letterSpacing: '0' }], // 13px
|
|
62
|
+
// Display — hero/feature sizes. `amount` is the artifacts' big figure.
|
|
63
|
+
amount: ['2.6rem', { lineHeight: '2.9rem', fontWeight: '600', letterSpacing: '-0.03em' }], // 26px
|
|
64
|
+
'display-lg': ['4.0rem', { lineHeight: '1.1', letterSpacing: '-0.03em' }], // 40px
|
|
65
|
+
'display-md': ['3.0rem', { lineHeight: '1.2', letterSpacing: '-0.025em' }], // 30px
|
|
66
|
+
'display-sm': ['2.4rem', { lineHeight: '1.2', fontWeight: '500', letterSpacing: '-0.02em' }], // 24px
|
|
41
67
|
};
|