@duyluonganduin/acl-web-components 0.0.1 → 0.0.2
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 +15 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ A native Web Components library built with [Lit](https://lit.dev) and TypeScript
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm
|
|
8
|
+
npm i @duyluonganduin/acl-web-components
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
---
|
|
@@ -15,7 +15,7 @@ npm install acl-web-components
|
|
|
15
15
|
### 1. Import the components
|
|
16
16
|
|
|
17
17
|
```js
|
|
18
|
-
import 'acl-web-components'
|
|
18
|
+
import '@duyluonganduin/acl-web-components'
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
### 2. Import design tokens (required)
|
|
@@ -23,13 +23,13 @@ import 'acl-web-components'
|
|
|
23
23
|
The tokens file sets all CSS custom properties (`--color-*`, `--text-*`, etc.) on `:root`. It must be imported once at your app root.
|
|
24
24
|
|
|
25
25
|
```css
|
|
26
|
-
@import 'acl-web-components/tokens.css';
|
|
26
|
+
@import '@duyluonganduin/acl-web-components/tokens.css';
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
Or in JS:
|
|
30
30
|
|
|
31
31
|
```js
|
|
32
|
-
import 'acl-web-components/tokens.css'
|
|
32
|
+
import '@duyluonganduin/acl-web-components/tokens.css'
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
---
|
|
@@ -42,7 +42,7 @@ Add the preset to extend your Tailwind theme with all design tokens:
|
|
|
42
42
|
|
|
43
43
|
```js
|
|
44
44
|
// tailwind.config.js
|
|
45
|
-
import aclPreset from 'acl-web-components/tailwind-preset'
|
|
45
|
+
import aclPreset from '@duyluonganduin/acl-web-components/tailwind-preset'
|
|
46
46
|
|
|
47
47
|
export default {
|
|
48
48
|
presets: [aclPreset],
|
|
@@ -52,7 +52,7 @@ export default {
|
|
|
52
52
|
|
|
53
53
|
```css
|
|
54
54
|
/* main.css */
|
|
55
|
-
@import 'acl-web-components/tokens.css';
|
|
55
|
+
@import '@duyluonganduin/acl-web-components/tokens.css';
|
|
56
56
|
@tailwind base;
|
|
57
57
|
@tailwind components;
|
|
58
58
|
@tailwind utilities;
|
|
@@ -65,8 +65,8 @@ Import the CSS theme bridge instead of a config preset:
|
|
|
65
65
|
```css
|
|
66
66
|
/* main.css */
|
|
67
67
|
@import "tailwindcss";
|
|
68
|
-
@import "acl-web-components/tokens.css";
|
|
69
|
-
@import "acl-web-components/tailwind-theme.css";
|
|
68
|
+
@import "@duyluonganduin/acl-web-components/tokens.css";
|
|
69
|
+
@import "@duyluonganduin/acl-web-components/tailwind-theme.css";
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
No `tailwind.config.js` changes needed.
|
|
@@ -98,8 +98,8 @@ Use components directly in HTML — they work in any framework since they are st
|
|
|
98
98
|
**React:**
|
|
99
99
|
|
|
100
100
|
```jsx
|
|
101
|
-
import 'acl-web-components'
|
|
102
|
-
import 'acl-web-components/tokens.css'
|
|
101
|
+
import '@duyluonganduin/acl-web-components'
|
|
102
|
+
import '@duyluonganduin/acl-web-components/tokens.css'
|
|
103
103
|
|
|
104
104
|
export default function App() {
|
|
105
105
|
return (
|
|
@@ -115,8 +115,8 @@ export default function App() {
|
|
|
115
115
|
|
|
116
116
|
```vue
|
|
117
117
|
<script setup>
|
|
118
|
-
import 'acl-web-components'
|
|
119
|
-
import 'acl-web-components/tokens.css'
|
|
118
|
+
import '@duyluonganduin/acl-web-components'
|
|
119
|
+
import '@duyluonganduin/acl-web-components/tokens.css'
|
|
120
120
|
</script>
|
|
121
121
|
|
|
122
122
|
<template>
|
|
@@ -164,9 +164,9 @@ import 'acl-web-components/tokens.css'
|
|
|
164
164
|
| Import path | Contents |
|
|
165
165
|
|---|---|
|
|
166
166
|
| `acl-web-components` | All component classes (auto-registers custom elements) |
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
167
|
+
| `@duyluonganduin/acl-web-components/tokens.css` | CSS custom properties for all design tokens |
|
|
168
|
+
| `@duyluonganduin/acl-web-components/tailwind-preset` | Tailwind **v3** preset |
|
|
169
|
+
| `@duyluonganduin/acl-web-components/tailwind-theme.css` | Tailwind **v4** `@theme inline` bridge |
|
|
170
170
|
|
|
171
171
|
---
|
|
172
172
|
|