modular-ui-kit-vue 1.0.3 → 1.0.5
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 +71 -15
- package/dist/modular-ui-kit-vue.css +1432 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -1,32 +1,88 @@
|
|
|
1
|
-
# modular-ui-kit
|
|
1
|
+
# modular-ui-kit-vue
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+

|
|
3
5
|
[](https://github.com/MShawon/github-clone-count-badge)
|
|
4
6
|
|
|
5
|
-
`modular-ui-kit` 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.
|
|
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.
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
### Install
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
```sh
|
|
12
|
+
npm install modular-ui-kit-vue
|
|
13
|
+
```
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
```sh
|
|
16
|
+
yarn add modular-ui-kit-vue
|
|
17
|
+
```
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
```sh
|
|
20
|
+
pnpm add modular-ui-kit-vue
|
|
21
|
+
```
|
|
14
22
|
|
|
15
|
-
###
|
|
23
|
+
### Quick start
|
|
16
24
|
|
|
17
|
-
```
|
|
18
|
-
|
|
25
|
+
```vue
|
|
26
|
+
<template>
|
|
27
|
+
<base-text as="h1" :type="'heading'" :variant="'primary'">My component</base-text>
|
|
28
|
+
<base-text as="h1" :type="'subheading'" :variant="'warning'">My component</base-text>
|
|
29
|
+
<base-text as="h1" :variant="'muted'">My component</base-text>
|
|
30
|
+
</template>
|
|
31
|
+
<script setup lang="ts">
|
|
32
|
+
import { BaseText } from 'modular-ui-kit-vue'
|
|
33
|
+
import 'modular-ui-kit-vue/dist/modular-ui-kit-vue.css'
|
|
34
|
+
</script>
|
|
19
35
|
```
|
|
20
36
|
|
|
21
|
-
###
|
|
37
|
+
### Accessibility (a11y)
|
|
22
38
|
|
|
23
|
-
|
|
24
|
-
|
|
39
|
+
All components are built with basic accessibility in mind:
|
|
40
|
+
|
|
41
|
+
- Native keyboard navigation support (Focus states, `Enter` / `Space` key handlers).
|
|
42
|
+
- Proper ARIA attributes (`aria-expanded`, `aria-hidden`) out of the box.
|
|
43
|
+
- High-contrast focus rings for better visibility.
|
|
44
|
+
|
|
45
|
+
### Documentation
|
|
46
|
+
|
|
47
|
+
[](https://github.com/eugenia-vitinschii/modular-ui-kit/wiki/Base-Button-Component)
|
|
48
|
+
|
|
49
|
+
#### Base Button
|
|
50
|
+
|
|
51
|
+
Params
|
|
52
|
+
|
|
53
|
+
- variant?: UIButtonVariant
|
|
25
54
|
|
|
26
55
|
```
|
|
56
|
+
export type UIVariant = 'primary' | 'danger' | 'warning' | 'success' | 'secondary'
|
|
57
|
+
export type UIButtonVariant = UIVariant | 'ghost'
|
|
27
58
|
|
|
28
|
-
|
|
59
|
+
```
|
|
29
60
|
|
|
30
|
-
|
|
31
|
-
|
|
61
|
+
- size?: UISize
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
export type UISize = 'sm' | 'md' | 'lg'
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- type?: UIButtonType
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
export type UIButtonType = "button" | "submit" | "reset"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
- loading?: boolean
|
|
74
|
+
- disabled?: boolean
|
|
75
|
+
|
|
76
|
+
- ## Deafult params
|
|
77
|
+
- variant: "primary",
|
|
78
|
+
- type: "button",
|
|
79
|
+
- size: "lg",
|
|
80
|
+
- loading: false,
|
|
81
|
+
- disabled: false
|
|
82
|
+
|
|
83
|
+
Usage
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
<base-button :variant="'secondary'" @click="handleRegister">register</base-button>
|
|
87
|
+
<base-button :type="'submit'" :loading="auth.isLoading" :disabled="auth.isLoading">login</base-button>
|
|
32
88
|
```
|