@cere/cere-design-system 0.0.45 → 0.2.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/README.md +76 -0
- package/dist/buttons.d.mts +119 -0
- package/dist/buttons.d.ts +119 -0
- package/dist/buttons.js +19 -0
- package/dist/buttons.js.map +1 -0
- package/dist/buttons.mjs +19 -0
- package/dist/buttons.mjs.map +1 -0
- package/dist/carousel.d.mts +51 -0
- package/dist/carousel.d.ts +51 -0
- package/dist/carousel.js +185 -0
- package/dist/carousel.js.map +1 -0
- package/dist/carousel.mjs +185 -0
- package/dist/carousel.mjs.map +1 -0
- package/dist/charts.d.mts +187 -0
- package/dist/charts.d.ts +187 -0
- package/dist/charts.js +13 -0
- package/dist/charts.js.map +1 -0
- package/dist/charts.mjs +13 -0
- package/dist/charts.mjs.map +1 -0
- package/dist/chunk-2EBCST6X.js +25 -0
- package/dist/chunk-2EBCST6X.js.map +1 -0
- package/dist/chunk-2KDN37PQ.js +486 -0
- package/dist/chunk-2KDN37PQ.js.map +1 -0
- package/dist/chunk-34LFXT6C.mjs +486 -0
- package/dist/chunk-34LFXT6C.mjs.map +1 -0
- package/dist/chunk-3KCXCVOX.mjs +411 -0
- package/dist/chunk-3KCXCVOX.mjs.map +1 -0
- package/dist/chunk-4OKTICU5.js +374 -0
- package/dist/chunk-4OKTICU5.js.map +1 -0
- package/dist/chunk-5ASG6G6U.mjs +40 -0
- package/dist/chunk-5ASG6G6U.mjs.map +1 -0
- package/dist/chunk-72TQ56EP.js +280 -0
- package/dist/chunk-72TQ56EP.js.map +1 -0
- package/dist/chunk-7KXKK2RE.js +43 -0
- package/dist/chunk-7KXKK2RE.js.map +1 -0
- package/dist/chunk-ARSCL4ZZ.js +111 -0
- package/dist/chunk-ARSCL4ZZ.js.map +1 -0
- package/dist/chunk-AWVNEU6R.mjs +1478 -0
- package/dist/chunk-AWVNEU6R.mjs.map +1 -0
- package/dist/chunk-BH4FNZKK.mjs +1472 -0
- package/dist/chunk-BH4FNZKK.mjs.map +1 -0
- package/dist/chunk-BIZK6FUD.js +37 -0
- package/dist/chunk-BIZK6FUD.js.map +1 -0
- package/dist/chunk-BOQPWZIB.mjs +147 -0
- package/dist/chunk-BOQPWZIB.mjs.map +1 -0
- package/dist/chunk-BT7XUTT5.mjs +392 -0
- package/dist/chunk-BT7XUTT5.mjs.map +1 -0
- package/dist/chunk-D7D25O6E.mjs +280 -0
- package/dist/chunk-D7D25O6E.mjs.map +1 -0
- package/dist/chunk-DRGMEIPT.mjs +162 -0
- package/dist/chunk-DRGMEIPT.mjs.map +1 -0
- package/dist/chunk-DZXNYLVG.js +392 -0
- package/dist/chunk-DZXNYLVG.js.map +1 -0
- package/dist/chunk-GR52ENYI.mjs +527 -0
- package/dist/chunk-GR52ENYI.mjs.map +1 -0
- package/dist/chunk-GTBKQXXI.js +1472 -0
- package/dist/chunk-GTBKQXXI.js.map +1 -0
- package/dist/chunk-HJ24WKU4.js +120 -0
- package/dist/chunk-HJ24WKU4.js.map +1 -0
- package/dist/chunk-JBHRAAN3.js +31 -0
- package/dist/chunk-JBHRAAN3.js.map +1 -0
- package/dist/chunk-KKIKOIMP.js +1478 -0
- package/dist/chunk-KKIKOIMP.js.map +1 -0
- package/dist/chunk-LVJSKRX3.js +147 -0
- package/dist/chunk-LVJSKRX3.js.map +1 -0
- package/dist/chunk-OWWDNDF4.js +40 -0
- package/dist/chunk-OWWDNDF4.js.map +1 -0
- package/dist/chunk-PFZZJZ64.js +162 -0
- package/dist/chunk-PFZZJZ64.js.map +1 -0
- package/dist/chunk-PHMNZK2R.mjs +18 -0
- package/dist/chunk-PHMNZK2R.mjs.map +1 -0
- package/dist/chunk-POCAW2G4.mjs +111 -0
- package/dist/chunk-POCAW2G4.mjs.map +1 -0
- package/dist/chunk-QBCRH7YF.mjs +37 -0
- package/dist/chunk-QBCRH7YF.mjs.map +1 -0
- package/dist/chunk-QCFLZ7X3.js +527 -0
- package/dist/chunk-QCFLZ7X3.js.map +1 -0
- package/dist/chunk-SG2TD7FQ.mjs +374 -0
- package/dist/chunk-SG2TD7FQ.mjs.map +1 -0
- package/dist/chunk-SSFALO6S.mjs +120 -0
- package/dist/chunk-SSFALO6S.mjs.map +1 -0
- package/dist/chunk-U2QHFISG.js +18 -0
- package/dist/chunk-U2QHFISG.js.map +1 -0
- package/dist/chunk-UPGFBPFX.mjs +25 -0
- package/dist/chunk-UPGFBPFX.mjs.map +1 -0
- package/dist/chunk-WC2TCWXK.mjs +445 -0
- package/dist/chunk-WC2TCWXK.mjs.map +1 -0
- package/dist/chunk-XZZZ4MZV.js +445 -0
- package/dist/chunk-XZZZ4MZV.js.map +1 -0
- package/dist/chunk-YCDCQSYH.js +411 -0
- package/dist/chunk-YCDCQSYH.js.map +1 -0
- package/dist/chunk-ZDAZYIXB.mjs +43 -0
- package/dist/chunk-ZDAZYIXB.mjs.map +1 -0
- package/dist/chunk-ZP26PGMS.mjs +31 -0
- package/dist/chunk-ZP26PGMS.mjs.map +1 -0
- package/dist/feedback.d.mts +368 -0
- package/dist/feedback.d.ts +368 -0
- package/dist/feedback.js +43 -0
- package/dist/feedback.js.map +1 -0
- package/dist/feedback.mjs +43 -0
- package/dist/feedback.mjs.map +1 -0
- package/dist/fonts/HumanSans-BlackOblique.otf +0 -0
- package/dist/fonts/HumanSans-Thin.otf +0 -0
- package/dist/fonts/HumanSans-ThinOblique.otf +0 -0
- package/dist/fonts/human-sans-font.css +88 -0
- package/dist/fonts/human-sans.css +3 -0
- package/dist/fonts/inter.css +3 -0
- package/dist/icons.d.mts +21 -0
- package/dist/icons.d.ts +21 -0
- package/dist/icons.js +23 -0
- package/dist/icons.js.map +1 -0
- package/dist/icons.mjs +23 -0
- package/dist/icons.mjs.map +1 -0
- package/dist/index.d.mts +196 -3082
- package/dist/index.d.ts +196 -3082
- package/dist/index.js +253 -10082
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +229 -10017
- package/dist/index.mjs.map +1 -1
- package/dist/inputs.d.mts +129 -0
- package/dist/inputs.d.ts +129 -0
- package/dist/inputs.js +43 -0
- package/dist/inputs.js.map +1 -0
- package/dist/inputs.mjs +43 -0
- package/dist/inputs.mjs.map +1 -0
- package/dist/layout.d.mts +681 -0
- package/dist/layout.d.ts +681 -0
- package/dist/layout.js +98 -0
- package/dist/layout.js.map +1 -0
- package/dist/layout.mjs +98 -0
- package/dist/layout.mjs.map +1 -0
- package/dist/navigation.d.mts +611 -0
- package/dist/navigation.d.ts +611 -0
- package/dist/navigation.js +54 -0
- package/dist/navigation.js.map +1 -0
- package/dist/navigation.mjs +54 -0
- package/dist/navigation.mjs.map +1 -0
- package/dist/third-party.d.mts +113 -0
- package/dist/third-party.d.ts +113 -0
- package/dist/third-party.js +7 -0
- package/dist/third-party.js.map +1 -0
- package/dist/third-party.mjs +7 -0
- package/dist/third-party.mjs.map +1 -0
- package/dist/tokens.css +45 -71
- package/dist/utilities.d.mts +39 -0
- package/dist/utilities.d.ts +39 -0
- package/dist/utilities.js +17 -0
- package/dist/utilities.js.map +1 -0
- package/dist/utilities.mjs +17 -0
- package/dist/utilities.mjs.map +1 -0
- package/package.json +76 -8
- package/dist/index.css +0 -79
- package/dist/index.css.map +0 -1
- /package/dist/{HumanSans-Black-C4YJONK7.otf → fonts/HumanSans-Black.otf} +0 -0
- /package/dist/{HumanSans-Bold-4EAJ3L3T.otf → fonts/HumanSans-Bold.otf} +0 -0
- /package/dist/{HumanSans-BoldOblique-4D325T4F.otf → fonts/HumanSans-BoldOblique.otf} +0 -0
- /package/dist/{HumanSans-ExtraLight-VL7DEKQ4.otf → fonts/HumanSans-ExtraLight.otf} +0 -0
- /package/dist/{HumanSans-ExtraLightOblique-VK2JTUXF.otf → fonts/HumanSans-ExtraLightOblique.otf} +0 -0
- /package/dist/{HumanSans-Light-YV7AFKRB.otf → fonts/HumanSans-Light.otf} +0 -0
- /package/dist/{HumanSans-LightOblique-VIXV7QA6.otf → fonts/HumanSans-LightOblique.otf} +0 -0
- /package/dist/{HumanSans-Medium-UULJ3PIR.otf → fonts/HumanSans-Medium.otf} +0 -0
- /package/dist/{HumanSans-MediumOblique-M7FHDZRS.otf → fonts/HumanSans-MediumOblique.otf} +0 -0
- /package/dist/{HumanSans-Regular-QMFEP3F6.otf → fonts/HumanSans-Regular.otf} +0 -0
- /package/dist/{HumanSans-RegularOblique-YPKQJAAM.otf → fonts/HumanSans-RegularOblique.otf} +0 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import {
|
|
2
|
+
deploymentEntityColors,
|
|
3
|
+
deploymentStatusColors,
|
|
4
|
+
deploymentSurface,
|
|
5
|
+
primitives,
|
|
6
|
+
typography,
|
|
7
|
+
webSurfaceTokens,
|
|
8
|
+
workflowChromeColors,
|
|
9
|
+
workflowConnectionColors,
|
|
10
|
+
workflowNodeColors
|
|
11
|
+
} from "./chunk-WC2TCWXK.mjs";
|
|
12
|
+
|
|
13
|
+
// src/theme/spacing.ts
|
|
14
|
+
var borderRadius = {
|
|
15
|
+
/** Small: alerts, compact elements */
|
|
16
|
+
sm: 8,
|
|
17
|
+
/** Medium: buttons, inputs, selects */
|
|
18
|
+
md: 12,
|
|
19
|
+
/** Large: chips, cards, global default */
|
|
20
|
+
lg: 16,
|
|
21
|
+
/** Extra large: hero surfaces, dialogs */
|
|
22
|
+
xl: 20,
|
|
23
|
+
/** Pill: fully rounded badges, on-gradient buttons */
|
|
24
|
+
pill: 999
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// src/theme/surfaceVariants/webLight.ts
|
|
28
|
+
var webLight = webSurfaceTokens;
|
|
29
|
+
|
|
30
|
+
// src/theme/surfaceVariants/index.ts
|
|
31
|
+
var surfaceVariants = { webLight };
|
|
32
|
+
|
|
33
|
+
// src/theme/index.ts
|
|
34
|
+
import { createTheme } from "@mui/material/styles";
|
|
35
|
+
|
|
36
|
+
// src/theme/semantic.ts
|
|
37
|
+
var semantic = {
|
|
38
|
+
action: {
|
|
39
|
+
primary: primitives.violet[500],
|
|
40
|
+
primaryHover: primitives.violet[600],
|
|
41
|
+
disabled: primitives.grey[400]
|
|
42
|
+
},
|
|
43
|
+
surface: {
|
|
44
|
+
default: primitives.white,
|
|
45
|
+
paper: primitives.white,
|
|
46
|
+
// Divergent near-violet #7B2CBF (rgba 123,44,191). NOT the brand violet
|
|
47
|
+
// (#aa44f2). Kept distinct in Track A; collapse deferred to Track C.
|
|
48
|
+
selected: "rgba(123, 44, 191, 0.1)",
|
|
49
|
+
hover: "rgba(0, 0, 0, 0.04)"
|
|
50
|
+
},
|
|
51
|
+
text: {
|
|
52
|
+
primary: primitives.nearBlack,
|
|
53
|
+
secondary: primitives.neutral[600],
|
|
54
|
+
disabled: primitives.neutral[900],
|
|
55
|
+
contrast: primitives.white
|
|
56
|
+
},
|
|
57
|
+
border: {
|
|
58
|
+
default: primitives.grey[300],
|
|
59
|
+
subtle: "rgba(0, 0, 0, 0.05)"
|
|
60
|
+
},
|
|
61
|
+
feedback: {
|
|
62
|
+
success: {
|
|
63
|
+
main: primitives.green[500],
|
|
64
|
+
light: primitives.green[400],
|
|
65
|
+
dark: primitives.green[600]
|
|
66
|
+
},
|
|
67
|
+
error: {
|
|
68
|
+
main: primitives.red[500],
|
|
69
|
+
light: primitives.red[400],
|
|
70
|
+
dark: primitives.red[600]
|
|
71
|
+
},
|
|
72
|
+
warning: {
|
|
73
|
+
main: primitives.amber[500],
|
|
74
|
+
light: primitives.amber[400],
|
|
75
|
+
dark: primitives.amber[600]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
var deploymentSurfaceTokens = {
|
|
80
|
+
/** Surface/high background (Figma #fefcff) */
|
|
81
|
+
surfaceHigh: deploymentSurface.surfaceHigh,
|
|
82
|
+
/** Stroke/Outside border (Figma #e6e6e6) */
|
|
83
|
+
strokeOutside: deploymentSurface.strokeOutside,
|
|
84
|
+
/** Default card border (Figma #cdcccd) */
|
|
85
|
+
borderDefault: deploymentSurface.borderDefault,
|
|
86
|
+
/** Primary text (Figma #1d1b20) */
|
|
87
|
+
textPrimary: deploymentSurface.textPrimary,
|
|
88
|
+
/** Secondary/muted text (Figma #818083) */
|
|
89
|
+
textSecondary: deploymentSurface.textSecondary,
|
|
90
|
+
/** Accent blue for workspace border, capacity bar, chevrons (Figma #5865f2) */
|
|
91
|
+
accentBlue: deploymentSurface.accentBlue,
|
|
92
|
+
/** Workspace card shadow */
|
|
93
|
+
workspaceShadow: "0px 8px 12px rgba(26, 10, 124, 0.1)",
|
|
94
|
+
/** Hover state for context menu items */
|
|
95
|
+
hoverLight: deploymentSurface.hoverLight,
|
|
96
|
+
/** Generic hover overlay (buttons, icon-buttons, rows) */
|
|
97
|
+
hoverOverlay: "rgba(0, 0, 0, 0.04)",
|
|
98
|
+
/** Blue-50 highlight background for active menu items (Figma blue-50) */
|
|
99
|
+
highlightBg: deploymentSurface.highlightBg,
|
|
100
|
+
/** Blue-50 highlight background hover state */
|
|
101
|
+
highlightBgHover: deploymentSurface.highlightBgHover,
|
|
102
|
+
/** Blue-100 highlight border for active menu items (Figma blue-100) */
|
|
103
|
+
highlightBorder: deploymentSurface.highlightBorder,
|
|
104
|
+
/** Switch track enabled (Figma basic/green #53b96a) */
|
|
105
|
+
switchGreen: deploymentSurface.switchGreen,
|
|
106
|
+
/** Switch track disabled/off (Figma neutral track) */
|
|
107
|
+
switchTrackOff: deploymentSurface.switchTrackOff
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// src/theme/components.ts
|
|
111
|
+
var components = {
|
|
112
|
+
MuiButton: {
|
|
113
|
+
styleOverrides: {
|
|
114
|
+
root: {
|
|
115
|
+
textTransform: "none",
|
|
116
|
+
borderRadius: borderRadius.md,
|
|
117
|
+
fontWeight: 600,
|
|
118
|
+
padding: "8px 24px",
|
|
119
|
+
boxShadow: "none",
|
|
120
|
+
"&:hover": {
|
|
121
|
+
boxShadow: "none"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
sizeSmall: {
|
|
125
|
+
padding: "4px 12px",
|
|
126
|
+
fontSize: "12px"
|
|
127
|
+
},
|
|
128
|
+
sizeMedium: {
|
|
129
|
+
padding: "8px 24px",
|
|
130
|
+
fontSize: "14px"
|
|
131
|
+
},
|
|
132
|
+
sizeLarge: {
|
|
133
|
+
padding: "12px 24px",
|
|
134
|
+
fontSize: "16px"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
MuiTextField: {
|
|
139
|
+
styleOverrides: {
|
|
140
|
+
root: {
|
|
141
|
+
"& .MuiOutlinedInput-root": {
|
|
142
|
+
borderRadius: borderRadius.md
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
MuiSelect: {
|
|
148
|
+
styleOverrides: {
|
|
149
|
+
root: {
|
|
150
|
+
borderRadius: borderRadius.md
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
MuiChip: {
|
|
155
|
+
styleOverrides: {
|
|
156
|
+
root: {
|
|
157
|
+
borderRadius: borderRadius.lg,
|
|
158
|
+
fontWeight: 500
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
MuiPaper: {
|
|
163
|
+
styleOverrides: {
|
|
164
|
+
root: {
|
|
165
|
+
boxShadow: "0px 4px 20px rgba(0, 0, 0, 0.05)",
|
|
166
|
+
border: "1px solid rgba(0, 0, 0, 0.05)"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
MuiDrawer: {
|
|
171
|
+
styleOverrides: {
|
|
172
|
+
paper: {
|
|
173
|
+
borderRight: "1px solid rgba(0, 0, 0, 0.05)"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
MuiAlert: {
|
|
178
|
+
styleOverrides: {
|
|
179
|
+
root: {
|
|
180
|
+
borderRadius: borderRadius.sm
|
|
181
|
+
},
|
|
182
|
+
filled: {
|
|
183
|
+
borderRadius: borderRadius.sm
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
// src/theme/index.ts
|
|
190
|
+
var colors = {
|
|
191
|
+
primary: {
|
|
192
|
+
main: semantic.action.primary,
|
|
193
|
+
light: semantic.action.primary,
|
|
194
|
+
dark: semantic.action.primaryHover,
|
|
195
|
+
contrastText: semantic.text.contrast
|
|
196
|
+
},
|
|
197
|
+
secondary: {
|
|
198
|
+
main: primitives.neutral[600],
|
|
199
|
+
light: primitives.neutral[900],
|
|
200
|
+
dark: primitives.neutral[300],
|
|
201
|
+
contrastText: semantic.text.contrast
|
|
202
|
+
},
|
|
203
|
+
success: {
|
|
204
|
+
main: semantic.feedback.success.main,
|
|
205
|
+
light: semantic.feedback.success.light,
|
|
206
|
+
dark: semantic.feedback.success.dark,
|
|
207
|
+
contrastText: semantic.text.contrast
|
|
208
|
+
},
|
|
209
|
+
error: {
|
|
210
|
+
main: semantic.feedback.error.main,
|
|
211
|
+
light: semantic.feedback.error.light,
|
|
212
|
+
dark: semantic.feedback.error.dark,
|
|
213
|
+
contrastText: semantic.text.contrast
|
|
214
|
+
},
|
|
215
|
+
warning: {
|
|
216
|
+
main: semantic.feedback.warning.main,
|
|
217
|
+
light: semantic.feedback.warning.light,
|
|
218
|
+
dark: semantic.feedback.warning.dark,
|
|
219
|
+
contrastText: semantic.text.contrast
|
|
220
|
+
},
|
|
221
|
+
tertiary: {
|
|
222
|
+
main: semantic.feedback.warning.main,
|
|
223
|
+
light: semantic.feedback.warning.light,
|
|
224
|
+
dark: semantic.feedback.warning.dark,
|
|
225
|
+
contrastText: primitives.nearBlack
|
|
226
|
+
},
|
|
227
|
+
grey: primitives.grey,
|
|
228
|
+
text: {
|
|
229
|
+
primary: semantic.text.primary,
|
|
230
|
+
secondary: semantic.text.secondary,
|
|
231
|
+
disabled: semantic.text.disabled
|
|
232
|
+
},
|
|
233
|
+
background: {
|
|
234
|
+
default: semantic.surface.default,
|
|
235
|
+
paper: semantic.surface.paper,
|
|
236
|
+
selected: semantic.surface.selected
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
var baseTheme = createTheme({
|
|
240
|
+
cssVariables: true,
|
|
241
|
+
palette: {
|
|
242
|
+
mode: "light",
|
|
243
|
+
primary: colors.primary,
|
|
244
|
+
secondary: colors.secondary,
|
|
245
|
+
success: colors.success,
|
|
246
|
+
error: colors.error,
|
|
247
|
+
warning: colors.warning,
|
|
248
|
+
grey: colors.grey,
|
|
249
|
+
text: colors.text,
|
|
250
|
+
background: colors.background
|
|
251
|
+
},
|
|
252
|
+
typography,
|
|
253
|
+
shape: {
|
|
254
|
+
borderRadius: borderRadius.lg
|
|
255
|
+
},
|
|
256
|
+
components
|
|
257
|
+
});
|
|
258
|
+
var theme = createTheme(baseTheme, {
|
|
259
|
+
palette: {
|
|
260
|
+
deployment: {
|
|
261
|
+
entity: deploymentEntityColors,
|
|
262
|
+
status: deploymentStatusColors
|
|
263
|
+
},
|
|
264
|
+
workflow: {
|
|
265
|
+
node: workflowNodeColors,
|
|
266
|
+
connection: workflowConnectionColors,
|
|
267
|
+
chrome: workflowChromeColors
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
export {
|
|
273
|
+
deploymentSurfaceTokens,
|
|
274
|
+
borderRadius,
|
|
275
|
+
webLight,
|
|
276
|
+
surfaceVariants,
|
|
277
|
+
colors,
|
|
278
|
+
theme
|
|
279
|
+
};
|
|
280
|
+
//# sourceMappingURL=chunk-D7D25O6E.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/theme/spacing.ts","../src/theme/surfaceVariants/webLight.ts","../src/theme/surfaceVariants/index.ts","../src/theme/index.ts","../src/theme/semantic.ts","../src/theme/components.ts"],"sourcesContent":["/**\n * Spacing and sizing tokens for the design system.\n *\n * Centralizes border-radius, component-specific sizing, and spacing\n * constants that were previously scattered across component files.\n */\n\nexport const borderRadius = {\n /** Small: alerts, compact elements */\n sm: 8,\n /** Medium: buttons, inputs, selects */\n md: 12,\n /** Large: chips, cards, global default */\n lg: 16,\n /** Extra large: hero surfaces, dialogs */\n xl: 20,\n /** Pill: fully rounded badges, on-gradient buttons */\n pill: 999,\n} as const;\n\nexport const componentSizing = {\n workflow: {\n nodeIconSize: 18,\n inspectorWidth: 320,\n },\n deployment: {\n entityIconSize: 16,\n chevronSize: 16,\n panelRadius: 12,\n },\n} as const;\n","/**\n * Surface variant: web-light.\n *\n * The marketplace + vault product palette. Both apps render on a light\n * surface; the older audit synthesis (which assumed marketplace was dark)\n * was wrong. There is no shipping dark variant today; that lands as part\n * of the dark-mode work (blocker `B5` in `DESIGN_SYSTEM_TODO.md`).\n *\n * This variant currently mirrors `webSurfaceTokens` verbatim. Future\n * work may diverge (e.g. a vault-specific accent override), at which\n * point a new named variant should be added rather than forking values\n * in app land.\n *\n * See `company-memory-bank/00-foundations/design-system.md` §4.\n */\n\nimport { webSurfaceTokens } from '../webSurfaceTokens';\n\nexport const webLight = webSurfaceTokens;\nexport type WebLightVariant = typeof webLight;\n","import { webLight } from './webLight';\n\n/**\n * Named surface variants. Consumers pick one variant per product surface\n * by importing the matching CSS layer (`@cere/cere-design-system/surfaces/<name>.css`)\n * AND optionally referencing the typed token bag here at the TS layer.\n *\n * Today there is only `webLight` (the shipped marketplace + vault\n * palette). A future `webDark` lands with the dark-mode work\n * (`DESIGN_SYSTEM_TODO.md` blocker `B5`).\n *\n * See `company-memory-bank/00-foundations/design-system.md` §4.\n */\nexport const surfaceVariants = { webLight } as const;\nexport type SurfaceVariant = keyof typeof surfaceVariants;\n\nexport { webLight };\nexport type { WebLightVariant } from './webLight';\n","/**\n * Design system theme barrel.\n *\n * Composes the MUI theme from token modules and re-exports everything\n * the public API needs. Internal structure:\n *\n * primitives.ts - Tier 1: raw color values (hue + shade)\n * semantic.ts - Tier 2: intent-based tokens\n * typography.ts - Font family and type scale\n * components.ts - MUI component style overrides\n * spacing.ts - Border radius and sizing constants\n */\n\nimport { createTheme, Theme } from '@mui/material/styles';\n// Side-effect: register custom Typography variants with MUI's type system.\nimport './typography-augment';\n\n// Token modules\nimport { primitives, deploymentEntityColors, deploymentStatusColors, workflowNodeColors, workflowConnectionColors, workflowChromeColors } from './primitives';\nimport { semantic } from './semantic';\nimport { typography } from './typography';\nimport { components } from './components';\nimport { borderRadius } from './spacing';\n\n// ---------------------------------------------------------------------------\n// Module augmentation: type-safe access to theme.palette.deployment/workflow\n// ---------------------------------------------------------------------------\ndeclare module '@mui/material/styles' {\n interface TypeBackground {\n selected: string;\n }\n interface Palette {\n deployment: {\n entity: typeof deploymentEntityColors;\n status: typeof deploymentStatusColors;\n };\n workflow: {\n node: typeof workflowNodeColors;\n connection: typeof workflowConnectionColors;\n chrome: typeof workflowChromeColors;\n };\n }\n interface PaletteOptions {\n deployment?: {\n entity?: Record<string, string>;\n status?: Record<string, string>;\n };\n workflow?: {\n node?: Partial<typeof workflowNodeColors>;\n connection?: Partial<typeof workflowConnectionColors>;\n chrome?: Partial<typeof workflowChromeColors>;\n };\n }\n}\n\n// ---------------------------------------------------------------------------\n// Backwards-compatible `colors` object (same shape, derived from tokens)\n// ---------------------------------------------------------------------------\nconst colors = {\n primary: {\n main: semantic.action.primary,\n light: semantic.action.primary,\n dark: semantic.action.primaryHover,\n contrastText: semantic.text.contrast,\n },\n secondary: {\n main: primitives.neutral[600],\n light: primitives.neutral[900],\n dark: primitives.neutral[300],\n contrastText: semantic.text.contrast,\n },\n success: {\n main: semantic.feedback.success.main,\n light: semantic.feedback.success.light,\n dark: semantic.feedback.success.dark,\n contrastText: semantic.text.contrast,\n },\n error: {\n main: semantic.feedback.error.main,\n light: semantic.feedback.error.light,\n dark: semantic.feedback.error.dark,\n contrastText: semantic.text.contrast,\n },\n warning: {\n main: semantic.feedback.warning.main,\n light: semantic.feedback.warning.light,\n dark: semantic.feedback.warning.dark,\n contrastText: semantic.text.contrast,\n },\n tertiary: {\n main: semantic.feedback.warning.main,\n light: semantic.feedback.warning.light,\n dark: semantic.feedback.warning.dark,\n contrastText: primitives.nearBlack,\n },\n grey: primitives.grey,\n text: {\n primary: semantic.text.primary,\n secondary: semantic.text.secondary,\n disabled: semantic.text.disabled,\n },\n background: {\n default: semantic.surface.default,\n paper: semantic.surface.paper,\n selected: semantic.surface.selected,\n },\n};\n\n// ---------------------------------------------------------------------------\n// Theme composition\n// ---------------------------------------------------------------------------\nconst baseTheme = createTheme({\n cssVariables: true,\n palette: {\n mode: 'light',\n primary: colors.primary,\n secondary: colors.secondary,\n success: colors.success,\n error: colors.error,\n warning: colors.warning,\n grey: colors.grey,\n text: colors.text,\n background: colors.background,\n },\n typography,\n shape: {\n borderRadius: borderRadius.lg,\n },\n components,\n});\n\n// Extend palette with deployment dashboard and workflow tokens\nexport const theme: Theme = createTheme(baseTheme, {\n palette: {\n deployment: {\n entity: deploymentEntityColors,\n status: deploymentStatusColors,\n },\n workflow: {\n node: workflowNodeColors,\n connection: workflowConnectionColors,\n chrome: workflowChromeColors,\n },\n },\n});\n\n// ---------------------------------------------------------------------------\n// Public exports (preserve every name the old barrel exported)\n// ---------------------------------------------------------------------------\nexport { colors };\nexport { semantic, deploymentSurfaceTokens } from './semantic';\nexport {\n primitives,\n robPrimaryPalette,\n robPaletteExtended,\n deploymentEntityColors,\n deploymentStatusColors,\n workflowNodeColors,\n workflowConnectionColors,\n workflowChromeColors,\n deploymentSurface,\n} from './primitives';\nexport { borderRadius, componentSizing } from './spacing';\nexport { motion } from './motion';\nexport { webSurfaceTokens } from './webSurfaceTokens';\nexport type { WebSurfaceTokenKey } from './webSurfaceTokens';\nexport { surfaceVariants, webLight } from './surfaceVariants';\nexport type { SurfaceVariant, WebLightVariant } from './surfaceVariants';\n","/**\n * Tier 2: Semantic color tokens.\n *\n * Intent-based tokens that map primitives to UI roles. Components\n * should reference these (or theme.palette) instead of raw hex values.\n *\n * To change the color scheme: edit the mappings here. Zero component changes.\n */\n\nimport { primitives, deploymentSurface } from './primitives';\n\nexport const semantic = {\n action: {\n primary: primitives.violet[500],\n primaryHover: primitives.violet[600],\n disabled: primitives.grey[400],\n },\n surface: {\n default: primitives.white,\n paper: primitives.white,\n // Divergent near-violet #7B2CBF (rgba 123,44,191). NOT the brand violet\n // (#aa44f2). Kept distinct in Track A; collapse deferred to Track C.\n selected: 'rgba(123, 44, 191, 0.1)',\n hover: 'rgba(0, 0, 0, 0.04)',\n },\n text: {\n primary: primitives.nearBlack,\n secondary: primitives.neutral[600],\n disabled: primitives.neutral[900],\n contrast: primitives.white,\n },\n border: {\n default: primitives.grey[300],\n subtle: 'rgba(0, 0, 0, 0.05)',\n },\n feedback: {\n success: {\n main: primitives.green[500],\n light: primitives.green[400],\n dark: primitives.green[600],\n },\n error: {\n main: primitives.red[500],\n light: primitives.red[400],\n dark: primitives.red[600],\n },\n warning: {\n main: primitives.amber[500],\n light: primitives.amber[400],\n dark: primitives.amber[600],\n },\n },\n} as const;\n\n/**\n * Shared Figma surface/stroke tokens used across deployment dashboard\n * components. Referenced by semantic name rather than raw hex.\n */\nexport const deploymentSurfaceTokens = {\n /** Surface/high background (Figma #fefcff) */\n surfaceHigh: deploymentSurface.surfaceHigh,\n /** Stroke/Outside border (Figma #e6e6e6) */\n strokeOutside: deploymentSurface.strokeOutside,\n /** Default card border (Figma #cdcccd) */\n borderDefault: deploymentSurface.borderDefault,\n /** Primary text (Figma #1d1b20) */\n textPrimary: deploymentSurface.textPrimary,\n /** Secondary/muted text (Figma #818083) */\n textSecondary: deploymentSurface.textSecondary,\n /** Accent blue for workspace border, capacity bar, chevrons (Figma #5865f2) */\n accentBlue: deploymentSurface.accentBlue,\n /** Workspace card shadow */\n workspaceShadow: '0px 8px 12px rgba(26, 10, 124, 0.1)',\n /** Hover state for context menu items */\n hoverLight: deploymentSurface.hoverLight,\n /** Generic hover overlay (buttons, icon-buttons, rows) */\n hoverOverlay: 'rgba(0, 0, 0, 0.04)',\n /** Blue-50 highlight background for active menu items (Figma blue-50) */\n highlightBg: deploymentSurface.highlightBg,\n /** Blue-50 highlight background hover state */\n highlightBgHover: deploymentSurface.highlightBgHover,\n /** Blue-100 highlight border for active menu items (Figma blue-100) */\n highlightBorder: deploymentSurface.highlightBorder,\n /** Switch track enabled (Figma basic/green #53b96a) */\n switchGreen: deploymentSurface.switchGreen,\n /** Switch track disabled/off (Figma neutral track) */\n switchTrackOff: deploymentSurface.switchTrackOff,\n} as const;\n","/**\n * MUI component style overrides for the design system.\n *\n * Centralized overrides applied via createTheme({ components }).\n * Keeps the theme barrel focused on composition.\n */\n\nimport type { Components, Theme } from '@mui/material/styles';\nimport { borderRadius } from './spacing';\n\nexport const components: Components<Omit<Theme, 'components'>> = {\n MuiButton: {\n styleOverrides: {\n root: {\n textTransform: 'none',\n borderRadius: borderRadius.md,\n fontWeight: 600,\n padding: '8px 24px',\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none',\n },\n },\n sizeSmall: {\n padding: '4px 12px',\n fontSize: '12px',\n },\n sizeMedium: {\n padding: '8px 24px',\n fontSize: '14px',\n },\n sizeLarge: {\n padding: '12px 24px',\n fontSize: '16px',\n },\n },\n },\n MuiTextField: {\n styleOverrides: {\n root: {\n '& .MuiOutlinedInput-root': {\n borderRadius: borderRadius.md,\n },\n },\n },\n },\n MuiSelect: {\n styleOverrides: {\n root: {\n borderRadius: borderRadius.md,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n borderRadius: borderRadius.lg,\n fontWeight: 500,\n },\n },\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n boxShadow: '0px 4px 20px rgba(0, 0, 0, 0.05)',\n border: '1px solid rgba(0, 0, 0, 0.05)',\n },\n },\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n borderRight: '1px solid rgba(0, 0, 0, 0.05)',\n },\n },\n },\n MuiAlert: {\n styleOverrides: {\n root: {\n borderRadius: borderRadius.sm,\n },\n filled: {\n borderRadius: borderRadius.sm,\n },\n },\n },\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4
|
+
|
|
5
|
+
// src/components/feedback/RoleBadge.tsx
|
|
6
|
+
import MuiChip from "@mui/material/Chip";
|
|
7
|
+
import { styled } from "@mui/material/styles";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var StyledRoleBadge = styled(MuiChip)(() => ({
|
|
10
|
+
// Pill shape - 100px border radius
|
|
11
|
+
borderRadius: "100px",
|
|
12
|
+
// Typography specifications from Figma
|
|
13
|
+
fontSize: "13px",
|
|
14
|
+
fontWeight: 400,
|
|
15
|
+
lineHeight: "18px",
|
|
16
|
+
letterSpacing: "0.16px",
|
|
17
|
+
// Padding specifications from Figma
|
|
18
|
+
padding: "3px 4px",
|
|
19
|
+
height: "auto",
|
|
20
|
+
// Outlined style (no background fill)
|
|
21
|
+
"& .MuiChip-label": {
|
|
22
|
+
padding: "0 8px"
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
var RoleBadge = ({
|
|
26
|
+
label,
|
|
27
|
+
color = "primary",
|
|
28
|
+
size = "small",
|
|
29
|
+
...props
|
|
30
|
+
}) => {
|
|
31
|
+
if (!label || label.trim() === "") {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
StyledRoleBadge,
|
|
36
|
+
{
|
|
37
|
+
label,
|
|
38
|
+
variant: "outlined",
|
|
39
|
+
color,
|
|
40
|
+
size,
|
|
41
|
+
...props
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// src/components/feedback/IDBlock.tsx
|
|
47
|
+
import { useState } from "react";
|
|
48
|
+
import Box from "@mui/material/Box";
|
|
49
|
+
import Typography from "@mui/material/Typography";
|
|
50
|
+
import IconButton from "@mui/material/IconButton";
|
|
51
|
+
import Snackbar from "@mui/material/Snackbar";
|
|
52
|
+
import Alert from "@mui/material/Alert";
|
|
53
|
+
import ContentCopyIcon from "@mui/icons-material/ContentCopy";
|
|
54
|
+
import { styled as styled2 } from "@mui/material/styles";
|
|
55
|
+
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
56
|
+
var IDContainer = styled2(Box)(() => ({
|
|
57
|
+
display: "inline-flex",
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
gap: "4px",
|
|
60
|
+
padding: "8px 16px",
|
|
61
|
+
backgroundColor: deploymentSurfaceTokens.surfaceHigh,
|
|
62
|
+
border: `1px solid ${deploymentSurfaceTokens.strokeOutside}`,
|
|
63
|
+
borderRadius: "8px"
|
|
64
|
+
}));
|
|
65
|
+
var IDBlock = ({
|
|
66
|
+
id,
|
|
67
|
+
label = "ID",
|
|
68
|
+
entityType = "entity",
|
|
69
|
+
onCopy
|
|
70
|
+
}) => {
|
|
71
|
+
const [snackbar, setSnackbar] = useState({
|
|
72
|
+
open: false,
|
|
73
|
+
message: "",
|
|
74
|
+
severity: "success"
|
|
75
|
+
});
|
|
76
|
+
if (!id || id.trim() === "") {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
const handleCopy = async () => {
|
|
80
|
+
try {
|
|
81
|
+
await navigator.clipboard.writeText(id);
|
|
82
|
+
setSnackbar({ open: true, message: "ID copied to clipboard", severity: "success" });
|
|
83
|
+
onCopy?.();
|
|
84
|
+
} catch {
|
|
85
|
+
setSnackbar({ open: true, message: "Failed to copy ID", severity: "error" });
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const handleSnackbarClose = () => {
|
|
89
|
+
setSnackbar((prev) => ({ ...prev, open: false }));
|
|
90
|
+
};
|
|
91
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
92
|
+
/* @__PURE__ */ jsxs(IDContainer, { children: [
|
|
93
|
+
/* @__PURE__ */ jsxs(
|
|
94
|
+
Typography,
|
|
95
|
+
{
|
|
96
|
+
variant: "body2",
|
|
97
|
+
sx: {
|
|
98
|
+
fontSize: "13px",
|
|
99
|
+
fontWeight: 500,
|
|
100
|
+
color: deploymentSurfaceTokens.textSecondary
|
|
101
|
+
},
|
|
102
|
+
children: [
|
|
103
|
+
label,
|
|
104
|
+
":"
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
/* @__PURE__ */ jsx2(
|
|
109
|
+
Typography,
|
|
110
|
+
{
|
|
111
|
+
variant: "body2",
|
|
112
|
+
sx: {
|
|
113
|
+
fontSize: "13px",
|
|
114
|
+
fontWeight: 500,
|
|
115
|
+
color: deploymentSurfaceTokens.textPrimary,
|
|
116
|
+
userSelect: "all"
|
|
117
|
+
},
|
|
118
|
+
children: id
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ jsx2(
|
|
122
|
+
IconButton,
|
|
123
|
+
{
|
|
124
|
+
onClick: handleCopy,
|
|
125
|
+
size: "small",
|
|
126
|
+
"aria-label": `Copy ${entityType} ID ${id}`,
|
|
127
|
+
sx: {
|
|
128
|
+
padding: "4px",
|
|
129
|
+
"&:hover": {
|
|
130
|
+
backgroundColor: deploymentSurfaceTokens.hoverOverlay
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
children: /* @__PURE__ */ jsx2(
|
|
134
|
+
ContentCopyIcon,
|
|
135
|
+
{
|
|
136
|
+
sx: {
|
|
137
|
+
fontSize: "16px",
|
|
138
|
+
color: deploymentSurfaceTokens.textSecondary
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
] }),
|
|
145
|
+
/* @__PURE__ */ jsx2(
|
|
146
|
+
Snackbar,
|
|
147
|
+
{
|
|
148
|
+
open: snackbar.open,
|
|
149
|
+
autoHideDuration: 3e3,
|
|
150
|
+
onClose: handleSnackbarClose,
|
|
151
|
+
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
152
|
+
children: /* @__PURE__ */ jsx2(Alert, { onClose: handleSnackbarClose, severity: snackbar.severity, children: snackbar.message })
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
] });
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export {
|
|
159
|
+
RoleBadge,
|
|
160
|
+
IDBlock
|
|
161
|
+
};
|
|
162
|
+
//# sourceMappingURL=chunk-DRGMEIPT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/feedback/RoleBadge.tsx","../src/components/feedback/IDBlock.tsx"],"sourcesContent":["import React from 'react';\nimport MuiChip, { ChipProps as MuiChipProps } from '@mui/material/Chip';\nimport { styled } from '@mui/material/styles';\n\n/**\n * Color variants for the RoleBadge component\n */\nexport type RoleBadgeColor = 'primary' | 'secondary' | 'success' | 'error' | 'warning';\n\n/**\n * Size variants for the RoleBadge component\n */\nexport type RoleBadgeSize = 'small' | 'medium';\n\n/**\n * RoleBadge component props\n */\nexport interface RoleBadgeProps extends Omit<MuiChipProps, 'label' | 'variant' | 'color' | 'size'> {\n /**\n * The text content to display in the badge\n */\n label: string;\n /**\n * The color theme of the badge\n * @default 'primary'\n */\n color?: RoleBadgeColor;\n /**\n * The size of the badge\n * @default 'small'\n */\n size?: RoleBadgeSize;\n}\n\n/**\n * Styled MUI Chip with pill shape and outlined style\n * Matches Figma node 17-3595 specifications\n */\nconst StyledRoleBadge = styled(MuiChip)<MuiChipProps>(() => ({\n // Pill shape - 100px border radius\n borderRadius: '100px',\n // Typography specifications from Figma\n fontSize: '13px',\n fontWeight: 400,\n lineHeight: '18px',\n letterSpacing: '0.16px',\n // Padding specifications from Figma\n padding: '3px 4px',\n height: 'auto',\n // Outlined style (no background fill)\n '& .MuiChip-label': {\n padding: '0 8px',\n },\n}));\n\n/**\n * RoleBadge - Pill-shaped badge component for displaying roles or status labels\n *\n * A reusable badge component that extends MUI Chip with a pill-shaped outline style.\n * Designed for displaying user roles, status indicators, or categorization labels.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <RoleBadge label=\"Manager\" />\n *\n * // With color variants\n * <RoleBadge label=\"Admin\" color=\"error\" />\n * <RoleBadge label=\"Active\" color=\"success\" />\n *\n * // With size variants\n * <RoleBadge label=\"Owner\" size=\"medium\" />\n * ```\n *\n * @see Figma node 17-3595 for design specifications\n */\nexport const RoleBadge: React.FC<RoleBadgeProps> = ({\n label,\n color = 'primary',\n size = 'small',\n ...props\n}) => {\n if (!label || label.trim() === '') {\n return null;\n }\n\n return (\n <StyledRoleBadge\n label={label}\n variant=\"outlined\"\n color={color}\n size={size}\n {...props}\n />\n );\n};\n","import React, { useState } from 'react';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport IconButton from '@mui/material/IconButton';\nimport Snackbar from '@mui/material/Snackbar';\nimport Alert from '@mui/material/Alert';\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\nimport { styled } from '@mui/material/styles';\nimport type { AlertColor } from '@mui/material/Alert';\nimport { deploymentSurfaceTokens } from '../../theme';\n\n/**\n * IDBlock component props\n */\nexport interface IDBlockProps {\n /**\n * The identifier value to display and copy\n */\n id: string;\n /**\n * Label prefix text\n * @default 'ID'\n */\n label?: string;\n /**\n * Entity type for accessibility (used in aria-label)\n * @default 'entity'\n */\n entityType?: string;\n /**\n * Additional callback to execute after successful copy\n */\n onCopy?: () => void;\n}\n\n/**\n * Styled container for the ID block\n * Matches Figma node 17-3596 specifications\n */\nconst IDContainer = styled(Box)(() => ({\n display: 'inline-flex',\n alignItems: 'center',\n gap: '4px',\n padding: '8px 16px',\n backgroundColor: deploymentSurfaceTokens.surfaceHigh,\n border: `1px solid ${deploymentSurfaceTokens.strokeOutside}`,\n borderRadius: '8px',\n}));\n\n/**\n * IDBlock - Read-only identifier display with integrated copy-to-clipboard button\n *\n * A component that displays an identifier (ID, account number, etc.) with a copy button.\n * Provides user feedback via an inline Snackbar when copy succeeds or fails.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <IDBlock id=\"W1234567890\" />\n *\n * // With custom label\n * <IDBlock id=\"ACC-9876543\" label=\"Account ID\" entityType=\"account\" />\n *\n * // With callback\n * <IDBlock\n * id=\"DEPLOY-12345\"\n * label=\"Deployment ID\"\n * entityType=\"deployment\"\n * onCopy={() => console.log('ID copied')}\n * />\n * ```\n *\n * @see Figma node 17-3596 for design specifications\n */\nexport const IDBlock: React.FC<IDBlockProps> = ({\n id,\n label = 'ID',\n entityType = 'entity',\n onCopy,\n}) => {\n const [snackbar, setSnackbar] = useState<{ open: boolean; message: string; severity: AlertColor }>({\n open: false,\n message: '',\n severity: 'success',\n });\n\n if (!id || id.trim() === '') {\n return null;\n }\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(id);\n setSnackbar({ open: true, message: 'ID copied to clipboard', severity: 'success' });\n onCopy?.();\n } catch {\n setSnackbar({ open: true, message: 'Failed to copy ID', severity: 'error' });\n }\n };\n\n const handleSnackbarClose = () => {\n setSnackbar((prev) => ({ ...prev, open: false }));\n };\n\n return (\n <>\n <IDContainer>\n <Typography\n variant=\"body2\"\n sx={{\n fontSize: '13px',\n fontWeight: 500,\n color: deploymentSurfaceTokens.textSecondary,\n }}\n >\n {label}:\n </Typography>\n <Typography\n variant=\"body2\"\n sx={{\n fontSize: '13px',\n fontWeight: 500,\n color: deploymentSurfaceTokens.textPrimary,\n userSelect: 'all',\n }}\n >\n {id}\n </Typography>\n <IconButton\n onClick={handleCopy}\n size=\"small\"\n aria-label={`Copy ${entityType} ID ${id}`}\n sx={{\n padding: '4px',\n '&:hover': {\n backgroundColor: deploymentSurfaceTokens.hoverOverlay,\n },\n }}\n >\n <ContentCopyIcon\n sx={{\n fontSize: '16px',\n color: deploymentSurfaceTokens.textSecondary,\n }}\n />\n </IconButton>\n </IDContainer>\n <Snackbar\n open={snackbar.open}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n >\n <Alert onClose={handleSnackbarClose} severity={snackbar.severity}>\n {snackbar.message}\n </Alert>\n </Snackbar>\n </>\n );\n};\n"],"mappings":";;;;;AACA,OAAO,aAA4C;AACnD,SAAS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