@leitware/composables 1.3.1 → 1.3.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.
- package/README.md +4 -4
- package/dist/presets/brutalist.css +1 -1
- package/dist/presets/default.css +1 -1
- package/dist/presets/signal-pop.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/rules/composables.md +47 -47
- package/skills/use-composables/references/optional-dependencies.md +1 -1
- package/skills/use-composables/references/public-api.md +1 -1
- package/src/_internal/ai-elements/code-block.tsx +1 -1
- package/src/_internal/bubble.tsx +1 -1
- package/src/_internal/grid-overlay.tsx +1 -1
- package/src/_internal/layout-bento.tsx +11 -11
- package/src/_internal/layout.tsx +11 -11
- package/src/index.ts +56 -1
- package/src/lib/utils.ts +2 -2
- package/src/opinionated/alert.tsx +5 -5
- package/src/opinionated/button.tsx +1 -1
- package/src/opinionated/theme-injector.tsx +2 -2
- package/src/opinionated/token-config-panel/spacing-editor.tsx +1 -1
- package/src/opinionated/token-config-panel/types.ts +1 -1
- package/src/opinionated/token-config-panel/typography-editor.tsx +1 -1
- package/src/styles/composable.css +10 -10
- package/src/styles/presets/brutalist.css +1 -1
- package/src/styles/presets/default.css +1 -1
- package/src/styles/presets/signal-pop.css +1 -1
- package/src/styles/presets-data/brutalist.ts +8 -8
- package/src/styles/presets-data/default.ts +3 -3
- package/src/styles/tokens/base.css +1 -1
- package/src/styles/tokens/palette.css +2 -2
- package/src/styles/tokens/semantic.css +1 -1
- package/src/styles/tokens/tailwind-theme.css +7 -7
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/* ============================================================================
|
|
2
|
-
@leitware/composables
|
|
2
|
+
@leitware/composables - Main Stylesheet
|
|
3
3
|
============================================================================
|
|
4
4
|
Design tokens, theme registration, and base styles for the component system.
|
|
5
|
-
This file does NOT include Tailwind itself
|
|
5
|
+
This file does NOT include Tailwind itself - the downstream app owns that.
|
|
6
6
|
See README.md "Quick Start" for the full import pattern.
|
|
7
7
|
|
|
8
8
|
File structure:
|
|
9
|
-
tokens/palette.css
|
|
10
|
-
tokens/tailwind-color-adapter.css
|
|
11
|
-
tokens/tailwind-theme.css
|
|
12
|
-
tokens/semantic.css
|
|
13
|
-
tokens/components.css
|
|
14
|
-
presets/default.css
|
|
15
|
-
tokens/semantic-utilities.css
|
|
16
|
-
tokens/base.css
|
|
9
|
+
tokens/palette.css - Primitive color scales (build-time + runtime)
|
|
10
|
+
tokens/tailwind-color-adapter.css - Generated Tailwind color aliases
|
|
11
|
+
tokens/tailwind-theme.css - Non-color Tailwind theme registrations
|
|
12
|
+
tokens/semantic.css - Semantic role tokens (:root + .dark)
|
|
13
|
+
tokens/components.css - Component-level tunables
|
|
14
|
+
presets/default.css - The canonical default light/dark preset
|
|
15
|
+
tokens/semantic-utilities.css - Generated public semantic classes
|
|
16
|
+
tokens/base.css - Global base styles (@layer base)
|
|
17
17
|
============================================================================ */
|
|
18
18
|
|
|
19
19
|
@import 'shadcn/tailwind.css';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* ============================================================================
|
|
2
|
-
@leitware/composables
|
|
2
|
+
@leitware/composables - Brutalist Preset
|
|
3
3
|
============================================================================
|
|
4
4
|
Raw, architectural, uncompromising. Structural honesty: things look exactly like what they are.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* ============================================================================
|
|
2
|
-
@leitware/composables
|
|
2
|
+
@leitware/composables - Default Preset
|
|
3
3
|
============================================================================
|
|
4
4
|
Clean, neutral, Inter-based. The "no opinion" starting point.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* ============================================================================
|
|
2
|
-
@leitware/composables
|
|
2
|
+
@leitware/composables - Signal Pop Preset
|
|
3
3
|
============================================================================
|
|
4
4
|
Bright consumer-tech energy: electric modules, capsule controls, hard outlines, and codey labels.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Brutalist
|
|
2
|
+
* Brutalist - Raw, architectural, uncompromising.
|
|
3
3
|
* Studied references: Bloomberg Terminal aesthetic, Balenciaga.com restraint,
|
|
4
4
|
* Ssense editorial rigour. High contrast without being garish.
|
|
5
5
|
*
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* about structural honesty: things look exactly like what they are.
|
|
8
8
|
*
|
|
9
9
|
* Fonts:
|
|
10
|
-
* Heading
|
|
10
|
+
* Heading - Space Grotesk Variable: constructed, slightly mechanical,
|
|
11
11
|
* pairs well with mono body without feeling like a joke.
|
|
12
|
-
* Body
|
|
12
|
+
* Body - Space Grotesk Variable: the Bloomberg terminal aesthetic. Readable,
|
|
13
13
|
* functional, carries authority. Uncompromising.
|
|
14
14
|
*
|
|
15
15
|
* Character: zero border-radius, heavy borders, hard offset shadows,
|
|
@@ -126,7 +126,7 @@ export const brutalist: Record<string, string> = {
|
|
|
126
126
|
'--leading-base': '1.4',
|
|
127
127
|
'--letter-spacing-base': '0.04em',
|
|
128
128
|
'--opacity-disabled': '0.5',
|
|
129
|
-
// Hard offset shadow
|
|
129
|
+
// Hard offset shadow - structural, no blur (that's the brutalist shadow)
|
|
130
130
|
'--shadow-offset-y': '4px',
|
|
131
131
|
'--shadow-blur': '0px',
|
|
132
132
|
'--shadow-spread': '0px',
|
|
@@ -146,7 +146,7 @@ export const brutalist: Record<string, string> = {
|
|
|
146
146
|
'--font-brand': '"Space Grotesk Variable", "Arial", sans-serif',
|
|
147
147
|
|
|
148
148
|
// ── Phase 1a: Component tokens ────────────────────────────────────────
|
|
149
|
-
// Zero radius everywhere
|
|
149
|
+
// Zero radius everywhere - things are what they are
|
|
150
150
|
'--button-radius': '0px',
|
|
151
151
|
'--card-radius': '0px',
|
|
152
152
|
'--card-padding': 'calc(var(--spacing) * 6)',
|
|
@@ -154,7 +154,7 @@ export const brutalist: Record<string, string> = {
|
|
|
154
154
|
'--input-height': 'calc(var(--spacing) * 10)',
|
|
155
155
|
'--badge-radius': '0px',
|
|
156
156
|
|
|
157
|
-
// ── Phase 1b: Motion
|
|
157
|
+
// ── Phase 1b: Motion - instant. No decorative animation. ─────────────
|
|
158
158
|
'--motion-duration-fast': '0ms',
|
|
159
159
|
'--motion-duration-normal': '0ms',
|
|
160
160
|
'--motion-duration-slow': '50ms',
|
|
@@ -173,7 +173,7 @@ export const brutalist: Record<string, string> = {
|
|
|
173
173
|
'--hover-shadow': 'none',
|
|
174
174
|
'--active-scale': '1',
|
|
175
175
|
|
|
176
|
-
// ── Phase 1c: Typography
|
|
176
|
+
// ── Phase 1c: Typography - heavy, structural ──────────────────────────
|
|
177
177
|
'--heading-font-weight': '700',
|
|
178
178
|
'--heading-letter-spacing': 'var(--tracking-tight)',
|
|
179
179
|
'--body-letter-spacing': 'var(--tracking-normal)',
|
|
@@ -189,7 +189,7 @@ export const brutalist: Record<string, string> = {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
export const brutalistDark: Record<string, string> = {
|
|
192
|
-
// ── Dark: inverted
|
|
192
|
+
// ── Dark: inverted - paper becomes black, ink becomes off-white ───────
|
|
193
193
|
'--bg-default': '#0A0A0AFF',
|
|
194
194
|
'--bg-inverse': '#F8F8F8FF',
|
|
195
195
|
'--bg-muted': '#1A1A1AFF',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Default
|
|
2
|
+
* Default - Clean, neutral, Inter-based. The "no opinion" starting point.
|
|
3
3
|
* Think Linear, Vercel. A solid foundation that stays out of the way.
|
|
4
4
|
*
|
|
5
|
-
* Fonts: Inter Variable (all)
|
|
5
|
+
* Fonts: Inter Variable (all) - the most carefully crafted neutral sans-serif.
|
|
6
6
|
*/
|
|
7
7
|
export const defaultPreset: Record<string, string> = {
|
|
8
8
|
// ── Semantic color tokens ─────────────────────────────────────────────
|
|
@@ -175,7 +175,7 @@ export const defaultPreset: Record<string, string> = {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
export const defaultPresetDark: Record<string, string> = {
|
|
178
|
-
// Full dark-mode token set
|
|
178
|
+
// Full dark-mode token set - mirrors tokens.css .dark values so that the
|
|
179
179
|
// injected :root overrides from the light preset are fully superseded when
|
|
180
180
|
// dark mode is toggled.
|
|
181
181
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
@apply border-stroke;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
/* Universal focus ring
|
|
19
|
+
/* Universal focus ring - bare anchors, links, summary, tabindex targets.
|
|
20
20
|
Components use the FOCUS_RING utility class instead. */
|
|
21
21
|
a:focus-visible,
|
|
22
22
|
[role='link']:focus-visible,
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
This file serves TWO purposes from the same data:
|
|
8
8
|
|
|
9
|
-
1. @theme inline
|
|
9
|
+
1. @theme inline - Resolved at BUILD TIME by Tailwind so it can generate
|
|
10
10
|
utility classes (e.g. bg-blue-800, text-neutral-950). These values are
|
|
11
11
|
baked into the compiled CSS and cannot change at runtime.
|
|
12
12
|
|
|
13
|
-
2. :root / .dark
|
|
13
|
+
2. :root / .dark - Standard CSS custom properties available at RUNTIME.
|
|
14
14
|
These power var(--blue-800) references in component code and can be
|
|
15
15
|
swapped by presets or dark mode.
|
|
16
16
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* ============================================================================
|
|
2
|
-
Semantic Tokens
|
|
2
|
+
Semantic Tokens - Light (:root) & Dark (.dark)
|
|
3
3
|
============================================================================
|
|
4
4
|
Context-aware tokens that map to specific UI roles (background, text,
|
|
5
5
|
border, icon, chart). These swap between light and dark mode.
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
/* ── Type scale, spacing, radius, shadows, motion, z-index ─────────────── */
|
|
12
12
|
@theme {
|
|
13
|
-
/* Spacing base unit
|
|
13
|
+
/* Spacing base unit - reactive at runtime via calc(var(--spacing) * N) */
|
|
14
14
|
--spacing: 0.375rem;
|
|
15
15
|
|
|
16
|
-
/* Type scale
|
|
16
|
+
/* Type scale - all sizes derived from --font-size-base,
|
|
17
17
|
all line-heights derived from --leading-base.
|
|
18
18
|
Adjust the two root tokens to scale the entire system. */
|
|
19
19
|
--text-2xs: calc(var(--font-size-base) * 0.625);
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
--text-7xl: calc(var(--font-size-base) * 5);
|
|
53
53
|
--text-7xl--line-height: calc(var(--leading-base) * 0.75);
|
|
54
54
|
|
|
55
|
-
/* Letter-spacing scale
|
|
55
|
+
/* Letter-spacing scale - derived from --letter-spacing-base.
|
|
56
56
|
tighter=-2x tight=-1x normal=0 wide=1x wider=2x widest=4x */
|
|
57
57
|
--tracking-tighter: calc(var(--letter-spacing-base) * -2);
|
|
58
58
|
--tracking-tight: calc(var(--letter-spacing-base) * -1);
|
|
@@ -61,17 +61,17 @@
|
|
|
61
61
|
--tracking-wider: calc(var(--letter-spacing-base) * 2);
|
|
62
62
|
--tracking-widest: calc(var(--letter-spacing-base) * 4);
|
|
63
63
|
|
|
64
|
-
/* Font families
|
|
64
|
+
/* Font families - in @theme (not inline) so Tailwind generates var()
|
|
65
65
|
references, making them runtime-changeable by presets. */
|
|
66
66
|
--font-sans: 'IBM Plex Mono', sans-serif;
|
|
67
67
|
--font-heading: 'IBM Plex Mono', sans-serif;
|
|
68
68
|
--font-brand: 'IBM Plex Mono', sans-serif;
|
|
69
69
|
|
|
70
|
-
/* Border width
|
|
70
|
+
/* Border width - reactive at runtime */
|
|
71
71
|
--border-width: var(--border-width-base);
|
|
72
72
|
--default-border-width: var(--border-width-base);
|
|
73
73
|
|
|
74
|
-
/* Border radius
|
|
74
|
+
/* Border radius - derived from --radius so presets scale all radii */
|
|
75
75
|
--radius-sm: calc(var(--radius) * 0.6);
|
|
76
76
|
--radius-md: calc(var(--radius) * 0.8);
|
|
77
77
|
--radius-lg: var(--radius);
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
--radius-3xl: calc(var(--radius) * 2.2);
|
|
81
81
|
--radius-4xl: calc(var(--radius) * 2.6);
|
|
82
82
|
|
|
83
|
-
/* Shadow scale
|
|
83
|
+
/* Shadow scale - derived from base variables
|
|
84
84
|
xs=1x sm=1.5x md=3x lg=6x xl=12x */
|
|
85
85
|
--shadow-xs: 0 calc(var(--shadow-offset-y) * 1) calc(var(--shadow-blur) * 1)
|
|
86
86
|
calc(var(--shadow-spread) * 1) var(--shadow-base-color);
|