@keboola/tailwind-config 1.0.2 → 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.
Files changed (3) hide show
  1. package/colors.ts +1 -1
  2. package/index.js +13 -32
  3. package/package.json +1 -1
package/colors.ts CHANGED
@@ -36,7 +36,7 @@ export default {
36
36
  },
37
37
 
38
38
  // Main application colors — channel values live in CSS variables (see packages/design/src/styles.css :root).
39
- // The `<alpha-value>` placeholder lets Tailwind apply opacity modifiers like `tw-bg-muted/50`.
39
+ // The `<alpha-value>` placeholder lets Tailwind apply opacity modifiers like `tw:bg-muted/50`.
40
40
  background: 'rgb(var(--color-background) / <alpha-value>)',
41
41
  foreground: 'rgb(var(--color-foreground) / <alpha-value>)',
42
42
 
package/index.js CHANGED
@@ -33,17 +33,16 @@ const config = {
33
33
  },
34
34
  animation: {
35
35
  fade: 'fadeIn 100ms 100ms ease-in-out',
36
- collapseDown: 'collapseDown 300ms both',
37
36
  'dot-pulse-1': 'dot-pulse 1.5s infinite',
38
37
  'dot-pulse-2': 'dot-pulse 1.5s infinite 0.2s',
39
38
  'dot-pulse-3': 'dot-pulse 1.5s infinite 0.4s',
40
39
  'toast-progress': 'toast-progress 5s linear forwards',
41
- 'collapsible-down': 'collapsible-down 0.2s ease-out',
42
- 'collapsible-up': 'collapsible-up 0.2s ease-out',
40
+ // `collapsible-down` / `collapsible-up` are absent on purpose: `tw-animate-css` ships both
41
+ // utilities and wins, so an entry here emits nothing. `Collapsible`'s motion is registered
42
+ // as `collapsible-open` / `collapsible-close` in `packages/design/src/theme.css`.
43
43
  'marching-ants': 'marching-ants 1s linear infinite',
44
44
  'spinner-dots': 'spinner-dots 1s ease-in-out infinite',
45
45
  'progress-bar': 'progress-bar var(--progress-bar-duration, 3s) linear forwards',
46
- 'caret-blink': 'caret-blink 1.25s ease-out infinite',
47
46
  },
48
47
  keyframes: {
49
48
  // Animate the `translate` property, NOT `transform`. In v4 the `-translate-x-*`
@@ -57,11 +56,6 @@ const config = {
57
56
  translate: '100% 0',
58
57
  },
59
58
  },
60
- collapseDown: {
61
- from: { overflow: 'hidden' },
62
- '99%': { overflow: 'hidden' },
63
- to: { overflow: 'visible' },
64
- },
65
59
  fadeIn: {
66
60
  from: { opacity: 0 },
67
61
  to: { opacity: 1 },
@@ -84,14 +78,6 @@ const config = {
84
78
  width: '0%',
85
79
  },
86
80
  },
87
- 'collapsible-down': {
88
- from: { height: '0', overflow: 'hidden' },
89
- to: { height: 'var(--radix-collapsible-content-height)', overflow: 'visible' },
90
- },
91
- 'collapsible-up': {
92
- from: { height: 'var(--radix-collapsible-content-height)', overflow: 'visible' },
93
- to: { height: '0', overflow: 'hidden' },
94
- },
95
81
  'marching-ants': {
96
82
  to: { strokeDashoffset: '-12' },
97
83
  },
@@ -104,14 +90,10 @@ const config = {
104
90
  from: { width: '0%' },
105
91
  to: { width: '100%' },
106
92
  },
107
- 'caret-blink': {
108
- '0%, 70%, 100%': { opacity: '1' },
109
- '20%, 50%': { opacity: '0' },
110
- },
111
93
  },
112
94
  backgroundImage: {
113
95
  'loader-gradient': 'radial-gradient(circle closest-side,#000 90%,#0000)',
114
- // Brand gradient — `tw-bg-brand`. Set via `theme.gradient.brand`; the
96
+ // Brand gradient — `tw:bg-brand`. Set via `theme.gradient.brand`; the
115
97
  // inline fallback equals the stylesheet default (primary→accent), so the
116
98
  // utility stays valid even without `@keboola/design/styles`.
117
99
  brand:
@@ -125,22 +107,21 @@ const config = {
125
107
  table: '0px 6px 6px -4px rgba(100, 135, 153, 0.13)',
126
108
  card: '0px 1px 4px rgba(100, 135, 153, 0.15)',
127
109
  // Brand-driven elevation. The inline fallbacks equal the stock Tailwind
128
- // shadow scale, so `tw-shadow-sm/md/lg` are unchanged until a brand sets
129
- // `theme.shadows`. `tw-shadow-lift` is a stronger raised shadow.
110
+ // shadow scale, so `tw:shadow-sm`, `tw:shadow-md` and `tw:shadow-lg`
111
+ // are unchanged until a brand sets `theme.shadows`. `tw:shadow-lift`
112
+ // is a stronger raised shadow.
130
113
  sm: 'var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05))',
131
114
  md: 'var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1))',
132
115
  lg: 'var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1))',
133
116
  lift: 'var(--shadow-lift, 0 10px 30px -12px rgb(0 0 0 / 0.28), 0 2px 6px rgb(0 0 0 / 0.06))',
134
- // Raised-surface elevation for Card / Search — dark-aware via the
135
- // `--shadow-raised` token (flips to a black shadow under `[data-theme=dark]`).
136
- raised: 'var(--shadow-raised, 0 2px 6px 0 rgb(100 135 153 / 0.13))',
137
117
  },
138
118
  borderRadius: {
139
119
  card: '10px',
140
120
  // Brand-driven corner radii — a brand overrides via `theme.radii`, which
141
121
  // `ThemeProvider` emits as `--radius-*`. The inline fallbacks equal the
142
- // stock Tailwind scale, so `tw-rounded-sm/md/lg` are unchanged until a
143
- // brand (or the design stylesheet's `:root`) sets the var. Mirrors the
122
+ // stock Tailwind scale, so `tw:rounded-sm`, `tw:rounded-md` and
123
+ // `tw:rounded-lg` are unchanged until a brand (or the design
124
+ // stylesheet's `:root`) sets the var. Mirrors the
144
125
  // `shadow-*` / `space-*` pattern above.
145
126
  sm: 'var(--radius-sm, 0.125rem)',
146
127
  md: 'var(--radius-md, 0.375rem)',
@@ -153,7 +134,7 @@ const config = {
153
134
  brand: 'var(--motion-easing, cubic-bezier(0.2, 0.7, 0.2, 1))',
154
135
  },
155
136
  spacing: {
156
- // Brand-driven density: `tw-p-inset`, `tw-gap-gutter`, etc.
137
+ // Brand-driven density: `tw:p-inset`, `tw:gap-gutter`, etc.
157
138
  gutter: 'var(--space-gutter, 1.5rem)',
158
139
  inset: 'var(--space-inset, 1.5rem)',
159
140
  },
@@ -200,7 +181,7 @@ const config = {
200
181
  },
201
182
  },
202
183
  fontFamily: {
203
- // Display face for headings — `tw-font-display`. Set via
184
+ // Display face for headings — `tw:font-display`. Set via
204
185
  // `theme.typography.fontDisplay`; when unset it resolves to `--font-sans`
205
186
  // then the Inter stack, so it defaults to the body face rather than a
206
187
  // generic `sans-serif`. The fallback chain lives *inside* the `var()` so
@@ -233,7 +214,7 @@ const config = {
233
214
  'Courier New',
234
215
  'monospace',
235
216
  ],
236
- // Body face — `tw-font-sans`. A brand's `typography.fontFamily` is emitted
217
+ // Body face — `tw:font-sans`. A brand's `typography.fontFamily` is emitted
237
218
  // as `--font-sans` by `ThemeProvider`; the inline `Inter` fallback keeps
238
219
  // the canonical stack when unset, so default rendering is unchanged. The
239
220
  // fallback lives *inside* the `var()` (same reasoning as `display` above)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keboola/tailwind-config",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "Shared Tailwind CSS v4 design tokens for the Keboola UI platform — semantic color palette, type scale, radii and shadows as a `theme` object.",
5
5
  "license": "MIT",
6
6
  "type": "module",