@ertugrulozcan97/apexui 0.1.0 → 0.1.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 +131 -22
- package/package.json +1 -3
package/README.md
CHANGED
|
@@ -1,38 +1,147 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ApexUI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A Vue 3 UI component library built with Tailwind CSS v4 and TypeScript.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Requirements
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- Vue ≥ 3.4
|
|
8
|
+
- Tailwind CSS ≥ 4.0 (with `@tailwindcss/vite`)
|
|
9
|
+
- `@lucide/vue` ≥ 1.0
|
|
8
10
|
|
|
9
|
-
##
|
|
11
|
+
## Installation
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
```bash
|
|
14
|
+
npm install @ertugrulozcan97/apexui
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Setup
|
|
18
|
+
|
|
19
|
+
### 1. Import styles
|
|
20
|
+
|
|
21
|
+
In your `main.css` (or equivalent), import the library's design tokens and your Tailwind base **before** your own styles:
|
|
22
|
+
|
|
23
|
+
```css
|
|
24
|
+
@import "tailwindcss";
|
|
25
|
+
@import "@ertugrulozcan97/apexui/style";
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 2. Register the plugin
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
// main.ts
|
|
32
|
+
import { createApp } from "vue"
|
|
33
|
+
import App from "./App.vue"
|
|
34
|
+
import ApexUI from "@ertugrulozcan97/apexui"
|
|
35
|
+
|
|
36
|
+
const app = createApp(App)
|
|
37
|
+
app.use(ApexUI)
|
|
38
|
+
app.mount("#app")
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 3. Add providers
|
|
42
|
+
|
|
43
|
+
Place these once in your root `App.vue` template. They are required for toasts and dialogs to work:
|
|
44
|
+
|
|
45
|
+
```vue
|
|
46
|
+
<template>
|
|
47
|
+
<UToastProvider />
|
|
48
|
+
<UDialogProvider />
|
|
49
|
+
<RouterView />
|
|
50
|
+
</template>
|
|
51
|
+
```
|
|
17
52
|
|
|
18
|
-
##
|
|
53
|
+
## À la carte usage
|
|
19
54
|
|
|
20
|
-
|
|
55
|
+
Import only what you need instead of registering the full plugin:
|
|
21
56
|
|
|
22
|
-
|
|
57
|
+
```ts
|
|
58
|
+
import { UButton, UInput, useToast, useDialog } from "@ertugrulozcan97/apexui"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Components
|
|
62
|
+
|
|
63
|
+
| Component | Description |
|
|
64
|
+
| -------------------- | ----------------------------------------------------------------------------------- |
|
|
65
|
+
| `UBadge` | Status badge with variants: `success`, `warning`, `danger`, `info`, `neutral` |
|
|
66
|
+
| `UButton` | Button with variants `primary`, `secondary`, `danger`, `ghost` and sizes `md`, `sm` |
|
|
67
|
+
| `UCheckbox` | Checkbox with label and v-model support |
|
|
68
|
+
| `UDialog` | Programmatic confirmation dialog (used with `useDialog`) |
|
|
69
|
+
| `UDialogProvider` | Required provider — mount once in root |
|
|
70
|
+
| `UDrawer` | Slide-over panel, supports `left`, `right`, `top`, `bottom` sides |
|
|
71
|
+
| `UDropzone` | File drag-and-drop upload area |
|
|
72
|
+
| `UEmptyState` | Empty state placeholder with icon, title, and description |
|
|
73
|
+
| `UFormRow` | Form field wrapper with label and hint |
|
|
74
|
+
| `UIcon` | Lucide icon wrapper with color and size props |
|
|
75
|
+
| `UIconButton` | Square icon-only button |
|
|
76
|
+
| `UInput` | Text input, textarea, or select — controlled via `v-model` |
|
|
77
|
+
| `UListCard` | Card container for list items |
|
|
78
|
+
| `UListCardCell` | Cell inside a `UListCard` |
|
|
79
|
+
| `ULogoMark` | Brand logo mark |
|
|
80
|
+
| `UModal` | Modal dialog with slot-based content |
|
|
81
|
+
| `UPageLayout` | Two-column page layout (sidebar + content) |
|
|
82
|
+
| `URadio` | Radio button with label |
|
|
83
|
+
| `USelect` | Dropdown select with `v-model` |
|
|
84
|
+
| `USidebar` | Navigation sidebar with sections, items, and nested children |
|
|
85
|
+
| `UStatCard` | Statistic card with label, value, and trend |
|
|
86
|
+
| `USwitch` | Toggle switch with sizes `md`, `sm` |
|
|
87
|
+
| `UTabs` | Tab bar with active tab tracking |
|
|
88
|
+
| `UTable` | Data table with sorting, pagination, and column toggling |
|
|
89
|
+
| `UTableColumnToggle` | Popover to show/hide table columns |
|
|
90
|
+
| `UTablePager` | Pagination controls for `UTable` |
|
|
91
|
+
| `UTableRow` | Row wrapper for `UTable` |
|
|
92
|
+
| `UToastProvider` | Required provider — mount once in root |
|
|
93
|
+
| `UTopBar` | Top navigation bar |
|
|
94
|
+
|
|
95
|
+
## Composables
|
|
96
|
+
|
|
97
|
+
### `useToast`
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
import { useToast } from "@ertugrulozcan97/apexui"
|
|
101
|
+
|
|
102
|
+
const toast = useToast()
|
|
23
103
|
|
|
24
|
-
|
|
25
|
-
|
|
104
|
+
toast.success("Saved successfully")
|
|
105
|
+
toast.error("Something went wrong")
|
|
106
|
+
toast.warning("Check your input")
|
|
107
|
+
toast.info("New update available")
|
|
26
108
|
```
|
|
27
109
|
|
|
28
|
-
###
|
|
110
|
+
### `useDialog`
|
|
29
111
|
|
|
30
|
-
```
|
|
31
|
-
|
|
112
|
+
```ts
|
|
113
|
+
import { useDialog } from "@ertugrulozcan97/apexui"
|
|
114
|
+
|
|
115
|
+
const dialog = useDialog()
|
|
116
|
+
|
|
117
|
+
const confirmed = await dialog.confirm({
|
|
118
|
+
title: "Delete item",
|
|
119
|
+
message: "This action cannot be undone.",
|
|
120
|
+
variant: "danger",
|
|
121
|
+
})
|
|
32
122
|
```
|
|
33
123
|
|
|
34
|
-
|
|
124
|
+
## Example
|
|
125
|
+
|
|
126
|
+
```vue
|
|
127
|
+
<script setup lang="ts">
|
|
128
|
+
import { ref } from "vue"
|
|
129
|
+
import { UButton, UInput, useToast } from "@ertugrulozcan97/apexui"
|
|
130
|
+
|
|
131
|
+
const name = ref("")
|
|
132
|
+
const toast = useToast()
|
|
35
133
|
|
|
36
|
-
|
|
37
|
-
|
|
134
|
+
function submit() {
|
|
135
|
+
toast.success(`Hello, ${name.value}!`)
|
|
136
|
+
}
|
|
137
|
+
</script>
|
|
138
|
+
|
|
139
|
+
<template>
|
|
140
|
+
<UInput v-model="name" label="Name" placeholder="Enter your name" />
|
|
141
|
+
<UButton @click="submit">Submit</UButton>
|
|
142
|
+
</template>
|
|
38
143
|
```
|
|
144
|
+
|
|
145
|
+
## License
|
|
146
|
+
|
|
147
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ertugrulozcan97/apexui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"tailwindcss": ">=4.0.0",
|
|
28
28
|
"vue": ">=3.4.0"
|
|
29
29
|
},
|
|
30
|
-
"dependencies": {},
|
|
31
30
|
"devDependencies": {
|
|
32
31
|
"@lucide/vue": "^1.14.0",
|
|
33
32
|
"@tailwindcss/vite": "^4.3.0",
|
|
@@ -36,7 +35,6 @@
|
|
|
36
35
|
"tailwindcss": "^4.3.0",
|
|
37
36
|
"typescript": "^6.0.3",
|
|
38
37
|
"vite": "^8.0.8",
|
|
39
|
-
"vite-plugin-vue-devtools": "^8.1.1",
|
|
40
38
|
"vue": "^3.5.32",
|
|
41
39
|
"vue-tsc": "^3.2.8"
|
|
42
40
|
},
|