@moises.ai/design-system 4.21.4 → 4.21.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/{ScrollIcon-CdaQMO93.js → ScrollIcon-BzyhiwJQ.js} +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.js +528 -526
- package/package.json +1 -1
- package/src/Introduction.mdx +186 -29
- package/src/components/LokalisePoc/LokalisePoc.jsx +4 -0
- package/src/components/LokalisePoc/LokalisePoc.stories.jsx +2 -2
- package/src/components/ProjectsList/utils.jsx +2 -0
- package/src/components/theme/Theme.stories.jsx +30 -53
- package/src/icons/AcousticGuitarIcon.jsx +5 -5
package/package.json
CHANGED
package/src/Introduction.mdx
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { Meta } from '@storybook/blocks'
|
|
1
|
+
import { Meta, Canvas } from '@storybook/blocks'
|
|
2
|
+
import * as ThemeStories from './components/theme/Theme.stories'
|
|
2
3
|
|
|
3
4
|
<Meta title="Introduction" />
|
|
4
5
|
|
|
5
6
|
# Moises Design System
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Components for building consistent interfaces across Moises apps. Built on [Radix Themes](https://www.radix-ui.com/themes), with Moises defaults for appearance, accent color, and panel background.
|
|
9
|
+
|
|
10
|
+
Wrap your app in `Theme`, import `@moises.ai/design-system/styles.css`, and use the components from this package.
|
|
8
11
|
|
|
9
12
|
## Installation
|
|
10
13
|
|
|
@@ -12,45 +15,199 @@ The Moises Design System provides a comprehensive set of components for building
|
|
|
12
15
|
npm install @moises.ai/design-system
|
|
13
16
|
```
|
|
14
17
|
|
|
15
|
-
##
|
|
18
|
+
## Quick start
|
|
16
19
|
|
|
17
20
|
```jsx
|
|
18
|
-
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
import { Theme } from '@moises.ai/design-system';
|
|
22
|
-
// Import icons
|
|
23
|
-
import { PlayIcon, PauseIcon } from '@moises.ai/design-system/icons';
|
|
24
|
-
// Import styles
|
|
25
|
-
import '@moises.ai/design-system/styles.css';
|
|
21
|
+
import { Theme, Box, Flex, Button } from '@moises.ai/design-system'
|
|
22
|
+
import { PlayIcon } from '@moises.ai/design-system/icons'
|
|
23
|
+
import '@moises.ai/design-system/styles.css'
|
|
26
24
|
|
|
27
25
|
function App() {
|
|
28
26
|
return (
|
|
29
27
|
<Theme>
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
|
|
28
|
+
<Flex gap="3" align="center">
|
|
29
|
+
<Button variant="solid" color="neutral">
|
|
30
|
+
<PlayIcon width={16} height={16} /> Play
|
|
31
|
+
</Button>
|
|
32
|
+
<Button variant="ghost" color="red">
|
|
33
|
+
Cancel
|
|
34
|
+
</Button>
|
|
35
|
+
</Flex>
|
|
33
36
|
</Theme>
|
|
34
|
-
)
|
|
37
|
+
)
|
|
35
38
|
}
|
|
36
39
|
```
|
|
37
40
|
|
|
38
|
-
## Key Features
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
### Theme
|
|
43
|
+
|
|
44
|
+
<Canvas of={ThemeStories.Default} />
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Explore the library
|
|
48
|
+
|
|
49
|
+
Use the sidebar sections below to browse docs and stories.
|
|
50
|
+
|
|
51
|
+
<style>{`
|
|
52
|
+
.ds-explore-grid > a {
|
|
53
|
+
min-width: 0;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
}
|
|
56
|
+
.ds-explore-grid > a p {
|
|
57
|
+
overflow-wrap: anywhere;
|
|
58
|
+
}
|
|
59
|
+
`}</style>
|
|
60
|
+
|
|
61
|
+
<div
|
|
62
|
+
className="ds-explore-grid"
|
|
63
|
+
style={{
|
|
64
|
+
display: 'grid',
|
|
65
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(220px, 1fr))',
|
|
66
|
+
gap: '12px',
|
|
67
|
+
marginTop: '16px',
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
<a
|
|
71
|
+
href="./?path=/docs/components-button--docs"
|
|
72
|
+
target="_top"
|
|
73
|
+
style={{
|
|
74
|
+
display: 'block',
|
|
75
|
+
padding: '16px',
|
|
76
|
+
border: '1px solid #2F2F31',
|
|
77
|
+
borderRadius: '8px',
|
|
78
|
+
textDecoration: 'none',
|
|
79
|
+
color: 'inherit',
|
|
80
|
+
}}
|
|
81
|
+
>
|
|
82
|
+
<strong style={{ color: '#08d88d' }}>Components</strong>
|
|
83
|
+
<p style={{ margin: '8px 0 0', opacity: 0.85, fontSize: '14px' }}>
|
|
84
|
+
Buttons, inputs, menus, feedback, and other UI primitives.
|
|
85
|
+
</p>
|
|
86
|
+
</a>
|
|
87
|
+
|
|
88
|
+
<a
|
|
89
|
+
href="./?path=/story/features-shell--default"
|
|
90
|
+
target="_top"
|
|
91
|
+
style={{
|
|
92
|
+
display: 'block',
|
|
93
|
+
padding: '16px',
|
|
94
|
+
border: '1px solid #2F2F31',
|
|
95
|
+
borderRadius: '8px',
|
|
96
|
+
textDecoration: 'none',
|
|
97
|
+
color: 'inherit',
|
|
98
|
+
}}
|
|
99
|
+
>
|
|
100
|
+
<strong style={{ color: '#08d88d' }}>Features</strong>
|
|
101
|
+
<p style={{ margin: '8px 0 0', opacity: 0.85, fontSize: '14px' }}>
|
|
102
|
+
Product surfaces such as Shell, Sidebar, and domain forms.
|
|
103
|
+
</p>
|
|
104
|
+
</a>
|
|
105
|
+
|
|
106
|
+
<a
|
|
107
|
+
href="./?path=/story/extensions-extension--simple"
|
|
108
|
+
target="_top"
|
|
109
|
+
style={{
|
|
110
|
+
display: 'block',
|
|
111
|
+
padding: '16px',
|
|
112
|
+
border: '1px solid #2F2F31',
|
|
113
|
+
borderRadius: '8px',
|
|
114
|
+
textDecoration: 'none',
|
|
115
|
+
color: 'inherit',
|
|
116
|
+
}}
|
|
117
|
+
>
|
|
118
|
+
<strong style={{ color: '#08d88d' }}>Extensions</strong>
|
|
119
|
+
<p style={{ margin: '8px 0 0', opacity: 0.85, fontSize: '14px' }}>
|
|
120
|
+
Extension shell and flows like stem separation and voice conversion.
|
|
121
|
+
</p>
|
|
122
|
+
</a>
|
|
123
|
+
|
|
124
|
+
<a
|
|
125
|
+
href="./?path=/docs/layout-theme--docs"
|
|
126
|
+
target="_top"
|
|
127
|
+
style={{
|
|
128
|
+
display: 'block',
|
|
129
|
+
padding: '16px',
|
|
130
|
+
border: '1px solid #2F2F31',
|
|
131
|
+
borderRadius: '8px',
|
|
132
|
+
textDecoration: 'none',
|
|
133
|
+
color: 'inherit',
|
|
134
|
+
}}
|
|
135
|
+
>
|
|
136
|
+
<strong style={{ color: '#08d88d' }}>Layout</strong>
|
|
137
|
+
<p style={{ margin: '8px 0 0', opacity: 0.85, fontSize: '14px' }}>
|
|
138
|
+
Theme provider and layout foundations.
|
|
139
|
+
</p>
|
|
140
|
+
</a>
|
|
45
141
|
|
|
46
|
-
|
|
142
|
+
<a
|
|
143
|
+
href="./?path=/story/form-useform--full-form"
|
|
144
|
+
target="_top"
|
|
145
|
+
style={{
|
|
146
|
+
display: 'block',
|
|
147
|
+
padding: '16px',
|
|
148
|
+
border: '1px solid #2F2F31',
|
|
149
|
+
borderRadius: '8px',
|
|
150
|
+
textDecoration: 'none',
|
|
151
|
+
color: 'inherit',
|
|
152
|
+
}}
|
|
153
|
+
>
|
|
154
|
+
<strong style={{ color: '#08d88d' }}>Form</strong>
|
|
155
|
+
<p style={{ margin: '8px 0 0', opacity: 0.85, fontSize: '14px' }}>
|
|
156
|
+
Form helpers and patterns built for Moises flows.
|
|
157
|
+
</p>
|
|
158
|
+
</a>
|
|
47
159
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
160
|
+
<a
|
|
161
|
+
href="./?path=/story/icons--icons"
|
|
162
|
+
target="_top"
|
|
163
|
+
style={{
|
|
164
|
+
display: 'block',
|
|
165
|
+
padding: '16px',
|
|
166
|
+
border: '1px solid #2F2F31',
|
|
167
|
+
borderRadius: '8px',
|
|
168
|
+
textDecoration: 'none',
|
|
169
|
+
color: 'inherit',
|
|
170
|
+
}}
|
|
171
|
+
>
|
|
172
|
+
<strong style={{ color: '#08d88d' }}>Icons</strong>
|
|
173
|
+
<p style={{ margin: '8px 0 0', opacity: 0.85, fontSize: '14px' }}>
|
|
174
|
+
Custom icon set for Moises product UI.
|
|
175
|
+
</p>
|
|
176
|
+
</a>
|
|
53
177
|
|
|
54
|
-
|
|
178
|
+
<a
|
|
179
|
+
href="./?path=/story/colors--colors"
|
|
180
|
+
target="_top"
|
|
181
|
+
style={{
|
|
182
|
+
display: 'block',
|
|
183
|
+
padding: '16px',
|
|
184
|
+
border: '1px solid #2F2F31',
|
|
185
|
+
borderRadius: '8px',
|
|
186
|
+
textDecoration: 'none',
|
|
187
|
+
color: 'inherit',
|
|
188
|
+
}}
|
|
189
|
+
>
|
|
190
|
+
<strong style={{ color: '#08d88d' }}>Colors</strong>
|
|
191
|
+
<p style={{ margin: '8px 0 0', opacity: 0.85, fontSize: '14px' }}>
|
|
192
|
+
Color tokens and palette reference.
|
|
193
|
+
</p>
|
|
194
|
+
</a>
|
|
55
195
|
|
|
56
|
-
|
|
196
|
+
<a
|
|
197
|
+
href="./?path=/docs/deprecated-dropdownbutton--docs"
|
|
198
|
+
target="_top"
|
|
199
|
+
style={{
|
|
200
|
+
display: 'block',
|
|
201
|
+
padding: '16px',
|
|
202
|
+
border: '1px solid #2F2F31',
|
|
203
|
+
borderRadius: '8px',
|
|
204
|
+
textDecoration: 'none',
|
|
205
|
+
color: 'inherit',
|
|
206
|
+
}}
|
|
207
|
+
>
|
|
208
|
+
<strong style={{ color: '#08d88d' }}>Deprecated</strong>
|
|
209
|
+
<p style={{ margin: '8px 0 0', opacity: 0.85, fontSize: '14px' }}>
|
|
210
|
+
Legacy components kept for compatibility. Prefer the documented replacements; these will be removed.
|
|
211
|
+
</p>
|
|
212
|
+
</a>
|
|
213
|
+
</div>
|
|
@@ -2,14 +2,14 @@ import React from 'react'
|
|
|
2
2
|
import { LokalisePoc } from './LokalisePoc'
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title: '
|
|
5
|
+
title: 'Deprecated/LokalisePoc',
|
|
6
6
|
component: LokalisePoc,
|
|
7
7
|
parameters: {
|
|
8
8
|
layout: 'centered',
|
|
9
9
|
docs: {
|
|
10
10
|
description: {
|
|
11
11
|
component: `
|
|
12
|
-
LokalisePoc
|
|
12
|
+
> **Deprecated:** Proof of concept only. \`LokalisePoc\` will be removed in a future release.
|
|
13
13
|
|
|
14
14
|
## Usage
|
|
15
15
|
|
|
@@ -28,6 +28,8 @@ export const getIconFromTrackId = (trackId) => {
|
|
|
28
28
|
return <VocalIcon width={16} height={16} />
|
|
29
29
|
case 'backing_vocals':
|
|
30
30
|
return <VocalsBackgroundIcon width={16} height={16} />
|
|
31
|
+
case 'lead_vocals':
|
|
32
|
+
return <VocalsBackgroundIcon width={16} height={16} />
|
|
31
33
|
case 'drums':
|
|
32
34
|
return <DrumsIcon width={16} height={16} />
|
|
33
35
|
case 'bass':
|
|
@@ -1,59 +1,36 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Theme } from
|
|
3
|
-
import { Box, Button, Flex, Text, Card, Heading } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Theme } from "./Theme";
|
|
3
|
+
import { Box, Button, Flex, Text, Card, Heading } from "../../index";
|
|
4
|
+
import "../../styles.css";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
argTypes: {
|
|
13
|
-
accentColor: {
|
|
14
|
-
control: 'select',
|
|
15
|
-
options: ['red', 'blue', 'green', 'purple', 'mint', 'aqua']
|
|
16
|
-
},
|
|
17
|
-
appearance: {
|
|
18
|
-
control: 'radio',
|
|
19
|
-
options: ['light', 'dark']
|
|
20
|
-
},
|
|
21
|
-
panelBackground: {
|
|
22
|
-
control: 'radio',
|
|
23
|
-
options: ['solid', 'translucent']
|
|
24
|
-
},
|
|
25
|
-
},
|
|
7
|
+
title: "Layout/Theme",
|
|
8
|
+
component: Theme,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered",
|
|
11
|
+
},
|
|
12
|
+
tags: ["autodocs"],
|
|
26
13
|
};
|
|
27
14
|
|
|
28
15
|
export const Default = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</Box>
|
|
50
|
-
),
|
|
51
|
-
},
|
|
16
|
+
args: {
|
|
17
|
+
children: (
|
|
18
|
+
<Box p="6" style={{ maxWidth: 500 }}>
|
|
19
|
+
<Flex direction="column" gap="4">
|
|
20
|
+
<Heading size="6">Theme Example</Heading>
|
|
21
|
+
<Text>This example shows our default theme styling.</Text>
|
|
22
|
+
<Card>
|
|
23
|
+
<Flex direction="column" gap="2" p="4">
|
|
24
|
+
<Text weight="bold">Card Component</Text>
|
|
25
|
+
<Text size="2">Content inside a card with default styling</Text>
|
|
26
|
+
<Flex gap="3" mt="3">
|
|
27
|
+
<Button variant="soft">Cancel</Button>
|
|
28
|
+
<Button>Submit</Button>
|
|
29
|
+
</Flex>
|
|
30
|
+
</Flex>
|
|
31
|
+
</Card>
|
|
32
|
+
</Flex>
|
|
33
|
+
</Box>
|
|
34
|
+
),
|
|
35
|
+
},
|
|
52
36
|
};
|
|
53
|
-
|
|
54
|
-
export const LightTheme = {
|
|
55
|
-
args: {
|
|
56
|
-
...Default.args,
|
|
57
|
-
appearance: 'light',
|
|
58
|
-
},
|
|
59
|
-
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export const AcousticGuitarIcon = ({ width, height, className, ...props }) => (
|
|
1
|
+
export const AcousticGuitarIcon = ({ width = 16, height = 16, className, ...props }) => (
|
|
2
2
|
<svg xmlns="http://www.w3.org/2000/svg" width={width} height={height} viewBox="0 0 16 16" fill="none" aria-label="Acoustic Guitar" className={className} {...props}>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
</svg>
|
|
3
|
+
<path
|
|
4
|
+
d="M3.30497 1.83325C3.30497 2.43126 3.52187 2.93569 3.85078 3.55551C4.38238 4.55732 4.1816 5.38171 3.48891 6.15154C2.27717 7.49824 1.83337 8.57791 1.83337 9.80701C1.83337 12.6709 4.66715 14.1749 8.07291 14.1749C11.4787 14.1749 14.1667 12.6709 14.1667 9.80701C14.1667 8.57791 13.7229 7.49824 12.5112 6.15154C11.8185 5.38171 11.6177 4.55732 12.1493 3.55551C12.4782 2.93569 12.6951 2.43126 12.6951 1.83325M5.86671 8.07687H10.1334M9.64587 3.68312C9.64587 4.59209 8.90901 5.32896 8.00004 5.32896C7.09107 5.32896 6.35421 4.59209 6.35421 3.68312C6.35421 2.77415 7.09107 2.03729 8.00004 2.03729C8.90901 2.03729 9.64587 2.77415 9.64587 3.68312Z"
|
|
5
|
+
stroke="currentColor" strokeWidth="1.2" strokeLinecap="round" />
|
|
6
|
+
</svg>
|
|
7
7
|
)
|
|
8
8
|
|
|
9
9
|
AcousticGuitarIcon.displayName = 'AcousticGuitarIcon'
|