@moises.ai/design-system 4.17.0 → 4.17.2
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 +2453 -2402
- package/package.json +1 -1
- package/src/components/SetlistList/SetlistList.module.css +13 -2
- package/src/components/ToolsDropdown/ToolsDropdown.jsx +4 -11
- package/src/components/ToolsDropdown/ToolsDropdown.stories.jsx +4 -0
- package/src/components/Tooltip/Tooltip.module.css +1 -0
package/package.json
CHANGED
|
@@ -26,9 +26,11 @@
|
|
|
26
26
|
.avatarSetlist {
|
|
27
27
|
background: var(--neutral-alpha-3);
|
|
28
28
|
}
|
|
29
|
+
|
|
29
30
|
.dropdownMenuTrigger {
|
|
30
31
|
color: var(--neutral-alpha-7);
|
|
31
32
|
}
|
|
33
|
+
|
|
32
34
|
.dropdownTriggerWrapper {
|
|
33
35
|
opacity: 1;
|
|
34
36
|
pointer-events: auto;
|
|
@@ -83,7 +85,7 @@
|
|
|
83
85
|
gap: 8px;
|
|
84
86
|
aspect-ratio: 1/1;
|
|
85
87
|
border-radius: 4px;
|
|
86
|
-
background: var(--neutral-
|
|
88
|
+
background: var(--neutral-3);
|
|
87
89
|
color: var(--neutral-alpha-8);
|
|
88
90
|
flex-shrink: 0;
|
|
89
91
|
position: relative;
|
|
@@ -180,9 +182,11 @@
|
|
|
180
182
|
background: var(--neutral-alpha-4) !important;
|
|
181
183
|
}
|
|
182
184
|
}
|
|
185
|
+
|
|
183
186
|
.avatarSetlist {
|
|
184
187
|
background: var(--neutral-alpha-4);
|
|
185
188
|
}
|
|
189
|
+
|
|
186
190
|
.dropdownMenuTrigger {
|
|
187
191
|
color: var(--neutral-alpha-7);
|
|
188
192
|
}
|
|
@@ -199,6 +203,7 @@
|
|
|
199
203
|
pointer-events: auto;
|
|
200
204
|
}
|
|
201
205
|
}
|
|
206
|
+
|
|
202
207
|
.setlistsSection {
|
|
203
208
|
flex: 1;
|
|
204
209
|
min-height: 0;
|
|
@@ -328,6 +333,7 @@ sectionTitle {
|
|
|
328
333
|
from {
|
|
329
334
|
transform: translateY(var(--stagger-in-y, 0)) scaleX(var(--stagger-in-scale, 1));
|
|
330
335
|
}
|
|
336
|
+
|
|
331
337
|
to {
|
|
332
338
|
transform: translateY(0) scaleX(1);
|
|
333
339
|
}
|
|
@@ -337,6 +343,7 @@ sectionTitle {
|
|
|
337
343
|
from {
|
|
338
344
|
transform: translateY(0) scaleX(1);
|
|
339
345
|
}
|
|
346
|
+
|
|
340
347
|
to {
|
|
341
348
|
transform: translateY(var(--stagger-out-y, 0)) scaleX(var(--stagger-out-scale, 1));
|
|
342
349
|
}
|
|
@@ -360,6 +367,7 @@ sectionTitle {
|
|
|
360
367
|
from {
|
|
361
368
|
opacity: 0;
|
|
362
369
|
}
|
|
370
|
+
|
|
363
371
|
to {
|
|
364
372
|
opacity: 1;
|
|
365
373
|
}
|
|
@@ -369,6 +377,7 @@ sectionTitle {
|
|
|
369
377
|
from {
|
|
370
378
|
opacity: 1;
|
|
371
379
|
}
|
|
380
|
+
|
|
372
381
|
to {
|
|
373
382
|
opacity: 0;
|
|
374
383
|
}
|
|
@@ -451,9 +460,11 @@ sectionTitle {
|
|
|
451
460
|
.iconHidden {
|
|
452
461
|
opacity: 0;
|
|
453
462
|
}
|
|
463
|
+
|
|
454
464
|
.newSetlistItemButton {
|
|
455
465
|
color: var(--aqua-alpha-11) !important;
|
|
456
466
|
}
|
|
467
|
+
|
|
457
468
|
.plusIcon {
|
|
458
469
|
color: var(--aqua-alpha-11);
|
|
459
|
-
}
|
|
470
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import classNames from 'classnames'
|
|
3
2
|
import { DropdownMenu as DropdownMenuRadix } from 'radix-ui'
|
|
4
3
|
import { memo, useCallback, useState } from 'react'
|
|
@@ -8,9 +7,6 @@ import { Theme } from '../theme/Theme'
|
|
|
8
7
|
import styles from './ToolsDropdown.module.css'
|
|
9
8
|
import { Flex, ScrollArea, Separator } from '../../index'
|
|
10
9
|
|
|
11
|
-
const FOCUSABLE_SELECTOR =
|
|
12
|
-
'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [role="switch"]:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
13
|
-
|
|
14
10
|
export const ToolsDropdown = memo(
|
|
15
11
|
({
|
|
16
12
|
trigger,
|
|
@@ -66,19 +62,16 @@ export const ToolsDropdown = memo(
|
|
|
66
62
|
}, [])
|
|
67
63
|
|
|
68
64
|
const handleOpenAutoFocus = useCallback((event) => {
|
|
69
|
-
const panel = event.currentTarget.querySelector('[data-tools-dropdown-panel]')
|
|
70
|
-
const focusable = panel?.querySelector(FOCUSABLE_SELECTOR)
|
|
71
|
-
|
|
72
|
-
if (!focusable) return
|
|
73
|
-
|
|
74
65
|
event.preventDefault()
|
|
75
|
-
|
|
66
|
+
const panel = event.currentTarget.querySelector('[data-tools-dropdown-panel]')
|
|
67
|
+
panel?.focus({ preventScroll: true })
|
|
76
68
|
}, [])
|
|
77
69
|
|
|
78
70
|
const renderPanel = () => (
|
|
79
71
|
<div
|
|
80
72
|
className={styles.contentPanel}
|
|
81
73
|
data-tools-dropdown-panel
|
|
74
|
+
tabIndex={-1}
|
|
82
75
|
onKeyDown={handlePanelKeyDown}
|
|
83
76
|
>
|
|
84
77
|
{typeof children === 'function' ? children(closeMenu) : children}
|
|
@@ -159,4 +152,4 @@ export const ToolsDropdown = memo(
|
|
|
159
152
|
},
|
|
160
153
|
)
|
|
161
154
|
|
|
162
|
-
ToolsDropdown.displayName = 'ToolsDropdown'
|
|
155
|
+
ToolsDropdown.displayName = 'ToolsDropdown'
|
|
@@ -2,6 +2,7 @@ import { Flex, Switch, Text } from '@radix-ui/themes'
|
|
|
2
2
|
import { useState } from 'react'
|
|
3
3
|
import { MetronomeIcon } from '../../icons/MetronomeIcon'
|
|
4
4
|
import { ToolsDropdown } from './ToolsDropdown'
|
|
5
|
+
import { IconButton } from '../IconButton/IconButton'
|
|
5
6
|
export default {
|
|
6
7
|
title: 'Components/ToolsDropdown',
|
|
7
8
|
component: ToolsDropdown,
|
|
@@ -79,6 +80,9 @@ export const WithRenderProp = {
|
|
|
79
80
|
{(closeMenu) => (
|
|
80
81
|
<>
|
|
81
82
|
<Flex direction="column" gap="3" width="220px">
|
|
83
|
+
<IconButton >
|
|
84
|
+
<MetronomeIcon width={16} height={16} />
|
|
85
|
+
</IconButton>
|
|
82
86
|
<Text size="2">Show chord diagrams</Text>
|
|
83
87
|
<Switch
|
|
84
88
|
size="2"
|
|
@@ -93,6 +93,7 @@
|
|
|
93
93
|
max-width: none;
|
|
94
94
|
padding: var(--spacing-1, 4px) var(--spacing-2, 8px) var(--spacing-2, 8px);
|
|
95
95
|
border-radius: var(--radius-4, 8px);
|
|
96
|
+
border: 1px solid var(--neutral-alpha-3, rgba(221, 234, 248, 0.08));
|
|
96
97
|
background: var(--panel-solid, #18191b);
|
|
97
98
|
color: var(--neutral-alpha-12, rgba(252, 253, 255, 0.94));
|
|
98
99
|
box-shadow:
|