modular-ui-kit-vue 1.0.5 → 1.0.7
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 +193 -24
- package/dist/modular-ui-kit-vue.css +1 -1432
- package/package.json +22 -1
package/README.md
CHANGED
|
@@ -1,32 +1,21 @@
|
|
|
1
1
|
# modular-ui-kit-vue
|
|
2
2
|
|
|
3
|
-

|
|
4
|
-

|
|
3
|
+
[](https://www.npmjs.com/package/modular-ui-kit-vue)
|
|
4
|
+
[](https://www.npmjs.com/package/modular-ui-kit-vue)
|
|
5
5
|
[](https://github.com/MShawon/github-clone-count-badge)
|
|
6
6
|
|
|
7
7
|
`modular-ui-kit-vue` is a lightweight library of independent frontend components designed for rapid development and clean code. No heavy backend logic: just pure, flexible, and responsive UI elements ready to be dropped into any web application.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
npm install modular-ui-kit-vue
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
```sh
|
|
16
|
-
yarn add modular-ui-kit-vue
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
```sh
|
|
20
|
-
pnpm add modular-ui-kit-vue
|
|
21
|
-
```
|
|
9
|
+
[Demo Project (main branch)](https://github.com/eugenia-vitinschii/modular-ui-kit-vue/tree/main) •
|
|
10
|
+
[Wiki & Documentation](https://github.com/eugenia-vitinschii/modular-ui-kit-vue/wiki)
|
|
22
11
|
|
|
23
12
|
### Quick start
|
|
24
13
|
|
|
25
14
|
```vue
|
|
26
15
|
<template>
|
|
27
|
-
<base-text as="h1" :type="'heading'" :variant="'primary'">
|
|
28
|
-
<base-text as="
|
|
29
|
-
<base-text
|
|
16
|
+
<base-text as="h1" :type="'heading'" :variant="'primary'">Modular UI Kit</base-text>
|
|
17
|
+
<base-text as="h2" :type="'subheading'" :variant="'warning'">Craft flexible & lightweight Vue 3 interface<base-text>
|
|
18
|
+
<base-text :variant="'muted'">Explore reusable components, custom design tokens, and flexible typography out of the box.</base-text>
|
|
30
19
|
</template>
|
|
31
20
|
<script setup lang="ts">
|
|
32
21
|
import { BaseText } from 'modular-ui-kit-vue'
|
|
@@ -34,13 +23,158 @@ import 'modular-ui-kit-vue/dist/modular-ui-kit-vue.css'
|
|
|
34
23
|
</script>
|
|
35
24
|
```
|
|
36
25
|
|
|
37
|
-
###
|
|
26
|
+
### Available Components
|
|
38
27
|
|
|
39
|
-
|
|
28
|
+
Buttons
|
|
40
29
|
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
|
|
30
|
+
- BaseButton: Standard action button
|
|
31
|
+
- BaseIconButton: svg action button
|
|
32
|
+
|
|
33
|
+
Form Elements
|
|
34
|
+
|
|
35
|
+
- BaseCheckbox: Checkbox input component
|
|
36
|
+
- BaseInput: Standard text input field
|
|
37
|
+
- BaseRadio: Radio button option
|
|
38
|
+
- BaseSelect: Dropdown select menu
|
|
39
|
+
- BaseTextarea : Multi-line text input field
|
|
40
|
+
|
|
41
|
+
Feedback & States
|
|
42
|
+
|
|
43
|
+
- BaseToast / BaseToastContainer: Toast notification components
|
|
44
|
+
- useToast: Composition API helper for managing toasts
|
|
45
|
+
- BaseSkeleton: Skeleton loader for async data
|
|
46
|
+
- EmptyState: Placeholder display for empty data views
|
|
47
|
+
|
|
48
|
+
- ErrorState: Placeholder display for error screens
|
|
49
|
+
|
|
50
|
+
Navigation
|
|
51
|
+
|
|
52
|
+
- BaseBreadcrumbs: Breadcrumb navigation path
|
|
53
|
+
- BasePagination: Page navigation control
|
|
54
|
+
|
|
55
|
+
Overlays
|
|
56
|
+
|
|
57
|
+
- BaseModal: Modal dialog window with color variants
|
|
58
|
+
|
|
59
|
+
Typography
|
|
60
|
+
|
|
61
|
+
- BaseText: Standardized typography component
|
|
62
|
+
|
|
63
|
+
### Design Tokens
|
|
64
|
+
|
|
65
|
+
modular-ui-kit-vue is built using native CSS variables. You can easily override default colors, typography, borders, and spacing to match your brand design.
|
|
66
|
+
|
|
67
|
+
open or create app.sass, copy and use:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
/* DESIGN TOKENS (CSS Variables for Customization) */
|
|
71
|
+
:root
|
|
72
|
+
/* === Colors: Text === */
|
|
73
|
+
--ui-text: #eceef2
|
|
74
|
+
--ui-text-muted: #8a93a6
|
|
75
|
+
|
|
76
|
+
/* === Colors: Backgrounds === */
|
|
77
|
+
--ui-bg: #0b0d11
|
|
78
|
+
--ui-bg-soft: #12151c
|
|
79
|
+
--ui-bg-card: #171b24
|
|
80
|
+
--ui-bg-code: #1e2330
|
|
81
|
+
|
|
82
|
+
/* === Colors: Accents & Statuses === */
|
|
83
|
+
--ui-primary: #6366f1
|
|
84
|
+
--ui-primary-hover: #4f46e5
|
|
85
|
+
--ui-danger: #ff4a6b
|
|
86
|
+
--ui-success: #10b981
|
|
87
|
+
--ui-warning: #f59e0b
|
|
88
|
+
|
|
89
|
+
/* === Typography === */
|
|
90
|
+
--ui-font-heading: 26px
|
|
91
|
+
--ui-font-subheading: 19px
|
|
92
|
+
--ui-font-body: 16px
|
|
93
|
+
|
|
94
|
+
--ui-font-heading-md: 24px
|
|
95
|
+
--ui-font-subheading-md: 18px
|
|
96
|
+
--ui-font-body-md: 15px
|
|
97
|
+
|
|
98
|
+
--ui-font-heading-sm: 20px
|
|
99
|
+
--ui-font-subheading-sm: 16px
|
|
100
|
+
--ui-font-body-sm: 14px
|
|
101
|
+
|
|
102
|
+
/* === Borders === */
|
|
103
|
+
--ui-border-color: rgba(236, 238, 242, 0.08)
|
|
104
|
+
--ui-border-width: 1px
|
|
105
|
+
--ui-border-style: solid
|
|
106
|
+
--ui-border-radius: 0px
|
|
107
|
+
|
|
108
|
+
/* === Space Tokens: Elements (inputs, buttons, icons) === */
|
|
109
|
+
--ui-space-content-sm: 6px
|
|
110
|
+
--ui-space-content-md: 10px
|
|
111
|
+
--ui-space-content-lg: 14px
|
|
112
|
+
|
|
113
|
+
/* === Space Tokens: Containers (forms, cards, sections) === */
|
|
114
|
+
--ui-space-container-sm: 16px
|
|
115
|
+
--ui-space-container-md: 24px
|
|
116
|
+
--ui-space-container-lg: 32px
|
|
117
|
+
|
|
118
|
+
/* === Design Utilities === */
|
|
119
|
+
--ui-transition: all 0.3s ease-out
|
|
120
|
+
--ui-opacity: 0.4
|
|
121
|
+
|
|
122
|
+
/* SASS VARIABLES ALIASES */
|
|
123
|
+
|
|
124
|
+
/* === Colors === */
|
|
125
|
+
$text: var(--ui-text)
|
|
126
|
+
$text-muted: var(--ui-text-muted)
|
|
127
|
+
|
|
128
|
+
$bg: var(--ui-bg)
|
|
129
|
+
$bg-soft: var(--ui-bg-soft)
|
|
130
|
+
$bg-card: var(--ui-bg-card)
|
|
131
|
+
$bg-code: var(--ui-bg-code)
|
|
132
|
+
|
|
133
|
+
$primary: var(--ui-primary)
|
|
134
|
+
$primary-hover: var(--ui-primary-hover)
|
|
135
|
+
$danger: var(--ui-danger)
|
|
136
|
+
$success: var(--ui-success)
|
|
137
|
+
$warning: var(--ui-warning)
|
|
138
|
+
|
|
139
|
+
/* === Typography === */
|
|
140
|
+
$heading: var(--ui-font-heading)
|
|
141
|
+
$subheading: var(--ui-font-subheading)
|
|
142
|
+
$body-text: var(--ui-font-body)
|
|
143
|
+
|
|
144
|
+
$heading-md: var(--ui-font-heading-md)
|
|
145
|
+
$subheading-md: var(--ui-font-subheading-md)
|
|
146
|
+
$body-text-md: var(--ui-font-body-md)
|
|
147
|
+
|
|
148
|
+
$heading-sm: var(--ui-font-heading-sm)
|
|
149
|
+
$subheading-sm: var(--ui-font-subheading-sm)
|
|
150
|
+
$body-text-sm: var(--ui-font-body-sm)
|
|
151
|
+
|
|
152
|
+
/* === Borders === */
|
|
153
|
+
$border-color: var(--ui-border-color)
|
|
154
|
+
$border-width: var(--ui-border-width)
|
|
155
|
+
$border-style: var(--ui-border-style)
|
|
156
|
+
$border-radius: var(--ui-border-radius)
|
|
157
|
+
|
|
158
|
+
/* === Space Tokens === */
|
|
159
|
+
$space-content-sm: var(--ui-space-content-sm)
|
|
160
|
+
$space-content-md: var(--ui-space-content-md)
|
|
161
|
+
$space-content-lg: var(--ui-space-content-lg)
|
|
162
|
+
|
|
163
|
+
$space-container-sm: var(--ui-space-container-sm)
|
|
164
|
+
$space-container-md: var(--ui-space-container-md)
|
|
165
|
+
$space-container-lg: var(--ui-space-container-lg)
|
|
166
|
+
|
|
167
|
+
/* === Design === */
|
|
168
|
+
$transition: var(--ui-transition)
|
|
169
|
+
$opacity: var(--ui-opacity)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
import styles inside main.ts
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
import 'modular-ui-kit-vue/dist/modular-ui-kit-vue.css'
|
|
176
|
+
import '@/assets/sass/app.sass'
|
|
177
|
+
```
|
|
44
178
|
|
|
45
179
|
### Documentation
|
|
46
180
|
|
|
@@ -73,7 +207,8 @@ export type UIButtonType = "button" | "submit" | "reset"
|
|
|
73
207
|
- loading?: boolean
|
|
74
208
|
- disabled?: boolean
|
|
75
209
|
|
|
76
|
-
|
|
210
|
+
Deafult params
|
|
211
|
+
|
|
77
212
|
- variant: "primary",
|
|
78
213
|
- type: "button",
|
|
79
214
|
- size: "lg",
|
|
@@ -86,3 +221,37 @@ Usage
|
|
|
86
221
|
<base-button :variant="'secondary'" @click="handleRegister">register</base-button>
|
|
87
222
|
<base-button :type="'submit'" :loading="auth.isLoading" :disabled="auth.isLoading">login</base-button>
|
|
88
223
|
```
|
|
224
|
+
|
|
225
|
+
### Types
|
|
226
|
+
|
|
227
|
+
```ts
|
|
228
|
+
/* UI VARIANTS */
|
|
229
|
+
export type UIVariant = 'primary' | 'danger' | 'warning' | 'success' | 'secondary'
|
|
230
|
+
export type UISize = 'sm' | 'md' | 'lg'
|
|
231
|
+
|
|
232
|
+
/* TEXT */
|
|
233
|
+
export type UITextType = 'heading' | 'subheading' | 'body-text'
|
|
234
|
+
export type UITextAlign = 'left' | 'center' | 'right'
|
|
235
|
+
export type UITextVariant = UIVariant | 'muted'
|
|
236
|
+
|
|
237
|
+
/* BUTTONS */
|
|
238
|
+
export type UIButtonVariant = UIVariant | 'ghost'
|
|
239
|
+
export type UIButtonType = 'button' | 'submit' | 'reset'
|
|
240
|
+
|
|
241
|
+
/* EMPTY STATE VARIANT */
|
|
242
|
+
export type UIEmptyStateVariant = 'secondary' | 'primary'
|
|
243
|
+
|
|
244
|
+
/* INPUT TYPE */
|
|
245
|
+
export type UIInputType = 'text' | 'email' | 'password' | 'search' | 'date' | 'tel' | 'number'
|
|
246
|
+
|
|
247
|
+
/* SKELTON TYPE */
|
|
248
|
+
export type UISkeletonType = 'text' | 'circle' | 'rect'
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Accessibility (a11y)
|
|
252
|
+
|
|
253
|
+
All components are built with basic accessibility in mind:
|
|
254
|
+
|
|
255
|
+
- Native keyboard navigation support (Focus states, `Enter` / `Space` key handlers).
|
|
256
|
+
- Proper ARIA attributes (`aria-expanded`, `aria-hidden`) out of the box.
|
|
257
|
+
- High-contrast focus rings for better visibility.
|