vlite3 0.1.10 → 0.2.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 +226 -150
- package/components/Button.vue.js +1 -1
- package/components/Chip/Chip.vue.js +15 -15
- package/components/DataTable/DataTable.vue.js +2 -2
- package/components/DataTable/DataTable.vue2.js +41 -39
- package/components/DataTable/types.d.ts +1 -0
- package/components/DatePicker.vue.d.ts +12 -3
- package/components/DatePicker.vue.js +80 -39
- package/components/Dropdown/DropdownMenu.vue.js +48 -47
- package/components/Form/Form.vue.d.ts +2 -0
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +104 -101
- package/components/Form/FormField.vue.d.ts +4 -0
- package/components/Form/FormField.vue.js +248 -148
- package/components/Form/FormFields.vue.d.ts +2 -0
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +45 -39
- package/components/Form/types.d.ts +24 -4
- package/components/Form/utils/form.utils.d.ts +5 -1
- package/components/Form/utils/form.utils.js +69 -60
- package/components/GoogleLogin.vue.d.ts +41 -0
- package/components/GoogleLogin.vue.js +60 -0
- package/components/GoogleLogin.vue2.js +4 -0
- package/components/Input.vue.js +120 -111
- package/components/NumberInput.vue.d.ts +38 -0
- package/components/NumberInput.vue.js +7 -0
- package/components/NumberInput.vue2.js +191 -0
- package/components/Pagination/Pagination.vue.d.ts +1 -0
- package/components/Pagination/Pagination.vue.js +60 -46
- package/components/ProgressBar/ProgressBar.vue.d.ts +12 -0
- package/components/ProgressBar/ProgressBar.vue.js +7 -0
- package/components/ProgressBar/ProgressBar.vue2.js +158 -0
- package/components/ProgressBar/index.d.ts +3 -0
- package/components/Spinner/Spinner.vue.d.ts +8 -0
- package/components/Spinner/Spinner.vue.js +89 -0
- package/components/Spinner/Spinner.vue2.js +4 -0
- package/components/Spinner/index.d.ts +2 -0
- package/components/Spinner/types.d.ts +9 -0
- package/components/Tabes/Tabes.vue.d.ts +3 -1
- package/components/Tabes/Tabes.vue.js +103 -44
- package/directives/vScrollReveal.d.ts +2 -0
- package/directives/vScrollReveal.js +48 -0
- package/index.d.ts +8 -0
- package/index.js +180 -147
- package/package.json +6 -3
- package/style.css +56 -4
- package/types/form.type.d.ts +2 -2
- package/types/progressbar.d.ts +75 -0
- package/utils/env.d.ts +14 -0
- package/utils/env.js +4 -0
- package/utils/functions.d.ts +99 -0
- package/utils/functions.js +91 -7
- package/utils/index.d.ts +2 -0
- package/utils/search.util.d.ts +127 -0
- package/utils/search.util.js +363 -0
package/README.md
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
# vlite3
|
|
2
2
|
|
|
3
|
-
A lightweight Vue 3 UI component library built with Tailwind CSS.
|
|
3
|
+
A lightweight Vue 3 UI component library built with Tailwind CSS, created for personal projects and available for anyone to use.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
### NPM
|
|
8
|
-
|
|
9
7
|
```bash
|
|
10
8
|
npm install vlite3
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
### Yarn
|
|
14
|
-
|
|
15
11
|
```bash
|
|
16
12
|
yarn add vlite3
|
|
17
13
|
```
|
|
@@ -55,160 +51,28 @@ import { Button, Input } from 'vlite3'
|
|
|
55
51
|
</template>
|
|
56
52
|
```
|
|
57
53
|
|
|
58
|
-
## 🎨 Theming & Customization
|
|
59
|
-
|
|
60
|
-
vlite3 uses a semantic theming system inspired by **shadcn/ui** and compatible with **Tailwind CSS v4**. All colors are defined as CSS variables, making it easy to customize the look and feel of your application including Dark Mode support.
|
|
61
|
-
|
|
62
|
-
### Semantic Colors
|
|
63
|
-
|
|
64
|
-
You can customize these colors in your CSS by overriding the variables in `:root` or `.dark` classes (if you are using a class-based dark mode switcher).
|
|
65
|
-
|
|
66
|
-
| Variable | Class Name | Description | Recommended Usage |
|
|
67
|
-
| :------------------------- | :---------------------------- | :---------------------- | :-------------------------------------------------------------------------- |
|
|
68
|
-
| `--background` | `bg-background` | Default page background | The main background color of your app. |
|
|
69
|
-
| `--foreground` | `text-foreground` | Default text color | The primary text color for content. |
|
|
70
|
-
| `--card` | `bg-card` | Card background | Little Gray Background for cards, containers, surfece, panels, and dialogs. |
|
|
71
|
-
| `--primary` | `bg-primary` | Primary brand color | Used for main actions (buttons, active states). |
|
|
72
|
-
| `--primary-foreground` | `text-primary-foreground` | Primary text color | Text color for content on top of primary background. |
|
|
73
|
-
| `--secondary` | `bg-secondary` | Secondary background | Used for secondary actions or muted sections. |
|
|
74
|
-
| `--secondary-foreground` | `text-secondary-foreground` | Secondary text color | Text color for content on top of secondary background. |
|
|
75
|
-
| `--muted` | `bg-muted` | Muted background | Subtle backgrounds (e.g., table headers, disabled states). |
|
|
76
|
-
| `--muted` | `text-muted` | Muted Text | Secondary text, Unactive Link, description. |
|
|
77
|
-
| `--muted-foreground` | `text-muted-foreground` | Muted text color | Secondary text, hints, placeholders. |
|
|
78
|
-
| `--accent` | `bg-accent` | Accent background | Used for hover states, selection highlights. |
|
|
79
|
-
| `--accent-foreground` | `text-accent-foreground` | Accent text color | Text color on accent backgrounds. |
|
|
80
|
-
| `--destructive` | `bg-destructive` | Destructive color | Used for error states and destructive actions. |
|
|
81
|
-
| `--destructive-foreground` | `text-destructive-foreground` | Destructive text color | Text color on destructive backgrounds. |
|
|
82
|
-
| `--border` | `border` | Default border color | Borders for inputs, cards, and dividers. |
|
|
83
|
-
| `--input` | `border-input` | Input border color | Borders specifically for form inputs. |
|
|
84
|
-
| `--ring` | `ring-ring` | Focus ring color | Outline color for focused elements. |
|
|
85
|
-
| `--radius` | `rounded` | Border radius | Global border radius for components. |
|
|
86
|
-
|
|
87
|
-
### Extended Color Variants
|
|
88
|
-
|
|
89
|
-
For more complex components, vlite3 provides extended variants for main semantic colors (`primary`, `danger`, `warning`, `info`, `success`). These are useful for building nuanced UIs with subtle backgrounds, hover states, and accessible text.
|
|
90
|
-
|
|
91
|
-
| Base Color | Variant Variables | Usage Description |
|
|
92
|
-
| :---------- | :------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
93
|
-
| **Primary** | `--color-primary-light`<br>`--color-primary-dark`<br>`--color-primary-fg`<br>`--color-primary-fg-light` | **Light**: Subtle background (e.g., 10% opacity).<br>**Dark**: Hover state for the main color.<br>**Fg**: Text color on top of the _main_ color.<br>**Fg-Light**: Text color on top of the _light_ variant. |
|
|
94
|
-
| **Danger** | `--color-danger-light`<br>`--color-danger-dark`<br>`--color-danger-fg`<br>`--color-danger-fg-light` | **Light**: Error backgrounds (alerts).<br>**Dark**: Hover state for destructive buttons.<br>**Fg**: Text on destructive buttons.<br>**Fg-Light**: Text on error alerts. |
|
|
95
|
-
| **Warning** | `--color-warning-light`<br>`--color-warning-dark`<br>`--color-warning-fg`<br>`--color-warning-fg-light` | **Light**: Warning backgrounds.<br>**Dark**: Active/Determined warning states.<br>**Fg**: Text on warning badges.<br>**Fg-Light**: Text on warning backgrounds. |
|
|
96
|
-
| **Success** | `--color-success-light`<br>`--color-success-dark`<br>`--color-success-fg`<br>`--color-success-fg-light` | **Light**: Success backgrounds (toasts).<br>**Dark**: Hover/Active success actions.<br>**Fg**: Text on success buttons.<br>**Fg-Light**: Text on success backgrounds. |
|
|
97
|
-
| **Info** | `--color-info-light`<br>`--color-info-dark`<br>`--color-info-fg`<br>`--color-info-fg-light` | **Light**: Info backgrounds.<br>**Dark**: Hover/Active info actions.<br>**Fg**: Text on info buttons.<br>**Fg-Light**: Text on info backgrounds. |
|
|
98
|
-
|
|
99
|
-
**Example Usage:**
|
|
100
|
-
|
|
101
|
-
```html
|
|
102
|
-
<!-- A success badge with subtle background and matching text -->
|
|
103
|
-
<div class="bg-success-light text-success-fg-light border border-success/20">
|
|
104
|
-
Operation Completed
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
<!-- A danger button with hover effect -->
|
|
108
|
-
<button class="bg-danger text-danger-fg hover:bg-danger-dark">Delete</button>
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Additional Colors
|
|
112
|
-
|
|
113
|
-
vlite3 also provides additional utility colors for specific feedback states:
|
|
114
|
-
|
|
115
|
-
| Variable | Class Name | Description |
|
|
116
|
-
| :---------------- | :--------------------------- | :-------------------------------------- |
|
|
117
|
-
| `--color-success` | `text-success`, `bg-success` | For success messages/badges. |
|
|
118
|
-
| `--color-warning` | `text-warning`, `bg-warning` | For warning messages/badges. |
|
|
119
|
-
| `--color-info` | `text-info`, `bg-info` | For informational messages/badges. |
|
|
120
|
-
| `--color-danger` | `text-danger`, `bg-danger` | Alias for destructive in some contexts. |
|
|
121
|
-
|
|
122
|
-
### Example Customization
|
|
123
|
-
|
|
124
|
-
To customize the theme, simply override the CSS variables in your main CSS file:
|
|
125
|
-
|
|
126
|
-
```css
|
|
127
|
-
@layer base {
|
|
128
|
-
:root {
|
|
129
|
-
--primary: #3b82f6; /* Blue-500 */
|
|
130
|
-
--primary-foreground: #ffffff;
|
|
131
|
-
--radius: 0.75rem;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.dark {
|
|
135
|
-
--primary: #60a5fa; /* Blue-400 */
|
|
136
|
-
--primary-foreground: #000000;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## ✅ Components
|
|
142
|
-
|
|
143
|
-
- **Button**
|
|
144
|
-
- **ButtonGroup**
|
|
145
|
-
- **Icon**
|
|
146
|
-
- **Label**
|
|
147
|
-
- **Badge**
|
|
148
|
-
- **Chip**
|
|
149
|
-
- **Logo**
|
|
150
|
-
- **Navbar**
|
|
151
|
-
- **SidebarMenu**
|
|
152
|
-
- **SidePanel**
|
|
153
|
-
- **Masonry Grid**
|
|
154
|
-
- **ThemeToggle**
|
|
155
|
-
|
|
156
|
-
### Inputs & Forms
|
|
157
|
-
|
|
158
|
-
- **Input**
|
|
159
|
-
- **Textarea**
|
|
160
|
-
- **CheckBox**
|
|
161
|
-
- **Switch**
|
|
162
|
-
- **ChoiceBox**
|
|
163
|
-
- **Slider**
|
|
164
|
-
- **OTPInput**
|
|
165
|
-
- **DatePicker**
|
|
166
|
-
- **ColorPicker**
|
|
167
|
-
- **FilePicker**
|
|
168
|
-
- **AvatarUploader**
|
|
169
|
-
- **IconPicker**
|
|
170
|
-
- **MultiSelect**
|
|
171
|
-
- **Form**
|
|
172
|
-
- **CustomFields**
|
|
173
|
-
|
|
174
|
-
### Data Display
|
|
175
|
-
|
|
176
|
-
- **Avatar**
|
|
177
|
-
- **Accordion**
|
|
178
|
-
- **Carousel**
|
|
179
|
-
- **DataTable**
|
|
180
|
-
- **Pagination**
|
|
181
|
-
- **Timeline**
|
|
182
|
-
- **Heatmap**
|
|
183
|
-
- **PricingPlan**
|
|
184
|
-
- **FileTree**
|
|
185
|
-
- **Workbook**
|
|
186
|
-
- **Tabes**
|
|
187
|
-
|
|
188
|
-
### Feedback & Overlays
|
|
189
|
-
|
|
190
|
-
- **Alert**
|
|
191
|
-
- **Modal**
|
|
192
|
-
- **ConfirmationModal**
|
|
193
|
-
- **ToastNotification**
|
|
194
|
-
- **Tooltip**
|
|
195
|
-
- **Dropdown**
|
|
196
|
-
|
|
197
54
|
## Global Configuration (Registry System)
|
|
198
55
|
|
|
199
56
|
vlite3 features a plugin-based architecture that allows you to register global services. This is particularly useful for dependency injection, such as defining how file uploads should be handled across all `Form` components in your app.
|
|
200
57
|
|
|
201
58
|
### Setting up the Plugin
|
|
202
59
|
|
|
203
|
-
In your `main.ts` or `main.js`, import `createVLite` and register your services:
|
|
60
|
+
In your `main.ts` or `main.js`, import `createVLite` and `vScrollReveal` and register your services:
|
|
204
61
|
|
|
205
62
|
```typescript
|
|
206
63
|
import { createApp } from 'vue'
|
|
207
64
|
import App from './App.vue'
|
|
208
|
-
import { createVLite } from 'vlite3'
|
|
65
|
+
import { env, createVLite, vScrollReveal, GoogleSignInPlugin } from 'vlite3'
|
|
209
66
|
|
|
210
67
|
const app = createApp(App)
|
|
211
68
|
|
|
69
|
+
// Register global directives
|
|
70
|
+
app.directive('scroll-reveal', vScrollReveal)
|
|
71
|
+
|
|
72
|
+
app.use(GoogleSignInPlugin, {
|
|
73
|
+
clientId: env.VITE_GOOGLE_CLIENT_ID,
|
|
74
|
+
})
|
|
75
|
+
|
|
212
76
|
// Initialize VLite with custom configuration
|
|
213
77
|
const vlite = createVLite({
|
|
214
78
|
services: {
|
|
@@ -292,11 +156,223 @@ const handleSubmit = (payload) => {
|
|
|
292
156
|
</script>
|
|
293
157
|
|
|
294
158
|
<template>
|
|
295
|
-
<div class="
|
|
296
|
-
<Button>Click Me</Button>
|
|
297
|
-
<Input placeholder="Type here..." />
|
|
298
|
-
|
|
159
|
+
<div class="">
|
|
299
160
|
<Form :schema="schema" @onSubmit="handleSubmit" />
|
|
300
161
|
</div>
|
|
301
162
|
</template>
|
|
302
163
|
```
|
|
164
|
+
|
|
165
|
+
# 🎨 Theming & Customization
|
|
166
|
+
|
|
167
|
+
Reference guide for **vlite3** and the Tailwind CSS v4 theming system. This setup uses a semantic design token approach inspired by shadcn/ui and optimized for Tailwind CSS v4.
|
|
168
|
+
|
|
169
|
+
All colors are defined as CSS variables, allowing you to customize the appearance of your application with minimal effort, including full Dark Mode support.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Semantic Colors
|
|
174
|
+
|
|
175
|
+
Override these variables in `:root` or within a `.dark` class (when using class-based dark mode) to adjust your theme.
|
|
176
|
+
|
|
177
|
+
| Variable | Utility Class | Description | Recommended Usage |
|
|
178
|
+
| -------------------------------- | ----------------------------- | --------------------------------------- | ----------------------------------------------- |
|
|
179
|
+
| `--color-background` | `bg-background` | Default page background (white) | Main application background |
|
|
180
|
+
| `--color-foreground` | `text-foreground` | Default text color (gray-900) | Primary content text |
|
|
181
|
+
| `--color-card` | `bg-card` | Card background (gray-100) | Cards, containers, surfaces, panels, dialogs |
|
|
182
|
+
| `--color-primary` | `bg-primary` | Primary brand color (blue) | Main actions, buttons, active states |
|
|
183
|
+
| `--color-primary-foreground` | `text-primary-foreground` | Text on primary background (white) | Text/icons displayed on primary elements |
|
|
184
|
+
| `--color-secondary` | `bg-secondary` | Secondary background (gray-200) | Secondary actions, muted sections |
|
|
185
|
+
| `--color-secondary-foreground` | `text-secondary-foreground` | Text on secondary background (gray-900) | Content displayed on secondary elements |
|
|
186
|
+
| `--color-muted` | `bg-muted` | Muted background (gray-150) | Subtle surfaces, table headers, disabled states |
|
|
187
|
+
| `--color-muted` | `text-muted` | Muted text (gray-600) | Secondary text, inactive links, descriptions |
|
|
188
|
+
| `--color-accent` | `bg-accent` | Accent background (gray-150) | Hover states, selection highlights |
|
|
189
|
+
| `--color-accent-foreground` | `text-accent-foreground` | Text on accent background (gray-900) | Content displayed on accent elements |
|
|
190
|
+
| `--color-destructive` | `bg-destructive` | Destructive color (red) | Errors, warnings, destructive actions |
|
|
191
|
+
| `--color-destructive-foreground` | `text-destructive-foreground` | Text on destructive background (white) | Content displayed on destructive elements |
|
|
192
|
+
| `--color-border` | `border` | Default border color (gray-250) | Inputs, cards, dividers |
|
|
193
|
+
| `--radius` | `rounded` | Global border radius | Shared radius across components |
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
### Extended Color Variants
|
|
198
|
+
|
|
199
|
+
For more complex components, vlite3 provides extended variants for main semantic colors (`primary`, `danger`, `warning`, `info`, `success`). These are useful for building nuanced UIs with subtle backgrounds, hover states, and accessible text.
|
|
200
|
+
|
|
201
|
+
| Base Color | Variant Variables | Usage Description |
|
|
202
|
+
| :---------- | :------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
203
|
+
| **Primary** | `--color-primary-light`<br>`--color-primary-dark`<br>`--color-primary-fg`<br>`--color-primary-fg-light` | **Light**: Subtle background (e.g., 10% opacity).<br>**Dark**: Hover state for the main color.<br>**Fg**: Text color on top of the _main_ color.<br>**Fg-Light**: Text color on top of the _light_ variant. |
|
|
204
|
+
| **Danger** | `--color-danger-light`<br>`--color-danger-dark`<br>`--color-danger-fg`<br>`--color-danger-fg-light` | **Light**: Error backgrounds (alerts).<br>**Dark**: Hover state for destructive buttons.<br>**Fg**: Text on destructive buttons.<br>**Fg-Light**: Text on error alerts. |
|
|
205
|
+
| **Warning** | `--color-warning-light`<br>`--color-warning-dark`<br>`--color-warning-fg`<br>`--color-warning-fg-light` | **Light**: Warning backgrounds.<br>**Dark**: Active/Determined warning states.<br>**Fg**: Text on warning badges.<br>**Fg-Light**: Text on warning backgrounds. |
|
|
206
|
+
| **Success** | `--color-success-light`<br>`--color-success-dark`<br>`--color-success-fg`<br>`--color-success-fg-light` | **Light**: Success backgrounds (toasts).<br>**Dark**: Hover/Active success actions.<br>**Fg**: Text on success buttons.<br>**Fg-Light**: Text on success backgrounds. |
|
|
207
|
+
| **Info** | `--color-info-light`<br>`--color-info-dark`<br>`--color-info-fg`<br>`--color-info-fg-light` | **Light**: Info backgrounds.<br>**Dark**: Hover/Active info actions.<br>**Fg**: Text on info buttons.<br>**Fg-Light**: Text on info backgrounds. |
|
|
208
|
+
|
|
209
|
+
**Example Usage:**
|
|
210
|
+
|
|
211
|
+
```html
|
|
212
|
+
<!-- A success badge with subtle background and matching text -->
|
|
213
|
+
<div class="bg-success-light text-success-fg-light border border-success/20">
|
|
214
|
+
Operation Completed
|
|
215
|
+
</div>
|
|
216
|
+
|
|
217
|
+
<!-- A danger button with hover effect -->
|
|
218
|
+
<button class="bg-danger text-danger-fg hover:bg-danger-dark">Delete</button>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Additional Colors
|
|
222
|
+
|
|
223
|
+
vlite3 also provides additional utility colors for specific feedback states:
|
|
224
|
+
|
|
225
|
+
| Variable | Class Name | Description |
|
|
226
|
+
| :---------------- | :--------------------------- | :-------------------------------------- |
|
|
227
|
+
| `--color-success` | `text-success`, `bg-success` | For success messages/badges. |
|
|
228
|
+
| `--color-warning` | `text-warning`, `bg-warning` | For warning messages/badges. |
|
|
229
|
+
| `--color-info` | `text-info`, `bg-info` | For informational messages/badges. |
|
|
230
|
+
| `--color-danger` | `text-danger`, `bg-danger` | Alias for destructive in some contexts. |
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## 8. Typography Scale System
|
|
235
|
+
|
|
236
|
+
The typography system is organized into two complementary scales:
|
|
237
|
+
|
|
238
|
+
- Compact scale (prefixed with `--text--fs-*`)
|
|
239
|
+
- Progressive scale (prefixed with `--text-fs-*`)
|
|
240
|
+
|
|
241
|
+
Use the progressive scale only when you need finer visual control beyond the standard Tailwind size tokens.
|
|
242
|
+
For most layout and content needs, prefer the default Tailwind text sizes to maintain consistency.
|
|
243
|
+
|
|
244
|
+
### Compact Text Scale
|
|
245
|
+
|
|
246
|
+
```css
|
|
247
|
+
--text--fs-1: 0.95em;
|
|
248
|
+
--text--fs-2: 0.8em;
|
|
249
|
+
--text--fs-3: 0.75em;
|
|
250
|
+
--text--fs-4: 0.7em;
|
|
251
|
+
--text--fs-5: 0.65em;
|
|
252
|
+
--text--fs-6: 0.6em;
|
|
253
|
+
--text--fs-7: 0.55em;
|
|
254
|
+
--text--fs-8: 0.5em;
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Progressive Text Scale
|
|
258
|
+
|
|
259
|
+
```css
|
|
260
|
+
--text-fs-0.5: 1.05em;
|
|
261
|
+
--text-fs-1: 1.1em;
|
|
262
|
+
--text-fs-1.5: 1.14em;
|
|
263
|
+
--text-fs-2: 1.18em;
|
|
264
|
+
--text-fs-2.5: 1.22em;
|
|
265
|
+
--text-fs-3: 1.26em;
|
|
266
|
+
--text-fs-3.5: 1.3em;
|
|
267
|
+
--text-fs-4: 1.34em;
|
|
268
|
+
--text-fs-4.5: 1.38em;
|
|
269
|
+
--text-fs-5: 1.42em;
|
|
270
|
+
--text-fs-5.5: 1.46em;
|
|
271
|
+
--text-fs-6: 1.5em;
|
|
272
|
+
--text-fs-6.5: 1.54em;
|
|
273
|
+
--text-fs-7: 1.58em;
|
|
274
|
+
--text-fs-7.5: 1.62em;
|
|
275
|
+
--text-fs-8: 1.68em;
|
|
276
|
+
--text-fs-8.5: 1.72em;
|
|
277
|
+
--text-fs-9: 1.8em;
|
|
278
|
+
--text-fs-9.5: 2em;
|
|
279
|
+
--text-fs-10: 2.5em;
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Tailwind Size Tokens
|
|
283
|
+
|
|
284
|
+
```css
|
|
285
|
+
--text-xs: 0.75rem --text-sm: 0.875rem --text-base: 1rem --text-lg: 1.125rem --text-xl: 1.25rem
|
|
286
|
+
--text-2xl: 1.5rem --text-3xl: 1.875rem --text-4xl: 2.25rem --text-5xl: 3rem --text-6xl: 4rem;
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
### Usage Examples
|
|
292
|
+
|
|
293
|
+
```html
|
|
294
|
+
<p class="text-fs-2">Body text</p>
|
|
295
|
+
|
|
296
|
+
<span class="-text-fs-4 text-muted"> Caption text </span>
|
|
297
|
+
|
|
298
|
+
<h1 class="text-xl font-semibold">Page Title</h1>
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
## Hard Rules
|
|
302
|
+
|
|
303
|
+
Follow these rules strictly to ensure visual consistency and predictable styling across the system:
|
|
304
|
+
|
|
305
|
+
- Use `border` instead of `border-border` (the default border color (gray-250) is already applied).
|
|
306
|
+
- Use `rounded` instead of `rounded-rounded`.
|
|
307
|
+
- Use `bg-muted` instead of `bg-secondary/20`.
|
|
308
|
+
- Use `gap-x-*` instead of applying `ml-*` or `mr-*` directly on sibling items.
|
|
309
|
+
- Use `gap-y-*` instead of applying `mt
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## ✅ Components
|
|
314
|
+
|
|
315
|
+
- **Button**
|
|
316
|
+
- **ButtonGroup**
|
|
317
|
+
- **Icon**
|
|
318
|
+
- **Label**
|
|
319
|
+
- **Badge**
|
|
320
|
+
- **Chip**
|
|
321
|
+
- **Logo**
|
|
322
|
+
- **Navbar**
|
|
323
|
+
- **SidebarMenu**
|
|
324
|
+
- **SidePanel**
|
|
325
|
+
- **Masonry Grid**
|
|
326
|
+
- **ThemeToggle**
|
|
327
|
+
|
|
328
|
+
### Inputs & Forms
|
|
329
|
+
|
|
330
|
+
- **Input**
|
|
331
|
+
- **Textarea**
|
|
332
|
+
- **CheckBox**
|
|
333
|
+
- **Switch**
|
|
334
|
+
- **ChoiceBox**
|
|
335
|
+
- **Slider**
|
|
336
|
+
- **OTPInput**
|
|
337
|
+
- **DatePicker**
|
|
338
|
+
- **ColorPicker**
|
|
339
|
+
- **FilePicker**
|
|
340
|
+
- **AvatarUploader**
|
|
341
|
+
- **IconPicker**
|
|
342
|
+
- **MultiSelect**
|
|
343
|
+
- **Form**
|
|
344
|
+
- **CustomFields**
|
|
345
|
+
- **NumberInput**
|
|
346
|
+
- **Google Login**
|
|
347
|
+
|
|
348
|
+
### Data Display
|
|
349
|
+
|
|
350
|
+
- **Avatar**
|
|
351
|
+
- **Accordion**
|
|
352
|
+
- **Carousel**
|
|
353
|
+
- **DataTable**
|
|
354
|
+
- **Pagination**
|
|
355
|
+
- **Timeline**
|
|
356
|
+
- **Heatmap**
|
|
357
|
+
- **PricingPlan**
|
|
358
|
+
- **FileTree**
|
|
359
|
+
- **Workbook**
|
|
360
|
+
- **Tabes**
|
|
361
|
+
|
|
362
|
+
### Feedback & Overlays
|
|
363
|
+
|
|
364
|
+
- **Alert**
|
|
365
|
+
- **Modal**
|
|
366
|
+
- **ConfirmationModal**
|
|
367
|
+
- **ToastNotification**
|
|
368
|
+
- **Tooltip**
|
|
369
|
+
- **Dropdown**
|
|
370
|
+
- **ProgressBar**
|
|
371
|
+
- **Spinner**
|
|
372
|
+
|
|
373
|
+
## Complete reference for AI agents and developers:
|
|
374
|
+
|
|
375
|
+
- [llms.txt](https://github.com/safdar-azeem/vlite3/blob/main/llms.txt).
|
|
376
|
+
- [llms-theming.txt](https://github.com/safdar-azeem/vlite3/blob/main/llms-theming.txt).
|
|
377
|
+
- [llms-full.txt](https://github.com/safdar-azeem/vlite3/blob/main/llms-full.txt).
|
|
378
|
+
- [llms-advance.txt](https://github.com/safdar-azeem/vlite3/blob/main/llms-advance.txt).
|
package/components/Button.vue.js
CHANGED
|
@@ -17,7 +17,7 @@ const R = ["type", "disabled"], D = /* @__PURE__ */ v({
|
|
|
17
17
|
},
|
|
18
18
|
setup(e) {
|
|
19
19
|
const t = e, g = x(), l = s(() => t.icon && !t.text && !g.default), h = s(() => {
|
|
20
|
-
const n = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-
|
|
20
|
+
const n = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98] cursor-pointer gap-2", d = {
|
|
21
21
|
primary: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
22
22
|
"primary-light": "bg-primary-light text-primary-fg-light hover:bg-primary/20",
|
|
23
23
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as $, computed as s, openBlock as l, createElementBlock as c, normalizeClass as o, renderSlot as u, createBlock as d, createCommentVNode as i, createTextVNode as C, toDisplayString as z, withCtx as B, createVNode as D } from "vue";
|
|
2
|
-
import
|
|
2
|
+
import f from "../Icon.vue.js";
|
|
3
3
|
import S from "../Button.vue.js";
|
|
4
4
|
const N = ["role", "tabindex"], V = {
|
|
5
5
|
key: 0,
|
|
@@ -17,8 +17,8 @@ const N = ["role", "tabindex"], V = {
|
|
|
17
17
|
class: { default: "" }
|
|
18
18
|
},
|
|
19
19
|
emits: ["click", "delete"],
|
|
20
|
-
setup(a, { emit:
|
|
21
|
-
const t = a, n =
|
|
20
|
+
setup(a, { emit: b }) {
|
|
21
|
+
const t = a, n = b, r = s(() => t.clickable && !t.disabled), g = (e) => {
|
|
22
22
|
t.disabled || t.clickable && n("click", e);
|
|
23
23
|
}, v = (e) => {
|
|
24
24
|
t.disabled || (e.stopPropagation(), n("delete", e));
|
|
@@ -27,11 +27,11 @@ const N = ["role", "tabindex"], V = {
|
|
|
27
27
|
}, h = s(() => {
|
|
28
28
|
switch (t.size) {
|
|
29
29
|
case "small":
|
|
30
|
-
return "h-
|
|
30
|
+
return "h-5 text-[10px] px-1.5 gap-1";
|
|
31
31
|
case "large":
|
|
32
|
-
return "h-10 text-base px-4 gap-2.5";
|
|
33
|
-
default:
|
|
34
32
|
return "h-8 text-sm px-3 gap-2";
|
|
33
|
+
default:
|
|
34
|
+
return "h-6 text-xs px-2.5 gap-1.5";
|
|
35
35
|
}
|
|
36
36
|
}), x = s(() => {
|
|
37
37
|
if (t.disabled)
|
|
@@ -53,20 +53,20 @@ const N = ["role", "tabindex"], V = {
|
|
|
53
53
|
}), p = s(() => [j, h.value, x.value, t.class].join(" ")), k = s(() => {
|
|
54
54
|
switch (t.size) {
|
|
55
55
|
case "small":
|
|
56
|
-
return "h-3
|
|
56
|
+
return "h-3 w-3";
|
|
57
57
|
case "large":
|
|
58
|
-
return "h-5 w-5";
|
|
59
|
-
default:
|
|
60
58
|
return "h-4 w-4";
|
|
59
|
+
default:
|
|
60
|
+
return "h-3.5 w-3.5";
|
|
61
61
|
}
|
|
62
62
|
}), y = s(() => {
|
|
63
63
|
switch (t.size) {
|
|
64
64
|
case "small":
|
|
65
|
-
return "h-
|
|
65
|
+
return "h-2.5 w-2.5";
|
|
66
66
|
case "large":
|
|
67
|
-
return "h-4 w-4";
|
|
68
|
-
default:
|
|
69
67
|
return "h-3.5 w-3.5";
|
|
68
|
+
default:
|
|
69
|
+
return "h-3 w-3";
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
return (e, w) => (l(), c("div", {
|
|
@@ -77,7 +77,7 @@ const N = ["role", "tabindex"], V = {
|
|
|
77
77
|
onKeydown: m
|
|
78
78
|
}, [
|
|
79
79
|
u(e.$slots, "icon", {}, () => [
|
|
80
|
-
a.icon ? (l(), d(
|
|
80
|
+
a.icon ? (l(), d(f, {
|
|
81
81
|
key: 0,
|
|
82
82
|
icon: a.icon,
|
|
83
83
|
class: o([k.value, "shrink-0", a.text ? "-ml-0.5" : ""])
|
|
@@ -94,11 +94,11 @@ const N = ["role", "tabindex"], V = {
|
|
|
94
94
|
size: "xs",
|
|
95
95
|
rounded: "full",
|
|
96
96
|
disabled: a.disabled,
|
|
97
|
-
class: o(["ml-auto
|
|
97
|
+
class: o(["ml-auto p-0.5! h-auto! w-auto! hover:bg-[#8282823c]", [a.text ? a.size === "small" ? "-mr-0.5" : "-mr-1" : ""]]),
|
|
98
98
|
onClick: v
|
|
99
99
|
}, {
|
|
100
100
|
default: B(() => [
|
|
101
|
-
D(
|
|
101
|
+
D(f, {
|
|
102
102
|
icon: "lucide:x",
|
|
103
103
|
class: o(y.value)
|
|
104
104
|
}, null, 8, ["class"])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DataTable.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-53f1fe21"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|