tokenizer-ui-kit 0.2.3 → 0.2.4
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 +190 -19
- package/dist/tokenizer-ui-kit.css +2 -2
- package/dist/tokenizer-ui-kit.es.js +248 -246
- package/dist/tokenizer-ui-kit.umd.js +1 -1
- package/dist/types/components/AdaptiveTabs/AdaptiveTabs.vue.d.ts.map +1 -1
- package/dist/types/components/ui/CDataPlaceholder/CDataPlaceholder.vue.d.ts.map +1 -1
- package/dist/types/components/ui/CLabel/CLabel.vue.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -112,48 +112,219 @@ const selectedDate = ref(null);
|
|
|
112
112
|
</template>
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
## 🎨
|
|
115
|
+
## 🎨 Customization
|
|
116
116
|
|
|
117
117
|
The UI Kit uses CSS variables for easy customization. These variables are shared across all components (Input, DatePicker, etc.) and can be overridden in your project.
|
|
118
118
|
|
|
119
|
-
###
|
|
119
|
+
### CSS Variables
|
|
120
120
|
|
|
121
|
-
All UI Kit components use a unified set of CSS variables
|
|
121
|
+
All UI Kit components use a unified set of CSS variables. You can override any variable to customize the appearance of components.
|
|
122
|
+
|
|
123
|
+
#### Typography Variables
|
|
124
|
+
|
|
125
|
+
```css
|
|
126
|
+
:root {
|
|
127
|
+
/* Font Family */
|
|
128
|
+
--ui-kit-font-family: Manrope, sans-serif;
|
|
129
|
+
|
|
130
|
+
/* Font Sizes */
|
|
131
|
+
--ui-kit-font-size-xs: 12px; /* Small labels, error messages */
|
|
132
|
+
--ui-kit-font-size-sm: 14px; /* Body text, buttons, inputs */
|
|
133
|
+
--ui-kit-font-size-base: 16px; /* Headings, large text */
|
|
134
|
+
--ui-kit-font-size-lg: 18px; /* Large headings */
|
|
135
|
+
--ui-kit-font-size-xl: 20px; /* Extra large headings */
|
|
136
|
+
--ui-kit-font-size-2xl: 24px; /* XXL headings */
|
|
137
|
+
|
|
138
|
+
/* Font Weights */
|
|
139
|
+
--ui-kit-font-weight-regular: 400; /* Regular text */
|
|
140
|
+
--ui-kit-font-weight-medium: 500; /* Medium text, buttons */
|
|
141
|
+
--ui-kit-font-weight-semibold: 600; /* Semibold headings */
|
|
142
|
+
--ui-kit-font-weight-bold: 700; /* Bold headings */
|
|
143
|
+
|
|
144
|
+
/* Line Heights */
|
|
145
|
+
--ui-kit-line-height-tight: 1.2; /* Tight line height for headings */
|
|
146
|
+
--ui-kit-line-height-normal: 1.5; /* Normal line height */
|
|
147
|
+
--ui-kit-line-height-relaxed: 1.75; /* Relaxed line height */
|
|
148
|
+
|
|
149
|
+
/* Typography Presets (for convenience) */
|
|
150
|
+
--ui-kit-typography-label: var(--ui-kit-font-size-xs) / var(--ui-kit-line-height-normal) var(--ui-kit-font-family);
|
|
151
|
+
--ui-kit-typography-body: var(--ui-kit-font-size-sm) / var(--ui-kit-line-height-normal) var(--ui-kit-font-family);
|
|
152
|
+
--ui-kit-typography-body-large: var(--ui-kit-font-size-base) / var(--ui-kit-line-height-normal) var(--ui-kit-font-family);
|
|
153
|
+
--ui-kit-typography-heading: var(--ui-kit-font-size-base) / var(--ui-kit-line-height-tight) var(--ui-kit-font-family);
|
|
154
|
+
--ui-kit-typography-heading-large: var(--ui-kit-font-size-lg) / var(--ui-kit-line-height-tight) var(--ui-kit-font-family);
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
#### Color Variables
|
|
122
159
|
|
|
123
160
|
```css
|
|
124
|
-
/* In your project's CSS file (e.g., main.css or App.vue) */
|
|
125
161
|
:root {
|
|
162
|
+
/* ============================================
|
|
163
|
+
Primary Colors
|
|
164
|
+
============================================ */
|
|
165
|
+
--ui-kit-primary-primary: #292b32;
|
|
166
|
+
--ui-kit-primary-sidebar: #393d41;
|
|
167
|
+
--ui-kit-primary-bg-white: #ffffff;
|
|
168
|
+
--ui-kit-primary-secondary: #757987;
|
|
169
|
+
--ui-kit-primary-tertiary: #8c9aac;
|
|
170
|
+
--ui-kit-primary-do-green: #39aa5d;
|
|
171
|
+
--ui-kit-primary-bg-dark-green: #268644;
|
|
172
|
+
--ui-kit-primary-d-light-green: #56d67f;
|
|
173
|
+
--ui-kit-primary-overlay: #121212;
|
|
174
|
+
|
|
175
|
+
/* ============================================
|
|
176
|
+
Background Colors
|
|
177
|
+
============================================ */
|
|
178
|
+
--ui-kit-background-light-0: #fbfbff;
|
|
179
|
+
--ui-kit-background-light-1: #f1f3f6;
|
|
180
|
+
--ui-kit-background-light-2: #e9ebee;
|
|
181
|
+
--ui-kit-background-light-3: #dfe3e7;
|
|
182
|
+
--ui-kit-background-light-4: #d2d8e0;
|
|
183
|
+
--ui-kit-background-light-5: #b4beca;
|
|
184
|
+
--ui-kit-background-dark-1: #36373f;
|
|
185
|
+
--ui-kit-background-dark-2: #282a2f;
|
|
186
|
+
--ui-kit-background-dark-3: #212328;
|
|
187
|
+
--ui-kit-background-dark-4: #1e1f24;
|
|
188
|
+
--ui-kit-background-dark-5: #15161b;
|
|
189
|
+
--ui-kit-background-dark-6: #0c0d10;
|
|
190
|
+
--ui-kit-background-menu: #484953;
|
|
191
|
+
|
|
192
|
+
/* ============================================
|
|
193
|
+
System Colors - Primary (Green Scale)
|
|
194
|
+
============================================ */
|
|
195
|
+
--ui-kit-system-primary-900: #316848;
|
|
196
|
+
--ui-kit-system-primary-800: #3d7f59;
|
|
197
|
+
--ui-kit-system-primary-700: #4d906c;
|
|
198
|
+
--ui-kit-system-primary-600: #83b09a;
|
|
199
|
+
--ui-kit-system-primary-500: #b0d8c8;
|
|
200
|
+
--ui-kit-system-primary-400: #deeded;
|
|
201
|
+
--ui-kit-system-primary-300: #f1f6f0;
|
|
202
|
+
|
|
203
|
+
/* ============================================
|
|
204
|
+
System Colors - Error (Red Scale)
|
|
205
|
+
============================================ */
|
|
206
|
+
--ui-kit-system-error-900: #962f31;
|
|
207
|
+
--ui-kit-system-error-800: #c63c28;
|
|
208
|
+
--ui-kit-system-error-700: #f34831;
|
|
209
|
+
--ui-kit-system-error-600: #f78272;
|
|
210
|
+
--ui-kit-system-error-500: #e5c3bd;
|
|
211
|
+
--ui-kit-system-error-400: #f0f4f3;
|
|
212
|
+
|
|
213
|
+
/* ============================================
|
|
214
|
+
System Colors - Success (Green Scale)
|
|
215
|
+
============================================ */
|
|
216
|
+
--ui-kit-system-success-900: #377160;
|
|
217
|
+
--ui-kit-system-success-800: #3d8e5b;
|
|
218
|
+
--ui-kit-system-success-700: #3EB850;
|
|
219
|
+
--ui-kit-system-success-600: #8bd497;
|
|
220
|
+
--ui-kit-system-success-500: #deede4;
|
|
221
|
+
--ui-kit-system-success-400: #e1f8e0;
|
|
222
|
+
|
|
223
|
+
/* ============================================
|
|
224
|
+
System Colors - Attention (Orange/Yellow Scale)
|
|
225
|
+
============================================ */
|
|
226
|
+
--ui-kit-system-attention-900: #b07925;
|
|
227
|
+
--ui-kit-system-attention-800: #d19319;
|
|
228
|
+
--ui-kit-system-attention-700: #e8ac0c;
|
|
229
|
+
--ui-kit-system-attention-600: #eec758;
|
|
230
|
+
--ui-kit-system-attention-500: #f6e0e1;
|
|
231
|
+
--ui-kit-system-attention-400: #f7f7f1;
|
|
232
|
+
|
|
233
|
+
/* ============================================
|
|
234
|
+
System Colors - Info (Purple Scale)
|
|
235
|
+
============================================ */
|
|
236
|
+
--ui-kit-system-info-900: #403294;
|
|
237
|
+
--ui-kit-system-info-800: #5243aa;
|
|
238
|
+
--ui-kit-system-info-700: #6554c0;
|
|
239
|
+
--ui-kit-system-info-600: #7f8fd1;
|
|
240
|
+
--ui-kit-system-info-500: #9d91da;
|
|
241
|
+
--ui-kit-system-info-400: #cbe7ff;
|
|
242
|
+
|
|
243
|
+
/* ============================================
|
|
244
|
+
Component Colors (Legacy - for backward compatibility)
|
|
245
|
+
============================================ */
|
|
126
246
|
/* Border Colors - Used by Input, DatePicker, and other form components */
|
|
127
|
-
--ui-kit-color-border-default:
|
|
128
|
-
--ui-kit-color-border-hover:
|
|
129
|
-
--ui-kit-color-border-focus:
|
|
130
|
-
--ui-kit-color-border-error:
|
|
131
|
-
--ui-kit-color-border-disabled:
|
|
247
|
+
--ui-kit-color-border-default: var(--ui-kit-background-light-5);
|
|
248
|
+
--ui-kit-color-border-hover: var(--ui-kit-primary-bg-dark-green);
|
|
249
|
+
--ui-kit-color-border-focus: var(--ui-kit-primary-do-green);
|
|
250
|
+
--ui-kit-color-border-error: var(--ui-kit-system-error-600);
|
|
251
|
+
--ui-kit-color-border-disabled: var(--ui-kit-background-light-5);
|
|
132
252
|
|
|
133
253
|
/* Background Colors - Used by Input, DatePicker, and other form components */
|
|
134
254
|
--ui-kit-color-bg-default: transparent;
|
|
135
|
-
--ui-kit-color-bg-disabled:
|
|
255
|
+
--ui-kit-color-bg-disabled: var(--ui-kit-background-light-2);
|
|
136
256
|
|
|
137
257
|
/* Text Colors - Used by Input, DatePicker, and other form components */
|
|
138
|
-
--ui-kit-color-text-default:
|
|
139
|
-
--ui-kit-color-text-disabled:
|
|
140
|
-
--ui-kit-color-text-error:
|
|
141
|
-
--ui-kit-color-text-placeholder:
|
|
142
|
-
--ui-kit-color-text-label:
|
|
258
|
+
--ui-kit-color-text-default: var(--ui-kit-primary-primary);
|
|
259
|
+
--ui-kit-color-text-disabled: var(--ui-kit-background-light-5);
|
|
260
|
+
--ui-kit-color-text-error: var(--ui-kit-system-error-700);
|
|
261
|
+
--ui-kit-color-text-placeholder: var(--ui-kit-background-light-5);
|
|
262
|
+
--ui-kit-color-text-label: var(--ui-kit-primary-primary);
|
|
143
263
|
|
|
144
264
|
/* Icon Colors - Used by Input, DatePicker, and other form components */
|
|
145
|
-
--ui-kit-color-icon-default:
|
|
146
|
-
--ui-kit-color-icon-hover:
|
|
147
|
-
--ui-kit-color-icon-error:
|
|
265
|
+
--ui-kit-color-icon-default: var(--ui-kit-background-light-5);
|
|
266
|
+
--ui-kit-color-icon-hover: var(--ui-kit-primary-bg-dark-green);
|
|
267
|
+
--ui-kit-color-icon-error: var(--ui-kit-system-error-700);
|
|
148
268
|
}
|
|
149
269
|
```
|
|
150
270
|
|
|
151
|
-
###
|
|
271
|
+
### Typography Classes
|
|
272
|
+
|
|
273
|
+
The UI Kit provides a set of typography utility classes that can be used directly in your components. These classes follow the design system typography specifications.
|
|
274
|
+
|
|
275
|
+
#### Available Typography Classes
|
|
276
|
+
|
|
277
|
+
```css
|
|
278
|
+
/* Lead Typography */
|
|
279
|
+
.ui-kit-typo-lead-primary /* 24px, weight 400, line-height 31.2px */
|
|
280
|
+
.ui-kit-typo-lead-secondary /* 20px, weight 400, line-height 26px */
|
|
281
|
+
|
|
282
|
+
/* Headers */
|
|
283
|
+
.ui-kit-typo-header-secondary /* 20px, weight 600, line-height 26px */
|
|
284
|
+
|
|
285
|
+
/* Subtitles */
|
|
286
|
+
.ui-kit-typo-subtitle-primary /* 16px, weight 500, line-height 20.8px */
|
|
287
|
+
.ui-kit-typo-subtitle-secondary /* 14px, weight 500, line-height 18.2px */
|
|
288
|
+
.ui-kit-typo-subtitle-hint /* 12px, weight 600, line-height 15.6px */
|
|
289
|
+
|
|
290
|
+
/* Paragraphs */
|
|
291
|
+
.ui-kit-typo-paragraph-primary /* 14px, weight 400, line-height 18.2px */
|
|
292
|
+
.ui-kit-typo-paragraph-secondary /* 12px, weight 400, line-height 15.6px */
|
|
293
|
+
|
|
294
|
+
/* Links */
|
|
295
|
+
.ui-kit-typo-text-link /* 14px, weight 700, line-height 18.2px */
|
|
296
|
+
|
|
297
|
+
/* Table Variant */
|
|
298
|
+
.ui-kit-typo-table /* 14px, weight 500, line-height 130%, letter-spacing -1% */
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
#### Usage Example
|
|
302
|
+
|
|
303
|
+
```vue
|
|
304
|
+
<template>
|
|
305
|
+
<div>
|
|
306
|
+
<h1 class="ui-kit-typo-lead-primary">Main Heading</h1>
|
|
307
|
+
<h2 class="ui-kit-typo-header-secondary">Section Header</h2>
|
|
308
|
+
<p class="ui-kit-typo-paragraph-primary">Body text content</p>
|
|
309
|
+
<span class="ui-kit-typo-subtitle-secondary">Subtitle text</span>
|
|
310
|
+
<a href="#" class="ui-kit-typo-text-link">Link text</a>
|
|
311
|
+
</div>
|
|
312
|
+
</template>
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**Note:** Typography classes are applied first in the class list, followed by component classes. This allows you to easily override typography styles by adding your own classes without using `!important`.
|
|
316
|
+
|
|
317
|
+
### Example: Overriding Variables
|
|
152
318
|
|
|
153
319
|
```vue
|
|
154
320
|
<!-- App.vue or main.css -->
|
|
155
321
|
<style>
|
|
156
322
|
:root {
|
|
323
|
+
/* Override typography */
|
|
324
|
+
--ui-kit-font-family: 'Your Font', sans-serif;
|
|
325
|
+
--ui-kit-font-size-base: 18px;
|
|
326
|
+
|
|
327
|
+
/* Override colors */
|
|
157
328
|
--ui-kit-color-border-default: #your-custom-color;
|
|
158
329
|
--ui-kit-color-border-focus: #your-focus-color;
|
|
159
330
|
--ui-kit-color-text-error: #your-error-color;
|