@teammodlr/ui-kit 3.0.0-beta.28 → 3.0.0-beta.30

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.
@@ -0,0 +1,175 @@
1
+ import { globalKeyframes, globalStyle, style } from '@vanilla-extract/css';
2
+ import { themeVars } from '../../../styles/theme.css';
3
+
4
+ const slideFadeOutTopAnimation = 'hover-card-slide-fade-out-top';
5
+ globalKeyframes(slideFadeOutTopAnimation, {
6
+ from: {
7
+ opacity: 1,
8
+ transform: 'translateY(0) scale(1)'
9
+ },
10
+ to: {
11
+ opacity: 0,
12
+ transform: 'translateY(6px) scale(0.98)'
13
+ }
14
+ });
15
+
16
+ const slideFadeOutBottomAnimation = 'hover-card-slide-fade-out-bottom';
17
+ globalKeyframes(slideFadeOutBottomAnimation, {
18
+ from: {
19
+ opacity: 1,
20
+ transform: 'translateY(0) scale(1)'
21
+ },
22
+ to: {
23
+ opacity: 0,
24
+ transform: 'translateY(-6px) scale(0.98)'
25
+ }
26
+ });
27
+
28
+ const slideFadeOutLeftAnimation = 'hover-card-slide-fade-out-left';
29
+ globalKeyframes(slideFadeOutLeftAnimation, {
30
+ from: {
31
+ opacity: 1,
32
+ transform: 'translateX(0) scale(1)'
33
+ },
34
+ to: {
35
+ opacity: 0,
36
+ transform: 'translateX(6px) scale(0.98)'
37
+ }
38
+ });
39
+
40
+ const slideFadeOutRightAnimation = 'hover-card-slide-fade-out-right';
41
+ globalKeyframes(slideFadeOutRightAnimation, {
42
+ from: {
43
+ opacity: 1,
44
+ transform: 'translateX(0) scale(1)'
45
+ },
46
+ to: {
47
+ opacity: 0,
48
+ transform: 'translateX(-6px) scale(0.98)'
49
+ }
50
+ });
51
+
52
+ const slideFadeTopAnimation = 'hover-card-slide-fade-top';
53
+ globalKeyframes(slideFadeTopAnimation, {
54
+ from: {
55
+ opacity: 0,
56
+ transform: 'translateY(6px) scale(0.98)'
57
+ },
58
+ to: {
59
+ opacity: 1,
60
+ transform: 'translateY(0) scale(1)'
61
+ }
62
+ });
63
+
64
+ const slideFadeBottomAnimation = 'hover-card-slide-fade-bottom';
65
+ globalKeyframes(slideFadeBottomAnimation, {
66
+ from: {
67
+ opacity: 0,
68
+ transform: 'translateY(-6px) scale(0.98)'
69
+ },
70
+ to: {
71
+ opacity: 1,
72
+ transform: 'translateY(0) scale(1)'
73
+ }
74
+ });
75
+
76
+ const slideFadeLeftAnimation = 'hover-card-slide-fade-left';
77
+ globalKeyframes(slideFadeLeftAnimation, {
78
+ from: {
79
+ opacity: 0,
80
+ transform: 'translateX(6px) scale(0.98)'
81
+ },
82
+ to: {
83
+ opacity: 1,
84
+ transform: 'translateX(0) scale(1)'
85
+ }
86
+ });
87
+
88
+ const slideFadeRightAnimation = 'hover-card-slide-fade-right';
89
+ globalKeyframes(slideFadeRightAnimation, {
90
+ from: {
91
+ opacity: 0,
92
+ transform: 'translateX(-6px) scale(0.98)'
93
+ },
94
+ to: {
95
+ opacity: 1,
96
+ transform: 'translateX(0) scale(1)'
97
+ }
98
+ });
99
+
100
+ export const content = style({
101
+ backgroundColor: '#ffffff',
102
+ borderRadius: '5px',
103
+ padding: '5px',
104
+ zIndex: 4000,
105
+ boxSizing: 'border-box',
106
+ position: 'relative',
107
+ minWidth: '130px',
108
+ maxWidth: '350px',
109
+ border: `1px solid ${themeVars.color.gray[300]}`,
110
+ boxShadow: themeVars.shadow.md,
111
+ transformOrigin: 'var(--reka-hover-card-content-transform-origin)',
112
+ willChange: 'transform, opacity',
113
+ outline: 'none',
114
+ selectors: {
115
+ '&[data-state="open"]': {
116
+ animationDuration: '0.16s',
117
+ animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
118
+ animationFillMode: 'both'
119
+ },
120
+ '&[data-state="closed"]': {
121
+ animationDuration: '0.12s',
122
+ animationTimingFunction: 'ease-out',
123
+ animationFillMode: 'both'
124
+ },
125
+ '&[data-state="closed"][data-side="top"]': {
126
+ animationName: slideFadeOutTopAnimation
127
+ },
128
+ '&[data-state="closed"][data-side="bottom"]': {
129
+ animationName: slideFadeOutBottomAnimation
130
+ },
131
+ '&[data-state="closed"][data-side="left"]': {
132
+ animationName: slideFadeOutLeftAnimation
133
+ },
134
+ '&[data-state="closed"][data-side="right"]': {
135
+ animationName: slideFadeOutRightAnimation
136
+ },
137
+ '&[data-state="open"][data-side="top"]': {
138
+ animationName: slideFadeTopAnimation
139
+ },
140
+ '&[data-state="open"][data-side="bottom"]': {
141
+ animationName: slideFadeBottomAnimation
142
+ },
143
+ '&[data-state="open"][data-side="left"]': {
144
+ animationName: slideFadeLeftAnimation
145
+ },
146
+ '&[data-state="open"][data-side="right"]': {
147
+ animationName: slideFadeRightAnimation
148
+ }
149
+ }
150
+ });
151
+
152
+ export const arrow = style({
153
+ fill: '#ffffff'
154
+ });
155
+
156
+ globalStyle(`${arrow} path`, {
157
+ fill: '#ffffff',
158
+ stroke: themeVars.color.gray[300],
159
+ strokeWidth: '1px'
160
+ });
161
+
162
+ export const dark = style({
163
+ backgroundColor: themeVars.color.gray[900],
164
+ border: `1px solid ${themeVars.color.gray[800]}`,
165
+ color: themeVars.color.gray[100]
166
+ });
167
+
168
+ globalStyle(`${dark} ${arrow}`, {
169
+ fill: themeVars.color.gray[900]
170
+ });
171
+
172
+ globalStyle(`${dark} ${arrow} path`, {
173
+ fill: themeVars.color.gray[900],
174
+ stroke: themeVars.color.gray[800]
175
+ });
@@ -0,0 +1 @@
1
+ export * from './HoverCard.css';
@@ -58,3 +58,4 @@ export { default as MDialogProvider } from './dialogprovider/DialogProvider.vue'
58
58
  export { default as MDrawer } from './drawer/Drawer.vue';
59
59
  export { default as MTree } from './tree/Tree.vue';
60
60
  export { default as MPopover } from './popover/Popover.vue';
61
+ export { default as MHoverCard } from './hovercard/HoverCard.vue';