@moises.ai/design-system 3.11.6 → 3.11.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moises.ai/design-system",
3
- "version": "3.11.6",
3
+ "version": "3.11.8",
4
4
  "description": "Design System package based on @radix-ui/themes with custom defaults",
5
5
  "private": false,
6
6
  "type": "module",
@@ -136,7 +136,7 @@ export const TrackHeader = memo(
136
136
  </IconButton>
137
137
  }
138
138
  options={instrumentOptions}
139
- onValueChange={onInstrumentChange}
139
+ onSelectionChange={onInstrumentChange}
140
140
  side="bottom"
141
141
  align="start"
142
142
  />
@@ -173,13 +173,19 @@ background-color: rgba(17, 17, 19);
173
173
 
174
174
  .trackContent {
175
175
  padding-left: 0;
176
- background-color: var(--neutral-alpha-2);
176
+ background-color: var(--neutral-alpha-2);
177
+ border-left-style: solid;
178
+ border-left-color: var(--neutral-alpha-3);
179
+ border-left-width: 1px;
177
180
  .toggleOpenButton {
178
181
  display: none;
179
182
  }
183
+ .line {
184
+ padding-left: var(--space-4);
185
+ }
180
186
 
181
187
  .name {
182
- padding-left: var(--space-4);
188
+ /* padding-left: var(--space-4); */
183
189
  background: linear-gradient(
184
190
  90deg,
185
191
  var(--neutral-alpha-11) 95%,
@@ -123,11 +123,10 @@ export const Default = {
123
123
  isAutoMuted: false,
124
124
  compact: false,
125
125
  menuOptions,
126
- onVolumeChange: () => {},
127
- onPanChange: () => {},
128
- onMutedChange: () => {},
129
- onSoloChange: () => {},
130
- onInstrumentChange: () => {},
126
+ onVolumeChange: () => { },
127
+ onPanChange: () => { },
128
+ onMutedChange: () => { },
129
+ onSoloChange: () => { },
131
130
  instrumentOptions,
132
131
  instrumentSelected: instrumentOptions[0],
133
132
  },
@@ -136,10 +135,15 @@ export const Default = {
136
135
  const [isRecord, setIsRecord] = useState(false)
137
136
  const [isMuted, setIsMuted] = useState(args.isMuted)
138
137
  const [isSolo, setIsSolo] = useState(args.isSolo)
138
+ const [instrumentSelected, setInstrumentSelected] = useState(
139
+ args.instrumentSelected,
140
+ )
139
141
 
140
142
  return (
141
143
  <TrackHeader
142
144
  {...args}
145
+ instrumentSelected={instrumentSelected}
146
+ onInstrumentChange={setInstrumentSelected}
143
147
  deviceOptions={[
144
148
  { value: 'mic', label: 'Built-in Microphone' },
145
149
  { value: 'interface', label: 'Audio Interface' },
@@ -173,17 +177,20 @@ export const Group = {
173
177
  isAutoMuted: false,
174
178
  compact: false,
175
179
  menuOptions,
176
- onVolumeChange: () => {},
177
- onPanChange: () => {},
178
- onMutedChange: () => {},
179
- onSoloChange: () => {},
180
+ onVolumeChange: () => { },
181
+ onPanChange: () => { },
182
+ onMutedChange: () => { },
183
+ onSoloChange: () => { },
184
+ instrumentOptions,
185
+ instrumentSelected: instrumentOptions[0],
186
+ onInstrumentChange: () => { },
180
187
  },
181
188
  render: (args) => {
182
189
  const [isOpen, setIsOpen] = useState(true)
183
190
  const [pan, setPan] = useState(-0.3)
184
191
  const [pan2, setPan2] = useState(-0.3)
185
192
  return (
186
- <TrackHeader {...args} isOpen={isOpen} onOpenChange={setIsOpen}>
193
+ <TrackHeader {...args} isOpen={isOpen} onOpenChange={setIsOpen} instrumentSelected={args.instrumentSelected} onInstrumentChange={args.onInstrumentChange}>
187
194
  <TrackHeader
188
195
  title="Grouped Track"
189
196
  isGrouped
@@ -193,11 +200,14 @@ export const Group = {
193
200
  pan={pan}
194
201
  isMuted={false}
195
202
  isSolo={false}
196
- onVolumeChange={() => {}}
203
+ onVolumeChange={() => { }}
197
204
  onPanChange={setPan}
198
- onMutedChange={() => {}}
199
- onSoloChange={() => {}}
205
+ onMutedChange={() => { }}
206
+ onSoloChange={() => { }}
200
207
  menuOptions={menuOptions}
208
+ instrumentOptions={args.instrumentOptions}
209
+ instrumentSelected={args.instrumentSelected}
210
+ onInstrumentChange={args.onInstrumentChange}
201
211
  />
202
212
  <TrackHeader
203
213
  title="Grouped Track"
@@ -208,11 +218,14 @@ export const Group = {
208
218
  pan={pan2}
209
219
  isMuted={false}
210
220
  isSolo={false}
211
- onVolumeChange={() => {}}
221
+ onVolumeChange={() => { }}
212
222
  onPanChange={setPan2}
213
- onMutedChange={() => {}}
214
- onSoloChange={() => {}}
223
+ onMutedChange={() => { }}
224
+ onSoloChange={() => { }}
215
225
  menuOptions={menuOptions}
226
+ instrumentOptions={args.instrumentOptions}
227
+ instrumentSelected={args.instrumentSelected}
228
+ onInstrumentChange={args.onInstrumentChange}
216
229
  />
217
230
  </TrackHeader>
218
231
  )
@@ -232,20 +245,27 @@ export const Takelanes = {
232
245
  isSolo: false,
233
246
  compact: false,
234
247
  menuOptions,
235
- onVolumeChange: () => {},
236
- onPanChange: () => {},
237
- onMutedChange: () => {},
238
- onSoloChange: () => {},
239
- onOpenChange: () => {},
248
+ onVolumeChange: () => { },
249
+ onPanChange: () => { },
250
+ onMutedChange: () => { },
251
+ onSoloChange: () => { },
252
+ onOpenChange: () => { },
253
+ instrumentOptions,
254
+ instrumentSelected: instrumentOptions[0],
255
+ onInstrumentChange: () => { },
256
+
240
257
  },
241
258
  render: (args) => (
242
- <TrackHeader {...args}>
259
+ <TrackHeader {...args} instrumentSelected={args.instrumentSelected} onInstrumentChange={args.onInstrumentChange}>
243
260
  <TrackHeader
244
261
  title="Take Lane 1"
245
262
  showPan={false}
246
263
  showVolumeControls={false}
247
264
  isGrouped
248
265
  menuOptions={menuOptions}
266
+ instrumentOptions={args.instrumentOptions}
267
+ instrumentSelected={args.instrumentSelected}
268
+ onInstrumentChange={args.onInstrumentChange}
249
269
  />
250
270
  <TrackHeader
251
271
  title="Take Lane 1"
@@ -253,6 +273,9 @@ export const Takelanes = {
253
273
  showVolumeControls={false}
254
274
  isGrouped
255
275
  menuOptions={menuOptions}
276
+ instrumentOptions={args.instrumentOptions}
277
+ instrumentSelected={args.instrumentSelected}
278
+ onInstrumentChange={args.onInstrumentChange}
256
279
  />
257
280
  </TrackHeader>
258
281
  ),