lsp-uikit 1.1.7 → 1.2.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 +25 -4
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,6 +42,27 @@ Make sure you have the required PostCSS plugins installed:
|
|
|
42
42
|
npm install -D @tailwindcss/postcss autoprefixer tw-animate-css
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
To use `@apply` in local css files, use` @reference` for your global.css:
|
|
46
|
+
|
|
47
|
+
```css
|
|
48
|
+
/* local.css */
|
|
49
|
+
@reference '#globals.css';
|
|
50
|
+
|
|
51
|
+
.custom-class {
|
|
52
|
+
@apply ...;
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
For the convenience of importing, first add it to `imports` in `package.json`:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"imports": {
|
|
61
|
+
"#globals.css": "path-to-global.css"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
45
66
|
## 🎨 Global Styles
|
|
46
67
|
|
|
47
68
|
To apply global styles, import the package's styles in your main CSS file:
|
|
@@ -49,6 +70,10 @@ To apply global styles, import the package's styles in your main CSS file:
|
|
|
49
70
|
```css
|
|
50
71
|
/* global.css */
|
|
51
72
|
@import 'lsp-uikit/styles.css';
|
|
73
|
+
@import 'lsp-uikit/variables.css';
|
|
74
|
+
|
|
75
|
+
@import 'tailwindcss';
|
|
76
|
+
@import 'tw-animate-css';
|
|
52
77
|
|
|
53
78
|
@layer base {
|
|
54
79
|
...
|
|
@@ -61,12 +86,8 @@ To override the default theme variables, use inline `@theme` declarations:
|
|
|
61
86
|
|
|
62
87
|
```css
|
|
63
88
|
/* global.css */
|
|
64
|
-
@import 'lsp-uikit/styles.css';
|
|
65
|
-
|
|
66
89
|
@theme inline {
|
|
67
90
|
--color-background: #fff;
|
|
68
91
|
/* Add your custom variables here */
|
|
69
92
|
}
|
|
70
93
|
```
|
|
71
|
-
|
|
72
|
-
This will ensure that the library's styles are applied properly.
|
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ import { ToasterProps } from 'sonner';
|
|
|
23
23
|
export { toast, useSonner } from 'sonner';
|
|
24
24
|
|
|
25
25
|
declare const buttonVariants: (props?: ({
|
|
26
|
-
variant?: "default" | "default_invert" | "destructive" | "destructive_invert" | "outline" | "secondary" | "ghost" | "
|
|
26
|
+
variant?: "default" | "link" | "default_invert" | "destructive" | "destructive_invert" | "outline" | "secondary" | "ghost" | "clear" | null | undefined;
|
|
27
27
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
28
28
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
29
29
|
interface ButtonProps extends React$1.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
|