@katlux/preset-modern 0.1.1-alpha.119 → 0.1.1-alpha.121

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 CHANGED
@@ -1,138 +1,55 @@
1
- # Modern Template - Component Summary
1
+ # @katlux/preset-modern
2
2
 
3
- The modern template provides a fresh, contemporary design for KatluxToolkit components with gradients, smooth animations, and enhanced visual feedback.
3
+ [![npm version](https://img.shields.io/badge/version-0.1.1--alpha.120-orange.svg)](https://www.npmjs.com/package/@katlux/preset-modern)
4
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)
4
5
 
5
- ## Supported Components
6
-
7
- ### ✅ KButton
8
- - Gradient backgrounds for all button types
9
- - Smooth hover lift animation
10
- - Enhanced shadows for depth
11
- - Icon slot support
12
- - Custom animated loading spinner
13
-
14
- ### ✅ KCheckbox
15
- - Gradient-filled checkmark on selection
16
- - Smooth check animation with pop effect
17
- - Hover glow effect
18
- - Rounded corners
19
- - Disabled state styling
20
-
21
- ### ✅ KTextbox
22
- - Clean, minimal design
23
- - Focus ring with brand color
24
- - Animated clear button
25
- - Smooth transitions
26
- - Enhanced placeholder styling
27
-
28
- ### ✅ KTextarea
29
- - Consistent styling with KTextbox
30
- - Focus ring animation
31
- - Smooth border transitions
32
- - Comfortable padding
33
- - Disabled state support
34
-
35
- ## Design Features
36
-
37
- ### Color Palette
38
- - Primary: `#667eea` → `#764ba2` (gradient)
39
- - Focus ring: `rgba(102, 126, 234, 0.1)`
40
- - Borders: `#e5e7eb` (default), `#667eea` (focus)
41
- - Text: `#1f2937` (primary), `#9ca3af` (placeholder)
42
-
43
- ### Animations
44
- - Cubic-bezier easing: `cubic-bezier(0.4, 0, 0.2, 1)`
45
- - Transition duration: `0.3s` (standard), `0.2s` (quick)
46
- - Transform effects: lift, scale, pop
47
-
48
- ### Spacing
49
- - Border radius: `10-14px` (depending on component)
50
- - Padding: `12-16px`
51
- - Focus ring: `3px` offset
52
- - Gaps: `8-12px`
53
-
54
- ## Usage Examples
55
-
56
- ### KButton with Icon
57
- ```vue
58
- <KButton type="primary">
59
- <template #icon>
60
- <Icon name="mdi:check" />
61
- </template>
62
- Save Changes
63
- </KButton>
64
- ```
65
-
66
- ### KCheckbox
67
- ```vue
68
- <KCheckbox v-model="accepted">
69
- I accept the terms and conditions
70
- </KCheckbox>
71
- ```
72
-
73
- ### KTextbox with Clear
74
- ```vue
75
- <KTextbox
76
- v-model="searchQuery"
77
- placeholder="Search..."
78
- :showClear="true"
79
- />
80
- ```
81
-
82
- ### KTextarea
83
- ```vue
84
- <KTextarea
85
- v-model="description"
86
- placeholder="Enter description..."
87
- :rows="6"
88
- />
89
- ```
6
+ Modern design preset and CSS custom property overrides for `@katlux/toolkit` components.
90
7
 
91
8
  ## Installation
92
9
 
93
- Katlux is a zero-configuration Nuxt module. When you install this preset, the core `@katlux/toolkit` is automatically provisioned for you.
94
-
95
10
  ### Option 1: Using Nuxt CLI (Recommended)
96
11
  ```bash
97
12
  npx nuxi module add @katlux/preset-modern@alpha
98
13
  ```
99
- This single command installs the package and adds it to your `nuxt.config.ts`.
100
14
 
101
15
  ### Option 2: Manual Installation
102
- 1. Install via NPM:
103
- ```bash
104
- npm install @katlux/preset-modern@alpha
105
- ```
16
+ 1. Install via npm (automatically provisions `@katlux/toolkit` and `@katlux/providers`):
17
+ ```bash
18
+ npm install @katlux/preset-modern@alpha
19
+ ```
106
20
 
107
21
  2. Register the module in `nuxt.config.ts`:
108
- ```ts
109
- export default defineNuxtConfig({
110
- modules: [
111
- '@katlux/preset-modern'
112
- ]
113
- })
114
- ```
115
-
116
- That's all! Start using Katlux components like `<KButton>` in your Vue files immediately. No imports required.
117
-
118
- ## Developer Guide
119
-
120
- For full documentation and repository access:
121
- - **Developer Guide & Repository**: [https://github.com/katlux-ui/KatluxShowcase](https://github.com/katlux-ui/KatluxShowcase) *(We will open source it soon)*
122
-
123
- ## Next Components
124
-
125
- Coming soon:
126
- - KRadiobox
127
- - KCombobox
128
- - KDatatable
129
- - KModal
130
- - KPanel
131
- - And more...
22
+ ```ts
23
+ export default defineNuxtConfig({
24
+ modules: [
25
+ '@katlux/preset-modern'
26
+ ]
27
+ })
28
+ ```
29
+
30
+ 3. Activate the preset in `app.config.ts`:
31
+ ```ts
32
+ export default defineAppConfig({
33
+ katluxToolkit: {
34
+ activePreset: 'modern'
35
+ }
36
+ })
37
+ ```
38
+
39
+ ## Features
40
+
41
+ - **Full Component Coverage**: Provides styled templates and CSS token overrides across Katlux components (`KButton`, `KCheckbox`, `KRadiobox`, `KCombobox`, `KDatatable`, `KDataIterator`, `KDatePicker`, `KDateTimePicker`, `KModal`, `KPanel`, `KTabs`, `KTextbox`, `KTextarea`, `KTree`, `KTreeView`, `KGantt`, and more).
42
+ - **Composable Preset Cascade**: Uses `[data-preset~="modern"]` attribute selectors without `!important`, allowing seamless runtime switching and layering (e.g. `activePreset: ['dark', 'modern']`).
43
+ - **Virtualization Parity**: `KDatatable` and `KDataIterator` share `useVirtualDataset` for consistent sticky headers, row heights, and selection behavior.
44
+
45
+ ## Documentation & Changelog
46
+
47
+ - **Monorepo Repository**: [https://github.com/katlux-ui/KatluxShowcase](https://github.com/katlux-ui/KatluxShowcase)
48
+ - **Changelog & Migration Guide**: [CHANGELOG.md](https://github.com/katlux-ui/KatluxShowcase/blob/dev/CHANGELOG.md)
132
49
 
133
50
  ## License & Trademark Policy
134
51
 
135
- The code in this repository is completely free and open-source under the Apache 2.0 License.
136
- However, **Katlux™** and the Katlux logo are unregistered trademarks of the Katlux project.
52
+ The code in this repository is completely free and open-source under the **Apache 2.0 License** (see [LICENSE](./LICENSE)).
53
+ However, **Katlux™** and the Katlux logo are unregistered trademarks of the Katlux project.
137
54
 
138
55
  To protect our users from fraud, you may not use the "Katlux" name or logo to brand your own modified forks, derivative works, or malicious distributions without explicit permission. You are, however, completely free to state "Built with Katlux" in your projects!
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.119",
4
+ "version": "0.1.1-alpha.121",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -113,6 +113,7 @@
113
113
  --table-row-hover: var(--neutral-100);
114
114
  --table-row-selected: #eff6ff;
115
115
  --table-row-selected-text: var(--primary-900);
116
+ --k-datatable-row-height: 50px;
116
117
  --panel-bg-opacity: 0.5;
117
118
  --panel-blur: 16px;
118
119
  --panel-bg-default: var(--neutral-100);
@@ -131,4 +132,7 @@
131
132
  --layout-sidebar-width: 240px;
132
133
  --layout-sidebar-bg: var(--neutral-50);
133
134
  --layout-content-bg: #ffffff;
135
+ --calendar-range-bg: var(--primary-100);
136
+ --calendar-range-color: var(--primary-700);
137
+ --calendar-range-hover-bg: var(--primary-300);
134
138
  }
@@ -113,6 +113,7 @@
113
113
  --table-row-hover: var(--neutral-100);
114
114
  --table-row-selected: #eff6ff;
115
115
  --table-row-selected-text: var(--primary-900);
116
+ --k-datatable-row-height: 50px;
116
117
  --panel-bg-opacity: 0.5;
117
118
  --panel-blur: 16px;
118
119
  --panel-bg-default: var(--neutral-100);
@@ -131,6 +132,9 @@
131
132
  --layout-sidebar-width: 240px;
132
133
  --layout-sidebar-bg: var(--neutral-50);
133
134
  --layout-content-bg: #ffffff;
135
+ --calendar-range-bg: var(--primary-100);
136
+ --calendar-range-color: var(--primary-700);
137
+ --calendar-range-hover-bg: var(--primary-300);
134
138
  }
135
139
 
136
140
  .k-input-label {
@@ -10,10 +10,12 @@ type __VLS_Props = {
10
10
  indeterminate?: boolean;
11
11
  };
12
12
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
+ blur: (event: FocusEvent) => any;
13
14
  "update:model": (value: any) => any;
14
15
  "update:modelValue": (value: any) => any;
15
16
  "update:indeterminate": (value: boolean) => any;
16
17
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ onBlur?: ((event: FocusEvent) => any) | undefined;
17
19
  "onUpdate:model"?: ((value: any) => any) | undefined;
18
20
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
19
21
  "onUpdate:indeterminate"?: ((value: boolean) => any) | undefined;
@@ -6,8 +6,9 @@
6
6
  :aria-disabled="isDisabled"
7
7
  tabindex="0"
8
8
  @keydown.space.prevent="handleSpace"
9
+ @blur="emit('blur', $event)"
9
10
  )
10
- input(ref="inputRef" type="checkbox" :checked="isChecked" :indeterminate.prop="props.indeterminate" :value="checkboxValue" :disabled="isDisabled" tabindex="-1" @change="handleSpace")
11
+ input(ref="inputRef" type="checkbox" :checked="isChecked" :indeterminate.prop="props.indeterminate" :value="checkboxValue" :disabled="isDisabled" tabindex="-1" @change="handleSpace" @blur="emit('blur', $event)")
11
12
  .checkbox-box(:class="[validation ? `is-${validation}` : '', { 'is-indeterminate': props.indeterminate }]")
12
13
  .checkbox-checkmark
13
14
  KIcon.icon(:iconname="props.indeterminate ? 'minus' : 'check'")
@@ -31,7 +32,7 @@ const props = defineProps({
31
32
  idKey: { type: String, required: false },
32
33
  indeterminate: { type: Boolean, required: false }
33
34
  });
34
- const emit = defineEmits(["update:model", "update:modelValue", "update:indeterminate"]);
35
+ const emit = defineEmits(["update:model", "update:modelValue", "update:indeterminate", "blur"]);
35
36
  const formattedModel = computed({
36
37
  get: () => props.modelValue !== void 0 ? props.modelValue : props.model,
37
38
  set: (value) => {
@@ -10,10 +10,12 @@ type __VLS_Props = {
10
10
  indeterminate?: boolean;
11
11
  };
12
12
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
+ blur: (event: FocusEvent) => any;
13
14
  "update:model": (value: any) => any;
14
15
  "update:modelValue": (value: any) => any;
15
16
  "update:indeterminate": (value: boolean) => any;
16
17
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ onBlur?: ((event: FocusEvent) => any) | undefined;
17
19
  "onUpdate:model"?: ((value: any) => any) | undefined;
18
20
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
19
21
  "onUpdate:indeterminate"?: ((value: boolean) => any) | undefined;
@@ -18,9 +18,10 @@ type __VLS_Props = {
18
18
  emptyStateText?: string;
19
19
  emptyFilterStateText?: string;
20
20
  virtualScroll?: boolean;
21
- itemHeight?: number;
21
+ itemHeight?: number | ((row: any, index: number) => number);
22
22
  viewportHeight?: number;
23
23
  buffer?: number;
24
+ urlPageParam?: string;
24
25
  };
25
26
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
26
27
  "update:selectedRows": (value: any[]) => any;
@@ -37,14 +38,15 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
37
38
  "onUpdate:currentPage"?: ((value: number) => any) | undefined;
38
39
  "onUpdate:pageSize"?: ((value: number) => any) | undefined;
39
40
  }>, {
40
- buffer: number;
41
- bulkActions: Array<IKDatatableAction>;
42
41
  selectedRows: any[];
43
42
  selectAll: boolean;
43
+ unselectedRows: any[];
44
+ selectAllScope: "page" | "dataset";
45
+ buffer: number;
46
+ bulkActions: Array<IKDatatableAction>;
47
+ viewportHeight: number;
44
48
  visibleFields: Array<string> | null;
45
49
  rowActions: Array<IKDatatableAction>;
46
- selectAllScope: "page" | "dataset";
47
- unselectedRows: any[];
48
50
  cellSlots: Record<string, any>;
49
51
  headerSlots: Record<string, any>;
50
52
  columnHeaders: Record<string, string>;
@@ -52,8 +54,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
52
54
  emptyStateText: string;
53
55
  emptyFilterStateText: string;
54
56
  virtualScroll: boolean;
55
- itemHeight: number;
56
- viewportHeight: number;
57
+ itemHeight: number | ((row: any, index: number) => number);
58
+ urlPageParam: string;
57
59
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
58
60
  declare const _default: typeof __VLS_export;
59
61
  export default _default;