kaleido-ui 0.1.123 → 0.1.130

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 CHANGED
@@ -15,13 +15,19 @@ npm install kaleido-ui
15
15
  | `kaleido-ui` | Web components (Tailwind CSS + Radix UI) |
16
16
  | `kaleido-ui/tokens` | Platform-agnostic design tokens (zero deps) |
17
17
  | `kaleido-ui/native` | React Native components (WDK + custom) |
18
- | `kaleido-ui/css` | Tailwind v4 `@theme` tokens, CSS variables, keyframes, utilities, Material Symbols |
18
+ | `kaleido-ui/css` | CSS variables (light + dark), keyframes, utilities, and the Tailwind v4 `@theme` tokens |
19
19
  | `kaleido-ui/css/brand` | Opt-in brand theme: AA-safe light primary, lifted dark danger/info, coloured page wash (import after `kaleido-ui/css`) |
20
+ | `kaleido-ui/tailwind` | Tailwind **v3** preset built from the tokens |
20
21
  | `kaleido-ui/brand/*.svg` | Logo files: `kaleidoswap-pictogram.svg`, `kaleidoswap-fullogo-{horizontal,vertical}.svg` (white wordmark) and `-on-light.svg` variants |
21
22
 
22
- > **Tailwind v4 only.** `kaleido-ui/css` ships the full theme as Tailwind v4
23
- > `@theme` blocks, so there is no separate Tailwind preset to configure —
24
- > importing the CSS registers every token and generates the utilities.
23
+ > **Tailwind v4 and v3 are both supported.** The library is built with v4.
24
+ > On v4, `kaleido-ui/css` carries the whole theme as `@theme` blocks — no
25
+ > preset. On v3, which ignores `@theme` and only generates the opacity steps in
26
+ > its own scale, use the `kaleido-ui/tailwind` preset *and* import
27
+ > `kaleido-ui/css` for the variables it points at. Either way, scan the
28
+ > package's `dist` so the components' classes are generated.
29
+ > `tests/tailwind-v3-preset.test.tsx` compiles the components with both and
30
+ > fails if v3 misses a class v4 generates.
25
31
 
26
32
  ## Quick Start — Web (Tailwind v4)
27
33
 
@@ -30,12 +36,36 @@ npm install kaleido-ui
30
36
  ```css
31
37
  /* styles.css */
32
38
  @import "tailwindcss";
39
+ @import "tw-animate-css"; /* Dialog/Select/Toast enter-exit classes */
33
40
  @import "kaleido-ui/css";
34
41
 
35
- /* Tell Tailwind which files to scan for classes */
42
+ /* Tell Tailwind which files to scan for classes: yours and the components' */
36
43
  @source "./src/**/*.{ts,tsx}";
44
+ @source "../node_modules/kaleido-ui/dist/web";
37
45
  ```
38
46
 
47
+ ### Tailwind v3
48
+
49
+ ```js
50
+ // tailwind.config.js
51
+ module.exports = {
52
+ presets: [require('kaleido-ui/tailwind')],
53
+ content: ['./src/**/*.{ts,tsx}', './node_modules/kaleido-ui/dist/web/*.js'],
54
+ plugins: [require('tailwindcss-animate')],
55
+ }
56
+ ```
57
+
58
+ ```css
59
+ /* index.css — kaleido-ui/css first: the preset's colours are its variables */
60
+ @import 'kaleido-ui/css';
61
+ @tailwind base;
62
+ @tailwind components;
63
+ @tailwind utilities;
64
+ ```
65
+
66
+ The preset's colours are the theme's custom properties (opacity modifiers work
67
+ through `color-mix`), so light and dark switch at runtime exactly as on v4.
68
+
39
69
  ```ts
40
70
  // main.tsx
41
71
  import './styles.css'
@@ -168,7 +198,6 @@ Additive, per-theme (light by default, `.dark` switches):
168
198
  | `text-network-{bitcoin,lightning,liquid,arkade,spark,rgb,taproot}-fg` | Network-hued text |
169
199
  | `bg-page-brand` | Coloured page wash (mint, violet, sky) |
170
200
  | `text-gradient-brand` | Brand gradient text, display sizes only |
171
- | `shadow-glow-send`, `shadow-glow-recv`, `shadow-glow-card` | Accent glows for send / receive panels and the hero card |
172
201
 
173
202
  ## Native Components
174
203
 
@@ -13,13 +13,19 @@
13
13
  */
14
14
  :root:not(.dark),
15
15
  .light {
16
- --primary: #086E46;
17
- --ring: #086E46;
16
+ --primary: #097B4E;
17
+ /* The deep brand green takes white text (5.3:1); the default light green takes dark ink. */
18
+ --primary-foreground: #FFFFFF;
19
+ /* …and its button gradient runs through the deep greens under that white text,
20
+ lightening toward the bottom-right like the default light fills. */
21
+ --gradient-primary: linear-gradient(135deg, #076A43 0%, #097B4E 50%, #0E8F5C 100%);
22
+ --ring: #097B4E;
18
23
  }
19
24
 
20
25
  .light {
21
- --app-primary: 8 110 70;
22
- --app-border-strong: 8 110 70;
26
+ --app-primary: 9 123 78;
27
+ --app-primary-foreground: 255 255 255;
28
+ --app-border-strong: 9 123 78;
23
29
  }
24
30
 
25
31
  .dark {