@discourser/design-system 0.23.0 → 0.25.0
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/{chunk-KIJKNZ73.cjs → chunk-QNCZYFUJ.cjs} +46 -11
- package/dist/chunk-QNCZYFUJ.cjs.map +1 -0
- package/dist/{chunk-AGZVRI36.cjs → chunk-TBLDQATQ.cjs} +688 -12
- package/dist/chunk-TBLDQATQ.cjs.map +1 -0
- package/dist/{chunk-KQOHRIUP.js → chunk-UHSL4N44.js} +685 -14
- package/dist/chunk-UHSL4N44.js.map +1 -0
- package/dist/{chunk-HN2IHIMR.js → chunk-ZPECW4N2.js} +46 -11
- package/dist/chunk-ZPECW4N2.js.map +1 -0
- package/dist/components/Badge.figma.d.ts +2 -0
- package/dist/components/Badge.figma.d.ts.map +1 -0
- package/dist/components/Button.figma.d.ts +2 -0
- package/dist/components/Button.figma.d.ts.map +1 -0
- package/dist/components/Card.figma.d.ts +2 -0
- package/dist/components/Card.figma.d.ts.map +1 -0
- package/dist/components/Icons/AudienceIcon.d.ts.map +1 -1
- package/dist/components/Icons/ChevronUpDownIcon.d.ts +6 -0
- package/dist/components/Icons/ChevronUpDownIcon.d.ts.map +1 -0
- package/dist/components/Icons/LoginIcon.d.ts +6 -0
- package/dist/components/Icons/LoginIcon.d.ts.map +1 -0
- package/dist/components/Icons/LogoutIcon.d.ts +6 -0
- package/dist/components/Icons/LogoutIcon.d.ts.map +1 -0
- package/dist/components/Icons/index.d.ts +3 -0
- package/dist/components/Icons/index.d.ts.map +1 -1
- package/dist/components/Input.figma.d.ts +2 -0
- package/dist/components/Input.figma.d.ts.map +1 -0
- package/dist/components/RadioGroup.figma.d.ts +2 -0
- package/dist/components/RadioGroup.figma.d.ts.map +1 -0
- package/dist/components/SettingsPopover/SettingsPopover.d.ts +3 -0
- package/dist/components/SettingsPopover/SettingsPopover.d.ts.map +1 -0
- package/dist/components/SettingsPopover/SettingsPopover.figma.d.ts +2 -0
- package/dist/components/SettingsPopover/SettingsPopover.figma.d.ts.map +1 -0
- package/dist/components/SettingsPopover/index.d.ts +3 -0
- package/dist/components/SettingsPopover/index.d.ts.map +1 -0
- package/dist/components/SettingsPopover/types.d.ts +30 -0
- package/dist/components/SettingsPopover/types.d.ts.map +1 -0
- package/dist/components/Slider.figma.d.ts +2 -0
- package/dist/components/Slider.figma.d.ts.map +1 -0
- package/dist/components/Stepper/Stepper.figma.d.ts +2 -0
- package/dist/components/Stepper/Stepper.figma.d.ts.map +1 -0
- package/dist/components/StudioControls/StudioControls.d.ts +3 -0
- package/dist/components/StudioControls/StudioControls.d.ts.map +1 -0
- package/dist/components/StudioControls/StudioControls.figma.d.ts +2 -0
- package/dist/components/StudioControls/StudioControls.figma.d.ts.map +1 -0
- package/dist/components/StudioControls/index.d.ts +3 -0
- package/dist/components/StudioControls/index.d.ts.map +1 -0
- package/dist/components/StudioControls/types.d.ts +17 -0
- package/dist/components/StudioControls/types.d.ts.map +1 -0
- package/dist/components/Switch.figma.d.ts +2 -0
- package/dist/components/Switch.figma.d.ts.map +1 -0
- package/dist/components/index.cjs +90 -70
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/figma-codex/parser.d.ts +2 -0
- package/dist/figma-codex/parser.d.ts.map +1 -1
- package/dist/figma-codex/resolver.d.ts.map +1 -1
- package/dist/figma-codex/schema.d.ts +7 -0
- package/dist/figma-codex/schema.d.ts.map +1 -1
- package/dist/figma-codex.json +408 -2
- package/dist/index.cjs +94 -74
- package/dist/index.js +2 -2
- package/dist/preset/index.cjs +2 -2
- package/dist/preset/index.js +1 -1
- package/dist/preset/recipes/badge.d.ts.map +1 -1
- package/dist/preset/recipes/index.d.ts +1 -0
- package/dist/preset/recipes/index.d.ts.map +1 -1
- package/dist/preset/recipes/studio-controls.d.ts +2 -0
- package/dist/preset/recipes/studio-controls.d.ts.map +1 -0
- package/dist/preset/recipes/switch.d.ts.map +1 -1
- package/docs/figma-mcp-return/card-audit.json +31 -0
- package/docs/figma-mcp-return/conversation-prelaunch-audit.json +51 -0
- package/docs/figma-mcp-return/conversation_lobby-design-context.md +359 -0
- package/docs/figma-mcp-return/conversation_lobby-metadata.xml +1 -0
- package/docs/figma-mcp-return/discourser-accordion-audit.json +264 -0
- package/docs/figma-mcp-return/discourser-accordion-design-context-v2.tsx +350 -0
- package/docs/figma-mcp-return/discourser-accordion-design-context.tsx +130 -0
- package/docs/figma-mcp-return/discourser-accordion-metadata-v2.xml +1 -0
- package/docs/figma-mcp-return/discourser-accordion-metadata.xml +1 -0
- package/docs/figma-mcp-return/kai-resolution-simulation.md +181 -0
- package/docs/figma-mcp-return/prelaunch-comparison-analysis.md +126 -0
- package/docs/figma-mcp-return/prelaunch-get-design-context.md +982 -0
- package/docs/figma-mcp-return/prelaunch-get-metadata.md +7 -0
- package/docs/figma-mcp-return/prelaunch-get-metadata.xml +3 -0
- package/docs/figma-mcp-return/prelaunch-post-component-update.md +791 -0
- package/docs/figma-mcp-return/prelaunch-post-rebind-design-context.md +969 -0
- package/docs/figma-mcp-return/radio-group-audit.json +23 -0
- package/docs/figma-mcp-return/switch-audit.json +38 -0
- package/docs/session-summary-2026-03-29.md +98 -0
- package/package.json +6 -1
- package/src/components/Badge.figma.tsx +39 -0
- package/src/components/Button.figma.tsx +18 -0
- package/src/components/Card.figma.tsx +33 -0
- package/src/components/Icons/AudienceIcon.tsx +3 -1
- package/src/components/Icons/AudioSpeakerIcon.tsx +1 -1
- package/src/components/Icons/ChevronUpDownIcon.tsx +23 -0
- package/src/components/Icons/LoginIcon.tsx +71 -0
- package/src/components/Icons/LogoutIcon.tsx +43 -0
- package/src/components/Icons/MicrophoneIcon.tsx +3 -3
- package/src/components/Icons/RecordIcon.tsx +4 -4
- package/src/components/Icons/TimerIcon.tsx +1 -1
- package/src/components/Icons/index.ts +6 -0
- package/src/components/Input.figma.tsx +17 -0
- package/src/components/RadioGroup.figma.tsx +38 -0
- package/src/components/SettingsPopover/SettingsPopover.figma.tsx +17 -0
- package/src/components/SettingsPopover/SettingsPopover.test.tsx +256 -0
- package/src/components/SettingsPopover/SettingsPopover.tsx +159 -0
- package/src/components/SettingsPopover/index.ts +2 -0
- package/src/components/SettingsPopover/types.ts +37 -0
- package/src/components/Slider.figma.tsx +20 -0
- package/src/components/Stepper/Stepper.figma.tsx +19 -0
- package/src/components/StudioControls/StudioControls.figma.tsx +25 -0
- package/src/components/StudioControls/StudioControls.tsx +381 -0
- package/src/components/StudioControls/index.ts +2 -0
- package/src/components/StudioControls/types.ts +17 -0
- package/src/components/Switch.figma.tsx +32 -0
- package/src/components/index.ts +16 -0
- package/src/figma-codex/parser.ts +55 -0
- package/src/figma-codex/resolver.ts +1 -0
- package/src/figma-codex/schema.ts +9 -0
- package/src/preset/recipes/badge.ts +41 -7
- package/src/preset/recipes/index.ts +1 -0
- package/src/preset/recipes/studio-controls.ts +252 -0
- package/src/preset/recipes/switch.ts +5 -4
- package/dist/chunk-AGZVRI36.cjs.map +0 -1
- package/dist/chunk-HN2IHIMR.js.map +0 -1
- package/dist/chunk-KIJKNZ73.cjs.map +0 -1
- package/dist/chunk-KQOHRIUP.js.map +0 -1
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
export const studioControls = defineSlotRecipe({
|
|
4
|
+
className: 'studio-controls',
|
|
5
|
+
// ── Token mappings for Conversation Studio right-panel accordion ──
|
|
6
|
+
// Figma file: GaHmFfmvO4loUzuZS4TgEz node 38:8232
|
|
7
|
+
// Root/panel bg: neutral.1 (#FDFCF5) — Figma var(--neutral/99) — NOT surface.container.highest
|
|
8
|
+
slots: [
|
|
9
|
+
'root',
|
|
10
|
+
'section',
|
|
11
|
+
'sectionTrigger',
|
|
12
|
+
'triggerIcon',
|
|
13
|
+
'triggerLabel',
|
|
14
|
+
'sectionIndicator',
|
|
15
|
+
'sectionContent',
|
|
16
|
+
// Scenario info panel (section 1)
|
|
17
|
+
'infoPanel',
|
|
18
|
+
'scenarioMeta',
|
|
19
|
+
'scenarioName',
|
|
20
|
+
'scenarioFocus',
|
|
21
|
+
'settingsCard',
|
|
22
|
+
'settingsCardHeading',
|
|
23
|
+
'settingsList',
|
|
24
|
+
'settingsRow',
|
|
25
|
+
'settingsRowLabel',
|
|
26
|
+
'settingsBadge',
|
|
27
|
+
'levelButtonRow',
|
|
28
|
+
'levelButton',
|
|
29
|
+
// Slider panels (sections 2-3)
|
|
30
|
+
'sliderPanel',
|
|
31
|
+
'sliderLabel',
|
|
32
|
+
'sliderLabelText',
|
|
33
|
+
'levelBadge',
|
|
34
|
+
'sliderTrack',
|
|
35
|
+
// Radio panel (section 4)
|
|
36
|
+
'radioPanel',
|
|
37
|
+
// Toggle panels (sections 5-6)
|
|
38
|
+
'togglePanel',
|
|
39
|
+
'toggleDescription',
|
|
40
|
+
],
|
|
41
|
+
base: {
|
|
42
|
+
root: {
|
|
43
|
+
display: 'flex',
|
|
44
|
+
flexDirection: 'column',
|
|
45
|
+
width: 'full',
|
|
46
|
+
cursor: 'default',
|
|
47
|
+
bg: 'neutral.1',
|
|
48
|
+
},
|
|
49
|
+
section: {
|
|
50
|
+
borderBottom: 'none',
|
|
51
|
+
width: 'full',
|
|
52
|
+
},
|
|
53
|
+
sectionTrigger: {
|
|
54
|
+
display: 'flex',
|
|
55
|
+
alignItems: 'center',
|
|
56
|
+
justifyContent: 'space-between',
|
|
57
|
+
gap: '4',
|
|
58
|
+
width: 'full',
|
|
59
|
+
pl: '1',
|
|
60
|
+
pr: '5',
|
|
61
|
+
cursor: 'pointer',
|
|
62
|
+
},
|
|
63
|
+
triggerIcon: {
|
|
64
|
+
flexShrink: 0,
|
|
65
|
+
display: 'flex',
|
|
66
|
+
alignItems: 'center',
|
|
67
|
+
justifyContent: 'flex-start',
|
|
68
|
+
width: '10', // 40px container — matches Figma 40×40 icon area
|
|
69
|
+
height: '10',
|
|
70
|
+
color: 'primary.40', // M3 tonal 40 — darker/bolder than 50, higher contrast
|
|
71
|
+
fontSize: '32px', // SVGs use width/height: 1em → renders at 32×32px
|
|
72
|
+
},
|
|
73
|
+
triggerLabel: {
|
|
74
|
+
flex: 1,
|
|
75
|
+
textAlign: 'start',
|
|
76
|
+
overflow: 'hidden',
|
|
77
|
+
textOverflow: 'ellipsis',
|
|
78
|
+
whiteSpace: 'nowrap',
|
|
79
|
+
},
|
|
80
|
+
sectionIndicator: {
|
|
81
|
+
flexShrink: 0,
|
|
82
|
+
_open: {
|
|
83
|
+
rotate: '180deg',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
sectionContent: {
|
|
87
|
+
overflow: 'hidden',
|
|
88
|
+
borderRadius: '0',
|
|
89
|
+
width: 'full',
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
// ── Scenario Info Panel (section 1) ─────────────────────────────────────
|
|
93
|
+
infoPanel: {
|
|
94
|
+
display: 'flex',
|
|
95
|
+
flexDirection: 'column',
|
|
96
|
+
gap: '4',
|
|
97
|
+
px: '15px',
|
|
98
|
+
py: '5',
|
|
99
|
+
bg: 'neutral.1',
|
|
100
|
+
width: 'full',
|
|
101
|
+
},
|
|
102
|
+
scenarioMeta: {
|
|
103
|
+
display: 'flex',
|
|
104
|
+
flexDirection: 'column',
|
|
105
|
+
gap: '1',
|
|
106
|
+
},
|
|
107
|
+
scenarioName: {
|
|
108
|
+
fontSize: 'lg',
|
|
109
|
+
fontWeight: 'semibold',
|
|
110
|
+
color: 'onSurface',
|
|
111
|
+
lineHeight: '1.2',
|
|
112
|
+
},
|
|
113
|
+
scenarioFocus: {
|
|
114
|
+
fontSize: 'sm',
|
|
115
|
+
fontWeight: 'medium',
|
|
116
|
+
color: 'onSurface',
|
|
117
|
+
lineHeight: '1.4',
|
|
118
|
+
},
|
|
119
|
+
// Stone-bg inner card — Figma: #F5F1EB ≈ surface.container
|
|
120
|
+
settingsCard: {
|
|
121
|
+
display: 'flex',
|
|
122
|
+
flexDirection: 'column',
|
|
123
|
+
gap: '3',
|
|
124
|
+
bg: 'surface.container',
|
|
125
|
+
borderRadius: 'sm',
|
|
126
|
+
px: '5',
|
|
127
|
+
py: '2.5',
|
|
128
|
+
},
|
|
129
|
+
settingsCardHeading: {
|
|
130
|
+
fontSize: 'md',
|
|
131
|
+
fontWeight: 'medium',
|
|
132
|
+
color: 'onSurface',
|
|
133
|
+
},
|
|
134
|
+
settingsList: {
|
|
135
|
+
display: 'flex',
|
|
136
|
+
flexDirection: 'column',
|
|
137
|
+
gap: '2.5',
|
|
138
|
+
},
|
|
139
|
+
settingsRow: {
|
|
140
|
+
display: 'flex',
|
|
141
|
+
alignItems: 'center',
|
|
142
|
+
justifyContent: 'space-between',
|
|
143
|
+
width: 'full',
|
|
144
|
+
},
|
|
145
|
+
settingsRowLabel: {
|
|
146
|
+
fontSize: 'sm',
|
|
147
|
+
fontWeight: 'medium',
|
|
148
|
+
color: 'onSurface',
|
|
149
|
+
flex: 1,
|
|
150
|
+
},
|
|
151
|
+
// Badge: Figma rgba(192,209,92,0.4) ≈ inversePrimary
|
|
152
|
+
settingsBadge: {
|
|
153
|
+
display: 'inline-flex',
|
|
154
|
+
alignItems: 'center',
|
|
155
|
+
px: '2.5',
|
|
156
|
+
py: '1',
|
|
157
|
+
bg: 'inversePrimary',
|
|
158
|
+
color: 'fg.default',
|
|
159
|
+
borderRadius: 'sm',
|
|
160
|
+
fontSize: 'xs',
|
|
161
|
+
fontWeight: 'normal',
|
|
162
|
+
whiteSpace: 'nowrap',
|
|
163
|
+
},
|
|
164
|
+
levelButtonRow: {
|
|
165
|
+
display: 'flex',
|
|
166
|
+
justifyContent: 'flex-end',
|
|
167
|
+
width: 'full',
|
|
168
|
+
},
|
|
169
|
+
// Figma: bg secondary/50 (#6C7D56) ≈ secondary.7
|
|
170
|
+
levelButton: {
|
|
171
|
+
display: 'inline-flex',
|
|
172
|
+
alignItems: 'center',
|
|
173
|
+
gap: '2',
|
|
174
|
+
px: '4',
|
|
175
|
+
py: '2',
|
|
176
|
+
bg: 'secondary.7',
|
|
177
|
+
color: 'white',
|
|
178
|
+
borderRadius: 'sm',
|
|
179
|
+
fontSize: 'sm',
|
|
180
|
+
fontWeight: 'medium',
|
|
181
|
+
cursor: 'pointer',
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
// ── Slider Panels (sections 2-3) ──────────────────────────────────────────
|
|
185
|
+
sliderPanel: {
|
|
186
|
+
display: 'flex',
|
|
187
|
+
flexDirection: 'column',
|
|
188
|
+
gap: '4',
|
|
189
|
+
px: '15px',
|
|
190
|
+
py: '5',
|
|
191
|
+
bg: 'neutral.1',
|
|
192
|
+
width: 'full',
|
|
193
|
+
},
|
|
194
|
+
sliderLabel: {
|
|
195
|
+
display: 'flex',
|
|
196
|
+
alignItems: 'center',
|
|
197
|
+
justifyContent: 'space-between',
|
|
198
|
+
width: 'full',
|
|
199
|
+
},
|
|
200
|
+
sliderLabelText: {
|
|
201
|
+
fontSize: 'md',
|
|
202
|
+
fontWeight: 'semibold',
|
|
203
|
+
color: 'onSurface',
|
|
204
|
+
},
|
|
205
|
+
levelBadge: {
|
|
206
|
+
display: 'inline-flex',
|
|
207
|
+
alignItems: 'center',
|
|
208
|
+
px: '3',
|
|
209
|
+
py: '1',
|
|
210
|
+
bg: 'inversePrimary',
|
|
211
|
+
color: 'fg.default',
|
|
212
|
+
borderRadius: 'full',
|
|
213
|
+
fontSize: 'xs',
|
|
214
|
+
fontWeight: 'normal',
|
|
215
|
+
lineHeight: '1',
|
|
216
|
+
whiteSpace: 'nowrap',
|
|
217
|
+
},
|
|
218
|
+
sliderTrack: {
|
|
219
|
+
width: 'full',
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
// ── Radio Panel (section 4) ───────────────────────────────────────────────
|
|
223
|
+
radioPanel: {
|
|
224
|
+
display: 'flex',
|
|
225
|
+
flexDirection: 'column',
|
|
226
|
+
gap: '4',
|
|
227
|
+
px: '15px',
|
|
228
|
+
py: '5',
|
|
229
|
+
bg: 'neutral.1',
|
|
230
|
+
width: 'full',
|
|
231
|
+
},
|
|
232
|
+
|
|
233
|
+
// ── Toggle Panels (sections 5-6) ──────────────────────────────────────────
|
|
234
|
+
togglePanel: {
|
|
235
|
+
display: 'flex',
|
|
236
|
+
alignItems: 'center',
|
|
237
|
+
justifyContent: 'space-between',
|
|
238
|
+
gap: '4',
|
|
239
|
+
px: '15px',
|
|
240
|
+
py: '5',
|
|
241
|
+
bg: 'neutral.1',
|
|
242
|
+
width: 'full',
|
|
243
|
+
},
|
|
244
|
+
toggleDescription: {
|
|
245
|
+
fontSize: 'sm',
|
|
246
|
+
fontWeight: 'normal',
|
|
247
|
+
color: 'onSurface',
|
|
248
|
+
lineHeight: '1.4',
|
|
249
|
+
flex: 1,
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
});
|
|
@@ -76,17 +76,18 @@ export const switchRecipe = defineSlotRecipe({
|
|
|
76
76
|
solid: {
|
|
77
77
|
control: {
|
|
78
78
|
borderRadius: 'full',
|
|
79
|
-
|
|
79
|
+
// Off state: palette-tinted subtle bg — matches Figma rgba(primary,~40%) off-state.
|
|
80
|
+
// Uses colorPalette so it adapts to primary/secondary/tertiary/neutral/error.
|
|
81
|
+
bg: 'colorPalette.subtle.bg',
|
|
80
82
|
focusVisibleRing: 'outside',
|
|
81
83
|
_checked: {
|
|
84
|
+
// On state: solid filled palette color (primary.9, neutral.solid.bg, etc.)
|
|
82
85
|
bg: 'colorPalette.solid.bg',
|
|
83
86
|
},
|
|
84
87
|
},
|
|
85
88
|
thumb: {
|
|
89
|
+
// Thumb is always white — contrasts cleanly on both subtle and solid track bg.
|
|
86
90
|
bg: 'white',
|
|
87
|
-
_checked: {
|
|
88
|
-
bg: 'colorPalette.solid.fg',
|
|
89
|
-
},
|
|
90
91
|
width: 'var(--switch-height)',
|
|
91
92
|
height: 'var(--switch-height)',
|
|
92
93
|
scale: '0.8',
|