@katlux/preset-modern 0.1.1-alpha.85 → 0.1.1-alpha.86

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@katlux/preset-modern",
3
3
  "configKey": "katluxTemplateModern",
4
- "version": "0.1.1-alpha.85",
4
+ "version": "0.1.1-alpha.86",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -110,13 +110,14 @@
110
110
  --table-border-color: var(--neutral-200);
111
111
  --table-row-hover: var(--neutral-100);
112
112
  --table-row-selected: #eff6ff;
113
+ --table-row-selected-text: var(--primary-900);
113
114
  --panel-bg-opacity: 0.5;
114
115
  --panel-blur: 16px;
115
116
  --panel-bg-default: var(--neutral-100);
116
117
  --panel-header-bg-default: var(--neutral-200);
117
118
  --panel-footer-bg-default: var(--neutral-100);
118
119
  --checkbox-bg: var(--background-color);
119
- --checkbox-checked-bg: var(--button-gradient-primary);
120
+ --checkbox-checked-bg: var(--primary-500);
120
121
  --checkbox-border-color: var(--neutral-400);
121
122
  --checkbox-border-radius: 4px;
122
123
  --modal-overlay-bg: rgba(15, 23, 42, 0.4);
@@ -110,13 +110,14 @@
110
110
  --table-border-color: var(--neutral-200);
111
111
  --table-row-hover: var(--neutral-100);
112
112
  --table-row-selected: #eff6ff;
113
+ --table-row-selected-text: var(--primary-900);
113
114
  --panel-bg-opacity: 0.5;
114
115
  --panel-blur: 16px;
115
116
  --panel-bg-default: var(--neutral-100);
116
117
  --panel-header-bg-default: var(--neutral-200);
117
118
  --panel-footer-bg-default: var(--neutral-100);
118
119
  --checkbox-bg: var(--background-color);
119
- --checkbox-checked-bg: var(--button-gradient-primary);
120
+ --checkbox-checked-bg: var(--primary-500);
120
121
  --checkbox-border-color: var(--neutral-400);
121
122
  --checkbox-border-radius: 4px;
122
123
  --modal-overlay-bg: rgba(15, 23, 42, 0.4);
@@ -181,9 +181,11 @@ const getColumnStyle = (field) => {
181
181
  }
182
182
  .modern-datatable table tbody tr.selected {
183
183
  background-color: var(--table-row-selected);
184
+ color: var(--table-row-selected-text, inherit);
184
185
  }
185
186
  .modern-datatable table tbody tr.selected td {
186
- border-bottom-color: #dbeafe;
187
+ border-bottom-color: rgba(255, 255, 255, 0.1);
188
+ color: var(--table-row-selected-text, inherit);
187
189
  }
188
190
  .modern-datatable .action-buttons {
189
191
  display: flex;
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ model?: any;
3
+ value?: any;
4
+ disabled?: boolean;
5
+ label?: string;
6
+ validation?: 'success' | 'warning' | 'error' | null;
7
+ validationText?: string;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
+ "update:model": (value: any) => any;
11
+ "update:modelValue": (value: any) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ "onUpdate:model"?: ((value: any) => any) | undefined;
14
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,131 @@
1
+ <template lang="pug">
2
+ .KRadiobox-wrapper
3
+ label.KRadiobox.modern-radiobox
4
+ input(type="radio" v-model="internalModel" :value="value" :disabled="disabled")
5
+ .radiobox-box(:class="validation ? `is-${validation}` : ''")
6
+ .radiobox-checkmark
7
+ KIcon.icon(iconname="check")
8
+ .radiobox-label(v-if="$slots.label || $slots.default || label")
9
+ slot(name="label")
10
+ slot
11
+ | {{ label }}
12
+ span.validation-text(v-if="validation && ['success', 'warning', 'error'].includes(validation) && validationText" :class="`is-${validation}`") {{ validationText }}
13
+ </template>
14
+
15
+ <script setup>
16
+ import { computed } from "vue";
17
+ const props = defineProps({
18
+ model: { type: null, required: false },
19
+ value: { type: null, required: false },
20
+ disabled: { type: Boolean, required: false },
21
+ label: { type: String, required: false },
22
+ validation: { type: [String, null], required: false },
23
+ validationText: { type: String, required: false }
24
+ });
25
+ const emit = defineEmits(["update:modelValue", "update:model"]);
26
+ const internalModel = computed({
27
+ get: () => props.model,
28
+ set: (val) => {
29
+ emit("update:model", val);
30
+ emit("update:modelValue", val);
31
+ }
32
+ });
33
+ </script>
34
+
35
+ <style scoped>
36
+ .KRadiobox.modern-radiobox {
37
+ display: flex;
38
+ align-items: center;
39
+ gap: var(--gap-sm);
40
+ cursor: pointer;
41
+ user-select: none;
42
+ transition: all var(--transition-fast);
43
+ }
44
+ .KRadiobox.modern-radiobox:hover .radiobox-box {
45
+ border-color: var(--primary-500);
46
+ box-shadow: var(--input-focus-shadow);
47
+ }
48
+ .KRadiobox.modern-radiobox input {
49
+ position: absolute;
50
+ opacity: 0;
51
+ width: 1px;
52
+ height: 1px;
53
+ margin: -1px;
54
+ overflow: hidden;
55
+ clip: rect(0, 0, 0, 0);
56
+ }
57
+ .KRadiobox.modern-radiobox .radiobox-box {
58
+ position: relative;
59
+ width: 22px;
60
+ height: 22px;
61
+ border: 2px solid var(--neutral-400);
62
+ border-radius: var(--checkbox-border-radius, 4px);
63
+ background: var(--background-color);
64
+ transition: all var(--transition-bounce);
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ flex-shrink: 0;
69
+ }
70
+ .KRadiobox.modern-radiobox .radiobox-box::before {
71
+ content: "";
72
+ position: absolute;
73
+ inset: 0;
74
+ border-radius: 4px;
75
+ background: var(--checkbox-checked-bg);
76
+ opacity: 0;
77
+ transform: scale(0.8);
78
+ transition: all var(--transition-bounce);
79
+ }
80
+ .KRadiobox.modern-radiobox .radiobox-checkmark {
81
+ position: relative;
82
+ z-index: 1;
83
+ }
84
+ .KRadiobox.modern-radiobox .radiobox-checkmark .icon {
85
+ display: none;
86
+ color: white;
87
+ font-size: 14px;
88
+ animation: checkmark-pop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
89
+ }
90
+ .KRadiobox.modern-radiobox .radiobox-label {
91
+ font-size: 15px;
92
+ color: var(--font-color-primary);
93
+ line-height: 1.5;
94
+ }
95
+ .KRadiobox.modern-radiobox input:checked + .radiobox-box {
96
+ border-color: var(--primary-500);
97
+ }
98
+ .KRadiobox.modern-radiobox input:checked + .radiobox-box::before {
99
+ opacity: 1;
100
+ transform: scale(1);
101
+ }
102
+ .KRadiobox.modern-radiobox input:checked + .radiobox-box .radiobox-checkmark .icon {
103
+ display: block;
104
+ }
105
+ .KRadiobox.modern-radiobox input:disabled + .radiobox-box {
106
+ background-color: var(--neutral-200);
107
+ border-color: var(--neutral-300);
108
+ cursor: not-allowed;
109
+ }
110
+ .KRadiobox.modern-radiobox input:disabled + .radiobox-box::before {
111
+ background: var(--neutral-400);
112
+ }
113
+ .KRadiobox.modern-radiobox input:disabled ~ .radiobox-label {
114
+ color: var(--neutral-400);
115
+ cursor: not-allowed;
116
+ }
117
+
118
+ @keyframes checkmark-pop {
119
+ 0% {
120
+ transform: scale(0);
121
+ opacity: 0;
122
+ }
123
+ 50% {
124
+ transform: scale(1.2);
125
+ }
126
+ 100% {
127
+ transform: scale(1);
128
+ opacity: 1;
129
+ }
130
+ }
131
+ </style>
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ model?: any;
3
+ value?: any;
4
+ disabled?: boolean;
5
+ label?: string;
6
+ validation?: 'success' | 'warning' | 'error' | null;
7
+ validationText?: string;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
+ "update:model": (value: any) => any;
11
+ "update:modelValue": (value: any) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ "onUpdate:model"?: ((value: any) => any) | undefined;
14
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -8,6 +8,7 @@ export default defineNuxtPlugin(() => {
8
8
  "./components/KDatatable/KDatatable.vue": () => import("./components/KDatatable/KDatatable.vue"),
9
9
  "./components/KMaskTextbox/KMaskTextbox.vue": () => import("./components/KMaskTextbox/KMaskTextbox.vue"),
10
10
  "./components/KPagination/KPagination.vue": () => import("./components/KPagination/KPagination.vue"),
11
+ "./components/KRadiobox/KRadiobox.vue": () => import("./components/KRadiobox/KRadiobox.vue"),
11
12
  "./components/KRangeSlider/KRangeSlider.vue": () => import("./components/KRangeSlider/KRangeSlider.vue"),
12
13
  "./components/KSlider/KSlider.vue": () => import("./components/KSlider/KSlider.vue"),
13
14
  "./components/KTextarea/KTextarea.vue": () => import("./components/KTextarea/KTextarea.vue"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/preset-modern",
3
- "version": "0.1.1-alpha.85",
3
+ "version": "0.1.1-alpha.86",
4
4
  "description": "Modern default design preset and styling variables for Katlux components",
5
5
  "author": "Katlux",
6
6
  "license": "Apache-2.0",