@teammodlr/ui-kit 2.1.8 → 2.1.9
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/avatargroup/symbol.d.ts +2 -2
- package/lib/components/breadcrumb/style/index.d.ts +1 -1
- package/lib/components/breadcrumb/symbol.d.ts +1 -1
- package/lib/components/buttongroup/symbol.d.ts +2 -2
- package/lib/components/colorpicker/ColorPicker.vue.d.ts +1 -1
- package/lib/components/dropdown/Dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/symbol.d.ts +1 -1
- package/lib/components/form/symbol.d.ts +1 -1
- package/lib/components/messageprovider/style/index.d.ts +1 -1
- package/lib/components/radiobuttongroup/symbol.d.ts +2 -2
- package/lib/components/tooltip/Tooltip.vue.d.ts +1 -1
- package/lib/components/tree/props.d.ts +4 -4
- package/lib/components/tree/types.d.ts +10 -10
- package/lib/composables/element.d.ts +1 -1
- package/lib/composables/useInteractive.d.ts +1 -1
- package/lib/composables/useMount.d.ts +1 -1
- package/lib/composables/usePopper.d.ts +2 -2
- package/lib/composables/useZIndex.d.ts +1 -1
- package/lib/index.cjs.js +9 -9
- package/lib/index.es.js +2297 -2276
- package/lib/install.d.ts +1 -1
- package/lib/nuxt.js +17 -15
- package/lib/nuxt.plugin.js +6 -6
- package/package.json +89 -79
- package/src/__storybook__/argTypes.ts +5 -13
- package/src/__storybook__/createStory.ts +10 -10
- package/src/call.ts +14 -14
- package/src/components/avatar/Avatar.vue +1 -1
- package/src/components/avatar/examples/index.stories.ts +4 -7
- package/src/components/avatar/style/Avatar.css.ts +17 -17
- package/src/components/avatargroup/examples/index.stories.ts +5 -10
- package/src/components/avatargroup/style/AvatarGroup.css.ts +9 -4
- package/src/components/avatargroup/symbol.ts +5 -5
- package/src/components/badge/examples/index.stories.ts +4 -6
- package/src/components/badge/style/Badge.css.ts +36 -36
- package/src/components/breadcrumb/examples/index.stories.ts +6 -10
- package/src/components/breadcrumb/style/Breadcrumb.css.ts +17 -17
- package/src/components/breadcrumb/style/index.ts +1 -1
- package/src/components/breadcrumb/symbol.ts +4 -3
- package/src/components/button/examples/index.stories.ts +4 -4
- package/src/components/button/style/Button.css.ts +143 -133
- package/src/components/buttongroup/examples/index.stories.ts +6 -12
- package/src/components/buttongroup/style/ButtonGroup.css.ts +13 -11
- package/src/components/buttongroup/symbol.ts +5 -4
- package/src/components/checkbox/Checkbox.vue +8 -8
- package/src/components/checkbox/examples/index.stories.ts +4 -9
- package/src/components/checkbox/examples/index.ts +0 -1
- package/src/components/checkbox/style/Checkbox.css.ts +31 -27
- package/src/components/checkbox/style/index.ts +1 -1
- package/src/components/colorpicker/examples/index.stories.ts +5 -10
- package/src/components/colorpicker/examples/index.ts +1 -1
- package/src/components/colorpicker/style/ColorPicker.css.ts +22 -14
- package/src/components/colorpicker/utils.ts +46 -28
- package/src/components/confirm/examples/index.stories.ts +5 -8
- package/src/components/confirm/props.ts +2 -2
- package/src/components/confirm/providerProps.ts +1 -2
- package/src/components/confirm/types.ts +15 -16
- package/src/components/confirm/useConfirm.ts +3 -1
- package/src/components/dialog/examples/index.stories.ts +5 -9
- package/src/components/dialog/style/Dialog.css.ts +38 -37
- package/src/components/dropdown/examples/index.stories.ts +3 -7
- package/src/components/dropdown/hooks.ts +20 -20
- package/src/components/dropdown/style/Dropdown.css.ts +24 -24
- package/src/components/dropdown/symbol.ts +3 -2
- package/src/components/form/Form.vue +1 -1
- package/src/components/form/examples/index.stories.ts +2 -4
- package/src/components/form/style/Form.css.ts +13 -8
- package/src/components/form/style/index.ts +2 -2
- package/src/components/form/symbol.ts +10 -5
- package/src/components/image/examples/index.stories.ts +5 -7
- package/src/components/input/Input.vue +8 -9
- package/src/components/input/examples/index.stories.ts +5 -7
- package/src/components/input/style/Input.css.ts +40 -43
- package/src/components/link/examples/index.stories.ts +4 -9
- package/src/components/messageprovider/examples/index.stories.ts +5 -8
- package/src/components/messageprovider/style/Message.css.ts +31 -31
- package/src/components/messageprovider/style/index.ts +1 -1
- package/src/components/messageprovider/types.ts +31 -22
- package/src/components/messageprovider/useMessage.ts +6 -4
- package/src/components/modal/examples/index.stories.ts +5 -10
- package/src/components/modal/style/Modal.css.ts +76 -73
- package/src/components/pagination/examples/index.stories.ts +5 -9
- package/src/components/pagination/examples/index.ts +1 -1
- package/src/components/pagination/style/Pagination.css.ts +41 -37
- package/src/components/radio/Radio.vue +7 -7
- package/src/components/radio/examples/index.stories.ts +4 -9
- package/src/components/radio/examples/index.ts +0 -1
- package/src/components/radio/style/Checkbox.css.ts +30 -31
- package/src/components/radio/style/index.ts +1 -1
- package/src/components/radiobutton/RadioButton.vue +3 -3
- package/src/components/radiobutton/style/RadioButton.css.ts +41 -36
- package/src/components/radiobuttongroup/examples/index.stories.ts +6 -10
- package/src/components/radiobuttongroup/examples/index.ts +0 -1
- package/src/components/radiobuttongroup/style/RadioButtonGroup.css.ts +14 -14
- package/src/components/radiobuttongroup/style/index.ts +1 -1
- package/src/components/radiobuttongroup/symbol.ts +8 -7
- package/src/components/renderer/examlpes/index.stories.ts +4 -8
- package/src/components/renderer/props.ts +2 -3
- package/src/components/renderer/renderer.ts +3 -3
- package/src/components/select/Select.vue +3 -4
- package/src/components/select/examples/index.stories.ts +4 -10
- package/src/components/select/style/Select.css.ts +62 -61
- package/src/components/skeleton/examples/index.stories.ts +5 -9
- package/src/components/skeleton/style/Skeleton.css.ts +16 -16
- package/src/components/skeleton/style/index.ts +2 -2
- package/src/components/slider/style/Slider.css.ts +12 -5
- package/src/components/switch/Switch.vue +4 -4
- package/src/components/switch/examples/index.stories.ts +4 -9
- package/src/components/switch/examples/index.ts +0 -1
- package/src/components/switch/style/Switch.css.ts +56 -57
- package/src/components/switch/style/index.ts +1 -1
- package/src/components/tab/examples/index.stories.ts +5 -11
- package/src/components/table/examples/index.stories.ts +6 -12
- package/src/components/table/style/Table.css.ts +22 -17
- package/src/components/table/style/index.ts +1 -1
- package/src/components/table/types/index.ts +1 -1
- package/src/components/tag/examples/index.stories.ts +4 -10
- package/src/components/tag/style/Tag.css.ts +14 -9
- package/src/components/textarea/Textarea.vue +7 -8
- package/src/components/textarea/examples/index.stories.ts +4 -8
- package/src/components/textarea/style/Textarea.css.ts +33 -33
- package/src/components/tooltip/examples/index.stories.ts +5 -10
- package/src/components/tooltip/examples/index.ts +2 -2
- package/src/components/tooltip/style/Tooltip.css.ts +24 -25
- package/src/components/transfer/examples/index.stories.ts +5 -9
- package/src/components/transfer/style/Transfer.css.ts +41 -40
- package/src/components/tree/examples/index.stories.ts +6 -10
- package/src/components/tree/props.ts +20 -18
- package/src/components/tree/style/Tree.css.ts +36 -31
- package/src/components/tree/types.ts +60 -62
- package/src/components/virtualscroll/examples/index.stories.ts +4 -8
- package/src/components/virtualscroll/style/VirtualScroll.css.ts +1 -2
- package/src/composables/element.ts +4 -4
- package/src/composables/useCachedUid.ts +7 -6
- package/src/composables/useEventListener.ts +11 -6
- package/src/composables/useInput.ts +63 -41
- package/src/composables/useInteractive.ts +10 -11
- package/src/composables/useMergedState.ts +7 -7
- package/src/composables/useMount.ts +11 -11
- package/src/composables/usePopper.ts +57 -36
- package/src/composables/useZIndex.ts +5 -5
- package/src/create.ts +10 -6
- package/src/examples/cards/cards.stories.ts +3 -3
- package/src/examples/modal/modal.stories.ts +3 -3
- package/src/exports/nuxt.js +17 -15
- package/src/exports/nuxt.plugin.js +6 -6
- package/src/index.ts +0 -2
- package/src/install.ts +5 -5
- package/src/shims-vue.d.ts +3 -3
- package/src/styles/theme.css.ts +51 -43
- package/src/styles/transitions.css.ts +26 -28
- package/src/types/props.ts +16 -2
- package/src/utils/injection.ts +3 -3
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
createVar,
|
|
3
|
+
globalStyle,
|
|
4
|
+
style,
|
|
5
|
+
styleVariants
|
|
6
|
+
} from '@vanilla-extract/css';
|
|
7
|
+
import { themeVars } from '../../../styles/theme.css';
|
|
3
8
|
|
|
4
9
|
const sizes = {
|
|
5
10
|
xs: '22px',
|
|
6
11
|
sm: '28px',
|
|
7
12
|
md: '36px',
|
|
8
13
|
lg: '40px',
|
|
9
|
-
xl: '45px'
|
|
14
|
+
xl: '45px'
|
|
10
15
|
};
|
|
11
16
|
|
|
12
17
|
const borderRadiuses = {
|
|
@@ -14,7 +19,7 @@ const borderRadiuses = {
|
|
|
14
19
|
sm: '3px',
|
|
15
20
|
md: '4px',
|
|
16
21
|
lg: '6px',
|
|
17
|
-
xl: '8px'
|
|
22
|
+
xl: '8px'
|
|
18
23
|
};
|
|
19
24
|
|
|
20
25
|
const padding = {
|
|
@@ -22,8 +27,8 @@ const padding = {
|
|
|
22
27
|
sm: `0 ${themeVars.space[2]}`,
|
|
23
28
|
md: `0 ${themeVars.space[3]}`,
|
|
24
29
|
lg: `0 ${themeVars.space[3]}`,
|
|
25
|
-
xl: `0 ${themeVars.space[4]}
|
|
26
|
-
}
|
|
30
|
+
xl: `0 ${themeVars.space[4]}`
|
|
31
|
+
};
|
|
27
32
|
|
|
28
33
|
export const vars = {
|
|
29
34
|
height: createVar(),
|
|
@@ -32,18 +37,18 @@ export const vars = {
|
|
|
32
37
|
backgroundColor: createVar(),
|
|
33
38
|
borderColor: createVar(),
|
|
34
39
|
boxShadowColor: createVar(),
|
|
35
|
-
color: createVar()
|
|
36
|
-
}
|
|
40
|
+
color: createVar()
|
|
41
|
+
};
|
|
37
42
|
|
|
38
43
|
export const base = style({
|
|
39
44
|
vars: {
|
|
40
|
-
[vars.borderColor]:
|
|
45
|
+
[vars.borderColor]: 'transparent'
|
|
41
46
|
},
|
|
42
47
|
alignItems: 'center',
|
|
43
48
|
boxSizing: 'border-box',
|
|
44
49
|
display: 'inline-flex',
|
|
45
50
|
fontSize: themeVars.fontSize.base,
|
|
46
|
-
fontWeight:
|
|
51
|
+
fontWeight: '500',
|
|
47
52
|
maxWidth: '100%',
|
|
48
53
|
width: 'auto',
|
|
49
54
|
position: 'relative',
|
|
@@ -56,7 +61,7 @@ export const base = style({
|
|
|
56
61
|
lineHeight: vars.height,
|
|
57
62
|
borderRadius: vars.radius,
|
|
58
63
|
padding: vars.padding,
|
|
59
|
-
zIndex:
|
|
64
|
+
zIndex: 'auto',
|
|
60
65
|
backgroundColor: vars.backgroundColor,
|
|
61
66
|
border: `1px solid ${vars.borderColor}`,
|
|
62
67
|
color: vars.color,
|
|
@@ -66,30 +71,30 @@ export const base = style({
|
|
|
66
71
|
border-color .3s ${themeVars.transition.default}`,
|
|
67
72
|
fontFamily: 'inherit',
|
|
68
73
|
':hover': {
|
|
69
|
-
cursor: 'pointer'
|
|
74
|
+
cursor: 'pointer'
|
|
70
75
|
},
|
|
71
76
|
':focus': {
|
|
72
|
-
outline: 'none'
|
|
77
|
+
outline: 'none'
|
|
73
78
|
}
|
|
74
79
|
});
|
|
75
80
|
|
|
76
81
|
export const variant = styleVariants({
|
|
77
82
|
active: {
|
|
78
83
|
vars: {
|
|
79
|
-
[vars.backgroundColor]:
|
|
84
|
+
[vars.backgroundColor]: 'white',
|
|
80
85
|
[vars.color]: themeVars.color.blue[500],
|
|
81
86
|
[vars.boxShadowColor]: themeVars.color.gray[900],
|
|
82
|
-
[vars.borderColor]: themeVars.color.gray[200]
|
|
87
|
+
[vars.borderColor]: themeVars.color.gray[200]
|
|
83
88
|
},
|
|
84
89
|
boxShadow: `0 .5px 0px 4px rgba(0, 0, 0, 0.01)`,
|
|
85
90
|
':hover': {
|
|
86
91
|
vars: {
|
|
87
|
-
[vars.color]: themeVars.color.blue[600]
|
|
88
|
-
}
|
|
92
|
+
[vars.color]: themeVars.color.blue[600]
|
|
93
|
+
}
|
|
89
94
|
},
|
|
90
95
|
':focus': {
|
|
91
96
|
vars: {
|
|
92
|
-
[vars.color]: themeVars.color.blue[500]
|
|
97
|
+
[vars.color]: themeVars.color.blue[500]
|
|
93
98
|
}
|
|
94
99
|
}
|
|
95
100
|
},
|
|
@@ -98,16 +103,16 @@ export const variant = styleVariants({
|
|
|
98
103
|
[vars.color]: themeVars.color.gray[400],
|
|
99
104
|
[vars.backgroundColor]: 'transparent',
|
|
100
105
|
[vars.boxShadowColor]: themeVars.color.blue[500],
|
|
101
|
-
[vars.borderColor]:
|
|
106
|
+
[vars.borderColor]: 'transparent'
|
|
102
107
|
},
|
|
103
108
|
':hover': {
|
|
104
109
|
vars: {
|
|
105
|
-
[vars.color]: themeVars.color.blue[400]
|
|
106
|
-
}
|
|
110
|
+
[vars.color]: themeVars.color.blue[400]
|
|
111
|
+
}
|
|
107
112
|
},
|
|
108
113
|
':focus': {
|
|
109
114
|
vars: {
|
|
110
|
-
[vars.color]: themeVars.color.blue[400]
|
|
115
|
+
[vars.color]: themeVars.color.blue[400]
|
|
111
116
|
}
|
|
112
117
|
}
|
|
113
118
|
}
|
|
@@ -118,41 +123,41 @@ export const size = styleVariants({
|
|
|
118
123
|
vars: {
|
|
119
124
|
[vars.height]: sizes.xs,
|
|
120
125
|
[vars.radius]: borderRadiuses.xs,
|
|
121
|
-
[vars.padding]: padding.xs
|
|
126
|
+
[vars.padding]: padding.xs
|
|
122
127
|
},
|
|
123
|
-
fontSize: themeVars.fontSize.small
|
|
128
|
+
fontSize: themeVars.fontSize.small
|
|
124
129
|
},
|
|
125
130
|
sm: {
|
|
126
131
|
vars: {
|
|
127
132
|
[vars.height]: sizes.sm,
|
|
128
133
|
[vars.radius]: borderRadiuses.sm,
|
|
129
|
-
[vars.padding]: padding.sm
|
|
134
|
+
[vars.padding]: padding.sm
|
|
130
135
|
},
|
|
131
|
-
fontSize: themeVars.fontSize.small
|
|
136
|
+
fontSize: themeVars.fontSize.small
|
|
132
137
|
},
|
|
133
138
|
md: {
|
|
134
139
|
vars: {
|
|
135
140
|
[vars.height]: sizes.md,
|
|
136
141
|
[vars.radius]: borderRadiuses.md,
|
|
137
|
-
[vars.padding]: padding.md
|
|
138
|
-
}
|
|
142
|
+
[vars.padding]: padding.md
|
|
143
|
+
}
|
|
139
144
|
},
|
|
140
145
|
lg: {
|
|
141
146
|
vars: {
|
|
142
147
|
[vars.height]: sizes.lg,
|
|
143
148
|
[vars.radius]: borderRadiuses.lg,
|
|
144
|
-
[vars.padding]: padding.lg
|
|
149
|
+
[vars.padding]: padding.lg
|
|
145
150
|
},
|
|
146
|
-
fontSize: themeVars.fontSize.large
|
|
151
|
+
fontSize: themeVars.fontSize.large
|
|
147
152
|
},
|
|
148
153
|
xl: {
|
|
149
154
|
vars: {
|
|
150
155
|
[vars.height]: sizes.xl,
|
|
151
156
|
[vars.radius]: borderRadiuses.xl,
|
|
152
|
-
[vars.padding]: padding.xl
|
|
157
|
+
[vars.padding]: padding.xl
|
|
153
158
|
},
|
|
154
|
-
fontSize: themeVars.fontSize.large
|
|
155
|
-
}
|
|
159
|
+
fontSize: themeVars.fontSize.large
|
|
160
|
+
}
|
|
156
161
|
});
|
|
157
162
|
|
|
158
163
|
export const icon = style({
|
|
@@ -173,12 +178,12 @@ globalStyle(`${icon} > svg`, {
|
|
|
173
178
|
});
|
|
174
179
|
|
|
175
180
|
export const radio = style({
|
|
176
|
-
pointerEvents:
|
|
177
|
-
position:
|
|
181
|
+
pointerEvents: 'none',
|
|
182
|
+
position: 'absolute',
|
|
178
183
|
border: 0,
|
|
179
184
|
left: 0,
|
|
180
185
|
right: 0,
|
|
181
186
|
top: 0,
|
|
182
187
|
bottom: 0,
|
|
183
188
|
opacity: 0
|
|
184
|
-
})
|
|
189
|
+
});
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import MRadioButtonGroup from
|
|
2
|
-
import MRadioButton from
|
|
3
|
-
import {
|
|
4
|
-
MRadioButtonGroupBasic,
|
|
5
|
-
} from "./index";
|
|
1
|
+
import MRadioButtonGroup from '../RadioButtonGroup.vue';
|
|
2
|
+
import MRadioButton from '../../radiobutton/RadioButton.vue';
|
|
3
|
+
import { MRadioButtonGroupBasic } from './index';
|
|
6
4
|
|
|
7
|
-
import {
|
|
8
|
-
createStory, sizeArgType, colorArgType
|
|
9
|
-
} from "../../../__storybook__";
|
|
5
|
+
import { createStory, sizeArgType, colorArgType } from '../../../__storybook__';
|
|
10
6
|
|
|
11
7
|
export default {
|
|
12
8
|
component: MRadioButtonGroup,
|
|
@@ -15,8 +11,8 @@ export default {
|
|
|
15
11
|
},
|
|
16
12
|
title: 'Components/Radio Button Group',
|
|
17
13
|
argTypes: {
|
|
18
|
-
...sizeArgType()
|
|
14
|
+
...sizeArgType()
|
|
19
15
|
}
|
|
20
|
-
}
|
|
16
|
+
};
|
|
21
17
|
|
|
22
18
|
export const Basic = createStory(MRadioButtonGroupBasic);
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import {createVar, globalStyle, style} from
|
|
2
|
-
import {base as button} from
|
|
3
|
-
import {themeVars} from
|
|
1
|
+
import { createVar, globalStyle, style } from '@vanilla-extract/css';
|
|
2
|
+
import { base as button } from '../../radiobutton/style/RadioButton.css';
|
|
3
|
+
import { themeVars } from '../../../styles/theme.css';
|
|
4
4
|
|
|
5
5
|
const vars = {
|
|
6
6
|
padding: createVar(),
|
|
7
7
|
borderRadius: createVar(),
|
|
8
8
|
gap: createVar()
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
|
|
11
11
|
export const base = style({
|
|
12
12
|
vars: {
|
|
13
13
|
[vars.padding]: themeVars.space[1],
|
|
14
14
|
[vars.borderRadius]: themeVars.rounded.default,
|
|
15
|
-
[vars.gap]: themeVars.space[1]
|
|
15
|
+
[vars.gap]: themeVars.space[1]
|
|
16
16
|
},
|
|
17
|
-
display:
|
|
18
|
-
position:
|
|
19
|
-
flexWrap:
|
|
17
|
+
display: 'inline-flex',
|
|
18
|
+
position: 'relative',
|
|
19
|
+
flexWrap: 'nowrap',
|
|
20
20
|
backgroundColor: themeVars.color.gray[100],
|
|
21
21
|
padding: vars.padding,
|
|
22
22
|
borderRadius: vars.borderRadius,
|
|
23
|
-
gap: vars.gap
|
|
23
|
+
gap: vars.gap
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
export const vertical = style({
|
|
27
|
-
flexDirection:
|
|
27
|
+
flexDirection: 'column'
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
export const block = style({
|
|
31
|
-
display:
|
|
32
|
-
alignItems:
|
|
31
|
+
display: 'flex',
|
|
32
|
+
alignItems: 'stretch'
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
globalStyle(`${base}${block} > ${button}`, {
|
|
36
|
-
flex: 1
|
|
37
|
-
});
|
|
36
|
+
flex: 1
|
|
37
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './RadioButtonGroup.css';
|
|
1
|
+
export * from './RadioButtonGroup.css';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type {InjectionKey} from
|
|
2
|
-
import type {Size} from
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
import type { Size } from '../../types/props';
|
|
3
3
|
|
|
4
4
|
export interface RadioButtonGroupState {
|
|
5
|
-
size: Size
|
|
6
|
-
name: string
|
|
7
|
-
modelValue: string | number
|
|
8
|
-
doUpdateValue: (value: string | number) => void
|
|
5
|
+
size: Size;
|
|
6
|
+
name: string;
|
|
7
|
+
modelValue: string | number;
|
|
8
|
+
doUpdateValue: (value: string | number) => void;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export const RADIO_BUTTON_GROUP_STATE: InjectionKey<RadioButtonGroupState> =
|
|
11
|
+
export const RADIO_BUTTON_GROUP_STATE: InjectionKey<RadioButtonGroupState> =
|
|
12
|
+
Symbol('RADIO_BUTTON_GROUP_STATE');
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import MRenderer from
|
|
2
|
-
import {
|
|
3
|
-
MRendererBasic,
|
|
4
|
-
} from "./index";
|
|
1
|
+
import MRenderer from '../renderer';
|
|
2
|
+
import { MRendererBasic } from './index';
|
|
5
3
|
|
|
6
|
-
import {
|
|
7
|
-
createStory, sizeArgType
|
|
8
|
-
} from "../../../__storybook__";
|
|
4
|
+
import { createStory, sizeArgType } from '../../../__storybook__';
|
|
9
5
|
|
|
10
6
|
export default {
|
|
11
7
|
component: MRenderer,
|
|
@@ -13,6 +9,6 @@ export default {
|
|
|
13
9
|
argTypes: {
|
|
14
10
|
...sizeArgType()
|
|
15
11
|
}
|
|
16
|
-
}
|
|
12
|
+
};
|
|
17
13
|
|
|
18
14
|
export const Basic = createStory(MRendererBasic);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
export const rendererProps = {
|
|
5
4
|
h: {
|
|
6
5
|
type: Function,
|
|
@@ -10,6 +9,6 @@ export const rendererProps = {
|
|
|
10
9
|
type: Object as PropType<Record<string, any>>,
|
|
11
10
|
default: undefined
|
|
12
11
|
}
|
|
13
|
-
}
|
|
12
|
+
};
|
|
14
13
|
|
|
15
|
-
export type RendererProps = ExtractPropTypes<typeof rendererProps
|
|
14
|
+
export type RendererProps = ExtractPropTypes<typeof rendererProps>;
|
|
@@ -2,7 +2,7 @@ import { defineComponent, renderSlot } from 'vue';
|
|
|
2
2
|
import { rendererProps } from './props';
|
|
3
3
|
|
|
4
4
|
export default defineComponent({
|
|
5
|
-
name:
|
|
5
|
+
name: 'Renderer',
|
|
6
6
|
props: rendererProps,
|
|
7
7
|
setup(props, { slots }) {
|
|
8
8
|
return () => {
|
|
@@ -11,6 +11,6 @@ export default defineComponent({
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
return props.h(props.props);
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
}
|
|
16
|
-
})
|
|
16
|
+
});
|
|
@@ -105,7 +105,6 @@ import {
|
|
|
105
105
|
ref,
|
|
106
106
|
watch,
|
|
107
107
|
watchEffect,
|
|
108
|
-
defineExpose,
|
|
109
108
|
type PropType
|
|
110
109
|
} from "vue";
|
|
111
110
|
import MTag from "../tag/Tag.vue";
|
|
@@ -189,7 +188,7 @@ export default defineComponent({
|
|
|
189
188
|
components: {
|
|
190
189
|
MTag
|
|
191
190
|
},
|
|
192
|
-
setup(props, {emit}) {
|
|
191
|
+
setup(props, {emit, expose}) {
|
|
193
192
|
const container = ref<HTMLElement | null>(null);
|
|
194
193
|
const wrapper = ref<HTMLElement>();
|
|
195
194
|
const optionsRef = ref<HTMLElement[]>();
|
|
@@ -632,9 +631,9 @@ export default defineComponent({
|
|
|
632
631
|
}
|
|
633
632
|
}
|
|
634
633
|
|
|
635
|
-
|
|
634
|
+
expose({
|
|
636
635
|
focus,
|
|
637
|
-
blur
|
|
636
|
+
blur
|
|
638
637
|
})
|
|
639
638
|
|
|
640
639
|
return {
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import MSelect from
|
|
2
|
-
import {
|
|
3
|
-
MSelectBasic,
|
|
4
|
-
MSelectSearchable,
|
|
5
|
-
MSelectMultiple,
|
|
6
|
-
} from "./index";
|
|
1
|
+
import MSelect from '../Select.vue';
|
|
2
|
+
import { MSelectBasic, MSelectSearchable, MSelectMultiple } from './index';
|
|
7
3
|
|
|
8
|
-
import {
|
|
9
|
-
createStory, sizeArgType
|
|
10
|
-
} from "../../../__storybook__";
|
|
4
|
+
import { createStory, sizeArgType } from '../../../__storybook__';
|
|
11
5
|
|
|
12
6
|
export default {
|
|
13
7
|
component: MSelect,
|
|
@@ -15,7 +9,7 @@ export default {
|
|
|
15
9
|
argTypes: {
|
|
16
10
|
...sizeArgType()
|
|
17
11
|
}
|
|
18
|
-
}
|
|
12
|
+
};
|
|
19
13
|
|
|
20
14
|
export const Basic = createStory(MSelectBasic);
|
|
21
15
|
export const Searchable = createStory(MSelectSearchable);
|