@konoma-development/vue-components 0.1.4 → 0.1.6

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.
@@ -6,7 +6,7 @@
6
6
  :indeterminate="indeterminate"
7
7
  type="checkbox"
8
8
  :name="name?.toString()"
9
- class="h-0 w-0 appearance-none"
9
+ class="appearance-none h-0 w-0"
10
10
  :checked="!!value"
11
11
  :disabled="disabled"
12
12
  v-bind="$attrs"
@@ -25,7 +25,7 @@
25
25
  type="checkbox"
26
26
  :name="name?.toString()"
27
27
  :checked="!!value"
28
- class="h-0 w-0 appearance-none"
28
+ class="appearance-none h-0 w-0"
29
29
  :disabled="disabled"
30
30
  @change="$emit('change', ($event.target as HTMLInputElement).checked, $event)"
31
31
  >
@@ -39,7 +39,7 @@
39
39
  type="checkbox"
40
40
  :name="name?.toString()"
41
41
  :value="0"
42
- class="h-0 w-0 appearance-none"
42
+ class="appearance-none h-0 w-0"
43
43
  :checked="!!value"
44
44
  :disabled="disabled"
45
45
  @change="$emit('change', ($event.target as HTMLInputElement).checked, $event)"
@@ -4,8 +4,7 @@
4
4
  </form>
5
5
  </template>
6
6
 
7
- <script lang="ts" setup generic="DataType"
8
- >
7
+ <script lang="ts" setup generic="DataType">
9
8
  import { formInjectionKeys } from './injectionKeys';
10
9
 
11
10
  const props = defineProps<{
@@ -17,7 +17,7 @@
17
17
  :step="step"
18
18
  :name="name?.toString()"
19
19
  v-bind="$attrs"
20
- @input="(e) => $emit('input', (e.target as HTMLInputElement).value, e)"
20
+ @input="(e) => $emit('change', (e.target as HTMLInputElement).value, e)"
21
21
  @click="$emit('click', $event)"
22
22
  @blur="$emit('blur', $event)"
23
23
  @keydown="$emit('keyDown', $event)"
@@ -13,14 +13,14 @@
13
13
  // }
14
14
  // return classesFull.join(' ');
15
15
  // },
16
- valueContainer: noValue && valueContainerClasses ? ['hidden', valueContainerClasses].join(' ') : noValue ? 'hidden' : valueContainerClasses || '',
16
+ valueContainer: noValue && valueContainerClasses?.toString() ? ['hidden', valueContainerClasses.toString()].join(' ') : noValue ? 'hidden' : valueContainerClasses?.toString() || '',
17
17
  // input: () => controlClasses || '',
18
18
  // indicatorSeparator: () => 'hidden',
19
- menuOption: optionClasses || '',
20
- singleValue: valueClasses || '',
21
- placeholder: placeholderClasses || '',
22
- inputContainer: controlClasses || '',
23
- searchInput: controlClasses || '',
19
+ menuOption: optionClasses?.toString() || '',
20
+ singleValue: valueClasses?.toString() || '',
21
+ placeholder: placeholderClasses?.toString() || '',
22
+ inputContainer: controlClasses?.toString() || '',
23
+ searchInput: controlClasses?.toString() || '',
24
24
  }"
25
25
  :placeholder="placeholder || 'Bitte auswählen'"
26
26
  :is-searchable="searchable"
@@ -3,9 +3,9 @@
3
3
  <div :style="`gridTemplateRows: repeat(${data.length + 1}, auto)`" :class="[tableClasses, 'grid auto-rows-auto grid-flow-row'].join(' ')" @scroll="emit('onScroll', $event as UIEvent)">
4
4
  <!-- Header -->
5
5
  <div
6
- :key="locale" class="sticky top-0 z-1 flex flex-row items-center justify-between rounded-t-kvc-table bg-kvc-table-header"
6
+ :key="locale" class="bg-kvc-table-header rounded-t-kvc-table flex flex-row items-center top-0 justify-between sticky z-1"
7
7
  >
8
- <div v-if="currentColumnsLeft.length" class="sticky left-0 z-1 flex flex-row">
8
+ <div v-if="currentColumnsLeft.length" class="flex flex-row left-0 sticky z-1">
9
9
  <div
10
10
  v-for="column in currentColumnsLeft"
11
11
  :key="column.id"
@@ -24,7 +24,7 @@
24
24
  }
25
25
  }"
26
26
  >
27
- <div class="w-full flex flex-row items-center justify-between gap-2">
27
+ <div class="flex flex-row gap-2 w-full items-center justify-between">
28
28
  <span>{{ column.title }}</span>
29
29
  <div v-if="column.sortKey">
30
30
  <KonomaIcon
@@ -38,7 +38,7 @@
38
38
  />
39
39
  </div>
40
40
  </div>
41
- <div v-if="hasFilters" :key="Object.keys(filters).join('-')" class="min-h-10 w-full bg-kvc-table-header text-xs text-secondary-500 font-medium" @click.stop>
41
+ <div v-if="hasFilters" :key="Object.keys(filters).join('-')" class="bg-kvc-table-header text-xs text-secondary-500 font-medium min-h-10 w-full" @click.stop>
42
42
  <template v-if="column.filterable && column.filterKey">
43
43
  <component :is="column.filterComponent?.(filters, updateFilters) || filterComponents?.[column.id]?.(filters, updateFilters)" v-if="column.filterComponent?.(filters, updateFilters) || filterComponents?.[column.id]?.(filters, updateFilters)" />
44
44
  <KonomaInput
@@ -94,7 +94,7 @@
94
94
  }
95
95
  }"
96
96
  >
97
- <div class="w-full flex flex-row items-center justify-between gap-2">
97
+ <div class="flex flex-row gap-2 w-full items-center justify-between">
98
98
  <span>{{ column.title }}</span>
99
99
  <div v-if="column.sortKey">
100
100
  <KonomaIcon
@@ -108,7 +108,7 @@
108
108
  />
109
109
  </div>
110
110
  </div>
111
- <div v-if="hasFilters" :key="Object.keys(filters).join('-')" class="min-h-10 w-full bg-kvc-table-header text-xs text-secondary-500 font-medium" @click.stop>
111
+ <div v-if="hasFilters" :key="Object.keys(filters).join('-')" class="bg-kvc-table-header text-xs text-secondary-500 font-medium min-h-10 w-full" @click.stop>
112
112
  <template v-if="column.filterable && column.filterKey">
113
113
  <component :is="column.filterComponent?.(filters, updateFilters) || filterComponents?.[column.id]?.(filters, updateFilters)" v-if="column.filterComponent?.(filters, updateFilters) || filterComponents?.[column.id]?.(filters, updateFilters)" />
114
114
  <KonomaInput
@@ -146,10 +146,10 @@
146
146
  </template>
147
147
  </div>
148
148
  </div>
149
- <div v-if="currentColumnsRight.length" class="sticky right-0 h-full flex flex-row items-center">
149
+ <div v-if="currentColumnsRight.length" class="flex flex-row h-full items-center right-0 sticky">
150
150
  <div
151
151
  v-for="column in currentColumnsRight"
152
- :key="column.id" :style="`minWidth: ${column.initialWidth}; maxWidth: ${!column.grow ? column.initialWidth : undefined};`" class="h-full flex flex-row items-start justify-end truncate bg-kvc-table-header px-4 py-3 text-xs font-medium last:rounded-tr-kvc-table"
152
+ :key="column.id" :style="`minWidth: ${column.initialWidth}; maxWidth: ${!column.grow ? column.initialWidth : undefined};`" class="bg-kvc-table-header text-xs font-medium px-4 py-3 flex flex-row h-full truncate items-start justify-end last:rounded-tr-kvc-table"
153
153
  >
154
154
  {{ column.title }}
155
155
  </div>
@@ -160,7 +160,7 @@
160
160
  <div v-if="allowReorder" />
161
161
  <template v-else>
162
162
  <div v-for="entry, i in data" :key="i" :class="rowClasses" @click="emit('onRowClick', entry)" @dblclick="emit('onRowDoubleClick', entry)">
163
- <div v-if="currentColumnsLeft.length" class="sticky left-0 flex flex-row border-r">
163
+ <div v-if="currentColumnsLeft.length" class="border-r flex flex-row left-0 sticky">
164
164
  <div
165
165
  v-for="column in currentColumnsRight"
166
166
  :key="column.id"
@@ -172,7 +172,7 @@
172
172
  :is="cellRenderer?.[column.id]?.(entry)"
173
173
  v-if="cellRenderer?.[column.id]?.(entry)"
174
174
  />
175
- <div v-else class="h-14 truncate p-4 text-sm">
175
+ <div v-else class="text-sm p-4 h-14 truncate">
176
176
  {{ (entry[column.id] as string) || '-' }}
177
177
  </div>
178
178
  </div>
@@ -188,11 +188,11 @@
188
188
  :is="cellRenderer?.[column.id]?.(entry)"
189
189
  v-if="cellRenderer?.[column.id]?.(entry)"
190
190
  />
191
- <div v-else class="h-14 truncate p-4 text-sm">
191
+ <div v-else class="text-sm p-4 h-14 truncate">
192
192
  {{ (entry[column.id] as string) || '-' }}
193
193
  </div>
194
194
  </div>
195
- <div v-if="currentColumnsRight.length" class="sticky right-0 flex flex-row border-l">
195
+ <div v-if="currentColumnsRight.length" class="border-l flex flex-row right-0 sticky">
196
196
  <div
197
197
  v-for="column in currentColumnsRight"
198
198
  :key="column.id"
@@ -204,7 +204,7 @@
204
204
  :is="cellRenderer?.[column.id]?.(entry)"
205
205
  v-if="cellRenderer?.[column.id]?.(entry)"
206
206
  />
207
- <div v-else class="h-14 truncate p-4 text-sm">
207
+ <div v-else class="text-sm p-4 h-14 truncate">
208
208
  {{ (entry[column.id] as string) || '-' }}
209
209
  </div>
210
210
  </div>
@@ -266,7 +266,7 @@ const props = withDefaults(defineProps<{
266
266
  filterComponents?: {
267
267
  [key in keyof DataType]?: (
268
268
  filters: Record<string, string[]>,
269
- setFilters: (filters: Record<string, string[]>) => Promise<void>
269
+ setFilters: (filters: Record<string, string[]>) => Promise<void>,
270
270
  ) => string;
271
271
  }
272
272
  filters?: Record<string, string[]>
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "type": "module",
7
- "version": "0.1.4",
7
+ "version": "0.1.6",
8
8
  "packageManager": "yarn@4.12.0",
9
9
  "main": "./nuxt.config.ts",
10
10
  "scripts": {
@@ -21,36 +21,35 @@
21
21
  "vue3-select-component": "^0.16.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@antfu/eslint-config": "7.6.1",
24
+ "@antfu/eslint-config": "7.7.2",
25
25
  "@babel/eslint-parser": "7.28.6",
26
26
  "@babel/plugin-transform-typescript": "7.28.6",
27
27
  "@babel/preset-typescript": "7.28.5",
28
28
  "@iconify-json/carbon": "1.2.19",
29
- "@nuxt/devtools": "3.2.2",
29
+ "@nuxt/devtools": "3.2.3",
30
30
  "@nuxt/eslint": "1.15.2",
31
31
  "@nuxt/eslint-config": "1.15.2",
32
32
  "@nuxt/icon": "2.2.1",
33
- "@nuxt/schema": "4.3.1",
33
+ "@nuxt/schema": "4.4.2",
34
34
  "@nuxt/test-utils": "4.0.0",
35
- "@nuxtjs/eslint-config-typescript": "12.1.0",
36
35
  "@pinia/nuxt": "0.11.3",
37
- "@sentry/nuxt": "10.40.0",
38
- "@types/node": "22.19.13",
39
- "@typescript-eslint/eslint-plugin": "8.56.1",
40
- "@typescript-eslint/parser": "8.56.1",
41
- "@unocss/eslint-config": "66.6.3",
42
- "@unocss/nuxt": "66.6.2",
43
- "@unocss/reset": "66.6.3",
36
+ "@sentry/nuxt": "10.43.0",
37
+ "@types/node": "22.19.15",
38
+ "@typescript-eslint/eslint-plugin": "8.57.0",
39
+ "@typescript-eslint/parser": "8.57.0",
40
+ "@unocss/eslint-config": "66.6.6",
41
+ "@unocss/nuxt": "66.6.6",
42
+ "@unocss/reset": "66.6.6",
44
43
  "@vitejs/plugin-vue": "6.0.4",
45
44
  "@vueuse/nuxt": "14.2.1",
46
45
  "babel-preset-vue": "2.0.2",
47
46
  "changelogen": "0.6.2",
48
- "eslint": "10.0.2",
47
+ "eslint": "10.0.3",
49
48
  "eslint-plugin-nuxt": "4.0.0",
50
49
  "eslint-plugin-unocss": "0.0.1-alpha.3",
51
50
  "eslint-plugin-vue": "10.8.0",
52
51
  "floating-vue": "5.2.2",
53
- "nuxt": "4.3.1",
52
+ "nuxt": "4.4.2",
54
53
  "nuxt-headlessui": "1.2.2",
55
54
  "pinia": "3.0.4",
56
55
  "tslib": "2.8.1",
package/types/form.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { ClassValue } from 'vue';
2
+
1
3
  type LabelPosition = 'top' | 'bottom' | 'left' | 'right';
2
4
 
3
5
  export interface FormDataType {
@@ -13,64 +15,64 @@ export interface Option {
13
15
 
14
16
  /** Classes for the form components. Not all classes have effects in all components. Properties that start with 'class-' apply to the component in general, other properties apply to specific parts of the component */
15
17
  export interface Classes {
16
- class?: string
18
+ class?: ClassValue
17
19
  /** Base classes, usually assigned to the control */
18
- classes?: string
20
+ classes?: ClassValue
19
21
  /** Base classes, assigned directly to the control. Might be needed in case of more complex nesting */
20
- controlClasses?: string
22
+ controlClasses?: ClassValue
21
23
  /** Used for components that have specific styling when in neutral state */
22
- classesNeutral?: string
24
+ classesNeutral?: ClassValue
23
25
  /** Used for components that have specific styling when empty */
24
- classesEmpty?: string
25
- classesDisabled?: string
26
+ classesEmpty?: ClassValue
27
+ classesDisabled?: ClassValue
26
28
  /** Used for components that have specific styling when in error */
27
- classesError?: string
29
+ classesError?: ClassValue
28
30
  /** Used for components that have specific styling when filled */
29
- classesFilled?: string
31
+ classesFilled?: ClassValue
30
32
  /** Used for the label in components that have specific styling when empty */
31
- labelClassesEmpty?: string
33
+ labelClassesEmpty?: ClassValue
32
34
  /** Used for the label in components that have specific styling when in error */
33
- labelClassesError?: string
35
+ labelClassesError?: ClassValue
34
36
  /** Used for the label in components that have specific styling when filled */
35
- labelClassesFilled?: string
37
+ labelClassesFilled?: ClassValue
36
38
  /** General classes for the label */
37
- labelClasses?: string
39
+ labelClasses?: ClassValue
38
40
  /** Needed in case of nested label */
39
- labelWrapperClasses?: string
41
+ labelWrapperClasses?: ClassValue
40
42
  /** Used for the icon in components that have specific styling when filled */
41
- iconClassesFilled?: string
43
+ iconClassesFilled?: ClassValue
42
44
  /** General classes for the wrapper */
43
- wrapperClasses?: string
45
+ wrapperClasses?: ClassValue
44
46
  /** General classes for the icon on the left */
45
- iconLeftClasses?: string
47
+ iconLeftClasses?: ClassValue
46
48
  /** General classes for the icon on the right */
47
- iconRightClasses?: string
49
+ iconRightClasses?: ClassValue
48
50
  /** General classes for the error message */
49
- errorClasses?: string
51
+ errorClasses?: ClassValue
50
52
  /** Additional classes for the control when an icon is present on the left */
51
- additionalClassesIconLeft?: string
53
+ additionalClassesIconLeft?: ClassValue
52
54
  /** Additional classes for the control when an icon is present on the right */
53
- additionalClassesIconRight?: string
55
+ additionalClassesIconRight?: ClassValue
54
56
  /** General classes for hints placed within the component */
55
- hintClasses?: string
57
+ hintClasses?: ClassValue
56
58
  /** General classes for the resize element */
57
- resizeClasses?: string
59
+ resizeClasses?: ClassValue
58
60
  /** General classes for the icon within the resize element */
59
- resizeIconClasses?: string
61
+ resizeIconClasses?: ClassValue
60
62
  /** Classes to be applied to all values for components with multiple possible values */
61
- optionClasses?: string
63
+ optionClasses?: ClassValue
62
64
  /** Classes to be applied to the wrapper for elements on the left side */
63
- wrapperLeftClasses?: string
65
+ wrapperLeftClasses?: ClassValue
64
66
  /** Classes to be applied to the wrapper for elements on the right side */
65
- wrapperRightClasses?: string
67
+ wrapperRightClasses?: ClassValue
66
68
  // Properties for classes specific to the select component since it is effectively an Omnibox that is more complex than the other form components
67
- focusClasses?: string
68
- optionFocusedClasses?: string
69
- optionSelectedClasses?: string
70
- valueClasses?: string
71
- placeholderClasses?: string
72
- indicatorClasses?: string
73
- valueContainerClasses?: string
69
+ focusClasses?: ClassValue
70
+ optionFocusedClasses?: ClassValue
71
+ optionSelectedClasses?: ClassValue
72
+ valueClasses?: ClassValue
73
+ placeholderClasses?: ClassValue
74
+ indicatorClasses?: ClassValue
75
+ valueContainerClasses?: ClassValue
74
76
  }
75
77
 
76
78
  export interface FormFieldEmits {