@teammodlr/ui-kit 2.1.7 → 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/TreeNode.vue.d.ts +2 -0
- package/lib/components/tree/TreeNodeToggle.vue.d.ts +7 -1
- package/lib/components/tree/props.d.ts +4 -4
- package/lib/components/tree/style/Tree.css.d.ts +7 -0
- package/lib/components/tree/style/index.d.ts +1 -0
- package/lib/components/tree/types.d.ts +11 -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 +2522 -2490
- package/lib/install.d.ts +1 -1
- package/lib/nuxt.js +17 -15
- package/lib/nuxt.plugin.js +6 -6
- package/lib/style.css +1 -1
- 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/Tree.vue +110 -109
- package/src/components/tree/TreeNode.vue +29 -23
- package/src/components/tree/TreeNodeToggle.vue +37 -25
- package/src/components/tree/examples/basic.vue +1 -1
- 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 +75 -0
- package/src/components/tree/style/index.ts +1 -0
- package/src/components/tree/types.ts +60 -61
- 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,4 +1,4 @@
|
|
|
1
|
-
import MAvatar from
|
|
1
|
+
import MAvatar from '../Avatar.vue';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
MAvatarBasic,
|
|
@@ -6,12 +6,9 @@ import {
|
|
|
6
6
|
MAvatarCustomSize,
|
|
7
7
|
MAvatarVariant,
|
|
8
8
|
MAvatarSlot
|
|
9
|
-
} from
|
|
9
|
+
} from './index';
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
colorArgType,
|
|
13
|
-
createStory, sizeArgType
|
|
14
|
-
} from "../../../__storybook__";
|
|
11
|
+
import { colorArgType, createStory, sizeArgType } from '../../../__storybook__';
|
|
15
12
|
|
|
16
13
|
export default {
|
|
17
14
|
component: MAvatar,
|
|
@@ -19,7 +16,7 @@ export default {
|
|
|
19
16
|
argTypes: {
|
|
20
17
|
...sizeArgType()
|
|
21
18
|
}
|
|
22
|
-
}
|
|
19
|
+
};
|
|
23
20
|
|
|
24
21
|
export const Basic = createStory(MAvatarBasic);
|
|
25
22
|
export const Sizes = createStory(MAvatarSize);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { createVar, style, styleVariants } from
|
|
2
|
-
import { themeVars } from
|
|
1
|
+
import { createVar, style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
+
import { themeVars } from '../../../styles/theme.css';
|
|
3
3
|
|
|
4
4
|
const sizes = {
|
|
5
5
|
xs: '16px',
|
|
6
6
|
sm: '24px',
|
|
7
7
|
md: '32px',
|
|
8
8
|
lg: '40px',
|
|
9
|
-
xl: '96px'
|
|
9
|
+
xl: '96px'
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const borderRadiuses = {
|
|
@@ -14,12 +14,12 @@ const borderRadiuses = {
|
|
|
14
14
|
sm: '3px',
|
|
15
15
|
md: '4px',
|
|
16
16
|
lg: '6px',
|
|
17
|
-
xl: '8px'
|
|
17
|
+
xl: '8px'
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export const vars = {
|
|
21
21
|
size: createVar(),
|
|
22
|
-
radius: createVar()
|
|
22
|
+
radius: createVar()
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export const base = style({
|
|
@@ -47,33 +47,33 @@ export const size = styleVariants({
|
|
|
47
47
|
xs: {
|
|
48
48
|
vars: {
|
|
49
49
|
[vars.size]: sizes.xs,
|
|
50
|
-
[vars.radius]: borderRadiuses.xs
|
|
50
|
+
[vars.radius]: borderRadiuses.xs
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
sm: {
|
|
54
54
|
vars: {
|
|
55
55
|
[vars.size]: sizes.sm,
|
|
56
|
-
[vars.radius]: borderRadiuses.sm
|
|
57
|
-
}
|
|
56
|
+
[vars.radius]: borderRadiuses.sm
|
|
57
|
+
}
|
|
58
58
|
},
|
|
59
59
|
md: {
|
|
60
60
|
vars: {
|
|
61
61
|
[vars.size]: sizes.md,
|
|
62
|
-
[vars.radius]: borderRadiuses.md
|
|
63
|
-
}
|
|
62
|
+
[vars.radius]: borderRadiuses.md
|
|
63
|
+
}
|
|
64
64
|
},
|
|
65
65
|
lg: {
|
|
66
66
|
vars: {
|
|
67
67
|
[vars.size]: sizes.lg,
|
|
68
|
-
[vars.radius]: borderRadiuses.lg
|
|
69
|
-
}
|
|
68
|
+
[vars.radius]: borderRadiuses.lg
|
|
69
|
+
}
|
|
70
70
|
},
|
|
71
71
|
xl: {
|
|
72
72
|
vars: {
|
|
73
73
|
[vars.size]: sizes.xl,
|
|
74
|
-
[vars.radius]: borderRadiuses.xl
|
|
75
|
-
}
|
|
76
|
-
}
|
|
74
|
+
[vars.radius]: borderRadiuses.xl
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
export const image = style({
|
|
@@ -81,10 +81,10 @@ export const image = style({
|
|
|
81
81
|
width: '100%',
|
|
82
82
|
height: '100%',
|
|
83
83
|
flex: '1 1 100%'
|
|
84
|
-
})
|
|
84
|
+
});
|
|
85
85
|
|
|
86
86
|
export const rounded = style({
|
|
87
|
-
borderRadius: '9999px'
|
|
87
|
+
borderRadius: '9999px'
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
export const outline = style({
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import MAvatarGroup from
|
|
2
|
-
import MAvatar from
|
|
1
|
+
import MAvatarGroup from '../AvatarGroup.vue';
|
|
2
|
+
import MAvatar from '../../avatar/Avatar.vue';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
MAvatarGroupBasic
|
|
6
|
-
} from "./index";
|
|
4
|
+
import { MAvatarGroupBasic } from './index';
|
|
7
5
|
|
|
8
|
-
import {
|
|
9
|
-
createStory,
|
|
10
|
-
sizeArgType
|
|
11
|
-
} from "../../../__storybook__";
|
|
6
|
+
import { createStory, sizeArgType } from '../../../__storybook__';
|
|
12
7
|
|
|
13
8
|
export default {
|
|
14
9
|
component: MAvatarGroup,
|
|
@@ -19,6 +14,6 @@ export default {
|
|
|
19
14
|
argTypes: {
|
|
20
15
|
...sizeArgType()
|
|
21
16
|
}
|
|
22
|
-
}
|
|
17
|
+
};
|
|
23
18
|
|
|
24
19
|
export const Basic = createStory(MAvatarGroupBasic);
|
|
@@ -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: '16px',
|
|
6
11
|
sm: '24px',
|
|
7
12
|
md: '32px',
|
|
8
13
|
lg: '40px',
|
|
9
|
-
xl: '96px'
|
|
14
|
+
xl: '96px'
|
|
10
15
|
};
|
|
11
16
|
|
|
12
17
|
export const base = style({
|
|
@@ -17,5 +22,5 @@ export const base = style({
|
|
|
17
22
|
});
|
|
18
23
|
|
|
19
24
|
export const item = style({
|
|
20
|
-
marginRight: '-10px'
|
|
25
|
+
marginRight: '-10px'
|
|
21
26
|
});
|
|
@@ -1,12 +1,11 @@
|
|
|
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 type Options = {
|
|
5
5
|
src: string;
|
|
6
6
|
srcSet: string;
|
|
7
7
|
alt: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
8
|
+
};
|
|
10
9
|
|
|
11
10
|
export interface AvatarGroupState {
|
|
12
11
|
max: number;
|
|
@@ -14,4 +13,5 @@ export interface AvatarGroupState {
|
|
|
14
13
|
rounded: boolean;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
|
-
export const AVATAR_GROUP_STATE: InjectionKey<AvatarGroupState> =
|
|
16
|
+
export const AVATAR_GROUP_STATE: InjectionKey<AvatarGroupState> =
|
|
17
|
+
Symbol('AVATAR_GROUP_STATE');
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import MBadge from
|
|
1
|
+
import MBadge from '../Badge.vue';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
MBadgeBasic,
|
|
5
|
-
} from "./index";
|
|
3
|
+
import { MBadgeBasic } from './index';
|
|
6
4
|
|
|
7
5
|
import {
|
|
8
6
|
variantArgType,
|
|
9
7
|
createStory,
|
|
10
8
|
sizeArgType
|
|
11
|
-
} from
|
|
9
|
+
} from '../../../__storybook__';
|
|
12
10
|
|
|
13
11
|
export default {
|
|
14
12
|
component: MBadge,
|
|
@@ -16,6 +14,6 @@ export default {
|
|
|
16
14
|
argTypes: {
|
|
17
15
|
...variantArgType()
|
|
18
16
|
}
|
|
19
|
-
}
|
|
17
|
+
};
|
|
20
18
|
|
|
21
19
|
export const Basic = createStory(MBadgeBasic);
|
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
import {createVar, style, styleVariants} from
|
|
2
|
-
import {themeVars} from
|
|
1
|
+
import { createVar, style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
+
import { themeVars } from '../../../styles/theme.css';
|
|
3
3
|
|
|
4
4
|
const borderRadiuses = {
|
|
5
5
|
xs: '2px',
|
|
6
6
|
sm: '3px',
|
|
7
7
|
md: '4px',
|
|
8
8
|
lg: '6px',
|
|
9
|
-
xl: '8px'
|
|
9
|
+
xl: '8px'
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const vars = {
|
|
13
13
|
color: createVar(),
|
|
14
14
|
backgroundColor: createVar(),
|
|
15
|
-
radius: createVar()
|
|
15
|
+
radius: createVar()
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export const base = style({
|
|
19
19
|
vars: {
|
|
20
|
-
[vars.radius]: borderRadiuses.md
|
|
20
|
+
[vars.radius]: borderRadiuses.md
|
|
21
21
|
},
|
|
22
|
-
boxSizing:
|
|
23
|
-
appearance:
|
|
22
|
+
boxSizing: 'border-box',
|
|
23
|
+
appearance: 'none',
|
|
24
24
|
border: 0,
|
|
25
|
-
display:
|
|
26
|
-
position:
|
|
25
|
+
display: 'inline-flex',
|
|
26
|
+
position: 'static',
|
|
27
27
|
borderRadius: vars.radius,
|
|
28
28
|
backgroundColor: vars.backgroundColor,
|
|
29
|
-
overflow:
|
|
30
|
-
padding: `${themeVars.space['0.5']} ${themeVars.space[1]}
|
|
31
|
-
})
|
|
29
|
+
overflow: 'hidden',
|
|
30
|
+
padding: `${themeVars.space['0.5']} ${themeVars.space[1]}`
|
|
31
|
+
});
|
|
32
32
|
|
|
33
33
|
export const text = style({
|
|
34
34
|
color: vars.color,
|
|
35
35
|
margin: 0,
|
|
36
36
|
padding: 0,
|
|
37
37
|
fontSize: themeVars.fontSize.xsmall,
|
|
38
|
-
fontWeight:
|
|
38
|
+
fontWeight: '500',
|
|
39
39
|
letterSpacing: '0.5px',
|
|
40
40
|
textTransform: 'uppercase',
|
|
41
41
|
lineHeight: themeVars.fontSize.base,
|
|
42
42
|
overflow: 'hidden',
|
|
43
43
|
textOverflow: 'ellipsis',
|
|
44
|
-
whiteSpace: 'nowrap'
|
|
45
|
-
})
|
|
44
|
+
whiteSpace: 'nowrap'
|
|
45
|
+
});
|
|
46
46
|
|
|
47
47
|
export const variant = styleVariants({
|
|
48
48
|
primary: {
|
|
49
49
|
vars: {
|
|
50
50
|
[vars.backgroundColor]: themeVars.color.blue[500],
|
|
51
|
-
[vars.color]: '#FFFFFF'
|
|
51
|
+
[vars.color]: '#FFFFFF'
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
dark: {
|
|
55
55
|
vars: {
|
|
56
56
|
[vars.backgroundColor]: themeVars.color.saxe[800],
|
|
57
|
-
[vars.color]: '#FFFFFF'
|
|
58
|
-
}
|
|
57
|
+
[vars.color]: '#FFFFFF'
|
|
58
|
+
}
|
|
59
59
|
},
|
|
60
60
|
default: {
|
|
61
61
|
vars: {
|
|
62
62
|
[vars.color]: 'white',
|
|
63
|
-
[vars.backgroundColor]: themeVars.color.gray[500]
|
|
64
|
-
}
|
|
63
|
+
[vars.backgroundColor]: themeVars.color.gray[500]
|
|
64
|
+
}
|
|
65
65
|
},
|
|
66
66
|
tertiary: {
|
|
67
67
|
vars: {
|
|
68
68
|
[vars.color]: themeVars.color.gray[100],
|
|
69
|
-
[vars.backgroundColor]: themeVars.color.gray[400]
|
|
70
|
-
}
|
|
69
|
+
[vars.backgroundColor]: themeVars.color.gray[400]
|
|
70
|
+
}
|
|
71
71
|
},
|
|
72
72
|
success: {
|
|
73
73
|
vars: {
|
|
74
74
|
[vars.backgroundColor]: themeVars.color.green[500],
|
|
75
|
-
[vars.color]: '#FFFFFF'
|
|
75
|
+
[vars.color]: '#FFFFFF'
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
warning: {
|
|
79
79
|
vars: {
|
|
80
80
|
[vars.backgroundColor]: themeVars.color.amber[400],
|
|
81
|
-
[vars.color]: themeVars.color.gray[800]
|
|
81
|
+
[vars.color]: themeVars.color.gray[800]
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
error: {
|
|
85
85
|
vars: {
|
|
86
86
|
[vars.backgroundColor]: themeVars.color.red[500],
|
|
87
|
-
[vars.color]: '#FFFFFF'
|
|
87
|
+
[vars.color]: '#FFFFFF'
|
|
88
88
|
}
|
|
89
|
-
}
|
|
89
|
+
}
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
export const secondary = styleVariants({
|
|
93
93
|
primary: {
|
|
94
94
|
vars: {
|
|
95
95
|
[vars.backgroundColor]: themeVars.color.blue[100],
|
|
96
|
-
[vars.color]: themeVars.color.blue[600]
|
|
96
|
+
[vars.color]: themeVars.color.blue[600]
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
dark: {
|
|
100
100
|
vars: {
|
|
101
101
|
[vars.backgroundColor]: themeVars.color.saxe[100],
|
|
102
|
-
[vars.color]: themeVars.color.saxe[900]
|
|
102
|
+
[vars.color]: themeVars.color.saxe[900]
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
default: {
|
|
106
106
|
vars: {
|
|
107
107
|
[vars.backgroundColor]: themeVars.color.gray[100],
|
|
108
|
-
[vars.color]: themeVars.color.gray[600]
|
|
109
|
-
}
|
|
108
|
+
[vars.color]: themeVars.color.gray[600]
|
|
109
|
+
}
|
|
110
110
|
},
|
|
111
111
|
tertiary: {
|
|
112
112
|
vars: {
|
|
113
113
|
[vars.backgroundColor]: themeVars.color.gray[100],
|
|
114
|
-
[vars.color]: themeVars.color.gray[400]
|
|
115
|
-
}
|
|
114
|
+
[vars.color]: themeVars.color.gray[400]
|
|
115
|
+
}
|
|
116
116
|
},
|
|
117
117
|
success: {
|
|
118
118
|
vars: {
|
|
119
119
|
[vars.backgroundColor]: themeVars.color.green[100],
|
|
120
|
-
[vars.color]: themeVars.color.green[600]
|
|
120
|
+
[vars.color]: themeVars.color.green[600]
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
warning: {
|
|
124
124
|
vars: {
|
|
125
125
|
[vars.backgroundColor]: themeVars.color.amber[100],
|
|
126
|
-
[vars.color]: themeVars.color.amber[600]
|
|
126
|
+
[vars.color]: themeVars.color.amber[600]
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
error: {
|
|
130
130
|
vars: {
|
|
131
131
|
[vars.backgroundColor]: themeVars.color.red[100],
|
|
132
|
-
[vars.color]: themeVars.color.red[600]
|
|
132
|
+
[vars.color]: themeVars.color.red[600]
|
|
133
133
|
}
|
|
134
|
-
}
|
|
134
|
+
}
|
|
135
135
|
});
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import MBreadcrumb from
|
|
2
|
-
import MBreadcrumbItem from
|
|
1
|
+
import MBreadcrumb from '../Breadcrumb.vue';
|
|
2
|
+
import MBreadcrumbItem from '../BreadcrumbItem.vue';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
MBreadcrumbBasic
|
|
6
|
-
} from "./index";
|
|
4
|
+
import { MBreadcrumbBasic } from './index';
|
|
7
5
|
|
|
8
|
-
import {
|
|
9
|
-
createStory
|
|
10
|
-
} from "../../../__storybook__";
|
|
6
|
+
import { createStory } from '../../../__storybook__';
|
|
11
7
|
|
|
12
8
|
export default {
|
|
13
9
|
component: MBreadcrumb,
|
|
14
10
|
subcomponents: {
|
|
15
11
|
MBreadcrumbItem
|
|
16
12
|
},
|
|
17
|
-
title: 'Components/Breadcrumb'
|
|
18
|
-
}
|
|
13
|
+
title: 'Components/Breadcrumb'
|
|
14
|
+
};
|
|
19
15
|
|
|
20
16
|
export const Basic = createStory(MBreadcrumbBasic);
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import {globalStyle, style} from
|
|
2
|
-
import {themeVars} from
|
|
1
|
+
import { globalStyle, style } from '@vanilla-extract/css';
|
|
2
|
+
import { themeVars } from '../../../styles/theme.css';
|
|
3
3
|
|
|
4
4
|
export const base = style({
|
|
5
|
-
display:
|
|
6
|
-
position:
|
|
5
|
+
display: 'flex',
|
|
6
|
+
position: 'relative',
|
|
7
7
|
margin: 0,
|
|
8
8
|
padding: 0,
|
|
9
|
-
listStyle:
|
|
10
|
-
boxSizing:
|
|
9
|
+
listStyle: 'none',
|
|
10
|
+
boxSizing: 'border-box'
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
export const item = style({
|
|
14
|
-
display:
|
|
15
|
-
alignItems:
|
|
16
|
-
fontSize: themeVars.fontSize.base
|
|
14
|
+
display: 'flex',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
fontSize: themeVars.fontSize.base
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
export const link = style({
|
|
20
20
|
padding: `0 ${themeVars.space[2]}`,
|
|
21
21
|
color: themeVars.color.gray[600],
|
|
22
|
-
cursor:
|
|
23
|
-
textDecoration:
|
|
22
|
+
cursor: 'pointer',
|
|
23
|
+
textDecoration: 'none',
|
|
24
24
|
outline: 0,
|
|
25
25
|
transition: `color 0.2s ${themeVars.transition.default}`,
|
|
26
|
-
|
|
27
|
-
color: themeVars.color.blue[500]
|
|
26
|
+
':hover': {
|
|
27
|
+
color: themeVars.color.blue[500]
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
export const separator = style({
|
|
32
32
|
padding: `0 ${themeVars.space[1]}`,
|
|
33
|
-
display:
|
|
33
|
+
display: 'inline-flex',
|
|
34
34
|
color: themeVars.color.gray[300],
|
|
35
|
-
userSelect:
|
|
35
|
+
userSelect: 'none'
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
globalStyle(`${base} ${item}:last-child ${separator}`, {
|
|
39
|
-
display:
|
|
40
|
-
});
|
|
39
|
+
display: 'none'
|
|
40
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './Breadcrumb.css';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {InjectionKey} from
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
2
|
|
|
3
3
|
export interface BreadcrumbOptions {
|
|
4
4
|
label: string;
|
|
@@ -11,7 +11,8 @@ export interface BreadcrumbItemState {
|
|
|
11
11
|
|
|
12
12
|
export interface BreadcrumbState {
|
|
13
13
|
separator: string;
|
|
14
|
-
refreshItems: () => void
|
|
14
|
+
refreshItems: () => void;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export const BREADCRUMB_STATE: InjectionKey<BreadcrumbState> =
|
|
17
|
+
export const BREADCRUMB_STATE: InjectionKey<BreadcrumbState> =
|
|
18
|
+
Symbol('BREADCRUMB_STATE');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import MButton from
|
|
1
|
+
import MButton from '../Button.vue';
|
|
2
2
|
import {
|
|
3
3
|
MButtonBasic,
|
|
4
4
|
MButtonSize,
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
MButtonDisabled,
|
|
9
9
|
MButtonIconLeft,
|
|
10
10
|
MButtonIcon
|
|
11
|
-
} from
|
|
11
|
+
} from './index';
|
|
12
12
|
|
|
13
13
|
import {
|
|
14
14
|
variantArgType,
|
|
15
15
|
createStory,
|
|
16
16
|
sizeArgType
|
|
17
|
-
} from
|
|
17
|
+
} from '../../../__storybook__';
|
|
18
18
|
|
|
19
19
|
export default {
|
|
20
20
|
component: MButton,
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
...variantArgType(),
|
|
24
24
|
...sizeArgType()
|
|
25
25
|
}
|
|
26
|
-
}
|
|
26
|
+
};
|
|
27
27
|
|
|
28
28
|
export const Basic = createStory(MButtonBasic);
|
|
29
29
|
export const Size = createStory(MButtonSize);
|