trdr-ds-install 1.2.0 → 1.2.1
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,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0",
|
|
3
|
-
"generatedAt": "2026-05-
|
|
4
|
-
"total":
|
|
5
|
-
"implemented":
|
|
3
|
+
"generatedAt": "2026-05-11T00:35:11.146Z",
|
|
4
|
+
"total": 14,
|
|
5
|
+
"implemented": 14,
|
|
6
6
|
"categories": {
|
|
7
7
|
"formulario": "Formulário / Controles",
|
|
8
8
|
"modal": "Modais / Overlays",
|
|
@@ -1160,6 +1160,247 @@
|
|
|
1160
1160
|
"react": "'use client'\nimport Link from 'next/link'\nimport styles from './Card.module.css'\n\ninterface CardBadge {\n label: string\n variant?: 'neutral' | 'brand' | 'success'\n}\n\ninterface CardProps {\n href: string\n icon?: string // Material Symbols Outlined name (ex: 'palette')\n title: string\n description: string\n headerBadges?: CardBadge[] // badges no header (topo direito)\n footerLeft?: string // texto do footer (ex: Figma ID '2316:2462')\n footerBadges?: CardBadge[] // badges do footer\n className?: string\n}\n\nexport default function Card({\n href, icon, title, description,\n headerBadges, footerLeft, footerBadges, className = '',\n}: CardProps) {\n const hasFooter = footerLeft || (footerBadges && footerBadges.length > 0)\n\n return (\n <Link href={href} className={`${styles.card} ${className}`}>\n\n {/* Container 1 — conteúdo principal */}\n <div className={`${styles.container1} ${hasFooter ? styles.hasBorder : ''}`}>\n <div className={styles.header}>\n {icon && (\n <span\n className={styles.icon}\n style={{ fontVariationSettings: \"'FILL' 0, 'GRAD' 0, 'wght' 100, 'opsz' 48\" }}\n >\n {icon}\n </span>\n )}\n {headerBadges && headerBadges.length > 0 && (\n <div className={styles.badges}>\n {headerBadges.map(b => (\n <span key={b.label} className={`trdr-badge trdr-badge-${b.variant ?? 'neutral'}`}>\n {b.label}\n </span>\n ))}\n </div>\n )}\n </div>\n <span className={styles.title}>{title}</span>\n <p className={styles.desc}>{description}</p>\n </div>\n\n {/* Container 2 — footer (opcional) */}\n {hasFooter && (\n <div className={styles.container2}>\n {footerLeft && <code className={styles.footerLeft}>{footerLeft}</code>}\n {footerBadges && footerBadges.length > 0 && (\n <div className={styles.badges}>\n {footerBadges.map(b => (\n <span key={b.label} className={`trdr-badge trdr-badge-${b.variant ?? 'neutral'}`}>\n {b.label}\n </span>\n ))}\n </div>\n )}\n </div>\n )}\n\n </Link>\n )\n}\n\n/* Card.module.css — estrutura dois containers */\n/*\n.card {\n display: flex; flex-direction: column;\n gap: var(--scale-spacing-md);\n padding: var(--scale-spacing-2xl);\n background: var(--surface-tertiary);\n border: 1px solid var(--border-subtle);\n border-radius: var(--scale-radius-md);\n text-decoration: none; cursor: pointer;\n transition: border-color 0.15s ease, background-color 0.15s ease;\n}\n.card:hover { border-color: var(--border-default); background: var(--surface-secondary); }\n.container1 { display: flex; flex-direction: column; gap: 8px; width: 100%; }\n.hasBorder { border-bottom: 1px solid var(--border-subtle); padding-bottom: var(--scale-spacing-md); }\n.header { display: flex; align-items: flex-start; justify-content: space-between; width: 100%; }\n.icon { font-family: 'Material Symbols Outlined'; font-size: 44px; color: var(--content-brand); }\n.badges { display: flex; align-items: center; gap: 4px; }\n.title { font-family: var(--font-primary); font-size: 26px; font-weight: 500; color: var(--content-secondary); }\n.desc { font-family: var(--font-secondary); font-size: 14px; font-weight: 400; color: var(--content-tertiary); margin: 0; }\n.container2 { display: flex; align-items: center; justify-content: space-between; width: 100%; }\n.footerLeft { font-family: var(--font-secondary); font-size: 12px; font-weight: 500; letter-spacing: 0.2px; color: var(--content-tertiary); }\n*/",
|
|
1161
1161
|
"prompt": "Implemente o componente Card do Design System TRDR.\nReferência Figma: nó 2316:2462 (380×154)\n\nEstrutura de dois containers separados por borda:\n\nContainer 1 (conteúdo principal):\n- Header: ícone Material Symbols Outlined 44px ExtraLight (wght 100) em var(--content-brand) à esquerda + badges à direita (opcional)\n- Título H-6: Space Grotesk Medium 500, 26px, line-height 1.1, var(--content-secondary)\n- Descrição B-3: Inter Regular 400, 14px, line-height 1.2, var(--content-tertiary)\n- Quando há footer: recebe border-bottom 1px solid var(--border-subtle) + padding-bottom 12px\n\nContainer 2 (footer, opcional):\n- Esquerda: Figma ID em B-4 (Inter Medium 500, 12px, 0.2px tracking, var(--content-tertiary))\n- Direita: badges (trdr-badge-success = implementado, trdr-badge-brand = código)\n\nTokens TRDR obrigatórios:\n- Background: var(--surface-tertiary) → hover: var(--surface-secondary)\n- Border: 1px solid var(--border-subtle) → hover: var(--border-default)\n- Border radius: var(--scale-radius-md) — 12px\n- Padding: var(--scale-spacing-2xl) — 24px\n- Gap entre containers: var(--scale-spacing-md) — 12px\n- Transição: border-color e background-color em 0.15s ease\n\nImplemente como componente React com CSS Module. Use as classes .trdr-badge e .trdr-badge-{variant} para os badges. O componente deve aceitar as props: href, icon?, title, description, headerBadges?, footerLeft?, footerBadges?."
|
|
1162
1162
|
}
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
"slug": "janela",
|
|
1166
|
+
"name": "Janela",
|
|
1167
|
+
"figmaId": "1909:41600",
|
|
1168
|
+
"category": "trading",
|
|
1169
|
+
"implemented": true,
|
|
1170
|
+
"description": "Janela de ferramenta de trading — componente composto com header (badge AI, abas de ferramentas com underline, dropdown Multi e ações), linha de abas em pill (filtros) e Container central com slot swappable que recebe qualquer conteúdo via children. Inclui floating menu opcional de ações (Fechar, Minimizar, Maximizar, Fixar, Renomear) e scrollbars laterais/inferior visuais.",
|
|
1171
|
+
"props": [
|
|
1172
|
+
{
|
|
1173
|
+
"name": "tools",
|
|
1174
|
+
"type": "JanelaTool[]",
|
|
1175
|
+
"values": [
|
|
1176
|
+
"{ label, icon? }"
|
|
1177
|
+
]
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
"name": "activeTool",
|
|
1181
|
+
"type": "number",
|
|
1182
|
+
"values": [
|
|
1183
|
+
"0",
|
|
1184
|
+
"1",
|
|
1185
|
+
"2"
|
|
1186
|
+
]
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
"name": "onToolChange",
|
|
1190
|
+
"type": "function",
|
|
1191
|
+
"values": [
|
|
1192
|
+
"(index) => void"
|
|
1193
|
+
]
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
"name": "tabs",
|
|
1197
|
+
"type": "string[]",
|
|
1198
|
+
"values": [
|
|
1199
|
+
"[\"Aba 1\", ...]"
|
|
1200
|
+
]
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
"name": "activeTab",
|
|
1204
|
+
"type": "number",
|
|
1205
|
+
"values": [
|
|
1206
|
+
"0..N"
|
|
1207
|
+
]
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"name": "onTabChange",
|
|
1211
|
+
"type": "function",
|
|
1212
|
+
"values": [
|
|
1213
|
+
"(index) => void"
|
|
1214
|
+
]
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"name": "multiLabel",
|
|
1218
|
+
"type": "string",
|
|
1219
|
+
"values": [
|
|
1220
|
+
"Multi"
|
|
1221
|
+
]
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
"name": "showSideScroll",
|
|
1225
|
+
"type": "boolean",
|
|
1226
|
+
"values": [
|
|
1227
|
+
"true",
|
|
1228
|
+
"false"
|
|
1229
|
+
]
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
"name": "showBottomScroll",
|
|
1233
|
+
"type": "boolean",
|
|
1234
|
+
"values": [
|
|
1235
|
+
"true",
|
|
1236
|
+
"false"
|
|
1237
|
+
]
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
"name": "showActionsMenu",
|
|
1241
|
+
"type": "boolean",
|
|
1242
|
+
"values": [
|
|
1243
|
+
"true",
|
|
1244
|
+
"false"
|
|
1245
|
+
]
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
"name": "actions",
|
|
1249
|
+
"type": "JanelaAction[]",
|
|
1250
|
+
"values": [
|
|
1251
|
+
"{ icon, label, onClick? }"
|
|
1252
|
+
]
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
"name": "children",
|
|
1256
|
+
"type": "ReactNode",
|
|
1257
|
+
"values": [
|
|
1258
|
+
"conteúdo do slot central"
|
|
1259
|
+
]
|
|
1260
|
+
}
|
|
1261
|
+
],
|
|
1262
|
+
"dimensions": [
|
|
1263
|
+
{
|
|
1264
|
+
"label": "Janela total",
|
|
1265
|
+
"width": "476px",
|
|
1266
|
+
"height": "312px"
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"label": "Header",
|
|
1270
|
+
"width": "476px",
|
|
1271
|
+
"height": "41px"
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
"label": "Pill tabs row",
|
|
1275
|
+
"width": "476px",
|
|
1276
|
+
"height": "45px"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"label": "Container central",
|
|
1280
|
+
"width": "476px",
|
|
1281
|
+
"height": "226px"
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
"label": "Tag AI",
|
|
1285
|
+
"width": "hug",
|
|
1286
|
+
"height": "19px"
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
"label": "Pill (filtro)",
|
|
1290
|
+
"width": "hug",
|
|
1291
|
+
"height": "31px"
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
"label": "Botão Multi",
|
|
1295
|
+
"width": "65px",
|
|
1296
|
+
"height": "33px"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"label": "Floating actions menu",
|
|
1300
|
+
"width": "172px",
|
|
1301
|
+
"height": "192px"
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"label": "Scrollbar lateral",
|
|
1305
|
+
"width": "14px",
|
|
1306
|
+
"height": "—"
|
|
1307
|
+
},
|
|
1308
|
+
{
|
|
1309
|
+
"label": "Scrollbar inferior",
|
|
1310
|
+
"width": "—",
|
|
1311
|
+
"height": "14px"
|
|
1312
|
+
}
|
|
1313
|
+
],
|
|
1314
|
+
"tokens": [
|
|
1315
|
+
{
|
|
1316
|
+
"property": "Janela bg / Header bg",
|
|
1317
|
+
"token": "bg.secondary",
|
|
1318
|
+
"value": "#141519"
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
"property": "Pill row bg / Container bg",
|
|
1322
|
+
"token": "bg.tertiary",
|
|
1323
|
+
"value": "#1A1A1A"
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
"property": "Tag AI bg",
|
|
1327
|
+
"token": "bg.brand",
|
|
1328
|
+
"value": "#00D4FF"
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
"property": "Pill ativa bg / Multi bg",
|
|
1332
|
+
"token": "action.secondary.default",
|
|
1333
|
+
"value": "#4A4A4A"
|
|
1334
|
+
},
|
|
1335
|
+
{
|
|
1336
|
+
"property": "Pill inativa bg",
|
|
1337
|
+
"token": "surface.secondary",
|
|
1338
|
+
"value": "#222222"
|
|
1339
|
+
},
|
|
1340
|
+
{
|
|
1341
|
+
"property": "Texto pill ativa / título",
|
|
1342
|
+
"token": "content.primary",
|
|
1343
|
+
"value": "#FFFFFF"
|
|
1344
|
+
},
|
|
1345
|
+
{
|
|
1346
|
+
"property": "Texto item floating",
|
|
1347
|
+
"token": "content.secondary",
|
|
1348
|
+
"value": "#E8E8E8"
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
"property": "Texto pill inativa / ícones / aba inativa",
|
|
1352
|
+
"token": "content.tertiary",
|
|
1353
|
+
"value": "#A4A4A4"
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
"property": "Ícone link / underline aba ativa",
|
|
1357
|
+
"token": "bg.brand",
|
|
1358
|
+
"value": "#00D4FF"
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
"property": "Stroke header / pill row / floating",
|
|
1362
|
+
"token": "border.subtle",
|
|
1363
|
+
"value": "#222222"
|
|
1364
|
+
},
|
|
1365
|
+
{
|
|
1366
|
+
"property": "Radius pill / botão Multi",
|
|
1367
|
+
"token": "radius.lg",
|
|
1368
|
+
"value": "16px"
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
"property": "Radius janela / floating menu",
|
|
1372
|
+
"token": "radius.md",
|
|
1373
|
+
"value": "8px"
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
"property": "Radius Tag AI / item floating",
|
|
1377
|
+
"token": "radius.sm",
|
|
1378
|
+
"value": "4px"
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
"property": "Padding pill / gap header",
|
|
1382
|
+
"token": "spacing.sm",
|
|
1383
|
+
"value": "8px"
|
|
1384
|
+
},
|
|
1385
|
+
{
|
|
1386
|
+
"property": "Padding pill horizontal",
|
|
1387
|
+
"token": "spacing.md",
|
|
1388
|
+
"value": "12px"
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
"property": "Padding container interno",
|
|
1392
|
+
"token": "spacing.lg",
|
|
1393
|
+
"value": "16px"
|
|
1394
|
+
}
|
|
1395
|
+
],
|
|
1396
|
+
"anatomy": "Janela 476×312 com border-radius 8px e border subtle, em coluna:\n\n1. HEADER (41px, bg --bg-secondary, border-bottom subtle):\n [Tag AI 19h #00D4FF radius 4] · [Tabs Ferramentas 14/16.8 com underline 2px brand na ativa + chevron 40×40] · [Divider 1×33 · Link cyan 24×24 · Multi 65×33 bg secondary radius 16 · more_horiz 24×24 · close 24×24]\n\n2. PILL TABS (45px, bg --bg-tertiary, padding 8, gap 8, border-bottom subtle):\n 5 pills 31h padding 8/12 radius 16. Ativa: bg --action-secondary-default + texto primary. Inativas: bg --surface-secondary + texto tertiary.\n\n3. CONTAINER (226px, bg --bg-tertiary, padding 16, gap 8):\n Slot via children. Fallback visual: texto \"Componente coringa\". Scrollbars opcionais (lateral 14×, inferior ×14) com setas Material e thumb arredondado radius 16.\n\n4. FLOATING ACTIONS MENU (172×192, opcional, ancorado em more_horiz):\n bg --bg-secondary, border subtle, radius 8, shadow drop. 5 ações (Fechar/Minimizar/Maximizar/Fixar/Renomear) 32h cada com ícone Material 20px tertiary + label Inter 14 secondary. Hover bg --surface-secondary.",
|
|
1397
|
+
"notes": "Slot via React.children: passe qualquer componente (Boleta, Card, gráfico, etc.) como filho. O componente expõe estado controlado e não-controlado para activeTool/activeTab.",
|
|
1398
|
+
"code": {
|
|
1399
|
+
"html": "<!-- Janela TRDR — exemplo estático (Figma 1909:41600) -->\n<div class=\"trdr-janela\">\n\n <!-- HEADER -->\n <div class=\"trdr-janela-header\">\n <span class=\"trdr-janela-tag-ai\">\n <span class=\"material-symbols-outlined\" style=\"font-size:12px\">auto_awesome</span>\n AI\n </span>\n\n <div class=\"trdr-janela-tool-tabs\">\n <button class=\"trdr-janela-tool-tab trdr-janela-tool-tab-active\">Ferramenta 1</button>\n <button class=\"trdr-janela-tool-tab\">Ferramenta 2</button>\n <button class=\"trdr-janela-tool-tab\">Ferramenta 3</button>\n <button class=\"trdr-janela-tool-chevron\">\n <span class=\"material-symbols-outlined\">keyboard_arrow_down</span>\n </button>\n </div>\n\n <div class=\"trdr-janela-header-actions\">\n <span class=\"trdr-janela-divider\"></span>\n <button class=\"trdr-janela-icon-button trdr-janela-icon-link\">\n <span class=\"material-symbols-outlined\">link</span>\n </button>\n <button class=\"trdr-janela-multi\">\n Multi\n <span class=\"material-symbols-outlined\" style=\"font-size:16px\">keyboard_arrow_down</span>\n </button>\n <button class=\"trdr-janela-icon-button\">\n <span class=\"material-symbols-outlined\">more_horiz</span>\n </button>\n <button class=\"trdr-janela-icon-button\">\n <span class=\"material-symbols-outlined\">close</span>\n </button>\n </div>\n </div>\n\n <!-- PILL TABS (filtros) -->\n <div class=\"trdr-janela-pill-row\" role=\"tablist\">\n <button class=\"trdr-janela-pill trdr-janela-pill-active\">Aba 1</button>\n <button class=\"trdr-janela-pill\">Aba 2</button>\n <button class=\"trdr-janela-pill\">Aba 3</button>\n <button class=\"trdr-janela-pill\">Aba 4</button>\n <button class=\"trdr-janela-pill\">Aba 5</button>\n </div>\n\n <!-- CONTAINER (slot) -->\n <div class=\"trdr-janela-container\">\n <div class=\"trdr-janela-container-inner\">\n <!-- Slot: substitua pelo seu componente -->\n <span class=\"trdr-janela-coringa\">Componente coringa</span>\n </div>\n </div>\n\n <!-- FLOATING MENU (opcional — more_horiz) -->\n <div class=\"trdr-janela-actions-menu\" role=\"menu\">\n <button class=\"trdr-janela-action-item\"><span class=\"material-symbols-outlined\">close</span>Fechar</button>\n <button class=\"trdr-janela-action-item\"><span class=\"material-symbols-outlined\">remove</span>Minimizar</button>\n <button class=\"trdr-janela-action-item\"><span class=\"material-symbols-outlined\">arrow_outward</span>Maximizar</button>\n <button class=\"trdr-janela-action-item\"><span class=\"material-symbols-outlined\">keep</span>Fixar</button>\n <button class=\"trdr-janela-action-item\"><span class=\"material-symbols-outlined\">edit</span>Renomear aba</button>\n </div>\n\n</div>",
|
|
1400
|
+
"css": "/* Janela TRDR — Figma 1909:41600 (476×312)\n * Tokens semânticos usados (todos em src/styles/tokens.css):\n * --bg-secondary #141519 --bg-tertiary #1A1A1A --bg-brand #00D4FF\n * --surface-secondary #222222 --action-secondary-default #4A4A4A\n * --content-primary #FFFFFF --content-secondary #E8E8E8 --content-tertiary #A4A4A4\n * --border-subtle #222222\n * --radius-sm 4px --radius-md 8px --radius-lg 16px\n * --spacing-xs 4px --spacing-sm 8px --spacing-md 12px --spacing-lg 16px\n */\n\n.trdr-janela {\n width: 476px;\n height: 312px;\n display: flex;\n flex-direction: column;\n background: var(--bg-secondary);\n border: 1px solid var(--border-subtle);\n border-radius: var(--radius-md);\n position: relative;\n overflow: hidden;\n font-family: var(--font-secondary);\n}\n\n/* HEADER */\n.trdr-janela-header {\n display: flex; align-items: center; gap: 8px;\n height: 41px; padding: 0 8px;\n background: var(--bg-secondary);\n border-bottom: 1px solid var(--border-subtle);\n}\n.trdr-janela-tag-ai {\n display: inline-flex; align-items: center; gap: 2px;\n padding: 2px 4px;\n background: var(--bg-brand);\n border-radius: var(--radius-sm);\n font-size: 11px; font-weight: 600;\n color: var(--content-primary);\n}\n.trdr-janela-tool-tabs {\n display: flex; align-items: stretch; flex: 1; min-width: 0; height: 100%;\n overflow: hidden;\n}\n.trdr-janela-tool-tab {\n padding: 0 12px; height: 100%;\n background: transparent; border: none; cursor: pointer;\n font-size: 14px; line-height: 16.8px;\n color: var(--content-tertiary);\n position: relative; transition: color 0.15s ease;\n white-space: nowrap;\n}\n.trdr-janela-tool-tab:hover:not(.trdr-janela-tool-tab-active) { color: var(--content-secondary); }\n.trdr-janela-tool-tab-active { color: var(--content-primary); }\n.trdr-janela-tool-tab-active::after {\n content: ''; position: absolute; left: 0; right: 0; bottom: 0;\n height: 2px; background: var(--bg-brand);\n}\n.trdr-janela-tool-chevron {\n width: 40px; height: 40px;\n display: inline-flex; align-items: center; justify-content: center;\n background: transparent; border: none; cursor: pointer;\n color: var(--content-tertiary);\n}\n.trdr-janela-header-actions {\n display: flex; align-items: center; gap: 8px; flex-shrink: 0; height: 100%;\n}\n.trdr-janela-divider { width: 1px; height: 33px; background: var(--border-subtle); }\n.trdr-janela-icon-button {\n width: 24px; height: 24px;\n display: inline-flex; align-items: center; justify-content: center;\n background: transparent; border: none; cursor: pointer;\n color: var(--content-tertiary);\n transition: color 0.15s ease;\n}\n.trdr-janela-icon-button:hover { color: var(--content-secondary); }\n.trdr-janela-icon-link { color: var(--bg-brand); }\n.trdr-janela-multi {\n display: inline-flex; align-items: center; gap: 4px;\n height: 33px; padding: 0 8px;\n background: var(--action-secondary-default);\n border: none; border-radius: var(--radius-lg);\n cursor: pointer;\n font-size: 14px; color: var(--content-primary);\n}\n\n/* PILL TABS (filtros) */\n.trdr-janela-pill-row {\n display: flex; align-items: center; gap: 8px;\n height: 45px; padding: 8px;\n background: var(--bg-tertiary);\n border-bottom: 1px solid var(--border-subtle);\n overflow: hidden;\n}\n.trdr-janela-pill {\n height: 31px; padding: 8px 12px;\n background: var(--surface-secondary);\n border: none; border-radius: var(--radius-lg);\n font-size: 14px; line-height: 16.8px;\n color: var(--content-tertiary);\n cursor: pointer; white-space: nowrap;\n transition: background 0.15s ease, color 0.15s ease;\n}\n.trdr-janela-pill-active {\n background: var(--action-secondary-default);\n color: var(--content-primary);\n}\n\n/* CONTAINER (slot) */\n.trdr-janela-container {\n flex: 1; position: relative;\n background: var(--bg-tertiary);\n display: flex; flex-direction: column; overflow: hidden;\n}\n.trdr-janela-container-inner {\n flex: 1; display: flex; align-items: center; justify-content: center;\n padding: 16px; gap: 8px; overflow: auto; min-height: 0;\n}\n.trdr-janela-coringa {\n font-size: 14px; line-height: 16.8px; color: var(--content-primary);\n}\n\n/* FLOATING MENU */\n.trdr-janela-actions-menu {\n position: absolute; top: 45px; right: 40px;\n width: 172px;\n background: var(--bg-secondary);\n border: 1px solid var(--border-subtle);\n border-radius: var(--radius-md);\n box-shadow: 0 4px 12px rgba(0,0,0,0.30);\n padding: 8px; display: flex; flex-direction: column; gap: 4px;\n z-index: 10;\n}\n.trdr-janela-action-item {\n display: flex; align-items: center; gap: 8px;\n height: 32px; padding: 0 8px;\n background: transparent; border: none; cursor: pointer;\n border-radius: var(--radius-sm);\n font-size: 14px; line-height: 16.8px;\n color: var(--content-secondary);\n text-align: left;\n transition: background 0.12s ease;\n}\n.trdr-janela-action-item:hover { background: var(--surface-secondary); }\n.trdr-janela-action-item .material-symbols-outlined { color: var(--content-tertiary); font-size: 20px; }",
|
|
1401
|
+
"react": "import Janela from '@/components/ui/Janela'\nimport Boleta from '@/components/ui/Boleta'\n\n// Versão default — slot vazio mostra \"Componente coringa\"\n<Janela />\n\n// Com tabs/ferramentas customizadas e callback\n<Janela\n tools={[\n { label: 'Book', icon: 'view_list' },\n { label: 'Gráfico', icon: 'show_chart' },\n ]}\n tabs={['Mercado', 'Posições', 'Histórico']}\n activeTab={0}\n onTabChange={(i) => console.log('tab', i)}\n/>\n\n// Com conteúdo customizado no slot\n<Janela activeTab={2} showSideScroll showBottomScroll>\n <Boleta versao=\"simples\" />\n</Janela>\n\n// Com floating menu de ações aberto\n<Janela\n showActionsMenu\n onActionsMenuToggle={() => setMenuOpen(v => !v)}\n actions={[\n { icon: 'close', label: 'Fechar', onClick: handleClose },\n { icon: 'remove', label: 'Minimizar' },\n { icon: 'arrow_outward', label: 'Maximizar' },\n ]}\n/>",
|
|
1402
|
+
"prompt": "Implemente o componente Janela do Design System TRDR — janela de ferramenta de trading composta, pixel-perfect com o Figma 1909:41600.\n\nDIMENSÕES (fixas): 476×312 px, border-radius var(--radius-md) (8px), border 1px solid var(--border-subtle), background var(--bg-secondary), overflow hidden, position relative, font-family var(--font-secondary). Layout em coluna com 3 faixas:\n\n1. HEADER (height 41px, bg var(--bg-secondary), border-bottom 1px var(--border-subtle), padding 0 8px, gap 8px):\n - Tag AI: padding 2px 4px, gap 2px, bg var(--bg-brand) #00D4FF, border-radius var(--radius-sm) 4px, texto \"AI\" Inter 11/600 var(--content-primary). Ícone Material \"auto_awesome\" 12px à esquerda.\n - Abas Ferramentas (flex:1, height 100%, overflow hidden): 3 botões \"Ferramenta N\", padding 0 12px, font Inter 14/16.8 var(--content-tertiary); ativa muda para var(--content-primary) e ganha ::after com height 2px var(--bg-brand) (#00D4FF) no bottom 0 left/right 0. Botão chevron 40×40 com ícone Material \"keyboard_arrow_down\" tertiary.\n - Controles à direita (gap 8px): divider vertical 1×33 var(--border-subtle); botão ícone \"link\" 24×24 cor var(--bg-brand) (cyan); botão \"Multi\" 33h padding 0 8px gap 4 bg var(--action-secondary-default) (#4A4A4A) radius var(--radius-lg) (16px) texto primary + chevron 16px; botões ícone \"more_horiz\" e \"close\" 24×24 tertiary.\n\n2. PILL TABS (height 45px, bg var(--bg-tertiary) #1A1A1A, padding 8px, gap 8px, border-bottom subtle, overflow hidden):\n - 5 pills \"Aba 1..Aba 5\". Cada pill 31h padding 8px 12px radius var(--radius-lg) Inter 14/16.8 whitespace nowrap.\n - Ativa: bg var(--action-secondary-default) #4A4A4A, texto var(--content-primary).\n - Inativa: bg var(--surface-secondary) #222222, texto var(--content-tertiary). Hover muda texto para var(--content-secondary).\n\n3. CONTAINER CENTRAL (flex 1, bg var(--bg-tertiary), padding 16px, gap 8px, position relative, overflow hidden):\n - Slot via children. Quando vazio mostrar fallback \"Componente coringa\" centralizado, Inter 14/16.8 var(--content-primary).\n - Scrollbars opcionais (controlados por props showSideScroll/showBottomScroll):\n • Lateral (right 0, top 0, bottom 6px, width 14px, bg var(--bg-secondary), border-left subtle): seta cima 12×12 Material \"arrow_drop_up\", track 6px com thumb radius 16 bg var(--action-secondary-default) 60% de altura, seta baixo \"arrow_drop_down\".\n • Inferior (left 0, right 14px, height 14px, bg var(--bg-secondary), border-top subtle): seta esquerda \"arrow_left\", track horizontal com thumb radius 16, seta direita \"arrow_right\".\n • Canto: quando ambos ativos, 14×14 no canto inferior direito com bg secondary e borders.\n\n4. FLOATING ACTIONS MENU (opcional, posição absoluta top 45px right 40px, width 172px):\n - bg var(--bg-secondary), border 1px var(--border-subtle), border-radius var(--radius-md) (8px), box-shadow 0 4px 12px rgba(0,0,0,0.30), padding 8px, gap 4px, z-index 10.\n - 5 ações: { close: Fechar, remove: Minimizar, arrow_outward: Maximizar, keep: Fixar, edit: Renomear aba }. Cada item: height 32px, padding 0 8px, gap 8px, border-radius var(--radius-sm), ícone Material 20px var(--content-tertiary), label Inter 14/16.8 var(--content-secondary). Hover bg var(--surface-secondary).\n\nAPI React (TypeScript): props { tools?: JanelaTool[]; activeTool?: number; onToolChange?; tabs?: string[]; activeTab?: number; onTabChange?; multiLabel?: string; onMultiClick?; onLinkClick?; onClose?; showSideScroll?: boolean; showBottomScroll?: boolean; showActionsMenu?: boolean; onActionsMenuToggle?; actions?: JanelaAction[]; children?: ReactNode }. Suporta estado controlado E não-controlado (defaultActiveTool/defaultActiveTab). aria-selected nas pills, aria-expanded no botão de menu, role=\"tab\"/\"tablist\"/\"menu\"/\"menuitem\".\n\nUse APENAS tokens semânticos do TRDR (var(--bg-*), var(--surface-*), var(--content-*), var(--action-*), var(--border-*), var(--radius-*), var(--spacing-*)). NUNCA hex direto. NUNCA --scale-spacing-* ou --scale-radius-* (não existem). O componente deve funcionar nos dois temas (light e dark) sem alterações."
|
|
1403
|
+
}
|
|
1163
1404
|
}
|
|
1164
1405
|
]
|
|
1165
1406
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* SNAPSHOT — TRDR Design Tokens
|
|
3
|
-
* Sincronizado de:
|
|
4
|
-
* Em: 2026-05-
|
|
3
|
+
* Sincronizado de: C:\Users\mauro\Desktop\trdr-design-hub
|
|
4
|
+
* Em: 2026-05-11T00:36:20.679Z
|
|
5
5
|
* Não edite manualmente — atualize via "npm run sync-tokens"
|
|
6
6
|
*/
|
|
7
7
|
|