@katlux/toolkit 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/toolkit",
3
3
  "configKey": "katluxToolkit",
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"
@@ -22,7 +22,7 @@ export interface KButtonEmits {
22
22
  export declare function useKButtonLogic(props: KButtonProps, emit: KButtonEmits): {
23
23
  isLink: import("vue").ComputedRef<boolean>;
24
24
  isDisabled: import("vue").ComputedRef<boolean | undefined>;
25
- buttonClasses: import("vue").ComputedRef<("info" | "default" | "small" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "large" | "medium" | {
25
+ buttonClasses: import("vue").ComputedRef<("info" | "default" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "small" | "large" | "medium" | {
26
26
  disabled: boolean | undefined;
27
27
  })[]>;
28
28
  onClick: () => void;
@@ -0,0 +1,20 @@
1
+ import { ADataProvider } from '@katlux/providers';
2
+ export interface KDataIteratorProps {
3
+ dataProvider: ADataProvider;
4
+ visibleFields?: Array<string> | null;
5
+ loading?: boolean;
6
+ search?: string;
7
+ itemsPerPage?: number;
8
+ page?: number;
9
+ }
10
+ export declare const KDataIteratorDefaultProps: {
11
+ visibleFields: null;
12
+ loading: boolean;
13
+ search: string;
14
+ itemsPerPage: number;
15
+ page: number;
16
+ };
17
+ export declare function useKDataIteratorLogic(props: KDataIteratorProps): {
18
+ selectedRows: import("vue").Ref<any[], any[]>;
19
+ selectAll: import("vue").Ref<boolean, boolean>;
20
+ };
@@ -0,0 +1,12 @@
1
+ import { ADataProvider } from '@katlux/providers';
2
+ export interface KDatatableProps {
3
+ dataProvider: ADataProvider;
4
+ visibleFields?: Array<string> | null;
5
+ }
6
+ export declare const KDatatableDefaultProps: {
7
+ visibleFields: null;
8
+ };
9
+ export declare function useKDatatableLogic(props: KDatatableProps): {
10
+ selectedRows: import("vue").Ref<any[], any[]>;
11
+ selectAll: import("vue").Ref<boolean, boolean>;
12
+ };
@@ -156,6 +156,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
156
156
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
157
157
  "onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
158
158
  }>, {
159
+ parentKey: string;
160
+ idKey: string;
159
161
  disabled: boolean;
160
162
  loading: boolean;
161
163
  validation: "error" | "success" | "warning" | null | undefined;
@@ -170,8 +172,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
170
172
  multiSelect: boolean;
171
173
  valueField: string;
172
174
  iconField: string;
173
- idKey: string;
174
- parentKey: string;
175
175
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
176
176
  declare const _default: typeof __VLS_export;
177
177
  export default _default;
@@ -156,6 +156,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
156
156
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
157
157
  "onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
158
158
  }>, {
159
+ parentKey: string;
160
+ idKey: string;
159
161
  disabled: boolean;
160
162
  loading: boolean;
161
163
  validation: "error" | "success" | "warning" | null | undefined;
@@ -170,8 +172,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
170
172
  multiSelect: boolean;
171
173
  valueField: string;
172
174
  iconField: string;
173
- idKey: string;
174
- parentKey: string;
175
175
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
176
176
  declare const _default: typeof __VLS_export;
177
177
  export default _default;
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
81
81
  default: () => {};
82
82
  };
83
83
  }>> & Readonly<{}>, {
84
+ parentKey: string;
85
+ idKey: string;
86
+ expandedByDefault: boolean;
84
87
  bulkActions: import("@katlux/providers").IKDatatableAction[];
85
88
  rowActions: import("./KTreeView.logic.js").IRowAction[];
86
89
  cellSlots: Record<string, any>;
87
90
  headerSlots: Record<string, any>;
88
91
  treeColumnIndex: number;
89
- idKey: string;
90
- parentKey: string;
91
- expandedByDefault: boolean;
92
92
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
93
93
  declare const _default: typeof __VLS_export;
94
94
  export default _default;
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
81
81
  default: () => {};
82
82
  };
83
83
  }>> & Readonly<{}>, {
84
+ parentKey: string;
85
+ idKey: string;
86
+ expandedByDefault: boolean;
84
87
  bulkActions: import("@katlux/providers").IKDatatableAction[];
85
88
  rowActions: import("./KTreeView.logic.js").IRowAction[];
86
89
  cellSlots: Record<string, any>;
87
90
  headerSlots: Record<string, any>;
88
91
  treeColumnIndex: number;
89
- idKey: string;
90
- parentKey: string;
91
- expandedByDefault: boolean;
92
92
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
93
93
  declare const _default: typeof __VLS_export;
94
94
  export default _default;
@@ -1,19 +1,31 @@
1
1
  <template lang="pug">
2
- .KTextarea-wrapper
3
- textarea.KTextarea(v-model="text" :placeholder="placeholder" :rows="rows" :class="validation ? `is-${validation}` : ''")
2
+ .KTextarea-wrapper(:class="$attrs.class" :style="$attrs.style")
3
+ textarea.KTextarea(v-bind="textareaAttrs" v-model="text" :placeholder="placeholder" :rows="rows" :class="validation ? `is-${validation}` : ''")
4
4
  span.validation-text(v-if="validation && ['success', 'warning', 'error'].includes(validation) && validationText" :class="`is-${validation}`") {{ validationText }}
5
5
  </template>
6
6
 
7
7
  <script lang="ts" setup>
8
+ import { useAttrs, computed } from 'vue'
9
+
10
+ defineOptions({
11
+ inheritAttrs: false
12
+ })
13
+
8
14
  // Default template for KTextarea
9
15
  const text = defineModel<string>('text')
10
16
 
11
- defineProps<{
17
+ const props = defineProps<{
12
18
  placeholder: string
13
19
  rows: number
14
20
  validation?: 'success' | 'warning' | 'error' | null
15
21
  validationText?: string
16
22
  }>()
23
+
24
+ const attrs = useAttrs()
25
+ const textareaAttrs = computed(() => {
26
+ const { class: _, style: __, ...rest } = attrs
27
+ return rest
28
+ })
17
29
  </script>
18
30
 
19
31
  <style lang="scss" scoped>
@@ -1,13 +1,18 @@
1
1
  <template lang="pug">
2
- .KTextbox-wrapper
2
+ .KTextbox-wrapper(:class="$attrs.class" :style="$attrs.style")
3
3
  KGrid(align="center" noGap wrap="nowrap" :class="validation ? `is-${validation}` : ''").KTextbox
4
- input(:type="props.type" v-model="text" :placeholder="placeholder")
4
+ input(v-bind="inputAttrs" :type="props.type" v-model="text" :placeholder="placeholder")
5
5
  KIcon(v-if="showClear" @click.stop="clear" @mousedown.stop iconname="close" width="10" height="10").closeIcon
6
6
  span.validation-text(v-if="validation && ['success', 'warning', 'error'].includes(validation) && validationText" :class="`is-${validation}`") {{ validationText }}
7
7
  </template>
8
8
 
9
9
  <script lang="ts" setup>
10
- import { computed } from 'vue'
10
+ import { computed, useAttrs } from 'vue'
11
+
12
+ defineOptions({
13
+ inheritAttrs: false
14
+ })
15
+
11
16
  // Default template for KTextbox
12
17
  const props = defineProps<{
13
18
  text: string
@@ -27,6 +32,12 @@ const text = computed({
27
32
  get: () => props.text,
28
33
  set: (value) => emit('update:text', value)
29
34
  })
35
+
36
+ const attrs = useAttrs()
37
+ const inputAttrs = computed(() => {
38
+ const { class: _, style: __, ...rest } = attrs
39
+ return rest
40
+ })
30
41
  </script>
31
42
 
32
43
  <style lang="scss" scoped>
@@ -45,6 +56,18 @@ const text = computed({
45
56
  padding: var(--component-gap);
46
57
  border: none;
47
58
  outline: none;
59
+
60
+ /* Hide arrows in Chrome, Safari, Edge, Opera */
61
+ &::-webkit-outer-spin-button,
62
+ &::-webkit-inner-spin-button {
63
+ -webkit-appearance: none;
64
+ margin: 0;
65
+ }
66
+
67
+ /* Hide arrows in Firefox */
68
+ &[type=number] {
69
+ -moz-appearance: textfield;
70
+ }
48
71
  }
49
72
 
50
73
  .closeIcon {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
- "version": "0.1.0-beta.59",
3
+ "version": "0.1.0-beta.60",
4
4
  "description": "Core UI toolkit and utilities for the Katlux ecosystem",
5
5
  "author": "Katlux",
6
6
  "license": "MIT",