@leitware/composables 1.0.0 → 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/README.md +3 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/rules/composables.md +59 -59
- package/skills/use-composables/references/public-api.md +1 -1
- package/src/_internal/alert.tsx +1 -1
- package/src/_internal/badge.tsx +10 -2
- package/src/_internal/button.tsx +16 -4
- package/src/_internal/toggle-group.tsx +4 -2
- package/src/index.ts +33 -10
- package/src/opinionated/accordion.tsx +22 -3
- package/src/opinionated/alert.tsx +21 -7
- package/src/opinionated/badge.tsx +17 -2
- package/src/opinionated/button.tsx +4 -0
- package/src/opinionated/tabs.tsx +16 -3
package/README.md
CHANGED
|
@@ -265,10 +265,13 @@ Key token groups:
|
|
|
265
265
|
| Typography | `--font-size-base`, `--leading-base`, `--font-heading` |
|
|
266
266
|
| Spacing | `--spacing` (base unit, used in `calc()`) |
|
|
267
267
|
| Shape | `--radius`, `--radius-sm`, `--radius-lg` |
|
|
268
|
+
| Control shape | `--button-radius`, `--badge-radius`, `--input-radius`, `--card-radius` |
|
|
268
269
|
| Motion | `--motion-duration-overlay`, `--motion-duration-disclosure`, `--motion-ease-standard` |
|
|
269
270
|
|
|
270
271
|
The entire type scale derives from `--font-size-base` and `--leading-base` — adjust those two tokens to scale all text globally.
|
|
271
272
|
|
|
273
|
+
Control rounding is deliberately two-level. `--radius` drives the shared scale (`--radius-sm` … `--radius-4xl`) used by surfaces such as cards, dialogs, and alerts, while the component tokens `--button-radius` and `--badge-radius` decide button and badge corners independently — set `--button-radius: 9999px` for a pill-button theme without distorting anything else. For one-off exceptions, `Button` and `Badge` also accept `shape="pill"` (fully rounded; icon-size buttons become circles).
|
|
274
|
+
|
|
272
275
|
### Motion Modes
|
|
273
276
|
|
|
274
277
|
Set a motion mode on `html`, `body`, or any subtree:
|