@teammodlr/ui-kit 2.1.49 → 2.1.52
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 +5 -5
- package/lib/components/button/style/Button.css.d.ts +3 -3
- package/lib/components/checkbox/Checkbox.vue.d.ts +4 -4
- package/lib/components/collapse/Collapse.vue.d.ts +82 -0
- package/lib/components/collapse/CollapseItem.vue.d.ts +43 -0
- package/lib/components/collapse/CollapseItemContent.vue.d.ts +29 -0
- package/lib/components/collapse/interface.d.ts +9 -0
- package/lib/components/collapse/style/Collapse.css.d.ts +8 -0
- package/lib/components/collapse/style/index.d.ts +1 -0
- package/lib/components/configprovider/ConfigProvider.vue.d.ts +11 -11
- package/lib/components/confirm/ConfirmProvider.vue.d.ts +10 -10
- package/lib/components/dialog/Dialog.vue.d.ts +1 -1
- package/lib/components/dropdown/Dropdown.vue.d.ts +2 -2
- package/lib/components/dropdown/DropdownItem.vue.d.ts +3 -3
- package/lib/components/dropdown/style/Dropdown.css.d.ts +1 -1
- package/lib/components/index.d.ts +3 -0
- package/lib/components/input/Input.vue.d.ts +7 -7
- 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 +2 -2
- package/lib/components/radio/Radio.vue.d.ts +7 -7
- package/lib/components/radiobutton/RadioButton.vue.d.ts +6 -6
- 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 +6 -6
- package/lib/components/tree/Tree.vue.d.ts +1 -1
- package/lib/composables/useInput.d.ts +1 -1
- package/lib/index.cjs.js +10 -13
- package/lib/index.es.js +3151 -2955
- package/lib/install.d.ts +1 -1
- package/lib/style.css +1 -1
- package/lib/styles/theme.css.d.ts +1 -1
- package/package.json +76 -89
- package/src/call.ts +34 -34
- 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/collapse/Collapse.vue +143 -0
- package/src/components/collapse/CollapseItem.vue +123 -0
- package/src/components/collapse/CollapseItemContent.vue +58 -0
- package/src/components/collapse/examples/basic.vue +13 -0
- package/src/components/collapse/examples/index.stories.ts +18 -0
- package/src/components/collapse/examples/index.ts +1 -0
- package/src/components/collapse/interface.ts +38 -0
- package/src/components/collapse/style/Collapse.css.ts +87 -0
- package/src/components/collapse/style/index.ts +1 -0
- 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/index.ts +51 -48
- 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,90 +1,96 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
type: String as PropType<
|
|
32
|
-
default: '
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
emit
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="computedTabsWrapperClasses">
|
|
3
|
+
<div ref="wrapperRef">
|
|
4
|
+
<ul ref="tabsRef" :class="computedTabsClasses">
|
|
5
|
+
<slot />
|
|
6
|
+
</ul>
|
|
7
|
+
</div>
|
|
8
|
+
<div ref="tabsContentRef" :class="computedTabContentClasses"></div>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts">
|
|
13
|
+
import type { Size } from '../../types/props';
|
|
14
|
+
import { computed, defineComponent, provide, reactive, ref, watchEffect, type PropType } from 'vue';
|
|
15
|
+
import { tabs, tabContent } from './style';
|
|
16
|
+
export default defineComponent({
|
|
17
|
+
name: "TabGroup",
|
|
18
|
+
props: {
|
|
19
|
+
modelValue: {
|
|
20
|
+
type: [String, Number],
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
type: String as PropType<Size>,
|
|
24
|
+
default: 'md'
|
|
25
|
+
},
|
|
26
|
+
vertical: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
type: {
|
|
31
|
+
type: String as PropType<'base' | 'card'>,
|
|
32
|
+
default: 'base',
|
|
33
|
+
validator: (value: string) => ['base', 'card'].includes(value)
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
emit: [
|
|
37
|
+
'update:modelValue'
|
|
38
|
+
],
|
|
39
|
+
setup(props, { emit }) {
|
|
40
|
+
const wrapperRef = ref<HTMLElement>();
|
|
41
|
+
const tabsContentRef = ref<HTMLElement>();
|
|
42
|
+
const contentRef = ref<HTMLElement>();
|
|
43
|
+
const active = ref();
|
|
44
|
+
|
|
45
|
+
watchEffect(() => {
|
|
46
|
+
active.value = props.modelValue;
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const state = reactive({
|
|
50
|
+
active: computed(() => active.value),
|
|
51
|
+
type: computed(() => props.type)
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const computedTabsWrapperClasses = computed(() => {
|
|
55
|
+
return {
|
|
56
|
+
'm-tab-group': true,
|
|
57
|
+
'm-tab-group--vertical': props.vertical
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const computedTabsClasses = computed(() => {
|
|
62
|
+
return {
|
|
63
|
+
[tabs[props.type as keyof typeof tabs]]: true,
|
|
64
|
+
'm-tab-group--vertical': props.vertical,
|
|
65
|
+
[`m-tab-group--${props.size}`]: true
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const computedTabContentClasses = computed(() => {
|
|
70
|
+
return {
|
|
71
|
+
[tabContent]: true
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
function selectTab(tab: string | number) {
|
|
76
|
+
active.value = tab;
|
|
77
|
+
emit('update:modelValue', tab);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
provide("tabs", {
|
|
81
|
+
tabsContentRef,
|
|
82
|
+
selectTab,
|
|
83
|
+
state
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
wrapperRef,
|
|
88
|
+
tabsContentRef,
|
|
89
|
+
contentRef,
|
|
90
|
+
computedTabsWrapperClasses,
|
|
91
|
+
computedTabsClasses,
|
|
92
|
+
computedTabContentClasses
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
</script>
|
|
@@ -1,19 +1,30 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
1
2
|
import MTabGroup from '../TabGroup.vue';
|
|
2
3
|
import MTab from '../Tab.vue';
|
|
3
4
|
import { MTabsBasic, MTabsVertical } from './index';
|
|
4
|
-
|
|
5
5
|
import { createStory, sizeArgType } from '../../../__storybook__';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
subcomponents: {
|
|
10
|
-
MTab
|
|
11
|
-
},
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof MTabGroup> = {
|
|
12
9
|
title: 'Components/Tabs',
|
|
10
|
+
component: MTabGroup,
|
|
11
|
+
subcomponents: { MTab },
|
|
13
12
|
argTypes: {
|
|
14
|
-
|
|
13
|
+
size: sizeArgType,
|
|
14
|
+
type: {
|
|
15
|
+
options: [
|
|
16
|
+
'base',
|
|
17
|
+
'card',
|
|
18
|
+
],
|
|
19
|
+
control: {
|
|
20
|
+
type: 'select',
|
|
21
|
+
default: 'base'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
15
24
|
}
|
|
16
|
-
}
|
|
25
|
+
}
|
|
17
26
|
|
|
18
|
-
export
|
|
19
|
-
|
|
27
|
+
export default meta;
|
|
28
|
+
type Story = StoryObj<typeof MTabGroup>;
|
|
29
|
+
export const Default = createStory(MTabsBasic) as Story;
|
|
30
|
+
// export const Vertical = createStory(MTabsVertical);
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createVar,
|
|
3
|
+
style,
|
|
4
|
+
styleVariants
|
|
5
|
+
} from '@vanilla-extract/css';
|
|
6
|
+
import { themeVars } from '../../../styles/theme.css';
|
|
7
|
+
|
|
8
|
+
const sizes = {
|
|
9
|
+
xs: '14px',
|
|
10
|
+
sm: '16px',
|
|
11
|
+
md: '18px',
|
|
12
|
+
lg: '20px',
|
|
13
|
+
xl: '22px'
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const vars = {
|
|
17
|
+
tabsGap: createVar(),
|
|
18
|
+
tabsBackground: createVar(),
|
|
19
|
+
tabsPadding: createVar(),
|
|
20
|
+
tabsBorder: createVar(),
|
|
21
|
+
|
|
22
|
+
tabBackground: createVar(),
|
|
23
|
+
tabColor: createVar(),
|
|
24
|
+
tabBorder: createVar(),
|
|
25
|
+
tabFontSize: createVar(),
|
|
26
|
+
tabFontWeight: createVar(),
|
|
27
|
+
tabPadding: createVar(),
|
|
28
|
+
tabBorderRadius: createVar()
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const tabWrapper = style({
|
|
32
|
+
display: 'flex',
|
|
33
|
+
flexDirection: 'column',
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const baseTabs = style({
|
|
37
|
+
vars: {
|
|
38
|
+
[vars.tabsGap]: '24px',
|
|
39
|
+
[vars.tabsBackground]: 'transparent',
|
|
40
|
+
[vars.tabsPadding]: '0',
|
|
41
|
+
[vars.tabsBorder]: 'none',
|
|
42
|
+
},
|
|
43
|
+
listStyle: 'none',
|
|
44
|
+
margin: 0,
|
|
45
|
+
display: 'flex',
|
|
46
|
+
gap: vars.tabsGap,
|
|
47
|
+
backgroundColor: vars.tabsBackground,
|
|
48
|
+
padding: vars.tabsPadding,
|
|
49
|
+
border: vars.tabsBorder,
|
|
50
|
+
flexWrap: 'nowrap',
|
|
51
|
+
flexShrink: 0,
|
|
52
|
+
flexGrow: 0
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export const tabs = styleVariants({
|
|
56
|
+
base: [baseTabs],
|
|
57
|
+
card: [baseTabs, {
|
|
58
|
+
vars: {
|
|
59
|
+
[vars.tabsGap]: '6px'
|
|
60
|
+
}
|
|
61
|
+
}]
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export const baseButton = style({
|
|
65
|
+
vars: {
|
|
66
|
+
[vars.tabBackground]: 'transparent',
|
|
67
|
+
[vars.tabBorder]: 'none',
|
|
68
|
+
[vars.tabFontSize]: '14px',
|
|
69
|
+
[vars.tabFontWeight]: '600',
|
|
70
|
+
[vars.tabColor]: themeVars.color.gray[500],
|
|
71
|
+
[vars.tabPadding]: '6px 0',
|
|
72
|
+
[vars.tabBorderRadius]: '4px'
|
|
73
|
+
},
|
|
74
|
+
verticalAlign: 'bottom',
|
|
75
|
+
cursor: 'pointer',
|
|
76
|
+
display: 'inline-flex',
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
fontWeight: vars.tabFontWeight,
|
|
79
|
+
color: vars.tabColor,
|
|
80
|
+
padding: vars.tabPadding,
|
|
81
|
+
backgroundClip: 'padding-box',
|
|
82
|
+
backgroundColor: vars.tabBackground,
|
|
83
|
+
borderRadius: vars.tabBorderRadius,
|
|
84
|
+
transition: 'all .2s ease',
|
|
85
|
+
border: 'none',
|
|
86
|
+
fontSize: vars.tabFontSize,
|
|
87
|
+
selectors: {
|
|
88
|
+
'&:hover': {
|
|
89
|
+
vars: {
|
|
90
|
+
color: themeVars.color.blue[400],
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
export const tabButton = styleVariants({
|
|
97
|
+
base: [baseButton, {
|
|
98
|
+
vars: {
|
|
99
|
+
[vars.tabBorderRadius]: '0',
|
|
100
|
+
}
|
|
101
|
+
}],
|
|
102
|
+
card: [baseButton, {
|
|
103
|
+
vars: {
|
|
104
|
+
[vars.tabPadding]: '10px 16px',
|
|
105
|
+
[vars.tabBorderRadius]: `${themeVars.rounded.default} ${themeVars.rounded.default} 0 0`,
|
|
106
|
+
[vars.tabBackground]: themeVars.color.gray[150],
|
|
107
|
+
[vars.tabColor]: themeVars.color.gray[600],
|
|
108
|
+
},
|
|
109
|
+
border: `1px solid ${themeVars.color.gray[300]}`,
|
|
110
|
+
borderBottom: 'none',
|
|
111
|
+
transition: 'all .2s ease',
|
|
112
|
+
}]
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
export const tabButtonActive = styleVariants({
|
|
116
|
+
base: [baseButton, {
|
|
117
|
+
color: themeVars.color.blue[500],
|
|
118
|
+
border: 'none',
|
|
119
|
+
boxShadow: `inset 0 -2px ${themeVars.color.blue[500]}`,
|
|
120
|
+
}],
|
|
121
|
+
card: [baseButton, {
|
|
122
|
+
color: themeVars.color.blue[500],
|
|
123
|
+
backgroundColor: '#0000',
|
|
124
|
+
}]
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
export const tabLabel = style({
|
|
128
|
+
display: 'flex',
|
|
129
|
+
alignItems: 'center',
|
|
130
|
+
zIndex: 1,
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
export const tabContent = style({
|
|
134
|
+
padding: '12px 0 0 0',
|
|
135
|
+
width: '100%',
|
|
136
|
+
transition: 'color .2s ease, background-color .2s ease',
|
|
137
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tab.css';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import MTable from '../Table.vue';
|
|
2
|
-
import MButton from '../../button/Button.vue';
|
|
3
|
-
import { MTableBasic, MTableEmpty, MTableSelected } from './index';
|
|
4
|
-
|
|
5
|
-
import { createStory } from '../../../__storybook__';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
component: MTable,
|
|
9
|
-
subcomponents: {
|
|
10
|
-
MButton
|
|
11
|
-
},
|
|
12
|
-
title: 'Components/Table'
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const Basic = createStory(MTableBasic);
|
|
16
|
-
export const Empty = createStory(MTableEmpty);
|
|
17
|
-
export const Selected = createStory(MTableSelected);
|
|
1
|
+
import MTable from '../Table.vue';
|
|
2
|
+
import MButton from '../../button/Button.vue';
|
|
3
|
+
import { MTableBasic, MTableEmpty, MTableSelected } from './index';
|
|
4
|
+
|
|
5
|
+
import { createStory } from '../../../__storybook__';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
component: MTable,
|
|
9
|
+
subcomponents: {
|
|
10
|
+
MButton
|
|
11
|
+
},
|
|
12
|
+
title: 'Components/Table'
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const Basic = createStory(MTableBasic);
|
|
16
|
+
export const Empty = createStory(MTableEmpty);
|
|
17
|
+
export const Selected = createStory(MTableSelected);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import MTag from '../Tag.vue';
|
|
2
|
-
|
|
3
|
-
import { MTagBasic } from './index';
|
|
4
|
-
|
|
5
|
-
import { colorArgType, createStory, sizeArgType } from '../../../__storybook__';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
component: MTag,
|
|
9
|
-
title: 'Components/Tag',
|
|
10
|
-
argTypes: {
|
|
11
|
-
...colorArgType(),
|
|
12
|
-
...sizeArgType()
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const Basic = createStory(MTagBasic);
|
|
1
|
+
import MTag from '../Tag.vue';
|
|
2
|
+
|
|
3
|
+
import { MTagBasic } from './index';
|
|
4
|
+
|
|
5
|
+
import { colorArgType, createStory, sizeArgType } from '../../../__storybook__';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
component: MTag,
|
|
9
|
+
title: 'Components/Tag',
|
|
10
|
+
argTypes: {
|
|
11
|
+
...colorArgType(),
|
|
12
|
+
...sizeArgType()
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Basic = createStory(MTagBasic);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import MTextarea from '../Textarea.vue';
|
|
2
|
-
import { MTextareaBasic } from './index';
|
|
3
|
-
|
|
4
|
-
import { createStory, sizeArgType } from '../../../__storybook__';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
component: MTextarea,
|
|
8
|
-
title: 'Components/Textarea',
|
|
9
|
-
argTypes: {
|
|
10
|
-
...sizeArgType()
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const Basic = createStory(MTextareaBasic);
|
|
1
|
+
import MTextarea from '../Textarea.vue';
|
|
2
|
+
import { MTextareaBasic } from './index';
|
|
3
|
+
|
|
4
|
+
import { createStory, sizeArgType } from '../../../__storybook__';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
component: MTextarea,
|
|
8
|
+
title: 'Components/Textarea',
|
|
9
|
+
argTypes: {
|
|
10
|
+
...sizeArgType()
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const Basic = createStory(MTextareaBasic);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import MTooltip from '../Tooltip.vue';
|
|
2
|
-
import MButton from '@/components/button/Button.vue';
|
|
3
|
-
import { MTooltipBasic, MTooltipPlacement } from './index';
|
|
4
|
-
|
|
5
|
-
import { createStory, popperPositionArgType } from '../../../__storybook__';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
component: MTooltip,
|
|
9
|
-
subcomponents: { MButton },
|
|
10
|
-
title: 'Components/Tooltip',
|
|
11
|
-
argTypes: {
|
|
12
|
-
...popperPositionArgType()
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const Basic = createStory(MTooltipBasic);
|
|
17
|
-
export const Placement = createStory(MTooltipPlacement);
|
|
1
|
+
import MTooltip from '../Tooltip.vue';
|
|
2
|
+
import MButton from '@/components/button/Button.vue';
|
|
3
|
+
import { MTooltipBasic, MTooltipPlacement } from './index';
|
|
4
|
+
|
|
5
|
+
import { createStory, popperPositionArgType } from '../../../__storybook__';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
component: MTooltip,
|
|
9
|
+
subcomponents: { MButton },
|
|
10
|
+
title: 'Components/Tooltip',
|
|
11
|
+
argTypes: {
|
|
12
|
+
...popperPositionArgType()
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Basic = createStory(MTooltipBasic);
|
|
17
|
+
export const Placement = createStory(MTooltipPlacement);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import MTransfer from '../Transfer.vue';
|
|
2
|
-
|
|
3
|
-
import { MTransferBasic } from './index';
|
|
4
|
-
|
|
5
|
-
import { createStory } from '../../../__storybook__';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
component: MTransfer,
|
|
9
|
-
title: 'Components/Transfer'
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const Basic = createStory(MTransferBasic);
|
|
1
|
+
import MTransfer from '../Transfer.vue';
|
|
2
|
+
|
|
3
|
+
import { MTransferBasic } from './index';
|
|
4
|
+
|
|
5
|
+
import { createStory } from '../../../__storybook__';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
component: MTransfer,
|
|
9
|
+
title: 'Components/Transfer'
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const Basic = createStory(MTransferBasic);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import MTree from '../Tree.vue';
|
|
2
|
-
|
|
3
|
-
import { MTreeBasic } from './index';
|
|
4
|
-
|
|
5
|
-
import { createStory } from '../../../__storybook__';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
component: MTree,
|
|
9
|
-
title: 'Components/Tree'
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const Basic = createStory(MTreeBasic);
|
|
1
|
+
import MTree from '../Tree.vue';
|
|
2
|
+
|
|
3
|
+
import { MTreeBasic } from './index';
|
|
4
|
+
|
|
5
|
+
import { createStory } from '../../../__storybook__';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
component: MTree,
|
|
9
|
+
title: 'Components/Tree'
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const Basic = createStory(MTreeBasic);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import MVirtualScroll from '../VirtualScroll.vue';
|
|
2
|
-
import { MVirtualScrollBasic } from './index';
|
|
3
|
-
|
|
4
|
-
import { createStory } from '../../../__storybook__';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
component: MVirtualScroll,
|
|
8
|
-
title: 'Components/VirtualScroll'
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const Basic = createStory(MVirtualScrollBasic);
|
|
1
|
+
import MVirtualScroll from '../VirtualScroll.vue';
|
|
2
|
+
import { MVirtualScrollBasic } from './index';
|
|
3
|
+
|
|
4
|
+
import { createStory } from '../../../__storybook__';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
component: MVirtualScroll,
|
|
8
|
+
title: 'Components/VirtualScroll'
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const Basic = createStory(MVirtualScrollBasic);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { injectConfigProviderContext } from '../components/configprovider/ConfigProvider.vue';
|
|
2
|
-
|
|
3
|
-
let count = 0
|
|
4
|
-
|
|
5
|
-
export function useId(deterministicId?: string | null | undefined, prefix = 'ui') {
|
|
6
|
-
if (deterministicId) {
|
|
7
|
-
return deterministicId;
|
|
8
|
-
}
|
|
9
|
-
const { useId } = injectConfigProviderContext({ useId: undefined })
|
|
10
|
-
if (useId && typeof useId === 'function') {
|
|
11
|
-
return `${prefix}-${useId()}`;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return `${prefix}-${count++}`;
|
|
15
|
-
}
|
|
1
|
+
import { injectConfigProviderContext } from '../components/configprovider/ConfigProvider.vue';
|
|
2
|
+
|
|
3
|
+
let count = 0
|
|
4
|
+
|
|
5
|
+
export function useId(deterministicId?: string | null | undefined, prefix = 'ui') {
|
|
6
|
+
if (deterministicId) {
|
|
7
|
+
return deterministicId;
|
|
8
|
+
}
|
|
9
|
+
const { useId } = injectConfigProviderContext({ useId: undefined })
|
|
10
|
+
if (useId && typeof useId === 'function') {
|
|
11
|
+
return `${prefix}-${useId()}`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return `${prefix}-${count++}`;
|
|
15
|
+
}
|