@winchsa/ui 0.1.28 → 0.1.29

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.
@@ -15,12 +15,12 @@ type __VLS_Slots = {} & {
15
15
  default?: (props: typeof __VLS_76) => any;
16
16
  };
17
17
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
18
- refresh: (hideOverlay: () => void) => any;
19
18
  collapsed: (isContentCollapsed: boolean) => any;
19
+ refresh: (hideOverlay: () => void) => any;
20
20
  trash: () => any;
21
21
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
- onRefresh?: ((hideOverlay: () => void) => any) | undefined;
23
22
  onCollapsed?: ((isContentCollapsed: boolean) => any) | undefined;
23
+ onRefresh?: ((hideOverlay: () => void) => any) | undefined;
24
24
  onTrash?: (() => any) | undefined;
25
25
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
26
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -15,12 +15,12 @@ type __VLS_Slots = {} & {
15
15
  default?: (props: typeof __VLS_76) => any;
16
16
  };
17
17
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
18
- refresh: (hideOverlay: () => void) => any;
19
18
  collapsed: (isContentCollapsed: boolean) => any;
19
+ refresh: (hideOverlay: () => void) => any;
20
20
  trash: () => any;
21
21
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
- onRefresh?: ((hideOverlay: () => void) => any) | undefined;
23
22
  onCollapsed?: ((isContentCollapsed: boolean) => any) | undefined;
23
+ onRefresh?: ((hideOverlay: () => void) => any) | undefined;
24
24
  onTrash?: (() => any) | undefined;
25
25
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
26
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -7,6 +7,7 @@ type __VLS_Props = {
7
7
  id?: string | number;
8
8
  title?: string;
9
9
  modelValue: ChechboxModel[];
10
+ vertical?: boolean;
10
11
  };
11
12
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
13
  "update:modelValue": (value: ChechboxModel[]) => any;
@@ -5,7 +5,8 @@ import AppCard from "./AppCard.vue";
5
5
  const props = defineProps({
6
6
  id: { type: [String, Number], required: false, default: "" },
7
7
  title: { type: String, required: false, default: "" },
8
- modelValue: { type: Array, required: true, default: () => [] }
8
+ modelValue: { type: Array, required: true, default: () => [] },
9
+ vertical: { type: Boolean, required: false, default: false }
9
10
  });
10
11
  const data = reactive({
11
12
  selectedAll: false,
@@ -44,7 +45,12 @@ function getItemOnChange() {
44
45
  <template>
45
46
  <AppCard class="h-100">
46
47
  <!-- title card -->
47
- <VCardItem class="text-center">
48
+ <VCardItem
49
+ class="text-center"
50
+ :class="{
51
+ 'mb-0 pb-0': vertical
52
+ }"
53
+ >
48
54
  <div class="d-flex justify-space-between w-100">
49
55
  <h3 class="fw-bold">
50
56
  {{ title }}
@@ -60,17 +66,43 @@ function getItemOnChange() {
60
66
  <VDivider />
61
67
  </VCardItem>
62
68
 
63
- <VCardItem class="pt-0">
64
- <div
65
- v-for="(item, key) in data.model"
66
- :key="key"
67
- class="d-flex justify-space-between mb-2"
68
- >
69
- <span>{{ item.label }}</span>
69
+ <VCardItem
70
+ :class="{
71
+ 'pt-2': vertical,
72
+ 'pt-0 pa-0': !vertical
73
+ }"
74
+ >
75
+ <template v-if="vertical">
76
+ <VRow>
77
+ <VCol
78
+ v-for="(item, key) in data.model"
79
+ :key="key"
80
+ cols="3"
81
+ class="py-0"
82
+ >
83
+ <div class="d-flex justify-space-between align-center border pa-3 my-3 rounded">
84
+ <span>{{ item.label }}</span>
70
85
 
71
- <!-- item checkbox -->
72
- <VCheckbox v-model="item.selected" />
73
- </div>
86
+ <!-- item checkbox -->
87
+ <VCheckbox v-model="item.selected" />
88
+ </div>
89
+ </VCol>
90
+ </VRow>
91
+ </template>
92
+
93
+ <template v-else>
94
+ <VCardItem class="pt-0">
95
+ <div
96
+ v-for="(item, key) in data.model"
97
+ :key="key"
98
+ class="d-flex justify-space-between mb-2"
99
+ >
100
+ <span>{{ item.label }}</span>
101
+ <!-- item checkbox -->
102
+ <VCheckbox v-model="item.selected" />
103
+ </div>
104
+ </vcarditem>
105
+ </template>
74
106
  </VCardItem>
75
107
  </AppCard>
76
108
  </template>
@@ -7,6 +7,7 @@ type __VLS_Props = {
7
7
  id?: string | number;
8
8
  title?: string;
9
9
  modelValue: ChechboxModel[];
10
+ vertical?: boolean;
10
11
  };
11
12
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
13
  "update:modelValue": (value: ChechboxModel[]) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winchsa/ui",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "publishConfig": {