@moises.ai/design-system 3.5.6 → 3.5.7
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/dist/index.js +2280 -2239
- package/package.json +1 -1
- package/src/components/AdditionalItems/AdditionalItems.jsx +8 -0
- package/src/components/AdditionalItems/AdditionalItems.module.css +5 -0
- package/src/components/DropdownButton/DropdownButton.module.css +64 -0
- package/src/components/ProductsList/ProductsList.jsx +8 -0
- package/src/components/ProductsList/ProductsList.module.css +5 -0
- package/src/components/ProfileMenu/MenuTrigger.jsx +2 -0
- package/src/components/ProfileMenu/ProfileMenu.module.css +5 -0
- package/src/components/Select/Select.jsx +5 -1
- package/src/components/Select/Select.module.css +67 -0
- package/src/components/SetlistList/SetlistList.jsx +34 -5
- package/src/components/SetlistList/SetlistList.module.css +29 -0
- package/src/components/Sidebar/Sidebar.module.css +1 -1
- package/src/components/Sidebar/SidebarSection/SidebarSection.module.css +1 -1
- package/src/lib/menu/Menu.module.css +69 -4
package/package.json
CHANGED
|
@@ -19,11 +19,19 @@ export const AdditionalItems = ({
|
|
|
19
19
|
<Flex
|
|
20
20
|
key={item.id || index}
|
|
21
21
|
align="center"
|
|
22
|
+
role="button"
|
|
23
|
+
tabIndex={0}
|
|
22
24
|
className={classNames(styles.upgradeItem, {
|
|
23
25
|
[styles.upgradeItemCollapsed]: collapsed,
|
|
24
26
|
[styles.upgradeItemSelected]: isSelected,
|
|
25
27
|
})}
|
|
26
28
|
onClick={item.onClick}
|
|
29
|
+
onKeyDown={(e) => {
|
|
30
|
+
if ((e.key === 'Enter' || e.key === ' ') && item.onClick) {
|
|
31
|
+
e.preventDefault()
|
|
32
|
+
item.onClick()
|
|
33
|
+
}
|
|
34
|
+
}}
|
|
27
35
|
>
|
|
28
36
|
{item.icon && <div className={styles.upgradeIcon}>{item.icon}</div>}
|
|
29
37
|
<div
|
|
@@ -95,6 +95,70 @@
|
|
|
95
95
|
justify-content: center;
|
|
96
96
|
align-items: center;
|
|
97
97
|
gap: 8px;
|
|
98
|
+
|
|
99
|
+
animation-duration: 400ms;
|
|
100
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
101
|
+
will-change: transform, opacity;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.content[data-side='top'] {
|
|
105
|
+
animation-name: slideDownAndFade;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.content[data-side='right'] {
|
|
109
|
+
animation-name: slideLeftAndFade;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.content[data-side='bottom'] {
|
|
113
|
+
animation-name: slideUpAndFade;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.content[data-side='left'] {
|
|
117
|
+
animation-name: slideRightAndFade;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@keyframes slideUpAndFade {
|
|
121
|
+
from {
|
|
122
|
+
opacity: 0;
|
|
123
|
+
transform: translateY(2px);
|
|
124
|
+
}
|
|
125
|
+
to {
|
|
126
|
+
opacity: 1;
|
|
127
|
+
transform: translateY(0);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@keyframes slideRightAndFade {
|
|
132
|
+
from {
|
|
133
|
+
opacity: 0;
|
|
134
|
+
transform: translateX(-2px);
|
|
135
|
+
}
|
|
136
|
+
to {
|
|
137
|
+
opacity: 1;
|
|
138
|
+
transform: translateX(0);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@keyframes slideDownAndFade {
|
|
143
|
+
from {
|
|
144
|
+
opacity: 0;
|
|
145
|
+
transform: translateY(-2px);
|
|
146
|
+
}
|
|
147
|
+
to {
|
|
148
|
+
opacity: 1;
|
|
149
|
+
transform: translateY(0);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@keyframes slideLeftAndFade {
|
|
154
|
+
from {
|
|
155
|
+
opacity: 0;
|
|
156
|
+
transform: translateX(2px);
|
|
157
|
+
}
|
|
158
|
+
to {
|
|
159
|
+
opacity: 1;
|
|
160
|
+
transform: translateX(0);
|
|
161
|
+
}
|
|
98
162
|
}
|
|
99
163
|
|
|
100
164
|
.chevron {
|
|
@@ -18,11 +18,19 @@ export const ProductsList = ({
|
|
|
18
18
|
align="center"
|
|
19
19
|
px="3"
|
|
20
20
|
py="2"
|
|
21
|
+
role="button"
|
|
22
|
+
tabIndex={0}
|
|
21
23
|
className={classNames(styles.navItem, {
|
|
22
24
|
[styles.navItemSelected]: isSelected,
|
|
23
25
|
[styles.collapsed]: collapsed,
|
|
24
26
|
})}
|
|
25
27
|
onClick={() => onProductClick?.(product.id, product)}
|
|
28
|
+
onKeyDown={(e) => {
|
|
29
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
30
|
+
e.preventDefault()
|
|
31
|
+
onProductClick?.(product.id, product)
|
|
32
|
+
}
|
|
33
|
+
}}
|
|
26
34
|
>
|
|
27
35
|
{product.icon && (
|
|
28
36
|
<div className={styles.navItemIcon}>{product.icon}</div>
|
|
@@ -16,6 +16,8 @@ export function MenuTrigger({ className, user, collapsed, ...props }) {
|
|
|
16
16
|
}
|
|
17
17
|
return (
|
|
18
18
|
<Flex
|
|
19
|
+
role="button"
|
|
20
|
+
tabIndex={0}
|
|
19
21
|
onMouseEnter={handleMouseEnter}
|
|
20
22
|
onMouseLeave={handleMouseLeave}
|
|
21
23
|
className={classNames(styles.userProfile, { [styles.collapsed]: collapsed }, className)}
|
|
@@ -69,7 +69,11 @@ export const Select = ({
|
|
|
69
69
|
</Text>
|
|
70
70
|
) : undefined}
|
|
71
71
|
</SelectRadix.Trigger>
|
|
72
|
-
<SelectRadix.Content
|
|
72
|
+
<SelectRadix.Content
|
|
73
|
+
position="popper"
|
|
74
|
+
className={styles.selectContent}
|
|
75
|
+
style={{ height: maxHeight }}
|
|
76
|
+
>
|
|
73
77
|
<SelectRadix.Group>
|
|
74
78
|
{items.map((item) =>
|
|
75
79
|
item.type === 'separator' ? (
|
|
@@ -1,3 +1,70 @@
|
|
|
1
|
+
/* Select content popover animation */
|
|
2
|
+
.selectContent {
|
|
3
|
+
animation-duration: 400ms;
|
|
4
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
5
|
+
will-change: transform, opacity;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.selectContent[data-side='top'] {
|
|
9
|
+
animation-name: slideDownAndFade;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.selectContent[data-side='right'] {
|
|
13
|
+
animation-name: slideLeftAndFade;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.selectContent[data-side='bottom'] {
|
|
17
|
+
animation-name: slideUpAndFade;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.selectContent[data-side='left'] {
|
|
21
|
+
animation-name: slideRightAndFade;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@keyframes slideUpAndFade {
|
|
25
|
+
from {
|
|
26
|
+
opacity: 0;
|
|
27
|
+
transform: translateY(2px);
|
|
28
|
+
}
|
|
29
|
+
to {
|
|
30
|
+
opacity: 1;
|
|
31
|
+
transform: translateY(0);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@keyframes slideRightAndFade {
|
|
36
|
+
from {
|
|
37
|
+
opacity: 0;
|
|
38
|
+
transform: translateX(-2px);
|
|
39
|
+
}
|
|
40
|
+
to {
|
|
41
|
+
opacity: 1;
|
|
42
|
+
transform: translateX(0);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@keyframes slideDownAndFade {
|
|
47
|
+
from {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
transform: translateY(-2px);
|
|
50
|
+
}
|
|
51
|
+
to {
|
|
52
|
+
opacity: 1;
|
|
53
|
+
transform: translateY(0);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@keyframes slideLeftAndFade {
|
|
58
|
+
from {
|
|
59
|
+
opacity: 0;
|
|
60
|
+
transform: translateX(2px);
|
|
61
|
+
}
|
|
62
|
+
to {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
transform: translateX(0);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
1
68
|
.selectTrigger.soft:focus-visible,
|
|
2
69
|
.selectTrigger.ghost:focus-visible {
|
|
3
70
|
outline: none;
|
|
@@ -17,6 +17,7 @@ export const SetlistItem = ({
|
|
|
17
17
|
onClick,
|
|
18
18
|
className,
|
|
19
19
|
style,
|
|
20
|
+
avatarStyle,
|
|
20
21
|
avatar,
|
|
21
22
|
text,
|
|
22
23
|
subtitle,
|
|
@@ -50,6 +51,8 @@ export const SetlistItem = ({
|
|
|
50
51
|
<Flex
|
|
51
52
|
gap="3"
|
|
52
53
|
align="center"
|
|
54
|
+
role="button"
|
|
55
|
+
tabIndex={0}
|
|
53
56
|
onClick={onClick}
|
|
54
57
|
className={classNames(styles.newSetlistItem, className, {
|
|
55
58
|
[styles.navItemSelected]: isSelected,
|
|
@@ -58,6 +61,12 @@ export const SetlistItem = ({
|
|
|
58
61
|
})}
|
|
59
62
|
onMouseEnter={handleMouseEnter}
|
|
60
63
|
onMouseLeave={handleMouseLeave}
|
|
64
|
+
onKeyDown={(e) => {
|
|
65
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
66
|
+
e.preventDefault()
|
|
67
|
+
onClick?.()
|
|
68
|
+
}
|
|
69
|
+
}}
|
|
61
70
|
style={style}
|
|
62
71
|
>
|
|
63
72
|
<Flex
|
|
@@ -68,13 +77,14 @@ export const SetlistItem = ({
|
|
|
68
77
|
})}
|
|
69
78
|
>
|
|
70
79
|
{avatar && (
|
|
71
|
-
<div className={styles.avatarSetlist}>
|
|
80
|
+
<div className={styles.avatarSetlist} style={avatarStyle}>
|
|
72
81
|
{typeof avatar === 'string' ? (
|
|
73
82
|
<Avatar
|
|
74
83
|
src={avatar}
|
|
75
84
|
fallback={<SetlistIcon width={16} height={16} />}
|
|
76
|
-
size="3"
|
|
85
|
+
// size="3"
|
|
77
86
|
radius="small"
|
|
87
|
+
style={avatarStyle}
|
|
78
88
|
/>
|
|
79
89
|
) : (
|
|
80
90
|
avatar
|
|
@@ -143,7 +153,7 @@ export const SetlistList = ({
|
|
|
143
153
|
const [isHoveredWhenCollapsed, setIsHoveredWhenCollapsed] = useState(false)
|
|
144
154
|
const hoverTimeoutRef = useRef(null)
|
|
145
155
|
const collapsedItemHeight = 44
|
|
146
|
-
const collapsedVisibleOffset =
|
|
156
|
+
const collapsedVisibleOffset = 8
|
|
147
157
|
const maxCollapsedItems = 4
|
|
148
158
|
const collapsedNewItemOffset = collapsed && onNewSetlistClick ? 1 : 0
|
|
149
159
|
const showCollapsedStack = collapsed && !isHoveredWhenCollapsed
|
|
@@ -200,7 +210,9 @@ export const SetlistList = ({
|
|
|
200
210
|
</div>
|
|
201
211
|
)
|
|
202
212
|
|
|
203
|
-
const
|
|
213
|
+
const collapsedStackAvatarSizes = ['38px', '37px', '36px', '35px']
|
|
214
|
+
|
|
215
|
+
const getCollapsedStackStyle = (index, setlist) => {
|
|
204
216
|
if (!collapsed) return undefined
|
|
205
217
|
if (!showCollapsedStack) {
|
|
206
218
|
return {
|
|
@@ -211,6 +223,14 @@ export const SetlistList = ({
|
|
|
211
223
|
}
|
|
212
224
|
const stackPosition = index + collapsedNewItemOffset
|
|
213
225
|
const zIndex = setlists.length + collapsedNewItemOffset - stackPosition
|
|
226
|
+
|
|
227
|
+
const boxShadows = [
|
|
228
|
+
'0 3.84px 15.36px -7.68px var(--Overlays-Black-Alpha-2, rgba(0, 0, 0, 0.10)), 0 2.88px 11.52px -3.84px var(--Overlays-Black-Alpha-2, rgba(0, 0, 0, 0.10)), 0 1.92px 2.88px -1.92px var(--Overlays-Black-Alpha-3, rgba(0, 0, 0, 0.15))',
|
|
229
|
+
'0 3.686px 14.746px -7.373px var(--Overlays-Black-Alpha-2, rgba(0, 0, 0, 0.10)), 0 2.765px 11.059px -3.686px var(--Overlays-Black-Alpha-2, rgba(0, 0, 0, 0.10)), 0 1.843px 2.765px -1.843px var(--Overlays-Black-Alpha-3, rgba(0, 0, 0, 0.15))',
|
|
230
|
+
'0 3.539px 14.156px -7.078px var(--Overlays-Black-Alpha-2, rgba(0, 0, 0, 0.10)), 0 2.654px 10.617px -3.539px var(--Overlays-Black-Alpha-2, rgba(0, 0, 0, 0.10)), 0 1.769px 2.654px -1.769px var(--Overlays-Black-Alpha-3, rgba(0, 0, 0, 0.15))',
|
|
231
|
+
'0 3.401px 13.603px -6.801px var(--Overlays-Black-Alpha-2, rgba(0, 0, 0, 0.10)), 0 2.551px 10.202px -3.401px var(--Overlays-Black-Alpha-2, rgba(0, 0, 0, 0.10)), 0 1.701px 2.551px -1.701px var(--Overlays-Black-Alpha-3, rgba(0, 0, 0, 0.15))',
|
|
232
|
+
]
|
|
233
|
+
|
|
214
234
|
return {
|
|
215
235
|
position: 'relative',
|
|
216
236
|
marginTop:
|
|
@@ -218,6 +238,7 @@ export const SetlistList = ({
|
|
|
218
238
|
? 0
|
|
219
239
|
: -(collapsedItemHeight - collapsedVisibleOffset),
|
|
220
240
|
zIndex,
|
|
241
|
+
boxShadow: boxShadows[index],
|
|
221
242
|
}
|
|
222
243
|
}
|
|
223
244
|
|
|
@@ -283,6 +304,14 @@ export const SetlistList = ({
|
|
|
283
304
|
setOpenSetlistMenuId(nextOpen ? setlist.id : null)
|
|
284
305
|
}}
|
|
285
306
|
avatar={setlist.icon || <SetlistIcon width={16} height={16} />}
|
|
307
|
+
avatarStyle={
|
|
308
|
+
showCollapsedStack
|
|
309
|
+
? {
|
|
310
|
+
width: collapsedStackAvatarSizes[index],
|
|
311
|
+
height: collapsedStackAvatarSizes[index],
|
|
312
|
+
}
|
|
313
|
+
: undefined
|
|
314
|
+
}
|
|
286
315
|
group={setlist.group}
|
|
287
316
|
moises={setlist.moises}
|
|
288
317
|
text={setlist.label}
|
|
@@ -294,7 +323,7 @@ export const SetlistList = ({
|
|
|
294
323
|
[styles.collapsedStackItem]: showCollapsedStack,
|
|
295
324
|
[styles.collapsedTransition]: collapsed,
|
|
296
325
|
})}
|
|
297
|
-
style={getCollapsedStackStyle(index)}
|
|
326
|
+
style={getCollapsedStackStyle(index, setlist)}
|
|
298
327
|
/>
|
|
299
328
|
)
|
|
300
329
|
})}
|
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
align-items: center;
|
|
10
10
|
width: calc(100% - 24px);
|
|
11
11
|
|
|
12
|
+
&:focus-visible {
|
|
13
|
+
outline: 2px solid var(--neutral-alpha-8);
|
|
14
|
+
outline-offset: -1px;
|
|
15
|
+
}
|
|
16
|
+
|
|
12
17
|
&:hover,
|
|
13
18
|
&.menuOpen {
|
|
14
19
|
background: var(--neutral-alpha-2);
|
|
@@ -117,6 +122,23 @@
|
|
|
117
122
|
border-radius: var(--Radius-3-max, 6px);
|
|
118
123
|
background: var(--neutral-alpha-3);
|
|
119
124
|
|
|
125
|
+
&.collapsed {
|
|
126
|
+
background: transparent;
|
|
127
|
+
|
|
128
|
+
.avatarSetlist {
|
|
129
|
+
background: var(--neutral-2);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&:hover,
|
|
133
|
+
&.menuOpen {
|
|
134
|
+
background: transparent !important;
|
|
135
|
+
|
|
136
|
+
.avatarSetlist {
|
|
137
|
+
background: var(--neutral-2) !important;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
120
142
|
&:hover,
|
|
121
143
|
&.menuOpen {
|
|
122
144
|
border-radius: var(--Radius-3-max, 6px);
|
|
@@ -168,12 +190,15 @@
|
|
|
168
190
|
|
|
169
191
|
.setlistsContent {
|
|
170
192
|
/* gap: 4px; */
|
|
193
|
+
margin: 1px 0;
|
|
171
194
|
}
|
|
172
195
|
.collapsedStack {
|
|
173
196
|
gap: 0;
|
|
197
|
+
align-items: center;
|
|
174
198
|
}
|
|
175
199
|
.collapsedStackItem {
|
|
176
200
|
position: relative;
|
|
201
|
+
justify-content: flex-start;
|
|
177
202
|
}
|
|
178
203
|
|
|
179
204
|
.collapsedMask {
|
|
@@ -182,6 +207,10 @@
|
|
|
182
207
|
padding-top: 2px;
|
|
183
208
|
}
|
|
184
209
|
|
|
210
|
+
.collapsedStack.collapsedMask {
|
|
211
|
+
padding-top: 12px;
|
|
212
|
+
}
|
|
213
|
+
|
|
185
214
|
.collapsedTransition {
|
|
186
215
|
transition: margin-top 360ms ease-in-out;
|
|
187
216
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
.menuContent,
|
|
1
|
+
.menuContent,
|
|
2
|
+
.menuSubContent {
|
|
2
3
|
border-radius: 8px;
|
|
3
4
|
width: fit-content;
|
|
4
5
|
min-width: 151px;
|
|
@@ -7,6 +8,73 @@
|
|
|
7
8
|
box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.30), 0 12px 60px 0 rgba(0, 0, 0, 0.15);
|
|
8
9
|
z-index: 9999;
|
|
9
10
|
border: 1px solid var(--neutral-alpha-3);
|
|
11
|
+
animation-duration: 400ms;
|
|
12
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
13
|
+
will-change: transform, opacity;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.menuContent[data-side='top'],
|
|
17
|
+
.menuSubContent[data-side='top'] {
|
|
18
|
+
animation-name: slideDownAndFade;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.menuContent[data-side='right'],
|
|
22
|
+
.menuSubContent[data-side='right'] {
|
|
23
|
+
animation-name: slideLeftAndFade;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.menuContent[data-side='bottom'],
|
|
27
|
+
.menuSubContent[data-side='bottom'] {
|
|
28
|
+
animation-name: slideUpAndFade;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.menuContent[data-side='left'],
|
|
32
|
+
.menuSubContent[data-side='left'] {
|
|
33
|
+
animation-name: slideRightAndFade;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@keyframes slideUpAndFade {
|
|
37
|
+
from {
|
|
38
|
+
opacity: 0;
|
|
39
|
+
transform: translateY(2px);
|
|
40
|
+
}
|
|
41
|
+
to {
|
|
42
|
+
opacity: 1;
|
|
43
|
+
transform: translateY(0);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@keyframes slideRightAndFade {
|
|
48
|
+
from {
|
|
49
|
+
opacity: 0;
|
|
50
|
+
transform: translateX(-2px);
|
|
51
|
+
}
|
|
52
|
+
to {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
transform: translateX(0);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@keyframes slideDownAndFade {
|
|
59
|
+
from {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
transform: translateY(-2px);
|
|
62
|
+
}
|
|
63
|
+
to {
|
|
64
|
+
opacity: 1;
|
|
65
|
+
transform: translateY(0);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes slideLeftAndFade {
|
|
70
|
+
from {
|
|
71
|
+
opacity: 0;
|
|
72
|
+
transform: translateX(2px);
|
|
73
|
+
}
|
|
74
|
+
to {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
transform: translateX(0);
|
|
77
|
+
}
|
|
10
78
|
}
|
|
11
79
|
|
|
12
80
|
[data-radix-popper-content-wrapper] {
|
|
@@ -218,9 +286,6 @@
|
|
|
218
286
|
|
|
219
287
|
.menuSubContent {
|
|
220
288
|
min-width: 242px;
|
|
221
|
-
animation-duration: 400ms;
|
|
222
|
-
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
223
|
-
will-change: transform, opacity;
|
|
224
289
|
}
|
|
225
290
|
|
|
226
291
|
.menuLabel {
|