@teammodlr/ui-kit 2.1.49 → 2.1.51
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/avatar/Avatar.vue.d.ts +1 -1
- package/lib/components/badge/style/Badge.css.d.ts +2 -2
- package/lib/components/button/Button.vue.d.ts +4 -4
- package/lib/components/button/style/Button.css.d.ts +3 -3
- package/lib/components/checkbox/Checkbox.vue.d.ts +4 -4
- package/lib/components/configprovider/ConfigProvider.vue.d.ts +12 -11
- package/lib/components/confirm/ConfirmProvider.vue.d.ts +10 -10
- package/lib/components/dropdown/DropdownItem.vue.d.ts +2 -2
- package/lib/components/dropdown/style/Dropdown.css.d.ts +1 -1
- package/lib/components/input/Input.vue.d.ts +6 -6
- package/lib/components/link/Link.vue.d.ts +2 -2
- package/lib/components/messageprovider/Message.vue.d.ts +2 -2
- package/lib/components/messageprovider/MessageProvider.vue.d.ts +5 -5
- package/lib/components/messageprovider/style/Message.css.d.ts +1 -1
- package/lib/components/modal/Modal.vue.d.ts +1 -1
- package/lib/components/radio/Radio.vue.d.ts +6 -6
- package/lib/components/radiobutton/RadioButton.vue.d.ts +4 -4
- package/lib/components/renderer/renderer.d.ts +1 -1
- package/lib/components/select/Select.vue.d.ts +21 -20
- package/lib/components/switch/Switch.vue.d.ts +4 -4
- package/lib/components/tab/Tab.vue.d.ts +4 -6
- package/lib/components/tab/TabGroup.vue.d.ts +17 -3
- package/lib/components/tab/style/Tab.css.d.ts +7 -0
- package/lib/components/tab/style/index.d.ts +1 -0
- package/lib/components/table/Table.vue.d.ts +2 -2
- package/lib/components/textarea/Textarea.vue.d.ts +5 -5
- package/lib/composables/useInput.d.ts +1 -1
- package/lib/index.cjs.js +10 -13
- package/lib/index.es.js +2386 -2432
- package/lib/install.d.ts +1 -1
- package/lib/style.css +1 -1
- package/package.json +75 -89
- package/src/components/avatar/examples/index.stories.ts +25 -25
- package/src/components/avatargroup/examples/index.stories.ts +19 -19
- package/src/components/badge/examples/index.stories.ts +19 -19
- package/src/components/breadcrumb/examples/index.stories.ts +16 -16
- package/src/components/button/examples/index.stories.ts +37 -37
- package/src/components/buttongroup/examples/index.stories.ts +17 -17
- package/src/components/checkbox/examples/index.stories.ts +16 -16
- package/src/components/colorpicker/examples/index.stories.ts +12 -12
- package/src/components/configprovider/ConfigProvider.vue +38 -38
- package/src/components/confirm/ConfirmProvider.vue +82 -82
- package/src/components/confirm/examples/index.stories.ts +26 -26
- package/src/components/dialog/examples/index.stories.ts +14 -14
- package/src/components/dropdown/examples/index.stories.ts +26 -26
- package/src/components/form/examples/index.stories.ts +23 -23
- package/src/components/image/examples/index.stories.ts +10 -10
- package/src/components/input/examples/index.stories.ts +26 -26
- package/src/components/link/examples/index.stories.ts +15 -15
- package/src/components/messageprovider/examples/index.stories.ts +26 -26
- package/src/components/modal/examples/index.stories.ts +16 -16
- package/src/components/pagination/examples/index.stories.ts +11 -11
- package/src/components/radio/examples/index.stories.ts +16 -16
- package/src/components/radiobuttongroup/examples/index.stories.ts +18 -18
- package/src/components/renderer/examlpes/index.stories.ts +14 -14
- package/src/components/select/Select.vue +755 -755
- package/src/components/select/examples/basic.vue +26 -26
- package/src/components/select/examples/index.stories.ts +16 -16
- package/src/components/select/types.ts +27 -27
- package/src/components/skeleton/examples/index.stories.ts +13 -13
- package/src/components/switch/examples/index.stories.ts +15 -15
- package/src/components/switch/style/Switch.css.ts +135 -135
- package/src/components/tab/Tab.vue +85 -98
- package/src/components/tab/TabGroup.vue +96 -90
- package/src/components/tab/examples/index.stories.ts +21 -10
- package/src/components/tab/style/Tab.css.ts +137 -0
- package/src/components/tab/style/index.ts +1 -0
- package/src/components/table/examples/index.stories.ts +17 -17
- package/src/components/tag/examples/index.stories.ts +16 -16
- package/src/components/textarea/examples/index.stories.ts +14 -14
- package/src/components/tooltip/examples/index.stories.ts +17 -17
- package/src/components/transfer/examples/index.stories.ts +12 -12
- package/src/components/tree/examples/index.stories.ts +12 -12
- package/src/components/virtualscroll/examples/index.stories.ts +11 -11
- package/src/composables/useCachedUid.ts +15 -15
- package/src/composables/useInput.ts +151 -151
- package/src/examples/cards/cards.stories.ts +9 -9
- package/src/examples/modal/modal.stories.ts +9 -9
- package/src/types/props.ts +21 -21
- package/src/utils/call.ts +34 -34
- package/src/utils/injection.ts +45 -45
- package/src/components/tab/Tab.css +0 -113
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import MButton from '../Button.vue';
|
|
2
|
-
import {
|
|
3
|
-
MButtonBasic,
|
|
4
|
-
MButtonSize,
|
|
5
|
-
MButtonRounded,
|
|
6
|
-
MButtonVariant,
|
|
7
|
-
MButtonVariantSecondary,
|
|
8
|
-
MButtonDisabled,
|
|
9
|
-
MButtonIconLeft,
|
|
10
|
-
MButtonIcon,
|
|
11
|
-
MButtonLink
|
|
12
|
-
} from './index';
|
|
13
|
-
|
|
14
|
-
import {
|
|
15
|
-
variantArgType,
|
|
16
|
-
createStory,
|
|
17
|
-
sizeArgType
|
|
18
|
-
} from '../../../__storybook__';
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
component: MButton,
|
|
22
|
-
title: 'Components/Buttons/Button',
|
|
23
|
-
argTypes: {
|
|
24
|
-
...variantArgType(),
|
|
25
|
-
...sizeArgType()
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const Basic = createStory(MButtonBasic);
|
|
30
|
-
export const Size = createStory(MButtonSize);
|
|
31
|
-
export const Rounded = createStory(MButtonRounded);
|
|
32
|
-
export const Colors = createStory(MButtonVariant);
|
|
33
|
-
export const ColorsSecondary = createStory(MButtonVariantSecondary);
|
|
34
|
-
export const Disabled = createStory(MButtonDisabled);
|
|
35
|
-
export const IconLeft = createStory(MButtonIconLeft);
|
|
36
|
-
export const Icon = createStory(MButtonIcon);
|
|
37
|
-
export const Link = createStory(MButtonLink);
|
|
1
|
+
import MButton from '../Button.vue';
|
|
2
|
+
import {
|
|
3
|
+
MButtonBasic,
|
|
4
|
+
MButtonSize,
|
|
5
|
+
MButtonRounded,
|
|
6
|
+
MButtonVariant,
|
|
7
|
+
MButtonVariantSecondary,
|
|
8
|
+
MButtonDisabled,
|
|
9
|
+
MButtonIconLeft,
|
|
10
|
+
MButtonIcon,
|
|
11
|
+
MButtonLink
|
|
12
|
+
} from './index';
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
variantArgType,
|
|
16
|
+
createStory,
|
|
17
|
+
sizeArgType
|
|
18
|
+
} from '../../../__storybook__';
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
component: MButton,
|
|
22
|
+
title: 'Components/Buttons/Button',
|
|
23
|
+
argTypes: {
|
|
24
|
+
...variantArgType(),
|
|
25
|
+
...sizeArgType()
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const Basic = createStory(MButtonBasic);
|
|
30
|
+
export const Size = createStory(MButtonSize);
|
|
31
|
+
export const Rounded = createStory(MButtonRounded);
|
|
32
|
+
export const Colors = createStory(MButtonVariant);
|
|
33
|
+
export const ColorsSecondary = createStory(MButtonVariantSecondary);
|
|
34
|
+
export const Disabled = createStory(MButtonDisabled);
|
|
35
|
+
export const IconLeft = createStory(MButtonIconLeft);
|
|
36
|
+
export const Icon = createStory(MButtonIcon);
|
|
37
|
+
export const Link = createStory(MButtonLink);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import MButtonGroup from '../ButtonGroup.vue';
|
|
2
|
-
import MButton from '../../button/Button.vue';
|
|
3
|
-
import { MButtonGroupBasic, MButtonGroupIconGroup } from './index';
|
|
4
|
-
|
|
5
|
-
import { createStory, sizeArgType } from '../../../__storybook__';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
component: MButtonGroup,
|
|
9
|
-
subcomponents: { MButton },
|
|
10
|
-
title: 'Components/Buttons/Group',
|
|
11
|
-
argTypes: {
|
|
12
|
-
...sizeArgType()
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const Basic = createStory(MButtonGroupBasic);
|
|
17
|
-
export const IconGroup = createStory(MButtonGroupIconGroup);
|
|
1
|
+
import MButtonGroup from '../ButtonGroup.vue';
|
|
2
|
+
import MButton from '../../button/Button.vue';
|
|
3
|
+
import { MButtonGroupBasic, MButtonGroupIconGroup } from './index';
|
|
4
|
+
|
|
5
|
+
import { createStory, sizeArgType } from '../../../__storybook__';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
component: MButtonGroup,
|
|
9
|
+
subcomponents: { MButton },
|
|
10
|
+
title: 'Components/Buttons/Group',
|
|
11
|
+
argTypes: {
|
|
12
|
+
...sizeArgType()
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Basic = createStory(MButtonGroupBasic);
|
|
17
|
+
export const IconGroup = createStory(MButtonGroupIconGroup);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import MCheckbox from '../Checkbox.vue';
|
|
2
|
-
import { MCheckboxBasic, MCheckboxSlot } from './index';
|
|
3
|
-
|
|
4
|
-
import { createStory, sizeArgType, colorArgType } from '../../../__storybook__';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
component: MCheckbox,
|
|
8
|
-
title: 'Components/Checkbox',
|
|
9
|
-
argTypes: {
|
|
10
|
-
...sizeArgType(),
|
|
11
|
-
...colorArgType()
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const Basic = createStory(MCheckboxBasic);
|
|
16
|
-
export const Slot = createStory(MCheckboxSlot);
|
|
1
|
+
import MCheckbox from '../Checkbox.vue';
|
|
2
|
+
import { MCheckboxBasic, MCheckboxSlot } from './index';
|
|
3
|
+
|
|
4
|
+
import { createStory, sizeArgType, colorArgType } from '../../../__storybook__';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
component: MCheckbox,
|
|
8
|
+
title: 'Components/Checkbox',
|
|
9
|
+
argTypes: {
|
|
10
|
+
...sizeArgType(),
|
|
11
|
+
...colorArgType()
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const Basic = createStory(MCheckboxBasic);
|
|
16
|
+
export const Slot = createStory(MCheckboxSlot);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import MColorPicker from '../ColorPicker.vue';
|
|
2
|
-
import { MColorBasic } from './index';
|
|
3
|
-
|
|
4
|
-
import { createStory } from '../../../__storybook__';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
component: MColorPicker,
|
|
8
|
-
title: 'Components/Color Picker',
|
|
9
|
-
argTypes: {}
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const Basic = createStory(MColorBasic);
|
|
1
|
+
import MColorPicker from '../ColorPicker.vue';
|
|
2
|
+
import { MColorBasic } from './index';
|
|
3
|
+
|
|
4
|
+
import { createStory } from '../../../__storybook__';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
component: MColorPicker,
|
|
8
|
+
title: 'Components/Color Picker',
|
|
9
|
+
argTypes: {}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const Basic = createStory(MColorBasic);
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { createContext } from "../../utils/injection";
|
|
3
|
-
import { type Ref, toRefs } from 'vue';
|
|
4
|
-
interface ConfigProviderContextValue {
|
|
5
|
-
useId?: () => string,
|
|
6
|
-
dir?: Ref<string>
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const [injectConfigProviderContext, provideConfigProviderContext]
|
|
10
|
-
= createContext<ConfigProviderContextValue>('ConfigProvider')
|
|
11
|
-
|
|
12
|
-
export interface ConfigProviderProps {
|
|
13
|
-
useId?: () => string,
|
|
14
|
-
dir?: string
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default {
|
|
18
|
-
name: 'ConfigProvider',
|
|
19
|
-
}
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<script setup lang="ts">
|
|
23
|
-
|
|
24
|
-
const props = withDefaults(defineProps<ConfigProviderProps>(), {
|
|
25
|
-
useId: undefined,
|
|
26
|
-
dir: 'ltr'
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
const { dir } = toRefs(props)
|
|
30
|
-
|
|
31
|
-
provideConfigProviderContext({
|
|
32
|
-
useId: props.useId,
|
|
33
|
-
dir
|
|
34
|
-
})
|
|
35
|
-
</script>
|
|
36
|
-
<template>
|
|
37
|
-
<slot />
|
|
38
|
-
</template>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createContext } from "../../utils/injection";
|
|
3
|
+
import { type Ref, toRefs } from 'vue';
|
|
4
|
+
interface ConfigProviderContextValue {
|
|
5
|
+
useId?: () => string,
|
|
6
|
+
dir?: Ref<string>
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const [injectConfigProviderContext, provideConfigProviderContext]
|
|
10
|
+
= createContext<ConfigProviderContextValue>('ConfigProvider')
|
|
11
|
+
|
|
12
|
+
export interface ConfigProviderProps {
|
|
13
|
+
useId?: () => string,
|
|
14
|
+
dir?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
name: 'ConfigProvider',
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
|
|
24
|
+
const props = withDefaults(defineProps<ConfigProviderProps>(), {
|
|
25
|
+
useId: undefined,
|
|
26
|
+
dir: 'ltr'
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const { dir } = toRefs(props)
|
|
30
|
+
|
|
31
|
+
provideConfigProviderContext({
|
|
32
|
+
useId: props.useId,
|
|
33
|
+
dir
|
|
34
|
+
})
|
|
35
|
+
</script>
|
|
36
|
+
<template>
|
|
37
|
+
<slot />
|
|
38
|
+
</template>
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<slot />
|
|
3
|
-
<template v-if="dialogList.length > 0">
|
|
4
|
-
<Teleport :to="teleportTo ?? 'body'">
|
|
5
|
-
<MConfirm
|
|
6
|
-
v-for="dialog in dialogList"
|
|
7
|
-
:key="dialog.key"
|
|
8
|
-
:internalKey="dialog.key"
|
|
9
|
-
:title="dialog.title"
|
|
10
|
-
:content="dialog.content"
|
|
11
|
-
:okText="dialog.okText"
|
|
12
|
-
:cancelText="dialog.cancelText"
|
|
13
|
-
:on-ok="dialog.onOk"
|
|
14
|
-
:on-cancel="dialog.onCancel"
|
|
15
|
-
:ok-variant="dialog.okVariant"
|
|
16
|
-
ref="dialogRefs" />
|
|
17
|
-
</Teleport>
|
|
18
|
-
</template>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script lang="ts">
|
|
22
|
-
import { defineComponent, provide, ref } from 'vue';
|
|
23
|
-
import { useId } from '../../composables/useCachedUid';
|
|
24
|
-
import { providerProps } from './providerProps';
|
|
25
|
-
import type { Confirm, ConfirmApiInjection, ConfirmOptions } from './types';
|
|
26
|
-
import MConfirm from './Confirm.vue';
|
|
27
|
-
|
|
28
|
-
interface PrivateConfirm extends Confirm {
|
|
29
|
-
key: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
interface PrivateConfirmRef extends Confirm {
|
|
33
|
-
key: string;
|
|
34
|
-
hide: () => void;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export default defineComponent({
|
|
38
|
-
name: 'ConfirmProvider',
|
|
39
|
-
props: providerProps,
|
|
40
|
-
components: {
|
|
41
|
-
MConfirm
|
|
42
|
-
},
|
|
43
|
-
setup(props, { slots }) {
|
|
44
|
-
const dialogListRef = ref<PrivateConfirm[]>([]);
|
|
45
|
-
const dialogRefs: Record<string, PrivateConfirmRef> = {};
|
|
46
|
-
const id = useId(null, 'm-confirm');
|
|
47
|
-
function create(options: ConfirmOptions): Confirm {
|
|
48
|
-
const key = id;
|
|
49
|
-
const dialog: PrivateConfirm = {
|
|
50
|
-
...options,
|
|
51
|
-
key,
|
|
52
|
-
destroy: () => {
|
|
53
|
-
dialogRefs[key].hide();
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
dialogListRef.value.push(dialog);
|
|
58
|
-
return dialog;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function destroyAll(): void {
|
|
62
|
-
// @ts-ignore
|
|
63
|
-
Object.values(dialogRefs.value).forEach(dialog => {
|
|
64
|
-
dialog.hide();
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const api: ConfirmApiInjection = {
|
|
69
|
-
create,
|
|
70
|
-
destroyAll
|
|
71
|
-
} as const;
|
|
72
|
-
|
|
73
|
-
provide('m-confirm', api);
|
|
74
|
-
|
|
75
|
-
return {
|
|
76
|
-
...api,
|
|
77
|
-
dialogRefs,
|
|
78
|
-
dialogList: dialogListRef
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<slot />
|
|
3
|
+
<template v-if="dialogList.length > 0">
|
|
4
|
+
<Teleport :to="teleportTo ?? 'body'">
|
|
5
|
+
<MConfirm
|
|
6
|
+
v-for="dialog in dialogList"
|
|
7
|
+
:key="dialog.key"
|
|
8
|
+
:internalKey="dialog.key"
|
|
9
|
+
:title="dialog.title"
|
|
10
|
+
:content="dialog.content"
|
|
11
|
+
:okText="dialog.okText"
|
|
12
|
+
:cancelText="dialog.cancelText"
|
|
13
|
+
:on-ok="dialog.onOk"
|
|
14
|
+
:on-cancel="dialog.onCancel"
|
|
15
|
+
:ok-variant="dialog.okVariant"
|
|
16
|
+
ref="dialogRefs" />
|
|
17
|
+
</Teleport>
|
|
18
|
+
</template>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
import { defineComponent, provide, ref } from 'vue';
|
|
23
|
+
import { useId } from '../../composables/useCachedUid';
|
|
24
|
+
import { providerProps } from './providerProps';
|
|
25
|
+
import type { Confirm, ConfirmApiInjection, ConfirmOptions } from './types';
|
|
26
|
+
import MConfirm from './Confirm.vue';
|
|
27
|
+
|
|
28
|
+
interface PrivateConfirm extends Confirm {
|
|
29
|
+
key: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface PrivateConfirmRef extends Confirm {
|
|
33
|
+
key: string;
|
|
34
|
+
hide: () => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default defineComponent({
|
|
38
|
+
name: 'ConfirmProvider',
|
|
39
|
+
props: providerProps,
|
|
40
|
+
components: {
|
|
41
|
+
MConfirm
|
|
42
|
+
},
|
|
43
|
+
setup(props, { slots }) {
|
|
44
|
+
const dialogListRef = ref<PrivateConfirm[]>([]);
|
|
45
|
+
const dialogRefs: Record<string, PrivateConfirmRef> = {};
|
|
46
|
+
const id = useId(null, 'm-confirm');
|
|
47
|
+
function create(options: ConfirmOptions): Confirm {
|
|
48
|
+
const key = id;
|
|
49
|
+
const dialog: PrivateConfirm = {
|
|
50
|
+
...options,
|
|
51
|
+
key,
|
|
52
|
+
destroy: () => {
|
|
53
|
+
dialogRefs[key].hide();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
dialogListRef.value.push(dialog);
|
|
58
|
+
return dialog;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function destroyAll(): void {
|
|
62
|
+
// @ts-ignore
|
|
63
|
+
Object.values(dialogRefs.value).forEach(dialog => {
|
|
64
|
+
dialog.hide();
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const api: ConfirmApiInjection = {
|
|
69
|
+
create,
|
|
70
|
+
destroyAll
|
|
71
|
+
} as const;
|
|
72
|
+
|
|
73
|
+
provide('m-confirm', api);
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
...api,
|
|
77
|
+
dialogRefs,
|
|
78
|
+
dialogList: dialogListRef
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
</script>
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import MConfirmProvider from '../ConfirmProvider.vue';
|
|
2
|
-
import { MConfirmProviderBasic } from './index';
|
|
3
|
-
|
|
4
|
-
const Template = (args: any) => ({
|
|
5
|
-
components: {
|
|
6
|
-
MConfirmProvider,
|
|
7
|
-
MConfirmProviderBasic
|
|
8
|
-
},
|
|
9
|
-
setup() {
|
|
10
|
-
return {
|
|
11
|
-
args
|
|
12
|
-
};
|
|
13
|
-
},
|
|
14
|
-
template: `
|
|
15
|
-
<m-confirm-provider v-bind="args">
|
|
16
|
-
<MConfirmProviderBasic />
|
|
17
|
-
</m-confirm-provider>
|
|
18
|
-
`
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
component: MConfirmProvider,
|
|
23
|
-
title: 'Components/Confirm'
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const Primary = Template.bind({});
|
|
1
|
+
import MConfirmProvider from '../ConfirmProvider.vue';
|
|
2
|
+
import { MConfirmProviderBasic } from './index';
|
|
3
|
+
|
|
4
|
+
const Template = (args: any) => ({
|
|
5
|
+
components: {
|
|
6
|
+
MConfirmProvider,
|
|
7
|
+
MConfirmProviderBasic
|
|
8
|
+
},
|
|
9
|
+
setup() {
|
|
10
|
+
return {
|
|
11
|
+
args
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
template: `
|
|
15
|
+
<m-confirm-provider v-bind="args">
|
|
16
|
+
<MConfirmProviderBasic />
|
|
17
|
+
</m-confirm-provider>
|
|
18
|
+
`
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
component: MConfirmProvider,
|
|
23
|
+
title: 'Components/Confirm'
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const Primary = Template.bind({});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import MDialog from '../Dialog.vue';
|
|
2
|
-
import { MDialogBasic } from './index';
|
|
3
|
-
|
|
4
|
-
import { createStory, sizeArgType } from '../../../__storybook__';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
component: MDialog,
|
|
8
|
-
title: 'Components/Dialog',
|
|
9
|
-
argTypes: {
|
|
10
|
-
...sizeArgType()
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const Basic = createStory(MDialogBasic);
|
|
1
|
+
import MDialog from '../Dialog.vue';
|
|
2
|
+
import { MDialogBasic } from './index';
|
|
3
|
+
|
|
4
|
+
import { createStory, sizeArgType } from '../../../__storybook__';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
component: MDialog,
|
|
8
|
+
title: 'Components/Dialog',
|
|
9
|
+
argTypes: {
|
|
10
|
+
...sizeArgType()
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const Basic = createStory(MDialogBasic);
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import MDropdown from '../Dropdown.vue';
|
|
2
|
-
import MDropdownList from '../DropdownList.vue';
|
|
3
|
-
import MDropdownItem from '../DropdownItem.vue';
|
|
4
|
-
import MDropdownHeading from '../DropdownHeading.vue';
|
|
5
|
-
import MButton from '../../button/Button.vue';
|
|
6
|
-
|
|
7
|
-
import { MDropdownBasic, MDropdownContext, MDropdownCustom } from './index';
|
|
8
|
-
import { createStory, popperPositionArgType } from '../../../__storybook__';
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
component: MDropdown,
|
|
12
|
-
subcomponents: {
|
|
13
|
-
MDropdownList,
|
|
14
|
-
MDropdownItem,
|
|
15
|
-
MDropdownHeading,
|
|
16
|
-
MButton
|
|
17
|
-
},
|
|
18
|
-
title: 'Components/Dropdown',
|
|
19
|
-
argTypes: {
|
|
20
|
-
...popperPositionArgType()
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const Basic = createStory(MDropdownBasic);
|
|
25
|
-
export const Custom = createStory(MDropdownCustom);
|
|
26
|
-
export const Context = createStory(MDropdownContext);
|
|
1
|
+
import MDropdown from '../Dropdown.vue';
|
|
2
|
+
import MDropdownList from '../DropdownList.vue';
|
|
3
|
+
import MDropdownItem from '../DropdownItem.vue';
|
|
4
|
+
import MDropdownHeading from '../DropdownHeading.vue';
|
|
5
|
+
import MButton from '../../button/Button.vue';
|
|
6
|
+
|
|
7
|
+
import { MDropdownBasic, MDropdownContext, MDropdownCustom } from './index';
|
|
8
|
+
import { createStory, popperPositionArgType } from '../../../__storybook__';
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
component: MDropdown,
|
|
12
|
+
subcomponents: {
|
|
13
|
+
MDropdownList,
|
|
14
|
+
MDropdownItem,
|
|
15
|
+
MDropdownHeading,
|
|
16
|
+
MButton
|
|
17
|
+
},
|
|
18
|
+
title: 'Components/Dropdown',
|
|
19
|
+
argTypes: {
|
|
20
|
+
...popperPositionArgType()
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const Basic = createStory(MDropdownBasic);
|
|
25
|
+
export const Custom = createStory(MDropdownCustom);
|
|
26
|
+
export const Context = createStory(MDropdownContext);
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import MForm from '../Form.vue';
|
|
2
|
-
import MInput from '../../input/Input.vue';
|
|
3
|
-
import MButton from '../../button/Button.vue';
|
|
4
|
-
import MSelect from '../../select/Select.vue';
|
|
5
|
-
import MCheckbox from '../../checkbox/Checkbox.vue';
|
|
6
|
-
import MColorPicker from '../../colorpicker/ColorPicker.vue';
|
|
7
|
-
|
|
8
|
-
import { MFormBasic } from './index';
|
|
9
|
-
import { createStory } from '../../../__storybook__';
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
component: MForm,
|
|
13
|
-
subcomponents: {
|
|
14
|
-
MInput,
|
|
15
|
-
MButton,
|
|
16
|
-
MSelect,
|
|
17
|
-
MCheckbox,
|
|
18
|
-
MColorPicker
|
|
19
|
-
},
|
|
20
|
-
title: 'Components/Form'
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const Basic = createStory(MFormBasic);
|
|
1
|
+
import MForm from '../Form.vue';
|
|
2
|
+
import MInput from '../../input/Input.vue';
|
|
3
|
+
import MButton from '../../button/Button.vue';
|
|
4
|
+
import MSelect from '../../select/Select.vue';
|
|
5
|
+
import MCheckbox from '../../checkbox/Checkbox.vue';
|
|
6
|
+
import MColorPicker from '../../colorpicker/ColorPicker.vue';
|
|
7
|
+
|
|
8
|
+
import { MFormBasic } from './index';
|
|
9
|
+
import { createStory } from '../../../__storybook__';
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
component: MForm,
|
|
13
|
+
subcomponents: {
|
|
14
|
+
MInput,
|
|
15
|
+
MButton,
|
|
16
|
+
MSelect,
|
|
17
|
+
MCheckbox,
|
|
18
|
+
MColorPicker
|
|
19
|
+
},
|
|
20
|
+
title: 'Components/Form'
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const Basic = createStory(MFormBasic);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createStory } from '../../../__storybook__';
|
|
2
|
-
import MImage from '../Image.vue';
|
|
3
|
-
import { MImageBasic } from './index';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
component: MImage,
|
|
7
|
-
title: 'Components/Image'
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const Basic = createStory(MImageBasic);
|
|
1
|
+
import { createStory } from '../../../__storybook__';
|
|
2
|
+
import MImage from '../Image.vue';
|
|
3
|
+
import { MImageBasic } from './index';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
component: MImage,
|
|
7
|
+
title: 'Components/Image'
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Basic = createStory(MImageBasic);
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import MInput from '../Input.vue';
|
|
2
|
-
import {
|
|
3
|
-
MInputBasic,
|
|
4
|
-
MInputSuffix,
|
|
5
|
-
MInputPrefix,
|
|
6
|
-
MInputLeftIcon,
|
|
7
|
-
MInputRightIcon,
|
|
8
|
-
MInputSizes
|
|
9
|
-
} from './index';
|
|
10
|
-
|
|
11
|
-
import { createStory, sizeArgType } from '../../../__storybook__';
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
component: MInput,
|
|
15
|
-
title: 'Components/Input',
|
|
16
|
-
argTypes: {
|
|
17
|
-
...sizeArgType()
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const Basic = createStory(MInputBasic);
|
|
22
|
-
export const Suffix = createStory(MInputSuffix);
|
|
23
|
-
export const Prefix = createStory(MInputPrefix);
|
|
24
|
-
export const Sizes = createStory(MInputSizes);
|
|
25
|
-
export const LeftIcon = createStory(MInputLeftIcon);
|
|
26
|
-
export const RightIcon = createStory(MInputRightIcon);
|
|
1
|
+
import MInput from '../Input.vue';
|
|
2
|
+
import {
|
|
3
|
+
MInputBasic,
|
|
4
|
+
MInputSuffix,
|
|
5
|
+
MInputPrefix,
|
|
6
|
+
MInputLeftIcon,
|
|
7
|
+
MInputRightIcon,
|
|
8
|
+
MInputSizes
|
|
9
|
+
} from './index';
|
|
10
|
+
|
|
11
|
+
import { createStory, sizeArgType } from '../../../__storybook__';
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
component: MInput,
|
|
15
|
+
title: 'Components/Input',
|
|
16
|
+
argTypes: {
|
|
17
|
+
...sizeArgType()
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const Basic = createStory(MInputBasic);
|
|
22
|
+
export const Suffix = createStory(MInputSuffix);
|
|
23
|
+
export const Prefix = createStory(MInputPrefix);
|
|
24
|
+
export const Sizes = createStory(MInputSizes);
|
|
25
|
+
export const LeftIcon = createStory(MInputLeftIcon);
|
|
26
|
+
export const RightIcon = createStory(MInputRightIcon);
|