@codenhub/styles 0.0.2 → 0.0.3

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.
@@ -0,0 +1,30 @@
1
+ @import "tailwindcss";
2
+ @import "./theme.css";
3
+
4
+ @utility text-display {
5
+ @apply text-6xl font-bold tracking-tight md:text-8xl;
6
+ }
7
+
8
+ @utility text-title-lg {
9
+ @apply text-5xl font-bold tracking-tight md:text-6xl;
10
+ }
11
+
12
+ @utility text-title {
13
+ @apply text-3xl font-bold tracking-tight;
14
+ }
15
+
16
+ @utility text-title-sm {
17
+ @apply text-xl font-semibold tracking-tight;
18
+ }
19
+
20
+ @utility text-label-lg {
21
+ @apply text-lg font-medium tracking-wide;
22
+ }
23
+
24
+ @utility text-label {
25
+ @apply text-base font-medium tracking-wide;
26
+ }
27
+
28
+ @utility text-body {
29
+ @apply text-sm font-normal tracking-wider;
30
+ }
@@ -0,0 +1,40 @@
1
+ @import "tailwindcss";
2
+ @import "./theme.css";
3
+
4
+ @utility stack {
5
+ @apply flex flex-col gap-(--layout-stack-gap);
6
+
7
+ &.tight {
8
+ --layout-stack-gap: 0.5rem;
9
+ }
10
+
11
+ &.loose {
12
+ --layout-stack-gap: 1.5rem;
13
+ }
14
+ }
15
+
16
+ @utility cluster {
17
+ @apply flex flex-wrap items-center gap-(--layout-cluster-gap);
18
+
19
+ &.between {
20
+ @apply justify-between;
21
+ }
22
+ }
23
+
24
+ @utility auto-grid {
25
+ @apply grid gap-(--layout-stack-gap);
26
+
27
+ grid-template-columns: repeat(auto-fit, minmax(min(var(--layout-grid-min), 100%), 1fr));
28
+ }
29
+
30
+ @utility selection-contrast {
31
+ &::selection,
32
+ & *::selection {
33
+ background: var(--color-primary-contrast);
34
+ color: var(--color-primary);
35
+ }
36
+ }
37
+
38
+ @utility code {
39
+ @apply bg-surface rounded-(--radius-small) px-1 py-0.5 font-mono;
40
+ }
package/.docs/roadmap.md DELETED
@@ -1,63 +0,0 @@
1
- # Roadmap
2
-
3
- **Status:** APPROVED
4
- **Last updated:** 2026-06-18
5
- **Scope:** `@codenhub/styles` package direction.
6
-
7
- ## Purpose
8
-
9
- This roadmap tracks durable direction for `@codenhub/styles`. It captures styling-system improvements that should guide future changes without turning this document into a release checklist.
10
-
11
- ## Recently Completed
12
-
13
- - Published the v0.0.2 foundation: tokens, helper classes, accessibility notes, and test strategy.
14
- - Added package-shipped `.docs` files and kept the README focused on quickstart usage plus links to durable docs.
15
- - Added foundational design tokens for colors, layout, radius, motion, focus, shadows, layering, and dark mode.
16
- - Added primary and secondary companion tokens (`--color-primary-subtle`, `--color-primary-strong`, `--color-accent-subtle`, `--color-accent-strong`).
17
- - Expanded helper classes for layout, surfaces, buttons, forms, feedback, loading indicators, progress, empty states, and tooltips.
18
- - Added preview and browser coverage for compiled CSS and Tailwind source CSS consumer paths.
19
- - Refactored component helpers toward Tailwind-first source usage with `@apply` for static utility-like styling.
20
- - Preserved composable button intent classes and presentation classes, including `.btn.error` inside `.field`.
21
- - Reduced selector leakage by nesting related component styles where CSS nesting clearly scopes variants, states, pseudo-elements, and descendants to their owning helper class.
22
- - Improved button presentation compatibility: button intents map color tone variants into scoped button slots, while `.ghost`, `.out`, and `.soft` own how those slots become presentation styles.
23
- - Added semantic hover tokens for success, warning, destructive, and info intents.
24
- - Renamed companion tone tokens from light/dark to subtle/strong so their names describe role instead of theme luminance.
25
- - Kept loading buttons from animating color-related transitions so spinner and surface colors stay synchronized during theme changes.
26
- - Added `.soft` and `.pill` as formally supported presentation classes with consistent docs and tests.
27
- - Added `.banner` as a full-width, border-x-0 static feedback surface that extends the `.alert` token foundation.
28
- - Refactored `.toast` so it shares the feedback token foundation with `.alert`, adds placement and overlay-specific treatment, and uses `--elevation-overlay` for its shadow.
29
- - Split motion tokens by use case: `--motion-duration-fast` for buttons and inputs, `--motion-duration-normal` for layout and modals, `--motion-duration-slow` for skeleton and progress transitions.
30
- - Replaced raw shadow tokens with semantic elevation tokens: `--elevation-low`, `--elevation-mid`, `--elevation-high`, `--elevation-overlay`.
31
- - Added an internal theme toggle to the preview, fixed in the bottom-right corner.
32
- - Tightened public token roles by removing legacy root tokens and treating component-scoped variables as internal implementation details.
33
- - Updated semantic contrast tokens so filled intent buttons meet 3:1 UI component contrast requirements.
34
- - Added regression coverage for filled semantic button contrast, presentation/intent tone slot composition, loading transition behavior, and legacy token removal.
35
-
36
- ## Planned
37
-
38
- - Consider adding more presentation classes for buttons (e.g. `loading` state enhancements) once component APIs stabilize.
39
- - Add more explicit compatibility tests for intent and presentation combinations when new combinations are supported.
40
-
41
- ## Later / Possible
42
-
43
- - Evaluate whether `@codenhub/theme` should provide theme-toggle behavior if the need grows beyond a preview helper.
44
-
45
- ## Not Planned
46
-
47
- - Aesthetic profile classes such as `.glassmorphism` or `.brutalism` are not planned for the current foundation work. The package should first improve token roles, composition behavior, accessibility hooks, and helper compatibility.
48
- - Public JavaScript behavior is not planned for `@codenhub/styles` right now. Toast dismissal, focus management, and app-level theme state remain outside the CSS package unless a future package decision changes the runtime surface.
49
-
50
- ## Notes
51
-
52
- - Prefer scoped CSS nesting when it improves containment, but do not nest only for style. Top-level helper classes are still appropriate when they are intentional public contracts.
53
- - Presentation classes should document unsupported combinations instead of silently producing inaccessible or visually broken output.
54
- - If toasts become dismissible in examples or docs, the dismissal behavior must be supplied by a consumer or by a separate runtime package, not implied by CSS alone.
55
- - Color intent tokens own semantic tone values. Components should consume those tokens through scoped slots instead of adding broad theme-specific branches.
56
-
57
- ## References
58
-
59
- - [Overview](./index.md)
60
- - [Tokens](./tokens.md)
61
- - [Classes](./classes.md)
62
- - [Accessibility](./accessibility.md)
63
- - [Tests](./tests.md)