@katlux/preset-modern 0.1.0-beta.59 → 0.1.0-beta.60

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.0-beta.59",
4
+ "version": "0.1.0-beta.60",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -121,6 +121,7 @@
121
121
  --checkbox-bg: var(--background-color);
122
122
  --checkbox-checked-bg: var(--button-gradient-primary);
123
123
  --checkbox-border-color: var(--neutral-400);
124
+ --checkbox-border-radius: 4px;
124
125
  --modal-overlay-bg: rgba(15, 23, 42, 0.4);
125
126
  --modal-backdrop-blur: 4px;
126
127
  --layout-header-height: 70px;
@@ -121,6 +121,7 @@
121
121
  --checkbox-bg: var(--background-color);
122
122
  --checkbox-checked-bg: var(--button-gradient-primary);
123
123
  --checkbox-border-color: var(--neutral-400);
124
+ --checkbox-border-radius: 4px;
124
125
  --modal-overlay-bg: rgba(15, 23, 42, 0.4);
125
126
  --modal-backdrop-blur: 4px;
126
127
  --layout-header-height: 70px;
@@ -2,6 +2,9 @@ type __VLS_Props = {
2
2
  model: any;
3
3
  checkboxValue: any;
4
4
  isDisabled: boolean;
5
+ label?: string;
6
+ validation?: 'success' | 'warning' | 'error' | null;
7
+ validationText?: string;
5
8
  };
6
9
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
10
  "update:model": (value: any) => any;
@@ -1,11 +1,15 @@
1
1
  <template lang="pug">
2
- label.KCheckbox.modern-checkbox
3
- input(type="checkbox" v-model="formattedModel" :value="checkboxValue" :disabled="isDisabled")
4
- .checkbox-box
5
- .checkbox-checkmark
6
- KIcon.icon(iconname="check")
7
- .checkbox-label
8
- slot
2
+ .KCheckbox-wrapper
3
+ label.KCheckbox.modern-checkbox
4
+ input(type="checkbox" v-model="formattedModel" :value="checkboxValue" :disabled="isDisabled")
5
+ .checkbox-box(:class="validation ? `is-${validation}` : ''")
6
+ .checkbox-checkmark
7
+ KIcon.icon(iconname="check")
8
+ .checkbox-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 }}
9
13
  </template>
10
14
 
11
15
  <script setup>
@@ -13,7 +17,10 @@ import { computed } from "vue";
13
17
  const props = defineProps({
14
18
  model: { type: null, required: true },
15
19
  checkboxValue: { type: null, required: true },
16
- isDisabled: { type: Boolean, required: true }
20
+ isDisabled: { type: Boolean, required: true },
21
+ label: { type: String, required: false },
22
+ validation: { type: [String, null], required: false },
23
+ validationText: { type: String, required: false }
17
24
  });
18
25
  const emit = defineEmits(["update:model"]);
19
26
  const formattedModel = computed({
@@ -43,7 +50,7 @@ const formattedModel = computed({
43
50
  width: 22px;
44
51
  height: 22px;
45
52
  border: 2px solid var(--neutral-400);
46
- border-radius: var(--border-radius-sm);
53
+ border-radius: var(--checkbox-border-radius, 4px);
47
54
  background: var(--background-color);
48
55
  transition: all var(--transition-bounce);
49
56
  display: flex;
@@ -2,6 +2,9 @@ type __VLS_Props = {
2
2
  model: any;
3
3
  checkboxValue: any;
4
4
  isDisabled: boolean;
5
+ label?: string;
6
+ validation?: 'success' | 'warning' | 'error' | null;
7
+ validationText?: string;
5
8
  };
6
9
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
10
  "update:model": (value: any) => any;
@@ -19,6 +19,10 @@
19
19
  th.actions-cell(v-if="rowActions && rowActions.length > 0") Actions
20
20
 
21
21
  tbody
22
+ tr.empty-row(v-if="!dataProvider.loading.value && (!dataProvider.pageData.value || dataProvider.pageData.value.length === 0)")
23
+ td.empty-state(:colspan="(visibleFields || dataProvider.fields || []).length + (bulkActions && bulkActions.length > 0 ? 1 : 0) + (rowActions && rowActions.length > 0 ? 1 : 0)")
24
+ span(v-if="dataProvider.filter.value?.active") no result found for filter
25
+ span(v-else) no result
22
26
  tr(v-for="(row, index) in dataProvider.pageData.value" :key="index" :class="{ 'selected': selectedRows.includes(row) }")
23
27
  td.check-cell(v-if="bulkActions && bulkActions.length > 0")
24
28
  KCheckbox(:value="row" v-model="selectedRows")
@@ -152,6 +156,11 @@ const getColumnStyle = (field) => {
152
156
  .modern-datatable table tbody tr td.actions-cell {
153
157
  text-align: right;
154
158
  }
159
+ .modern-datatable table tbody tr td.empty-state {
160
+ text-align: center;
161
+ padding: var(--gap-xl, 24px);
162
+ color: var(--font-color-secondary, #666);
163
+ }
155
164
  .modern-datatable table tbody tr:last-child td {
156
165
  border-bottom: none;
157
166
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/preset-modern",
3
- "version": "0.1.0-beta.59",
3
+ "version": "0.1.0-beta.60",
4
4
  "description": "Modern default design preset and styling variables for Katlux components",
5
5
  "author": "Katlux",
6
6
  "license": "MIT",