@moises.ai/design-system 4.17.6 → 4.17.7

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": "4.17.6",
3
+ "version": "4.17.7",
4
4
  "description": "Design System package based on @radix-ui/themes with custom defaults",
5
5
  "private": false,
6
6
  "type": "module",
@@ -94,6 +94,20 @@
94
94
  color: var(--neutral-alpha-5);
95
95
  }
96
96
 
97
+ .card[data-state='disabled-checked'] {
98
+ border-color: rgba(0, 220, 253, 0.20);
99
+ background: var(--neutral-alpha-2, rgba(216, 244, 246, 0.04));
100
+ cursor: default;
101
+ }
102
+
103
+ .card[data-state='disabled-checked'] .cardIcon {
104
+ color: rgba(0, 220, 253, 0.20);
105
+ }
106
+
107
+ .card[data-state='disabled-checked'] .cardText {
108
+ color: var(--neutral-alpha-6);
109
+ }
110
+
97
111
  /* ----- Card slots ----- */
98
112
 
99
113
  .cardIcon {
@@ -144,4 +158,4 @@
144
158
  transform: translateY(-50%);
145
159
  color: var(--neutral-alpha-5);
146
160
  pointer-events: none;
147
- }
161
+ }
@@ -187,6 +187,12 @@ export const CardStates = () => (
187
187
  state="disabled"
188
188
  locked
189
189
  />
190
+ <InstrumentSelectCard
191
+ value="vocals"
192
+ text="Disabled checked"
193
+ Icon={VocalIcon}
194
+ state="disabled-checked"
195
+ />
190
196
  </div>
191
197
  )
192
198
 
@@ -194,7 +200,7 @@ CardStates.parameters = {
194
200
  docs: {
195
201
  description: {
196
202
  story:
197
- 'The four visual states of `InstrumentSelectCard`: default, hover, checked, and disabled (locked).',
203
+ 'The five visual states of `InstrumentSelectCard`: default, hover, checked, disabled (locked), and disabled-checked (selected but non-interactive).',
198
204
  },
199
205
  },
200
206
  }
@@ -4,7 +4,7 @@ import { LockIcon } from '../../icons'
4
4
  import styles from './InstrumentSelect.module.css'
5
5
 
6
6
  /**
7
- * @typedef {'default' | 'hover' | 'checked' | 'disabled'} InstrumentSelectCardState
7
+ * @typedef {'default' | 'hover' | 'checked' | 'disabled' | 'disabled-checked'} InstrumentSelectCardState
8
8
  */
9
9
 
10
10
  /**
@@ -21,7 +21,8 @@ import styles from './InstrumentSelect.module.css'
21
21
  */
22
22
 
23
23
  /**
24
- * Individual instrument card with four visual states (default, hover, checked, disabled).
24
+ * Individual instrument card with five visual states (default, hover, checked, disabled,
25
+ * disabled-checked).
25
26
  *
26
27
  * Native `<button>` with `aria-pressed` for selection (works for both single and multi-select)
27
28
  * and `aria-disabled` for locked/disabled items. The HTML `disabled` attribute is intentionally
@@ -52,7 +53,15 @@ export const InstrumentSelectCard = forwardRef(function InstrumentSelectCard(
52
53
  ref,
53
54
  ) {
54
55
  const isBlocked = locked || disabled
55
- const computedState = state ?? (isBlocked ? 'disabled' : selected ? 'checked' : 'default')
56
+ const computedState =
57
+ state ??
58
+ (isBlocked
59
+ ? selected
60
+ ? 'disabled-checked'
61
+ : 'disabled'
62
+ : selected
63
+ ? 'checked'
64
+ : 'default')
56
65
 
57
66
  const renderIcon = () => {
58
67
  if (!Icon) return null