@moises.ai/design-system 4.17.4 → 4.17.6
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/{DynamicMicrophone2Icon-BBVZw0ZO.js → DynamicMicrophone2Icon-CrJBGQ-4.js} +2087 -1867
- package/dist/icons.js +622 -614
- package/dist/index.js +3436 -3352
- package/package.json +1 -1
- package/src/components/SliderLibrary/SliderLibrary.jsx +7 -0
- package/src/components/SliderLibrary/SliderLibrary.stories.jsx +22 -0
- package/src/components/ToolsPopover/ToolsPopover.jsx +114 -0
- package/src/components/ToolsPopover/ToolsPopover.module.css +88 -0
- package/src/components/ToolsPopover/ToolsPopover.stories.jsx +139 -0
- package/src/icons/CheckIcon2.jsx +18 -0
- package/src/icons/CloseIcon2.jsx +20 -0
- package/src/icons/ComputerIcon2.jsx +21 -0
- package/src/icons/DownloadIcon2.jsx +18 -0
- package/src/icons/MacOSButton.jsx +26 -0
- package/src/icons/PlayIcon2.jsx +21 -0
- package/src/icons/UserGroupIcon2.jsx +26 -0
- package/src/icons/WindowsButton.jsx +26 -0
- package/src/icons.jsx +8 -0
- package/src/index.jsx +1 -0
- package/src/lib/menu/renderItem.jsx +2 -1
package/package.json
CHANGED
|
@@ -17,6 +17,8 @@ import styles from './SliderLibrary.module.css'
|
|
|
17
17
|
* hover/focus/drag with the current value.
|
|
18
18
|
* @property {(value: number) => React.ReactNode} [formatValue] - Formats the value for
|
|
19
19
|
* display in the tooltip. Defaults to the raw number.
|
|
20
|
+
* @property {(value: number) => void} [onThumbDoubleClick] - Fires when the thumb is
|
|
21
|
+
* double-clicked. Receives the current value.
|
|
20
22
|
* @property {string} [aria-label] - Accessible label, recommended when no visual label exists.
|
|
21
23
|
* @property {string} [className] - Extra class on the root.
|
|
22
24
|
*/
|
|
@@ -57,6 +59,7 @@ export const SliderLibrary = forwardRef(function SliderLibrary(
|
|
|
57
59
|
disabled = false,
|
|
58
60
|
showTooltip = true,
|
|
59
61
|
formatValue,
|
|
62
|
+
onThumbDoubleClick,
|
|
60
63
|
className,
|
|
61
64
|
...props
|
|
62
65
|
},
|
|
@@ -148,6 +151,9 @@ export const SliderLibrary = forwardRef(function SliderLibrary(
|
|
|
148
151
|
const handleThumbPointerDown = () => setKeyboardFocus(false)
|
|
149
152
|
const handleThumbPointerEnter = () => setIsHovering(true)
|
|
150
153
|
const handleThumbPointerLeave = () => setIsHovering(false)
|
|
154
|
+
const handleThumbDoubleClick = () => {
|
|
155
|
+
if (!disabled) onThumbDoubleClick?.(value)
|
|
156
|
+
}
|
|
151
157
|
|
|
152
158
|
const displayValue = formatValue ? formatValue(value) : value
|
|
153
159
|
const tooltipOpen =
|
|
@@ -163,6 +169,7 @@ export const SliderLibrary = forwardRef(function SliderLibrary(
|
|
|
163
169
|
onPointerDown={handleThumbPointerDown}
|
|
164
170
|
onPointerEnter={handleThumbPointerEnter}
|
|
165
171
|
onPointerLeave={handleThumbPointerLeave}
|
|
172
|
+
onDoubleClick={onThumbDoubleClick ? handleThumbDoubleClick : undefined}
|
|
166
173
|
/>
|
|
167
174
|
)
|
|
168
175
|
|
|
@@ -98,3 +98,25 @@ export const WithLabel = {
|
|
|
98
98
|
)
|
|
99
99
|
},
|
|
100
100
|
}
|
|
101
|
+
|
|
102
|
+
export const ThumbDoubleClick = {
|
|
103
|
+
name: 'Thumb double-click',
|
|
104
|
+
render: () => {
|
|
105
|
+
const defaultValue = 0
|
|
106
|
+
const [value, setValue] = useState(35)
|
|
107
|
+
return (
|
|
108
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
|
109
|
+
<SliderLibrary
|
|
110
|
+
value={value}
|
|
111
|
+
onValueChange={setValue}
|
|
112
|
+
onThumbDoubleClick={() => setValue(defaultValue)}
|
|
113
|
+
formatValue={(v) => `${v}%`}
|
|
114
|
+
aria-label="Volume"
|
|
115
|
+
/>
|
|
116
|
+
<span style={{ color: '#a1a1a1', fontSize: 12 }}>
|
|
117
|
+
Double-click the thumb to reset to {defaultValue}%
|
|
118
|
+
</span>
|
|
119
|
+
</div>
|
|
120
|
+
)
|
|
121
|
+
},
|
|
122
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import classNames from 'classnames'
|
|
2
|
+
import { Popover as PopoverRadix } from 'radix-ui'
|
|
3
|
+
import { memo, useCallback, useState } from 'react'
|
|
4
|
+
import { ScrollArea } from '../../index'
|
|
5
|
+
import { Theme } from '../theme/Theme'
|
|
6
|
+
import styles from './ToolsPopover.module.css'
|
|
7
|
+
|
|
8
|
+
export const ToolsPopover = memo(
|
|
9
|
+
({
|
|
10
|
+
trigger,
|
|
11
|
+
children,
|
|
12
|
+
className,
|
|
13
|
+
contentClassName,
|
|
14
|
+
triggerClassName,
|
|
15
|
+
disabled = false,
|
|
16
|
+
maxHeight,
|
|
17
|
+
sideOffset = 5,
|
|
18
|
+
matchTriggerWidth = false,
|
|
19
|
+
wrapCloseMenu,
|
|
20
|
+
modal = false,
|
|
21
|
+
...props
|
|
22
|
+
}) => {
|
|
23
|
+
const isControlled = props.open !== undefined
|
|
24
|
+
const [internalOpen, setInternalOpen] = useState(false)
|
|
25
|
+
|
|
26
|
+
const open = isControlled ? props.open : internalOpen
|
|
27
|
+
const onOpenChange = useCallback(
|
|
28
|
+
(value) => {
|
|
29
|
+
if (!isControlled) setInternalOpen(value)
|
|
30
|
+
props?.onOpenChange?.(value)
|
|
31
|
+
},
|
|
32
|
+
[isControlled, props?.onOpenChange],
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
const baseClose = useCallback(() => onOpenChange(false), [onOpenChange])
|
|
36
|
+
const closePopover = wrapCloseMenu ? wrapCloseMenu(baseClose) : baseClose
|
|
37
|
+
|
|
38
|
+
const contentStyle = {
|
|
39
|
+
...(matchTriggerWidth && {
|
|
40
|
+
width: 'var(--radix-popover-trigger-width)',
|
|
41
|
+
boxSizing: 'border-box',
|
|
42
|
+
}),
|
|
43
|
+
...(maxHeight && { height: maxHeight }),
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const handlePanelKeyDown = useCallback((event) => {
|
|
47
|
+
if (event.key === 'Tab') {
|
|
48
|
+
event.stopPropagation()
|
|
49
|
+
}
|
|
50
|
+
}, [])
|
|
51
|
+
|
|
52
|
+
const handleOpenAutoFocus = useCallback((event) => {
|
|
53
|
+
event.preventDefault()
|
|
54
|
+
const panel = event.currentTarget.querySelector('[data-tools-popover-panel]')
|
|
55
|
+
panel?.focus({ preventScroll: true })
|
|
56
|
+
}, [])
|
|
57
|
+
|
|
58
|
+
const renderPanel = () => (
|
|
59
|
+
<div
|
|
60
|
+
className={styles.contentPanel}
|
|
61
|
+
data-tools-popover-panel
|
|
62
|
+
tabIndex={-1}
|
|
63
|
+
onKeyDown={handlePanelKeyDown}
|
|
64
|
+
>
|
|
65
|
+
{typeof children === 'function' ? children(closePopover) : children}
|
|
66
|
+
</div>
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
const popoverContent = (
|
|
70
|
+
<Theme asChild>
|
|
71
|
+
<PopoverRadix.Content
|
|
72
|
+
className={classNames(styles.popoverContent, className, contentClassName)}
|
|
73
|
+
side={props.side}
|
|
74
|
+
align={props.align}
|
|
75
|
+
style={contentStyle}
|
|
76
|
+
sideOffset={sideOffset}
|
|
77
|
+
alignOffset={0}
|
|
78
|
+
onOpenAutoFocus={handleOpenAutoFocus}
|
|
79
|
+
onCloseAutoFocus={(event) => {
|
|
80
|
+
event.preventDefault()
|
|
81
|
+
}}
|
|
82
|
+
onClick={(event) => event.stopPropagation()}
|
|
83
|
+
>
|
|
84
|
+
{maxHeight ? (
|
|
85
|
+
<ScrollArea scrollbars="vertical" style={{ height: maxHeight }}>
|
|
86
|
+
{renderPanel()}
|
|
87
|
+
</ScrollArea>
|
|
88
|
+
) : (
|
|
89
|
+
renderPanel()
|
|
90
|
+
)}
|
|
91
|
+
</PopoverRadix.Content>
|
|
92
|
+
</Theme>
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<PopoverRadix.Root
|
|
97
|
+
{...props}
|
|
98
|
+
modal={modal}
|
|
99
|
+
open={disabled ? false : open}
|
|
100
|
+
onOpenChange={disabled ? undefined : onOpenChange}
|
|
101
|
+
>
|
|
102
|
+
<PopoverRadix.Trigger asChild className={triggerClassName} disabled={disabled}>
|
|
103
|
+
{trigger}
|
|
104
|
+
</PopoverRadix.Trigger>
|
|
105
|
+
|
|
106
|
+
<PopoverRadix.Portal className={styles.popoverPortal}>
|
|
107
|
+
{popoverContent}
|
|
108
|
+
</PopoverRadix.Portal>
|
|
109
|
+
</PopoverRadix.Root>
|
|
110
|
+
)
|
|
111
|
+
},
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
ToolsPopover.displayName = 'ToolsPopover'
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.popoverPortal {
|
|
2
|
+
border-radius: 8px;
|
|
3
|
+
border: 1px solid var(--neutral-alpha-3);
|
|
4
|
+
background: #18191b;
|
|
5
|
+
box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.3),
|
|
6
|
+
0 12px 60px 0 rgba(0, 0, 0, 0.15);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.popoverContent {
|
|
10
|
+
border-radius: 8px;
|
|
11
|
+
width: fit-content;
|
|
12
|
+
background-color: var(--panel-solid);
|
|
13
|
+
padding: 12px 16px 16px 16px;
|
|
14
|
+
box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.3),
|
|
15
|
+
0 12px 60px 0 rgba(0, 0, 0, 0.15);
|
|
16
|
+
border: 1px solid var(--neutral-alpha-3);
|
|
17
|
+
animation-duration: 400ms;
|
|
18
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
19
|
+
will-change: transform, opacity;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.popoverContent[data-side='top'] {
|
|
23
|
+
animation-name: slideDownAndFade;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.popoverContent[data-side='right'] {
|
|
27
|
+
animation-name: slideLeftAndFade;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.popoverContent[data-side='bottom'] {
|
|
31
|
+
animation-name: slideUpAndFade;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.popoverContent[data-side='left'] {
|
|
35
|
+
animation-name: slideRightAndFade;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@keyframes slideUpAndFade {
|
|
39
|
+
from {
|
|
40
|
+
opacity: 0;
|
|
41
|
+
transform: translateY(2px);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
to {
|
|
45
|
+
opacity: 1;
|
|
46
|
+
transform: translateY(0);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes slideRightAndFade {
|
|
51
|
+
from {
|
|
52
|
+
opacity: 0;
|
|
53
|
+
transform: translateX(-2px);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
to {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
transform: translateX(0);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@keyframes slideDownAndFade {
|
|
63
|
+
from {
|
|
64
|
+
opacity: 0;
|
|
65
|
+
transform: translateY(-2px);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
to {
|
|
69
|
+
opacity: 1;
|
|
70
|
+
transform: translateY(0);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@keyframes slideLeftAndFade {
|
|
75
|
+
from {
|
|
76
|
+
opacity: 0;
|
|
77
|
+
transform: translateX(2px);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
to {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
transform: translateX(0);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.contentPanel {
|
|
87
|
+
outline: none;
|
|
88
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Flex, Switch, Text } from '@radix-ui/themes'
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
import { MetronomeIcon } from '../../icons/MetronomeIcon'
|
|
4
|
+
import { Button } from '../Button/Button'
|
|
5
|
+
import { IconButton } from '../IconButton/IconButton'
|
|
6
|
+
import { ToolsPopover } from './ToolsPopover'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Components/ToolsPopover',
|
|
10
|
+
component: ToolsPopover,
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'centered',
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component: `
|
|
16
|
+
ToolsPopover is a Popover wrapper with controlled open state, styled panel content, and focus management.
|
|
17
|
+
|
|
18
|
+
Pass any single React element as \`trigger\` — it is forwarded to \`Popover.Trigger\` via \`asChild\`.
|
|
19
|
+
|
|
20
|
+
Use this instead of \`ToolsDropdown\` when the panel contains interactive content (forms, switches, sliders) that should stay open while the user interacts with it.
|
|
21
|
+
`,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
tags: ['autodocs'],
|
|
26
|
+
argTypes: {
|
|
27
|
+
trigger: {
|
|
28
|
+
description: 'Any single React element used as the popover trigger',
|
|
29
|
+
table: { type: { summary: 'React.ReactElement' } },
|
|
30
|
+
},
|
|
31
|
+
modal: {
|
|
32
|
+
control: 'boolean',
|
|
33
|
+
table: { type: { summary: 'boolean' }, defaultValue: { summary: false } },
|
|
34
|
+
},
|
|
35
|
+
children: {
|
|
36
|
+
description: 'Popover content or render prop receiving closePopover',
|
|
37
|
+
table: { type: { summary: 'React.ReactNode | (closePopover) => React.ReactNode' } },
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const Default = {
|
|
43
|
+
render: () => (
|
|
44
|
+
<ToolsPopover trigger={<Button variant="soft">Settings</Button>}>
|
|
45
|
+
<Text size="2">Tool settings panel</Text>
|
|
46
|
+
</ToolsPopover>
|
|
47
|
+
),
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export const WithIconButton = {
|
|
51
|
+
render: () => (
|
|
52
|
+
<ToolsPopover trigger={<IconButton><MetronomeIcon width={16} height={16} /></IconButton>}>
|
|
53
|
+
<Flex direction="column" gap="2">
|
|
54
|
+
<Text size="2">BPM: 120</Text>
|
|
55
|
+
<Text size="2">Time signature: 4/4</Text>
|
|
56
|
+
</Flex>
|
|
57
|
+
</ToolsPopover>
|
|
58
|
+
),
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const WithInteractiveContent = {
|
|
62
|
+
render: () => {
|
|
63
|
+
const [enabled, setEnabled] = useState(false)
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<ToolsPopover trigger={<Button variant="ghost">Chords</Button>}>
|
|
67
|
+
{(closePopover) => (
|
|
68
|
+
<Flex direction="column" gap="3" width="220px">
|
|
69
|
+
<Text size="2">Show chord diagrams</Text>
|
|
70
|
+
<Switch size="2" checked={enabled} onCheckedChange={setEnabled} />
|
|
71
|
+
<Button
|
|
72
|
+
variant="soft"
|
|
73
|
+
onClick={() => {
|
|
74
|
+
closePopover()
|
|
75
|
+
alert('Saved')
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
Save
|
|
79
|
+
</Button>
|
|
80
|
+
</Flex>
|
|
81
|
+
)}
|
|
82
|
+
</ToolsPopover>
|
|
83
|
+
)
|
|
84
|
+
},
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const ControlledOpen = {
|
|
88
|
+
render: () => {
|
|
89
|
+
const [isOpen, setIsOpen] = useState(false)
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<Flex direction="column" gap="4" align="center">
|
|
93
|
+
<Flex gap="2">
|
|
94
|
+
<button type="button" onClick={() => setIsOpen(true)}>
|
|
95
|
+
Open
|
|
96
|
+
</button>
|
|
97
|
+
<button type="button" onClick={() => setIsOpen(false)}>
|
|
98
|
+
Close
|
|
99
|
+
</button>
|
|
100
|
+
</Flex>
|
|
101
|
+
|
|
102
|
+
<ToolsPopover
|
|
103
|
+
open={isOpen}
|
|
104
|
+
onOpenChange={setIsOpen}
|
|
105
|
+
trigger={<Button variant="outline">Controlled</Button>}
|
|
106
|
+
>
|
|
107
|
+
<Text size="2">Controlled popover content</Text>
|
|
108
|
+
</ToolsPopover>
|
|
109
|
+
|
|
110
|
+
<Text size="1">
|
|
111
|
+
Status: <strong>{isOpen ? 'Open' : 'Closed'}</strong>
|
|
112
|
+
</Text>
|
|
113
|
+
</Flex>
|
|
114
|
+
)
|
|
115
|
+
},
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export const CustomElement = {
|
|
119
|
+
render: () => (
|
|
120
|
+
<ToolsPopover
|
|
121
|
+
trigger={
|
|
122
|
+
<button
|
|
123
|
+
type="button"
|
|
124
|
+
style={{
|
|
125
|
+
padding: '8px 12px',
|
|
126
|
+
borderRadius: 4,
|
|
127
|
+
border: '1px solid var(--neutral-alpha-6)',
|
|
128
|
+
background: 'transparent',
|
|
129
|
+
cursor: 'pointer',
|
|
130
|
+
}}
|
|
131
|
+
>
|
|
132
|
+
Custom trigger
|
|
133
|
+
</button>
|
|
134
|
+
}
|
|
135
|
+
>
|
|
136
|
+
<Text size="2">Any element can be the trigger</Text>
|
|
137
|
+
</ToolsPopover>
|
|
138
|
+
),
|
|
139
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const CheckIcon2 = ({ width = 18, height = 18, className, ...props }) => (
|
|
2
|
+
<svg
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
width={width}
|
|
5
|
+
height={height}
|
|
6
|
+
viewBox="0 0 18 18"
|
|
7
|
+
fill="none"
|
|
8
|
+
className={className}
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path
|
|
12
|
+
d="M9 1.5C4.86 1.5 1.5 4.86 1.5 9C1.5 13.14 4.86 16.5 9 16.5C13.14 16.5 16.5 13.14 16.5 9C16.5 4.86 13.14 1.5 9 1.5ZM7.5 12.75L3.75 9L4.8075 7.9425L7.5 10.6275L13.1925 4.935L14.25 6L7.5 12.75Z"
|
|
13
|
+
fill="currentColor"
|
|
14
|
+
/>
|
|
15
|
+
</svg>
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
CheckIcon2.displayName = 'CheckIcon2'
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const CloseIcon2 = ({ width = 15, height = 15, className, ...props }) => (
|
|
2
|
+
<svg
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
width={width}
|
|
5
|
+
height={height}
|
|
6
|
+
viewBox="0 0 15 15"
|
|
7
|
+
fill="none"
|
|
8
|
+
className={className}
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path
|
|
12
|
+
d="M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z"
|
|
13
|
+
fill="currentColor"
|
|
14
|
+
fillRule="evenodd"
|
|
15
|
+
clipRule="evenodd"
|
|
16
|
+
/>
|
|
17
|
+
</svg>
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
CloseIcon2.displayName = 'CloseIcon2'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const ComputerIcon2 = ({ width = 16, height = 16, className, ...props }) => (
|
|
2
|
+
<svg
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
width={width}
|
|
5
|
+
height={height}
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="none"
|
|
8
|
+
stroke="currentColor"
|
|
9
|
+
strokeWidth="1.5"
|
|
10
|
+
strokeLinecap="round"
|
|
11
|
+
strokeLinejoin="round"
|
|
12
|
+
className={className}
|
|
13
|
+
{...props}
|
|
14
|
+
>
|
|
15
|
+
<rect x="2" y="3" width="20" height="14" rx="2" ry="2" />
|
|
16
|
+
<line x1="8" y1="21" x2="16" y2="21" />
|
|
17
|
+
<line x1="12" y1="17" x2="12" y2="21" />
|
|
18
|
+
</svg>
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
ComputerIcon2.displayName = 'ComputerIcon2'
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const DownloadIcon2 = ({ width = 18, height = 18, className, ...props }) => (
|
|
2
|
+
<svg
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
width={width}
|
|
5
|
+
height={height}
|
|
6
|
+
viewBox="0 0 18 18"
|
|
7
|
+
fill="none"
|
|
8
|
+
className={className}
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path
|
|
12
|
+
d="M9 12.75L4.5 8.25L5.5575 7.1325L8.25 9.825V2.25H9.75V9.825L12.4425 7.1325L13.5 8.25L9 12.75ZM3.75 15.75C3.3375 15.75 2.9845 15.6033 2.691 15.3097C2.3975 15.0162 2.2505 14.663 2.25 14.25V11.25H3.75V14.25H14.25V11.25H15.75V14.25C15.75 14.6625 15.6033 15.0157 15.3097 15.3097C15.0162 15.6038 14.663 15.7505 14.25 15.75H3.75Z"
|
|
13
|
+
fill="currentColor"
|
|
14
|
+
/>
|
|
15
|
+
</svg>
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
DownloadIcon2.displayName = 'DownloadIcon2'
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const MacOSButton = ({ width = 115, height = 40, className, ...props }) => (
|
|
2
|
+
<svg
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
width={width}
|
|
5
|
+
height={height}
|
|
6
|
+
viewBox="0 0 115 40"
|
|
7
|
+
fill="none"
|
|
8
|
+
className={className}
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path
|
|
12
|
+
d="M0 8C0 3.58172 3.58172 0 8 0H107C111.418 0 115 3.58172 115 8V32C115 36.4183 111.418 40 107 40H8C3.58172 40 0 36.4183 0 32V8Z"
|
|
13
|
+
fill="#EDEEF0"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
d="M31.6414 17.2277C31.5586 17.2787 29.7374 18.339 29.7581 20.5449C29.781 23.1834 32.071 24.062 32.0973 24.072C32.0768 24.1348 31.7312 25.3234 30.8902 26.551C30.1634 27.6144 29.4105 28.6719 28.2221 28.6939C27.0547 28.7153 26.6784 28.0012 25.3447 28.0012C24.0102 28.0012 23.5925 28.6719 22.4885 28.7153C21.3415 28.7587 20.4683 27.5669 19.7361 26.5093C18.2393 24.3449 17.0949 20.3926 18.6316 17.7253C19.3945 16.4006 20.758 15.5614 22.2375 15.5397C23.3643 15.5184 24.4269 16.2972 25.1161 16.2972C25.7955 16.2972 27.0131 15.3894 28.4483 15.4955C29.0108 15.5372 30.6076 15.7051 31.6414 17.2277ZM27.5627 14.0667C28.1723 13.3301 28.5824 12.3041 28.4694 11.2837C27.5922 11.3185 26.5311 11.8681 25.9019 12.6043C25.3384 13.2564 24.8435 14.3009 24.9779 15.3005C25.9557 15.3761 26.9537 14.8039 27.5627 14.0667Z"
|
|
17
|
+
fill="#111113"
|
|
18
|
+
/>
|
|
19
|
+
<path
|
|
20
|
+
d="M46.896 26V14.8H48.944L52.688 23.792L56.432 14.8H58.48V26H56.816V17.776H56.752L53.344 26H52.032L48.608 17.776H48.56V26H46.896ZM62.6394 26.16C61.0874 26.16 59.8554 25.472 59.8554 23.824C59.8554 22.224 61.0234 21.568 62.5114 21.392L64.5754 21.152C65.3434 21.056 65.5994 20.912 65.5994 20.656V20.432C65.5994 19.104 64.9114 18.752 63.7434 18.752C62.5434 18.752 61.8714 19.104 61.8714 20.16V20.352H60.3194V20.016C60.3194 18.352 61.4874 17.52 63.7754 17.52C66.1274 17.52 67.2154 18.4 67.2154 20.416V26H65.6954V24.656H65.6314C65.4714 24.976 64.6874 26.16 62.6394 26.16ZM61.4714 23.744C61.4714 24.528 62.0314 24.896 63.0394 24.896C64.7994 24.896 65.5994 23.808 65.5994 22.912V22C65.4874 22.176 65.2794 22.288 64.4634 22.384L62.8954 22.592C61.8554 22.72 61.4714 23.088 61.4714 23.744ZM72.5756 26.16C70.4796 26.16 68.5116 24.864 68.5116 21.856C68.5116 18.848 70.4796 17.52 72.5756 17.52C74.0636 17.52 75.9036 18.16 76.2076 20.64H74.7356C74.5116 19.36 73.5996 18.896 72.5596 18.896C71.0396 18.896 70.0316 19.984 70.0316 21.856C70.0316 23.728 71.0396 24.784 72.5596 24.784C73.6156 24.784 74.5116 24.304 74.7356 23.008H76.2076C75.9356 25.52 74.0636 26.16 72.5756 26.16ZM82.5115 26.16C79.4875 26.16 77.3435 24.016 77.3435 20.4C77.3435 16.784 79.4875 14.656 82.5115 14.656C85.5195 14.656 87.6635 16.784 87.6635 20.4C87.6635 24.016 85.5195 26.16 82.5115 26.16ZM79.0395 20.4C79.0395 23.184 80.4475 24.72 82.5115 24.72C84.5595 24.72 85.9675 23.184 85.9675 20.4C85.9675 17.616 84.5595 16.096 82.5115 16.096C80.4475 16.096 79.0395 17.616 79.0395 20.4ZM93.3685 26.16C90.5365 26.16 88.9685 24.768 88.9685 22.608H90.6645C90.7285 23.808 91.5285 24.752 93.3845 24.752C95.0485 24.752 95.9125 24.016 95.9125 22.864C95.9125 21.76 95.1285 21.296 93.8965 21.056L92.3925 20.752C90.4885 20.368 89.2885 19.472 89.2885 17.744C89.2885 15.808 90.7765 14.656 93.3045 14.656C95.8325 14.656 97.3365 15.824 97.3365 17.792H95.6405C95.6245 16.736 94.8085 16.064 93.2725 16.064C91.6565 16.064 91.0165 16.816 91.0165 17.744C91.0165 18.528 91.4965 19.136 92.8245 19.408L94.2645 19.696C96.5045 20.144 97.6565 21.056 97.6565 22.848C97.6565 25.024 95.9445 26.16 93.3685 26.16Z"
|
|
21
|
+
fill="#1C2024"
|
|
22
|
+
/>
|
|
23
|
+
</svg>
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
MacOSButton.displayName = 'MacOSButton'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const PlayIcon2 = ({ width = 16, height = 16, className, ...props }) => (
|
|
2
|
+
<svg
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
width={width}
|
|
5
|
+
height={height}
|
|
6
|
+
viewBox="0 0 16 16"
|
|
7
|
+
fill="none"
|
|
8
|
+
className={className}
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path
|
|
12
|
+
d="M5.5 3.5L12 8L5.5 12.5V3.5Z"
|
|
13
|
+
fill="currentColor"
|
|
14
|
+
stroke="currentColor"
|
|
15
|
+
strokeWidth="1"
|
|
16
|
+
strokeLinejoin="round"
|
|
17
|
+
/>
|
|
18
|
+
</svg>
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
PlayIcon2.displayName = 'PlayIcon2'
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const UserGroupIcon2 = ({ width = 16, height = 16, className, ...props }) => (
|
|
2
|
+
<svg
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
width={width}
|
|
5
|
+
height={height}
|
|
6
|
+
viewBox="0 0 16 16"
|
|
7
|
+
fill="none"
|
|
8
|
+
className={className}
|
|
9
|
+
aria-hidden="true"
|
|
10
|
+
focusable="false"
|
|
11
|
+
{...props}
|
|
12
|
+
>
|
|
13
|
+
<path
|
|
14
|
+
d="M11.0226 6.16608C10.925 5.8726 11.0704 5.5525 11.2843 5.32914C11.7998 4.79092 12.1309 3.83636 12.1309 3.13021C12.1309 1.90945 11.1413 0.796875 9.92051 0.796875C8.69975 0.796875 7.71012 1.90945 7.71012 3.13021C7.71012 3.83633 8.04123 4.79087 8.55666 5.32909C8.57839 5.35179 8.59942 5.37548 8.61956 5.40004C9.24971 6.08395 9.62373 7.00084 9.62373 7.93229C9.62373 8.47393 9.50115 9.04796 9.30946 9.56122C9.20593 9.83844 9.07168 10.1262 8.90375 10.4011H14.3413V9.44318C14.3413 8.67921 13.9061 7.98198 13.2197 7.64642L11.6429 6.87551C11.3493 6.73194 11.1257 6.47627 11.0226 6.16608Z"
|
|
15
|
+
fill="currentColor"
|
|
16
|
+
fillOpacity="0.709804"
|
|
17
|
+
/>
|
|
18
|
+
<path
|
|
19
|
+
d="M7.44373 10.1312C7.22981 10.3546 7.08441 10.6747 7.18199 10.9682C7.28513 11.2784 7.5087 11.534 7.80237 11.6776L9.37916 12.4485C10.0655 12.7841 10.5007 13.4813 10.5007 14.2453V15.2031H1.65918V14.2452C1.65918 13.4813 2.09439 12.7841 2.78071 12.4485L4.35744 11.6776C4.65111 11.534 4.87469 11.2784 4.97783 10.9682C5.07542 10.6747 4.93002 10.3546 4.7161 10.1312C4.20067 9.59295 3.86956 8.63842 3.86956 7.93229C3.86956 6.71153 4.85918 5.59896 6.07994 5.59896C7.3007 5.59896 8.29033 6.71153 8.29033 7.93229C8.29033 8.63844 7.95919 9.593 7.44373 10.1312Z"
|
|
20
|
+
fill="currentColor"
|
|
21
|
+
fillOpacity="0.709804"
|
|
22
|
+
/>
|
|
23
|
+
</svg>
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
UserGroupIcon2.displayName = 'UserGroupIcon2'
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const WindowsButton = ({ width = 130, height = 40, className, ...props }) => (
|
|
2
|
+
<svg
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
width={width}
|
|
5
|
+
height={height}
|
|
6
|
+
viewBox="0 0 130 40"
|
|
7
|
+
fill="none"
|
|
8
|
+
className={className}
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path
|
|
12
|
+
d="M0 8C0 3.58172 3.58172 0 8 0H122C126.418 0 130 3.58172 130 8V32C130 36.4183 126.418 40 122 40H8C3.58172 40 0 36.4183 0 32V8Z"
|
|
13
|
+
fill="#EDEEF0"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
d="M25.39 20.3904H32.5V27.5H25.39V20.3904ZM17.5 20.3904H24.61V27.5H17.5V20.3904ZM25.39 12.5H32.5V19.6096H25.39V12.5ZM17.5 12.5H24.61V19.6096H17.5V12.5Z"
|
|
17
|
+
fill="#111113"
|
|
18
|
+
/>
|
|
19
|
+
<path
|
|
20
|
+
d="M49.392 26L46.416 14.8H48.112L50.32 23.664H50.4L53.008 14.8H54.752L57.344 23.664H57.424L59.632 14.8H61.328L58.368 26H56.608L53.872 16.912L51.136 26H49.392ZM62.646 26V17.68H64.262V26H62.646ZM62.486 15.28C62.486 14.752 62.934 14.32 63.446 14.32C63.958 14.32 64.406 14.752 64.406 15.28C64.406 15.824 63.958 16.24 63.446 16.24C62.934 16.24 62.486 15.824 62.486 15.28ZM71.8443 21.184C71.8443 19.696 71.2043 18.88 69.8923 18.88C68.5803 18.88 67.6683 19.696 67.6683 21.184V26H66.0523V17.68H67.6683V19.344H67.7163C67.8603 18.72 68.6603 17.52 70.5163 17.52C72.1483 17.52 73.4603 18.464 73.4603 20.816V26H71.8443V21.184ZM78.5674 26.16C76.7114 26.16 74.8554 24.848 74.8554 21.84C74.8554 18.816 76.7114 17.52 78.5674 17.52C79.7994 17.52 80.8554 18.08 81.3514 18.992V14.8H82.9674V26H81.3514V24.688C80.8554 25.6 79.7994 26.16 78.5674 26.16ZM76.3914 21.84C76.3914 23.872 77.6074 24.8 78.9034 24.8C80.1834 24.8 81.4314 23.872 81.4314 21.84C81.4314 19.808 80.1834 18.88 78.9034 18.88C77.6074 18.88 76.3914 19.808 76.3914 21.84ZM88.4034 26.16C86.3394 26.16 84.3554 24.816 84.3554 21.84C84.3554 18.864 86.3394 17.52 88.4034 17.52C90.4834 17.52 92.4674 18.864 92.4674 21.84C92.4674 24.816 90.4834 26.16 88.4034 26.16ZM85.8914 21.84C85.8914 23.888 87.0594 24.8 88.4034 24.8C89.7474 24.8 90.9314 23.888 90.9314 21.84C90.9314 19.792 89.7474 18.88 88.4034 18.88C87.0594 18.88 85.8914 19.792 85.8914 21.84ZM95.3123 26L92.9923 17.68H94.5443L96.2883 24.384H96.3523L98.4003 17.68H99.8083L101.856 24.384H101.92L103.664 17.68H105.216L102.88 26H101.056L99.1043 19.824L97.1363 26H95.3123ZM109.435 26.16C107.435 26.16 106.011 25.328 105.963 23.52H107.419C107.547 24.544 108.427 24.912 109.451 24.912C110.475 24.912 111.275 24.544 111.275 23.648C111.275 22.976 110.811 22.704 110.027 22.528L108.475 22.176C106.907 21.808 106.203 21.008 106.203 19.888C106.203 18.368 107.499 17.52 109.435 17.52C111.419 17.52 112.619 18.416 112.699 20.128H111.339C111.195 19.104 110.491 18.768 109.451 18.768C108.363 18.768 107.771 19.136 107.771 19.856C107.771 20.432 108.139 20.784 109.003 20.976L110.571 21.328C111.915 21.648 112.923 22.192 112.923 23.616C112.923 25.456 111.259 26.16 109.435 26.16Z"
|
|
21
|
+
fill="#1C2024"
|
|
22
|
+
/>
|
|
23
|
+
</svg>
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
WindowsButton.displayName = 'WindowsButton'
|
package/src/icons.jsx
CHANGED
|
@@ -9,6 +9,7 @@ export { LoopIcon } from './icons/LoopIcon'
|
|
|
9
9
|
export { MusicNoteIcon } from './icons/MusicNoteIcon'
|
|
10
10
|
export { PauseIcon } from './icons/PauseIcon'
|
|
11
11
|
export { PlayIcon } from './icons/PlayIcon'
|
|
12
|
+
export { PlayIcon2 } from './icons/PlayIcon2'
|
|
12
13
|
export { RecordIcon } from './icons/RecordIcon'
|
|
13
14
|
export { RecordingIcon } from './icons/RecordingIcon'
|
|
14
15
|
export { SpeakerLoudIcon } from './icons/SpeakerLoudIcon'
|
|
@@ -33,6 +34,7 @@ export { ClipIcon } from './icons/ClipIcon'
|
|
|
33
34
|
export { RadioIcon } from './icons/RadioIcon'
|
|
34
35
|
export { UserIcon } from './icons/UserIcon'
|
|
35
36
|
export { SplitIcon } from './icons/SplitIcon'
|
|
37
|
+
export { UserGroupIcon2 } from './icons/UserGroupIcon2'
|
|
36
38
|
export { AbbeyRoadIcon } from './icons/AbbeyRoadIcon'
|
|
37
39
|
export { NoMusicIcon } from './icons/NoMusicIcon'
|
|
38
40
|
export { TrimIcon } from './icons/TrimIcon'
|
|
@@ -87,6 +89,7 @@ export { ChevronDownIcon } from './icons/ChevronDownIcon'
|
|
|
87
89
|
export { PauseFilledIcon } from './icons/PauseFilledIcon'
|
|
88
90
|
export { PreferencesIcon } from './icons/PreferencesIcon'
|
|
89
91
|
export { CloseIcon } from './icons/CloseIcon'
|
|
92
|
+
export { CloseIcon2 } from './icons/CloseIcon2'
|
|
90
93
|
export { SetlistIcon } from './icons/SetlistIcon'
|
|
91
94
|
export { ProducerIcon } from './icons/ProducerIcon'
|
|
92
95
|
export { IsolateDrumsGradientIcon } from './icons/IsolateDrumsGradientIcon'
|
|
@@ -283,11 +286,13 @@ export { CloudDownloadErrorIcon } from './icons/CloudDownloadErrorIcon'
|
|
|
283
286
|
export { CodeIcon } from './icons/CodeIcon'
|
|
284
287
|
export { KeyboardIcon } from './icons/KeyboardIcon'
|
|
285
288
|
export { ComputerIcon } from './icons/ComputerIcon'
|
|
289
|
+
export { ComputerIcon2 } from './icons/ComputerIcon2'
|
|
286
290
|
export { NoComputerIcon } from './icons/NoComputerIcon'
|
|
287
291
|
export { CrownIcon } from './icons/CrownIcon'
|
|
288
292
|
export { DatabaseIcon } from './icons/DatabaseIcon'
|
|
289
293
|
export { DevicesIcon } from './icons/DevicesIcon'
|
|
290
294
|
export { DojoIcon } from './icons/DojoIcon'
|
|
295
|
+
export { DownloadIcon2 } from './icons/DownloadIcon2'
|
|
291
296
|
export { DownloadAppIcon } from './icons/DownloadAppIcon'
|
|
292
297
|
export { DownloadApp2Icon } from './icons/DownloadApp2Icon'
|
|
293
298
|
export { FileIcon } from './icons/FileIcon'
|
|
@@ -386,6 +391,7 @@ export { AtSignIcon } from './icons/AtSignIcon'
|
|
|
386
391
|
export { CardIcon } from './icons/CardIcon'
|
|
387
392
|
export { ChatIcon } from './icons/ChatIcon'
|
|
388
393
|
export { CheckIcon } from './icons/CheckIcon'
|
|
394
|
+
export { CheckIcon2 } from './icons/CheckIcon2'
|
|
389
395
|
export { ClockIcon } from './icons/ClockIcon'
|
|
390
396
|
export { PowerSwitchIcon } from './icons/PowerSwitchIcon'
|
|
391
397
|
export { TimeAdjustmentIcon } from './icons/TimeAdjustmentIcon'
|
|
@@ -428,6 +434,8 @@ export { Star4Icon } from './icons/Star4Icon'
|
|
|
428
434
|
export { SupportIcon } from './icons/SupportIcon'
|
|
429
435
|
export { TypeIcon } from './icons/TypeIcon'
|
|
430
436
|
export { TranslateIcon } from './icons/TranslateIcon'
|
|
437
|
+
export { MacOSButton } from './icons/MacOSButton'
|
|
438
|
+
export { WindowsButton } from './icons/WindowsButton'
|
|
431
439
|
export { GamingIcon } from './icons/GamingIcon'
|
|
432
440
|
export { ChartIcon } from './icons/ChartIcon'
|
|
433
441
|
export { ThumbsUpIcon } from './icons/ThumbsUpIcon'
|
package/src/index.jsx
CHANGED
|
@@ -55,6 +55,7 @@ export { DataTable } from './components/DataTable/DataTable'
|
|
|
55
55
|
export { DropdownButton } from './components/DropdownButton/DropdownButton'
|
|
56
56
|
export { DropdownMenu } from './components/DropdownMenu/DropdownMenu'
|
|
57
57
|
export { ToolsDropdown } from './components/ToolsDropdown/ToolsDropdown'
|
|
58
|
+
export { ToolsPopover } from './components/ToolsPopover/ToolsPopover'
|
|
58
59
|
export { EmptyState } from './components/EmptyState/EmptyState'
|
|
59
60
|
export {
|
|
60
61
|
Extension,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { ChevronRightIcon } from '@radix-ui/react-icons'
|
|
3
3
|
import classNames from 'classnames'
|
|
4
|
+
import { CheckIcon } from '../../icons'
|
|
4
5
|
import styles from './Menu.module.css'
|
|
5
6
|
|
|
6
7
|
/**
|