@moises.ai/design-system 3.5.4 → 3.5.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.
Files changed (41) hide show
  1. package/dist/{EditIcon-DOFkQeiV.js → EditIcon-Bn6TqXCt.js} +12 -6
  2. package/dist/icons.js +1 -1
  3. package/dist/index.js +4658 -4630
  4. package/package.json +1 -1
  5. package/src/components/Button/Button.module.css +19 -2
  6. package/src/components/DataTable/DataTable.jsx +120 -33
  7. package/src/components/DataTable/DataTable.module.css +14 -32
  8. package/src/components/DataTable/DataTable.stories.jsx +13 -7
  9. package/src/components/DropdownMenu/DropdownMenu.stories.jsx +63 -23
  10. package/src/components/IconButton/IconButton.module.css +47 -8
  11. package/src/components/MoreButton/MoreButton.jsx +25 -0
  12. package/src/components/MoreButton/MoreButton.module.css +43 -0
  13. package/src/components/MoreButton/MoreButton.stories.jsx +30 -0
  14. package/src/components/ProductsBrandPattern/ProductsBrandPattern.jsx +15 -13
  15. package/src/components/ProductsBrandPattern/ProductsBrandPattern.stories.jsx +61 -15
  16. package/src/components/ProfileMenu/MenuTrigger.jsx +14 -9
  17. package/src/components/ProjectsList/ProjectsList.jsx +3 -8
  18. package/src/components/ProjectsList/utils.jsx +0 -26
  19. package/src/components/SetlistList/SetlistList.jsx +15 -48
  20. package/src/components/SetlistList/SetlistList.module.css +7 -5
  21. package/src/components/Sidebar/Sidebar.jsx +6 -3
  22. package/src/components/Sidebar/Sidebar.module.css +1 -1
  23. package/src/components/Sidebar/SidebarSection/SidebarSection.module.css +1 -1
  24. package/src/components/TextArea/TextArea.jsx +1 -1
  25. package/src/components/TextArea/TextArea.module.css +16 -0
  26. package/src/components/TextField/TextField.jsx +16 -4
  27. package/src/components/TextField/TextField.module.css +45 -1
  28. package/src/components/TextField/TextField.stories.jsx +32 -0
  29. package/src/icons/DotsVertical2Icon.jsx +7 -8
  30. package/src/index.jsx +2 -0
  31. package/src/lib/menu/Menu.module.css +6 -15
  32. package/src/components/ProductsBrandPattern/Patterns/aiStudio.png +0 -0
  33. package/src/components/ProductsBrandPattern/Patterns/mastering.png +0 -0
  34. package/src/components/ProductsBrandPattern/Patterns/product.png +0 -0
  35. package/src/components/ProductsBrandPattern/Patterns/stemSeparation.png +0 -0
  36. package/src/components/ProductsBrandPattern/Patterns/voiceStudio.png +0 -0
  37. /package/src/components/{ProjectsList/assets/images → ProductsBrandPattern/Patterns}/thumb-song-lyrics.jpg +0 -0
  38. /package/src/components/{ProjectsList/assets/images → ProductsBrandPattern/Patterns}/thumb-song-master.jpg +0 -0
  39. /package/src/components/{ProjectsList/assets/images → ProductsBrandPattern/Patterns}/thumb-song-stems.jpg +0 -0
  40. /package/src/components/{ProjectsList/assets/images → ProductsBrandPattern/Patterns}/thumb-song-studio.jpg +0 -0
  41. /package/src/components/{ProjectsList/assets/images → ProductsBrandPattern/Patterns}/thumb-song-voice.jpg +0 -0
@@ -31,7 +31,6 @@ export const TextArea = ({
31
31
  <TextAreaRadix
32
32
  size={size}
33
33
  variant={variant}
34
- radius="3"
35
34
  value={value}
36
35
  onChange={onChange}
37
36
  placeholder={placeholder}
@@ -41,6 +40,7 @@ export const TextArea = ({
41
40
  [styles.variantSoft]: variant === 'soft',
42
41
  [styles.disabled]: disabled,
43
42
  [styles.focusRing]: focusRing,
43
+ [styles[`size${size}`]]: size,
44
44
  })}
45
45
  resize={resize}
46
46
  {...props}
@@ -32,4 +32,20 @@
32
32
  .focusRing:where(:focus-within) {
33
33
  outline: 1px solid var(--accent-a8);
34
34
  outline-offset: -1px;
35
+ }
36
+
37
+ .size1 textarea {
38
+ border-radius: 4px;
39
+ }
40
+
41
+ .size2 textarea {
42
+ border-radius: 6px;
43
+ }
44
+
45
+ .size3 textarea {
46
+ border-radius: 8px;
47
+ }
48
+
49
+ .size4 textarea {
50
+ border-radius: 12px;
35
51
  }
@@ -2,7 +2,6 @@ import { Flex, TextField as TextFieldRadix, Text } from '@radix-ui/themes'
2
2
  import styles from './TextField.module.css'
3
3
  import classNames from 'classnames'
4
4
  import { TooltipWithInfoIcon } from '../TooltipWithInfoIcon/TooltipWithInfoIcon'
5
- import { IconButton as IconButtonComponent } from '../IconButton/IconButton'
6
5
 
7
6
  export const TextField = ({
8
7
  value,
@@ -18,6 +17,8 @@ export const TextField = ({
18
17
  focusRing = false,
19
18
  startSlot,
20
19
  endSlot,
20
+ error,
21
+ secondaryText,
21
22
  ...props
22
23
  }) => {
23
24
  // legacy Icon prop is kept for backwards compatibility.
@@ -43,7 +44,9 @@ export const TextField = ({
43
44
  className={classNames(styles.TextField, className, {
44
45
  [styles.Disabled]: disabled,
45
46
  [styles.ReadOnly]: readOnly,
46
- [styles.focusRing]: focusRing,
47
+ [styles.focusRing]: focusRing || error,
48
+ [styles.errorText]: error,
49
+ [styles[`size${size}`]]: size,
47
50
  })}
48
51
  readOnly={readOnly}
49
52
  disabled={disabled}
@@ -52,9 +55,18 @@ export const TextField = ({
52
55
  {resolvedStartSlot && (
53
56
  <TextFieldRadix.Slot>{resolvedStartSlot}</TextFieldRadix.Slot>
54
57
  )}
55
- {endSlot && <TextFieldRadix.Slot>{endSlot}</TextFieldRadix.Slot>}
58
+ {endSlot && <div className={styles.endSlot}>{endSlot}</div>}
56
59
  </TextFieldRadix.Root>
57
- </Flex>
60
+ {secondaryText && (
61
+ <Text size='1' weight="regular"
62
+ className={classNames(styles.secondaryText, {
63
+ [styles.errorText]: error
64
+ })}>
65
+ {secondaryText}
66
+ </Text>
67
+ )
68
+ }
69
+ </Flex >
58
70
  )
59
71
  }
60
72
 
@@ -9,6 +9,30 @@
9
9
  &:where(:focus-within) {
10
10
  outline: none !important;
11
11
  }
12
+
13
+ &.size1 {
14
+ & input {
15
+ border-radius: 4px;
16
+ }
17
+ }
18
+
19
+ &.size2 {
20
+ & input {
21
+ border-radius: 6px;
22
+ }
23
+ }
24
+
25
+ &.size3 {
26
+ & input {
27
+ border-radius: 8px;
28
+ }
29
+ }
30
+
31
+ &.size4 {
32
+ & input {
33
+ border-radius: 12px;
34
+ }
35
+ }
12
36
  }
13
37
 
14
38
  .icon {
@@ -35,7 +59,27 @@
35
59
  }
36
60
 
37
61
 
38
- .focusRing:where(:focus-within):not(.ReadOnly):not(.Disabled) {
62
+ .focusRing:where(:focus-within):not(.ReadOnly):not(.Disabled):not(.errorText) {
39
63
  outline: 1px solid var(--accent-a8) !important;
40
64
  outline-offset: -1px;
65
+ }
66
+
67
+ .focusRing.errorText {
68
+ outline: 1px solid var(--error-alpha-11) !important;
69
+ outline-offset: -1px;
70
+ }
71
+
72
+ .secondaryText {
73
+ color: var(--neutral-alpha-9);
74
+ }
75
+
76
+ .errorText {
77
+ color: var(--error-alpha-11);
78
+ }
79
+
80
+ .endSlot {
81
+ padding-right: 4px;
82
+ display: flex;
83
+ align-items: center;
84
+ justify-content: center;
41
85
  }
@@ -123,6 +123,22 @@ const MyComponent = () => (
123
123
  defaultValue: { summary: 'false' },
124
124
  },
125
125
  },
126
+ error: {
127
+ control: 'boolean',
128
+ description: 'Whether the input has an error',
129
+ table: {
130
+ type: { summary: 'boolean' },
131
+ defaultValue: { summary: 'false' },
132
+ },
133
+ },
134
+ secondaryText: {
135
+ control: 'text',
136
+ description: 'Secondary text to be displayed below the input',
137
+ table: {
138
+ type: { summary: 'string' },
139
+ defaultValue: { summary: 'undefined' },
140
+ },
141
+ },
126
142
  startSlot: {
127
143
  control: false,
128
144
  description: 'Custom content rendered in the leading slot',
@@ -174,6 +190,22 @@ export const Active = {
174
190
  },
175
191
  }
176
192
 
193
+ export const WithError = {
194
+ args: {
195
+ ...Default.args,
196
+ error: true,
197
+ secondaryText: 'This is an error message',
198
+ },
199
+ }
200
+
201
+ export const WithSecondaryText = {
202
+ args: {
203
+ ...Default.args,
204
+ error: false,
205
+ secondaryText: 'This is a secondary text',
206
+ },
207
+ }
208
+
177
209
  export const Filled = {
178
210
  args: {
179
211
  ...Default.args,
@@ -11,32 +11,31 @@ export const DotsVertical2Icon = ({
11
11
  viewBox="0 0 3 11"
12
12
  fill="none"
13
13
  className={className}
14
- {...props}
15
- >
14
+ {...props}>
16
15
  <path
17
16
  d="M2.18285 1.34142C2.18285 1.80613 1.80613 2.18285 1.34142 2.18285C0.876718 2.18285 0.5 1.80613 0.5 1.34142C0.5 0.876718 0.876718 0.5 1.34142 0.5C1.80613 0.5 2.18285 0.876718 2.18285 1.34142Z"
18
17
  stroke="currentColor"
19
- />
18
+ strokeOpacity="0.709804" />
20
19
  <path
21
20
  d="M1.84133 1.34142C1.84133 1.61757 1.61747 1.84142 1.34133 1.84142C1.06519 1.84142 0.841328 1.61757 0.841328 1.34142C0.841328 1.06528 1.06519 0.841423 1.34133 0.841423C1.61747 0.841423 1.84133 1.06528 1.84133 1.34142Z"
22
21
  stroke="currentColor"
23
- />
22
+ strokeOpacity="0.709804" />
24
23
  <path
25
24
  d="M2.18285 5.30221C2.18285 5.76691 1.80613 6.14363 1.34142 6.14363C0.876718 6.14363 0.5 5.76691 0.5 5.30221C0.5 4.8375 0.876718 4.46079 1.34142 4.46079C1.80613 4.46079 2.18285 4.8375 2.18285 5.30221Z"
26
25
  stroke="currentColor"
27
- />
26
+ strokeOpacity="0.709804" />
28
27
  <path
29
28
  d="M1.84133 5.30221C1.84133 5.57835 1.61747 5.80221 1.34133 5.80221C1.06519 5.80221 0.841328 5.57835 0.841328 5.30221C0.841328 5.02607 1.06519 4.80221 1.34133 4.80221C1.61747 4.80221 1.84133 5.02607 1.84133 5.30221Z"
30
29
  stroke="currentColor"
31
- />
30
+ strokeOpacity="0.709804" />
32
31
  <path
33
32
  d="M2.18285 9.26299C2.18285 9.7277 1.80613 10.1044 1.34142 10.1044C0.876718 10.1044 0.5 9.7277 0.5 9.26299C0.5 8.79829 0.876718 8.42157 1.34142 8.42157C1.80613 8.42157 2.18285 8.79829 2.18285 9.26299Z"
34
33
  stroke="currentColor"
35
- />
34
+ strokeOpacity="0.709804" />
36
35
  <path
37
36
  d="M1.84133 9.26299C1.84133 9.53914 1.61747 9.76299 1.34133 9.76299C1.06519 9.76299 0.841328 9.53914 0.841328 9.26299C0.841328 8.98685 1.06519 8.76299 1.34133 8.76299C1.61747 8.76299 1.84133 8.98685 1.84133 9.26299Z"
38
37
  stroke="currentColor"
39
- />
38
+ strokeOpacity="0.709804" />
40
39
  </svg>
41
40
  )
42
41
 
package/src/index.jsx CHANGED
@@ -150,3 +150,5 @@ export { Waveform } from './components/VoiceConversionForm/Waveform/Waveform'
150
150
  export { InstrumentSelector } from './components/InstrumentSelector/InstrumentSelector'
151
151
  export { Card as CardWidget } from './components/Card/Card'
152
152
  export { ProjectsList } from './components/ProjectsList/ProjectsList'
153
+
154
+ export { MoreButton } from './components/MoreButton/MoreButton'
@@ -204,20 +204,11 @@
204
204
  }
205
205
 
206
206
  .menuItem[data-state='open'],
207
- .menuTrigger[data-state='open'],
208
- .menuTrigger[data-highlighted] {
207
+ .menuTrigger[data-state='open']:not(.showActiveTrigger),
208
+ .menuTrigger[data-highlighted]:not(.showActiveTrigger) {
209
209
  background-color: transparent;
210
210
  }
211
211
 
212
- .showActiveTrigger {
213
- background-color: var(--neutral-alpha-0-50) !important;
214
- border-radius: 3px;
215
-
216
- &:hover {
217
- background-color: var(--neutral-alpha-2) !important;
218
- }
219
- }
220
-
221
212
  .menuSubTrigger[data-highlighted],
222
213
  .menuItem[data-highlighted],
223
214
  .menuSubTrigger[data-state='open'] {
@@ -258,7 +249,7 @@
258
249
  .menuItemSelected {
259
250
  background-color: var(--neutral-alpha-3);
260
251
  border-radius: 6px;
261
- cursor: default;
252
+ cursor: pointer;
262
253
  font-weight: 400;
263
254
 
264
255
  &[data-disabled] {
@@ -321,19 +312,19 @@
321
312
  }
322
313
 
323
314
  .red {
324
- color: color(display-p3 1 .57 .55);
315
+ color: rgba(255, 149, 146, 1);
325
316
 
326
317
  & .label,
327
318
  & .leftIcon,
328
319
  & .rightIcon,
329
320
  & .checkboxIndicatorSlot {
330
- color: color(display-p3 1 .57 .55);
321
+ color: rgba(255, 149, 146, 1);
331
322
  }
332
323
 
333
324
  & .leftIcon > svg,
334
325
  & .rightIcon > svg,
335
326
  & .menuCheckboxIndicator > svg {
336
- color: color(display-p3 1 .57 .55);
327
+ color: rgba(255, 149, 146, 1);
337
328
  }
338
329
  }
339
330