ketekny-ui-kit 1.0.51 → 1.0.53

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.
Files changed (2) hide show
  1. package/README.md +125 -115
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -1,56 +1,98 @@
1
- # Ketekny UI Kit
1
+ # ketekny-ui-kit
2
2
 
3
- Vue 3 UI component library styled with Tailwind CSS.
3
+ Vue 3 UI component library with Tailwind CSS styling and utility plugins.
4
+
5
+ ## Requirements
6
+
7
+ - `vue`: `^3.0.0` (peer dependency)
8
+ - Tailwind CSS 3 build pipeline in your app (`tailwindcss`, `postcss`, `autoprefixer`)
9
+ - This package is built and tested against Tailwind CSS 3.x; Tailwind CSS 4 is not supported by the current setup
4
10
 
5
11
  ## Installation
6
12
 
7
- 1. Install the package:
13
+ Needed packages (install what is missing)
8
14
 
9
15
  ```bash
10
- npm install ketekny-ui-kit
11
- ```
16
+ # Required peer dependency:
17
+ npm install vue
12
18
 
13
- 2. Ensure required peer/runtime dependencies exist in your app:
19
+ # If your app does not already use Tailwind CSS 3:
20
+ npm install -D tailwindcss@^3 postcss autoprefixer
21
+ ```
14
22
 
15
23
  ```bash
16
- npm install vue tailwindcss postcss autoprefixer
24
+ npm install ketekny-ui-kit
17
25
  ```
18
26
 
19
- If your project already has Vue + Tailwind configured, you can skip step 2.
20
27
 
21
- ## CI Publish Auth (NPM Token)
22
28
 
23
- To publish from GitLab CI, create an npm granular token and store it in the runner/project CI variables.
29
+ ## Quick Start
30
+
31
+ In your app entry (`main.js` / `main.ts`):
32
+
33
+ ```js
34
+ import { createApp } from "vue";
35
+ import App from "./App.vue";
36
+ import "ketekny-ui-kit/styles.css";
37
+
38
+ import {
39
+ kButton,
40
+ kInput,
41
+ kSelect,
42
+ kDateSelector,
43
+ kToggle,
44
+ toastPlugin,
45
+ confirmPlugin,
46
+ alertPlugin,
47
+ inputDialogPlugin,
48
+ tooltipPlugin,
49
+ } from "ketekny-ui-kit";
50
+
51
+ const app = createApp(App);
52
+
53
+ app.component("kButton", kButton);
54
+ app.component("kInput", kInput);
55
+ app.component("kSelect", kSelect);
56
+ app.component("kDateSelector", kDateSelector);
57
+ app.component("kToggle", kToggle);
58
+
59
+ app.use(toastPlugin);
60
+ app.use(confirmPlugin);
61
+ app.use(alertPlugin);
62
+ app.use(inputDialogPlugin);
63
+ app.use(tooltipPlugin);
64
+
65
+ app.mount("#app");
66
+ ```
24
67
 
25
- ### 1. Create npm token
68
+ Example component usage:
26
69
 
27
- 1. Open npm -> `Access Tokens` -> `Generate New Token` (Granular).
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).
70
+ ```vue
71
+ <template>
72
+ <div class="p-6 space-y-3">
73
+ <kInput v-model="name" label="Name" />
74
+ <kButton label="Save" success @click="save" />
75
+ </div>
76
+ </template>
32
77
 
33
- ### 2. Save token in GitLab CI/CD variables
78
+ <script setup>
79
+ import { ref } from "vue";
34
80
 
35
- 1. Open GitLab project -> `Settings` -> `CI/CD` -> `Variables`.
36
- 2. Add variable:
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.
81
+ const name = ref("");
43
82
 
44
- ### 3. Verify runner/tag
83
+ function save() {
84
+ console.log("Saved:", name.value);
85
+ }
86
+ </script>
87
+ ```
45
88
 
46
- - Ensure the runner used by publish jobs has the required tag (currently `front`).
47
- - Ensure the project can use that runner.
89
+ ## Tailwind Setup
48
90
 
49
- ## Tailwind Setup (Required)
91
+ Use the provided preset to include semantic tokens and safelist patterns used by dynamic component classes.
50
92
 
51
- Use the provided Tailwind preset so semantic colors and component color tokens are always available.
93
+ This README assumes Tailwind CSS 3. The `tailwind.config.js` / `tailwind.config.cjs` examples below are the supported integration path for this kit.
52
94
 
53
- ### `tailwind.config.js` (ESM)
95
+ `tailwind.config.js` (ESM):
54
96
 
55
97
  ```js
56
98
  import tailwindPreset from "ketekny-ui-kit/tailwind-preset.js";
@@ -66,7 +108,7 @@ export default {
66
108
  };
67
109
  ```
68
110
 
69
- ### `tailwind.config.cjs` (CommonJS)
111
+ `tailwind.config.cjs` (CommonJS):
70
112
 
71
113
  ```js
72
114
  const tailwindPreset = require("ketekny-ui-kit/tailwind-preset.js").default;
@@ -82,101 +124,68 @@ module.exports = {
82
124
  };
83
125
  ```
84
126
 
85
- Notes:
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.
127
+ ## Plugins
88
128
 
89
- ## App CSS Setup
129
+ - `toastPlugin`: adds `$toast.success|error|warning|info|show(...)`
130
+ - `confirmPlugin`: adds `$confirm(options)`
131
+ - `alertPlugin`: adds `$alert.success|warning|error|info(...)`
132
+ - `inputDialogPlugin`: adds `$prompt(options)`
133
+ - `tooltipPlugin`: registers `v-tooltip`
90
134
 
91
- Import the kit stylesheet in your app entry (`main.js` / `main.ts`):
135
+ ### Plugin API (quick reference)
92
136
 
93
- ```js
94
- import "ketekny-ui-kit/styles.css";
95
- ```
137
+ - `$toast.success(message, options?)`
138
+ - `$toast.error(message, options?)`
139
+ - `$toast.warning(message, options?)`
140
+ - `$toast.info(message, options?)`
141
+ - `$toast.show({ type?, message, duration?, ... })`
142
+ - `$confirm({ title?, message, onConfirm?, onCancel? })`
143
+ - `$alert.success(message)`
144
+ - `$alert.error(message)`
145
+ - `$alert.warning(message)`
146
+ - `$alert.info(message)`
147
+ - `$prompt({ title?, message?, placeholder?, onConfirm? })`
96
148
 
97
- ## Vue Setup
149
+ Note: exact option keys may vary by component/plugin implementation version.
98
150
 
99
- `main.js` / `main.ts` example:
151
+ ## Exports
100
152
 
101
- ```js
102
- import { createApp } from "vue";
103
- import App from "./App.vue";
104
- import "./style.css";
153
+ Components:
105
154
 
106
- import {
107
- kButton,
108
- kInput,
109
- kSelect,
110
- kDateSelector,
111
- kToggle,
112
- toastPlugin,
113
- confirmPlugin,
114
- alertPlugin,
115
- inputDialogPlugin,
116
- tooltipPlugin,
117
- } from "ketekny-ui-kit";
155
+ - `kMessage`, `kCode`, `kToolbar`, `kTable`, `kTabs`, `kChip`
156
+ - `kSpinner`, `kDatatable`, `kIcon`, `kMenu`, `kSkeleton`
157
+ - `kProgressBar`, `kTree`, `kButton`, `kSelect`, `kUploader`
158
+ - `kToggle`, `kInput`, `kDateSelector`, `kDateSelectorV2`, `kEditor`
159
+ - `kSelectButton`, `kTags`, `kSearch`, `kArrayList`, `kList`, `kTextArea`
160
+ - `kDialog`, `kDrawer`
161
+ - `kAppHeader`, `kAppFooter`, `kAppMain`, `kHero`
118
162
 
119
- const app = createApp(App);
163
+ Other exports:
120
164
 
121
- app.component("kButton", kButton);
122
- app.component("kInput", kInput);
123
- app.component("kSelect", kSelect);
124
- app.component("kDateSelector", kDateSelector);
125
- app.component("kToggle", kToggle);
165
+ - `toastPlugin`, `confirmPlugin`, `alertPlugin`, `tooltipPlugin`, `inputDialogPlugin`
166
+ - `tailwindPreset`
126
167
 
127
- app.use(toastPlugin);
128
- app.use(confirmPlugin);
129
- app.use(alertPlugin);
130
- app.use(inputDialogPlugin);
131
- app.use(tooltipPlugin);
168
+ ## Common Issues
132
169
 
133
- app.mount("#app");
134
- ```
170
+ - Styles look missing:
171
+ - Confirm `import "ketekny-ui-kit/styles.css";` is in your app entry file.
172
+ - Tailwind classes from the kit are not applied:
173
+ - Confirm `tailwind.config` includes `./node_modules/ketekny-ui-kit/**/*.{vue,js,ts,jsx,tsx}` in `content`.
174
+ - Confirm `presets: [tailwindPreset]` is present.
175
+ - Date/time pickers fail to resolve `dayjs/plugin/customParseFormat.js`:
176
+ - Upgrade to `ketekny-ui-kit` `1.0.36` or newer.
177
+ - Vue peer dependency warning:
178
+ - Install/update Vue 3 in your app: `npm install vue@^3`.
179
+ - Dynamic semantic classes are purged:
180
+ - Keep the provided preset safelist patterns, or replicate them in your own Tailwind config.
135
181
 
136
- ## Available Plugins
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
182
+ ## Development
178
183
 
179
- - `tailwindPreset`
184
+ ```bash
185
+ npm run dev
186
+ npm run build
187
+ npm run preview
188
+ ```
180
189
 
181
190
  ## License
182
191
 
@@ -184,4 +193,5 @@ ISC
184
193
 
185
194
  ## Links
186
195
 
187
- - [npm](https://www.npmjs.com/package/ketekny-ui-kit)
196
+ - Live demo/docs: https://ui.ketekny.gr
197
+ - npm: https://www.npmjs.com/package/ketekny-ui-kit
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ketekny-ui-kit",
3
3
  "type": "module",
4
- "version": "1.0.51",
4
+ "version": "1.0.53",
5
5
  "description": "A Vue 3 UI component library with Tailwind CSS styling",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -42,6 +42,7 @@
42
42
  "@vuepic/vue-datepicker": "^11.0.2",
43
43
  "class-variance-authority": "^0.7.1",
44
44
  "clsx": "^2.1.1",
45
+ "dayjs": "1.11.19",
45
46
  "element-plus": "^2.13.5",
46
47
  "lucide-vue-next": "^0.511.0",
47
48
  "moment": "^2.30.1",