tokenizer-ui-kit 0.0.7 → 0.0.8

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
@@ -13,23 +13,29 @@ pnpm add tokenizer-ui-kit
13
13
  ## 🧩 Available Components
14
14
 
15
15
  ### Date Picker
16
+
16
17
  ```ts
17
18
  import { DatePicker } from "tokenizer-ui-kit";
18
19
  ```
19
20
 
20
21
  ### Button
22
+
21
23
  ```ts
22
24
  import { CButton } from "tokenizer-ui-kit";
23
25
  ```
24
26
 
25
27
  ### Circular Loader
28
+
26
29
  ```ts
27
30
  import { CircularLoader } from "tokenizer-ui-kit";
28
31
  ```
29
32
 
30
33
  ## 🚀 Usage
31
34
 
32
- ### 1. Import components and styles
35
+ ### For Vue/Vite Applications
36
+
37
+ #### 1. Import components and styles
38
+
33
39
  ```vue
34
40
  <script setup>
35
41
  import { DatePicker, CButton, CircularLoader } from "tokenizer-ui-kit";
@@ -38,7 +44,8 @@ import "tokenizer-ui-kit/dist/tokenizer-ui-kit.css";
38
44
  </script>
39
45
  ```
40
46
 
41
- ### 2. Use components
47
+ #### 2. Use components
48
+
42
49
  ```vue
43
50
  <template>
44
51
  <div>
@@ -62,11 +69,65 @@ const handleClick = () => {
62
69
  </script>
63
70
  ```
64
71
 
72
+ ### For Nuxt Applications
73
+
74
+ #### Option 1: In `nuxt.config.ts` (Recommended)
75
+
76
+ ```typescript
77
+ // nuxt.config.ts
78
+ export default defineNuxtConfig({
79
+ css: ["tokenizer-ui-kit/dist/tokenizer-ui-kit.css"],
80
+ // ... other config
81
+ });
82
+ ```
83
+
84
+ #### Option 2: In `app.vue` or layout
85
+
86
+ ```vue
87
+ <!-- app.vue or layouts/default.vue -->
88
+ <script setup>
89
+ // Import CSS globally
90
+ import "tokenizer-ui-kit/dist/tokenizer-ui-kit.css";
91
+ </script>
92
+
93
+ <template>
94
+ <NuxtPage />
95
+ </template>
96
+ ```
97
+
98
+ #### Option 3: In individual components
99
+
100
+ ```vue
101
+ <!-- components/MyComponent.vue -->
102
+ <script setup>
103
+ import { DatePicker, CButton } from "tokenizer-ui-kit";
104
+ import "tokenizer-ui-kit/dist/tokenizer-ui-kit.css";
105
+
106
+ const selectedDate = ref(null);
107
+ </script>
108
+
109
+ <template>
110
+ <DatePicker v-model="selectedDate" />
111
+ <CButton color="green">Click me</CButton>
112
+ </template>
113
+ ```
114
+
115
+ #### Option 4: Using Nuxt plugins
116
+
117
+ ```typescript
118
+ // plugins/tokenizer-ui-kit.client.ts
119
+ export default defineNuxtPlugin(() => {
120
+ // Import CSS only on client side
121
+ import("tokenizer-ui-kit/dist/tokenizer-ui-kit.css");
122
+ });
123
+ ```
124
+
65
125
  ## ⚠️ Important Notes
66
126
 
67
127
  - **CSS Styles**: Always import the CSS file for proper component styling
68
128
  - **Date Picker**: Requires CSS for calendar popup to display correctly
69
129
  - **TypeScript**: Full TypeScript support included
130
+ - **Nuxt**: Use `nuxt.config.ts` for global CSS import (recommended)
70
131
 
71
132
  ## 📚 Documentation
72
133