vlite3 0.4.10 → 0.5.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 +201 -100
- package/_virtual/Barcode.js +4 -0
- package/_virtual/CODE128.js +4 -0
- package/_virtual/CODE128A.js +4 -0
- package/_virtual/CODE128B.js +4 -0
- package/_virtual/CODE128C.js +4 -0
- package/_virtual/CODE128_AUTO.js +4 -0
- package/_virtual/CODE93.js +4 -0
- package/_virtual/CODE93FullASCII.js +4 -0
- package/_virtual/EAN.js +4 -0
- package/_virtual/EAN13.js +4 -0
- package/_virtual/EAN2.js +4 -0
- package/_virtual/EAN5.js +4 -0
- package/_virtual/EAN8.js +4 -0
- package/_virtual/ErrorHandler.js +4 -0
- package/_virtual/FileSaver.min.js +5 -0
- package/_virtual/FileSaver.min2.js +4 -0
- package/_virtual/ITF.js +4 -0
- package/_virtual/ITF14.js +4 -0
- package/_virtual/JsBarcode.js +7 -0
- package/_virtual/MSI.js +4 -0
- package/_virtual/MSI10.js +4 -0
- package/_virtual/MSI1010.js +4 -0
- package/_virtual/MSI11.js +4 -0
- package/_virtual/MSI1110.js +4 -0
- package/_virtual/UPC.js +4 -0
- package/_virtual/UPCE.js +4 -0
- package/_virtual/_commonjsHelpers.js +8 -0
- package/_virtual/alignment-pattern.js +4 -0
- package/_virtual/auto.js +4 -0
- package/_virtual/browser.js +7 -0
- package/_virtual/browser2.js +4 -0
- package/_virtual/canvas.js +4 -0
- package/_virtual/canvas2.js +4 -0
- package/_virtual/checksums.js +4 -0
- package/_virtual/constants.js +4 -0
- package/_virtual/constants2.js +4 -0
- package/_virtual/constants3.js +4 -0
- package/_virtual/constants4.js +4 -0
- package/_virtual/defaults.js +4 -0
- package/_virtual/dijkstra.js +4 -0
- package/_virtual/encoder.js +4 -0
- package/_virtual/error-correction-code.js +4 -0
- package/_virtual/error-correction-level.js +4 -0
- package/_virtual/exceptions.js +4 -0
- package/_virtual/finder-pattern.js +4 -0
- package/_virtual/fixOptions.js +4 -0
- package/_virtual/format-info.js +4 -0
- package/_virtual/galois-field.js +4 -0
- package/_virtual/getOptionsFromElement.js +4 -0
- package/_virtual/getRenderProperties.js +4 -0
- package/_virtual/index.js +4 -0
- package/_virtual/index10.js +4 -0
- package/_virtual/index11.js +4 -0
- package/_virtual/index2.js +4 -0
- package/_virtual/index3.js +4 -0
- package/_virtual/index4.js +4 -0
- package/_virtual/index5.js +4 -0
- package/_virtual/index6.js +4 -0
- package/_virtual/index7.js +4 -0
- package/_virtual/index8.js +4 -0
- package/_virtual/index9.js +4 -0
- package/_virtual/linearizeEncodings.js +4 -0
- package/_virtual/mask-pattern.js +4 -0
- package/_virtual/merge.js +4 -0
- package/_virtual/mode.js +4 -0
- package/_virtual/object.js +4 -0
- package/_virtual/optionsFromStrings.js +4 -0
- package/_virtual/papaparse.min.js +7 -0
- package/_virtual/papaparse.min2.js +4 -0
- package/_virtual/polynomial.js +4 -0
- package/_virtual/qrcode.js +4 -0
- package/_virtual/regex.js +4 -0
- package/_virtual/segments.js +4 -0
- package/_virtual/shared.js +4 -0
- package/_virtual/svg-tag.js +4 -0
- package/_virtual/svg.js +4 -0
- package/_virtual/utils.js +4 -0
- package/_virtual/utils2.js +4 -0
- package/_virtual/version-check.js +4 -0
- package/_virtual/version.js +4 -0
- package/components/Accordion/Accordion.vue.d.ts +7 -7
- package/components/Accordion/AccordionItem.vue.d.ts +4 -4
- package/components/Accordion/AccordionTrigger.vue.d.ts +2 -2
- package/components/Alert.vue.d.ts +1 -1
- package/components/Avatar.vue.d.ts +2 -2
- package/components/Avatar.vue.js +2 -2
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +5 -5
- package/components/Badge.vue.d.ts +1 -1
- package/components/Barcode/Barcode.vue.d.ts +22 -0
- package/components/Barcode/Barcode.vue.js +58 -0
- package/components/Barcode/Barcode.vue2.js +4 -0
- package/components/Barcode/index.d.ts +2 -0
- package/components/Barcode/types.d.ts +5 -0
- package/components/Barcode/types.js +15 -0
- package/components/Breadcrumb/Breadcrumb.vue.d.ts +23 -0
- package/components/Breadcrumb/Breadcrumb.vue.js +7 -0
- package/components/Breadcrumb/Breadcrumb.vue2.js +84 -0
- package/components/Breadcrumb/BreadcrumbItem.vue.d.ts +27 -0
- package/components/Breadcrumb/BreadcrumbItem.vue.js +7 -0
- package/components/Breadcrumb/BreadcrumbItem.vue2.js +50 -0
- package/components/Breadcrumb/index.d.ts +3 -0
- package/components/Breadcrumb/types.d.ts +19 -0
- package/components/Button.vue.d.ts +4 -4
- package/components/Button.vue.js +32 -29
- package/components/ButtonGroup.vue.d.ts +1 -1
- package/components/Carousel/Carousel.vue.d.ts +58 -58
- package/components/CheckBox.vue.d.ts +2 -2
- package/components/Chip/Chip.vue.d.ts +3 -3
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +4 -4
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.d.ts +3 -3
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/ColorPicker/index.d.ts +1 -0
- package/components/CommandPaletteContent.vue.d.ts +15 -0
- package/components/CommandPaletteContent.vue.js +7 -0
- package/components/CommandPaletteContent.vue2.js +287 -0
- package/components/ConfirmationModal.vue.js +12 -10
- package/components/DataList/DataList.vue.d.ts +2 -2
- package/components/DataTable/DataTable.vue.d.ts +6 -6
- package/components/DataTable/DataTableRow.vue.d.ts +3 -3
- package/components/DatePicker.vue.d.ts +2 -2
- package/components/DatePicker.vue.js +7 -7
- package/components/DateRangePicker.vue.d.ts +29 -0
- package/components/DateRangePicker.vue.js +231 -0
- package/components/DateRangePicker.vue2.js +4 -0
- package/components/Dropdown/Dropdown.vue.d.ts +10 -6
- package/components/Dropdown/Dropdown.vue.js +146 -109
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.d.ts +5 -3
- package/components/Dropdown/DropdownMenu.vue.js +112 -109
- package/components/ExportData/ExportData.vue.d.ts +16 -0
- package/components/ExportData/ExportData.vue.js +135 -0
- package/components/ExportData/ExportData.vue2.js +4 -0
- package/components/ExportData/index.d.ts +2 -0
- package/components/ExportData/types.d.ts +17 -0
- package/components/FilePicker/FilePicker.vue.d.ts +5 -5
- package/components/Form/CustomFields.vue.d.ts +6 -6
- package/components/Form/CustomFields.vue.js +1 -1
- package/components/Form/Form.vue.d.ts +4 -5
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +221 -178
- package/components/Form/FormField.vue.d.ts +4 -3
- package/components/Form/FormField.vue.js +70 -62
- package/components/Form/FormFields.vue.d.ts +3 -1
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +105 -59
- package/components/GoogleLogin.vue.d.ts +2 -2
- package/components/ImportData/ImportData.vue.d.ts +31 -0
- package/components/ImportData/ImportData.vue.js +242 -0
- package/components/ImportData/ImportData.vue2.js +4 -0
- package/components/ImportData/ImportStep1.vue.d.ts +23 -0
- package/components/ImportData/ImportStep1.vue.js +162 -0
- package/components/ImportData/ImportStep1.vue2.js +4 -0
- package/components/ImportData/ImportStep2.vue.d.ts +20 -0
- package/components/ImportData/ImportStep2.vue.js +98 -0
- package/components/ImportData/ImportStep2.vue2.js +4 -0
- package/components/ImportData/ImportStep3.vue.d.ts +6 -0
- package/components/ImportData/ImportStep3.vue.js +98 -0
- package/components/ImportData/ImportStep3.vue2.js +4 -0
- package/components/ImportData/ImportStep4.vue.d.ts +6 -0
- package/components/ImportData/ImportStep4.vue.js +139 -0
- package/components/ImportData/ImportStep4.vue2.js +4 -0
- package/components/ImportData/index.d.ts +2 -0
- package/components/ImportData/types.d.ts +51 -0
- package/components/Input.vue.d.ts +9 -9
- package/components/Input.vue.js +137 -120
- package/components/List/List.vue.d.ts +18 -0
- package/components/List/List.vue.js +189 -0
- package/components/List/List.vue2.js +4 -0
- package/components/List/ListFieldRow.vue.d.ts +35 -0
- package/components/List/ListFieldRow.vue.js +119 -0
- package/components/List/ListFieldRow.vue2.js +4 -0
- package/components/List/index.d.ts +4 -0
- package/components/List/types.d.ts +1 -0
- package/components/List/utils.d.ts +9 -0
- package/components/List/utils.js +64 -0
- package/components/Masonry/Masonry.vue.d.ts +2 -2
- package/components/Modal.vue.js +5 -122
- package/components/Modal.vue2.js +133 -2
- package/components/MultiSelect/MultiSelect.vue.d.ts +12 -9
- package/components/MultiSelect/MultiSelect.vue.js +101 -64
- package/components/Navbar/Navbar.vue.d.ts +14 -6
- package/components/Navbar/Navbar.vue.js +425 -356
- package/components/Navbar/NavbarItem.vue.d.ts +2 -2
- package/components/Navbar/NavbarTabs.vue.d.ts +21 -0
- package/components/Navbar/NavbarTabs.vue.js +179 -0
- package/components/Navbar/NavbarTabs.vue3.js +5 -0
- package/components/Navbar/index.d.ts +3 -0
- package/components/NavbarCommandPalette.vue.d.ts +48 -0
- package/components/NumberInput.vue.d.ts +8 -8
- package/components/OTPInput/OTPInput.vue.d.ts +7 -7
- package/components/Pagination/Pagination.vue.d.ts +1 -1
- package/components/PermissionMatrix/PermissionEditor.vue.d.ts +36 -0
- package/components/PermissionMatrix/PermissionEditor.vue.js +323 -0
- package/components/PermissionMatrix/PermissionEditor.vue2.js +4 -0
- package/components/PermissionMatrix/PermissionMatrix.vue.d.ts +15 -0
- package/components/PermissionMatrix/PermissionMatrix.vue.js +7 -0
- package/components/PermissionMatrix/PermissionMatrix.vue2.js +245 -0
- package/components/PermissionMatrix/index.d.ts +3 -0
- package/components/PermissionMatrix/types.d.ts +59 -0
- package/components/PricingPlan/PricingPlan.vue.d.ts +3 -3
- package/components/ProgressBar/ProgressBar.vue.d.ts +3 -3
- package/components/QRCode/QRCode.vue.d.ts +15 -0
- package/components/QRCode/QRCode.vue.js +38 -0
- package/components/QRCode/QRCode.vue2.js +4 -0
- package/components/QRCode/index.d.ts +1 -0
- package/components/Screen/Screen.vue.d.ts +232 -5
- package/components/Screen/Screen.vue.js +423 -271
- package/components/Screen/ScreenFilter.vue.d.ts +2 -2
- package/components/Screen/ScreenFilter.vue.js +10 -10
- package/components/Screen/types.d.ts +12 -0
- package/components/SidePanel.vue.d.ts +2 -2
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +6 -2
- package/components/SidebarMenu/SidebarMenu.vue.js +104 -50
- package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +2 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.js +187 -174
- package/components/SidebarMenu/types.d.ts +8 -0
- package/components/Slider.vue.d.ts +2 -2
- package/components/Spinner/Spinner.vue.d.ts +2 -2
- package/components/Stats/Stats.vue.d.ts +14 -0
- package/components/Stats/Stats.vue.js +307 -0
- package/components/Stats/Stats.vue2.js +4 -0
- package/components/Stats/index.d.ts +2 -0
- package/components/Stats/types.d.ts +32 -0
- package/components/Switch.vue.d.ts +2 -1
- package/components/Switch.vue.js +4 -2
- package/components/Tabes/Tabes.vue.d.ts +3 -3
- package/components/Tabes/Tabes.vue.js +60 -57
- package/components/Tabes/types.d.ts +5 -0
- package/components/Textarea.vue.d.ts +3 -3
- package/components/{Timeline.vue.d.ts → Timeline/Timeline.vue.d.ts} +23 -2
- package/components/Timeline/Timeline.vue.js +92 -0
- package/components/Timeline/TimelineIndicator.vue.d.ts +9 -0
- package/components/Timeline/TimelineIndicator.vue.js +68 -0
- package/components/Timeline/TimelineIndicator.vue2.js +4 -0
- package/components/Timeline/TimelineItem.vue.d.ts +56 -0
- package/components/Timeline/TimelineItem.vue.js +173 -0
- package/components/Timeline/TimelineItem.vue2.js +4 -0
- package/components/Timeline/index.d.ts +3 -0
- package/components/Tooltip.vue.d.ts +2 -2
- package/components/Workbook/Sheet.vue.d.ts +2 -2
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/components/index.d.ts +62 -0
- package/composables/useBreadcrumb.d.ts +17 -0
- package/composables/useBreadcrumb.js +27 -0
- package/core/config.d.ts +34 -0
- package/core/config.js +10 -7
- package/core/index.js +15 -8
- package/index.d.ts +55 -44
- package/index.js +243 -200
- package/package.json +12 -2
- package/router.d.ts +2 -0
- package/style.css +7 -5
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +35 -0
- package/types/form.type.d.ts +3 -1
- package/types/index.d.ts +2 -1
- package/types/list.type.d.ts +57 -0
- package/types/navbar.type.d.ts +38 -1
- package/types/timeline.type.d.ts +14 -4
- package/components/Timeline.vue.js +0 -160
- /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
- /package/components/{Timeline.vue2.js → Timeline/Timeline.vue2.js} +0 -0
package/README.md
CHANGED
|
@@ -6,10 +6,12 @@ A lightweight Vue 3 UI component library built with Tailwind CSS, created for pe
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install vlite3
|
|
9
|
+
|
|
9
10
|
```
|
|
10
11
|
|
|
11
12
|
```bash
|
|
12
13
|
yarn add vlite3
|
|
14
|
+
|
|
13
15
|
```
|
|
14
16
|
|
|
15
17
|
## 2. Tailwind CSS Setup (Tailwind v4)
|
|
@@ -22,6 +24,7 @@ import tailwindcss from '@tailwindcss/vite'
|
|
|
22
24
|
export default defineConfig({
|
|
23
25
|
plugins: [vue(), tailwindcss()],
|
|
24
26
|
})
|
|
27
|
+
|
|
25
28
|
```
|
|
26
29
|
|
|
27
30
|
`style.css`
|
|
@@ -32,6 +35,7 @@ export default defineConfig({
|
|
|
32
35
|
|
|
33
36
|
@import 'vlite3/style.css';
|
|
34
37
|
@source "../node_modules/vlite3";
|
|
38
|
+
|
|
35
39
|
```
|
|
36
40
|
|
|
37
41
|
## 3. Usage
|
|
@@ -49,15 +53,16 @@ import { Button, Input } from 'vlite3'
|
|
|
49
53
|
<Input placeholder="Type here..." />
|
|
50
54
|
</div>
|
|
51
55
|
</template>
|
|
56
|
+
|
|
52
57
|
```
|
|
53
58
|
|
|
54
59
|
## Global Configuration (Registry System)
|
|
55
60
|
|
|
56
|
-
vlite3 features a plugin-based architecture that allows you to register global services
|
|
61
|
+
vlite3 features a plugin-based architecture that allows you to register global services and set global component configurations. This ensures consistency and prevents repetition across your application.
|
|
57
62
|
|
|
58
63
|
### Setting up the Plugin
|
|
59
64
|
|
|
60
|
-
In your `main.ts` or `main.js`, import `createVLite` and `vScrollReveal` and register your services:
|
|
65
|
+
In your `main.ts` or `main.js`, import `createVLite` and `vScrollReveal` and register your services and component configurations:
|
|
61
66
|
|
|
62
67
|
```typescript
|
|
63
68
|
import { createApp } from 'vue'
|
|
@@ -75,6 +80,7 @@ app.use(GoogleSignInPlugin, {
|
|
|
75
80
|
|
|
76
81
|
// Initialize VLite with custom configuration
|
|
77
82
|
const vlite = createVLite({
|
|
83
|
+
// Global Service Registry
|
|
78
84
|
services: {
|
|
79
85
|
/**
|
|
80
86
|
* Global File Upload Handler
|
|
@@ -111,29 +117,49 @@ const vlite = createVLite({
|
|
|
111
117
|
return data.url // MUST return the file URL string
|
|
112
118
|
},
|
|
113
119
|
},
|
|
120
|
+
|
|
121
|
+
// Global UI Components Configuration
|
|
122
|
+
components: {
|
|
123
|
+
form: {
|
|
124
|
+
variant: 'outline', // Applies 'outline' globally to all Form inputs ('solid' | 'outline' | 'floating' | etc.)
|
|
125
|
+
size: 'md', // Global size for form inputs ('sm' | 'md' | 'lg')
|
|
126
|
+
rounded: 'md', // Global border radius for forms
|
|
127
|
+
showRequiredAsterisk: true, // Globally toggle the visibility of the required asterisk
|
|
128
|
+
}
|
|
129
|
+
}
|
|
114
130
|
})
|
|
115
131
|
|
|
116
132
|
app.use(vlite)
|
|
117
133
|
app.mount('#app')
|
|
134
|
+
|
|
118
135
|
```
|
|
119
136
|
|
|
120
137
|
### How it works
|
|
121
138
|
|
|
139
|
+
#### Global Services (e.g., Uploads)
|
|
140
|
+
|
|
122
141
|
Once registered, you don't need to pass upload handlers to individual components.
|
|
123
142
|
|
|
124
143
|
1. **Automatic Injection**: The `Form` component detects input types like `file`, `avatarUpload`, or `fileUploader`.
|
|
125
144
|
2. **Parallel Processing**: When the form is submitted, it automatically uploads all files in **parallel** using your registered `upload` service.
|
|
126
145
|
3. **URL Replacement**: The File objects in your form data are replaced with the returned URLs before the final `onSubmit` event is triggered.
|
|
127
146
|
|
|
128
|
-
|
|
147
|
+
#### Global Component Configuration (e.g., Forms)
|
|
129
148
|
|
|
130
|
-
|
|
149
|
+
By setting `components.form` in the global configuration, you establish app-wide defaults.
|
|
150
|
+
|
|
151
|
+
1. **Consistency**: Every `<Form />` rendered in your application will automatically inherit the global `variant`, `size`, `rounded`, and `showRequiredAsterisk` configurations.
|
|
152
|
+
2. **Local Overrides**: If you need a specific form to behave differently, simply pass the prop locally on the component (e.g., `<Form variant="floating" ... />`). Local props will always override the global configuration fallback.
|
|
153
|
+
|
|
154
|
+
## 4. Advanced Usage
|
|
155
|
+
|
|
156
|
+
Import components directly in your Vue files and leverage the global configuration:
|
|
131
157
|
|
|
132
158
|
```vue
|
|
133
159
|
<script setup>
|
|
134
160
|
import { Button, Input, Form } from 'vlite3'
|
|
135
161
|
|
|
136
|
-
// The form will automatically use the global upload service
|
|
162
|
+
// The form will automatically use the global upload service AND the global style configurations
|
|
137
163
|
const schema = [
|
|
138
164
|
{
|
|
139
165
|
name: 'avatar',
|
|
@@ -158,8 +184,11 @@ const handleSubmit = (payload) => {
|
|
|
158
184
|
<template>
|
|
159
185
|
<div class="">
|
|
160
186
|
<Form :schema="schema" @onSubmit="handleSubmit" />
|
|
187
|
+
|
|
188
|
+
<Form :schema="schema" variant="solid" size="lg" @onSubmit="handleSubmit" />
|
|
161
189
|
</div>
|
|
162
190
|
</template>
|
|
191
|
+
|
|
163
192
|
```
|
|
164
193
|
|
|
165
194
|
# 🎨 Theming & Customization
|
|
@@ -174,23 +203,23 @@ All colors are defined as CSS variables, allowing you to customize the appearanc
|
|
|
174
203
|
|
|
175
204
|
Override these variables in `:root` or within a `.dark` class (when using class-based dark mode) to adjust your theme.
|
|
176
205
|
|
|
177
|
-
| Variable
|
|
178
|
-
|
|
|
179
|
-
| `--color-background`
|
|
180
|
-
| `--color-foreground`
|
|
181
|
-
| `--color-card`
|
|
182
|
-
| `--color-primary`
|
|
183
|
-
| `--color-primary-foreground`
|
|
184
|
-
| `--color-secondary`
|
|
185
|
-
| `--color-secondary-foreground`
|
|
186
|
-
| `--color-muted`
|
|
187
|
-
| `--color-muted`
|
|
188
|
-
| `--color-accent`
|
|
189
|
-
| `--color-accent-foreground`
|
|
190
|
-
| `--color-destructive`
|
|
191
|
-
| `--color-destructive-foreground` | `text-destructive-foreground` | Text on destructive background (white)
|
|
192
|
-
| `--color-border`
|
|
193
|
-
| `--radius`
|
|
206
|
+
| Variable | Utility Class | Description | Recommended Usage |
|
|
207
|
+
| --- | --- | --- | --- |
|
|
208
|
+
| `--color-background` | `bg-background` | Default page background (white) | Main application background |
|
|
209
|
+
| `--color-foreground` | `text-foreground` | Default text color (gray-900) | Primary content text |
|
|
210
|
+
| `--color-card` | `bg-card` | Card background (gray-100) | Cards, containers, surfaces, panels, dialogs |
|
|
211
|
+
| `--color-primary` | `bg-primary` | Primary brand color (blue) | Main actions, buttons, active states |
|
|
212
|
+
| `--color-primary-foreground` | `text-primary-foreground` | Text on primary background (white) | Text/icons displayed on primary elements |
|
|
213
|
+
| `--color-secondary` | `bg-secondary` | Secondary background (gray-200) | Secondary actions, muted sections |
|
|
214
|
+
| `--color-secondary-foreground` | `text-secondary-foreground` | Text on secondary background (gray-900) | Content displayed on secondary elements |
|
|
215
|
+
| `--color-muted` | `bg-muted` | Muted background (gray-150) | Subtle surfaces, table headers, disabled states |
|
|
216
|
+
| `--color-muted` | `text-muted` | Muted text (gray-600) | Secondary text, inactive links, descriptions |
|
|
217
|
+
| `--color-accent` | `bg-accent` | Accent background (gray-150) | Hover states, selection highlights |
|
|
218
|
+
| `--color-accent-foreground` | `text-accent-foreground` | Text on accent background (gray-900) | Content displayed on accent elements |
|
|
219
|
+
| `--color-destructive` | `bg-destructive` | Destructive color (red) | Errors, warnings, destructive actions |
|
|
220
|
+
| `--color-destructive-foreground` | `text-destructive-foreground` | Text on destructive background (white) | Content displayed on destructive elements |
|
|
221
|
+
| `--color-border` | `border` | Default border color (gray-250) | Inputs, cards, dividers |
|
|
222
|
+
| `--radius` | `rounded` | Global border radius | Shared radius across components |
|
|
194
223
|
|
|
195
224
|
---
|
|
196
225
|
|
|
@@ -198,36 +227,95 @@ Override these variables in `:root` or within a `.dark` class (when using class-
|
|
|
198
227
|
|
|
199
228
|
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
229
|
|
|
201
|
-
| Base Color
|
|
202
|
-
|
|
|
203
|
-
| **Primary** | `--color-primary-light`<br
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
230
|
+
| Base Color | Variant Variables | Usage Description |
|
|
231
|
+
| --- | --- | --- |
|
|
232
|
+
| **Primary** | `--color-primary-light`<br>
|
|
233
|
+
|
|
234
|
+
<br>`--color-primary-dark`<br>
|
|
235
|
+
|
|
236
|
+
<br>`--color-primary-fg`<br>
|
|
237
|
+
|
|
238
|
+
<br>`--color-primary-fg-light` | **Light**: Subtle background (e.g., 10% opacity).<br>
|
|
239
|
+
|
|
240
|
+
<br>**Dark**: Hover state for the main color.<br>
|
|
241
|
+
|
|
242
|
+
<br>**Fg**: Text color on top of the *main* color.<br>
|
|
243
|
+
|
|
244
|
+
<br>**Fg-Light**: Text color on top of the *light* variant. |
|
|
245
|
+
| **Danger** | `--color-danger-light`<br>
|
|
246
|
+
|
|
247
|
+
<br>`--color-danger-dark`<br>
|
|
248
|
+
|
|
249
|
+
<br>`--color-danger-fg`<br>
|
|
250
|
+
|
|
251
|
+
<br>`--color-danger-fg-light` | **Light**: Error backgrounds (alerts).<br>
|
|
252
|
+
|
|
253
|
+
<br>**Dark**: Hover state for destructive buttons.<br>
|
|
254
|
+
|
|
255
|
+
<br>**Fg**: Text on destructive buttons.<br>
|
|
256
|
+
|
|
257
|
+
<br>**Fg-Light**: Text on error alerts. |
|
|
258
|
+
| **Warning** | `--color-warning-light`<br>
|
|
259
|
+
|
|
260
|
+
<br>`--color-warning-dark`<br>
|
|
261
|
+
|
|
262
|
+
<br>`--color-warning-fg`<br>
|
|
263
|
+
|
|
264
|
+
<br>`--color-warning-fg-light` | **Light**: Warning backgrounds.<br>
|
|
265
|
+
|
|
266
|
+
<br>**Dark**: Active/Determined warning states.<br>
|
|
267
|
+
|
|
268
|
+
<br>**Fg**: Text on warning badges.<br>
|
|
269
|
+
|
|
270
|
+
<br>**Fg-Light**: Text on warning backgrounds. |
|
|
271
|
+
| **Success** | `--color-success-light`<br>
|
|
272
|
+
|
|
273
|
+
<br>`--color-success-dark`<br>
|
|
274
|
+
|
|
275
|
+
<br>`--color-success-fg`<br>
|
|
276
|
+
|
|
277
|
+
<br>`--color-success-fg-light` | **Light**: Success backgrounds (toasts).<br>
|
|
278
|
+
|
|
279
|
+
<br>**Dark**: Hover/Active success actions.<br>
|
|
280
|
+
|
|
281
|
+
<br>**Fg**: Text on success buttons.<br>
|
|
282
|
+
|
|
283
|
+
<br>**Fg-Light**: Text on success backgrounds. |
|
|
284
|
+
| **Info** | `--color-info-light`<br>
|
|
285
|
+
|
|
286
|
+
<br>`--color-info-dark`<br>
|
|
287
|
+
|
|
288
|
+
<br>`--color-info-fg`<br>
|
|
289
|
+
|
|
290
|
+
<br>`--color-info-fg-light` | **Light**: Info backgrounds.<br>
|
|
291
|
+
|
|
292
|
+
<br>**Dark**: Hover/Active info actions.<br>
|
|
293
|
+
|
|
294
|
+
<br>**Fg**: Text on info buttons.<br>
|
|
295
|
+
|
|
296
|
+
<br>**Fg-Light**: Text on info backgrounds. |
|
|
208
297
|
|
|
209
298
|
**Example Usage:**
|
|
210
299
|
|
|
211
300
|
```html
|
|
212
|
-
<!-- A success badge with subtle background and matching text -->
|
|
213
301
|
<div class="bg-success-light text-success-fg-light border border-success/20">
|
|
214
302
|
Operation Completed
|
|
215
303
|
</div>
|
|
216
304
|
|
|
217
|
-
<!-- A danger button with hover effect -->
|
|
218
305
|
<button class="bg-danger text-danger-fg hover:bg-danger-dark">Delete</button>
|
|
306
|
+
|
|
219
307
|
```
|
|
220
308
|
|
|
221
309
|
### Additional Colors
|
|
222
310
|
|
|
223
311
|
vlite3 also provides additional utility colors for specific feedback states:
|
|
224
312
|
|
|
225
|
-
| Variable
|
|
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`
|
|
230
|
-
| `--color-danger`
|
|
313
|
+
| Variable | Class Name | Description |
|
|
314
|
+
| --- | --- | --- |
|
|
315
|
+
| `--color-success` | `text-success`, `bg-success` | For success messages/badges. |
|
|
316
|
+
| `--color-warning` | `text-warning`, `bg-warning` | For warning messages/badges. |
|
|
317
|
+
| `--color-info` | `text-info`, `bg-info` | For informational messages/badges. |
|
|
318
|
+
| `--color-danger` | `text-danger`, `bg-danger` | Alias for destructive in some contexts. |
|
|
231
319
|
|
|
232
320
|
---
|
|
233
321
|
|
|
@@ -235,8 +323,8 @@ vlite3 also provides additional utility colors for specific feedback states:
|
|
|
235
323
|
|
|
236
324
|
The typography system is organized into two complementary scales:
|
|
237
325
|
|
|
238
|
-
|
|
239
|
-
|
|
326
|
+
* Compact scale (prefixed with `--text--fs-*`)
|
|
327
|
+
* Progressive scale (prefixed with `--text-fs-*`)
|
|
240
328
|
|
|
241
329
|
Use the progressive scale only when you need finer visual control beyond the standard Tailwind size tokens.
|
|
242
330
|
For most layout and content needs, prefer the default Tailwind text sizes to maintain consistency.
|
|
@@ -252,6 +340,7 @@ For most layout and content needs, prefer the default Tailwind text sizes to mai
|
|
|
252
340
|
--text--fs-6: 0.6em;
|
|
253
341
|
--text--fs-7: 0.55em;
|
|
254
342
|
--text--fs-8: 0.5em;
|
|
343
|
+
|
|
255
344
|
```
|
|
256
345
|
|
|
257
346
|
### Progressive Text Scale
|
|
@@ -277,13 +366,23 @@ For most layout and content needs, prefer the default Tailwind text sizes to mai
|
|
|
277
366
|
--text-fs-9: 1.8em;
|
|
278
367
|
--text-fs-9.5: 2em;
|
|
279
368
|
--text-fs-10: 2.5em;
|
|
369
|
+
|
|
280
370
|
```
|
|
281
371
|
|
|
282
372
|
### Tailwind Size Tokens
|
|
283
373
|
|
|
284
374
|
```css
|
|
285
|
-
--text-xs: 0.75rem
|
|
286
|
-
|
|
375
|
+
--text-xs: 0.75rem
|
|
376
|
+
--text-sm: 0.875rem
|
|
377
|
+
--text-base: 1rem
|
|
378
|
+
--text-lg: 1.125rem
|
|
379
|
+
--text-xl: 1.25rem
|
|
380
|
+
--text-2xl: 1.5rem
|
|
381
|
+
--text-3xl: 1.875rem
|
|
382
|
+
--text-4xl: 2.25rem
|
|
383
|
+
--text-5xl: 3rem
|
|
384
|
+
--text-6xl: 4rem;
|
|
385
|
+
|
|
287
386
|
```
|
|
288
387
|
|
|
289
388
|
---
|
|
@@ -296,85 +395,87 @@ For most layout and content needs, prefer the default Tailwind text sizes to mai
|
|
|
296
395
|
<span class="-text-fs-4 text-muted"> Caption text </span>
|
|
297
396
|
|
|
298
397
|
<h1 class="text-xl font-semibold">Page Title</h1>
|
|
398
|
+
|
|
299
399
|
```
|
|
300
400
|
|
|
301
401
|
## Hard Rules
|
|
302
402
|
|
|
303
403
|
Follow these rules strictly to ensure visual consistency and predictable styling across the system:
|
|
304
404
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
405
|
+
* Use `border` instead of `border-border` (the default border color (gray-250) is already applied).
|
|
406
|
+
* Use `rounded` instead of `rounded-rounded`.
|
|
407
|
+
* Use `bg-muted` instead of `bg-secondary/20`.
|
|
408
|
+
* Use `gap-x-*` instead of applying `ml-*` or `mr-*` directly on sibling items.
|
|
409
|
+
* Use `gap-y-*` instead of applying `mt-*` or `mb-*` directly on sibling items.
|
|
310
410
|
|
|
311
411
|
---
|
|
312
412
|
|
|
313
413
|
## ✅ Components
|
|
314
414
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
415
|
+
* **Button**
|
|
416
|
+
* **ButtonGroup**
|
|
417
|
+
* **Icon**
|
|
418
|
+
* **Label**
|
|
419
|
+
* **Badge**
|
|
420
|
+
* **Chip**
|
|
421
|
+
* **Logo**
|
|
422
|
+
* **Navbar**
|
|
423
|
+
* **SidebarMenu**
|
|
424
|
+
* **SidePanel**
|
|
425
|
+
* **Masonry Grid**
|
|
426
|
+
* **ThemeToggle**
|
|
327
427
|
|
|
328
428
|
### Inputs & Forms
|
|
329
429
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
430
|
+
* **Input**
|
|
431
|
+
* **Textarea**
|
|
432
|
+
* **CheckBox**
|
|
433
|
+
* **Switch**
|
|
434
|
+
* **ChoiceBox**
|
|
435
|
+
* **Slider**
|
|
436
|
+
* **OTPInput**
|
|
437
|
+
* **DatePicker**
|
|
438
|
+
* **ColorPicker**
|
|
439
|
+
* **FilePicker**
|
|
440
|
+
* **AvatarUploader**
|
|
441
|
+
* **IconPicker**
|
|
442
|
+
* **MultiSelect**
|
|
443
|
+
* **Form**
|
|
444
|
+
* **CustomFields**
|
|
445
|
+
* **NumberInput**
|
|
446
|
+
* **Google Login**
|
|
347
447
|
|
|
348
448
|
### Data Display
|
|
349
449
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
450
|
+
* **Avatar**
|
|
451
|
+
* **Accordion**
|
|
452
|
+
* **Carousel**
|
|
453
|
+
* **DataTable**
|
|
454
|
+
* **Pagination**
|
|
455
|
+
* **Timeline**
|
|
456
|
+
* **Heatmap**
|
|
457
|
+
* **PricingPlan**
|
|
458
|
+
* **FileTree**
|
|
459
|
+
* **Workbook**
|
|
460
|
+
* **Tabes**
|
|
361
461
|
|
|
362
462
|
### Feedback & Overlays
|
|
363
463
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
464
|
+
* **Alert**
|
|
465
|
+
* **Modal**
|
|
466
|
+
* **ConfirmationModal**
|
|
467
|
+
* **ToastNotification**
|
|
468
|
+
* **Tooltip**
|
|
469
|
+
* **Dropdown**
|
|
470
|
+
* **ProgressBar**
|
|
471
|
+
* **Spinner**
|
|
372
472
|
|
|
373
473
|
## Complete reference for AI agents and developers:
|
|
374
474
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
475
|
+
* [1-setup.md](https://github.com/safdar-azeem/vlite3/blob/main/docs/1-setup.md)
|
|
476
|
+
* [2-theming.md](https://github.com/safdar-azeem/vlite3/blob/main/docs/2-theming.md)
|
|
477
|
+
* [3-all-components.md](https://github.com/safdar-azeem/vlite3/blob/main/docs/3-all-components.md)
|
|
478
|
+
* [4-forms.md](https://github.com/safdar-azeem/vlite3/blob/main/docs/4-forms.md)
|
|
479
|
+
* [5-utility.md](https://github.com/safdar-azeem/vlite3/blob/main/docs/5-utility.md)
|
|
480
|
+
* [6-advance-components.md](https://github.com/safdar-azeem/vlite3/blob/main/docs/6-advance-components.md)
|
|
481
|
+
|
package/_virtual/EAN.js
ADDED
package/_virtual/EAN2.js
ADDED
package/_virtual/EAN5.js
ADDED
package/_virtual/EAN8.js
ADDED
package/_virtual/ITF.js
ADDED
package/_virtual/MSI.js
ADDED
package/_virtual/UPC.js
ADDED
package/_virtual/UPCE.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function l(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
o as commonjsGlobal,
|
|
7
|
+
l as getDefaultExportFromCjs
|
|
8
|
+
};
|
package/_virtual/auto.js
ADDED