lsp-uikit 1.0.14 → 1.0.16

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 (2) hide show
  1. package/README.md +81 -0
  2. package/package.json +3 -7
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # LSP UI KIT
2
+
3
+ ## Installation
4
+
5
+ To install the package, run:
6
+
7
+ ```sh
8
+ npm install lsp-uikit
9
+ # or (if you are using React 19)
10
+ npm install lsp-uikit --force
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ### Importing Components
16
+
17
+ You can import components directly from the package:
18
+
19
+ ```tsx
20
+ import { Button } from 'lsp-uikit';
21
+ ```
22
+
23
+ ### Importing Hooks
24
+
25
+ Hooks can be imported as follows:
26
+
27
+ ```tsx
28
+ import { useMobile } from 'lsp-uikit/useMobile';
29
+ import { useToast } from 'lsp-uikit/useToast';
30
+ ```
31
+
32
+ ### Importing Utility Functions
33
+
34
+ Utility functions can be imported as follows:
35
+
36
+ ```tsx
37
+ import { cn } from 'lsp-uikit/cn';
38
+ ```
39
+
40
+ ## Tailwind Configuration
41
+
42
+ To use Tailwind with this library, extend your Tailwind config:
43
+
44
+ 1. Import the package's Tailwind base configuration:
45
+
46
+ ```js
47
+ // tailwind.config.js
48
+ module.exports = {
49
+ ...baseConfig,
50
+ content: [
51
+ ...,
52
+ './node_modules/lsp-uikit/**/*.{js,ts,jsx,tsx}',
53
+ ],
54
+ presets: [require('lsp-uikit/tailwind-config.js')],
55
+ };
56
+ ```
57
+
58
+ 2. Ensure you have Tailwind installed in your project:
59
+
60
+ ```sh
61
+ npm install tailwindcss postcss autoprefixer -D
62
+ ```
63
+
64
+ ## Importing Global Styles
65
+
66
+ To apply global styles, import the CSS files in your main entry file:
67
+
68
+ ```css
69
+ /* global.css */
70
+ @import 'lsp-uikit/styles.css';
71
+
72
+ @tailwind base;
73
+ @tailwind components;
74
+ @tailwind utilities;
75
+
76
+ @layer base {
77
+ ...
78
+ }
79
+ ```
80
+
81
+ This will ensure that the library's styles are applied properly.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lsp-uikit",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "LevelSkill.Pro UI components based on ShadCN and Tailwind CSS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -109,12 +109,8 @@
109
109
  "import": "./dist/index.js",
110
110
  "types": "./dist/index.d.ts"
111
111
  },
112
- "./index.css": {
113
- "import": "./dist/main.css"
114
- },
115
- "./styles.css": {
116
- "import": "./dist/styles.css"
117
- },
112
+ "./index.css": "./dist/main.css",
113
+ "./styles.css": "./dist/styles.css",
118
114
  "./tailwind-config.js": {
119
115
  "import": "./dist/tailwind-base.js",
120
116
  "require": "./dist/tailwind-base.js"