@aircall/blocks 0.11.0 → 0.13.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.
package/README.md CHANGED
@@ -8,13 +8,33 @@ wrappers), empty states, and more.
8
8
  pnpm add @aircall/blocks @aircall/ds
9
9
  ```
10
10
 
11
- Import the precompiled CSS once from your entry (alongside `@aircall/ds`'s):
11
+ Import the precompiled CSS once from your entry. `@aircall/blocks/globals.css` already
12
+ bundles the entire `@aircall/ds/globals.css` — do **not** import both or you duplicate all
13
+ of DS's compiled output (Preflight, theme tokens, all DS utilities):
12
14
 
13
15
  ```tsx
14
- import '@aircall/ds/globals.css';
16
+ // ✅ Correct — blocks already includes DS
15
17
  import '@aircall/blocks/globals.css';
18
+
19
+ // ❌ Wrong — duplicates all of DS's compiled output
20
+ // import '@aircall/ds/globals.css';
21
+ // import '@aircall/blocks/globals.css';
16
22
  ```
17
23
 
24
+ If you author your own Tailwind utility classes, use a CSS entry instead of a JS import:
25
+
26
+ ```css
27
+ /* style.css */
28
+ @layer theme, base, components, utilities;
29
+ @import 'tailwindcss/theme.css' layer(theme);
30
+ @import 'tailwindcss/utilities.css' layer(utilities);
31
+ @import '@aircall/blocks/globals.css';
32
+ @source "./src/**/*.{ts,tsx}";
33
+ ```
34
+
35
+ For module-federation consumers (your app runs as a remote inside a host that already loads
36
+ DS/blocks globals), omit both globals imports entirely.
37
+
18
38
  > Importing `@aircall/blocks` registers a `blocks` i18n namespace on `@aircall/ds`'s shared
19
39
  > i18next instance. To make block strings follow the user's language, mount `DsI18nProvider`
20
40
  > (from `@aircall/ds`) **under** your react-i18next provider, fed the active language. See