@moises.ai/design-system 3.11.12 → 3.11.14
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/{TrackPreviousIcon-QO8TnAez.js → MinusIcon-BS8c20DV.js} +1306 -1308
- package/dist/colors/custom-styles.css +1 -1
- package/dist/icons.js +1 -1
- package/dist/{index-DFiQTptM.js → index-Dwaw5zqT.js} +5 -5
- package/dist/index.js +1678 -1643
- package/dist/primitives.js +2 -2
- package/package.json +1 -1
- package/src/colors/Colors.stories.jsx +204 -0
- package/src/colors/custom-styles.css +1 -1
- package/src/components/Button/Button.module.css +8 -8
- package/src/components/Callout/Callout.module.css +4 -4
- package/src/components/CanvasContextMenu/CanvasContextMenu.jsx +103 -0
- package/src/components/CanvasContextMenu/CanvasContextMenu.stories.jsx +271 -0
- package/src/components/CanvasContextMenu/CanvasContextMenuTrigger.jsx +17 -0
- package/src/components/Checkbox/Checkbox.module.css +7 -7
- package/src/components/DataTable/dnd/DataTableRowSortable.jsx +1 -1
- package/src/components/HorizontalVolume/HorizontalVolume.module.css +1 -1
- package/src/components/MultiSelect/MultiSelect.jsx +1 -1
- package/src/components/Rating/Rating.module.css +1 -1
- package/src/components/Select/Select.jsx +1 -1
- package/src/components/SetlistList/SetlistList.module.css +2 -2
- package/src/components/Shell/Shell.module.css +1 -1
- package/src/components/Slider/Slider.module.css +3 -3
- package/src/icons/MinusIcon.jsx +15 -0
- package/src/icons.jsx +1 -0
- package/src/index.jsx +1 -1
- package/src/lib/menu/Menu.module.css +3 -3
- package/src/components/ContextMenu/CanvasContextMenu.jsx +0 -73
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
.DividerHorizontalIcon {
|
|
109
|
-
color: var(--aqua-
|
|
109
|
+
color: var(--aqua-alpha-11);
|
|
110
110
|
display: none;
|
|
111
111
|
}
|
|
112
112
|
|
|
@@ -120,22 +120,22 @@
|
|
|
120
120
|
|
|
121
121
|
.Checkbox[aria-checked="mixed"] {
|
|
122
122
|
border-radius: 3px;
|
|
123
|
-
border: 1px solid var(--aqua-
|
|
124
|
-
background: var(--aqua-
|
|
123
|
+
border: 1px solid var(--aqua-alpha-7);
|
|
124
|
+
background: var(--aqua-alpha-2);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
.Checkbox[aria-checked="mixed"]:hover {
|
|
128
128
|
border-radius: 3px;
|
|
129
|
-
border: 1px solid var(--aqua-
|
|
129
|
+
border: 1px solid var(--aqua-alpha-8);
|
|
130
130
|
opacity: 0.88;
|
|
131
|
-
background: var(--aqua-
|
|
131
|
+
background: var(--aqua-alpha-3);
|
|
132
132
|
cursor: pointer;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
.Checkbox[aria-checked="mixed"]:active {
|
|
136
136
|
border-radius: 3px;
|
|
137
|
-
border: 1px solid var(--aqua-
|
|
137
|
+
border: 1px solid var(--aqua-alpha-8);
|
|
138
138
|
opacity: 0.82;
|
|
139
|
-
background: var(--aqua-
|
|
139
|
+
background: var(--aqua-alpha-3);
|
|
140
140
|
cursor: pointer;
|
|
141
141
|
}
|
|
@@ -50,7 +50,7 @@ export const DataTableRowSortable = React.memo(function DataTableRowSortable({
|
|
|
50
50
|
...(transition ? { transition } : {}),
|
|
51
51
|
}
|
|
52
52
|
const rowStyle = isSelected
|
|
53
|
-
? { ...sortableStyle, '--row-bg': 'var(--aqua-
|
|
53
|
+
? { ...sortableStyle, '--row-bg': 'var(--aqua-alpha-2)' }
|
|
54
54
|
: sortableStyle
|
|
55
55
|
|
|
56
56
|
const handleRowClick = (e) => {
|
|
@@ -452,8 +452,8 @@ sectionTitle {
|
|
|
452
452
|
opacity: 0;
|
|
453
453
|
}
|
|
454
454
|
.newSetlistItemButton {
|
|
455
|
-
color: var(--aqua-
|
|
455
|
+
color: var(--aqua-alpha-11) !important;
|
|
456
456
|
}
|
|
457
457
|
.plusIcon {
|
|
458
|
-
color: var(--aqua-
|
|
458
|
+
color: var(--aqua-alpha-11);
|
|
459
459
|
}
|
|
@@ -58,20 +58,20 @@
|
|
|
58
58
|
height: 100%;
|
|
59
59
|
width: var(--radix-slider-range);
|
|
60
60
|
border-radius: 9999px;
|
|
61
|
-
/* background-color: var(--aqua-
|
|
61
|
+
/* background-color: var(--aqua-alpha-8); */
|
|
62
62
|
&:hover {
|
|
63
63
|
cursor: pointer;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
.sliderRangeAccent {
|
|
67
|
-
background-color: var(--aqua-
|
|
67
|
+
background-color: var(--aqua-alpha-8);
|
|
68
68
|
}
|
|
69
69
|
.sliderRangeNeutral {
|
|
70
70
|
background-color: var(--neutral-11);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.sliderRangeHighContrastAccent {
|
|
74
|
-
background-color: var(--aqua-
|
|
74
|
+
background-color: var(--aqua-12);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
.sliderRangeHighContrastNeutral {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const MinusIcon = ({ 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} {...props}>
|
|
9
|
+
<g >
|
|
10
|
+
<path d="M3.33325 8H12.6666" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
|
|
11
|
+
</g>
|
|
12
|
+
</svg>
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
MinusIcon.displayName = 'MinusIcon'
|
package/src/icons.jsx
CHANGED
|
@@ -351,3 +351,4 @@ export { ChevronRightFilledIcon } from './icons/ChevronRightFilledIcon'
|
|
|
351
351
|
export { ChevronDownFilledIcon } from './icons/ChevronDownFilledIcon'
|
|
352
352
|
export { Share2Icon } from './icons/Share2Icon'
|
|
353
353
|
export { TrackPreviousIcon } from './icons/TrackPreviousIcon'
|
|
354
|
+
export { MinusIcon } from './icons/MinusIcon'
|
package/src/index.jsx
CHANGED
|
@@ -78,10 +78,10 @@ export { AdditionalItems } from './components/AdditionalItems/AdditionalItems'
|
|
|
78
78
|
export { BannerAnnouncement } from './components/BannerAnnouncement/BannerAnnouncement'
|
|
79
79
|
export { Button } from './components/Button/Button'
|
|
80
80
|
export { Callout } from './components/Callout/Callout'
|
|
81
|
+
export { CanvasContextMenu } from './components/CanvasContextMenu/CanvasContextMenu'
|
|
81
82
|
export { Card as CardWidget } from './components/Card/Card'
|
|
82
83
|
export { Checkbox } from './components/Checkbox/Checkbox'
|
|
83
84
|
export { CigarBar } from './components/CigarBar/CigarBar'
|
|
84
|
-
export { CanvasContextMenu } from './components/ContextMenu/CanvasContextMenu'
|
|
85
85
|
export { ContextMenu } from './components/ContextMenu/ContextMenu'
|
|
86
86
|
export { Countdown } from './components/Countdown/Countdown'
|
|
87
87
|
export { DataTable } from './components/DataTable/DataTable'
|
|
@@ -408,18 +408,18 @@
|
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
.cyan {
|
|
411
|
-
color: var(--aqua-
|
|
411
|
+
color: var(--aqua-alpha-11);
|
|
412
412
|
|
|
413
413
|
& .label,
|
|
414
414
|
& .leftIcon,
|
|
415
415
|
& .rightIcon,
|
|
416
416
|
& .checkboxIndicatorSlot {
|
|
417
|
-
color: var(--aqua-
|
|
417
|
+
color: var(--aqua-alpha-11);
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
& .leftIcon > svg,
|
|
421
421
|
& .rightIcon > svg,
|
|
422
422
|
& .menuCheckboxIndicator > svg {
|
|
423
|
-
color: var(--aqua-
|
|
423
|
+
color: var(--aqua-alpha-11);
|
|
424
424
|
}
|
|
425
425
|
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import classNames from 'classnames'
|
|
2
|
-
import { ContextMenu as ContextMenuRadix } from 'radix-ui'
|
|
3
|
-
import React, { forwardRef, memo } from 'react'
|
|
4
|
-
|
|
5
|
-
import { createRenderItem, styles } from '../../lib/menu'
|
|
6
|
-
|
|
7
|
-
const renderOption = createRenderItem(ContextMenuRadix)
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Variant of ContextMenu for programmatic opening from non-DOM event sources
|
|
11
|
-
* (e.g. Pixi canvas). Instead of wrapping a visible trigger element, it exposes
|
|
12
|
-
* a ref to an internal hidden div that can receive a synthetic `contextmenu` event.
|
|
13
|
-
*
|
|
14
|
-
* Usage:
|
|
15
|
-
* const triggerRef = useRef(null)
|
|
16
|
-
* triggerRef.current?.dispatchEvent(
|
|
17
|
-
* new MouseEvent('contextmenu', { bubbles: true, clientX: x, clientY: y })
|
|
18
|
-
* )
|
|
19
|
-
* ...
|
|
20
|
-
* <CanvasContextMenu ref={triggerRef} options={[...]}>
|
|
21
|
-
* {children} // rendered between trigger and content, inside the same Root
|
|
22
|
-
* </CanvasContextMenu>
|
|
23
|
-
*/
|
|
24
|
-
export const CanvasContextMenu = memo(
|
|
25
|
-
forwardRef(function CanvasContextMenu(
|
|
26
|
-
{
|
|
27
|
-
children,
|
|
28
|
-
options,
|
|
29
|
-
className,
|
|
30
|
-
size = '2',
|
|
31
|
-
onSelectionChange,
|
|
32
|
-
closeOnSelect = true,
|
|
33
|
-
...props
|
|
34
|
-
},
|
|
35
|
-
ref,
|
|
36
|
-
) {
|
|
37
|
-
return (
|
|
38
|
-
// The outer div catches the bubbling contextmenu event AFTER Radix has already
|
|
39
|
-
// processed it on the trigger, suppressing the browser's native context menu
|
|
40
|
-
// without interfering with Radix's own handler.
|
|
41
|
-
<div onContextMenu={(e) => e.preventDefault()} style={{ display: 'contents' }}>
|
|
42
|
-
<ContextMenuRadix.Root>
|
|
43
|
-
<ContextMenuRadix.Trigger asChild>
|
|
44
|
-
<div
|
|
45
|
-
ref={ref}
|
|
46
|
-
style={{ position: 'fixed', width: 0, height: 0, pointerEvents: 'none' }}
|
|
47
|
-
/>
|
|
48
|
-
</ContextMenuRadix.Trigger>
|
|
49
|
-
{children}
|
|
50
|
-
{options?.length > 0 && (
|
|
51
|
-
<ContextMenuRadix.Content
|
|
52
|
-
className={classNames(styles.menuContent, className)}
|
|
53
|
-
side={props.side}
|
|
54
|
-
align={props.align}
|
|
55
|
-
sideOffset={5}
|
|
56
|
-
alignOffset={0}
|
|
57
|
-
onCloseAutoFocus={(event) => {
|
|
58
|
-
event.preventDefault()
|
|
59
|
-
}}
|
|
60
|
-
onClick={(event) => event.stopPropagation()}
|
|
61
|
-
>
|
|
62
|
-
{options?.map((option) =>
|
|
63
|
-
renderOption(option, size, onSelectionChange, closeOnSelect),
|
|
64
|
-
)}
|
|
65
|
-
</ContextMenuRadix.Content>
|
|
66
|
-
)}
|
|
67
|
-
</ContextMenuRadix.Root>
|
|
68
|
-
</div>
|
|
69
|
-
)
|
|
70
|
-
}),
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
CanvasContextMenu.displayName = 'CanvasContextMenu'
|