@keboola/tailwind-config 0.5.0 → 0.7.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.
Files changed (3) hide show
  1. package/colors.ts +4 -0
  2. package/index.js +28 -5
  3. package/package.json +1 -1
package/colors.ts CHANGED
@@ -96,6 +96,10 @@ export default {
96
96
  foreground: 'rgb(var(--color-muted-foreground) / <alpha-value>)',
97
97
  },
98
98
 
99
+ // Loading-placeholder fill (Skeleton). Darker than `muted` in light, lighter
100
+ // than card/background in dark, so the block is perceptible in both schemes.
101
+ skeleton: 'rgb(var(--color-skeleton) / <alpha-value>)',
102
+
99
103
  // Sidebar semantic colors
100
104
  sidebar: {
101
105
  DEFAULT: 'rgb(var(--color-sidebar) / <alpha-value>)',
package/index.js CHANGED
@@ -152,6 +152,14 @@ const baseConfig = {
152
152
  },
153
153
  borderRadius: {
154
154
  card: '10px',
155
+ // Brand-driven corner radii — a brand overrides via `theme.radii`, which
156
+ // `ThemeProvider` emits as `--radius-*`. The inline fallbacks equal the
157
+ // stock Tailwind scale, so `tw-rounded-sm/md/lg` are unchanged until a
158
+ // brand (or the design stylesheet's `:root`) sets the var. Mirrors the
159
+ // `shadow-*` / `space-*` pattern above.
160
+ sm: 'var(--radius-sm, 0.125rem)',
161
+ md: 'var(--radius-md, 0.375rem)',
162
+ lg: 'var(--radius-lg, 0.5rem)',
155
163
  },
156
164
  transitionDuration: {
157
165
  brand: 'var(--motion-duration, 200ms)',
@@ -166,6 +174,13 @@ const baseConfig = {
166
174
  },
167
175
  typography: typography,
168
176
  colors,
177
+ // Chrome tracking token — under `extend` so Tailwind's default tracking
178
+ // scale (`tracking-normal` / `tracking-wide` / …) is preserved. `chrome`
179
+ // reads `--letter-spacing-chrome` (from `typography.letterSpacing.chrome`),
180
+ // falling back to the current 1px value.
181
+ letterSpacing: {
182
+ chrome: 'var(--letter-spacing-chrome, 1px)',
183
+ },
169
184
  },
170
185
  fontFamily: {
171
186
  // Display face for headings — `tw-font-display`. Set via
@@ -201,8 +216,13 @@ const baseConfig = {
201
216
  'Courier New',
202
217
  'monospace',
203
218
  ],
219
+ // Body face — `tw-font-sans`. A brand's `typography.fontFamily` is emitted
220
+ // as `--font-sans` by `ThemeProvider`; the inline `Inter` fallback keeps
221
+ // the canonical stack when unset, so default rendering is unchanged. The
222
+ // fallback lives *inside* the `var()` (same reasoning as `display` above)
223
+ // so the declaration stays valid when the var is undefined.
204
224
  sans: [
205
- 'Inter',
225
+ 'var(--font-sans, Inter)',
206
226
  'system-ui',
207
227
  '-apple-system',
208
228
  'Segoe UI',
@@ -218,11 +238,14 @@ const baseConfig = {
218
238
  'Noto Color Emoji',
219
239
  ],
220
240
  },
241
+ // Chrome font-weight scale. Brand-overridable via `--font-weight-*` (emitted
242
+ // by ThemeProvider from `typography.weight`); fallbacks are the design
243
+ // defaults, so a brand that omits weights shows no drift.
221
244
  fontWeight: {
222
- normal: '400',
223
- medium: '500',
224
- semibold: '600',
225
- bold: '700',
245
+ normal: 'var(--font-weight-normal, 400)',
246
+ medium: 'var(--font-weight-medium, 500)',
247
+ semibold: 'var(--font-weight-semibold, 600)',
248
+ bold: 'var(--font-weight-bold, 700)',
226
249
  },
227
250
  },
228
251
  plugins: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keboola/tailwind-config",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Shared Tailwind CSS v3 config for the Keboola UI platform — semantic color palette, plugins, and the `tw-` class prefix.",
5
5
  "license": "MIT",
6
6
  "type": "module",