@greese/ui 0.0.0-stage → 1.1.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/LICENSE +21 -0
- package/README.md +55 -2
- package/bin/greese-utilities.mjs +56 -0
- package/dist/_layers.scss +2 -0
- package/dist/_maps.scss +1884 -0
- package/dist/_tokens-base.scss +174 -0
- package/dist/_tokens.scss +2140 -0
- package/dist/base.css +67 -0
- package/dist/colorScheme.d.ts +16 -0
- package/dist/colorScheme.js +13 -0
- package/dist/contrast.d.ts +15 -0
- package/dist/contrast.js +43 -0
- package/dist/css/Accordion.css +9 -0
- package/dist/css/ActionSelect.css +6 -0
- package/dist/css/Alert.css +84 -0
- package/dist/css/AppBar.css +35 -0
- package/dist/css/AspectRatio.css +40 -0
- package/dist/css/AutoLayout.css +508 -0
- package/dist/css/Avatar.css +88 -0
- package/dist/css/Badge.css +66 -0
- package/dist/css/Box.css +640 -0
- package/dist/css/Breadcrumbs.css +57 -0
- package/dist/css/Button.css +275 -0
- package/dist/css/ButtonGroup.css +40 -0
- package/dist/css/Card.css +101 -0
- package/dist/css/Carousel.css +170 -0
- package/dist/css/Center.css +11 -0
- package/dist/css/ChatBubble.css +128 -0
- package/dist/css/Checkbox.css +65 -0
- package/dist/css/Chip.css +124 -0
- package/dist/css/ChoiceGroup.css +57 -0
- package/dist/css/Code.css +29 -0
- package/dist/css/Collapsible.css +126 -0
- package/dist/css/ColorPicker.css +191 -0
- package/dist/css/Combobox.css +90 -0
- package/dist/css/Container.css +30 -0
- package/dist/css/Countdown.css +25 -0
- package/dist/css/DateField.css +15 -0
- package/dist/css/Dialog.css +640 -0
- package/dist/css/Diff.css +103 -0
- package/dist/css/Divider.css +19 -0
- package/dist/css/Dock.css +91 -0
- package/dist/css/Field.css +33 -0
- package/dist/css/Fieldset.css +54 -0
- package/dist/css/FileInput.css +65 -0
- package/dist/css/Footer.css +72 -0
- package/dist/css/Grid.css +998 -0
- package/dist/css/Header.css +89 -0
- package/dist/css/Heading.css +6 -0
- package/dist/css/Icon.css +12 -0
- package/dist/css/IconButton.css +7 -0
- package/dist/css/Image.css +69 -0
- package/dist/css/Indicator.css +41 -0
- package/dist/css/Input.css +115 -0
- package/dist/css/Key.css +42 -0
- package/dist/css/Link.css +72 -0
- package/dist/css/List.css +52 -0
- package/dist/css/Media.css +8 -0
- package/dist/css/Menu.css +161 -0
- package/dist/css/Motion.css +1356 -0
- package/dist/css/NumberField.css +49 -0
- package/dist/css/OtpField.css +90 -0
- package/dist/css/PageTransition.css +991 -0
- package/dist/css/Pagination.css +43 -0
- package/dist/css/Popover.css +93 -0
- package/dist/css/Progress.css +101 -0
- package/dist/css/RadialProgress.css +44 -0
- package/dist/css/Radio.css +41 -0
- package/dist/css/Rating.css +100 -0
- package/dist/css/ScrollSpy.css +6 -0
- package/dist/css/SegmentedControl.css +101 -0
- package/dist/css/Select.css +115 -0
- package/dist/css/Sidebar.css +207 -0
- package/dist/css/Skeleton.css +48 -0
- package/dist/css/Slider.css +75 -0
- package/dist/css/Spacer.css +34 -0
- package/dist/css/SpeedDial.css +165 -0
- package/dist/css/Spinner.css +44 -0
- package/dist/css/Stack.css +528 -0
- package/dist/css/Stat.css +107 -0
- package/dist/css/Status.css +86 -0
- package/dist/css/Steps.css +201 -0
- package/dist/css/Swap.css +49 -0
- package/dist/css/Switch.css +66 -0
- package/dist/css/Table.css +269 -0
- package/dist/css/Tabs.css +119 -0
- package/dist/css/Text.css +60 -0
- package/dist/css/TextRotate.css +147 -0
- package/dist/css/Textarea.css +107 -0
- package/dist/css/ThemeProvider.css +6 -0
- package/dist/css/Tile.css +18 -0
- package/dist/css/Toast.css +110 -0
- package/dist/css/ToggleButton.css +20 -0
- package/dist/css/Tooltip.css +94 -0
- package/dist/css/Type.css +211 -0
- package/dist/css/Visibility.css +78 -0
- package/dist/css/VisuallyHidden.css +15 -0
- package/dist/css/core.css +251 -0
- package/dist/css.d.ts +29 -0
- package/dist/css.js +28 -0
- package/dist/effect-classes.d.ts +8 -0
- package/dist/effect-classes.js +5 -0
- package/dist/effects/css.d.ts +71 -0
- package/dist/effects/css.js +184 -0
- package/dist/effects/definitions.d.ts +555 -0
- package/dist/effects/definitions.js +379 -0
- package/dist/effects/frames.d.ts +18 -0
- package/dist/effects/frames.js +68 -0
- package/dist/effects/sequence.d.ts +33 -0
- package/dist/effects/sequence.js +106 -0
- package/dist/effects.d.ts +30 -0
- package/dist/effects.js +30 -0
- package/dist/greese.css +11919 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/kebab.d.ts +2 -0
- package/dist/kebab.js +2 -0
- package/dist/palette.css +249 -0
- package/dist/palette.d.ts +599 -0
- package/dist/palette.js +334 -0
- package/dist/shapes.d.ts +193 -0
- package/dist/shapes.js +852 -0
- package/dist/storage.d.ts +47 -0
- package/dist/storage.js +118 -0
- package/dist/style-manifest.json +3017 -0
- package/dist/theme.d.ts +71 -0
- package/dist/theme.js +180 -0
- package/dist/tokens.css +253 -0
- package/dist/tokens.d.ts +343 -0
- package/dist/tokens.js +179 -0
- package/dist/typography.d.ts +55 -0
- package/dist/typography.js +144 -0
- package/dist/utilities.css +6975 -0
- package/dist/utilities.d.ts +82 -0
- package/dist/utilities.js +636 -0
- package/dist/utilitiesFiles.d.ts +18 -0
- package/dist/utilitiesFiles.js +26 -0
- package/dist/vite.d.ts +40 -0
- package/dist/vite.js +43 -0
- package/package.json +131 -4
- package/src/components/Accordion/Accordion.scss +9 -0
- package/src/components/ActionSelect/ActionSelect.scss +6 -0
- package/src/components/Alert/Alert.scss +71 -0
- package/src/components/AppBar/AppBar.scss +43 -0
- package/src/components/AspectRatio/AspectRatio.scss +22 -0
- package/src/components/AutoLayout/AutoLayout.scss +90 -0
- package/src/components/Avatar/Avatar.scss +91 -0
- package/src/components/Badge/Badge.scss +52 -0
- package/src/components/Box/Box.scss +63 -0
- package/src/components/Breadcrumbs/Breadcrumbs.scss +59 -0
- package/src/components/Button/Button.scss +231 -0
- package/src/components/ButtonGroup/ButtonGroup.scss +56 -0
- package/src/components/Card/Card.scss +99 -0
- package/src/components/Carousel/Carousel.scss +161 -0
- package/src/components/Center/Center.scss +11 -0
- package/src/components/ChatBubble/ChatBubble.scss +119 -0
- package/src/components/Checkbox/Checkbox.scss +66 -0
- package/src/components/Chip/Chip.scss +119 -0
- package/src/components/ChoiceGroup/ChoiceGroup.scss +69 -0
- package/src/components/Code/Code.scss +28 -0
- package/src/components/Collapsible/Collapsible.scss +136 -0
- package/src/components/ColorPicker/ColorPicker.scss +235 -0
- package/src/components/Combobox/Combobox.scss +83 -0
- package/src/components/Container/Container.scss +28 -0
- package/src/components/Countdown/Countdown.scss +28 -0
- package/src/components/DateField/DateField.scss +19 -0
- package/src/components/Dialog/Dialog.scss +268 -0
- package/src/components/Diff/Diff.scss +125 -0
- package/src/components/Divider/Divider.scss +22 -0
- package/src/components/Dock/Dock.scss +86 -0
- package/src/components/Field/Field.scss +38 -0
- package/src/components/Fieldset/Fieldset.scss +63 -0
- package/src/components/FileInput/FileInput.scss +66 -0
- package/src/components/Footer/Footer.scss +79 -0
- package/src/components/Grid/Grid.scss +86 -0
- package/src/components/Header/Header.scss +111 -0
- package/src/components/Heading/Heading.scss +7 -0
- package/src/components/Icon/Icon.scss +12 -0
- package/src/components/IconButton/IconButton.scss +6 -0
- package/src/components/Image/Image.scss +46 -0
- package/src/components/Indicator/Indicator.scss +48 -0
- package/src/components/Input/Input.scss +58 -0
- package/src/components/Key/Key.scss +48 -0
- package/src/components/Link/Link.scss +50 -0
- package/src/components/List/List.scss +62 -0
- package/src/components/Media/Media.scss +7 -0
- package/src/components/Menu/Menu.scss +91 -0
- package/src/components/Motion/Motion.scss +106 -0
- package/src/components/NumberField/NumberField.scss +44 -0
- package/src/components/OtpField/OtpField.scss +91 -0
- package/src/components/PageTransition/PageTransition.scss +197 -0
- package/src/components/Pagination/Pagination.scss +55 -0
- package/src/components/Popover/Popover.scss +13 -0
- package/src/components/Progress/Progress.scss +126 -0
- package/src/components/RadialProgress/RadialProgress.scss +65 -0
- package/src/components/Radio/Radio.scss +36 -0
- package/src/components/Rating/Rating.scss +121 -0
- package/src/components/ScrollSpy/ScrollSpy.scss +6 -0
- package/src/components/SegmentedControl/SegmentedControl.scss +107 -0
- package/src/components/Select/Select.scss +59 -0
- package/src/components/Sidebar/Sidebar.scss +88 -0
- package/src/components/Skeleton/Skeleton.scss +60 -0
- package/src/components/Slider/Slider.scss +96 -0
- package/src/components/Spacer/Spacer.scss +15 -0
- package/src/components/SpeedDial/SpeedDial.scss +109 -0
- package/src/components/Spinner/Spinner.scss +43 -0
- package/src/components/Stack/Stack.scss +57 -0
- package/src/components/Stat/Stat.scss +96 -0
- package/src/components/Status/Status.scss +60 -0
- package/src/components/Steps/Steps.scss +216 -0
- package/src/components/Swap/Swap.scss +62 -0
- package/src/components/Switch/Switch.scss +63 -0
- package/src/components/Table/Table.scss +183 -0
- package/src/components/Tabs/Tabs.scss +108 -0
- package/src/components/Text/Text.scss +34 -0
- package/src/components/TextRotate/TextRotate.scss +51 -0
- package/src/components/Textarea/Textarea.scss +56 -0
- package/src/components/ThemeProvider/ThemeProvider.scss +7 -0
- package/src/components/Tile/Tile.scss +23 -0
- package/src/components/Toast/Toast.scss +93 -0
- package/src/components/ToggleButton/ToggleButton.scss +23 -0
- package/src/components/Tooltip/Tooltip.scss +21 -0
- package/src/components/Type/Type.scss +35 -0
- package/src/components/Visibility/Visibility.scss +39 -0
- package/src/components/VisuallyHidden/VisuallyHidden.scss +17 -0
- package/src/styles/_breakpoint-vars.scss +16 -0
- package/src/styles/_config.scss +48 -0
- package/src/styles/_controls.scss +88 -0
- package/src/styles/_core.scss +4 -0
- package/src/styles/_effect.scss +51 -0
- package/src/styles/_floating.scss +141 -0
- package/src/styles/_kit.scss +1548 -0
- package/src/styles/_manifest.scss +670 -0
- package/src/styles/_mixins.scss +261 -0
- package/src/styles/_tones.scss +63 -0
- package/src/styles/_type-emit.scss +76 -0
- package/src/styles/_typography-vars.scss +8 -0
- package/src/styles/base.scss +80 -0
- package/src/styles/breakpoints.test.ts +73 -0
- package/src/styles/entryPoints.test.ts +68 -0
- package/src/styles/index.scss +93 -0
- package/src/styles/kit.test.ts +754 -0
- package/src/styles/public/_controls.scss +3 -0
- package/src/styles/public/_floating.scss +3 -0
- package/src/styles/public/_mixins.scss +5 -0
- package/src/styles/public/_tones.scss +4 -0
- package/themes/bevel.css +1077 -0
- package/themes/bevel.scss +1166 -0
- package/themes/candy.css +87 -0
- package/themes/candy.scss +32 -0
- package/themes/depth.css +123 -0
- package/themes/depth.scss +46 -0
- package/themes/extrude.css +219 -0
- package/themes/extrude.scss +255 -0
- package/themes/folio.css +986 -0
- package/themes/folio.scss +1047 -0
- package/themes/forest.css +87 -0
- package/themes/forest.scss +32 -0
- package/themes/gentle.css +66 -0
- package/themes/gentle.scss +39 -0
- package/themes/grape.css +87 -0
- package/themes/grape.scss +32 -0
- package/themes/greese.css +36 -0
- package/themes/greese.scss +21 -0
- package/themes/mono.css +87 -0
- package/themes/mono.scss +32 -0
- package/themes/ocean.css +87 -0
- package/themes/ocean.scss +32 -0
- package/themes/outline.css +127 -0
- package/themes/outline.scss +126 -0
- package/themes/pebble.css +65 -0
- package/themes/pebble.scss +69 -0
- package/themes/pocket.css +137 -0
- package/themes/pocket.scss +45 -0
- package/themes/ridge.css +927 -0
- package/themes/ridge.scss +998 -0
- package/themes/snappy.css +82 -0
- package/themes/snappy.scss +40 -0
- package/themes/soft.css +79 -0
- package/themes/soft.scss +84 -0
- package/themes/sunset.css +87 -0
- package/themes/sunset.scss +32 -0
- package/themes/ticket.css +960 -0
- package/themes/ticket.scss +1031 -0
- package/themes/tilt.css +148 -0
- package/themes/tilt.scss +169 -0
- package/themes/wipe.css +186 -0
- package/themes/wipe.scss +46 -0
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
/** Light and dark values for one semantic role. */
|
|
2
|
+
export interface TokenPair {
|
|
3
|
+
light: string;
|
|
4
|
+
dark: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Semantic color roles, light and dark. Every value is a palette color, read
|
|
8
|
+
* from palette.ts so a change there reaches every role. The palette is one
|
|
9
|
+
* export per hue, so a bundle carries only the hues named here, and only if
|
|
10
|
+
* it uses `color` at all: the pure annotation tells bundlers that reading the
|
|
11
|
+
* palette has no side effects, so an unused `color` drops its hues with it.
|
|
12
|
+
* `white` and `black` are the ends of every ramp.
|
|
13
|
+
*
|
|
14
|
+
* The brand colors, in order: `primary` (what components use for
|
|
15
|
+
* interactive emphasis: solid buttons, links, focus, selection),
|
|
16
|
+
* `secondary`, `tertiary` and `accent`. Each has a `Strong` shade (hover,
|
|
17
|
+
* text on the canvas) and a `Content` color for text and icons drawn on it,
|
|
18
|
+
* which meets WCAG AA (4.5:1) against it in both schemes (tokens.test.ts).
|
|
19
|
+
* `createTheme` derives both when a theme sets only the main color.
|
|
20
|
+
*/
|
|
21
|
+
export declare const color: {
|
|
22
|
+
readonly canvas: {
|
|
23
|
+
readonly light: "#ffffff";
|
|
24
|
+
readonly dark: "#11171c";
|
|
25
|
+
};
|
|
26
|
+
readonly surface: {
|
|
27
|
+
readonly light: "#f5f7f9";
|
|
28
|
+
readonly dark: "#2a333c";
|
|
29
|
+
};
|
|
30
|
+
readonly surfaceOverlay: {
|
|
31
|
+
readonly light: "#ffffff";
|
|
32
|
+
readonly dark: "#3c4854";
|
|
33
|
+
};
|
|
34
|
+
readonly fg: {
|
|
35
|
+
readonly light: "#11171c";
|
|
36
|
+
readonly dark: "#e9edf2";
|
|
37
|
+
};
|
|
38
|
+
readonly fgMuted: {
|
|
39
|
+
readonly light: "#505e6d";
|
|
40
|
+
readonly dark: "#a3b3c4";
|
|
41
|
+
};
|
|
42
|
+
readonly border: {
|
|
43
|
+
readonly light: "#d7dfe7";
|
|
44
|
+
readonly dark: "#3c4854";
|
|
45
|
+
};
|
|
46
|
+
readonly borderStrong: {
|
|
47
|
+
readonly light: "#a3b3c4";
|
|
48
|
+
readonly dark: "#505e6d";
|
|
49
|
+
};
|
|
50
|
+
readonly track: {
|
|
51
|
+
readonly light: "#d7dfe7";
|
|
52
|
+
readonly dark: "#687889";
|
|
53
|
+
};
|
|
54
|
+
readonly primary: {
|
|
55
|
+
readonly light: "#2771e0";
|
|
56
|
+
readonly dark: "#81b2ff";
|
|
57
|
+
};
|
|
58
|
+
readonly primaryStrong: {
|
|
59
|
+
readonly light: "#1356b8";
|
|
60
|
+
readonly dark: "#aaccff";
|
|
61
|
+
};
|
|
62
|
+
readonly primaryContent: {
|
|
63
|
+
readonly light: "#ffffff";
|
|
64
|
+
readonly dark: "#11171c";
|
|
65
|
+
};
|
|
66
|
+
readonly secondary: {
|
|
67
|
+
readonly light: "#7e5bd0";
|
|
68
|
+
readonly dark: "#b69fff";
|
|
69
|
+
};
|
|
70
|
+
readonly secondaryStrong: {
|
|
71
|
+
readonly light: "#6443ab";
|
|
72
|
+
readonly dark: "#cdbfff";
|
|
73
|
+
};
|
|
74
|
+
readonly secondaryContent: {
|
|
75
|
+
readonly light: "#ffffff";
|
|
76
|
+
readonly dark: "#11171c";
|
|
77
|
+
};
|
|
78
|
+
readonly tertiary: {
|
|
79
|
+
readonly light: "#007069";
|
|
80
|
+
readonly dark: "#5dcec5";
|
|
81
|
+
};
|
|
82
|
+
readonly tertiaryStrong: {
|
|
83
|
+
readonly light: "#00544f";
|
|
84
|
+
readonly dark: "#94e1da";
|
|
85
|
+
};
|
|
86
|
+
readonly tertiaryContent: {
|
|
87
|
+
readonly light: "#ffffff";
|
|
88
|
+
readonly dark: "#11171c";
|
|
89
|
+
};
|
|
90
|
+
readonly accent: {
|
|
91
|
+
readonly light: "#c13b7b";
|
|
92
|
+
readonly dark: "#ff81b6";
|
|
93
|
+
};
|
|
94
|
+
readonly accentStrong: {
|
|
95
|
+
readonly light: "#9c2661";
|
|
96
|
+
readonly dark: "#ffaecd";
|
|
97
|
+
};
|
|
98
|
+
readonly accentContent: {
|
|
99
|
+
readonly light: "#ffffff";
|
|
100
|
+
readonly dark: "#11171c";
|
|
101
|
+
};
|
|
102
|
+
readonly focusRing: {
|
|
103
|
+
readonly light: "var(--greese-color-primary)";
|
|
104
|
+
readonly dark: "var(--greese-color-primary-strong)";
|
|
105
|
+
};
|
|
106
|
+
readonly positive: {
|
|
107
|
+
readonly light: "#007231";
|
|
108
|
+
readonly dark: "#61cf7e";
|
|
109
|
+
};
|
|
110
|
+
readonly negative: {
|
|
111
|
+
readonly light: "#ae0914";
|
|
112
|
+
readonly dark: "#ff8b7f";
|
|
113
|
+
};
|
|
114
|
+
readonly negativeContent: {
|
|
115
|
+
readonly light: "#ffffff";
|
|
116
|
+
readonly dark: "#11171c";
|
|
117
|
+
};
|
|
118
|
+
readonly warning: {
|
|
119
|
+
readonly light: "#8a5f00";
|
|
120
|
+
readonly dark: "#feb93d";
|
|
121
|
+
};
|
|
122
|
+
readonly info: {
|
|
123
|
+
readonly light: "#00668f";
|
|
124
|
+
readonly dark: "#5ac0f7";
|
|
125
|
+
};
|
|
126
|
+
/** The ends of every ramp, the same in both schemes: ink and paper for anything drawn on a color. */
|
|
127
|
+
readonly white: {
|
|
128
|
+
readonly light: "#ffffff";
|
|
129
|
+
readonly dark: "#ffffff";
|
|
130
|
+
};
|
|
131
|
+
readonly black: {
|
|
132
|
+
readonly light: "#000000";
|
|
133
|
+
readonly dark: "#000000";
|
|
134
|
+
};
|
|
135
|
+
/** Dims the page behind modal dialogs and drawers. */
|
|
136
|
+
readonly scrim: {
|
|
137
|
+
readonly light: "color-mix(in srgb, var(--greese-color-black) 45%, transparent)";
|
|
138
|
+
readonly dark: "color-mix(in srgb, var(--greese-color-black) 60%, transparent)";
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
export type ColorRole = keyof typeof color;
|
|
142
|
+
/** Spacing scale, indexed: `space[2]` is `--greese-space-2`. */
|
|
143
|
+
export declare const space: {
|
|
144
|
+
readonly 0: "0";
|
|
145
|
+
readonly 1: "0.25rem";
|
|
146
|
+
readonly 2: "0.5rem";
|
|
147
|
+
readonly 3: "0.75rem";
|
|
148
|
+
readonly 4: "1rem";
|
|
149
|
+
readonly 5: "1.5rem";
|
|
150
|
+
readonly 6: "2rem";
|
|
151
|
+
readonly 7: "3rem";
|
|
152
|
+
readonly 8: "4rem";
|
|
153
|
+
};
|
|
154
|
+
export type SpaceToken = keyof typeof space;
|
|
155
|
+
export declare const radius: {
|
|
156
|
+
readonly none: "0";
|
|
157
|
+
readonly sm: "4px";
|
|
158
|
+
readonly md: "8px";
|
|
159
|
+
readonly lg: "16px";
|
|
160
|
+
readonly xl: "24px";
|
|
161
|
+
readonly pill: "999px";
|
|
162
|
+
readonly round: "50%";
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* The radius roles: what each kind of part takes from the radius scale. The
|
|
166
|
+
* components read these, never the scale directly, so a shape theme reassigns
|
|
167
|
+
* a role (`control: var(--greese-radius-none)`) and every token keeps its
|
|
168
|
+
* value (ADR 0025): `--greese-radius-md` is 8px under every theme.
|
|
169
|
+
*/
|
|
170
|
+
export declare const corner: {
|
|
171
|
+
/** Buttons, segmented controls, file pickers. */
|
|
172
|
+
readonly control: "var(--greese-radius-md)";
|
|
173
|
+
/** Text fields and selects, OTP cells. */
|
|
174
|
+
readonly field: "var(--greese-radius-md)";
|
|
175
|
+
/** Cards, dialogs, fieldsets, lists, stats, chat bubbles. */
|
|
176
|
+
readonly surface: "var(--greese-radius-lg)";
|
|
177
|
+
/** Alerts, tiles, tables, code, media, popovers and menus. */
|
|
178
|
+
readonly panel: "var(--greese-radius-md)";
|
|
179
|
+
/** Small parts inside others: tabs, menu items, tooltips, keys, checkboxes. */
|
|
180
|
+
readonly inset: "var(--greese-radius-sm)";
|
|
181
|
+
/** Badges, chips, tracks, progress bars. */
|
|
182
|
+
readonly pill: "var(--greese-radius-pill)";
|
|
183
|
+
/**
|
|
184
|
+
* Round parts that stand for something: knobs and thumbs, radios, step
|
|
185
|
+
* markers, avatars, status dots.
|
|
186
|
+
*/
|
|
187
|
+
readonly round: "var(--greese-radius-round)";
|
|
188
|
+
};
|
|
189
|
+
export declare const font: {
|
|
190
|
+
readonly body: "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif";
|
|
191
|
+
readonly mono: "ui-monospace, SFMono-Regular, Menlo, monospace";
|
|
192
|
+
};
|
|
193
|
+
export declare const fontWeight: {
|
|
194
|
+
readonly regular: "400";
|
|
195
|
+
readonly medium: "500";
|
|
196
|
+
readonly semibold: "600";
|
|
197
|
+
readonly bold: "700";
|
|
198
|
+
};
|
|
199
|
+
export declare const lineHeight: {
|
|
200
|
+
readonly tight: "1.25";
|
|
201
|
+
readonly snug: "1.375";
|
|
202
|
+
readonly normal: "1.5";
|
|
203
|
+
};
|
|
204
|
+
export declare const shadow: {
|
|
205
|
+
readonly sm: "0 1px 2px color-mix(in srgb, var(--greese-color-black) 8%, transparent)";
|
|
206
|
+
readonly md: "0 4px 12px color-mix(in srgb, var(--greese-color-black) 12%, transparent)";
|
|
207
|
+
readonly lg: "0 12px 32px color-mix(in srgb, var(--greese-color-black) 18%, transparent)";
|
|
208
|
+
};
|
|
209
|
+
export declare const zIndex: {
|
|
210
|
+
readonly dropdown: "1000";
|
|
211
|
+
readonly sticky: "1100";
|
|
212
|
+
readonly overlay: "1300";
|
|
213
|
+
readonly modal: "1400";
|
|
214
|
+
readonly popover: "1500";
|
|
215
|
+
readonly toast: "1600";
|
|
216
|
+
readonly tooltip: "1700";
|
|
217
|
+
};
|
|
218
|
+
/** Collapsed to near-zero under `prefers-reduced-motion: reduce`. */
|
|
219
|
+
export declare const duration: {
|
|
220
|
+
readonly fast: "120ms";
|
|
221
|
+
readonly normal: "200ms";
|
|
222
|
+
readonly slow: "320ms";
|
|
223
|
+
};
|
|
224
|
+
export declare const easing: {
|
|
225
|
+
readonly standard: "cubic-bezier(0.2, 0, 0, 1)";
|
|
226
|
+
readonly enter: "cubic-bezier(0, 0, 0, 1)";
|
|
227
|
+
readonly exit: "cubic-bezier(0.3, 0, 1, 1)";
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* Scheme-independent token groups, keyed by the custom-property group name:
|
|
231
|
+
* `lineHeight.tight` is `--greese-line-height-tight`.
|
|
232
|
+
*/
|
|
233
|
+
export declare const scalarTokens: {
|
|
234
|
+
readonly space: {
|
|
235
|
+
readonly 0: "0";
|
|
236
|
+
readonly 1: "0.25rem";
|
|
237
|
+
readonly 2: "0.5rem";
|
|
238
|
+
readonly 3: "0.75rem";
|
|
239
|
+
readonly 4: "1rem";
|
|
240
|
+
readonly 5: "1.5rem";
|
|
241
|
+
readonly 6: "2rem";
|
|
242
|
+
readonly 7: "3rem";
|
|
243
|
+
readonly 8: "4rem";
|
|
244
|
+
};
|
|
245
|
+
readonly radius: {
|
|
246
|
+
readonly none: "0";
|
|
247
|
+
readonly sm: "4px";
|
|
248
|
+
readonly md: "8px";
|
|
249
|
+
readonly lg: "16px";
|
|
250
|
+
readonly xl: "24px";
|
|
251
|
+
readonly pill: "999px";
|
|
252
|
+
readonly round: "50%";
|
|
253
|
+
};
|
|
254
|
+
readonly corner: {
|
|
255
|
+
/** Buttons, segmented controls, file pickers. */
|
|
256
|
+
readonly control: "var(--greese-radius-md)";
|
|
257
|
+
/** Text fields and selects, OTP cells. */
|
|
258
|
+
readonly field: "var(--greese-radius-md)";
|
|
259
|
+
/** Cards, dialogs, fieldsets, lists, stats, chat bubbles. */
|
|
260
|
+
readonly surface: "var(--greese-radius-lg)";
|
|
261
|
+
/** Alerts, tiles, tables, code, media, popovers and menus. */
|
|
262
|
+
readonly panel: "var(--greese-radius-md)";
|
|
263
|
+
/** Small parts inside others: tabs, menu items, tooltips, keys, checkboxes. */
|
|
264
|
+
readonly inset: "var(--greese-radius-sm)";
|
|
265
|
+
/** Badges, chips, tracks, progress bars. */
|
|
266
|
+
readonly pill: "var(--greese-radius-pill)";
|
|
267
|
+
/**
|
|
268
|
+
* Round parts that stand for something: knobs and thumbs, radios, step
|
|
269
|
+
* markers, avatars, status dots.
|
|
270
|
+
*/
|
|
271
|
+
readonly round: "var(--greese-radius-round)";
|
|
272
|
+
};
|
|
273
|
+
readonly font: {
|
|
274
|
+
readonly body: "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif";
|
|
275
|
+
readonly mono: "ui-monospace, SFMono-Regular, Menlo, monospace";
|
|
276
|
+
};
|
|
277
|
+
readonly fontWeight: {
|
|
278
|
+
readonly regular: "400";
|
|
279
|
+
readonly medium: "500";
|
|
280
|
+
readonly semibold: "600";
|
|
281
|
+
readonly bold: "700";
|
|
282
|
+
};
|
|
283
|
+
readonly lineHeight: {
|
|
284
|
+
readonly tight: "1.25";
|
|
285
|
+
readonly snug: "1.375";
|
|
286
|
+
readonly normal: "1.5";
|
|
287
|
+
};
|
|
288
|
+
readonly shadow: {
|
|
289
|
+
readonly sm: "0 1px 2px color-mix(in srgb, var(--greese-color-black) 8%, transparent)";
|
|
290
|
+
readonly md: "0 4px 12px color-mix(in srgb, var(--greese-color-black) 12%, transparent)";
|
|
291
|
+
readonly lg: "0 12px 32px color-mix(in srgb, var(--greese-color-black) 18%, transparent)";
|
|
292
|
+
};
|
|
293
|
+
readonly zIndex: {
|
|
294
|
+
readonly dropdown: "1000";
|
|
295
|
+
readonly sticky: "1100";
|
|
296
|
+
readonly overlay: "1300";
|
|
297
|
+
readonly modal: "1400";
|
|
298
|
+
readonly popover: "1500";
|
|
299
|
+
readonly toast: "1600";
|
|
300
|
+
readonly tooltip: "1700";
|
|
301
|
+
};
|
|
302
|
+
readonly duration: {
|
|
303
|
+
readonly fast: "120ms";
|
|
304
|
+
readonly normal: "200ms";
|
|
305
|
+
readonly slow: "320ms";
|
|
306
|
+
};
|
|
307
|
+
readonly easing: {
|
|
308
|
+
readonly standard: "cubic-bezier(0.2, 0, 0, 1)";
|
|
309
|
+
readonly enter: "cubic-bezier(0, 0, 0, 1)";
|
|
310
|
+
readonly exit: "cubic-bezier(0.3, 0, 1, 1)";
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
export type ScalarGroup = keyof typeof scalarTokens;
|
|
314
|
+
/**
|
|
315
|
+
* Mobile-first breakpoints: each value is a `min-width` in px. The defaults
|
|
316
|
+
* every responsive prop is resolved against.
|
|
317
|
+
*
|
|
318
|
+
* Media queries cannot read custom properties, so these are compile-time
|
|
319
|
+
* constants in the CSS; changing them means recompiling the SCSS.
|
|
320
|
+
*/
|
|
321
|
+
export declare const breakpoints: Readonly<Record<Breakpoint, number>>;
|
|
322
|
+
/**
|
|
323
|
+
* The breakpoint names. Open for more: a build that adds keys to the SCSS
|
|
324
|
+
* `$breakpoints` (`tablet: 700px`) tells TypeScript with
|
|
325
|
+
*
|
|
326
|
+
* ```ts
|
|
327
|
+
* declare module '@greese/ui' {
|
|
328
|
+
* interface BreakpointKeys { tablet: true }
|
|
329
|
+
* }
|
|
330
|
+
* ```
|
|
331
|
+
*
|
|
332
|
+
* so `Responsive<T>` accepts `{ tablet: … }` too.
|
|
333
|
+
*/
|
|
334
|
+
export interface BreakpointKeys {
|
|
335
|
+
xs: true;
|
|
336
|
+
sm: true;
|
|
337
|
+
md: true;
|
|
338
|
+
lg: true;
|
|
339
|
+
xl: true;
|
|
340
|
+
}
|
|
341
|
+
export type Breakpoint = keyof BreakpointKeys;
|
|
342
|
+
/** The built-in breakpoint keys, smallest first. */
|
|
343
|
+
export declare const breakpointKeys: Breakpoint[];
|
package/dist/tokens.js
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design tokens. The single source of truth for every visual value in greese ui.
|
|
3
|
+
*
|
|
4
|
+
* `scripts/build-css.ts` turns this module into dist/tokens.css and
|
|
5
|
+
* dist/_tokens.scss; `createTheme()` overrides any of it at runtime-free cost.
|
|
6
|
+
*
|
|
7
|
+
* Semantic names (canvas, surface, fg, primary) rather than palette names
|
|
8
|
+
* (blue-500) so light/dark and future rebrands change one layer, not markup.
|
|
9
|
+
*
|
|
10
|
+
* Imports only the palette, and only the hues it uses: the build script runs
|
|
11
|
+
* this directly under Node's type stripping, so imports name their `.ts` file.
|
|
12
|
+
*/
|
|
13
|
+
import { azure, black, blue, gold, green, lavender, pink, red, steel, turquoise, white, } from "./palette.js";
|
|
14
|
+
/**
|
|
15
|
+
* Semantic color roles, light and dark. Every value is a palette color, read
|
|
16
|
+
* from palette.ts so a change there reaches every role. The palette is one
|
|
17
|
+
* export per hue, so a bundle carries only the hues named here, and only if
|
|
18
|
+
* it uses `color` at all: the pure annotation tells bundlers that reading the
|
|
19
|
+
* palette has no side effects, so an unused `color` drops its hues with it.
|
|
20
|
+
* `white` and `black` are the ends of every ramp.
|
|
21
|
+
*
|
|
22
|
+
* The brand colors, in order: `primary` (what components use for
|
|
23
|
+
* interactive emphasis: solid buttons, links, focus, selection),
|
|
24
|
+
* `secondary`, `tertiary` and `accent`. Each has a `Strong` shade (hover,
|
|
25
|
+
* text on the canvas) and a `Content` color for text and icons drawn on it,
|
|
26
|
+
* which meets WCAG AA (4.5:1) against it in both schemes (tokens.test.ts).
|
|
27
|
+
* `createTheme` derives both when a theme sets only the main color.
|
|
28
|
+
*/
|
|
29
|
+
export const color = /* @__PURE__ */ (() => ({
|
|
30
|
+
canvas: { light: white, dark: steel[999] },
|
|
31
|
+
surface: { light: steel[50], dark: steel[900] },
|
|
32
|
+
surfaceOverlay: { light: white, dark: steel[800] },
|
|
33
|
+
fg: { light: steel[999], dark: steel[100] },
|
|
34
|
+
fgMuted: { light: steel[700], dark: steel[400] },
|
|
35
|
+
border: { light: steel[200], dark: steel[800] },
|
|
36
|
+
borderStrong: { light: steel[400], dark: steel[700] },
|
|
37
|
+
// The empty part of a progress bar, a slider or a radial progress: lighter
|
|
38
|
+
// than the borders in dark mode, so it shows on the canvas and on surfaces.
|
|
39
|
+
track: { light: steel[200], dark: steel[600] },
|
|
40
|
+
primary: { light: blue[600], dark: blue[400] },
|
|
41
|
+
primaryStrong: { light: blue[700], dark: blue[300] },
|
|
42
|
+
primaryContent: { light: white, dark: steel[999] },
|
|
43
|
+
secondary: { light: lavender[600], dark: lavender[400] },
|
|
44
|
+
secondaryStrong: { light: lavender[700], dark: lavender[300] },
|
|
45
|
+
secondaryContent: { light: white, dark: steel[999] },
|
|
46
|
+
tertiary: { light: turquoise[700], dark: turquoise[400] },
|
|
47
|
+
tertiaryStrong: { light: turquoise[800], dark: turquoise[300] },
|
|
48
|
+
tertiaryContent: { light: white, dark: steel[999] },
|
|
49
|
+
accent: { light: pink[600], dark: pink[400] },
|
|
50
|
+
accentStrong: { light: pink[700], dark: pink[300] },
|
|
51
|
+
accentContent: { light: white, dark: steel[999] },
|
|
52
|
+
focusRing: {
|
|
53
|
+
light: 'var(--greese-color-primary)',
|
|
54
|
+
dark: 'var(--greese-color-primary-strong)',
|
|
55
|
+
},
|
|
56
|
+
positive: { light: green[700], dark: green[400] },
|
|
57
|
+
negative: { light: red[700], dark: red[400] },
|
|
58
|
+
negativeContent: { light: white, dark: steel[999] },
|
|
59
|
+
warning: { light: gold[700], dark: gold[400] },
|
|
60
|
+
info: { light: azure[700], dark: azure[400] },
|
|
61
|
+
/** The ends of every ramp, the same in both schemes: ink and paper for anything drawn on a color. */
|
|
62
|
+
white: { light: white, dark: white },
|
|
63
|
+
black: { light: black, dark: black },
|
|
64
|
+
/** Dims the page behind modal dialogs and drawers. */
|
|
65
|
+
scrim: {
|
|
66
|
+
light: 'color-mix(in srgb, var(--greese-color-black) 45%, transparent)',
|
|
67
|
+
dark: 'color-mix(in srgb, var(--greese-color-black) 60%, transparent)',
|
|
68
|
+
},
|
|
69
|
+
}))();
|
|
70
|
+
/** Spacing scale, indexed: `space[2]` is `--greese-space-2`. */
|
|
71
|
+
export const space = {
|
|
72
|
+
0: '0',
|
|
73
|
+
1: '0.25rem',
|
|
74
|
+
2: '0.5rem',
|
|
75
|
+
3: '0.75rem',
|
|
76
|
+
4: '1rem',
|
|
77
|
+
5: '1.5rem',
|
|
78
|
+
6: '2rem',
|
|
79
|
+
7: '3rem',
|
|
80
|
+
8: '4rem',
|
|
81
|
+
};
|
|
82
|
+
export const radius = {
|
|
83
|
+
none: '0',
|
|
84
|
+
sm: '4px',
|
|
85
|
+
md: '8px',
|
|
86
|
+
lg: '16px',
|
|
87
|
+
xl: '24px',
|
|
88
|
+
pill: '999px',
|
|
89
|
+
round: '50%',
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* The radius roles: what each kind of part takes from the radius scale. The
|
|
93
|
+
* components read these, never the scale directly, so a shape theme reassigns
|
|
94
|
+
* a role (`control: var(--greese-radius-none)`) and every token keeps its
|
|
95
|
+
* value (ADR 0025): `--greese-radius-md` is 8px under every theme.
|
|
96
|
+
*/
|
|
97
|
+
export const corner = {
|
|
98
|
+
/** Buttons, segmented controls, file pickers. */
|
|
99
|
+
control: 'var(--greese-radius-md)',
|
|
100
|
+
/** Text fields and selects, OTP cells. */
|
|
101
|
+
field: 'var(--greese-radius-md)',
|
|
102
|
+
/** Cards, dialogs, fieldsets, lists, stats, chat bubbles. */
|
|
103
|
+
surface: 'var(--greese-radius-lg)',
|
|
104
|
+
/** Alerts, tiles, tables, code, media, popovers and menus. */
|
|
105
|
+
panel: 'var(--greese-radius-md)',
|
|
106
|
+
/** Small parts inside others: tabs, menu items, tooltips, keys, checkboxes. */
|
|
107
|
+
inset: 'var(--greese-radius-sm)',
|
|
108
|
+
/** Badges, chips, tracks, progress bars. */
|
|
109
|
+
pill: 'var(--greese-radius-pill)',
|
|
110
|
+
/**
|
|
111
|
+
* Round parts that stand for something: knobs and thumbs, radios, step
|
|
112
|
+
* markers, avatars, status dots.
|
|
113
|
+
*/
|
|
114
|
+
round: 'var(--greese-radius-round)',
|
|
115
|
+
};
|
|
116
|
+
export const font = {
|
|
117
|
+
body: "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
|
|
118
|
+
mono: 'ui-monospace, SFMono-Regular, Menlo, monospace',
|
|
119
|
+
};
|
|
120
|
+
export const fontWeight = {
|
|
121
|
+
regular: '400',
|
|
122
|
+
medium: '500',
|
|
123
|
+
semibold: '600',
|
|
124
|
+
bold: '700',
|
|
125
|
+
};
|
|
126
|
+
export const lineHeight = { tight: '1.25', snug: '1.375', normal: '1.5' };
|
|
127
|
+
export const shadow = {
|
|
128
|
+
sm: '0 1px 2px color-mix(in srgb, var(--greese-color-black) 8%, transparent)',
|
|
129
|
+
md: '0 4px 12px color-mix(in srgb, var(--greese-color-black) 12%, transparent)',
|
|
130
|
+
lg: '0 12px 32px color-mix(in srgb, var(--greese-color-black) 18%, transparent)',
|
|
131
|
+
};
|
|
132
|
+
export const zIndex = {
|
|
133
|
+
dropdown: '1000',
|
|
134
|
+
sticky: '1100',
|
|
135
|
+
overlay: '1300',
|
|
136
|
+
modal: '1400',
|
|
137
|
+
popover: '1500',
|
|
138
|
+
toast: '1600',
|
|
139
|
+
tooltip: '1700',
|
|
140
|
+
};
|
|
141
|
+
/** Collapsed to near-zero under `prefers-reduced-motion: reduce`. */
|
|
142
|
+
export const duration = { fast: '120ms', normal: '200ms', slow: '320ms' };
|
|
143
|
+
export const easing = {
|
|
144
|
+
standard: 'cubic-bezier(0.2, 0, 0, 1)',
|
|
145
|
+
enter: 'cubic-bezier(0, 0, 0, 1)',
|
|
146
|
+
exit: 'cubic-bezier(0.3, 0, 1, 1)',
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Scheme-independent token groups, keyed by the custom-property group name:
|
|
150
|
+
* `lineHeight.tight` is `--greese-line-height-tight`.
|
|
151
|
+
*/
|
|
152
|
+
export const scalarTokens = {
|
|
153
|
+
space,
|
|
154
|
+
radius,
|
|
155
|
+
corner,
|
|
156
|
+
font,
|
|
157
|
+
fontWeight,
|
|
158
|
+
lineHeight,
|
|
159
|
+
shadow,
|
|
160
|
+
zIndex,
|
|
161
|
+
duration,
|
|
162
|
+
easing,
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* Mobile-first breakpoints: each value is a `min-width` in px. The defaults
|
|
166
|
+
* every responsive prop is resolved against.
|
|
167
|
+
*
|
|
168
|
+
* Media queries cannot read custom properties, so these are compile-time
|
|
169
|
+
* constants in the CSS; changing them means recompiling the SCSS.
|
|
170
|
+
*/
|
|
171
|
+
export const breakpoints = {
|
|
172
|
+
xs: 0,
|
|
173
|
+
sm: 600,
|
|
174
|
+
md: 900,
|
|
175
|
+
lg: 1200,
|
|
176
|
+
xl: 1536,
|
|
177
|
+
};
|
|
178
|
+
/** The built-in breakpoint keys, smallest first. */
|
|
179
|
+
export const breakpointKeys = Object.keys(breakpoints);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type Breakpoint } from './tokens.ts';
|
|
2
|
+
import { type Declarations } from './css.ts';
|
|
3
|
+
/**
|
|
4
|
+
* The type system: named text styles that change across breakpoints.
|
|
5
|
+
*
|
|
6
|
+
* Each variant has values for font size, weight, letter spacing and line
|
|
7
|
+
* height, plus any of a few other text properties. They're custom properties,
|
|
8
|
+
* `--greese-type-<variant>-<css-property>`, set mobile-first: `base` applies from the
|
|
9
|
+
* smallest screen, and a value set at a breakpoint applies from there up until
|
|
10
|
+
* a larger breakpoint sets another. Only values that change are written.
|
|
11
|
+
* `.greese-Type--<variant>` applies a variant's properties to any element, and
|
|
12
|
+
* Text and Heading take it as `variant`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const typeVariants: readonly ["p1", "p2", "p3", "h1", "h2", "h3", "h4", "h5", "h6", "s1", "s2", "caption", "button"];
|
|
15
|
+
export type TypeVariant = (typeof typeVariants)[number];
|
|
16
|
+
/**
|
|
17
|
+
* The four properties every variant has. Names are the CSS properties in
|
|
18
|
+
* their JavaScript form (`fontSize` for `font-size`), as in React's `style`.
|
|
19
|
+
*/
|
|
20
|
+
export declare const typeCoreProps: readonly ["fontSize", "fontWeight", "letterSpacing", "lineHeight"];
|
|
21
|
+
/**
|
|
22
|
+
* Other properties a variant may set: unset ones inherit, so a variant that
|
|
23
|
+
* doesn't mention `textTransform` leaves `text-transform` alone.
|
|
24
|
+
*/
|
|
25
|
+
export declare const typeExtraProps: readonly ["color", "fontFamily", "fontStyle", "textTransform", "fontFeatureSettings", "fontVariationSettings", "fontStretch", "textWrap", "wordSpacing", "fontVariantNumeric"];
|
|
26
|
+
export declare const typeProps: readonly ["fontSize", "fontWeight", "letterSpacing", "lineHeight", "color", "fontFamily", "fontStyle", "textTransform", "fontFeatureSettings", "fontVariationSettings", "fontStretch", "textWrap", "wordSpacing", "fontVariantNumeric"];
|
|
27
|
+
/** `fontSize` → `font-size`: the CSS property a type property sets. */
|
|
28
|
+
export declare const cssProperty: (prop: string) => string;
|
|
29
|
+
/** `font-size` → `fontSize`, for reading CSS back in. */
|
|
30
|
+
export declare const typePropName: (property: string) => string;
|
|
31
|
+
export type TypeCoreProp = (typeof typeCoreProps)[number];
|
|
32
|
+
export type TypeExtraProp = (typeof typeExtraProps)[number];
|
|
33
|
+
export type TypeProp = TypeCoreProp | TypeExtraProp;
|
|
34
|
+
/** One breakpoint's values for a variant. */
|
|
35
|
+
export type TypeStyle = Partial<Record<TypeProp, string>>;
|
|
36
|
+
/** A variant: `base`, and the changes at each breakpoint (`md: { fontSize: '3rem' }`). */
|
|
37
|
+
export type TypeSpec = {
|
|
38
|
+
base?: TypeStyle;
|
|
39
|
+
} & Partial<Record<Breakpoint, TypeStyle>>;
|
|
40
|
+
export type Typography = Record<TypeVariant, TypeSpec>;
|
|
41
|
+
/** The defaults, in rem so they follow the user's text-size setting. */
|
|
42
|
+
export declare const typography: Typography;
|
|
43
|
+
/** `--greese-type-h1-font-size`, for the type property `fontSize`. */
|
|
44
|
+
export declare const typeVar: (variant: string, prop: string) => string;
|
|
45
|
+
/**
|
|
46
|
+
* The defaults with your changes on top, per variant and breakpoint: what you
|
|
47
|
+
* set replaces the default at that exact point, and everything else (the other
|
|
48
|
+
* breakpoints too) stays.
|
|
49
|
+
*/
|
|
50
|
+
export declare const mergeTypography: (base: Typography, changes?: Partial<Record<TypeVariant, TypeSpec>>) => Typography;
|
|
51
|
+
/**
|
|
52
|
+
* The declarations of each breakpoint, smallest first: `[min-width in px or
|
|
53
|
+
* 0 for base, declarations]`. A breakpoint with nothing to say is left out.
|
|
54
|
+
*/
|
|
55
|
+
export declare const typographyByBreakpoint: (spec: Partial<Record<TypeVariant, TypeSpec>>, widths?: Record<string, number>) => Array<[number, Declarations]>;
|