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 CHANGED
@@ -1,32 +1,88 @@
1
- # modular-ui-kit
1
+ # modular-ui-kit-vue
2
2
 
3
+ ![NPM Version](https://img.shields.io/npm/v/modular-ui-kit-vue?color=42b883)
4
+ ![NPM Downloads](https://img.shields.io/npm/dm/modular-ui-kit-vue?color=35495e)
3
5
  [![GitHub Clones](https://img.shields.io/badge/dynamic/json?color=success&label=Clone&query=count&url=https://gist.githubusercontent.com/eugenia-vitinschii/2e6247835bbf3928be881ca260cad051/raw/clone.json&logo=github)](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
- ## Features
9
+ ### Install
8
10
 
9
- ➜ flexible UI Kit: fully typed base components with customizable variants, design tokens, and SASS mixins for quick theme changes.
11
+ ```sh
12
+ npm install modular-ui-kit-vue
13
+ ```
10
14
 
11
- ➜ auth module ready: pre-built Login, Registration, and Error pages (401, 403, 500) with smooth routing.
15
+ ```sh
16
+ yarn add modular-ui-kit-vue
17
+ ```
12
18
 
13
- ➜ API layer set up: includes a pre-configured Axios instance with Request/Response Interceptors for automatic auth headers and seamless error handling.
19
+ ```sh
20
+ pnpm add modular-ui-kit-vue
21
+ ```
14
22
 
15
- ### Install dependencies:
23
+ ### Quick start
16
24
 
17
- ```sh
18
- npm install
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
- ### Create a .env file in the project root:
37
+ ### Accessibility (a11y)
22
38
 
23
- ```sh
24
- VITE_API_URL=http://localhost:3000/api
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
+ [![Wiki Documentation](https://img.shields.io/badge/docs-GitHub_Wiki-blue?style=for-the-badge&logo=github)](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
- ### Run:
59
+ ```
29
60
 
30
- ```sh
31
- npm run dev
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
  ```