ketekny-ui-kit 1.0.51 → 1.0.52
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 +119 -114
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,56 +1,95 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ketekny-ui-kit
|
|
2
2
|
|
|
3
|
-
Vue 3 UI component library
|
|
3
|
+
Vue 3 UI component library with Tailwind CSS styling and utility plugins.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- `vue`: `^3.0.0` (peer dependency)
|
|
8
|
+
- Tailwind CSS build pipeline in your app (`tailwindcss`, `postcss`, `autoprefixer`)
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
## Installation
|
|
8
11
|
|
|
9
12
|
```bash
|
|
10
13
|
npm install ketekny-ui-kit
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Required peer dependency:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install vue
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
If your app does not already use Tailwind CSS:
|
|
14
23
|
|
|
15
24
|
```bash
|
|
16
|
-
npm install
|
|
25
|
+
npm install -D tailwindcss postcss autoprefixer
|
|
17
26
|
```
|
|
18
27
|
|
|
19
|
-
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
In your app entry (`main.js` / `main.ts`):
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { createApp } from "vue";
|
|
34
|
+
import App from "./App.vue";
|
|
35
|
+
import "ketekny-ui-kit/styles.css";
|
|
36
|
+
|
|
37
|
+
import {
|
|
38
|
+
kButton,
|
|
39
|
+
kInput,
|
|
40
|
+
kSelect,
|
|
41
|
+
kDateSelector,
|
|
42
|
+
kToggle,
|
|
43
|
+
toastPlugin,
|
|
44
|
+
confirmPlugin,
|
|
45
|
+
alertPlugin,
|
|
46
|
+
inputDialogPlugin,
|
|
47
|
+
tooltipPlugin,
|
|
48
|
+
} from "ketekny-ui-kit";
|
|
49
|
+
|
|
50
|
+
const app = createApp(App);
|
|
20
51
|
|
|
21
|
-
|
|
52
|
+
app.component("kButton", kButton);
|
|
53
|
+
app.component("kInput", kInput);
|
|
54
|
+
app.component("kSelect", kSelect);
|
|
55
|
+
app.component("kDateSelector", kDateSelector);
|
|
56
|
+
app.component("kToggle", kToggle);
|
|
22
57
|
|
|
23
|
-
|
|
58
|
+
app.use(toastPlugin);
|
|
59
|
+
app.use(confirmPlugin);
|
|
60
|
+
app.use(alertPlugin);
|
|
61
|
+
app.use(inputDialogPlugin);
|
|
62
|
+
app.use(tooltipPlugin);
|
|
24
63
|
|
|
25
|
-
|
|
64
|
+
app.mount("#app");
|
|
65
|
+
```
|
|
26
66
|
|
|
27
|
-
|
|
28
|
-
2. Set permissions to `Read and write`.
|
|
29
|
-
3. Under package access, allow `ketekny-ui-kit`.
|
|
30
|
-
4. Enable `Bypass two-factor authentication (2FA)`.
|
|
31
|
-
5. Create token and copy it (shown only once).
|
|
67
|
+
Example component usage:
|
|
32
68
|
|
|
33
|
-
|
|
69
|
+
```vue
|
|
70
|
+
<template>
|
|
71
|
+
<div class="p-6 space-y-3">
|
|
72
|
+
<kInput v-model="name" label="Name" />
|
|
73
|
+
<kButton label="Save" success @click="save" />
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
34
76
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- Key: `NPM_TOKEN`
|
|
38
|
-
- Value: `<your npm token>`
|
|
39
|
-
- Type: `Variable`
|
|
40
|
-
- Masked: `true`
|
|
41
|
-
- Protected: `true` (if publishing only from protected branches, e.g. `main`)
|
|
42
|
-
3. Save and rerun pipeline.
|
|
77
|
+
<script setup>
|
|
78
|
+
import { ref } from "vue";
|
|
43
79
|
|
|
44
|
-
|
|
80
|
+
const name = ref("");
|
|
45
81
|
|
|
46
|
-
|
|
47
|
-
|
|
82
|
+
function save() {
|
|
83
|
+
console.log("Saved:", name.value);
|
|
84
|
+
}
|
|
85
|
+
</script>
|
|
86
|
+
```
|
|
48
87
|
|
|
49
|
-
## Tailwind Setup
|
|
88
|
+
## Tailwind Setup
|
|
50
89
|
|
|
51
|
-
Use the provided
|
|
90
|
+
Use the provided preset to include semantic tokens and safelist patterns used by dynamic component classes.
|
|
52
91
|
|
|
53
|
-
|
|
92
|
+
`tailwind.config.js` (ESM):
|
|
54
93
|
|
|
55
94
|
```js
|
|
56
95
|
import tailwindPreset from "ketekny-ui-kit/tailwind-preset.js";
|
|
@@ -66,7 +105,7 @@ export default {
|
|
|
66
105
|
};
|
|
67
106
|
```
|
|
68
107
|
|
|
69
|
-
|
|
108
|
+
`tailwind.config.cjs` (CommonJS):
|
|
70
109
|
|
|
71
110
|
```js
|
|
72
111
|
const tailwindPreset = require("ketekny-ui-kit/tailwind-preset.js").default;
|
|
@@ -82,101 +121,66 @@ module.exports = {
|
|
|
82
121
|
};
|
|
83
122
|
```
|
|
84
123
|
|
|
85
|
-
|
|
86
|
-
- The preset contains the semantic color definitions and safelist patterns used by dynamic classes (alerts/toasts/button intents).
|
|
87
|
-
- If you replace `safelist` in your own config, keep equivalent patterns or dynamic semantic classes may be purged.
|
|
124
|
+
## Plugins
|
|
88
125
|
|
|
89
|
-
|
|
126
|
+
- `toastPlugin`: adds `$toast.success|error|warning|info|show(...)`
|
|
127
|
+
- `confirmPlugin`: adds `$confirm(options)`
|
|
128
|
+
- `alertPlugin`: adds `$alert.success|warning|error|info(...)`
|
|
129
|
+
- `inputDialogPlugin`: adds `$prompt(options)`
|
|
130
|
+
- `tooltipPlugin`: registers `v-tooltip`
|
|
90
131
|
|
|
91
|
-
|
|
132
|
+
### Plugin API (quick reference)
|
|
92
133
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
134
|
+
- `$toast.success(message, options?)`
|
|
135
|
+
- `$toast.error(message, options?)`
|
|
136
|
+
- `$toast.warning(message, options?)`
|
|
137
|
+
- `$toast.info(message, options?)`
|
|
138
|
+
- `$toast.show({ type?, message, duration?, ... })`
|
|
139
|
+
- `$confirm({ title?, message, onConfirm?, onCancel? })`
|
|
140
|
+
- `$alert.success(message)`
|
|
141
|
+
- `$alert.error(message)`
|
|
142
|
+
- `$alert.warning(message)`
|
|
143
|
+
- `$alert.info(message)`
|
|
144
|
+
- `$prompt({ title?, message?, placeholder?, onConfirm? })`
|
|
96
145
|
|
|
97
|
-
|
|
146
|
+
Note: exact option keys may vary by component/plugin implementation version.
|
|
98
147
|
|
|
99
|
-
|
|
148
|
+
## Exports
|
|
100
149
|
|
|
101
|
-
|
|
102
|
-
import { createApp } from "vue";
|
|
103
|
-
import App from "./App.vue";
|
|
104
|
-
import "./style.css";
|
|
150
|
+
Components:
|
|
105
151
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
confirmPlugin,
|
|
114
|
-
alertPlugin,
|
|
115
|
-
inputDialogPlugin,
|
|
116
|
-
tooltipPlugin,
|
|
117
|
-
} from "ketekny-ui-kit";
|
|
152
|
+
- `kMessage`, `kCode`, `kToolbar`, `kTable`, `kTabs`, `kChip`
|
|
153
|
+
- `kSpinner`, `kDatatable`, `kIcon`, `kMenu`, `kSkeleton`
|
|
154
|
+
- `kProgressBar`, `kTree`, `kButton`, `kSelect`, `kUploader`
|
|
155
|
+
- `kToggle`, `kInput`, `kDateSelector`, `kDateSelectorV2`, `kEditor`
|
|
156
|
+
- `kSelectButton`, `kTags`, `kSearch`, `kArrayList`, `kList`, `kTextArea`
|
|
157
|
+
- `kDialog`, `kDrawer`
|
|
158
|
+
- `kAppHeader`, `kAppFooter`, `kAppMain`, `kHero`
|
|
118
159
|
|
|
119
|
-
|
|
160
|
+
Other exports:
|
|
120
161
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
app.component("kSelect", kSelect);
|
|
124
|
-
app.component("kDateSelector", kDateSelector);
|
|
125
|
-
app.component("kToggle", kToggle);
|
|
162
|
+
- `toastPlugin`, `confirmPlugin`, `alertPlugin`, `tooltipPlugin`, `inputDialogPlugin`
|
|
163
|
+
- `tailwindPreset`
|
|
126
164
|
|
|
127
|
-
|
|
128
|
-
app.use(confirmPlugin);
|
|
129
|
-
app.use(alertPlugin);
|
|
130
|
-
app.use(inputDialogPlugin);
|
|
131
|
-
app.use(tooltipPlugin);
|
|
165
|
+
## Common Issues
|
|
132
166
|
|
|
133
|
-
|
|
134
|
-
|
|
167
|
+
- Styles look missing:
|
|
168
|
+
- Confirm `import "ketekny-ui-kit/styles.css";` is in your app entry file.
|
|
169
|
+
- Tailwind classes from the kit are not applied:
|
|
170
|
+
- Confirm `tailwind.config` includes `./node_modules/ketekny-ui-kit/**/*.{vue,js,ts,jsx,tsx}` in `content`.
|
|
171
|
+
- Confirm `presets: [tailwindPreset]` is present.
|
|
172
|
+
- Vue peer dependency warning:
|
|
173
|
+
- Install/update Vue 3 in your app: `npm install vue@^3`.
|
|
174
|
+
- Dynamic semantic classes are purged:
|
|
175
|
+
- Keep the provided preset safelist patterns, or replicate them in your own Tailwind config.
|
|
135
176
|
|
|
136
|
-
##
|
|
137
|
-
|
|
138
|
-
- `toastPlugin` adds `$toast` (`success`, `error`, `warning`, `info`, `show`)
|
|
139
|
-
- `confirmPlugin` adds `$confirm(options)`
|
|
140
|
-
- `alertPlugin` adds `$alert.success|warning|error|info(...)`
|
|
141
|
-
- `inputDialogPlugin` adds `$prompt(options)`
|
|
142
|
-
- `tooltipPlugin` registers `v-tooltip`
|
|
143
|
-
|
|
144
|
-
## Available Exports
|
|
145
|
-
|
|
146
|
-
### Components
|
|
147
|
-
|
|
148
|
-
- `kMessage`
|
|
149
|
-
- `kButton`
|
|
150
|
-
- `kChip`
|
|
151
|
-
- `kCode`
|
|
152
|
-
- `kDialog`
|
|
153
|
-
- `kDrawer`
|
|
154
|
-
- `kInput`
|
|
155
|
-
- `kDateSelector`
|
|
156
|
-
- `kToolbar`
|
|
157
|
-
- `kSelect`
|
|
158
|
-
- `kTable`
|
|
159
|
-
- `kTabs`
|
|
160
|
-
- `kToggle`
|
|
161
|
-
- `kUploader`
|
|
162
|
-
- `kEditor`
|
|
163
|
-
- `kSpinner`
|
|
164
|
-
- `kSelectButton`
|
|
165
|
-
- `kDatatable`
|
|
166
|
-
- `kIcon`
|
|
167
|
-
- `kMenu`
|
|
168
|
-
- `kTags`
|
|
169
|
-
- `kSearch`
|
|
170
|
-
- `kArrayList`
|
|
171
|
-
- `kSkeleton`
|
|
172
|
-
- `kAppHeader`
|
|
173
|
-
- `kAppFooter`
|
|
174
|
-
- `kAppMain`
|
|
175
|
-
- `kHero`
|
|
176
|
-
|
|
177
|
-
### Tailwind preset export
|
|
177
|
+
## Development
|
|
178
178
|
|
|
179
|
-
|
|
179
|
+
```bash
|
|
180
|
+
npm run dev
|
|
181
|
+
npm run build
|
|
182
|
+
npm run preview
|
|
183
|
+
```
|
|
180
184
|
|
|
181
185
|
## License
|
|
182
186
|
|
|
@@ -184,4 +188,5 @@ ISC
|
|
|
184
188
|
|
|
185
189
|
## Links
|
|
186
190
|
|
|
187
|
-
-
|
|
191
|
+
- Live demo/docs: https://ui.ketekny.gr
|
|
192
|
+
- npm: https://www.npmjs.com/package/ketekny-ui-kit
|