ketekny-ui-kit 1.0.36 → 1.0.38
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/package.json +1 -1
- package/src/ui/kArrayList.vue +3 -3
- package/src/ui/kConfirmDialog.vue +2 -2
- package/src/ui/kDatatable.vue +48 -1
- package/src/ui/kEditor.vue +7 -7
- package/src/ui/kInputDialog.vue +4 -4
- package/src/ui/kList.vue +7 -7
- package/src/ui/kMenu.vue +4 -4
- package/src/ui/kSearch.vue +2 -2
- package/src/ui/kSelect.vue +33 -17
- package/src/ui/kSelectButton.vue +2 -2
- package/src/ui/kSkeleton.vue +1 -1
- package/src/ui/kTags.vue +9 -6
- package/src/ui/kTextArea.vue +6 -6
- package/src/ui/kToolbar.vue +7 -7
- package/src/ui/kTree.vue +22 -0
- package/src/ui/kUploader.vue +8 -8
- package/src/ui/themes/kInput.theme.js +10 -10
package/package.json
CHANGED
package/src/ui/kArrayList.vue
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
:rows="rows"
|
|
13
13
|
:disabled="disabled"
|
|
14
14
|
:class="[
|
|
15
|
-
'block w-full p-3 transition border border-gray-300 shadow-sm outline-none rounded-xl',
|
|
16
|
-
disabled ? 'bg-gray-100 text-gray-400 cursor-not-allowed' : 'bg-white focus:border-primary focus:ring-2 focus:ring-primary/20',
|
|
15
|
+
'block w-full p-3 transition border border-gray-300 shadow-sm outline-none rounded-xl dark:border-slate-600 dark:text-slate-100 dark:placeholder-slate-500',
|
|
16
|
+
disabled ? 'bg-gray-100 text-gray-400 cursor-not-allowed dark:bg-slate-900 dark:text-slate-500' : 'bg-white focus:border-primary focus:ring-2 focus:ring-primary/20 dark:bg-slate-800',
|
|
17
17
|
]"
|
|
18
18
|
@focus="isFocused = true"
|
|
19
19
|
@blur="isFocused = false"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
@compositionend="onCompositionEnd"
|
|
22
22
|
></textarea>
|
|
23
23
|
|
|
24
|
-
<div class="flex items-center justify-between mt-2 text-xs text-gray-500">
|
|
24
|
+
<div class="flex items-center justify-between mt-2 text-xs text-gray-500 dark:text-slate-400">
|
|
25
25
|
<span>Items: <span class="font-semibold text-primary">{{ count }}</span></span>
|
|
26
26
|
<span v-if="hint">{{ hint }}</span>
|
|
27
27
|
</div>
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<Teleport to="body">
|
|
3
3
|
<Transition name="fade">
|
|
4
4
|
<div v-if="visible" class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-40" style="z-index: 1500">
|
|
5
|
-
<div class="w-full max-w-md p-6 bg-white border rounded-lg shadow-xl border-primary/20">
|
|
5
|
+
<div class="w-full max-w-md p-6 bg-white border rounded-lg shadow-xl border-primary/20 dark:bg-slate-800 dark:border-slate-700">
|
|
6
6
|
<h2 class="mb-2 text-lg font-semibold text-primary">{{ title }}</h2>
|
|
7
|
-
<div class="mb-6 text-gray-700"><span v-html="message" /></div>
|
|
7
|
+
<div class="mb-6 text-gray-700 dark:text-slate-300"><span v-html="message" /></div>
|
|
8
8
|
<div class="flex justify-end gap-3">
|
|
9
9
|
<kButton :disabled="loading" secondary label="Άκυρο" @click="cancel" />
|
|
10
10
|
<kButton :loading="loading" danger label="Συνέχεια" @click="confirm" />
|
package/src/ui/kDatatable.vue
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
:disabled="disabled || !isItemSelectable(slotItem)"
|
|
44
44
|
:title="!isItemSelectable(slotItem) ? 'Row is not selectable' : ''"
|
|
45
45
|
@mousedown="captureSelectionInteraction"
|
|
46
|
-
@click.stop
|
|
46
|
+
@click.stop
|
|
47
47
|
@change="($event) => handleItemSelectionChange($event, slotItem)"
|
|
48
48
|
/>
|
|
49
49
|
</div>
|
|
@@ -191,6 +191,16 @@ export default {
|
|
|
191
191
|
methods: {
|
|
192
192
|
captureSelectionInteraction(event) {
|
|
193
193
|
this.pendingShiftSelection = Boolean(event?.shiftKey || this.isShiftKeyPressed);
|
|
194
|
+
if (event?.type === "mousedown" && event?.shiftKey && typeof event.preventDefault === "function") {
|
|
195
|
+
// Prevent browser range-text selection while using Shift+click for row-range selection.
|
|
196
|
+
event.preventDefault();
|
|
197
|
+
}
|
|
198
|
+
if (typeof window !== "undefined" && typeof window.getSelection === "function") {
|
|
199
|
+
const selection = window.getSelection();
|
|
200
|
+
if (selection && typeof selection.removeAllRanges === "function") {
|
|
201
|
+
selection.removeAllRanges();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
194
204
|
},
|
|
195
205
|
handleWindowKeydown(event) {
|
|
196
206
|
if (event?.key === "Shift") {
|
|
@@ -684,6 +694,43 @@ export default {
|
|
|
684
694
|
color: #1f2937;
|
|
685
695
|
}
|
|
686
696
|
|
|
697
|
+
.dark .customize-table {
|
|
698
|
+
--easy-table-row-border: 1px solid #374151;
|
|
699
|
+
|
|
700
|
+
--easy-table-header-font-color: #e5e7eb;
|
|
701
|
+
|
|
702
|
+
--easy-table-body-even-row-font-color: #e5e7eb;
|
|
703
|
+
--easy-table-body-row-font-color: #e5e7eb;
|
|
704
|
+
--easy-table-body-row-hover-font-color: #e5e7eb;
|
|
705
|
+
--easy-table-body-row-hover-background-color: #1e3a5f;
|
|
706
|
+
|
|
707
|
+
--easy-table-footer-font-color: #e5e7eb;
|
|
708
|
+
--easy-table-rows-per-page-selector-font-color: #e5e7eb;
|
|
709
|
+
|
|
710
|
+
--easy-table-loading-mask-background-color: rgba(15, 23, 42, 0.6);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.dark .k-datatable-checkbox {
|
|
714
|
+
background-color: #1e293b;
|
|
715
|
+
border-color: #64748b;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.dark .k-datatable-checkbox:disabled {
|
|
719
|
+
background-color: #334155;
|
|
720
|
+
border-color: #475569;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
.dark .customize-table .easy-data-table__footer select {
|
|
724
|
+
background-color: #1e293b;
|
|
725
|
+
color: #e5e7eb;
|
|
726
|
+
border-color: #3b82f6;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.dark .customize-table .easy-data-table__footer select option {
|
|
730
|
+
background-color: #1e293b;
|
|
731
|
+
color: #e5e7eb;
|
|
732
|
+
}
|
|
733
|
+
|
|
687
734
|
@media (max-width: 640px) {
|
|
688
735
|
.k-datatable-wrapper .customize-table {
|
|
689
736
|
--easy-table-header-font-size: 12px;
|
package/src/ui/kEditor.vue
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
</div>
|
|
5
5
|
<div class="w-full">
|
|
6
6
|
<!-- Toolbar -->
|
|
7
|
-
<div class="flex items-center gap-2 px-2 py-1 border rounded-t-md bg-primary/5 border-primary/20">
|
|
7
|
+
<div class="flex items-center gap-2 px-2 py-1 border rounded-t-md bg-primary/5 border-primary/20 dark:bg-slate-700/50 dark:border-slate-600">
|
|
8
8
|
<button
|
|
9
9
|
:disabled="disabled"
|
|
10
10
|
v-for="(cmd, i) in toolbar"
|
|
11
11
|
:key="i"
|
|
12
12
|
@click.prevent="exec(cmd.command, cmd.value)"
|
|
13
13
|
:title="cmd.title"
|
|
14
|
-
class="text-gray-600 p-1.5 rounded"
|
|
14
|
+
class="text-gray-600 p-1.5 rounded dark:text-slate-400"
|
|
15
15
|
:class="disabled == false ? 'hover:text-primary hover:bg-primary/10' : ''"
|
|
16
16
|
>
|
|
17
17
|
<component :is="cmd.icon" class="w-5 h-5" />
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
@blur="updateValue"
|
|
28
28
|
:placeholder="placeholder"
|
|
29
29
|
></div>
|
|
30
|
-
<div class="text-sm text-red-500" v-if="hasError && error !== true && error !== ''">
|
|
30
|
+
<div class="text-sm text-red-500 dark:text-rose-400" v-if="hasError && error !== true && error !== ''">
|
|
31
31
|
{{ error }}
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
34
|
<!-- Info message -->
|
|
35
|
-
<div class="text-sm text-primary/80" v-if="info != null">
|
|
35
|
+
<div class="text-sm text-primary/80 dark:text-slate-400" v-if="info != null">
|
|
36
36
|
{{ info }}
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
@@ -65,9 +65,9 @@ export default {
|
|
|
65
65
|
data() {
|
|
66
66
|
return {
|
|
67
67
|
defaultStyle:
|
|
68
|
-
"w-full px-3 py-2 border rounded-b-lg transition shadow-sm focus:outline-none focus:ring-2 focus:ring-primary/20 min-h-[150px] focus:border-primary bg-white placeholder-gray-400 !list-disc !list-inside prose",
|
|
69
|
-
errorStyle: "border-red-500 focus:ring focus:ring-red-300
|
|
70
|
-
disabledStyle: "!bg-gray-100 !text-gray-400 !cursor-not-allowed editor pointer-events-none select-none",
|
|
68
|
+
"w-full px-3 py-2 border rounded-b-lg transition shadow-sm focus:outline-none focus:ring-2 focus:ring-primary/20 min-h-[150px] focus:border-primary bg-white placeholder-gray-400 !list-disc !list-inside prose dark:bg-slate-800 dark:text-slate-100 dark:border-slate-600 dark:placeholder-slate-500",
|
|
69
|
+
errorStyle: "border-red-500 focus:ring focus:ring-red-300 dark:border-rose-500 dark:focus:ring-rose-500/20",
|
|
70
|
+
disabledStyle: "!bg-gray-100 !text-gray-400 !cursor-not-allowed editor pointer-events-none select-none dark:!bg-slate-900 dark:!text-slate-500",
|
|
71
71
|
toolbar: [
|
|
72
72
|
{ command: "bold", icon: Bold, title: "Bold" },
|
|
73
73
|
{ command: "italic", icon: Italic, title: "Italic" },
|
package/src/ui/kInputDialog.vue
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<Teleport to="body">
|
|
3
3
|
<Transition name="fade">
|
|
4
4
|
<div v-if="visible" class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-40" style="z-index: 1500" @keydown.esc.prevent="cancel">
|
|
5
|
-
<div class="w-full max-w-md p-6 bg-white rounded-lg shadow-xl">
|
|
6
|
-
<h2 class="mb-2 text-lg font-semibold">{{ title }}</h2>
|
|
5
|
+
<div class="w-full max-w-md p-6 bg-white rounded-lg shadow-xl dark:bg-slate-800">
|
|
6
|
+
<h2 class="mb-2 text-lg font-semibold dark:text-slate-100">{{ title }}</h2>
|
|
7
7
|
|
|
8
|
-
<div class="mb-4 text-gray-700">
|
|
8
|
+
<div class="mb-4 text-gray-700 dark:text-slate-300">
|
|
9
9
|
<span v-html="message" />
|
|
10
10
|
</div>
|
|
11
11
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
:type="inputType"
|
|
15
15
|
v-model="value"
|
|
16
16
|
:placeholder="placeholder"
|
|
17
|
-
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-500"
|
|
17
|
+
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:bg-slate-700 dark:text-slate-100 dark:border-slate-600 dark:placeholder-slate-500 dark:focus:ring-indigo-400"
|
|
18
18
|
:disabled="loading"
|
|
19
19
|
ref="inputEl"
|
|
20
20
|
@keyup.enter="confirm"
|
package/src/ui/kList.vue
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<div
|
|
8
8
|
v-for="(stat, index) in normalizedStats"
|
|
9
9
|
:key="resolveKey(stat, index)"
|
|
10
|
-
class="flex items-center gap-3 p-3 border border-gray-200 rounded-xl bg-white"
|
|
10
|
+
class="flex items-center gap-3 p-3 border border-gray-200 rounded-xl bg-white dark:bg-slate-800 dark:border-slate-700"
|
|
11
11
|
>
|
|
12
12
|
<div
|
|
13
13
|
v-if="stat.icon"
|
|
@@ -26,21 +26,21 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
28
|
<div class="min-w-0">
|
|
29
|
-
<dt class="text-sm text-gray-500 truncate">{{ stat.label }}</dt>
|
|
30
|
-
<dd class="text-xl font-semibold text-gray-900 truncate">{{ stat.value }}</dd>
|
|
29
|
+
<dt class="text-sm text-gray-500 truncate dark:text-slate-400">{{ stat.label }}</dt>
|
|
30
|
+
<dd class="text-xl font-semibold text-gray-900 truncate dark:text-slate-100">{{ stat.value }}</dd>
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
33
|
</dl>
|
|
34
34
|
|
|
35
|
-
<div v-else class="overflow-hidden bg-white border border-gray-200 rounded-xl">
|
|
35
|
+
<div v-else class="overflow-hidden bg-white border border-gray-200 rounded-xl dark:bg-slate-800 dark:border-slate-700">
|
|
36
36
|
<table class="w-full">
|
|
37
37
|
<tbody>
|
|
38
38
|
<tr
|
|
39
39
|
v-for="(stat, index) in normalizedStats"
|
|
40
40
|
:key="resolveKey(stat, index)"
|
|
41
|
-
class="border-b border-gray-200 last:border-b-0"
|
|
41
|
+
class="border-b border-gray-200 last:border-b-0 dark:border-slate-700"
|
|
42
42
|
>
|
|
43
|
-
<td class="px-4 py-3 text-sm text-gray-600">
|
|
43
|
+
<td class="px-4 py-3 text-sm text-gray-600 dark:text-slate-400">
|
|
44
44
|
<div class="flex items-center gap-2">
|
|
45
45
|
<div
|
|
46
46
|
v-if="stat.icon"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
<span>{{ stat.label }}</span>
|
|
61
61
|
</div>
|
|
62
62
|
</td>
|
|
63
|
-
<td class="px-4 py-3 text-base font-semibold text-right text-gray-900">
|
|
63
|
+
<td class="px-4 py-3 text-base font-semibold text-right text-gray-900 dark:text-slate-100">
|
|
64
64
|
{{ stat.value }}
|
|
65
65
|
</td>
|
|
66
66
|
</tr>
|
package/src/ui/kMenu.vue
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<slot name="trigger">
|
|
15
15
|
<button
|
|
16
16
|
type="button"
|
|
17
|
-
class="inline-flex items-center justify-center px-3 py-2 text-base font-medium text-center transition border rounded-lg shadow-sm bg-white border-slate-200 text-slate-700 hover:bg-slate-50">
|
|
17
|
+
class="inline-flex items-center justify-center px-3 py-2 text-base font-medium text-center transition border rounded-lg shadow-sm bg-white border-slate-200 text-slate-700 hover:bg-slate-50 dark:bg-slate-800 dark:border-slate-600 dark:text-slate-200 dark:hover:bg-slate-700">
|
|
18
18
|
Menu
|
|
19
19
|
</button>
|
|
20
20
|
</slot>
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
<div
|
|
25
25
|
v-if="isOpen"
|
|
26
26
|
ref="menuPanelRef"
|
|
27
|
-
class="z-[9999] overflow-auto border rounded-lg shadow-lg bg-white/95 backdrop-blur-sm border-primary/20 ring-1 ring-primary/10 max-h-[70vh]"
|
|
27
|
+
class="z-[9999] overflow-auto border rounded-lg shadow-lg bg-white/95 backdrop-blur-sm border-primary/20 ring-1 ring-primary/10 max-h-[70vh] dark:bg-slate-800/95 dark:border-slate-700 dark:ring-slate-700"
|
|
28
28
|
:style="panelStyle"
|
|
29
29
|
role="menu">
|
|
30
30
|
<span
|
|
31
31
|
aria-hidden="true"
|
|
32
|
-
class="absolute w-3 h-3 -translate-x-1/2 rotate-45 bg-white"
|
|
32
|
+
class="absolute w-3 h-3 -translate-x-1/2 rotate-45 bg-white dark:bg-slate-800"
|
|
33
33
|
:class="[
|
|
34
34
|
placement === 'top'
|
|
35
35
|
? 'bottom-[-7px] border-r border-b border-primary/20'
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<li v-for="(link, index) in normalizedLinks" :key="link.key || `${link.label}-${index}`">
|
|
42
42
|
<component
|
|
43
43
|
:is="resolveLinkTag(link)"
|
|
44
|
-
class="flex items-center w-full gap-2 px-3 py-2 min-h-11 text-base rounded-md text-slate-700"
|
|
44
|
+
class="flex items-center w-full gap-2 px-3 py-2 min-h-11 text-base rounded-md text-slate-700 dark:text-slate-200"
|
|
45
45
|
:class="[
|
|
46
46
|
link.disabled
|
|
47
47
|
? 'cursor-not-allowed opacity-50'
|
package/src/ui/kSearch.vue
CHANGED
|
@@ -20,8 +20,8 @@ export default {
|
|
|
20
20
|
},
|
|
21
21
|
data() {
|
|
22
22
|
return {
|
|
23
|
-
defaultStyle: "w-full px-3 py-2 border rounded-lg transition shadow-sm focus:outline-none text-gray-700 focus:ring-2 focus:ring-primary/20 focus:border-primary bg-white placeholder-gray-400",
|
|
24
|
-
disabledStyle: "bg-gray-100 text-gray-400 cursor-not-allowed",
|
|
23
|
+
defaultStyle: "w-full px-3 py-2 border rounded-lg transition shadow-sm focus:outline-none text-gray-700 focus:ring-2 focus:ring-primary/20 focus:border-primary bg-white placeholder-gray-400 dark:bg-slate-800 dark:text-slate-100 dark:border-slate-600 dark:placeholder-slate-500",
|
|
24
|
+
disabledStyle: "bg-gray-100 text-gray-400 cursor-not-allowed dark:bg-slate-900 dark:text-slate-500",
|
|
25
25
|
|
|
26
26
|
localValue: this.modelValue,
|
|
27
27
|
debounceTimeout: null,
|
package/src/ui/kSelect.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="relative w-full">
|
|
3
|
-
<label v-if="label != null" :for="computedId" class="inputLabel" :class="hasError ? 'text-red-500' : 'text-gray-700'">
|
|
3
|
+
<label v-if="label != null" :for="computedId" class="inputLabel" :class="hasError ? 'text-red-500 dark:text-rose-400' : 'text-gray-700 dark:text-slate-300'">
|
|
4
4
|
{{ label }}
|
|
5
5
|
</label>
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<SelectTrigger as-child>
|
|
9
9
|
<div
|
|
10
10
|
:id="computedId"
|
|
11
|
-
class="relative w-full px-3 py-2 text-gray-700 bg-white border rounded-lg cursor-pointer trigger-box"
|
|
11
|
+
class="relative w-full px-3 py-2 text-gray-700 bg-white border rounded-lg cursor-pointer trigger-box dark:bg-slate-800 dark:text-slate-100 dark:border-slate-600"
|
|
12
12
|
:class="[defaultStyle, hasError ? errorStyle : '', disabled ? disabledStyle : '']"
|
|
13
13
|
:aria-label="label || 'Select option'"
|
|
14
14
|
>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<button
|
|
18
18
|
v-if="clearable && isSelectionSet && !disabled"
|
|
19
19
|
type="button"
|
|
20
|
-
class="absolute text-gray-400 -translate-y-1/2 right-8 top-1/2 hover:text-red-500 transition-colors"
|
|
20
|
+
class="absolute text-gray-400 -translate-y-1/2 right-8 top-1/2 hover:text-red-500 transition-colors dark:text-slate-500 dark:hover:text-red-400"
|
|
21
21
|
aria-label="Clear selection"
|
|
22
22
|
@pointerdown.stop.prevent="clearSelection"
|
|
23
23
|
@click.stop.prevent="clearSelection"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<X class="w-4 h-4" />
|
|
26
26
|
</button>
|
|
27
27
|
|
|
28
|
-
<span class="absolute text-gray-400 -translate-y-1/2 pointer-events-none right-3 top-1/2">
|
|
28
|
+
<span class="absolute text-gray-400 -translate-y-1/2 pointer-events-none right-3 top-1/2 dark:text-slate-500">
|
|
29
29
|
<ChevronDown class="w-4 h-4 transition-transform duration-200" :class="{ 'rotate-180': open }" />
|
|
30
30
|
</span>
|
|
31
31
|
</div>
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
<SelectContent
|
|
36
36
|
position="popper"
|
|
37
37
|
:side-offset="6"
|
|
38
|
-
class="select-content z-[9999] bg-white border border-gray-200 rounded-lg shadow-[0_10px_38px_-10px_rgba(22,23,24,0.35),0_10px_20px_-15px_rgba(22,23,24,0.2)] overflow-hidden"
|
|
38
|
+
class="select-content z-[9999] bg-white border border-gray-200 rounded-lg shadow-[0_10px_38px_-10px_rgba(22,23,24,0.35),0_10px_20px_-15px_rgba(22,23,24,0.2)] overflow-hidden dark:bg-slate-800 dark:border-slate-700"
|
|
39
39
|
>
|
|
40
|
-
<div v-if="searchable" class="sticky top-0 z-10 p-2 border-b border-gray-100 bg-white">
|
|
40
|
+
<div v-if="searchable" class="sticky top-0 z-10 p-2 border-b border-gray-100 bg-white dark:bg-slate-800 dark:border-slate-700">
|
|
41
41
|
<div class="relative">
|
|
42
|
-
<Search class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 pointer-events-none" />
|
|
42
|
+
<Search class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 pointer-events-none dark:text-slate-500" />
|
|
43
43
|
<input
|
|
44
44
|
ref="searchInput"
|
|
45
45
|
type="text"
|
|
46
46
|
v-model="searchQuery"
|
|
47
47
|
placeholder="Αναζήτηση..."
|
|
48
|
-
class="w-full pl-9 pr-3 py-2 text-base border border-gray-200 rounded-lg focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors placeholder-gray-400"
|
|
48
|
+
class="w-full pl-9 pr-3 py-2 text-base border border-gray-200 rounded-lg focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors placeholder-gray-400 dark:bg-slate-700 dark:text-slate-100 dark:border-slate-600 dark:placeholder-slate-500"
|
|
49
49
|
role="searchbox"
|
|
50
50
|
aria-label="Search options"
|
|
51
51
|
@keydown="handleSearchKeydown"
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
v-for="(option, index) in filteredOptions"
|
|
65
65
|
:key="option[optionValue]"
|
|
66
66
|
:value="option[optionValue]"
|
|
67
|
-
class="select-item relative flex items-center gap-1.5 rounded-[4px] py-2.5 pl-8 pr-3 text-base cursor-pointer outline-none select-none text-slate-700
|
|
67
|
+
class="select-item relative flex items-center gap-1.5 rounded-[4px] py-2.5 pl-8 pr-3 text-base cursor-pointer outline-none select-none text-slate-700 dark:text-slate-200
|
|
68
68
|
data-[highlighted]:bg-primary data-[highlighted]:text-white
|
|
69
|
-
data-[state=checked]:bg-primary/5 data-[state=checked]:text-primary
|
|
69
|
+
data-[state=checked]:bg-primary/5 data-[state=checked]:text-primary dark:data-[state=checked]:bg-slate-700 dark:data-[state=checked]:text-primary
|
|
70
70
|
data-[state=checked]:data-[highlighted]:bg-primary data-[state=checked]:data-[highlighted]:text-white"
|
|
71
71
|
>
|
|
72
72
|
<span class="absolute left-2 flex items-center justify-center w-4 h-4 shrink-0">
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
<SelectItemText class="truncate">{{ option[optionLabel] }}</SelectItemText>
|
|
78
78
|
</SelectItem>
|
|
79
79
|
|
|
80
|
-
<div v-if="filteredOptions.length === 0" class="flex flex-col items-center gap-1.5 px-3 py-4 text-base text-gray-400 text-center">
|
|
81
|
-
<SearchX class="w-5 h-5 text-gray-300" />
|
|
80
|
+
<div v-if="filteredOptions.length === 0" class="flex flex-col items-center gap-1.5 px-3 py-4 text-base text-gray-400 text-center dark:text-slate-500">
|
|
81
|
+
<SearchX class="w-5 h-5 text-gray-300 dark:text-slate-600" />
|
|
82
82
|
<span>Δεν βρέθηκαν επιλογές</span>
|
|
83
83
|
</div>
|
|
84
84
|
</SelectViewport>
|
|
@@ -86,11 +86,11 @@
|
|
|
86
86
|
</SelectPortal>
|
|
87
87
|
</SelectRoot>
|
|
88
88
|
|
|
89
|
-
<div class="mt-1 text-sm text-red-500" v-if="hasError && error !== true && error !== ''">
|
|
89
|
+
<div class="mt-1 text-sm text-red-500 dark:text-rose-400" v-if="hasError && error !== true && error !== ''">
|
|
90
90
|
{{ error }}
|
|
91
91
|
</div>
|
|
92
92
|
|
|
93
|
-
<div class="mt-1 text-sm text-gray-500" v-if="info">
|
|
93
|
+
<div class="mt-1 text-sm text-gray-500 dark:text-slate-400" v-if="info">
|
|
94
94
|
{{ info }}
|
|
95
95
|
</div>
|
|
96
96
|
</div>
|
|
@@ -134,9 +134,9 @@ const searchQuery = ref("");
|
|
|
134
134
|
const searchInput = ref(null);
|
|
135
135
|
const viewportRef = ref(null);
|
|
136
136
|
const generatedId = `select-${Math.random().toString(36).substr(2, 9)}`;
|
|
137
|
-
const defaultStyle = "w-full px-3 py-2 border rounded-lg transition shadow-sm focus:outline-none text-gray-700 focus:ring-2 focus:ring-primary/20 focus:border-primary bg-white placeholder-gray-400";
|
|
138
|
-
const errorStyle = "border-red-500 focus:ring focus:ring-red-300";
|
|
139
|
-
const disabledStyle = "!bg-gray-100 !text-gray-400 !cursor-not-allowed";
|
|
137
|
+
const defaultStyle = "w-full px-3 py-2 border rounded-lg transition shadow-sm focus:outline-none text-gray-700 focus:ring-2 focus:ring-primary/20 focus:border-primary bg-white placeholder-gray-400 dark:bg-slate-800 dark:text-slate-100 dark:border-slate-600 dark:placeholder-slate-500";
|
|
138
|
+
const errorStyle = "border-red-500 focus:ring focus:ring-red-300 dark:border-rose-500 dark:focus:ring-rose-500/20";
|
|
139
|
+
const disabledStyle = "!bg-gray-100 !text-gray-400 !cursor-not-allowed dark:!bg-slate-900 dark:!text-slate-500";
|
|
140
140
|
|
|
141
141
|
function normalizeDropdownHeight(value) {
|
|
142
142
|
const raw = String(value ?? "").trim();
|
|
@@ -349,4 +349,20 @@ function handleViewportKeydown(event) {
|
|
|
349
349
|
background-color: #334155;
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
+
.dark :deep([data-reka-select-viewport]) {
|
|
353
|
+
scrollbar-color: #475569 #1e293b !important;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.dark :deep([data-reka-select-viewport]::-webkit-scrollbar-track) {
|
|
357
|
+
background: #1e293b;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.dark :deep([data-reka-select-viewport]::-webkit-scrollbar-thumb) {
|
|
361
|
+
background-color: #475569;
|
|
362
|
+
border-color: #1e293b;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.dark :deep([data-reka-select-viewport]::-webkit-scrollbar-thumb:hover) {
|
|
366
|
+
background-color: #64748b;
|
|
367
|
+
}
|
|
352
368
|
</style>
|
package/src/ui/kSelectButton.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="k-select-button inline-flex max-w-full overflow-x-auto border rounded-md border-primary/25" :aria-disabled="disabled.toString()">
|
|
2
|
+
<div class="k-select-button inline-flex max-w-full overflow-x-auto border rounded-md border-primary/25 dark:border-slate-600" :aria-disabled="disabled.toString()">
|
|
3
3
|
|
|
4
4
|
<button
|
|
5
5
|
v-for="(option, index) in options"
|
|
@@ -40,7 +40,7 @@ export default {
|
|
|
40
40
|
return "bg-primary text-white";
|
|
41
41
|
},
|
|
42
42
|
inactiveClasses() {
|
|
43
|
-
return this.disabled ? "bg-white text-gray-500" : "bg-white text-primary/90 hover:bg-primary/10";
|
|
43
|
+
return this.disabled ? "bg-white text-gray-500 dark:bg-slate-800 dark:text-slate-400" : "bg-white text-primary/90 hover:bg-primary/10 dark:bg-slate-800 dark:text-slate-200 dark:hover:bg-primary/20";
|
|
44
44
|
},
|
|
45
45
|
},
|
|
46
46
|
methods: {
|
package/src/ui/kSkeleton.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template lang="">
|
|
2
2
|
<template v-if="type === 'text'">
|
|
3
3
|
<div class="space-y-2 animate-pulse">
|
|
4
|
-
<div v-for="n in normalizedRows" :key="n" class="w-full h-4 rounded bg-primary/20"></div>
|
|
4
|
+
<div v-for="n in normalizedRows" :key="n" class="w-full h-4 rounded bg-primary/20 dark:bg-slate-700"></div>
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|
|
7
7
|
</template>
|
package/src/ui/kTags.vue
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="w-full">
|
|
3
|
-
<div v-if="label != null" class="inputLabel" :class="hasError ? 'text-rose-800' : 'text-primary/90'">
|
|
3
|
+
<div v-if="label != null" class="inputLabel" :class="hasError ? 'text-rose-800 dark:text-rose-400' : 'text-primary/90'">
|
|
4
4
|
{{ label }}
|
|
5
5
|
</div>
|
|
6
6
|
<div
|
|
7
7
|
:class="[
|
|
8
8
|
'flex flex-wrap items-center gap-2 p-2 border rounded-xl shadow-sm min-h-[3rem] transition',
|
|
9
|
-
hasError ? 'border-rose-500 bg-rose-50/40 focus-within:border-rose-600 focus-within:ring-2 focus-within:ring-rose-500/20' : 'border-gray-300 focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/20',
|
|
10
|
-
disabled ? 'bg-gray-100 cursor-not-allowed' : 'bg-white',
|
|
9
|
+
hasError ? 'border-rose-500 bg-rose-50/40 focus-within:border-rose-600 focus-within:ring-2 focus-within:ring-rose-500/20 dark:bg-rose-950/40 dark:border-rose-500' : 'border-gray-300 focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/20 dark:border-slate-600',
|
|
10
|
+
disabled ? 'bg-gray-100 cursor-not-allowed dark:bg-slate-900' : 'bg-white dark:bg-slate-800',
|
|
11
11
|
]">
|
|
12
12
|
<span v-for="(tag, index) in internalTags" :key="index" class="flex items-center px-2 py-1 rounded-full text-primary bg-primary/10">
|
|
13
13
|
{{ tag }}
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
@blur="addTag"
|
|
26
26
|
:placeholder="placeholder"
|
|
27
27
|
:disabled="disabled"
|
|
28
|
-
:class="['flex-1 p-1 bg-transparent border-none focus:outline-none', disabled ? 'text-gray-400 cursor-not-allowed' : '']"
|
|
28
|
+
:class="['flex-1 p-1 bg-transparent border-none focus:outline-none dark:text-slate-100 dark:placeholder-slate-500', disabled ? 'text-gray-400 cursor-not-allowed dark:text-slate-500' : '']"
|
|
29
29
|
/>
|
|
30
30
|
</div>
|
|
31
31
|
<!-- Error message -->
|
|
32
|
-
<div class="text-sm text-rose-700" v-if="hasError && error !== true && error !== ''">
|
|
32
|
+
<div class="text-sm text-rose-700 dark:text-rose-400" v-if="hasError && error !== true && error !== ''">
|
|
33
33
|
{{ error }}
|
|
34
34
|
</div>
|
|
35
35
|
|
|
36
36
|
<!-- Info message -->
|
|
37
|
-
<div class="text-sm text-gray-500" v-if="info != null">
|
|
37
|
+
<div class="text-sm text-gray-500 dark:text-slate-400" v-if="info != null">
|
|
38
38
|
{{ info }}
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
@@ -100,4 +100,7 @@ export default {
|
|
|
100
100
|
input::-webkit-input-placeholder {
|
|
101
101
|
color: #9ca3af; /* Tailwind gray-400 */
|
|
102
102
|
}
|
|
103
|
+
.dark input::-webkit-input-placeholder {
|
|
104
|
+
color: #64748b; /* Tailwind slate-500 */
|
|
105
|
+
}
|
|
103
106
|
</style>
|
package/src/ui/kTextArea.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
v-if="label != null"
|
|
5
5
|
:for="inputId"
|
|
6
6
|
class="inputLabel"
|
|
7
|
-
:class="hasError ? 'text-red-500' : 'text-primary/90'"
|
|
7
|
+
:class="hasError ? 'text-red-500 dark:text-rose-400' : 'text-primary/90'"
|
|
8
8
|
>
|
|
9
9
|
{{ label }}
|
|
10
10
|
</label>
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
:aria-describedby="describedById"
|
|
23
23
|
/>
|
|
24
24
|
|
|
25
|
-
<div :id="errorId" class="mt-1 text-red-500" v-if="hasError && error !== true && error !== ''">
|
|
25
|
+
<div :id="errorId" class="mt-1 text-red-500 dark:text-rose-400" v-if="hasError && error !== true && error !== ''">
|
|
26
26
|
{{ error }}
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
<div :id="infoId" class="mt-1 text-primary/80" v-if="info != null">
|
|
29
|
+
<div :id="infoId" class="mt-1 text-primary/80 dark:text-slate-400" v-if="info != null">
|
|
30
30
|
{{ info }}
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
@@ -74,9 +74,9 @@ export default {
|
|
|
74
74
|
},
|
|
75
75
|
textareaClass() {
|
|
76
76
|
return [
|
|
77
|
-
'w-full px-3 py-2 border rounded-lg transition shadow-sm focus:outline-none text-gray-700 focus:ring-2 focus:ring-primary/20 focus:border-primary bg-white placeholder-gray-400',
|
|
78
|
-
this.hasError ? 'border-red-500 focus:ring focus:ring-red-300' : '',
|
|
79
|
-
this.disabled ? '!bg-gray-100 !text-gray-400 !cursor-not-allowed' : '',
|
|
77
|
+
'w-full px-3 py-2 border rounded-lg transition shadow-sm focus:outline-none text-gray-700 focus:ring-2 focus:ring-primary/20 focus:border-primary bg-white placeholder-gray-400 dark:bg-slate-800 dark:text-slate-100 dark:border-slate-600 dark:placeholder-slate-500',
|
|
78
|
+
this.hasError ? 'border-red-500 focus:ring focus:ring-red-300 dark:border-rose-500 dark:focus:ring-rose-500/20' : '',
|
|
79
|
+
this.disabled ? '!bg-gray-100 !text-gray-400 !cursor-not-allowed dark:!bg-slate-900 dark:!text-slate-500 dark:!border-slate-700' : '',
|
|
80
80
|
]
|
|
81
81
|
},
|
|
82
82
|
},
|
package/src/ui/kToolbar.vue
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:class="[
|
|
8
8
|
'k-toolbar relative w-full',
|
|
9
9
|
dense ? 'p-0 md:p-0' : 'px-3 md:px-4 py-2.5',
|
|
10
|
-
variant === 'plain' ? 'bg-transparent border-0 rounded-none shadow-none px-0 md:px-0' : 'border rounded-lg bg-white shadow-sm border-primary/20',
|
|
10
|
+
variant === 'plain' ? 'bg-transparent border-0 rounded-none shadow-none px-0 md:px-0' : 'border rounded-lg bg-white shadow-sm border-primary/20 dark:bg-slate-800 dark:border-slate-700',
|
|
11
11
|
disabled ? 'pointer-events-none opacity-60' : '',
|
|
12
12
|
]">
|
|
13
13
|
<div class="flex flex-wrap items-center gap-2 md:gap-3">
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
ref="menuTriggerRef"
|
|
30
30
|
type="button"
|
|
31
31
|
v-show="isCompact"
|
|
32
|
-
class="inline-flex items-center justify-center p-2 ml-auto border rounded-md border-primary/30 text-slate-700 hover:bg-primary/10"
|
|
32
|
+
class="inline-flex items-center justify-center p-2 ml-auto border rounded-md border-primary/30 text-slate-700 hover:bg-primary/10 dark:border-slate-600 dark:text-slate-300"
|
|
33
33
|
:aria-label="mobileMenuOpen ? 'Close toolbar actions menu' : 'Open toolbar actions menu'"
|
|
34
34
|
:aria-expanded="mobileMenuOpen.toString()"
|
|
35
35
|
@click="toggleMobileMenu">
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
role="dialog"
|
|
70
70
|
aria-modal="true"
|
|
71
71
|
aria-label="Toolbar actions"
|
|
72
|
-
class="absolute bottom-0 left-0 right-0 p-3 border-t shadow-2xl rounded-t-2xl bg-white/95 backdrop-blur-sm border-primary/20"
|
|
72
|
+
class="absolute bottom-0 left-0 right-0 p-3 border-t shadow-2xl rounded-t-2xl bg-white/95 backdrop-blur-sm border-primary/20 dark:bg-slate-800/95 dark:border-slate-700"
|
|
73
73
|
style="padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));">
|
|
74
|
-
<div class="flex items-center justify-between pb-2 mb-2 border-b border-primary/20">
|
|
74
|
+
<div class="flex items-center justify-between pb-2 mb-2 border-b border-primary/20 dark:border-slate-700">
|
|
75
75
|
<h3 class="text-sm font-semibold text-primary">Actions</h3>
|
|
76
76
|
<button type="button" class="p-2 rounded-md hover:bg-primary/10" aria-label="Close actions menu" @click="closeMobileMenu()">
|
|
77
77
|
<kIcon name="X" :size="18" />
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
disabled || action.disabled || action.loading ? 'opacity-50 cursor-not-allowed' : 'hover:bg-primary/10 active:bg-primary/15',
|
|
90
90
|
]"
|
|
91
91
|
@click="handleMobileAction(action)">
|
|
92
|
-
<kIcon v-if="action.icon" :name="action.icon" :size="18" class="shrink-0 text-slate-600" />
|
|
93
|
-
<span class="text-sm font-medium text-slate-900">{{ action.label }}</span>
|
|
94
|
-
<span v-if="action.loading" class="w-4 h-4 ml-auto border-2 rounded-full border-slate-300 border-t-transparent animate-spin"></span>
|
|
92
|
+
<kIcon v-if="action.icon" :name="action.icon" :size="18" class="shrink-0 text-slate-600 dark:text-slate-400" />
|
|
93
|
+
<span class="text-sm font-medium text-slate-900 dark:text-slate-200">{{ action.label }}</span>
|
|
94
|
+
<span v-if="action.loading" class="w-4 h-4 ml-auto border-2 rounded-full border-slate-300 border-t-transparent animate-spin dark:border-slate-600"></span>
|
|
95
95
|
</button>
|
|
96
96
|
</div>
|
|
97
97
|
</section>
|
package/src/ui/kTree.vue
CHANGED
|
@@ -274,4 +274,26 @@ export default {
|
|
|
274
274
|
margin-bottom: 0 !important;
|
|
275
275
|
padding: 0 !important;
|
|
276
276
|
}
|
|
277
|
+
|
|
278
|
+
.dark .k-tree {
|
|
279
|
+
background: transparent;
|
|
280
|
+
color: #cbd5e1;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.dark .k-tree-node-content:hover {
|
|
284
|
+
background: #1e293b;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.dark .k-tree-node-content--selected {
|
|
288
|
+
background: #14532d;
|
|
289
|
+
color: #86efac;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.dark .k-tree-node-toggler {
|
|
293
|
+
color: #94a3b8;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.dark .k-tree-node-toggler:hover {
|
|
297
|
+
background: #334155;
|
|
298
|
+
}
|
|
277
299
|
</style>
|
package/src/ui/kUploader.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="mx-auto bg-white" :class="disabled ? 'pointer-events-none opacity-50' : ''">
|
|
2
|
+
<div class="mx-auto bg-white dark:bg-transparent" :class="disabled ? 'pointer-events-none opacity-50' : ''">
|
|
3
3
|
<div
|
|
4
4
|
v-if="multiple || (!multiple && files.length == 0)"
|
|
5
5
|
@dragover.prevent="onDragover"
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
@drop.prevent="onDrop"
|
|
8
8
|
:class="[
|
|
9
9
|
'border-2 border-dashed rounded-lg p-8 text-center transition-colors mb-8',
|
|
10
|
-
dragover ? 'border-primary bg-primary/10' : 'border-gray-300 hover:border-primary/50',
|
|
10
|
+
dragover ? 'border-primary bg-primary/10' : 'border-gray-300 hover:border-primary/50 dark:border-slate-600 dark:hover:border-primary/50',
|
|
11
11
|
]"
|
|
12
12
|
>
|
|
13
13
|
<div class="flex flex-col items-center justify-center space-y-4">
|
|
14
14
|
<UploadCloudIcon class="w-12 h-12 text-primary/60" />
|
|
15
|
-
<p class="text-lg font-medium text-gray-700">
|
|
15
|
+
<p class="text-lg font-medium text-gray-700 dark:text-slate-200">
|
|
16
16
|
Σύρετε το αρχείο εδώ, ή
|
|
17
17
|
<label
|
|
18
18
|
for="file-input"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
αναζητήστε
|
|
22
22
|
</label>
|
|
23
23
|
</p>
|
|
24
|
-
<p class="text-sm text-gray-500">
|
|
24
|
+
<p class="text-sm text-gray-500 dark:text-slate-400">
|
|
25
25
|
Supported file types: {{ fileTypes.join(', ') }} (max {{ maxSize }})
|
|
26
26
|
</p>
|
|
27
27
|
</div>
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
<li
|
|
43
43
|
v-for="file in files"
|
|
44
44
|
:key="file.name"
|
|
45
|
-
class="flex items-center justify-between p-4 bg-white rounded-lg shadow"
|
|
45
|
+
class="flex items-center justify-between p-4 bg-white rounded-lg shadow dark:bg-slate-800"
|
|
46
46
|
>
|
|
47
47
|
<div class="flex items-center space-x-4">
|
|
48
48
|
<FileIcon class="w-8 h-8 text-primary/60" />
|
|
49
49
|
<div>
|
|
50
|
-
<p class="text-sm font-medium text-gray-700">{{ file.fileName }}</p>
|
|
51
|
-
<p class="text-xs text-gray-500">{{ formatFileSize(file.fileSize) }}</p>
|
|
50
|
+
<p class="text-sm font-medium text-gray-700 dark:text-slate-200">{{ file.fileName }}</p>
|
|
51
|
+
<p class="text-xs text-gray-500 dark:text-slate-400">{{ formatFileSize(file.fileSize) }}</p>
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
54
54
|
<div class="flex items-center space-x-4">
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
<CheckCircleIcon class="w-5 h-5 text-green-500" />
|
|
64
64
|
<button
|
|
65
65
|
@click="removeFile(file)"
|
|
66
|
-
class="text-gray-400 hover:text-red-500 focus:outline-none"
|
|
66
|
+
class="text-gray-400 hover:text-red-500 focus:outline-none dark:text-slate-500 dark:hover:text-red-400"
|
|
67
67
|
:disabled="disabled"
|
|
68
68
|
aria-label="Remove file"
|
|
69
69
|
>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export const K_INPUT_THEME = {
|
|
2
2
|
label: "text-primary/90",
|
|
3
|
-
labelDisabled: "text-slate-500",
|
|
4
|
-
labelError: "text-rose-800",
|
|
3
|
+
labelDisabled: "text-slate-500 dark:text-slate-400",
|
|
4
|
+
labelError: "text-rose-800 dark:text-rose-400",
|
|
5
5
|
baseInput:
|
|
6
|
-
"w-full px-3 py-2 border rounded-lg transition shadow-sm focus:outline-none text-slate-900 bg-white placeholder-gray-400 focus:ring-2 focus:ring-primary/25 focus:border-primary",
|
|
6
|
+
"w-full px-3 py-2 border rounded-lg transition shadow-sm focus:outline-none text-slate-900 bg-white placeholder-gray-400 focus:ring-2 focus:ring-primary/25 focus:border-primary dark:bg-slate-800 dark:text-slate-100 dark:border-slate-600 dark:placeholder-slate-500",
|
|
7
7
|
withRightAdornment: "pr-10",
|
|
8
8
|
withPasswordToggle: "pr-14",
|
|
9
|
-
disabled: "!bg-slate-50 !text-slate-400 !border-slate-200 !shadow-none cursor-not-allowed placeholder-slate-400",
|
|
10
|
-
errorInput: "border-rose-500 bg-rose-50/40 focus:border-rose-600 focus:ring-rose-500/20",
|
|
11
|
-
infoText: "text-sm text-slate-600",
|
|
12
|
-
errorText: "text-sm text-rose-700",
|
|
9
|
+
disabled: "!bg-slate-50 !text-slate-400 !border-slate-200 !shadow-none cursor-not-allowed placeholder-slate-400 dark:!bg-slate-900 dark:!text-slate-500 dark:!border-slate-700",
|
|
10
|
+
errorInput: "border-rose-500 bg-rose-50/40 focus:border-rose-600 focus:ring-rose-500/20 dark:bg-rose-950/40 dark:border-rose-500 dark:focus:ring-rose-500/20",
|
|
11
|
+
infoText: "text-sm text-slate-600 dark:text-slate-400",
|
|
12
|
+
errorText: "text-sm text-rose-700 dark:text-rose-400",
|
|
13
13
|
trailingIcon: "absolute w-4 h-4 text-primary/70 -translate-y-1/2 pointer-events-none right-3 top-1/2",
|
|
14
|
-
trailingIconDisabled: "text-slate-400",
|
|
15
|
-
passwordToggle: "absolute inset-y-0 right-0 flex items-center pr-3 text-slate-700",
|
|
14
|
+
trailingIconDisabled: "text-slate-400 dark:text-slate-500",
|
|
15
|
+
passwordToggle: "absolute inset-y-0 right-0 flex items-center pr-3 text-slate-700 dark:text-slate-300",
|
|
16
16
|
passwordToggleButton:
|
|
17
17
|
"text-xs font-medium select-none rounded px-1 py-0.5 hover:bg-primary/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
18
|
-
passwordToggleButtonDisabled: "text-slate-400 cursor-not-allowed hover:bg-transparent",
|
|
18
|
+
passwordToggleButtonDisabled: "text-slate-400 cursor-not-allowed hover:bg-transparent dark:text-slate-500",
|
|
19
19
|
};
|