@ferrlabs/ui-foundation 5.11.2 → 5.13.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/README.md +8 -6
- package/package.json +1 -1
- package/src/styles/global.css +1 -0
- package/src/styles/tokens.css +6 -5
package/README.md
CHANGED
|
@@ -26,8 +26,8 @@ is the default editorial look.
|
|
|
26
26
|
|
|
27
27
|
| `data-style` | Radii (control / card / modal) | Font | `--control-height` |
|
|
28
28
|
| ------------ | ------------------------------ | -------- | ------------------ |
|
|
29
|
-
| (none) |
|
|
30
|
-
| `precision` |
|
|
29
|
+
| (none) | 8px / 16px / 24px | Fraunces | 40px |
|
|
30
|
+
| `precision` | 4px / 4px / 6px | Geist | 36px |
|
|
31
31
|
| `soft` | 8px / 12px / 16px | Geist | 36px |
|
|
32
32
|
|
|
33
33
|
`--control-height` is the `md` height of buttons, inputs, selects, search fields,
|
|
@@ -68,12 +68,14 @@ import { icons } from '@ferrlabs/ui-foundation/icons';
|
|
|
68
68
|
|
|
69
69
|
| Token | Value | Tailwind utility | Use |
|
|
70
70
|
| ------------------ | ----- | ----------------- | --------------------------------------------------- |
|
|
71
|
-
| `--radius-control` |
|
|
72
|
-
| `--radius-card` |
|
|
73
|
-
| `--radius-modal` |
|
|
71
|
+
| `--radius-control` | 8px | `rounded-control` | Buttons, inputs, selects, search, tabs, small chips |
|
|
72
|
+
| `--radius-card` | 16px | `rounded-card` | Cards, menus, popovers, rail items |
|
|
73
|
+
| `--radius-modal` | 24px | `rounded-modal` | Modals, switcher panels, large surfaces |
|
|
74
74
|
| `--radius-full` | 999px | `rounded-full` | Switch, avatar, badges, status dots |
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
`--corner-shape` (`squircle`) is applied with `corner-shape` next to the tokenized radii. Browsers without `corner-shape` support (Chromium 139+ only for now) keep plain rounded corners.
|
|
77
|
+
|
|
78
|
+
`.btn-primary` and `.btn-ghost` use `--radius-control` and `--corner-shape`.
|
|
77
79
|
|
|
78
80
|
Both are at least 44px tall. `.btn-primary` fills with `--accent` and derives its text colour from it: white on dark accents, black on light ones, so every product accent clears 4.5:1 (slate 14.6, orange 6.9, emerald 8.3, indigo 4.7, violet 5.0, amber 9.8, teal 8.4). Browsers without relative colour syntax keep white text.
|
|
79
81
|
|
package/package.json
CHANGED
package/src/styles/global.css
CHANGED
package/src/styles/tokens.css
CHANGED
|
@@ -95,10 +95,11 @@
|
|
|
95
95
|
* Utilities: `rounded-control`, `rounded-card`, `rounded-modal`.
|
|
96
96
|
*/
|
|
97
97
|
@theme static {
|
|
98
|
-
--radius-control:
|
|
99
|
-
--radius-card:
|
|
100
|
-
--radius-modal:
|
|
98
|
+
--radius-control: 8px; /* Buttons, inputs, selects, tabs, small chips */
|
|
99
|
+
--radius-card: 16px; /* Cards, menus, popovers, rail items */
|
|
100
|
+
--radius-modal: 24px; /* Modals, switcher panels, large surfaces */
|
|
101
101
|
--radius-full: 999px; /* Switch, avatar, badges, status dots */
|
|
102
|
+
--corner-shape: squircle;
|
|
102
103
|
--control-height: 40px;
|
|
103
104
|
}
|
|
104
105
|
|
|
@@ -148,12 +149,12 @@ html[data-theme='dark'] {
|
|
|
148
149
|
}
|
|
149
150
|
|
|
150
151
|
html[data-style='precision'] {
|
|
151
|
-
--radius-control:
|
|
152
|
+
--radius-control: 4px;
|
|
152
153
|
--radius-card: 4px;
|
|
153
154
|
--radius-modal: 6px;
|
|
154
155
|
--font-sans: 'Geist Sans', system-ui, sans-serif;
|
|
155
156
|
--font-display: 'Geist Sans', system-ui, sans-serif;
|
|
156
|
-
--control-height:
|
|
157
|
+
--control-height: 36px;
|
|
157
158
|
}
|
|
158
159
|
|
|
159
160
|
html[data-style='soft'] {
|