@brightlocal/ui-components 1.1.0 → 1.1.1

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
@@ -10,7 +10,7 @@ npm install @brightlocal/ui-components
10
10
 
11
11
  ## Peer Dependencies
12
12
 
13
- This package requires React 17+ or 18+ or 19+:
13
+ This package requires React 18 or 19:
14
14
 
15
15
  ```bash
16
16
  npm install react react-dom
@@ -178,6 +178,28 @@ Components use a modern, flexible styling system:
178
178
  - **Data Attributes** - `data-slot` attributes for component part identification
179
179
  - **Class Variance Authority** - For component variants and states
180
180
 
181
+ ### Tailwind CSS v4 Setup
182
+
183
+ This package uses Tailwind CSS utility classes internally. In Tailwind CSS v4, `node_modules` are not scanned by default, so you need to import the package's source declaration in your main CSS file:
184
+
185
+ ```css
186
+ @import "tailwindcss";
187
+ @import "@brightlocal/ui-components";
188
+ ```
189
+
190
+ This tells Tailwind to scan the package's compiled output for utility classes, ensuring all component styles are generated correctly.
191
+
192
+ > **Note:** If you're using Tailwind CSS v3, configure the `content` array in your `tailwind.config.js` instead:
193
+ >
194
+ > ```js
195
+ > module.exports = {
196
+ > content: [
197
+ > "./src/**/*.{ts,tsx}",
198
+ > "./node_modules/@brightlocal/ui-components/dist/**/*.js",
199
+ > ],
200
+ > };
201
+ > ```
202
+
181
203
  ### Theming & Customization
182
204
 
183
205
  All components are built to be themeable using CSS custom properties. You can customize the look and feel by overriding CSS variables in your application:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "BrightLocal Design System UI Components",
5
5
  "type": "module",
6
6
  "private": false,
@@ -8,9 +8,11 @@
8
8
  "sideEffects": [
9
9
  "**/*.css"
10
10
  ],
11
+ "style": "./tailwind.css",
11
12
  "files": [
12
13
  "dist",
13
14
  "src",
15
+ "tailwind.css",
14
16
  "README.md",
15
17
  "LICENSE",
16
18
  "package.json"
@@ -47,6 +49,9 @@
47
49
  "import": "./dist/blocks/*.js",
48
50
  "require": "./dist/blocks/*.cjs"
49
51
  },
52
+ "./tailwind.css": {
53
+ "default": "./tailwind.css"
54
+ },
50
55
  "./*": {
51
56
  "source": {
52
57
  "types": "./src/components/*.tsx",
package/tailwind.css ADDED
@@ -0,0 +1 @@
1
+ @source "./dist/**/*.js";