@teammodlr/ui-kit 3.0.0-beta.2 → 3.0.0-beta.20
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/colorpicker/ColorPicker.vue.d.ts +0 -1
- package/lib/components/colorpicker/style/ColorPicker.css.d.ts +1 -0
- package/lib/components/dialog/Dialog.vue.d.ts +6 -2
- package/lib/components/dialogprovider/types.d.ts +2 -0
- package/lib/components/drawer/Drawer.vue.d.ts +142 -0
- package/lib/components/drawer/style/Drawer.css.d.ts +33 -0
- package/lib/components/drawer/style/index.d.ts +1 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/messageprovider/MessageProvider.vue.d.ts +2 -0
- package/lib/components/messageprovider/style/Toaster.css.d.ts +1 -0
- package/lib/components/popover/Popover.vue.d.ts +113 -0
- package/lib/components/popover/style/Popover.css.d.ts +4 -0
- package/lib/components/popover/style/index.d.ts +1 -0
- package/lib/index.cjs.js +3 -3
- package/lib/index.es.js +5754 -5230
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/components/cardcontextmenu/style/Dropdown.css.ts +7 -0
- package/src/components/colorpicker/ColorPicker.vue +8 -11
- package/src/components/colorpicker/examples/basic.vue +8 -17
- package/src/components/colorpicker/style/ColorPicker.css.ts +6 -1
- package/src/components/dialog/Dialog.vue +32 -13
- package/src/components/dialog/style/Dialog.css.ts +15 -1
- package/src/components/dialogprovider/DialogProvider.vue +7 -1
- package/src/components/dialogprovider/types.ts +2 -0
- package/src/components/drawer/Drawer.vue +276 -0
- package/src/components/drawer/examples/basic.vue +15 -0
- package/src/components/drawer/examples/custom-title.vue +21 -0
- package/src/components/drawer/examples/index.stories.ts +24 -0
- package/src/components/drawer/examples/index.ts +7 -0
- package/src/components/drawer/examples/no-mask.vue +15 -0
- package/src/components/drawer/examples/no-outside-close.vue +15 -0
- package/src/components/drawer/examples/placements.vue +28 -0
- package/src/components/drawer/examples/with-footer.vue +21 -0
- package/src/components/drawer/examples/with-trigger.vue +13 -0
- package/src/components/drawer/style/Drawer.css.ts +208 -0
- package/src/components/drawer/style/index.ts +1 -0
- package/src/components/dropdown/Dropdown.vue +1 -1
- package/src/components/dropdown/style/Dropdown.css.ts +16 -0
- package/src/components/index.ts +2 -0
- package/src/components/messageprovider/MessageProvider.vue +36 -7
- package/src/components/messageprovider/style/Toaster.css.ts +24 -0
- package/src/components/modal/style/Modal.css.ts +26 -2
- package/src/components/popover/Popover.vue +155 -0
- package/src/components/popover/examples/arrow.vue +47 -0
- package/src/components/popover/examples/basic.vue +15 -0
- package/src/components/popover/examples/index.stories.ts +19 -0
- package/src/components/popover/examples/index.ts +4 -0
- package/src/components/popover/examples/placement.vue +59 -0
- package/src/components/popover/examples/variant.vue +30 -0
- package/src/components/popover/style/Popover.css.ts +203 -0
- package/src/components/popover/style/index.ts +1 -0
- package/src/components/tab/Tab.vue +1 -1
- package/src/components/tab/style/Tab.css.ts +6 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="padding: 150px; display: flex; gap: 16px; flex-wrap: wrap;">
|
|
3
|
+
<MPopover placement="top">
|
|
4
|
+
<MButton>Top</MButton>
|
|
5
|
+
<template #content>
|
|
6
|
+
<div style="padding: 8px;">Top</div>
|
|
7
|
+
</template>
|
|
8
|
+
</MPopover>
|
|
9
|
+
|
|
10
|
+
<MPopover placement="top-start">
|
|
11
|
+
<MButton>Top Start</MButton>
|
|
12
|
+
<template #content>
|
|
13
|
+
<div style="padding: 8px;">Top Start</div>
|
|
14
|
+
</template>
|
|
15
|
+
</MPopover>
|
|
16
|
+
|
|
17
|
+
<MPopover placement="top-end">
|
|
18
|
+
<MButton>Top End</MButton>
|
|
19
|
+
<template #content>
|
|
20
|
+
<div style="padding: 8px;">Top End</div>
|
|
21
|
+
</template>
|
|
22
|
+
</MPopover>
|
|
23
|
+
|
|
24
|
+
<MPopover placement="bottom">
|
|
25
|
+
<MButton>Bottom</MButton>
|
|
26
|
+
<template #content>
|
|
27
|
+
<div style="padding: 8px;">Bottom</div>
|
|
28
|
+
</template>
|
|
29
|
+
</MPopover>
|
|
30
|
+
|
|
31
|
+
<MPopover placement="bottom-start">
|
|
32
|
+
<MButton>Bottom Start</MButton>
|
|
33
|
+
<template #content>
|
|
34
|
+
<div style="padding: 8px;">Bottom Start</div>
|
|
35
|
+
</template>
|
|
36
|
+
</MPopover>
|
|
37
|
+
|
|
38
|
+
<MPopover placement="bottom-end">
|
|
39
|
+
<MButton>Bottom End</MButton>
|
|
40
|
+
<template #content>
|
|
41
|
+
<div style="padding: 8px;">Bottom End</div>
|
|
42
|
+
</template>
|
|
43
|
+
</MPopover>
|
|
44
|
+
|
|
45
|
+
<MPopover placement="left">
|
|
46
|
+
<MButton>Left</MButton>
|
|
47
|
+
<template #content>
|
|
48
|
+
<div style="padding: 8px;">Left</div>
|
|
49
|
+
</template>
|
|
50
|
+
</MPopover>
|
|
51
|
+
|
|
52
|
+
<MPopover placement="right">
|
|
53
|
+
<MButton>Right</MButton>
|
|
54
|
+
<template #content>
|
|
55
|
+
<div style="padding: 8px;">Right</div>
|
|
56
|
+
</template>
|
|
57
|
+
</MPopover>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="padding: 100px; display: flex; gap: 16px;">
|
|
3
|
+
<MPopover>
|
|
4
|
+
<MButton>Light (Default)</MButton>
|
|
5
|
+
<template #content>
|
|
6
|
+
<div style="padding: 8px; min-width: 150px;">
|
|
7
|
+
<p style="margin: 0; font-size: 14px;">Light popover content</p>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
</MPopover>
|
|
11
|
+
|
|
12
|
+
<MPopover variant="dark">
|
|
13
|
+
<MButton variant="dark">Dark</MButton>
|
|
14
|
+
<template #content>
|
|
15
|
+
<div style="padding: 8px; min-width: 150px;">
|
|
16
|
+
<p style="margin: 0; font-size: 14px;">Dark popover content</p>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
</MPopover>
|
|
20
|
+
|
|
21
|
+
<MPopover variant="dark" arrow placement="bottom">
|
|
22
|
+
<MButton variant="dark">Dark with Arrow</MButton>
|
|
23
|
+
<template #content>
|
|
24
|
+
<div style="padding: 8px; min-width: 150px;">
|
|
25
|
+
<p style="margin: 0; font-size: 14px;">Dark popover with arrow</p>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
</MPopover>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { globalKeyframes, globalStyle, style } from '@vanilla-extract/css';
|
|
2
|
+
import { themeVars } from '../../../styles/theme.css';
|
|
3
|
+
|
|
4
|
+
const menuFadeOutAnimation = 'popover-fade-out';
|
|
5
|
+
globalKeyframes(menuFadeOutAnimation, {
|
|
6
|
+
from: {
|
|
7
|
+
opacity: 1
|
|
8
|
+
},
|
|
9
|
+
to: {
|
|
10
|
+
opacity: 0
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const menuSlideFadeOutTopAnimation = 'popover-slide-fade-out-top';
|
|
15
|
+
globalKeyframes(menuSlideFadeOutTopAnimation, {
|
|
16
|
+
from: {
|
|
17
|
+
opacity: 1,
|
|
18
|
+
transform: 'translateY(0) scale(1)'
|
|
19
|
+
},
|
|
20
|
+
to: {
|
|
21
|
+
opacity: 0,
|
|
22
|
+
transform: 'translateY(6px) scale(0.98)'
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const menuSlideFadeOutBottomAnimation = 'popover-slide-fade-out-bottom';
|
|
27
|
+
globalKeyframes(menuSlideFadeOutBottomAnimation, {
|
|
28
|
+
from: {
|
|
29
|
+
opacity: 1,
|
|
30
|
+
transform: 'translateY(0) scale(1)'
|
|
31
|
+
},
|
|
32
|
+
to: {
|
|
33
|
+
opacity: 0,
|
|
34
|
+
transform: 'translateY(-6px) scale(0.98)'
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const menuSlideFadeOutLeftAnimation = 'popover-slide-fade-out-left';
|
|
39
|
+
globalKeyframes(menuSlideFadeOutLeftAnimation, {
|
|
40
|
+
from: {
|
|
41
|
+
opacity: 1,
|
|
42
|
+
transform: 'translateX(0) scale(1)'
|
|
43
|
+
},
|
|
44
|
+
to: {
|
|
45
|
+
opacity: 0,
|
|
46
|
+
transform: 'translateX(6px) scale(0.98)'
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const menuSlideFadeOutRightAnimation = 'popover-slide-fade-out-right';
|
|
51
|
+
globalKeyframes(menuSlideFadeOutRightAnimation, {
|
|
52
|
+
from: {
|
|
53
|
+
opacity: 1,
|
|
54
|
+
transform: 'translateX(0) scale(1)'
|
|
55
|
+
},
|
|
56
|
+
to: {
|
|
57
|
+
opacity: 0,
|
|
58
|
+
transform: 'translateX(-6px) scale(0.98)'
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const menuSlideFadeTopAnimation = 'popover-slide-fade-top';
|
|
63
|
+
globalKeyframes(menuSlideFadeTopAnimation, {
|
|
64
|
+
from: {
|
|
65
|
+
opacity: 0,
|
|
66
|
+
transform: 'translateY(6px) scale(0.98)'
|
|
67
|
+
},
|
|
68
|
+
to: {
|
|
69
|
+
opacity: 1,
|
|
70
|
+
transform: 'translateY(0) scale(1)'
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const menuSlideFadeBottomAnimation = 'popover-slide-fade-bottom';
|
|
75
|
+
globalKeyframes(menuSlideFadeBottomAnimation, {
|
|
76
|
+
from: {
|
|
77
|
+
opacity: 0,
|
|
78
|
+
transform: 'translateY(-6px) scale(0.98)'
|
|
79
|
+
},
|
|
80
|
+
to: {
|
|
81
|
+
opacity: 1,
|
|
82
|
+
transform: 'translateY(0) scale(1)'
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
const menuSlideFadeLeftAnimation = 'popover-slide-fade-left';
|
|
87
|
+
globalKeyframes(menuSlideFadeLeftAnimation, {
|
|
88
|
+
from: {
|
|
89
|
+
opacity: 0,
|
|
90
|
+
transform: 'translateX(6px) scale(0.98)'
|
|
91
|
+
},
|
|
92
|
+
to: {
|
|
93
|
+
opacity: 1,
|
|
94
|
+
transform: 'translateX(0) scale(1)'
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
const menuSlideFadeRightAnimation = 'popover-slide-fade-right';
|
|
99
|
+
globalKeyframes(menuSlideFadeRightAnimation, {
|
|
100
|
+
from: {
|
|
101
|
+
opacity: 0,
|
|
102
|
+
transform: 'translateX(-6px) scale(0.98)'
|
|
103
|
+
},
|
|
104
|
+
to: {
|
|
105
|
+
opacity: 1,
|
|
106
|
+
transform: 'translateX(0) scale(1)'
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
export const content = style({
|
|
111
|
+
backgroundColor: '#ffffff',
|
|
112
|
+
borderRadius: '5px',
|
|
113
|
+
padding: '5px',
|
|
114
|
+
zIndex: 4000,
|
|
115
|
+
boxSizing: 'border-box',
|
|
116
|
+
position: 'relative',
|
|
117
|
+
minWidth: '130px',
|
|
118
|
+
maxWidth: '350px',
|
|
119
|
+
border: `1px solid ${themeVars.color.gray[300]}`,
|
|
120
|
+
boxShadow: themeVars.shadow.md,
|
|
121
|
+
transformOrigin: 'var(--reka-popover-content-transform-origin)',
|
|
122
|
+
willChange: 'transform, opacity',
|
|
123
|
+
outline: 'none',
|
|
124
|
+
selectors: {
|
|
125
|
+
'&[data-state="open"]': {
|
|
126
|
+
animationDuration: '0.16s',
|
|
127
|
+
animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
|
|
128
|
+
animationFillMode: 'both'
|
|
129
|
+
},
|
|
130
|
+
'&[data-state="closed"]': {
|
|
131
|
+
animationDuration: '0.12s',
|
|
132
|
+
animationTimingFunction: 'ease-out',
|
|
133
|
+
animationFillMode: 'both'
|
|
134
|
+
},
|
|
135
|
+
'&[data-state="closed"][data-side="top"]': {
|
|
136
|
+
animationName: menuSlideFadeOutTopAnimation
|
|
137
|
+
},
|
|
138
|
+
'&[data-state="closed"][data-side="bottom"]': {
|
|
139
|
+
animationName: menuSlideFadeOutBottomAnimation
|
|
140
|
+
},
|
|
141
|
+
'&[data-state="closed"][data-side="left"]': {
|
|
142
|
+
animationName: menuSlideFadeOutLeftAnimation
|
|
143
|
+
},
|
|
144
|
+
'&[data-state="closed"][data-side="right"]': {
|
|
145
|
+
animationName: menuSlideFadeOutRightAnimation
|
|
146
|
+
},
|
|
147
|
+
'&[data-state="open"][data-side="top"]': {
|
|
148
|
+
animationName: menuSlideFadeTopAnimation
|
|
149
|
+
},
|
|
150
|
+
'&[data-state="open"][data-side="bottom"]': {
|
|
151
|
+
animationName: menuSlideFadeBottomAnimation
|
|
152
|
+
},
|
|
153
|
+
'&[data-state="open"][data-side="left"]': {
|
|
154
|
+
animationName: menuSlideFadeLeftAnimation
|
|
155
|
+
},
|
|
156
|
+
'&[data-state="open"][data-side="right"]': {
|
|
157
|
+
animationName: menuSlideFadeRightAnimation
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
export const arrow = style({
|
|
163
|
+
fill: '#ffffff'
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
globalStyle(`${arrow} path`, {
|
|
167
|
+
fill: '#ffffff',
|
|
168
|
+
stroke: themeVars.color.gray[300],
|
|
169
|
+
strokeWidth: '1px'
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
export const dark = style({
|
|
173
|
+
backgroundColor: themeVars.color.gray[900],
|
|
174
|
+
border: `1px solid ${themeVars.color.gray[800]}`,
|
|
175
|
+
color: themeVars.color.gray[100]
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
globalStyle(`${dark} ${arrow}`, {
|
|
179
|
+
fill: themeVars.color.gray[900]
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
globalStyle(`${dark} ${arrow} path`, {
|
|
183
|
+
fill: themeVars.color.gray[900],
|
|
184
|
+
stroke: themeVars.color.gray[800]
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
export const close = style({
|
|
188
|
+
position: 'absolute',
|
|
189
|
+
top: themeVars.space[2],
|
|
190
|
+
right: themeVars.space[2],
|
|
191
|
+
display: 'flex',
|
|
192
|
+
alignItems: 'center',
|
|
193
|
+
justifyContent: 'center',
|
|
194
|
+
width: '20px',
|
|
195
|
+
height: '20px',
|
|
196
|
+
borderRadius: themeVars.rounded.default,
|
|
197
|
+
cursor: 'pointer',
|
|
198
|
+
color: themeVars.color.font.muted,
|
|
199
|
+
':hover': {
|
|
200
|
+
backgroundColor: themeVars.color.gray[100],
|
|
201
|
+
color: themeVars.color.font.text
|
|
202
|
+
}
|
|
203
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Popover.css';
|