@teammodlr/ui-kit 2.0.4 → 2.0.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.
- package/lib/components/dropdown/Dropdown.vue.d.ts +1 -1
- package/lib/components/messageprovider/Message.vue.d.ts +1 -1
- package/lib/components/messageprovider/MessageProvider.vue.d.ts +1 -1
- package/lib/components/select/Select.vue.d.ts +1 -1
- package/lib/index.cjs.js +4 -4
- package/lib/index.es.js +638 -632
- package/package.json +1 -1
- package/src/components/colorpicker/ColorPicker.vue +4 -3
- package/src/components/form/examples/basic.vue +1 -1
- package/src/components/radio/Radio.vue +1 -1
- package/src/components/radiobutton/RadioButton.vue +2 -2
- package/src/components/table/Table.vue +4 -0
- package/src/components/table/examples/basic.vue +4 -0
- package/src/components/table/examples/empty.vue +44 -0
- package/src/components/table/examples/index.stories.ts +2 -1
- package/src/components/table/examples/index.ts +1 -0
- package/src/composables/useInput.ts +2 -2
- package/src/examples/cards/cards.stories.ts +2 -2
package/package.json
CHANGED
|
@@ -96,16 +96,17 @@
|
|
|
96
96
|
</template>
|
|
97
97
|
|
|
98
98
|
<script lang="ts">
|
|
99
|
-
import {onClickOutside, useMouseInElement, useMousePressed} from '@vueuse/core';
|
|
99
|
+
import {onClickOutside, useEyeDropper, useMouseInElement, useMousePressed} from '@vueuse/core';
|
|
100
100
|
import {computed, defineComponent, onMounted, type PropType, reactive, ref, toRef, watch} from "vue";
|
|
101
101
|
import * as style from './style';
|
|
102
102
|
import {hexToRGB, type HSV, HSVToRGBA, HueToRGBA, RGBAToHex, RGBToHSV} from './utils';
|
|
103
103
|
import {usePopper} from "../../composables/usePopper";
|
|
104
104
|
import type {Placement} from "@popperjs/core";
|
|
105
105
|
import {useZIndex} from "../../composables/useZIndex";
|
|
106
|
-
import {MButton, MInput} from "../../components";
|
|
107
106
|
import MSlider from "../../components/slider/Slider.vue";
|
|
108
|
-
import
|
|
107
|
+
import MButton from "../../components/button/Button.vue";
|
|
108
|
+
import MInput from "../../components/input/Input.vue";
|
|
109
|
+
|
|
109
110
|
export default defineComponent({
|
|
110
111
|
name: "MColorPicker",
|
|
111
112
|
props: {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script lang="ts">
|
|
30
|
-
import {defineComponent, toRef, ref, type PropType, watch, computed} from 'vue';
|
|
30
|
+
import {defineComponent, toRef, ref, type PropType, watch, computed, defineExpose } from 'vue';
|
|
31
31
|
import {useInput} from '../../composables/useInput';
|
|
32
32
|
import {useInteractive} from "../../composables/useInteractive";
|
|
33
33
|
import type {Size} from '../../types/props';
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
<script lang="ts">
|
|
11
11
|
import type {PropType} from "vue";
|
|
12
|
-
import {computed, defineComponent, inject, ref} from "vue";
|
|
12
|
+
import {computed, defineComponent, inject, ref,defineExpose } from "vue";
|
|
13
13
|
import type {Size} from "../../types/props";
|
|
14
14
|
import * as style from "./style";
|
|
15
15
|
import {useInteractive} from "../../composables/useInteractive";
|
|
@@ -128,4 +128,4 @@ export default defineComponent({
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
})
|
|
131
|
-
</script>
|
|
131
|
+
</script>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
<TableBody>
|
|
19
19
|
<TableRow
|
|
20
20
|
v-for="(item, index) in items"
|
|
21
|
+
v-if="items.length > 0"
|
|
21
22
|
:key="index"
|
|
22
23
|
>
|
|
23
24
|
<TableCell
|
|
@@ -31,6 +32,9 @@
|
|
|
31
32
|
</slot>
|
|
32
33
|
</TableCell>
|
|
33
34
|
</TableRow>
|
|
35
|
+
<tr :colspan="headers.length" v-if="items.length === 0">
|
|
36
|
+
<slot name="empty" />
|
|
37
|
+
</tr>
|
|
34
38
|
</TableBody>
|
|
35
39
|
</table>
|
|
36
40
|
</div>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<MTable
|
|
3
|
+
:headers="headers"
|
|
4
|
+
:items="items"
|
|
5
|
+
>
|
|
6
|
+
<template #actions="{ item }">
|
|
7
|
+
<MButton
|
|
8
|
+
color="blue"
|
|
9
|
+
secondary
|
|
10
|
+
size="sm"
|
|
11
|
+
>
|
|
12
|
+
Edit - {{ item.name }}
|
|
13
|
+
</MButton>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<template #empty>
|
|
17
|
+
Nothing here
|
|
18
|
+
</template>
|
|
19
|
+
</MTable>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
import { ref } from "vue";
|
|
24
|
+
import type { TableHeadItem } from "../types";
|
|
25
|
+
|
|
26
|
+
let headers = ref<TableHeadItem[]>([
|
|
27
|
+
{
|
|
28
|
+
name: "Name",
|
|
29
|
+
key: "name",
|
|
30
|
+
width: 200
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "Age",
|
|
34
|
+
key: "age",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "Actions",
|
|
38
|
+
key: "actions",
|
|
39
|
+
align: "right"
|
|
40
|
+
}
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
let items = ref([]);
|
|
44
|
+
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import MTable from "../Table.vue";
|
|
2
2
|
import MButton from "../../button/Button.vue";
|
|
3
3
|
import {
|
|
4
|
-
MTableBasic
|
|
4
|
+
MTableBasic, MTableEmpty
|
|
5
5
|
} from "./index";
|
|
6
6
|
|
|
7
7
|
import {
|
|
@@ -17,3 +17,4 @@ export default {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export const Basic = createStory(MTableBasic);
|
|
20
|
+
export const Empty = createStory(MTableEmpty);
|
|
@@ -104,9 +104,9 @@ export const useInput = (props: any, { focus, emit, withListeners = true }: {
|
|
|
104
104
|
validate,
|
|
105
105
|
setError,
|
|
106
106
|
//@ts-ignore
|
|
107
|
-
formDisabled: form
|
|
107
|
+
formDisabled: form?.disabled.value || false,
|
|
108
108
|
//@ts-ignore
|
|
109
|
-
formLoading: form
|
|
109
|
+
formLoading: form?.loading.value || false,
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
112
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Sidebar from "./sidebar.vue";
|
|
2
|
-
import {createStory} from "
|
|
2
|
+
import {createStory} from "../../__storybook__";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
component: Sidebar,
|
|
6
6
|
title: 'Examples/Cards/Sidebar'
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export const Basic = createStory(Sidebar);
|
|
9
|
+
export const Basic = createStory(Sidebar);
|