@moises.ai/design-system 3.10.8 → 3.10.10
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 +6684 -9882
- package/package.json +21 -5
- package/src/components/DataTable/DataTable.module.css +2 -0
- package/src/components/DataTable/DataTable.stories.jsx +1 -0
- package/src/components/DataTable/dnd/DataTableRowSortable.jsx +37 -0
- package/src/components/Sidebar/Sidebar.module.css +2 -0
- package/src/components/Sidebar/Sidebar.stories.jsx +17 -16
- package/src/components/ToastProvider/ToastProvider.module.css +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moises.ai/design-system",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.10",
|
|
4
4
|
"description": "Design System package based on @radix-ui/themes with custom defaults",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -36,10 +36,6 @@
|
|
|
36
36
|
"extract": "lingui extract"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@dnd-kit/core": "^6.3.1",
|
|
40
|
-
"@dnd-kit/modifiers": "^9.0.0",
|
|
41
|
-
"@dnd-kit/sortable": "^10.0.0",
|
|
42
|
-
"@dnd-kit/utilities": "^3.2.2",
|
|
43
39
|
"@radix-ui/react-icons": "1.3.2",
|
|
44
40
|
"@radix-ui/themes": "3.2.1",
|
|
45
41
|
"@wavesurfer/react": "^1.0.11",
|
|
@@ -47,10 +43,26 @@
|
|
|
47
43
|
"wavesurfer.js": "^7.11.1"
|
|
48
44
|
},
|
|
49
45
|
"peerDependencies": {
|
|
46
|
+
"@dnd-kit/core": "^6.3.1",
|
|
47
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
|
48
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
49
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
50
50
|
"react": "^19.0.0",
|
|
51
51
|
"react-dom": "^19.0.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependenciesMeta": {
|
|
54
|
+
"@dnd-kit/core": {
|
|
55
|
+
"optional": false
|
|
56
|
+
},
|
|
57
|
+
"@dnd-kit/modifiers": {
|
|
58
|
+
"optional": false
|
|
59
|
+
},
|
|
60
|
+
"@dnd-kit/sortable": {
|
|
61
|
+
"optional": false
|
|
62
|
+
},
|
|
63
|
+
"@dnd-kit/utilities": {
|
|
64
|
+
"optional": false
|
|
65
|
+
},
|
|
54
66
|
"react": {
|
|
55
67
|
"optional": false
|
|
56
68
|
},
|
|
@@ -59,6 +71,10 @@
|
|
|
59
71
|
}
|
|
60
72
|
},
|
|
61
73
|
"devDependencies": {
|
|
74
|
+
"@dnd-kit/core": "^6.3.1",
|
|
75
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
|
76
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
77
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
62
78
|
"@lingui/cli": "^5.6.0",
|
|
63
79
|
"@storybook/addon-essentials": "^8.6.14",
|
|
64
80
|
"@storybook/addon-interactions": "^8.6.14",
|
|
@@ -137,6 +137,7 @@
|
|
|
137
137
|
|
|
138
138
|
.selectColumn {
|
|
139
139
|
cursor: pointer;
|
|
140
|
+
touch-action: manipulation;
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
.checkboxCell {
|
|
@@ -284,6 +285,7 @@
|
|
|
284
285
|
|
|
285
286
|
.projectCell:not(.dropdownColumn) {
|
|
286
287
|
cursor: pointer;
|
|
288
|
+
touch-action: manipulation;
|
|
287
289
|
}
|
|
288
290
|
|
|
289
291
|
.DataTable :global(.rt-TableRow:hover) .projectCell:not(.dropdownColumn) :not(.artistText) {
|
|
@@ -29,6 +29,8 @@ export const DataTableRowSortable = React.memo(function DataTableRowSortable({
|
|
|
29
29
|
dndScopeId,
|
|
30
30
|
}) {
|
|
31
31
|
const shiftClickRef = useRef(false)
|
|
32
|
+
const touchHandledRef = useRef(false)
|
|
33
|
+
const checkboxTouchHandledRef = useRef(false)
|
|
32
34
|
const {
|
|
33
35
|
attributes,
|
|
34
36
|
listeners,
|
|
@@ -57,6 +59,10 @@ export const DataTableRowSortable = React.memo(function DataTableRowSortable({
|
|
|
57
59
|
: sortableStyle
|
|
58
60
|
|
|
59
61
|
const handleRowClick = (e) => {
|
|
62
|
+
if (touchHandledRef.current) {
|
|
63
|
+
touchHandledRef.current = false
|
|
64
|
+
return
|
|
65
|
+
}
|
|
60
66
|
if (e.shiftKey) {
|
|
61
67
|
e.preventDefault()
|
|
62
68
|
onShiftClickRow?.(row, rowIndex)
|
|
@@ -65,6 +71,16 @@ export const DataTableRowSortable = React.memo(function DataTableRowSortable({
|
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
73
|
|
|
74
|
+
const handleRowPointerUp = (e) => {
|
|
75
|
+
if (e.pointerType !== 'touch') return
|
|
76
|
+
touchHandledRef.current = true
|
|
77
|
+
if (e.shiftKey) {
|
|
78
|
+
onShiftClickRow?.(row, rowIndex)
|
|
79
|
+
} else {
|
|
80
|
+
onRowClick?.(row)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
68
84
|
const handleCheckboxClick = (e) => {
|
|
69
85
|
e.stopPropagation()
|
|
70
86
|
if (e.shiftKey) {
|
|
@@ -79,6 +95,10 @@ export const DataTableRowSortable = React.memo(function DataTableRowSortable({
|
|
|
79
95
|
|
|
80
96
|
const handleCheckboxCellClick = (e) => {
|
|
81
97
|
e.stopPropagation()
|
|
98
|
+
if (checkboxTouchHandledRef.current) {
|
|
99
|
+
checkboxTouchHandledRef.current = false
|
|
100
|
+
return
|
|
101
|
+
}
|
|
82
102
|
if (e.shiftKey) {
|
|
83
103
|
e.preventDefault()
|
|
84
104
|
onShiftClickRow?.(row, rowIndex)
|
|
@@ -87,11 +107,26 @@ export const DataTableRowSortable = React.memo(function DataTableRowSortable({
|
|
|
87
107
|
}
|
|
88
108
|
}
|
|
89
109
|
|
|
110
|
+
const handleCheckboxCellPointerUp = (e) => {
|
|
111
|
+
if (e.pointerType !== 'touch') return
|
|
112
|
+
e.stopPropagation()
|
|
113
|
+
checkboxTouchHandledRef.current = true
|
|
114
|
+
if (e.shiftKey) {
|
|
115
|
+
onShiftClickRow?.(row, rowIndex)
|
|
116
|
+
} else if (rowId != null) {
|
|
117
|
+
onSelectRow?.(rowId, !isSelected)
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
90
121
|
const handleCheckedChange = (value) => {
|
|
91
122
|
if (shiftClickRef.current) {
|
|
92
123
|
shiftClickRef.current = false
|
|
93
124
|
return
|
|
94
125
|
}
|
|
126
|
+
if (checkboxTouchHandledRef.current) {
|
|
127
|
+
checkboxTouchHandledRef.current = false
|
|
128
|
+
return
|
|
129
|
+
}
|
|
95
130
|
if (rowId != null) onSelectRow?.(rowId, value === true)
|
|
96
131
|
}
|
|
97
132
|
|
|
@@ -119,6 +154,7 @@ export const DataTableRowSortable = React.memo(function DataTableRowSortable({
|
|
|
119
154
|
data-column-id="select"
|
|
120
155
|
data-sorted="false"
|
|
121
156
|
onClick={handleCheckboxCellClick}
|
|
157
|
+
onPointerUp={handleCheckboxCellPointerUp}
|
|
122
158
|
>
|
|
123
159
|
<Checkbox
|
|
124
160
|
size="1"
|
|
@@ -145,6 +181,7 @@ export const DataTableRowSortable = React.memo(function DataTableRowSortable({
|
|
|
145
181
|
data-column-id={column.id}
|
|
146
182
|
data-sorted={sortedKey === column.id}
|
|
147
183
|
onClick={handleRowClick}
|
|
184
|
+
onPointerUp={handleRowPointerUp}
|
|
148
185
|
>
|
|
149
186
|
{index === 0 ? renderProjectCell(row) : renderDataCell(row, column, index)}
|
|
150
187
|
</Table.Cell>
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
background-color: var(--neutral-1);
|
|
13
13
|
width: 240px;
|
|
14
14
|
height: 100vh;
|
|
15
|
+
height: 100dvh;
|
|
15
16
|
display: flex;
|
|
16
17
|
flex-direction: column;
|
|
17
18
|
border-right: 1px solid var(--neutral-3);
|
|
@@ -203,6 +204,7 @@
|
|
|
203
204
|
z-index: 1001;
|
|
204
205
|
width: 100%;
|
|
205
206
|
height: calc(100vh - 64px);
|
|
207
|
+
height: calc(100dvh - 64px);
|
|
206
208
|
padding: 16px;
|
|
207
209
|
background-color: var(--neutral-1);
|
|
208
210
|
opacity: 0;
|
|
@@ -121,22 +121,22 @@ export const Default = {
|
|
|
121
121
|
|
|
122
122
|
const bannerAnnouncement = showBannerAnnouncement
|
|
123
123
|
? {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
124
|
+
title: 'Moises AI Studio',
|
|
125
|
+
badge: {
|
|
126
|
+
label: 'new',
|
|
127
|
+
color: 'green',
|
|
128
|
+
},
|
|
129
|
+
description:
|
|
130
|
+
'Step into the future of music creation. Record, separate, generate, convert voice, mix, and master with our all-in-one essential AI tool for musicians.',
|
|
131
|
+
image:
|
|
132
|
+
'https://storage.googleapis.com/moises-cms/1_day_discount_banner_2d5990f994/1_day_discount_banner_2d5990f994.png',
|
|
133
|
+
link: 'https://www.google.com',
|
|
134
|
+
buttonText: 'Learn More',
|
|
135
|
+
onClose: () => {
|
|
136
|
+
console.log('Close clicked')
|
|
137
|
+
setShowBannerAnnouncement(false)
|
|
138
|
+
},
|
|
139
|
+
}
|
|
140
140
|
: null
|
|
141
141
|
|
|
142
142
|
return (
|
|
@@ -145,6 +145,7 @@ export const Default = {
|
|
|
145
145
|
.SidebarStoryLayout {
|
|
146
146
|
display: flex;
|
|
147
147
|
height: 100vh;
|
|
148
|
+
height: 100dvh;
|
|
148
149
|
}
|
|
149
150
|
@media (max-width: 768px) {
|
|
150
151
|
.SidebarStoryLayout {
|